Revert "Use yepnope for lazy loading JS"
Revert "Use yepnope for lazy loading JS"

This reverts commit 45c78f8cd142d6823d3e9b8c7053a76b382bfecd.

Conflicts:

.gitmodules
include/common-template.inc.php

file:b/.gitmodules (new)
--- /dev/null
+++ b/.gitmodules
@@ -1,1 +1,16 @@
+[submodule "js/flotr2"]
+	path = js/flotr2
+	url = https://github.com/HumbleSoftware/Flotr2.git
+[submodule "js/FlashCanvas"]
+	path = js/FlashCanvas
+	url = https://github.com/timcameronryan/FlashCanvas
+[submodule "lib/amon-php"]
+	path = lib/amon-php
+	url = https://github.com/martinrusev/amon-php.git
+[submodule "javascripts/tesseract"]
+	path = javascripts/tesseract
+	url = https://github.com/square/tesseract.git
+[submodule "javascripts/d3"]
+	path = javascripts/d3
+	url = https://github.com/mbostock/d3.git
 

file:a/about.php -> file:b/about.php
--- a/about.php
+++ b/about.php
@@ -20,8 +20,8 @@
 <p>
     Busness Time - An ACT bus timetable webapp<br />
     Based on the maxious-canberra-transit-feed (<a 
-        href="http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip">download</a>, 
-    last updated <?php echo date("F d Y.", @filemtime('cbrfeed.zip')); ?>)<br />
+        href="http://busresources.lambdacomplex.org/cbrfeed.zip">download</a>, 
+    last updated <?php echo date("F d Y.", @filemtime('../busresources/cbrfeed.zip')); ?>)<br />
     Source code for the <a 
         href="https://github.com/maxious/ACTBus-data">transit 
         feed</a> and <a href="https://github.com/maxious/ACTBus-ui">this 
@@ -36,7 +36,7 @@
     Native clients also available for iPhone(<a href="http://itunes.apple.com/au/app/cbrtimetable/id444287349?mt=8">cbrTimetable by Sandor Kolotenko</a>
     , <a href="http://itunes.apple.com/au/app/act-buses/id376634797?mt=8">ACT Buses by David Sullivan</a>, <a href="http://itunes.apple.com/app/bus-trips-act/id489146525?mt=8">Bus Trips ACT by Molson Chengalath</a>) 
     , Android (<a href="https://market.android.com/details?id=com.action">MyBus 2.0 by Imagine Team</a>, <A href="https://market.android.com/details?id=GetMe2CanberraFree.source">GetMe2 Canberra by
-Colin Thompson </a>) 
+Colin Thompson </a>, <a href="https://market.android.com/details?id=au.com.transittimes.android">TransitTimes+ by Zervaas Enterprises</a>) 
     and Windows Phone 7 (<a href="http://www.windowsphone.com/en-AU/apps/d840375e-429c-4aa4-a358-80eec6ea9e66">TransHub Canberra by Soul Solutions</a>) Other web clients include <a href="http://canberra.itranzit.com/option.html">iTranzit</a>.
     <br />
     GTFS-realtime API:

file:a/aws/awsStartup.sh (deleted)
--- a/aws/awsStartup.sh
+++ /dev/null
@@ -1,13 +1,1 @@
-#!/bin/bash
-#this script should be run from a fresh git checkout from github
-#ami base must have yum install lighttpd-fastcgi, git, tomcat6 
-#php-cli php-gd tomcat6-webapps tomcat6-admin-webapps svn maven2
-#postgres postgres-server php-pg
-#http://www.how2forge.org/installing-lighttpd-with-php5-and-mysql-support-on-fedora-12
 
-sh busuiphp.sh
-sh busuidb.sh
-sh busuiotp.sh
-
-
-

file:a/aws/busuidb.sh (deleted)
--- a/aws/busuidb.sh
+++ /dev/null
@@ -1,17 +1,1 @@
-createdb transitdata
-createlang -d transitdata plpgsql
-psql -d transitdata -f /var/www/lib/postgis.sql
-# curl https://github.com/maxious/ACTBus-ui/raw/master/transitdata.cbrfeed.sql.gz -o transitdata.cbrfeed.sql.gz 
-#made with pg_dump transitdata | gzip -c >  transitdata.cbrfeed.sql.gz
-gunzip /var/www/transitdata.cbrfeed.sql.gz
-psql -d transitdata -f /var/www/transitdata.cbrfeed.sql
-#createuser transitdata -SDRP
-#password transitdata
-#psql -d transitdata -c "GRANT SELECT ON TABLE agency,calendar,calendar_dates,routes,stop_times,stops,trips TO transitdata;"
-#psql -d transitdata -c "GRANT SELECT,INSERT ON	TABLE myway_observations,myway_routes,myway_stops,myway_timingdeltas TO transitdata;"
-#psql -d transitdata -c	"GRANT SELECT,INSERT,UPDATE ON TABLE myway_routes,myway_stops TO transitdata;"
-##psql -d transitdata -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO transitdata;"
-## INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type")
-##SELECT '', 'public', 'shapes', 'shape_pt', ST_CoordDim(shape_pt), ST_SRID(shape_pt), GeometryType(shape_pt)
-##FROM shapes LIMIT 1;
-php /var/www/updatedb.php
+

file:a/aws/busuiotp.sh (deleted)
--- a/aws/busuiotp.sh
+++ /dev/null
@@ -1,10 +1,1 @@
-wget http://s3-ap-southeast-1.amazonaws.com/busresources/Graph.obj \
--O /tmp/Graph.obj
-/etc/init.d/tomcat6 stop
-rm -rfv /usr/share/tomcat6/webapps/opentripplanner*
-wget http://s3-ap-southeast-1.amazonaws.com/busresources/opentripplanner-webapp.war \
--O /usr/share/tomcat6/webapps/opentripplanner-webapp.war
-wget http://s3-ap-southeast-1.amazonaws.com/busresources/opentripplanner-api-webapp.war \
--O /usr/share/tomcat6/webapps/opentripplanner-api-webapp.war
-/etc/init.d/tomcat6 restart
 

file:a/aws/busuiotp.testing.sh (deleted)
--- a/aws/busuiotp.testing.sh
+++ /dev/null
@@ -1,10 +1,1 @@
-wget http://s3-ap-southeast-1.amazonaws.com/busresources/testing/Graph.obj \
--O /tmp/Graph.obj
-/etc/init.d/tomcat6 stop
-rm -rfv /usr/share/tomcat6/webapps/opentripplanner*
-wget http://s3-ap-southeast-1.amazonaws.com/busresources/testing/opentripplanner-webapp.war \
--O /usr/share/tomcat6/webapps/opentripplanner-webapp.war
-wget http://s3-ap-southeast-1.amazonaws.com/busresources/testing/opentripplanner-api-webapp.war \
--O /usr/share/tomcat6/webapps/opentripplanner-api-webapp.war
-/etc/init.d/tomcat6 restart
 

file:a/aws/busuiphp.sh (deleted)
--- a/aws/busuiphp.sh
+++ /dev/null
@@ -1,12 +1,1 @@
-cp /root/aws.php /tmp/
-chmod  777 /var/cache/lighttpd/compress/
 
-chcon -h system_u:object_r:httpd_sys_content_t /var/www
-chcon -R -h root:object_r:httpd_sys_content_t /var/www/*
-
-chcon -R -t httpd_sys_content_rw_t /var/www/labs/tiles
-chmod -R 777 /var/www/labs/tiles
-
-wget http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip \
--O /var/www/cbrfeed.zip
-

file:a/aws/compress.conf (deleted)
--- a/aws/compress.conf
+++ /dev/null
@@ -1,33 +1,1 @@
-#######################################################################
-##
-##  Output Compression 
-## --------------------
-##
-## see http://www.lighttpd.net/documentation/compress.html
-##
-server.modules += ( "mod_compress" )
 
-##
-## where should the compressed files be cached?
-## see the base config for the declaration of the variable.
-##
-## This directory should be changed per vhost otherwise you can
-## run into trouble with overlapping filenames
-##
-compress.cache-dir         = cache_dir + "/compress"
-
-##
-## FileTypes to compress.
-## 
-#compress.filetype          = ("text/plain", "text/html")
-compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml")
-
-##
-## Maximum filesize that will be compressed.
-## Default is 0, which means unlimited file size.
-## 
-#compress.max-filesize = 0
-
-##
-#######################################################################
-

file:a/aws/data-sources.xml (deleted)
--- a/aws/data-sources.xml
+++ /dev/null
@@ -1,13 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
 
-        <!-- Single graph -->
-        <import resource="classpath:org/opentripplanner/api/application-context.xml" />
-
-        <bean id="graphBundle" class="org.opentripplanner.model.GraphBundle">
-                <property name="path" value="/tmp/" />
-        </bean>
-
-</beans>
-

file:a/aws/expire.conf (deleted)
--- a/aws/expire.conf
+++ /dev/null
@@ -1,29 +1,1 @@
-#######################################################################
-##
-##  Expire Module 
-## --------------- 
-##
-## See http://www.lighttpd.net/documentation/expire.html
-##
-server.modules += ( "mod_expire" )
 
-##
-##  assignes a expiration to all files below the specified path. The
-##  specification of the time is made up of:
-##
-##    <access|modification> <number> <years|months|days|hours|minutes|seconds>
-##    
-#expire.url = (
-#  "/buggy/"  => "access 2 hours",
-#  "/images/" => "access plus 1 seconds 2 minutes"
-#)
-etag.use-mtime = "enable"
-etag.use-inode = "disable"
-static-file.etags = "enable"
-$HTTP["url"] =~ "\.(css|js|png|jpg|ico|gif)$" {
-	expire.url = ( "" => "access 7 days" )
-}
-
-##
-#######################################################################
-

file:a/aws/fastcgi.conf (deleted)
--- a/aws/fastcgi.conf
+++ /dev/null
@@ -1,144 +1,1 @@
-#######################################################################
-##
-##  FastCGI Module 
-## --------------- 
-##
-## http://www.lighttpd.net/documentation/fastcgi.html
-##
-server.modules += ( "mod_fastcgi" )
-fastcgi.server             = ( ".php" =>
-                               ( "localhost" =>
-                                 (
-                                   "socket" => 
-"/var/run/lighttpd/php-fastcgi.socket",
-                                   "bin-path" => "/usr/bin/php-cgi"
-                                 )
-                               )
-                            )
-##
-## PHP Example
-## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini.
-##
-## The number of php processes you will get can be easily calculated:
-##
-## num-procs = max-procs * ( 1 + PHP_FCGI_CHILDREN )
-##
-## for the php-num-procs example it means you will get 17*5 = 85 php
-## processes. you always should need this high number for your very
-## busy sites. And if you have a lot of RAM. :)
-##
-#fastcgi.server = ( ".php" =>
-#                   ( "php-local" =>
-#                     (
-#                       "socket" => socket_dir + "/php-fastcgi-1.socket",
-#                       "bin-path" => server_root + "/php-cgi",
-#                       "max-procs" => 1,
-#                       "broken-scriptfilename" => "enable",
-#                     )
-#                   ),
-#                   ( "php-tcp" =>
-#                     (
-#                       "host" => "127.0.0.1",
-#                       "port" => 9999,
-#                       "check-local" => "disable",
-#                       "broken-scriptfilename" => "enable",
-#                     )
-#                   ),
-#
-#                   ( "php-num-procs" =>
-#                     (
-#                       "socket" => socket_dir + "/php-fastcgi-2.socket",
-#                       "bin-path" => server_root + "/php-cgi",
-#                       "bin-environment" => (
-#                         "PHP_FCGI_CHILDREN" => "16",
-#                         "PHP_FCGI_MAX_REQUESTS" => "10000",
-#                       ),
-#                       "max-procs" => 5,
-#                       "broken-scriptfilename" => "enable",
-#                     )
-#                   ),
-#                )
 
-##
-## Ruby on Rails Example
-##
-## Normally you only run one Rails application on one vhost.
-##
-#$HTTP["host"] == "rails1.example.com" {
-#  server.document-root  = server_root + "/rails/someapp/public"
-#  server.error-handler-404 = "/dispatch.fcgi"
-#  fastcgi.server = ( ".fcgi" =>
-#    ("someapp" =>
-#      ( "socket" => socket_dir + "/someapp-fcgi.socket",
-#        "bin-path" => server_root + "/rails/someapp/public/dispatch.fcgi",
-#        "bin-environment" => (
-#              "RAILS_ENV" => "production",
-#              "TMP" => home_dir + "/rails/someapp",
-#        ),
-#      )
-#    )
-#  )
-#}
-
-##
-## Another example with multiple rails applications on one vhost.
-##
-## http://blog.lighttpd.net/articles/2005/11/23/lighttpd-1-4-8-and-multiple-rails-apps
-##
-#$HTTP["host"] == "rails2.example.com" {
-#  $HTTP["url"] =~ "^/someapp1" {
-#    server.document-root  = server_root + "/rails/someapp1/public"
-#    server.error-handler-404 = "/dispatch.fcgi"
-#    fastcgi.server = ( ".fcgi" =>
-#      ("someapp1" =>
-#        ( "socket" => socket_dir + "/someapp1-fcgi.socket",
-#          "bin-path" => server_root + "/rails/someapp1/public/dispatch.fcgi",
-#          "bin-environment" => (
-#                "RAILS_ENV" => "production",
-#                "TMP" => home_dir + "/rails/someapp1",
-#          ),
-#          "strip-request-uri" => "/someapp1/"
-#        )
-#      )
-#    )
-#  }
-#
-#  $HTTP["url"] =~ "^/someapp2" {
-#    server.document-root  = server_root + "/rails/someapp2/public"
-#    server.error-handler-404 = "/dispatch.fcgi"
-#    fastcgi.server = ( ".fcgi" =>
-#      ("someapp2" =>
-#        ( "socket" => socket_dir + "/someapp2-fcgi.socket",
-#          "bin-path" => server_root + "/rails/someapp2/public/dispatch.fcgi",
-#          "bin-environment" => (
-#                "RAILS_ENV" => "production",
-#                "TMP" => home_dir + "/rails/someapp2",
-#          ),
-#          "strip-request-uri" => "/someapp2/"
-#        )
-#      )
-#    )
-#  }
-#}
-
-## chrooted webserver + external PHP
-##
-## $ spawn-fcgi -f /usr/bin/php-cgi -p 2000 -a 127.0.0.1 -C 8
-##
-## webserver chrooted to /srv/www/
-## php running outside the chroot
-#
-#fastcgi.server = ( 
-#  ".php" => (( 
-#    "host" => "127.0.0.1",
-#    "port" => "2000",
-#    "docroot" => "/srv/www/servers/www.example.org/htdocs/"
-#  )))
-#
-#server.chroot = "/srv/www"
-#server.document-root = "/servers/wwww.example.org/htdocs/"
-#
-
-##
-#######################################################################
-

file:a/aws/modules.conf (deleted)
--- a/aws/modules.conf
+++ /dev/null
@@ -1,173 +1,1 @@
-#######################################################################
-##
-##  Modules to load
-## -----------------
-##
-## at least mod_access and mod_accesslog should be loaded
-## all other module should only be loaded if really neccesary
-##
-## - saves some time
-## - saves memory
-##
-## the default module set contains:
-##
-## "mod_indexfile", "mod_dirlisting", "mod_staticfile"
-##
-## you dont have to include those modules in your list
-##
-## Modules, which are pulled in via conf.d/*.conf
-##
-## NOTE: the order of modules is important.
-##
-## - mod_accesslog     -> conf.d/access_log.conf
-## - mod_compress      -> conf.d/compress.conf
-## - mod_status        -> conf.d/status.conf
-## - mod_webdav        -> conf.d/webdav.conf
-## - mod_cml           -> conf.d/cml.conf
-## - mod_evhost        -> conf.d/evhost.conf
-## - mod_simple_vhost  -> conf.d/simple_vhost.conf
-## - mod_mysql_vhost   -> conf.d/mysql_vhost.conf
-## - mod_trigger_b4_dl -> conf.d/trigger_b4_dl.conf
-## - mod_userdir       -> conf.d/userdir.conf
-## - mod_rrdtool       -> conf.d/rrdtool.conf
-## - mod_ssi           -> conf.d/ssi.conf
-## - mod_cgi           -> conf.d/cgi.conf
-## - mod_scgi          -> conf.d/scgi.conf
-## - mod_fastcgi       -> conf.d/fastcgi.conf
-## - mod_proxy         -> conf.d/proxy.conf
-## - mod_secdownload   -> conf.d/secdownload.conf
-## - mod_expire        -> conf.d/expire.conf
-##
 
-server.modules = (
-  "mod_access",
-#  "mod_alias",
-#  "mod_auth",
-#  "mod_evasive",
-#  "mod_redirect",
-#  "mod_rewrite",
-#  "mod_setenv",
-#  "mod_usertrack",
-)
-
-##
-#######################################################################
-
-#######################################################################
-##
-##  Config for various Modules
-##
-
-##
-## mod_ssi
-##
-#include "conf.d/ssi.conf"
-
-##
-## mod_status
-##
-#include "conf.d/status.conf"
-
-##
-## mod_webdav
-##
-#include "conf.d/webdav.conf"
-
-##
-## mod_compress
-##
-include "conf.d/compress.conf"
-
-##
-## mod_userdir
-##
-#include "conf.d/userdir.conf"
-
-##
-## mod_magnet
-##
-#include "conf.d/magnet.conf"
-
-##
-## mod_cml
-##
-#include "conf.d/cml.conf"
-
-##
-## mod_rrdtool
-##
-#include "conf.d/rrdtool.conf"
-
-##
-## mod_proxy
-##
-#include "conf.d/proxy.conf"
-
-##
-## mod_expire
-##
-include "conf.d/expire.conf"
-
-##
-## mod_secdownload
-##
-#include "conf.d/secdownload.conf"
-
-##
-#######################################################################
-
-#######################################################################
-##
-## CGI modules
-##
-
-##
-## SCGI (mod_scgi)
-##
-#include "conf.d/scgi.conf"
-
-##
-## FastCGI (mod_fastcgi)
-##
-include "conf.d/fastcgi.conf"
-
-##
-## plain old CGI (mod_cgi)
-##
-#include "conf.d/cgi.conf"
-
-##
-#######################################################################
-
-#######################################################################
-##
-## VHost Modules
-##
-##  Only load ONE of them!
-## ========================
-##
-
-##
-## You can use conditionals for vhosts aswell.
-## 
-## see http://www.lighttpd.net/documentation/configuration.html
-##
-
-##
-## mod_evhost
-##
-#include "conf.d/evhost.conf"
-
-##
-## mod_simple_vhost
-##
-#include "conf.d/simple_vhost.conf"
-
-##
-## mod_mysql_vhost
-##
-#include "conf.d/mysql_vhost.conf"
-
-##
-#######################################################################
-

file:a/aws/pg_hba.conf (deleted)
--- a/aws/pg_hba.conf
+++ /dev/null
@@ -1,77 +1,1 @@
-# PostgreSQL Client Authentication Configuration File
-# ===================================================
-#
-# Refer to the "Client Authentication" section in the
-# PostgreSQL documentation for a complete description
-# of this file.  A short synopsis follows.
-#
-# This file controls: which hosts are allowed to connect, how clients
-# are authenticated, which PostgreSQL user names they can use, which
-# databases they can access.  Records take one of these forms:
-#
-# local      DATABASE  USER  METHOD  [OPTIONS]
-# host       DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTIONS]
-# hostssl    DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTIONS]
-# hostnossl  DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTIONS]
-#
-# (The uppercase items must be replaced by actual values.)
-#
-# The first field is the connection type: "local" is a Unix-domain socket,
-# "host" is either a plain or SSL-encrypted TCP/IP socket, "hostssl" is an
-# SSL-encrypted TCP/IP socket, and "hostnossl" is a plain TCP/IP socket.
-#
-# DATABASE can be "all", "sameuser", "samerole", a database name, or
-# a comma-separated list thereof.
-#
-# USER can be "all", a user name, a group name prefixed with "+", or
-# a comma-separated list thereof.  In both the DATABASE and USER fields
-# you can also write a file name prefixed with "@" to include names from
-# a separate file.
-#
-# CIDR-ADDRESS specifies the set of hosts the record matches.
-# It is made up of an IP address and a CIDR mask that is an integer
-# (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that specifies
-# the number of significant bits in the mask.  Alternatively, you can write
-# an IP address and netmask in separate columns to specify the set of hosts.
-#
-# METHOD can be "trust", "reject", "md5", "password", "gss", "sspi", "krb5",
-# "ident", "pam", "ldap" or "cert".  Note that "password" sends passwords
-# in clear text; "md5" is preferred since it sends encrypted passwords.
-#
-# OPTIONS are a set of options for the authentication in the format
-# NAME=VALUE. The available options depend on the different authentication
-# methods - refer to the "Client Authentication" section in the documentation
-# for a list of which options are available for which authentication methods.
-#
-# Database and user names containing spaces, commas, quotes and other special
-# characters must be quoted. Quoting one of the keywords "all", "sameuser" or
-# "samerole" makes the name lose its special character, and just match a
-# database or username with that name.
-#
-# This file is read on server startup and when the postmaster receives
-# a SIGHUP signal.  If you edit the file on a running system, you have
-# to SIGHUP the postmaster for the changes to take effect.  You can use
-# "pg_ctl reload" to do that.
 
-# Put your actual configuration here
-# ----------------------------------
-#
-# If you want to allow non-local connections, you need to add more
-# "host" records. In that case you will also need to make PostgreSQL listen
-# on a non-local interface via the listen_addresses configuration parameter,
-# or via the -i or -h command line switches.
-#
-
-
-
-# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
-
-# "local" is for Unix domain socket connections only
-local   all         all                               trust
-# IPv4 local connections:
-host    all         all         127.0.0.1/32          trust
-# IPv6 local connections:
-host    all         all         ::1/128               trust
-#Allow any IP to connect, with a password:
-host    all         all         0.0.0.0          0.0.0.0      md5
-

file:a/aws/php.ini (deleted)
--- a/aws/php.ini
+++ /dev/null
@@ -1,1662 +1,1 @@
-[PHP]
 
-date.timezone = "Australia/Sydney"
-
-;;;;;;;;;;;;;;;;;;;
-; About php.ini   ;
-;;;;;;;;;;;;;;;;;;;
-; PHP's initialization file, generally called php.ini, is responsible for
-; configuring many of the aspects of PHP's behavior.
-
-; PHP attempts to find and load this configuration from a number of locations.
-; The following is a summary of its search order:
-; 1. SAPI module specific location.
-; 2. The PHPRC environment variable. (As of PHP 5.2.0)
-; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0)
-; 4. Current working directory (except CLI)
-; 5. The web server's directory (for SAPI modules), or directory of PHP
-; (otherwise in Windows)
-; 6. The directory from the --with-config-file-path compile time option, or the
-; Windows directory (C:\windows or C:\winnt)
-; See the PHP docs for more specific information.
-; http://www.php.net/manual/en/configuration.file.php
-
-; The syntax of the file is extremely simple.  Whitespace and Lines
-; beginning with a semicolon are silently ignored (as you probably guessed).
-; Section headers (e.g. [Foo]) are also silently ignored, even though
-; they might mean something in the future. 
-
-; Directives following the section heading [PATH=/www/mysite] only
-; apply to PHP files in the /www/mysite directory.  Directives
-; following the section heading [HOST=www.example.com] only apply to
-; PHP files served from www.example.com.  Directives set in these
-; special sections cannot be overridden by user-defined INI files or
-; at runtime. Currently, [PATH=] and [HOST=] sections only work under
-; CGI/FastCGI.
-; http://www.php.net/manual/en/ini.sections.php
-
-; Directives are specified using the following syntax:
-; directive = value
-; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
-; Directives are variables used to configure PHP or PHP extensions.
-; There is no name validation.  If PHP can't find an expected
-; directive because it is not set or is mistyped, a default value will be used.
-
-; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
-; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
-; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a
-; previously set variable or directive (e.g. ${foo})
-
-; Expressions in the INI file are limited to bitwise operators and parentheses:
-; |  bitwise OR
-; ^  bitwise XOR
-; &  bitwise AND
-; ~  bitwise NOT
-; !  boolean NOT
-
-; Boolean flags can be turned on using the values 1, On, True or Yes.
-; They can be turned off using the values 0, Off, False or No.
-
-; An empty string can be denoted by simply not writing anything after the equal
-; sign, or by using the None keyword:
-
-;  foo =         ; sets foo to an empty string
-;  foo = None    ; sets foo to an empty string
-;  foo = "None"  ; sets foo to the string 'None'
-
-; If you use constants in your value, and these constants belong to a
-; dynamically loaded extension (either a PHP extension or a Zend extension),
-; you may only use these constants *after* the line that loads the extension.
-
-;;;;;;;;;;;;;;;;;;;
-; About this file ;
-;;;;;;;;;;;;;;;;;;;
-; PHP comes packaged with two INI files. One that is recommended to be used
-; in production environments and one that is recommended to be used in
-; development environments.
-
-; php.ini-production contains settings which hold security, performance and
-; best practices at its core. But please be aware, these settings may break
-; compatibility with older or less security conscience applications. We
-; recommending using the production ini in production and testing environments.
-
-; php.ini-development is very similar to its production variant, except it's
-; much more verbose when it comes to errors. We recommending using the
-; development version only in development environments as errors shown to
-; application users can inadvertently leak otherwise secure information.
-
-; This 2 files are provided, by RPM, in /usr/share/doc/php-common-*/
-; File used by RPM (the /etc/php.ini) is mainly the php.ini-production
-
-;;;;;;;;;;;;;;;;;;;
-; Quick Reference ;
-;;;;;;;;;;;;;;;;;;;
-; The following are all the settings which are different in either the production
-; or development versions of the INIs with respect to PHP's default behavior.
-; Please see the actual settings later in the document for more details as to why
-; we recommend these changes in PHP's behavior.
-
-; allow_call_time_pass_reference
-;   Default Value: On
-;   Development Value: Off
-;   Production Value: Off
-
-; display_errors
-;   Default Value: On
-;   Development Value: On
-;   Production Value: Off
-
-; display_startup_errors
-;   Default Value: Off
-;   Development Value: On
-;   Production Value: Off
-
-; error_reporting
-;   Default Value: E_ALL & ~E_NOTICE
-;   Development Value: E_ALL | E_STRICT
-;   Production Value: E_ALL & ~E_DEPRECATED
-
-; html_errors
-;   Default Value: On
-;   Development Value: On
-;   Production value: Off
-
-; log_errors
-;   Default Value: Off
-;   Development Value: On
-;   Production Value: On
-
-; magic_quotes_gpc
-;   Default Value: On
-;   Development Value: Off
-;   Production Value: Off
-
-; max_input_time
-;   Default Value: -1 (Unlimited)
-;   Development Value: 60 (60 seconds)
-;   Production Value: 60 (60 seconds)
-
-; output_buffering
-;   Default Value: Off
-;   Development Value: 4096
-;   Production Value: 4096
-
-; register_argc_argv
-;   Default Value: On
-;   Development Value: Off
-;   Production Value: Off
-
-; register_long_arrays
-;   Default Value: On
-;   Development Value: Off
-;   Production Value: Off
-
-; request_order
-;   Default Value: None
-;   Development Value: "GP"
-;   Production Value: "GP"
-
-; session.bug_compat_42
-;   Default Value: On
-;   Development Value: On
-;   Production Value: Off
-
-; session.bug_compat_warn
-;   Default Value: On
-;   Development Value: On
-;   Production Value: Off
-
-; session.gc_divisor
-;   Default Value: 100
-;   Development Value: 1000
-;   Production Value: 1000
-
-; session.hash_bits_per_character
-;   Default Value: 4
-;   Development Value: 5
-;   Production Value: 5
-
-; short_open_tag
-;   Default Value: On
-;   Development Value: Off
-;   Production Value: Off
-
-; track_errors
-;   Default Value: Off
-;   Development Value: On
-;   Production Value: Off
-
-; url_rewriter.tags
-;   Default Value: "a=href,area=href,frame=src,form=,fieldset="
-;   Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
-;   Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
-
-; variables_order
-;   Default Value: "EGPCS"
-;   Development Value: "GPCS"
-;   Production Value: "GPCS"
-
-;;;;;;;;;;;;;;;;;;;;
-; php.ini Options  ;
-;;;;;;;;;;;;;;;;;;;;
-; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini"
-;user_ini.filename = ".user.ini"
-
-; To disable this feature set this option to empty value
-;user_ini.filename =
-
-; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes)
-;user_ini.cache_ttl = 300
-
-;;;;;;;;;;;;;;;;;;;;
-; Language Options ;
-;;;;;;;;;;;;;;;;;;;;
-
-; Enable the PHP scripting language engine under Apache.
-; http://www.php.net/manual/en/apache.configuration.php#ini.engine
-engine = On
-
-; This directive determines whether or not PHP will recognize code between
-; <? and ?> tags as PHP source which should be processed as such. It's been
-; recommended for several years that you not use the short tag "short cut" and
-; instead to use the full <?php and ?> tag combination. With the wide spread use
-; of XML and use of these tags by other languages, the server can become easily
-; confused and end up parsing the wrong code in the wrong context. But because
-; this short cut has been a feature for such a long time, it's currently still
-; supported for backwards compatibility, but we recommend you don't use them.
-; Default Value: On
-; Development Value: Off
-; Production Value: Off
-; http://www.php.net/manual/en/ini.core.php#ini.short-open-tag
-short_open_tag = Off
-
-; Allow ASP-style <% %> tags.
-; http://www.php.net/manual/en/ini.core.php#ini.asp-tags
-asp_tags = Off
-
-; The number of significant digits displayed in floating point numbers.
-; http://www.php.net/manual/en/ini.core.php#ini.precision
-precision = 14
-
-; Enforce year 2000 compliance (will cause problems with non-compliant browsers)
-; http://www.php.net/manual/en/ini.core.php#ini.y2k-compliance
-y2k_compliance = On
-
-; Output buffering is a mechanism for controlling how much output data
-; (excluding headers and cookies) PHP should keep internally before pushing that
-; data to the client. If your application's output exceeds this setting, PHP
-; will send that data in chunks of roughly the size you specify.
-; Turning on this setting and managing its maximum buffer size can yield some
-; interesting side-effects depending on your application and web server.
-; You may be able to send headers and cookies after you've already sent output
-; through print or echo. You also may see performance benefits if your server is
-; emitting less packets due to buffered output versus PHP streaming the output
-; as it gets it. On production servers, 4096 bytes is a good setting for performance
-; reasons.
-; Note: Output buffering can also be controlled via Output Buffering Control
-;   functions.
-; Possible Values:
-;   On = Enabled and buffer is unlimited. (Use with caution)
-;   Off = Disabled
-;   Integer = Enables the buffer and sets its maximum size in bytes.
-; Default Value: Off
-; Development Value: 4096
-; Production Value: 4096
-; http://www.php.net/manual/en/outcontrol.configuration.php#ini.output-buffering
-output_buffering = 4096
-
-; You can redirect all of the output of your scripts to a function.  For
-; example, if you set output_handler to "mb_output_handler", character
-; encoding will be transparently converted to the specified encoding.
-; Setting any output handler automatically turns on output buffering.
-; Note: People who wrote portable scripts should not depend on this ini
-;   directive. Instead, explicitly set the output handler using ob_start().
-;   Using this ini directive may cause problems unless you know what script
-;   is doing.
-; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
-;   and you cannot use both "ob_gzhandler" and "zlib.output_compression".
-; Note: output_handler must be empty if this is set 'On' !!!!
-;   Instead you must use zlib.output_handler.
-; http://www.php.net/manual/en/outcontrol.configuration.php#ini.output-handler
-;output_handler =
-
-; Transparent output compression using the zlib library
-; Valid values for this option are 'off', 'on', or a specific buffer size
-; to be used for compression (default is 4KB)
-; Note: Resulting chunk size may vary due to nature of compression. PHP
-;   outputs chunks that are few hundreds bytes each as a result of
-;   compression. If you prefer a larger chunk size for better
-;   performance, enable output_buffering in addition.
-; Note: You need to use zlib.output_handler instead of the standard
-;   output_handler, or otherwise the output will be corrupted.
-; http://www.php.net/manual/en/zlib.configuration.php#ini.zlib.output-compression
-zlib.output_compression = on
-
-; http://www.php.net/manual/en/zlib.configuration.php#ini.zlib.output-compression-level
-;zlib.output_compression_level = -1
-
-; You cannot specify additional output handlers if zlib.output_compression
-; is activated here. This setting does the same as output_handler but in
-; a different order.
-; http://www.php.net/manual/en/zlib.configuration.php#ini.zlib.output-handler
-;zlib.output_handler =
-
-; Implicit flush tells PHP to tell the output layer to flush itself
-; automatically after every output block.  This is equivalent to calling the
-; PHP function flush() after each and every call to print() or echo() and each
-; and every HTML block.  Turning this option on has serious performance
-; implications and is generally recommended for debugging purposes only.
-; http://www.php.net/manual/en/outcontrol.configuration.php#ini.implicit-flush
-implicit_flush = Off
-
-; The unserialize callback function will be called (with the undefined class'
-; name as parameter), if the unserializer finds an undefined class
-; which should be instantiated. A warning appears if the specified function is
-; not defined, or if the function doesn't include/implement the missing class.
-; So only set this entry, if you really want to implement such a
-; callback-function.
-unserialize_callback_func =
-
-; When floats & doubles are serialized store serialize_precision significant
-; digits after the floating point. The default value ensures that when floats
-; are decoded with unserialize, the data will remain the same.
-serialize_precision = 100
-
-; This directive allows you to enable and disable warnings which PHP will issue
-; if you pass a value by reference at function call time. Passing values by
-; reference at function call time is a deprecated feature which will be removed
-; from PHP at some point in the near future. The acceptable method for passing a
-; value by reference to a function is by declaring the reference in the functions
-; definition, not at call time. This directive does not disable this feature, it
-; only determines whether PHP will warn you about it or not. These warnings
-; should enabled in development environments only.
-; Default Value: On (Suppress warnings)
-; Development Value: Off (Issue warnings)
-; Production Value: Off (Issue warnings)
-; http://www.php.net/manual/en/ini.core.php#ini.allow-call-time-pass-reference
-allow_call_time_pass_reference = Off
-
-; Safe Mode
-; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode
-safe_mode = Off
-
-; By default, Safe Mode does a UID compare check when
-; opening files. If you want to relax this to a GID compare,
-; then turn on safe_mode_gid.
-; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-gid
-safe_mode_gid = Off
-
-; When safe_mode is on, UID/GID checks are bypassed when
-; including files from this directory and its subdirectories.
-; (directory must also be in include_path or full path must
-; be used when including)
-; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-include-dir
-safe_mode_include_dir =
-
-; When safe_mode is on, only executables located in the safe_mode_exec_dir
-; will be allowed to be executed via the exec family of functions.
-; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-exec-dir
-safe_mode_exec_dir =
-
-; Setting certain environment variables may be a potential security breach.
-; This directive contains a comma-delimited list of prefixes.  In Safe Mode,
-; the user may only alter environment variables whose names begin with the
-; prefixes supplied here.  By default, users will only be able to set
-; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR).
-; Note:  If this directive is empty, PHP will let the user modify ANY
-;   environment variable!
-; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-allowed-env-vars
-safe_mode_allowed_env_vars = PHP_
-
-; This directive contains a comma-delimited list of environment variables that
-; the end user won't be able to change using putenv().  These variables will be
-; protected even if safe_mode_allowed_env_vars is set to allow to change them.
-; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-protected-env-vars
-safe_mode_protected_env_vars = LD_LIBRARY_PATH
-
-; open_basedir, if set, limits all file operations to the defined directory
-; and below.  This directive makes most sense if used in a per-directory
-; or per-virtualhost web server configuration file. This directive is
-; *NOT* affected by whether Safe Mode is turned On or Off.
-; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.open-basedir
-;open_basedir =
-
-; This directive allows you to disable certain functions for security reasons.
-; It receives a comma-delimited list of function names. This directive is
-; *NOT* affected by whether Safe Mode is turned On or Off.
-; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.disable-functions
-disable_functions =
-
-; This directive allows you to disable certain classes for security reasons.
-; It receives a comma-delimited list of class names. This directive is
-; *NOT* affected by whether Safe Mode is turned On or Off.
-; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.disable-classes
-disable_classes =
-
-; Colors for Syntax Highlighting mode.  Anything that's acceptable in
-; <span style="color: ???????"> would work.
-; http://www.php.net/manual/en/misc.configuration.php#ini.syntax-highlighting
-;highlight.string  = #DD0000
-;highlight.comment = #FF9900
-;highlight.keyword = #007700
-;highlight.bg      = #FFFFFF
-;highlight.default = #0000BB
-;highlight.html    = #000000
-
-; If enabled, the request will be allowed to complete even if the user aborts
-; the request. Consider enabling it if executing long requests, which may end up
-; being interrupted by the user or a browser timing out. PHP's default behavior
-; is to disable this feature.
-; http://www.php.net/manual/en/misc.configuration.php#ini.ignore-user-abort
-;ignore_user_abort = On
-
-; Determines the size of the realpath cache to be used by PHP. This value should
-; be increased on systems where PHP opens many files to reflect the quantity of
-; the file operations performed.
-; http://www.php.net/manual/en/ini.core.php#ini.realpath-cache-size
-;realpath_cache_size = 16k
-
-; Duration of time, in seconds for which to cache realpath information for a given
-; file or directory. For systems with rarely changing files, consider increasing this
-; value.
-; http://www.php.net/manual/en/ini.core.php#ini.realpath-cache-ttl
-;realpath_cache_ttl = 120
-
-;;;;;;;;;;;;;;;;;
-; Miscellaneous ;
-;;;;;;;;;;;;;;;;;
-
-; Decides whether PHP may expose the fact that it is installed on the server
-; (e.g. by adding its signature to the Web server header).  It is no security
-; threat in any way, but it makes it possible to determine whether you use PHP
-; on your server or not.
-; http://www.php.net/manual/en/ini.core.php#ini.expose-php
-expose_php = On
-
-;;;;;;;;;;;;;;;;;;;
-; Resource Limits ;
-;;;;;;;;;;;;;;;;;;;
-
-; Maximum execution time of each script, in seconds
-; http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time
-max_execution_time = 30     
-
-; Maximum amount of time each script may spend parsing request data. It's a good
-; idea to limit this time on productions servers in order to eliminate unexpectedly
-; long running scripts. 
-; Default Value: -1 (Unlimited)
-; Development Value: 60 (60 seconds)
-; Production Value: 60 (60 seconds)
-; http://www.php.net/manual/en/info.configuration.php#ini.max-input-time
-max_input_time = 60
-
-; Maximum input variable nesting level
-; http://www.php.net/manual/en/info.configuration.php#ini.max-input-nesting-level
-;max_input_nesting_level = 64
-
-; Maximum amount of memory a script may consume (128MB)
-; http://www.php.net/manual/en/ini.core.php#ini.memory-limit
-memory_limit = 128M
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Error handling and logging ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-; This directive informs PHP of which errors, warnings and notices you would like
-; it to take action for. The recommended way of setting values for this
-; directive is through the use of the error level constants and bitwise
-; operators. The error level constants are below here for convenience as well as
-; some common settings and their meanings.
-; By default, PHP is set to take action on all errors, notices and warnings EXCEPT
-; those related to E_NOTICE and E_STRICT, which together cover best practices and
-; recommended coding standards in PHP. For performance reasons, this is the
-; recommend error reporting setting. Your production server shouldn't be wasting
-; resources complaining about best practices and coding standards. That's what
-; development servers and development settings are for.
-; Note: The php.ini-development file has this setting as E_ALL | E_STRICT. This
-; means it pretty much reports everything which is exactly what you want during
-; development and early testing.
-;
-; Error Level Constants:
-; E_ALL             - All errors and warnings (includes E_STRICT as of PHP 6.0.0)
-; E_ERROR           - fatal run-time errors
-; E_RECOVERABLE_ERROR  - almost fatal run-time errors
-; E_WARNING         - run-time warnings (non-fatal errors)
-; E_PARSE           - compile-time parse errors
-; E_NOTICE          - run-time notices (these are warnings which often result
-;                     from a bug in your code, but it's possible that it was
-;                     intentional (e.g., using an uninitialized variable and
-;                     relying on the fact it's automatically initialized to an
-;                     empty string)
-; E_STRICT          - run-time notices, enable to have PHP suggest changes
-;                     to your code which will ensure the best interoperability
-;                     and forward compatibility of your code
-; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
-; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
-;                     initial startup
-; E_COMPILE_ERROR   - fatal compile-time errors
-; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
-; E_USER_ERROR      - user-generated error message
-; E_USER_WARNING    - user-generated warning message
-; E_USER_NOTICE     - user-generated notice message
-; E_DEPRECATED      - warn about code that will not work in future versions
-;                     of PHP
-; E_USER_DEPRECATED - user-generated deprecation warnings
-;
-; Common Values:
-;   E_ALL & ~E_NOTICE  (Show all errors, except for notices and coding standards warnings.)
-;   E_ALL & ~E_NOTICE | E_STRICT  (Show all errors, except for notices)
-;   E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR  (Show only errors)
-;   E_ALL | E_STRICT  (Show all errors, warnings and notices including coding standards.)
-; Default Value: E_ALL & ~E_NOTICE
-; Development Value: E_ALL | E_STRICT
-; Production Value: E_ALL & ~E_DEPRECATED
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting
-error_reporting = E_ALL & ~E_DEPRECATED
-
-; This directive controls whether or not and where PHP will output errors,
-; notices and warnings too. Error output is very useful during development, but
-; it could be very dangerous in production environments. Depending on the code
-; which is triggering the error, sensitive information could potentially leak
-; out of your application such as database usernames and passwords or worse.
-; It's recommended that errors be logged on production servers rather than
-; having the errors sent to STDOUT.
-; Possible Values:
-;   Off = Do not display any errors 
-;   stderr = Display errors to STDERR (affects only CGI/CLI binaries!)   
-;   On or stdout = Display errors to STDOUT
-; Default Value: On
-; Development Value: On
-; Production Value: Off
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors
-display_errors = Off
-
-; The display of errors which occur during PHP's startup sequence are handled
-; separately from display_errors. PHP's default behavior is to suppress those
-; errors from clients. Turning the display of startup errors on can be useful in
-; debugging configuration problems. But, it's strongly recommended that you
-; leave this setting off on production servers.
-; Default Value: Off
-; Development Value: On
-; Production Value: Off
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-startup-errors
-display_startup_errors = Off
-
-; Besides displaying errors, PHP can also log errors to locations such as a
-; server-specific log, STDERR, or a location specified by the error_log
-; directive found below. While errors should not be displayed on productions
-; servers they should still be monitored and logging is a great way to do that.
-; Default Value: Off
-; Development Value: On
-; Production Value: On
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.log-errors
-log_errors = On
-
-; Set maximum length of log_errors. In error_log information about the source is
-; added. The default is 1024 and 0 allows to not apply any maximum length at all.
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.log-errors-max-len
-log_errors_max_len = 1024
-
-; Do not log repeated messages. Repeated errors must occur in same file on same
-; line unless ignore_repeated_source is set true.
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.ignore-repeated-errors
-ignore_repeated_errors = Off
-
-; Ignore source of message when ignoring repeated messages. When this setting
-; is On you will not log errors with repeated messages from different files or
-; source lines.
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.ignore-repeated-source
-ignore_repeated_source = Off
-
-; If this parameter is set to Off, then memory leaks will not be shown (on
-; stdout or in the log). This has only effect in a debug compile, and if
-; error reporting includes E_WARNING in the allowed list
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.report-memleaks
-report_memleaks = On
-
-; This setting is on by default.
-;report_zend_debug = 0
-
-; Store the last error/warning message in $php_errormsg (boolean). Setting this value
-; to On can assist in debugging and is appropriate for development servers. It should
-; however be disabled on production servers.
-; Default Value: Off
-; Development Value: On
-; Production Value: Off
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.track-errors
-track_errors = Off
-
-; Turn off normal error reporting and emit XML-RPC error XML
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.xmlrpc-errors
-;xmlrpc_errors = 0
-
-; An XML-RPC faultCode
-;xmlrpc_error_number = 0
-
-; When PHP displays or logs an error, it has the capability of inserting html
-; links to documentation related to that error. This directive controls whether
-; those HTML links appear in error messages or not. For performance and security
-; reasons, it's recommended you disable this on production servers.
-; Default Value: On
-; Development Value: On
-; Production value: Off
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.html-errors
-html_errors = Off
-
-; If html_errors is set On PHP produces clickable error messages that direct
-; to a page describing the error or function causing the error in detail.
-; You can download a copy of the PHP manual from http://www.php.net/docs.php
-; and change docref_root to the base URL of your local copy including the
-; leading '/'. You must also specify the file extension being used including
-; the dot. PHP's default behavior is to leave these settings empty.
-; Note: Never use this feature for production boxes.
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.docref-root
-; Examples
-;docref_root = "/phpmanual/"
-
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.docref-ext
-;docref_ext = .html
-
-; String to output before an error message. PHP's default behavior is to leave
-; this setting blank.
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-prepend-string
-; Example:
-;error_prepend_string = "<font color=#ff0000>"
-
-; String to output after an error message. PHP's default behavior is to leave
-; this setting blank.
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-append-string
-; Example:
-;error_append_string = "</font>"
-
-; Log errors to specified file. PHP's default behavior is to leave this value
-; empty.
-; http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-log
-; Example:
-;error_log = php_errors.log
-; Log errors to syslog (Event Log on NT, not valid in Windows 95).
-;error_log = syslog
-
-;;;;;;;;;;;;;;;;;
-; Data Handling ;
-;;;;;;;;;;;;;;;;;
-
-; Note - track_vars is ALWAYS enabled as of PHP 4.0.3
-
-; The separator used in PHP generated URLs to separate arguments.
-; PHP's default setting is "&".
-; http://www.php.net/manual/en/ini.core.php#ini.arg-separator.output
-; Example:
-;arg_separator.output = "&amp;"
-
-; List of separator(s) used by PHP to parse input URLs into variables.
-; PHP's default setting is "&".
-; NOTE: Every character in this directive is considered as separator!
-; http://www.php.net/manual/en/ini.core.php#ini.arg-separator.input
-; Example:
-;arg_separator.input = ";&"
-
-; This directive determines which super global arrays are registered when PHP
-; starts up. If the register_globals directive is enabled, it also determines
-; what order variables are populated into the global space. G,P,C,E & S are
-; abbreviations for the following respective super globals: GET, POST, COOKIE,
-; ENV and SERVER. There is a performance penalty paid for the registration of
-; these arrays and because ENV is not as commonly used as the others, ENV is
-; is not recommended on productions servers. You can still get access to
-; the environment variables through getenv() should you need to.
-; Default Value: "EGPCS"
-; Development Value: "GPCS"
-; Production Value: "GPCS";
-; http://www.php.net/manual/en/ini.core.php#ini.variables-order
-variables_order = "GPCS"
-
-; This directive determines which super global data (G,P,C,E & S) should
-; be registered into the super global array REQUEST. If so, it also determines
-; the order in which that data is registered. The values for this directive are
-; specified in the same manner as the variables_order directive, EXCEPT one.
-; Leaving this value empty will cause PHP to use the value set in the 
-; variables_order directive. It does not mean it will leave the super globals
-; array REQUEST empty.
-; Default Value: None
-; Development Value: "GP"
-; Production Value: "GP"
-; http://www.php.net/manual/en/ini.core.php#ini.request-order
-request_order = "GP"
-
-; Whether or not to register the EGPCS variables as global variables.  You may
-; want to turn this off if you don't want to clutter your scripts' global scope
-; with user data.  This makes most sense when coupled with track_vars - in which
-; case you can access all of the GPC variables through the $HTTP_*_VARS[],
-; variables.
-; You should do your best to write your scripts so that they do not require
-; register_globals to be on;  Using form variables as globals can easily lead
-; to possible security problems, if the code is not very well thought of.
-; http://www.php.net/manual/en/ini.core.php#ini.register-globals
-register_globals = Off
-
-; Determines whether the deprecated long $HTTP_*_VARS type predefined variables
-; are registered by PHP or not. As they are deprecated, we obviously don't
-; recommend you use them. They are on by default for compatibility reasons but
-; they are not recommended on production servers.
-; Default Value: On
-; Development Value: Off
-; Production Value: Off
-; http://www.php.net/manual/en/ini.core.php#ini.register-long-arrays
-register_long_arrays = Off
-
-; This directive determines whether PHP registers $argv & $argc each time it
-; runs. $argv contains an array of all the arguments passed to PHP when a script
-; is invoked. $argc contains an integer representing the number of arguments
-; that were passed when the script was invoked. These arrays are extremely
-; useful when running scripts from the command line. When this directive is
-; enabled, registering these variables consumes CPU cycles and memory each time
-; a script is executed. For performance reasons, this feature should be disabled
-; on production servers.
-; Default Value: On
-; Development Value: Off
-; Production Value: Off
-; http://www.php.net/manual/en/ini.core.php#ini.register-argc-argv
-register_argc_argv = Off
-
-; When enabled, the SERVER and ENV variables are created when they're first
-; used (Just In Time) instead of when the script starts. If these variables
-; are not used within a script, having this directive on will result in a
-; performance gain. The PHP directives register_globals, register_long_arrays,
-; and register_argc_argv must be disabled for this directive to have any affect.
-; http://www.php.net/manual/en/ini.core.php#ini.auto-globals-jit
-auto_globals_jit = On
-
-; Maximum size of POST data that PHP will accept.
-; http://www.php.net/manual/en/ini.core.php#ini.post-max-size
-post_max_size = 8M
-
-; Magic quotes are a preprocessing feature of PHP where PHP will attempt to
-; escape any character sequences in GET, POST, COOKIE and ENV data which might
-; otherwise corrupt data being placed in resources such as databases before
-; making that data available to you. Because of character encoding issues and
-; non-standard SQL implementations across many databases, it's not currently
-; possible for this feature to be 100% accurate. PHP's default behavior is to
-; enable the feature. We strongly recommend you use the escaping mechanisms
-; designed specifically for the database your using instead of relying on this
-; feature. Also note, this feature has been deprecated as of PHP 5.3.0 and is
-; scheduled for removal in PHP 6.
-; Default Value: On
-; Development Value: Off
-; Production Value: Off
-; http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc
-magic_quotes_gpc = Off
-
-; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
-; http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-runtime
-magic_quotes_runtime = Off
-
-; Use Sybase-style magic quotes (escape ' with '' instead of \').
-; http://www.php.net/manual/en/sybase.configuration.php#ini.magic-quotes-sybase
-magic_quotes_sybase = Off
-
-; Automatically add files before PHP document.
-; http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file
-auto_prepend_file =
-
-; Automatically add files after PHP document.
-; http://www.php.net/manual/en/ini.core.php#ini.auto-append-file
-auto_append_file =
-
-; As of 4.0b4, PHP always outputs a character encoding by default in
-; the Content-type: header.  To disable sending of the charset, simply
-; set it to be empty.
-;
-; PHP's built-in default is text/html
-; http://www.php.net/manual/en/ini.core.php#ini.default-mimetype
-default_mimetype = "text/html"
-
-; PHP's default character set is set to empty.
-; http://www.php.net/manual/en/ini.core.php#ini.default-charset
-;default_charset = "iso-8859-1"
-
-; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is
-; to disable this feature.
-; http://www.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data
-;always_populate_raw_post_data = On
-
-;;;;;;;;;;;;;;;;;;;;;;;;;
-; Paths and Directories ;
-;;;;;;;;;;;;;;;;;;;;;;;;;
-
-; UNIX: "/path1:/path2"
-;include_path = ".:/php/includes"
-;
-; Windows: "\path1;\path2"
-;include_path = ".;c:\php\includes"
-;
-; PHP's default setting for include_path is ".;/path/to/php/pear"
-; http://www.php.net/manual/en/ini.core.php#ini.include-path
-
-; The root of the PHP pages, used only if nonempty.
-; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
-; if you are running php as a CGI under any web server (other than IIS)
-; see documentation for security issues.  The alternate is to use the
-; cgi.force_redirect configuration below
-; http://www.php.net/manual/en/ini.core.php#ini.doc-root
-doc_root =
-
-; The directory under which PHP opens the script using /~username used only
-; if nonempty.
-; http://www.php.net/manual/en/ini.core.php#ini.user-dir
-user_dir =
-
-; Directory in which the loadable extensions (modules) reside.
-; http://www.php.net/manual/en/ini.core.php#ini.extension-dir
-; extension_dir = "./"
-
-; Whether or not to enable the dl() function.  The dl() function does NOT work
-; properly in multithreaded servers, such as IIS or Zeus, and is automatically
-; disabled on them.
-; http://www.php.net/manual/en/info.configuration.php#ini.enable-dl
-enable_dl = Off
-
-; cgi.force_redirect is necessary to provide security running PHP as a CGI under
-; most web servers.  Left undefined, PHP turns this on by default.  You can
-; turn it off here AT YOUR OWN RISK
-; **You CAN safely turn this off for IIS, in fact, you MUST.**
-; http://www.php.net/manual/en/ini.core.php#ini.cgi.force-redirect
-;cgi.force_redirect = 1
-
-; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
-; every request. PHP's default behavior is to disable this feature.
-;cgi.nph = 1
-
-; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
-; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
-; will look for to know it is OK to continue execution.  Setting this variable MAY
-; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
-; http://www.php.net/manual/en/ini.core.php#ini.cgi.redirect-status-env
-;cgi.redirect_status_env = ;
-
-; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
-; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
-; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting
-; this to 1 will cause PHP CGI to fix its paths to conform to the spec.  A setting
-; of zero causes PHP to behave as before.  Default is 1.  You should fix your scripts
-; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
-; http://www.php.net/manual/en/ini.core.php#ini.cgi.fix-pathinfo
-cgi.fix_pathinfo=1
-
-; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
-; security tokens of the calling client.  This allows IIS to define the
-; security context that the request runs under.  mod_fastcgi under Apache
-; does not currently support this feature (03/17/2002)
-; Set to 1 if running under IIS.  Default is zero.
-; http://www.php.net/manual/en/ini.core.php#ini.fastcgi.impersonate
-;fastcgi.impersonate = 1;
-
-; Disable logging through FastCGI connection. PHP's default behavior is to enable
-; this feature.
-;fastcgi.logging = 0
-
-; cgi.rfc2616_headers configuration option tells PHP what type of headers to
-; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
-; is supported by Apache. When this option is set to 1 PHP will send
-; RFC2616 compliant header.
-; Default is zero.
-; http://www.php.net/manual/en/ini.core.php#ini.cgi.rfc2616-headers
-;cgi.rfc2616_headers = 0
-
-;;;;;;;;;;;;;;;;
-; File Uploads ;
-;;;;;;;;;;;;;;;;
-
-; Whether to allow HTTP file uploads.
-; http://www.php.net/manual/en/ini.core.php#ini.file-uploads
-file_uploads = On
-
-; Temporary directory for HTTP uploaded files (will use system default if not
-; specified).
-; http://www.php.net/manual/en/ini.core.php#ini.upload-tmp-dir
-;upload_tmp_dir =
-
-; Maximum allowed size for uploaded files.
-; http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize
-upload_max_filesize = 2M
-
-;;;;;;;;;;;;;;;;;;
-; Fopen wrappers ;
-;;;;;;;;;;;;;;;;;;
-
-; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
-; http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen
-allow_url_fopen = On
-
-; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
-; http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-include
-allow_url_include = Off
-
-; Define the anonymous ftp password (your email address). PHP's default setting
-; for this is empty.
-; http://www.php.net/manual/en/filesystem.configuration.php#ini.from
-;from="john@doe.com"
-
-; Define the User-Agent string. PHP's default setting for this is empty.
-; http://www.php.net/manual/en/filesystem.configuration.php#ini.user-agent
-;user_agent="PHP"
-
-; Default timeout for socket based streams (seconds)
-; http://www.php.net/manual/en/filesystem.configuration.php#ini.default-socket-timeout
-default_socket_timeout = 60
-
-; If your scripts have to deal with files from Macintosh systems,
-; or you are running on a Mac and need to deal with files from
-; unix or win32 systems, setting this flag will cause PHP to
-; automatically detect the EOL character in those files so that
-; fgets() and file() will work regardless of the source of the file.
-; http://www.php.net/manual/en/filesystem.configuration.php#ini.auto-detect-line-endings
-;auto_detect_line_endings = Off
-
-;;;;;;;;;;;;;;;;;;;;;;
-; Dynamic Extensions ;
-;;;;;;;;;;;;;;;;;;;;;;
-
-; If you wish to have an extension loaded automatically, use the following
-; syntax:
-;
-;   extension=modulename.extension
-;
-; For example
-;
-;   extension=msql.so
-;
-; ... or with a path:
-;
-;   extension=/path/to/extension/msql.so
-;
-; If you only provide the name of the extension, PHP will look for it in its
-; default extension directory.
-
-;;;;
-; Note: packaged extension modules are now loaded via the .ini files
-; found in the directory /etc/php.d; these are loaded by default.
-;;;;
-
-
-;;;;;;;;;;;;;;;;;;;
-; Module Settings ;
-;;;;;;;;;;;;;;;;;;;
-
-[Date]
-; Defines the default timezone used by the date functions
-; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
-;date.timezone =
-
-; http://www.php.net/manual/en/datetime.configuration.php#ini.date.default-latitude
-;date.default_latitude = 31.7667
-
-; http://www.php.net/manual/en/datetime.configuration.php#ini.date.default-longitude
-;date.default_longitude = 35.2333
-
-; http://www.php.net/manual/en/datetime.configuration.php#ini.date.sunrise-zenith
-;date.sunrise_zenith = 90.583333
-
-; http://www.php.net/manual/en/datetime.configuration.php#ini.date.sunset-zenith
-;date.sunset_zenith = 90.583333
-
-[filter]
-; http://www.php.net/manual/en/filter.configuration.php#ini.filter.default
-;filter.default = unsafe_raw
-
-; http://www.php.net/manual/en/filter.configuration.php#ini.filter.default-flags
-;filter.default_flags =
-
-[iconv]
-;iconv.input_encoding = ISO-8859-1
-;iconv.internal_encoding = ISO-8859-1
-;iconv.output_encoding = ISO-8859-1
-
-[intl]
-;intl.default_locale = 
-
-[sqlite]
-; http://www.php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case
-;sqlite.assoc_case = 0
-
-[sqlite3]
-;sqlite3.extension_dir =
-
-[Pcre]
-;PCRE library backtracking limit.
-; http://www.php.net/manual/en/pcre.configuration.php#ini.pcre.backtrack-limit
-;pcre.backtrack_limit=100000
-
-;PCRE library recursion limit. 
-;Please note that if you set this value to a high number you may consume all 
-;the available process stack and eventually crash PHP (due to reaching the 
-;stack size limit imposed by the Operating System).
-; http://www.php.net/manual/en/pcre.configuration.php#ini.pcre.recursion-limit
-;pcre.recursion_limit=100000
-
-[Pdo]
-; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off"
-; http://www.php.net/manual/en/ref.pdo-odbc.php#ini.pdo-odbc.connection-pooling
-;pdo_odbc.connection_pooling=strict
-
-[Phar]
-; http://www.php.net/manual/en/phar.configuration.php#ini.phar.readonly
-;phar.readonly = On
-
-; http://www.php.net/manual/en/phar.configuration.php#ini.phar.require-hash
-;phar.require_hash = On
-
-;phar.cache_list =
-
-[Syslog]
-; Whether or not to define the various syslog variables (e.g. $LOG_PID,
-; $LOG_CRON, etc.).  Turning it off is a good idea performance-wise.  In
-; runtime, you can define these variables by calling define_syslog_variables().
-; http://www.php.net/manual/en/network.configuration.php#ini.define-syslog-variables
-define_syslog_variables  = Off
-
-[mail function]
-; For Win32 only.
-; http://www.php.net/manual/en/mail.configuration.php#ini.smtp
-SMTP = localhost
-; http://www.php.net/manual/en/mail.configuration.php#ini.smtp-port
-smtp_port = 25
-
-; For Win32 only.
-; http://www.php.net/manual/en/mail.configuration.php#ini.sendmail-from
-;sendmail_from = me@example.com
-
-; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
-; http://www.php.net/manual/en/mail.configuration.php#ini.sendmail-path
-sendmail_path = /usr/sbin/sendmail -t -i
-
-; Force the addition of the specified parameters to be passed as extra parameters
-; to the sendmail binary. These parameters will always replace the value of
-; the 5th parameter to mail(), even in safe mode.
-;mail.force_extra_parameters =
-
-; Add X-PHP-Originaiting-Script: that will include uid of the script followed by the filename
-mail.add_x_header = On
-
-; Log all mail() calls including the full path of the script, line #, to address and headers
-;mail.log =
-
-[SQL]
-; http://www.php.net/manual/en/ini.core.php#ini.sql.safe-mode
-sql.safe_mode = Off
-
-[ODBC]
-; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.default-db
-;odbc.default_db    =  Not yet implemented
-
-; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.default-user
-;odbc.default_user  =  Not yet implemented
-
-; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.default-pw
-;odbc.default_pw    =  Not yet implemented
-
-; Allow or prevent persistent links.
-; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.allow-persistent
-odbc.allow_persistent = On
-
-; Check that a connection is still valid before reuse.
-; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.check-persistent
-odbc.check_persistent = On
-
-; Maximum number of persistent links.  -1 means no limit.
-; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.max-persistent
-odbc.max_persistent = -1
-
-; Maximum number of links (persistent + non-persistent).  -1 means no limit.
-; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.max-links
-odbc.max_links = -1
-
-; Handling of LONG fields.  Returns number of bytes to variables.  0 means
-; passthru.
-; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.defaultlrl
-odbc.defaultlrl = 4096
-
-; Handling of binary data.  0 means passthru, 1 return as is, 2 convert to char.
-; See the documentation on odbc_binmode and odbc_longreadlen for an explanation
-; of uodbc.defaultlrl and uodbc.defaultbinmode
-; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.defaultbinmode
-odbc.defaultbinmode = 1
-
-;birdstep.max_links = -1
-
-[MySQL]
-; Allow or prevent persistent links.
-; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.allow-persistent
-mysql.allow_persistent = On
-
-; Maximum number of persistent links.  -1 means no limit.
-; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.max-persistent
-mysql.max_persistent = -1
-
-; Maximum number of links (persistent + non-persistent).  -1 means no limit.
-; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.max-links
-mysql.max_links = -1
-
-; Default port number for mysql_connect().  If unset, mysql_connect() will use
-; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
-; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
-; at MYSQL_PORT.
-; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-port
-mysql.default_port =
-
-; Default socket name for local MySQL connects.  If empty, uses the built-in
-; MySQL defaults.
-; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-socket
-mysql.default_socket =
-
-; Default host for mysql_connect() (doesn't apply in safe mode).
-; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-host
-mysql.default_host =
-
-; Default user for mysql_connect() (doesn't apply in safe mode).
-; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-user
-mysql.default_user =
-
-; Default password for mysql_connect() (doesn't apply in safe mode).
-; Note that this is generally a *bad* idea to store passwords in this file.
-; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
-; and reveal this password!  And of course, any users with read access to this
-; file will be able to reveal the password as well.
-; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-password
-mysql.default_password =
-
-; Maximum time (in seconds) for connect timeout. -1 means no limit
-; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.connect-timeout
-mysql.connect_timeout = 60
-
-; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
-; SQL-Errors will be displayed.
-; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.trace-mode
-mysql.trace_mode = Off
-
-[MySQLi]
-
-; Maximum number of links.  -1 means no limit.
-; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.max-links
-mysqli.max_links = -1
-
-; Default port number for mysqli_connect().  If unset, mysqli_connect() will use
-; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
-; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
-; at MYSQL_PORT.
-; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.default-port
-mysqli.default_port = 3306
-
-; Default socket name for local MySQL connects.  If empty, uses the built-in
-; MySQL defaults.
-; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.default-socket
-mysqli.default_socket =
-
-; Default host for mysql_connect() (doesn't apply in safe mode).
-; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.default-host
-mysqli.default_host =
-
-; Default user for mysql_connect() (doesn't apply in safe mode).
-; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.default-user
-mysqli.default_user =
-
-; Default password for mysqli_connect() (doesn't apply in safe mode).
-; Note that this is generally a *bad* idea to store passwords in this file.
-; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
-; and reveal this password!  And of course, any users with read access to this
-; file will be able to reveal the password as well.
-; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.default-pw
-mysqli.default_pw =
-
-; Allow or prevent reconnect
-mysqli.reconnect = Off
-
-[PostgresSQL]
-; Allow or prevent persistent links.
-; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.allow-persistent
-pgsql.allow_persistent = On
-
-; Detect broken persistent links always with pg_pconnect().
-; Auto reset feature requires a little overheads.
-; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.auto-reset-persistent
-pgsql.auto_reset_persistent = Off
-
-; Maximum number of persistent links.  -1 means no limit.
-; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.max-persistent
-pgsql.max_persistent = -1
-
-; Maximum number of links (persistent+non persistent).  -1 means no limit.
-; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.max-links
-pgsql.max_links = -1
-
-; Ignore PostgreSQL backends Notice message or not.
-; Notice message logging require a little overheads.
-; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.ignore-notice
-pgsql.ignore_notice = 0
-
-; Log PostgreSQL backends Noitce message or not.
-; Unless pgsql.ignore_notice=0, module cannot log notice message.
-; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.log-notice
-pgsql.log_notice = 0
-
-[Sybase-CT]
-; Allow or prevent persistent links.
-; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.allow-persistent
-sybct.allow_persistent = On
-
-; Maximum number of persistent links.  -1 means no limit.
-; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.max-persistent
-sybct.max_persistent = -1
-
-; Maximum number of links (persistent + non-persistent).  -1 means no limit.
-; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.max-links
-sybct.max_links = -1
-
-; Minimum server message severity to display.
-; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.min-server-severity
-sybct.min_server_severity = 10
-
-; Minimum client message severity to display.
-; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.min-client-severity
-sybct.min_client_severity = 10
-
-; Set per-context timeout
-; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.timeout
-;sybct.timeout=
-
-;sybct.packet_size
-
-[bcmath]
-; Number of decimal digits for all bcmath functions.
-; http://www.php.net/manual/en/bc.configuration.php#ini.bcmath.scale
-bcmath.scale = 0
-
-[browscap]
-; http://www.php.net/manual/en/misc.configuration.php#ini.browscap
-;browscap = extra/browscap.ini
-
-[Session]
-; Handler used to store/retrieve data.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.save-handler
-session.save_handler = files
-
-; Argument passed to save_handler.  In the case of files, this is the path
-; where data files are stored. Note: Windows users have to change this
-; variable in order to use PHP's session functions.
-;
-; As of PHP 4.0.1, you can define the path as:
-;
-;     session.save_path = "N;/path"
-;
-; where N is an integer.  Instead of storing all the session files in
-; /path, what this will do is use subdirectories N-levels deep, and
-; store the session data in those directories.  This is useful if you
-; or your OS have problems with lots of files in one directory, and is
-; a more efficient layout for servers that handle lots of sessions.
-;
-; NOTE 1: PHP will not create this directory structure automatically.
-;         You can use the script in the ext/session dir for that purpose.
-; NOTE 2: See the section on garbage collection below if you choose to
-;         use subdirectories for session storage
-;
-; The file storage module creates files using mode 600 by default.
-; You can change that by using
-;
-;     session.save_path = "N;MODE;/path"
-;
-; where MODE is the octal representation of the mode. Note that this
-; does not overwrite the process's umask.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.save-path
-session.save_path = "/tmp"
-
-; Whether to use cookies.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.use-cookies
-session.use_cookies = 1
-
-; http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-secure
-;session.cookie_secure =
-
-; This option forces PHP to fetch and use a cookie for storing and maintaining
-; the session id. We encourage this operation as it's very helpful in combatting
-; session hijacking when not specifying and managing your own session id. It is
-; not the end all be all of session hijacking defense, but it's a good start.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.use-only-cookies
-session.use_only_cookies = 1
-
-; Name of the session (used as cookie name).
-; http://www.php.net/manual/en/session.configuration.php#ini.session.name
-session.name = PHPSESSID
-
-; Initialize session on request startup.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.auto-start
-session.auto_start = 0
-
-; Lifetime in seconds of cookie or, if 0, until browser is restarted.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-lifetime
-session.cookie_lifetime = 0
-
-; The path for which the cookie is valid.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-path
-session.cookie_path = /
-
-; The domain for which the cookie is valid.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-domain
-session.cookie_domain =
-
-; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-httponly
-session.cookie_httponly = 
-
-; Handler used to serialize data.  php is the standard serializer of PHP.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.serialize-handler
-session.serialize_handler = php
-
-; Defines the probability that the 'garbage collection' process is started
-; on every session initialization. The probability is calculated by using
-; gc_probability/gc_divisor. Where session.gc_probability is the numerator
-; and gc_divisor is the denominator in the equation. Setting this value to 1
-; when the session.gc_divisor value is 100 will give you approximately a 1% chance
-; the gc will run on any give request.
-; Default Value: 1
-; Development Value: 1
-; Production Value: 1
-; http://www.php.net/manual/en/session.configuration.php#ini.session.gc-probability
-session.gc_probability = 1
-
-; Defines the probability that the 'garbage collection' process is started on every
-; session initialization. The probability is calculated by using the following equation: 
-; gc_probability/gc_divisor. Where session.gc_probability is the numerator and
-; session.gc_divisor is the denominator in the equation. Setting this value to 1
-; when the session.gc_divisor value is 100 will give you approximately a 1% chance
-; the gc will run on any give request. Increasing this value to 1000 will give you
-; a 0.1% chance the gc will run on any give request. For high volume production servers,
-; this is a more efficient approach.
-; Default Value: 100
-; Development Value: 1000
-; Production Value: 1000
-; http://www.php.net/manual/en/session.configuration.php#ini.session.gc-divisor
-session.gc_divisor = 1000
-
-; After this number of seconds, stored data will be seen as 'garbage' and
-; cleaned up by the garbage collection process.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime
-session.gc_maxlifetime = 1440
-
-; NOTE: If you are using the subdirectory option for storing session files
-;       (see session.save_path above), then garbage collection does *not*
-;       happen automatically.  You will need to do your own garbage
-;       collection through a shell script, cron entry, or some other method.
-;       For example, the following script would is the equivalent of
-;       setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
-;          cd /path/to/sessions; find -cmin +24 | xargs rm
-
-; PHP 4.2 and less have an undocumented feature/bug that allows you to
-; to initialize a session variable in the global scope, even when register_globals
-; is disabled.  PHP 4.3 and later will warn you, if this feature is used.
-; You can disable the feature and the warning separately. At this time,
-; the warning is only displayed, if bug_compat_42 is enabled. This feature
-; introduces some serious security problems if not handled correctly. It's
-; recommended that you do not use this feature on production servers. But you
-; should enable this on development servers and enable the warning as well. If you
-; do not enable the feature on development servers, you won't be warned when it's
-; used and debugging errors caused by this can be difficult to track down.
-; Default Value: On
-; Development Value: On
-; Production Value: Off
-; http://www.php.net/manual/en/session.configuration.php#ini.session.bug-compat-42
-session.bug_compat_42 = Off
-
-; This setting controls whether or not you are warned by PHP when initializing a
-; session value into the global space. session.bug_compat_42 must be enabled before
-; these warnings can be issued by PHP. See the directive above for more information.
-; Default Value: On
-; Development Value: On
-; Production Value: Off
-; http://www.php.net/manual/en/session.configuration.php#ini.session.bug-compat-warn
-session.bug_compat_warn = Off
-
-; Check HTTP Referer to invalidate externally stored URLs containing ids.
-; HTTP_REFERER has to contain this substring for the session to be
-; considered as valid.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.referer-check
-session.referer_check =
-
-; How many bytes to read from the file.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.entropy-length
-session.entropy_length = 0
-
-; Specified here to create the session id.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.entropy-file
-;session.entropy_file = /dev/urandom
-session.entropy_file =
-
-; http://www.php.net/manual/en/session.configuration.php#ini.session.entropy-length
-;session.entropy_length = 16
-
-; Set to {nocache,private,public,} to determine HTTP caching aspects
-; or leave this empty to avoid sending anti-caching headers.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.cache-limiter
-session.cache_limiter = nocache
-
-; Document expires after n minutes.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.cache-expire
-session.cache_expire = 180
-
-; trans sid support is disabled by default.
-; Use of trans sid may risk your users security.
-; Use this option with caution.
-; - User may send URL contains active session ID
-;   to other person via. email/irc/etc.
-; - URL that contains active session ID may be stored
-;   in publically accessible computer.
-; - User may access your site with the same session ID
-;   always using URL stored in browser's history or bookmarks.
-; http://www.php.net/manual/en/session.configuration.php#ini.session.use-trans-sid
-session.use_trans_sid = 0
-
-; Select a hash function for use in generating session ids.
-; Possible Values 
-;   0  (MD5 128 bits)
-;   1  (SHA-1 160 bits)
-; http://www.php.net/manual/en/session.configuration.php#ini.session.hash-function
-session.hash_function = 0
-
-; Define how many bits are stored in each character when converting
-; the binary hash data to something readable.
-; Possible values:
-;   4  (4 bits: 0-9, a-f)
-;   5  (5 bits: 0-9, a-v)
-;   6  (6 bits: 0-9, a-z, A-Z, "-", ",")
-; Default Value: 4
-; Development Value: 5
-; Production Value: 5
-; http://www.php.net/manual/en/session.configuration.php#ini.session.hash-bits-per-character
-session.hash_bits_per_character = 5
-
-; The URL rewriter will look for URLs in a defined set of HTML tags.
-; form/fieldset are special; if you include them here, the rewriter will
-; add a hidden <input> field with the info which is otherwise appended
-; to URLs.  If you want XHTML conformity, remove the form entry.
-; Note that all valid entries require a "=", even if no value follows.
-; Default Value: "a=href,area=href,frame=src,form=,fieldset="
-; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
-; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
-; http://www.php.net/manual/en/session.configuration.php#ini.url-rewriter.tags
-url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
-
-[MSSQL]
-; Allow or prevent persistent links.
-mssql.allow_persistent = On
-
-; Maximum number of persistent links.  -1 means no limit.
-mssql.max_persistent = -1
-
-; Maximum number of links (persistent+non persistent).  -1 means no limit.
-mssql.max_links = -1
-
-; Minimum error severity to display.
-mssql.min_error_severity = 10
-
-; Minimum message severity to display.
-mssql.min_message_severity = 10
-
-; Compatibility mode with old versions of PHP 3.0.
-mssql.compatability_mode = Off
-
-; Connect timeout
-;mssql.connect_timeout = 5
-
-; Query timeout
-;mssql.timeout = 60
-
-; Valid range 0 - 2147483647.  Default = 4096.
-;mssql.textlimit = 4096
-
-; Valid range 0 - 2147483647.  Default = 4096.
-;mssql.textsize = 4096
-
-; Limits the number of records in each batch.  0 = all records in one batch.
-;mssql.batchsize = 0
-
-; Specify how datetime and datetim4 columns are returned
-; On => Returns data converted to SQL server settings
-; Off => Returns values as YYYY-MM-DD hh:mm:ss
-;mssql.datetimeconvert = On
-
-; Use NT authentication when connecting to the server
-mssql.secure_connection = Off
-
-; Specify max number of processes. -1 = library default
-; msdlib defaults to 25
-; FreeTDS defaults to 4096
-;mssql.max_procs = -1
-
-; Specify client character set. 
-; If empty or not set the client charset from freetds.comf is used
-; This is only used when compiled with FreeTDS
-;mssql.charset = "ISO-8859-1"
-
-[Assertion]
-; Assert(expr); active by default.
-; http://www.php.net/manual/en/info.configuration.php#ini.assert.active
-;assert.active = On
-
-; Issue a PHP warning for each failed assertion.
-; http://www.php.net/manual/en/info.configuration.php#ini.assert.warning
-;assert.warning = On
-
-; Don't bail out by default.
-; http://www.php.net/manual/en/info.configuration.php#ini.assert.bail
-;assert.bail = Off
-
-; User-function to be called if an assertion fails.
-; http://www.php.net/manual/en/info.configuration.php#ini.assert.callback
-;assert.callback = 0
-
-; Eval the expression with current error_reporting().  Set to true if you want
-; error_reporting(0) around the eval().
-; http://www.php.net/manual/en/info.configuration.php#ini.assert.quiet-eval
-;assert.quiet_eval = 0
-
-[COM]
-; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs
-; http://www.php.net/manual/en/com.configuration.php#ini.com.typelib-file
-;com.typelib_file =
-
-; allow Distributed-COM calls
-; http://www.php.net/manual/en/com.configuration.php#ini.com.allow-dcom
-;com.allow_dcom = true
-
-; autoregister constants of a components typlib on com_load()
-; http://www.php.net/manual/en/com.configuration.php#ini.com.autoregister-typelib
-;com.autoregister_typelib = true
-
-; register constants casesensitive
-; http://www.php.net/manual/en/com.configuration.php#ini.com.autoregister-casesensitive
-;com.autoregister_casesensitive = false
-
-; show warnings on duplicate constant registrations
-; http://www.php.net/manual/en/com.configuration.php#ini.com.autoregister-verbose
-;com.autoregister_verbose = true
-
-[mbstring]
-; language for internal character representation.
-; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.language
-;mbstring.language = Japanese
-
-; internal/script encoding.
-; Some encoding cannot work as internal encoding.
-; (e.g. SJIS, BIG5, ISO-2022-*)
-; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.internal-encoding
-;mbstring.internal_encoding = EUC-JP
-
-; http input encoding.
-; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.http-input
-;mbstring.http_input = auto
-
-; http output encoding. mb_output_handler must be
-; registered as output buffer to function
-; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.http-output
-;mbstring.http_output = SJIS
-
-; enable automatic encoding translation according to
-; mbstring.internal_encoding setting. Input chars are
-; converted to internal encoding by setting this to On.
-; Note: Do _not_ use automatic encoding translation for
-;       portable libs/applications.
-; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.encoding-translation
-;mbstring.encoding_translation = Off
-
-; automatic encoding detection order.
-; auto means
-; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.detect-order
-;mbstring.detect_order = auto
-
-; substitute_character used when character cannot be converted
-; one from another
-; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.substitute-character
-;mbstring.substitute_character = none;
-
-; overload(replace) single byte functions by mbstring functions.
-; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
-; etc. Possible values are 0,1,2,4 or combination of them.
-; For example, 7 for overload everything.
-; 0: No overload
-; 1: Overload mail() function
-; 2: Overload str*() functions
-; 4: Overload ereg*() functions
-; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.func-overload
-;mbstring.func_overload = 0
-
-; enable strict encoding detection.
-;mbstring.strict_detection = Off
-
-; This directive specifies the regex pattern of content types for which mb_output_handler()
-; is activated.
-; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml)
-;mbstring.http_output_conv_mimetype=
-
-[gd]
-; Tell the jpeg decode to ignore warnings and try to create
-; a gd image. The warning will then be displayed as notices
-; disabled by default
-; http://www.php.net/manual/en/image.configuration.php#ini.image.jpeg-ignore-warning
-;gd.jpeg_ignore_warning = 0
-
-[exif]
-; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.
-; With mbstring support this will automatically be converted into the encoding
-; given by corresponding encode setting. When empty mbstring.internal_encoding
-; is used. For the decode settings you can distinguish between motorola and
-; intel byte order. A decode setting cannot be empty.
-; http://www.php.net/manual/en/exif.configuration.php#ini.exif.encode-unicode
-;exif.encode_unicode = ISO-8859-15
-
-; http://www.php.net/manual/en/exif.configuration.php#ini.exif.decode-unicode-motorola
-;exif.decode_unicode_motorola = UCS-2BE
-
-; http://www.php.net/manual/en/exif.configuration.php#ini.exif.decode-unicode-intel
-;exif.decode_unicode_intel    = UCS-2LE
-
-; http://www.php.net/manual/en/exif.configuration.php#ini.exif.encode-jis
-;exif.encode_jis =
-
-; http://www.php.net/manual/en/exif.configuration.php#ini.exif.decode-jis-motorola
-;exif.decode_jis_motorola = JIS
-
-; http://www.php.net/manual/en/exif.configuration.php#ini.exif.decode-jis-intel
-;exif.decode_jis_intel    = JIS
-
-[Tidy]
-; The path to a default tidy configuration file to use when using tidy
-; http://www.php.net/manual/en/tidy.configuration.php#ini.tidy.default-config
-;tidy.default_config = /usr/local/lib/php/default.tcfg
-
-; Should tidy clean and repair output automatically?
-; WARNING: Do not use this option if you are generating non-html content
-; such as dynamic images
-; http://www.php.net/manual/en/tidy.configuration.php#ini.tidy.clean-output
-tidy.clean_output = Off
-
-[soap]
-; Enables or disables WSDL caching feature.
-; http://www.php.net/manual/en/soap.configuration.php#ini.soap.wsdl-cache-enabled
-soap.wsdl_cache_enabled=1
-
-; Sets the directory name where SOAP extension will put cache files.
-; http://www.php.net/manual/en/soap.configuration.php#ini.soap.wsdl-cache-dir
-soap.wsdl_cache_dir="/tmp"
-
-; (time to live) Sets the number of second while cached file will be used 
-; instead of original one.
-; http://www.php.net/manual/en/soap.configuration.php#ini.soap.wsdl-cache-ttl
-soap.wsdl_cache_ttl=86400
-
-[sysvshm]
-; A default size of the shared memory segment
-;sysvshm.init_mem = 10000
-
-
-; Local Variables:
-; tab-width: 4
-; End:
-

file:a/aws/postgresql.conf (deleted)
--- a/aws/postgresql.conf
+++ /dev/null
@@ -1,502 +1,1 @@
-# -----------------------------
-# PostgreSQL configuration file
-# -----------------------------
-#
-# This file consists of lines of the form:
-#
-#   name = value
-#
-# (The "=" is optional.)  Whitespace may be used.  Comments are introduced with
-# "#" anywhere on a line.  The complete list of parameter names and allowed
-# values can be found in the PostgreSQL documentation.
-#
-# The commented-out settings shown in this file represent the default values.
-# Re-commenting a setting is NOT sufficient to revert it to the default value;
-# you need to reload the server.
-#
-# This file is read on server startup and when the server receives a SIGHUP
-# signal.  If you edit the file on a running system, you have to SIGHUP the
-# server for the changes to take effect, or use "pg_ctl reload".  Some
-# parameters, which are marked below, require a server shutdown and restart to
-# take effect.
-#
-# Any parameter can also be given as a command-line option to the server, e.g.,
-# "postgres -c log_connections=on".  Some parameters can be changed at run time
-# with the "SET" SQL command.
-#
-# Memory units:  kB = kilobytes        Time units:  ms  = milliseconds
-#                MB = megabytes                     s   = seconds
-#                GB = gigabytes                     min = minutes
-#                                                   h   = hours
-#                                                   d   = days
 
-
-#------------------------------------------------------------------------------
-# FILE LOCATIONS
-#------------------------------------------------------------------------------
-
-# The default values of these variables are driven from the -D command-line
-# option or PGDATA environment variable, represented here as ConfigDir.
-
-#data_directory = 'ConfigDir'		# use data in another directory
-					# (change requires restart)
-#hba_file = 'ConfigDir/pg_hba.conf'	# host-based authentication file
-					# (change requires restart)
-#ident_file = 'ConfigDir/pg_ident.conf'	# ident configuration file
-					# (change requires restart)
-
-# If external_pid_file is not explicitly set, no extra PID file is written.
-#external_pid_file = '(none)'		# write an extra PID file
-					# (change requires restart)
-
-
-#------------------------------------------------------------------------------
-# CONNECTIONS AND AUTHENTICATION
-#------------------------------------------------------------------------------
-
-# - Connection Settings -
-
-listen_addresses = '*'		# what IP address(es) to listen on;
-					# comma-separated list of addresses;
-					# defaults to 'localhost', '*' = all
-					# (change requires restart)
-#port = 5432				# (change requires restart)
-max_connections = 100			# (change requires restart)
-# Note:  Increasing max_connections costs ~400 bytes of shared memory per 
-# connection slot, plus lock space (see max_locks_per_transaction).
-#superuser_reserved_connections = 3	# (change requires restart)
-#unix_socket_directory = ''		# (change requires restart)
-#unix_socket_group = ''			# (change requires restart)
-#unix_socket_permissions = 0777		# begin with 0 to use octal notation
-					# (change requires restart)
-#bonjour_name = ''			# defaults to the computer name
-					# (change requires restart)
-
-# - Security and Authentication -
-
-#authentication_timeout = 1min		# 1s-600s
-#ssl = off				# (change requires restart)
-#ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH'	# allowed SSL ciphers
-					# (change requires restart)
-#ssl_renegotiation_limit = 512MB	# amount of data between renegotiations
-#password_encryption = on
-#db_user_namespace = off
-
-# Kerberos and GSSAPI
-#krb_server_keyfile = ''
-#krb_srvname = 'postgres'		# (Kerberos only)
-#krb_caseins_users = off
-
-# - TCP Keepalives -
-# see "man 7 tcp" for details
-
-#tcp_keepalives_idle = 0		# TCP_KEEPIDLE, in seconds;
-					# 0 selects the system default
-#tcp_keepalives_interval = 0		# TCP_KEEPINTVL, in seconds;
-					# 0 selects the system default
-#tcp_keepalives_count = 0		# TCP_KEEPCNT;
-					# 0 selects the system default
-
-
-#------------------------------------------------------------------------------
-# RESOURCE USAGE (except WAL)
-#------------------------------------------------------------------------------
-
-# - Memory -
-
-shared_buffers = 32MB			# min 128kB
-					# (change requires restart)
-#temp_buffers = 8MB			# min 800kB
-#max_prepared_transactions = 0		# zero disables the feature
-					# (change requires restart)
-# Note:  Increasing max_prepared_transactions costs ~600 bytes of shared memory
-# per transaction slot, plus lock space (see max_locks_per_transaction).
-# It is not advisable to set max_prepared_transactions nonzero unless you
-# actively intend to use prepared transactions.
-#work_mem = 1MB				# min 64kB
-#maintenance_work_mem = 16MB		# min 1MB
-#max_stack_depth = 2MB			# min 100kB
-
-# - Kernel Resource Usage -
-
-#max_files_per_process = 1000		# min 25
-					# (change requires restart)
-#shared_preload_libraries = ''		# (change requires restart)
-
-# - Cost-Based Vacuum Delay -
-
-#vacuum_cost_delay = 0ms		# 0-100 milliseconds
-#vacuum_cost_page_hit = 1		# 0-10000 credits
-#vacuum_cost_page_miss = 10		# 0-10000 credits
-#vacuum_cost_page_dirty = 20		# 0-10000 credits
-#vacuum_cost_limit = 200		# 1-10000 credits
-
-# - Background Writer -
-
-#bgwriter_delay = 200ms			# 10-10000ms between rounds
-#bgwriter_lru_maxpages = 100		# 0-1000 max buffers written/round
-#bgwriter_lru_multiplier = 2.0		# 0-10.0 multipler on buffers scanned/round
-
-# - Asynchronous Behavior -
-
-#effective_io_concurrency = 1		# 1-1000. 0 disables prefetching
-
-
-#------------------------------------------------------------------------------
-# WRITE AHEAD LOG
-#------------------------------------------------------------------------------
-
-# - Settings -
-
-#fsync = on				# turns forced synchronization on or off
-#synchronous_commit = on		# immediate fsync at commit
-#wal_sync_method = fsync		# the default is the first option 
-					# supported by the operating system:
-					#   open_datasync
-					#   fdatasync
-					#   fsync
-					#   fsync_writethrough
-					#   open_sync
-#full_page_writes = on			# recover from partial page writes
-#wal_buffers = 64kB			# min 32kB
-					# (change requires restart)
-#wal_writer_delay = 200ms		# 1-10000 milliseconds
-
-#commit_delay = 0			# range 0-100000, in microseconds
-#commit_siblings = 5			# range 1-1000
-
-# - Checkpoints -
-
-#checkpoint_segments = 3		# in logfile segments, min 1, 16MB each
-#checkpoint_timeout = 5min		# range 30s-1h
-#checkpoint_completion_target = 0.5	# checkpoint target duration, 0.0 - 1.0
-#checkpoint_warning = 30s		# 0 disables
-
-# - Archiving -
-
-#archive_mode = off		# allows archiving to be done
-				# (change requires restart)
-#archive_command = ''		# command to use to archive a logfile segment
-#archive_timeout = 0		# force a logfile segment switch after this
-				# number of seconds; 0 disables
-
-
-#------------------------------------------------------------------------------
-# QUERY TUNING
-#------------------------------------------------------------------------------
-
-# - Planner Method Configuration -
-
-#enable_bitmapscan = on
-#enable_hashagg = on
-#enable_hashjoin = on
-#enable_indexscan = on
-#enable_mergejoin = on
-#enable_nestloop = on
-#enable_seqscan = on
-#enable_sort = on
-#enable_tidscan = on
-
-# - Planner Cost Constants -
-
-#seq_page_cost = 1.0			# measured on an arbitrary scale
-#random_page_cost = 4.0			# same scale as above
-#cpu_tuple_cost = 0.01			# same scale as above
-#cpu_index_tuple_cost = 0.005		# same scale as above
-#cpu_operator_cost = 0.0025		# same scale as above
-#effective_cache_size = 128MB
-
-# - Genetic Query Optimizer -
-
-#geqo = on
-#geqo_threshold = 12
-#geqo_effort = 5			# range 1-10
-#geqo_pool_size = 0			# selects default based on effort
-#geqo_generations = 0			# selects default based on effort
-#geqo_selection_bias = 2.0		# range 1.5-2.0
-
-# - Other Planner Options -
-
-#default_statistics_target = 100	# range 1-10000
-#constraint_exclusion = partition	# on, off, or partition
-#cursor_tuple_fraction = 0.1		# range 0.0-1.0
-#from_collapse_limit = 8
-#join_collapse_limit = 8		# 1 disables collapsing of explicit 
-					# JOIN clauses
-
-
-#------------------------------------------------------------------------------
-# ERROR REPORTING AND LOGGING
-#------------------------------------------------------------------------------
-
-# - Where to Log -
-
-#log_destination = 'stderr'		# Valid values are combinations of
-					# stderr, csvlog, syslog and eventlog,
-					# depending on platform.  csvlog
-					# requires logging_collector to be on.
-
-# This is used when logging to stderr:
-logging_collector = on			# Enable capturing of stderr and csvlog
-					# into log files. Required to be on for
-					# csvlogs.
-					# (change requires restart)
-
-# These are only used if logging_collector is on:
-log_directory = 'pg_log'		# directory where log files are written,
-					# can be absolute or relative to PGDATA
-log_filename = 'postgresql-%a.log'	# log file name pattern,
-					# can include strftime() escapes
-log_truncate_on_rotation = on		# If on, an existing log file of the
-					# same name as the new log file will be
-					# truncated rather than appended to.
-					# But such truncation only occurs on
-					# time-driven rotation, not on restarts
-					# or size-driven rotation.  Default is
-					# off, meaning append to existing files
-					# in all cases.
-log_rotation_age = 1d			# Automatic rotation of logfiles will
-					# happen after that time.  0 disables.
-log_rotation_size = 0			# Automatic rotation of logfiles will 
-					# happen after that much log output.
-					# 0 disables.
-
-# These are relevant when logging to syslog:
-#syslog_facility = 'LOCAL0'
-#syslog_ident = 'postgres'
-
-#silent_mode = off			# Run server silently.
-					# DO NOT USE without syslog or
-					# logging_collector
-					# (change requires restart)
-
-
-# - When to Log -
-
-#client_min_messages = notice		# values in order of decreasing detail:
-					#   debug5
-					#   debug4
-					#   debug3
-					#   debug2
-					#   debug1
-					#   log
-					#   notice
-					#   warning
-					#   error
-
-#log_min_messages = warning		# values in order of decreasing detail:
-					#   debug5
-					#   debug4
-					#   debug3
-					#   debug2
-					#   debug1
-					#   info
-					#   notice
-					#   warning
-					#   error
-					#   log
-					#   fatal
-					#   panic
-
-#log_error_verbosity = default		# terse, default, or verbose messages
-
-#log_min_error_statement = error	# values in order of decreasing detail:
-				 	#   debug5
-					#   debug4
-					#   debug3
-					#   debug2
-					#   debug1
-				 	#   info
-					#   notice
-					#   warning
-					#   error
-					#   log
-					#   fatal
-					#   panic (effectively off)
-
-#log_min_duration_statement = -1	# -1 is disabled, 0 logs all statements
-					# and their durations, > 0 logs only
-					# statements running at least this number
-					# of milliseconds
-
-
-# - What to Log -
-
-#debug_print_parse = off
-#debug_print_rewritten = off
-#debug_print_plan = off
-#debug_pretty_print = on
-#log_checkpoints = off
-#log_connections = off
-#log_disconnections = off
-#log_duration = off
-#log_hostname = off
-#log_line_prefix = ''			# special values:
-					#   %u = user name
-					#   %d = database name
-					#   %r = remote host and port
-					#   %h = remote host
-					#   %p = process ID
-					#   %t = timestamp without milliseconds
-					#   %m = timestamp with milliseconds
-					#   %i = command tag
-					#   %c = session ID
-					#   %l = session line number
-					#   %s = session start timestamp
-					#   %v = virtual transaction ID
-					#   %x = transaction ID (0 if none)
-					#   %q = stop here in non-session
-					#        processes
-					#   %% = '%'
-					# e.g. '<%u%%%d> '
-#log_lock_waits = off			# log lock waits >= deadlock_timeout
-#log_statement = 'none'			# none, ddl, mod, all
-#log_temp_files = -1			# log temporary files equal or larger
-					# than the specified size in kilobytes;
-					# -1 disables, 0 logs all temp files
-#log_timezone = unknown			# actually, defaults to TZ environment
-					# setting
-
-
-#------------------------------------------------------------------------------
-# RUNTIME STATISTICS
-#------------------------------------------------------------------------------
-
-# - Query/Index Statistics Collector -
-
-#track_activities = on
-#track_counts = on
-#track_functions = none			# none, pl, all
-#track_activity_query_size = 1024
-#update_process_title = on
-#stats_temp_directory = 'pg_stat_tmp'
-
-
-# - Statistics Monitoring -
-
-#log_parser_stats = off
-#log_planner_stats = off
-#log_executor_stats = off
-#log_statement_stats = off
-
-
-#------------------------------------------------------------------------------
-# AUTOVACUUM PARAMETERS
-#------------------------------------------------------------------------------
-
-#autovacuum = on			# Enable autovacuum subprocess?  'on' 
-					# requires track_counts to also be on.
-#log_autovacuum_min_duration = -1	# -1 disables, 0 logs all actions and
-					# their durations, > 0 logs only
-					# actions running at least this number
-					# of milliseconds.
-#autovacuum_max_workers = 3		# max number of autovacuum subprocesses
-#autovacuum_naptime = 1min		# time between autovacuum runs
-#autovacuum_vacuum_threshold = 50	# min number of row updates before
-					# vacuum
-#autovacuum_analyze_threshold = 50	# min number of row updates before 
-					# analyze
-#autovacuum_vacuum_scale_factor = 0.2	# fraction of table size before vacuum
-#autovacuum_analyze_scale_factor = 0.1	# fraction of table size before analyze
-#autovacuum_freeze_max_age = 200000000	# maximum XID age before forced vacuum
-					# (change requires restart)
-#autovacuum_vacuum_cost_delay = 20ms	# default vacuum cost delay for
-					# autovacuum, in milliseconds;
-					# -1 means use vacuum_cost_delay
-#autovacuum_vacuum_cost_limit = -1	# default vacuum cost limit for
-					# autovacuum, -1 means use
-					# vacuum_cost_limit
-
-
-#------------------------------------------------------------------------------
-# CLIENT CONNECTION DEFAULTS
-#------------------------------------------------------------------------------
-
-# - Statement Behavior -
-
-#search_path = '"$user",public'		# schema names
-#default_tablespace = ''		# a tablespace name, '' uses the default
-#temp_tablespaces = ''			# a list of tablespace names, '' uses
-					# only default tablespace
-#check_function_bodies = on
-#default_transaction_isolation = 'read committed'
-#default_transaction_read_only = off
-#session_replication_role = 'origin'
-#statement_timeout = 0			# in milliseconds, 0 is disabled
-#vacuum_freeze_min_age = 50000000
-#vacuum_freeze_table_age = 150000000
-#xmlbinary = 'base64'
-#xmloption = 'content'
-
-# - Locale and Formatting -
-
-datestyle = 'iso, mdy'
-#intervalstyle = 'postgres'
-#timezone = unknown			# actually, defaults to TZ environment
-					# setting
-#timezone_abbreviations = 'Default'     # Select the set of available time zone
-					# abbreviations.  Currently, there are
-					#   Default
-					#   Australia
-					#   India
-					# You can create your own file in
-					# share/timezonesets/.
-#extra_float_digits = 0			# min -15, max 2
-#client_encoding = sql_ascii		# actually, defaults to database
-					# encoding
-
-# These settings are initialized by initdb, but they can be changed.
-lc_messages = 'en_US.UTF-8'			# locale for system error message
-					# strings
-lc_monetary = 'en_US.UTF-8'			# locale for monetary formatting
-lc_numeric = 'en_US.UTF-8'			# locale for number formatting
-lc_time = 'en_US.UTF-8'				# locale for time formatting
-
-# default configuration for text search
-default_text_search_config = 'pg_catalog.english'
-
-# - Other Defaults -
-
-#dynamic_library_path = '$libdir'
-#local_preload_libraries = ''
-
-
-#------------------------------------------------------------------------------
-# LOCK MANAGEMENT
-#------------------------------------------------------------------------------
-
-#deadlock_timeout = 1s
-#max_locks_per_transaction = 64		# min 10
-					# (change requires restart)
-# Note:  Each lock table slot uses ~270 bytes of shared memory, and there are
-# max_locks_per_transaction * (max_connections + max_prepared_transactions)
-# lock table slots.
-
-
-#------------------------------------------------------------------------------
-# VERSION/PLATFORM COMPATIBILITY
-#------------------------------------------------------------------------------
-
-# - Previous PostgreSQL Versions -
-
-#add_missing_from = off
-#array_nulls = on
-#backslash_quote = safe_encoding	# on, off, or safe_encoding
-#default_with_oids = off
-#escape_string_warning = on
-#regex_flavor = advanced		# advanced, extended, or basic
-#sql_inheritance = on
-#standard_conforming_strings = off
-#synchronize_seqscans = on
-
-# - Other Platforms and Clients -
-
-#transform_null_equals = off
-
-
-#------------------------------------------------------------------------------
-# CUSTOMIZED OPTIONS
-#------------------------------------------------------------------------------
-
-#custom_variable_classes = ''		# list of custom variable class names
-

file:a/aws/rc.local (deleted)
--- a/aws/rc.local
+++ /dev/null
@@ -1,14 +1,1 @@
-#!/bin/sh
-#
-# This script will be executed *after* all the other init scripts.
-# You can put your own initialization stuff in here if you don't
-# want to do the full Sys V style init stuff.
 
-touch /var/lock/subsys/local
-cd /tmp
-rm -rfv busui
-git clone http://maxious.lambdacomplex.org/busui/git
-sh busui/aws/awsStartup.sh
-
-
-

file:a/aws/transitdata.sql (deleted)
--- a/aws/transitdata.sql
+++ /dev/null
@@ -1,13723 +1,1 @@
---
--- PostgreSQL database dump
---
 
--- Dumped from database version 9.0.4
--- Dumped by pg_dump version 9.0.4
--- Started on 2011-10-11 23:16:11
-
-SET statement_timeout = 0;
-SET client_encoding = 'UTF8';
-SET standard_conforming_strings = off;
-SET check_function_bodies = false;
-SET client_min_messages = warning;
-SET escape_string_warning = off;
-
---
--- TOC entry 1168 (class 2612 OID 11574)
--- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
---
-
-CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql;
-
-
-ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres;
-
-SET search_path = public, pg_catalog;
-
---
--- TOC entry 1088 (class 0 OID 0)
--- Name: box2d; Type: SHELL TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE box2d;
-
-
---
--- TOC entry 15 (class 1255 OID 18351)
--- Dependencies: 6 1088
--- Name: box2d_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION box2d_in(cstring) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_in';
-
-
-ALTER FUNCTION public.box2d_in(cstring) OWNER TO postgres;
-
---
--- TOC entry 19 (class 1255 OID 18352)
--- Dependencies: 6 1088
--- Name: box2d_out(box2d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION box2d_out(box2d) RETURNS cstring
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_out';
-
-
-ALTER FUNCTION public.box2d_out(box2d) OWNER TO postgres;
-
---
--- TOC entry 1087 (class 1247 OID 18350)
--- Dependencies: 6 15 19
--- Name: box2d; Type: TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE box2d (
-    INTERNALLENGTH = 16,
-    INPUT = box2d_in,
-    OUTPUT = box2d_out,
-    ALIGNMENT = int4,
-    STORAGE = plain
-);
-
-
-ALTER TYPE public.box2d OWNER TO postgres;
-
---
--- TOC entry 1091 (class 0 OID 0)
--- Name: box3d; Type: SHELL TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE box3d;
-
-
---
--- TOC entry 20 (class 1255 OID 18355)
--- Dependencies: 6 1091
--- Name: box3d_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION box3d_in(cstring) RETURNS box3d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_in';
-
-
-ALTER FUNCTION public.box3d_in(cstring) OWNER TO postgres;
-
---
--- TOC entry 21 (class 1255 OID 18356)
--- Dependencies: 6 1091
--- Name: box3d_out(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION box3d_out(box3d) RETURNS cstring
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_out';
-
-
-ALTER FUNCTION public.box3d_out(box3d) OWNER TO postgres;
-
---
--- TOC entry 1090 (class 1247 OID 18354)
--- Dependencies: 6 21 20
--- Name: box3d; Type: TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE box3d (
-    INTERNALLENGTH = 48,
-    INPUT = box3d_in,
-    OUTPUT = box3d_out,
-    ALIGNMENT = double,
-    STORAGE = plain
-);
-
-
-ALTER TYPE public.box3d OWNER TO postgres;
-
---
--- TOC entry 1094 (class 0 OID 0)
--- Name: box3d_extent; Type: SHELL TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE box3d_extent;
-
-
---
--- TOC entry 22 (class 1255 OID 18359)
--- Dependencies: 6 1094
--- Name: box3d_extent_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION box3d_extent_in(cstring) RETURNS box3d_extent
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_in';
-
-
-ALTER FUNCTION public.box3d_extent_in(cstring) OWNER TO postgres;
-
---
--- TOC entry 23 (class 1255 OID 18360)
--- Dependencies: 6 1094
--- Name: box3d_extent_out(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION box3d_extent_out(box3d_extent) RETURNS cstring
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_extent_out';
-
-
-ALTER FUNCTION public.box3d_extent_out(box3d_extent) OWNER TO postgres;
-
---
--- TOC entry 1093 (class 1247 OID 18358)
--- Dependencies: 6 23 22
--- Name: box3d_extent; Type: TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE box3d_extent (
-    INTERNALLENGTH = 48,
-    INPUT = box3d_extent_in,
-    OUTPUT = box3d_extent_out,
-    ALIGNMENT = double,
-    STORAGE = plain
-);
-
-
-ALTER TYPE public.box3d_extent OWNER TO postgres;
-
---
--- TOC entry 1097 (class 0 OID 0)
--- Name: chip; Type: SHELL TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE chip;
-
-
---
--- TOC entry 24 (class 1255 OID 18363)
--- Dependencies: 6 1097
--- Name: chip_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION chip_in(cstring) RETURNS chip
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_in';
-
-
-ALTER FUNCTION public.chip_in(cstring) OWNER TO postgres;
-
---
--- TOC entry 25 (class 1255 OID 18364)
--- Dependencies: 6 1097
--- Name: chip_out(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION chip_out(chip) RETURNS cstring
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_out';
-
-
-ALTER FUNCTION public.chip_out(chip) OWNER TO postgres;
-
---
--- TOC entry 1096 (class 1247 OID 18362)
--- Dependencies: 6 25 24
--- Name: chip; Type: TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE chip (
-    INTERNALLENGTH = variable,
-    INPUT = chip_in,
-    OUTPUT = chip_out,
-    ALIGNMENT = double,
-    STORAGE = extended
-);
-
-
-ALTER TYPE public.chip OWNER TO postgres;
-
---
--- TOC entry 1100 (class 0 OID 0)
--- Name: geography; Type: SHELL TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE geography;
-
-
---
--- TOC entry 26 (class 1255 OID 18367)
--- Dependencies: 6
--- Name: geography_analyze(internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_analyze(internal) RETURNS boolean
-    LANGUAGE c STRICT
-    AS '$libdir/postgis-1.5', 'geography_analyze';
-
-
-ALTER FUNCTION public.geography_analyze(internal) OWNER TO postgres;
-
---
--- TOC entry 27 (class 1255 OID 18368)
--- Dependencies: 6 1100
--- Name: geography_in(cstring, oid, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_in(cstring, oid, integer) RETURNS geography
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_in';
-
-
-ALTER FUNCTION public.geography_in(cstring, oid, integer) OWNER TO postgres;
-
---
--- TOC entry 28 (class 1255 OID 18369)
--- Dependencies: 6 1100
--- Name: geography_out(geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_out(geography) RETURNS cstring
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_out';
-
-
-ALTER FUNCTION public.geography_out(geography) OWNER TO postgres;
-
---
--- TOC entry 29 (class 1255 OID 18370)
--- Dependencies: 6
--- Name: geography_typmod_in(cstring[]); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_typmod_in(cstring[]) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_typmod_in';
-
-
-ALTER FUNCTION public.geography_typmod_in(cstring[]) OWNER TO postgres;
-
---
--- TOC entry 30 (class 1255 OID 18371)
--- Dependencies: 6
--- Name: geography_typmod_out(integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_typmod_out(integer) RETURNS cstring
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_typmod_out';
-
-
-ALTER FUNCTION public.geography_typmod_out(integer) OWNER TO postgres;
-
---
--- TOC entry 1099 (class 1247 OID 18366)
--- Dependencies: 26 6 27 28 29 30
--- Name: geography; Type: TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE geography (
-    INTERNALLENGTH = variable,
-    INPUT = geography_in,
-    OUTPUT = geography_out,
-    TYPMOD_IN = geography_typmod_in,
-    TYPMOD_OUT = geography_typmod_out,
-    ANALYZE = geography_analyze,
-    ALIGNMENT = double,
-    STORAGE = main
-);
-
-
-ALTER TYPE public.geography OWNER TO postgres;
-
---
--- TOC entry 1103 (class 0 OID 0)
--- Name: geometry; Type: SHELL TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE geometry;
-
-
---
--- TOC entry 31 (class 1255 OID 18374)
--- Dependencies: 6
--- Name: geometry_analyze(internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_analyze(internal) RETURNS boolean
-    LANGUAGE c STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_analyze';
-
-
-ALTER FUNCTION public.geometry_analyze(internal) OWNER TO postgres;
-
---
--- TOC entry 32 (class 1255 OID 18375)
--- Dependencies: 6 1103
--- Name: geometry_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_in(cstring) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_in';
-
-
-ALTER FUNCTION public.geometry_in(cstring) OWNER TO postgres;
-
---
--- TOC entry 33 (class 1255 OID 18376)
--- Dependencies: 6 1103
--- Name: geometry_out(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_out(geometry) RETURNS cstring
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_out';
-
-
-ALTER FUNCTION public.geometry_out(geometry) OWNER TO postgres;
-
---
--- TOC entry 34 (class 1255 OID 18377)
--- Dependencies: 6 1103
--- Name: geometry_recv(internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_recv(internal) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_recv';
-
-
-ALTER FUNCTION public.geometry_recv(internal) OWNER TO postgres;
-
---
--- TOC entry 35 (class 1255 OID 18378)
--- Dependencies: 6 1103
--- Name: geometry_send(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_send(geometry) RETURNS bytea
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_send';
-
-
-ALTER FUNCTION public.geometry_send(geometry) OWNER TO postgres;
-
---
--- TOC entry 1102 (class 1247 OID 18373)
--- Dependencies: 33 34 35 31 6 32
--- Name: geometry; Type: TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE geometry (
-    INTERNALLENGTH = variable,
-    INPUT = geometry_in,
-    OUTPUT = geometry_out,
-    RECEIVE = geometry_recv,
-    SEND = geometry_send,
-    ANALYZE = geometry_analyze,
-    DELIMITER = ':',
-    ALIGNMENT = int4,
-    STORAGE = main
-);
-
-
-ALTER TYPE public.geometry OWNER TO postgres;
-
---
--- TOC entry 1105 (class 1247 OID 18382)
--- Dependencies: 6 2408
--- Name: geometry_dump; Type: TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE geometry_dump AS (
-	path integer[],
-	geom geometry
-);
-
-
-ALTER TYPE public.geometry_dump OWNER TO postgres;
-
---
--- TOC entry 1108 (class 0 OID 0)
--- Name: gidx; Type: SHELL TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE gidx;
-
-
---
--- TOC entry 36 (class 1255 OID 18384)
--- Dependencies: 6 1108
--- Name: gidx_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION gidx_in(cstring) RETURNS gidx
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'gidx_in';
-
-
-ALTER FUNCTION public.gidx_in(cstring) OWNER TO postgres;
-
---
--- TOC entry 37 (class 1255 OID 18385)
--- Dependencies: 6 1108
--- Name: gidx_out(gidx); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION gidx_out(gidx) RETURNS cstring
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'gidx_out';
-
-
-ALTER FUNCTION public.gidx_out(gidx) OWNER TO postgres;
-
---
--- TOC entry 1107 (class 1247 OID 18383)
--- Dependencies: 37 36 6
--- Name: gidx; Type: TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE gidx (
-    INTERNALLENGTH = variable,
-    INPUT = gidx_in,
-    OUTPUT = gidx_out,
-    ALIGNMENT = double,
-    STORAGE = plain
-);
-
-
-ALTER TYPE public.gidx OWNER TO postgres;
-
---
--- TOC entry 1111 (class 0 OID 0)
--- Name: pgis_abs; Type: SHELL TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE pgis_abs;
-
-
---
--- TOC entry 38 (class 1255 OID 18388)
--- Dependencies: 6 1111
--- Name: pgis_abs_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION pgis_abs_in(cstring) RETURNS pgis_abs
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'pgis_abs_in';
-
-
-ALTER FUNCTION public.pgis_abs_in(cstring) OWNER TO postgres;
-
---
--- TOC entry 39 (class 1255 OID 18389)
--- Dependencies: 6 1111
--- Name: pgis_abs_out(pgis_abs); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION pgis_abs_out(pgis_abs) RETURNS cstring
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'pgis_abs_out';
-
-
-ALTER FUNCTION public.pgis_abs_out(pgis_abs) OWNER TO postgres;
-
---
--- TOC entry 1110 (class 1247 OID 18387)
--- Dependencies: 38 6 39
--- Name: pgis_abs; Type: TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE pgis_abs (
-    INTERNALLENGTH = 8,
-    INPUT = pgis_abs_in,
-    OUTPUT = pgis_abs_out,
-    ALIGNMENT = double,
-    STORAGE = plain
-);
-
-
-ALTER TYPE public.pgis_abs OWNER TO postgres;
-
---
--- TOC entry 1114 (class 0 OID 0)
--- Name: spheroid; Type: SHELL TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE spheroid;
-
-
---
--- TOC entry 40 (class 1255 OID 18392)
--- Dependencies: 6 1114
--- Name: spheroid_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION spheroid_in(cstring) RETURNS spheroid
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'ellipsoid_in';
-
-
-ALTER FUNCTION public.spheroid_in(cstring) OWNER TO postgres;
-
---
--- TOC entry 41 (class 1255 OID 18393)
--- Dependencies: 6 1114
--- Name: spheroid_out(spheroid); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION spheroid_out(spheroid) RETURNS cstring
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'ellipsoid_out';
-
-
-ALTER FUNCTION public.spheroid_out(spheroid) OWNER TO postgres;
-
---
--- TOC entry 1113 (class 1247 OID 18391)
--- Dependencies: 41 6 40
--- Name: spheroid; Type: TYPE; Schema: public; Owner: postgres
---
-
-CREATE TYPE spheroid (
-    INTERNALLENGTH = 65,
-    INPUT = spheroid_in,
-    OUTPUT = spheroid_out,
-    ALIGNMENT = double,
-    STORAGE = plain
-);
-
-
-ALTER TYPE public.spheroid OWNER TO postgres;
-
---
--- TOC entry 42 (class 1255 OID 18395)
--- Dependencies: 6 1102
--- Name: _st_asgeojson(integer, geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_asgeojson(integer, geometry, integer, integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asGeoJson';
-
-
-ALTER FUNCTION public._st_asgeojson(integer, geometry, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 43 (class 1255 OID 18396)
--- Dependencies: 6 1099
--- Name: _st_asgeojson(integer, geography, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_asgeojson(integer, geography, integer, integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_as_geojson';
-
-
-ALTER FUNCTION public._st_asgeojson(integer, geography, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 44 (class 1255 OID 18397)
--- Dependencies: 6 1102
--- Name: _st_asgml(integer, geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_asgml(integer, geometry, integer, integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asGML';
-
-
-ALTER FUNCTION public._st_asgml(integer, geometry, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 45 (class 1255 OID 18398)
--- Dependencies: 6 1099
--- Name: _st_asgml(integer, geography, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_asgml(integer, geography, integer, integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_as_gml';
-
-
-ALTER FUNCTION public._st_asgml(integer, geography, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 46 (class 1255 OID 18399)
--- Dependencies: 1102 6
--- Name: _st_askml(integer, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_askml(integer, geometry, integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asKML';
-
-
-ALTER FUNCTION public._st_askml(integer, geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 47 (class 1255 OID 18400)
--- Dependencies: 6 1099
--- Name: _st_askml(integer, geography, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_askml(integer, geography, integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_as_kml';
-
-
-ALTER FUNCTION public._st_askml(integer, geography, integer) OWNER TO postgres;
-
---
--- TOC entry 49 (class 1255 OID 18402)
--- Dependencies: 1099 6
--- Name: _st_bestsrid(geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_bestsrid(geography) RETURNS integer
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_BestSRID($1,$1)$_$;
-
-
-ALTER FUNCTION public._st_bestsrid(geography) OWNER TO postgres;
-
---
--- TOC entry 48 (class 1255 OID 18401)
--- Dependencies: 6 1099 1099
--- Name: _st_bestsrid(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_bestsrid(geography, geography) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_bestsrid';
-
-
-ALTER FUNCTION public._st_bestsrid(geography, geography) OWNER TO postgres;
-
---
--- TOC entry 50 (class 1255 OID 18403)
--- Dependencies: 1102 6 1102
--- Name: _st_buffer(geometry, double precision, cstring); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_buffer(geometry, double precision, cstring) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'buffer';
-
-
-ALTER FUNCTION public._st_buffer(geometry, double precision, cstring) OWNER TO postgres;
-
---
--- TOC entry 51 (class 1255 OID 18404)
--- Dependencies: 6 1102 1102
--- Name: _st_contains(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_contains(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'contains';
-
-
-ALTER FUNCTION public._st_contains(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 52 (class 1255 OID 18405)
--- Dependencies: 6 1102 1102
--- Name: _st_containsproperly(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_containsproperly(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'containsproperly';
-
-
-ALTER FUNCTION public._st_containsproperly(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 53 (class 1255 OID 18406)
--- Dependencies: 6 1102 1102
--- Name: _st_coveredby(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_coveredby(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'coveredby';
-
-
-ALTER FUNCTION public._st_coveredby(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 54 (class 1255 OID 18407)
--- Dependencies: 1102 1102 6
--- Name: _st_covers(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_covers(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'covers';
-
-
-ALTER FUNCTION public._st_covers(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 55 (class 1255 OID 18408)
--- Dependencies: 1099 1099 6
--- Name: _st_covers(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_covers(geography, geography) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'geography_covers';
-
-
-ALTER FUNCTION public._st_covers(geography, geography) OWNER TO postgres;
-
---
--- TOC entry 56 (class 1255 OID 18409)
--- Dependencies: 1102 1102 6
--- Name: _st_crosses(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_crosses(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'crosses';
-
-
-ALTER FUNCTION public._st_crosses(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 57 (class 1255 OID 18410)
--- Dependencies: 1102 6 1102
--- Name: _st_dfullywithin(geometry, geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_dfullywithin(geometry, geometry, double precision) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_dfullywithin';
-
-
-ALTER FUNCTION public._st_dfullywithin(geometry, geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 58 (class 1255 OID 18411)
--- Dependencies: 1099 6 1099
--- Name: _st_distance(geography, geography, double precision, boolean); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_distance(geography, geography, double precision, boolean) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'geography_distance';
-
-
-ALTER FUNCTION public._st_distance(geography, geography, double precision, boolean) OWNER TO postgres;
-
---
--- TOC entry 59 (class 1255 OID 18412)
--- Dependencies: 6 1168 1105 1102
--- Name: _st_dumppoints(geometry, integer[]); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_dumppoints(the_geom geometry, cur_path integer[]) RETURNS SETOF geometry_dump
-    LANGUAGE plpgsql
-    AS $$
-DECLARE
-  tmp geometry_dump;
-  tmp2 geometry_dump;
-  nb_points integer;
-  nb_geom integer;
-  i integer;
-  j integer;
-  g geometry;
-  
-BEGIN
-  
-  RAISE DEBUG '%,%', cur_path, ST_GeometryType(the_geom);
-
-  -- Special case (MULTI* OR GEOMETRYCOLLECTION) : iterate and return the DumpPoints of the geometries
-  SELECT ST_NumGeometries(the_geom) INTO nb_geom;
-
-  IF (nb_geom IS NOT NULL) THEN
-    
-    i = 1;
-    FOR tmp2 IN SELECT (ST_Dump(the_geom)).* LOOP
-
-      FOR tmp IN SELECT * FROM _ST_DumpPoints(tmp2.geom, cur_path || tmp2.path) LOOP
-	    RETURN NEXT tmp;
-      END LOOP;
-      i = i + 1;
-      
-    END LOOP;
-
-    RETURN;
-  END IF;
-  
-
-  -- Special case (POLYGON) : return the points of the rings of a polygon
-  IF (ST_GeometryType(the_geom) = 'ST_Polygon') THEN
-
-    FOR tmp IN SELECT * FROM _ST_DumpPoints(ST_ExteriorRing(the_geom), cur_path || ARRAY[1]) LOOP
-      RETURN NEXT tmp;
-    END LOOP;
-    
-    j := ST_NumInteriorRings(the_geom);
-    FOR i IN 1..j LOOP
-        FOR tmp IN SELECT * FROM _ST_DumpPoints(ST_InteriorRingN(the_geom, i), cur_path || ARRAY[i+1]) LOOP
-          RETURN NEXT tmp;
-        END LOOP;
-    END LOOP;
-    
-    RETURN;
-  END IF;
-
-    
-  -- Special case (POINT) : return the point
-  IF (ST_GeometryType(the_geom) = 'ST_Point') THEN
-
-    tmp.path = cur_path || ARRAY[1];
-    tmp.geom = the_geom;
-
-    RETURN NEXT tmp;
-    RETURN;
-
-  END IF;
-
-
-  -- Use ST_NumPoints rather than ST_NPoints to have a NULL value if the_geom isn't
-  -- a LINESTRING or CIRCULARSTRING.
-  SELECT ST_NumPoints(the_geom) INTO nb_points;
-
-  -- This should never happen
-  IF (nb_points IS NULL) THEN
-    RAISE EXCEPTION 'Unexpected error while dumping geometry %', ST_AsText(the_geom);
-  END IF;
-
-  FOR i IN 1..nb_points LOOP
-    tmp.path = cur_path || ARRAY[i];
-    tmp.geom := ST_PointN(the_geom, i);
-    RETURN NEXT tmp;
-  END LOOP;
-   
-END
-$$;
-
-
-ALTER FUNCTION public._st_dumppoints(the_geom geometry, cur_path integer[]) OWNER TO postgres;
-
---
--- TOC entry 60 (class 1255 OID 18413)
--- Dependencies: 1102 6 1102
--- Name: _st_dwithin(geometry, geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_dwithin(geometry, geometry, double precision) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'LWGEOM_dwithin';
-
-
-ALTER FUNCTION public._st_dwithin(geometry, geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 61 (class 1255 OID 18414)
--- Dependencies: 1099 6 1099
--- Name: _st_dwithin(geography, geography, double precision, boolean); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_dwithin(geography, geography, double precision, boolean) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'geography_dwithin';
-
-
-ALTER FUNCTION public._st_dwithin(geography, geography, double precision, boolean) OWNER TO postgres;
-
---
--- TOC entry 62 (class 1255 OID 18415)
--- Dependencies: 1102 6 1102
--- Name: _st_equals(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_equals(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'geomequals';
-
-
-ALTER FUNCTION public._st_equals(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 63 (class 1255 OID 18416)
--- Dependencies: 1099 1099 6
--- Name: _st_expand(geography, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_expand(geography, double precision) RETURNS geography
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_expand';
-
-
-ALTER FUNCTION public._st_expand(geography, double precision) OWNER TO postgres;
-
---
--- TOC entry 64 (class 1255 OID 18417)
--- Dependencies: 6 1102 1102
--- Name: _st_intersects(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_intersects(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'intersects';
-
-
-ALTER FUNCTION public._st_intersects(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 65 (class 1255 OID 18418)
--- Dependencies: 6 1102 1102
--- Name: _st_linecrossingdirection(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_linecrossingdirection(geometry, geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'ST_LineCrossingDirection';
-
-
-ALTER FUNCTION public._st_linecrossingdirection(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 66 (class 1255 OID 18419)
--- Dependencies: 1102 1102 1102 6
--- Name: _st_longestline(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_longestline(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_longestline2d';
-
-
-ALTER FUNCTION public._st_longestline(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 67 (class 1255 OID 18420)
--- Dependencies: 6 1102 1102
--- Name: _st_maxdistance(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_maxdistance(geometry, geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_maxdistance2d_linestring';
-
-
-ALTER FUNCTION public._st_maxdistance(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 68 (class 1255 OID 18421)
--- Dependencies: 6 1102 1102
--- Name: _st_orderingequals(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_orderingequals(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'LWGEOM_same';
-
-
-ALTER FUNCTION public._st_orderingequals(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 69 (class 1255 OID 18422)
--- Dependencies: 1102 1102 6
--- Name: _st_overlaps(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_overlaps(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'overlaps';
-
-
-ALTER FUNCTION public._st_overlaps(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 70 (class 1255 OID 18423)
--- Dependencies: 6 1099 1099
--- Name: _st_pointoutside(geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_pointoutside(geography) RETURNS geography
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_point_outside';
-
-
-ALTER FUNCTION public._st_pointoutside(geography) OWNER TO postgres;
-
---
--- TOC entry 71 (class 1255 OID 18424)
--- Dependencies: 6 1102 1102
--- Name: _st_touches(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_touches(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'touches';
-
-
-ALTER FUNCTION public._st_touches(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 72 (class 1255 OID 18425)
--- Dependencies: 6 1102 1102
--- Name: _st_within(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION _st_within(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'within';
-
-
-ALTER FUNCTION public._st_within(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 73 (class 1255 OID 18426)
--- Dependencies: 6 1168
--- Name: addauth(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION addauth(text) RETURNS boolean
-    LANGUAGE plpgsql
-    AS $_$ 
-DECLARE
-	lockid alias for $1;
-	okay boolean;
-	myrec record;
-BEGIN
-	-- check to see if table exists
-	--  if not, CREATE TEMP TABLE mylock (transid xid, lockcode text)
-	okay := 'f';
-	FOR myrec IN SELECT * FROM pg_class WHERE relname = 'temp_lock_have_table' LOOP
-		okay := 't';
-	END LOOP; 
-	IF (okay <> 't') THEN 
-		CREATE TEMP TABLE temp_lock_have_table (transid xid, lockcode text);
-			-- this will only work from pgsql7.4 up
-			-- ON COMMIT DELETE ROWS;
-	END IF;
-
-	--  INSERT INTO mylock VALUES ( $1)
---	EXECUTE 'INSERT INTO temp_lock_have_table VALUES ( '||
---		quote_literal(getTransactionID()) || ',' ||
---		quote_literal(lockid) ||')';
-
-	INSERT INTO temp_lock_have_table VALUES (getTransactionID(), lockid);
-
-	RETURN true::boolean;
-END;
-$_$;
-
-
-ALTER FUNCTION public.addauth(text) OWNER TO postgres;
-
---
--- TOC entry 74 (class 1255 OID 18427)
--- Dependencies: 6 1102 1102
--- Name: addbbox(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION addbbox(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_addBBOX';
-
-
-ALTER FUNCTION public.addbbox(geometry) OWNER TO postgres;
-
---
--- TOC entry 79 (class 1255 OID 18430)
--- Dependencies: 6 1168
--- Name: addgeometrycolumn(character varying, character varying, integer, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION addgeometrycolumn(character varying, character varying, integer, character varying, integer) RETURNS text
-    LANGUAGE plpgsql STRICT
-    AS $_$
-DECLARE
-	ret  text;
-BEGIN
-	SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5) into ret;
-	RETURN ret;
-END;
-$_$;
-
-
-ALTER FUNCTION public.addgeometrycolumn(character varying, character varying, integer, character varying, integer) OWNER TO postgres;
-
---
--- TOC entry 78 (class 1255 OID 18429)
--- Dependencies: 6 1168
--- Name: addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer) RETURNS text
-    LANGUAGE plpgsql STABLE STRICT
-    AS $_$
-DECLARE
-	ret  text;
-BEGIN
-	SELECT AddGeometryColumn('',$1,$2,$3,$4,$5,$6) into ret;
-	RETURN ret;
-END;
-$_$;
-
-
-ALTER FUNCTION public.addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer) OWNER TO postgres;
-
---
--- TOC entry 77 (class 1255 OID 18428)
--- Dependencies: 6 1168
--- Name: addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer) RETURNS text
-    LANGUAGE plpgsql STRICT
-    AS $_$
-DECLARE
-	catalog_name alias for $1;
-	schema_name alias for $2;
-	table_name alias for $3;
-	column_name alias for $4;
-	new_srid alias for $5;
-	new_type alias for $6;
-	new_dim alias for $7;
-	rec RECORD;
-	sr varchar;
-	real_schema name;
-	sql text;
-
-BEGIN
-
-	-- Verify geometry type
-	IF ( NOT ( (new_type = 'GEOMETRY') OR
-			   (new_type = 'GEOMETRYCOLLECTION') OR
-			   (new_type = 'POINT') OR
-			   (new_type = 'MULTIPOINT') OR
-			   (new_type = 'POLYGON') OR
-			   (new_type = 'MULTIPOLYGON') OR
-			   (new_type = 'LINESTRING') OR
-			   (new_type = 'MULTILINESTRING') OR
-			   (new_type = 'GEOMETRYCOLLECTIONM') OR
-			   (new_type = 'POINTM') OR
-			   (new_type = 'MULTIPOINTM') OR
-			   (new_type = 'POLYGONM') OR
-			   (new_type = 'MULTIPOLYGONM') OR
-			   (new_type = 'LINESTRINGM') OR
-			   (new_type = 'MULTILINESTRINGM') OR
-			   (new_type = 'CIRCULARSTRING') OR
-			   (new_type = 'CIRCULARSTRINGM') OR
-			   (new_type = 'COMPOUNDCURVE') OR
-			   (new_type = 'COMPOUNDCURVEM') OR
-			   (new_type = 'CURVEPOLYGON') OR
-			   (new_type = 'CURVEPOLYGONM') OR
-			   (new_type = 'MULTICURVE') OR
-			   (new_type = 'MULTICURVEM') OR
-			   (new_type = 'MULTISURFACE') OR
-			   (new_type = 'MULTISURFACEM')) )
-	THEN
-		RAISE EXCEPTION 'Invalid type name - valid ones are:
-	POINT, MULTIPOINT,
-	LINESTRING, MULTILINESTRING,
-	POLYGON, MULTIPOLYGON,
-	CIRCULARSTRING, COMPOUNDCURVE, MULTICURVE,
-	CURVEPOLYGON, MULTISURFACE,
-	GEOMETRY, GEOMETRYCOLLECTION,
-	POINTM, MULTIPOINTM,
-	LINESTRINGM, MULTILINESTRINGM,
-	POLYGONM, MULTIPOLYGONM,
-	CIRCULARSTRINGM, COMPOUNDCURVEM, MULTICURVEM
-	CURVEPOLYGONM, MULTISURFACEM,
-	or GEOMETRYCOLLECTIONM';
-		RETURN 'fail';
-	END IF;
-
-
-	-- Verify dimension
-	IF ( (new_dim >4) OR (new_dim <0) ) THEN
-		RAISE EXCEPTION 'invalid dimension';
-		RETURN 'fail';
-	END IF;
-
-	IF ( (new_type LIKE '%M') AND (new_dim!=3) ) THEN
-		RAISE EXCEPTION 'TypeM needs 3 dimensions';
-		RETURN 'fail';
-	END IF;
-
-
-	-- Verify SRID
-	IF ( new_srid != -1 ) THEN
-		SELECT SRID INTO sr FROM spatial_ref_sys WHERE SRID = new_srid;
-		IF NOT FOUND THEN
-			RAISE EXCEPTION 'AddGeometryColumns() - invalid SRID';
-			RETURN 'fail';
-		END IF;
-	END IF;
-
-
-	-- Verify schema
-	IF ( schema_name IS NOT NULL AND schema_name != '' ) THEN
-		sql := 'SELECT nspname FROM pg_namespace ' ||
-			'WHERE text(nspname) = ' || quote_literal(schema_name) ||
-			'LIMIT 1';
-		RAISE DEBUG '%', sql;
-		EXECUTE sql INTO real_schema;
-
-		IF ( real_schema IS NULL ) THEN
-			RAISE EXCEPTION 'Schema % is not a valid schemaname', quote_literal(schema_name);
-			RETURN 'fail';
-		END IF;
-	END IF;
-
-	IF ( real_schema IS NULL ) THEN
-		RAISE DEBUG 'Detecting schema';
-		sql := 'SELECT n.nspname AS schemaname ' ||
-			'FROM pg_catalog.pg_class c ' ||
-			  'JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace ' ||
-			'WHERE c.relkind = ' || quote_literal('r') ||
-			' AND n.nspname NOT IN (' || quote_literal('pg_catalog') || ', ' || quote_literal('pg_toast') || ')' ||
-			' AND pg_catalog.pg_table_is_visible(c.oid)' ||
-			' AND c.relname = ' || quote_literal(table_name);
-		RAISE DEBUG '%', sql;
-		EXECUTE sql INTO real_schema;
-
-		IF ( real_schema IS NULL ) THEN
-			RAISE EXCEPTION 'Table % does not occur in the search_path', quote_literal(table_name);
-			RETURN 'fail';
-		END IF;
-	END IF;
-
-
-	-- Add geometry column to table
-	sql := 'ALTER TABLE ' ||
-		quote_ident(real_schema) || '.' || quote_ident(table_name)
-		|| ' ADD COLUMN ' || quote_ident(column_name) ||
-		' geometry ';
-	RAISE DEBUG '%', sql;
-	EXECUTE sql;
-
-
-	-- Delete stale record in geometry_columns (if any)
-	sql := 'DELETE FROM geometry_columns WHERE
-		f_table_catalog = ' || quote_literal('') ||
-		' AND f_table_schema = ' ||
-		quote_literal(real_schema) ||
-		' AND f_table_name = ' || quote_literal(table_name) ||
-		' AND f_geometry_column = ' || quote_literal(column_name);
-	RAISE DEBUG '%', sql;
-	EXECUTE sql;
-
-
-	-- Add record in geometry_columns
-	sql := 'INSERT INTO geometry_columns (f_table_catalog,f_table_schema,f_table_name,' ||
-										  'f_geometry_column,coord_dimension,srid,type)' ||
-		' VALUES (' ||
-		quote_literal('') || ',' ||
-		quote_literal(real_schema) || ',' ||
-		quote_literal(table_name) || ',' ||
-		quote_literal(column_name) || ',' ||
-		new_dim::text || ',' ||
-		new_srid::text || ',' ||
-		quote_literal(new_type) || ')';
-	RAISE DEBUG '%', sql;
-	EXECUTE sql;
-
-
-	-- Add table CHECKs
-	sql := 'ALTER TABLE ' ||
-		quote_ident(real_schema) || '.' || quote_ident(table_name)
-		|| ' ADD CONSTRAINT '
-		|| quote_ident('enforce_srid_' || column_name)
-		|| ' CHECK (ST_SRID(' || quote_ident(column_name) ||
-		') = ' || new_srid::text || ')' ;
-	RAISE DEBUG '%', sql;
-	EXECUTE sql;
-
-	sql := 'ALTER TABLE ' ||
-		quote_ident(real_schema) || '.' || quote_ident(table_name)
-		|| ' ADD CONSTRAINT '
-		|| quote_ident('enforce_dims_' || column_name)
-		|| ' CHECK (ST_NDims(' || quote_ident(column_name) ||
-		') = ' || new_dim::text || ')' ;
-	RAISE DEBUG '%', sql;
-	EXECUTE sql;
-
-	IF ( NOT (new_type = 'GEOMETRY')) THEN
-		sql := 'ALTER TABLE ' ||
-			quote_ident(real_schema) || '.' || quote_ident(table_name) || ' ADD CONSTRAINT ' ||
-			quote_ident('enforce_geotype_' || column_name) ||
-			' CHECK (GeometryType(' ||
-			quote_ident(column_name) || ')=' ||
-			quote_literal(new_type) || ' OR (' ||
-			quote_ident(column_name) || ') is null)';
-		RAISE DEBUG '%', sql;
-		EXECUTE sql;
-	END IF;
-
-	RETURN
-		real_schema || '.' ||
-		table_name || '.' || column_name ||
-		' SRID:' || new_srid::text ||
-		' TYPE:' || new_type ||
-		' DIMS:' || new_dim::text || ' ';
-END;
-$_$;
-
-
-ALTER FUNCTION public.addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer) OWNER TO postgres;
-
---
--- TOC entry 80 (class 1255 OID 18431)
--- Dependencies: 6 1102 1102 1102
--- Name: addpoint(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION addpoint(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_addpoint';
-
-
-ALTER FUNCTION public.addpoint(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 81 (class 1255 OID 18432)
--- Dependencies: 6 1102 1102 1102
--- Name: addpoint(geometry, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION addpoint(geometry, geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_addpoint';
-
-
-ALTER FUNCTION public.addpoint(geometry, geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 83 (class 1255 OID 18434)
--- Dependencies: 1102 6 1102
--- Name: affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT affine($1,  $2, $3, 0,  $4, $5, 0,  0, 0, 1,  $6, $7, 0)$_$;
-
-
-ALTER FUNCTION public.affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 82 (class 1255 OID 18433)
--- Dependencies: 1102 1102 6
--- Name: affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_affine';
-
-
-ALTER FUNCTION public.affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 84 (class 1255 OID 18435)
--- Dependencies: 1102 6
--- Name: area(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION area(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_area_polygon';
-
-
-ALTER FUNCTION public.area(geometry) OWNER TO postgres;
-
---
--- TOC entry 85 (class 1255 OID 18436)
--- Dependencies: 1102 6
--- Name: area2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION area2d(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_area_polygon';
-
-
-ALTER FUNCTION public.area2d(geometry) OWNER TO postgres;
-
---
--- TOC entry 86 (class 1255 OID 18437)
--- Dependencies: 1102 6
--- Name: asbinary(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION asbinary(geometry) RETURNS bytea
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asBinary';
-
-
-ALTER FUNCTION public.asbinary(geometry) OWNER TO postgres;
-
---
--- TOC entry 87 (class 1255 OID 18438)
--- Dependencies: 1102 6
--- Name: asbinary(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION asbinary(geometry, text) RETURNS bytea
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asBinary';
-
-
-ALTER FUNCTION public.asbinary(geometry, text) OWNER TO postgres;
-
---
--- TOC entry 88 (class 1255 OID 18439)
--- Dependencies: 6 1102
--- Name: asewkb(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION asewkb(geometry) RETURNS bytea
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'WKBFromLWGEOM';
-
-
-ALTER FUNCTION public.asewkb(geometry) OWNER TO postgres;
-
---
--- TOC entry 89 (class 1255 OID 18440)
--- Dependencies: 1102 6
--- Name: asewkb(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION asewkb(geometry, text) RETURNS bytea
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'WKBFromLWGEOM';
-
-
-ALTER FUNCTION public.asewkb(geometry, text) OWNER TO postgres;
-
---
--- TOC entry 90 (class 1255 OID 18441)
--- Dependencies: 1102 6
--- Name: asewkt(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION asewkt(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asEWKT';
-
-
-ALTER FUNCTION public.asewkt(geometry) OWNER TO postgres;
-
---
--- TOC entry 92 (class 1255 OID 18443)
--- Dependencies: 6 1102
--- Name: asgml(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION asgml(geometry) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGML(2, $1, 15, 0)$_$;
-
-
-ALTER FUNCTION public.asgml(geometry) OWNER TO postgres;
-
---
--- TOC entry 91 (class 1255 OID 18442)
--- Dependencies: 1102 6
--- Name: asgml(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION asgml(geometry, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGML(2, $1, $2, 0)$_$;
-
-
-ALTER FUNCTION public.asgml(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 93 (class 1255 OID 18444)
--- Dependencies: 6 1102
--- Name: ashexewkb(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION ashexewkb(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asHEXEWKB';
-
-
-ALTER FUNCTION public.ashexewkb(geometry) OWNER TO postgres;
-
---
--- TOC entry 94 (class 1255 OID 18445)
--- Dependencies: 1102 6
--- Name: ashexewkb(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION ashexewkb(geometry, text) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asHEXEWKB';
-
-
-ALTER FUNCTION public.ashexewkb(geometry, text) OWNER TO postgres;
-
---
--- TOC entry 96 (class 1255 OID 18447)
--- Dependencies: 1102 6
--- Name: askml(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION askml(geometry) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsKML(2, transform($1,4326), 15)$_$;
-
-
-ALTER FUNCTION public.askml(geometry) OWNER TO postgres;
-
---
--- TOC entry 95 (class 1255 OID 18446)
--- Dependencies: 1102 6
--- Name: askml(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION askml(geometry, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsKML(2, transform($1,4326), $2)$_$;
-
-
-ALTER FUNCTION public.askml(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 97 (class 1255 OID 18448)
--- Dependencies: 6 1102
--- Name: askml(integer, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION askml(integer, geometry, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsKML($1, transform($2,4326), $3)$_$;
-
-
-ALTER FUNCTION public.askml(integer, geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 100 (class 1255 OID 18451)
--- Dependencies: 6 1102
--- Name: assvg(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION assvg(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'assvg_geometry';
-
-
-ALTER FUNCTION public.assvg(geometry) OWNER TO postgres;
-
---
--- TOC entry 99 (class 1255 OID 18450)
--- Dependencies: 6 1102
--- Name: assvg(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION assvg(geometry, integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'assvg_geometry';
-
-
-ALTER FUNCTION public.assvg(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 98 (class 1255 OID 18449)
--- Dependencies: 6 1102
--- Name: assvg(geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION assvg(geometry, integer, integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'assvg_geometry';
-
-
-ALTER FUNCTION public.assvg(geometry, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 101 (class 1255 OID 18452)
--- Dependencies: 1102 6
--- Name: astext(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION astext(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asText';
-
-
-ALTER FUNCTION public.astext(geometry) OWNER TO postgres;
-
---
--- TOC entry 102 (class 1255 OID 18453)
--- Dependencies: 6 1102 1102
--- Name: azimuth(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION azimuth(geometry, geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_azimuth';
-
-
-ALTER FUNCTION public.azimuth(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 103 (class 1255 OID 18454)
--- Dependencies: 1102 1168 6
--- Name: bdmpolyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION bdmpolyfromtext(text, integer) RETURNS geometry
-    LANGUAGE plpgsql IMMUTABLE STRICT
-    AS $_$
-DECLARE
-	geomtext alias for $1;
-	srid alias for $2;
-	mline geometry;
-	geom geometry;
-BEGIN
-	mline := MultiLineStringFromText(geomtext, srid);
-
-	IF mline IS NULL
-	THEN
-		RAISE EXCEPTION 'Input is not a MultiLinestring';
-	END IF;
-
-	geom := multi(BuildArea(mline));
-
-	RETURN geom;
-END;
-$_$;
-
-
-ALTER FUNCTION public.bdmpolyfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 75 (class 1255 OID 18455)
--- Dependencies: 6 1168 1102
--- Name: bdpolyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION bdpolyfromtext(text, integer) RETURNS geometry
-    LANGUAGE plpgsql IMMUTABLE STRICT
-    AS $_$
-DECLARE
-	geomtext alias for $1;
-	srid alias for $2;
-	mline geometry;
-	geom geometry;
-BEGIN
-	mline := MultiLineStringFromText(geomtext, srid);
-
-	IF mline IS NULL
-	THEN
-		RAISE EXCEPTION 'Input is not a MultiLinestring';
-	END IF;
-
-	geom := BuildArea(mline);
-
-	IF GeometryType(geom) != 'POLYGON'
-	THEN
-		RAISE EXCEPTION 'Input returns more then a single polygon, try using BdMPolyFromText instead';
-	END IF;
-
-	RETURN geom;
-END;
-$_$;
-
-
-ALTER FUNCTION public.bdpolyfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 76 (class 1255 OID 18456)
--- Dependencies: 6 1102 1102
--- Name: boundary(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION boundary(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'boundary';
-
-
-ALTER FUNCTION public.boundary(geometry) OWNER TO postgres;
-
---
--- TOC entry 104 (class 1255 OID 18457)
--- Dependencies: 6 1102
--- Name: box(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION box(geometry) RETURNS box
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_to_BOX';
-
-
-ALTER FUNCTION public.box(geometry) OWNER TO postgres;
-
---
--- TOC entry 105 (class 1255 OID 18458)
--- Dependencies: 6 1090
--- Name: box(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION box(box3d) RETURNS box
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_to_BOX';
-
-
-ALTER FUNCTION public.box(box3d) OWNER TO postgres;
-
---
--- TOC entry 106 (class 1255 OID 18459)
--- Dependencies: 6 1087 1093
--- Name: box2d(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION box2d(box3d_extent) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_to_BOX2DFLOAT4';
-
-
-ALTER FUNCTION public.box2d(box3d_extent) OWNER TO postgres;
-
---
--- TOC entry 107 (class 1255 OID 18460)
--- Dependencies: 6 1087 1102
--- Name: box2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION box2d(geometry) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_to_BOX2DFLOAT4';
-
-
-ALTER FUNCTION public.box2d(geometry) OWNER TO postgres;
-
---
--- TOC entry 108 (class 1255 OID 18461)
--- Dependencies: 1087 1090 6
--- Name: box2d(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION box2d(box3d) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_to_BOX2DFLOAT4';
-
-
-ALTER FUNCTION public.box2d(box3d) OWNER TO postgres;
-
---
--- TOC entry 109 (class 1255 OID 18462)
--- Dependencies: 6 1090 1102
--- Name: box3d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION box3d(geometry) RETURNS box3d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_to_BOX3D';
-
-
-ALTER FUNCTION public.box3d(geometry) OWNER TO postgres;
-
---
--- TOC entry 110 (class 1255 OID 18463)
--- Dependencies: 6 1090 1087
--- Name: box3d(box2d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION box3d(box2d) RETURNS box3d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_to_BOX3D';
-
-
-ALTER FUNCTION public.box3d(box2d) OWNER TO postgres;
-
---
--- TOC entry 111 (class 1255 OID 18464)
--- Dependencies: 6 1090 1093
--- Name: box3d_extent(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION box3d_extent(box3d_extent) RETURNS box3d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_extent_to_BOX3D';
-
-
-ALTER FUNCTION public.box3d_extent(box3d_extent) OWNER TO postgres;
-
---
--- TOC entry 112 (class 1255 OID 18465)
--- Dependencies: 6 1090
--- Name: box3dtobox(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION box3dtobox(box3d) RETURNS box
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT box($1)$_$;
-
-
-ALTER FUNCTION public.box3dtobox(box3d) OWNER TO postgres;
-
---
--- TOC entry 113 (class 1255 OID 18466)
--- Dependencies: 6 1102 1102
--- Name: buffer(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION buffer(geometry, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'buffer';
-
-
-ALTER FUNCTION public.buffer(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 114 (class 1255 OID 18467)
--- Dependencies: 6 1102 1102
--- Name: buffer(geometry, double precision, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION buffer(geometry, double precision, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT ST_Buffer($1, $2, $3)$_$;
-
-
-ALTER FUNCTION public.buffer(geometry, double precision, integer) OWNER TO postgres;
-
---
--- TOC entry 115 (class 1255 OID 18468)
--- Dependencies: 6 1102 1102
--- Name: buildarea(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION buildarea(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'LWGEOM_buildarea';
-
-
-ALTER FUNCTION public.buildarea(geometry) OWNER TO postgres;
-
---
--- TOC entry 116 (class 1255 OID 18469)
--- Dependencies: 6 1102
--- Name: bytea(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION bytea(geometry) RETURNS bytea
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_to_bytea';
-
-
-ALTER FUNCTION public.bytea(geometry) OWNER TO postgres;
-
---
--- TOC entry 117 (class 1255 OID 18470)
--- Dependencies: 6 1102 1102
--- Name: centroid(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION centroid(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'centroid';
-
-
-ALTER FUNCTION public.centroid(geometry) OWNER TO postgres;
-
---
--- TOC entry 119 (class 1255 OID 18472)
--- Dependencies: 6
--- Name: checkauth(text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION checkauth(text, text) RETURNS integer
-    LANGUAGE sql
-    AS $_$ SELECT CheckAuth('', $1, $2) $_$;
-
-
-ALTER FUNCTION public.checkauth(text, text) OWNER TO postgres;
-
---
--- TOC entry 118 (class 1255 OID 18471)
--- Dependencies: 6 1168
--- Name: checkauth(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION checkauth(text, text, text) RETURNS integer
-    LANGUAGE plpgsql
-    AS $_$ 
-DECLARE
-	schema text;
-BEGIN
-	IF NOT LongTransactionsEnabled() THEN
-		RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.';
-	END IF;
-
-	if ( $1 != '' ) THEN
-		schema = $1;
-	ELSE
-		SELECT current_schema() into schema;
-	END IF;
-
-	-- TODO: check for an already existing trigger ?
-
-	EXECUTE 'CREATE TRIGGER check_auth BEFORE UPDATE OR DELETE ON ' 
-		|| quote_ident(schema) || '.' || quote_ident($2)
-		||' FOR EACH ROW EXECUTE PROCEDURE CheckAuthTrigger('
-		|| quote_literal($3) || ')';
-
-	RETURN 0;
-END;
-$_$;
-
-
-ALTER FUNCTION public.checkauth(text, text, text) OWNER TO postgres;
-
---
--- TOC entry 120 (class 1255 OID 18473)
--- Dependencies: 6
--- Name: checkauthtrigger(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION checkauthtrigger() RETURNS trigger
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'check_authorization';
-
-
-ALTER FUNCTION public.checkauthtrigger() OWNER TO postgres;
-
---
--- TOC entry 121 (class 1255 OID 18474)
--- Dependencies: 6 1102 1102 1102
--- Name: collect(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION collect(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'LWGEOM_collect';
-
-
-ALTER FUNCTION public.collect(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 122 (class 1255 OID 18475)
--- Dependencies: 6 1087 1087 1102
--- Name: combine_bbox(box2d, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION combine_bbox(box2d, geometry) RETURNS box2d
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_combine';
-
-
-ALTER FUNCTION public.combine_bbox(box2d, geometry) OWNER TO postgres;
-
---
--- TOC entry 123 (class 1255 OID 18476)
--- Dependencies: 6 1093 1093 1102
--- Name: combine_bbox(box3d_extent, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION combine_bbox(box3d_extent, geometry) RETURNS box3d_extent
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'BOX3D_combine';
-
-
-ALTER FUNCTION public.combine_bbox(box3d_extent, geometry) OWNER TO postgres;
-
---
--- TOC entry 124 (class 1255 OID 18477)
--- Dependencies: 6 1090 1090 1102
--- Name: combine_bbox(box3d, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION combine_bbox(box3d, geometry) RETURNS box3d
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'BOX3D_combine';
-
-
-ALTER FUNCTION public.combine_bbox(box3d, geometry) OWNER TO postgres;
-
---
--- TOC entry 125 (class 1255 OID 18478)
--- Dependencies: 6 1096
--- Name: compression(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION compression(chip) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_getCompression';
-
-
-ALTER FUNCTION public.compression(chip) OWNER TO postgres;
-
---
--- TOC entry 126 (class 1255 OID 18479)
--- Dependencies: 6 1102 1102
--- Name: contains(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION contains(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'contains';
-
-
-ALTER FUNCTION public.contains(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 127 (class 1255 OID 18480)
--- Dependencies: 6 1102 1102
--- Name: convexhull(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION convexhull(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'convexhull';
-
-
-ALTER FUNCTION public.convexhull(geometry) OWNER TO postgres;
-
---
--- TOC entry 128 (class 1255 OID 18481)
--- Dependencies: 6 1102 1102
--- Name: crosses(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION crosses(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'crosses';
-
-
-ALTER FUNCTION public.crosses(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 129 (class 1255 OID 18482)
--- Dependencies: 6 1096
--- Name: datatype(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION datatype(chip) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_getDatatype';
-
-
-ALTER FUNCTION public.datatype(chip) OWNER TO postgres;
-
---
--- TOC entry 130 (class 1255 OID 18483)
--- Dependencies: 6 1102 1102 1102
--- Name: difference(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION difference(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'difference';
-
-
-ALTER FUNCTION public.difference(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 131 (class 1255 OID 18484)
--- Dependencies: 6 1102
--- Name: dimension(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION dimension(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_dimension';
-
-
-ALTER FUNCTION public.dimension(geometry) OWNER TO postgres;
-
---
--- TOC entry 132 (class 1255 OID 18485)
--- Dependencies: 6 1168
--- Name: disablelongtransactions(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION disablelongtransactions() RETURNS text
-    LANGUAGE plpgsql
-    AS $$ 
-DECLARE
-	rec RECORD;
-
-BEGIN
-
-	--
-	-- Drop all triggers applied by CheckAuth()
-	--
-	FOR rec IN
-		SELECT c.relname, t.tgname, t.tgargs FROM pg_trigger t, pg_class c, pg_proc p
-		WHERE p.proname = 'checkauthtrigger' and t.tgfoid = p.oid and t.tgrelid = c.oid
-	LOOP
-		EXECUTE 'DROP TRIGGER ' || quote_ident(rec.tgname) ||
-			' ON ' || quote_ident(rec.relname);
-	END LOOP;
-
-	--
-	-- Drop the authorization_table table
-	--
-	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorization_table' LOOP
-		DROP TABLE authorization_table;
-	END LOOP;
-
-	--
-	-- Drop the authorized_tables view
-	--
-	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorized_tables' LOOP
-		DROP VIEW authorized_tables;
-	END LOOP;
-
-	RETURN 'Long transactions support disabled';
-END;
-$$;
-
-
-ALTER FUNCTION public.disablelongtransactions() OWNER TO postgres;
-
---
--- TOC entry 133 (class 1255 OID 18486)
--- Dependencies: 6 1102 1102
--- Name: disjoint(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION disjoint(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'disjoint';
-
-
-ALTER FUNCTION public.disjoint(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 134 (class 1255 OID 18487)
--- Dependencies: 6 1102 1102
--- Name: distance(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION distance(geometry, geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'LWGEOM_mindistance2d';
-
-
-ALTER FUNCTION public.distance(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 135 (class 1255 OID 18488)
--- Dependencies: 6 1102 1102
--- Name: distance_sphere(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION distance_sphere(geometry, geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'LWGEOM_distance_sphere';
-
-
-ALTER FUNCTION public.distance_sphere(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 136 (class 1255 OID 18489)
--- Dependencies: 6 1102 1102 1113
--- Name: distance_spheroid(geometry, geometry, spheroid); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION distance_spheroid(geometry, geometry, spheroid) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'LWGEOM_distance_ellipsoid';
-
-
-ALTER FUNCTION public.distance_spheroid(geometry, geometry, spheroid) OWNER TO postgres;
-
---
--- TOC entry 137 (class 1255 OID 18490)
--- Dependencies: 6 1102 1102
--- Name: dropbbox(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION dropbbox(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_dropBBOX';
-
-
-ALTER FUNCTION public.dropbbox(geometry) OWNER TO postgres;
-
---
--- TOC entry 140 (class 1255 OID 18493)
--- Dependencies: 6 1168
--- Name: dropgeometrycolumn(character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION dropgeometrycolumn(character varying, character varying) RETURNS text
-    LANGUAGE plpgsql STRICT
-    AS $_$
-DECLARE
-	ret text;
-BEGIN
-	SELECT DropGeometryColumn('','',$1,$2) into ret;
-	RETURN ret;
-END;
-$_$;
-
-
-ALTER FUNCTION public.dropgeometrycolumn(character varying, character varying) OWNER TO postgres;
-
---
--- TOC entry 139 (class 1255 OID 18492)
--- Dependencies: 6 1168
--- Name: dropgeometrycolumn(character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION dropgeometrycolumn(character varying, character varying, character varying) RETURNS text
-    LANGUAGE plpgsql STRICT
-    AS $_$
-DECLARE
-	ret text;
-BEGIN
-	SELECT DropGeometryColumn('',$1,$2,$3) into ret;
-	RETURN ret;
-END;
-$_$;
-
-
-ALTER FUNCTION public.dropgeometrycolumn(character varying, character varying, character varying) OWNER TO postgres;
-
---
--- TOC entry 138 (class 1255 OID 18491)
--- Dependencies: 6 1168
--- Name: dropgeometrycolumn(character varying, character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION dropgeometrycolumn(character varying, character varying, character varying, character varying) RETURNS text
-    LANGUAGE plpgsql STRICT
-    AS $_$
-DECLARE
-	catalog_name alias for $1;
-	schema_name alias for $2;
-	table_name alias for $3;
-	column_name alias for $4;
-	myrec RECORD;
-	okay boolean;
-	real_schema name;
-
-BEGIN
-
-
-	-- Find, check or fix schema_name
-	IF ( schema_name != '' ) THEN
-		okay = 'f';
-
-		FOR myrec IN SELECT nspname FROM pg_namespace WHERE text(nspname) = schema_name LOOP
-			okay := 't';
-		END LOOP;
-
-		IF ( okay <> 't' ) THEN
-			RAISE NOTICE 'Invalid schema name - using current_schema()';
-			SELECT current_schema() into real_schema;
-		ELSE
-			real_schema = schema_name;
-		END IF;
-	ELSE
-		SELECT current_schema() into real_schema;
-	END IF;
-
-	-- Find out if the column is in the geometry_columns table
-	okay = 'f';
-	FOR myrec IN SELECT * from geometry_columns where f_table_schema = text(real_schema) and f_table_name = table_name and f_geometry_column = column_name LOOP
-		okay := 't';
-	END LOOP;
-	IF (okay <> 't') THEN
-		RAISE EXCEPTION 'column not found in geometry_columns table';
-		RETURN 'f';
-	END IF;
-
-	-- Remove ref from geometry_columns table
-	EXECUTE 'delete from geometry_columns where f_table_schema = ' ||
-		quote_literal(real_schema) || ' and f_table_name = ' ||
-		quote_literal(table_name)  || ' and f_geometry_column = ' ||
-		quote_literal(column_name);
-
-	-- Remove table column
-	EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) || '.' ||
-		quote_ident(table_name) || ' DROP COLUMN ' ||
-		quote_ident(column_name);
-
-	RETURN real_schema || '.' || table_name || '.' || column_name ||' effectively removed.';
-
-END;
-$_$;
-
-
-ALTER FUNCTION public.dropgeometrycolumn(character varying, character varying, character varying, character varying) OWNER TO postgres;
-
---
--- TOC entry 143 (class 1255 OID 18496)
--- Dependencies: 6
--- Name: dropgeometrytable(character varying); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION dropgeometrytable(character varying) RETURNS text
-    LANGUAGE sql STRICT
-    AS $_$ SELECT DropGeometryTable('','',$1) $_$;
-
-
-ALTER FUNCTION public.dropgeometrytable(character varying) OWNER TO postgres;
-
---
--- TOC entry 142 (class 1255 OID 18495)
--- Dependencies: 6
--- Name: dropgeometrytable(character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION dropgeometrytable(character varying, character varying) RETURNS text
-    LANGUAGE sql STRICT
-    AS $_$ SELECT DropGeometryTable('',$1,$2) $_$;
-
-
-ALTER FUNCTION public.dropgeometrytable(character varying, character varying) OWNER TO postgres;
-
---
--- TOC entry 141 (class 1255 OID 18494)
--- Dependencies: 6 1168
--- Name: dropgeometrytable(character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION dropgeometrytable(character varying, character varying, character varying) RETURNS text
-    LANGUAGE plpgsql STRICT
-    AS $_$
-DECLARE
-	catalog_name alias for $1;
-	schema_name alias for $2;
-	table_name alias for $3;
-	real_schema name;
-
-BEGIN
-
-	IF ( schema_name = '' ) THEN
-		SELECT current_schema() into real_schema;
-	ELSE
-		real_schema = schema_name;
-	END IF;
-
-	-- Remove refs from geometry_columns table
-	EXECUTE 'DELETE FROM geometry_columns WHERE ' ||
-		'f_table_schema = ' || quote_literal(real_schema) ||
-		' AND ' ||
-		' f_table_name = ' || quote_literal(table_name);
-
-	-- Remove table
-	EXECUTE 'DROP TABLE '
-		|| quote_ident(real_schema) || '.' ||
-		quote_ident(table_name);
-
-	RETURN
-		real_schema || '.' ||
-		table_name ||' dropped.';
-
-END;
-$_$;
-
-
-ALTER FUNCTION public.dropgeometrytable(character varying, character varying, character varying) OWNER TO postgres;
-
---
--- TOC entry 144 (class 1255 OID 18497)
--- Dependencies: 6 1105 1102
--- Name: dump(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION dump(geometry) RETURNS SETOF geometry_dump
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_dump';
-
-
-ALTER FUNCTION public.dump(geometry) OWNER TO postgres;
-
---
--- TOC entry 145 (class 1255 OID 18498)
--- Dependencies: 6 1105 1102
--- Name: dumprings(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION dumprings(geometry) RETURNS SETOF geometry_dump
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_dump_rings';
-
-
-ALTER FUNCTION public.dumprings(geometry) OWNER TO postgres;
-
---
--- TOC entry 146 (class 1255 OID 18499)
--- Dependencies: 6 1168
--- Name: enablelongtransactions(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION enablelongtransactions() RETURNS text
-    LANGUAGE plpgsql
-    AS $$ 
-DECLARE
-	"query" text;
-	exists bool;
-	rec RECORD;
-
-BEGIN
-
-	exists = 'f';
-	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorization_table'
-	LOOP
-		exists = 't';
-	END LOOP;
-
-	IF NOT exists
-	THEN
-		"query" = 'CREATE TABLE authorization_table (
-			toid oid, -- table oid
-			rid text, -- row id
-			expires timestamp,
-			authid text
-		)';
-		EXECUTE "query";
-	END IF;
-
-	exists = 'f';
-	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorized_tables'
-	LOOP
-		exists = 't';
-	END LOOP;
-
-	IF NOT exists THEN
-		"query" = 'CREATE VIEW authorized_tables AS ' ||
-			'SELECT ' ||
-			'n.nspname as schema, ' ||
-			'c.relname as table, trim(' ||
-			quote_literal(chr(92) || '000') ||
-			' from t.tgargs) as id_column ' ||
-			'FROM pg_trigger t, pg_class c, pg_proc p ' ||
-			', pg_namespace n ' ||
-			'WHERE p.proname = ' || quote_literal('checkauthtrigger') ||
-			' AND c.relnamespace = n.oid' ||
-			' AND t.tgfoid = p.oid and t.tgrelid = c.oid';
-		EXECUTE "query";
-	END IF;
-
-	RETURN 'Long transactions support enabled';
-END;
-$$;
-
-
-ALTER FUNCTION public.enablelongtransactions() OWNER TO postgres;
-
---
--- TOC entry 147 (class 1255 OID 18500)
--- Dependencies: 6 1102 1102
--- Name: endpoint(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION endpoint(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_endpoint_linestring';
-
-
-ALTER FUNCTION public.endpoint(geometry) OWNER TO postgres;
-
---
--- TOC entry 148 (class 1255 OID 18501)
--- Dependencies: 6 1102 1102
--- Name: envelope(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION envelope(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_envelope';
-
-
-ALTER FUNCTION public.envelope(geometry) OWNER TO postgres;
-
---
--- TOC entry 149 (class 1255 OID 18502)
--- Dependencies: 6 1102 1102
--- Name: equals(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION equals(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geomequals';
-
-
-ALTER FUNCTION public.equals(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 151 (class 1255 OID 18504)
--- Dependencies: 6 1087
--- Name: estimated_extent(text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION estimated_extent(text, text) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT SECURITY DEFINER
-    AS '$libdir/postgis-1.5', 'LWGEOM_estimated_extent';
-
-
-ALTER FUNCTION public.estimated_extent(text, text) OWNER TO postgres;
-
---
--- TOC entry 150 (class 1255 OID 18503)
--- Dependencies: 6 1087
--- Name: estimated_extent(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION estimated_extent(text, text, text) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT SECURITY DEFINER
-    AS '$libdir/postgis-1.5', 'LWGEOM_estimated_extent';
-
-
-ALTER FUNCTION public.estimated_extent(text, text, text) OWNER TO postgres;
-
---
--- TOC entry 152 (class 1255 OID 18505)
--- Dependencies: 6 1090 1090
--- Name: expand(box3d, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION expand(box3d, double precision) RETURNS box3d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_expand';
-
-
-ALTER FUNCTION public.expand(box3d, double precision) OWNER TO postgres;
-
---
--- TOC entry 153 (class 1255 OID 18506)
--- Dependencies: 6 1087 1087
--- Name: expand(box2d, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION expand(box2d, double precision) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_expand';
-
-
-ALTER FUNCTION public.expand(box2d, double precision) OWNER TO postgres;
-
---
--- TOC entry 154 (class 1255 OID 18507)
--- Dependencies: 6 1102 1102
--- Name: expand(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION expand(geometry, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_expand';
-
-
-ALTER FUNCTION public.expand(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 155 (class 1255 OID 18508)
--- Dependencies: 6 1102 1102
--- Name: exteriorring(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION exteriorring(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_exteriorring_polygon';
-
-
-ALTER FUNCTION public.exteriorring(geometry) OWNER TO postgres;
-
---
--- TOC entry 156 (class 1255 OID 18509)
--- Dependencies: 6 1096
--- Name: factor(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION factor(chip) RETURNS real
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_getFactor';
-
-
-ALTER FUNCTION public.factor(chip) OWNER TO postgres;
-
---
--- TOC entry 158 (class 1255 OID 18511)
--- Dependencies: 6 1168 1087
--- Name: find_extent(text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION find_extent(text, text) RETURNS box2d
-    LANGUAGE plpgsql IMMUTABLE STRICT
-    AS $_$
-DECLARE
-	tablename alias for $1;
-	columnname alias for $2;
-	myrec RECORD;
-
-BEGIN
-	FOR myrec IN EXECUTE 'SELECT extent("' || columnname || '") FROM "' || tablename || '"' LOOP
-		return myrec.extent;
-	END LOOP;
-END;
-$_$;
-
-
-ALTER FUNCTION public.find_extent(text, text) OWNER TO postgres;
-
---
--- TOC entry 157 (class 1255 OID 18510)
--- Dependencies: 6 1168 1087
--- Name: find_extent(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION find_extent(text, text, text) RETURNS box2d
-    LANGUAGE plpgsql IMMUTABLE STRICT
-    AS $_$
-DECLARE
-	schemaname alias for $1;
-	tablename alias for $2;
-	columnname alias for $3;
-	myrec RECORD;
-
-BEGIN
-	FOR myrec IN EXECUTE 'SELECT extent("' || columnname || '") FROM "' || schemaname || '"."' || tablename || '"' LOOP
-		return myrec.extent;
-	END LOOP;
-END;
-$_$;
-
-
-ALTER FUNCTION public.find_extent(text, text, text) OWNER TO postgres;
-
---
--- TOC entry 159 (class 1255 OID 18512)
--- Dependencies: 6 1168
--- Name: find_srid(character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION find_srid(character varying, character varying, character varying) RETURNS integer
-    LANGUAGE plpgsql IMMUTABLE STRICT
-    AS $_$
-DECLARE
-	schem text;
-	tabl text;
-	sr int4;
-BEGIN
-	IF $1 IS NULL THEN
-	  RAISE EXCEPTION 'find_srid() - schema is NULL!';
-	END IF;
-	IF $2 IS NULL THEN
-	  RAISE EXCEPTION 'find_srid() - table name is NULL!';
-	END IF;
-	IF $3 IS NULL THEN
-	  RAISE EXCEPTION 'find_srid() - column name is NULL!';
-	END IF;
-	schem = $1;
-	tabl = $2;
--- if the table contains a . and the schema is empty
--- split the table into a schema and a table
--- otherwise drop through to default behavior
-	IF ( schem = '' and tabl LIKE '%.%' ) THEN
-	 schem = substr(tabl,1,strpos(tabl,'.')-1);
-	 tabl = substr(tabl,length(schem)+2);
-	ELSE
-	 schem = schem || '%';
-	END IF;
-
-	select SRID into sr from geometry_columns where f_table_schema like schem and f_table_name = tabl and f_geometry_column = $3;
-	IF NOT FOUND THEN
-	   RAISE EXCEPTION 'find_srid() - couldnt find the corresponding SRID - is the geometry registered in the GEOMETRY_COLUMNS table?  Is there an uppercase/lowercase missmatch?';
-	END IF;
-	return sr;
-END;
-$_$;
-
-
-ALTER FUNCTION public.find_srid(character varying, character varying, character varying) OWNER TO postgres;
-
---
--- TOC entry 160 (class 1255 OID 18513)
--- Dependencies: 6 1168
--- Name: fix_geometry_columns(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION fix_geometry_columns() RETURNS text
-    LANGUAGE plpgsql
-    AS $$
-DECLARE
-	mislinked record;
-	result text;
-	linked integer;
-	deleted integer;
-	foundschema integer;
-BEGIN
-
-	-- Since 7.3 schema support has been added.
-	-- Previous postgis versions used to put the database name in
-	-- the schema column. This needs to be fixed, so we try to
-	-- set the correct schema for each geometry_colums record
-	-- looking at table, column, type and srid.
-	UPDATE geometry_columns SET f_table_schema = n.nspname
-		FROM pg_namespace n, pg_class c, pg_attribute a,
-			pg_constraint sridcheck, pg_constraint typecheck
-			WHERE ( f_table_schema is NULL
-		OR f_table_schema = ''
-			OR f_table_schema NOT IN (
-					SELECT nspname::varchar
-					FROM pg_namespace nn, pg_class cc, pg_attribute aa
-					WHERE cc.relnamespace = nn.oid
-					AND cc.relname = f_table_name::name
-					AND aa.attrelid = cc.oid
-					AND aa.attname = f_geometry_column::name))
-			AND f_table_name::name = c.relname
-			AND c.oid = a.attrelid
-			AND c.relnamespace = n.oid
-			AND f_geometry_column::name = a.attname
-
-			AND sridcheck.conrelid = c.oid
-		AND sridcheck.consrc LIKE '(srid(% = %)'
-			AND sridcheck.consrc ~ textcat(' = ', srid::text)
-
-			AND typecheck.conrelid = c.oid
-		AND typecheck.consrc LIKE
-		'((geometrytype(%) = ''%''::text) OR (% IS NULL))'
-			AND typecheck.consrc ~ textcat(' = ''', type::text)
-
-			AND NOT EXISTS (
-					SELECT oid FROM geometry_columns gc
-					WHERE c.relname::varchar = gc.f_table_name
-					AND n.nspname::varchar = gc.f_table_schema
-					AND a.attname::varchar = gc.f_geometry_column
-			);
-
-	GET DIAGNOSTICS foundschema = ROW_COUNT;
-
-	-- no linkage to system table needed
-	return 'fixed:'||foundschema::text;
-
-END;
-$$;
-
-
-ALTER FUNCTION public.fix_geometry_columns() OWNER TO postgres;
-
---
--- TOC entry 161 (class 1255 OID 18514)
--- Dependencies: 6 1102 1102
--- Name: force_2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION force_2d(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_force_2d';
-
-
-ALTER FUNCTION public.force_2d(geometry) OWNER TO postgres;
-
---
--- TOC entry 162 (class 1255 OID 18515)
--- Dependencies: 6 1102 1102
--- Name: force_3d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION force_3d(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_force_3dz';
-
-
-ALTER FUNCTION public.force_3d(geometry) OWNER TO postgres;
-
---
--- TOC entry 163 (class 1255 OID 18516)
--- Dependencies: 6 1102 1102
--- Name: force_3dm(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION force_3dm(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_force_3dm';
-
-
-ALTER FUNCTION public.force_3dm(geometry) OWNER TO postgres;
-
---
--- TOC entry 164 (class 1255 OID 18517)
--- Dependencies: 6 1102 1102
--- Name: force_3dz(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION force_3dz(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_force_3dz';
-
-
-ALTER FUNCTION public.force_3dz(geometry) OWNER TO postgres;
-
---
--- TOC entry 165 (class 1255 OID 18518)
--- Dependencies: 6 1102 1102
--- Name: force_4d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION force_4d(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_force_4d';
-
-
-ALTER FUNCTION public.force_4d(geometry) OWNER TO postgres;
-
---
--- TOC entry 166 (class 1255 OID 18519)
--- Dependencies: 6 1102 1102
--- Name: force_collection(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION force_collection(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_force_collection';
-
-
-ALTER FUNCTION public.force_collection(geometry) OWNER TO postgres;
-
---
--- TOC entry 167 (class 1255 OID 18520)
--- Dependencies: 6 1102 1102
--- Name: forcerhr(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION forcerhr(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_forceRHR_poly';
-
-
-ALTER FUNCTION public.forcerhr(geometry) OWNER TO postgres;
-
---
--- TOC entry 169 (class 1255 OID 18522)
--- Dependencies: 6 1099 1102
--- Name: geography(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography(geometry) RETURNS geography
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_from_geometry';
-
-
-ALTER FUNCTION public.geography(geometry) OWNER TO postgres;
-
---
--- TOC entry 168 (class 1255 OID 18521)
--- Dependencies: 6 1099 1099
--- Name: geography(geography, integer, boolean); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography(geography, integer, boolean) RETURNS geography
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_enforce_typmod';
-
-
-ALTER FUNCTION public.geography(geography, integer, boolean) OWNER TO postgres;
-
---
--- TOC entry 170 (class 1255 OID 18523)
--- Dependencies: 6 1099 1099
--- Name: geography_cmp(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_cmp(geography, geography) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_cmp';
-
-
-ALTER FUNCTION public.geography_cmp(geography, geography) OWNER TO postgres;
-
---
--- TOC entry 171 (class 1255 OID 18524)
--- Dependencies: 6 1099 1099
--- Name: geography_eq(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_eq(geography, geography) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_eq';
-
-
-ALTER FUNCTION public.geography_eq(geography, geography) OWNER TO postgres;
-
---
--- TOC entry 172 (class 1255 OID 18525)
--- Dependencies: 6 1099 1099
--- Name: geography_ge(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_ge(geography, geography) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_ge';
-
-
-ALTER FUNCTION public.geography_ge(geography, geography) OWNER TO postgres;
-
---
--- TOC entry 173 (class 1255 OID 18526)
--- Dependencies: 6
--- Name: geography_gist_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_gist_compress(internal) RETURNS internal
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'geography_gist_compress';
-
-
-ALTER FUNCTION public.geography_gist_compress(internal) OWNER TO postgres;
-
---
--- TOC entry 174 (class 1255 OID 18527)
--- Dependencies: 6 1102
--- Name: geography_gist_consistent(internal, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_gist_consistent(internal, geometry, integer) RETURNS boolean
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'geography_gist_consistent';
-
-
-ALTER FUNCTION public.geography_gist_consistent(internal, geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 175 (class 1255 OID 18528)
--- Dependencies: 6
--- Name: geography_gist_decompress(internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_gist_decompress(internal) RETURNS internal
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'geography_gist_decompress';
-
-
-ALTER FUNCTION public.geography_gist_decompress(internal) OWNER TO postgres;
-
---
--- TOC entry 176 (class 1255 OID 18529)
--- Dependencies: 6
--- Name: geography_gist_join_selectivity(internal, oid, internal, smallint); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_gist_join_selectivity(internal, oid, internal, smallint) RETURNS double precision
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'geography_gist_join_selectivity';
-
-
-ALTER FUNCTION public.geography_gist_join_selectivity(internal, oid, internal, smallint) OWNER TO postgres;
-
---
--- TOC entry 177 (class 1255 OID 18530)
--- Dependencies: 6
--- Name: geography_gist_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_gist_penalty(internal, internal, internal) RETURNS internal
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'geography_gist_penalty';
-
-
-ALTER FUNCTION public.geography_gist_penalty(internal, internal, internal) OWNER TO postgres;
-
---
--- TOC entry 178 (class 1255 OID 18531)
--- Dependencies: 6
--- Name: geography_gist_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_gist_picksplit(internal, internal) RETURNS internal
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'geography_gist_picksplit';
-
-
-ALTER FUNCTION public.geography_gist_picksplit(internal, internal) OWNER TO postgres;
-
---
--- TOC entry 179 (class 1255 OID 18532)
--- Dependencies: 6 1087 1087
--- Name: geography_gist_same(box2d, box2d, internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_gist_same(box2d, box2d, internal) RETURNS internal
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'geography_gist_same';
-
-
-ALTER FUNCTION public.geography_gist_same(box2d, box2d, internal) OWNER TO postgres;
-
---
--- TOC entry 180 (class 1255 OID 18533)
--- Dependencies: 6
--- Name: geography_gist_selectivity(internal, oid, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_gist_selectivity(internal, oid, internal, integer) RETURNS double precision
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'geography_gist_selectivity';
-
-
-ALTER FUNCTION public.geography_gist_selectivity(internal, oid, internal, integer) OWNER TO postgres;
-
---
--- TOC entry 181 (class 1255 OID 18534)
--- Dependencies: 6
--- Name: geography_gist_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_gist_union(bytea, internal) RETURNS internal
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'geography_gist_union';
-
-
-ALTER FUNCTION public.geography_gist_union(bytea, internal) OWNER TO postgres;
-
---
--- TOC entry 182 (class 1255 OID 18535)
--- Dependencies: 6 1099 1099
--- Name: geography_gt(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_gt(geography, geography) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_gt';
-
-
-ALTER FUNCTION public.geography_gt(geography, geography) OWNER TO postgres;
-
---
--- TOC entry 183 (class 1255 OID 18536)
--- Dependencies: 6 1099 1099
--- Name: geography_le(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_le(geography, geography) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_le';
-
-
-ALTER FUNCTION public.geography_le(geography, geography) OWNER TO postgres;
-
---
--- TOC entry 184 (class 1255 OID 18537)
--- Dependencies: 6 1099 1099
--- Name: geography_lt(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_lt(geography, geography) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_lt';
-
-
-ALTER FUNCTION public.geography_lt(geography, geography) OWNER TO postgres;
-
---
--- TOC entry 185 (class 1255 OID 18538)
--- Dependencies: 6 1099 1099
--- Name: geography_overlaps(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_overlaps(geography, geography) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_overlaps';
-
-
-ALTER FUNCTION public.geography_overlaps(geography, geography) OWNER TO postgres;
-
---
--- TOC entry 186 (class 1255 OID 18539)
--- Dependencies: 6
--- Name: geography_typmod_dims(integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_typmod_dims(integer) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_typmod_dims';
-
-
-ALTER FUNCTION public.geography_typmod_dims(integer) OWNER TO postgres;
-
---
--- TOC entry 187 (class 1255 OID 18540)
--- Dependencies: 6
--- Name: geography_typmod_srid(integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_typmod_srid(integer) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_typmod_srid';
-
-
-ALTER FUNCTION public.geography_typmod_srid(integer) OWNER TO postgres;
-
---
--- TOC entry 188 (class 1255 OID 18541)
--- Dependencies: 6
--- Name: geography_typmod_type(integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geography_typmod_type(integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_typmod_type';
-
-
-ALTER FUNCTION public.geography_typmod_type(integer) OWNER TO postgres;
-
---
--- TOC entry 190 (class 1255 OID 18543)
--- Dependencies: 6 1102
--- Name: geomcollfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geomcollfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE
-	WHEN geometrytype(GeomFromText($1)) = 'GEOMETRYCOLLECTION'
-	THEN GeomFromText($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.geomcollfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 189 (class 1255 OID 18542)
--- Dependencies: 6 1102
--- Name: geomcollfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geomcollfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE
-	WHEN geometrytype(GeomFromText($1, $2)) = 'GEOMETRYCOLLECTION'
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.geomcollfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 192 (class 1255 OID 18545)
--- Dependencies: 6 1102
--- Name: geomcollfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geomcollfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE
-	WHEN geometrytype(GeomFromWKB($1)) = 'GEOMETRYCOLLECTION'
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.geomcollfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 191 (class 1255 OID 18544)
--- Dependencies: 6 1102
--- Name: geomcollfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geomcollfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE
-	WHEN geometrytype(GeomFromWKB($1, $2)) = 'GEOMETRYCOLLECTION'
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.geomcollfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 193 (class 1255 OID 18546)
--- Dependencies: 6 1102 1093
--- Name: geometry(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry(box3d_extent) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_to_LWGEOM';
-
-
-ALTER FUNCTION public.geometry(box3d_extent) OWNER TO postgres;
-
---
--- TOC entry 194 (class 1255 OID 18547)
--- Dependencies: 6 1102 1087
--- Name: geometry(box2d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry(box2d) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_to_LWGEOM';
-
-
-ALTER FUNCTION public.geometry(box2d) OWNER TO postgres;
-
---
--- TOC entry 195 (class 1255 OID 18548)
--- Dependencies: 6 1102 1090
--- Name: geometry(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry(box3d) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_to_LWGEOM';
-
-
-ALTER FUNCTION public.geometry(box3d) OWNER TO postgres;
-
---
--- TOC entry 196 (class 1255 OID 18549)
--- Dependencies: 6 1102
--- Name: geometry(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry(text) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'parse_WKT_lwgeom';
-
-
-ALTER FUNCTION public.geometry(text) OWNER TO postgres;
-
---
--- TOC entry 197 (class 1255 OID 18550)
--- Dependencies: 6 1102 1096
--- Name: geometry(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry(chip) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_to_LWGEOM';
-
-
-ALTER FUNCTION public.geometry(chip) OWNER TO postgres;
-
---
--- TOC entry 198 (class 1255 OID 18551)
--- Dependencies: 6 1102
--- Name: geometry(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry(bytea) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_from_bytea';
-
-
-ALTER FUNCTION public.geometry(bytea) OWNER TO postgres;
-
---
--- TOC entry 199 (class 1255 OID 18552)
--- Dependencies: 6 1102 1099
--- Name: geometry(geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry(geography) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geometry_from_geography';
-
-
-ALTER FUNCTION public.geometry(geography) OWNER TO postgres;
-
---
--- TOC entry 200 (class 1255 OID 18553)
--- Dependencies: 6 1102 1102
--- Name: geometry_above(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_above(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_above';
-
-
-ALTER FUNCTION public.geometry_above(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 201 (class 1255 OID 18554)
--- Dependencies: 6 1102 1102
--- Name: geometry_below(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_below(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_below';
-
-
-ALTER FUNCTION public.geometry_below(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 202 (class 1255 OID 18555)
--- Dependencies: 6 1102 1102
--- Name: geometry_cmp(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_cmp(geometry, geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'lwgeom_cmp';
-
-
-ALTER FUNCTION public.geometry_cmp(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 203 (class 1255 OID 18556)
--- Dependencies: 6 1102 1102
--- Name: geometry_contain(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_contain(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_contain';
-
-
-ALTER FUNCTION public.geometry_contain(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 204 (class 1255 OID 18557)
--- Dependencies: 6 1102 1102
--- Name: geometry_contained(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_contained(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_contained';
-
-
-ALTER FUNCTION public.geometry_contained(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 205 (class 1255 OID 18558)
--- Dependencies: 6 1102 1102
--- Name: geometry_eq(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_eq(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'lwgeom_eq';
-
-
-ALTER FUNCTION public.geometry_eq(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 206 (class 1255 OID 18559)
--- Dependencies: 6 1102 1102
--- Name: geometry_ge(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_ge(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'lwgeom_ge';
-
-
-ALTER FUNCTION public.geometry_ge(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 207 (class 1255 OID 18560)
--- Dependencies: 6
--- Name: geometry_gist_joinsel(internal, oid, internal, smallint); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_gist_joinsel(internal, oid, internal, smallint) RETURNS double precision
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'LWGEOM_gist_joinsel';
-
-
-ALTER FUNCTION public.geometry_gist_joinsel(internal, oid, internal, smallint) OWNER TO postgres;
-
---
--- TOC entry 208 (class 1255 OID 18561)
--- Dependencies: 6
--- Name: geometry_gist_sel(internal, oid, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_gist_sel(internal, oid, internal, integer) RETURNS double precision
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'LWGEOM_gist_sel';
-
-
-ALTER FUNCTION public.geometry_gist_sel(internal, oid, internal, integer) OWNER TO postgres;
-
---
--- TOC entry 209 (class 1255 OID 18562)
--- Dependencies: 1102 6 1102
--- Name: geometry_gt(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_gt(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'lwgeom_gt';
-
-
-ALTER FUNCTION public.geometry_gt(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 210 (class 1255 OID 18563)
--- Dependencies: 1102 6 1102
--- Name: geometry_le(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_le(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'lwgeom_le';
-
-
-ALTER FUNCTION public.geometry_le(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 211 (class 1255 OID 18564)
--- Dependencies: 1102 6 1102
--- Name: geometry_left(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_left(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_left';
-
-
-ALTER FUNCTION public.geometry_left(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 212 (class 1255 OID 18565)
--- Dependencies: 1102 6 1102
--- Name: geometry_lt(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_lt(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'lwgeom_lt';
-
-
-ALTER FUNCTION public.geometry_lt(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 213 (class 1255 OID 18566)
--- Dependencies: 1102 6 1102
--- Name: geometry_overabove(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_overabove(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_overabove';
-
-
-ALTER FUNCTION public.geometry_overabove(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 214 (class 1255 OID 18567)
--- Dependencies: 1102 6 1102
--- Name: geometry_overbelow(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_overbelow(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_overbelow';
-
-
-ALTER FUNCTION public.geometry_overbelow(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 215 (class 1255 OID 18568)
--- Dependencies: 1102 6 1102
--- Name: geometry_overlap(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_overlap(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_overlap';
-
-
-ALTER FUNCTION public.geometry_overlap(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 216 (class 1255 OID 18569)
--- Dependencies: 1102 6 1102
--- Name: geometry_overleft(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_overleft(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_overleft';
-
-
-ALTER FUNCTION public.geometry_overleft(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 217 (class 1255 OID 18570)
--- Dependencies: 1102 6 1102
--- Name: geometry_overright(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_overright(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_overright';
-
-
-ALTER FUNCTION public.geometry_overright(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 218 (class 1255 OID 18571)
--- Dependencies: 1102 6 1102
--- Name: geometry_right(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_right(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_right';
-
-
-ALTER FUNCTION public.geometry_right(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 219 (class 1255 OID 18572)
--- Dependencies: 1102 6 1102
--- Name: geometry_same(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_same(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_samebox';
-
-
-ALTER FUNCTION public.geometry_same(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 220 (class 1255 OID 18573)
--- Dependencies: 1102 6 1102
--- Name: geometry_samebox(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometry_samebox(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_samebox';
-
-
-ALTER FUNCTION public.geometry_samebox(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 221 (class 1255 OID 18574)
--- Dependencies: 6 1102
--- Name: geometryfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometryfromtext(text) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_from_text';
-
-
-ALTER FUNCTION public.geometryfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 222 (class 1255 OID 18575)
--- Dependencies: 1102 6
--- Name: geometryfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometryfromtext(text, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_from_text';
-
-
-ALTER FUNCTION public.geometryfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 223 (class 1255 OID 18576)
--- Dependencies: 6 1102 1102
--- Name: geometryn(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometryn(geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_geometryn_collection';
-
-
-ALTER FUNCTION public.geometryn(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 224 (class 1255 OID 18577)
--- Dependencies: 1102 6
--- Name: geometrytype(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geometrytype(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_getTYPE';
-
-
-ALTER FUNCTION public.geometrytype(geometry) OWNER TO postgres;
-
---
--- TOC entry 225 (class 1255 OID 18578)
--- Dependencies: 6 1102
--- Name: geomfromewkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geomfromewkb(bytea) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOMFromWKB';
-
-
-ALTER FUNCTION public.geomfromewkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 226 (class 1255 OID 18579)
--- Dependencies: 6 1102
--- Name: geomfromewkt(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geomfromewkt(text) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'parse_WKT_lwgeom';
-
-
-ALTER FUNCTION public.geomfromewkt(text) OWNER TO postgres;
-
---
--- TOC entry 227 (class 1255 OID 18580)
--- Dependencies: 6 1102
--- Name: geomfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geomfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT geometryfromtext($1)$_$;
-
-
-ALTER FUNCTION public.geomfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 228 (class 1255 OID 18581)
--- Dependencies: 6 1102
--- Name: geomfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geomfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT geometryfromtext($1, $2)$_$;
-
-
-ALTER FUNCTION public.geomfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 229 (class 1255 OID 18582)
--- Dependencies: 6 1102
--- Name: geomfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geomfromwkb(bytea) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_from_WKB';
-
-
-ALTER FUNCTION public.geomfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 230 (class 1255 OID 18583)
--- Dependencies: 6 1102
--- Name: geomfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geomfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT setSRID(GeomFromWKB($1), $2)$_$;
-
-
-ALTER FUNCTION public.geomfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 231 (class 1255 OID 18584)
--- Dependencies: 1102 6 1102 1102
--- Name: geomunion(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION geomunion(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geomunion';
-
-
-ALTER FUNCTION public.geomunion(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 232 (class 1255 OID 18585)
--- Dependencies: 6 1168
--- Name: get_proj4_from_srid(integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION get_proj4_from_srid(integer) RETURNS text
-    LANGUAGE plpgsql IMMUTABLE STRICT
-    AS $_$
-BEGIN
-	RETURN proj4text::text FROM spatial_ref_sys WHERE srid= $1;
-END;
-$_$;
-
-
-ALTER FUNCTION public.get_proj4_from_srid(integer) OWNER TO postgres;
-
---
--- TOC entry 233 (class 1255 OID 18586)
--- Dependencies: 1087 6 1102
--- Name: getbbox(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION getbbox(geometry) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_to_BOX2DFLOAT4';
-
-
-ALTER FUNCTION public.getbbox(geometry) OWNER TO postgres;
-
---
--- TOC entry 234 (class 1255 OID 18587)
--- Dependencies: 1102 6
--- Name: getsrid(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION getsrid(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_getSRID';
-
-
-ALTER FUNCTION public.getsrid(geometry) OWNER TO postgres;
-
---
--- TOC entry 235 (class 1255 OID 18588)
--- Dependencies: 6
--- Name: gettransactionid(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION gettransactionid() RETURNS xid
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'getTransactionID';
-
-
-ALTER FUNCTION public.gettransactionid() OWNER TO postgres;
-
---
--- TOC entry 236 (class 1255 OID 18589)
--- Dependencies: 1102 6
--- Name: hasbbox(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION hasbbox(geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_hasBBOX';
-
-
-ALTER FUNCTION public.hasbbox(geometry) OWNER TO postgres;
-
---
--- TOC entry 237 (class 1255 OID 18590)
--- Dependencies: 6 1096
--- Name: height(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION height(chip) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_getHeight';
-
-
-ALTER FUNCTION public.height(chip) OWNER TO postgres;
-
---
--- TOC entry 238 (class 1255 OID 18591)
--- Dependencies: 1102 1102 6
--- Name: interiorringn(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION interiorringn(geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_interiorringn_polygon';
-
-
-ALTER FUNCTION public.interiorringn(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 239 (class 1255 OID 18592)
--- Dependencies: 1102 6 1102 1102
--- Name: intersection(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION intersection(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'intersection';
-
-
-ALTER FUNCTION public.intersection(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 240 (class 1255 OID 18593)
--- Dependencies: 1102 6 1102
--- Name: intersects(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION intersects(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'intersects';
-
-
-ALTER FUNCTION public.intersects(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 241 (class 1255 OID 18594)
--- Dependencies: 6 1102
--- Name: isclosed(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION isclosed(geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_isclosed_linestring';
-
-
-ALTER FUNCTION public.isclosed(geometry) OWNER TO postgres;
-
---
--- TOC entry 242 (class 1255 OID 18595)
--- Dependencies: 6 1102
--- Name: isempty(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION isempty(geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_isempty';
-
-
-ALTER FUNCTION public.isempty(geometry) OWNER TO postgres;
-
---
--- TOC entry 243 (class 1255 OID 18596)
--- Dependencies: 1102 6
--- Name: isring(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION isring(geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'isring';
-
-
-ALTER FUNCTION public.isring(geometry) OWNER TO postgres;
-
---
--- TOC entry 244 (class 1255 OID 18597)
--- Dependencies: 6 1102
--- Name: issimple(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION issimple(geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'issimple';
-
-
-ALTER FUNCTION public.issimple(geometry) OWNER TO postgres;
-
---
--- TOC entry 245 (class 1255 OID 18598)
--- Dependencies: 6 1102
--- Name: isvalid(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION isvalid(geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'isvalid';
-
-
-ALTER FUNCTION public.isvalid(geometry) OWNER TO postgres;
-
---
--- TOC entry 246 (class 1255 OID 18599)
--- Dependencies: 1102 6
--- Name: length(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION length(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_length_linestring';
-
-
-ALTER FUNCTION public.length(geometry) OWNER TO postgres;
-
---
--- TOC entry 247 (class 1255 OID 18600)
--- Dependencies: 6 1102
--- Name: length2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION length2d(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_length2d_linestring';
-
-
-ALTER FUNCTION public.length2d(geometry) OWNER TO postgres;
-
---
--- TOC entry 248 (class 1255 OID 18601)
--- Dependencies: 1102 6 1113
--- Name: length2d_spheroid(geometry, spheroid); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION length2d_spheroid(geometry, spheroid) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'LWGEOM_length2d_ellipsoid';
-
-
-ALTER FUNCTION public.length2d_spheroid(geometry, spheroid) OWNER TO postgres;
-
---
--- TOC entry 249 (class 1255 OID 18602)
--- Dependencies: 1102 6
--- Name: length3d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION length3d(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_length_linestring';
-
-
-ALTER FUNCTION public.length3d(geometry) OWNER TO postgres;
-
---
--- TOC entry 250 (class 1255 OID 18603)
--- Dependencies: 6 1102 1113
--- Name: length3d_spheroid(geometry, spheroid); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION length3d_spheroid(geometry, spheroid) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_length_ellipsoid_linestring';
-
-
-ALTER FUNCTION public.length3d_spheroid(geometry, spheroid) OWNER TO postgres;
-
---
--- TOC entry 251 (class 1255 OID 18604)
--- Dependencies: 1113 6 1102
--- Name: length_spheroid(geometry, spheroid); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION length_spheroid(geometry, spheroid) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'LWGEOM_length_ellipsoid_linestring';
-
-
-ALTER FUNCTION public.length_spheroid(geometry, spheroid) OWNER TO postgres;
-
---
--- TOC entry 252 (class 1255 OID 18605)
--- Dependencies: 6 1102 1102
--- Name: line_interpolate_point(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION line_interpolate_point(geometry, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_line_interpolate_point';
-
-
-ALTER FUNCTION public.line_interpolate_point(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 253 (class 1255 OID 18606)
--- Dependencies: 6 1102 1102
--- Name: line_locate_point(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION line_locate_point(geometry, geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_line_locate_point';
-
-
-ALTER FUNCTION public.line_locate_point(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 254 (class 1255 OID 18607)
--- Dependencies: 6 1102 1102
--- Name: line_substring(geometry, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION line_substring(geometry, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_line_substring';
-
-
-ALTER FUNCTION public.line_substring(geometry, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 255 (class 1255 OID 18608)
--- Dependencies: 6 1102 1102
--- Name: linefrommultipoint(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION linefrommultipoint(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_line_from_mpoint';
-
-
-ALTER FUNCTION public.linefrommultipoint(geometry) OWNER TO postgres;
-
---
--- TOC entry 256 (class 1255 OID 18609)
--- Dependencies: 6 1102
--- Name: linefromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION linefromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromText($1)) = 'LINESTRING'
-	THEN GeomFromText($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.linefromtext(text) OWNER TO postgres;
-
---
--- TOC entry 257 (class 1255 OID 18610)
--- Dependencies: 6 1102
--- Name: linefromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION linefromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = 'LINESTRING'
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.linefromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 259 (class 1255 OID 18612)
--- Dependencies: 6 1102
--- Name: linefromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION linefromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'LINESTRING'
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.linefromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 258 (class 1255 OID 18611)
--- Dependencies: 6 1102
--- Name: linefromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION linefromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'LINESTRING'
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.linefromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 260 (class 1255 OID 18613)
--- Dependencies: 6 1102 1102
--- Name: linemerge(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION linemerge(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'linemerge';
-
-
-ALTER FUNCTION public.linemerge(geometry) OWNER TO postgres;
-
---
--- TOC entry 261 (class 1255 OID 18614)
--- Dependencies: 6 1102
--- Name: linestringfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION linestringfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT LineFromText($1)$_$;
-
-
-ALTER FUNCTION public.linestringfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 262 (class 1255 OID 18615)
--- Dependencies: 6 1102
--- Name: linestringfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION linestringfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT LineFromText($1, $2)$_$;
-
-
-ALTER FUNCTION public.linestringfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 264 (class 1255 OID 18617)
--- Dependencies: 6 1102
--- Name: linestringfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION linestringfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'LINESTRING'
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.linestringfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 263 (class 1255 OID 18616)
--- Dependencies: 6 1102
--- Name: linestringfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION linestringfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'LINESTRING'
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.linestringfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 265 (class 1255 OID 18618)
--- Dependencies: 6 1102 1102
--- Name: locate_along_measure(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION locate_along_measure(geometry, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT locate_between_measures($1, $2, $2) $_$;
-
-
-ALTER FUNCTION public.locate_along_measure(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 266 (class 1255 OID 18619)
--- Dependencies: 1102 1102 6
--- Name: locate_between_measures(geometry, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION locate_between_measures(geometry, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_locate_between_m';
-
-
-ALTER FUNCTION public.locate_between_measures(geometry, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 269 (class 1255 OID 18622)
--- Dependencies: 6
--- Name: lockrow(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION lockrow(text, text, text) RETURNS integer
-    LANGUAGE sql STRICT
-    AS $_$ SELECT LockRow(current_schema(), $1, $2, $3, now()::timestamp+'1:00'); $_$;
-
-
-ALTER FUNCTION public.lockrow(text, text, text) OWNER TO postgres;
-
---
--- TOC entry 268 (class 1255 OID 18621)
--- Dependencies: 6
--- Name: lockrow(text, text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION lockrow(text, text, text, text) RETURNS integer
-    LANGUAGE sql STRICT
-    AS $_$ SELECT LockRow($1, $2, $3, $4, now()::timestamp+'1:00'); $_$;
-
-
-ALTER FUNCTION public.lockrow(text, text, text, text) OWNER TO postgres;
-
---
--- TOC entry 270 (class 1255 OID 18623)
--- Dependencies: 6
--- Name: lockrow(text, text, text, timestamp without time zone); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION lockrow(text, text, text, timestamp without time zone) RETURNS integer
-    LANGUAGE sql STRICT
-    AS $_$ SELECT LockRow(current_schema(), $1, $2, $3, $4); $_$;
-
-
-ALTER FUNCTION public.lockrow(text, text, text, timestamp without time zone) OWNER TO postgres;
-
---
--- TOC entry 267 (class 1255 OID 18620)
--- Dependencies: 6 1168
--- Name: lockrow(text, text, text, text, timestamp without time zone); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION lockrow(text, text, text, text, timestamp without time zone) RETURNS integer
-    LANGUAGE plpgsql STRICT
-    AS $_$ 
-DECLARE
-	myschema alias for $1;
-	mytable alias for $2;
-	myrid   alias for $3;
-	authid alias for $4;
-	expires alias for $5;
-	ret int;
-	mytoid oid;
-	myrec RECORD;
-	
-BEGIN
-
-	IF NOT LongTransactionsEnabled() THEN
-		RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.';
-	END IF;
-
-	EXECUTE 'DELETE FROM authorization_table WHERE expires < now()'; 
-
-	SELECT c.oid INTO mytoid FROM pg_class c, pg_namespace n
-		WHERE c.relname = mytable
-		AND c.relnamespace = n.oid
-		AND n.nspname = myschema;
-
-	-- RAISE NOTICE 'toid: %', mytoid;
-
-	FOR myrec IN SELECT * FROM authorization_table WHERE 
-		toid = mytoid AND rid = myrid
-	LOOP
-		IF myrec.authid != authid THEN
-			RETURN 0;
-		ELSE
-			RETURN 1;
-		END IF;
-	END LOOP;
-
-	EXECUTE 'INSERT INTO authorization_table VALUES ('||
-		quote_literal(mytoid::text)||','||quote_literal(myrid)||
-		','||quote_literal(expires::text)||
-		','||quote_literal(authid) ||')';
-
-	GET DIAGNOSTICS ret = ROW_COUNT;
-
-	RETURN ret;
-END;
-$_$;
-
-
-ALTER FUNCTION public.lockrow(text, text, text, text, timestamp without time zone) OWNER TO postgres;
-
---
--- TOC entry 271 (class 1255 OID 18624)
--- Dependencies: 1168 6
--- Name: longtransactionsenabled(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION longtransactionsenabled() RETURNS boolean
-    LANGUAGE plpgsql
-    AS $$ 
-DECLARE
-	rec RECORD;
-BEGIN
-	FOR rec IN SELECT oid FROM pg_class WHERE relname = 'authorized_tables'
-	LOOP
-		return 't';
-	END LOOP;
-	return 'f';
-END;
-$$;
-
-
-ALTER FUNCTION public.longtransactionsenabled() OWNER TO postgres;
-
---
--- TOC entry 272 (class 1255 OID 18625)
--- Dependencies: 6
--- Name: lwgeom_gist_compress(internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION lwgeom_gist_compress(internal) RETURNS internal
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'LWGEOM_gist_compress';
-
-
-ALTER FUNCTION public.lwgeom_gist_compress(internal) OWNER TO postgres;
-
---
--- TOC entry 273 (class 1255 OID 18626)
--- Dependencies: 6 1102
--- Name: lwgeom_gist_consistent(internal, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION lwgeom_gist_consistent(internal, geometry, integer) RETURNS boolean
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'LWGEOM_gist_consistent';
-
-
-ALTER FUNCTION public.lwgeom_gist_consistent(internal, geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 274 (class 1255 OID 18627)
--- Dependencies: 6
--- Name: lwgeom_gist_decompress(internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION lwgeom_gist_decompress(internal) RETURNS internal
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'LWGEOM_gist_decompress';
-
-
-ALTER FUNCTION public.lwgeom_gist_decompress(internal) OWNER TO postgres;
-
---
--- TOC entry 275 (class 1255 OID 18628)
--- Dependencies: 6
--- Name: lwgeom_gist_penalty(internal, internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION lwgeom_gist_penalty(internal, internal, internal) RETURNS internal
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'LWGEOM_gist_penalty';
-
-
-ALTER FUNCTION public.lwgeom_gist_penalty(internal, internal, internal) OWNER TO postgres;
-
---
--- TOC entry 276 (class 1255 OID 18629)
--- Dependencies: 6
--- Name: lwgeom_gist_picksplit(internal, internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION lwgeom_gist_picksplit(internal, internal) RETURNS internal
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'LWGEOM_gist_picksplit';
-
-
-ALTER FUNCTION public.lwgeom_gist_picksplit(internal, internal) OWNER TO postgres;
-
---
--- TOC entry 277 (class 1255 OID 18630)
--- Dependencies: 6 1087 1087
--- Name: lwgeom_gist_same(box2d, box2d, internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION lwgeom_gist_same(box2d, box2d, internal) RETURNS internal
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'LWGEOM_gist_same';
-
-
-ALTER FUNCTION public.lwgeom_gist_same(box2d, box2d, internal) OWNER TO postgres;
-
---
--- TOC entry 278 (class 1255 OID 18631)
--- Dependencies: 6
--- Name: lwgeom_gist_union(bytea, internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION lwgeom_gist_union(bytea, internal) RETURNS internal
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'LWGEOM_gist_union';
-
-
-ALTER FUNCTION public.lwgeom_gist_union(bytea, internal) OWNER TO postgres;
-
---
--- TOC entry 279 (class 1255 OID 18632)
--- Dependencies: 6 1102
--- Name: m(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION m(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_m_point';
-
-
-ALTER FUNCTION public.m(geometry) OWNER TO postgres;
-
---
--- TOC entry 280 (class 1255 OID 18633)
--- Dependencies: 1102 6 1087 1102
--- Name: makebox2d(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION makebox2d(geometry, geometry) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_construct';
-
-
-ALTER FUNCTION public.makebox2d(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 281 (class 1255 OID 18634)
--- Dependencies: 1090 6 1102 1102
--- Name: makebox3d(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION makebox3d(geometry, geometry) RETURNS box3d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_construct';
-
-
-ALTER FUNCTION public.makebox3d(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 282 (class 1255 OID 18635)
--- Dependencies: 6 1102 1102 1102
--- Name: makeline(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION makeline(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makeline';
-
-
-ALTER FUNCTION public.makeline(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 283 (class 1255 OID 18636)
--- Dependencies: 6 1102 1104
--- Name: makeline_garray(geometry[]); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION makeline_garray(geometry[]) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makeline_garray';
-
-
-ALTER FUNCTION public.makeline_garray(geometry[]) OWNER TO postgres;
-
---
--- TOC entry 284 (class 1255 OID 18637)
--- Dependencies: 6 1102
--- Name: makepoint(double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION makepoint(double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makepoint';
-
-
-ALTER FUNCTION public.makepoint(double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 285 (class 1255 OID 18638)
--- Dependencies: 6 1102
--- Name: makepoint(double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION makepoint(double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makepoint';
-
-
-ALTER FUNCTION public.makepoint(double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 286 (class 1255 OID 18639)
--- Dependencies: 6 1102
--- Name: makepoint(double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION makepoint(double precision, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makepoint';
-
-
-ALTER FUNCTION public.makepoint(double precision, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 287 (class 1255 OID 18640)
--- Dependencies: 6 1102
--- Name: makepointm(double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION makepointm(double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makepoint3dm';
-
-
-ALTER FUNCTION public.makepointm(double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 289 (class 1255 OID 18642)
--- Dependencies: 6 1102 1102
--- Name: makepolygon(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION makepolygon(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makepoly';
-
-
-ALTER FUNCTION public.makepolygon(geometry) OWNER TO postgres;
-
---
--- TOC entry 288 (class 1255 OID 18641)
--- Dependencies: 1104 6 1102 1102
--- Name: makepolygon(geometry, geometry[]); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION makepolygon(geometry, geometry[]) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makepoly';
-
-
-ALTER FUNCTION public.makepolygon(geometry, geometry[]) OWNER TO postgres;
-
---
--- TOC entry 290 (class 1255 OID 18643)
--- Dependencies: 1102 1102 6
--- Name: max_distance(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION max_distance(geometry, geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_maxdistance2d_linestring';
-
-
-ALTER FUNCTION public.max_distance(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 291 (class 1255 OID 18644)
--- Dependencies: 6 1102
--- Name: mem_size(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION mem_size(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_mem_size';
-
-
-ALTER FUNCTION public.mem_size(geometry) OWNER TO postgres;
-
---
--- TOC entry 293 (class 1255 OID 18646)
--- Dependencies: 6 1102
--- Name: mlinefromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION mlinefromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromText($1)) = 'MULTILINESTRING'
-	THEN GeomFromText($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.mlinefromtext(text) OWNER TO postgres;
-
---
--- TOC entry 292 (class 1255 OID 18645)
--- Dependencies: 6 1102
--- Name: mlinefromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION mlinefromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE
-	WHEN geometrytype(GeomFromText($1, $2)) = 'MULTILINESTRING'
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.mlinefromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 295 (class 1255 OID 18648)
--- Dependencies: 6 1102
--- Name: mlinefromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION mlinefromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'MULTILINESTRING'
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.mlinefromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 294 (class 1255 OID 18647)
--- Dependencies: 1102 6
--- Name: mlinefromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION mlinefromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'MULTILINESTRING'
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.mlinefromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 297 (class 1255 OID 18650)
--- Dependencies: 6 1102
--- Name: mpointfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION mpointfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromText($1)) = 'MULTIPOINT'
-	THEN GeomFromText($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.mpointfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 296 (class 1255 OID 18649)
--- Dependencies: 6 1102
--- Name: mpointfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION mpointfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromText($1,$2)) = 'MULTIPOINT'
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.mpointfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 299 (class 1255 OID 18652)
--- Dependencies: 6 1102
--- Name: mpointfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION mpointfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'MULTIPOINT'
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.mpointfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 298 (class 1255 OID 18651)
--- Dependencies: 6 1102
--- Name: mpointfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION mpointfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1,$2)) = 'MULTIPOINT'
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.mpointfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 301 (class 1255 OID 18654)
--- Dependencies: 6 1102
--- Name: mpolyfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION mpolyfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromText($1)) = 'MULTIPOLYGON'
-	THEN GeomFromText($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.mpolyfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 300 (class 1255 OID 18653)
--- Dependencies: 1102 6
--- Name: mpolyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION mpolyfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = 'MULTIPOLYGON'
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.mpolyfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 303 (class 1255 OID 18656)
--- Dependencies: 1102 6
--- Name: mpolyfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION mpolyfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'MULTIPOLYGON'
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.mpolyfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 302 (class 1255 OID 18655)
--- Dependencies: 1102 6
--- Name: mpolyfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION mpolyfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'MULTIPOLYGON'
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.mpolyfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 304 (class 1255 OID 18657)
--- Dependencies: 1102 6 1102
--- Name: multi(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION multi(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_force_multi';
-
-
-ALTER FUNCTION public.multi(geometry) OWNER TO postgres;
-
---
--- TOC entry 306 (class 1255 OID 18659)
--- Dependencies: 1102 6
--- Name: multilinefromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION multilinefromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'MULTILINESTRING'
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.multilinefromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 305 (class 1255 OID 18658)
--- Dependencies: 1102 6
--- Name: multilinefromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION multilinefromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'MULTILINESTRING'
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.multilinefromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 307 (class 1255 OID 18660)
--- Dependencies: 1102 6
--- Name: multilinestringfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION multilinestringfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT ST_MLineFromText($1)$_$;
-
-
-ALTER FUNCTION public.multilinestringfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 308 (class 1255 OID 18661)
--- Dependencies: 1102 6
--- Name: multilinestringfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION multilinestringfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT MLineFromText($1, $2)$_$;
-
-
-ALTER FUNCTION public.multilinestringfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 310 (class 1255 OID 18663)
--- Dependencies: 1102 6
--- Name: multipointfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION multipointfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT MPointFromText($1)$_$;
-
-
-ALTER FUNCTION public.multipointfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 309 (class 1255 OID 18662)
--- Dependencies: 1102 6
--- Name: multipointfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION multipointfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT MPointFromText($1, $2)$_$;
-
-
-ALTER FUNCTION public.multipointfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 312 (class 1255 OID 18665)
--- Dependencies: 1102 6
--- Name: multipointfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION multipointfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'MULTIPOINT'
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.multipointfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 311 (class 1255 OID 18664)
--- Dependencies: 6 1102
--- Name: multipointfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION multipointfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1,$2)) = 'MULTIPOINT'
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.multipointfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 314 (class 1255 OID 18667)
--- Dependencies: 6 1102
--- Name: multipolyfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION multipolyfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'MULTIPOLYGON'
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.multipolyfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 313 (class 1255 OID 18666)
--- Dependencies: 6 1102
--- Name: multipolyfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION multipolyfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'MULTIPOLYGON'
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.multipolyfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 316 (class 1255 OID 18669)
--- Dependencies: 1102 6
--- Name: multipolygonfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION multipolygonfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT MPolyFromText($1)$_$;
-
-
-ALTER FUNCTION public.multipolygonfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 315 (class 1255 OID 18668)
--- Dependencies: 6 1102
--- Name: multipolygonfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION multipolygonfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT MPolyFromText($1, $2)$_$;
-
-
-ALTER FUNCTION public.multipolygonfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 317 (class 1255 OID 18670)
--- Dependencies: 6 1102
--- Name: ndims(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION ndims(geometry) RETURNS smallint
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_ndims';
-
-
-ALTER FUNCTION public.ndims(geometry) OWNER TO postgres;
-
---
--- TOC entry 318 (class 1255 OID 18671)
--- Dependencies: 6 1102 1102
--- Name: noop(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION noop(geometry) RETURNS geometry
-    LANGUAGE c STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_noop';
-
-
-ALTER FUNCTION public.noop(geometry) OWNER TO postgres;
-
---
--- TOC entry 319 (class 1255 OID 18672)
--- Dependencies: 6 1102
--- Name: npoints(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION npoints(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_npoints';
-
-
-ALTER FUNCTION public.npoints(geometry) OWNER TO postgres;
-
---
--- TOC entry 320 (class 1255 OID 18673)
--- Dependencies: 6 1102
--- Name: nrings(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION nrings(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_nrings';
-
-
-ALTER FUNCTION public.nrings(geometry) OWNER TO postgres;
-
---
--- TOC entry 321 (class 1255 OID 18674)
--- Dependencies: 6 1102
--- Name: numgeometries(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION numgeometries(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_numgeometries_collection';
-
-
-ALTER FUNCTION public.numgeometries(geometry) OWNER TO postgres;
-
---
--- TOC entry 322 (class 1255 OID 18675)
--- Dependencies: 6 1102
--- Name: numinteriorring(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION numinteriorring(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_numinteriorrings_polygon';
-
-
-ALTER FUNCTION public.numinteriorring(geometry) OWNER TO postgres;
-
---
--- TOC entry 323 (class 1255 OID 18676)
--- Dependencies: 6 1102
--- Name: numinteriorrings(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION numinteriorrings(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_numinteriorrings_polygon';
-
-
-ALTER FUNCTION public.numinteriorrings(geometry) OWNER TO postgres;
-
---
--- TOC entry 324 (class 1255 OID 18677)
--- Dependencies: 6 1102
--- Name: numpoints(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION numpoints(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_numpoints_linestring';
-
-
-ALTER FUNCTION public.numpoints(geometry) OWNER TO postgres;
-
---
--- TOC entry 325 (class 1255 OID 18678)
--- Dependencies: 6 1102 1102
--- Name: overlaps(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION "overlaps"(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'overlaps';
-
-
-ALTER FUNCTION public."overlaps"(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 326 (class 1255 OID 18679)
--- Dependencies: 6 1102
--- Name: perimeter(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION perimeter(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_perimeter_poly';
-
-
-ALTER FUNCTION public.perimeter(geometry) OWNER TO postgres;
-
---
--- TOC entry 327 (class 1255 OID 18680)
--- Dependencies: 1102 6
--- Name: perimeter2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION perimeter2d(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_perimeter2d_poly';
-
-
-ALTER FUNCTION public.perimeter2d(geometry) OWNER TO postgres;
-
---
--- TOC entry 328 (class 1255 OID 18681)
--- Dependencies: 6 1102
--- Name: perimeter3d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION perimeter3d(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_perimeter_poly';
-
-
-ALTER FUNCTION public.perimeter3d(geometry) OWNER TO postgres;
-
---
--- TOC entry 329 (class 1255 OID 18682)
--- Dependencies: 1104 6 1110
--- Name: pgis_geometry_accum_finalfn(pgis_abs); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION pgis_geometry_accum_finalfn(pgis_abs) RETURNS geometry[]
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'pgis_geometry_accum_finalfn';
-
-
-ALTER FUNCTION public.pgis_geometry_accum_finalfn(pgis_abs) OWNER TO postgres;
-
---
--- TOC entry 330 (class 1255 OID 18683)
--- Dependencies: 1110 6 1110 1102
--- Name: pgis_geometry_accum_transfn(pgis_abs, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION pgis_geometry_accum_transfn(pgis_abs, geometry) RETURNS pgis_abs
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'pgis_geometry_accum_transfn';
-
-
-ALTER FUNCTION public.pgis_geometry_accum_transfn(pgis_abs, geometry) OWNER TO postgres;
-
---
--- TOC entry 331 (class 1255 OID 18684)
--- Dependencies: 1102 6 1110
--- Name: pgis_geometry_collect_finalfn(pgis_abs); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION pgis_geometry_collect_finalfn(pgis_abs) RETURNS geometry
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'pgis_geometry_collect_finalfn';
-
-
-ALTER FUNCTION public.pgis_geometry_collect_finalfn(pgis_abs) OWNER TO postgres;
-
---
--- TOC entry 332 (class 1255 OID 18685)
--- Dependencies: 1102 6 1110
--- Name: pgis_geometry_makeline_finalfn(pgis_abs); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION pgis_geometry_makeline_finalfn(pgis_abs) RETURNS geometry
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'pgis_geometry_makeline_finalfn';
-
-
-ALTER FUNCTION public.pgis_geometry_makeline_finalfn(pgis_abs) OWNER TO postgres;
-
---
--- TOC entry 333 (class 1255 OID 18686)
--- Dependencies: 1110 6 1102
--- Name: pgis_geometry_polygonize_finalfn(pgis_abs); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION pgis_geometry_polygonize_finalfn(pgis_abs) RETURNS geometry
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'pgis_geometry_polygonize_finalfn';
-
-
-ALTER FUNCTION public.pgis_geometry_polygonize_finalfn(pgis_abs) OWNER TO postgres;
-
---
--- TOC entry 334 (class 1255 OID 18687)
--- Dependencies: 1110 1102 6
--- Name: pgis_geometry_union_finalfn(pgis_abs); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION pgis_geometry_union_finalfn(pgis_abs) RETURNS geometry
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'pgis_geometry_union_finalfn';
-
-
-ALTER FUNCTION public.pgis_geometry_union_finalfn(pgis_abs) OWNER TO postgres;
-
---
--- TOC entry 335 (class 1255 OID 18688)
--- Dependencies: 1102 6
--- Name: point_inside_circle(geometry, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION point_inside_circle(geometry, double precision, double precision, double precision) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_inside_circle_point';
-
-
-ALTER FUNCTION public.point_inside_circle(geometry, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 336 (class 1255 OID 18689)
--- Dependencies: 6 1102
--- Name: pointfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION pointfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromText($1)) = 'POINT'
-	THEN GeomFromText($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.pointfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 337 (class 1255 OID 18690)
--- Dependencies: 6 1102
--- Name: pointfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION pointfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = 'POINT'
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.pointfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 339 (class 1255 OID 18692)
--- Dependencies: 6 1102
--- Name: pointfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION pointfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'POINT'
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.pointfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 338 (class 1255 OID 18691)
--- Dependencies: 1102 6
--- Name: pointfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION pointfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'POINT'
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.pointfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 340 (class 1255 OID 18693)
--- Dependencies: 6 1102 1102
--- Name: pointn(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION pointn(geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_pointn_linestring';
-
-
-ALTER FUNCTION public.pointn(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 341 (class 1255 OID 18694)
--- Dependencies: 6 1102 1102
--- Name: pointonsurface(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION pointonsurface(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'pointonsurface';
-
-
-ALTER FUNCTION public.pointonsurface(geometry) OWNER TO postgres;
-
---
--- TOC entry 342 (class 1255 OID 18695)
--- Dependencies: 6 1102
--- Name: polyfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION polyfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromText($1)) = 'POLYGON'
-	THEN GeomFromText($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.polyfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 343 (class 1255 OID 18696)
--- Dependencies: 6 1102
--- Name: polyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION polyfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = 'POLYGON'
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.polyfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 345 (class 1255 OID 18698)
--- Dependencies: 6 1102
--- Name: polyfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION polyfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'POLYGON'
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.polyfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 344 (class 1255 OID 18697)
--- Dependencies: 1102 6
--- Name: polyfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION polyfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'POLYGON'
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.polyfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 347 (class 1255 OID 18700)
--- Dependencies: 6 1102
--- Name: polygonfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION polygonfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT PolyFromText($1)$_$;
-
-
-ALTER FUNCTION public.polygonfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 346 (class 1255 OID 18699)
--- Dependencies: 6 1102
--- Name: polygonfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION polygonfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT PolyFromText($1, $2)$_$;
-
-
-ALTER FUNCTION public.polygonfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 349 (class 1255 OID 18702)
--- Dependencies: 1102 6
--- Name: polygonfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION polygonfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'POLYGON'
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.polygonfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 348 (class 1255 OID 18701)
--- Dependencies: 6 1102
--- Name: polygonfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION polygonfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1,$2)) = 'POLYGON'
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.polygonfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 350 (class 1255 OID 18703)
--- Dependencies: 6 1102 1104
--- Name: polygonize_garray(geometry[]); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION polygonize_garray(geometry[]) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'polygonize_garray';
-
-
-ALTER FUNCTION public.polygonize_garray(geometry[]) OWNER TO postgres;
-
---
--- TOC entry 351 (class 1255 OID 18704)
--- Dependencies: 6 1168
--- Name: populate_geometry_columns(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION populate_geometry_columns() RETURNS text
-    LANGUAGE plpgsql
-    AS $$
-DECLARE
-	inserted    integer;
-	oldcount    integer;
-	probed      integer;
-	stale       integer;
-	gcs         RECORD;
-	gc          RECORD;
-	gsrid       integer;
-	gndims      integer;
-	gtype       text;
-	query       text;
-	gc_is_valid boolean;
-
-BEGIN
-	SELECT count(*) INTO oldcount FROM geometry_columns;
-	inserted := 0;
-
-	EXECUTE 'TRUNCATE geometry_columns';
-
-	-- Count the number of geometry columns in all tables and views
-	SELECT count(DISTINCT c.oid) INTO probed
-	FROM pg_class c,
-		 pg_attribute a,
-		 pg_type t,
-		 pg_namespace n
-	WHERE (c.relkind = 'r' OR c.relkind = 'v')
-	AND t.typname = 'geometry'
-	AND a.attisdropped = false
-	AND a.atttypid = t.oid
-	AND a.attrelid = c.oid
-	AND c.relnamespace = n.oid
-	AND n.nspname NOT ILIKE 'pg_temp%';
-
-	-- Iterate through all non-dropped geometry columns
-	RAISE DEBUG 'Processing Tables.....';
-
-	FOR gcs IN
-	SELECT DISTINCT ON (c.oid) c.oid, n.nspname, c.relname
-		FROM pg_class c,
-			 pg_attribute a,
-			 pg_type t,
-			 pg_namespace n
-		WHERE c.relkind = 'r'
-		AND t.typname = 'geometry'
-		AND a.attisdropped = false
-		AND a.atttypid = t.oid
-		AND a.attrelid = c.oid
-		AND c.relnamespace = n.oid
-		AND n.nspname NOT ILIKE 'pg_temp%'
-	LOOP
-
-	inserted := inserted + populate_geometry_columns(gcs.oid);
-	END LOOP;
-
-	-- Add views to geometry columns table
-	RAISE DEBUG 'Processing Views.....';
-	FOR gcs IN
-	SELECT DISTINCT ON (c.oid) c.oid, n.nspname, c.relname
-		FROM pg_class c,
-			 pg_attribute a,
-			 pg_type t,
-			 pg_namespace n
-		WHERE c.relkind = 'v'
-		AND t.typname = 'geometry'
-		AND a.attisdropped = false
-		AND a.atttypid = t.oid
-		AND a.attrelid = c.oid
-		AND c.relnamespace = n.oid
-	LOOP
-
-	inserted := inserted + populate_geometry_columns(gcs.oid);
-	END LOOP;
-
-	IF oldcount > inserted THEN
-	stale = oldcount-inserted;
-	ELSE
-	stale = 0;
-	END IF;
-
-	RETURN 'probed:' ||probed|| ' inserted:'||inserted|| ' conflicts:'||probed-inserted|| ' deleted:'||stale;
-END
-
-$$;
-
-
-ALTER FUNCTION public.populate_geometry_columns() OWNER TO postgres;
-
---
--- TOC entry 352 (class 1255 OID 18705)
--- Dependencies: 6 1168
--- Name: populate_geometry_columns(oid); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION populate_geometry_columns(tbl_oid oid) RETURNS integer
-    LANGUAGE plpgsql
-    AS $$
-DECLARE
-	gcs         RECORD;
-	gc          RECORD;
-	gsrid       integer;
-	gndims      integer;
-	gtype       text;
-	query       text;
-	gc_is_valid boolean;
-	inserted    integer;
-
-BEGIN
-	inserted := 0;
-
-	-- Iterate through all geometry columns in this table
-	FOR gcs IN
-	SELECT n.nspname, c.relname, a.attname
-		FROM pg_class c,
-			 pg_attribute a,
-			 pg_type t,
-			 pg_namespace n
-		WHERE c.relkind = 'r'
-		AND t.typname = 'geometry'
-		AND a.attisdropped = false
-		AND a.atttypid = t.oid
-		AND a.attrelid = c.oid
-		AND c.relnamespace = n.oid
-		AND n.nspname NOT ILIKE 'pg_temp%'
-		AND c.oid = tbl_oid
-	LOOP
-
-	RAISE DEBUG 'Processing table %.%.%', gcs.nspname, gcs.relname, gcs.attname;
-
-	DELETE FROM geometry_columns
-	  WHERE f_table_schema = quote_ident(gcs.nspname)
-	  AND f_table_name = quote_ident(gcs.relname)
-	  AND f_geometry_column = quote_ident(gcs.attname);
-
-	gc_is_valid := true;
-
-	-- Try to find srid check from system tables (pg_constraint)
-	gsrid :=
-		(SELECT replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', '')
-		 FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s
-		 WHERE n.nspname = gcs.nspname
-		 AND c.relname = gcs.relname
-		 AND a.attname = gcs.attname
-		 AND a.attrelid = c.oid
-		 AND s.connamespace = n.oid
-		 AND s.conrelid = c.oid
-		 AND a.attnum = ANY (s.conkey)
-		 AND s.consrc LIKE '%srid(% = %');
-	IF (gsrid IS NULL) THEN
-		-- Try to find srid from the geometry itself
-		EXECUTE 'SELECT srid(' || quote_ident(gcs.attname) || ')
-				 FROM ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-				 WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1'
-			INTO gc;
-		gsrid := gc.srid;
-
-		-- Try to apply srid check to column
-		IF (gsrid IS NOT NULL) THEN
-			BEGIN
-				EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-						 ADD CONSTRAINT ' || quote_ident('enforce_srid_' || gcs.attname) || '
-						 CHECK (srid(' || quote_ident(gcs.attname) || ') = ' || gsrid || ')';
-			EXCEPTION
-				WHEN check_violation THEN
-					RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not apply constraint CHECK (srid(%) = %)', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname), quote_ident(gcs.attname), gsrid;
-					gc_is_valid := false;
-			END;
-		END IF;
-	END IF;
-
-	-- Try to find ndims check from system tables (pg_constraint)
-	gndims :=
-		(SELECT replace(split_part(s.consrc, ' = ', 2), ')', '')
-		 FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s
-		 WHERE n.nspname = gcs.nspname
-		 AND c.relname = gcs.relname
-		 AND a.attname = gcs.attname
-		 AND a.attrelid = c.oid
-		 AND s.connamespace = n.oid
-		 AND s.conrelid = c.oid
-		 AND a.attnum = ANY (s.conkey)
-		 AND s.consrc LIKE '%ndims(% = %');
-	IF (gndims IS NULL) THEN
-		-- Try to find ndims from the geometry itself
-		EXECUTE 'SELECT ndims(' || quote_ident(gcs.attname) || ')
-				 FROM ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-				 WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1'
-			INTO gc;
-		gndims := gc.ndims;
-
-		-- Try to apply ndims check to column
-		IF (gndims IS NOT NULL) THEN
-			BEGIN
-				EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-						 ADD CONSTRAINT ' || quote_ident('enforce_dims_' || gcs.attname) || '
-						 CHECK (ndims(' || quote_ident(gcs.attname) || ') = '||gndims||')';
-			EXCEPTION
-				WHEN check_violation THEN
-					RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not apply constraint CHECK (ndims(%) = %)', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname), quote_ident(gcs.attname), gndims;
-					gc_is_valid := false;
-			END;
-		END IF;
-	END IF;
-
-	-- Try to find geotype check from system tables (pg_constraint)
-	gtype :=
-		(SELECT replace(split_part(s.consrc, '''', 2), ')', '')
-		 FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s
-		 WHERE n.nspname = gcs.nspname
-		 AND c.relname = gcs.relname
-		 AND a.attname = gcs.attname
-		 AND a.attrelid = c.oid
-		 AND s.connamespace = n.oid
-		 AND s.conrelid = c.oid
-		 AND a.attnum = ANY (s.conkey)
-		 AND s.consrc LIKE '%geometrytype(% = %');
-	IF (gtype IS NULL) THEN
-		-- Try to find geotype from the geometry itself
-		EXECUTE 'SELECT geometrytype(' || quote_ident(gcs.attname) || ')
-				 FROM ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-				 WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1'
-			INTO gc;
-		gtype := gc.geometrytype;
-		--IF (gtype IS NULL) THEN
-		--    gtype := 'GEOMETRY';
-		--END IF;
-
-		-- Try to apply geometrytype check to column
-		IF (gtype IS NOT NULL) THEN
-			BEGIN
-				EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-				ADD CONSTRAINT ' || quote_ident('enforce_geotype_' || gcs.attname) || '
-				CHECK ((geometrytype(' || quote_ident(gcs.attname) || ') = ' || quote_literal(gtype) || ') OR (' || quote_ident(gcs.attname) || ' IS NULL))';
-			EXCEPTION
-				WHEN check_violation THEN
-					-- No geometry check can be applied. This column contains a number of geometry types.
-					RAISE WARNING 'Could not add geometry type check (%) to table column: %.%.%', gtype, quote_ident(gcs.nspname),quote_ident(gcs.relname),quote_ident(gcs.attname);
-			END;
-		END IF;
-	END IF;
-
-	IF (gsrid IS NULL) THEN
-		RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine the srid', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname);
-	ELSIF (gndims IS NULL) THEN
-		RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine the number of dimensions', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname);
-	ELSIF (gtype IS NULL) THEN
-		RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine the geometry type', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname);
-	ELSE
-		-- Only insert into geometry_columns if table constraints could be applied.
-		IF (gc_is_valid) THEN
-			INSERT INTO geometry_columns (f_table_catalog,f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, type)
-			VALUES ('', gcs.nspname, gcs.relname, gcs.attname, gndims, gsrid, gtype);
-			inserted := inserted + 1;
-		END IF;
-	END IF;
-	END LOOP;
-
-	-- Add views to geometry columns table
-	FOR gcs IN
-	SELECT n.nspname, c.relname, a.attname
-		FROM pg_class c,
-			 pg_attribute a,
-			 pg_type t,
-			 pg_namespace n
-		WHERE c.relkind = 'v'
-		AND t.typname = 'geometry'
-		AND a.attisdropped = false
-		AND a.atttypid = t.oid
-		AND a.attrelid = c.oid
-		AND c.relnamespace = n.oid
-		AND n.nspname NOT ILIKE 'pg_temp%'
-		AND c.oid = tbl_oid
-	LOOP
-		RAISE DEBUG 'Processing view %.%.%', gcs.nspname, gcs.relname, gcs.attname;
-
-		EXECUTE 'SELECT ndims(' || quote_ident(gcs.attname) || ')
-				 FROM ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-				 WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1'
-			INTO gc;
-		gndims := gc.ndims;
-
-		EXECUTE 'SELECT srid(' || quote_ident(gcs.attname) || ')
-				 FROM ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-				 WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1'
-			INTO gc;
-		gsrid := gc.srid;
-
-		EXECUTE 'SELECT geometrytype(' || quote_ident(gcs.attname) || ')
-				 FROM ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-				 WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1'
-			INTO gc;
-		gtype := gc.geometrytype;
-
-		IF (gndims IS NULL) THEN
-			RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine ndims', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname);
-		ELSIF (gsrid IS NULL) THEN
-			RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine srid', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname);
-		ELSIF (gtype IS NULL) THEN
-			RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine gtype', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname);
-		ELSE
-			query := 'INSERT INTO geometry_columns (f_table_catalog,f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, type) ' ||
-					 'VALUES ('''', ' || quote_literal(gcs.nspname) || ',' || quote_literal(gcs.relname) || ',' || quote_literal(gcs.attname) || ',' || gndims || ',' || gsrid || ',' || quote_literal(gtype) || ')';
-			EXECUTE query;
-			inserted := inserted + 1;
-		END IF;
-	END LOOP;
-
-	RETURN inserted;
-END
-
-$$;
-
-
-ALTER FUNCTION public.populate_geometry_columns(tbl_oid oid) OWNER TO postgres;
-
---
--- TOC entry 353 (class 1255 OID 18707)
--- Dependencies: 6 1102 1102
--- Name: postgis_addbbox(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_addbbox(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_addBBOX';
-
-
-ALTER FUNCTION public.postgis_addbbox(geometry) OWNER TO postgres;
-
---
--- TOC entry 354 (class 1255 OID 18708)
--- Dependencies: 6
--- Name: postgis_cache_bbox(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_cache_bbox() RETURNS trigger
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'cache_bbox';
-
-
-ALTER FUNCTION public.postgis_cache_bbox() OWNER TO postgres;
-
---
--- TOC entry 355 (class 1255 OID 18709)
--- Dependencies: 1102 1102 6
--- Name: postgis_dropbbox(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_dropbbox(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_dropBBOX';
-
-
-ALTER FUNCTION public.postgis_dropbbox(geometry) OWNER TO postgres;
-
---
--- TOC entry 356 (class 1255 OID 18710)
--- Dependencies: 6 1168
--- Name: postgis_full_version(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_full_version() RETURNS text
-    LANGUAGE plpgsql IMMUTABLE
-    AS $$
-DECLARE
-	libver text;
-	projver text;
-	geosver text;
-	libxmlver text;
-	usestats bool;
-	dbproc text;
-	relproc text;
-	fullver text;
-BEGIN
-	SELECT postgis_lib_version() INTO libver;
-	SELECT postgis_proj_version() INTO projver;
-	SELECT postgis_geos_version() INTO geosver;
-	SELECT postgis_libxml_version() INTO libxmlver;
-	SELECT postgis_uses_stats() INTO usestats;
-	SELECT postgis_scripts_installed() INTO dbproc;
-	SELECT postgis_scripts_released() INTO relproc;
-
-	fullver = 'POSTGIS="' || libver || '"';
-
-	IF  geosver IS NOT NULL THEN
-		fullver = fullver || ' GEOS="' || geosver || '"';
-	END IF;
-
-	IF  projver IS NOT NULL THEN
-		fullver = fullver || ' PROJ="' || projver || '"';
-	END IF;
-
-	IF  libxmlver IS NOT NULL THEN
-		fullver = fullver || ' LIBXML="' || libxmlver || '"';
-	END IF;
-
-	IF usestats THEN
-		fullver = fullver || ' USE_STATS';
-	END IF;
-
-	-- fullver = fullver || ' DBPROC="' || dbproc || '"';
-	-- fullver = fullver || ' RELPROC="' || relproc || '"';
-
-	IF dbproc != relproc THEN
-		fullver = fullver || ' (procs from ' || dbproc || ' need upgrade)';
-	END IF;
-
-	RETURN fullver;
-END
-$$;
-
-
-ALTER FUNCTION public.postgis_full_version() OWNER TO postgres;
-
---
--- TOC entry 357 (class 1255 OID 18711)
--- Dependencies: 6
--- Name: postgis_geos_version(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_geos_version() RETURNS text
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'postgis_geos_version';
-
-
-ALTER FUNCTION public.postgis_geos_version() OWNER TO postgres;
-
---
--- TOC entry 358 (class 1255 OID 18712)
--- Dependencies: 1102 6 1087
--- Name: postgis_getbbox(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_getbbox(geometry) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_to_BOX2DFLOAT4';
-
-
-ALTER FUNCTION public.postgis_getbbox(geometry) OWNER TO postgres;
-
---
--- TOC entry 359 (class 1255 OID 18713)
--- Dependencies: 6
--- Name: postgis_gist_joinsel(internal, oid, internal, smallint); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_gist_joinsel(internal, oid, internal, smallint) RETURNS double precision
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'LWGEOM_gist_joinsel';
-
-
-ALTER FUNCTION public.postgis_gist_joinsel(internal, oid, internal, smallint) OWNER TO postgres;
-
---
--- TOC entry 360 (class 1255 OID 18714)
--- Dependencies: 6
--- Name: postgis_gist_sel(internal, oid, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_gist_sel(internal, oid, internal, integer) RETURNS double precision
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'LWGEOM_gist_sel';
-
-
-ALTER FUNCTION public.postgis_gist_sel(internal, oid, internal, integer) OWNER TO postgres;
-
---
--- TOC entry 361 (class 1255 OID 18715)
--- Dependencies: 1102 6
--- Name: postgis_hasbbox(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_hasbbox(geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_hasBBOX';
-
-
-ALTER FUNCTION public.postgis_hasbbox(geometry) OWNER TO postgres;
-
---
--- TOC entry 362 (class 1255 OID 18716)
--- Dependencies: 6
--- Name: postgis_lib_build_date(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_lib_build_date() RETURNS text
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'postgis_lib_build_date';
-
-
-ALTER FUNCTION public.postgis_lib_build_date() OWNER TO postgres;
-
---
--- TOC entry 363 (class 1255 OID 18717)
--- Dependencies: 6
--- Name: postgis_lib_version(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_lib_version() RETURNS text
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'postgis_lib_version';
-
-
-ALTER FUNCTION public.postgis_lib_version() OWNER TO postgres;
-
---
--- TOC entry 364 (class 1255 OID 18718)
--- Dependencies: 6
--- Name: postgis_libxml_version(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_libxml_version() RETURNS text
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'postgis_libxml_version';
-
-
-ALTER FUNCTION public.postgis_libxml_version() OWNER TO postgres;
-
---
--- TOC entry 365 (class 1255 OID 18719)
--- Dependencies: 1102 6 1102
--- Name: postgis_noop(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_noop(geometry) RETURNS geometry
-    LANGUAGE c STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_noop';
-
-
-ALTER FUNCTION public.postgis_noop(geometry) OWNER TO postgres;
-
---
--- TOC entry 366 (class 1255 OID 18720)
--- Dependencies: 6
--- Name: postgis_proj_version(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_proj_version() RETURNS text
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'postgis_proj_version';
-
-
-ALTER FUNCTION public.postgis_proj_version() OWNER TO postgres;
-
---
--- TOC entry 367 (class 1255 OID 18721)
--- Dependencies: 6
--- Name: postgis_scripts_build_date(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_scripts_build_date() RETURNS text
-    LANGUAGE sql IMMUTABLE
-    AS $$SELECT '2010-03-11 19:15:17'::text AS version$$;
-
-
-ALTER FUNCTION public.postgis_scripts_build_date() OWNER TO postgres;
-
---
--- TOC entry 368 (class 1255 OID 18722)
--- Dependencies: 6
--- Name: postgis_scripts_installed(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_scripts_installed() RETURNS text
-    LANGUAGE sql IMMUTABLE
-    AS $$SELECT '1.5 r5385'::text AS version$$;
-
-
-ALTER FUNCTION public.postgis_scripts_installed() OWNER TO postgres;
-
---
--- TOC entry 369 (class 1255 OID 18723)
--- Dependencies: 6
--- Name: postgis_scripts_released(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_scripts_released() RETURNS text
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'postgis_scripts_released';
-
-
-ALTER FUNCTION public.postgis_scripts_released() OWNER TO postgres;
-
---
--- TOC entry 370 (class 1255 OID 18724)
--- Dependencies: 1102 6 1102
--- Name: postgis_transform_geometry(geometry, text, text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_transform_geometry(geometry, text, text, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'transform_geom';
-
-
-ALTER FUNCTION public.postgis_transform_geometry(geometry, text, text, integer) OWNER TO postgres;
-
---
--- TOC entry 371 (class 1255 OID 18725)
--- Dependencies: 6
--- Name: postgis_uses_stats(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_uses_stats() RETURNS boolean
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'postgis_uses_stats';
-
-
-ALTER FUNCTION public.postgis_uses_stats() OWNER TO postgres;
-
---
--- TOC entry 372 (class 1255 OID 18726)
--- Dependencies: 6
--- Name: postgis_version(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION postgis_version() RETURNS text
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'postgis_version';
-
-
-ALTER FUNCTION public.postgis_version() OWNER TO postgres;
-
---
--- TOC entry 373 (class 1255 OID 18727)
--- Dependencies: 6 1168
--- Name: probe_geometry_columns(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION probe_geometry_columns() RETURNS text
-    LANGUAGE plpgsql
-    AS $$
-DECLARE
-	inserted integer;
-	oldcount integer;
-	probed integer;
-	stale integer;
-BEGIN
-
-	SELECT count(*) INTO oldcount FROM geometry_columns;
-
-	SELECT count(*) INTO probed
-		FROM pg_class c, pg_attribute a, pg_type t,
-			pg_namespace n,
-			pg_constraint sridcheck, pg_constraint typecheck
-
-		WHERE t.typname = 'geometry'
-		AND a.atttypid = t.oid
-		AND a.attrelid = c.oid
-		AND c.relnamespace = n.oid
-		AND sridcheck.connamespace = n.oid
-		AND typecheck.connamespace = n.oid
-		AND sridcheck.conrelid = c.oid
-		AND sridcheck.consrc LIKE '(srid('||a.attname||') = %)'
-		AND typecheck.conrelid = c.oid
-		AND typecheck.consrc LIKE
-		'((geometrytype('||a.attname||') = ''%''::text) OR (% IS NULL))'
-		;
-
-	INSERT INTO geometry_columns SELECT
-		''::varchar as f_table_catalogue,
-		n.nspname::varchar as f_table_schema,
-		c.relname::varchar as f_table_name,
-		a.attname::varchar as f_geometry_column,
-		2 as coord_dimension,
-		trim(both  ' =)' from
-			replace(replace(split_part(
-				sridcheck.consrc, ' = ', 2), ')', ''), '(', ''))::integer AS srid,
-		trim(both ' =)''' from substr(typecheck.consrc,
-			strpos(typecheck.consrc, '='),
-			strpos(typecheck.consrc, '::')-
-			strpos(typecheck.consrc, '=')
-			))::varchar as type
-		FROM pg_class c, pg_attribute a, pg_type t,
-			pg_namespace n,
-			pg_constraint sridcheck, pg_constraint typecheck
-		WHERE t.typname = 'geometry'
-		AND a.atttypid = t.oid
-		AND a.attrelid = c.oid
-		AND c.relnamespace = n.oid
-		AND sridcheck.connamespace = n.oid
-		AND typecheck.connamespace = n.oid
-		AND sridcheck.conrelid = c.oid
-		AND sridcheck.consrc LIKE '(st_srid('||a.attname||') = %)'
-		AND typecheck.conrelid = c.oid
-		AND typecheck.consrc LIKE
-		'((geometrytype('||a.attname||') = ''%''::text) OR (% IS NULL))'
-
-			AND NOT EXISTS (
-					SELECT oid FROM geometry_columns gc
-					WHERE c.relname::varchar = gc.f_table_name
-					AND n.nspname::varchar = gc.f_table_schema
-					AND a.attname::varchar = gc.f_geometry_column
-			);
-
-	GET DIAGNOSTICS inserted = ROW_COUNT;
-
-	IF oldcount > probed THEN
-		stale = oldcount-probed;
-	ELSE
-		stale = 0;
-	END IF;
-
-	RETURN 'probed:'||probed::text||
-		' inserted:'||inserted::text||
-		' conflicts:'||(probed-inserted)::text||
-		' stale:'||stale::text;
-END
-
-$$;
-
-
-ALTER FUNCTION public.probe_geometry_columns() OWNER TO postgres;
-
---
--- TOC entry 374 (class 1255 OID 18728)
--- Dependencies: 6 1102 1102
--- Name: relate(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION relate(geometry, geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'relate_full';
-
-
-ALTER FUNCTION public.relate(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 375 (class 1255 OID 18729)
--- Dependencies: 1102 6 1102
--- Name: relate(geometry, geometry, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION relate(geometry, geometry, text) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'relate_pattern';
-
-
-ALTER FUNCTION public.relate(geometry, geometry, text) OWNER TO postgres;
-
---
--- TOC entry 376 (class 1255 OID 18730)
--- Dependencies: 1102 6 1102
--- Name: removepoint(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION removepoint(geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_removepoint';
-
-
-ALTER FUNCTION public.removepoint(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 377 (class 1255 OID 18731)
--- Dependencies: 6
--- Name: rename_geometry_table_constraints(); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION rename_geometry_table_constraints() RETURNS text
-    LANGUAGE sql IMMUTABLE
-    AS $$
-SELECT 'rename_geometry_table_constraint() is obsoleted'::text
-$$;
-
-
-ALTER FUNCTION public.rename_geometry_table_constraints() OWNER TO postgres;
-
---
--- TOC entry 378 (class 1255 OID 18732)
--- Dependencies: 1102 6 1102
--- Name: reverse(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION reverse(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_reverse';
-
-
-ALTER FUNCTION public.reverse(geometry) OWNER TO postgres;
-
---
--- TOC entry 379 (class 1255 OID 18733)
--- Dependencies: 1102 6 1102
--- Name: rotate(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION rotate(geometry, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT rotateZ($1, $2)$_$;
-
-
-ALTER FUNCTION public.rotate(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 380 (class 1255 OID 18734)
--- Dependencies: 1102 6 1102
--- Name: rotatex(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION rotatex(geometry, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT affine($1, 1, 0, 0, 0, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0)$_$;
-
-
-ALTER FUNCTION public.rotatex(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 381 (class 1255 OID 18735)
--- Dependencies: 1102 6 1102
--- Name: rotatey(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION rotatey(geometry, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT affine($1,  cos($2), 0, sin($2),  0, 1, 0,  -sin($2), 0, cos($2), 0,  0, 0)$_$;
-
-
-ALTER FUNCTION public.rotatey(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 382 (class 1255 OID 18736)
--- Dependencies: 1102 6 1102
--- Name: rotatez(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION rotatez(geometry, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT affine($1,  cos($2), -sin($2), 0,  sin($2), cos($2), 0,  0, 0, 1,  0, 0, 0)$_$;
-
-
-ALTER FUNCTION public.rotatez(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 384 (class 1255 OID 18738)
--- Dependencies: 6 1102 1102
--- Name: scale(geometry, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION scale(geometry, double precision, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT scale($1, $2, $3, 1)$_$;
-
-
-ALTER FUNCTION public.scale(geometry, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 383 (class 1255 OID 18737)
--- Dependencies: 6 1102 1102
--- Name: scale(geometry, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION scale(geometry, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT affine($1,  $2, 0, 0,  0, $3, 0,  0, 0, $4,  0, 0, 0)$_$;
-
-
-ALTER FUNCTION public.scale(geometry, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 385 (class 1255 OID 18739)
--- Dependencies: 1102 6 1102
--- Name: se_envelopesintersect(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION se_envelopesintersect(geometry, geometry) RETURNS boolean
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ 
-	SELECT $1 && $2
-	$_$;
-
-
-ALTER FUNCTION public.se_envelopesintersect(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 386 (class 1255 OID 18740)
--- Dependencies: 6 1102
--- Name: se_is3d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION se_is3d(geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_hasz';
-
-
-ALTER FUNCTION public.se_is3d(geometry) OWNER TO postgres;
-
---
--- TOC entry 387 (class 1255 OID 18741)
--- Dependencies: 6 1102
--- Name: se_ismeasured(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION se_ismeasured(geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_hasm';
-
-
-ALTER FUNCTION public.se_ismeasured(geometry) OWNER TO postgres;
-
---
--- TOC entry 388 (class 1255 OID 18742)
--- Dependencies: 1102 6 1102
--- Name: se_locatealong(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION se_locatealong(geometry, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT locate_between_measures($1, $2, $2) $_$;
-
-
-ALTER FUNCTION public.se_locatealong(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 389 (class 1255 OID 18743)
--- Dependencies: 1102 6 1102
--- Name: se_locatebetween(geometry, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION se_locatebetween(geometry, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_locate_between_m';
-
-
-ALTER FUNCTION public.se_locatebetween(geometry, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 390 (class 1255 OID 18744)
--- Dependencies: 6 1102
--- Name: se_m(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION se_m(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_m_point';
-
-
-ALTER FUNCTION public.se_m(geometry) OWNER TO postgres;
-
---
--- TOC entry 391 (class 1255 OID 18745)
--- Dependencies: 6 1102
--- Name: se_z(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION se_z(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_z_point';
-
-
-ALTER FUNCTION public.se_z(geometry) OWNER TO postgres;
-
---
--- TOC entry 392 (class 1255 OID 18746)
--- Dependencies: 1102 6 1102
--- Name: segmentize(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION segmentize(geometry, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_segmentize2d';
-
-
-ALTER FUNCTION public.segmentize(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 393 (class 1255 OID 18747)
--- Dependencies: 1096 6 1096
--- Name: setfactor(chip, real); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION setfactor(chip, real) RETURNS chip
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_setFactor';
-
-
-ALTER FUNCTION public.setfactor(chip, real) OWNER TO postgres;
-
---
--- TOC entry 394 (class 1255 OID 18748)
--- Dependencies: 1102 6 1102 1102
--- Name: setpoint(geometry, integer, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION setpoint(geometry, integer, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_setpoint_linestring';
-
-
-ALTER FUNCTION public.setpoint(geometry, integer, geometry) OWNER TO postgres;
-
---
--- TOC entry 395 (class 1255 OID 18749)
--- Dependencies: 1096 6 1096
--- Name: setsrid(chip, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION setsrid(chip, integer) RETURNS chip
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_setSRID';
-
-
-ALTER FUNCTION public.setsrid(chip, integer) OWNER TO postgres;
-
---
--- TOC entry 396 (class 1255 OID 18750)
--- Dependencies: 1102 6 1102
--- Name: setsrid(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION setsrid(geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_setSRID';
-
-
-ALTER FUNCTION public.setsrid(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 397 (class 1255 OID 18751)
--- Dependencies: 6 1102 1102
--- Name: shift_longitude(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION shift_longitude(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_longitude_shift';
-
-
-ALTER FUNCTION public.shift_longitude(geometry) OWNER TO postgres;
-
---
--- TOC entry 398 (class 1255 OID 18752)
--- Dependencies: 6 1102 1102
--- Name: simplify(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION simplify(geometry, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_simplify2d';
-
-
-ALTER FUNCTION public.simplify(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 401 (class 1255 OID 18755)
--- Dependencies: 1102 6 1102
--- Name: snaptogrid(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION snaptogrid(geometry, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT SnapToGrid($1, 0, 0, $2, $2)$_$;
-
-
-ALTER FUNCTION public.snaptogrid(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 400 (class 1255 OID 18754)
--- Dependencies: 1102 6 1102
--- Name: snaptogrid(geometry, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION snaptogrid(geometry, double precision, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT SnapToGrid($1, 0, 0, $2, $3)$_$;
-
-
-ALTER FUNCTION public.snaptogrid(geometry, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 399 (class 1255 OID 18753)
--- Dependencies: 6 1102 1102
--- Name: snaptogrid(geometry, double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION snaptogrid(geometry, double precision, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_snaptogrid';
-
-
-ALTER FUNCTION public.snaptogrid(geometry, double precision, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 402 (class 1255 OID 18756)
--- Dependencies: 1102 6 1102 1102
--- Name: snaptogrid(geometry, geometry, double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION snaptogrid(geometry, geometry, double precision, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_snaptogrid_pointoff';
-
-
-ALTER FUNCTION public.snaptogrid(geometry, geometry, double precision, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 403 (class 1255 OID 18757)
--- Dependencies: 6 1096
--- Name: srid(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION srid(chip) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_getSRID';
-
-
-ALTER FUNCTION public.srid(chip) OWNER TO postgres;
-
---
--- TOC entry 404 (class 1255 OID 18758)
--- Dependencies: 6 1102
--- Name: srid(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION srid(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_getSRID';
-
-
-ALTER FUNCTION public.srid(geometry) OWNER TO postgres;
-
---
--- TOC entry 405 (class 1255 OID 18759)
--- Dependencies: 6 1102 1102
--- Name: st_addmeasure(geometry, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_addmeasure(geometry, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'ST_AddMeasure';
-
-
-ALTER FUNCTION public.st_addmeasure(geometry, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 406 (class 1255 OID 18760)
--- Dependencies: 6 1102 1102 1102
--- Name: st_addpoint(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_addpoint(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_addpoint';
-
-
-ALTER FUNCTION public.st_addpoint(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 407 (class 1255 OID 18761)
--- Dependencies: 6 1102 1102 1102
--- Name: st_addpoint(geometry, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_addpoint(geometry, geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_addpoint';
-
-
-ALTER FUNCTION public.st_addpoint(geometry, geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 409 (class 1255 OID 18763)
--- Dependencies: 6 1102 1102
--- Name: st_affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT affine($1,  $2, $3, 0,  $4, $5, 0,  0, 0, 1,  $6, $7, 0)$_$;
-
-
-ALTER FUNCTION public.st_affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 408 (class 1255 OID 18762)
--- Dependencies: 6 1102 1102
--- Name: st_affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_affine';
-
-
-ALTER FUNCTION public.st_affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 410 (class 1255 OID 18764)
--- Dependencies: 6 1102
--- Name: st_area(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_area(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_area_polygon';
-
-
-ALTER FUNCTION public.st_area(geometry) OWNER TO postgres;
-
---
--- TOC entry 412 (class 1255 OID 18766)
--- Dependencies: 6 1099
--- Name: st_area(geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_area(geography) RETURNS double precision
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT ST_Area($1, true)$_$;
-
-
-ALTER FUNCTION public.st_area(geography) OWNER TO postgres;
-
---
--- TOC entry 413 (class 1255 OID 18767)
--- Dependencies: 6
--- Name: st_area(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_area(text) RETURNS double precision
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT ST_Area($1::geometry);  $_$;
-
-
-ALTER FUNCTION public.st_area(text) OWNER TO postgres;
-
---
--- TOC entry 411 (class 1255 OID 18765)
--- Dependencies: 6 1099
--- Name: st_area(geography, boolean); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_area(geography, boolean) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'geography_area';
-
-
-ALTER FUNCTION public.st_area(geography, boolean) OWNER TO postgres;
-
---
--- TOC entry 414 (class 1255 OID 18768)
--- Dependencies: 6 1102
--- Name: st_area2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_area2d(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_area_polygon';
-
-
-ALTER FUNCTION public.st_area2d(geometry) OWNER TO postgres;
-
---
--- TOC entry 415 (class 1255 OID 18769)
--- Dependencies: 6 1102
--- Name: st_asbinary(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asbinary(geometry) RETURNS bytea
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asBinary';
-
-
-ALTER FUNCTION public.st_asbinary(geometry) OWNER TO postgres;
-
---
--- TOC entry 417 (class 1255 OID 18771)
--- Dependencies: 6 1099
--- Name: st_asbinary(geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asbinary(geography) RETURNS bytea
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_as_binary';
-
-
-ALTER FUNCTION public.st_asbinary(geography) OWNER TO postgres;
-
---
--- TOC entry 418 (class 1255 OID 18772)
--- Dependencies: 6
--- Name: st_asbinary(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asbinary(text) RETURNS bytea
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT ST_AsBinary($1::geometry);  $_$;
-
-
-ALTER FUNCTION public.st_asbinary(text) OWNER TO postgres;
-
---
--- TOC entry 416 (class 1255 OID 18770)
--- Dependencies: 6 1102
--- Name: st_asbinary(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asbinary(geometry, text) RETURNS bytea
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asBinary';
-
-
-ALTER FUNCTION public.st_asbinary(geometry, text) OWNER TO postgres;
-
---
--- TOC entry 419 (class 1255 OID 18773)
--- Dependencies: 6 1102
--- Name: st_asewkb(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asewkb(geometry) RETURNS bytea
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'WKBFromLWGEOM';
-
-
-ALTER FUNCTION public.st_asewkb(geometry) OWNER TO postgres;
-
---
--- TOC entry 420 (class 1255 OID 18774)
--- Dependencies: 6 1102
--- Name: st_asewkb(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asewkb(geometry, text) RETURNS bytea
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'WKBFromLWGEOM';
-
-
-ALTER FUNCTION public.st_asewkb(geometry, text) OWNER TO postgres;
-
---
--- TOC entry 421 (class 1255 OID 18775)
--- Dependencies: 6 1102
--- Name: st_asewkt(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asewkt(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asEWKT';
-
-
-ALTER FUNCTION public.st_asewkt(geometry) OWNER TO postgres;
-
---
--- TOC entry 423 (class 1255 OID 18777)
--- Dependencies: 6 1102
--- Name: st_asgeojson(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgeojson(geometry) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGeoJson(1, $1, 15, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgeojson(geometry) OWNER TO postgres;
-
---
--- TOC entry 429 (class 1255 OID 18783)
--- Dependencies: 6 1099
--- Name: st_asgeojson(geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgeojson(geography) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGeoJson(1, $1, 15, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgeojson(geography) OWNER TO postgres;
-
---
--- TOC entry 430 (class 1255 OID 18784)
--- Dependencies: 6
--- Name: st_asgeojson(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgeojson(text) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT ST_AsGeoJson($1::geometry);  $_$;
-
-
-ALTER FUNCTION public.st_asgeojson(text) OWNER TO postgres;
-
---
--- TOC entry 422 (class 1255 OID 18776)
--- Dependencies: 6 1102
--- Name: st_asgeojson(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgeojson(geometry, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGeoJson(1, $1, $2, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgeojson(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 424 (class 1255 OID 18778)
--- Dependencies: 6 1102
--- Name: st_asgeojson(integer, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgeojson(integer, geometry) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGeoJson($1, $2, 15, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgeojson(integer, geometry) OWNER TO postgres;
-
---
--- TOC entry 428 (class 1255 OID 18782)
--- Dependencies: 6 1099
--- Name: st_asgeojson(geography, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgeojson(geography, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGeoJson(1, $1, $2, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgeojson(geography, integer) OWNER TO postgres;
-
---
--- TOC entry 431 (class 1255 OID 18785)
--- Dependencies: 6 1099
--- Name: st_asgeojson(integer, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgeojson(integer, geography) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGeoJson($1, $2, 15, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgeojson(integer, geography) OWNER TO postgres;
-
---
--- TOC entry 425 (class 1255 OID 18779)
--- Dependencies: 6 1102
--- Name: st_asgeojson(integer, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgeojson(integer, geometry, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGeoJson($1, $2, $3, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgeojson(integer, geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 426 (class 1255 OID 18780)
--- Dependencies: 6 1102
--- Name: st_asgeojson(geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgeojson(geometry, integer, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGeoJson(1, $1, $2, $3)$_$;
-
-
-ALTER FUNCTION public.st_asgeojson(geometry, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 432 (class 1255 OID 18786)
--- Dependencies: 6 1099
--- Name: st_asgeojson(integer, geography, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgeojson(integer, geography, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGeoJson($1, $2, $3, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgeojson(integer, geography, integer) OWNER TO postgres;
-
---
--- TOC entry 433 (class 1255 OID 18787)
--- Dependencies: 6 1099
--- Name: st_asgeojson(geography, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgeojson(geography, integer, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGeoJson(1, $1, $2, $3)$_$;
-
-
-ALTER FUNCTION public.st_asgeojson(geography, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 427 (class 1255 OID 18781)
--- Dependencies: 6 1102
--- Name: st_asgeojson(integer, geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgeojson(integer, geometry, integer, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGeoJson($1, $2, $3, $4)$_$;
-
-
-ALTER FUNCTION public.st_asgeojson(integer, geometry, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 434 (class 1255 OID 18788)
--- Dependencies: 6 1099
--- Name: st_asgeojson(integer, geography, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgeojson(integer, geography, integer, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGeoJson($1, $2, $3, $4)$_$;
-
-
-ALTER FUNCTION public.st_asgeojson(integer, geography, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 436 (class 1255 OID 18790)
--- Dependencies: 6 1102
--- Name: st_asgml(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgml(geometry) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGML(2, $1, 15, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgml(geometry) OWNER TO postgres;
-
---
--- TOC entry 442 (class 1255 OID 18796)
--- Dependencies: 6 1099
--- Name: st_asgml(geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgml(geography) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGML(2, $1, 15, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgml(geography) OWNER TO postgres;
-
---
--- TOC entry 443 (class 1255 OID 18797)
--- Dependencies: 6
--- Name: st_asgml(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgml(text) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT ST_AsGML($1::geometry);  $_$;
-
-
-ALTER FUNCTION public.st_asgml(text) OWNER TO postgres;
-
---
--- TOC entry 435 (class 1255 OID 18789)
--- Dependencies: 6 1102
--- Name: st_asgml(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgml(geometry, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGML(2, $1, $2, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgml(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 437 (class 1255 OID 18791)
--- Dependencies: 6 1102
--- Name: st_asgml(integer, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgml(integer, geometry) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGML($1, $2, 15, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgml(integer, geometry) OWNER TO postgres;
-
---
--- TOC entry 441 (class 1255 OID 18795)
--- Dependencies: 6 1099
--- Name: st_asgml(geography, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgml(geography, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGML(2, $1, $2, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgml(geography, integer) OWNER TO postgres;
-
---
--- TOC entry 444 (class 1255 OID 18798)
--- Dependencies: 6 1099
--- Name: st_asgml(integer, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgml(integer, geography) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGML($1, $2, 15, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgml(integer, geography) OWNER TO postgres;
-
---
--- TOC entry 438 (class 1255 OID 18792)
--- Dependencies: 6 1102
--- Name: st_asgml(integer, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgml(integer, geometry, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGML($1, $2, $3, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgml(integer, geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 439 (class 1255 OID 18793)
--- Dependencies: 6 1102
--- Name: st_asgml(geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgml(geometry, integer, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGML(2, $1, $2, $3)$_$;
-
-
-ALTER FUNCTION public.st_asgml(geometry, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 445 (class 1255 OID 18799)
--- Dependencies: 6 1099
--- Name: st_asgml(integer, geography, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgml(integer, geography, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGML($1, $2, $3, 0)$_$;
-
-
-ALTER FUNCTION public.st_asgml(integer, geography, integer) OWNER TO postgres;
-
---
--- TOC entry 446 (class 1255 OID 18800)
--- Dependencies: 6 1099
--- Name: st_asgml(geography, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgml(geography, integer, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGML(2, $1, $2, $3)$_$;
-
-
-ALTER FUNCTION public.st_asgml(geography, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 440 (class 1255 OID 18794)
--- Dependencies: 6 1102
--- Name: st_asgml(integer, geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgml(integer, geometry, integer, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGML($1, $2, $3, $4)$_$;
-
-
-ALTER FUNCTION public.st_asgml(integer, geometry, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 447 (class 1255 OID 18801)
--- Dependencies: 6 1099
--- Name: st_asgml(integer, geography, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_asgml(integer, geography, integer, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsGML($1, $2, $3, $4)$_$;
-
-
-ALTER FUNCTION public.st_asgml(integer, geography, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 448 (class 1255 OID 18802)
--- Dependencies: 6 1102
--- Name: st_ashexewkb(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_ashexewkb(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asHEXEWKB';
-
-
-ALTER FUNCTION public.st_ashexewkb(geometry) OWNER TO postgres;
-
---
--- TOC entry 449 (class 1255 OID 18803)
--- Dependencies: 6 1102
--- Name: st_ashexewkb(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_ashexewkb(geometry, text) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asHEXEWKB';
-
-
-ALTER FUNCTION public.st_ashexewkb(geometry, text) OWNER TO postgres;
-
---
--- TOC entry 451 (class 1255 OID 18805)
--- Dependencies: 6 1102
--- Name: st_askml(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_askml(geometry) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsKML(2, ST_Transform($1,4326), 15)$_$;
-
-
-ALTER FUNCTION public.st_askml(geometry) OWNER TO postgres;
-
---
--- TOC entry 455 (class 1255 OID 18809)
--- Dependencies: 6 1099
--- Name: st_askml(geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_askml(geography) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsKML(2, $1, 15)$_$;
-
-
-ALTER FUNCTION public.st_askml(geography) OWNER TO postgres;
-
---
--- TOC entry 456 (class 1255 OID 18810)
--- Dependencies: 6
--- Name: st_askml(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_askml(text) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT ST_AsKML($1::geometry);  $_$;
-
-
-ALTER FUNCTION public.st_askml(text) OWNER TO postgres;
-
---
--- TOC entry 450 (class 1255 OID 18804)
--- Dependencies: 6 1102
--- Name: st_askml(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_askml(geometry, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsKML(2, ST_Transform($1,4326), $2)$_$;
-
-
-ALTER FUNCTION public.st_askml(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 452 (class 1255 OID 18806)
--- Dependencies: 6 1102
--- Name: st_askml(integer, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_askml(integer, geometry) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsKML($1, ST_Transform($2,4326), 15)$_$;
-
-
-ALTER FUNCTION public.st_askml(integer, geometry) OWNER TO postgres;
-
---
--- TOC entry 454 (class 1255 OID 18808)
--- Dependencies: 1099 6
--- Name: st_askml(geography, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_askml(geography, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsKML(2, $1, $2)$_$;
-
-
-ALTER FUNCTION public.st_askml(geography, integer) OWNER TO postgres;
-
---
--- TOC entry 457 (class 1255 OID 18811)
--- Dependencies: 6 1099
--- Name: st_askml(integer, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_askml(integer, geography) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsKML($1, $2, 15)$_$;
-
-
-ALTER FUNCTION public.st_askml(integer, geography) OWNER TO postgres;
-
---
--- TOC entry 453 (class 1255 OID 18807)
--- Dependencies: 6 1102
--- Name: st_askml(integer, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_askml(integer, geometry, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsKML($1, ST_Transform($2,4326), $3)$_$;
-
-
-ALTER FUNCTION public.st_askml(integer, geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 458 (class 1255 OID 18812)
--- Dependencies: 6 1099
--- Name: st_askml(integer, geography, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_askml(integer, geography, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsKML($1, $2, $3)$_$;
-
-
-ALTER FUNCTION public.st_askml(integer, geography, integer) OWNER TO postgres;
-
---
--- TOC entry 461 (class 1255 OID 18815)
--- Dependencies: 6 1102
--- Name: st_assvg(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_assvg(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'assvg_geometry';
-
-
-ALTER FUNCTION public.st_assvg(geometry) OWNER TO postgres;
-
---
--- TOC entry 464 (class 1255 OID 18818)
--- Dependencies: 6 1099
--- Name: st_assvg(geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_assvg(geography) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_as_svg';
-
-
-ALTER FUNCTION public.st_assvg(geography) OWNER TO postgres;
-
---
--- TOC entry 465 (class 1255 OID 18819)
--- Dependencies: 6
--- Name: st_assvg(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_assvg(text) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT ST_AsSVG($1::geometry);  $_$;
-
-
-ALTER FUNCTION public.st_assvg(text) OWNER TO postgres;
-
---
--- TOC entry 460 (class 1255 OID 18814)
--- Dependencies: 6 1102
--- Name: st_assvg(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_assvg(geometry, integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'assvg_geometry';
-
-
-ALTER FUNCTION public.st_assvg(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 463 (class 1255 OID 18817)
--- Dependencies: 6 1099
--- Name: st_assvg(geography, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_assvg(geography, integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_as_svg';
-
-
-ALTER FUNCTION public.st_assvg(geography, integer) OWNER TO postgres;
-
---
--- TOC entry 459 (class 1255 OID 18813)
--- Dependencies: 6 1102
--- Name: st_assvg(geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_assvg(geometry, integer, integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'assvg_geometry';
-
-
-ALTER FUNCTION public.st_assvg(geometry, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 462 (class 1255 OID 18816)
--- Dependencies: 6 1099
--- Name: st_assvg(geography, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_assvg(geography, integer, integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_as_svg';
-
-
-ALTER FUNCTION public.st_assvg(geography, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 466 (class 1255 OID 18820)
--- Dependencies: 6 1102
--- Name: st_astext(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_astext(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asText';
-
-
-ALTER FUNCTION public.st_astext(geometry) OWNER TO postgres;
-
---
--- TOC entry 467 (class 1255 OID 18821)
--- Dependencies: 6 1099
--- Name: st_astext(geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_astext(geography) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_as_text';
-
-
-ALTER FUNCTION public.st_astext(geography) OWNER TO postgres;
-
---
--- TOC entry 468 (class 1255 OID 18822)
--- Dependencies: 6
--- Name: st_astext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_astext(text) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT ST_AsText($1::geometry);  $_$;
-
-
-ALTER FUNCTION public.st_astext(text) OWNER TO postgres;
-
---
--- TOC entry 469 (class 1255 OID 18823)
--- Dependencies: 6 1102 1102
--- Name: st_azimuth(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_azimuth(geometry, geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_azimuth';
-
-
-ALTER FUNCTION public.st_azimuth(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 470 (class 1255 OID 18824)
--- Dependencies: 6 1168 1102
--- Name: st_bdmpolyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_bdmpolyfromtext(text, integer) RETURNS geometry
-    LANGUAGE plpgsql IMMUTABLE STRICT
-    AS $_$
-DECLARE
-	geomtext alias for $1;
-	srid alias for $2;
-	mline geometry;
-	geom geometry;
-BEGIN
-	mline := ST_MultiLineStringFromText(geomtext, srid);
-
-	IF mline IS NULL
-	THEN
-		RAISE EXCEPTION 'Input is not a MultiLinestring';
-	END IF;
-
-	geom := multi(ST_BuildArea(mline));
-
-	RETURN geom;
-END;
-$_$;
-
-
-ALTER FUNCTION public.st_bdmpolyfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 471 (class 1255 OID 18825)
--- Dependencies: 6 1168 1102
--- Name: st_bdpolyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_bdpolyfromtext(text, integer) RETURNS geometry
-    LANGUAGE plpgsql IMMUTABLE STRICT
-    AS $_$
-DECLARE
-	geomtext alias for $1;
-	srid alias for $2;
-	mline geometry;
-	geom geometry;
-BEGIN
-	mline := ST_MultiLineStringFromText(geomtext, srid);
-
-	IF mline IS NULL
-	THEN
-		RAISE EXCEPTION 'Input is not a MultiLinestring';
-	END IF;
-
-	geom := ST_BuildArea(mline);
-
-	IF GeometryType(geom) != 'POLYGON'
-	THEN
-		RAISE EXCEPTION 'Input returns more then a single polygon, try using BdMPolyFromText instead';
-	END IF;
-
-	RETURN geom;
-END;
-$_$;
-
-
-ALTER FUNCTION public.st_bdpolyfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 472 (class 1255 OID 18826)
--- Dependencies: 6 1102 1102
--- Name: st_boundary(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_boundary(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'boundary';
-
-
-ALTER FUNCTION public.st_boundary(geometry) OWNER TO postgres;
-
---
--- TOC entry 473 (class 1255 OID 18827)
--- Dependencies: 6 1102
--- Name: st_box(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_box(geometry) RETURNS box
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_to_BOX';
-
-
-ALTER FUNCTION public.st_box(geometry) OWNER TO postgres;
-
---
--- TOC entry 474 (class 1255 OID 18828)
--- Dependencies: 6 1090
--- Name: st_box(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_box(box3d) RETURNS box
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_to_BOX';
-
-
-ALTER FUNCTION public.st_box(box3d) OWNER TO postgres;
-
---
--- TOC entry 475 (class 1255 OID 18829)
--- Dependencies: 6 1087 1102
--- Name: st_box2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_box2d(geometry) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_to_BOX2DFLOAT4';
-
-
-ALTER FUNCTION public.st_box2d(geometry) OWNER TO postgres;
-
---
--- TOC entry 476 (class 1255 OID 18830)
--- Dependencies: 6 1087 1090
--- Name: st_box2d(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_box2d(box3d) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_to_BOX2DFLOAT4';
-
-
-ALTER FUNCTION public.st_box2d(box3d) OWNER TO postgres;
-
---
--- TOC entry 477 (class 1255 OID 18831)
--- Dependencies: 6 1087 1093
--- Name: st_box2d(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_box2d(box3d_extent) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_to_BOX2DFLOAT4';
-
-
-ALTER FUNCTION public.st_box2d(box3d_extent) OWNER TO postgres;
-
---
--- TOC entry 478 (class 1255 OID 18832)
--- Dependencies: 6 1087
--- Name: st_box2d_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_box2d_in(cstring) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_in';
-
-
-ALTER FUNCTION public.st_box2d_in(cstring) OWNER TO postgres;
-
---
--- TOC entry 479 (class 1255 OID 18833)
--- Dependencies: 6 1087
--- Name: st_box2d_out(box2d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_box2d_out(box2d) RETURNS cstring
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_out';
-
-
-ALTER FUNCTION public.st_box2d_out(box2d) OWNER TO postgres;
-
---
--- TOC entry 480 (class 1255 OID 18834)
--- Dependencies: 6 1090 1102
--- Name: st_box3d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_box3d(geometry) RETURNS box3d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_to_BOX3D';
-
-
-ALTER FUNCTION public.st_box3d(geometry) OWNER TO postgres;
-
---
--- TOC entry 481 (class 1255 OID 18835)
--- Dependencies: 6 1090 1087
--- Name: st_box3d(box2d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_box3d(box2d) RETURNS box3d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_to_BOX3D';
-
-
-ALTER FUNCTION public.st_box3d(box2d) OWNER TO postgres;
-
---
--- TOC entry 482 (class 1255 OID 18836)
--- Dependencies: 6 1090 1093
--- Name: st_box3d_extent(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_box3d_extent(box3d_extent) RETURNS box3d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_extent_to_BOX3D';
-
-
-ALTER FUNCTION public.st_box3d_extent(box3d_extent) OWNER TO postgres;
-
---
--- TOC entry 483 (class 1255 OID 18837)
--- Dependencies: 6 1090
--- Name: st_box3d_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_box3d_in(cstring) RETURNS box3d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_in';
-
-
-ALTER FUNCTION public.st_box3d_in(cstring) OWNER TO postgres;
-
---
--- TOC entry 484 (class 1255 OID 18838)
--- Dependencies: 6 1090
--- Name: st_box3d_out(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_box3d_out(box3d) RETURNS cstring
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_out';
-
-
-ALTER FUNCTION public.st_box3d_out(box3d) OWNER TO postgres;
-
---
--- TOC entry 485 (class 1255 OID 18839)
--- Dependencies: 6 1102 1102
--- Name: st_buffer(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_buffer(geometry, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'buffer';
-
-
-ALTER FUNCTION public.st_buffer(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 488 (class 1255 OID 18842)
--- Dependencies: 6 1099 1099
--- Name: st_buffer(geography, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_buffer(geography, double precision) RETURNS geography
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT geography(ST_Transform(ST_Buffer(ST_Transform(geometry($1), _ST_BestSRID($1)), $2), 4326))$_$;
-
-
-ALTER FUNCTION public.st_buffer(geography, double precision) OWNER TO postgres;
-
---
--- TOC entry 489 (class 1255 OID 18843)
--- Dependencies: 6 1102
--- Name: st_buffer(text, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_buffer(text, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT ST_Buffer($1::geometry, $2);  $_$;
-
-
-ALTER FUNCTION public.st_buffer(text, double precision) OWNER TO postgres;
-
---
--- TOC entry 486 (class 1255 OID 18840)
--- Dependencies: 6 1102 1102
--- Name: st_buffer(geometry, double precision, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_buffer(geometry, double precision, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT _ST_Buffer($1, $2,
-		CAST('quad_segs='||CAST($3 AS text) as cstring))
-	   $_$;
-
-
-ALTER FUNCTION public.st_buffer(geometry, double precision, integer) OWNER TO postgres;
-
---
--- TOC entry 487 (class 1255 OID 18841)
--- Dependencies: 6 1102 1102
--- Name: st_buffer(geometry, double precision, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_buffer(geometry, double precision, text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT _ST_Buffer($1, $2,
-		CAST( regexp_replace($3, '^[0123456789]+$',
-			'quad_segs='||$3) AS cstring)
-		)
-	   $_$;
-
-
-ALTER FUNCTION public.st_buffer(geometry, double precision, text) OWNER TO postgres;
-
---
--- TOC entry 490 (class 1255 OID 18844)
--- Dependencies: 6 1102 1102
--- Name: st_buildarea(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_buildarea(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'LWGEOM_buildarea';
-
-
-ALTER FUNCTION public.st_buildarea(geometry) OWNER TO postgres;
-
---
--- TOC entry 491 (class 1255 OID 18845)
--- Dependencies: 6 1102
--- Name: st_bytea(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_bytea(geometry) RETURNS bytea
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_to_bytea';
-
-
-ALTER FUNCTION public.st_bytea(geometry) OWNER TO postgres;
-
---
--- TOC entry 492 (class 1255 OID 18846)
--- Dependencies: 6 1102 1102
--- Name: st_centroid(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_centroid(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'centroid';
-
-
-ALTER FUNCTION public.st_centroid(geometry) OWNER TO postgres;
-
---
--- TOC entry 493 (class 1255 OID 18847)
--- Dependencies: 6 1096
--- Name: st_chip_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_chip_in(cstring) RETURNS chip
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_in';
-
-
-ALTER FUNCTION public.st_chip_in(cstring) OWNER TO postgres;
-
---
--- TOC entry 494 (class 1255 OID 18848)
--- Dependencies: 6 1096
--- Name: st_chip_out(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_chip_out(chip) RETURNS cstring
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_out';
-
-
-ALTER FUNCTION public.st_chip_out(chip) OWNER TO postgres;
-
---
--- TOC entry 495 (class 1255 OID 18849)
--- Dependencies: 6 1102 1102 1102
--- Name: st_closestpoint(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_closestpoint(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_closestpoint';
-
-
-ALTER FUNCTION public.st_closestpoint(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 497 (class 1255 OID 18851)
--- Dependencies: 6 1102 1104
--- Name: st_collect(geometry[]); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_collect(geometry[]) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_collect_garray';
-
-
-ALTER FUNCTION public.st_collect(geometry[]) OWNER TO postgres;
-
---
--- TOC entry 496 (class 1255 OID 18850)
--- Dependencies: 6 1102 1102 1102
--- Name: st_collect(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_collect(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'LWGEOM_collect';
-
-
-ALTER FUNCTION public.st_collect(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 498 (class 1255 OID 18852)
--- Dependencies: 6 1102 1102
--- Name: st_collectionextract(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_collectionextract(geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'ST_CollectionExtract';
-
-
-ALTER FUNCTION public.st_collectionextract(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 499 (class 1255 OID 18853)
--- Dependencies: 6 1087 1087 1102
--- Name: st_combine_bbox(box2d, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_combine_bbox(box2d, geometry) RETURNS box2d
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_combine';
-
-
-ALTER FUNCTION public.st_combine_bbox(box2d, geometry) OWNER TO postgres;
-
---
--- TOC entry 500 (class 1255 OID 18854)
--- Dependencies: 6 1093 1093 1102
--- Name: st_combine_bbox(box3d_extent, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_combine_bbox(box3d_extent, geometry) RETURNS box3d_extent
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'BOX3D_combine';
-
-
-ALTER FUNCTION public.st_combine_bbox(box3d_extent, geometry) OWNER TO postgres;
-
---
--- TOC entry 501 (class 1255 OID 18855)
--- Dependencies: 6 1090 1090 1102
--- Name: st_combine_bbox(box3d, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_combine_bbox(box3d, geometry) RETURNS box3d
-    LANGUAGE c IMMUTABLE
-    AS '$libdir/postgis-1.5', 'BOX3D_combine';
-
-
-ALTER FUNCTION public.st_combine_bbox(box3d, geometry) OWNER TO postgres;
-
---
--- TOC entry 502 (class 1255 OID 18856)
--- Dependencies: 6 1096
--- Name: st_compression(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_compression(chip) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_getCompression';
-
-
-ALTER FUNCTION public.st_compression(chip) OWNER TO postgres;
-
---
--- TOC entry 503 (class 1255 OID 18857)
--- Dependencies: 6 1102 1102
--- Name: st_contains(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_contains(geometry, geometry) RETURNS boolean
-    LANGUAGE sql IMMUTABLE
-    AS $_$SELECT $1 && $2 AND _ST_Contains($1,$2)$_$;
-
-
-ALTER FUNCTION public.st_contains(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 504 (class 1255 OID 18858)
--- Dependencies: 6 1102 1102
--- Name: st_containsproperly(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_containsproperly(geometry, geometry) RETURNS boolean
-    LANGUAGE sql IMMUTABLE
-    AS $_$SELECT $1 && $2 AND _ST_ContainsProperly($1,$2)$_$;
-
-
-ALTER FUNCTION public.st_containsproperly(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 505 (class 1255 OID 18859)
--- Dependencies: 6 1102 1102
--- Name: st_convexhull(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_convexhull(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'convexhull';
-
-
-ALTER FUNCTION public.st_convexhull(geometry) OWNER TO postgres;
-
---
--- TOC entry 506 (class 1255 OID 18860)
--- Dependencies: 6 1102
--- Name: st_coorddim(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_coorddim(geometry) RETURNS smallint
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_ndims';
-
-
-ALTER FUNCTION public.st_coorddim(geometry) OWNER TO postgres;
-
---
--- TOC entry 507 (class 1255 OID 18861)
--- Dependencies: 6 1102 1102
--- Name: st_coveredby(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_coveredby(geometry, geometry) RETURNS boolean
-    LANGUAGE sql IMMUTABLE
-    AS $_$SELECT $1 && $2 AND _ST_CoveredBy($1,$2)$_$;
-
-
-ALTER FUNCTION public.st_coveredby(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 508 (class 1255 OID 18862)
--- Dependencies: 6 1099 1099
--- Name: st_coveredby(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_coveredby(geography, geography) RETURNS boolean
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT $1 && $2 AND _ST_Covers($2, $1)$_$;
-
-
-ALTER FUNCTION public.st_coveredby(geography, geography) OWNER TO postgres;
-
---
--- TOC entry 509 (class 1255 OID 18863)
--- Dependencies: 6
--- Name: st_coveredby(text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_coveredby(text, text) RETURNS boolean
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT ST_CoveredBy($1::geometry, $2::geometry);  $_$;
-
-
-ALTER FUNCTION public.st_coveredby(text, text) OWNER TO postgres;
-
---
--- TOC entry 510 (class 1255 OID 18864)
--- Dependencies: 6 1102 1102
--- Name: st_covers(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_covers(geometry, geometry) RETURNS boolean
-    LANGUAGE sql IMMUTABLE
-    AS $_$SELECT $1 && $2 AND _ST_Covers($1,$2)$_$;
-
-
-ALTER FUNCTION public.st_covers(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 511 (class 1255 OID 18865)
--- Dependencies: 6 1099 1099
--- Name: st_covers(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_covers(geography, geography) RETURNS boolean
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT $1 && $2 AND _ST_Covers($1, $2)$_$;
-
-
-ALTER FUNCTION public.st_covers(geography, geography) OWNER TO postgres;
-
---
--- TOC entry 512 (class 1255 OID 18866)
--- Dependencies: 6
--- Name: st_covers(text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_covers(text, text) RETURNS boolean
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT ST_Covers($1::geometry, $2::geometry);  $_$;
-
-
-ALTER FUNCTION public.st_covers(text, text) OWNER TO postgres;
-
---
--- TOC entry 513 (class 1255 OID 18867)
--- Dependencies: 6 1102 1102
--- Name: st_crosses(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_crosses(geometry, geometry) RETURNS boolean
-    LANGUAGE sql IMMUTABLE
-    AS $_$SELECT $1 && $2 AND _ST_Crosses($1,$2)$_$;
-
-
-ALTER FUNCTION public.st_crosses(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 515 (class 1255 OID 18869)
--- Dependencies: 6 1102 1102
--- Name: st_curvetoline(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_curvetoline(geometry) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT ST_CurveToLine($1, 32)$_$;
-
-
-ALTER FUNCTION public.st_curvetoline(geometry) OWNER TO postgres;
-
---
--- TOC entry 514 (class 1255 OID 18868)
--- Dependencies: 6 1102 1102
--- Name: st_curvetoline(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_curvetoline(geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_curve_segmentize';
-
-
-ALTER FUNCTION public.st_curvetoline(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 516 (class 1255 OID 18870)
--- Dependencies: 6 1096
--- Name: st_datatype(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_datatype(chip) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_getDatatype';
-
-
-ALTER FUNCTION public.st_datatype(chip) OWNER TO postgres;
-
---
--- TOC entry 517 (class 1255 OID 18871)
--- Dependencies: 6 1102 1102
--- Name: st_dfullywithin(geometry, geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_dfullywithin(geometry, geometry, double precision) RETURNS boolean
-    LANGUAGE sql IMMUTABLE
-    AS $_$SELECT $1 && ST_Expand($2,$3) AND $2 && ST_Expand($1,$3) AND _ST_DFullyWithin(ST_ConvexHull($1), ST_ConvexHull($2), $3)$_$;
-
-
-ALTER FUNCTION public.st_dfullywithin(geometry, geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 518 (class 1255 OID 18872)
--- Dependencies: 6 1102 1102 1102
--- Name: st_difference(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_difference(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'difference';
-
-
-ALTER FUNCTION public.st_difference(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 519 (class 1255 OID 18873)
--- Dependencies: 6 1102
--- Name: st_dimension(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_dimension(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_dimension';
-
-
-ALTER FUNCTION public.st_dimension(geometry) OWNER TO postgres;
-
---
--- TOC entry 520 (class 1255 OID 18874)
--- Dependencies: 6 1102 1102
--- Name: st_disjoint(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_disjoint(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'disjoint';
-
-
-ALTER FUNCTION public.st_disjoint(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 521 (class 1255 OID 18875)
--- Dependencies: 6 1102 1102
--- Name: st_distance(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_distance(geometry, geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'LWGEOM_mindistance2d';
-
-
-ALTER FUNCTION public.st_distance(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 523 (class 1255 OID 18877)
--- Dependencies: 6 1099 1099
--- Name: st_distance(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_distance(geography, geography) RETURNS double precision
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_Distance($1, $2, 0.0, true)$_$;
-
-
-ALTER FUNCTION public.st_distance(geography, geography) OWNER TO postgres;
-
---
--- TOC entry 524 (class 1255 OID 18878)
--- Dependencies: 6
--- Name: st_distance(text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_distance(text, text) RETURNS double precision
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT ST_Distance($1::geometry, $2::geometry);  $_$;
-
-
-ALTER FUNCTION public.st_distance(text, text) OWNER TO postgres;
-
---
--- TOC entry 522 (class 1255 OID 18876)
--- Dependencies: 6 1099 1099
--- Name: st_distance(geography, geography, boolean); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_distance(geography, geography, boolean) RETURNS double precision
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_Distance($1, $2, 0.0, $3)$_$;
-
-
-ALTER FUNCTION public.st_distance(geography, geography, boolean) OWNER TO postgres;
-
---
--- TOC entry 525 (class 1255 OID 18879)
--- Dependencies: 6 1102 1102
--- Name: st_distance_sphere(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_distance_sphere(geometry, geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'LWGEOM_distance_sphere';
-
-
-ALTER FUNCTION public.st_distance_sphere(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 526 (class 1255 OID 18880)
--- Dependencies: 6 1102 1102 1113
--- Name: st_distance_spheroid(geometry, geometry, spheroid); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_distance_spheroid(geometry, geometry, spheroid) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'LWGEOM_distance_ellipsoid';
-
-
-ALTER FUNCTION public.st_distance_spheroid(geometry, geometry, spheroid) OWNER TO postgres;
-
---
--- TOC entry 527 (class 1255 OID 18881)
--- Dependencies: 6 1105 1102
--- Name: st_dump(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_dump(geometry) RETURNS SETOF geometry_dump
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_dump';
-
-
-ALTER FUNCTION public.st_dump(geometry) OWNER TO postgres;
-
---
--- TOC entry 528 (class 1255 OID 18882)
--- Dependencies: 6 1105 1102
--- Name: st_dumppoints(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_dumppoints(geometry) RETURNS SETOF geometry_dump
-    LANGUAGE sql
-    AS $_$
-  SELECT * FROM _ST_DumpPoints($1, NULL);
-$_$;
-
-
-ALTER FUNCTION public.st_dumppoints(geometry) OWNER TO postgres;
-
---
--- TOC entry 529 (class 1255 OID 18883)
--- Dependencies: 6 1105 1102
--- Name: st_dumprings(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_dumprings(geometry) RETURNS SETOF geometry_dump
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_dump_rings';
-
-
-ALTER FUNCTION public.st_dumprings(geometry) OWNER TO postgres;
-
---
--- TOC entry 530 (class 1255 OID 18884)
--- Dependencies: 6 1102 1102
--- Name: st_dwithin(geometry, geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_dwithin(geometry, geometry, double precision) RETURNS boolean
-    LANGUAGE sql IMMUTABLE
-    AS $_$SELECT $1 && ST_Expand($2,$3) AND $2 && ST_Expand($1,$3) AND _ST_DWithin($1, $2, $3)$_$;
-
-
-ALTER FUNCTION public.st_dwithin(geometry, geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 532 (class 1255 OID 18886)
--- Dependencies: 6 1099 1099
--- Name: st_dwithin(geography, geography, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_dwithin(geography, geography, double precision) RETURNS boolean
-    LANGUAGE sql IMMUTABLE
-    AS $_$SELECT $1 && _ST_Expand($2,$3) AND $2 && _ST_Expand($1,$3) AND _ST_DWithin($1, $2, $3, true)$_$;
-
-
-ALTER FUNCTION public.st_dwithin(geography, geography, double precision) OWNER TO postgres;
-
---
--- TOC entry 533 (class 1255 OID 18887)
--- Dependencies: 6
--- Name: st_dwithin(text, text, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_dwithin(text, text, double precision) RETURNS boolean
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT ST_DWithin($1::geometry, $2::geometry, $3);  $_$;
-
-
-ALTER FUNCTION public.st_dwithin(text, text, double precision) OWNER TO postgres;
-
---
--- TOC entry 531 (class 1255 OID 18885)
--- Dependencies: 6 1099 1099
--- Name: st_dwithin(geography, geography, double precision, boolean); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_dwithin(geography, geography, double precision, boolean) RETURNS boolean
-    LANGUAGE sql IMMUTABLE
-    AS $_$SELECT $1 && _ST_Expand($2,$3) AND $2 && _ST_Expand($1,$3) AND _ST_DWithin($1, $2, $3, $4)$_$;
-
-
-ALTER FUNCTION public.st_dwithin(geography, geography, double precision, boolean) OWNER TO postgres;
-
---
--- TOC entry 534 (class 1255 OID 18888)
--- Dependencies: 6 1102 1102
--- Name: st_endpoint(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_endpoint(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_endpoint_linestring';
-
-
-ALTER FUNCTION public.st_endpoint(geometry) OWNER TO postgres;
-
---
--- TOC entry 535 (class 1255 OID 18889)
--- Dependencies: 6 1102 1102
--- Name: st_envelope(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_envelope(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_envelope';
-
-
-ALTER FUNCTION public.st_envelope(geometry) OWNER TO postgres;
-
---
--- TOC entry 536 (class 1255 OID 18890)
--- Dependencies: 6 1102 1102
--- Name: st_equals(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_equals(geometry, geometry) RETURNS boolean
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT $1 && $2 AND _ST_Equals($1,$2)$_$;
-
-
-ALTER FUNCTION public.st_equals(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 538 (class 1255 OID 18892)
--- Dependencies: 1087 6
--- Name: st_estimated_extent(text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_estimated_extent(text, text) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT SECURITY DEFINER
-    AS '$libdir/postgis-1.5', 'LWGEOM_estimated_extent';
-
-
-ALTER FUNCTION public.st_estimated_extent(text, text) OWNER TO postgres;
-
---
--- TOC entry 537 (class 1255 OID 18891)
--- Dependencies: 6 1087
--- Name: st_estimated_extent(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_estimated_extent(text, text, text) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT SECURITY DEFINER
-    AS '$libdir/postgis-1.5', 'LWGEOM_estimated_extent';
-
-
-ALTER FUNCTION public.st_estimated_extent(text, text, text) OWNER TO postgres;
-
---
--- TOC entry 539 (class 1255 OID 18893)
--- Dependencies: 6 1090 1090
--- Name: st_expand(box3d, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_expand(box3d, double precision) RETURNS box3d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_expand';
-
-
-ALTER FUNCTION public.st_expand(box3d, double precision) OWNER TO postgres;
-
---
--- TOC entry 540 (class 1255 OID 18896)
--- Dependencies: 1087 1087 6
--- Name: st_expand(box2d, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_expand(box2d, double precision) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_expand';
-
-
-ALTER FUNCTION public.st_expand(box2d, double precision) OWNER TO postgres;
-
---
--- TOC entry 541 (class 1255 OID 18897)
--- Dependencies: 6 1102 1102
--- Name: st_expand(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_expand(geometry, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_expand';
-
-
-ALTER FUNCTION public.st_expand(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 542 (class 1255 OID 18898)
--- Dependencies: 6 1102 1102
--- Name: st_exteriorring(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_exteriorring(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_exteriorring_polygon';
-
-
-ALTER FUNCTION public.st_exteriorring(geometry) OWNER TO postgres;
-
---
--- TOC entry 543 (class 1255 OID 18899)
--- Dependencies: 6 1096
--- Name: st_factor(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_factor(chip) RETURNS real
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_getFactor';
-
-
-ALTER FUNCTION public.st_factor(chip) OWNER TO postgres;
-
---
--- TOC entry 545 (class 1255 OID 18901)
--- Dependencies: 1087 1168 6
--- Name: st_find_extent(text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_find_extent(text, text) RETURNS box2d
-    LANGUAGE plpgsql IMMUTABLE STRICT
-    AS $_$
-DECLARE
-	tablename alias for $1;
-	columnname alias for $2;
-	myrec RECORD;
-
-BEGIN
-	FOR myrec IN EXECUTE 'SELECT extent("' || columnname || '") FROM "' || tablename || '"' LOOP
-		return myrec.extent;
-	END LOOP;
-END;
-$_$;
-
-
-ALTER FUNCTION public.st_find_extent(text, text) OWNER TO postgres;
-
---
--- TOC entry 544 (class 1255 OID 18900)
--- Dependencies: 1168 6 1087
--- Name: st_find_extent(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_find_extent(text, text, text) RETURNS box2d
-    LANGUAGE plpgsql IMMUTABLE STRICT
-    AS $_$
-DECLARE
-	schemaname alias for $1;
-	tablename alias for $2;
-	columnname alias for $3;
-	myrec RECORD;
-
-BEGIN
-	FOR myrec IN EXECUTE 'SELECT extent("' || columnname || '") FROM "' || schemaname || '"."' || tablename || '"' LOOP
-		return myrec.extent;
-	END LOOP;
-END;
-$_$;
-
-
-ALTER FUNCTION public.st_find_extent(text, text, text) OWNER TO postgres;
-
---
--- TOC entry 546 (class 1255 OID 18902)
--- Dependencies: 1102 1102 6
--- Name: st_force_2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_force_2d(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_force_2d';
-
-
-ALTER FUNCTION public.st_force_2d(geometry) OWNER TO postgres;
-
---
--- TOC entry 547 (class 1255 OID 18903)
--- Dependencies: 6 1102 1102
--- Name: st_force_3d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_force_3d(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_force_3dz';
-
-
-ALTER FUNCTION public.st_force_3d(geometry) OWNER TO postgres;
-
---
--- TOC entry 548 (class 1255 OID 18904)
--- Dependencies: 6 1102 1102
--- Name: st_force_3dm(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_force_3dm(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_force_3dm';
-
-
-ALTER FUNCTION public.st_force_3dm(geometry) OWNER TO postgres;
-
---
--- TOC entry 549 (class 1255 OID 18905)
--- Dependencies: 1102 6 1102
--- Name: st_force_3dz(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_force_3dz(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_force_3dz';
-
-
-ALTER FUNCTION public.st_force_3dz(geometry) OWNER TO postgres;
-
---
--- TOC entry 550 (class 1255 OID 18906)
--- Dependencies: 1102 1102 6
--- Name: st_force_4d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_force_4d(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_force_4d';
-
-
-ALTER FUNCTION public.st_force_4d(geometry) OWNER TO postgres;
-
---
--- TOC entry 551 (class 1255 OID 18907)
--- Dependencies: 6 1102 1102
--- Name: st_force_collection(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_force_collection(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_force_collection';
-
-
-ALTER FUNCTION public.st_force_collection(geometry) OWNER TO postgres;
-
---
--- TOC entry 552 (class 1255 OID 18908)
--- Dependencies: 1102 1102 6
--- Name: st_forcerhr(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_forcerhr(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_forceRHR_poly';
-
-
-ALTER FUNCTION public.st_forcerhr(geometry) OWNER TO postgres;
-
---
--- TOC entry 553 (class 1255 OID 18909)
--- Dependencies: 1099 6
--- Name: st_geogfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geogfromtext(text) RETURNS geography
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_from_text';
-
-
-ALTER FUNCTION public.st_geogfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 554 (class 1255 OID 18910)
--- Dependencies: 1099 6
--- Name: st_geogfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geogfromwkb(bytea) RETURNS geography
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_from_binary';
-
-
-ALTER FUNCTION public.st_geogfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 555 (class 1255 OID 18911)
--- Dependencies: 6 1099
--- Name: st_geographyfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geographyfromtext(text) RETURNS geography
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geography_from_text';
-
-
-ALTER FUNCTION public.st_geographyfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 557 (class 1255 OID 18913)
--- Dependencies: 6 1102
--- Name: st_geohash(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geohash(geometry) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT ST_GeoHash($1, 0)$_$;
-
-
-ALTER FUNCTION public.st_geohash(geometry) OWNER TO postgres;
-
---
--- TOC entry 556 (class 1255 OID 18912)
--- Dependencies: 1102 6
--- Name: st_geohash(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geohash(geometry, integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'ST_GeoHash';
-
-
-ALTER FUNCTION public.st_geohash(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 559 (class 1255 OID 18915)
--- Dependencies: 6 1102
--- Name: st_geomcollfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geomcollfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE
-	WHEN geometrytype(ST_GeomFromText($1)) = 'GEOMETRYCOLLECTION'
-	THEN ST_GeomFromText($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_geomcollfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 558 (class 1255 OID 18914)
--- Dependencies: 1102 6
--- Name: st_geomcollfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geomcollfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE
-	WHEN geometrytype(ST_GeomFromText($1, $2)) = 'GEOMETRYCOLLECTION'
-	THEN ST_GeomFromText($1,$2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_geomcollfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 561 (class 1255 OID 18917)
--- Dependencies: 6 1102
--- Name: st_geomcollfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geomcollfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE
-	WHEN geometrytype(ST_GeomFromWKB($1)) = 'GEOMETRYCOLLECTION'
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_geomcollfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 560 (class 1255 OID 18916)
--- Dependencies: 6 1102
--- Name: st_geomcollfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geomcollfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE
-	WHEN geometrytype(GeomFromWKB($1, $2)) = 'GEOMETRYCOLLECTION'
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_geomcollfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 562 (class 1255 OID 18918)
--- Dependencies: 1087 6 1102
--- Name: st_geometry(box2d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry(box2d) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_to_LWGEOM';
-
-
-ALTER FUNCTION public.st_geometry(box2d) OWNER TO postgres;
-
---
--- TOC entry 563 (class 1255 OID 18919)
--- Dependencies: 6 1102 1090
--- Name: st_geometry(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry(box3d) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_to_LWGEOM';
-
-
-ALTER FUNCTION public.st_geometry(box3d) OWNER TO postgres;
-
---
--- TOC entry 564 (class 1255 OID 18920)
--- Dependencies: 6 1102
--- Name: st_geometry(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry(text) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'parse_WKT_lwgeom';
-
-
-ALTER FUNCTION public.st_geometry(text) OWNER TO postgres;
-
---
--- TOC entry 565 (class 1255 OID 18921)
--- Dependencies: 1102 1096 6
--- Name: st_geometry(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry(chip) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_to_LWGEOM';
-
-
-ALTER FUNCTION public.st_geometry(chip) OWNER TO postgres;
-
---
--- TOC entry 566 (class 1255 OID 18922)
--- Dependencies: 6 1102
--- Name: st_geometry(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry(bytea) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_from_bytea';
-
-
-ALTER FUNCTION public.st_geometry(bytea) OWNER TO postgres;
-
---
--- TOC entry 567 (class 1255 OID 18923)
--- Dependencies: 6 1093 1102
--- Name: st_geometry(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry(box3d_extent) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_to_LWGEOM';
-
-
-ALTER FUNCTION public.st_geometry(box3d_extent) OWNER TO postgres;
-
---
--- TOC entry 568 (class 1255 OID 18924)
--- Dependencies: 1102 1102 6
--- Name: st_geometry_above(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_above(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_above';
-
-
-ALTER FUNCTION public.st_geometry_above(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 569 (class 1255 OID 18925)
--- Dependencies: 6
--- Name: st_geometry_analyze(internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_analyze(internal) RETURNS boolean
-    LANGUAGE c STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_analyze';
-
-
-ALTER FUNCTION public.st_geometry_analyze(internal) OWNER TO postgres;
-
---
--- TOC entry 570 (class 1255 OID 18926)
--- Dependencies: 1102 1102 6
--- Name: st_geometry_below(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_below(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_below';
-
-
-ALTER FUNCTION public.st_geometry_below(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 571 (class 1255 OID 18927)
--- Dependencies: 6 1102 1102
--- Name: st_geometry_cmp(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_cmp(geometry, geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'lwgeom_cmp';
-
-
-ALTER FUNCTION public.st_geometry_cmp(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 572 (class 1255 OID 18928)
--- Dependencies: 1102 6 1102
--- Name: st_geometry_contain(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_contain(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_contain';
-
-
-ALTER FUNCTION public.st_geometry_contain(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 573 (class 1255 OID 18929)
--- Dependencies: 6 1102 1102
--- Name: st_geometry_contained(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_contained(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_contained';
-
-
-ALTER FUNCTION public.st_geometry_contained(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 574 (class 1255 OID 18930)
--- Dependencies: 6 1102 1102
--- Name: st_geometry_eq(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_eq(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'lwgeom_eq';
-
-
-ALTER FUNCTION public.st_geometry_eq(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 575 (class 1255 OID 18931)
--- Dependencies: 1102 6 1102
--- Name: st_geometry_ge(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_ge(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'lwgeom_ge';
-
-
-ALTER FUNCTION public.st_geometry_ge(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 576 (class 1255 OID 18932)
--- Dependencies: 6 1102 1102
--- Name: st_geometry_gt(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_gt(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'lwgeom_gt';
-
-
-ALTER FUNCTION public.st_geometry_gt(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 577 (class 1255 OID 18933)
--- Dependencies: 6 1102
--- Name: st_geometry_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_in(cstring) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_in';
-
-
-ALTER FUNCTION public.st_geometry_in(cstring) OWNER TO postgres;
-
---
--- TOC entry 578 (class 1255 OID 18934)
--- Dependencies: 1102 6 1102
--- Name: st_geometry_le(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_le(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'lwgeom_le';
-
-
-ALTER FUNCTION public.st_geometry_le(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 579 (class 1255 OID 18935)
--- Dependencies: 1102 1102 6
--- Name: st_geometry_left(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_left(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_left';
-
-
-ALTER FUNCTION public.st_geometry_left(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 580 (class 1255 OID 18936)
--- Dependencies: 1102 6 1102
--- Name: st_geometry_lt(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_lt(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'lwgeom_lt';
-
-
-ALTER FUNCTION public.st_geometry_lt(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 581 (class 1255 OID 18937)
--- Dependencies: 1102 6
--- Name: st_geometry_out(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_out(geometry) RETURNS cstring
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_out';
-
-
-ALTER FUNCTION public.st_geometry_out(geometry) OWNER TO postgres;
-
---
--- TOC entry 582 (class 1255 OID 18938)
--- Dependencies: 1102 1102 6
--- Name: st_geometry_overabove(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_overabove(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_overabove';
-
-
-ALTER FUNCTION public.st_geometry_overabove(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 583 (class 1255 OID 18939)
--- Dependencies: 6 1102 1102
--- Name: st_geometry_overbelow(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_overbelow(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_overbelow';
-
-
-ALTER FUNCTION public.st_geometry_overbelow(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 584 (class 1255 OID 18940)
--- Dependencies: 6 1102 1102
--- Name: st_geometry_overlap(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_overlap(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_overlap';
-
-
-ALTER FUNCTION public.st_geometry_overlap(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 585 (class 1255 OID 18941)
--- Dependencies: 1102 6 1102
--- Name: st_geometry_overleft(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_overleft(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_overleft';
-
-
-ALTER FUNCTION public.st_geometry_overleft(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 586 (class 1255 OID 18942)
--- Dependencies: 6 1102 1102
--- Name: st_geometry_overright(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_overright(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_overright';
-
-
-ALTER FUNCTION public.st_geometry_overright(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 587 (class 1255 OID 18943)
--- Dependencies: 1102 6
--- Name: st_geometry_recv(internal); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_recv(internal) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_recv';
-
-
-ALTER FUNCTION public.st_geometry_recv(internal) OWNER TO postgres;
-
---
--- TOC entry 588 (class 1255 OID 18944)
--- Dependencies: 1102 6 1102
--- Name: st_geometry_right(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_right(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_right';
-
-
-ALTER FUNCTION public.st_geometry_right(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 589 (class 1255 OID 18945)
--- Dependencies: 1102 6 1102
--- Name: st_geometry_same(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_same(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_samebox';
-
-
-ALTER FUNCTION public.st_geometry_same(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 590 (class 1255 OID 18946)
--- Dependencies: 6 1102
--- Name: st_geometry_send(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometry_send(geometry) RETURNS bytea
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_send';
-
-
-ALTER FUNCTION public.st_geometry_send(geometry) OWNER TO postgres;
-
---
--- TOC entry 591 (class 1255 OID 18947)
--- Dependencies: 1102 6
--- Name: st_geometryfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometryfromtext(text) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_from_text';
-
-
-ALTER FUNCTION public.st_geometryfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 592 (class 1255 OID 18948)
--- Dependencies: 1102 6
--- Name: st_geometryfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometryfromtext(text, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_from_text';
-
-
-ALTER FUNCTION public.st_geometryfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 593 (class 1255 OID 18949)
--- Dependencies: 1102 6 1102
--- Name: st_geometryn(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometryn(geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_geometryn_collection';
-
-
-ALTER FUNCTION public.st_geometryn(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 594 (class 1255 OID 18950)
--- Dependencies: 6 1102
--- Name: st_geometrytype(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geometrytype(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geometry_geometrytype';
-
-
-ALTER FUNCTION public.st_geometrytype(geometry) OWNER TO postgres;
-
---
--- TOC entry 595 (class 1255 OID 18951)
--- Dependencies: 1102 6
--- Name: st_geomfromewkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geomfromewkb(bytea) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOMFromWKB';
-
-
-ALTER FUNCTION public.st_geomfromewkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 596 (class 1255 OID 18952)
--- Dependencies: 1102 6
--- Name: st_geomfromewkt(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geomfromewkt(text) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'parse_WKT_lwgeom';
-
-
-ALTER FUNCTION public.st_geomfromewkt(text) OWNER TO postgres;
-
---
--- TOC entry 597 (class 1255 OID 18953)
--- Dependencies: 6 1102
--- Name: st_geomfromgml(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geomfromgml(text) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geom_from_gml';
-
-
-ALTER FUNCTION public.st_geomfromgml(text) OWNER TO postgres;
-
---
--- TOC entry 598 (class 1255 OID 18954)
--- Dependencies: 6 1102
--- Name: st_geomfromkml(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geomfromkml(text) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geom_from_kml';
-
-
-ALTER FUNCTION public.st_geomfromkml(text) OWNER TO postgres;
-
---
--- TOC entry 599 (class 1255 OID 18955)
--- Dependencies: 6 1102
--- Name: st_geomfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geomfromtext(text) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_from_text';
-
-
-ALTER FUNCTION public.st_geomfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 600 (class 1255 OID 18956)
--- Dependencies: 1102 6
--- Name: st_geomfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geomfromtext(text, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_from_text';
-
-
-ALTER FUNCTION public.st_geomfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 601 (class 1255 OID 18957)
--- Dependencies: 1102 6
--- Name: st_geomfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geomfromwkb(bytea) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_from_WKB';
-
-
-ALTER FUNCTION public.st_geomfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 602 (class 1255 OID 18958)
--- Dependencies: 1102 6
--- Name: st_geomfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_geomfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT ST_SetSRID(ST_GeomFromWKB($1), $2)$_$;
-
-
-ALTER FUNCTION public.st_geomfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 603 (class 1255 OID 18959)
--- Dependencies: 1102 6
--- Name: st_gmltosql(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_gmltosql(text) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geom_from_gml';
-
-
-ALTER FUNCTION public.st_gmltosql(text) OWNER TO postgres;
-
---
--- TOC entry 604 (class 1255 OID 18960)
--- Dependencies: 1102 6
--- Name: st_hasarc(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_hasarc(geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_has_arc';
-
-
-ALTER FUNCTION public.st_hasarc(geometry) OWNER TO postgres;
-
---
--- TOC entry 605 (class 1255 OID 18961)
--- Dependencies: 1102 6 1102
--- Name: st_hausdorffdistance(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_hausdorffdistance(geometry, geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'hausdorffdistance';
-
-
-ALTER FUNCTION public.st_hausdorffdistance(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 606 (class 1255 OID 18962)
--- Dependencies: 1102 1102 6
--- Name: st_hausdorffdistance(geometry, geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_hausdorffdistance(geometry, geometry, double precision) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'hausdorffdistancedensify';
-
-
-ALTER FUNCTION public.st_hausdorffdistance(geometry, geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 607 (class 1255 OID 18963)
--- Dependencies: 6 1096
--- Name: st_height(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_height(chip) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_getHeight';
-
-
-ALTER FUNCTION public.st_height(chip) OWNER TO postgres;
-
---
--- TOC entry 608 (class 1255 OID 18964)
--- Dependencies: 6 1102 1102
--- Name: st_interiorringn(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_interiorringn(geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_interiorringn_polygon';
-
-
-ALTER FUNCTION public.st_interiorringn(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 609 (class 1255 OID 18965)
--- Dependencies: 6 1102 1102 1102
--- Name: st_intersection(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_intersection(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'intersection';
-
-
-ALTER FUNCTION public.st_intersection(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 610 (class 1255 OID 18966)
--- Dependencies: 6 1099 1099 1099
--- Name: st_intersection(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_intersection(geography, geography) RETURNS geography
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT geography(ST_Transform(ST_Intersection(ST_Transform(geometry($1), _ST_BestSRID($1, $2)), ST_Transform(geometry($2), _ST_BestSRID($1, $2))), 4326))$_$;
-
-
-ALTER FUNCTION public.st_intersection(geography, geography) OWNER TO postgres;
-
---
--- TOC entry 611 (class 1255 OID 18967)
--- Dependencies: 6 1102
--- Name: st_intersection(text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_intersection(text, text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT ST_Intersection($1::geometry, $2::geometry);  $_$;
-
-
-ALTER FUNCTION public.st_intersection(text, text) OWNER TO postgres;
-
---
--- TOC entry 612 (class 1255 OID 18968)
--- Dependencies: 6 1102 1102
--- Name: st_intersects(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_intersects(geometry, geometry) RETURNS boolean
-    LANGUAGE sql IMMUTABLE
-    AS $_$SELECT $1 && $2 AND _ST_Intersects($1,$2)$_$;
-
-
-ALTER FUNCTION public.st_intersects(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 613 (class 1255 OID 18969)
--- Dependencies: 6 1099 1099
--- Name: st_intersects(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_intersects(geography, geography) RETURNS boolean
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT $1 && $2 AND _ST_Distance($1, $2, 0.0, false) < 0.00001$_$;
-
-
-ALTER FUNCTION public.st_intersects(geography, geography) OWNER TO postgres;
-
---
--- TOC entry 614 (class 1255 OID 18970)
--- Dependencies: 6
--- Name: st_intersects(text, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_intersects(text, text) RETURNS boolean
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT ST_Intersects($1::geometry, $2::geometry);  $_$;
-
-
-ALTER FUNCTION public.st_intersects(text, text) OWNER TO postgres;
-
---
--- TOC entry 615 (class 1255 OID 18971)
--- Dependencies: 6 1102
--- Name: st_isclosed(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_isclosed(geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_isclosed_linestring';
-
-
-ALTER FUNCTION public.st_isclosed(geometry) OWNER TO postgres;
-
---
--- TOC entry 616 (class 1255 OID 18972)
--- Dependencies: 6 1102
--- Name: st_isempty(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_isempty(geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_isempty';
-
-
-ALTER FUNCTION public.st_isempty(geometry) OWNER TO postgres;
-
---
--- TOC entry 617 (class 1255 OID 18973)
--- Dependencies: 6 1102
--- Name: st_isring(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_isring(geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'isring';
-
-
-ALTER FUNCTION public.st_isring(geometry) OWNER TO postgres;
-
---
--- TOC entry 618 (class 1255 OID 18974)
--- Dependencies: 6 1102
--- Name: st_issimple(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_issimple(geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'issimple';
-
-
-ALTER FUNCTION public.st_issimple(geometry) OWNER TO postgres;
-
---
--- TOC entry 619 (class 1255 OID 18975)
--- Dependencies: 6 1102
--- Name: st_isvalid(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_isvalid(geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'isvalid';
-
-
-ALTER FUNCTION public.st_isvalid(geometry) OWNER TO postgres;
-
---
--- TOC entry 620 (class 1255 OID 18976)
--- Dependencies: 6 1102
--- Name: st_isvalidreason(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_isvalidreason(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'isvalidreason';
-
-
-ALTER FUNCTION public.st_isvalidreason(geometry) OWNER TO postgres;
-
---
--- TOC entry 621 (class 1255 OID 18977)
--- Dependencies: 6 1102
--- Name: st_length(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_length(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_length2d_linestring';
-
-
-ALTER FUNCTION public.st_length(geometry) OWNER TO postgres;
-
---
--- TOC entry 623 (class 1255 OID 18979)
--- Dependencies: 6 1099
--- Name: st_length(geography); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_length(geography) RETURNS double precision
-    LANGUAGE sql IMMUTABLE
-    AS $_$SELECT ST_Length($1, true)$_$;
-
-
-ALTER FUNCTION public.st_length(geography) OWNER TO postgres;
-
---
--- TOC entry 624 (class 1255 OID 18980)
--- Dependencies: 6
--- Name: st_length(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_length(text) RETURNS double precision
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT ST_Length($1::geometry);  $_$;
-
-
-ALTER FUNCTION public.st_length(text) OWNER TO postgres;
-
---
--- TOC entry 622 (class 1255 OID 18978)
--- Dependencies: 6 1099
--- Name: st_length(geography, boolean); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_length(geography, boolean) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'geography_length';
-
-
-ALTER FUNCTION public.st_length(geography, boolean) OWNER TO postgres;
-
---
--- TOC entry 625 (class 1255 OID 18981)
--- Dependencies: 6 1102
--- Name: st_length2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_length2d(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_length2d_linestring';
-
-
-ALTER FUNCTION public.st_length2d(geometry) OWNER TO postgres;
-
---
--- TOC entry 626 (class 1255 OID 18982)
--- Dependencies: 6 1102 1113
--- Name: st_length2d_spheroid(geometry, spheroid); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_length2d_spheroid(geometry, spheroid) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'LWGEOM_length2d_ellipsoid';
-
-
-ALTER FUNCTION public.st_length2d_spheroid(geometry, spheroid) OWNER TO postgres;
-
---
--- TOC entry 627 (class 1255 OID 18983)
--- Dependencies: 6 1102
--- Name: st_length3d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_length3d(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_length_linestring';
-
-
-ALTER FUNCTION public.st_length3d(geometry) OWNER TO postgres;
-
---
--- TOC entry 628 (class 1255 OID 18984)
--- Dependencies: 6 1102 1113
--- Name: st_length3d_spheroid(geometry, spheroid); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_length3d_spheroid(geometry, spheroid) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'LWGEOM_length_ellipsoid_linestring';
-
-
-ALTER FUNCTION public.st_length3d_spheroid(geometry, spheroid) OWNER TO postgres;
-
---
--- TOC entry 629 (class 1255 OID 18985)
--- Dependencies: 6 1102 1113
--- Name: st_length_spheroid(geometry, spheroid); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_length_spheroid(geometry, spheroid) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'LWGEOM_length_ellipsoid_linestring';
-
-
-ALTER FUNCTION public.st_length_spheroid(geometry, spheroid) OWNER TO postgres;
-
---
--- TOC entry 630 (class 1255 OID 18986)
--- Dependencies: 6 1102 1102
--- Name: st_line_interpolate_point(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_line_interpolate_point(geometry, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_line_interpolate_point';
-
-
-ALTER FUNCTION public.st_line_interpolate_point(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 631 (class 1255 OID 18987)
--- Dependencies: 6 1102 1102
--- Name: st_line_locate_point(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_line_locate_point(geometry, geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_line_locate_point';
-
-
-ALTER FUNCTION public.st_line_locate_point(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 632 (class 1255 OID 18988)
--- Dependencies: 6 1102 1102
--- Name: st_line_substring(geometry, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_line_substring(geometry, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_line_substring';
-
-
-ALTER FUNCTION public.st_line_substring(geometry, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 633 (class 1255 OID 18989)
--- Dependencies: 6 1102 1102
--- Name: st_linecrossingdirection(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_linecrossingdirection(geometry, geometry) RETURNS integer
-    LANGUAGE sql IMMUTABLE
-    AS $_$ SELECT CASE WHEN NOT $1 && $2 THEN 0 ELSE _ST_LineCrossingDirection($1,$2) END $_$;
-
-
-ALTER FUNCTION public.st_linecrossingdirection(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 634 (class 1255 OID 18990)
--- Dependencies: 6 1102 1102
--- Name: st_linefrommultipoint(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_linefrommultipoint(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_line_from_mpoint';
-
-
-ALTER FUNCTION public.st_linefrommultipoint(geometry) OWNER TO postgres;
-
---
--- TOC entry 635 (class 1255 OID 18991)
--- Dependencies: 6 1102
--- Name: st_linefromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_linefromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = 'LINESTRING'
-	THEN ST_GeomFromText($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_linefromtext(text) OWNER TO postgres;
-
---
--- TOC entry 636 (class 1255 OID 18992)
--- Dependencies: 6 1102
--- Name: st_linefromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_linefromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = 'LINESTRING'
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_linefromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 638 (class 1255 OID 18994)
--- Dependencies: 6 1102
--- Name: st_linefromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_linefromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'LINESTRING'
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_linefromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 637 (class 1255 OID 18993)
--- Dependencies: 6 1102
--- Name: st_linefromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_linefromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'LINESTRING'
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_linefromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 639 (class 1255 OID 18995)
--- Dependencies: 6 1102 1102
--- Name: st_linemerge(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_linemerge(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'linemerge';
-
-
-ALTER FUNCTION public.st_linemerge(geometry) OWNER TO postgres;
-
---
--- TOC entry 641 (class 1255 OID 18997)
--- Dependencies: 6 1102
--- Name: st_linestringfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_linestringfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'LINESTRING'
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_linestringfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 640 (class 1255 OID 18996)
--- Dependencies: 6 1102
--- Name: st_linestringfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_linestringfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'LINESTRING'
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_linestringfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 642 (class 1255 OID 18998)
--- Dependencies: 6 1102 1102
--- Name: st_linetocurve(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_linetocurve(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_line_desegmentize';
-
-
-ALTER FUNCTION public.st_linetocurve(geometry) OWNER TO postgres;
-
---
--- TOC entry 643 (class 1255 OID 18999)
--- Dependencies: 6 1102 1102
--- Name: st_locate_along_measure(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_locate_along_measure(geometry, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ SELECT locate_between_measures($1, $2, $2) $_$;
-
-
-ALTER FUNCTION public.st_locate_along_measure(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 644 (class 1255 OID 19000)
--- Dependencies: 6 1102 1102
--- Name: st_locate_between_measures(geometry, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_locate_between_measures(geometry, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_locate_between_m';
-
-
-ALTER FUNCTION public.st_locate_between_measures(geometry, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 645 (class 1255 OID 19001)
--- Dependencies: 6 1102 1102
--- Name: st_locatebetweenelevations(geometry, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_locatebetweenelevations(geometry, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'ST_LocateBetweenElevations';
-
-
-ALTER FUNCTION public.st_locatebetweenelevations(geometry, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 646 (class 1255 OID 19002)
--- Dependencies: 6 1102 1102 1102
--- Name: st_longestline(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_longestline(geometry, geometry) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_LongestLine(ST_ConvexHull($1), ST_ConvexHull($2))$_$;
-
-
-ALTER FUNCTION public.st_longestline(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 647 (class 1255 OID 19003)
--- Dependencies: 6 1102
--- Name: st_m(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_m(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_m_point';
-
-
-ALTER FUNCTION public.st_m(geometry) OWNER TO postgres;
-
---
--- TOC entry 648 (class 1255 OID 19004)
--- Dependencies: 6 1087 1102 1102
--- Name: st_makebox2d(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_makebox2d(geometry, geometry) RETURNS box2d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_construct';
-
-
-ALTER FUNCTION public.st_makebox2d(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 649 (class 1255 OID 19005)
--- Dependencies: 6 1090 1102 1102
--- Name: st_makebox3d(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_makebox3d(geometry, geometry) RETURNS box3d
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_construct';
-
-
-ALTER FUNCTION public.st_makebox3d(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 650 (class 1255 OID 19006)
--- Dependencies: 6 1102
--- Name: st_makeenvelope(double precision, double precision, double precision, double precision, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_makeenvelope(double precision, double precision, double precision, double precision, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'ST_MakeEnvelope';
-
-
-ALTER FUNCTION public.st_makeenvelope(double precision, double precision, double precision, double precision, integer) OWNER TO postgres;
-
---
--- TOC entry 651 (class 1255 OID 19007)
--- Dependencies: 6 1102 1104
--- Name: st_makeline(geometry[]); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_makeline(geometry[]) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makeline_garray';
-
-
-ALTER FUNCTION public.st_makeline(geometry[]) OWNER TO postgres;
-
---
--- TOC entry 652 (class 1255 OID 19008)
--- Dependencies: 6 1102 1102 1102
--- Name: st_makeline(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_makeline(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makeline';
-
-
-ALTER FUNCTION public.st_makeline(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 653 (class 1255 OID 19009)
--- Dependencies: 6 1102 1104
--- Name: st_makeline_garray(geometry[]); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_makeline_garray(geometry[]) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makeline_garray';
-
-
-ALTER FUNCTION public.st_makeline_garray(geometry[]) OWNER TO postgres;
-
---
--- TOC entry 654 (class 1255 OID 19010)
--- Dependencies: 1102 6
--- Name: st_makepoint(double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_makepoint(double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makepoint';
-
-
-ALTER FUNCTION public.st_makepoint(double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 655 (class 1255 OID 19011)
--- Dependencies: 6 1102
--- Name: st_makepoint(double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_makepoint(double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makepoint';
-
-
-ALTER FUNCTION public.st_makepoint(double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 656 (class 1255 OID 19012)
--- Dependencies: 6 1102
--- Name: st_makepoint(double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_makepoint(double precision, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makepoint';
-
-
-ALTER FUNCTION public.st_makepoint(double precision, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 657 (class 1255 OID 19013)
--- Dependencies: 6 1102
--- Name: st_makepointm(double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_makepointm(double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makepoint3dm';
-
-
-ALTER FUNCTION public.st_makepointm(double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 659 (class 1255 OID 19015)
--- Dependencies: 6 1102 1102
--- Name: st_makepolygon(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_makepolygon(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makepoly';
-
-
-ALTER FUNCTION public.st_makepolygon(geometry) OWNER TO postgres;
-
---
--- TOC entry 658 (class 1255 OID 19014)
--- Dependencies: 6 1102 1102 1104
--- Name: st_makepolygon(geometry, geometry[]); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_makepolygon(geometry, geometry[]) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makepoly';
-
-
-ALTER FUNCTION public.st_makepolygon(geometry, geometry[]) OWNER TO postgres;
-
---
--- TOC entry 660 (class 1255 OID 19016)
--- Dependencies: 6 1102 1102
--- Name: st_maxdistance(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_maxdistance(geometry, geometry) RETURNS double precision
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_MaxDistance(ST_ConvexHull($1), ST_ConvexHull($2))$_$;
-
-
-ALTER FUNCTION public.st_maxdistance(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 661 (class 1255 OID 19017)
--- Dependencies: 6 1102
--- Name: st_mem_size(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_mem_size(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_mem_size';
-
-
-ALTER FUNCTION public.st_mem_size(geometry) OWNER TO postgres;
-
---
--- TOC entry 663 (class 1255 OID 19020)
--- Dependencies: 6 1102 1102
--- Name: st_minimumboundingcircle(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_minimumboundingcircle(geometry) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT ST_MinimumBoundingCircle($1, 48)$_$;
-
-
-ALTER FUNCTION public.st_minimumboundingcircle(geometry) OWNER TO postgres;
-
---
--- TOC entry 662 (class 1255 OID 19018)
--- Dependencies: 6 1168 1102 1102
--- Name: st_minimumboundingcircle(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_minimumboundingcircle(inputgeom geometry, segs_per_quarter integer) RETURNS geometry
-    LANGUAGE plpgsql IMMUTABLE STRICT
-    AS $$
-	DECLARE
-	hull GEOMETRY;
-	ring GEOMETRY;
-	center GEOMETRY;
-	radius DOUBLE PRECISION;
-	dist DOUBLE PRECISION;
-	d DOUBLE PRECISION;
-	idx1 integer;
-	idx2 integer;
-	l1 GEOMETRY;
-	l2 GEOMETRY;
-	p1 GEOMETRY;
-	p2 GEOMETRY;
-	a1 DOUBLE PRECISION;
-	a2 DOUBLE PRECISION;
-
-
-	BEGIN
-
-	-- First compute the ConvexHull of the geometry
-	hull = ST_ConvexHull(inputgeom);
-	--A point really has no MBC
-	IF ST_GeometryType(hull) = 'ST_Point' THEN
-		RETURN hull;
-	END IF;
-	-- convert the hull perimeter to a linestring so we can manipulate individual points
-	--If its already a linestring force it to a closed linestring
-	ring = CASE WHEN ST_GeometryType(hull) = 'ST_LineString' THEN ST_AddPoint(hull, ST_StartPoint(hull)) ELSE ST_ExteriorRing(hull) END;
-
-	dist = 0;
-	-- Brute Force - check every pair
-	FOR i in 1 .. (ST_NumPoints(ring)-2)
-		LOOP
-			FOR j in i .. (ST_NumPoints(ring)-1)
-				LOOP
-				d = ST_Distance(ST_PointN(ring,i),ST_PointN(ring,j));
-				-- Check the distance and update if larger
-				IF (d > dist) THEN
-					dist = d;
-					idx1 = i;
-					idx2 = j;
-				END IF;
-			END LOOP;
-		END LOOP;
-
-	-- We now have the diameter of the convex hull.  The following line returns it if desired.
-	-- RETURN MakeLine(PointN(ring,idx1),PointN(ring,idx2));
-
-	-- Now for the Minimum Bounding Circle.  Since we know the two points furthest from each
-	-- other, the MBC must go through those two points. Start with those points as a diameter of a circle.
-
-	-- The radius is half the distance between them and the center is midway between them
-	radius = ST_Distance(ST_PointN(ring,idx1),ST_PointN(ring,idx2)) / 2.0;
-	center = ST_Line_interpolate_point(ST_MakeLine(ST_PointN(ring,idx1),ST_PointN(ring,idx2)),0.5);
-
-	-- Loop through each vertex and check if the distance from the center to the point
-	-- is greater than the current radius.
-	FOR k in 1 .. (ST_NumPoints(ring)-1)
-		LOOP
-		IF(k <> idx1 and k <> idx2) THEN
-			dist = ST_Distance(center,ST_PointN(ring,k));
-			IF (dist > radius) THEN
-				-- We have to expand the circle.  The new circle must pass trhough
-				-- three points - the two original diameters and this point.
-
-				-- Draw a line from the first diameter to this point
-				l1 = ST_Makeline(ST_PointN(ring,idx1),ST_PointN(ring,k));
-				-- Compute the midpoint
-				p1 = ST_line_interpolate_point(l1,0.5);
-				-- Rotate the line 90 degrees around the midpoint (perpendicular bisector)
-				l1 = ST_Translate(ST_Rotate(ST_Translate(l1,-X(p1),-Y(p1)),pi()/2),X(p1),Y(p1));
-				--  Compute the azimuth of the bisector
-				a1 = ST_Azimuth(ST_PointN(l1,1),ST_PointN(l1,2));
-				--  Extend the line in each direction the new computed distance to insure they will intersect
-				l1 = ST_AddPoint(l1,ST_Makepoint(X(ST_PointN(l1,2))+sin(a1)*dist,Y(ST_PointN(l1,2))+cos(a1)*dist),-1);
-				l1 = ST_AddPoint(l1,ST_Makepoint(X(ST_PointN(l1,1))-sin(a1)*dist,Y(ST_PointN(l1,1))-cos(a1)*dist),0);
-
-				-- Repeat for the line from the point to the other diameter point
-				l2 = ST_Makeline(ST_PointN(ring,idx2),ST_PointN(ring,k));
-				p2 = ST_Line_interpolate_point(l2,0.5);
-				l2 = ST_Translate(ST_Rotate(ST_Translate(l2,-X(p2),-Y(p2)),pi()/2),X(p2),Y(p2));
-				a2 = ST_Azimuth(ST_PointN(l2,1),ST_PointN(l2,2));
-				l2 = ST_AddPoint(l2,ST_Makepoint(X(ST_PointN(l2,2))+sin(a2)*dist,Y(ST_PointN(l2,2))+cos(a2)*dist),-1);
-				l2 = ST_AddPoint(l2,ST_Makepoint(X(ST_PointN(l2,1))-sin(a2)*dist,Y(ST_PointN(l2,1))-cos(a2)*dist),0);
-
-				-- The new center is the intersection of the two bisectors
-				center = ST_Intersection(l1,l2);
-				-- The new radius is the distance to any of the three points
-				radius = ST_Distance(center,ST_PointN(ring,idx1));
-			END IF;
-		END IF;
-		END LOOP;
-	--DONE!!  Return the MBC via the buffer command
-	RETURN ST_Buffer(center,radius,segs_per_quarter);
-
-	END;
-$$;
-
-
-ALTER FUNCTION public.st_minimumboundingcircle(inputgeom geometry, segs_per_quarter integer) OWNER TO postgres;
-
---
--- TOC entry 665 (class 1255 OID 19022)
--- Dependencies: 6 1102
--- Name: st_mlinefromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_mlinefromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = 'MULTILINESTRING'
-	THEN ST_GeomFromText($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_mlinefromtext(text) OWNER TO postgres;
-
---
--- TOC entry 664 (class 1255 OID 19021)
--- Dependencies: 6 1102
--- Name: st_mlinefromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_mlinefromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE
-	WHEN geometrytype(GeomFromText($1, $2)) = 'MULTILINESTRING'
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_mlinefromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 667 (class 1255 OID 19024)
--- Dependencies: 6 1102
--- Name: st_mlinefromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_mlinefromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'MULTILINESTRING'
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_mlinefromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 666 (class 1255 OID 19023)
--- Dependencies: 6 1102
--- Name: st_mlinefromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_mlinefromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'MULTILINESTRING'
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_mlinefromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 669 (class 1255 OID 19026)
--- Dependencies: 6 1102
--- Name: st_mpointfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_mpointfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = 'MULTIPOINT'
-	THEN ST_GeomFromText($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_mpointfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 668 (class 1255 OID 19025)
--- Dependencies: 6 1102
--- Name: st_mpointfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_mpointfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = 'MULTIPOINT'
-	THEN GeomFromText($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_mpointfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 672 (class 1255 OID 19028)
--- Dependencies: 6 1102
--- Name: st_mpointfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_mpointfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'MULTIPOINT'
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_mpointfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 671 (class 1255 OID 19027)
--- Dependencies: 6 1102
--- Name: st_mpointfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_mpointfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'MULTIPOINT'
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_mpointfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 674 (class 1255 OID 19030)
--- Dependencies: 6 1102
--- Name: st_mpolyfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_mpolyfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = 'MULTIPOLYGON'
-	THEN ST_GeomFromText($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_mpolyfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 673 (class 1255 OID 19029)
--- Dependencies: 6 1102
--- Name: st_mpolyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_mpolyfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1, $2)) = 'MULTIPOLYGON'
-	THEN ST_GeomFromText($1,$2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_mpolyfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 676 (class 1255 OID 19032)
--- Dependencies: 6 1102
--- Name: st_mpolyfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_mpolyfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'MULTIPOLYGON'
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_mpolyfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 675 (class 1255 OID 19031)
--- Dependencies: 6 1102
--- Name: st_mpolyfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_mpolyfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'MULTIPOLYGON'
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_mpolyfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 677 (class 1255 OID 19033)
--- Dependencies: 6 1102 1102
--- Name: st_multi(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_multi(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_force_multi';
-
-
-ALTER FUNCTION public.st_multi(geometry) OWNER TO postgres;
-
---
--- TOC entry 678 (class 1255 OID 19034)
--- Dependencies: 6 1102
--- Name: st_multilinefromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_multilinefromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'MULTILINESTRING'
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_multilinefromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 679 (class 1255 OID 19035)
--- Dependencies: 6 1102
--- Name: st_multilinestringfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_multilinestringfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT ST_MLineFromText($1)$_$;
-
-
-ALTER FUNCTION public.st_multilinestringfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 680 (class 1255 OID 19036)
--- Dependencies: 6 1102
--- Name: st_multilinestringfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_multilinestringfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT MLineFromText($1, $2)$_$;
-
-
-ALTER FUNCTION public.st_multilinestringfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 681 (class 1255 OID 19037)
--- Dependencies: 6 1102
--- Name: st_multipointfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_multipointfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT MPointFromText($1)$_$;
-
-
-ALTER FUNCTION public.st_multipointfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 683 (class 1255 OID 19039)
--- Dependencies: 1102 6
--- Name: st_multipointfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_multipointfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'MULTIPOINT'
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_multipointfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 682 (class 1255 OID 19038)
--- Dependencies: 6 1102
--- Name: st_multipointfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_multipointfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1,$2)) = 'MULTIPOINT'
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_multipointfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 685 (class 1255 OID 19041)
--- Dependencies: 6 1102
--- Name: st_multipolyfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_multipolyfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'MULTIPOLYGON'
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_multipolyfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 684 (class 1255 OID 19040)
--- Dependencies: 6 1102
--- Name: st_multipolyfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_multipolyfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'MULTIPOLYGON'
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_multipolyfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 687 (class 1255 OID 19043)
--- Dependencies: 6 1102
--- Name: st_multipolygonfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_multipolygonfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT MPolyFromText($1)$_$;
-
-
-ALTER FUNCTION public.st_multipolygonfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 686 (class 1255 OID 19042)
--- Dependencies: 6 1102
--- Name: st_multipolygonfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_multipolygonfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT MPolyFromText($1, $2)$_$;
-
-
-ALTER FUNCTION public.st_multipolygonfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 688 (class 1255 OID 19044)
--- Dependencies: 6 1102
--- Name: st_ndims(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_ndims(geometry) RETURNS smallint
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_ndims';
-
-
-ALTER FUNCTION public.st_ndims(geometry) OWNER TO postgres;
-
---
--- TOC entry 689 (class 1255 OID 19045)
--- Dependencies: 6 1102
--- Name: st_npoints(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_npoints(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_npoints';
-
-
-ALTER FUNCTION public.st_npoints(geometry) OWNER TO postgres;
-
---
--- TOC entry 690 (class 1255 OID 19046)
--- Dependencies: 6 1102
--- Name: st_nrings(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_nrings(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_nrings';
-
-
-ALTER FUNCTION public.st_nrings(geometry) OWNER TO postgres;
-
---
--- TOC entry 691 (class 1255 OID 19047)
--- Dependencies: 6 1102
--- Name: st_numgeometries(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_numgeometries(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_numgeometries_collection';
-
-
-ALTER FUNCTION public.st_numgeometries(geometry) OWNER TO postgres;
-
---
--- TOC entry 692 (class 1255 OID 19048)
--- Dependencies: 6 1102
--- Name: st_numinteriorring(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_numinteriorring(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_numinteriorrings_polygon';
-
-
-ALTER FUNCTION public.st_numinteriorring(geometry) OWNER TO postgres;
-
---
--- TOC entry 693 (class 1255 OID 19049)
--- Dependencies: 6 1102
--- Name: st_numinteriorrings(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_numinteriorrings(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_numinteriorrings_polygon';
-
-
-ALTER FUNCTION public.st_numinteriorrings(geometry) OWNER TO postgres;
-
---
--- TOC entry 694 (class 1255 OID 19050)
--- Dependencies: 6 1102
--- Name: st_numpoints(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_numpoints(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_numpoints_linestring';
-
-
-ALTER FUNCTION public.st_numpoints(geometry) OWNER TO postgres;
-
---
--- TOC entry 695 (class 1255 OID 19051)
--- Dependencies: 6 1102 1102
--- Name: st_orderingequals(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_orderingequals(geometry, geometry) RETURNS boolean
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ 
-	SELECT $1 ~= $2 AND _ST_OrderingEquals($1, $2)
-	$_$;
-
-
-ALTER FUNCTION public.st_orderingequals(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 696 (class 1255 OID 19052)
--- Dependencies: 6 1102 1102
--- Name: st_overlaps(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_overlaps(geometry, geometry) RETURNS boolean
-    LANGUAGE sql IMMUTABLE
-    AS $_$SELECT $1 && $2 AND _ST_Overlaps($1,$2)$_$;
-
-
-ALTER FUNCTION public.st_overlaps(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 697 (class 1255 OID 19053)
--- Dependencies: 6 1102
--- Name: st_perimeter(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_perimeter(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_perimeter2d_poly';
-
-
-ALTER FUNCTION public.st_perimeter(geometry) OWNER TO postgres;
-
---
--- TOC entry 698 (class 1255 OID 19054)
--- Dependencies: 6 1102
--- Name: st_perimeter2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_perimeter2d(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_perimeter2d_poly';
-
-
-ALTER FUNCTION public.st_perimeter2d(geometry) OWNER TO postgres;
-
---
--- TOC entry 699 (class 1255 OID 19055)
--- Dependencies: 6 1102
--- Name: st_perimeter3d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_perimeter3d(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_perimeter_poly';
-
-
-ALTER FUNCTION public.st_perimeter3d(geometry) OWNER TO postgres;
-
---
--- TOC entry 700 (class 1255 OID 19056)
--- Dependencies: 6 1102
--- Name: st_point(double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_point(double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_makepoint';
-
-
-ALTER FUNCTION public.st_point(double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 701 (class 1255 OID 19057)
--- Dependencies: 6 1102
--- Name: st_point_inside_circle(geometry, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_point_inside_circle(geometry, double precision, double precision, double precision) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_inside_circle_point';
-
-
-ALTER FUNCTION public.st_point_inside_circle(geometry, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 702 (class 1255 OID 19058)
--- Dependencies: 6 1102
--- Name: st_pointfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_pointfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = 'POINT'
-	THEN ST_GeomFromText($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_pointfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 703 (class 1255 OID 19059)
--- Dependencies: 6 1102
--- Name: st_pointfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_pointfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1, $2)) = 'POINT'
-	THEN ST_GeomFromText($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_pointfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 706 (class 1255 OID 19061)
--- Dependencies: 6 1102
--- Name: st_pointfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_pointfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'POINT'
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_pointfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 705 (class 1255 OID 19060)
--- Dependencies: 6 1102
--- Name: st_pointfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_pointfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'POINT'
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_pointfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 707 (class 1255 OID 19062)
--- Dependencies: 6 1102 1102
--- Name: st_pointn(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_pointn(geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_pointn_linestring';
-
-
-ALTER FUNCTION public.st_pointn(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 708 (class 1255 OID 19063)
--- Dependencies: 6 1102 1102
--- Name: st_pointonsurface(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_pointonsurface(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'pointonsurface';
-
-
-ALTER FUNCTION public.st_pointonsurface(geometry) OWNER TO postgres;
-
---
--- TOC entry 709 (class 1255 OID 19064)
--- Dependencies: 6 1102
--- Name: st_polyfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_polyfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = 'POLYGON'
-	THEN ST_GeomFromText($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_polyfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 710 (class 1255 OID 19065)
--- Dependencies: 6 1102
--- Name: st_polyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_polyfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1, $2)) = 'POLYGON'
-	THEN ST_GeomFromText($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_polyfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 712 (class 1255 OID 19067)
--- Dependencies: 6 1102
--- Name: st_polyfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_polyfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = 'POLYGON'
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_polyfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 711 (class 1255 OID 19066)
--- Dependencies: 6 1102
--- Name: st_polyfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_polyfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = 'POLYGON'
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_polyfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 713 (class 1255 OID 19068)
--- Dependencies: 6 1102 1102
--- Name: st_polygon(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_polygon(geometry, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$ 
-	SELECT setSRID(makepolygon($1), $2)
-	$_$;
-
-
-ALTER FUNCTION public.st_polygon(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 715 (class 1255 OID 19070)
--- Dependencies: 1102 6
--- Name: st_polygonfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_polygonfromtext(text) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT ST_PolyFromText($1)$_$;
-
-
-ALTER FUNCTION public.st_polygonfromtext(text) OWNER TO postgres;
-
---
--- TOC entry 714 (class 1255 OID 19069)
--- Dependencies: 6 1102
--- Name: st_polygonfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_polygonfromtext(text, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT PolyFromText($1, $2)$_$;
-
-
-ALTER FUNCTION public.st_polygonfromtext(text, integer) OWNER TO postgres;
-
---
--- TOC entry 717 (class 1255 OID 19072)
--- Dependencies: 6 1102
--- Name: st_polygonfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_polygonfromwkb(bytea) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'POLYGON'
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_polygonfromwkb(bytea) OWNER TO postgres;
-
---
--- TOC entry 716 (class 1255 OID 19071)
--- Dependencies: 1102 6
--- Name: st_polygonfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_polygonfromwkb(bytea, integer) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1,$2)) = 'POLYGON'
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	$_$;
-
-
-ALTER FUNCTION public.st_polygonfromwkb(bytea, integer) OWNER TO postgres;
-
---
--- TOC entry 718 (class 1255 OID 19073)
--- Dependencies: 1102 6 1104
--- Name: st_polygonize(geometry[]); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_polygonize(geometry[]) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'polygonize_garray';
-
-
-ALTER FUNCTION public.st_polygonize(geometry[]) OWNER TO postgres;
-
---
--- TOC entry 719 (class 1255 OID 19074)
--- Dependencies: 1102 6 1104
--- Name: st_polygonize_garray(geometry[]); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_polygonize_garray(geometry[]) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'polygonize_garray';
-
-
-ALTER FUNCTION public.st_polygonize_garray(geometry[]) OWNER TO postgres;
-
---
--- TOC entry 720 (class 1255 OID 19075)
--- Dependencies: 6
--- Name: st_postgis_gist_joinsel(internal, oid, internal, smallint); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_postgis_gist_joinsel(internal, oid, internal, smallint) RETURNS double precision
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'LWGEOM_gist_joinsel';
-
-
-ALTER FUNCTION public.st_postgis_gist_joinsel(internal, oid, internal, smallint) OWNER TO postgres;
-
---
--- TOC entry 721 (class 1255 OID 19076)
--- Dependencies: 6
--- Name: st_postgis_gist_sel(internal, oid, internal, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_postgis_gist_sel(internal, oid, internal, integer) RETURNS double precision
-    LANGUAGE c
-    AS '$libdir/postgis-1.5', 'LWGEOM_gist_sel';
-
-
-ALTER FUNCTION public.st_postgis_gist_sel(internal, oid, internal, integer) OWNER TO postgres;
-
---
--- TOC entry 722 (class 1255 OID 19077)
--- Dependencies: 1102 6 1102
--- Name: st_relate(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_relate(geometry, geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'relate_full';
-
-
-ALTER FUNCTION public.st_relate(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 723 (class 1255 OID 19078)
--- Dependencies: 1102 6 1102
--- Name: st_relate(geometry, geometry, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_relate(geometry, geometry, text) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'relate_pattern';
-
-
-ALTER FUNCTION public.st_relate(geometry, geometry, text) OWNER TO postgres;
-
---
--- TOC entry 724 (class 1255 OID 19079)
--- Dependencies: 1102 6 1102
--- Name: st_removepoint(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_removepoint(geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_removepoint';
-
-
-ALTER FUNCTION public.st_removepoint(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 725 (class 1255 OID 19080)
--- Dependencies: 1102 6 1102
--- Name: st_reverse(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_reverse(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_reverse';
-
-
-ALTER FUNCTION public.st_reverse(geometry) OWNER TO postgres;
-
---
--- TOC entry 726 (class 1255 OID 19081)
--- Dependencies: 1102 6 1102
--- Name: st_rotate(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_rotate(geometry, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT rotateZ($1, $2)$_$;
-
-
-ALTER FUNCTION public.st_rotate(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 727 (class 1255 OID 19082)
--- Dependencies: 1102 6 1102
--- Name: st_rotatex(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_rotatex(geometry, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT affine($1, 1, 0, 0, 0, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0)$_$;
-
-
-ALTER FUNCTION public.st_rotatex(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 728 (class 1255 OID 19083)
--- Dependencies: 1102 6 1102
--- Name: st_rotatey(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_rotatey(geometry, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT affine($1,  cos($2), 0, sin($2),  0, 1, 0,  -sin($2), 0, cos($2), 0,  0, 0)$_$;
-
-
-ALTER FUNCTION public.st_rotatey(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 729 (class 1255 OID 19084)
--- Dependencies: 1102 6 1102
--- Name: st_rotatez(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_rotatez(geometry, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT affine($1,  cos($2), -sin($2), 0,  sin($2), cos($2), 0,  0, 0, 1,  0, 0, 0)$_$;
-
-
-ALTER FUNCTION public.st_rotatez(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 731 (class 1255 OID 19086)
--- Dependencies: 1102 1102 6
--- Name: st_scale(geometry, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_scale(geometry, double precision, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT scale($1, $2, $3, 1)$_$;
-
-
-ALTER FUNCTION public.st_scale(geometry, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 730 (class 1255 OID 19085)
--- Dependencies: 1102 6 1102
--- Name: st_scale(geometry, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_scale(geometry, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT affine($1,  $2, 0, 0,  0, $3, 0,  0, 0, $4,  0, 0, 0)$_$;
-
-
-ALTER FUNCTION public.st_scale(geometry, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 732 (class 1255 OID 19087)
--- Dependencies: 1102 1102 6
--- Name: st_segmentize(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_segmentize(geometry, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_segmentize2d';
-
-
-ALTER FUNCTION public.st_segmentize(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 733 (class 1255 OID 19088)
--- Dependencies: 6 1096 1096
--- Name: st_setfactor(chip, real); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_setfactor(chip, real) RETURNS chip
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_setFactor';
-
-
-ALTER FUNCTION public.st_setfactor(chip, real) OWNER TO postgres;
-
---
--- TOC entry 734 (class 1255 OID 19089)
--- Dependencies: 6 1102 1102 1102
--- Name: st_setpoint(geometry, integer, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_setpoint(geometry, integer, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_setpoint_linestring';
-
-
-ALTER FUNCTION public.st_setpoint(geometry, integer, geometry) OWNER TO postgres;
-
---
--- TOC entry 735 (class 1255 OID 19090)
--- Dependencies: 1102 6 1102
--- Name: st_setsrid(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_setsrid(geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_setSRID';
-
-
-ALTER FUNCTION public.st_setsrid(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 736 (class 1255 OID 19091)
--- Dependencies: 1102 6 1102
--- Name: st_shift_longitude(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_shift_longitude(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_longitude_shift';
-
-
-ALTER FUNCTION public.st_shift_longitude(geometry) OWNER TO postgres;
-
---
--- TOC entry 737 (class 1255 OID 19092)
--- Dependencies: 1102 1102 1102 6
--- Name: st_shortestline(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_shortestline(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_shortestline2d';
-
-
-ALTER FUNCTION public.st_shortestline(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 738 (class 1255 OID 19093)
--- Dependencies: 6 1102 1102
--- Name: st_simplify(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_simplify(geometry, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_simplify2d';
-
-
-ALTER FUNCTION public.st_simplify(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 739 (class 1255 OID 19094)
--- Dependencies: 1102 6 1102
--- Name: st_simplifypreservetopology(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_simplifypreservetopology(geometry, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT COST 100
-    AS '$libdir/postgis-1.5', 'topologypreservesimplify';
-
-
-ALTER FUNCTION public.st_simplifypreservetopology(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 740 (class 1255 OID 19097)
--- Dependencies: 1102 6 1102
--- Name: st_snaptogrid(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_snaptogrid(geometry, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT ST_SnapToGrid($1, 0, 0, $2, $2)$_$;
-
-
-ALTER FUNCTION public.st_snaptogrid(geometry, double precision) OWNER TO postgres;
-
---
--- TOC entry 704 (class 1255 OID 19096)
--- Dependencies: 6 1102 1102
--- Name: st_snaptogrid(geometry, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_snaptogrid(geometry, double precision, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT ST_SnapToGrid($1, 0, 0, $2, $3)$_$;
-
-
-ALTER FUNCTION public.st_snaptogrid(geometry, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 670 (class 1255 OID 19095)
--- Dependencies: 6 1102 1102
--- Name: st_snaptogrid(geometry, double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_snaptogrid(geometry, double precision, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_snaptogrid';
-
-
-ALTER FUNCTION public.st_snaptogrid(geometry, double precision, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 741 (class 1255 OID 19098)
--- Dependencies: 1102 1102 1102 6
--- Name: st_snaptogrid(geometry, geometry, double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_snaptogrid(geometry, geometry, double precision, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_snaptogrid_pointoff';
-
-
-ALTER FUNCTION public.st_snaptogrid(geometry, geometry, double precision, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 742 (class 1255 OID 19099)
--- Dependencies: 6 1113
--- Name: st_spheroid_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_spheroid_in(cstring) RETURNS spheroid
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'ellipsoid_in';
-
-
-ALTER FUNCTION public.st_spheroid_in(cstring) OWNER TO postgres;
-
---
--- TOC entry 743 (class 1255 OID 19100)
--- Dependencies: 6 1113
--- Name: st_spheroid_out(spheroid); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_spheroid_out(spheroid) RETURNS cstring
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'ellipsoid_out';
-
-
-ALTER FUNCTION public.st_spheroid_out(spheroid) OWNER TO postgres;
-
---
--- TOC entry 744 (class 1255 OID 19101)
--- Dependencies: 1096 6
--- Name: st_srid(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_srid(chip) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_getSRID';
-
-
-ALTER FUNCTION public.st_srid(chip) OWNER TO postgres;
-
---
--- TOC entry 745 (class 1255 OID 19102)
--- Dependencies: 6 1102
--- Name: st_srid(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_srid(geometry) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_getSRID';
-
-
-ALTER FUNCTION public.st_srid(geometry) OWNER TO postgres;
-
---
--- TOC entry 746 (class 1255 OID 19103)
--- Dependencies: 6 1102 1102
--- Name: st_startpoint(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_startpoint(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_startpoint_linestring';
-
-
-ALTER FUNCTION public.st_startpoint(geometry) OWNER TO postgres;
-
---
--- TOC entry 747 (class 1255 OID 19104)
--- Dependencies: 6 1102
--- Name: st_summary(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_summary(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_summary';
-
-
-ALTER FUNCTION public.st_summary(geometry) OWNER TO postgres;
-
---
--- TOC entry 748 (class 1255 OID 19105)
--- Dependencies: 1102 1102 1102 6
--- Name: st_symdifference(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_symdifference(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'symdifference';
-
-
-ALTER FUNCTION public.st_symdifference(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 749 (class 1255 OID 19106)
--- Dependencies: 1102 1102 1102 6
--- Name: st_symmetricdifference(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_symmetricdifference(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'symdifference';
-
-
-ALTER FUNCTION public.st_symmetricdifference(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 750 (class 1255 OID 19107)
--- Dependencies: 6 1102
--- Name: st_text(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_text(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_to_text';
-
-
-ALTER FUNCTION public.st_text(geometry) OWNER TO postgres;
-
---
--- TOC entry 751 (class 1255 OID 19108)
--- Dependencies: 1102 6 1102
--- Name: st_touches(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_touches(geometry, geometry) RETURNS boolean
-    LANGUAGE sql IMMUTABLE
-    AS $_$SELECT $1 && $2 AND _ST_Touches($1,$2)$_$;
-
-
-ALTER FUNCTION public.st_touches(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 752 (class 1255 OID 19109)
--- Dependencies: 6 1102 1102
--- Name: st_transform(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_transform(geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'transform';
-
-
-ALTER FUNCTION public.st_transform(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 754 (class 1255 OID 19111)
--- Dependencies: 1102 6 1102
--- Name: st_translate(geometry, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_translate(geometry, double precision, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT translate($1, $2, $3, 0)$_$;
-
-
-ALTER FUNCTION public.st_translate(geometry, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 753 (class 1255 OID 19110)
--- Dependencies: 1102 6 1102
--- Name: st_translate(geometry, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_translate(geometry, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT affine($1, 1, 0, 0, 0, 1, 0, 0, 0, 1, $2, $3, $4)$_$;
-
-
-ALTER FUNCTION public.st_translate(geometry, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 755 (class 1255 OID 19112)
--- Dependencies: 6 1102 1102
--- Name: st_transscale(geometry, double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_transscale(geometry, double precision, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT affine($1,  $4, 0, 0,  0, $5, 0,
-		0, 0, 1,  $2 * $4, $3 * $5, 0)$_$;
-
-
-ALTER FUNCTION public.st_transscale(geometry, double precision, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 757 (class 1255 OID 19114)
--- Dependencies: 6 1104 1102
--- Name: st_union(geometry[]); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_union(geometry[]) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'pgis_union_geometry_array';
-
-
-ALTER FUNCTION public.st_union(geometry[]) OWNER TO postgres;
-
---
--- TOC entry 756 (class 1255 OID 19113)
--- Dependencies: 6 1102 1102 1102
--- Name: st_union(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_union(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'geomunion';
-
-
-ALTER FUNCTION public.st_union(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 758 (class 1255 OID 19115)
--- Dependencies: 1104 6 1102
--- Name: st_unite_garray(geometry[]); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_unite_garray(geometry[]) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'pgis_union_geometry_array';
-
-
-ALTER FUNCTION public.st_unite_garray(geometry[]) OWNER TO postgres;
-
---
--- TOC entry 759 (class 1255 OID 19116)
--- Dependencies: 6 1096
--- Name: st_width(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_width(chip) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_getWidth';
-
-
-ALTER FUNCTION public.st_width(chip) OWNER TO postgres;
-
---
--- TOC entry 760 (class 1255 OID 19117)
--- Dependencies: 1102 1102 6
--- Name: st_within(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_within(geometry, geometry) RETURNS boolean
-    LANGUAGE sql IMMUTABLE
-    AS $_$SELECT $1 && $2 AND _ST_Within($1,$2)$_$;
-
-
-ALTER FUNCTION public.st_within(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 761 (class 1255 OID 19118)
--- Dependencies: 1102 6
--- Name: st_wkbtosql(bytea); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_wkbtosql(bytea) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_from_WKB';
-
-
-ALTER FUNCTION public.st_wkbtosql(bytea) OWNER TO postgres;
-
---
--- TOC entry 762 (class 1255 OID 19119)
--- Dependencies: 6 1102
--- Name: st_wkttosql(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_wkttosql(text) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_from_text';
-
-
-ALTER FUNCTION public.st_wkttosql(text) OWNER TO postgres;
-
---
--- TOC entry 763 (class 1255 OID 19120)
--- Dependencies: 1102 6
--- Name: st_x(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_x(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_x_point';
-
-
-ALTER FUNCTION public.st_x(geometry) OWNER TO postgres;
-
---
--- TOC entry 764 (class 1255 OID 19121)
--- Dependencies: 6 1090
--- Name: st_xmax(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_xmax(box3d) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_xmax';
-
-
-ALTER FUNCTION public.st_xmax(box3d) OWNER TO postgres;
-
---
--- TOC entry 765 (class 1255 OID 19122)
--- Dependencies: 6 1090
--- Name: st_xmin(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_xmin(box3d) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_xmin';
-
-
-ALTER FUNCTION public.st_xmin(box3d) OWNER TO postgres;
-
---
--- TOC entry 766 (class 1255 OID 19123)
--- Dependencies: 1102 6
--- Name: st_y(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_y(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_y_point';
-
-
-ALTER FUNCTION public.st_y(geometry) OWNER TO postgres;
-
---
--- TOC entry 767 (class 1255 OID 19124)
--- Dependencies: 1090 6
--- Name: st_ymax(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_ymax(box3d) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_ymax';
-
-
-ALTER FUNCTION public.st_ymax(box3d) OWNER TO postgres;
-
---
--- TOC entry 768 (class 1255 OID 19125)
--- Dependencies: 6 1090
--- Name: st_ymin(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_ymin(box3d) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_ymin';
-
-
-ALTER FUNCTION public.st_ymin(box3d) OWNER TO postgres;
-
---
--- TOC entry 769 (class 1255 OID 19126)
--- Dependencies: 1102 6
--- Name: st_z(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_z(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_z_point';
-
-
-ALTER FUNCTION public.st_z(geometry) OWNER TO postgres;
-
---
--- TOC entry 770 (class 1255 OID 19127)
--- Dependencies: 6 1090
--- Name: st_zmax(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_zmax(box3d) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_zmax';
-
-
-ALTER FUNCTION public.st_zmax(box3d) OWNER TO postgres;
-
---
--- TOC entry 771 (class 1255 OID 19128)
--- Dependencies: 6 1102
--- Name: st_zmflag(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_zmflag(geometry) RETURNS smallint
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_zmflag';
-
-
-ALTER FUNCTION public.st_zmflag(geometry) OWNER TO postgres;
-
---
--- TOC entry 772 (class 1255 OID 19129)
--- Dependencies: 1090 6
--- Name: st_zmin(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION st_zmin(box3d) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_zmin';
-
-
-ALTER FUNCTION public.st_zmin(box3d) OWNER TO postgres;
-
---
--- TOC entry 773 (class 1255 OID 19130)
--- Dependencies: 1102 6 1102
--- Name: startpoint(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION startpoint(geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_startpoint_linestring';
-
-
-ALTER FUNCTION public.startpoint(geometry) OWNER TO postgres;
-
---
--- TOC entry 774 (class 1255 OID 19131)
--- Dependencies: 6 1102
--- Name: summary(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION summary(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_summary';
-
-
-ALTER FUNCTION public.summary(geometry) OWNER TO postgres;
-
---
--- TOC entry 775 (class 1255 OID 19132)
--- Dependencies: 1102 6 1102 1102
--- Name: symdifference(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION symdifference(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'symdifference';
-
-
-ALTER FUNCTION public.symdifference(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 776 (class 1255 OID 19133)
--- Dependencies: 1102 6 1102 1102
--- Name: symmetricdifference(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION symmetricdifference(geometry, geometry) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'symdifference';
-
-
-ALTER FUNCTION public.symmetricdifference(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 777 (class 1255 OID 19134)
--- Dependencies: 6 1102
--- Name: text(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION text(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_to_text';
-
-
-ALTER FUNCTION public.text(geometry) OWNER TO postgres;
-
---
--- TOC entry 778 (class 1255 OID 19135)
--- Dependencies: 1102 6 1102
--- Name: touches(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION touches(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'touches';
-
-
-ALTER FUNCTION public.touches(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 779 (class 1255 OID 19136)
--- Dependencies: 1102 6 1102
--- Name: transform(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION transform(geometry, integer) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'transform';
-
-
-ALTER FUNCTION public.transform(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 781 (class 1255 OID 19138)
--- Dependencies: 1102 6 1102
--- Name: translate(geometry, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION translate(geometry, double precision, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT translate($1, $2, $3, 0)$_$;
-
-
-ALTER FUNCTION public.translate(geometry, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 780 (class 1255 OID 19137)
--- Dependencies: 1102 6 1102
--- Name: translate(geometry, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION translate(geometry, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT affine($1, 1, 0, 0, 0, 1, 0, 0, 0, 1, $2, $3, $4)$_$;
-
-
-ALTER FUNCTION public.translate(geometry, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 782 (class 1255 OID 19139)
--- Dependencies: 6 1102 1102
--- Name: transscale(geometry, double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION transscale(geometry, double precision, double precision, double precision, double precision) RETURNS geometry
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT affine($1,  $4, 0, 0,  0, $5, 0,
-		0, 0, 1,  $2 * $4, $3 * $5, 0)$_$;
-
-
-ALTER FUNCTION public.transscale(geometry, double precision, double precision, double precision, double precision) OWNER TO postgres;
-
---
--- TOC entry 783 (class 1255 OID 19140)
--- Dependencies: 1104 6 1102
--- Name: unite_garray(geometry[]); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION unite_garray(geometry[]) RETURNS geometry
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'pgis_union_geometry_array';
-
-
-ALTER FUNCTION public.unite_garray(geometry[]) OWNER TO postgres;
-
---
--- TOC entry 784 (class 1255 OID 19141)
--- Dependencies: 6 1168
--- Name: unlockrows(text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION unlockrows(text) RETURNS integer
-    LANGUAGE plpgsql STRICT
-    AS $_$ 
-DECLARE
-	ret int;
-BEGIN
-
-	IF NOT LongTransactionsEnabled() THEN
-		RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.';
-	END IF;
-
-	EXECUTE 'DELETE FROM authorization_table where authid = ' ||
-		quote_literal($1);
-
-	GET DIAGNOSTICS ret = ROW_COUNT;
-
-	RETURN ret;
-END;
-$_$;
-
-
-ALTER FUNCTION public.unlockrows(text) OWNER TO postgres;
-
---
--- TOC entry 787 (class 1255 OID 19144)
--- Dependencies: 6 1168
--- Name: updategeometrysrid(character varying, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION updategeometrysrid(character varying, character varying, integer) RETURNS text
-    LANGUAGE plpgsql STRICT
-    AS $_$
-DECLARE
-	ret  text;
-BEGIN
-	SELECT UpdateGeometrySRID('','',$1,$2,$3) into ret;
-	RETURN ret;
-END;
-$_$;
-
-
-ALTER FUNCTION public.updategeometrysrid(character varying, character varying, integer) OWNER TO postgres;
-
---
--- TOC entry 786 (class 1255 OID 19143)
--- Dependencies: 6 1168
--- Name: updategeometrysrid(character varying, character varying, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION updategeometrysrid(character varying, character varying, character varying, integer) RETURNS text
-    LANGUAGE plpgsql STRICT
-    AS $_$
-DECLARE
-	ret  text;
-BEGIN
-	SELECT UpdateGeometrySRID('',$1,$2,$3,$4) into ret;
-	RETURN ret;
-END;
-$_$;
-
-
-ALTER FUNCTION public.updategeometrysrid(character varying, character varying, character varying, integer) OWNER TO postgres;
-
---
--- TOC entry 785 (class 1255 OID 19142)
--- Dependencies: 1168 6
--- Name: updategeometrysrid(character varying, character varying, character varying, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION updategeometrysrid(character varying, character varying, character varying, character varying, integer) RETURNS text
-    LANGUAGE plpgsql STRICT
-    AS $_$
-DECLARE
-	catalog_name alias for $1;
-	schema_name alias for $2;
-	table_name alias for $3;
-	column_name alias for $4;
-	new_srid alias for $5;
-	myrec RECORD;
-	okay boolean;
-	cname varchar;
-	real_schema name;
-
-BEGIN
-
-
-	-- Find, check or fix schema_name
-	IF ( schema_name != '' ) THEN
-		okay = 'f';
-
-		FOR myrec IN SELECT nspname FROM pg_namespace WHERE text(nspname) = schema_name LOOP
-			okay := 't';
-		END LOOP;
-
-		IF ( okay <> 't' ) THEN
-			RAISE EXCEPTION 'Invalid schema name';
-		ELSE
-			real_schema = schema_name;
-		END IF;
-	ELSE
-		SELECT INTO real_schema current_schema()::text;
-	END IF;
-
-	-- Find out if the column is in the geometry_columns table
-	okay = 'f';
-	FOR myrec IN SELECT * from geometry_columns where f_table_schema = text(real_schema) and f_table_name = table_name and f_geometry_column = column_name LOOP
-		okay := 't';
-	END LOOP;
-	IF (okay <> 't') THEN
-		RAISE EXCEPTION 'column not found in geometry_columns table';
-		RETURN 'f';
-	END IF;
-
-	-- Update ref from geometry_columns table
-	EXECUTE 'UPDATE geometry_columns SET SRID = ' || new_srid::text ||
-		' where f_table_schema = ' ||
-		quote_literal(real_schema) || ' and f_table_name = ' ||
-		quote_literal(table_name)  || ' and f_geometry_column = ' ||
-		quote_literal(column_name);
-
-	-- Make up constraint name
-	cname = 'enforce_srid_'  || column_name;
-
-	-- Drop enforce_srid constraint
-	EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) ||
-		'.' || quote_ident(table_name) ||
-		' DROP constraint ' || quote_ident(cname);
-
-	-- Update geometries SRID
-	EXECUTE 'UPDATE ' || quote_ident(real_schema) ||
-		'.' || quote_ident(table_name) ||
-		' SET ' || quote_ident(column_name) ||
-		' = setSRID(' || quote_ident(column_name) ||
-		', ' || new_srid::text || ')';
-
-	-- Reset enforce_srid constraint
-	EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) ||
-		'.' || quote_ident(table_name) ||
-		' ADD constraint ' || quote_ident(cname) ||
-		' CHECK (srid(' || quote_ident(column_name) ||
-		') = ' || new_srid::text || ')';
-
-	RETURN real_schema || '.' || table_name || '.' || column_name ||' SRID changed to ' || new_srid::text;
-
-END;
-$_$;
-
-
-ALTER FUNCTION public.updategeometrysrid(character varying, character varying, character varying, character varying, integer) OWNER TO postgres;
-
---
--- TOC entry 788 (class 1255 OID 19145)
--- Dependencies: 6 1096
--- Name: width(chip); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION width(chip) RETURNS integer
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'CHIP_getWidth';
-
-
-ALTER FUNCTION public.width(chip) OWNER TO postgres;
-
---
--- TOC entry 789 (class 1255 OID 19146)
--- Dependencies: 1102 1102 6
--- Name: within(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION within(geometry, geometry) RETURNS boolean
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'within';
-
-
-ALTER FUNCTION public.within(geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 790 (class 1255 OID 19147)
--- Dependencies: 6 1102
--- Name: x(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION x(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_x_point';
-
-
-ALTER FUNCTION public.x(geometry) OWNER TO postgres;
-
---
--- TOC entry 791 (class 1255 OID 19148)
--- Dependencies: 6 1090
--- Name: xmax(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION xmax(box3d) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_xmax';
-
-
-ALTER FUNCTION public.xmax(box3d) OWNER TO postgres;
-
---
--- TOC entry 792 (class 1255 OID 19149)
--- Dependencies: 1090 6
--- Name: xmin(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION xmin(box3d) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_xmin';
-
-
-ALTER FUNCTION public.xmin(box3d) OWNER TO postgres;
-
---
--- TOC entry 793 (class 1255 OID 19150)
--- Dependencies: 6 1102
--- Name: y(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION y(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_y_point';
-
-
-ALTER FUNCTION public.y(geometry) OWNER TO postgres;
-
---
--- TOC entry 794 (class 1255 OID 19151)
--- Dependencies: 1090 6
--- Name: ymax(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION ymax(box3d) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_ymax';
-
-
-ALTER FUNCTION public.ymax(box3d) OWNER TO postgres;
-
---
--- TOC entry 795 (class 1255 OID 19152)
--- Dependencies: 1090 6
--- Name: ymin(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION ymin(box3d) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_ymin';
-
-
-ALTER FUNCTION public.ymin(box3d) OWNER TO postgres;
-
---
--- TOC entry 796 (class 1255 OID 19153)
--- Dependencies: 1102 6
--- Name: z(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION z(geometry) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_z_point';
-
-
-ALTER FUNCTION public.z(geometry) OWNER TO postgres;
-
---
--- TOC entry 797 (class 1255 OID 19154)
--- Dependencies: 1090 6
--- Name: zmax(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION zmax(box3d) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_zmax';
-
-
-ALTER FUNCTION public.zmax(box3d) OWNER TO postgres;
-
---
--- TOC entry 798 (class 1255 OID 19155)
--- Dependencies: 6 1102
--- Name: zmflag(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION zmflag(geometry) RETURNS smallint
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_zmflag';
-
-
-ALTER FUNCTION public.zmflag(geometry) OWNER TO postgres;
-
---
--- TOC entry 799 (class 1255 OID 19156)
--- Dependencies: 1090 6
--- Name: zmin(box3d); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION zmin(box3d) RETURNS double precision
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'BOX3D_zmin';
-
-
-ALTER FUNCTION public.zmin(box3d) OWNER TO postgres;
-
---
--- TOC entry 1173 (class 1255 OID 19157)
--- Dependencies: 1104 1102 330 329 6
--- Name: accum(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE accum(geometry) (
-    SFUNC = pgis_geometry_accum_transfn,
-    STYPE = pgis_abs,
-    FINALFUNC = pgis_geometry_accum_finalfn
-);
-
-
-ALTER AGGREGATE public.accum(geometry) OWNER TO postgres;
-
---
--- TOC entry 1174 (class 1255 OID 19158)
--- Dependencies: 331 6 1102 1102 330
--- Name: collect(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE collect(geometry) (
-    SFUNC = pgis_geometry_accum_transfn,
-    STYPE = pgis_abs,
-    FINALFUNC = pgis_geometry_collect_finalfn
-);
-
-
-ALTER AGGREGATE public.collect(geometry) OWNER TO postgres;
-
---
--- TOC entry 1175 (class 1255 OID 19159)
--- Dependencies: 6 1102 500 1093
--- Name: extent(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE extent(geometry) (
-    SFUNC = public.st_combine_bbox,
-    STYPE = box3d_extent
-);
-
-
-ALTER AGGREGATE public.extent(geometry) OWNER TO postgres;
-
---
--- TOC entry 1176 (class 1255 OID 19160)
--- Dependencies: 124 1102 1090 6
--- Name: extent3d(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE extent3d(geometry) (
-    SFUNC = public.combine_bbox,
-    STYPE = box3d
-);
-
-
-ALTER AGGREGATE public.extent3d(geometry) OWNER TO postgres;
-
---
--- TOC entry 1177 (class 1255 OID 19161)
--- Dependencies: 1102 6 1102 330 332
--- Name: makeline(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE makeline(geometry) (
-    SFUNC = pgis_geometry_accum_transfn,
-    STYPE = pgis_abs,
-    FINALFUNC = pgis_geometry_makeline_finalfn
-);
-
-
-ALTER AGGREGATE public.makeline(geometry) OWNER TO postgres;
-
---
--- TOC entry 1178 (class 1255 OID 19162)
--- Dependencies: 1102 496 1102 6
--- Name: memcollect(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE memcollect(geometry) (
-    SFUNC = public.st_collect,
-    STYPE = geometry
-);
-
-
-ALTER AGGREGATE public.memcollect(geometry) OWNER TO postgres;
-
---
--- TOC entry 1179 (class 1255 OID 19163)
--- Dependencies: 231 1102 1102 6
--- Name: memgeomunion(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE memgeomunion(geometry) (
-    SFUNC = geomunion,
-    STYPE = geometry
-);
-
-
-ALTER AGGREGATE public.memgeomunion(geometry) OWNER TO postgres;
-
---
--- TOC entry 1180 (class 1255 OID 19164)
--- Dependencies: 6 333 330 1102 1102
--- Name: polygonize(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE polygonize(geometry) (
-    SFUNC = pgis_geometry_accum_transfn,
-    STYPE = pgis_abs,
-    FINALFUNC = pgis_geometry_polygonize_finalfn
-);
-
-
-ALTER AGGREGATE public.polygonize(geometry) OWNER TO postgres;
-
---
--- TOC entry 1181 (class 1255 OID 19165)
--- Dependencies: 329 330 1102 1104 6
--- Name: st_accum(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE st_accum(geometry) (
-    SFUNC = pgis_geometry_accum_transfn,
-    STYPE = pgis_abs,
-    FINALFUNC = pgis_geometry_accum_finalfn
-);
-
-
-ALTER AGGREGATE public.st_accum(geometry) OWNER TO postgres;
-
---
--- TOC entry 1182 (class 1255 OID 19166)
--- Dependencies: 331 330 1102 1102 6
--- Name: st_collect(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE st_collect(geometry) (
-    SFUNC = pgis_geometry_accum_transfn,
-    STYPE = pgis_abs,
-    FINALFUNC = pgis_geometry_collect_finalfn
-);
-
-
-ALTER AGGREGATE public.st_collect(geometry) OWNER TO postgres;
-
---
--- TOC entry 1183 (class 1255 OID 19167)
--- Dependencies: 500 1102 1093 6
--- Name: st_extent(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE st_extent(geometry) (
-    SFUNC = public.st_combine_bbox,
-    STYPE = box3d_extent
-);
-
-
-ALTER AGGREGATE public.st_extent(geometry) OWNER TO postgres;
-
---
--- TOC entry 1169 (class 1255 OID 19168)
--- Dependencies: 501 1102 1090 6
--- Name: st_extent3d(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE st_extent3d(geometry) (
-    SFUNC = public.st_combine_bbox,
-    STYPE = box3d
-);
-
-
-ALTER AGGREGATE public.st_extent3d(geometry) OWNER TO postgres;
-
---
--- TOC entry 1170 (class 1255 OID 19169)
--- Dependencies: 1102 6 330 332 1102
--- Name: st_makeline(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE st_makeline(geometry) (
-    SFUNC = pgis_geometry_accum_transfn,
-    STYPE = pgis_abs,
-    FINALFUNC = pgis_geometry_makeline_finalfn
-);
-
-
-ALTER AGGREGATE public.st_makeline(geometry) OWNER TO postgres;
-
---
--- TOC entry 1171 (class 1255 OID 19170)
--- Dependencies: 6 496 1102 1102
--- Name: st_memcollect(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE st_memcollect(geometry) (
-    SFUNC = public.st_collect,
-    STYPE = geometry
-);
-
-
-ALTER AGGREGATE public.st_memcollect(geometry) OWNER TO postgres;
-
---
--- TOC entry 1172 (class 1255 OID 19171)
--- Dependencies: 756 6 1102 1102
--- Name: st_memunion(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE st_memunion(geometry) (
-    SFUNC = public.st_union,
-    STYPE = geometry
-);
-
-
-ALTER AGGREGATE public.st_memunion(geometry) OWNER TO postgres;
-
---
--- TOC entry 1184 (class 1255 OID 19172)
--- Dependencies: 330 333 1102 1102 6
--- Name: st_polygonize(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE st_polygonize(geometry) (
-    SFUNC = pgis_geometry_accum_transfn,
-    STYPE = pgis_abs,
-    FINALFUNC = pgis_geometry_polygonize_finalfn
-);
-
-
-ALTER AGGREGATE public.st_polygonize(geometry) OWNER TO postgres;
-
---
--- TOC entry 1185 (class 1255 OID 19173)
--- Dependencies: 330 334 1102 1102 6
--- Name: st_union(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
---
-
-CREATE AGGREGATE st_union(geometry) (
-    SFUNC = pgis_geometry_accum_transfn,
-    STYPE = pgis_abs,
-    FINALFUNC = pgis_geometry_union_finalfn
-);
-
-
-ALTER AGGREGATE public.st_union(geometry) OWNER TO postgres;
-
---
--- TOC entry 1891 (class 2617 OID 19174)
--- Dependencies: 215 6 1102 1102 208 207
--- Name: &&; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR && (
-    PROCEDURE = geometry_overlap,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = &&,
-    RESTRICT = geometry_gist_sel,
-    JOIN = geometry_gist_joinsel
-);
-
-
-ALTER OPERATOR public.&& (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1892 (class 2617 OID 19175)
--- Dependencies: 6 176 180 185 1099 1099
--- Name: &&; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR && (
-    PROCEDURE = geography_overlaps,
-    LEFTARG = geography,
-    RIGHTARG = geography,
-    COMMUTATOR = &&,
-    RESTRICT = geography_gist_selectivity,
-    JOIN = geography_gist_join_selectivity
-);
-
-
-ALTER OPERATOR public.&& (geography, geography) OWNER TO postgres;
-
---
--- TOC entry 1893 (class 2617 OID 19177)
--- Dependencies: 1102 6 1102 216
--- Name: &<; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR &< (
-    PROCEDURE = geometry_overleft,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = &>,
-    RESTRICT = positionsel,
-    JOIN = positionjoinsel
-);
-
-
-ALTER OPERATOR public.&< (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1894 (class 2617 OID 19179)
--- Dependencies: 1102 214 1102 6
--- Name: &<|; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR &<| (
-    PROCEDURE = geometry_overbelow,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = |&>,
-    RESTRICT = positionsel,
-    JOIN = positionjoinsel
-);
-
-
-ALTER OPERATOR public.&<| (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1895 (class 2617 OID 19176)
--- Dependencies: 1102 217 6 1102
--- Name: &>; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR &> (
-    PROCEDURE = geometry_overright,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = &<,
-    RESTRICT = positionsel,
-    JOIN = positionjoinsel
-);
-
-
-ALTER OPERATOR public.&> (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1896 (class 2617 OID 19182)
--- Dependencies: 6 1102 1102 212
--- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR < (
-    PROCEDURE = geometry_lt,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = >,
-    NEGATOR = >=,
-    RESTRICT = contsel,
-    JOIN = contjoinsel
-);
-
-
-ALTER OPERATOR public.< (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1899 (class 2617 OID 19185)
--- Dependencies: 1099 6 1099 184
--- Name: <; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR < (
-    PROCEDURE = geography_lt,
-    LEFTARG = geography,
-    RIGHTARG = geography,
-    COMMUTATOR = >,
-    NEGATOR = >=,
-    RESTRICT = contsel,
-    JOIN = contjoinsel
-);
-
-
-ALTER OPERATOR public.< (geography, geography) OWNER TO postgres;
-
---
--- TOC entry 1900 (class 2617 OID 19187)
--- Dependencies: 1102 6 1102 211
--- Name: <<; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR << (
-    PROCEDURE = geometry_left,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = >>,
-    RESTRICT = positionsel,
-    JOIN = positionjoinsel
-);
-
-
-ALTER OPERATOR public.<< (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1901 (class 2617 OID 19189)
--- Dependencies: 6 1102 1102 201
--- Name: <<|; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR <<| (
-    PROCEDURE = geometry_below,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = |>>,
-    RESTRICT = positionsel,
-    JOIN = positionjoinsel
-);
-
-
-ALTER OPERATOR public.<<| (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1902 (class 2617 OID 19190)
--- Dependencies: 1102 6 210 1102
--- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR <= (
-    PROCEDURE = geometry_le,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = >=,
-    NEGATOR = >,
-    RESTRICT = contsel,
-    JOIN = contjoinsel
-);
-
-
-ALTER OPERATOR public.<= (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1903 (class 2617 OID 19191)
--- Dependencies: 183 1099 1099 6
--- Name: <=; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR <= (
-    PROCEDURE = geography_le,
-    LEFTARG = geography,
-    RIGHTARG = geography,
-    COMMUTATOR = >=,
-    NEGATOR = >,
-    RESTRICT = contsel,
-    JOIN = contjoinsel
-);
-
-
-ALTER OPERATOR public.<= (geography, geography) OWNER TO postgres;
-
---
--- TOC entry 1904 (class 2617 OID 19192)
--- Dependencies: 205 6 1102 1102
--- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR = (
-    PROCEDURE = geometry_eq,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = =,
-    RESTRICT = contsel,
-    JOIN = contjoinsel
-);
-
-
-ALTER OPERATOR public.= (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1905 (class 2617 OID 19193)
--- Dependencies: 1099 171 1099 6
--- Name: =; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR = (
-    PROCEDURE = geography_eq,
-    LEFTARG = geography,
-    RIGHTARG = geography,
-    COMMUTATOR = =,
-    RESTRICT = contsel,
-    JOIN = contjoinsel
-);
-
-
-ALTER OPERATOR public.= (geography, geography) OWNER TO postgres;
-
---
--- TOC entry 1897 (class 2617 OID 19180)
--- Dependencies: 209 6 1102 1102
--- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR > (
-    PROCEDURE = geometry_gt,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = <,
-    NEGATOR = <=,
-    RESTRICT = contsel,
-    JOIN = contjoinsel
-);
-
-
-ALTER OPERATOR public.> (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1906 (class 2617 OID 19183)
--- Dependencies: 1099 1099 6 182
--- Name: >; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR > (
-    PROCEDURE = geography_gt,
-    LEFTARG = geography,
-    RIGHTARG = geography,
-    COMMUTATOR = <,
-    NEGATOR = <=,
-    RESTRICT = contsel,
-    JOIN = contjoinsel
-);
-
-
-ALTER OPERATOR public.> (geography, geography) OWNER TO postgres;
-
---
--- TOC entry 1907 (class 2617 OID 19181)
--- Dependencies: 206 1102 1102 6
--- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR >= (
-    PROCEDURE = geometry_ge,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = <=,
-    NEGATOR = <,
-    RESTRICT = contsel,
-    JOIN = contjoinsel
-);
-
-
-ALTER OPERATOR public.>= (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1908 (class 2617 OID 19184)
--- Dependencies: 6 1099 1099 172
--- Name: >=; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR >= (
-    PROCEDURE = geography_ge,
-    LEFTARG = geography,
-    RIGHTARG = geography,
-    COMMUTATOR = <=,
-    NEGATOR = <,
-    RESTRICT = contsel,
-    JOIN = contjoinsel
-);
-
-
-ALTER OPERATOR public.>= (geography, geography) OWNER TO postgres;
-
---
--- TOC entry 1909 (class 2617 OID 19186)
--- Dependencies: 6 218 1102 1102
--- Name: >>; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR >> (
-    PROCEDURE = geometry_right,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = <<,
-    RESTRICT = positionsel,
-    JOIN = positionjoinsel
-);
-
-
-ALTER OPERATOR public.>> (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1910 (class 2617 OID 19195)
--- Dependencies: 1102 6 204 1102
--- Name: @; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR @ (
-    PROCEDURE = geometry_contained,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = ~,
-    RESTRICT = contsel,
-    JOIN = contjoinsel
-);
-
-
-ALTER OPERATOR public.@ (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1898 (class 2617 OID 19178)
--- Dependencies: 1102 1102 213 6
--- Name: |&>; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR |&> (
-    PROCEDURE = geometry_overabove,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = &<|,
-    RESTRICT = positionsel,
-    JOIN = positionjoinsel
-);
-
-
-ALTER OPERATOR public.|&> (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1911 (class 2617 OID 19188)
--- Dependencies: 200 1102 6 1102
--- Name: |>>; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR |>> (
-    PROCEDURE = geometry_above,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = <<|,
-    RESTRICT = positionsel,
-    JOIN = positionjoinsel
-);
-
-
-ALTER OPERATOR public.|>> (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1912 (class 2617 OID 19194)
--- Dependencies: 6 1102 1102 203
--- Name: ~; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR ~ (
-    PROCEDURE = geometry_contain,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = @,
-    RESTRICT = contsel,
-    JOIN = contjoinsel
-);
-
-
-ALTER OPERATOR public.~ (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 1913 (class 2617 OID 19196)
--- Dependencies: 1102 220 6 1102
--- Name: ~=; Type: OPERATOR; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR ~= (
-    PROCEDURE = geometry_samebox,
-    LEFTARG = geometry,
-    RIGHTARG = geometry,
-    COMMUTATOR = ~=,
-    RESTRICT = eqsel,
-    JOIN = eqjoinsel
-);
-
-
-ALTER OPERATOR public.~= (geometry, geometry) OWNER TO postgres;
-
---
--- TOC entry 2026 (class 2616 OID 19198)
--- Dependencies: 2137 6 1099
--- Name: btree_geography_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR CLASS btree_geography_ops
-    DEFAULT FOR TYPE geography USING btree AS
-    OPERATOR 1 <(geography,geography) ,
-    OPERATOR 2 <=(geography,geography) ,
-    OPERATOR 3 =(geography,geography) ,
-    OPERATOR 4 >=(geography,geography) ,
-    OPERATOR 5 >(geography,geography) ,
-    FUNCTION 1 geography_cmp(geography,geography);
-
-
-ALTER OPERATOR CLASS public.btree_geography_ops USING btree OWNER TO postgres;
-
---
--- TOC entry 2027 (class 2616 OID 19206)
--- Dependencies: 1102 2138 6
--- Name: btree_geometry_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR CLASS btree_geometry_ops
-    DEFAULT FOR TYPE geometry USING btree AS
-    OPERATOR 1 <(geometry,geometry) ,
-    OPERATOR 2 <=(geometry,geometry) ,
-    OPERATOR 3 =(geometry,geometry) ,
-    OPERATOR 4 >=(geometry,geometry) ,
-    OPERATOR 5 >(geometry,geometry) ,
-    FUNCTION 1 geometry_cmp(geometry,geometry);
-
-
-ALTER OPERATOR CLASS public.btree_geometry_ops USING btree OWNER TO postgres;
-
---
--- TOC entry 2028 (class 2616 OID 19214)
--- Dependencies: 1099 1107 6 2139
--- Name: gist_geography_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR CLASS gist_geography_ops
-    DEFAULT FOR TYPE geography USING gist AS
-    STORAGE gidx ,
-    OPERATOR 3 &&(geography,geography) ,
-    FUNCTION 1 geography_gist_consistent(internal,geometry,integer) ,
-    FUNCTION 2 geography_gist_union(bytea,internal) ,
-    FUNCTION 3 geography_gist_compress(internal) ,
-    FUNCTION 4 geography_gist_decompress(internal) ,
-    FUNCTION 5 geography_gist_penalty(internal,internal,internal) ,
-    FUNCTION 6 geography_gist_picksplit(internal,internal) ,
-    FUNCTION 7 geography_gist_same(box2d,box2d,internal);
-
-
-ALTER OPERATOR CLASS public.gist_geography_ops USING gist OWNER TO postgres;
-
---
--- TOC entry 2029 (class 2616 OID 19224)
--- Dependencies: 2140 6 1087 1102
--- Name: gist_geometry_ops; Type: OPERATOR CLASS; Schema: public; Owner: postgres
---
-
-CREATE OPERATOR CLASS gist_geometry_ops
-    DEFAULT FOR TYPE geometry USING gist AS
-    STORAGE box2d ,
-    OPERATOR 1 <<(geometry,geometry) ,
-    OPERATOR 2 &<(geometry,geometry) ,
-    OPERATOR 3 &&(geometry,geometry) ,
-    OPERATOR 4 &>(geometry,geometry) ,
-    OPERATOR 5 >>(geometry,geometry) ,
-    OPERATOR 6 ~=(geometry,geometry) ,
-    OPERATOR 7 ~(geometry,geometry) ,
-    OPERATOR 8 @(geometry,geometry) ,
-    OPERATOR 9 &<|(geometry,geometry) ,
-    OPERATOR 10 <<|(geometry,geometry) ,
-    OPERATOR 11 |>>(geometry,geometry) ,
-    OPERATOR 12 |&>(geometry,geometry) ,
-    FUNCTION 1 lwgeom_gist_consistent(internal,geometry,integer) ,
-    FUNCTION 2 lwgeom_gist_union(bytea,internal) ,
-    FUNCTION 3 lwgeom_gist_compress(internal) ,
-    FUNCTION 4 lwgeom_gist_decompress(internal) ,
-    FUNCTION 5 lwgeom_gist_penalty(internal,internal,internal) ,
-    FUNCTION 6 lwgeom_gist_picksplit(internal,internal) ,
-    FUNCTION 7 lwgeom_gist_same(box2d,box2d,internal);
-
-
-ALTER OPERATOR CLASS public.gist_geometry_ops USING gist OWNER TO postgres;
-
-SET search_path = pg_catalog;
-
---
--- TOC entry 2708 (class 2605 OID 19244)
--- Dependencies: 110 110 1087 1090
--- Name: CAST (public.box2d AS public.box3d); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.box2d AS public.box3d) WITH FUNCTION public.box3d(public.box2d) AS IMPLICIT;
-
-
---
--- TOC entry 2709 (class 2605 OID 19245)
--- Dependencies: 194 194 1102 1087
--- Name: CAST (public.box2d AS public.geometry); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.box2d AS public.geometry) WITH FUNCTION public.geometry(public.box2d) AS IMPLICIT;
-
-
---
--- TOC entry 2710 (class 2605 OID 19246)
--- Dependencies: 105 1090 105
--- Name: CAST (public.box3d AS box); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.box3d AS box) WITH FUNCTION public.box(public.box3d) AS IMPLICIT;
-
-
---
--- TOC entry 2711 (class 2605 OID 19247)
--- Dependencies: 108 1087 1090 108
--- Name: CAST (public.box3d AS public.box2d); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.box3d AS public.box2d) WITH FUNCTION public.box2d(public.box3d) AS IMPLICIT;
-
-
---
--- TOC entry 2712 (class 2605 OID 19248)
--- Dependencies: 195 1102 1090 195
--- Name: CAST (public.box3d AS public.geometry); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.box3d AS public.geometry) WITH FUNCTION public.geometry(public.box3d) AS IMPLICIT;
-
-
---
--- TOC entry 2713 (class 2605 OID 19249)
--- Dependencies: 106 106 1087 1093
--- Name: CAST (public.box3d_extent AS public.box2d); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.box3d_extent AS public.box2d) WITH FUNCTION public.box2d(public.box3d_extent) AS IMPLICIT;
-
-
---
--- TOC entry 2714 (class 2605 OID 19250)
--- Dependencies: 111 1093 1090 111
--- Name: CAST (public.box3d_extent AS public.box3d); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.box3d_extent AS public.box3d) WITH FUNCTION public.box3d_extent(public.box3d_extent) AS IMPLICIT;
-
-
---
--- TOC entry 2715 (class 2605 OID 19251)
--- Dependencies: 193 1093 1102 193
--- Name: CAST (public.box3d_extent AS public.geometry); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.box3d_extent AS public.geometry) WITH FUNCTION public.geometry(public.box3d_extent) AS IMPLICIT;
-
-
---
--- TOC entry 2519 (class 2605 OID 19252)
--- Dependencies: 198 1102 198
--- Name: CAST (bytea AS public.geometry); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (bytea AS public.geometry) WITH FUNCTION public.geometry(bytea) AS IMPLICIT;
-
-
---
--- TOC entry 2716 (class 2605 OID 19253)
--- Dependencies: 197 197 1096 1102
--- Name: CAST (public.chip AS public.geometry); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.chip AS public.geometry) WITH FUNCTION public.geometry(public.chip) AS IMPLICIT;
-
-
---
--- TOC entry 2717 (class 2605 OID 19254)
--- Dependencies: 168 1099 168 1099
--- Name: CAST (public.geography AS public.geography); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.geography AS public.geography) WITH FUNCTION public.geography(public.geography, integer, boolean) AS IMPLICIT;
-
-
---
--- TOC entry 2718 (class 2605 OID 19255)
--- Dependencies: 199 1102 199 1099
--- Name: CAST (public.geography AS public.geometry); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.geography AS public.geometry) WITH FUNCTION public.geometry(public.geography);
-
-
---
--- TOC entry 2721 (class 2605 OID 19256)
--- Dependencies: 104 1102 104
--- Name: CAST (public.geometry AS box); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.geometry AS box) WITH FUNCTION public.box(public.geometry) AS IMPLICIT;
-
-
---
--- TOC entry 2722 (class 2605 OID 19257)
--- Dependencies: 107 1087 1102 107
--- Name: CAST (public.geometry AS public.box2d); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.geometry AS public.box2d) WITH FUNCTION public.box2d(public.geometry) AS IMPLICIT;
-
-
---
--- TOC entry 2723 (class 2605 OID 19258)
--- Dependencies: 109 1090 1102 109
--- Name: CAST (public.geometry AS public.box3d); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.geometry AS public.box3d) WITH FUNCTION public.box3d(public.geometry) AS IMPLICIT;
-
-
---
--- TOC entry 2719 (class 2605 OID 19259)
--- Dependencies: 116 1102 116
--- Name: CAST (public.geometry AS bytea); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.geometry AS bytea) WITH FUNCTION public.bytea(public.geometry) AS IMPLICIT;
-
-
---
--- TOC entry 2724 (class 2605 OID 19260)
--- Dependencies: 169 1099 1102 169
--- Name: CAST (public.geometry AS public.geography); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.geometry AS public.geography) WITH FUNCTION public.geography(public.geometry) AS IMPLICIT;
-
-
---
--- TOC entry 2720 (class 2605 OID 19261)
--- Dependencies: 777 1102 777
--- Name: CAST (public.geometry AS text); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (public.geometry AS text) WITH FUNCTION public.text(public.geometry) AS IMPLICIT;
-
-
---
--- TOC entry 2585 (class 2605 OID 19262)
--- Dependencies: 196 196 1102
--- Name: CAST (text AS public.geometry); Type: CAST; Schema: pg_catalog; Owner: 
---
-
-CREATE CAST (text AS public.geometry) WITH FUNCTION public.geometry(text) AS IMPLICIT;
-
-
-SET search_path = public, pg_catalog;
-
-SET default_tablespace = '';
-
-SET default_with_oids = false;
-
---
--- TOC entry 2423 (class 1259 OID 40481)
--- Dependencies: 6
--- Name: agency; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE agency (
-    agency_name text NOT NULL,
-    agency_url text,
-    agency_timezone text,
-    agency_lang text,
-    agency_phone text
-);
-
-
-ALTER TABLE public.agency OWNER TO postgres;
-
---
--- TOC entry 2409 (class 1259 OID 19269)
--- Dependencies: 6
--- Name: calendar; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE calendar (
-    service_id text NOT NULL,
-    start_date text,
-    end_date text,
-    monday integer,
-    tuesday integer,
-    wednesday integer,
-    thursday integer,
-    friday integer,
-    saturday integer,
-    sunday integer
-);
-
-
-ALTER TABLE public.calendar OWNER TO postgres;
-
---
--- TOC entry 2410 (class 1259 OID 19275)
--- Dependencies: 6
--- Name: calendar_dates; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE calendar_dates (
-    service_id text NOT NULL,
-    date text NOT NULL,
-    exception_type text
-);
-
-
-ALTER TABLE public.calendar_dates OWNER TO postgres;
-
---
--- TOC entry 2411 (class 1259 OID 19281)
--- Dependencies: 2514 6
--- Name: geography_columns; Type: VIEW; Schema: public; Owner: postgres
---
-
-CREATE VIEW geography_columns AS
-    SELECT current_database() AS f_table_catalog, n.nspname AS f_table_schema, c.relname AS f_table_name, a.attname AS f_geography_column, geography_typmod_dims(a.atttypmod) AS coord_dimension, geography_typmod_srid(a.atttypmod) AS srid, geography_typmod_type(a.atttypmod) AS type FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE ((((((c.relkind = ANY (ARRAY['r'::"char", 'v'::"char"])) AND (t.typname = 'geography'::name)) AND (a.attisdropped = false)) AND (a.atttypid = t.oid)) AND (a.attrelid = c.oid)) AND (c.relnamespace = n.oid));
-
-
-ALTER TABLE public.geography_columns OWNER TO postgres;
-
-SET default_with_oids = true;
-
---
--- TOC entry 2412 (class 1259 OID 19286)
--- Dependencies: 6
--- Name: geometry_columns; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE geometry_columns (
-    f_table_catalog character varying(256) NOT NULL,
-    f_table_schema character varying(256) NOT NULL,
-    f_table_name character varying(256) NOT NULL,
-    f_geometry_column character varying(256) NOT NULL,
-    coord_dimension integer NOT NULL,
-    srid integer NOT NULL,
-    type character varying(30) NOT NULL
-);
-
-
-ALTER TABLE public.geometry_columns OWNER TO postgres;
-
-SET default_with_oids = false;
-
---
--- TOC entry 2413 (class 1259 OID 19292)
--- Dependencies: 6
--- Name: myway_observations; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE myway_observations (
-    observation_id text NOT NULL,
-    myway_stop text,
-    "time" timestamp with time zone,
-    myway_route text
-);
-
-
-ALTER TABLE public.myway_observations OWNER TO postgres;
-
---
--- TOC entry 2427 (class 1259 OID 40519)
--- Dependencies: 6
--- Name: myway_routes; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE myway_routes (
-    myway_route text NOT NULL,
-    route_short_name text,
-    trip_headsign text
-);
-
-
-ALTER TABLE public.myway_routes OWNER TO postgres;
-
---
--- TOC entry 2424 (class 1259 OID 40489)
--- Dependencies: 6
--- Name: myway_stops; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE myway_stops (
-    myway_stop text NOT NULL,
-    stop_id text
-);
-
-
-ALTER TABLE public.myway_stops OWNER TO postgres;
-
---
--- TOC entry 2425 (class 1259 OID 40498)
--- Dependencies: 6
--- Name: myway_timingdeltas; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE myway_timingdeltas (
-    observation_id text NOT NULL,
-    route_id text,
-    stop_id text,
-    timing_delta integer,
-    "time" time with time zone,
-    date date,
-    timing_period text,
-    stop_sequence integer,
-    myway_stop text,
-    route_name text
-);
-
-
-ALTER TABLE public.myway_timingdeltas OWNER TO postgres;
-
---
--- TOC entry 2426 (class 1259 OID 40504)
--- Dependencies: 6 2425
--- Name: myway_timingdeltas_timing_period_seq; Type: SEQUENCE; Schema: public; Owner: postgres
---
-
-CREATE SEQUENCE myway_timingdeltas_timing_period_seq
-    START WITH 1
-    INCREMENT BY 1
-    NO MINVALUE
-    NO MAXVALUE
-    CACHE 1;
-
-
-ALTER TABLE public.myway_timingdeltas_timing_period_seq OWNER TO postgres;
-
---
--- TOC entry 2771 (class 0 OID 0)
--- Dependencies: 2426
--- Name: myway_timingdeltas_timing_period_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
---
-
-ALTER SEQUENCE myway_timingdeltas_timing_period_seq OWNED BY myway_timingdeltas.timing_period;
-
-
---
--- TOC entry 2420 (class 1259 OID 40443)
--- Dependencies: 6
--- Name: routes; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE routes (
-    route_id text NOT NULL,
-    route_short_name text,
-    route_long_name text,
-    route_desc text,
-    route_type integer,
-    route_url text,
-    route_text_color text,
-    route_color text
-);
-
-
-ALTER TABLE public.routes OWNER TO postgres;
-
---
--- TOC entry 2414 (class 1259 OID 19328)
--- Dependencies: 6
--- Name: servicealerts_alerts; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE servicealerts_alerts (
-    id integer NOT NULL,
-    url text,
-    description text,
-    start timestamp with time zone,
-    "end" timestamp with time zone,
-    cause text,
-    effect text,
-    header text
-);
-
-
-ALTER TABLE public.servicealerts_alerts OWNER TO postgres;
-
---
--- TOC entry 2415 (class 1259 OID 19334)
--- Dependencies: 2414 6
--- Name: servicealerts_alerts_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
---
-
-CREATE SEQUENCE servicealerts_alerts_id_seq
-    START WITH 1
-    INCREMENT BY 1
-    NO MINVALUE
-    NO MAXVALUE
-    CACHE 1;
-
-
-ALTER TABLE public.servicealerts_alerts_id_seq OWNER TO postgres;
-
---
--- TOC entry 2772 (class 0 OID 0)
--- Dependencies: 2415
--- Name: servicealerts_alerts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
---
-
-ALTER SEQUENCE servicealerts_alerts_id_seq OWNED BY servicealerts_alerts.id;
-
-
---
--- TOC entry 2416 (class 1259 OID 19336)
--- Dependencies: 6
--- Name: servicealerts_informed; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE servicealerts_informed (
-    servicealert_id integer NOT NULL,
-    informed_class text NOT NULL,
-    informed_id text NOT NULL,
-    informed_action text
-);
-
-
-ALTER TABLE public.servicealerts_informed OWNER TO postgres;
-
---
--- TOC entry 2417 (class 1259 OID 19342)
--- Dependencies: 6
--- Name: shapes; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE shapes (
-    shape_id text NOT NULL,
-    shape_pt_lat double precision,
-    shape_pt_lon double precision,
-    shape_pt_sequence integer NOT NULL,
-    shape_dist_traveled integer,
-    shape_pt geography,
-);
-
-
-ALTER TABLE public.shapes OWNER TO postgres;
-
---
--- TOC entry 2418 (class 1259 OID 19348)
--- Dependencies: 6
--- Name: spatial_ref_sys; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE spatial_ref_sys (
-    srid integer NOT NULL,
-    auth_name character varying(256),
-    auth_srid integer,
-    srtext character varying(2048),
-    proj4text character varying(2048)
-);
-
-
-ALTER TABLE public.spatial_ref_sys OWNER TO postgres;
-
---
--- TOC entry 2419 (class 1259 OID 20682)
--- Dependencies: 6
--- Name: stop_times; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE stop_times (
-    trip_id text NOT NULL,
-    arrival_time time without time zone,
-    departure_time time without time zone,
-    stop_id text,
-    stop_sequence integer NOT NULL,
-    stop_headsign text,
-    pickup_type text,
-    drop_off_type text,
-    shape_dist_travelled text
-);
-
-
-ALTER TABLE public.stop_times OWNER TO postgres;
-
---
--- TOC entry 2421 (class 1259 OID 40452)
--- Dependencies: 6 1099
--- Name: stops; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE stops (
-    stop_id text NOT NULL,
-    stop_code text,
-    stop_name text,
-    stop_desc text,
-    stop_lat double precision,
-    stop_lon double precision,
-    zone_id text,
-    stop_url text,
-    location_type integer,
-    "position" geography
-);
-
-
-ALTER TABLE public.stops OWNER TO postgres;
-
---
--- TOC entry 2422 (class 1259 OID 40466)
--- Dependencies: 6
--- Name: trips; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE TABLE trips (
-    route_id text,
-    service_id text,
-    trip_id text NOT NULL,
-    trip_headsign text,
-    direction_id text,
-    block_id text,
-    shape_id text
-);
-
-
-ALTER TABLE public.trips OWNER TO postgres;
-
---
--- TOC entry 2725 (class 2604 OID 19372)
--- Dependencies: 2415 2414
--- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
---
-
-ALTER TABLE servicealerts_alerts ALTER COLUMN id SET DEFAULT nextval('servicealerts_alerts_id_seq'::regclass);
-
-
---
--- TOC entry 2758 (class 2606 OID 40488)
--- Dependencies: 2423 2423
--- Name: agency_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY agency
-    ADD CONSTRAINT agency_pkey PRIMARY KEY (agency_name);
-
-
---
--- TOC entry 2729 (class 2606 OID 19376)
--- Dependencies: 2410 2410 2410
--- Name: calendar_dates_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY calendar_dates
-    ADD CONSTRAINT calendar_dates_pkey PRIMARY KEY (service_id, date);
-
-
---
--- TOC entry 2727 (class 2606 OID 19378)
--- Dependencies: 2409 2409
--- Name: calendar_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY calendar
-    ADD CONSTRAINT calendar_pkey PRIMARY KEY (service_id);
-
-
---
--- TOC entry 2731 (class 2606 OID 19380)
--- Dependencies: 2412 2412 2412 2412 2412
--- Name: geometry_columns_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY geometry_columns
-    ADD CONSTRAINT geometry_columns_pk PRIMARY KEY (f_table_catalog, f_table_schema, f_table_name, f_geometry_column);
-
-
---
--- TOC entry 2733 (class 2606 OID 19382)
--- Dependencies: 2413 2413
--- Name: myway_observations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY myway_observations
-    ADD CONSTRAINT myway_observations_pkey PRIMARY KEY (observation_id);
-
-
---
--- TOC entry 2764 (class 2606 OID 40526)
--- Dependencies: 2427 2427
--- Name: myway_routes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY myway_routes
-    ADD CONSTRAINT myway_routes_pkey PRIMARY KEY (myway_route);
-
-
---
--- TOC entry 2762 (class 2606 OID 40507)
--- Dependencies: 2425 2425
--- Name: myway_timingdeltas_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY myway_timingdeltas
-    ADD CONSTRAINT myway_timingdeltas_pkey PRIMARY KEY (observation_id);
-
-
---
--- TOC entry 2760 (class 2606 OID 40496)
--- Dependencies: 2424 2424
--- Name: mywaystops_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY myway_stops
-    ADD CONSTRAINT mywaystops_pkey PRIMARY KEY (myway_stop);
-
-
---
--- TOC entry 2749 (class 2606 OID 40450)
--- Dependencies: 2420 2420
--- Name: routes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY routes
-    ADD CONSTRAINT routes_pkey PRIMARY KEY (route_id);
-
-
---
--- TOC entry 2735 (class 2606 OID 19392)
--- Dependencies: 2414 2414
--- Name: servicealerts_alerts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY servicealerts_alerts
-    ADD CONSTRAINT servicealerts_alerts_pkey PRIMARY KEY (id);
-
-
---
--- TOC entry 2737 (class 2606 OID 19394)
--- Dependencies: 2416 2416 2416 2416
--- Name: servicealerts_informed_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY servicealerts_informed
-    ADD CONSTRAINT servicealerts_informed_pkey PRIMARY KEY (servicealert_id, informed_class, informed_id);
-
-
---
--- TOC entry 2739 (class 2606 OID 19396)
--- Dependencies: 2417 2417 2417
--- Name: shapes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY shapes
-    ADD CONSTRAINT shapes_pkey PRIMARY KEY (shape_id, shape_pt_sequence);
-
-
---
--- TOC entry 2741 (class 2606 OID 19398)
--- Dependencies: 2418 2418
--- Name: spatial_ref_sys_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY spatial_ref_sys
-    ADD CONSTRAINT spatial_ref_sys_pkey PRIMARY KEY (srid);
-
-
---
--- TOC entry 2744 (class 2606 OID 40421)
--- Dependencies: 2419 2419 2419
--- Name: stop_times_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY stop_times
-    ADD CONSTRAINT stop_times_pkey PRIMARY KEY (trip_id, stop_sequence);
-
-
---
--- TOC entry 2751 (class 2606 OID 40459)
--- Dependencies: 2421 2421
--- Name: stops_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY stops
-    ADD CONSTRAINT stops_pkey PRIMARY KEY (stop_id);
-
-
---
--- TOC entry 2753 (class 2606 OID 40461)
--- Dependencies: 2421 2421
--- Name: stops_stop_code_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY stops
-    ADD CONSTRAINT stops_stop_code_key UNIQUE (stop_code);
-
-
---
--- TOC entry 2756 (class 2606 OID 40473)
--- Dependencies: 2422 2422
--- Name: trips_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
---
-
-ALTER TABLE ONLY trips
-    ADD CONSTRAINT trips_pkey PRIMARY KEY (trip_id);
-
-
---
--- TOC entry 2747 (class 1259 OID 40451)
--- Dependencies: 2420
--- Name: routenumber; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE INDEX routenumber ON routes USING btree (route_short_name);
-
-
---
--- TOC entry 2754 (class 1259 OID 40474)
--- Dependencies: 2422
--- Name: routetrips; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE INDEX routetrips ON trips USING btree (route_id);
-
-
---
--- TOC entry 2742 (class 1259 OID 40418)
--- Dependencies: 2419 2419 2419
--- Name: starttime; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE UNIQUE INDEX starttime ON stop_times USING btree (trip_id, stop_id, stop_sequence);
-
-
---
--- TOC entry 2745 (class 1259 OID 40406)
--- Dependencies: 2419 2419
--- Name: stoptimes; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE INDEX stoptimes ON stop_times USING btree (arrival_time, stop_id);
-
-
---
--- TOC entry 2746 (class 1259 OID 40419)
--- Dependencies: 2419 2419
--- Name: triptimes; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
---
-
-CREATE INDEX triptimes ON stop_times USING btree (trip_id, arrival_time);
-
-
---
--- TOC entry 2765 (class 2606 OID 19412)
--- Dependencies: 2734 2414 2416
--- Name: servicealerts_alertid; Type: FK CONSTRAINT; Schema: public; Owner: postgres
---
-
-ALTER TABLE ONLY servicealerts_informed
-    ADD CONSTRAINT servicealerts_alertid FOREIGN KEY (servicealert_id) REFERENCES servicealerts_alerts(id);
-
-
---
--- TOC entry 2770 (class 0 OID 0)
--- Dependencies: 6
--- Name: public; Type: ACL; Schema: -; Owner: postgres
---
-
-REVOKE ALL ON SCHEMA public FROM PUBLIC;
-REVOKE ALL ON SCHEMA public FROM postgres;
-GRANT ALL ON SCHEMA public TO postgres;
-GRANT ALL ON SCHEMA public TO PUBLIC;
-
-
--- Completed on 2011-10-11 23:16:12
-
---
--- PostgreSQL database dump complete
---
-
-

--- a/css/local.css.php
+++ b/css/local.css.php
@@ -55,7 +55,7 @@
     visibility: hidden;
     display: none;
     }
-    #servicewarning {
+    .servicewarning {
     padding: 1em;
     margin-bottom: 0.5em;
     text-size: 0.2em;

--- a/feedback.php
+++ b/feedback.php
@@ -5,25 +5,11 @@
 function sendEmail($topic, $message)
 {
 	$address = "maxious@lambdacomplex.org";
-	if (file_exists("/tmp/aws.php")) {
-		include_once ("lib/ses.php");
-		include_once ("/tmp/aws.php");
-		$con = new SimpleEmailService($accessKey, $secretKey);
-		//$con->verifyEmailAddress($address);
-		//$con->listVerifiedEmailAddresses();
-		$m = new SimpleEmailServiceMessage();
-		$m->addTo($address);
-		$m->setFrom($address);
-		$m->setSubject($topic);
-		$m->setMessageFromString($message);
-		$con->sendEmail($m);
-	}
-	else {
 		// In case any of our lines are larger than 70 characters, we should use wordwrap()
 		$message = wordwrap($message, 70);
 		// Send
 		mail($address, $topic, $message);
-	}
+
 }
 if (isset($_REQUEST['feedback']) || isset($_REQUEST['newlocation'])){
 	sendEmail("bus.lambda feedback",print_r($_REQUEST,true));
@@ -67,7 +53,7 @@
   echo "\nServer host/IP: ".php_uname("n");
   echo "\nCurrent date/time: ". date("c");
   echo "\nCurrent code revision: ".exec("git rev-parse --short HEAD");
-  echo "\nCurrent timetables version: ".date("c",@filemtime('cbrfeed.zip'));
+  echo "\nCurrent timetables version: ".date("c",@filemtime('../busresources/cbrfeed.zip'));
   echo "\nDump of session: ".print_r($_SESSION,true);
 ?>
 </textarea>

--- a/geo/route.kml.php
+++ b/geo/route.kml.php
@@ -1,30 +1,105 @@
 <?php
 header('Content-Type: application/vnd.google-earth.kml+xml');
 include ('../include/common.inc.php');
+header('Content-Disposition: attachment; filename="route.' . urlencode($routeid) . '.kml"');
+$debugOkay = Array(); // disable debugging output even on dev server
 echo '<?xml version="1.0" encoding="UTF-8"?>
 <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"><Document>';
 echo '
-    <Style id="yellowLineGreenPoly">
+     <Style id="ylw-pushpin">
+    <IconStyle>
+      <Icon>
+        <href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
+        
+      </Icon>
+    </IconStyle>
+    
+  </Style>
+          <Style id="blue-pushpin">
+    <IconStyle>
+      <Icon>
+        <href>http://maps.google.com/mapfiles/kml/pushpin/blue-pushpin.png</href>
+        
+      </Icon>
+    </IconStyle>
+    
+  </Style>
+          <Style id="grn-pushpin">
+    <IconStyle>
+      <Icon>
+        <href>http://maps.google.com/mapfiles/kml/pushpin/grn-pushpin.png</href>
+        
+      </Icon>
+    </IconStyle>
+  </Style>
+    <Style id="yellowLineYellowPoly">
       <LineStyle>
-        <color>7f00ff00</color>
+        <color>7f00ebff</color>
         <width>4</width>
       </LineStyle>
       <PolyStyle>
-        <color>7f00ffff</color>
+        <color>7f00ebff</color>
       </PolyStyle>
-	</Style>';
+	</Style>
+            <Style id="blueLineBluePoly">
+      <LineStyle>
+        <color>7fff0000</color>
+        <width>4</width>
+      </LineStyle>
+      <PolyStyle>
+        <color>7fff0000</color>
+      </PolyStyle>
+	</Style>
+        ';
 $route = getRoute($routeid);
- echo "\n<Placemark>\n";
- $link = curPageURL()."/../trip.php?routeid=".htmlspecialchars ($route["route_id"]);
- echo "<name>".$route['route_short_name']."</name>";
-  echo '<atom:link href="'.$link.'"/>';
- echo '<description><![CDATA[ <a href="'.$link.'">'.$route['route_short_name']." ".$route['route_long_name']."</a>]]> </description>";
-echo "<styleUrl>#yellowLineGreenPoly</styleUrl>";
+echo "\n<Placemark>\n";
+$_REQUEST['time'] = "12:00";
+$trip = getRouteNextTrip($routeid, 0);
+$link = curPageURL() . "/../trip.php?routeid=" . htmlspecialchars($route["route_id"]. "&directionid=0&tripid=".$trip['trip_id']) ;
+echo "<name>" . $route['route_short_name'] . " Direction 0 </name>";
+echo '<atom:link rel="related" href="' . $link . '"/>';
+echo '<description><![CDATA[ <a href="' . $link . '">' . $route['route_short_name'] . " Direction 0</a>]]> </description>";
+echo "<styleUrl>#yellowLineYellowPoly</styleUrl>";
 
-	$trip = getRouteNextTrip($routeid);
-	echo getTripShape($trip['trip_id']);
+echo getTripShape($trip['trip_id']);
+    echo "</Placemark>\n";
+$stops = Array();
+foreach (getTripStops($trip['trip_id']) as $stop) {
+    $stop['style'] = "#ylw-pushpin";
+    $stops[$stop['stop_id']] = $stop;
+}
 
-echo "</Placemark>\n</Document></kml>\n";
+
+echo "\n<Placemark>\n";
+$trip = getRouteNextTrip($routeid, 1);
+$link = curPageURL() . "/../trip.php?routeid=" . htmlspecialchars($route["route_id"]. "&directionid=1&tripid=".$trip['trip_id']) ;
+echo "<name>" . $route['route_short_name'] . " Direction 1 </name>";
+echo '<atom:link rel="related" href="' . $link . '"/>';
+echo '<description><![CDATA[ <a href="' . $link . '">' . $route['route_short_name'] . " Direction 1</a>]]> </description>";
+echo "<styleUrl>#blueLineBluePoly</styleUrl>";
+
+echo getTripShape($trip['trip_id']);
+    echo "</Placemark>\n";
+foreach (getTripStops($trip['trip_id']) as $stop) {
+    if (isset($stops[$stop['stop_id']])) {
+        $stop['style'] = "#grn-pushpin";
+    } else {
+        $stop['style'] = "#blue-pushpin";
+    }
+    $stops[$stop['stop_id']] = $stop;
+}
+foreach ($stops as $stop) {
+    echo "\n<Placemark>\n";
+    $link = curPageURL() . '/../stop.php?stopid=' . htmlspecialchars($stop['stop_id']);
+    echo "<name>" . htmlspecialchars($stop['stop_name']) . "</name>";
+    echo '<atom:link rel="related" href="' . $link . '"/>';
+    echo '<description><![CDATA[ <a href="' . $link . '">' . htmlspecialchars($stop['stop_name']) . "</a>]]> </description>";
+    echo "<styleUrl>" . $stop['style'] . "</styleUrl>";
+    echo $stop['positionkml'];
+    echo "</Placemark>\n";
+}
+
+echo "</Document></kml>\n";
 ?>
 
 

--- a/geo/stops.kml.php
+++ b/geo/stops.kml.php
@@ -1,11 +1,13 @@
 <?php

+header('Content-type: application/vnd.google-earth.kml+xml');

 include ('../include/common.inc.php');

-header('Content-type: application/vnd.google-earth.kml+xml');

+header('Content-Disposition: attachment; filename="stops.kml"');

+$debugOkay = Array(); // disable debugging output even on dev server

 //http://wiki.openstreetmap.org/wiki/OpenLayers_Dynamic_KML

 // Creates the KML/XML Document.

 $dom = new DOMDocument('1.0', 'UTF-8');

 // Creates the root KML element and appends it to the root document.

-$node = $dom->createElementNS('http://earth.google.com/kml/2.1', 'kml');

+$node = $dom->createElementNS('http://www.opengis.net/kml/2.2', 'kml');

 $parNode = $dom->appendChild($node);

 // Creates a KML Document element and append it to the KML element.

 $dnode = $dom->createElement('Document');

@@ -13,7 +15,7 @@
 if ($suburb != "") $result_stops = getStopsBySuburb($suburb);

 else $result_stops = getStops();

 foreach ($result_stops as $stop) {

-	$description = 'http://bus.lambdacomplex.org/' . 'stop.php?stopid=' . $stop['stop_id'] . " <br>";

+	$description = '<a href="'.curPageURL() . '/../stop.php?stopid=' . $stop['stop_id'] . '">View stop page</a><br>';

 	// Creates a Placemark and append it to the Document.

 	$node = $dom->createElement('Placemark');

 	$placeNode = $docNode->appendChild($node);


file:b/geo/trip.kml.php (new)
--- /dev/null
+++ b/geo/trip.kml.php
@@ -1,1 +1,70 @@
+<?php
+header('Content-Type: application/vnd.google-earth.kml+xml');
+include ('../include/common.inc.php');
+header('Content-Disposition: attachment; filename="trip.' . urlencode($tripid) . '.kml"');
+$debugOkay = Array(); // disable debugging output even on dev server
+echo '<?xml version="1.0" encoding="UTF-8"?>
+<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"><Document>';
+echo '
+      <Style id="ylw-pushpin">
+    <IconStyle>
+      <Icon>
+        <href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
+        
+      </Icon>
+    </IconStyle>
+    
+  </Style>
+          <Style id="blue-pushpin">
+    <IconStyle>
+      <Icon>
+        <href>http://maps.google.com/mapfiles/kml/pushpin/blue-pushpin.png</href>
+        
+      </Icon>
+    </IconStyle>
+    
+  </Style>
+          <Style id="grn-pushpin">
+    <IconStyle>
+      <Icon>
+        <href>http://maps.google.com/mapfiles/kml/pushpin/grn-pushpin.png</href>
+        
+      </Icon>
+    </IconStyle>
+  </Style>
+    <Style id="yellowLineGreenPoly">
+      <LineStyle>
+        <color>7f00ff00</color>
+        <width>4</width>
+      </LineStyle>
+      <PolyStyle>
+        <color>7f00ffff</color>
+      </PolyStyle>
+	</Style>';
+$trip = getTrip($tripid);
+echo "\n<Placemark>\n";
+$link = curPageURL() . "/../trip.php?tripid=" . htmlspecialchars($$tripid);
+echo "<name>" . $tripid . "</name>";
+echo '<atom:link rel="related" href="' . $link . '"/>';
+echo '<description><![CDATA[ <a href="' . $link . '">' . $tripid . "</a>]]> </description>";
+echo "<styleUrl>#yellowLineGreenPoly</styleUrl>";
 
+
+echo getTripShape($tripid);
+
+echo "</Placemark>\n";
+foreach (getTripStopTimes($tripid) as $stop) {
+    echo "\n<Placemark>\n";
+    $link = curPageURL() . '/../trip.php?tripid=' . htmlspecialchars($tripid);
+    echo "<name>" . $stop['arrival_time'] . " @ " . htmlspecialchars($stop['stop_name']) . "</name>";
+    echo '<atom:link rel="related" href="' . $link . '"/>';
+    echo '<description><![CDATA[ <a href="' . $link . '">' . htmlspecialchars($stop['stop_name']) . "</a>]]> </description>";
+    echo "<styleUrl>#blue-pushpin</styleUrl>";
+    echo "<Point><coordinates>" . $stop['stop_lon'] . "," . $stop['stop_lat'] . "</coordinates></Point>";
+
+    echo "</Placemark>\n";
+}
+echo "</Document></kml>\n";
+?>
+
+

--- a/include/common-auth.inc.php
+++ b/include/common-auth.inc.php
@@ -30,4 +30,4 @@
         login();
          } 
     } 
-?>
+

--- a/include/common-db.inc.php
+++ b/include/common-db.inc.php
@@ -36,5 +36,4 @@
 include ('db/trip-dao.inc.php');
 include ('db/stop-dao.inc.php');
 include ('db/servicealert-dao.inc.php');
-?>
 

--- a/include/common-geo.inc.php
+++ b/include/common-geo.inc.php
@@ -58,8 +58,8 @@
     $output = "";
     if ($collapsible)
         $output.= '<div class="map" data-role="collapsible" data-collapsed="true"><h3>Open Map...</h3>';
-   if (isIOSDevice()) $output.= '<img class="hiresmap" src="http://maps.googleapis.com/maps/api/staticmap?size=' . $width . 'x' . $height . '&amp;' . $markers . '&amp;scale=2&amp;sensor=true" width=' . $width . ' height=' . $height . '>';
- else $output.= '<img class="lowresmap" src="http://maps.googleapis.com/maps/api/staticmap?size=' . $width . 'x' . $height . '&amp;' . $markers . '&amp;scale=1&amp;format=jpg&amp;sensor=true" width=' . $width . ' height=' . $height . '>';
+   if (isIOSDevice()) $output.= '<img class="hiresmap" src="http://maps.googleapis.com/maps/api/staticmap?size=' . $width . 'x' . $height . '&amp;' . $markers . '&amp;scale=2&amp;sensor=true" width=' . $width . ' height=' . $height . ' alt="map of stop location">';
+ else $output.= '<img class="lowresmap" src="http://maps.googleapis.com/maps/api/staticmap?size=' . $width . 'x' . $height . '&amp;' . $markers . '&amp;scale=1&amp;format=jpg&amp;sensor=true" width=' . $width . ' height=' . $height . ' alt="map of stop location">';
    
     if ($collapsible)
         $output.= '</div>';
@@ -168,5 +168,3 @@
     return $contents->features[0]->properties->name;
 }
 
-?>
-

--- a/include/common-net.inc.php
+++ b/include/common-net.inc.php
@@ -35,7 +35,6 @@
     debug(print_r($page, true), "json");
     return $page;
 }
-
 function curPageURL() {
     $isHTTPS = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on");
     $port = (isset($_SERVER["SERVER_PORT"]) && ((!$isHTTPS && $_SERVER["SERVER_PORT"] != "80") || ($isHTTPS && $_SERVER["SERVER_PORT"] != "443")));
@@ -44,5 +43,4 @@
     return $url;
 }
 
-?>
 

--- a/include/common-request.inc.php
+++ b/include/common-request.inc.php
@@ -30,6 +30,9 @@
 if (isset($_REQUEST['nearby'])) {
     $nearby = true;
 }
+if (isset($_REQUEST['labs'])) {
+    $labs = true;
+}
 if (isset($_REQUEST['suburb'])) {
     $suburb = $_REQUEST['suburb'];
 }
@@ -51,11 +54,20 @@
 if (isset($_REQUEST['routeDestination'])) {
     $routeDestination = urldecode(filter_var($_REQUEST['routeDestination'], FILTER_SANITIZE_ENCODED));
 }
+if (isset($_REQUEST['routename'])) {
+    $routename = urldecode(filter_var($_REQUEST['routename'], FILTER_SANITIZE_ENCODED));
+}
 if (isset($_REQUEST['stopcode'])) {
     $stopcode = filter_var($_REQUEST['stopcode'], FILTER_SANITIZE_STRING);
 }
 if (isset($_REQUEST['stopids'])) {
     $stopids = explode(",", filter_var($_REQUEST['stopids'], FILTER_SANITIZE_STRING));
+}
+if (isset($_REQUEST['filterIncludeRoutes'])) {
+    $filterIncludeRoutes = explode(",", filter_var($_REQUEST['filterIncludeRoutes'], FILTER_SANITIZE_STRING));
+}
+if (isset($_REQUEST['filterHasStop'])) {
+    $filterHasStop = filter_var($_REQUEST['filterHasStop'], FILTER_SANITIZE_STRING);
 }
 if (isset($_REQUEST['tripid'])) {
     $tripid = filter_var($_REQUEST['tripid'], FILTER_SANITIZE_STRING);
@@ -72,4 +84,4 @@
 if (isset($_REQUEST['geolocate'])) {
     $geolocate = filter_var($_REQUEST['geolocate'], FILTER_SANITIZE_URL);
 }
-?>
+

--- a/include/common-session.inc.php
+++ b/include/common-session.inc.php
@@ -62,10 +62,9 @@
 
 //debug(print_r($_SESSION, true) , "session");
 function current_time($time = "") {
-    if ($_REQUEST['time']) return $_REQUEST['time'];
+    if (isset($_REQUEST['time'])) return $_REQUEST['time'];
     else if ($time != "") date("H:i:s",$time);
     else return date("H:i:s");
 }
 
-?>
 

--- a/include/common-template.inc.php
+++ b/include/common-template.inc.php
@@ -42,7 +42,7 @@
 }
 
 function include_header($pageTitle, $pageType, $opendiv = true, $geolocate = false, $datepicker = false) {
-    global $basePath, $GTFSREnabled;
+    global $basePath, $GTFSREnabled, $stopid, $routeid;
     echo '
 <!DOCTYPE html> 
 <html lang="en">
@@ -54,19 +54,18 @@
 <link rel="dns-prefetch" href="//code.jquery.com">
 <link rel="dns-prefetch" href="//ajax.googleapis.com">
 	<link rel="stylesheet"  href="' . $basePath . 'css/jquery-ui-1.8.12.custom.css" />';
-    $jqmVersion = "1.0";
+    $jqmVersion = "1.0.1";
     if (isDebugServer()) {
         $jqmcss = $basePath . "css/jquery.mobile-$jqmVersion.css";
         $jqjs = $basePath . "js/jquery-1.6.4.min.js";
         $jqmjs = $basePath . "js/jquery.mobile-$jqmVersion.js";
-        
+
         $jqmcss = $basePath . "css/jquery.mobile-b90eab4935.css";
         $jqmjs = $basePath . "js/jquery.mobile-b90eab4935.js";
     } else {
         $jqmcss = "//code.jquery.com/mobile/$jqmVersion/jquery.mobile-$jqmVersion.min.css";
         $jqjs = "//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js";
         $jqmjs = "//code.jquery.com/mobile/$jqmVersion/jquery.mobile-$jqmVersion.min.js";
-
     }
     echo '<link rel="stylesheet"  href="' . $jqmcss . '" />
 	<script src="' . $jqjs . '"></script>
@@ -108,7 +107,7 @@
 }';
     echo '</style>';
     echo '<link rel="stylesheet"  href="' . $basePath . 'css/local.css.php" />';
-    if (isIOSDevice()){
+    if (isIOSDevice()) {
         echo '<meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  <link rel="apple-touch-startup-image" href="startup.png" />
@@ -174,19 +173,41 @@
         <a name="maincontent" id="maincontent"></a>
         <div data-role="content"> ';
         if ($GTFSREnabled) {
-        $overrides = getServiceOverride();
-        if (isset($overrides['service_id'])) {
-            if ($overrides['service_id'] == "noservice") {
-                echo '<div id="servicewarning">Buses are <strong>not running today</strong> due to industrial action/public holiday. See <a 
+            $overrides = getServiceOverride();
+            if (isset($overrides['service_id'])) {
+                if ($overrides['service_id'] == "noservice") {
+                    echo '<div class="servicewarning">Buses are <strong>not running today</strong> due to industrial action/public holiday. See <a 
 href="http://www.action.act.gov.au">http://www.action.act.gov.au</a> for details.</div>';
-            } else {
-                echo '<div id="servicewarning">Buses are running on an altered timetable today due to industrial action/public holiday. See <a href="http://www.action.act.gov.au">http://www.action.act.gov.au</a> for details.</div>';
-            }
-        }
-            $serviceAlerts = getServiceAlertsAsArray("agency", "0");
+                } else {
+                    echo '<div class="servicewarning">Buses are running on an altered timetable today due to industrial action/public holiday. See <a href="http://www.action.act.gov.au">http://www.action.act.gov.au</a> for details.</div>';
+                }
+            }
+            $serviceAlerts = Array();
+            $globalAlerts = getServiceAlertsAsArray("agency", "0");
+            if ($globalAlerts != null) {
+                // echo "getting alerts due to network wide";
+                $serviceAlerts = array_merge($serviceAlerts, $globalAlerts);
+            }
+            if (isset($stopid)) {
+                $stopAlerts = getServiceAlertsAsArray("stop", $stopid);
+                if ($stopAlerts != null) {
+                    // echo "getting alerts due to stop $stopid";
+                    $serviceAlerts = array_merge($serviceAlerts, $stopAlerts);
+                }
+            }
+            if (isset($routeid)) {
+                $routeAlerts = getServiceAlertsAsArray("route", $routeid);
+                if ($routeAlerts != null) {
+                    //    echo "getting alerts due to route $routeid";
+                    $serviceAlerts = array_merge($serviceAlerts, $routeAlerts);
+                }
+            }
             if (isset($serviceAlerts['entity']) && sizeof($serviceAlerts['entity']) > 0) {
                 foreach ($serviceAlerts['entity'] as $entity) {
-                    echo "<div id='servicewarning'>" . date("F j, g:i a", strtotime($entity['alert']['active_period'][0]['start'])) . " to " . date("F j, g:i a", strtotime($entity['alert']['active_period'][0]['end'])) . "{$entity['alert']['header_text']['translation'][0]['text']}<br>Warning: {$entity['alert']['description_text']['translation'][0]['text']} 
+                    echo "<div class='servicewarning'><b>{$entity['alert']['header_text']['translation'][0]['text']}</b>&nbsp;<small>"
+                    . date("F jS Y, g:i a", $entity['alert']['active_period'][0]['start']) . " to "
+                    . date("F jS Y, g:i a", $entity['alert']['active_period'][0]['end']) . "</small>
+                            <br>Warning: {$entity['alert']['description_text']['translation'][0]['text']} 
                             <br><a href='{$entity['alert']['url']['translation'][0]['text']}'>Source</a>  </div>";
                 }
             }
@@ -208,13 +229,14 @@
 s.parentNode.insertBefore(ga, s);
   })();</script>";
         $googleAnalyticsImageUrl = googleAnalyticsGetImageUrl();
-        echo '<noscript><img src="' . $googleAnalyticsImageUrl . '" /></noscript>';
+        echo '<noscript><img src="' . $googleAnalyticsImageUrl . '" alt=""/></noscript>';
     }
     echo "\n</div></div></body></html>";
 }
+
 function timeSettings() {
     global $service_periods;
-echo '<div id="settings" data-role="collapsible" data-collapsed="true">
+    echo '<div id="settings" data-role="collapsible" data-collapsed="true">
 <h3>Change Time (' . (isset($_REQUEST['time']) ? $_REQUEST['time'] : "Current Time,") . ' ' . ucwords(service_period()) . ')...</h3>
         <form action="' . basename($_SERVER['PHP_SELF']) . '" method="GET">
                <input type="hidden" name="suburb" id="suburb" value="' . (isset($_REQUEST['suburb']) ? $_REQUEST['suburb'] : "") . '"/>
@@ -230,10 +252,10 @@
 		<div data-role="fieldcontain">
 		    <label for="service_period"> Service Period:  </label>
 			<select name="service_period" id="service_period">';
-foreach ($service_periods as $service_period) {
-    echo "<option value=\"$service_period\"" . (service_period() === $service_period ? " SELECTED" : "") . '>' . ucwords($service_period) . '</option>';
-}
-echo '</select>
+    foreach ($service_periods as $service_period) {
+        echo "<option value=\"$service_period\"" . (service_period() === $service_period ? " SELECTED" : "") . '>' . ucwords($service_period) . '</option>';
+    }
+    echo '</select>
 			<a href="#" style="display:none" name="currentPeriod" id="currentPeriod">Current Period?</a>
 		</div>
 		
@@ -241,8 +263,9 @@
                 </div></form>
             </div>';
 }
+
 function placeSettings() {
-    
+
     $geoerror = false;
     $geoerror = !isset($_SESSION['lat']) || !isset($_SESSION['lat']) || $_SESSION['lat'] == "" || $_SESSION['lon'] == "";
 
@@ -275,14 +298,15 @@
 
 //stop list collapsing
 function stopCompare($stopName) {
-    return substr(trim(preg_replace("/\(Platform.*/", "", $stopName)),0,9);
-}
-function stopGroupTitle($stopName,$stopdesc) {
-    if (preg_match("/Dr |Cct |Cir |Av |St |Cr |Parade |Way |Bank /",$stopName)) {
-        $descParts =  explode("<br>",$stopdesc);
-         return trim(str_replace("Street: ","",$descParts[0]));
+    return substr(trim(preg_replace("/\(Platform.*/", "", $stopName)), 0, 9);
+}
+
+function stopGroupTitle($stopName, $stopdesc) {
+    if (preg_match("/Dr |Cct |Cir |Av |St |Cr |Parade |Way |Bank /", $stopName)) {
+        $descParts = explode("<br>", $stopdesc);
+        return trim(str_replace("Street: ", "", $descParts[0]));
     } else {
-        return trim(preg_replace("/\(Platform.*/", "",$stopName));
+        return trim(preg_replace("/\(Platform.*/", "", $stopName));
     }
 }
 
@@ -304,5 +328,4 @@
         return "";
     }
 }
-?>
-
+

--- a/include/common-transit.inc.php
+++ b/include/common-transit.inc.php
@@ -149,69 +149,104 @@
           street inform: route inform, trip inform, stop inform
           route patch: trip remove
          */
-        $fm = new transit_realtime\FeedMessage();
-        $fh = new transit_realtime\FeedHeader();
-        $fh->setGtfsRealtimeVersion(1);
-        $fh->setTimestamp(time());
-        $fm->setHeader($fh);
-        foreach (getCurrentAlerts() as $alert) {
-            $fe = new transit_realtime\FeedEntity();
-            $fe->setId($alert['id']);
-            $fe->setIsDeleted(false);
-            $alert = new transit_realtime\Alert();
-            $tr = new transit_realtime\TimeRange();
-            $tr->setStart($alert['start']);
-            $tr->setEnd($alert['end']);
-            $alert->addActivePeriod($tr);
-            $informedEntities = getInformedAlerts($alert['id'], $_REQUEST['filter_class'], $_REQUEST['filter_id']);
-            if (sizeof($informedEntities) > 0) {
-                $informed = Array();
-                $es = new transit_realtime\EntitySelector();
-                if ($informedEntity['informed_class'] == "agency") {
-                    $es->setAgencyId($informedEntity['informed_id']);
-                }
-                if ($informedEntity['informed_class'] == "stop") {
-                    $es->setStopId($informedEntity['informed_id']);
-                }
-                if ($informedEntity['informed_class'] == "route") {
-                    $es->setRouteId($informedEntity['informed_id']);
-                }
-                if ($informedEntity['informed_class'] == "trip") {
-                    $td = new transit_realtime\TripDescriptor();
-                    $td->setTripId($informedEntity['informed_id']);
-                    $es->setTrip($td);
-                }
-                $alert->addInformedEntity($es);
-            }
-            $alert->setCause(constant("transit_realtime\Alert\Cause::" . $alert['cause']));
-            $alert->setEffect(constant("transit_realtime\Alert\Effect::" . $alert['effect']));
-            $tsUrl = new transit_realtime\TranslatedString();
-            $tUrl = new transit_realtime\TranslatedString\Translation();
-            $tUrl->setText($alert['url']);
-            $tUrl->setLanguage("en");
-            $tsUrl->addTranslation($tUrl);
-            $alert->setUrl($tsUrl);
-            $tsHeaderText = new transit_realtime\TranslatedString();
-            $tHeaderText = new transit_realtime\TranslatedString\Translation();
-            $tHeaderText->setText($alert['header']);
-            $tHeaderText->setLanguage("en");
-            $tsHeaderText->addTranslation($tHeaderText);
-            $alert->setHeaderText($tsHeaderText);
-            $tsDescriptionText = new transit_realtime\TranslatedString();
-            $tDescriptionText = new transit_realtime\TranslatedString\Translation();
-            $tDescriptionText->setText($alert['description']);
-            $tDescriptionText->setLanguage("en");
-            $tsDescriptionText->addTranslation($tDescriptionText);
-            $alert->setDescriptionText($tsDescriptionText);
-            $fe->setAlert($alert);
-            $fm->addEntity($fe);
+        $current_alerts = getCurrentAlerts();
+        $informed_count = 0;
+        if (sizeof($current_alerts) > 0) {
+
+            $fm = new transit_realtime\FeedMessage();
+            $fh = new transit_realtime\FeedHeader();
+            $fh->setGtfsRealtimeVersion(1);
+            $fh->setTimestamp(time());
+            $fm->setHeader($fh);
+            foreach ($current_alerts as $current_alert) {
+                $affectsFilteredEntities = false;
+                $fe = new transit_realtime\FeedEntity();
+                $fe->setId($current_alert['id']);
+                $fe->setIsDeleted(false);
+                $alert = new transit_realtime\Alert();
+                $tr = new transit_realtime\TimeRange();
+                $tr->setStart($current_alert['start']);
+                $tr->setEnd($current_alert['end']);
+                $alert->addActivePeriod($tr);
+                $informedEntities = getInformedAlerts($current_alert['id'], $filter_class, $filter_id);
+                if (sizeof($informedEntities) > 0) {
+
+                    $affectsFilteredEntities = true;
+                    foreach ($informedEntities as $informedEntity) {
+	$informed_count++;
+                    $informed = Array();
+                    $es = new transit_realtime\EntitySelector();
+                    if ($informedEntity['informed_class'] == "agency") {
+                        $es->setAgencyId($informedEntity['informed_id']);
+                    }
+                    if ($informedEntity['informed_class'] == "stop") {
+                        $es->setStopId($informedEntity['informed_id']);
+                    }
+                    if ($informedEntity['informed_class'] == "route") {
+                        $es->setRouteId($informedEntity['informed_id']);
+                    }
+                    if ($informedEntity['informed_class'] == "trip") {
+                        $td = new transit_realtime\TripDescriptor();
+                        $td->setTripId($informedEntity['informed_id']);
+                        $es->setTrip($td);
+                    }
+                    $alert->addInformedEntity($es);
+}
+                }
+                if ($current_alert['cause'] != "") {
+                    $alert->setCause(constant("transit_realtime\Alert\Cause::" . $current_alert['cause']));
+                }
+                if ($current_alert['effect'] != "") {
+                    $alert->setEffect(constant("transit_realtime\Alert\Effect::" . $current_alert['effect']));
+                }
+                if ($current_alert['url'] != "") {
+                    $tsUrl = new transit_realtime\TranslatedString();
+                    $tUrl = new transit_realtime\TranslatedString\Translation();
+                    $tUrl->setText($current_alert['url']);
+                    $tUrl->setLanguage("en");
+                    $tsUrl->addTranslation($tUrl);
+                    $alert->setUrl($tsUrl);
+                }
+                if ($current_alert['header'] != "") {
+                    $tsHeaderText = new transit_realtime\TranslatedString();
+                    $tHeaderText = new transit_realtime\TranslatedString\Translation();
+                    $tHeaderText->setText($current_alert['header']);
+                    $tHeaderText->setLanguage("en");
+                    $tsHeaderText->addTranslation($tHeaderText);
+                    $alert->setHeaderText($tsHeaderText);
+                }
+                if ($current_alert['description'] != "") {
+                    $tsDescriptionText = new transit_realtime\TranslatedString();
+                    $tDescriptionText = new transit_realtime\TranslatedString\Translation();
+                    $tDescriptionText->setText(trim($current_alert['description']));
+                    $tDescriptionText->setLanguage("en");
+                    $tsDescriptionText->addTranslation($tDescriptionText);
+                    $alert->setDescriptionText($tsDescriptionText);
+                }
+                $fe->setAlert($alert);
+                if ($affectsFilteredEntities) {
+                    $fm->addEntity($fe);
+                }
+            }
+            if ($informed_count > 0) {
+                return $fm;
+            } else {
+                return null;
+            }
+        } else
+            return null;
+    }
+
+    function getServiceAlertsAsArray($filter_class = "", $filter_id = "") {
+
+        $alerts = getServiceAlerts($filter_class, $filter_id);
+        if ($alerts != null) {
+            $codec = new DrSlump\Protobuf\Codec\PhpArray();
+
+            return $codec->encode($alerts);
+        } else {
+            return null;
         }
-        return $fm;
-    }
-
-    function getServiceAlertsAsArray($filter_class = "", $filter_id = "") {
-        $codec = new DrSlump\Protobuf\Codec\PhpArray();
-        return $codec->encode(getServiceAlerts($filter_class, $filter_id));
     }
 
     function getServiceAlertsAsBinary($filter_class = "", $filter_id = "") {
@@ -301,5 +336,4 @@
     }
 
 }
-?>
-
+

--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -51,13 +51,20 @@
         || strstr($_SERVER['PHP_SELF'], "lib/")
         || strstr($_SERVER['PHP_SELF'], "geo/")
         || strstr($_SERVER['PHP_SELF'], "include/")
-        || strstr($_SERVER['PHP_SELF'], "servicealerts/"))
+        || strstr($_SERVER['PHP_SELF'], "rtpis/")) {
     $basePath = "../";
+}
 
 function isDebugServer() {
     
     return php_sapi_name() == "cli" || strstr(php_uname('n'),"actbus") || isset($_SERVER['SERVER_NAME']) && ( $_SERVER['SERVER_NAME'] == "azusa" || $_SERVER['SERVER_NAME'] == "vanille"
-            || $_SERVER['SERVER_NAME'] == "localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1" ||  $_SERVER['SERVER_NAME'] == "192.168.1.8");
+            || $_SERVER['SERVER_NAME'] == "localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1" ||  $_SERVER['SERVER_NAME'] == "192.168.1.8" || $_SERVER['SERVER_NAME'] == "192.168.178.24");
+}
+
+if (isset($_SERVER['SERVER_NAME'])  && $_SERVER['SERVER_NAME'] == "maxious.xen.prgmr.com") {
+// Set the exception handler
+require $basePath."/lib/amon-php/amon.php";
+Amon::setup_exception_handler();
 }
 
 include_once ("common-geo.inc.php");
@@ -201,6 +208,3 @@
     return implode($glue, $retVal);
 }
 
-
-?>
-

--- a/include/db/route-dao.inc.php
+++ b/include/db/route-dao.inc.php
@@ -59,7 +59,12 @@
         databaseError($conn->errorInfo());
         return Array();
     }
-    return $query->fetchAll();
+    $results = $query->fetchAll();
+    if (is_array($results)) {
+        return $results;
+    } else {
+        return Array($results);
+    }
 }
 function getRouteDescription($routeID, $directionID) {
     $trip = getRouteNextTrip($routeID, $directionID);
@@ -97,7 +102,7 @@
 function getRoutesByNumberSeries($routeNumberSeries = "") {
     global $conn;
     if (strlen($routeNumberSeries) == 1) {
-        return getRoutesByNumber($routeNumberSeries);
+        return getRoute($routeNumberSeries);
     }
     $seriesMin = substr($routeNumberSeries, 0, -1) . "0";
     $seriesMax = substr($routeNumberSeries, 0, -1) . "9";
@@ -120,7 +125,7 @@
 function getRouteNextTrip($routeID, $directionID) {
     global $conn;
    
-    $query = "select routes.route_id,direction_id,trips.trip_id,trip_headsign,departure_time from routes join trips on trips.route_id = routes.route_id
+    $query = "select routes.route_id,routes.route_url,direction_id,trips.trip_id,trip_headsign,departure_time,service_id from routes join trips on trips.route_id = routes.route_id
 join stop_times on stop_times.trip_id = trips.trip_id where  arrival_time between :currentTime and :futureTime 
 and routes.route_id = :routeID and trips.direction_id = :directionID order by
 arrival_time limit 1";
@@ -266,12 +271,13 @@
 }
 
 function getRoutesNearby($lat, $lng, $limit = "", $distance = 500) {
-    if ($service_period == "")
+   // if ($service_period == "")
         $service_period = service_period();
     $service_ids = service_ids($service_period);
     $sidA = $service_ids[0];
     $sidB = $service_ids[1];
-    if ($limit != "")
+ $limitSQL = "";
+    if ($limit != "") 	
         $limitSQL = " LIMIT :limit ";
     global $conn;
     $query = "SELECT service_id,trips.route_id,trips.direction_id,route_short_name,route_long_name,min(stops.stop_id) as stop_id,
@@ -299,4 +305,3 @@
     return $query->fetchAll();
 }
 
-?>

--- a/include/db/servicealert-dao.inc.php
+++ b/include/db/servicealert-dao.inc.php
@@ -21,7 +21,8 @@
     $query = "Select * from calendar_dates where date = :date and exception_type = '1' LIMIT 1";
     // debug($query,"database");
     $query = $conn->prepare($query); // Create a prepared statement
-    $query->bindParam(":date", date("Ymd", ($date != "" ? $date : time())));
+    $date = date("Ymd", ($date != "" ? $date : time()));
+    $query->bindParam(":date", $date);
     $query->execute();
     if (!$query) {
         databaseError($conn->errorInfo());
@@ -44,17 +45,19 @@
     return $query->fetch(PDO :: FETCH_ASSOC);
 }
 
-function updateServiceAlert($alertID, $start, $end, $header, $description, $url) {
+function updateServiceAlert($alertID, $alert) {
     global $conn;
-    $query = 'update servicealerts_alerts set start=:start, "end"=:end, header=:header, description=:description, url=:url where id = :servicealert_id';
+    $query = 'update servicealerts_alerts set start=:start, "end"=:end, header=:header, description=:description, url=:url, cause=:cause, effect=:effect where id = :servicealert_id';
     debug($query, "database");
     $query = $conn->prepare($query);
-    $query->bindParam(":servicealert_id", $alertID);
-    $query->bindParam(":start", $start);
-    $query->bindParam(":end", $end);
-    $query->bindParam(":header", $header);
-    $query->bindParam(":description", $description);
-    $query->bindParam(":url", $url);
+    $query->bindValue(":servicealert_id", $alertID);
+    $query->bindValue(":start", $alert['startdate']);
+    $query->bindValue(":end", $alert['enddate']);
+    $query->bindValue(":header", $alert['header']);
+    $query->bindValue(":description", $alert['description']);
+    $query->bindValue(":url", $alert['url']);
+    $query->bindValue(":cause", $alert['cause']);
+    $query->bindValue(":effect", $alert['effect']);
     $query->execute();
 
     print_r($conn->errorInfo());
@@ -65,16 +68,19 @@
     return $query->fetch(PDO :: FETCH_ASSOC);
 }
 
-function addServiceAlert($start, $end, $header, $description, $url) {
+function addServiceAlert($alert) {
     global $conn;
-    $query = 'INSERT INTO servicealerts_alerts (start, "end", header, description, url) VALUES (:start, :end, :header, :description, :url) ';
+    $query = 'INSERT INTO servicealerts_alerts (start, "end", header, description, url,cause,effect) VALUES (:start, :end, :header, :description, :url,:cause,:effect) ';
     debug($query, "database");
     $query = $conn->prepare($query);
-    $query->bindParam(":start", $start);
-    $query->bindParam(":end", $end);
-    $query->bindParam(":header", $header);
-    $query->bindParam(":description", $description);
-    $query->bindParam(":url", $url);
+    //print_r($alert);
+    $query->bindValue(":start", $alert['startdate']);
+    $query->bindValue(":end", $alert['enddate']);
+    $query->bindValue(":header", $alert['header']);
+    $query->bindValue(":description", $alert['description']);
+    $query->bindValue(":url", $alert['url']);
+    $query->bindValue(":cause", $alert['cause']);
+    $query->bindValue(":effect", $alert['effect']);
     $query->execute();
 
     print_r($conn->errorInfo());
@@ -100,7 +106,19 @@
 
 function getFutureAlerts() {
     global $conn;
-    $query = "SELECT id,extract('epoch' from start) as start, extract('epoch' from \"end\") as \"end\",cause,effect,header,description,url from servicealerts_alerts where NOW() > start or NOW() < \"end\"";
+    $query = "SELECT id,extract('epoch' from start) as start, extract('epoch' from \"end\") as \"end\",cause,effect,header,description,url from servicealerts_alerts where  NOW() < \"end\"";
+    // debug($query, "database");
+    $query = $conn->prepare($query);
+    $query->execute();
+    if (!$query) {
+        databaseError($conn->errorInfo());
+        return Array();
+    }
+    return $query->fetchAll();
+}
+function getAllAlerts() {
+    global $conn;
+    $query = "SELECT id,extract('epoch' from start) as start, extract('epoch' from \"end\") as \"end\",cause,effect,header,description,url from servicealerts_alerts";
     // debug($query, "database");
     $query = $conn->prepare($query);
     $query->execute();
@@ -114,6 +132,7 @@
 function getInformedAlerts($id, $filter_class, $filter_id) {
 
     global $conn;
+    //echo "$id, $filter_class, $filter_id\n";
     $query = "SELECT * from servicealerts_informed where servicealert_id = :servicealert_id";
 
     if ($filter_class != "") {
@@ -158,12 +177,14 @@
 
 function addInformedAlert($serviceAlertID, $class, $id, $action) {
     global $conn;
-    $query = 'INSERT INTO servicealerts_informed (servicealert_id , informed_class , informed_id) VALUES(:servicealert_id ,:informed_class, :informed_id)';
+    $query = 'INSERT INTO servicealerts_informed (servicealert_id , informed_class , informed_id, informed_action) 
+        VALUES(:servicealert_id ,:informed_class, :informed_id, :informed_action)';
     debug($query, "database");
     $query = $conn->prepare($query);
     $query->bindParam(":servicealert_id", $serviceAlertID);
     $query->bindParam(":informed_class", $class);
     $query->bindParam(":informed_id", $id);
+    $query->bindParam(":informed_action", $action);
     $query->execute();
 
     print_r($conn->errorInfo());
@@ -174,4 +195,3 @@
     return null;
 }
 
-?>

--- a/include/db/stop-dao.inc.php
+++ b/include/db/stop-dao.inc.php
@@ -89,7 +89,7 @@
     $query = "Select * from stops where stop_name LIKE :name;";
     debug($query, "database");
     $query = $conn->prepare($query);
-    $name = "%" . $name . ";%";
+    $name = $name . "%";
     $query->bindParam(":name", $name);
     $query->execute();
     if (!$query) {
@@ -247,4 +247,3 @@
     return $timedTrips;
 }
 
-?>

--- a/include/db/trip-dao.inc.php
+++ b/include/db/trip-dao.inc.php
@@ -35,7 +35,7 @@
 }
 function getTripStops($tripID) {
     global $conn;
-    $query = "SELECT stop_id, stop_name, ST_AsKML(position) as positionkml,
+    $query = "SELECT stops.stop_id, stop_name, ST_AsKML(position) as positionkml,
 	stop_sequence, trips.trip_id
 FROM stop_times
 join trips on trips.trip_id = stop_times.trip_id
@@ -49,8 +49,27 @@
         databaseError($conn->errorInfo());
         return Array();
     }
-    return $query->fetchColumn(0);
-}
+    return $query->fetchAll();
+}
+
+function getTripHasStop($tripID, $stopID) {
+        global $conn;
+    $query = "SELECT stop_id
+FROM stop_times
+join trips on trips.trip_id = stop_times.trip_id
+WHERE trips.trip_id = :tripID and stop_times.stop_id = :stopID";
+    debug($query, "database");
+    $query = $conn->prepare($query);
+    $query->bindParam(":tripID", $tripID);
+    $query->bindParam(":stopID", $stopID);
+    $query->execute();
+    if (!$query) {
+        databaseError($conn->errorInfo());
+        return Array();
+    }
+    return ($query->fetchColumn() > 0);
+}
+
 function getTripShape($tripID) {
     // todo, use shapes table if shape_id specified
     global $conn;
@@ -78,7 +97,7 @@
 join trips on trips.trip_id = stop_times.trip_id
 join routes on trips.route_id = routes.route_id
 join stops on stops.stop_id = stop_times.stop_id
-WHERE trips.trip_id = :tripID $range ORDER BY stop_sequence";
+WHERE trips.trip_id = :tripID ORDER BY stop_sequence";
     debug($query, "database");
     $query = $conn->prepare($query);
     $query->bindParam(":tripID", $tripID);
@@ -203,6 +222,3 @@
     }
     return $query->fetchAll();
 }
-
-
-?>

file:a/index.php -> file:b/index.php
--- a/index.php
+++ b/index.php
@@ -37,7 +37,7 @@
             <li><a href="routeList.php?bysuburbs=yes">Routes By Suburb</a></li>
             <li><a class="nearby" href="routeList.php?nearby=yes">Nearby Routes</a></li>
         </ul>
-        <a href="labs/index.php" data-role="button" data-icon="beaker">Busness R&amp;D</a>
+        <!--<a href="labs/index.php" data-role="button" data-icon="beaker">Busness R&amp;D</a>-->
         <a href="myway/index.php" data-role="button">MyWay Balance and Timeliness Survey Results</a>
         <?php
         include_footer(true)

directory:b/js/FlashCanvas (new)
--- /dev/null
+++ b/js/FlashCanvas

file:a/js/flot/excanvas.js (deleted)
--- a/js/flot/excanvas.js
+++ /dev/null
@@ -1,1428 +1,1 @@
-// 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.
-// * Filling very large shapes (above 5000 points) is buggy.
-// * 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;
-
-  /**
-   * 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 addNamespacesAndStylesheet(doc) {
-    // create xmlns
-    if (!doc.namespaces['g_vml_']) {
-      doc.namespaces.add('g_vml_', 'urn:schemas-microsoft-com:vml',
-                         '#default#VML');
-
-    }
-    if (!doc.namespaces['g_o_']) {
-      doc.namespaces.add('g_o_', 'urn:schemas-microsoft-com:office:office',
-                         '#default#VML');
-    }
-
-    // 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) {
-      if (/MSIE/.test(navigator.userAgent) && !window.opera) {
-        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.substr(3, 1) == 'a') {
-      alpha = Number(parts[3]);
-    } else {
-      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 = 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 = Number(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} surfaceElement The element that the 2D context should
-   * be associated with
-   */
-  function CanvasRenderingContext2D_(surfaceElement) {
-    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 = surfaceElement;
-
-    var el = surfaceElement.ownerDocument.createElement('div');
-    el.style.width =  surfaceElement.clientWidth + 'px';
-    el.style.height = surfaceElement.clientHeight + 'px';
-    el.style.overflow = 'hidden';
-    el.style.position = 'absolute';
-    surfaceElement.appendChild(el);
-
-    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 W = 10;
-    var H = 10;
-    // Divide the shape into chunks if it's too long because IE has a limit
-    // somewhere for how long a VML shape can be. This simple division does
-    // not work with fills, only strokes, unfortunately.
-    var chunkSize = 5000;
-
-    var min = {x: null, y: null};
-    var max = {x: null, y: null};
-
-    for (var j = 0; j < this.currentPath_.length; j += chunkSize) {
-      var lineStr = [];
-      var lineOpen = false;
-
-      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;
-
-      for (var i = j; i < Math.min(j + chunkSize, this.currentPath_.length); i++) {
-        if (i % chunkSize == 0 && i > 0) { // move into position for next chunk
-          lineStr.push(' m ', mr(this.currentPath_[i-1].x), ',', mr(this.currentPath_[i-1].y));
-        }
-
-        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
-

file:a/js/flot/excanvas.min.js (deleted)
--- a/js/flot/excanvas.min.js
+++ /dev/null
@@ -1,1 +1,1 @@
-if(!document.createElement("canvas").getContext){(function(){var z=Math;var K=z.round;var J=z.sin;var U=z.cos;var b=z.abs;var k=z.sqrt;var D=10;var F=D/2;function T(){return this.context_||(this.context_=new W(this))}var O=Array.prototype.slice;function G(i,j,m){var Z=O.call(arguments,2);return function(){return i.apply(j,Z.concat(O.call(arguments)))}}function AD(Z){return String(Z).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function r(i){if(!i.namespaces.g_vml_){i.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML")}if(!i.namespaces.g_o_){i.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML")}if(!i.styleSheets.ex_canvas_){var Z=i.createStyleSheet();Z.owningElement.id="ex_canvas_";Z.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}r(document);var E={init:function(Z){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var i=Z||document;i.createElement("canvas");i.attachEvent("onreadystatechange",G(this.init_,this,i))}},init_:function(m){var j=m.getElementsByTagName("canvas");for(var Z=0;Z<j.length;Z++){this.initElement(j[Z])}},initElement:function(i){if(!i.getContext){i.getContext=T;r(i.ownerDocument);i.innerHTML="";i.attachEvent("onpropertychange",S);i.attachEvent("onresize",w);var Z=i.attributes;if(Z.width&&Z.width.specified){i.style.width=Z.width.nodeValue+"px"}else{i.width=i.clientWidth}if(Z.height&&Z.height.specified){i.style.height=Z.height.nodeValue+"px"}else{i.height=i.clientHeight}}return i}};function S(i){var Z=i.srcElement;switch(i.propertyName){case"width":Z.getContext().clearRect();Z.style.width=Z.attributes.width.nodeValue+"px";Z.firstChild.style.width=Z.clientWidth+"px";break;case"height":Z.getContext().clearRect();Z.style.height=Z.attributes.height.nodeValue+"px";Z.firstChild.style.height=Z.clientHeight+"px";break}}function w(i){var Z=i.srcElement;if(Z.firstChild){Z.firstChild.style.width=Z.clientWidth+"px";Z.firstChild.style.height=Z.clientHeight+"px"}}E.init();var I=[];for(var AC=0;AC<16;AC++){for(var AB=0;AB<16;AB++){I[AC*16+AB]=AC.toString(16)+AB.toString(16)}}function V(){return[[1,0,0],[0,1,0],[0,0,1]]}function d(m,j){var i=V();for(var Z=0;Z<3;Z++){for(var AF=0;AF<3;AF++){var p=0;for(var AE=0;AE<3;AE++){p+=m[Z][AE]*j[AE][AF]}i[Z][AF]=p}}return i}function Q(i,Z){Z.fillStyle=i.fillStyle;Z.lineCap=i.lineCap;Z.lineJoin=i.lineJoin;Z.lineWidth=i.lineWidth;Z.miterLimit=i.miterLimit;Z.shadowBlur=i.shadowBlur;Z.shadowColor=i.shadowColor;Z.shadowOffsetX=i.shadowOffsetX;Z.shadowOffsetY=i.shadowOffsetY;Z.strokeStyle=i.strokeStyle;Z.globalAlpha=i.globalAlpha;Z.font=i.font;Z.textAlign=i.textAlign;Z.textBaseline=i.textBaseline;Z.arcScaleX_=i.arcScaleX_;Z.arcScaleY_=i.arcScaleY_;Z.lineScale_=i.lineScale_}var B={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 g(i){var m=i.indexOf("(",3);var Z=i.indexOf(")",m+1);var j=i.substring(m+1,Z).split(",");if(j.length==4&&i.substr(3,1)=="a"){alpha=Number(j[3])}else{j[3]=1}return j}function C(Z){return parseFloat(Z)/100}function N(i,j,Z){return Math.min(Z,Math.max(j,i))}function c(AF){var j,i,Z;h=parseFloat(AF[0])/360%360;if(h<0){h++}s=N(C(AF[1]),0,1);l=N(C(AF[2]),0,1);if(s==0){j=i=Z=l}else{var m=l<0.5?l*(1+s):l+s-l*s;var AE=2*l-m;j=A(AE,m,h+1/3);i=A(AE,m,h);Z=A(AE,m,h-1/3)}return"#"+I[Math.floor(j*255)]+I[Math.floor(i*255)]+I[Math.floor(Z*255)]}function A(i,Z,j){if(j<0){j++}if(j>1){j--}if(6*j<1){return i+(Z-i)*6*j}else{if(2*j<1){return Z}else{if(3*j<2){return i+(Z-i)*(2/3-j)*6}else{return i}}}}function Y(Z){var AE,p=1;Z=String(Z);if(Z.charAt(0)=="#"){AE=Z}else{if(/^rgb/.test(Z)){var m=g(Z);var AE="#",AF;for(var j=0;j<3;j++){if(m[j].indexOf("%")!=-1){AF=Math.floor(C(m[j])*255)}else{AF=Number(m[j])}AE+=I[N(AF,0,255)]}p=m[3]}else{if(/^hsl/.test(Z)){var m=g(Z);AE=c(m);p=m[3]}else{AE=B[Z]||Z}}}return{color:AE,alpha:p}}var L={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"};var f={};function X(Z){if(f[Z]){return f[Z]}var m=document.createElement("div");var j=m.style;try{j.font=Z}catch(i){}return f[Z]={style:j.fontStyle||L.style,variant:j.fontVariant||L.variant,weight:j.fontWeight||L.weight,size:j.fontSize||L.size,family:j.fontFamily||L.family}}function P(j,i){var Z={};for(var AF in j){Z[AF]=j[AF]}var AE=parseFloat(i.currentStyle.fontSize),m=parseFloat(j.size);if(typeof j.size=="number"){Z.size=j.size}else{if(j.size.indexOf("px")!=-1){Z.size=m}else{if(j.size.indexOf("em")!=-1){Z.size=AE*m}else{if(j.size.indexOf("%")!=-1){Z.size=(AE/100)*m}else{if(j.size.indexOf("pt")!=-1){Z.size=m/0.75}else{Z.size=AE}}}}}Z.size*=0.981;return Z}function AA(Z){return Z.style+" "+Z.variant+" "+Z.weight+" "+Z.size+"px "+Z.family}function t(Z){switch(Z){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function W(i){this.m_=V();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=D*1;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=i;var Z=i.ownerDocument.createElement("div");Z.style.width=i.clientWidth+"px";Z.style.height=i.clientHeight+"px";Z.style.overflow="hidden";Z.style.position="absolute";i.appendChild(Z);this.element_=Z;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var M=W.prototype;M.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(true);this.textMeasureEl_=null}this.element_.innerHTML=""};M.beginPath=function(){this.currentPath_=[]};M.moveTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"moveTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.lineTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"lineTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.bezierCurveTo=function(j,i,AI,AH,AG,AE){var Z=this.getCoords_(AG,AE);var AF=this.getCoords_(j,i);var m=this.getCoords_(AI,AH);e(this,AF,m,Z)};function e(Z,m,j,i){Z.currentPath_.push({type:"bezierCurveTo",cp1x:m.x,cp1y:m.y,cp2x:j.x,cp2y:j.y,x:i.x,y:i.y});Z.currentX_=i.x;Z.currentY_=i.y}M.quadraticCurveTo=function(AG,j,i,Z){var AF=this.getCoords_(AG,j);var AE=this.getCoords_(i,Z);var AH={x:this.currentX_+2/3*(AF.x-this.currentX_),y:this.currentY_+2/3*(AF.y-this.currentY_)};var m={x:AH.x+(AE.x-this.currentX_)/3,y:AH.y+(AE.y-this.currentY_)/3};e(this,AH,m,AE)};M.arc=function(AJ,AH,AI,AE,i,j){AI*=D;var AN=j?"at":"wa";var AK=AJ+U(AE)*AI-F;var AM=AH+J(AE)*AI-F;var Z=AJ+U(i)*AI-F;var AL=AH+J(i)*AI-F;if(AK==Z&&!j){AK+=0.125}var m=this.getCoords_(AJ,AH);var AG=this.getCoords_(AK,AM);var AF=this.getCoords_(Z,AL);this.currentPath_.push({type:AN,x:m.x,y:m.y,radius:AI,xStart:AG.x,yStart:AG.y,xEnd:AF.x,yEnd:AF.y})};M.rect=function(j,i,Z,m){this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath()};M.strokeRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.stroke();this.currentPath_=p};M.fillRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.fill();this.currentPath_=p};M.createLinearGradient=function(i,m,Z,j){var p=new v("gradient");p.x0_=i;p.y0_=m;p.x1_=Z;p.y1_=j;return p};M.createRadialGradient=function(m,AE,j,i,p,Z){var AF=new v("gradientradial");AF.x0_=m;AF.y0_=AE;AF.r0_=j;AF.x1_=i;AF.y1_=p;AF.r1_=Z;return AF};M.drawImage=function(AO,j){var AH,AF,AJ,AV,AM,AK,AQ,AX;var AI=AO.runtimeStyle.width;var AN=AO.runtimeStyle.height;AO.runtimeStyle.width="auto";AO.runtimeStyle.height="auto";var AG=AO.width;var AT=AO.height;AO.runtimeStyle.width=AI;AO.runtimeStyle.height=AN;if(arguments.length==3){AH=arguments[1];AF=arguments[2];AM=AK=0;AQ=AJ=AG;AX=AV=AT}else{if(arguments.length==5){AH=arguments[1];AF=arguments[2];AJ=arguments[3];AV=arguments[4];AM=AK=0;AQ=AG;AX=AT}else{if(arguments.length==9){AM=arguments[1];AK=arguments[2];AQ=arguments[3];AX=arguments[4];AH=arguments[5];AF=arguments[6];AJ=arguments[7];AV=arguments[8]}else{throw Error("Invalid number of arguments")}}}var AW=this.getCoords_(AH,AF);var m=AQ/2;var i=AX/2;var AU=[];var Z=10;var AE=10;AU.push(" <g_vml_:group",' coordsize="',D*Z,",",D*AE,'"',' coordorigin="0,0"',' style="width:',Z,"px;height:",AE,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]||this.m_[1][1]!=1||this.m_[1][0]){var p=[];p.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",K(AW.x/D),",","Dy=",K(AW.y/D),"");var AS=AW;var AR=this.getCoords_(AH+AJ,AF);var AP=this.getCoords_(AH,AF+AV);var AL=this.getCoords_(AH+AJ,AF+AV);AS.x=z.max(AS.x,AR.x,AP.x,AL.x);AS.y=z.max(AS.y,AR.y,AP.y,AL.y);AU.push("padding:0 ",K(AS.x/D),"px ",K(AS.y/D),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",p.join(""),", sizingmethod='clip');")}else{AU.push("top:",K(AW.y/D),"px;left:",K(AW.x/D),"px;")}AU.push(' ">','<g_vml_:image src="',AO.src,'"',' style="width:',D*AJ,"px;"," height:",D*AV,'px"',' cropleft="',AM/AG,'"',' croptop="',AK/AT,'"',' cropright="',(AG-AM-AQ)/AG,'"',' cropbottom="',(AT-AK-AX)/AT,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",AU.join(""))};M.stroke=function(AM){var m=10;var AN=10;var AE=5000;var AG={x:null,y:null};var AL={x:null,y:null};for(var AH=0;AH<this.currentPath_.length;AH+=AE){var AK=[];var AF=false;AK.push("<g_vml_:shape",' filled="',!!AM,'"',' style="position:absolute;width:',m,"px;height:",AN,'px;"',' coordorigin="0,0"',' coordsize="',D*m,",",D*AN,'"',' stroked="',!AM,'"',' path="');var AO=false;for(var AI=AH;AI<Math.min(AH+AE,this.currentPath_.length);AI++){if(AI%AE==0&&AI>0){AK.push(" m ",K(this.currentPath_[AI-1].x),",",K(this.currentPath_[AI-1].y))}var Z=this.currentPath_[AI];var AJ;switch(Z.type){case"moveTo":AJ=Z;AK.push(" m ",K(Z.x),",",K(Z.y));break;case"lineTo":AK.push(" l ",K(Z.x),",",K(Z.y));break;case"close":AK.push(" x ");Z=null;break;case"bezierCurveTo":AK.push(" c ",K(Z.cp1x),",",K(Z.cp1y),",",K(Z.cp2x),",",K(Z.cp2y),",",K(Z.x),",",K(Z.y));break;case"at":case"wa":AK.push(" ",Z.type," ",K(Z.x-this.arcScaleX_*Z.radius),",",K(Z.y-this.arcScaleY_*Z.radius)," ",K(Z.x+this.arcScaleX_*Z.radius),",",K(Z.y+this.arcScaleY_*Z.radius)," ",K(Z.xStart),",",K(Z.yStart)," ",K(Z.xEnd),",",K(Z.yEnd));break}if(Z){if(AG.x==null||Z.x<AG.x){AG.x=Z.x}if(AL.x==null||Z.x>AL.x){AL.x=Z.x}if(AG.y==null||Z.y<AG.y){AG.y=Z.y}if(AL.y==null||Z.y>AL.y){AL.y=Z.y}}}AK.push(' ">');if(!AM){R(this,AK)}else{a(this,AK,AG,AL)}AK.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",AK.join(""))}};function R(j,AE){var i=Y(j.strokeStyle);var m=i.color;var p=i.alpha*j.globalAlpha;var Z=j.lineScale_*j.lineWidth;if(Z<1){p*=Z}AE.push("<g_vml_:stroke",' opacity="',p,'"',' joinstyle="',j.lineJoin,'"',' miterlimit="',j.miterLimit,'"',' endcap="',t(j.lineCap),'"',' weight="',Z,'px"',' color="',m,'" />')}function a(AO,AG,Ah,AP){var AH=AO.fillStyle;var AY=AO.arcScaleX_;var AX=AO.arcScaleY_;var Z=AP.x-Ah.x;var m=AP.y-Ah.y;if(AH instanceof v){var AL=0;var Ac={x:0,y:0};var AU=0;var AK=1;if(AH.type_=="gradient"){var AJ=AH.x0_/AY;var j=AH.y0_/AX;var AI=AH.x1_/AY;var Aj=AH.y1_/AX;var Ag=AO.getCoords_(AJ,j);var Af=AO.getCoords_(AI,Aj);var AE=Af.x-Ag.x;var p=Af.y-Ag.y;AL=Math.atan2(AE,p)*180/Math.PI;if(AL<0){AL+=360}if(AL<0.000001){AL=0}}else{var Ag=AO.getCoords_(AH.x0_,AH.y0_);Ac={x:(Ag.x-Ah.x)/Z,y:(Ag.y-Ah.y)/m};Z/=AY*D;m/=AX*D;var Aa=z.max(Z,m);AU=2*AH.r0_/Aa;AK=2*AH.r1_/Aa-AU}var AS=AH.colors_;AS.sort(function(Ak,i){return Ak.offset-i.offset});var AN=AS.length;var AR=AS[0].color;var AQ=AS[AN-1].color;var AW=AS[0].alpha*AO.globalAlpha;var AV=AS[AN-1].alpha*AO.globalAlpha;var Ab=[];for(var Ae=0;Ae<AN;Ae++){var AM=AS[Ae];Ab.push(AM.offset*AK+AU+" "+AM.color)}AG.push('<g_vml_:fill type="',AH.type_,'"',' method="none" focus="100%"',' color="',AR,'"',' color2="',AQ,'"',' colors="',Ab.join(","),'"',' opacity="',AV,'"',' g_o_:opacity2="',AW,'"',' angle="',AL,'"',' focusposition="',Ac.x,",",Ac.y,'" />')}else{if(AH instanceof u){if(Z&&m){var AF=-Ah.x;var AZ=-Ah.y;AG.push("<g_vml_:fill",' position="',AF/Z*AY*AY,",",AZ/m*AX*AX,'"',' type="tile"',' src="',AH.src_,'" />')}}else{var Ai=Y(AO.fillStyle);var AT=Ai.color;var Ad=Ai.alpha*AO.globalAlpha;AG.push('<g_vml_:fill color="',AT,'" opacity="',Ad,'" />')}}}M.fill=function(){this.stroke(true)};M.closePath=function(){this.currentPath_.push({type:"close"})};M.getCoords_=function(j,i){var Z=this.m_;return{x:D*(j*Z[0][0]+i*Z[1][0]+Z[2][0])-F,y:D*(j*Z[0][1]+i*Z[1][1]+Z[2][1])-F}};M.save=function(){var Z={};Q(this,Z);this.aStack_.push(Z);this.mStack_.push(this.m_);this.m_=d(V(),this.m_)};M.restore=function(){if(this.aStack_.length){Q(this.aStack_.pop(),this);this.m_=this.mStack_.pop()}};function H(Z){return isFinite(Z[0][0])&&isFinite(Z[0][1])&&isFinite(Z[1][0])&&isFinite(Z[1][1])&&isFinite(Z[2][0])&&isFinite(Z[2][1])}function y(i,Z,j){if(!H(Z)){return }i.m_=Z;if(j){var p=Z[0][0]*Z[1][1]-Z[0][1]*Z[1][0];i.lineScale_=k(b(p))}}M.translate=function(j,i){var Z=[[1,0,0],[0,1,0],[j,i,1]];y(this,d(Z,this.m_),false)};M.rotate=function(i){var m=U(i);var j=J(i);var Z=[[m,j,0],[-j,m,0],[0,0,1]];y(this,d(Z,this.m_),false)};M.scale=function(j,i){this.arcScaleX_*=j;this.arcScaleY_*=i;var Z=[[j,0,0],[0,i,0],[0,0,1]];y(this,d(Z,this.m_),true)};M.transform=function(p,m,AF,AE,i,Z){var j=[[p,m,0],[AF,AE,0],[i,Z,1]];y(this,d(j,this.m_),true)};M.setTransform=function(AE,p,AG,AF,j,i){var Z=[[AE,p,0],[AG,AF,0],[j,i,1]];y(this,Z,true)};M.drawText_=function(AK,AI,AH,AN,AG){var AM=this.m_,AQ=1000,i=0,AP=AQ,AF={x:0,y:0},AE=[];var Z=P(X(this.font),this.element_);var j=AA(Z);var AR=this.element_.currentStyle;var p=this.textAlign.toLowerCase();switch(p){case"left":case"center":case"right":break;case"end":p=AR.direction=="ltr"?"right":"left";break;case"start":p=AR.direction=="rtl"?"right":"left";break;default:p="left"}switch(this.textBaseline){case"hanging":case"top":AF.y=Z.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":AF.y=-Z.size/2.25;break}switch(p){case"right":i=AQ;AP=0.05;break;case"center":i=AP=AQ/2;break}var AO=this.getCoords_(AI+AF.x,AH+AF.y);AE.push('<g_vml_:line from="',-i,' 0" to="',AP,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!AG,'" stroked="',!!AG,'" style="position:absolute;width:1px;height:1px;">');if(AG){R(this,AE)}else{a(this,AE,{x:-i,y:0},{x:AP,y:Z.size})}var AL=AM[0][0].toFixed(3)+","+AM[1][0].toFixed(3)+","+AM[0][1].toFixed(3)+","+AM[1][1].toFixed(3)+",0,0";var AJ=K(AO.x/D)+","+K(AO.y/D);AE.push('<g_vml_:skew on="t" matrix="',AL,'" ',' offset="',AJ,'" origin="',i,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',AD(AK),'" style="v-text-align:',p,";font:",AD(j),'" /></g_vml_:line>');this.element_.insertAdjacentHTML("beforeEnd",AE.join(""))};M.fillText=function(j,Z,m,i){this.drawText_(j,Z,m,i,false)};M.strokeText=function(j,Z,m,i){this.drawText_(j,Z,m,i,true)};M.measureText=function(j){if(!this.textMeasureEl_){var Z='<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>';this.element_.insertAdjacentHTML("beforeEnd",Z);this.textMeasureEl_=this.element_.lastChild}var i=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(i.createTextNode(j));return{width:this.textMeasureEl_.offsetWidth}};M.clip=function(){};M.arcTo=function(){};M.createPattern=function(i,Z){return new u(i,Z)};function v(Z){this.type_=Z;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}v.prototype.addColorStop=function(i,Z){Z=Y(Z);this.colors_.push({offset:i,color:Z.color,alpha:Z.alpha})};function u(i,Z){q(i);switch(Z){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=Z;break;default:n("SYNTAX_ERR")}this.src_=i.src;this.width_=i.width;this.height_=i.height}function n(Z){throw new o(Z)}function q(Z){if(!Z||Z.nodeType!=1||Z.tagName!="IMG"){n("TYPE_MISMATCH_ERR")}if(Z.readyState!="complete"){n("INVALID_STATE_ERR")}}function o(Z){this.code=this[Z];this.message=Z+": DOM Exception "+this.code}var x=o.prototype=new Error;x.INDEX_SIZE_ERR=1;x.DOMSTRING_SIZE_ERR=2;x.HIERARCHY_REQUEST_ERR=3;x.WRONG_DOCUMENT_ERR=4;x.INVALID_CHARACTER_ERR=5;x.NO_DATA_ALLOWED_ERR=6;x.NO_MODIFICATION_ALLOWED_ERR=7;x.NOT_FOUND_ERR=8;x.NOT_SUPPORTED_ERR=9;x.INUSE_ATTRIBUTE_ERR=10;x.INVALID_STATE_ERR=11;x.SYNTAX_ERR=12;x.INVALID_MODIFICATION_ERR=13;x.NAMESPACE_ERR=14;x.INVALID_ACCESS_ERR=15;x.VALIDATION_ERR=16;x.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=E;CanvasRenderingContext2D=W;CanvasGradient=v;CanvasPattern=u;DOMException=o})()};
+

--- a/js/flot/jquery.colorhelpers.js
+++ /dev/null
@@ -1,180 +1,1 @@
-/* Plugin for jQuery for working with colors.
- * 
- * Version 1.1.
- * 
- * Inspiration from jQuery color animation plugin by John Resig.
- *
- * Released under the MIT license by Ole Laursen, October 2009.
- *
- * Examples:
- *
- *   $.color.parse("#fff").scale('rgb', 0.25).add('a', -0.5).toString()
- *   var c = $.color.extract($("#mydiv"), 'background-color');
- *   console.log(c.r, c.g, c.b, c.a);
- *   $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)"
- *
- * Note that .scale() and .add() return the same modified object
- * instead of making a new one.
- *
- * V. 1.1: Fix error handling so e.g. parsing an empty string does
- * produce a color rather than just crashing.
- */ 
 
-(function($) {
-    $.color = {};
-
-    // construct color object with some convenient chainable helpers
-    $.color.make = function (r, g, b, a) {
-        var o = {};
-        o.r = r || 0;
-        o.g = g || 0;
-        o.b = b || 0;
-        o.a = a != null ? a : 1;
-
-        o.add = function (c, d) {
-            for (var i = 0; i < c.length; ++i)
-                o[c.charAt(i)] += d;
-            return o.normalize();
-        };
-        
-        o.scale = function (c, f) {
-            for (var i = 0; i < c.length; ++i)
-                o[c.charAt(i)] *= f;
-            return o.normalize();
-        };
-        
-        o.toString = function () {
-            if (o.a >= 1.0) {
-                return "rgb("+[o.r, o.g, o.b].join(",")+")";
-            } else {
-                return "rgba("+[o.r, o.g, o.b, o.a].join(",")+")";
-            }
-        };
-
-        o.normalize = function () {
-            function clamp(min, value, max) {
-                return value < min ? min: (value > max ? max: value);
-            }
-            
-            o.r = clamp(0, parseInt(o.r), 255);
-            o.g = clamp(0, parseInt(o.g), 255);
-            o.b = clamp(0, parseInt(o.b), 255);
-            o.a = clamp(0, o.a, 1);
-            return o;
-        };
-
-        o.clone = function () {
-            return $.color.make(o.r, o.b, o.g, o.a);
-        };
-
-        return o.normalize();
-    }
-
-    // extract CSS color property from element, going up in the DOM
-    // if it's "transparent"
-    $.color.extract = function (elem, css) {
-        var c;
-        do {
-            c = elem.css(css).toLowerCase();
-            // keep going until we find an element that has color, or
-            // we hit the body
-            if (c != '' && c != 'transparent')
-                break;
-            elem = elem.parent();
-        } while (!$.nodeName(elem.get(0), "body"));
-
-        // catch Safari's way of signalling transparent
-        if (c == "rgba(0, 0, 0, 0)")
-            c = "transparent";
-        
-        return $.color.parse(c);
-    }
-    
-    // parse CSS color string (like "rgb(10, 32, 43)" or "#fff"),
-    // returns color object, if parsing failed, you get black (0, 0,
-    // 0) out
-    $.color.parse = function (str) {
-        var res, m = $.color.make;
-
-        // Look for rgb(num,num,num)
-        if (res = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))
-            return m(parseInt(res[1], 10), parseInt(res[2], 10), parseInt(res[3], 10));
-        
-        // Look for rgba(num,num,num,num)
-        if (res = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))
-            return m(parseInt(res[1], 10), parseInt(res[2], 10), parseInt(res[3], 10), parseFloat(res[4]));
-            
-        // Look for rgb(num%,num%,num%)
-        if (res = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))
-            return m(parseFloat(res[1])*2.55, parseFloat(res[2])*2.55, parseFloat(res[3])*2.55);
-
-        // Look for rgba(num%,num%,num%,num)
-        if (res = /rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))
-            return m(parseFloat(res[1])*2.55, parseFloat(res[2])*2.55, parseFloat(res[3])*2.55, parseFloat(res[4]));
-        
-        // Look for #a0b1c2
-        if (res = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))
-            return m(parseInt(res[1], 16), parseInt(res[2], 16), parseInt(res[3], 16));
-
-        // Look for #fff
-        if (res = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))
-            return m(parseInt(res[1]+res[1], 16), parseInt(res[2]+res[2], 16), parseInt(res[3]+res[3], 16));
-
-        // Otherwise, we're most likely dealing with a named color
-        var name = $.trim(str).toLowerCase();
-        if (name == "transparent")
-            return m(255, 255, 255, 0);
-        else {
-            // default to black
-            res = lookupColors[name] || [0, 0, 0];
-            return m(res[0], res[1], res[2]);
-        }
-    }
-    
-    var lookupColors = {
-        aqua:[0,255,255],
-        azure:[240,255,255],
-        beige:[245,245,220],
-        black:[0,0,0],
-        blue:[0,0,255],
-        brown:[165,42,42],
-        cyan:[0,255,255],
-        darkblue:[0,0,139],
-        darkcyan:[0,139,139],
-        darkgrey:[169,169,169],
-        darkgreen:[0,100,0],
-        darkkhaki:[189,183,107],
-        darkmagenta:[139,0,139],
-        darkolivegreen:[85,107,47],
-        darkorange:[255,140,0],
-        darkorchid:[153,50,204],
-        darkred:[139,0,0],
-        darksalmon:[233,150,122],
-        darkviolet:[148,0,211],
-        fuchsia:[255,0,255],
-        gold:[255,215,0],
-        green:[0,128,0],
-        indigo:[75,0,130],
-        khaki:[240,230,140],
-        lightblue:[173,216,230],
-        lightcyan:[224,255,255],
-        lightgreen:[144,238,144],
-        lightgrey:[211,211,211],
-        lightpink:[255,182,193],
-        lightyellow:[255,255,224],
-        lime:[0,255,0],
-        magenta:[255,0,255],
-        maroon:[128,0,0],
-        navy:[0,0,128],
-        olive:[128,128,0],
-        orange:[255,165,0],
-        pink:[255,192,203],
-        purple:[128,0,128],
-        violet:[128,0,128],
-        red:[255,0,0],
-        silver:[192,192,192],
-        white:[255,255,255],
-        yellow:[255,255,0]
-    };
-})(jQuery);
-

--- a/js/flot/jquery.colorhelpers.min.js
+++ /dev/null
@@ -1,1 +1,1 @@
-(function(b){b.color={};b.color.make=function(f,e,c,d){var h={};h.r=f||0;h.g=e||0;h.b=c||0;h.a=d!=null?d:1;h.add=function(k,j){for(var g=0;g<k.length;++g){h[k.charAt(g)]+=j}return h.normalize()};h.scale=function(k,j){for(var g=0;g<k.length;++g){h[k.charAt(g)]*=j}return h.normalize()};h.toString=function(){if(h.a>=1){return"rgb("+[h.r,h.g,h.b].join(",")+")"}else{return"rgba("+[h.r,h.g,h.b,h.a].join(",")+")"}};h.normalize=function(){function g(j,k,i){return k<j?j:(k>i?i:k)}h.r=g(0,parseInt(h.r),255);h.g=g(0,parseInt(h.g),255);h.b=g(0,parseInt(h.b),255);h.a=g(0,h.a,1);return h};h.clone=function(){return b.color.make(h.r,h.b,h.g,h.a)};return h.normalize()};b.color.extract=function(e,d){var f;do{f=e.css(d).toLowerCase();if(f!=""&&f!="transparent"){break}e=e.parent()}while(!b.nodeName(e.get(0),"body"));if(f=="rgba(0, 0, 0, 0)"){f="transparent"}return b.color.parse(f)};b.color.parse=function(f){var e,c=b.color.make;if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return c(parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10))}if(e=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(f)){return c(parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10),parseFloat(e[4]))}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return c(parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55)}if(e=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(f)){return c(parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55,parseFloat(e[4]))}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return c(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16))}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return c(parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16))}var d=b.trim(f).toLowerCase();if(d=="transparent"){return c(255,255,255,0)}else{e=a[d]||[0,0,0];return c(e[0],e[1],e[2])}};var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
+

--- a/js/flot/jquery.flot.crosshair.js
+++ /dev/null
@@ -1,168 +1,1 @@
-/*
-Flot plugin for showing crosshairs, thin lines, when the mouse hovers
-over the plot.
 
-  crosshair: {
-    mode: null or "x" or "y" or "xy"
-    color: color
-    lineWidth: number
-  }
-
-Set the mode to one of "x", "y" or "xy". The "x" mode enables a
-vertical crosshair that lets you trace the values on the x axis, "y"
-enables a horizontal crosshair and "xy" enables them both. "color" is
-the color of the crosshair (default is "rgba(170, 0, 0, 0.80)"),
-"lineWidth" is the width of the drawn lines (default is 1).
-
-The plugin also adds four public methods:
-
-  - setCrosshair(pos)
-
-    Set the position of the crosshair. Note that this is cleared if
-    the user moves the mouse. "pos" is in coordinates of the plot and
-    should be on the form { x: xpos, y: ypos } (you can use x2/x3/...
-    if you're using multiple axes), which is coincidentally the same
-    format as what you get from a "plothover" event. If "pos" is null,
-    the crosshair is cleared.
-
-  - clearCrosshair()
-
-    Clear the crosshair.
-
-  - lockCrosshair(pos)
-
-    Cause the crosshair to lock to the current location, no longer
-    updating if the user moves the mouse. Optionally supply a position
-    (passed on to setCrosshair()) to move it to.
-
-    Example usage:
-      var myFlot = $.plot( $("#graph"), ..., { crosshair: { mode: "x" } } };
-      $("#graph").bind("plothover", function (evt, position, item) {
-        if (item) {
-          // Lock the crosshair to the data point being hovered
-          myFlot.lockCrosshair({ x: item.datapoint[0], y: item.datapoint[1] });
-        }
-        else {
-          // Return normal crosshair operation
-          myFlot.unlockCrosshair();
-        }
-      });
-
-  - unlockCrosshair()
-
-    Free the crosshair to move again after locking it.
-*/
-
-(function ($) {
-    var options = {
-        crosshair: {
-            mode: null, // one of null, "x", "y" or "xy",
-            color: "rgba(170, 0, 0, 0.80)",
-            lineWidth: 1
-        }
-    };
-    
-    function init(plot) {
-        // position of crosshair in pixels
-        var crosshair = { x: -1, y: -1, locked: false };
-
-        plot.setCrosshair = function setCrosshair(pos) {
-            if (!pos)
-                crosshair.x = -1;
-            else {
-                var o = plot.p2c(pos);
-                crosshair.x = Math.max(0, Math.min(o.left, plot.width()));
-                crosshair.y = Math.max(0, Math.min(o.top, plot.height()));
-            }
-            
-            plot.triggerRedrawOverlay();
-        };
-        
-        plot.clearCrosshair = plot.setCrosshair; // passes null for pos
-        
-        plot.lockCrosshair = function lockCrosshair(pos) {
-            if (pos)
-                plot.setCrosshair(pos);
-            crosshair.locked = true;
-        }
-
-        plot.unlockCrosshair = function unlockCrosshair() {
-            crosshair.locked = false;
-        }
-
-        function onMouseOut(e) {
-            if (crosshair.locked)
-                return;
-
-            if (crosshair.x != -1) {
-                crosshair.x = -1;
-                plot.triggerRedrawOverlay();
-            }
-        }
-
-        function onMouseMove(e) {
-            if (crosshair.locked)
-                return;
-                
-            if (plot.getSelection && plot.getSelection()) {
-                crosshair.x = -1; // hide the crosshair while selecting
-                return;
-            }
-                
-            var offset = plot.offset();
-            crosshair.x = Math.max(0, Math.min(e.pageX - offset.left, plot.width()));
-            crosshair.y = Math.max(0, Math.min(e.pageY - offset.top, plot.height()));
-            plot.triggerRedrawOverlay();
-        }
-        
-        plot.hooks.bindEvents.push(function (plot, eventHolder) {
-            if (!plot.getOptions().crosshair.mode)
-                return;
-
-            eventHolder.mouseout(onMouseOut);
-            eventHolder.mousemove(onMouseMove);
-        });
-
-        plot.hooks.drawOverlay.push(function (plot, ctx) {
-            var c = plot.getOptions().crosshair;
-            if (!c.mode)
-                return;
-
-            var plotOffset = plot.getPlotOffset();
-            
-            ctx.save();
-            ctx.translate(plotOffset.left, plotOffset.top);
-
-            if (crosshair.x != -1) {
-                ctx.strokeStyle = c.color;
-                ctx.lineWidth = c.lineWidth;
-                ctx.lineJoin = "round";
-
-                ctx.beginPath();
-                if (c.mode.indexOf("x") != -1) {
-                    ctx.moveTo(crosshair.x, 0);
-                    ctx.lineTo(crosshair.x, plot.height());
-                }
-                if (c.mode.indexOf("y") != -1) {
-                    ctx.moveTo(0, crosshair.y);
-                    ctx.lineTo(plot.width(), crosshair.y);
-                }
-                ctx.stroke();
-            }
-            ctx.restore();
-        });
-
-        plot.hooks.shutdown.push(function (plot, eventHolder) {
-            eventHolder.unbind("mouseout", onMouseOut);
-            eventHolder.unbind("mousemove", onMouseMove);
-        });
-    }
-    
-    $.plot.plugins.push({
-        init: init,
-        options: options,
-        name: 'crosshair',
-        version: '1.0'
-    });
-})(jQuery);
-

--- a/js/flot/jquery.flot.crosshair.min.js
+++ /dev/null
@@ -1,1 +1,1 @@
-(function(b){var a={crosshair:{mode:null,color:"rgba(170, 0, 0, 0.80)",lineWidth:1}};function c(h){var j={x:-1,y:-1,locked:false};h.setCrosshair=function e(l){if(!l){j.x=-1}else{var k=h.p2c(l);j.x=Math.max(0,Math.min(k.left,h.width()));j.y=Math.max(0,Math.min(k.top,h.height()))}h.triggerRedrawOverlay()};h.clearCrosshair=h.setCrosshair;h.lockCrosshair=function f(k){if(k){h.setCrosshair(k)}j.locked=true};h.unlockCrosshair=function g(){j.locked=false};function d(k){if(j.locked){return}if(j.x!=-1){j.x=-1;h.triggerRedrawOverlay()}}function i(k){if(j.locked){return}if(h.getSelection&&h.getSelection()){j.x=-1;return}var l=h.offset();j.x=Math.max(0,Math.min(k.pageX-l.left,h.width()));j.y=Math.max(0,Math.min(k.pageY-l.top,h.height()));h.triggerRedrawOverlay()}h.hooks.bindEvents.push(function(l,k){if(!l.getOptions().crosshair.mode){return}k.mouseout(d);k.mousemove(i)});h.hooks.drawOverlay.push(function(m,k){var n=m.getOptions().crosshair;if(!n.mode){return}var l=m.getPlotOffset();k.save();k.translate(l.left,l.top);if(j.x!=-1){k.strokeStyle=n.color;k.lineWidth=n.lineWidth;k.lineJoin="round";k.beginPath();if(n.mode.indexOf("x")!=-1){k.moveTo(j.x,0);k.lineTo(j.x,m.height())}if(n.mode.indexOf("y")!=-1){k.moveTo(0,j.y);k.lineTo(m.width(),j.y)}k.stroke()}k.restore()});h.hooks.shutdown.push(function(l,k){k.unbind("mouseout",d);k.unbind("mousemove",i)})}b.plot.plugins.push({init:c,options:a,name:"crosshair",version:"1.0"})})(jQuery);
+

--- a/js/flot/jquery.flot.fillbetween.js
+++ /dev/null
@@ -1,184 +1,1 @@
-/*
-Flot plugin for computing bottoms for filled line and bar charts.
 
-The case: you've got two series that you want to fill the area
-between. In Flot terms, you need to use one as the fill bottom of the
-other. You can specify the bottom of each data point as the third
-coordinate manually, or you can use this plugin to compute it for you.
-
-In order to name the other series, you need to give it an id, like this
-
-  var dataset = [
-       { data: [ ... ], id: "foo" } ,         // use default bottom
-       { data: [ ... ], fillBetween: "foo" }, // use first dataset as bottom
-       ];
-
-  $.plot($("#placeholder"), dataset, { line: { show: true, fill: true }});
-
-As a convenience, if the id given is a number that doesn't appear as
-an id in the series, it is interpreted as the index in the array
-instead (so fillBetween: 0 can also mean the first series).
-  
-Internally, the plugin modifies the datapoints in each series. For
-line series, extra data points might be inserted through
-interpolation. Note that at points where the bottom line is not
-defined (due to a null point or start/end of line), the current line
-will show a gap too. The algorithm comes from the jquery.flot.stack.js
-plugin, possibly some code could be shared.
-*/
-
-(function ($) {
-    var options = {
-        series: { fillBetween: null } // or number
-    };
-    
-    function init(plot) {
-        function findBottomSeries(s, allseries) {
-            var i;
-            for (i = 0; i < allseries.length; ++i) {
-                if (allseries[i].id == s.fillBetween)
-                    return allseries[i];
-            }
-
-            if (typeof s.fillBetween == "number") {
-                i = s.fillBetween;
-            
-                if (i < 0 || i >= allseries.length)
-                    return null;
-
-                return allseries[i];
-            }
-            
-            return null;
-        }
-        
-        function computeFillBottoms(plot, s, datapoints) {
-            if (s.fillBetween == null)
-                return;
-
-            var other = findBottomSeries(s, plot.getData());
-            if (!other)
-                return;
-
-            var ps = datapoints.pointsize,
-                points = datapoints.points,
-                otherps = other.datapoints.pointsize,
-                otherpoints = other.datapoints.points,
-                newpoints = [],
-                px, py, intery, qx, qy, bottom,
-                withlines = s.lines.show,
-                withbottom = ps > 2 && datapoints.format[2].y,
-                withsteps = withlines && s.lines.steps,
-                fromgap = true,
-                i = 0, j = 0, l;
-
-            while (true) {
-                if (i >= points.length)
-                    break;
-
-                l = newpoints.length;
-
-                if (points[i] == null) {
-                    // copy gaps
-                    for (m = 0; m < ps; ++m)
-                        newpoints.push(points[i + m]);
-                    i += ps;
-                }
-                else if (j >= otherpoints.length) {
-                    // for lines, we can't use the rest of the points
-                    if (!withlines) {
-                        for (m = 0; m < ps; ++m)
-                            newpoints.push(points[i + m]);
-                    }
-                    i += ps;
-                }
-                else if (otherpoints[j] == null) {
-                    // oops, got a gap
-                    for (m = 0; m < ps; ++m)
-                        newpoints.push(null);
-                    fromgap = true;
-                    j += otherps;
-                }
-                else {
-                    // cases where we actually got two points
-                    px = points[i];
-                    py = points[i + 1];
-                    qx = otherpoints[j];
-                    qy = otherpoints[j + 1];
-                    bottom = 0;
-
-                    if (px == qx) {
-                        for (m = 0; m < ps; ++m)
-                            newpoints.push(points[i + m]);
-
-                        //newpoints[l + 1] += qy;
-                        bottom = qy;
-                        
-                        i += ps;
-                        j += otherps;
-                    }
-                    else if (px > qx) {
-                        // we got past point below, might need to
-                        // insert interpolated extra point
-                        if (withlines && i > 0 && points[i - ps] != null) {
-                            intery = py + (points[i - ps + 1] - py) * (qx - px) / (points[i - ps] - px);
-                            newpoints.push(qx);
-                            newpoints.push(intery)
-                            for (m = 2; m < ps; ++m)
-                                newpoints.push(points[i + m]);
-                            bottom = qy; 
-                        }
-
-                        j += otherps;
-                    }
-                    else { // px < qx
-                        if (fromgap && withlines) {
-                            // if we come from a gap, we just skip this point
-                            i += ps;
-                            continue;
-                        }
-                            
-                        for (m = 0; m < ps; ++m)
-                            newpoints.push(points[i + m]);
-                        
-                        // we might be able to interpolate a point below,
-                        // this can give us a better y
-                        if (withlines && j > 0 && otherpoints[j - otherps] != null)
-                            bottom = qy + (otherpoints[j - otherps + 1] - qy) * (px - qx) / (otherpoints[j - otherps] - qx);
-
-                        //newpoints[l + 1] += bottom;
-                        
-                        i += ps;
-                    }
-
-                    fromgap = false;
-                    
-                    if (l != newpoints.length && withbottom)
-                        newpoints[l + 2] = bottom;
-                }
-
-                // maintain the line steps invariant
-                if (withsteps && l != newpoints.length && l > 0
-                    && newpoints[l] != null
-                    && newpoints[l] != newpoints[l - ps]
-                    && newpoints[l + 1] != newpoints[l - ps + 1]) {
-                    for (m = 0; m < ps; ++m)
-                        newpoints[l + ps + m] = newpoints[l + m];
-                    newpoints[l + 1] = newpoints[l - ps + 1];
-                }
-            }
-
-            datapoints.points = newpoints;
-        }
-        
-        plot.hooks.processDatapoints.push(computeFillBottoms);
-    }
-    
-    $.plot.plugins.push({
-        init: init,
-        options: options,
-        name: 'fillbetween',
-        version: '1.0'
-    });
-})(jQuery);
-

--- a/js/flot/jquery.flot.fillbetween.min.js
+++ /dev/null
@@ -1,1 +1,1 @@
-(function(b){var a={series:{fillBetween:null}};function c(f){function d(j,h){var g;for(g=0;g<h.length;++g){if(h[g].id==j.fillBetween){return h[g]}}if(typeof j.fillBetween=="number"){g=j.fillBetween;if(g<0||g>=h.length){return null}return h[g]}return null}function e(B,u,g){if(u.fillBetween==null){return}var p=d(u,B.getData());if(!p){return}var y=g.pointsize,E=g.points,h=p.datapoints.pointsize,x=p.datapoints.points,r=[],w,v,k,G,F,q,t=u.lines.show,o=y>2&&g.format[2].y,n=t&&u.lines.steps,D=true,C=0,A=0,z;while(true){if(C>=E.length){break}z=r.length;if(E[C]==null){for(m=0;m<y;++m){r.push(E[C+m])}C+=y}else{if(A>=x.length){if(!t){for(m=0;m<y;++m){r.push(E[C+m])}}C+=y}else{if(x[A]==null){for(m=0;m<y;++m){r.push(null)}D=true;A+=h}else{w=E[C];v=E[C+1];G=x[A];F=x[A+1];q=0;if(w==G){for(m=0;m<y;++m){r.push(E[C+m])}q=F;C+=y;A+=h}else{if(w>G){if(t&&C>0&&E[C-y]!=null){k=v+(E[C-y+1]-v)*(G-w)/(E[C-y]-w);r.push(G);r.push(k);for(m=2;m<y;++m){r.push(E[C+m])}q=F}A+=h}else{if(D&&t){C+=y;continue}for(m=0;m<y;++m){r.push(E[C+m])}if(t&&A>0&&x[A-h]!=null){q=F+(x[A-h+1]-F)*(w-G)/(x[A-h]-G)}C+=y}}D=false;if(z!=r.length&&o){r[z+2]=q}}}}if(n&&z!=r.length&&z>0&&r[z]!=null&&r[z]!=r[z-y]&&r[z+1]!=r[z-y+1]){for(m=0;m<y;++m){r[z+y+m]=r[z+m]}r[z+1]=r[z-y+1]}}g.points=r}f.hooks.processDatapoints.push(e)}b.plot.plugins.push({init:c,options:a,name:"fillbetween",version:"1.0"})})(jQuery);
+

--- a/js/flot/jquery.flot.image.js
+++ /dev/null
@@ -1,239 +1,1 @@
-/*
-Flot plugin for plotting images, e.g. useful for putting ticks on a
-prerendered complex visualization.
 
-The data syntax is [[image, x1, y1, x2, y2], ...] where (x1, y1) and
-(x2, y2) are where you intend the two opposite corners of the image to
-end up in the plot. Image must be a fully loaded Javascript image (you
-can make one with new Image()). If the image is not complete, it's
-skipped when plotting.
-
-There are two helpers included for retrieving images. The easiest work
-the way that you put in URLs instead of images in the data (like
-["myimage.png", 0, 0, 10, 10]), then call $.plot.image.loadData(data,
-options, callback) where data and options are the same as you pass in
-to $.plot. This loads the images, replaces the URLs in the data with
-the corresponding images and calls "callback" when all images are
-loaded (or failed loading). In the callback, you can then call $.plot
-with the data set. See the included example.
-
-A more low-level helper, $.plot.image.load(urls, callback) is also
-included. Given a list of URLs, it calls callback with an object
-mapping from URL to Image object when all images are loaded or have
-failed loading.
-
-Options for the plugin are
-
-  series: {
-      images: {
-          show: boolean
-          anchor: "corner" or "center"
-          alpha: [0,1]
-      }
-  }
-
-which can be specified for a specific series
-
-  $.plot($("#placeholder"), [{ data: [ ... ], images: { ... } ])
-
-Note that because the data format is different from usual data points,
-you can't use images with anything else in a specific data series.
-
-Setting "anchor" to "center" causes the pixels in the image to be
-anchored at the corner pixel centers inside of at the pixel corners,
-effectively letting half a pixel stick out to each side in the plot.
-
-
-A possible future direction could be support for tiling for large
-images (like Google Maps).
-
-*/
-
-(function ($) {
-    var options = {
-        series: {
-            images: {
-                show: false,
-                alpha: 1,
-                anchor: "corner" // or "center"
-            }
-        }
-    };
-
-    $.plot.image = {};
-
-    $.plot.image.loadDataImages = function (series, options, callback) {
-        var urls = [], points = [];
-
-        var defaultShow = options.series.images.show;
-        
-        $.each(series, function (i, s) {
-            if (!(defaultShow || s.images.show))
-                return;
-            
-            if (s.data)
-                s = s.data;
-
-            $.each(s, function (i, p) {
-                if (typeof p[0] == "string") {
-                    urls.push(p[0]);
-                    points.push(p);
-                }
-            });
-        });
-
-        $.plot.image.load(urls, function (loadedImages) {
-            $.each(points, function (i, p) {
-                var url = p[0];
-                if (loadedImages[url])
-                    p[0] = loadedImages[url];
-            });
-
-            callback();
-        });
-    }
-    
-    $.plot.image.load = function (urls, callback) {
-        var missing = urls.length, loaded = {};
-        if (missing == 0)
-            callback({});
-
-        $.each(urls, function (i, url) {
-            var handler = function () {
-                --missing;
-                
-                loaded[url] = this;
-                
-                if (missing == 0)
-                    callback(loaded);
-            };
-
-            $('<img />').load(handler).error(handler).attr('src', url);
-        });
-    }
-    
-    function drawSeries(plot, ctx, series) {
-        var plotOffset = plot.getPlotOffset();
-        
-        if (!series.images || !series.images.show)
-            return;
-        
-        var points = series.datapoints.points,
-            ps = series.datapoints.pointsize;
-        
-        for (var i = 0; i < points.length; i += ps) {
-            var img = points[i],
-                x1 = points[i + 1], y1 = points[i + 2],
-                x2 = points[i + 3], y2 = points[i + 4],
-                xaxis = series.xaxis, yaxis = series.yaxis,
-                tmp;
-
-            // actually we should check img.complete, but it
-            // appears to be a somewhat unreliable indicator in
-            // IE6 (false even after load event)
-            if (!img || img.width <= 0 || img.height <= 0)
-                continue;
-
-            if (x1 > x2) {
-                tmp = x2;
-                x2 = x1;
-                x1 = tmp;
-            }
-            if (y1 > y2) {
-                tmp = y2;
-                y2 = y1;
-                y1 = tmp;
-            }
-            
-            // if the anchor is at the center of the pixel, expand the 
-            // image by 1/2 pixel in each direction
-            if (series.images.anchor == "center") {
-                tmp = 0.5 * (x2-x1) / (img.width - 1);
-                x1 -= tmp;
-                x2 += tmp;
-                tmp = 0.5 * (y2-y1) / (img.height - 1);
-                y1 -= tmp;
-                y2 += tmp;
-            }
-            
-            // clip
-            if (x1 == x2 || y1 == y2 ||
-                x1 >= xaxis.max || x2 <= xaxis.min ||
-                y1 >= yaxis.max || y2 <= yaxis.min)
-                continue;
-
-            var sx1 = 0, sy1 = 0, sx2 = img.width, sy2 = img.height;
-            if (x1 < xaxis.min) {
-                sx1 += (sx2 - sx1) * (xaxis.min - x1) / (x2 - x1);
-                x1 = xaxis.min;
-            }
-
-            if (x2 > xaxis.max) {
-                sx2 += (sx2 - sx1) * (xaxis.max - x2) / (x2 - x1);
-                x2 = xaxis.max;
-            }
-
-            if (y1 < yaxis.min) {
-                sy2 += (sy1 - sy2) * (yaxis.min - y1) / (y2 - y1);
-                y1 = yaxis.min;
-            }
-
-            if (y2 > yaxis.max) {
-                sy1 += (sy1 - sy2) * (yaxis.max - y2) / (y2 - y1);
-                y2 = yaxis.max;
-            }
-            
-            x1 = xaxis.p2c(x1);
-            x2 = xaxis.p2c(x2);
-            y1 = yaxis.p2c(y1);
-            y2 = yaxis.p2c(y2);
-            
-            // the transformation may have swapped us
-            if (x1 > x2) {
-                tmp = x2;
-                x2 = x1;
-                x1 = tmp;
-            }
-            if (y1 > y2) {
-                tmp = y2;
-                y2 = y1;
-                y1 = tmp;
-            }
-
-            tmp = ctx.globalAlpha;
-            ctx.globalAlpha *= series.images.alpha;
-            ctx.drawImage(img,
-                          sx1, sy1, sx2 - sx1, sy2 - sy1,
-                          x1 + plotOffset.left, y1 + plotOffset.top,
-                          x2 - x1, y2 - y1);
-            ctx.globalAlpha = tmp;
-        }
-    }
-
-    function processRawData(plot, series, data, datapoints) {
-        if (!series.images.show)
-            return;
-
-        // format is Image, x1, y1, x2, y2 (opposite corners)
-        datapoints.format = [
-            { required: true },
-            { x: true, number: true, required: true },
-            { y: true, number: true, required: true },
-            { x: true, number: true, required: true },
-            { y: true, number: true, required: true }
-        ];
-    }
-    
-    function init(plot) {
-        plot.hooks.processRawData.push(processRawData);
-        plot.hooks.drawSeries.push(drawSeries);
-    }
-    
-    $.plot.plugins.push({
-        init: init,
-        options: options,
-        name: 'image',
-        version: '1.1'
-    });
-})(jQuery);
-

--- a/js/flot/jquery.flot.image.min.js
+++ /dev/null
@@ -1,1 +1,1 @@
-(function(c){var a={series:{images:{show:false,alpha:1,anchor:"corner"}}};c.plot.image={};c.plot.image.loadDataImages=function(g,f,k){var j=[],h=[];var i=f.series.images.show;c.each(g,function(l,m){if(!(i||m.images.show)){return}if(m.data){m=m.data}c.each(m,function(n,o){if(typeof o[0]=="string"){j.push(o[0]);h.push(o)}})});c.plot.image.load(j,function(l){c.each(h,function(n,o){var m=o[0];if(l[m]){o[0]=l[m]}});k()})};c.plot.image.load=function(h,i){var g=h.length,f={};if(g==0){i({})}c.each(h,function(k,j){var l=function(){--g;f[j]=this;if(g==0){i(f)}};c("<img />").load(l).error(l).attr("src",j)})};function d(q,o,l){var m=q.getPlotOffset();if(!l.images||!l.images.show){return}var r=l.datapoints.points,n=l.datapoints.pointsize;for(var t=0;t<r.length;t+=n){var y=r[t],w=r[t+1],g=r[t+2],v=r[t+3],f=r[t+4],h=l.xaxis,u=l.yaxis,x;if(!y||y.width<=0||y.height<=0){continue}if(w>v){x=v;v=w;w=x}if(g>f){x=f;f=g;g=x}if(l.images.anchor=="center"){x=0.5*(v-w)/(y.width-1);w-=x;v+=x;x=0.5*(f-g)/(y.height-1);g-=x;f+=x}if(w==v||g==f||w>=h.max||v<=h.min||g>=u.max||f<=u.min){continue}var k=0,s=0,j=y.width,p=y.height;if(w<h.min){k+=(j-k)*(h.min-w)/(v-w);w=h.min}if(v>h.max){j+=(j-k)*(h.max-v)/(v-w);v=h.max}if(g<u.min){p+=(s-p)*(u.min-g)/(f-g);g=u.min}if(f>u.max){s+=(s-p)*(u.max-f)/(f-g);f=u.max}w=h.p2c(w);v=h.p2c(v);g=u.p2c(g);f=u.p2c(f);if(w>v){x=v;v=w;w=x}if(g>f){x=f;f=g;g=x}x=o.globalAlpha;o.globalAlpha*=l.images.alpha;o.drawImage(y,k,s,j-k,p-s,w+m.left,g+m.top,v-w,f-g);o.globalAlpha=x}}function b(i,f,g,h){if(!f.images.show){return}h.format=[{required:true},{x:true,number:true,required:true},{y:true,number:true,required:true},{x:true,number:true,required:true},{y:true,number:true,required:true}]}function e(f){f.hooks.processRawData.push(b);f.hooks.drawSeries.push(d)}c.plot.plugins.push({init:e,options:a,name:"image",version:"1.1"})})(jQuery);
+

file:a/js/flot/jquery.flot.js (deleted)
--- a/js/flot/jquery.flot.js
+++ /dev/null
@@ -1,2600 +1,1 @@
-/*! Javascript plotting library for jQuery, v. 0.7.
- *
- * Released under the MIT license by IOLA, December 2007.
- *
- */
 
-// first an inline dependency, jquery.colorhelpers.js, we inline it here
-// for convenience
-
-/* Plugin for jQuery for working with colors.
- * 
- * Version 1.1.
- * 
- * Inspiration from jQuery color animation plugin by John Resig.
- *
- * Released under the MIT license by Ole Laursen, October 2009.
- *
- * Examples:
- *
- *   $.color.parse("#fff").scale('rgb', 0.25).add('a', -0.5).toString()
- *   var c = $.color.extract($("#mydiv"), 'background-color');
- *   console.log(c.r, c.g, c.b, c.a);
- *   $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)"
- *
- * Note that .scale() and .add() return the same modified object
- * instead of making a new one.
- *
- * V. 1.1: Fix error handling so e.g. parsing an empty string does
- * produce a color rather than just crashing.
- */ 
-(function(B){B.color={};B.color.make=function(F,E,C,D){var G={};G.r=F||0;G.g=E||0;G.b=C||0;G.a=D!=null?D:1;G.add=function(J,I){for(var H=0;H<J.length;++H){G[J.charAt(H)]+=I}return G.normalize()};G.scale=function(J,I){for(var H=0;H<J.length;++H){G[J.charAt(H)]*=I}return G.normalize()};G.toString=function(){if(G.a>=1){return"rgb("+[G.r,G.g,G.b].join(",")+")"}else{return"rgba("+[G.r,G.g,G.b,G.a].join(",")+")"}};G.normalize=function(){function H(J,K,I){return K<J?J:(K>I?I:K)}G.r=H(0,parseInt(G.r),255);G.g=H(0,parseInt(G.g),255);G.b=H(0,parseInt(G.b),255);G.a=H(0,G.a,1);return G};G.clone=function(){return B.color.make(G.r,G.b,G.g,G.a)};return G.normalize()};B.color.extract=function(D,C){var E;do{E=D.css(C).toLowerCase();if(E!=""&&E!="transparent"){break}D=D.parent()}while(!B.nodeName(D.get(0),"body"));if(E=="rgba(0, 0, 0, 0)"){E="transparent"}return B.color.parse(E)};B.color.parse=function(F){var E,C=B.color.make;if(E=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(F)){return C(parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10))}if(E=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(F)){return C(parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10),parseFloat(E[4]))}if(E=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(F)){return C(parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55)}if(E=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(F)){return C(parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55,parseFloat(E[4]))}if(E=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(F)){return C(parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16))}if(E=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(F)){return C(parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16))}var D=B.trim(F).toLowerCase();if(D=="transparent"){return C(255,255,255,0)}else{E=A[D]||[0,0,0];return C(E[0],E[1],E[2])}};var A={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
-
-// the actual Flot code
-(function($) {
-    function Plot(placeholder, data_, options_, plugins) {
-        // data is on the form:
-        //   [ series1, series2 ... ]
-        // where series is either just the data as [ [x1, y1], [x2, y2], ... ]
-        // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... }
-        
-        var series = [],
-            options = {
-                // the color theme used for graphs
-                colors: ["#edc240", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"],
-                legend: {
-                    show: true,
-                    noColumns: 1, // number of colums in legend table
-                    labelFormatter: null, // fn: string -> string
-                    labelBoxBorderColor: "#ccc", // border color for the little label boxes
-                    container: null, // container (as jQuery object) to put legend in, null means default on top of graph
-                    position: "ne", // position of default legend container within plot
-                    margin: 5, // distance from grid edge to default legend container within plot
-                    backgroundColor: null, // null means auto-detect
-                    backgroundOpacity: 0.85 // set to 0 to avoid background
-                },
-                xaxis: {
-                    show: null, // null = auto-detect, true = always, false = never
-                    position: "bottom", // or "top"
-                    mode: null, // null or "time"
-                    color: null, // base color, labels, ticks
-                    tickColor: null, // possibly different color of ticks, e.g. "rgba(0,0,0,0.15)"
-                    transform: null, // null or f: number -> number to transform axis
-                    inverseTransform: null, // if transform is set, this should be the inverse function
-                    min: null, // min. value to show, null means set automatically
-                    max: null, // max. value to show, null means set automatically
-                    autoscaleMargin: null, // margin in % to add if auto-setting min/max
-                    ticks: null, // either [1, 3] or [[1, "a"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks
-                    tickFormatter: null, // fn: number -> string
-                    labelWidth: null, // size of tick labels in pixels
-                    labelHeight: null,
-                    reserveSpace: null, // whether to reserve space even if axis isn't shown
-                    tickLength: null, // size in pixels of ticks, or "full" for whole line
-                    alignTicksWithAxis: null, // axis number or null for no sync
-                    
-                    // mode specific options
-                    tickDecimals: null, // no. of decimals, null means auto
-                    tickSize: null, // number or [number, "unit"]
-                    minTickSize: null, // number or [number, "unit"]
-                    monthNames: null, // list of names of months
-                    timeformat: null, // format string to use
-                    twelveHourClock: false // 12 or 24 time in time mode
-                },
-                yaxis: {
-                    autoscaleMargin: 0.02,
-                    position: "left" // or "right"
-                },
-                xaxes: [],
-                yaxes: [],
-                series: {
-                    points: {
-                        show: false,
-                        radius: 3,
-                        lineWidth: 2, // in pixels
-                        fill: true,
-                        fillColor: "#ffffff",
-                        symbol: "circle" // or callback
-                    },
-                    lines: {
-                        // we don't put in show: false so we can see
-                        // whether lines were actively disabled 
-                        lineWidth: 2, // in pixels
-                        fill: false,
-                        fillColor: null,
-                        steps: false
-                    },
-                    bars: {
-                        show: false,
-                        lineWidth: 2, // in pixels
-                        barWidth: 1, // in units of the x axis
-                        fill: true,
-                        fillColor: null,
-                        align: "left", // or "center" 
-                        horizontal: false
-                    },
-                    shadowSize: 3
-                },
-                grid: {
-                    show: true,
-                    aboveData: false,
-                    color: "#545454", // primary color used for outline and labels
-                    backgroundColor: null, // null for transparent, else color
-                    borderColor: null, // set if different from the grid color
-                    tickColor: null, // color for the ticks, e.g. "rgba(0,0,0,0.15)"
-                    labelMargin: 5, // in pixels
-                    axisMargin: 8, // in pixels
-                    borderWidth: 2, // in pixels
-                    minBorderMargin: null, // in pixels, null means taken from points radius
-                    markings: null, // array of ranges or fn: axes -> array of ranges
-                    markingsColor: "#f4f4f4",
-                    markingsLineWidth: 2,
-                    // interactive stuff
-                    clickable: false,
-                    hoverable: false,
-                    autoHighlight: true, // highlight in case mouse is near
-                    mouseActiveRadius: 10 // how far the mouse can be away to activate an item
-                },
-                hooks: {}
-            },
-        canvas = null,      // the canvas for the plot itself
-        overlay = null,     // canvas for interactive stuff on top of plot
-        eventHolder = null, // jQuery object that events should be bound to
-        ctx = null, octx = null,
-        xaxes = [], yaxes = [],
-        plotOffset = { left: 0, right: 0, top: 0, bottom: 0},
-        canvasWidth = 0, canvasHeight = 0,
-        plotWidth = 0, plotHeight = 0,
-        hooks = {
-            processOptions: [],
-            processRawData: [],
-            processDatapoints: [],
-            drawSeries: [],
-            draw: [],
-            bindEvents: [],
-            drawOverlay: [],
-            shutdown: []
-        },
-        plot = this;
-
-        // public functions
-        plot.setData = setData;
-        plot.setupGrid = setupGrid;
-        plot.draw = draw;
-        plot.getPlaceholder = function() { return placeholder; };
-        plot.getCanvas = function() { return canvas; };
-        plot.getPlotOffset = function() { return plotOffset; };
-        plot.width = function () { return plotWidth; };
-        plot.height = function () { return plotHeight; };
-        plot.offset = function () {
-            var o = eventHolder.offset();
-            o.left += plotOffset.left;
-            o.top += plotOffset.top;
-            return o;
-        };
-        plot.getData = function () { return series; };
-        plot.getAxes = function () {
-            var res = {}, i;
-            $.each(xaxes.concat(yaxes), function (_, axis) {
-                if (axis)
-                    res[axis.direction + (axis.n != 1 ? axis.n : "") + "axis"] = axis;
-            });
-            return res;
-        };
-        plot.getXAxes = function () { return xaxes; };
-        plot.getYAxes = function () { return yaxes; };
-        plot.c2p = canvasToAxisCoords;
-        plot.p2c = axisToCanvasCoords;
-        plot.getOptions = function () { return options; };
-        plot.highlight = highlight;
-        plot.unhighlight = unhighlight;
-        plot.triggerRedrawOverlay = triggerRedrawOverlay;
-        plot.pointOffset = function(point) {
-            return {
-                left: parseInt(xaxes[axisNumber(point, "x") - 1].p2c(+point.x) + plotOffset.left),
-                top: parseInt(yaxes[axisNumber(point, "y") - 1].p2c(+point.y) + plotOffset.top)
-            };
-        };
-        plot.shutdown = shutdown;
-        plot.resize = function () {
-            getCanvasDimensions();
-            resizeCanvas(canvas);
-            resizeCanvas(overlay);
-        };
-
-        // public attributes
-        plot.hooks = hooks;
-        
-        // initialize
-        initPlugins(plot);
-        parseOptions(options_);
-        setupCanvases();
-        setData(data_);
-        setupGrid();
-        draw();
-        bindEvents();
-
-
-        function executeHooks(hook, args) {
-            args = [plot].concat(args);
-            for (var i = 0; i < hook.length; ++i)
-                hook[i].apply(this, args);
-        }
-
-        function initPlugins() {
-            for (var i = 0; i < plugins.length; ++i) {
-                var p = plugins[i];
-                p.init(plot);
-                if (p.options)
-                    $.extend(true, options, p.options);
-            }
-        }
-        
-        function parseOptions(opts) {
-            var i;
-            
-            $.extend(true, options, opts);
-            
-            if (options.xaxis.color == null)
-                options.xaxis.color = options.grid.color;
-            if (options.yaxis.color == null)
-                options.yaxis.color = options.grid.color;
-            
-            if (options.xaxis.tickColor == null) // backwards-compatibility
-                options.xaxis.tickColor = options.grid.tickColor;
-            if (options.yaxis.tickColor == null) // backwards-compatibility
-                options.yaxis.tickColor = options.grid.tickColor;
-
-            if (options.grid.borderColor == null)
-                options.grid.borderColor = options.grid.color;
-            if (options.grid.tickColor == null)
-                options.grid.tickColor = $.color.parse(options.grid.color).scale('a', 0.22).toString();
-            
-            // fill in defaults in axes, copy at least always the
-            // first as the rest of the code assumes it'll be there
-            for (i = 0; i < Math.max(1, options.xaxes.length); ++i)
-                options.xaxes[i] = $.extend(true, {}, options.xaxis, options.xaxes[i]);
-            for (i = 0; i < Math.max(1, options.yaxes.length); ++i)
-                options.yaxes[i] = $.extend(true, {}, options.yaxis, options.yaxes[i]);
-
-            // backwards compatibility, to be removed in future
-            if (options.xaxis.noTicks && options.xaxis.ticks == null)
-                options.xaxis.ticks = options.xaxis.noTicks;
-            if (options.yaxis.noTicks && options.yaxis.ticks == null)
-                options.yaxis.ticks = options.yaxis.noTicks;
-            if (options.x2axis) {
-                options.xaxes[1] = $.extend(true, {}, options.xaxis, options.x2axis);
-                options.xaxes[1].position = "top";
-            }
-            if (options.y2axis) {
-                options.yaxes[1] = $.extend(true, {}, options.yaxis, options.y2axis);
-                options.yaxes[1].position = "right";
-            }
-            if (options.grid.coloredAreas)
-                options.grid.markings = options.grid.coloredAreas;
-            if (options.grid.coloredAreasColor)
-                options.grid.markingsColor = options.grid.coloredAreasColor;
-            if (options.lines)
-                $.extend(true, options.series.lines, options.lines);
-            if (options.points)
-                $.extend(true, options.series.points, options.points);
-            if (options.bars)
-                $.extend(true, options.series.bars, options.bars);
-            if (options.shadowSize != null)
-                options.series.shadowSize = options.shadowSize;
-
-            // save options on axes for future reference
-            for (i = 0; i < options.xaxes.length; ++i)
-                getOrCreateAxis(xaxes, i + 1).options = options.xaxes[i];
-            for (i = 0; i < options.yaxes.length; ++i)
-                getOrCreateAxis(yaxes, i + 1).options = options.yaxes[i];
-
-            // add hooks from options
-            for (var n in hooks)
-                if (options.hooks[n] && options.hooks[n].length)
-                    hooks[n] = hooks[n].concat(options.hooks[n]);
-
-            executeHooks(hooks.processOptions, [options]);
-        }
-
-        function setData(d) {
-            series = parseData(d);
-            fillInSeriesOptions();
-            processData();
-        }
-        
-        function parseData(d) {
-            var res = [];
-            for (var i = 0; i < d.length; ++i) {
-                var s = $.extend(true, {}, options.series);
-
-                if (d[i].data != null) {
-                    s.data = d[i].data; // move the data instead of deep-copy
-                    delete d[i].data;
-
-                    $.extend(true, s, d[i]);
-
-                    d[i].data = s.data;
-                }
-                else
-                    s.data = d[i];
-                res.push(s);
-            }
-
-            return res;
-        }
-        
-        function axisNumber(obj, coord) {
-            var a = obj[coord + "axis"];
-            if (typeof a == "object") // if we got a real axis, extract number
-                a = a.n;
-            if (typeof a != "number")
-                a = 1; // default to first axis
-            return a;
-        }
-
-        function allAxes() {
-            // return flat array without annoying null entries
-            return $.grep(xaxes.concat(yaxes), function (a) { return a; });
-        }
-        
-        function canvasToAxisCoords(pos) {
-            // return an object with x/y corresponding to all used axes 
-            var res = {}, i, axis;
-            for (i = 0; i < xaxes.length; ++i) {
-                axis = xaxes[i];
-                if (axis && axis.used)
-                    res["x" + axis.n] = axis.c2p(pos.left);
-            }
-
-            for (i = 0; i < yaxes.length; ++i) {
-                axis = yaxes[i];
-                if (axis && axis.used)
-                    res["y" + axis.n] = axis.c2p(pos.top);
-            }
-            
-            if (res.x1 !== undefined)
-                res.x = res.x1;
-            if (res.y1 !== undefined)
-                res.y = res.y1;
-
-            return res;
-        }
-        
-        function axisToCanvasCoords(pos) {
-            // get canvas coords from the first pair of x/y found in pos
-            var res = {}, i, axis, key;
-
-            for (i = 0; i < xaxes.length; ++i) {
-                axis = xaxes[i];
-                if (axis && axis.used) {
-                    key = "x" + axis.n;
-                    if (pos[key] == null && axis.n == 1)
-                        key = "x";
-
-                    if (pos[key] != null) {
-                        res.left = axis.p2c(pos[key]);
-                        break;
-                    }
-                }
-            }
-            
-            for (i = 0; i < yaxes.length; ++i) {
-                axis = yaxes[i];
-                if (axis && axis.used) {
-                    key = "y" + axis.n;
-                    if (pos[key] == null && axis.n == 1)
-                        key = "y";
-
-                    if (pos[key] != null) {
-                        res.top = axis.p2c(pos[key]);
-                        break;
-                    }
-                }
-            }
-            
-            return res;
-        }
-        
-        function getOrCreateAxis(axes, number) {
-            if (!axes[number - 1])
-                axes[number - 1] = {
-                    n: number, // save the number for future reference
-                    direction: axes == xaxes ? "x" : "y",
-                    options: $.extend(true, {}, axes == xaxes ? options.xaxis : options.yaxis)
-                };
-                
-            return axes[number - 1];
-        }
-
-        function fillInSeriesOptions() {
-            var i;
-            
-            // collect what we already got of colors
-            var neededColors = series.length,
-                usedColors = [],
-                assignedColors = [];
-            for (i = 0; i < series.length; ++i) {
-                var sc = series[i].color;
-                if (sc != null) {
-                    --neededColors;
-                    if (typeof sc == "number")
-                        assignedColors.push(sc);
-                    else
-                        usedColors.push($.color.parse(series[i].color));
-                }
-            }
-            
-            // we might need to generate more colors if higher indices
-            // are assigned
-            for (i = 0; i < assignedColors.length; ++i) {
-                neededColors = Math.max(neededColors, assignedColors[i] + 1);
-            }
-
-            // produce colors as needed
-            var colors = [], variation = 0;
-            i = 0;
-            while (colors.length < neededColors) {
-                var c;
-                if (options.colors.length == i) // check degenerate case
-                    c = $.color.make(100, 100, 100);
-                else
-                    c = $.color.parse(options.colors[i]);
-
-                // vary color if needed
-                var sign = variation % 2 == 1 ? -1 : 1;
-                c.scale('rgb', 1 + sign * Math.ceil(variation / 2) * 0.2)
-
-                // FIXME: if we're getting to close to something else,
-                // we should probably skip this one
-                colors.push(c);
-                
-                ++i;
-                if (i >= options.colors.length) {
-                    i = 0;
-                    ++variation;
-                }
-            }
-
-            // fill in the options
-            var colori = 0, s;
-            for (i = 0; i < series.length; ++i) {
-                s = series[i];
-                
-                // assign colors
-                if (s.color == null) {
-                    s.color = colors[colori].toString();
-                    ++colori;
-                }
-                else if (typeof s.color == "number")
-                    s.color = colors[s.color].toString();
-
-                // turn on lines automatically in case nothing is set
-                if (s.lines.show == null) {
-                    var v, show = true;
-                    for (v in s)
-                        if (s[v] && s[v].show) {
-                            show = false;
-                            break;
-                        }
-                    if (show)
-                        s.lines.show = true;
-                }
-
-                // setup axes
-                s.xaxis = getOrCreateAxis(xaxes, axisNumber(s, "x"));
-                s.yaxis = getOrCreateAxis(yaxes, axisNumber(s, "y"));
-            }
-        }
-        
-        function processData() {
-            var topSentry = Number.POSITIVE_INFINITY,
-                bottomSentry = Number.NEGATIVE_INFINITY,
-                fakeInfinity = Number.MAX_VALUE,
-                i, j, k, m, length,
-                s, points, ps, x, y, axis, val, f, p;
-
-            function updateAxis(axis, min, max) {
-                if (min < axis.datamin && min != -fakeInfinity)
-                    axis.datamin = min;
-                if (max > axis.datamax && max != fakeInfinity)
-                    axis.datamax = max;
-            }
-
-            $.each(allAxes(), function (_, axis) {
-                // init axis
-                axis.datamin = topSentry;
-                axis.datamax = bottomSentry;
-                axis.used = false;
-            });
-            
-            for (i = 0; i < series.length; ++i) {
-                s = series[i];
-                s.datapoints = { points: [] };
-                
-                executeHooks(hooks.processRawData, [ s, s.data, s.datapoints ]);
-            }
-            
-            // first pass: clean and copy data
-            for (i = 0; i < series.length; ++i) {
-                s = series[i];
-
-                var data = s.data, format = s.datapoints.format;
-
-                if (!format) {
-                    format = [];
-                    // find out how to copy
-                    format.push({ x: true, number: true, required: true });
-                    format.push({ y: true, number: true, required: true });
-
-                    if (s.bars.show || (s.lines.show && s.lines.fill)) {
-                        format.push({ y: true, number: true, required: false, defaultValue: 0 });
-                        if (s.bars.horizontal) {
-                            delete format[format.length - 1].y;
-                            format[format.length - 1].x = true;
-                        }
-                    }
-                    
-                    s.datapoints.format = format;
-                }
-
-                if (s.datapoints.pointsize != null)
-                    continue; // already filled in
-
-                s.datapoints.pointsize = format.length;
-                
-                ps = s.datapoints.pointsize;
-                points = s.datapoints.points;
-
-                insertSteps = s.lines.show && s.lines.steps;
-                s.xaxis.used = s.yaxis.used = true;
-                
-                for (j = k = 0; j < data.length; ++j, k += ps) {
-                    p = data[j];
-
-                    var nullify = p == null;
-                    if (!nullify) {
-                        for (m = 0; m < ps; ++m) {
-                            val = p[m];
-                            f = format[m];
-
-                            if (f) {
-                                if (f.number && val != null) {
-                                    val = +val; // convert to number
-                                    if (isNaN(val))
-                                        val = null;
-                                    else if (val == Infinity)
-                                        val = fakeInfinity;
-                                    else if (val == -Infinity)
-                                        val = -fakeInfinity;
-                                }
-
-                                if (val == null) {
-                                    if (f.required)
-                                        nullify = true;
-                                    
-                                    if (f.defaultValue != null)
-                                        val = f.defaultValue;
-                                }
-                            }
-                            
-                            points[k + m] = val;
-                        }
-                    }
-                    
-                    if (nullify) {
-                        for (m = 0; m < ps; ++m) {
-                            val = points[k + m];
-                            if (val != null) {
-                                f = format[m];
-                                // extract min/max info
-                                if (f.x)
-                                    updateAxis(s.xaxis, val, val);
-                                if (f.y)
-                                    updateAxis(s.yaxis, val, val);
-                            }
-                            points[k + m] = null;
-                        }
-                    }
-                    else {
-                        // a little bit of line specific stuff that
-                        // perhaps shouldn't be here, but lacking
-                        // better means...
-                        if (insertSteps && k > 0
-                            && points[k - ps] != null
-                            && points[k - ps] != points[k]
-                            && points[k - ps + 1] != points[k + 1]) {
-                            // copy the point to make room for a middle point
-                            for (m = 0; m < ps; ++m)
-                                points[k + ps + m] = points[k + m];
-
-                            // middle point has same y
-                            points[k + 1] = points[k - ps + 1];
-
-                            // we've added a point, better reflect that
-                            k += ps;
-                        }
-                    }
-                }
-            }
-
-            // give the hooks a chance to run
-            for (i = 0; i < series.length; ++i) {
-                s = series[i];
-                
-                executeHooks(hooks.processDatapoints, [ s, s.datapoints]);
-            }
-
-            // second pass: find datamax/datamin for auto-scaling
-            for (i = 0; i < series.length; ++i) {
-                s = series[i];
-                points = s.datapoints.points,
-                ps = s.datapoints.pointsize;
-
-                var xmin = topSentry, ymin = topSentry,
-                    xmax = bottomSentry, ymax = bottomSentry;
-                
-                for (j = 0; j < points.length; j += ps) {
-                    if (points[j] == null)
-                        continue;
-
-                    for (m = 0; m < ps; ++m) {
-                        val = points[j + m];
-                        f = format[m];
-                        if (!f || val == fakeInfinity || val == -fakeInfinity)
-                            continue;
-                        
-                        if (f.x) {
-                            if (val < xmin)
-                                xmin = val;
-                            if (val > xmax)
-                                xmax = val;
-                        }
-                        if (f.y) {
-                            if (val < ymin)
-                                ymin = val;
-                            if (val > ymax)
-                                ymax = val;
-                        }
-                    }
-                }
-                
-                if (s.bars.show) {
-                    // make sure we got room for the bar on the dancing floor
-                    var delta = s.bars.align == "left" ? 0 : -s.bars.barWidth/2;
-                    if (s.bars.horizontal) {
-                        ymin += delta;
-                        ymax += delta + s.bars.barWidth;
-                    }
-                    else {
-                        xmin += delta;
-                        xmax += delta + s.bars.barWidth;
-                    }
-                }
-                
-                updateAxis(s.xaxis, xmin, xmax);
-                updateAxis(s.yaxis, ymin, ymax);
-            }
-
-            $.each(allAxes(), function (_, axis) {
-                if (axis.datamin == topSentry)
-                    axis.datamin = null;
-                if (axis.datamax == bottomSentry)
-                    axis.datamax = null;
-            });
-        }
-
-        function makeCanvas(skipPositioning, cls) {
-            var c = document.createElement('canvas');
-            c.className = cls;
-            c.width = canvasWidth;
-            c.height = canvasHeight;
-                    
-            if (!skipPositioning)
-                $(c).css({ position: 'absolute', left: 0, top: 0 });
-                
-            $(c).appendTo(placeholder);
-                
-            if (!c.getContext) // excanvas hack
-                c = window.G_vmlCanvasManager.initElement(c);
-
-            // used for resetting in case we get replotted
-            c.getContext("2d").save();
-            
-            return c;
-        }
-
-        function getCanvasDimensions() {
-            canvasWidth = placeholder.width();
-            canvasHeight = placeholder.height();
-            
-            if (canvasWidth <= 0 || canvasHeight <= 0)
-                throw "Invalid dimensions for plot, width = " + canvasWidth + ", height = " + canvasHeight;
-        }
-
-        function resizeCanvas(c) {
-            // resizing should reset the state (excanvas seems to be
-            // buggy though)
-            if (c.width != canvasWidth)
-                c.width = canvasWidth;
-
-            if (c.height != canvasHeight)
-                c.height = canvasHeight;
-
-            // so try to get back to the initial state (even if it's
-            // gone now, this should be safe according to the spec)
-            var cctx = c.getContext("2d");
-            cctx.restore();
-
-            // and save again
-            cctx.save();
-        }
-        
-        function setupCanvases() {
-            var reused,
-                existingCanvas = placeholder.children("canvas.base"),
-                existingOverlay = placeholder.children("canvas.overlay");
-
-            if (existingCanvas.length == 0 || existingOverlay == 0) {
-                // init everything
-                
-                placeholder.html(""); // make sure placeholder is clear
-            
-                placeholder.css({ padding: 0 }); // padding messes up the positioning
-                
-                if (placeholder.css("position") == 'static')
-                    placeholder.css("position", "relative"); // for positioning labels and overlay
-
-                getCanvasDimensions();
-                
-                canvas = makeCanvas(true, "base");
-                overlay = makeCanvas(false, "overlay"); // overlay canvas for interactive features
-
-                reused = false;
-            }
-            else {
-                // reuse existing elements
-
-                canvas = existingCanvas.get(0);
-                overlay = existingOverlay.get(0);
-
-                reused = true;
-            }
-
-            ctx = canvas.getContext("2d");
-            octx = overlay.getContext("2d");
-
-            // we include the canvas in the event holder too, because IE 7
-            // sometimes has trouble with the stacking order
-            eventHolder = $([overlay, canvas]);
-
-            if (reused) {
-                // run shutdown in the old plot object
-                placeholder.data("plot").shutdown();
-
-                // reset reused canvases
-                plot.resize();
-                
-                // make sure overlay pixels are cleared (canvas is cleared when we redraw)
-                octx.clearRect(0, 0, canvasWidth, canvasHeight);
-                
-                // then whack any remaining obvious garbage left
-                eventHolder.unbind();
-                placeholder.children().not([canvas, overlay]).remove();
-            }
-
-            // save in case we get replotted
-            placeholder.data("plot", plot);
-        }
-
-        function bindEvents() {
-            // bind events
-            if (options.grid.hoverable) {
-                eventHolder.mousemove(onMouseMove);
-                eventHolder.mouseleave(onMouseLeave);
-            }
-
-            if (options.grid.clickable)
-                eventHolder.click(onClick);
-
-            executeHooks(hooks.bindEvents, [eventHolder]);
-        }
-
-        function shutdown() {
-            if (redrawTimeout)
-                clearTimeout(redrawTimeout);
-            
-            eventHolder.unbind("mousemove", onMouseMove);
-            eventHolder.unbind("mouseleave", onMouseLeave);
-            eventHolder.unbind("click", onClick);
-            
-            executeHooks(hooks.shutdown, [eventHolder]);
-        }
-
-        function setTransformationHelpers(axis) {
-            // set helper functions on the axis, assumes plot area
-            // has been computed already
-            
-            function identity(x) { return x; }
-            
-            var s, m, t = axis.options.transform || identity,
-                it = axis.options.inverseTransform;
-            
-            // precompute how much the axis is scaling a point
-            // in canvas space
-            if (axis.direction == "x") {
-                s = axis.scale = plotWidth / Math.abs(t(axis.max) - t(axis.min));
-                m = Math.min(t(axis.max), t(axis.min));
-            }
-            else {
-                s = axis.scale = plotHeight / Math.abs(t(axis.max) - t(axis.min));
-                s = -s;
-                m = Math.max(t(axis.max), t(axis.min));
-            }
-
-            // data point to canvas coordinate
-            if (t == identity) // slight optimization
-                axis.p2c = function (p) { return (p - m) * s; };
-            else
-                axis.p2c = function (p) { return (t(p) - m) * s; };
-            // canvas coordinate to data point
-            if (!it)
-                axis.c2p = function (c) { return m + c / s; };
-            else
-                axis.c2p = function (c) { return it(m + c / s); };
-        }
-
-        function measureTickLabels(axis) {
-            var opts = axis.options, i, ticks = axis.ticks || [], labels = [],
-                l, w = opts.labelWidth, h = opts.labelHeight, dummyDiv;
-
-            function makeDummyDiv(labels, width) {
-                return $('<div style="position:absolute;top:-10000px;' + width + 'font-size:smaller">' +
-                         '<div class="' + axis.direction + 'Axis ' + axis.direction + axis.n + 'Axis">'
-                         + labels.join("") + '</div></div>')
-                    .appendTo(placeholder);
-            }
-            
-            if (axis.direction == "x") {
-                // to avoid measuring the widths of the labels (it's slow), we
-                // construct fixed-size boxes and put the labels inside
-                // them, we don't need the exact figures and the
-                // fixed-size box content is easy to center
-                if (w == null)
-                    w = Math.floor(canvasWidth / (ticks.length > 0 ? ticks.length : 1));
-
-                // measure x label heights
-                if (h == null) {
-                    labels = [];
-                    for (i = 0; i < ticks.length; ++i) {
-                        l = ticks[i].label;
-                        if (l)
-                            labels.push('<div class="tickLabel" style="float:left;width:' + w + 'px">' + l + '</div>');
-                    }
-
-                    if (labels.length > 0) {
-                        // stick them all in the same div and measure
-                        // collective height
-                        labels.push('<div style="clear:left"></div>');
-                        dummyDiv = makeDummyDiv(labels, "width:10000px;");
-                        h = dummyDiv.height();
-                        dummyDiv.remove();
-                    }
-                }
-            }
-            else if (w == null || h == null) {
-                // calculate y label dimensions
-                for (i = 0; i < ticks.length; ++i) {
-                    l = ticks[i].label;
-                    if (l)
-                        labels.push('<div class="tickLabel">' + l + '</div>');
-                }
-                
-                if (labels.length > 0) {
-                    dummyDiv = makeDummyDiv(labels, "");
-                    if (w == null)
-                        w = dummyDiv.children().width();
-                    if (h == null)
-                        h = dummyDiv.find("div.tickLabel").height();
-                    dummyDiv.remove();
-                }
-            }
-
-            if (w == null)
-                w = 0;
-            if (h == null)
-                h = 0;
-
-            axis.labelWidth = w;
-            axis.labelHeight = h;
-        }
-
-        function allocateAxisBoxFirstPhase(axis) {
-            // find the bounding box of the axis by looking at label
-            // widths/heights and ticks, make room by diminishing the
-            // plotOffset
-
-            var lw = axis.labelWidth,
-                lh = axis.labelHeight,
-                pos = axis.options.position,
-                tickLength = axis.options.tickLength,
-                axismargin = options.grid.axisMargin,
-                padding = options.grid.labelMargin,
-                all = axis.direction == "x" ? xaxes : yaxes,
-                index;
-
-            // determine axis margin
-            var samePosition = $.grep(all, function (a) {
-                return a && a.options.position == pos && a.reserveSpace;
-            });
-            if ($.inArray(axis, samePosition) == samePosition.length - 1)
-                axismargin = 0; // outermost
-
-            // determine tick length - if we're innermost, we can use "full"
-            if (tickLength == null)
-                tickLength = "full";
-
-            var sameDirection = $.grep(all, function (a) {
-                return a && a.reserveSpace;
-            });
-
-            var innermost = $.inArray(axis, sameDirection) == 0;
-            if (!innermost && tickLength == "full")
-                tickLength = 5;
-                
-            if (!isNaN(+tickLength))
-                padding += +tickLength;
-
-            // compute box
-            if (axis.direction == "x") {
-                lh += padding;
-                
-                if (pos == "bottom") {
-                    plotOffset.bottom += lh + axismargin;
-                    axis.box = { top: canvasHeight - plotOffset.bottom, height: lh };
-                }
-                else {
-                    axis.box = { top: plotOffset.top + axismargin, height: lh };
-                    plotOffset.top += lh + axismargin;
-                }
-            }
-            else {
-                lw += padding;
-                
-                if (pos == "left") {
-                    axis.box = { left: plotOffset.left + axismargin, width: lw };
-                    plotOffset.left += lw + axismargin;
-                }
-                else {
-                    plotOffset.right += lw + axismargin;
-                    axis.box = { left: canvasWidth - plotOffset.right, width: lw };
-                }
-            }
-
-             // save for future reference
-            axis.position = pos;
-            axis.tickLength = tickLength;
-            axis.box.padding = padding;
-            axis.innermost = innermost;
-        }
-
-        function allocateAxisBoxSecondPhase(axis) {
-            // set remaining bounding box coordinates
-            if (axis.direction == "x") {
-                axis.box.left = plotOffset.left;
-                axis.box.width = plotWidth;
-            }
-            else {
-                axis.box.top = plotOffset.top;
-                axis.box.height = plotHeight;
-            }
-        }
-        
-        function setupGrid() {
-            var i, axes = allAxes();
-
-            // first calculate the plot and axis box dimensions
-
-            $.each(axes, function (_, axis) {
-                axis.show = axis.options.show;
-                if (axis.show == null)
-                    axis.show = axis.used; // by default an axis is visible if it's got data
-                
-                axis.reserveSpace = axis.show || axis.options.reserveSpace;
-
-                setRange(axis);
-            });
-
-            allocatedAxes = $.grep(axes, function (axis) { return axis.reserveSpace; });
-
-            plotOffset.left = plotOffset.right = plotOffset.top = plotOffset.bottom = 0;
-            if (options.grid.show) {
-                $.each(allocatedAxes, function (_, axis) {
-                    // make the ticks
-                    setupTickGeneration(axis);
-                    setTicks(axis);
-                    snapRangeToTicks(axis, axis.ticks);
-
-                    // find labelWidth/Height for axis
-                    measureTickLabels(axis);
-                });
-
-                // with all dimensions in house, we can compute the
-                // axis boxes, start from the outside (reverse order)
-                for (i = allocatedAxes.length - 1; i >= 0; --i)
-                    allocateAxisBoxFirstPhase(allocatedAxes[i]);
-
-                // make sure we've got enough space for things that
-                // might stick out
-                var minMargin = options.grid.minBorderMargin;
-                if (minMargin == null) {
-                    minMargin = 0;
-                    for (i = 0; i < series.length; ++i)
-                        minMargin = Math.max(minMargin, series[i].points.radius + series[i].points.lineWidth/2);
-                }
-                    
-                for (var a in plotOffset) {
-                    plotOffset[a] += options.grid.borderWidth;
-                    plotOffset[a] = Math.max(minMargin, plotOffset[a]);
-                }
-            }
-            
-            plotWidth = canvasWidth - plotOffset.left - plotOffset.right;
-            plotHeight = canvasHeight - plotOffset.bottom - plotOffset.top;
-
-            // now we got the proper plotWidth/Height, we can compute the scaling
-            $.each(axes, function (_, axis) {
-                setTransformationHelpers(axis);
-            });
-
-            if (options.grid.show) {
-                $.each(allocatedAxes, function (_, axis) {
-                    allocateAxisBoxSecondPhase(axis);
-                });
-
-                insertAxisLabels();
-            }
-            
-            insertLegend();
-        }
-        
-        function setRange(axis) {
-            var opts = axis.options,
-                min = +(opts.min != null ? opts.min : axis.datamin),
-                max = +(opts.max != null ? opts.max : axis.datamax),
-                delta = max - min;
-
-            if (delta == 0.0) {
-                // degenerate case
-                var widen = max == 0 ? 1 : 0.01;
-
-                if (opts.min == null)
-                    min -= widen;
-                // always widen max if we couldn't widen min to ensure we
-                // don't fall into min == max which doesn't work
-                if (opts.max == null || opts.min != null)
-                    max += widen;
-            }
-            else {
-                // consider autoscaling
-                var margin = opts.autoscaleMargin;
-                if (margin != null) {
-                    if (opts.min == null) {
-                        min -= delta * margin;
-                        // make sure we don't go below zero if all values
-                        // are positive
-                        if (min < 0 && axis.datamin != null && axis.datamin >= 0)
-                            min = 0;
-                    }
-                    if (opts.max == null) {
-                        max += delta * margin;
-                        if (max > 0 && axis.datamax != null && axis.datamax <= 0)
-                            max = 0;
-                    }
-                }
-            }
-            axis.min = min;
-            axis.max = max;
-        }
-
-        function setupTickGeneration(axis) {
-            var opts = axis.options;
-                
-            // estimate number of ticks
-            var noTicks;
-            if (typeof opts.ticks == "number" && opts.ticks > 0)
-                noTicks = opts.ticks;
-            else
-                // heuristic based on the model a*sqrt(x) fitted to
-                // some data points that seemed reasonable
-                noTicks = 0.3 * Math.sqrt(axis.direction == "x" ? canvasWidth : canvasHeight);
-
-            var delta = (axis.max - axis.min) / noTicks,
-                size, generator, unit, formatter, i, magn, norm;
-
-            if (opts.mode == "time") {
-                // pretty handling of time
-                
-                // map of app. size of time units in milliseconds
-                var timeUnitSize = {
-                    "second": 1000,
-                    "minute": 60 * 1000,
-                    "hour": 60 * 60 * 1000,
-                    "day": 24 * 60 * 60 * 1000,
-                    "month": 30 * 24 * 60 * 60 * 1000,
-                    "year": 365.2425 * 24 * 60 * 60 * 1000
-                };
-
-
-                // the allowed tick sizes, after 1 year we use
-                // an integer algorithm
-                var spec = [
-                    [1, "second"], [2, "second"], [5, "second"], [10, "second"],
-                    [30, "second"], 
-                    [1, "minute"], [2, "minute"], [5, "minute"], [10, "minute"],
-                    [30, "minute"], 
-                    [1, "hour"], [2, "hour"], [4, "hour"],
-                    [8, "hour"], [12, "hour"],
-                    [1, "day"], [2, "day"], [3, "day"],
-                    [0.25, "month"], [0.5, "month"], [1, "month"],
-                    [2, "month"], [3, "month"], [6, "month"],
-                    [1, "year"]
-                ];
-
-                var minSize = 0;
-                if (opts.minTickSize != null) {
-                    if (typeof opts.tickSize == "number")
-                        minSize = opts.tickSize;
-                    else
-                        minSize = opts.minTickSize[0] * timeUnitSize[opts.minTickSize[1]];
-                }
-
-                for (var i = 0; i < spec.length - 1; ++i)
-                    if (delta < (spec[i][0] * timeUnitSize[spec[i][1]]
-                                 + spec[i + 1][0] * timeUnitSize[spec[i + 1][1]]) / 2
-                       && spec[i][0] * timeUnitSize[spec[i][1]] >= minSize)
-                        break;
-                size = spec[i][0];
-                unit = spec[i][1];
-                
-                // special-case the possibility of several years
-                if (unit == "year") {
-                    magn = Math.pow(10, Math.floor(Math.log(delta / timeUnitSize.year) / Math.LN10));
-                    norm = (delta / timeUnitSize.year) / magn;
-                    if (norm < 1.5)
-                        size = 1;
-                    else if (norm < 3)
-                        size = 2;
-                    else if (norm < 7.5)
-                        size = 5;
-                    else
-                        size = 10;
-
-                    size *= magn;
-                }
-
-                axis.tickSize = opts.tickSize || [size, unit];
-                
-                generator = function(axis) {
-                    var ticks = [],
-                        tickSize = axis.tickSize[0], unit = axis.tickSize[1],
-                        d = new Date(axis.min);
-                    
-                    var step = tickSize * timeUnitSize[unit];
-
-                    if (unit == "second")
-                        d.setUTCSeconds(floorInBase(d.getUTCSeconds(), tickSize));
-                    if (unit == "minute")
-                        d.setUTCMinutes(floorInBase(d.getUTCMinutes(), tickSize));
-                    if (unit == "hour")
-                        d.setUTCHours(floorInBase(d.getUTCHours(), tickSize));
-                    if (unit == "month")
-                        d.setUTCMonth(floorInBase(d.getUTCMonth(), tickSize));
-                    if (unit == "year")
-                        d.setUTCFullYear(floorInBase(d.getUTCFullYear(), tickSize));
-                    
-                    // reset smaller components
-                    d.setUTCMilliseconds(0);
-                    if (step >= timeUnitSize.minute)
-                        d.setUTCSeconds(0);
-                    if (step >= timeUnitSize.hour)
-                        d.setUTCMinutes(0);
-                    if (step >= timeUnitSize.day)
-                        d.setUTCHours(0);
-                    if (step >= timeUnitSize.day * 4)
-                        d.setUTCDate(1);
-                    if (step >= timeUnitSize.year)
-                        d.setUTCMonth(0);
-
-
-                    var carry = 0, v = Number.NaN, prev;
-                    do {
-                        prev = v;
-                        v = d.getTime();
-                        ticks.push(v);
-                        if (unit == "month") {
-                            if (tickSize < 1) {
-                                // a bit complicated - we'll divide the month
-                                // up but we need to take care of fractions
-                                // so we don't end up in the middle of a day
-                                d.setUTCDate(1);
-                                var start = d.getTime();
-                                d.setUTCMonth(d.getUTCMonth() + 1);
-                                var end = d.getTime();
-                                d.setTime(v + carry * timeUnitSize.hour + (end - start) * tickSize);
-                                carry = d.getUTCHours();
-                                d.setUTCHours(0);
-                            }
-                            else
-                                d.setUTCMonth(d.getUTCMonth() + tickSize);
-                        }
-                        else if (unit == "year") {
-                            d.setUTCFullYear(d.getUTCFullYear() + tickSize);
-                        }
-                        else
-                            d.setTime(v + step);
-                    } while (v < axis.max && v != prev);
-
-                    return ticks;
-                };
-
-                formatter = function (v, axis) {
-                    var d = new Date(v);
-
-                    // first check global format
-                    if (opts.timeformat != null)
-                        return $.plot.formatDate(d, opts.timeformat, opts.monthNames);
-                    
-                    var t = axis.tickSize[0] * timeUnitSize[axis.tickSize[1]];
-                    var span = axis.max - axis.min;
-                    var suffix = (opts.twelveHourClock) ? " %p" : "";
-                    
-                    if (t < timeUnitSize.minute)
-                        fmt = "%h:%M:%S" + suffix;
-                    else if (t < timeUnitSize.day) {
-                        if (span < 2 * timeUnitSize.day)
-                            fmt = "%h:%M" + suffix;
-                        else
-                            fmt = "%b %d %h:%M" + suffix;
-                    }
-                    else if (t < timeUnitSize.month)
-                        fmt = "%b %d";
-                    else if (t < timeUnitSize.year) {
-                        if (span < timeUnitSize.year)
-                            fmt = "%b";
-                        else
-                            fmt = "%b %y";
-                    }
-                    else
-                        fmt = "%y";
-                    
-                    return $.plot.formatDate(d, fmt, opts.monthNames);
-                };
-            }
-            else {
-                // pretty rounding of base-10 numbers
-                var maxDec = opts.tickDecimals;
-                var dec = -Math.floor(Math.log(delta) / Math.LN10);
-                if (maxDec != null && dec > maxDec)
-                    dec = maxDec;
-
-                magn = Math.pow(10, -dec);
-                norm = delta / magn; // norm is between 1.0 and 10.0
-                
-                if (norm < 1.5)
-                    size = 1;
-                else if (norm < 3) {
-                    size = 2;
-                    // special case for 2.5, requires an extra decimal
-                    if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) {
-                        size = 2.5;
-                        ++dec;
-                    }
-                }
-                else if (norm < 7.5)
-                    size = 5;
-                else
-                    size = 10;
-
-                size *= magn;
-                
-                if (opts.minTickSize != null && size < opts.minTickSize)
-                    size = opts.minTickSize;
-
-                axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec);
-                axis.tickSize = opts.tickSize || size;
-
-                generator = function (axis) {
-                    var ticks = [];
-
-                    // spew out all possible ticks
-                    var start = floorInBase(axis.min, axis.tickSize),
-                        i = 0, v = Number.NaN, prev;
-                    do {
-                        prev = v;
-                        v = start + i * axis.tickSize;
-                        ticks.push(v);
-                        ++i;
-                    } while (v < axis.max && v != prev);
-                    return ticks;
-                };
-
-                formatter = function (v, axis) {
-                    return v.toFixed(axis.tickDecimals);
-                };
-            }
-
-            if (opts.alignTicksWithAxis != null) {
-                var otherAxis = (axis.direction == "x" ? xaxes : yaxes)[opts.alignTicksWithAxis - 1];
-                if (otherAxis && otherAxis.used && otherAxis != axis) {
-                    // consider snapping min/max to outermost nice ticks
-                    var niceTicks = generator(axis);
-                    if (niceTicks.length > 0) {
-                        if (opts.min == null)
-                            axis.min = Math.min(axis.min, niceTicks[0]);
-                        if (opts.max == null && niceTicks.length > 1)
-                            axis.max = Math.max(axis.max, niceTicks[niceTicks.length - 1]);
-                    }
-                    
-                    generator = function (axis) {
-                        // copy ticks, scaled to this axis
-                        var ticks = [], v, i;
-                        for (i = 0; i < otherAxis.ticks.length; ++i) {
-                            v = (otherAxis.ticks[i].v - otherAxis.min) / (otherAxis.max - otherAxis.min);
-                            v = axis.min + v * (axis.max - axis.min);
-                            ticks.push(v);
-                        }
-                        return ticks;
-                    };
-                    
-                    // we might need an extra decimal since forced
-                    // ticks don't necessarily fit naturally
-                    if (axis.mode != "time" && opts.tickDecimals == null) {
-                        var extraDec = Math.max(0, -Math.floor(Math.log(delta) / Math.LN10) + 1),
-                            ts = generator(axis);
-
-                        // only proceed if the tick interval rounded
-                        // with an extra decimal doesn't give us a
-                        // zero at end
-                        if (!(ts.length > 1 && /\..*0$/.test((ts[1] - ts[0]).toFixed(extraDec))))
-                            axis.tickDecimals = extraDec;
-                    }
-                }
-            }
-
-            axis.tickGenerator = generator;
-            if ($.isFunction(opts.tickFormatter))
-                axis.tickFormatter = function (v, axis) { return "" + opts.tickFormatter(v, axis); };
-            else
-                axis.tickFormatter = formatter;
-        }
-        
-        function setTicks(axis) {
-            var oticks = axis.options.ticks, ticks = [];
-            if (oticks == null || (typeof oticks == "number" && oticks > 0))
-                ticks = axis.tickGenerator(axis);
-            else if (oticks) {
-                if ($.isFunction(oticks))
-                    // generate the ticks
-                    ticks = oticks({ min: axis.min, max: axis.max });
-                else
-                    ticks = oticks;
-            }
-
-            // clean up/labelify the supplied ticks, copy them over
-            var i, v;
-            axis.ticks = [];
-            for (i = 0; i < ticks.length; ++i) {
-                var label = null;
-                var t = ticks[i];
-                if (typeof t == "object") {
-                    v = +t[0];
-                    if (t.length > 1)
-                        label = t[1];
-                }
-                else
-                    v = +t;
-                if (label == null)
-                    label = axis.tickFormatter(v, axis);
-                if (!isNaN(v))
-                    axis.ticks.push({ v: v, label: label });
-            }
-        }
-
-        function snapRangeToTicks(axis, ticks) {
-            if (axis.options.autoscaleMargin && ticks.length > 0) {
-                // snap to ticks
-                if (axis.options.min == null)
-                    axis.min = Math.min(axis.min, ticks[0].v);
-                if (axis.options.max == null && ticks.length > 1)
-                    axis.max = Math.max(axis.max, ticks[ticks.length - 1].v);
-            }
-        }
-      
-        function draw() {
-            ctx.clearRect(0, 0, canvasWidth, canvasHeight);
-
-            var grid = options.grid;
-
-            // draw background, if any
-            if (grid.show && grid.backgroundColor)
-                drawBackground();
-            
-            if (grid.show && !grid.aboveData)
-                drawGrid();
-
-            for (var i = 0; i < series.length; ++i) {
-                executeHooks(hooks.drawSeries, [ctx, series[i]]);
-                drawSeries(series[i]);
-            }
-
-            executeHooks(hooks.draw, [ctx]);
-            
-            if (grid.show && grid.aboveData)
-                drawGrid();
-        }
-
-        function extractRange(ranges, coord) {
-            var axis, from, to, key, axes = allAxes();
-
-            for (i = 0; i < axes.length; ++i) {
-                axis = axes[i];
-                if (axis.direction == coord) {
-                    key = coord + axis.n + "axis";
-                    if (!ranges[key] && axis.n == 1)
-                        key = coord + "axis"; // support x1axis as xaxis
-                    if (ranges[key]) {
-                        from = ranges[key].from;
-                        to = ranges[key].to;
-                        break;
-                    }
-                }
-            }
-
-            // backwards-compat stuff - to be removed in future
-            if (!ranges[key]) {
-                axis = coord == "x" ? xaxes[0] : yaxes[0];
-                from = ranges[coord + "1"];
-                to = ranges[coord + "2"];
-            }
-
-            // auto-reverse as an added bonus
-            if (from != null && to != null && from > to) {
-                var tmp = from;
-                from = to;
-                to = tmp;
-            }
-            
-            return { from: from, to: to, axis: axis };
-        }
-        
-        function drawBackground() {
-            ctx.save();
-            ctx.translate(plotOffset.left, plotOffset.top);
-
-            ctx.fillStyle = getColorOrGradient(options.grid.backgroundColor, plotHeight, 0, "rgba(255, 255, 255, 0)");
-            ctx.fillRect(0, 0, plotWidth, plotHeight);
-            ctx.restore();
-        }
-
-        function drawGrid() {
-            var i;
-            
-            ctx.save();
-            ctx.translate(plotOffset.left, plotOffset.top);
-
-            // draw markings
-            var markings = options.grid.markings;
-            if (markings) {
-                if ($.isFunction(markings)) {
-                    var axes = plot.getAxes();
-                    // xmin etc. is backwards compatibility, to be
-                    // removed in the future
-                    axes.xmin = axes.xaxis.min;
-                    axes.xmax = axes.xaxis.max;
-                    axes.ymin = axes.yaxis.min;
-                    axes.ymax = axes.yaxis.max;
-                    
-                    markings = markings(axes);
-                }
-
-                for (i = 0; i < markings.length; ++i) {
-                    var m = markings[i],
-                        xrange = extractRange(m, "x"),
-                        yrange = extractRange(m, "y");
-
-                    // fill in missing
-                    if (xrange.from == null)
-                        xrange.from = xrange.axis.min;
-                    if (xrange.to == null)
-                        xrange.to = xrange.axis.max;
-                    if (yrange.from == null)
-                        yrange.from = yrange.axis.min;
-                    if (yrange.to == null)
-                        yrange.to = yrange.axis.max;
-
-                    // clip
-                    if (xrange.to < xrange.axis.min || xrange.from > xrange.axis.max ||
-                        yrange.to < yrange.axis.min || yrange.from > yrange.axis.max)
-                        continue;
-
-                    xrange.from = Math.max(xrange.from, xrange.axis.min);
-                    xrange.to = Math.min(xrange.to, xrange.axis.max);
-                    yrange.from = Math.max(yrange.from, yrange.axis.min);
-                    yrange.to = Math.min(yrange.to, yrange.axis.max);
-
-                    if (xrange.from == xrange.to && yrange.from == yrange.to)
-                        continue;
-
-                    // then draw
-                    xrange.from = xrange.axis.p2c(xrange.from);
-                    xrange.to = xrange.axis.p2c(xrange.to);
-                    yrange.from = yrange.axis.p2c(yrange.from);
-                    yrange.to = yrange.axis.p2c(yrange.to);
-                    
-                    if (xrange.from == xrange.to || yrange.from == yrange.to) {
-                        // draw line
-                        ctx.beginPath();
-                        ctx.strokeStyle = m.color || options.grid.markingsColor;
-                        ctx.lineWidth = m.lineWidth || options.grid.markingsLineWidth;
-                        ctx.moveTo(xrange.from, yrange.from);
-                        ctx.lineTo(xrange.to, yrange.to);
-                        ctx.stroke();
-                    }
-                    else {
-                        // fill area
-                        ctx.fillStyle = m.color || options.grid.markingsColor;
-                        ctx.fillRect(xrange.from, yrange.to,
-                                     xrange.to - xrange.from,
-                                     yrange.from - yrange.to);
-                    }
-                }
-            }
-            
-            // draw the ticks
-            var axes = allAxes(), bw = options.grid.borderWidth;
-
-            for (var j = 0; j < axes.length; ++j) {
-                var axis = axes[j], box = axis.box,
-                    t = axis.tickLength, x, y, xoff, yoff;
-                if (!axis.show || axis.ticks.length == 0)
-                    continue
-                
-                ctx.strokeStyle = axis.options.tickColor || $.color.parse(axis.options.color).scale('a', 0.22).toString();
-                ctx.lineWidth = 1;
-
-                // find the edges
-                if (axis.direction == "x") {
-                    x = 0;
-                    if (t == "full")
-                        y = (axis.position == "top" ? 0 : plotHeight);
-                    else
-                        y = box.top - plotOffset.top + (axis.position == "top" ? box.height : 0);
-                }
-                else {
-                    y = 0;
-                    if (t == "full")
-                        x = (axis.position == "left" ? 0 : plotWidth);
-                    else
-                        x = box.left - plotOffset.left + (axis.position == "left" ? box.width : 0);
-                }
-                
-                // draw tick bar
-                if (!axis.innermost) {
-                    ctx.beginPath();
-                    xoff = yoff = 0;
-                    if (axis.direction == "x")
-                        xoff = plotWidth;
-                    else
-                        yoff = plotHeight;
-                    
-                    if (ctx.lineWidth == 1) {
-                        x = Math.floor(x) + 0.5;
-                        y = Math.floor(y) + 0.5;
-                    }
-
-                    ctx.moveTo(x, y);
-                    ctx.lineTo(x + xoff, y + yoff);
-                    ctx.stroke();
-                }
-
-                // draw ticks
-                ctx.beginPath();
-                for (i = 0; i < axis.ticks.length; ++i) {
-                    var v = axis.ticks[i].v;
-                    
-                    xoff = yoff = 0;
-
-                    if (v < axis.min || v > axis.max
-                        // skip those lying on the axes if we got a border
-                        || (t == "full" && bw > 0
-                            && (v == axis.min || v == axis.max)))
-                        continue;
-
-                    if (axis.direction == "x") {
-                        x = axis.p2c(v);
-                        yoff = t == "full" ? -plotHeight : t;
-                        
-                        if (axis.position == "top")
-                            yoff = -yoff;
-                    }
-                    else {
-                        y = axis.p2c(v);
-                        xoff = t == "full" ? -plotWidth : t;
-                        
-                        if (axis.position == "left")
-                            xoff = -xoff;
-                    }
-
-                    if (ctx.lineWidth == 1) {
-                        if (axis.direction == "x")
-                            x = Math.floor(x) + 0.5;
-                        else
-                            y = Math.floor(y) + 0.5;
-                    }
-
-                    ctx.moveTo(x, y);
-                    ctx.lineTo(x + xoff, y + yoff);
-                }
-                
-                ctx.stroke();
-            }
-            
-            
-            // draw border
-            if (bw) {
-                ctx.lineWidth = bw;
-                ctx.strokeStyle = options.grid.borderColor;
-                ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw);
-            }
-
-            ctx.restore();
-        }
-
-        function insertAxisLabels() {
-            placeholder.find(".tickLabels").remove();
-            
-            var html = ['<div class="tickLabels" style="font-size:smaller">'];
-
-            var axes = allAxes();
-            for (var j = 0; j < axes.length; ++j) {
-                var axis = axes[j], box = axis.box;
-                if (!axis.show)
-                    continue;
-                //debug: html.push('<div style="position:absolute;opacity:0.10;background-color:red;left:' + box.left + 'px;top:' + box.top + 'px;width:' + box.width +  'px;height:' + box.height + 'px"></div>')
-                html.push('<div class="' + axis.direction + 'Axis ' + axis.direction + axis.n + 'Axis" style="color:' + axis.options.color + '">');
-                for (var i = 0; i < axis.ticks.length; ++i) {
-                    var tick = axis.ticks[i];
-                    if (!tick.label || tick.v < axis.min || tick.v > axis.max)
-                        continue;
-
-                    var pos = {}, align;
-                    
-                    if (axis.direction == "x") {
-                        align = "center";
-                        pos.left = Math.round(plotOffset.left + axis.p2c(tick.v) - axis.labelWidth/2);
-                        if (axis.position == "bottom")
-                            pos.top = box.top + box.padding;
-                        else
-                            pos.bottom = canvasHeight - (box.top + box.height - box.padding);
-                    }
-                    else {
-                        pos.top = Math.round(plotOffset.top + axis.p2c(tick.v) - axis.labelHeight/2);
-                        if (axis.position == "left") {
-                            pos.right = canvasWidth - (box.left + box.width - box.padding)
-                            align = "right";
-                        }
-                        else {
-                            pos.left = box.left + box.padding;
-                            align = "left";
-                        }
-                    }
-
-                    pos.width = axis.labelWidth;
-
-                    var style = ["position:absolute", "text-align:" + align ];
-                    for (var a in pos)
-                        style.push(a + ":" + pos[a] + "px")
-                    
-                    html.push('<div class="tickLabel" style="' + style.join(';') + '">' + tick.label + '</div>');
-                }
-                html.push('</div>');
-            }
-
-            html.push('</div>');
-
-            placeholder.append(html.join(""));
-        }
-
-        function drawSeries(series) {
-            if (series.lines.show)
-                drawSeriesLines(series);
-            if (series.bars.show)
-                drawSeriesBars(series);
-            if (series.points.show)
-                drawSeriesPoints(series);
-        }
-        
-        function drawSeriesLines(series) {
-            function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {
-                var points = datapoints.points,
-                    ps = datapoints.pointsize,
-                    prevx = null, prevy = null;
-                
-                ctx.beginPath();
-                for (var i = ps; i < points.length; i += ps) {
-                    var x1 = points[i - ps], y1 = points[i - ps + 1],
-                        x2 = points[i], y2 = points[i + 1];
-                    
-                    if (x1 == null || x2 == null)
-                        continue;
-
-                    // clip with ymin
-                    if (y1 <= y2 && y1 < axisy.min) {
-                        if (y2 < axisy.min)
-                            continue;   // line segment is outside
-                        // compute new intersection point
-                        x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
-                        y1 = axisy.min;
-                    }
-                    else if (y2 <= y1 && y2 < axisy.min) {
-                        if (y1 < axisy.min)
-                            continue;
-                        x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
-                        y2 = axisy.min;
-                    }
-
-                    // clip with ymax
-                    if (y1 >= y2 && y1 > axisy.max) {
-                        if (y2 > axisy.max)
-                            continue;
-                        x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
-                        y1 = axisy.max;
-                    }
-                    else if (y2 >= y1 && y2 > axisy.max) {
-                        if (y1 > axisy.max)
-                            continue;
-                        x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
-                        y2 = axisy.max;
-                    }
-
-                    // clip with xmin
-                    if (x1 <= x2 && x1 < axisx.min) {
-                        if (x2 < axisx.min)
-                            continue;
-                        y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
-                        x1 = axisx.min;
-                    }
-                    else if (x2 <= x1 && x2 < axisx.min) {
-                        if (x1 < axisx.min)
-                            continue;
-                        y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
-                        x2 = axisx.min;
-                    }
-
-                    // clip with xmax
-                    if (x1 >= x2 && x1 > axisx.max) {
-                        if (x2 > axisx.max)
-                            continue;
-                        y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
-                        x1 = axisx.max;
-                    }
-                    else if (x2 >= x1 && x2 > axisx.max) {
-                        if (x1 > axisx.max)
-                            continue;
-                        y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
-                        x2 = axisx.max;
-                    }
-
-                    if (x1 != prevx || y1 != prevy)
-                        ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset);
-                    
-                    prevx = x2;
-                    prevy = y2;
-                    ctx.lineTo(axisx.p2c(x2) + xoffset, axisy.p2c(y2) + yoffset);
-                }
-                ctx.stroke();
-            }
-
-            function plotLineArea(datapoints, axisx, axisy) {
-                var points = datapoints.points,
-                    ps = datapoints.pointsize,
-                    bottom = Math.min(Math.max(0, axisy.min), axisy.max),
-                    i = 0, top, areaOpen = false,
-                    ypos = 1, segmentStart = 0, segmentEnd = 0;
-
-                // we process each segment in two turns, first forward
-                // direction to sketch out top, then once we hit the
-                // end we go backwards to sketch the bottom
-                while (true) {
-                    if (ps > 0 && i > points.length + ps)
-                        break;
-
-                    i += ps; // ps is negative if going backwards
-
-                    var x1 = points[i - ps],
-                        y1 = points[i - ps + ypos],
-                        x2 = points[i], y2 = points[i + ypos];
-
-                    if (areaOpen) {
-                        if (ps > 0 && x1 != null && x2 == null) {
-                            // at turning point
-                            segmentEnd = i;
-                            ps = -ps;
-                            ypos = 2;
-                            continue;
-                        }
-
-                        if (ps < 0 && i == segmentStart + ps) {
-                            // done with the reverse sweep
-                            ctx.fill();
-                            areaOpen = false;
-                            ps = -ps;
-                            ypos = 1;
-                            i = segmentStart = segmentEnd + ps;
-                            continue;
-                        }
-                    }
-
-                    if (x1 == null || x2 == null)
-                        continue;
-
-                    // clip x values
-                    
-                    // clip with xmin
-                    if (x1 <= x2 && x1 < axisx.min) {
-                        if (x2 < axisx.min)
-                            continue;
-                        y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
-                        x1 = axisx.min;
-                    }
-                    else if (x2 <= x1 && x2 < axisx.min) {
-                        if (x1 < axisx.min)
-                            continue;
-                        y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
-                        x2 = axisx.min;
-                    }
-
-                    // clip with xmax
-                    if (x1 >= x2 && x1 > axisx.max) {
-                        if (x2 > axisx.max)
-                            continue;
-                        y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
-                        x1 = axisx.max;
-                    }
-                    else if (x2 >= x1 && x2 > axisx.max) {
-                        if (x1 > axisx.max)
-                            continue;
-                        y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
-                        x2 = axisx.max;
-                    }
-
-                    if (!areaOpen) {
-                        // open area
-                        ctx.beginPath();
-                        ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom));
-                        areaOpen = true;
-                    }
-                    
-                    // now first check the case where both is outside
-                    if (y1 >= axisy.max && y2 >= axisy.max) {
-                        ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max));
-                        ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.max));
-                        continue;
-                    }
-                    else if (y1 <= axisy.min && y2 <= axisy.min) {
-                        ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min));
-                        ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min));
-                        continue;
-                    }
-                    
-                    // else it's a bit more complicated, there might
-                    // be a flat maxed out rectangle first, then a
-                    // triangular cutout or reverse; to find these
-                    // keep track of the current x values
-                    var x1old = x1, x2old = x2;
-
-                    // clip the y values, without shortcutting, we
-                    // go through all cases in turn
-                    
-                    // clip with ymin
-                    if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) {
-                        x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
-                        y1 = axisy.min;
-                    }
-                    else if (y2 <= y1 && y2 < axisy.min && y1 >= axisy.min) {
-                        x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
-                        y2 = axisy.min;
-                    }
-
-                    // clip with ymax
-                    if (y1 >= y2 && y1 > axisy.max && y2 <= axisy.max) {
-                        x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
-                        y1 = axisy.max;
-                    }
-                    else if (y2 >= y1 && y2 > axisy.max && y1 <= axisy.max) {
-                        x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
-                        y2 = axisy.max;
-                    }
-
-                    // if the x value was changed we got a rectangle
-                    // to fill
-                    if (x1 != x1old) {
-                        ctx.lineTo(axisx.p2c(x1old), axisy.p2c(y1));
-                        // it goes to (x1, y1), but we fill that below
-                    }
-                    
-                    // fill triangular section, this sometimes result
-                    // in redundant points if (x1, y1) hasn't changed
-                    // from previous line to, but we just ignore that
-                    ctx.lineTo(axisx.p2c(x1), axisy.p2c(y1));
-                    ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));
-
-                    // fill the other rectangle if it's there
-                    if (x2 != x2old) {
-                        ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));
-                        ctx.lineTo(axisx.p2c(x2old), axisy.p2c(y2));
-                    }
-                }
-            }
-
-            ctx.save();
-            ctx.translate(plotOffset.left, plotOffset.top);
-            ctx.lineJoin = "round";
-
-            var lw = series.lines.lineWidth,
-                sw = series.shadowSize;
-            // FIXME: consider another form of shadow when filling is turned on
-            if (lw > 0 && sw > 0) {
-                // draw shadow as a thick and thin line with transparency
-                ctx.lineWidth = sw;
-                ctx.strokeStyle = "rgba(0,0,0,0.1)";
-                // position shadow at angle from the mid of line
-                var angle = Math.PI/18;
-                plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2), series.xaxis, series.yaxis);
-                ctx.lineWidth = sw/2;
-                plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4), series.xaxis, series.yaxis);
-            }
-
-            ctx.lineWidth = lw;
-            ctx.strokeStyle = series.color;
-            var fillStyle = getFillStyle(series.lines, series.color, 0, plotHeight);
-            if (fillStyle) {
-                ctx.fillStyle = fillStyle;
-                plotLineArea(series.datapoints, series.xaxis, series.yaxis);
-            }
-
-            if (lw > 0)
-                plotLine(series.datapoints, 0, 0, series.xaxis, series.yaxis);
-            ctx.restore();
-        }
-
-        function drawSeriesPoints(series) {
-            function plotPoints(datapoints, radius, fillStyle, offset, shadow, axisx, axisy, symbol) {
-                var points = datapoints.points, ps = datapoints.pointsize;
-
-                for (var i = 0; i < points.length; i += ps) {
-                    var x = points[i], y = points[i + 1];
-                    if (x == null || x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)
-                        continue;
-                    
-                    ctx.beginPath();
-                    x = axisx.p2c(x);
-                    y = axisy.p2c(y) + offset;
-                    if (symbol == "circle")
-                        ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false);
-                    else
-                        symbol(ctx, x, y, radius, shadow);
-                    ctx.closePath();
-                    
-                    if (fillStyle) {
-                        ctx.fillStyle = fillStyle;
-                        ctx.fill();
-                    }
-                    ctx.stroke();
-                }
-            }
-            
-            ctx.save();
-            ctx.translate(plotOffset.left, plotOffset.top);
-
-            var lw = series.points.lineWidth,
-                sw = series.shadowSize,
-                radius = series.points.radius,
-                symbol = series.points.symbol;
-            if (lw > 0 && sw > 0) {
-                // draw shadow in two steps
-                var w = sw / 2;
-                ctx.lineWidth = w;
-                ctx.strokeStyle = "rgba(0,0,0,0.1)";
-                plotPoints(series.datapoints, radius, null, w + w/2, true,
-                           series.xaxis, series.yaxis, symbol);
-
-                ctx.strokeStyle = "rgba(0,0,0,0.2)";
-                plotPoints(series.datapoints, radius, null, w/2, true,
-                           series.xaxis, series.yaxis, symbol);
-            }
-
-            ctx.lineWidth = lw;
-            ctx.strokeStyle = series.color;
-            plotPoints(series.datapoints, radius,
-                       getFillStyle(series.points, series.color), 0, false,
-                       series.xaxis, series.yaxis, symbol);
-            ctx.restore();
-        }
-
-        function drawBar(x, y, b, barLeft, barRight, offset, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) {
-            var left, right, bottom, top,
-                drawLeft, drawRight, drawTop, drawBottom,
-                tmp;
-
-            // in horizontal mode, we start the bar from the left
-            // instead of from the bottom so it appears to be
-            // horizontal rather than vertical
-            if (horizontal) {
-                drawBottom = drawRight = drawTop = true;
-                drawLeft = false;
-                left = b;
-                right = x;
-                top = y + barLeft;
-                bottom = y + barRight;
-
-                // account for negative bars
-                if (right < left) {
-                    tmp = right;
-                    right = left;
-                    left = tmp;
-                    drawLeft = true;
-                    drawRight = false;
-                }
-            }
-            else {
-                drawLeft = drawRight = drawTop = true;
-                drawBottom = false;
-                left = x + barLeft;
-                right = x + barRight;
-                bottom = b;
-                top = y;
-
-                // account for negative bars
-                if (top < bottom) {
-                    tmp = top;
-                    top = bottom;
-                    bottom = tmp;
-                    drawBottom = true;
-                    drawTop = false;
-                }
-            }
-           
-            // clip
-            if (right < axisx.min || left > axisx.max ||
-                top < axisy.min || bottom > axisy.max)
-                return;
-            
-            if (left < axisx.min) {
-                left = axisx.min;
-                drawLeft = false;
-            }
-
-            if (right > axisx.max) {
-                right = axisx.max;
-                drawRight = false;
-            }
-
-            if (bottom < axisy.min) {
-                bottom = axisy.min;
-                drawBottom = false;
-            }
-            
-            if (top > axisy.max) {
-                top = axisy.max;
-                drawTop = false;
-            }
-
-            left = axisx.p2c(left);
-            bottom = axisy.p2c(bottom);
-            right = axisx.p2c(right);
-            top = axisy.p2c(top);
-            
-            // fill the bar
-            if (fillStyleCallback) {
-                c.beginPath();
-                c.moveTo(left, bottom);
-                c.lineTo(left, top);
-                c.lineTo(right, top);
-                c.lineTo(right, bottom);
-                c.fillStyle = fillStyleCallback(bottom, top);
-                c.fill();
-            }
-
-            // draw outline
-            if (lineWidth > 0 && (drawLeft || drawRight || drawTop || drawBottom)) {
-                c.beginPath();
-
-                // FIXME: inline moveTo is buggy with excanvas
-                c.moveTo(left, bottom + offset);
-                if (drawLeft)
-                    c.lineTo(left, top + offset);
-                else
-                    c.moveTo(left, top + offset);
-                if (drawTop)
-                    c.lineTo(right, top + offset);
-                else
-                    c.moveTo(right, top + offset);
-                if (drawRight)
-                    c.lineTo(right, bottom + offset);
-                else
-                    c.moveTo(right, bottom + offset);
-                if (drawBottom)
-                    c.lineTo(left, bottom + offset);
-                else
-                    c.moveTo(left, bottom + offset);
-                c.stroke();
-            }
-        }
-        
-        function drawSeriesBars(series) {
-            function plotBars(datapoints, barLeft, barRight, offset, fillStyleCallback, axisx, axisy) {
-                var points = datapoints.points, ps = datapoints.pointsize;
-                
-                for (var i = 0; i < points.length; i += ps) {
-                    if (points[i] == null)
-                        continue;
-                    drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, offset, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth);
-                }
-            }
-
-            ctx.save();
-            ctx.translate(plotOffset.left, plotOffset.top);
-
-            // FIXME: figure out a way to add shadows (for instance along the right edge)
-            ctx.lineWidth = series.bars.lineWidth;
-            ctx.strokeStyle = series.color;
-            var barLeft = series.bars.align == "left" ? 0 : -series.bars.barWidth/2;
-            var fillStyleCallback = series.bars.fill ? function (bottom, top) { return getFillStyle(series.bars, series.color, bottom, top); } : null;
-            plotBars(series.datapoints, barLeft, barLeft + series.bars.barWidth, 0, fillStyleCallback, series.xaxis, series.yaxis);
-            ctx.restore();
-        }
-
-        function getFillStyle(filloptions, seriesColor, bottom, top) {
-            var fill = filloptions.fill;
-            if (!fill)
-                return null;
-
-            if (filloptions.fillColor)
-                return getColorOrGradient(filloptions.fillColor, bottom, top, seriesColor);
-            
-            var c = $.color.parse(seriesColor);
-            c.a = typeof fill == "number" ? fill : 0.4;
-            c.normalize();
-            return c.toString();
-        }
-        
-        function insertLegend() {
-            placeholder.find(".legend").remove();
-
-            if (!options.legend.show)
-                return;
-            
-            var fragments = [], rowStarted = false,
-                lf = options.legend.labelFormatter, s, label;
-            for (var i = 0; i < series.length; ++i) {
-                s = series[i];
-                label = s.label;
-                if (!label)
-                    continue;
-                
-                if (i % options.legend.noColumns == 0) {
-                    if (rowStarted)
-                        fragments.push('</tr>');
-                    fragments.push('<tr>');
-                    rowStarted = true;
-                }
-
-                if (lf)
-                    label = lf(label, s);
-                
-                fragments.push(
-                    '<td class="legendColorBox"><div style="border:1px solid ' + options.legend.labelBoxBorderColor + ';padding:1px"><div style="width:4px;height:0;border:5px solid ' + s.color + ';overflow:hidden"></div></div></td>' +
-                    '<td class="legendLabel">' + label + '</td>');
-            }
-            if (rowStarted)
-                fragments.push('</tr>');
-            
-            if (fragments.length == 0)
-                return;
-
-            var table = '<table style="font-size:smaller;color:' + options.grid.color + '">' + fragments.join("") + '</table>';
-            if (options.legend.container != null)
-                $(options.legend.container).html(table);
-            else {
-                var pos = "",
-                    p = options.legend.position,
-                    m = options.legend.margin;
-                if (m[0] == null)
-                    m = [m, m];
-                if (p.charAt(0) == "n")
-                    pos += 'top:' + (m[1] + plotOffset.top) + 'px;';
-                else if (p.charAt(0) == "s")
-                    pos += 'bottom:' + (m[1] + plotOffset.bottom) + 'px;';
-                if (p.charAt(1) == "e")
-                    pos += 'right:' + (m[0] + plotOffset.right) + 'px;';
-                else if (p.charAt(1) == "w")
-                    pos += 'left:' + (m[0] + plotOffset.left) + 'px;';
-                var legend = $('<div class="legend">' + table.replace('style="', 'style="position:absolute;' + pos +';') + '</div>').appendTo(placeholder);
-                if (options.legend.backgroundOpacity != 0.0) {
-                    // put in the transparent background
-                    // separately to avoid blended labels and
-                    // label boxes
-                    var c = options.legend.backgroundColor;
-                    if (c == null) {
-                        c = options.grid.backgroundColor;
-                        if (c && typeof c == "string")
-                            c = $.color.parse(c);
-                        else
-                            c = $.color.extract(legend, 'background-color');
-                        c.a = 1;
-                        c = c.toString();
-                    }
-                    var div = legend.children();
-                    $('<div style="position:absolute;width:' + div.width() + 'px;height:' + div.height() + 'px;' + pos +'background-color:' + c + ';"> </div>').prependTo(legend).css('opacity', options.legend.backgroundOpacity);
-                }
-            }
-        }
-
-
-        // interactive features
-        
-        var highlights = [],
-            redrawTimeout = null;
-        
-        // returns the data item the mouse is over, or null if none is found
-        function findNearbyItem(mouseX, mouseY, seriesFilter) {
-            var maxDistance = options.grid.mouseActiveRadius,
-                smallestDistance = maxDistance * maxDistance + 1,
-                item = null, foundPoint = false, i, j;
-
-            for (i = series.length - 1; i >= 0; --i) {
-                if (!seriesFilter(series[i]))
-                    continue;
-                
-                var s = series[i],
-                    axisx = s.xaxis,
-                    axisy = s.yaxis,
-                    points = s.datapoints.points,
-                    ps = s.datapoints.pointsize,
-                    mx = axisx.c2p(mouseX), // precompute some stuff to make the loop faster
-                    my = axisy.c2p(mouseY),
-                    maxx = maxDistance / axisx.scale,
-                    maxy = maxDistance / axisy.scale;
-
-                // with inverse transforms, we can't use the maxx/maxy
-                // optimization, sadly
-                if (axisx.options.inverseTransform)
-                    maxx = Number.MAX_VALUE;
-                if (axisy.options.inverseTransform)
-                    maxy = Number.MAX_VALUE;
-                
-                if (s.lines.show || s.points.show) {
-                    for (j = 0; j < points.length; j += ps) {
-                        var x = points[j], y = points[j + 1];
-                        if (x == null)
-                            continue;
-                        
-                        // For points and lines, the cursor must be within a
-                        // certain distance to the data point
-                        if (x - mx > maxx || x - mx < -maxx ||
-                            y - my > maxy || y - my < -maxy)
-                            continue;
-
-                        // We have to calculate distances in pixels, not in
-                        // data units, because the scales of the axes may be different
-                        var dx = Math.abs(axisx.p2c(x) - mouseX),
-                            dy = Math.abs(axisy.p2c(y) - mouseY),
-                            dist = dx * dx + dy * dy; // we save the sqrt
-
-                        // use <= to ensure last point takes precedence
-                        // (last generally means on top of)
-                        if (dist < smallestDistance) {
-                            smallestDistance = dist;
-                            item = [i, j / ps];
-                        }
-                    }
-                }
-                    
-                if (s.bars.show && !item) { // no other point can be nearby
-                    var barLeft = s.bars.align == "left" ? 0 : -s.bars.barWidth/2,
-                        barRight = barLeft + s.bars.barWidth;
-                    
-                    for (j = 0; j < points.length; j += ps) {
-                        var x = points[j], y = points[j + 1], b = points[j + 2];
-                        if (x == null)
-                            continue;
-  
-                        // for a bar graph, the cursor must be inside the bar
-                        if (series[i].bars.horizontal ? 
-                            (mx <= Math.max(b, x) && mx >= Math.min(b, x) && 
-                             my >= y + barLeft && my <= y + barRight) :
-                            (mx >= x + barLeft && mx <= x + barRight &&
-                             my >= Math.min(b, y) && my <= Math.max(b, y)))
-                                item = [i, j / ps];
-                    }
-                }
-            }
-
-            if (item) {
-                i = item[0];
-                j = item[1];
-                ps = series[i].datapoints.pointsize;
-                
-                return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),
-                         dataIndex: j,
-                         series: series[i],
-                         seriesIndex: i };
-            }
-            
-            return null;
-        }
-
-        function onMouseMove(e) {
-            if (options.grid.hoverable)
-                triggerClickHoverEvent("plothover", e,
-                                       function (s) { return s["hoverable"] != false; });
-        }
-
-        function onMouseLeave(e) {
-            if (options.grid.hoverable)
-                triggerClickHoverEvent("plothover", e,
-                                       function (s) { return false; });
-        }
-
-        function onClick(e) {
-            triggerClickHoverEvent("plotclick", e,
-                                   function (s) { return s["clickable"] != false; });
-        }
-
-        // trigger click or hover event (they send the same parameters
-        // so we share their code)
-        function triggerClickHoverEvent(eventname, event, seriesFilter) {
-            var offset = eventHolder.offset(),
-                canvasX = event.pageX - offset.left - plotOffset.left,
-                canvasY = event.pageY - offset.top - plotOffset.top,
-            pos = canvasToAxisCoords({ left: canvasX, top: canvasY });
-
-            pos.pageX = event.pageX;
-            pos.pageY = event.pageY;
-
-            var item = findNearbyItem(canvasX, canvasY, seriesFilter);
-
-            if (item) {
-                // fill in mouse pos for any listeners out there
-                item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left);
-                item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top);
-            }
-
-            if (options.grid.autoHighlight) {
-                // clear auto-highlights
-                for (var i = 0; i < highlights.length; ++i) {
-                    var h = highlights[i];
-                    if (h.auto == eventname &&
-                        !(item && h.series == item.series &&
-                          h.point[0] == item.datapoint[0] &&
-                          h.point[1] == item.datapoint[1]))
-                        unhighlight(h.series, h.point);
-                }
-                
-                if (item)
-                    highlight(item.series, item.datapoint, eventname);
-            }
-            
-            placeholder.trigger(eventname, [ pos, item ]);
-        }
-
-        function triggerRedrawOverlay() {
-            if (!redrawTimeout)
-                redrawTimeout = setTimeout(drawOverlay, 30);
-        }
-
-        function drawOverlay() {
-            redrawTimeout = null;
-
-            // draw highlights
-            octx.save();
-            octx.clearRect(0, 0, canvasWidth, canvasHeight);
-            octx.translate(plotOffset.left, plotOffset.top);
-            
-            var i, hi;
-            for (i = 0; i < highlights.length; ++i) {
-                hi = highlights[i];
-
-                if (hi.series.bars.show)
-                    drawBarHighlight(hi.series, hi.point);
-                else
-                    drawPointHighlight(hi.series, hi.point);
-            }
-            octx.restore();
-            
-            executeHooks(hooks.drawOverlay, [octx]);
-        }
-        
-        function highlight(s, point, auto) {
-            if (typeof s == "number")
-                s = series[s];
-
-            if (typeof point == "number") {
-                var ps = s.datapoints.pointsize;
-                point = s.datapoints.points.slice(ps * point, ps * (point + 1));
-            }
-
-            var i = indexOfHighlight(s, point);
-            if (i == -1) {
-                highlights.push({ series: s, point: point, auto: auto });
-
-                triggerRedrawOverlay();
-            }
-            else if (!auto)
-                highlights[i].auto = false;
-        }
-            
-        function unhighlight(s, point) {
-            if (s == null && point == null) {
-                highlights = [];
-                triggerRedrawOverlay();
-            }
-            
-            if (typeof s == "number")
-                s = series[s];
-
-            if (typeof point == "number")
-                point = s.data[point];
-
-            var i = indexOfHighlight(s, point);
-            if (i != -1) {
-                highlights.splice(i, 1);
-
-                triggerRedrawOverlay();
-            }
-        }
-        
-        function indexOfHighlight(s, p) {
-            for (var i = 0; i < highlights.length; ++i) {
-                var h = highlights[i];
-                if (h.series == s && h.point[0] == p[0]
-                    && h.point[1] == p[1])
-                    return i;
-            }
-            return -1;
-        }
-        
-        function drawPointHighlight(series, point) {
-            var x = point[0], y = point[1],
-                axisx = series.xaxis, axisy = series.yaxis;
-            
-            if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)
-                return;
-            
-            var pointRadius = series.points.radius + series.points.lineWidth / 2;
-            octx.lineWidth = pointRadius;
-            octx.strokeStyle = $.color.parse(series.color).scale('a', 0.5).toString();
-            var radius = 1.5 * pointRadius,
-                x = axisx.p2c(x),
-                y = axisy.p2c(y);
-            
-            octx.beginPath();
-            if (series.points.symbol == "circle")
-                octx.arc(x, y, radius, 0, 2 * Math.PI, false);
-            else
-                series.points.symbol(octx, x, y, radius, false);
-            octx.closePath();
-            octx.stroke();
-        }
-
-        function drawBarHighlight(series, point) {
-            octx.lineWidth = series.bars.lineWidth;
-            octx.strokeStyle = $.color.parse(series.color).scale('a', 0.5).toString();
-            var fillStyle = $.color.parse(series.color).scale('a', 0.5).toString();
-            var barLeft = series.bars.align == "left" ? 0 : -series.bars.barWidth/2;
-            drawBar(point[0], point[1], point[2] || 0, barLeft, barLeft + series.bars.barWidth,
-                    0, function () { return fillStyle; }, series.xaxis, series.yaxis, octx, series.bars.horizontal, series.bars.lineWidth);
-        }
-
-        function getColorOrGradient(spec, bottom, top, defaultColor) {
-            if (typeof spec == "string")
-                return spec;
-            else {
-                // assume this is a gradient spec; IE currently only
-                // supports a simple vertical gradient properly, so that's
-                // what we support too
-                var gradient = ctx.createLinearGradient(0, top, 0, bottom);
-                
-                for (var i = 0, l = spec.colors.length; i < l; ++i) {
-                    var c = spec.colors[i];
-                    if (typeof c != "string") {
-                        var co = $.color.parse(defaultColor);
-                        if (c.brightness != null)
-                            co = co.scale('rgb', c.brightness)
-                        if (c.opacity != null)
-                            co.a *= c.opacity;
-                        c = co.toString();
-                    }
-                    gradient.addColorStop(i / (l - 1), c);
-                }
-                
-                return gradient;
-            }
-        }
-    }
-
-    $.plot = function(placeholder, data, options) {
-        //var t0 = new Date();
-        var plot = new Plot($(placeholder), data, options, $.plot.plugins);
-        //(window.console ? console.log : alert)("time used (msecs): " + ((new Date()).getTime() - t0.getTime()));
-        return plot;
-    };
-
-    $.plot.version = "0.7";
-    
-    $.plot.plugins = [];
-
-    // returns a string with the date d formatted according to fmt
-    $.plot.formatDate = function(d, fmt, monthNames) {
-        var leftPad = function(n) {
-            n = "" + n;
-            return n.length == 1 ? "0" + n : n;
-        };
-        
-        var r = [];
-        var escape = false, padNext = false;
-        var hours = d.getUTCHours();
-        var isAM = hours < 12;
-        if (monthNames == null)
-            monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
-
-        if (fmt.search(/%p|%P/) != -1) {
-            if (hours > 12) {
-                hours = hours - 12;
-            } else if (hours == 0) {
-                hours = 12;
-            }
-        }
-        for (var i = 0; i < fmt.length; ++i) {
-            var c = fmt.charAt(i);
-            
-            if (escape) {
-                switch (c) {
-                case 'h': c = "" + hours; break;
-                case 'H': c = leftPad(hours); break;
-                case 'M': c = leftPad(d.getUTCMinutes()); break;
-                case 'S': c = leftPad(d.getUTCSeconds()); break;
-                case 'd': c = "" + d.getUTCDate(); break;
-                case 'm': c = "" + (d.getUTCMonth() + 1); break;
-                case 'y': c = "" + d.getUTCFullYear(); break;
-                case 'b': c = "" + monthNames[d.getUTCMonth()]; break;
-                case 'p': c = (isAM) ? ("" + "am") : ("" + "pm"); break;
-                case 'P': c = (isAM) ? ("" + "AM") : ("" + "PM"); break;
-                case '0': c = ""; padNext = true; break;
-                }
-                if (c && padNext) {
-                    c = leftPad(c);
-                    padNext = false;
-                }
-                r.push(c);
-                if (!padNext)
-                    escape = false;
-            }
-            else {
-                if (c == "%")
-                    escape = true;
-                else
-                    r.push(c);
-            }
-        }
-        return r.join("");
-    };
-    
-    // round to nearby lower multiple of base
-    function floorInBase(n, base) {
-        return base * Math.floor(n / base);
-    }
-    
-})(jQuery);
-

--- a/js/flot/jquery.flot.min.js
+++ /dev/null
@@ -1,6 +1,1 @@
-/* Javascript plotting library for jQuery, v. 0.7.
- *
- * Released under the MIT license by IOLA, December 2007.
- *
- */
-(function(b){b.color={};b.color.make=function(d,e,g,f){var c={};c.r=d||0;c.g=e||0;c.b=g||0;c.a=f!=null?f:1;c.add=function(h,j){for(var k=0;k<h.length;++k){c[h.charAt(k)]+=j}return c.normalize()};c.scale=function(h,j){for(var k=0;k<h.length;++k){c[h.charAt(k)]*=j}return c.normalize()};c.toString=function(){if(c.a>=1){return"rgb("+[c.r,c.g,c.b].join(",")+")"}else{return"rgba("+[c.r,c.g,c.b,c.a].join(",")+")"}};c.normalize=function(){function h(k,j,l){return j<k?k:(j>l?l:j)}c.r=h(0,parseInt(c.r),255);c.g=h(0,parseInt(c.g),255);c.b=h(0,parseInt(c.b),255);c.a=h(0,c.a,1);return c};c.clone=function(){return b.color.make(c.r,c.b,c.g,c.a)};return c.normalize()};b.color.extract=function(d,e){var c;do{c=d.css(e).toLowerCase();if(c!=""&&c!="transparent"){break}d=d.parent()}while(!b.nodeName(d.get(0),"body"));if(c=="rgba(0, 0, 0, 0)"){c="transparent"}return b.color.parse(c)};b.color.parse=function(c){var d,f=b.color.make;if(d=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c)){return f(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10))}if(d=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c)){return f(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10),parseFloat(d[4]))}if(d=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c)){return f(parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55)}if(d=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c)){return f(parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55,parseFloat(d[4]))}if(d=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c)){return f(parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16))}if(d=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c)){return f(parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16))}var e=b.trim(c).toLowerCase();if(e=="transparent"){return f(255,255,255,0)}else{d=a[e]||[0,0,0];return f(d[0],d[1],d[2])}};var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);(function(c){function b(av,ai,J,af){var Q=[],O={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:true,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:0.85},xaxis:{show:null,position:"bottom",mode:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null,monthNames:null,timeformat:null,twelveHourClock:false},yaxis:{autoscaleMargin:0.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:false,radius:3,lineWidth:2,fill:true,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:false,fillColor:null,steps:false},bars:{show:false,lineWidth:2,barWidth:1,fill:true,fillColor:null,align:"left",horizontal:false},shadowSize:3},grid:{show:true,aboveData:false,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:false,hoverable:false,autoHighlight:true,mouseActiveRadius:10},hooks:{}},az=null,ad=null,y=null,H=null,A=null,p=[],aw=[],q={left:0,right:0,top:0,bottom:0},G=0,I=0,h=0,w=0,ak={processOptions:[],processRawData:[],processDatapoints:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},aq=this;aq.setData=aj;aq.setupGrid=t;aq.draw=W;aq.getPlaceholder=function(){return av};aq.getCanvas=function(){return az};aq.getPlotOffset=function(){return q};aq.width=function(){return h};aq.height=function(){return w};aq.offset=function(){var aB=y.offset();aB.left+=q.left;aB.top+=q.top;return aB};aq.getData=function(){return Q};aq.getAxes=function(){var aC={},aB;c.each(p.concat(aw),function(aD,aE){if(aE){aC[aE.direction+(aE.n!=1?aE.n:"")+"axis"]=aE}});return aC};aq.getXAxes=function(){return p};aq.getYAxes=function(){return aw};aq.c2p=C;aq.p2c=ar;aq.getOptions=function(){return O};aq.highlight=x;aq.unhighlight=T;aq.triggerRedrawOverlay=f;aq.pointOffset=function(aB){return{left:parseInt(p[aA(aB,"x")-1].p2c(+aB.x)+q.left),top:parseInt(aw[aA(aB,"y")-1].p2c(+aB.y)+q.top)}};aq.shutdown=ag;aq.resize=function(){B();g(az);g(ad)};aq.hooks=ak;F(aq);Z(J);X();aj(ai);t();W();ah();function an(aD,aB){aB=[aq].concat(aB);for(var aC=0;aC<aD.length;++aC){aD[aC].apply(this,aB)}}function F(){for(var aB=0;aB<af.length;++aB){var aC=af[aB];aC.init(aq);if(aC.options){c.extend(true,O,aC.options)}}}function Z(aC){var aB;c.extend(true,O,aC);if(O.xaxis.color==null){O.xaxis.color=O.grid.color}if(O.yaxis.color==null){O.yaxis.color=O.grid.color}if(O.xaxis.tickColor==null){O.xaxis.tickColor=O.grid.tickColor}if(O.yaxis.tickColor==null){O.yaxis.tickColor=O.grid.tickColor}if(O.grid.borderColor==null){O.grid.borderColor=O.grid.color}if(O.grid.tickColor==null){O.grid.tickColor=c.color.parse(O.grid.color).scale("a",0.22).toString()}for(aB=0;aB<Math.max(1,O.xaxes.length);++aB){O.xaxes[aB]=c.extend(true,{},O.xaxis,O.xaxes[aB])}for(aB=0;aB<Math.max(1,O.yaxes.length);++aB){O.yaxes[aB]=c.extend(true,{},O.yaxis,O.yaxes[aB])}if(O.xaxis.noTicks&&O.xaxis.ticks==null){O.xaxis.ticks=O.xaxis.noTicks}if(O.yaxis.noTicks&&O.yaxis.ticks==null){O.yaxis.ticks=O.yaxis.noTicks}if(O.x2axis){O.xaxes[1]=c.extend(true,{},O.xaxis,O.x2axis);O.xaxes[1].position="top"}if(O.y2axis){O.yaxes[1]=c.extend(true,{},O.yaxis,O.y2axis);O.yaxes[1].position="right"}if(O.grid.coloredAreas){O.grid.markings=O.grid.coloredAreas}if(O.grid.coloredAreasColor){O.grid.markingsColor=O.grid.coloredAreasColor}if(O.lines){c.extend(true,O.series.lines,O.lines)}if(O.points){c.extend(true,O.series.points,O.points)}if(O.bars){c.extend(true,O.series.bars,O.bars)}if(O.shadowSize!=null){O.series.shadowSize=O.shadowSize}for(aB=0;aB<O.xaxes.length;++aB){V(p,aB+1).options=O.xaxes[aB]}for(aB=0;aB<O.yaxes.length;++aB){V(aw,aB+1).options=O.yaxes[aB]}for(var aD in ak){if(O.hooks[aD]&&O.hooks[aD].length){ak[aD]=ak[aD].concat(O.hooks[aD])}}an(ak.processOptions,[O])}function aj(aB){Q=Y(aB);ax();z()}function Y(aE){var aC=[];for(var aB=0;aB<aE.length;++aB){var aD=c.extend(true,{},O.series);if(aE[aB].data!=null){aD.data=aE[aB].data;delete aE[aB].data;c.extend(true,aD,aE[aB]);aE[aB].data=aD.data}else{aD.data=aE[aB]}aC.push(aD)}return aC}function aA(aC,aD){var aB=aC[aD+"axis"];if(typeof aB=="object"){aB=aB.n}if(typeof aB!="number"){aB=1}return aB}function m(){return c.grep(p.concat(aw),function(aB){return aB})}function C(aE){var aC={},aB,aD;for(aB=0;aB<p.length;++aB){aD=p[aB];if(aD&&aD.used){aC["x"+aD.n]=aD.c2p(aE.left)}}for(aB=0;aB<aw.length;++aB){aD=aw[aB];if(aD&&aD.used){aC["y"+aD.n]=aD.c2p(aE.top)}}if(aC.x1!==undefined){aC.x=aC.x1}if(aC.y1!==undefined){aC.y=aC.y1}return aC}function ar(aF){var aD={},aC,aE,aB;for(aC=0;aC<p.length;++aC){aE=p[aC];if(aE&&aE.used){aB="x"+aE.n;if(aF[aB]==null&&aE.n==1){aB="x"}if(aF[aB]!=null){aD.left=aE.p2c(aF[aB]);break}}}for(aC=0;aC<aw.length;++aC){aE=aw[aC];if(aE&&aE.used){aB="y"+aE.n;if(aF[aB]==null&&aE.n==1){aB="y"}if(aF[aB]!=null){aD.top=aE.p2c(aF[aB]);break}}}return aD}function V(aC,aB){if(!aC[aB-1]){aC[aB-1]={n:aB,direction:aC==p?"x":"y",options:c.extend(true,{},aC==p?O.xaxis:O.yaxis)}}return aC[aB-1]}function ax(){var aG;var aM=Q.length,aB=[],aE=[];for(aG=0;aG<Q.length;++aG){var aJ=Q[aG].color;if(aJ!=null){--aM;if(typeof aJ=="number"){aE.push(aJ)}else{aB.push(c.color.parse(Q[aG].color))}}}for(aG=0;aG<aE.length;++aG){aM=Math.max(aM,aE[aG]+1)}var aC=[],aF=0;aG=0;while(aC.length<aM){var aI;if(O.colors.length==aG){aI=c.color.make(100,100,100)}else{aI=c.color.parse(O.colors[aG])}var aD=aF%2==1?-1:1;aI.scale("rgb",1+aD*Math.ceil(aF/2)*0.2);aC.push(aI);++aG;if(aG>=O.colors.length){aG=0;++aF}}var aH=0,aN;for(aG=0;aG<Q.length;++aG){aN=Q[aG];if(aN.color==null){aN.color=aC[aH].toString();++aH}else{if(typeof aN.color=="number"){aN.color=aC[aN.color].toString()}}if(aN.lines.show==null){var aL,aK=true;for(aL in aN){if(aN[aL]&&aN[aL].show){aK=false;break}}if(aK){aN.lines.show=true}}aN.xaxis=V(p,aA(aN,"x"));aN.yaxis=V(aw,aA(aN,"y"))}}function z(){var aO=Number.POSITIVE_INFINITY,aI=Number.NEGATIVE_INFINITY,aB=Number.MAX_VALUE,aU,aS,aR,aN,aD,aJ,aT,aP,aH,aG,aC,a0,aX,aL;function aF(a3,a2,a1){if(a2<a3.datamin&&a2!=-aB){a3.datamin=a2}if(a1>a3.datamax&&a1!=aB){a3.datamax=a1}}c.each(m(),function(a1,a2){a2.datamin=aO;a2.datamax=aI;a2.used=false});for(aU=0;aU<Q.length;++aU){aJ=Q[aU];aJ.datapoints={points:[]};an(ak.processRawData,[aJ,aJ.data,aJ.datapoints])}for(aU=0;aU<Q.length;++aU){aJ=Q[aU];var aZ=aJ.data,aW=aJ.datapoints.format;if(!aW){aW=[];aW.push({x:true,number:true,required:true});aW.push({y:true,number:true,required:true});if(aJ.bars.show||(aJ.lines.show&&aJ.lines.fill)){aW.push({y:true,number:true,required:false,defaultValue:0});if(aJ.bars.horizontal){delete aW[aW.length-1].y;aW[aW.length-1].x=true}}aJ.datapoints.format=aW}if(aJ.datapoints.pointsize!=null){continue}aJ.datapoints.pointsize=aW.length;aP=aJ.datapoints.pointsize;aT=aJ.datapoints.points;insertSteps=aJ.lines.show&&aJ.lines.steps;aJ.xaxis.used=aJ.yaxis.used=true;for(aS=aR=0;aS<aZ.length;++aS,aR+=aP){aL=aZ[aS];var aE=aL==null;if(!aE){for(aN=0;aN<aP;++aN){a0=aL[aN];aX=aW[aN];if(aX){if(aX.number&&a0!=null){a0=+a0;if(isNaN(a0)){a0=null}else{if(a0==Infinity){a0=aB}else{if(a0==-Infinity){a0=-aB}}}}if(a0==null){if(aX.required){aE=true}if(aX.defaultValue!=null){a0=aX.defaultValue}}}aT[aR+aN]=a0}}if(aE){for(aN=0;aN<aP;++aN){a0=aT[aR+aN];if(a0!=null){aX=aW[aN];if(aX.x){aF(aJ.xaxis,a0,a0)}if(aX.y){aF(aJ.yaxis,a0,a0)}}aT[aR+aN]=null}}else{if(insertSteps&&aR>0&&aT[aR-aP]!=null&&aT[aR-aP]!=aT[aR]&&aT[aR-aP+1]!=aT[aR+1]){for(aN=0;aN<aP;++aN){aT[aR+aP+aN]=aT[aR+aN]}aT[aR+1]=aT[aR-aP+1];aR+=aP}}}}for(aU=0;aU<Q.length;++aU){aJ=Q[aU];an(ak.processDatapoints,[aJ,aJ.datapoints])}for(aU=0;aU<Q.length;++aU){aJ=Q[aU];aT=aJ.datapoints.points,aP=aJ.datapoints.pointsize;var aK=aO,aQ=aO,aM=aI,aV=aI;for(aS=0;aS<aT.length;aS+=aP){if(aT[aS]==null){continue}for(aN=0;aN<aP;++aN){a0=aT[aS+aN];aX=aW[aN];if(!aX||a0==aB||a0==-aB){continue}if(aX.x){if(a0<aK){aK=a0}if(a0>aM){aM=a0}}if(aX.y){if(a0<aQ){aQ=a0}if(a0>aV){aV=a0}}}}if(aJ.bars.show){var aY=aJ.bars.align=="left"?0:-aJ.bars.barWidth/2;if(aJ.bars.horizontal){aQ+=aY;aV+=aY+aJ.bars.barWidth}else{aK+=aY;aM+=aY+aJ.bars.barWidth}}aF(aJ.xaxis,aK,aM);aF(aJ.yaxis,aQ,aV)}c.each(m(),function(a1,a2){if(a2.datamin==aO){a2.datamin=null}if(a2.datamax==aI){a2.datamax=null}})}function j(aB,aC){var aD=document.createElement("canvas");aD.className=aC;aD.width=G;aD.height=I;if(!aB){c(aD).css({position:"absolute",left:0,top:0})}c(aD).appendTo(av);if(!aD.getContext){aD=window.G_vmlCanvasManager.initElement(aD)}aD.getContext("2d").save();return aD}function B(){G=av.width();I=av.height();if(G<=0||I<=0){throw"Invalid dimensions for plot, width = "+G+", height = "+I}}function g(aC){if(aC.width!=G){aC.width=G}if(aC.height!=I){aC.height=I}var aB=aC.getContext("2d");aB.restore();aB.save()}function X(){var aC,aB=av.children("canvas.base"),aD=av.children("canvas.overlay");if(aB.length==0||aD==0){av.html("");av.css({padding:0});if(av.css("position")=="static"){av.css("position","relative")}B();az=j(true,"base");ad=j(false,"overlay");aC=false}else{az=aB.get(0);ad=aD.get(0);aC=true}H=az.getContext("2d");A=ad.getContext("2d");y=c([ad,az]);if(aC){av.data("plot").shutdown();aq.resize();A.clearRect(0,0,G,I);y.unbind();av.children().not([az,ad]).remove()}av.data("plot",aq)}function ah(){if(O.grid.hoverable){y.mousemove(aa);y.mouseleave(l)}if(O.grid.clickable){y.click(R)}an(ak.bindEvents,[y])}function ag(){if(M){clearTimeout(M)}y.unbind("mousemove",aa);y.unbind("mouseleave",l);y.unbind("click",R);an(ak.shutdown,[y])}function r(aG){function aC(aH){return aH}var aF,aB,aD=aG.options.transform||aC,aE=aG.options.inverseTransform;if(aG.direction=="x"){aF=aG.scale=h/Math.abs(aD(aG.max)-aD(aG.min));aB=Math.min(aD(aG.max),aD(aG.min))}else{aF=aG.scale=w/Math.abs(aD(aG.max)-aD(aG.min));aF=-aF;aB=Math.max(aD(aG.max),aD(aG.min))}if(aD==aC){aG.p2c=function(aH){return(aH-aB)*aF}}else{aG.p2c=function(aH){return(aD(aH)-aB)*aF}}if(!aE){aG.c2p=function(aH){return aB+aH/aF}}else{aG.c2p=function(aH){return aE(aB+aH/aF)}}}function L(aD){var aB=aD.options,aF,aJ=aD.ticks||[],aI=[],aE,aK=aB.labelWidth,aG=aB.labelHeight,aC;function aH(aM,aL){return c('<div style="position:absolute;top:-10000px;'+aL+'font-size:smaller"><div class="'+aD.direction+"Axis "+aD.direction+aD.n+'Axis">'+aM.join("")+"</div></div>").appendTo(av)}if(aD.direction=="x"){if(aK==null){aK=Math.floor(G/(aJ.length>0?aJ.length:1))}if(aG==null){aI=[];for(aF=0;aF<aJ.length;++aF){aE=aJ[aF].label;if(aE){aI.push('<div class="tickLabel" style="float:left;width:'+aK+'px">'+aE+"</div>")}}if(aI.length>0){aI.push('<div style="clear:left"></div>');aC=aH(aI,"width:10000px;");aG=aC.height();aC.remove()}}}else{if(aK==null||aG==null){for(aF=0;aF<aJ.length;++aF){aE=aJ[aF].label;if(aE){aI.push('<div class="tickLabel">'+aE+"</div>")}}if(aI.length>0){aC=aH(aI,"");if(aK==null){aK=aC.children().width()}if(aG==null){aG=aC.find("div.tickLabel").height()}aC.remove()}}}if(aK==null){aK=0}if(aG==null){aG=0}aD.labelWidth=aK;aD.labelHeight=aG}function au(aD){var aC=aD.labelWidth,aL=aD.labelHeight,aH=aD.options.position,aF=aD.options.tickLength,aG=O.grid.axisMargin,aJ=O.grid.labelMargin,aK=aD.direction=="x"?p:aw,aE;var aB=c.grep(aK,function(aN){return aN&&aN.options.position==aH&&aN.reserveSpace});if(c.inArray(aD,aB)==aB.length-1){aG=0}if(aF==null){aF="full"}var aI=c.grep(aK,function(aN){return aN&&aN.reserveSpace});var aM=c.inArray(aD,aI)==0;if(!aM&&aF=="full"){aF=5}if(!isNaN(+aF)){aJ+=+aF}if(aD.direction=="x"){aL+=aJ;if(aH=="bottom"){q.bottom+=aL+aG;aD.box={top:I-q.bottom,height:aL}}else{aD.box={top:q.top+aG,height:aL};q.top+=aL+aG}}else{aC+=aJ;if(aH=="left"){aD.box={left:q.left+aG,width:aC};q.left+=aC+aG}else{q.right+=aC+aG;aD.box={left:G-q.right,width:aC}}}aD.position=aH;aD.tickLength=aF;aD.box.padding=aJ;aD.innermost=aM}function U(aB){if(aB.direction=="x"){aB.box.left=q.left;aB.box.width=h}else{aB.box.top=q.top;aB.box.height=w}}function t(){var aC,aE=m();c.each(aE,function(aF,aG){aG.show=aG.options.show;if(aG.show==null){aG.show=aG.used}aG.reserveSpace=aG.show||aG.options.reserveSpace;n(aG)});allocatedAxes=c.grep(aE,function(aF){return aF.reserveSpace});q.left=q.right=q.top=q.bottom=0;if(O.grid.show){c.each(allocatedAxes,function(aF,aG){S(aG);P(aG);ap(aG,aG.ticks);L(aG)});for(aC=allocatedAxes.length-1;aC>=0;--aC){au(allocatedAxes[aC])}var aD=O.grid.minBorderMargin;if(aD==null){aD=0;for(aC=0;aC<Q.length;++aC){aD=Math.max(aD,Q[aC].points.radius+Q[aC].points.lineWidth/2)}}for(var aB in q){q[aB]+=O.grid.borderWidth;q[aB]=Math.max(aD,q[aB])}}h=G-q.left-q.right;w=I-q.bottom-q.top;c.each(aE,function(aF,aG){r(aG)});if(O.grid.show){c.each(allocatedAxes,function(aF,aG){U(aG)});k()}o()}function n(aE){var aF=aE.options,aD=+(aF.min!=null?aF.min:aE.datamin),aB=+(aF.max!=null?aF.max:aE.datamax),aH=aB-aD;if(aH==0){var aC=aB==0?1:0.01;if(aF.min==null){aD-=aC}if(aF.max==null||aF.min!=null){aB+=aC}}else{var aG=aF.autoscaleMargin;if(aG!=null){if(aF.min==null){aD-=aH*aG;if(aD<0&&aE.datamin!=null&&aE.datamin>=0){aD=0}}if(aF.max==null){aB+=aH*aG;if(aB>0&&aE.datamax!=null&&aE.datamax<=0){aB=0}}}}aE.min=aD;aE.max=aB}function S(aG){var aM=aG.options;var aH;if(typeof aM.ticks=="number"&&aM.ticks>0){aH=aM.ticks}else{aH=0.3*Math.sqrt(aG.direction=="x"?G:I)}var aT=(aG.max-aG.min)/aH,aO,aB,aN,aR,aS,aQ,aI;if(aM.mode=="time"){var aJ={second:1000,minute:60*1000,hour:60*60*1000,day:24*60*60*1000,month:30*24*60*60*1000,year:365.2425*24*60*60*1000};var aK=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[0.25,"month"],[0.5,"month"],[1,"month"],[2,"month"],[3,"month"],[6,"month"],[1,"year"]];var aC=0;if(aM.minTickSize!=null){if(typeof aM.tickSize=="number"){aC=aM.tickSize}else{aC=aM.minTickSize[0]*aJ[aM.minTickSize[1]]}}for(var aS=0;aS<aK.length-1;++aS){if(aT<(aK[aS][0]*aJ[aK[aS][1]]+aK[aS+1][0]*aJ[aK[aS+1][1]])/2&&aK[aS][0]*aJ[aK[aS][1]]>=aC){break}}aO=aK[aS][0];aN=aK[aS][1];if(aN=="year"){aQ=Math.pow(10,Math.floor(Math.log(aT/aJ.year)/Math.LN10));aI=(aT/aJ.year)/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ}aG.tickSize=aM.tickSize||[aO,aN];aB=function(aX){var a2=[],a0=aX.tickSize[0],a3=aX.tickSize[1],a1=new Date(aX.min);var aW=a0*aJ[a3];if(a3=="second"){a1.setUTCSeconds(a(a1.getUTCSeconds(),a0))}if(a3=="minute"){a1.setUTCMinutes(a(a1.getUTCMinutes(),a0))}if(a3=="hour"){a1.setUTCHours(a(a1.getUTCHours(),a0))}if(a3=="month"){a1.setUTCMonth(a(a1.getUTCMonth(),a0))}if(a3=="year"){a1.setUTCFullYear(a(a1.getUTCFullYear(),a0))}a1.setUTCMilliseconds(0);if(aW>=aJ.minute){a1.setUTCSeconds(0)}if(aW>=aJ.hour){a1.setUTCMinutes(0)}if(aW>=aJ.day){a1.setUTCHours(0)}if(aW>=aJ.day*4){a1.setUTCDate(1)}if(aW>=aJ.year){a1.setUTCMonth(0)}var a5=0,a4=Number.NaN,aY;do{aY=a4;a4=a1.getTime();a2.push(a4);if(a3=="month"){if(a0<1){a1.setUTCDate(1);var aV=a1.getTime();a1.setUTCMonth(a1.getUTCMonth()+1);var aZ=a1.getTime();a1.setTime(a4+a5*aJ.hour+(aZ-aV)*a0);a5=a1.getUTCHours();a1.setUTCHours(0)}else{a1.setUTCMonth(a1.getUTCMonth()+a0)}}else{if(a3=="year"){a1.setUTCFullYear(a1.getUTCFullYear()+a0)}else{a1.setTime(a4+aW)}}}while(a4<aX.max&&a4!=aY);return a2};aR=function(aV,aY){var a0=new Date(aV);if(aM.timeformat!=null){return c.plot.formatDate(a0,aM.timeformat,aM.monthNames)}var aW=aY.tickSize[0]*aJ[aY.tickSize[1]];var aX=aY.max-aY.min;var aZ=(aM.twelveHourClock)?" %p":"";if(aW<aJ.minute){fmt="%h:%M:%S"+aZ}else{if(aW<aJ.day){if(aX<2*aJ.day){fmt="%h:%M"+aZ}else{fmt="%b %d %h:%M"+aZ}}else{if(aW<aJ.month){fmt="%b %d"}else{if(aW<aJ.year){if(aX<aJ.year){fmt="%b"}else{fmt="%b %y"}}else{fmt="%y"}}}}return c.plot.formatDate(a0,fmt,aM.monthNames)}}else{var aU=aM.tickDecimals;var aP=-Math.floor(Math.log(aT)/Math.LN10);if(aU!=null&&aP>aU){aP=aU}aQ=Math.pow(10,-aP);aI=aT/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2;if(aI>2.25&&(aU==null||aP+1<=aU)){aO=2.5;++aP}}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ;if(aM.minTickSize!=null&&aO<aM.minTickSize){aO=aM.minTickSize}aG.tickDecimals=Math.max(0,aU!=null?aU:aP);aG.tickSize=aM.tickSize||aO;aB=function(aX){var aZ=[];var a0=a(aX.min,aX.tickSize),aW=0,aV=Number.NaN,aY;do{aY=aV;aV=a0+aW*aX.tickSize;aZ.push(aV);++aW}while(aV<aX.max&&aV!=aY);return aZ};aR=function(aV,aW){return aV.toFixed(aW.tickDecimals)}}if(aM.alignTicksWithAxis!=null){var aF=(aG.direction=="x"?p:aw)[aM.alignTicksWithAxis-1];if(aF&&aF.used&&aF!=aG){var aL=aB(aG);if(aL.length>0){if(aM.min==null){aG.min=Math.min(aG.min,aL[0])}if(aM.max==null&&aL.length>1){aG.max=Math.max(aG.max,aL[aL.length-1])}}aB=function(aX){var aY=[],aV,aW;for(aW=0;aW<aF.ticks.length;++aW){aV=(aF.ticks[aW].v-aF.min)/(aF.max-aF.min);aV=aX.min+aV*(aX.max-aX.min);aY.push(aV)}return aY};if(aG.mode!="time"&&aM.tickDecimals==null){var aE=Math.max(0,-Math.floor(Math.log(aT)/Math.LN10)+1),aD=aB(aG);if(!(aD.length>1&&/\..*0$/.test((aD[1]-aD[0]).toFixed(aE)))){aG.tickDecimals=aE}}}}aG.tickGenerator=aB;if(c.isFunction(aM.tickFormatter)){aG.tickFormatter=function(aV,aW){return""+aM.tickFormatter(aV,aW)}}else{aG.tickFormatter=aR}}function P(aF){var aH=aF.options.ticks,aG=[];if(aH==null||(typeof aH=="number"&&aH>0)){aG=aF.tickGenerator(aF)}else{if(aH){if(c.isFunction(aH)){aG=aH({min:aF.min,max:aF.max})}else{aG=aH}}}var aE,aB;aF.ticks=[];for(aE=0;aE<aG.length;++aE){var aC=null;var aD=aG[aE];if(typeof aD=="object"){aB=+aD[0];if(aD.length>1){aC=aD[1]}}else{aB=+aD}if(aC==null){aC=aF.tickFormatter(aB,aF)}if(!isNaN(aB)){aF.ticks.push({v:aB,label:aC})}}}function ap(aB,aC){if(aB.options.autoscaleMargin&&aC.length>0){if(aB.options.min==null){aB.min=Math.min(aB.min,aC[0].v)}if(aB.options.max==null&&aC.length>1){aB.max=Math.max(aB.max,aC[aC.length-1].v)}}}function W(){H.clearRect(0,0,G,I);var aC=O.grid;if(aC.show&&aC.backgroundColor){N()}if(aC.show&&!aC.aboveData){ac()}for(var aB=0;aB<Q.length;++aB){an(ak.drawSeries,[H,Q[aB]]);d(Q[aB])}an(ak.draw,[H]);if(aC.show&&aC.aboveData){ac()}}function D(aB,aI){var aE,aH,aG,aD,aF=m();for(i=0;i<aF.length;++i){aE=aF[i];if(aE.direction==aI){aD=aI+aE.n+"axis";if(!aB[aD]&&aE.n==1){aD=aI+"axis"}if(aB[aD]){aH=aB[aD].from;aG=aB[aD].to;break}}}if(!aB[aD]){aE=aI=="x"?p[0]:aw[0];aH=aB[aI+"1"];aG=aB[aI+"2"]}if(aH!=null&&aG!=null&&aH>aG){var aC=aH;aH=aG;aG=aC}return{from:aH,to:aG,axis:aE}}function N(){H.save();H.translate(q.left,q.top);H.fillStyle=am(O.grid.backgroundColor,w,0,"rgba(255, 255, 255, 0)");H.fillRect(0,0,h,w);H.restore()}function ac(){var aF;H.save();H.translate(q.left,q.top);var aH=O.grid.markings;if(aH){if(c.isFunction(aH)){var aK=aq.getAxes();aK.xmin=aK.xaxis.min;aK.xmax=aK.xaxis.max;aK.ymin=aK.yaxis.min;aK.ymax=aK.yaxis.max;aH=aH(aK)}for(aF=0;aF<aH.length;++aF){var aD=aH[aF],aC=D(aD,"x"),aI=D(aD,"y");if(aC.from==null){aC.from=aC.axis.min}if(aC.to==null){aC.to=aC.axis.max}if(aI.from==null){aI.from=aI.axis.min}if(aI.to==null){aI.to=aI.axis.max}if(aC.to<aC.axis.min||aC.from>aC.axis.max||aI.to<aI.axis.min||aI.from>aI.axis.max){continue}aC.from=Math.max(aC.from,aC.axis.min);aC.to=Math.min(aC.to,aC.axis.max);aI.from=Math.max(aI.from,aI.axis.min);aI.to=Math.min(aI.to,aI.axis.max);if(aC.from==aC.to&&aI.from==aI.to){continue}aC.from=aC.axis.p2c(aC.from);aC.to=aC.axis.p2c(aC.to);aI.from=aI.axis.p2c(aI.from);aI.to=aI.axis.p2c(aI.to);if(aC.from==aC.to||aI.from==aI.to){H.beginPath();H.strokeStyle=aD.color||O.grid.markingsColor;H.lineWidth=aD.lineWidth||O.grid.markingsLineWidth;H.moveTo(aC.from,aI.from);H.lineTo(aC.to,aI.to);H.stroke()}else{H.fillStyle=aD.color||O.grid.markingsColor;H.fillRect(aC.from,aI.to,aC.to-aC.from,aI.from-aI.to)}}}var aK=m(),aM=O.grid.borderWidth;for(var aE=0;aE<aK.length;++aE){var aB=aK[aE],aG=aB.box,aQ=aB.tickLength,aN,aL,aP,aJ;if(!aB.show||aB.ticks.length==0){continue}H.strokeStyle=aB.options.tickColor||c.color.parse(aB.options.color).scale("a",0.22).toString();H.lineWidth=1;if(aB.direction=="x"){aN=0;if(aQ=="full"){aL=(aB.position=="top"?0:w)}else{aL=aG.top-q.top+(aB.position=="top"?aG.height:0)}}else{aL=0;if(aQ=="full"){aN=(aB.position=="left"?0:h)}else{aN=aG.left-q.left+(aB.position=="left"?aG.width:0)}}if(!aB.innermost){H.beginPath();aP=aJ=0;if(aB.direction=="x"){aP=h}else{aJ=w}if(H.lineWidth==1){aN=Math.floor(aN)+0.5;aL=Math.floor(aL)+0.5}H.moveTo(aN,aL);H.lineTo(aN+aP,aL+aJ);H.stroke()}H.beginPath();for(aF=0;aF<aB.ticks.length;++aF){var aO=aB.ticks[aF].v;aP=aJ=0;if(aO<aB.min||aO>aB.max||(aQ=="full"&&aM>0&&(aO==aB.min||aO==aB.max))){continue}if(aB.direction=="x"){aN=aB.p2c(aO);aJ=aQ=="full"?-w:aQ;if(aB.position=="top"){aJ=-aJ}}else{aL=aB.p2c(aO);aP=aQ=="full"?-h:aQ;if(aB.position=="left"){aP=-aP}}if(H.lineWidth==1){if(aB.direction=="x"){aN=Math.floor(aN)+0.5}else{aL=Math.floor(aL)+0.5}}H.moveTo(aN,aL);H.lineTo(aN+aP,aL+aJ)}H.stroke()}if(aM){H.lineWidth=aM;H.strokeStyle=O.grid.borderColor;H.strokeRect(-aM/2,-aM/2,h+aM,w+aM)}H.restore()}function k(){av.find(".tickLabels").remove();var aG=['<div class="tickLabels" style="font-size:smaller">'];var aJ=m();for(var aD=0;aD<aJ.length;++aD){var aC=aJ[aD],aF=aC.box;if(!aC.show){continue}aG.push('<div class="'+aC.direction+"Axis "+aC.direction+aC.n+'Axis" style="color:'+aC.options.color+'">');for(var aE=0;aE<aC.ticks.length;++aE){var aH=aC.ticks[aE];if(!aH.label||aH.v<aC.min||aH.v>aC.max){continue}var aK={},aI;if(aC.direction=="x"){aI="center";aK.left=Math.round(q.left+aC.p2c(aH.v)-aC.labelWidth/2);if(aC.position=="bottom"){aK.top=aF.top+aF.padding}else{aK.bottom=I-(aF.top+aF.height-aF.padding)}}else{aK.top=Math.round(q.top+aC.p2c(aH.v)-aC.labelHeight/2);if(aC.position=="left"){aK.right=G-(aF.left+aF.width-aF.padding);aI="right"}else{aK.left=aF.left+aF.padding;aI="left"}}aK.width=aC.labelWidth;var aB=["position:absolute","text-align:"+aI];for(var aL in aK){aB.push(aL+":"+aK[aL]+"px")}aG.push('<div class="tickLabel" style="'+aB.join(";")+'">'+aH.label+"</div>")}aG.push("</div>")}aG.push("</div>");av.append(aG.join(""))}function d(aB){if(aB.lines.show){at(aB)}if(aB.bars.show){e(aB)}if(aB.points.show){ao(aB)}}function at(aE){function aD(aP,aQ,aI,aU,aT){var aV=aP.points,aJ=aP.pointsize,aN=null,aM=null;H.beginPath();for(var aO=aJ;aO<aV.length;aO+=aJ){var aL=aV[aO-aJ],aS=aV[aO-aJ+1],aK=aV[aO],aR=aV[aO+1];if(aL==null||aK==null){continue}if(aS<=aR&&aS<aT.min){if(aR<aT.min){continue}aL=(aT.min-aS)/(aR-aS)*(aK-aL)+aL;aS=aT.min}else{if(aR<=aS&&aR<aT.min){if(aS<aT.min){continue}aK=(aT.min-aS)/(aR-aS)*(aK-aL)+aL;aR=aT.min}}if(aS>=aR&&aS>aT.max){if(aR>aT.max){continue}aL=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aS=aT.max}else{if(aR>=aS&&aR>aT.max){if(aS>aT.max){continue}aK=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aR=aT.max}}if(aL<=aK&&aL<aU.min){if(aK<aU.min){continue}aS=(aU.min-aL)/(aK-aL)*(aR-aS)+aS;aL=aU.min}else{if(aK<=aL&&aK<aU.min){if(aL<aU.min){continue}aR=(aU.min-aL)/(aK-aL)*(aR-aS)+aS;aK=aU.min}}if(aL>=aK&&aL>aU.max){if(aK>aU.max){continue}aS=(aU.max-aL)/(aK-aL)*(aR-aS)+aS;aL=aU.max}else{if(aK>=aL&&aK>aU.max){if(aL>aU.max){continue}aR=(aU.max-aL)/(aK-aL)*(aR-aS)+aS;aK=aU.max}}if(aL!=aN||aS!=aM){H.moveTo(aU.p2c(aL)+aQ,aT.p2c(aS)+aI)}aN=aK;aM=aR;H.lineTo(aU.p2c(aK)+aQ,aT.p2c(aR)+aI)}H.stroke()}function aF(aI,aQ,aP){var aW=aI.points,aV=aI.pointsize,aN=Math.min(Math.max(0,aP.min),aP.max),aX=0,aU,aT=false,aM=1,aL=0,aR=0;while(true){if(aV>0&&aX>aW.length+aV){break}aX+=aV;var aZ=aW[aX-aV],aK=aW[aX-aV+aM],aY=aW[aX],aJ=aW[aX+aM];if(aT){if(aV>0&&aZ!=null&&aY==null){aR=aX;aV=-aV;aM=2;continue}if(aV<0&&aX==aL+aV){H.fill();aT=false;aV=-aV;aM=1;aX=aL=aR+aV;continue}}if(aZ==null||aY==null){continue}if(aZ<=aY&&aZ<aQ.min){if(aY<aQ.min){continue}aK=(aQ.min-aZ)/(aY-aZ)*(aJ-aK)+aK;aZ=aQ.min}else{if(aY<=aZ&&aY<aQ.min){if(aZ<aQ.min){continue}aJ=(aQ.min-aZ)/(aY-aZ)*(aJ-aK)+aK;aY=aQ.min}}if(aZ>=aY&&aZ>aQ.max){if(aY>aQ.max){continue}aK=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)+aK;aZ=aQ.max}else{if(aY>=aZ&&aY>aQ.max){if(aZ>aQ.max){continue}aJ=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)+aK;aY=aQ.max}}if(!aT){H.beginPath();H.moveTo(aQ.p2c(aZ),aP.p2c(aN));aT=true}if(aK>=aP.max&&aJ>=aP.max){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.max));H.lineTo(aQ.p2c(aY),aP.p2c(aP.max));continue}else{if(aK<=aP.min&&aJ<=aP.min){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.min));H.lineTo(aQ.p2c(aY),aP.p2c(aP.min));continue}}var aO=aZ,aS=aY;if(aK<=aJ&&aK<aP.min&&aJ>=aP.min){aZ=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.min}else{if(aJ<=aK&&aJ<aP.min&&aK>=aP.min){aY=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.min}}if(aK>=aJ&&aK>aP.max&&aJ<=aP.max){aZ=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.max}else{if(aJ>=aK&&aJ>aP.max&&aK<=aP.max){aY=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.max}}if(aZ!=aO){H.lineTo(aQ.p2c(aO),aP.p2c(aK))}H.lineTo(aQ.p2c(aZ),aP.p2c(aK));H.lineTo(aQ.p2c(aY),aP.p2c(aJ));if(aY!=aS){H.lineTo(aQ.p2c(aY),aP.p2c(aJ));H.lineTo(aQ.p2c(aS),aP.p2c(aJ))}}}H.save();H.translate(q.left,q.top);H.lineJoin="round";var aG=aE.lines.lineWidth,aB=aE.shadowSize;if(aG>0&&aB>0){H.lineWidth=aB;H.strokeStyle="rgba(0,0,0,0.1)";var aH=Math.PI/18;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/2),Math.cos(aH)*(aG/2+aB/2),aE.xaxis,aE.yaxis);H.lineWidth=aB/2;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/4),Math.cos(aH)*(aG/2+aB/4),aE.xaxis,aE.yaxis)}H.lineWidth=aG;H.strokeStyle=aE.color;var aC=ae(aE.lines,aE.color,0,w);if(aC){H.fillStyle=aC;aF(aE.datapoints,aE.xaxis,aE.yaxis)}if(aG>0){aD(aE.datapoints,0,0,aE.xaxis,aE.yaxis)}H.restore()}function ao(aE){function aH(aN,aM,aU,aK,aS,aT,aQ,aJ){var aR=aN.points,aI=aN.pointsize;for(var aL=0;aL<aR.length;aL+=aI){var aP=aR[aL],aO=aR[aL+1];if(aP==null||aP<aT.min||aP>aT.max||aO<aQ.min||aO>aQ.max){continue}H.beginPath();aP=aT.p2c(aP);aO=aQ.p2c(aO)+aK;if(aJ=="circle"){H.arc(aP,aO,aM,0,aS?Math.PI:Math.PI*2,false)}else{aJ(H,aP,aO,aM,aS)}H.closePath();if(aU){H.fillStyle=aU;H.fill()}H.stroke()}}H.save();H.translate(q.left,q.top);var aG=aE.points.lineWidth,aC=aE.shadowSize,aB=aE.points.radius,aF=aE.points.symbol;if(aG>0&&aC>0){var aD=aC/2;H.lineWidth=aD;H.strokeStyle="rgba(0,0,0,0.1)";aH(aE.datapoints,aB,null,aD+aD/2,true,aE.xaxis,aE.yaxis,aF);H.strokeStyle="rgba(0,0,0,0.2)";aH(aE.datapoints,aB,null,aD/2,true,aE.xaxis,aE.yaxis,aF)}H.lineWidth=aG;H.strokeStyle=aE.color;aH(aE.datapoints,aB,ae(aE.points,aE.color),0,false,aE.xaxis,aE.yaxis,aF);H.restore()}function E(aN,aM,aV,aI,aQ,aF,aD,aL,aK,aU,aR,aC){var aE,aT,aJ,aP,aG,aB,aO,aH,aS;if(aR){aH=aB=aO=true;aG=false;aE=aV;aT=aN;aP=aM+aI;aJ=aM+aQ;if(aT<aE){aS=aT;aT=aE;aE=aS;aG=true;aB=false}}else{aG=aB=aO=true;aH=false;aE=aN+aI;aT=aN+aQ;aJ=aV;aP=aM;if(aP<aJ){aS=aP;aP=aJ;aJ=aS;aH=true;aO=false}}if(aT<aL.min||aE>aL.max||aP<aK.min||aJ>aK.max){return}if(aE<aL.min){aE=aL.min;aG=false}if(aT>aL.max){aT=aL.max;aB=false}if(aJ<aK.min){aJ=aK.min;aH=false}if(aP>aK.max){aP=aK.max;aO=false}aE=aL.p2c(aE);aJ=aK.p2c(aJ);aT=aL.p2c(aT);aP=aK.p2c(aP);if(aD){aU.beginPath();aU.moveTo(aE,aJ);aU.lineTo(aE,aP);aU.lineTo(aT,aP);aU.lineTo(aT,aJ);aU.fillStyle=aD(aJ,aP);aU.fill()}if(aC>0&&(aG||aB||aO||aH)){aU.beginPath();aU.moveTo(aE,aJ+aF);if(aG){aU.lineTo(aE,aP+aF)}else{aU.moveTo(aE,aP+aF)}if(aO){aU.lineTo(aT,aP+aF)}else{aU.moveTo(aT,aP+aF)}if(aB){aU.lineTo(aT,aJ+aF)}else{aU.moveTo(aT,aJ+aF)}if(aH){aU.lineTo(aE,aJ+aF)}else{aU.moveTo(aE,aJ+aF)}aU.stroke()}}function e(aD){function aC(aJ,aI,aL,aG,aK,aN,aM){var aO=aJ.points,aF=aJ.pointsize;for(var aH=0;aH<aO.length;aH+=aF){if(aO[aH]==null){continue}E(aO[aH],aO[aH+1],aO[aH+2],aI,aL,aG,aK,aN,aM,H,aD.bars.horizontal,aD.bars.lineWidth)}}H.save();H.translate(q.left,q.top);H.lineWidth=aD.bars.lineWidth;H.strokeStyle=aD.color;var aB=aD.bars.align=="left"?0:-aD.bars.barWidth/2;var aE=aD.bars.fill?function(aF,aG){return ae(aD.bars,aD.color,aF,aG)}:null;aC(aD.datapoints,aB,aB+aD.bars.barWidth,0,aE,aD.xaxis,aD.yaxis);H.restore()}function ae(aD,aB,aC,aF){var aE=aD.fill;if(!aE){return null}if(aD.fillColor){return am(aD.fillColor,aC,aF,aB)}var aG=c.color.parse(aB);aG.a=typeof aE=="number"?aE:0.4;aG.normalize();return aG.toString()}function o(){av.find(".legend").remove();if(!O.legend.show){return}var aH=[],aF=false,aN=O.legend.labelFormatter,aM,aJ;for(var aE=0;aE<Q.length;++aE){aM=Q[aE];aJ=aM.label;if(!aJ){continue}if(aE%O.legend.noColumns==0){if(aF){aH.push("</tr>")}aH.push("<tr>");aF=true}if(aN){aJ=aN(aJ,aM)}aH.push('<td class="legendColorBox"><div style="border:1px solid '+O.legend.labelBoxBorderColor+';padding:1px"><div style="width:4px;height:0;border:5px solid '+aM.color+';overflow:hidden"></div></div></td><td class="legendLabel">'+aJ+"</td>")}if(aF){aH.push("</tr>")}if(aH.length==0){return}var aL='<table style="font-size:smaller;color:'+O.grid.color+'">'+aH.join("")+"</table>";if(O.legend.container!=null){c(O.legend.container).html(aL)}else{var aI="",aC=O.legend.position,aD=O.legend.margin;if(aD[0]==null){aD=[aD,aD]}if(aC.charAt(0)=="n"){aI+="top:"+(aD[1]+q.top)+"px;"}else{if(aC.charAt(0)=="s"){aI+="bottom:"+(aD[1]+q.bottom)+"px;"}}if(aC.charAt(1)=="e"){aI+="right:"+(aD[0]+q.right)+"px;"}else{if(aC.charAt(1)=="w"){aI+="left:"+(aD[0]+q.left)+"px;"}}var aK=c('<div class="legend">'+aL.replace('style="','style="position:absolute;'+aI+";")+"</div>").appendTo(av);if(O.legend.backgroundOpacity!=0){var aG=O.legend.backgroundColor;if(aG==null){aG=O.grid.backgroundColor;if(aG&&typeof aG=="string"){aG=c.color.parse(aG)}else{aG=c.color.extract(aK,"background-color")}aG.a=1;aG=aG.toString()}var aB=aK.children();c('<div style="position:absolute;width:'+aB.width()+"px;height:"+aB.height()+"px;"+aI+"background-color:"+aG+';"> </div>').prependTo(aK).css("opacity",O.legend.backgroundOpacity)}}}var ab=[],M=null;function K(aI,aG,aD){var aO=O.grid.mouseActiveRadius,a0=aO*aO+1,aY=null,aR=false,aW,aU;for(aW=Q.length-1;aW>=0;--aW){if(!aD(Q[aW])){continue}var aP=Q[aW],aH=aP.xaxis,aF=aP.yaxis,aV=aP.datapoints.points,aT=aP.datapoints.pointsize,aQ=aH.c2p(aI),aN=aF.c2p(aG),aC=aO/aH.scale,aB=aO/aF.scale;if(aH.options.inverseTransform){aC=Number.MAX_VALUE}if(aF.options.inverseTransform){aB=Number.MAX_VALUE}if(aP.lines.show||aP.points.show){for(aU=0;aU<aV.length;aU+=aT){var aK=aV[aU],aJ=aV[aU+1];if(aK==null){continue}if(aK-aQ>aC||aK-aQ<-aC||aJ-aN>aB||aJ-aN<-aB){continue}var aM=Math.abs(aH.p2c(aK)-aI),aL=Math.abs(aF.p2c(aJ)-aG),aS=aM*aM+aL*aL;if(aS<a0){a0=aS;aY=[aW,aU/aT]}}}if(aP.bars.show&&!aY){var aE=aP.bars.align=="left"?0:-aP.bars.barWidth/2,aX=aE+aP.bars.barWidth;for(aU=0;aU<aV.length;aU+=aT){var aK=aV[aU],aJ=aV[aU+1],aZ=aV[aU+2];if(aK==null){continue}if(Q[aW].bars.horizontal?(aQ<=Math.max(aZ,aK)&&aQ>=Math.min(aZ,aK)&&aN>=aJ+aE&&aN<=aJ+aX):(aQ>=aK+aE&&aQ<=aK+aX&&aN>=Math.min(aZ,aJ)&&aN<=Math.max(aZ,aJ))){aY=[aW,aU/aT]}}}}if(aY){aW=aY[0];aU=aY[1];aT=Q[aW].datapoints.pointsize;return{datapoint:Q[aW].datapoints.points.slice(aU*aT,(aU+1)*aT),dataIndex:aU,series:Q[aW],seriesIndex:aW}}return null}function aa(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return aC.hoverable!=false})}}function l(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return false})}}function R(aB){u("plotclick",aB,function(aC){return aC.clickable!=false})}function u(aC,aB,aD){var aE=y.offset(),aH=aB.pageX-aE.left-q.left,aF=aB.pageY-aE.top-q.top,aJ=C({left:aH,top:aF});aJ.pageX=aB.pageX;aJ.pageY=aB.pageY;var aK=K(aH,aF,aD);if(aK){aK.pageX=parseInt(aK.series.xaxis.p2c(aK.datapoint[0])+aE.left+q.left);aK.pageY=parseInt(aK.series.yaxis.p2c(aK.datapoint[1])+aE.top+q.top)}if(O.grid.autoHighlight){for(var aG=0;aG<ab.length;++aG){var aI=ab[aG];if(aI.auto==aC&&!(aK&&aI.series==aK.series&&aI.point[0]==aK.datapoint[0]&&aI.point[1]==aK.datapoint[1])){T(aI.series,aI.point)}}if(aK){x(aK.series,aK.datapoint,aC)}}av.trigger(aC,[aJ,aK])}function f(){if(!M){M=setTimeout(s,30)}}function s(){M=null;A.save();A.clearRect(0,0,G,I);A.translate(q.left,q.top);var aC,aB;for(aC=0;aC<ab.length;++aC){aB=ab[aC];if(aB.series.bars.show){v(aB.series,aB.point)}else{ay(aB.series,aB.point)}}A.restore();an(ak.drawOverlay,[A])}function x(aD,aB,aF){if(typeof aD=="number"){aD=Q[aD]}if(typeof aB=="number"){var aE=aD.datapoints.pointsize;aB=aD.datapoints.points.slice(aE*aB,aE*(aB+1))}var aC=al(aD,aB);if(aC==-1){ab.push({series:aD,point:aB,auto:aF});f()}else{if(!aF){ab[aC].auto=false}}}function T(aD,aB){if(aD==null&&aB==null){ab=[];f()}if(typeof aD=="number"){aD=Q[aD]}if(typeof aB=="number"){aB=aD.data[aB]}var aC=al(aD,aB);if(aC!=-1){ab.splice(aC,1);f()}}function al(aD,aE){for(var aB=0;aB<ab.length;++aB){var aC=ab[aB];if(aC.series==aD&&aC.point[0]==aE[0]&&aC.point[1]==aE[1]){return aB}}return -1}function ay(aE,aD){var aC=aD[0],aI=aD[1],aH=aE.xaxis,aG=aE.yaxis;if(aC<aH.min||aC>aH.max||aI<aG.min||aI>aG.max){return}var aF=aE.points.radius+aE.points.lineWidth/2;A.lineWidth=aF;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aB=1.5*aF,aC=aH.p2c(aC),aI=aG.p2c(aI);A.beginPath();if(aE.points.symbol=="circle"){A.arc(aC,aI,aB,0,2*Math.PI,false)}else{aE.points.symbol(A,aC,aI,aB,false)}A.closePath();A.stroke()}function v(aE,aB){A.lineWidth=aE.bars.lineWidth;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aD=c.color.parse(aE.color).scale("a",0.5).toString();var aC=aE.bars.align=="left"?0:-aE.bars.barWidth/2;E(aB[0],aB[1],aB[2]||0,aC,aC+aE.bars.barWidth,0,function(){return aD},aE.xaxis,aE.yaxis,A,aE.bars.horizontal,aE.bars.lineWidth)}function am(aJ,aB,aH,aC){if(typeof aJ=="string"){return aJ}else{var aI=H.createLinearGradient(0,aH,0,aB);for(var aE=0,aD=aJ.colors.length;aE<aD;++aE){var aF=aJ.colors[aE];if(typeof aF!="string"){var aG=c.color.parse(aC);if(aF.brightness!=null){aG=aG.scale("rgb",aF.brightness)}if(aF.opacity!=null){aG.a*=aF.opacity}aF=aG.toString()}aI.addColorStop(aE/(aD-1),aF)}return aI}}}c.plot=function(g,e,d){var f=new b(c(g),e,d,c.plot.plugins);return f};c.plot.version="0.7";c.plot.plugins=[];c.plot.formatDate=function(l,f,h){var o=function(d){d=""+d;return d.length==1?"0"+d:d};var e=[];var p=false,j=false;var n=l.getUTCHours();var k=n<12;if(h==null){h=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}if(f.search(/%p|%P/)!=-1){if(n>12){n=n-12}else{if(n==0){n=12}}}for(var g=0;g<f.length;++g){var m=f.charAt(g);if(p){switch(m){case"h":m=""+n;break;case"H":m=o(n);break;case"M":m=o(l.getUTCMinutes());break;case"S":m=o(l.getUTCSeconds());break;case"d":m=""+l.getUTCDate();break;case"m":m=""+(l.getUTCMonth()+1);break;case"y":m=""+l.getUTCFullYear();break;case"b":m=""+h[l.getUTCMonth()];break;case"p":m=(k)?("am"):("pm");break;case"P":m=(k)?("AM"):("PM");break;case"0":m="";j=true;break}if(m&&j){m=o(m);j=false}e.push(m);if(!j){p=false}}else{if(m=="%"){p=true}else{e.push(m)}}}return e.join("")};function a(e,d){return d*Math.floor(e/d)}})(jQuery);
+

--- a/js/flot/jquery.flot.navigate.js
+++ /dev/null
@@ -1,337 +1,1 @@
-/*
-Flot plugin for adding panning and zooming capabilities to a plot.
 
-The default behaviour is double click and scrollwheel up/down to zoom
-in, drag to pan. The plugin defines plot.zoom({ center }),
-plot.zoomOut() and plot.pan(offset) so you easily can add custom
-controls. It also fires a "plotpan" and "plotzoom" event when
-something happens, useful for synchronizing plots.
-
-Options:
-
-  zoom: {
-    interactive: false
-    trigger: "dblclick" // or "click" for single click
-    amount: 1.5         // 2 = 200% (zoom in), 0.5 = 50% (zoom out)
-  }
-  
-  pan: {
-    interactive: false
-    cursor: "move"      // CSS mouse cursor value used when dragging, e.g. "pointer"
-    frameRate: 20
-  }
-
-  xaxis, yaxis, x2axis, y2axis: {
-    zoomRange: null  // or [number, number] (min range, max range) or false
-    panRange: null   // or [number, number] (min, max) or false
-  }
-  
-"interactive" enables the built-in drag/click behaviour. If you enable
-interactive for pan, then you'll have a basic plot that supports
-moving around; the same for zoom.
-
-"amount" specifies the default amount to zoom in (so 1.5 = 150%)
-relative to the current viewport.
-
-"cursor" is a standard CSS mouse cursor string used for visual
-feedback to the user when dragging.
-
-"frameRate" specifies the maximum number of times per second the plot
-will update itself while the user is panning around on it (set to null
-to disable intermediate pans, the plot will then not update until the
-mouse button is released).
-
-"zoomRange" is the interval in which zooming can happen, e.g. with
-zoomRange: [1, 100] the zoom will never scale the axis so that the
-difference between min and max is smaller than 1 or larger than 100.
-You can set either end to null to ignore, e.g. [1, null]. If you set
-zoomRange to false, zooming on that axis will be disabled.
-
-"panRange" confines the panning to stay within a range, e.g. with
-panRange: [-10, 20] panning stops at -10 in one end and at 20 in the
-other. Either can be null, e.g. [-10, null]. If you set
-panRange to false, panning on that axis will be disabled.
-
-Example API usage:
-
-  plot = $.plot(...);
-  
-  // zoom default amount in on the pixel (10, 20) 
-  plot.zoom({ center: { left: 10, top: 20 } });
-
-  // zoom out again
-  plot.zoomOut({ center: { left: 10, top: 20 } });
-
-  // zoom 200% in on the pixel (10, 20) 
-  plot.zoom({ amount: 2, center: { left: 10, top: 20 } });
-  
-  // pan 100 pixels to the left and 20 down
-  plot.pan({ left: -100, top: 20 })
-
-Here, "center" specifies where the center of the zooming should
-happen. Note that this is defined in pixel space, not the space of the
-data points (you can use the p2c helpers on the axes in Flot to help
-you convert between these).
-
-"amount" is the amount to zoom the viewport relative to the current
-range, so 1 is 100% (i.e. no change), 1.5 is 150% (zoom in), 0.7 is
-70% (zoom out). You can set the default in the options.
-  
-*/
-
-
-// First two dependencies, jquery.event.drag.js and
-// jquery.mousewheel.js, we put them inline here to save people the
-// effort of downloading them.
-
-/*
-jquery.event.drag.js ~ v1.5 ~ Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)  
-Licensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-LICENSE.txt
-*/
-(function(E){E.fn.drag=function(L,K,J){if(K){this.bind("dragstart",L)}if(J){this.bind("dragend",J)}return !L?this.trigger("drag"):this.bind("drag",K?K:L)};var A=E.event,B=A.special,F=B.drag={not:":input",distance:0,which:1,dragging:false,setup:function(J){J=E.extend({distance:F.distance,which:F.which,not:F.not},J||{});J.distance=I(J.distance);A.add(this,"mousedown",H,J);if(this.attachEvent){this.attachEvent("ondragstart",D)}},teardown:function(){A.remove(this,"mousedown",H);if(this===F.dragging){F.dragging=F.proxy=false}G(this,true);if(this.detachEvent){this.detachEvent("ondragstart",D)}}};B.dragstart=B.dragend={setup:function(){},teardown:function(){}};function H(L){var K=this,J,M=L.data||{};if(M.elem){K=L.dragTarget=M.elem;L.dragProxy=F.proxy||K;L.cursorOffsetX=M.pageX-M.left;L.cursorOffsetY=M.pageY-M.top;L.offsetX=L.pageX-L.cursorOffsetX;L.offsetY=L.pageY-L.cursorOffsetY}else{if(F.dragging||(M.which>0&&L.which!=M.which)||E(L.target).is(M.not)){return }}switch(L.type){case"mousedown":E.extend(M,E(K).offset(),{elem:K,target:L.target,pageX:L.pageX,pageY:L.pageY});A.add(document,"mousemove mouseup",H,M);G(K,false);F.dragging=null;return false;case !F.dragging&&"mousemove":if(I(L.pageX-M.pageX)+I(L.pageY-M.pageY)<M.distance){break}L.target=M.target;J=C(L,"dragstart",K);if(J!==false){F.dragging=K;F.proxy=L.dragProxy=E(J||K)[0]}case"mousemove":if(F.dragging){J=C(L,"drag",K);if(B.drop){B.drop.allowed=(J!==false);B.drop.handler(L)}if(J!==false){break}L.type="mouseup"}case"mouseup":A.remove(document,"mousemove mouseup",H);if(F.dragging){if(B.drop){B.drop.handler(L)}C(L,"dragend",K)}G(K,true);F.dragging=F.proxy=M.elem=false;break}return true}function C(M,K,L){M.type=K;var J=E.event.handle.call(L,M);return J===false?false:J||M.result}function I(J){return Math.pow(J,2)}function D(){return(F.dragging===false)}function G(K,J){if(!K){return }K.unselectable=J?"off":"on";K.onselectstart=function(){return J};if(K.style){K.style.MozUserSelect=J?"":"none"}}})(jQuery);
-
-
-/* jquery.mousewheel.min.js
- * Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
- * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
- * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
- *
- * Version: 3.0.2
- * 
- * Requires: 1.2.2+
- */
-(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery);
-
-
-
-
-(function ($) {
-    var options = {
-        xaxis: {
-            zoomRange: null, // or [number, number] (min range, max range)
-            panRange: null // or [number, number] (min, max)
-        },
-        zoom: {
-            interactive: false,
-            trigger: "dblclick", // or "click" for single click
-            amount: 1.5 // how much to zoom relative to current position, 2 = 200% (zoom in), 0.5 = 50% (zoom out)
-        },
-        pan: {
-            interactive: false,
-            cursor: "move",
-            frameRate: 20
-        }
-    };
-
-    function init(plot) {
-        function onZoomClick(e, zoomOut) {
-            var c = plot.offset();
-            c.left = e.pageX - c.left;
-            c.top = e.pageY - c.top;
-            if (zoomOut)
-                plot.zoomOut({ center: c });
-            else
-                plot.zoom({ center: c });
-        }
-
-        function onMouseWheel(e, delta) {
-            onZoomClick(e, delta < 0);
-            return false;
-        }
-        
-        var prevCursor = 'default', prevPageX = 0, prevPageY = 0,
-            panTimeout = null;
-
-        function onDragStart(e) {
-            if (e.which != 1)  // only accept left-click
-                return false;
-            var c = plot.getPlaceholder().css('cursor');
-            if (c)
-                prevCursor = c;
-            plot.getPlaceholder().css('cursor', plot.getOptions().pan.cursor);
-            prevPageX = e.pageX;
-            prevPageY = e.pageY;
-        }
-        
-        function onDrag(e) {
-            var frameRate = plot.getOptions().pan.frameRate;
-            if (panTimeout || !frameRate)
-                return;
-
-            panTimeout = setTimeout(function () {
-                plot.pan({ left: prevPageX - e.pageX,
-                           top: prevPageY - e.pageY });
-                prevPageX = e.pageX;
-                prevPageY = e.pageY;
-                                                    
-                panTimeout = null;
-            }, 1 / frameRate * 1000);
-        }
-
-        function onDragEnd(e) {
-            if (panTimeout) {
-                clearTimeout(panTimeout);
-                panTimeout = null;
-            }
-                    
-            plot.getPlaceholder().css('cursor', prevCursor);
-            plot.pan({ left: prevPageX - e.pageX,
-                       top: prevPageY - e.pageY });
-        }
-        
-        function bindEvents(plot, eventHolder) {
-            var o = plot.getOptions();
-            if (o.zoom.interactive) {
-                eventHolder[o.zoom.trigger](onZoomClick);
-                eventHolder.mousewheel(onMouseWheel);
-            }
-
-            if (o.pan.interactive) {
-                eventHolder.bind("dragstart", { distance: 10 }, onDragStart);
-                eventHolder.bind("drag", onDrag);
-                eventHolder.bind("dragend", onDragEnd);
-            }
-        }
-
-        plot.zoomOut = function (args) {
-            if (!args)
-                args = {};
-            
-            if (!args.amount)
-                args.amount = plot.getOptions().zoom.amount
-
-            args.amount = 1 / args.amount;
-            plot.zoom(args);
-        }
-        
-        plot.zoom = function (args) {
-            if (!args)
-                args = {};
-            
-            var c = args.center,
-                amount = args.amount || plot.getOptions().zoom.amount,
-                w = plot.width(), h = plot.height();
-
-            if (!c)
-                c = { left: w / 2, top: h / 2 };
-                
-            var xf = c.left / w,
-                yf = c.top / h,
-                minmax = {
-                    x: {
-                        min: c.left - xf * w / amount,
-                        max: c.left + (1 - xf) * w / amount
-                    },
-                    y: {
-                        min: c.top - yf * h / amount,
-                        max: c.top + (1 - yf) * h / amount
-                    }
-                };
-
-            $.each(plot.getAxes(), function(_, axis) {
-                var opts = axis.options,
-                    min = minmax[axis.direction].min,
-                    max = minmax[axis.direction].max,
-                    zr = opts.zoomRange;
-
-                if (zr === false) // no zooming on this axis
-                    return;
-                    
-                min = axis.c2p(min);
-                max = axis.c2p(max);
-                if (min > max) {
-                    // make sure min < max
-                    var tmp = min;
-                    min = max;
-                    max = tmp;
-                }
-
-                var range = max - min;
-                if (zr &&
-                    ((zr[0] != null && range < zr[0]) ||
-                     (zr[1] != null && range > zr[1])))
-                    return;
-            
-                opts.min = min;
-                opts.max = max;
-            });
-            
-            plot.setupGrid();
-            plot.draw();
-            
-            if (!args.preventEvent)
-                plot.getPlaceholder().trigger("plotzoom", [ plot ]);
-        }
-
-        plot.pan = function (args) {
-            var delta = {
-                x: +args.left,
-                y: +args.top
-            };
-
-            if (isNaN(delta.x))
-                delta.x = 0;
-            if (isNaN(delta.y))
-                delta.y = 0;
-
-            $.each(plot.getAxes(), function (_, axis) {
-                var opts = axis.options,
-                    min, max, d = delta[axis.direction];
-
-                min = axis.c2p(axis.p2c(axis.min) + d),
-                max = axis.c2p(axis.p2c(axis.max) + d);
-
-                var pr = opts.panRange;
-                if (pr === false) // no panning on this axis
-                    return;
-                
-                if (pr) {
-                    // check whether we hit the wall
-                    if (pr[0] != null && pr[0] > min) {
-                        d = pr[0] - min;
-                        min += d;
-                        max += d;
-                    }
-                    
-                    if (pr[1] != null && pr[1] < max) {
-                        d = pr[1] - max;
-                        min += d;
-                        max += d;
-                    }
-                }
-                
-                opts.min = min;
-                opts.max = max;
-            });
-            
-            plot.setupGrid();
-            plot.draw();
-            
-            if (!args.preventEvent)
-                plot.getPlaceholder().trigger("plotpan", [ plot ]);
-        }
-
-        function shutdown(plot, eventHolder) {
-            eventHolder.unbind(plot.getOptions().zoom.trigger, onZoomClick);
-            eventHolder.unbind("mousewheel", onMouseWheel);
-            eventHolder.unbind("dragstart", onDragStart);
-            eventHolder.unbind("drag", onDrag);
-            eventHolder.unbind("dragend", onDragEnd);
-            if (panTimeout)
-                clearTimeout(panTimeout);
-        }
-        
-        plot.hooks.bindEvents.push(bindEvents);
-        plot.hooks.shutdown.push(shutdown);
-    }
-    
-    $.plot.plugins.push({
-        init: init,
-        options: options,
-        name: 'navigate',
-        version: '1.3'
-    });
-})(jQuery);
-

--- a/js/flot/jquery.flot.navigate.min.js
+++ /dev/null
@@ -1,1 +1,1 @@
-(function(i){i.fn.drag=function(j,k,l){if(k){this.bind("dragstart",j)}if(l){this.bind("dragend",l)}return !j?this.trigger("drag"):this.bind("drag",k?k:j)};var d=i.event,c=d.special,h=c.drag={not:":input",distance:0,which:1,dragging:false,setup:function(j){j=i.extend({distance:h.distance,which:h.which,not:h.not},j||{});j.distance=e(j.distance);d.add(this,"mousedown",f,j);if(this.attachEvent){this.attachEvent("ondragstart",a)}},teardown:function(){d.remove(this,"mousedown",f);if(this===h.dragging){h.dragging=h.proxy=false}g(this,true);if(this.detachEvent){this.detachEvent("ondragstart",a)}}};c.dragstart=c.dragend={setup:function(){},teardown:function(){}};function f(j){var k=this,l,m=j.data||{};if(m.elem){k=j.dragTarget=m.elem;j.dragProxy=h.proxy||k;j.cursorOffsetX=m.pageX-m.left;j.cursorOffsetY=m.pageY-m.top;j.offsetX=j.pageX-j.cursorOffsetX;j.offsetY=j.pageY-j.cursorOffsetY}else{if(h.dragging||(m.which>0&&j.which!=m.which)||i(j.target).is(m.not)){return}}switch(j.type){case"mousedown":i.extend(m,i(k).offset(),{elem:k,target:j.target,pageX:j.pageX,pageY:j.pageY});d.add(document,"mousemove mouseup",f,m);g(k,false);h.dragging=null;return false;case !h.dragging&&"mousemove":if(e(j.pageX-m.pageX)+e(j.pageY-m.pageY)<m.distance){break}j.target=m.target;l=b(j,"dragstart",k);if(l!==false){h.dragging=k;h.proxy=j.dragProxy=i(l||k)[0]}case"mousemove":if(h.dragging){l=b(j,"drag",k);if(c.drop){c.drop.allowed=(l!==false);c.drop.handler(j)}if(l!==false){break}j.type="mouseup"}case"mouseup":d.remove(document,"mousemove mouseup",f);if(h.dragging){if(c.drop){c.drop.handler(j)}b(j,"dragend",k)}g(k,true);h.dragging=h.proxy=m.elem=false;break}return true}function b(m,k,j){m.type=k;var l=i.event.handle.call(j,m);return l===false?false:l||m.result}function e(j){return Math.pow(j,2)}function a(){return(h.dragging===false)}function g(j,k){if(!j){return}j.unselectable=k?"off":"on";j.onselectstart=function(){return k};if(j.style){j.style.MozUserSelect=k?"":"none"}}})(jQuery);(function(f){var e=["DOMMouseScroll","mousewheel"];f.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var a=e.length;a;){this.addEventListener(e[--a],d,false)}}else{this.onmousewheel=d}},teardown:function(){if(this.removeEventListener){for(var a=e.length;a;){this.removeEventListener(e[--a],d,false)}}else{this.onmousewheel=null}}};f.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}});function d(b){var h=[].slice.call(arguments,1),a=0,c=true;b=f.event.fix(b||window.event);b.type="mousewheel";if(b.wheelDelta){a=b.wheelDelta/120}if(b.detail){a=-b.detail/3}h.unshift(b,a);return f.event.handle.apply(this,h)}})(jQuery);(function(b){var a={xaxis:{zoomRange:null,panRange:null},zoom:{interactive:false,trigger:"dblclick",amount:1.5},pan:{interactive:false,cursor:"move",frameRate:20}};function c(o){function m(q,p){var r=o.offset();r.left=q.pageX-r.left;r.top=q.pageY-r.top;if(p){o.zoomOut({center:r})}else{o.zoom({center:r})}}function d(p,q){m(p,q<0);return false}var i="default",g=0,e=0,n=null;function f(p){if(p.which!=1){return false}var q=o.getPlaceholder().css("cursor");if(q){i=q}o.getPlaceholder().css("cursor",o.getOptions().pan.cursor);g=p.pageX;e=p.pageY}function j(q){var p=o.getOptions().pan.frameRate;if(n||!p){return}n=setTimeout(function(){o.pan({left:g-q.pageX,top:e-q.pageY});g=q.pageX;e=q.pageY;n=null},1/p*1000)}function h(p){if(n){clearTimeout(n);n=null}o.getPlaceholder().css("cursor",i);o.pan({left:g-p.pageX,top:e-p.pageY})}function l(q,p){var r=q.getOptions();if(r.zoom.interactive){p[r.zoom.trigger](m);p.mousewheel(d)}if(r.pan.interactive){p.bind("dragstart",{distance:10},f);p.bind("drag",j);p.bind("dragend",h)}}o.zoomOut=function(p){if(!p){p={}}if(!p.amount){p.amount=o.getOptions().zoom.amount}p.amount=1/p.amount;o.zoom(p)};o.zoom=function(q){if(!q){q={}}var x=q.center,r=q.amount||o.getOptions().zoom.amount,p=o.width(),t=o.height();if(!x){x={left:p/2,top:t/2}}var s=x.left/p,v=x.top/t,u={x:{min:x.left-s*p/r,max:x.left+(1-s)*p/r},y:{min:x.top-v*t/r,max:x.top+(1-v)*t/r}};b.each(o.getAxes(),function(z,C){var D=C.options,B=u[C.direction].min,w=u[C.direction].max,E=D.zoomRange;if(E===false){return}B=C.c2p(B);w=C.c2p(w);if(B>w){var A=B;B=w;w=A}var y=w-B;if(E&&((E[0]!=null&&y<E[0])||(E[1]!=null&&y>E[1]))){return}D.min=B;D.max=w});o.setupGrid();o.draw();if(!q.preventEvent){o.getPlaceholder().trigger("plotzoom",[o])}};o.pan=function(p){var q={x:+p.left,y:+p.top};if(isNaN(q.x)){q.x=0}if(isNaN(q.y)){q.y=0}b.each(o.getAxes(),function(s,u){var v=u.options,t,r,w=q[u.direction];t=u.c2p(u.p2c(u.min)+w),r=u.c2p(u.p2c(u.max)+w);var x=v.panRange;if(x===false){return}if(x){if(x[0]!=null&&x[0]>t){w=x[0]-t;t+=w;r+=w}if(x[1]!=null&&x[1]<r){w=x[1]-r;t+=w;r+=w}}v.min=t;v.max=r});o.setupGrid();o.draw();if(!p.preventEvent){o.getPlaceholder().trigger("plotpan",[o])}};function k(q,p){p.unbind(q.getOptions().zoom.trigger,m);p.unbind("mousewheel",d);p.unbind("dragstart",f);p.unbind("drag",j);p.unbind("dragend",h);if(n){clearTimeout(n)}}o.hooks.bindEvents.push(l);o.hooks.shutdown.push(k)}b.plot.plugins.push({init:c,options:a,name:"navigate",version:"1.3"})})(jQuery);
+

--- a/js/flot/jquery.flot.pie.js
+++ /dev/null
@@ -1,751 +1,1 @@
-/*

-Flot plugin for rendering pie charts. The plugin assumes the data is 

-coming is as a single data value for each series, and each of those 

-values is a positive value or zero (negative numbers don't make 

-any sense and will cause strange effects). The data values do 

-NOT need to be passed in as percentage values because it 

-internally calculates the total and percentages.

-

-* Created by Brian Medendorp, June 2009

-* Updated November 2009 with contributions from: btburnett3, Anthony Aragues and Xavi Ivars

-

-* Changes:

-	2009-10-22: lineJoin set to round

-	2009-10-23: IE full circle fix, donut

-	2009-11-11: Added basic hover from btburnett3 - does not work in IE, and center is off in Chrome and Opera

-	2009-11-17: Added IE hover capability submitted by Anthony Aragues

-	2009-11-18: Added bug fix submitted by Xavi Ivars (issues with arrays when other JS libraries are included as well)

-		

-

-Available options are:

-series: {

-	pie: {

-		show: true/false

-		radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto'

-		innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect

-		startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result

-		tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show)

-		offset: {

-			top: integer value to move the pie up or down

-			left: integer value to move the pie left or right, or 'auto'

-		},

-		stroke: {

-			color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF')

-			width: integer pixel width of the stroke

-		},

-		label: {

-			show: true/false, or 'auto'

-			formatter:  a user-defined function that modifies the text/style of the label text

-			radius: 0-1 for percentage of fullsize, or a specified pixel length

-			background: {

-				color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000')

-				opacity: 0-1

-			},

-			threshold: 0-1 for the percentage value at which to hide labels (if they're too small)

-		},

-		combine: {

-			threshold: 0-1 for the percentage value at which to combine slices (if they're too small)

-			color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined

-			label: any text value of what the combined slice should be labeled

-		}

-		highlight: {

-			opacity: 0-1

-		}

-	}

-}

-

-More detail and specific examples can be found in the included HTML file.

-

-*/

-

-(function ($) 

-{

-	function init(plot) // this is the "body" of the plugin

-	{

-		var canvas = null;

-		var target = null;

-		var maxRadius = null;

-		var centerLeft = null;

-		var centerTop = null;

-		var total = 0;

-		var redraw = true;

-		var redrawAttempts = 10;

-		var shrink = 0.95;

-		var legendWidth = 0;

-		var processed = false;

-		var raw = false;

-		

-		// interactive variables	

-		var highlights = [];	

-	

-		// add hook to determine if pie plugin in enabled, and then perform necessary operations

-		plot.hooks.processOptions.push(checkPieEnabled);

-		plot.hooks.bindEvents.push(bindEvents);	

-

-		// check to see if the pie plugin is enabled

-		function checkPieEnabled(plot, options)

-		{

-			if (options.series.pie.show)

-			{

-				//disable grid

-				options.grid.show = false;

-				

-				// set labels.show

-				if (options.series.pie.label.show=='auto')

-					if (options.legend.show)

-						options.series.pie.label.show = false;

-					else

-						options.series.pie.label.show = true;

-				

-				// set radius

-				if (options.series.pie.radius=='auto')

-					if (options.series.pie.label.show)

-						options.series.pie.radius = 3/4;

-					else

-						options.series.pie.radius = 1;

-						

-				// ensure sane tilt

-				if (options.series.pie.tilt>1)

-					options.series.pie.tilt=1;

-				if (options.series.pie.tilt<0)

-					options.series.pie.tilt=0;

-			

-				// add processData hook to do transformations on the data

-				plot.hooks.processDatapoints.push(processDatapoints);

-				plot.hooks.drawOverlay.push(drawOverlay);	

-				

-				// add draw hook

-				plot.hooks.draw.push(draw);

-			}

-		}

-	

-		// bind hoverable events

-		function bindEvents(plot, eventHolder) 		

-		{		

-			var options = plot.getOptions();

-			

-			if (options.series.pie.show && options.grid.hoverable)

-				eventHolder.unbind('mousemove').mousemove(onMouseMove);

-				

-			if (options.series.pie.show && options.grid.clickable)

-				eventHolder.unbind('click').click(onClick);

-		}	

-		

-

-		// debugging function that prints out an object

-		function alertObject(obj)

-		{

-			var msg = '';

-			function traverse(obj, depth)

-			{

-				if (!depth)

-					depth = 0;

-				for (var i = 0; i < obj.length; ++i)

-				{

-					for (var j=0; j<depth; j++)

-						msg += '\t';

-				

-					if( typeof obj[i] == "object")

-					{	// its an object

-						msg += ''+i+':\n';

-						traverse(obj[i], depth+1);

-					}

-					else

-					{	// its a value

-						msg += ''+i+': '+obj[i]+'\n';

-					}

-				}

-			}

-			traverse(obj);

-			alert(msg);

-		}

-		

-		function calcTotal(data)

-		{

-			for (var i = 0; i < data.length; ++i)

-			{

-				var item = parseFloat(data[i].data[0][1]);

-				if (item)

-					total += item;

-			}

-		}	

-		

-		function processDatapoints(plot, series, data, datapoints) 

-		{	

-			if (!processed)

-			{

-				processed = true;

-			

-				canvas = plot.getCanvas();

-				target = $(canvas).parent();

-				options = plot.getOptions();

-			

-				plot.setData(combine(plot.getData()));

-			}

-		}

-		

-		function setupPie()

-		{

-			legendWidth = target.children().filter('.legend').children().width();

-		

-			// calculate maximum radius and center point

-			maxRadius =  Math.min(canvas.width,(canvas.height/options.series.pie.tilt))/2;

-			centerTop = (canvas.height/2)+options.series.pie.offset.top;

-			centerLeft = (canvas.width/2);

-			

-			if (options.series.pie.offset.left=='auto')

-				if (options.legend.position.match('w'))

-					centerLeft += legendWidth/2;

-				else

-					centerLeft -= legendWidth/2;

-			else

-				centerLeft += options.series.pie.offset.left;

-					

-			if (centerLeft<maxRadius)

-				centerLeft = maxRadius;

-			else if (centerLeft>canvas.width-maxRadius)

-				centerLeft = canvas.width-maxRadius;

-		}

-		

-		function fixData(data)

-		{

-			for (var i = 0; i < data.length; ++i)

-			{

-				if (typeof(data[i].data)=='number')

-					data[i].data = [[1,data[i].data]];

-				else if (typeof(data[i].data)=='undefined' || typeof(data[i].data[0])=='undefined')

-				{

-					if (typeof(data[i].data)!='undefined' && typeof(data[i].data.label)!='undefined')

-						data[i].label = data[i].data.label; // fix weirdness coming from flot

-					data[i].data = [[1,0]];

-					

-				}

-			}

-			return data;

-		}

-		

-		function combine(data)

-		{

-			data = fixData(data);

-			calcTotal(data);

-			var combined = 0;

-			var numCombined = 0;

-			var color = options.series.pie.combine.color;

-			

-			var newdata = [];

-			for (var i = 0; i < data.length; ++i)

-			{

-				// make sure its a number

-				data[i].data[0][1] = parseFloat(data[i].data[0][1]);

-				if (!data[i].data[0][1])

-					data[i].data[0][1] = 0;

-					

-				if (data[i].data[0][1]/total<=options.series.pie.combine.threshold)

-				{

-					combined += data[i].data[0][1];

-					numCombined++;

-					if (!color)

-						color = data[i].color;

-				}				

-				else

-				{

-					newdata.push({

-						data: [[1,data[i].data[0][1]]], 

-						color: data[i].color, 

-						label: data[i].label,

-						angle: (data[i].data[0][1]*(Math.PI*2))/total,

-						percent: (data[i].data[0][1]/total*100)

-					});

-				}

-			}

-			if (numCombined>0)

-				newdata.push({

-					data: [[1,combined]], 

-					color: color, 

-					label: options.series.pie.combine.label,

-					angle: (combined*(Math.PI*2))/total,

-					percent: (combined/total*100)

-				});

-			return newdata;

-		}		

-		

-		function draw(plot, newCtx)

-		{

-			if (!target) return; // if no series were passed

-			ctx = newCtx;

-		

-			setupPie();

-			var slices = plot.getData();

-		

-			var attempts = 0;

-			while (redraw && attempts<redrawAttempts)

-			{

-				redraw = false;

-				if (attempts>0)

-					maxRadius *= shrink;

-				attempts += 1;

-				clear();

-				if (options.series.pie.tilt<=0.8)

-					drawShadow();

-				drawPie();

-			}

-			if (attempts >= redrawAttempts) {

-				clear();

-				target.prepend('<div class="error">Could not draw pie with labels contained inside canvas</div>');

-			}

-			

-			if ( plot.setSeries && plot.insertLegend )

-			{

-				plot.setSeries(slices);

-				plot.insertLegend();

-			}

-			

-			// we're actually done at this point, just defining internal functions at this point

-			

-			function clear()

-			{

-				ctx.clearRect(0,0,canvas.width,canvas.height);

-				target.children().filter('.pieLabel, .pieLabelBackground').remove();

-			}

-			

-			function drawShadow()

-			{

-				var shadowLeft = 5;

-				var shadowTop = 15;

-				var edge = 10;

-				var alpha = 0.02;

-			

-				// set radius

-				if (options.series.pie.radius>1)

-					var radius = options.series.pie.radius;

-				else

-					var radius = maxRadius * options.series.pie.radius;

-					

-				if (radius>=(canvas.width/2)-shadowLeft || radius*options.series.pie.tilt>=(canvas.height/2)-shadowTop || radius<=edge)

-					return;	// shadow would be outside canvas, so don't draw it

-			

-				ctx.save();

-				ctx.translate(shadowLeft,shadowTop);

-				ctx.globalAlpha = alpha;

-				ctx.fillStyle = '#000';

-

-				// center and rotate to starting position

-				ctx.translate(centerLeft,centerTop);

-				ctx.scale(1, options.series.pie.tilt);

-				

-				//radius -= edge;

-				for (var i=1; i<=edge; i++)

-				{

-					ctx.beginPath();

-					ctx.arc(0,0,radius,0,Math.PI*2,false);

-					ctx.fill();

-					radius -= i;

-				}	

-				

-				ctx.restore();

-			}

-			

-			function drawPie()

-			{

-				startAngle = Math.PI*options.series.pie.startAngle;

-				

-				// set radius

-				if (options.series.pie.radius>1)

-					var radius = options.series.pie.radius;

-				else

-					var radius = maxRadius * options.series.pie.radius;

-				

-				// center and rotate to starting position

-				ctx.save();

-				ctx.translate(centerLeft,centerTop);

-				ctx.scale(1, options.series.pie.tilt);

-				//ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera

-				

-				// draw slices

-				ctx.save();

-				var currentAngle = startAngle;

-				for (var i = 0; i < slices.length; ++i)

-				{

-					slices[i].startAngle = currentAngle;

-					drawSlice(slices[i].angle, slices[i].color, true);

-				}

-				ctx.restore();

-				

-				// draw slice outlines

-				ctx.save();

-				ctx.lineWidth = options.series.pie.stroke.width;

-				currentAngle = startAngle;

-				for (var i = 0; i < slices.length; ++i)

-					drawSlice(slices[i].angle, options.series.pie.stroke.color, false);

-				ctx.restore();

-					

-				// draw donut hole

-				drawDonutHole(ctx);

-				

-				// draw labels

-				if (options.series.pie.label.show)

-					drawLabels();

-				

-				// restore to original state

-				ctx.restore();

-				

-				function drawSlice(angle, color, fill)

-				{	

-					if (angle<=0)

-						return;

-				

-					if (fill)

-						ctx.fillStyle = color;

-					else

-					{

-						ctx.strokeStyle = color;

-						ctx.lineJoin = 'round';

-					}

-						

-					ctx.beginPath();

-					if (Math.abs(angle - Math.PI*2) > 0.000000001)

-						ctx.moveTo(0,0); // Center of the pie

-					else if ($.browser.msie)

-						angle -= 0.0001;

-					//ctx.arc(0,0,radius,0,angle,false); // This doesn't work properly in Opera

-					ctx.arc(0,0,radius,currentAngle,currentAngle+angle,false);

-					ctx.closePath();

-					//ctx.rotate(angle); // This doesn't work properly in Opera

-					currentAngle += angle;

-					

-					if (fill)

-						ctx.fill();

-					else

-						ctx.stroke();

-				}

-				

-				function drawLabels()

-				{

-					var currentAngle = startAngle;

-					

-					// set radius

-					if (options.series.pie.label.radius>1)

-						var radius = options.series.pie.label.radius;

-					else

-						var radius = maxRadius * options.series.pie.label.radius;

-					

-					for (var i = 0; i < slices.length; ++i)

-					{

-						if (slices[i].percent >= options.series.pie.label.threshold*100)

-							drawLabel(slices[i], currentAngle, i);

-						currentAngle += slices[i].angle;

-					}

-					

-					function drawLabel(slice, startAngle, index)

-					{

-						if (slice.data[0][1]==0)

-							return;

-							

-						// format label text

-						var lf = options.legend.labelFormatter, text, plf = options.series.pie.label.formatter;

-						if (lf)

-							text = lf(slice.label, slice);

-						else

-							text = slice.label;

-						if (plf)

-							text = plf(text, slice);

-							

-						var halfAngle = ((startAngle+slice.angle) + startAngle)/2;

-						var x = centerLeft + Math.round(Math.cos(halfAngle) * radius);

-						var y = centerTop + Math.round(Math.sin(halfAngle) * radius) * options.series.pie.tilt;

-						

-						var html = '<span class="pieLabel" id="pieLabel'+index+'" style="position:absolute;top:' + y + 'px;left:' + x + 'px;">' + text + "</span>";

-						target.append(html);

-						var label = target.children('#pieLabel'+index);

-						var labelTop = (y - label.height()/2);

-						var labelLeft = (x - label.width()/2);

-						label.css('top', labelTop);

-						label.css('left', labelLeft);

-						

-						// check to make sure that the label is not outside the canvas

-						if (0-labelTop>0 || 0-labelLeft>0 || canvas.height-(labelTop+label.height())<0 || canvas.width-(labelLeft+label.width())<0)

-							redraw = true;

-						

-						if (options.series.pie.label.background.opacity != 0) {

-							// put in the transparent background separately to avoid blended labels and label boxes

-							var c = options.series.pie.label.background.color;

-							if (c == null) {

-								c = slice.color;

-							}

-							var pos = 'top:'+labelTop+'px;left:'+labelLeft+'px;';

-							$('<div class="pieLabelBackground" style="position:absolute;width:' + label.width() + 'px;height:' + label.height() + 'px;' + pos +'background-color:' + c + ';"> </div>').insertBefore(label).css('opacity', options.series.pie.label.background.opacity);

-						}

-					} // end individual label function

-				} // end drawLabels function

-			} // end drawPie function

-		} // end draw function

-		

-		// Placed here because it needs to be accessed from multiple locations 

-		function drawDonutHole(layer)

-		{

-			// draw donut hole

-			if(options.series.pie.innerRadius > 0)

-			{

-				// subtract the center

-				layer.save();

-				innerRadius = options.series.pie.innerRadius > 1 ? options.series.pie.innerRadius : maxRadius * options.series.pie.innerRadius;

-				layer.globalCompositeOperation = 'destination-out'; // this does not work with excanvas, but it will fall back to using the stroke color

-				layer.beginPath();

-				layer.fillStyle = options.series.pie.stroke.color;

-				layer.arc(0,0,innerRadius,0,Math.PI*2,false);

-				layer.fill();

-				layer.closePath();

-				layer.restore();

-				

-				// add inner stroke

-				layer.save();

-				layer.beginPath();

-				layer.strokeStyle = options.series.pie.stroke.color;

-				layer.arc(0,0,innerRadius,0,Math.PI*2,false);

-				layer.stroke();

-				layer.closePath();

-				layer.restore();

-				// TODO: add extra shadow inside hole (with a mask) if the pie is tilted.

-			}

-		}

-		

-		//-- Additional Interactive related functions --

-		

-		function isPointInPoly(poly, pt)

-		{

-			for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i)

-				((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || (poly[j][1] <= pt[1] && pt[1]< poly[i][1]))

-				&& (pt[0] < (poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0])

-				&& (c = !c);

-			return c;

-		}

-		

-		function findNearbySlice(mouseX, mouseY)

-		{

-			var slices = plot.getData(),

-				options = plot.getOptions(),

-				radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;

-			

-			for (var i = 0; i < slices.length; ++i) 

-			{

-				var s = slices[i];	

-				

-				if(s.pie.show)

-				{

-					ctx.save();

-					ctx.beginPath();

-					ctx.moveTo(0,0); // Center of the pie

-					//ctx.scale(1, options.series.pie.tilt);	// this actually seems to break everything when here.

-					ctx.arc(0,0,radius,s.startAngle,s.startAngle+s.angle,false);

-					ctx.closePath();

-					x = mouseX-centerLeft;

-					y = mouseY-centerTop;

-					if(ctx.isPointInPath)

-					{

-						if (ctx.isPointInPath(mouseX-centerLeft, mouseY-centerTop))

-						{

-							//alert('found slice!');

-							ctx.restore();

-							return {datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i};

-						}

-					}

-					else

-					{

-						// excanvas for IE doesn;t support isPointInPath, this is a workaround. 

-						p1X = (radius * Math.cos(s.startAngle));

-						p1Y = (radius * Math.sin(s.startAngle));

-						p2X = (radius * Math.cos(s.startAngle+(s.angle/4)));

-						p2Y = (radius * Math.sin(s.startAngle+(s.angle/4)));

-						p3X = (radius * Math.cos(s.startAngle+(s.angle/2)));

-						p3Y = (radius * Math.sin(s.startAngle+(s.angle/2)));

-						p4X = (radius * Math.cos(s.startAngle+(s.angle/1.5)));

-						p4Y = (radius * Math.sin(s.startAngle+(s.angle/1.5)));

-						p5X = (radius * Math.cos(s.startAngle+s.angle));

-						p5Y = (radius * Math.sin(s.startAngle+s.angle));

-						arrPoly = [[0,0],[p1X,p1Y],[p2X,p2Y],[p3X,p3Y],[p4X,p4Y],[p5X,p5Y]];

-						arrPoint = [x,y];

-						// TODO: perhaps do some mathmatical trickery here with the Y-coordinate to compensate for pie tilt?

-						if(isPointInPoly(arrPoly, arrPoint))

-						{

-							ctx.restore();

-							return {datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i};

-						}			

-					}

-					ctx.restore();

-				}

-			}

-			

-			return null;

-		}

-

-		function onMouseMove(e) 

-		{

-			triggerClickHoverEvent('plothover', e);

-		}

-		

-        function onClick(e) 

-		{

-			triggerClickHoverEvent('plotclick', e);

-        }

-

-		// trigger click or hover event (they send the same parameters so we share their code)

-		function triggerClickHoverEvent(eventname, e) 

-		{

-			var offset = plot.offset(),

-				canvasX = parseInt(e.pageX - offset.left),

-				canvasY =  parseInt(e.pageY - offset.top),

-				item = findNearbySlice(canvasX, canvasY);

-			

-			if (options.grid.autoHighlight) 

-			{

-				// clear auto-highlights

-				for (var i = 0; i < highlights.length; ++i) 

-				{

-					var h = highlights[i];

-					if (h.auto == eventname && !(item && h.series == item.series))

-						unhighlight(h.series);

-				}

-			}

-			

-			// highlight the slice

-			if (item) 

-			    highlight(item.series, eventname);

-				

-			// trigger any hover bind events

-			var pos = { pageX: e.pageX, pageY: e.pageY };

-			target.trigger(eventname, [ pos, item ]);	

-		}

-

-		function highlight(s, auto) 

-		{

-			if (typeof s == "number")

-				s = series[s];

-

-			var i = indexOfHighlight(s);

-			if (i == -1) 

-			{

-				highlights.push({ series: s, auto: auto });

-				plot.triggerRedrawOverlay();

-			}

-			else if (!auto)

-				highlights[i].auto = false;

-		}

-

-		function unhighlight(s) 

-		{

-			if (s == null) 

-			{

-				highlights = [];

-				plot.triggerRedrawOverlay();

-			}

-			

-			if (typeof s == "number")

-				s = series[s];

-

-			var i = indexOfHighlight(s);

-			if (i != -1) 

-			{

-				highlights.splice(i, 1);

-				plot.triggerRedrawOverlay();

-			}

-		}

-

-		function indexOfHighlight(s) 

-		{

-			for (var i = 0; i < highlights.length; ++i) 

-			{

-				var h = highlights[i];

-				if (h.series == s)

-					return i;

-			}

-			return -1;

-		}

-

-		function drawOverlay(plot, octx) 

-		{

-			//alert(options.series.pie.radius);

-			var options = plot.getOptions();

-			//alert(options.series.pie.radius);

-			

-			var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius;

-

-			octx.save();

-			octx.translate(centerLeft, centerTop);

-			octx.scale(1, options.series.pie.tilt);

-			

-			for (i = 0; i < highlights.length; ++i) 

-				drawHighlight(highlights[i].series);

-			

-			drawDonutHole(octx);

-

-			octx.restore();

-

-			function drawHighlight(series) 

-			{

-				if (series.angle < 0) return;

-				

-				//octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString();

-				octx.fillStyle = "rgba(255, 255, 255, "+options.series.pie.highlight.opacity+")"; // this is temporary until we have access to parseColor

-				

-				octx.beginPath();

-				if (Math.abs(series.angle - Math.PI*2) > 0.000000001)

-					octx.moveTo(0,0); // Center of the pie

-				octx.arc(0,0,radius,series.startAngle,series.startAngle+series.angle,false);

-				octx.closePath();

-				octx.fill();

-			}

-			

-		}	

-		

-	} // end init (plugin body)

-	

-	// define pie specific options and their default values

-	var options = {

-		series: {

-			pie: {

-				show: false,

-				radius: 'auto',	// actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value)

-				innerRadius:0, /* for donut */

-				startAngle: 3/2,

-				tilt: 1,

-				offset: {

-					top: 0,

-					left: 'auto'

-				},

-				stroke: {

-					color: '#FFF',

-					width: 1

-				},

-				label: {

-					show: 'auto',

-					formatter: function(label, slice){

-						return '<div style="font-size:x-small;text-align:center;padding:2px;color:'+slice.color+';">'+label+'<br/>'+Math.round(slice.percent)+'%</div>';

-					},	// formatter function

-					radius: 1,	// radius at which to place the labels (based on full calculated radius if <=1, or hard pixel value)

-					background: {

-						color: null,

-						opacity: 0

-					},

-					threshold: 0	// percentage at which to hide the label (i.e. the slice is too narrow)

-				},

-				combine: {

-					threshold: -1,	// percentage at which to combine little slices into one larger slice

-					color: null,	// color to give the new slice (auto-generated if null)

-					label: 'Other'	// label to give the new slice

-				},

-				highlight: {

-					//color: '#FFF',		// will add this functionality once parseColor is available

-					opacity: 0.5

-				}

-			}

-		}

-	};

-    

-	$.plot.plugins.push({

-		init: init,

-		options: options,

-		name: "pie",

-		version: "1.0"

-	});

-})(jQuery);

 

--- a/js/flot/jquery.flot.pie.min.js
+++ /dev/null
@@ -1,1 +1,1 @@
-(function(b){function c(D){var h=null;var L=null;var n=null;var B=null;var p=null;var M=0;var F=true;var o=10;var w=0.95;var A=0;var d=false;var z=false;var j=[];D.hooks.processOptions.push(g);D.hooks.bindEvents.push(e);function g(O,N){if(N.series.pie.show){N.grid.show=false;if(N.series.pie.label.show=="auto"){if(N.legend.show){N.series.pie.label.show=false}else{N.series.pie.label.show=true}}if(N.series.pie.radius=="auto"){if(N.series.pie.label.show){N.series.pie.radius=3/4}else{N.series.pie.radius=1}}if(N.series.pie.tilt>1){N.series.pie.tilt=1}if(N.series.pie.tilt<0){N.series.pie.tilt=0}O.hooks.processDatapoints.push(E);O.hooks.drawOverlay.push(H);O.hooks.draw.push(r)}}function e(P,N){var O=P.getOptions();if(O.series.pie.show&&O.grid.hoverable){N.unbind("mousemove").mousemove(t)}if(O.series.pie.show&&O.grid.clickable){N.unbind("click").click(l)}}function G(O){var P="";function N(S,T){if(!T){T=0}for(var R=0;R<S.length;++R){for(var Q=0;Q<T;Q++){P+="\t"}if(typeof S[R]=="object"){P+=""+R+":\n";N(S[R],T+1)}else{P+=""+R+": "+S[R]+"\n"}}}N(O);alert(P)}function q(P){for(var N=0;N<P.length;++N){var O=parseFloat(P[N].data[0][1]);if(O){M+=O}}}function E(Q,N,O,P){if(!d){d=true;h=Q.getCanvas();L=b(h).parent();a=Q.getOptions();Q.setData(K(Q.getData()))}}function I(){A=L.children().filter(".legend").children().width();n=Math.min(h.width,(h.height/a.series.pie.tilt))/2;p=(h.height/2)+a.series.pie.offset.top;B=(h.width/2);if(a.series.pie.offset.left=="auto"){if(a.legend.position.match("w")){B+=A/2}else{B-=A/2}}else{B+=a.series.pie.offset.left}if(B<n){B=n}else{if(B>h.width-n){B=h.width-n}}}function v(O){for(var N=0;N<O.length;++N){if(typeof(O[N].data)=="number"){O[N].data=[[1,O[N].data]]}else{if(typeof(O[N].data)=="undefined"||typeof(O[N].data[0])=="undefined"){if(typeof(O[N].data)!="undefined"&&typeof(O[N].data.label)!="undefined"){O[N].label=O[N].data.label}O[N].data=[[1,0]]}}}return O}function K(Q){Q=v(Q);q(Q);var P=0;var S=0;var N=a.series.pie.combine.color;var R=[];for(var O=0;O<Q.length;++O){Q[O].data[0][1]=parseFloat(Q[O].data[0][1]);if(!Q[O].data[0][1]){Q[O].data[0][1]=0}if(Q[O].data[0][1]/M<=a.series.pie.combine.threshold){P+=Q[O].data[0][1];S++;if(!N){N=Q[O].color}}else{R.push({data:[[1,Q[O].data[0][1]]],color:Q[O].color,label:Q[O].label,angle:(Q[O].data[0][1]*(Math.PI*2))/M,percent:(Q[O].data[0][1]/M*100)})}}if(S>0){R.push({data:[[1,P]],color:N,label:a.series.pie.combine.label,angle:(P*(Math.PI*2))/M,percent:(P/M*100)})}return R}function r(S,Q){if(!L){return}ctx=Q;I();var T=S.getData();var P=0;while(F&&P<o){F=false;if(P>0){n*=w}P+=1;N();if(a.series.pie.tilt<=0.8){O()}R()}if(P>=o){N();L.prepend('<div class="error">Could not draw pie with labels contained inside canvas</div>')}if(S.setSeries&&S.insertLegend){S.setSeries(T);S.insertLegend()}function N(){ctx.clearRect(0,0,h.width,h.height);L.children().filter(".pieLabel, .pieLabelBackground").remove()}function O(){var Z=5;var Y=15;var W=10;var X=0.02;if(a.series.pie.radius>1){var U=a.series.pie.radius}else{var U=n*a.series.pie.radius}if(U>=(h.width/2)-Z||U*a.series.pie.tilt>=(h.height/2)-Y||U<=W){return}ctx.save();ctx.translate(Z,Y);ctx.globalAlpha=X;ctx.fillStyle="#000";ctx.translate(B,p);ctx.scale(1,a.series.pie.tilt);for(var V=1;V<=W;V++){ctx.beginPath();ctx.arc(0,0,U,0,Math.PI*2,false);ctx.fill();U-=V}ctx.restore()}function R(){startAngle=Math.PI*a.series.pie.startAngle;if(a.series.pie.radius>1){var U=a.series.pie.radius}else{var U=n*a.series.pie.radius}ctx.save();ctx.translate(B,p);ctx.scale(1,a.series.pie.tilt);ctx.save();var Y=startAngle;for(var W=0;W<T.length;++W){T[W].startAngle=Y;X(T[W].angle,T[W].color,true)}ctx.restore();ctx.save();ctx.lineWidth=a.series.pie.stroke.width;Y=startAngle;for(var W=0;W<T.length;++W){X(T[W].angle,a.series.pie.stroke.color,false)}ctx.restore();J(ctx);if(a.series.pie.label.show){V()}ctx.restore();function X(ab,Z,aa){if(ab<=0){return}if(aa){ctx.fillStyle=Z}else{ctx.strokeStyle=Z;ctx.lineJoin="round"}ctx.beginPath();if(Math.abs(ab-Math.PI*2)>1e-9){ctx.moveTo(0,0)}else{if(b.browser.msie){ab-=0.0001}}ctx.arc(0,0,U,Y,Y+ab,false);ctx.closePath();Y+=ab;if(aa){ctx.fill()}else{ctx.stroke()}}function V(){var ac=startAngle;if(a.series.pie.label.radius>1){var Z=a.series.pie.label.radius}else{var Z=n*a.series.pie.label.radius}for(var ab=0;ab<T.length;++ab){if(T[ab].percent>=a.series.pie.label.threshold*100){aa(T[ab],ac,ab)}ac+=T[ab].angle}function aa(ap,ai,ag){if(ap.data[0][1]==0){return}var ar=a.legend.labelFormatter,aq,ae=a.series.pie.label.formatter;if(ar){aq=ar(ap.label,ap)}else{aq=ap.label}if(ae){aq=ae(aq,ap)}var aj=((ai+ap.angle)+ai)/2;var ao=B+Math.round(Math.cos(aj)*Z);var am=p+Math.round(Math.sin(aj)*Z)*a.series.pie.tilt;var af='<span class="pieLabel" id="pieLabel'+ag+'" style="position:absolute;top:'+am+"px;left:"+ao+'px;">'+aq+"</span>";L.append(af);var an=L.children("#pieLabel"+ag);var ad=(am-an.height()/2);var ah=(ao-an.width()/2);an.css("top",ad);an.css("left",ah);if(0-ad>0||0-ah>0||h.height-(ad+an.height())<0||h.width-(ah+an.width())<0){F=true}if(a.series.pie.label.background.opacity!=0){var ak=a.series.pie.label.background.color;if(ak==null){ak=ap.color}var al="top:"+ad+"px;left:"+ah+"px;";b('<div class="pieLabelBackground" style="position:absolute;width:'+an.width()+"px;height:"+an.height()+"px;"+al+"background-color:"+ak+';"> </div>').insertBefore(an).css("opacity",a.series.pie.label.background.opacity)}}}}}function J(N){if(a.series.pie.innerRadius>0){N.save();innerRadius=a.series.pie.innerRadius>1?a.series.pie.innerRadius:n*a.series.pie.innerRadius;N.globalCompositeOperation="destination-out";N.beginPath();N.fillStyle=a.series.pie.stroke.color;N.arc(0,0,innerRadius,0,Math.PI*2,false);N.fill();N.closePath();N.restore();N.save();N.beginPath();N.strokeStyle=a.series.pie.stroke.color;N.arc(0,0,innerRadius,0,Math.PI*2,false);N.stroke();N.closePath();N.restore()}}function s(Q,R){for(var S=false,P=-1,N=Q.length,O=N-1;++P<N;O=P){((Q[P][1]<=R[1]&&R[1]<Q[O][1])||(Q[O][1]<=R[1]&&R[1]<Q[P][1]))&&(R[0]<(Q[O][0]-Q[P][0])*(R[1]-Q[P][1])/(Q[O][1]-Q[P][1])+Q[P][0])&&(S=!S)}return S}function u(R,P){var T=D.getData(),O=D.getOptions(),N=O.series.pie.radius>1?O.series.pie.radius:n*O.series.pie.radius;for(var Q=0;Q<T.length;++Q){var S=T[Q];if(S.pie.show){ctx.save();ctx.beginPath();ctx.moveTo(0,0);ctx.arc(0,0,N,S.startAngle,S.startAngle+S.angle,false);ctx.closePath();x=R-B;y=P-p;if(ctx.isPointInPath){if(ctx.isPointInPath(R-B,P-p)){ctx.restore();return{datapoint:[S.percent,S.data],dataIndex:0,series:S,seriesIndex:Q}}}else{p1X=(N*Math.cos(S.startAngle));p1Y=(N*Math.sin(S.startAngle));p2X=(N*Math.cos(S.startAngle+(S.angle/4)));p2Y=(N*Math.sin(S.startAngle+(S.angle/4)));p3X=(N*Math.cos(S.startAngle+(S.angle/2)));p3Y=(N*Math.sin(S.startAngle+(S.angle/2)));p4X=(N*Math.cos(S.startAngle+(S.angle/1.5)));p4Y=(N*Math.sin(S.startAngle+(S.angle/1.5)));p5X=(N*Math.cos(S.startAngle+S.angle));p5Y=(N*Math.sin(S.startAngle+S.angle));arrPoly=[[0,0],[p1X,p1Y],[p2X,p2Y],[p3X,p3Y],[p4X,p4Y],[p5X,p5Y]];arrPoint=[x,y];if(s(arrPoly,arrPoint)){ctx.restore();return{datapoint:[S.percent,S.data],dataIndex:0,series:S,seriesIndex:Q}}}ctx.restore()}}return null}function t(N){m("plothover",N)}function l(N){m("plotclick",N)}function m(N,T){var O=D.offset(),R=parseInt(T.pageX-O.left),P=parseInt(T.pageY-O.top),V=u(R,P);if(a.grid.autoHighlight){for(var Q=0;Q<j.length;++Q){var S=j[Q];if(S.auto==N&&!(V&&S.series==V.series)){f(S.series)}}}if(V){k(V.series,N)}var U={pageX:T.pageX,pageY:T.pageY};L.trigger(N,[U,V])}function k(O,P){if(typeof O=="number"){O=series[O]}var N=C(O);if(N==-1){j.push({series:O,auto:P});D.triggerRedrawOverlay()}else{if(!P){j[N].auto=false}}}function f(O){if(O==null){j=[];D.triggerRedrawOverlay()}if(typeof O=="number"){O=series[O]}var N=C(O);if(N!=-1){j.splice(N,1);D.triggerRedrawOverlay()}}function C(P){for(var N=0;N<j.length;++N){var O=j[N];if(O.series==P){return N}}return -1}function H(Q,R){var P=Q.getOptions();var N=P.series.pie.radius>1?P.series.pie.radius:n*P.series.pie.radius;R.save();R.translate(B,p);R.scale(1,P.series.pie.tilt);for(i=0;i<j.length;++i){O(j[i].series)}J(R);R.restore();function O(S){if(S.angle<0){return}R.fillStyle="rgba(255, 255, 255, "+P.series.pie.highlight.opacity+")";R.beginPath();if(Math.abs(S.angle-Math.PI*2)>1e-9){R.moveTo(0,0)}R.arc(0,0,N,S.startAngle,S.startAngle+S.angle,false);R.closePath();R.fill()}}}var a={series:{pie:{show:false,radius:"auto",innerRadius:0,startAngle:3/2,tilt:1,offset:{top:0,left:"auto"},stroke:{color:"#FFF",width:1},label:{show:"auto",formatter:function(d,e){return'<div style="font-size:x-small;text-align:center;padding:2px;color:'+e.color+';">'+d+"<br/>"+Math.round(e.percent)+"%</div>"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:0.5}}}};b.plot.plugins.push({init:c,options:a,name:"pie",version:"1.0"})})(jQuery);
+

--- a/js/flot/jquery.flot.resize.js
+++ /dev/null
@@ -1,61 +1,1 @@
-/*
-Flot plugin for automatically redrawing plots when the placeholder
-size changes, e.g. on window resizes.
 
-It works by listening for changes on the placeholder div (through the
-jQuery resize event plugin) - if the size changes, it will redraw the
-plot.
-
-There are no options. If you need to disable the plugin for some
-plots, you can just fix the size of their placeholders.
-*/
-
-
-/* Inline dependency: 
- * jQuery resize event - v1.1 - 3/14/2010
- * http://benalman.com/projects/jquery-resize-plugin/
- * 
- * Copyright (c) 2010 "Cowboy" Ben Alman
- * Dual licensed under the MIT and GPL licenses.
- * http://benalman.com/about/license/
- */
-(function($,h,c){var a=$([]),e=$.resize=$.extend($.resize,{}),i,k="setTimeout",j="resize",d=j+"-special-event",b="delay",f="throttleWindow";e[b]=250;e[f]=true;$.event.special[j]={setup:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.add(l);$.data(this,d,{w:l.width(),h:l.height()});if(a.length===1){g()}},teardown:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.not(l);l.removeData(d);if(!a.length){clearTimeout(i)}},add:function(l){if(!e[f]&&this[k]){return false}var n;function m(s,o,p){var q=$(this),r=$.data(this,d);r.w=o!==c?o:q.width();r.h=p!==c?p:q.height();n.apply(this,arguments)}if($.isFunction(l)){n=l;return m}else{n=l.handler;l.handler=m}}};function g(){i=h[k](function(){a.each(function(){var n=$(this),m=n.width(),l=n.height(),o=$.data(this,d);if(m!==o.w||l!==o.h){n.trigger(j,[o.w=m,o.h=l])}});g()},e[b])}})(jQuery,this);
-
-
-(function ($) {
-    var options = { }; // no options
-
-    function init(plot) {
-        function onResize() {
-            var placeholder = plot.getPlaceholder();
-
-            // somebody might have hidden us and we can't plot
-            // when we don't have the dimensions
-            if (placeholder.width() == 0 || placeholder.height() == 0)
-                return;
-
-            plot.resize();
-            plot.setupGrid();
-            plot.draw();
-        }
-        
-        function bindEvents(plot, eventHolder) {
-            plot.getPlaceholder().resize(onResize);
-        }
-
-        function shutdown(plot, eventHolder) {
-            plot.getPlaceholder().unbind("resize", onResize);
-        }
-        
-        plot.hooks.bindEvents.push(bindEvents);
-        plot.hooks.shutdown.push(shutdown);
-    }
-    
-    $.plot.plugins.push({
-        init: init,
-        options: options,
-        name: 'resize',
-        version: '1.0'
-    });
-})(jQuery);
-

--- a/js/flot/jquery.flot.resize.min.js
+++ /dev/null
@@ -1,1 +1,1 @@
-(function(n,p,u){var w=n([]),s=n.resize=n.extend(n.resize,{}),o,l="setTimeout",m="resize",t=m+"-special-event",v="delay",r="throttleWindow";s[v]=250;s[r]=true;n.event.special[m]={setup:function(){if(!s[r]&&this[l]){return false}var a=n(this);w=w.add(a);n.data(this,t,{w:a.width(),h:a.height()});if(w.length===1){q()}},teardown:function(){if(!s[r]&&this[l]){return false}var a=n(this);w=w.not(a);a.removeData(t);if(!w.length){clearTimeout(o)}},add:function(b){if(!s[r]&&this[l]){return false}var c;function a(d,h,g){var f=n(this),e=n.data(this,t);e.w=h!==u?h:f.width();e.h=g!==u?g:f.height();c.apply(this,arguments)}if(n.isFunction(b)){c=b;return a}else{c=b.handler;b.handler=a}}};function q(){o=p[l](function(){w.each(function(){var d=n(this),a=d.width(),b=d.height(),c=n.data(this,t);if(a!==c.w||b!==c.h){d.trigger(m,[c.w=a,c.h=b])}});q()},s[v])}})(jQuery,this);(function(b){var a={};function c(f){function e(){var h=f.getPlaceholder();if(h.width()==0||h.height()==0){return}f.resize();f.setupGrid();f.draw()}function g(i,h){i.getPlaceholder().resize(e)}function d(i,h){i.getPlaceholder().unbind("resize",e)}f.hooks.bindEvents.push(g);f.hooks.shutdown.push(d)}b.plot.plugins.push({init:c,options:a,name:"resize",version:"1.0"})})(jQuery);
+

--- a/js/flot/jquery.flot.selection.js
+++ /dev/null
@@ -1,345 +1,1 @@
-/*
-Flot plugin for selecting regions.
 
-The plugin defines the following options:
-
-  selection: {
-    mode: null or "x" or "y" or "xy",
-    color: color
-  }
-
-Selection support is enabled by setting the mode to one of "x", "y" or
-"xy". In "x" mode, the user will only be able to specify the x range,
-similarly for "y" mode. For "xy", the selection becomes a rectangle
-where both ranges can be specified. "color" is color of the selection
-(if you need to change the color later on, you can get to it with
-plot.getOptions().selection.color).
-
-When selection support is enabled, a "plotselected" event will be
-emitted on the DOM element you passed into the plot function. The
-event handler gets a parameter with the ranges selected on the axes,
-like this:
-
-  placeholder.bind("plotselected", function(event, ranges) {
-    alert("You selected " + ranges.xaxis.from + " to " + ranges.xaxis.to)
-    // similar for yaxis - with multiple axes, the extra ones are in
-    // x2axis, x3axis, ...
-  });
-
-The "plotselected" event is only fired when the user has finished
-making the selection. A "plotselecting" event is fired during the
-process with the same parameters as the "plotselected" event, in case
-you want to know what's happening while it's happening,
-
-A "plotunselected" event with no arguments is emitted when the user
-clicks the mouse to remove the selection.
-
-The plugin allso adds the following methods to the plot object:
-
-- setSelection(ranges, preventEvent)
-
-  Set the selection rectangle. The passed in ranges is on the same
-  form as returned in the "plotselected" event. If the selection mode
-  is "x", you should put in either an xaxis range, if the mode is "y"
-  you need to put in an yaxis range and both xaxis and yaxis if the
-  selection mode is "xy", like this:
-
-    setSelection({ xaxis: { from: 0, to: 10 }, yaxis: { from: 40, to: 60 } });
-
-  setSelection will trigger the "plotselected" event when called. If
-  you don't want that to happen, e.g. if you're inside a
-  "plotselected" handler, pass true as the second parameter. If you
-  are using multiple axes, you can specify the ranges on any of those,
-  e.g. as x2axis/x3axis/... instead of xaxis, the plugin picks the
-  first one it sees.
-  
-- clearSelection(preventEvent)
-
-  Clear the selection rectangle. Pass in true to avoid getting a
-  "plotunselected" event.
-
-- getSelection()
-
-  Returns the current selection in the same format as the
-  "plotselected" event. If there's currently no selection, the
-  function returns null.
-
-*/
-
-(function ($) {
-    function init(plot) {
-        var selection = {
-                first: { x: -1, y: -1}, second: { x: -1, y: -1},
-                show: false,
-                active: false
-            };
-
-        // FIXME: The drag handling implemented here should be
-        // abstracted out, there's some similar code from a library in
-        // the navigation plugin, this should be massaged a bit to fit
-        // the Flot cases here better and reused. Doing this would
-        // make this plugin much slimmer.
-        var savedhandlers = {};
-
-        var mouseUpHandler = null;
-        
-        function onMouseMove(e) {
-            if (selection.active) {
-                updateSelection(e);
-                
-                plot.getPlaceholder().trigger("plotselecting", [ getSelection() ]);
-            }
-        }
-
-        function onMouseDown(e) {
-            if (e.which != 1)  // only accept left-click
-                return;
-            
-            // cancel out any text selections
-            document.body.focus();
-
-            // prevent text selection and drag in old-school browsers
-            if (document.onselectstart !== undefined && savedhandlers.onselectstart == null) {
-                savedhandlers.onselectstart = document.onselectstart;
-                document.onselectstart = function () { return false; };
-            }
-            if (document.ondrag !== undefined && savedhandlers.ondrag == null) {
-                savedhandlers.ondrag = document.ondrag;
-                document.ondrag = function () { return false; };
-            }
-
-            setSelectionPos(selection.first, e);
-
-            selection.active = true;
-
-            // this is a bit silly, but we have to use a closure to be
-            // able to whack the same handler again
-            mouseUpHandler = function (e) { onMouseUp(e); };
-            
-            $(document).one("mouseup", mouseUpHandler);
-        }
-
-        function onMouseUp(e) {
-            mouseUpHandler = null;
-            
-            // revert drag stuff for old-school browsers
-            if (document.onselectstart !== undefined)
-                document.onselectstart = savedhandlers.onselectstart;
-            if (document.ondrag !== undefined)
-                document.ondrag = savedhandlers.ondrag;
-
-            // no more dragging
-            selection.active = false;
-            updateSelection(e);
-
-            if (selectionIsSane())
-                triggerSelectedEvent();
-            else {
-                // this counts as a clear
-                plot.getPlaceholder().trigger("plotunselected", [ ]);
-                plot.getPlaceholder().trigger("plotselecting", [ null ]);
-            }
-
-            return false;
-        }
-
-        function getSelection() {
-            if (!selectionIsSane())
-                return null;
-
-            var r = {}, c1 = selection.first, c2 = selection.second;
-            $.each(plot.getAxes(), function (name, axis) {
-                if (axis.used) {
-                    var p1 = axis.c2p(c1[axis.direction]), p2 = axis.c2p(c2[axis.direction]); 
-                    r[name] = { from: Math.min(p1, p2), to: Math.max(p1, p2) };
-                }
-            });
-            return r;
-        }
-
-        function triggerSelectedEvent() {
-            var r = getSelection();
-
-            plot.getPlaceholder().trigger("plotselected", [ r ]);
-
-            // backwards-compat stuff, to be removed in future
-            if (r.xaxis && r.yaxis)
-                plot.getPlaceholder().trigger("selected", [ { x1: r.xaxis.from, y1: r.yaxis.from, x2: r.xaxis.to, y2: r.yaxis.to } ]);
-        }
-
-        function clamp(min, value, max) {
-            return value < min ? min: (value > max ? max: value);
-        }
-
-        function setSelectionPos(pos, e) {
-            var o = plot.getOptions();
-            var offset = plot.getPlaceholder().offset();
-            var plotOffset = plot.getPlotOffset();
-            pos.x = clamp(0, e.pageX - offset.left - plotOffset.left, plot.width());
-            pos.y = clamp(0, e.pageY - offset.top - plotOffset.top, plot.height());
-
-            if (o.selection.mode == "y")
-                pos.x = pos == selection.first ? 0 : plot.width();
-
-            if (o.selection.mode == "x")
-                pos.y = pos == selection.first ? 0 : plot.height();
-        }
-
-        function updateSelection(pos) {
-            if (pos.pageX == null)
-                return;
-
-            setSelectionPos(selection.second, pos);
-            if (selectionIsSane()) {
-                selection.show = true;
-                plot.triggerRedrawOverlay();
-            }
-            else
-                clearSelection(true);
-        }
-
-        function clearSelection(preventEvent) {
-            if (selection.show) {
-                selection.show = false;
-                plot.triggerRedrawOverlay();
-                if (!preventEvent)
-                    plot.getPlaceholder().trigger("plotunselected", [ ]);
-            }
-        }
-
-        // function taken from markings support in Flot
-        function extractRange(ranges, coord) {
-            var axis, from, to, key, axes = plot.getAxes();
-
-            for (var k in axes) {
-                axis = axes[k];
-                if (axis.direction == coord) {
-                    key = coord + axis.n + "axis";
-                    if (!ranges[key] && axis.n == 1)
-                        key = coord + "axis"; // support x1axis as xaxis
-                    if (ranges[key]) {
-                        from = ranges[key].from;
-                        to = ranges[key].to;
-                        break;
-                    }
-                }
-            }
-
-            // backwards-compat stuff - to be removed in future
-            if (!ranges[key]) {
-                axis = coord == "x" ? plot.getXAxes()[0] : plot.getYAxes()[0];
-                from = ranges[coord + "1"];
-                to = ranges[coord + "2"];
-            }
-
-            // auto-reverse as an added bonus
-            if (from != null && to != null && from > to) {
-                var tmp = from;
-                from = to;
-                to = tmp;
-            }
-            
-            return { from: from, to: to, axis: axis };
-        }
-        
-        function setSelection(ranges, preventEvent) {
-            var axis, range, o = plot.getOptions();
-
-            if (o.selection.mode == "y") {
-                selection.first.x = 0;
-                selection.second.x = plot.width();
-            }
-            else {
-                range = extractRange(ranges, "x");
-
-                selection.first.x = range.axis.p2c(range.from);
-                selection.second.x = range.axis.p2c(range.to);
-            }
-
-            if (o.selection.mode == "x") {
-                selection.first.y = 0;
-                selection.second.y = plot.height();
-            }
-            else {
-                range = extractRange(ranges, "y");
-
-                selection.first.y = range.axis.p2c(range.from);
-                selection.second.y = range.axis.p2c(range.to);
-            }
-
-            selection.show = true;
-            plot.triggerRedrawOverlay();
-            if (!preventEvent && selectionIsSane())
-                triggerSelectedEvent();
-        }
-
-        function selectionIsSane() {
-            var minSize = 5;
-            return Math.abs(selection.second.x - selection.first.x) >= minSize &&
-                Math.abs(selection.second.y - selection.first.y) >= minSize;
-        }
-
-        plot.clearSelection = clearSelection;
-        plot.setSelection = setSelection;
-        plot.getSelection = getSelection;
-
-        plot.hooks.bindEvents.push(function(plot, eventHolder) {
-            var o = plot.getOptions();
-            if (o.selection.mode != null) {
-                eventHolder.mousemove(onMouseMove);
-                eventHolder.mousedown(onMouseDown);
-            }
-        });
-
-
-        plot.hooks.drawOverlay.push(function (plot, ctx) {
-            // draw selection
-            if (selection.show && selectionIsSane()) {
-                var plotOffset = plot.getPlotOffset();
-                var o = plot.getOptions();
-
-                ctx.save();
-                ctx.translate(plotOffset.left, plotOffset.top);
-
-                var c = $.color.parse(o.selection.color);
-
-                ctx.strokeStyle = c.scale('a', 0.8).toString();
-                ctx.lineWidth = 1;
-                ctx.lineJoin = "round";
-                ctx.fillStyle = c.scale('a', 0.4).toString();
-
-                var x = Math.min(selection.first.x, selection.second.x),
-                    y = Math.min(selection.first.y, selection.second.y),
-                    w = Math.abs(selection.second.x - selection.first.x),
-                    h = Math.abs(selection.second.y - selection.first.y);
-
-                ctx.fillRect(x, y, w, h);
-                ctx.strokeRect(x, y, w, h);
-
-                ctx.restore();
-            }
-        });
-        
-        plot.hooks.shutdown.push(function (plot, eventHolder) {
-            eventHolder.unbind("mousemove", onMouseMove);
-            eventHolder.unbind("mousedown", onMouseDown);
-            
-            if (mouseUpHandler)
-                $(document).unbind("mouseup", mouseUpHandler);
-        });
-
-    }
-
-    $.plot.plugins.push({
-        init: init,
-        options: {
-            selection: {
-                mode: null, // one of null, "x", "y" or "xy"
-                color: "#e8cfac"
-            }
-        },
-        name: 'selection',
-        version: '1.1'
-    });
-})(jQuery);
-

--- a/js/flot/jquery.flot.selection.min.js
+++ /dev/null
@@ -1,1 +1,1 @@
-(function(a){function b(k){var p={first:{x:-1,y:-1},second:{x:-1,y:-1},show:false,active:false};var m={};var r=null;function e(s){if(p.active){l(s);k.getPlaceholder().trigger("plotselecting",[g()])}}function n(s){if(s.which!=1){return}document.body.focus();if(document.onselectstart!==undefined&&m.onselectstart==null){m.onselectstart=document.onselectstart;document.onselectstart=function(){return false}}if(document.ondrag!==undefined&&m.ondrag==null){m.ondrag=document.ondrag;document.ondrag=function(){return false}}d(p.first,s);p.active=true;r=function(t){j(t)};a(document).one("mouseup",r)}function j(s){r=null;if(document.onselectstart!==undefined){document.onselectstart=m.onselectstart}if(document.ondrag!==undefined){document.ondrag=m.ondrag}p.active=false;l(s);if(f()){i()}else{k.getPlaceholder().trigger("plotunselected",[]);k.getPlaceholder().trigger("plotselecting",[null])}return false}function g(){if(!f()){return null}var u={},t=p.first,s=p.second;a.each(k.getAxes(),function(v,w){if(w.used){var y=w.c2p(t[w.direction]),x=w.c2p(s[w.direction]);u[v]={from:Math.min(y,x),to:Math.max(y,x)}}});return u}function i(){var s=g();k.getPlaceholder().trigger("plotselected",[s]);if(s.xaxis&&s.yaxis){k.getPlaceholder().trigger("selected",[{x1:s.xaxis.from,y1:s.yaxis.from,x2:s.xaxis.to,y2:s.yaxis.to}])}}function h(t,u,s){return u<t?t:(u>s?s:u)}function d(w,t){var v=k.getOptions();var u=k.getPlaceholder().offset();var s=k.getPlotOffset();w.x=h(0,t.pageX-u.left-s.left,k.width());w.y=h(0,t.pageY-u.top-s.top,k.height());if(v.selection.mode=="y"){w.x=w==p.first?0:k.width()}if(v.selection.mode=="x"){w.y=w==p.first?0:k.height()}}function l(s){if(s.pageX==null){return}d(p.second,s);if(f()){p.show=true;k.triggerRedrawOverlay()}else{q(true)}}function q(s){if(p.show){p.show=false;k.triggerRedrawOverlay();if(!s){k.getPlaceholder().trigger("plotunselected",[])}}}function c(s,w){var t,y,z,A,x=k.getAxes();for(var u in x){t=x[u];if(t.direction==w){A=w+t.n+"axis";if(!s[A]&&t.n==1){A=w+"axis"}if(s[A]){y=s[A].from;z=s[A].to;break}}}if(!s[A]){t=w=="x"?k.getXAxes()[0]:k.getYAxes()[0];y=s[w+"1"];z=s[w+"2"]}if(y!=null&&z!=null&&y>z){var v=y;y=z;z=v}return{from:y,to:z,axis:t}}function o(t,s){var v,u,w=k.getOptions();if(w.selection.mode=="y"){p.first.x=0;p.second.x=k.width()}else{u=c(t,"x");p.first.x=u.axis.p2c(u.from);p.second.x=u.axis.p2c(u.to)}if(w.selection.mode=="x"){p.first.y=0;p.second.y=k.height()}else{u=c(t,"y");p.first.y=u.axis.p2c(u.from);p.second.y=u.axis.p2c(u.to)}p.show=true;k.triggerRedrawOverlay();if(!s&&f()){i()}}function f(){var s=5;return Math.abs(p.second.x-p.first.x)>=s&&Math.abs(p.second.y-p.first.y)>=s}k.clearSelection=q;k.setSelection=o;k.getSelection=g;k.hooks.bindEvents.push(function(t,s){var u=t.getOptions();if(u.selection.mode!=null){s.mousemove(e);s.mousedown(n)}});k.hooks.drawOverlay.push(function(v,D){if(p.show&&f()){var t=v.getPlotOffset();var s=v.getOptions();D.save();D.translate(t.left,t.top);var z=a.color.parse(s.selection.color);D.strokeStyle=z.scale("a",0.8).toString();D.lineWidth=1;D.lineJoin="round";D.fillStyle=z.scale("a",0.4).toString();var B=Math.min(p.first.x,p.second.x),A=Math.min(p.first.y,p.second.y),C=Math.abs(p.second.x-p.first.x),u=Math.abs(p.second.y-p.first.y);D.fillRect(B,A,C,u);D.strokeRect(B,A,C,u);D.restore()}});k.hooks.shutdown.push(function(t,s){s.unbind("mousemove",e);s.unbind("mousedown",n);if(r){a(document).unbind("mouseup",r)}})}a.plot.plugins.push({init:b,options:{selection:{mode:null,color:"#e8cfac"}},name:"selection",version:"1.1"})})(jQuery);
+

--- a/js/flot/jquery.flot.stack.js
+++ /dev/null
@@ -1,185 +1,1 @@
-/*
-Flot plugin for stacking data sets, i.e. putting them on top of each
-other, for accumulative graphs.
 
-The plugin assumes the data is sorted on x (or y if stacking
-horizontally). For line charts, it is assumed that if a line has an
-undefined gap (from a null point), then the line above it should have
-the same gap - insert zeros instead of "null" if you want another
-behaviour. This also holds for the start and end of the chart. Note
-that stacking a mix of positive and negative values in most instances
-doesn't make sense (so it looks weird).
-
-Two or more series are stacked when their "stack" attribute is set to
-the same key (which can be any number or string or just "true"). To
-specify the default stack, you can set
-
-  series: {
-    stack: null or true or key (number/string)
-  }
-
-or specify it for a specific series
-
-  $.plot($("#placeholder"), [{ data: [ ... ], stack: true }])
-  
-The stacking order is determined by the order of the data series in
-the array (later series end up on top of the previous).
-
-Internally, the plugin modifies the datapoints in each series, adding
-an offset to the y value. For line series, extra data points are
-inserted through interpolation. If there's a second y value, it's also
-adjusted (e.g for bar charts or filled areas).
-*/
-
-(function ($) {
-    var options = {
-        series: { stack: null } // or number/string
-    };
-    
-    function init(plot) {
-        function findMatchingSeries(s, allseries) {
-            var res = null
-            for (var i = 0; i < allseries.length; ++i) {
-                if (s == allseries[i])
-                    break;
-                
-                if (allseries[i].stack == s.stack)
-                    res = allseries[i];
-            }
-            
-            return res;
-        }
-        
-        function stackData(plot, s, datapoints) {
-            if (s.stack == null)
-                return;
-
-            var other = findMatchingSeries(s, plot.getData());
-            if (!other)
-                return;
-
-            var ps = datapoints.pointsize,
-                points = datapoints.points,
-                otherps = other.datapoints.pointsize,
-                otherpoints = other.datapoints.points,
-                newpoints = [],
-                px, py, intery, qx, qy, bottom,
-                withlines = s.lines.show,
-                horizontal = s.bars.horizontal,
-                withbottom = ps > 2 && (horizontal ? datapoints.format[2].x : datapoints.format[2].y),
-                withsteps = withlines && s.lines.steps,
-                fromgap = true,
-                keyOffset = horizontal ? 1 : 0,
-                accumulateOffset = horizontal ? 0 : 1,
-                i = 0, j = 0, l;
-
-            while (true) {
-                if (i >= points.length)
-                    break;
-
-                l = newpoints.length;
-
-                if (points[i] == null) {
-                    // copy gaps
-                    for (m = 0; m < ps; ++m)
-                        newpoints.push(points[i + m]);
-                    i += ps;
-                }
-                else if (j >= otherpoints.length) {
-                    // for lines, we can't use the rest of the points
-                    if (!withlines) {
-                        for (m = 0; m < ps; ++m)
-                            newpoints.push(points[i + m]);
-                    }
-                    i += ps;
-                }
-                else if (otherpoints[j] == null) {
-                    // oops, got a gap
-                    for (m = 0; m < ps; ++m)
-                        newpoints.push(null);
-                    fromgap = true;
-                    j += otherps;
-                }
-                else {
-                    // cases where we actually got two points
-                    px = points[i + keyOffset];
-                    py = points[i + accumulateOffset];
-                    qx = otherpoints[j + keyOffset];
-                    qy = otherpoints[j + accumulateOffset];
-                    bottom = 0;
-
-                    if (px == qx) {
-                        for (m = 0; m < ps; ++m)
-                            newpoints.push(points[i + m]);
-
-                        newpoints[l + accumulateOffset] += qy;
-                        bottom = qy;
-                        
-                        i += ps;
-                        j += otherps;
-                    }
-                    else if (px > qx) {
-                        // we got past point below, might need to
-                        // insert interpolated extra point
-                        if (withlines && i > 0 && points[i - ps] != null) {
-                            intery = py + (points[i - ps + accumulateOffset] - py) * (qx - px) / (points[i - ps + keyOffset] - px);
-                            newpoints.push(qx);
-                            newpoints.push(intery + qy);
-                            for (m = 2; m < ps; ++m)
-                                newpoints.push(points[i + m]);
-                            bottom = qy; 
-                        }
-
-                        j += otherps;
-                    }
-                    else { // px < qx
-                        if (fromgap && withlines) {
-                            // if we come from a gap, we just skip this point
-                            i += ps;
-                            continue;
-                        }
-                            
-                        for (m = 0; m < ps; ++m)
-                            newpoints.push(points[i + m]);
-                        
-                        // we might be able to interpolate a point below,
-                        // this can give us a better y
-                        if (withlines && j > 0 && otherpoints[j - otherps] != null)
-                            bottom = qy + (otherpoints[j - otherps + accumulateOffset] - qy) * (px - qx) / (otherpoints[j - otherps + keyOffset] - qx);
-
-                        newpoints[l + accumulateOffset] += bottom;
-                        
-                        i += ps;
-                    }
-
-                    fromgap = false;
-                    
-                    if (l != newpoints.length && withbottom)
-                        newpoints[l + 2] += bottom;
-                }
-
-                // maintain the line steps invariant
-                if (withsteps && l != newpoints.length && l > 0
-                    && newpoints[l] != null
-                    && newpoints[l] != newpoints[l - ps]
-                    && newpoints[l + 1] != newpoints[l - ps + 1]) {
-                    for (m = 0; m < ps; ++m)
-                        newpoints[l + ps + m] = newpoints[l + m];
-                    newpoints[l + 1] = newpoints[l - ps + 1];
-                }
-            }
-
-            datapoints.points = newpoints;
-        }
-        
-        plot.hooks.processDatapoints.push(stackData);
-    }
-    
-    $.plot.plugins.push({
-        init: init,
-        options: options,
-        name: 'stack',
-        version: '1.2'
-    });
-})(jQuery);
-

--- a/js/flot/jquery.flot.stack.min.js
+++ /dev/null
@@ -1,1 +1,1 @@
-(function(b){var a={series:{stack:null}};function c(f){function d(k,j){var h=null;for(var g=0;g<j.length;++g){if(k==j[g]){break}if(j[g].stack==k.stack){h=j[g]}}return h}function e(C,v,g){if(v.stack==null){return}var p=d(v,C.getData());if(!p){return}var z=g.pointsize,F=g.points,h=p.datapoints.pointsize,y=p.datapoints.points,t=[],x,w,k,J,I,r,u=v.lines.show,G=v.bars.horizontal,o=z>2&&(G?g.format[2].x:g.format[2].y),n=u&&v.lines.steps,E=true,q=G?1:0,H=G?0:1,D=0,B=0,A;while(true){if(D>=F.length){break}A=t.length;if(F[D]==null){for(m=0;m<z;++m){t.push(F[D+m])}D+=z}else{if(B>=y.length){if(!u){for(m=0;m<z;++m){t.push(F[D+m])}}D+=z}else{if(y[B]==null){for(m=0;m<z;++m){t.push(null)}E=true;B+=h}else{x=F[D+q];w=F[D+H];J=y[B+q];I=y[B+H];r=0;if(x==J){for(m=0;m<z;++m){t.push(F[D+m])}t[A+H]+=I;r=I;D+=z;B+=h}else{if(x>J){if(u&&D>0&&F[D-z]!=null){k=w+(F[D-z+H]-w)*(J-x)/(F[D-z+q]-x);t.push(J);t.push(k+I);for(m=2;m<z;++m){t.push(F[D+m])}r=I}B+=h}else{if(E&&u){D+=z;continue}for(m=0;m<z;++m){t.push(F[D+m])}if(u&&B>0&&y[B-h]!=null){r=I+(y[B-h+H]-I)*(x-J)/(y[B-h+q]-J)}t[A+H]+=r;D+=z}}E=false;if(A!=t.length&&o){t[A+2]+=r}}}}if(n&&A!=t.length&&A>0&&t[A]!=null&&t[A]!=t[A-z]&&t[A+1]!=t[A-z+1]){for(m=0;m<z;++m){t[A+z+m]=t[A+m]}t[A+1]=t[A-z+1]}}g.points=t}f.hooks.processDatapoints.push(e)}b.plot.plugins.push({init:c,options:a,name:"stack",version:"1.2"})})(jQuery);
+

--- a/js/flot/jquery.flot.symbol.js
+++ /dev/null
@@ -1,71 +1,1 @@
-/*
-Flot plugin that adds some extra symbols for plotting points.
 
-The symbols are accessed as strings through the standard symbol
-choice:
-
-  series: {
-      points: {
-          symbol: "square" // or "diamond", "triangle", "cross"
-      }
-  }
-
-*/
-
-(function ($) {
-    function processRawData(plot, series, datapoints) {
-        // we normalize the area of each symbol so it is approximately the
-        // same as a circle of the given radius
-
-        var handlers = {
-            square: function (ctx, x, y, radius, shadow) {
-                // pi * r^2 = (2s)^2  =>  s = r * sqrt(pi)/2
-                var size = radius * Math.sqrt(Math.PI) / 2;
-                ctx.rect(x - size, y - size, size + size, size + size);
-            },
-            diamond: function (ctx, x, y, radius, shadow) {
-                // pi * r^2 = 2s^2  =>  s = r * sqrt(pi/2)
-                var size = radius * Math.sqrt(Math.PI / 2);
-                ctx.moveTo(x - size, y);
-                ctx.lineTo(x, y - size);
-                ctx.lineTo(x + size, y);
-                ctx.lineTo(x, y + size);
-                ctx.lineTo(x - size, y);
-            },
-            triangle: function (ctx, x, y, radius, shadow) {
-                // pi * r^2 = 1/2 * s^2 * sin (pi / 3)  =>  s = r * sqrt(2 * pi / sin(pi / 3))
-                var size = radius * Math.sqrt(2 * Math.PI / Math.sin(Math.PI / 3));
-                var height = size * Math.sin(Math.PI / 3);
-                ctx.moveTo(x - size/2, y + height/2);
-                ctx.lineTo(x + size/2, y + height/2);
-                if (!shadow) {
-                    ctx.lineTo(x, y - height/2);
-                    ctx.lineTo(x - size/2, y + height/2);
-                }
-            },
-            cross: function (ctx, x, y, radius, shadow) {
-                // pi * r^2 = (2s)^2  =>  s = r * sqrt(pi)/2
-                var size = radius * Math.sqrt(Math.PI) / 2;
-                ctx.moveTo(x - size, y - size);
-                ctx.lineTo(x + size, y + size);
-                ctx.moveTo(x - size, y + size);
-                ctx.lineTo(x + size, y - size);
-            }
-        }
-
-        var s = series.points.symbol;
-        if (handlers[s])
-            series.points.symbol = handlers[s];
-    }
-    
-    function init(plot) {
-        plot.hooks.processDatapoints.push(processRawData);
-    }
-    
-    $.plot.plugins.push({
-        init: init,
-        name: 'symbols',
-        version: '1.0'
-    });
-})(jQuery);
-

--- a/js/flot/jquery.flot.symbol.min.js
+++ /dev/null
@@ -1,1 +1,1 @@
-(function(b){function a(h,e,g){var d={square:function(k,j,n,i,m){var l=i*Math.sqrt(Math.PI)/2;k.rect(j-l,n-l,l+l,l+l)},diamond:function(k,j,n,i,m){var l=i*Math.sqrt(Math.PI/2);k.moveTo(j-l,n);k.lineTo(j,n-l);k.lineTo(j+l,n);k.lineTo(j,n+l);k.lineTo(j-l,n)},triangle:function(l,k,o,j,n){var m=j*Math.sqrt(2*Math.PI/Math.sin(Math.PI/3));var i=m*Math.sin(Math.PI/3);l.moveTo(k-m/2,o+i/2);l.lineTo(k+m/2,o+i/2);if(!n){l.lineTo(k,o-i/2);l.lineTo(k-m/2,o+i/2)}},cross:function(k,j,n,i,m){var l=i*Math.sqrt(Math.PI)/2;k.moveTo(j-l,n-l);k.lineTo(j+l,n+l);k.moveTo(j-l,n+l);k.lineTo(j+l,n-l)}};var f=e.points.symbol;if(d[f]){e.points.symbol=d[f]}}function c(d){d.hooks.processDatapoints.push(a)}b.plot.plugins.push({init:c,name:"symbols",version:"1.0"})})(jQuery);
+

--- a/js/flot/jquery.flot.threshold.js
+++ /dev/null
@@ -1,104 +1,1 @@
-/*
-Flot plugin for thresholding data. Controlled through the option
-"threshold" in either the global series options
 
-  series: {
-    threshold: {
-      below: number
-      color: colorspec
-    }
-  }
-
-or in a specific series
-
-  $.plot($("#placeholder"), [{ data: [ ... ], threshold: { ... }}])
-
-The data points below "below" are drawn with the specified color. This
-makes it easy to mark points below 0, e.g. for budget data.
-
-Internally, the plugin works by splitting the data into two series,
-above and below the threshold. The extra series below the threshold
-will have its label cleared and the special "originSeries" attribute
-set to the original series. You may need to check for this in hover
-events.
-*/
-
-(function ($) {
-    var options = {
-        series: { threshold: null } // or { below: number, color: color spec}
-    };
-    
-    function init(plot) {
-        function thresholdData(plot, s, datapoints) {
-            if (!s.threshold)
-                return;
-            
-            var ps = datapoints.pointsize, i, x, y, p, prevp,
-                thresholded = $.extend({}, s); // note: shallow copy
-
-            thresholded.datapoints = { points: [], pointsize: ps };
-            thresholded.label = null;
-            thresholded.color = s.threshold.color;
-            thresholded.threshold = null;
-            thresholded.originSeries = s;
-            thresholded.data = [];
-
-            var below = s.threshold.below,
-                origpoints = datapoints.points,
-                addCrossingPoints = s.lines.show;
-
-            threspoints = [];
-            newpoints = [];
-
-            for (i = 0; i < origpoints.length; i += ps) {
-                x = origpoints[i]
-                y = origpoints[i + 1];
-
-                prevp = p;
-                if (y < below)
-                    p = threspoints;
-                else
-                    p = newpoints;
-
-                if (addCrossingPoints && prevp != p && x != null
-                    && i > 0 && origpoints[i - ps] != null) {
-                    var interx = (x - origpoints[i - ps]) / (y - origpoints[i - ps + 1]) * (below - y) + x;
-                    prevp.push(interx);
-                    prevp.push(below);
-                    for (m = 2; m < ps; ++m)
-                        prevp.push(origpoints[i + m]);
-                    
-                    p.push(null); // start new segment
-                    p.push(null);
-                    for (m = 2; m < ps; ++m)
-                        p.push(origpoints[i + m]);
-                    p.push(interx);
-                    p.push(below);
-                    for (m = 2; m < ps; ++m)
-                        p.push(origpoints[i + m]);
-                }
-
-                p.push(x);
-                p.push(y);
-            }
-
-            datapoints.points = newpoints;
-            thresholded.datapoints.points = threspoints;
-            
-            if (thresholded.datapoints.points.length > 0)
-                plot.getData().push(thresholded);
-                
-            // FIXME: there are probably some edge cases left in bars
-        }
-        
-        plot.hooks.processDatapoints.push(thresholdData);
-    }
-    
-    $.plot.plugins.push({
-        init: init,
-        options: options,
-        name: 'threshold',
-        version: '1.0'
-    });
-})(jQuery);
-

--- a/js/flot/jquery.flot.threshold.min.js
+++ /dev/null
@@ -1,1 +1,1 @@
-(function(B){var A={series:{threshold:null}};function C(D){function E(L,S,M){if(!S.threshold){return }var F=M.pointsize,I,O,N,G,K,H=B.extend({},S);H.datapoints={points:[],pointsize:F};H.label=null;H.color=S.threshold.color;H.threshold=null;H.originSeries=S;H.data=[];var P=S.threshold.below,Q=M.points,R=S.lines.show;threspoints=[];newpoints=[];for(I=0;I<Q.length;I+=F){O=Q[I];N=Q[I+1];K=G;if(N<P){G=threspoints}else{G=newpoints}if(R&&K!=G&&O!=null&&I>0&&Q[I-F]!=null){var J=(O-Q[I-F])/(N-Q[I-F+1])*(P-N)+O;K.push(J);K.push(P);for(m=2;m<F;++m){K.push(Q[I+m])}G.push(null);G.push(null);for(m=2;m<F;++m){G.push(Q[I+m])}G.push(J);G.push(P);for(m=2;m<F;++m){G.push(Q[I+m])}}G.push(O);G.push(N)}M.points=newpoints;H.datapoints.points=threspoints;if(H.datapoints.points.length>0){L.getData().push(H)}}D.hooks.processDatapoints.push(E)}B.plot.plugins.push({init:C,options:A,name:"threshold",version:"1.0"})})(jQuery);
+

directory:b/js/flotr2 (new)
--- /dev/null
+++ b/js/flotr2

directory:b/js/yepnope (new)
--- /dev/null
+++ b/js/yepnope

file:a/labs/OpenStreetMap.js (deleted)
--- a/labs/OpenStreetMap.js
+++ /dev/null
@@ -1,165 +1,1 @@
-/**
- * Namespace: Util.OSM
- */
-OpenLayers.Util.OSM = {};
 
-/**
- * Constant: MISSING_TILE_URL
- * {String} URL of image to display for missing tiles
- */
-OpenLayers.Util.OSM.MISSING_TILE_URL = "/404.php";
-
-/**
- * Property: originalOnImageLoadError
- * {Function} Original onImageLoadError function.
- */
-OpenLayers.Util.OSM.originalOnImageLoadError = OpenLayers.Util.onImageLoadError;
-
-/**
- * Function: onImageLoadError
- */
-OpenLayers.Util.onImageLoadError = function() {
-    if (this.src.match(/^http:\/\/[abc]\.[a-z]+\.openstreetmap\.org\//)) {
-        this.src = OpenLayers.Util.OSM.MISSING_TILE_URL;
-    } else if (this.src.match(/^http:\/\/[def]\.tah\.openstreetmap\.org\//)) {
-        // do nothing - this layer is transparent
-    } else {
-        OpenLayers.Util.OSM.originalOnImageLoadError;
-    }
-};
-
-/**
- * Class: OpenLayers.Layer.OSM.Mapnik
- *
- * Inherits from:
- *  - <OpenLayers.Layer.OSM>
- */
-OpenLayers.Layer.OSM.Mapnik = OpenLayers.Class(OpenLayers.Layer.OSM, {
-    /**
-     * Constructor: OpenLayers.Layer.OSM.Mapnik
-     *
-     * Parameters:
-     * name - {String}
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, options) {
-        var url = [
-            "http://a.tiles.bigtincan.com/${z}/${x}/${y}.png",
-            "http://b.tiles.bigtincan.com/${z}/${x}/${y}.png",
-            "http://c.tiles.bigtincan.com/${z}/${x}/${y}.png"
-        ];
-        options = OpenLayers.Util.extend({ numZoomLevels: 19 }, options);
-        var newArguments = [name, url, options];
-        OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.OSM.Mapnik"
-});
-
-OpenLayers.Layer.OSM.NearMap = OpenLayers.Class(OpenLayers.Layer.OSM, {
-    /**
-     * Constructor: OpenLayers.Layer.OSM.Mapnik
-     *
-     * Parameters:
-     * name - {String}
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, options) {
-        var url = [
-	    "http://nearmap:findreality@web0.nearmap.com/maps/hl=en&nml=Vert&x=${x}&y=${y}&z=${z}",
-	    "http://nearmap:findreality@web1.nearmap.com/maps/hl=en&nml=Vert&x=${x}&y=${y}&z=${z}",
-	    "http://nearmap:findreality@web2.nearmap.com/maps/hl=en&nml=Vert&x=${x}&y=${y}&z=${z}",
-	    "http://nearmap:findreality@web3.nearmap.com/maps/hl=en&nml=Vert&x=${x}&y=${y}&z=${z}"
-        ];
-        options = OpenLayers.Util.extend({ numZoomLevels: 22 }, options);
-        var newArguments = [name, url, options];
-        OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.OSM.NearMap"
-});
-
-/**
- * Class: OpenLayers.Layer.OSM.Osmarender
- *
- * Inherits from:
- *  - <OpenLayers.Layer.OSM>
- */
-OpenLayers.Layer.OSM.Osmarender = OpenLayers.Class(OpenLayers.Layer.OSM, {
-    /**
-     * Constructor: OpenLayers.Layer.OSM.Osmarender
-     *
-     * Parameters:
-     * name - {String}
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, options) {
-        var url = [
-            "http://a.tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png",
-            "http://b.tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png",
-            "http://c.tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png"
-        ];
-        options = OpenLayers.Util.extend({ numZoomLevels: 18 }, options);
-        var newArguments = [name, url, options];
-        OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.OSM.Osmarender"
-});
-
-/**
- * Class: OpenLayers.Layer.OSM.CycleMap
- *
- * Inherits from:
- *  - <OpenLayers.Layer.OSM>
- */
-OpenLayers.Layer.OSM.CycleMap = OpenLayers.Class(OpenLayers.Layer.OSM, {
-    /**
-     * Constructor: OpenLayers.Layer.OSM.CycleMap
-     *
-     * Parameters:
-     * name - {String}
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, options) {
-        var url = [
-            "http://a.andy.sandbox.cloudmade.com/tiles/cycle/${z}/${x}/${y}.png",
-            "http://b.andy.sandbox.cloudmade.com/tiles/cycle/${z}/${x}/${y}.png",
-            "http://c.andy.sandbox.cloudmade.com/tiles/cycle/${z}/${x}/${y}.png"
-        ];
-        options = OpenLayers.Util.extend({ numZoomLevels: 19 }, options);
-        var newArguments = [name, url, options];
-        OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.OSM.CycleMap"
-});
-
-/**
- * Class: OpenLayers.Layer.OSM.Maplint
- *
- * Inherits from:
- *  - <OpenLayers.Layer.OSM>
- */
-OpenLayers.Layer.OSM.Maplint = OpenLayers.Class(OpenLayers.Layer.OSM, {
-    /**
-     * Constructor: OpenLayers.Layer.OSM.Maplint
-     *
-     * Parameters:
-     * name - {String}
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, options) {
-        var url = [
-            "http://d.tah.openstreetmap.org/Tiles/maplint/${z}/${x}/${y}.png",
-            "http://e.tah.openstreetmap.org/Tiles/maplint/${z}/${x}/${y}.png",
-            "http://f.tah.openstreetmap.org/Tiles/maplint/${z}/${x}/${y}.png"
-        ];
-        options = OpenLayers.Util.extend({ numZoomLevels: 18, isBaseLayer: false, visibility: false }, options);
-        var newArguments = [name, url, options];
-        OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.OSM.Maplint"
-});
-

--- /dev/null
+++ b/labs/busdelay.csv.php
@@ -1,1 +1,52 @@
+<?php
 
+setlocale(LC_CTYPE, 'C');
+// source: http://stackoverflow.com/questions/81934/easy-way-to-export-a-sql-table-without-access-to-the-server-or-phpmyadmin#81951
+include ('../include/common.inc.php');
+$query = $conn->prepare('
+SELECT * from myway_timingdeltas'
+        , array(PDO::ATTR_CURSOR => PDO::FETCH_ORI_NEXT));
+$query->execute();
+$errors = $conn->errorInfo();
+if ($errors[2] != "") {
+    die("Export terminated, db error" . print_r($errors, true));
+}
+
+$headers = Array("date", "delay", "distance", "origin", "destination");
+
+$fp = fopen('php://output', 'w');
+if ($fp && $query) {
+    //header('Content-Type: text/csv');
+    header('Pragma: no-cache');
+    header('Expires: 0');
+    fputcsv($fp, $headers);
+    while ($r = $query->fetch(PDO::FETCH_ASSOC, PDO::FETCH_ORI_NEXT)) {
+        $row = Array();
+        foreach ($headers as $i => $fieldName) {
+            switch ($fieldName) {
+                case "date":
+                    $row[] = date("r",strtotime($r['date']." ".$r['time']));
+                    break;
+                case "delay":
+                    $row[] = $r['timing_delta'];
+                    break;
+                case "distance":
+                    $row[] = $r['stop_sequence'];
+                    break;
+                case "origin":
+                    $row[] = $r['myway_stop'];
+                    break;
+                case "destination":
+                    $row[] = $r['route_name'];
+                    break;
+                default:
+                    break;
+            }
+        }
+        fputcsv($fp, array_values($row));
+    }
+    die;
+}
+?>
+
+

file:b/labs/busdelay.php (new)
--- /dev/null
+++ b/labs/busdelay.php
@@ -1,1 +1,495 @@
-
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Tesseract</title>
+<style>
+
+
+#charts {
+  padding: 10px 0;
+}
+
+.chart {
+  display: inline-block;
+  height: 151px;
+  margin-bottom: 20px;
+}
+
+.reset {
+  padding-left: 1em;
+  font-size: smaller;
+  color: #ccc;
+}
+
+.background.bar {
+  fill: #ccc;
+}
+
+.foreground.bar {
+  fill: steelblue;
+}
+
+.axis path, .axis line {
+  fill: none;
+  stroke: #000;
+  shape-rendering: crispEdges;
+}
+
+.axis text {
+  font: 10px sans-serif;
+}
+
+.brush rect.extent {
+  fill: steelblue;
+  fill-opacity: .125;
+}
+
+.brush .resize path {
+  fill: #eee;
+  stroke: #666;
+}
+
+#hour-chart {
+  width: 260px;
+}
+
+#delay-chart {
+  width: 230px;
+}
+
+#distance-chart {
+  width: 420px;
+}
+
+#date-chart {
+  width: 920px;
+}
+
+#flight-list {
+  min-height: 1024px;
+}
+
+#flight-list .date,
+#flight-list .day {
+  margin-bottom: .4em;
+}
+
+#flight-list .flight {
+  line-height: 1.5em;
+  background: #eee;
+  width: 640px;
+  margin-bottom: 1px;
+}
+
+#flight-list .time {
+  color: #999;
+}
+
+#flight-list .flight div {
+  display: inline-block;
+  width: 100px;
+}
+
+#flight-list div.distance,
+#flight-list div.delay {
+  width: 160px;
+  padding-right: 10px;
+  text-align: right;
+}
+
+#flight-list .early {
+  color: green;
+}
+
+aside {
+  position: absolute;
+  left: 740px;
+  font-size: smaller;
+  width: 220px;
+}
+
+</style>
+
+
+<div id="charts">
+  <div id="hour-chart" class="chart">
+    <div class="title">Time of Day</div>
+  </div>
+  <div id="delay-chart" class="chart">
+    <div class="title">Arrival Delay (min.)</div>
+  </div>
+  <div id="distance-chart" class="chart">
+    <div class="title">Distance (mi.)</div>
+  </div>
+  <div id="date-chart" class="chart">
+    <div class="title">Date</div>
+  </div>
+</div>
+
+<aside id="totals"><span id="active">-</span> of <span id="total">-</span> flights selected.</aside>
+
+<div id="lists">
+  <div id="flight-list" class="list"></div>
+</div>
+
+
+</div>
+
+
+<script src="../js/tesseract/tesseract.min.js"></script>
+<script src="../js/d3/d3.v2.min.js"></script>
+<script>
+
+d3.csv("busdelay.csv.php", function(flights) {
+
+  // Various formatters.
+  var formatNumber = d3.format(",d"),
+      formatChange = d3.format("+,d"),
+      formatDate = d3.time.format("%B %d, %Y"),
+      formatTime = d3.time.format("%I:%M %p");
+
+  // A nest operator, for grouping the flight list.
+  var nestByDate = d3.nest()
+      .key(function(d) { return d3.time.day(d.date); });
+
+  // A little coercion, since the CSV is untyped.
+  flights.forEach(function(d, i) {
+    d.index = i;
+    d.date = parseDate(d.date);
+    d.delay = +d.delay;
+    d.distance = +d.distance;
+  });
+
+  // Create the tesseract and relevant dimensions and groups.
+  flight = tesseract(flights),
+  all = flight.groupAll(),
+  date = flight.dimension(function(d) { return d3.time.day(d.date); }),
+  dates = date.group(),
+  hour = flight.dimension(function(d) { return d.date.getHours() + d.date.getMinutes() / 60; }),
+  hours = hour.group(Math.floor),
+  //delay = flight.dimension(function(d) { return Math.max(-60, Math.min(149, d.delay)); }),
+  delay = flight.dimension(function(d) { return d.delay; }),
+  delays = delay.group(function(d) { return Math.floor(d / 10) * 10; }),
+  distance = flight.dimension(function(d) { return Math.min(60, d.distance); }),
+  distances = distance.group(function(d) { return Math.floor(d / 50) * 50; });
+
+  var charts = [
+
+    barChart()
+        .dimension(hour)
+        .group(hours)
+      .x(d3.scale.linear()
+        .domain([0, 24])
+        .rangeRound([0, 10 * 24])),
+
+    barChart()
+        .dimension(delay)
+        .group(delays)
+      .x(d3.scale.linear()
+        .domain([-650, 650])
+        .rangeRound([0, 10 * 21])),
+
+    barChart()
+        .dimension(distance)
+        .group(distances)
+      .x(d3.scale.linear()
+        .domain([0, 60])
+        .rangeRound([0, 10 * 40])),
+
+    barChart()
+        .dimension(date)
+        .group(dates)
+        .round(d3.time.day.round)
+      .x(d3.time.scale()
+        .domain([new Date(2011, 4, 1), new Date(2012, 1, 4)])
+        .rangeRound([0, 10 * 90]))
+        .filter([new Date(2011, 4, 4), new Date(2012, 4, 4)])
+
+  ];
+
+  // Given our array of charts, which we assume are in the same order as the
+  // .chart elements in the DOM, bind the charts to the DOM and render them.
+  // We also listen to the chart's brush events to update the display.
+  var chart = d3.selectAll(".chart")
+      .data(charts)
+      .each(function(chart) { chart.on("brush", renderAll).on("brushend", renderAll); });
+
+  // Render the initial lists.
+  var list = d3.selectAll(".list")
+      .data([flightList]);
+
+  // Render the total.
+  d3.selectAll("#total")
+      .text(formatNumber(flight.size()));
+
+  renderAll();
+
+  // Renders the specified chart or list.
+  function render(method) {
+    d3.select(this).call(method);
+  }
+
+  // Whenever the brush moves, re-rendering everything.
+  function renderAll() {
+    chart.each(render);
+    list.each(render);
+    d3.select("#active").text(formatNumber(all.value()));
+  }
+
+  // Like d3.time.format, but faster.
+  function parseDate(d) {
+    return new Date(d);
+  }
+
+  window.filter = function(filters) {
+    filters.forEach(function(d, i) { charts[i].filter(d); });
+    renderAll();
+  };
+
+  window.reset = function(i) {
+    charts[i].filter(null);
+    renderAll();
+  };
+
+  function flightList(div) {
+    var flightsByDate = nestByDate.entries(date.top(40));
+
+    div.each(function() {
+      var date = d3.select(this).selectAll(".date")
+          .data(flightsByDate, function(d) { return d.key; });
+
+      date.enter().append("div")
+          .attr("class", "date")
+        .append("div")
+          .attr("class", "day")
+          .text(function(d) { return formatDate(d.values[0].date); });
+
+      date.exit().remove();
+
+      var flight = date.order().selectAll(".flight")
+          .data(function(d) { return d.values; }, function(d) { return d.index; });
+
+      var flightEnter = flight.enter().append("div")
+          .attr("class", "flight");
+
+      flightEnter.append("div")
+          .attr("class", "time")
+          .text(function(d) { return formatTime(d.date); });
+
+      flightEnter.append("div")
+          .attr("class", "origin")
+          .text(function(d) { return d.origin; });
+
+      flightEnter.append("div")
+          .attr("class", "destination")
+          .text(function(d) { return d.destination; });
+
+      flightEnter.append("div")
+          .attr("class", "distance")
+          .text(function(d) { return formatNumber(d.distance) + " mi."; });
+
+      flightEnter.append("div")
+          .attr("class", "delay")
+          .classed("early", function(d) { return d.delay < 0; })
+          .text(function(d) { return formatChange(d.delay) + " min."; });
+
+      flight.exit().remove();
+
+      flight.order();
+    });
+  }
+
+  function barChart() {
+    if (!barChart.id) barChart.id = 0;
+
+    var margin = {top: 10, right: 10, bottom: 20, left: 10},
+        x,
+        y = d3.scale.linear().range([100, 0]),
+        id = barChart.id++,
+        axis = d3.svg.axis().orient("bottom"),
+        brush = d3.svg.brush(),
+        brushDirty,
+        dimension,
+        group,
+        round;
+
+    function chart(div) {
+      var width = x.range()[1],
+          height = y.range()[0];
+
+      y.domain([0, group.top(1)[0].value]);
+
+      div.each(function() {
+        var div = d3.select(this),
+            g = div.select("g");
+
+        // Create the skeletal chart.
+        if (g.empty()) {
+          div.select(".title").append("a")
+              .attr("href", "javascript:reset(" + id + ")")
+              .attr("class", "reset")
+              .text("reset")
+              .style("display", "none");
+
+          g = div.append("svg")
+              .attr("width", width + margin.left + margin.right)
+              .attr("height", height + margin.top + margin.bottom)
+            .append("g")
+              .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
+
+          g.append("clipPath")
+              .attr("id", "clip-" + id)
+            .append("rect")
+              .attr("width", width)
+              .attr("height", height);
+
+          g.selectAll(".bar")
+              .data(["background", "foreground"])
+            .enter().append("path")
+              .attr("class", function(d) { return d + " bar"; })
+              .datum(group.all());
+
+          g.selectAll(".foreground.bar")
+              .attr("clip-path", "url(#clip-" + id + ")");
+
+          g.append("g")
+              .attr("class", "axis")
+              .attr("transform", "translate(0," + height + ")")
+              .call(axis);
+
+          // Initialize the brush component with pretty resize handles.
+          var gBrush = g.append("g").attr("class", "brush").call(brush);
+          gBrush.selectAll("rect").attr("height", height);
+          gBrush.selectAll(".resize").append("path").attr("d", resizePath);
+        }
+
+        // Only redraw the brush if set externally.
+        if (brushDirty) {
+          brushDirty = false;
+          g.selectAll(".brush").call(brush);
+          div.select(".title a").style("display", brush.empty() ? "none" : null);
+          if (brush.empty()) {
+            g.selectAll("#clip-" + id + " rect")
+                .attr("x", 0)
+                .attr("width", width);
+          } else {
+            var extent = brush.extent();
+            g.selectAll("#clip-" + id + " rect")
+                .attr("x", x(extent[0]))
+                .attr("width", x(extent[1]) - x(extent[0]));
+          }
+        }
+
+        g.selectAll(".bar").attr("d", barPath);
+      });
+
+      function barPath(groups) {
+        var path = [],
+            i = -1,
+            n = groups.length,
+            d;
+        while (++i < n) {
+          d = groups[i];
+          path.push("M", x(d.key), ",", height, "V", y(d.value), "h9V", height);
+        }
+        return path.join("");
+      }
+
+      function resizePath(d) {
+        var e = +(d == "e"),
+            x = e ? 1 : -1,
+            y = height / 3;
+        return "M" + (.5 * x) + "," + y
+            + "A6,6 0 0 " + e + " " + (6.5 * x) + "," + (y + 6)
+            + "V" + (2 * y - 6)
+            + "A6,6 0 0 " + e + " " + (.5 * x) + "," + (2 * y)
+            + "Z"
+            + "M" + (2.5 * x) + "," + (y + 8)
+            + "V" + (2 * y - 8)
+            + "M" + (4.5 * x) + "," + (y + 8)
+            + "V" + (2 * y - 8);
+      }
+    }
+
+    brush.on("brushstart.chart", function() {
+      var div = d3.select(this.parentNode.parentNode.parentNode);
+      div.select(".title a").style("display", null);
+    });
+
+    brush.on("brush.chart", function() {
+      var g = d3.select(this.parentNode),
+          extent = brush.extent();
+      if (round) g.select(".brush")
+          .call(brush.extent(extent = extent.map(round)))
+        .selectAll(".resize")
+          .style("display", null);
+      g.select("#clip-" + id + " rect")
+          .attr("x", x(extent[0]))
+          .attr("width", x(extent[1]) - x(extent[0]));
+      dimension.filterRange(extent);
+    });
+
+    brush.on("brushend.chart", function() {
+      if (brush.empty()) {
+        var div = d3.select(this.parentNode.parentNode.parentNode);
+        div.select(".title a").style("display", "none");
+        div.select("#clip-" + id + " rect").attr("x", null).attr("width", "100%");
+        dimension.filterAll();
+      }
+    });
+
+    chart.margin = function(_) {
+      if (!arguments.length) return margin;
+      margin = _;
+      return chart;
+    };
+
+    chart.x = function(_) {
+      if (!arguments.length) return x;
+      x = _;
+      axis.scale(x);
+      brush.x(x);
+      return chart;
+    };
+
+    chart.y = function(_) {
+      if (!arguments.length) return y;
+      y = _;
+      return chart;
+    };
+
+    chart.dimension = function(_) {
+      if (!arguments.length) return dimension;
+      dimension = _;
+      return chart;
+    };
+
+    chart.filter = function(_) {
+      if (_) {
+        brush.extent(_);
+        dimension.filterRange(_);
+      } else {
+        brush.clear();
+        dimension.filterAll();
+      }
+      brushDirty = true;
+      return chart;
+    };
+
+    chart.group = function(_) {
+      if (!arguments.length) return group;
+      group = _;
+      return chart;
+    };
+
+    chart.round = function(_) {
+      if (!arguments.length) return round;
+      round = _;
+      return chart;
+    };
+
+    return d3.rebind(chart, brush, "on");
+  }
+});
+
+</script>
+

file:a/labs/busstopdensity.php (deleted)
--- a/labs/busstopdensity.php
+++ /dev/null
@@ -1,78 +1,1 @@
-<?php
-include ('../include/common.inc.php');
-//include_header("Bus Stop Density", "busstopdensity")
-?>
 
-<style type="text/css">
-
-			#map_container{
-				width:100%;
-				height:100%;
-			}
-			#status, #legend {
-				background-color: #eeeeee;
-				padding: 3px 5px 3px 5px;
-				opacity: .9;
-			}
-		</style>
-	
-		<div id="map_container"></div>
-			<div id="status">
-			Status:&nbsp; <span id="log"> <img alt="progess bar" src="progress_bar.gif" width="150" height="16"/></span>
-		</div>
-		<script type="text/javascript" src="http://www.google.com/jsapi?autoload={%22modules%22:[{%22name%22:%22maps%22,version:3,other_params:%22sensor=false%22},{%22name%22:%22jquery%22,%22version%22:%221.4.2%22}]}"></script>
-		<script type="text/javascript">
-		//<![CDATA[
-		//Google Map API v3
-		
-		var googleMap = null;
-		var previousPos = null;
-
-		$(function($){//Called when page is loaded
-			googleMap = new google.maps.Map(document.getElementById("map_container"), {
-				zoom: 17, 
-				minZoom: 12, 
-				center: new google.maps.LatLng(-35.25,149.125), 
-				mapTypeId: google.maps.MapTypeId.SATELLITE});
-			//Set status bar
-			googleMap.controls[google.maps.ControlPosition.TOP_LEFT].push($("#status").get(0));
-			//Set legend
-			googleMap.controls[google.maps.ControlPosition.BOTTOM_LEFT].push($("#legend").get(0));
-
-			google.maps.event.addListener(googleMap, "zoom_changed", function(){
-				google.maps.event.trigger(googleMap, "mousemove", previousPos);
-			});//onzoomend
-				
-			//Add a listener when mouse moves
-			google.maps.event.addListener(googleMap, "mousemove", function(event){
-				var latLng = event.latLng;
-				var xy = googleMap.getProjection().fromLatLngToPoint(latLng);
-				var ratio = Math.pow(2,googleMap.getZoom());
-				$("#log").html("Zoom:" + googleMap.getZoom() + " WGS84:(" + latLng.lat().toFixed(5) + ", " + latLng.lng().toFixed(5) + ") Px:(" + Math.floor(xy.x * ratio)  + "," + Math.floor(xy.y *ratio) + ")");
-				previousPos = event;
-			});//onmouseover
-
-			//Add a listener when mouse leaves the map area
-			google.maps.event.addListener(googleMap, "mouseout", function(event){
-				$("#log").html("");
-			});//onmouseout
-
-			//Add tile overlay
-			var myOverlay = new google.maps.ImageMapType({
-				getTileUrl: function(coord, zoom) {
-					return 'busstopdensity.tile.php?x=' + coord.x + '&y=' + coord.y + '&zoom=' +zoom;
-				},
-				tileSize: new google.maps.Size(256, 256),
-				isPng: true,
-				opacity:1.0
-			});
-			googleMap.overlayMapTypes.insertAt(0, myOverlay);
-			$("#log").html("Map loaded!");
-		});//onload
-		//]]>
-		</script>
-<?php
-include_footer()
-?>
-        
-

--- a/labs/busstopdensity.tile.php
+++ /dev/null
@@ -1,125 +1,1 @@
-<?php
-include ('../include/common.inc.php');
-$debugOkay = Array();
 
-/*
-*DISCLAIMER
-*  http://blog.gmapify.fr/create-beautiful-tiled-heat-maps-with-php-and-gd
-*THIS SOFTWARE IS PROVIDED BY THE AUTHOR '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 AUTHOR 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.
-*
-*	@author: Olivier G. <olbibigo_AT_gmail_DOT_com>
-*	@version: 1.0
-*	@history:
-*		1.0	creation
-*/
-	set_time_limit(120);//2mn
-	ini_set('memory_limit', '256M');
-error_reporting(E_ALL ^ E_DEPRECATED);
-	require_once ($labsPath . 'lib/GoogleMapUtility.php');
-	require_once ($labsPath . 'lib/HeatMap.php');
-
-	//Root folder to store generated tiles
-	define('TILE_DIR', 'tiles/');
-	//Covered geographic areas
-	define('MIN_LAT', -35.48);
-	define('MAX_LAT', -35.15);
-	define('MIN_LNG', 148.98);
-	define('MAX_LNG', 149.25);
-	define('TILE_SIZE_FACTOR', 0.5);
-	define('SPOT_RADIUS', 30);
-	define('SPOT_DIMMING_LEVEL', 50);
-	
-	//Input parameters
-	if(isset($_GET['x']))
-		$X = (int)$_GET['x'];
-	else
-		exit("x missing");
-	if(isset($_GET['y']))
-		$Y = (int)$_GET['y'];
-	else
-		exit("y missing");
-	if(isset($_GET['zoom']))
-		$zoom = (int)$_GET['zoom'];
-	else
-		exit("zoom missing");
-if ($zoom < 12) { //enforce minimum zoom
-			header('Content-type: image/png');
-			echo file_get_contents(TILE_DIR.'empty.png');
-}
-	$dir = TILE_DIR.$zoom;
-	$tilename = $dir.'/'.$X.'_'.$Y.'.png';
-	//HTTP headers  (data type and caching rule)
-	header("Cache-Control: must-revalidate");
-	header("Expires: " . gmdate("D, d M Y H:i:s", time() + 86400) . " GMT");
-	if(!file_exists($tilename)){
-		$rect = GoogleMapUtility::getTileRect($X, $Y, $zoom);
-		//A tile can contain part of a spot with center in an adjacent tile (overlaps).
-		//Knowing the spot radius (in pixels) and zoom level, a smart way to process tiles would be to compute the box (in decimal degrees) containing only spots that can be drawn on current tile. We choose a simpler solution by increeasing  geo bounds by 2*TILE_SIZE_FACTOR whatever the zoom level and spot radius.
-		$extend_X = $rect->width * TILE_SIZE_FACTOR;//in decimal degrees
-		$extend_Y = $rect->height * TILE_SIZE_FACTOR;//in decimal degrees
-		$swlat = $rect->y - $extend_Y;
-		$swlng = $rect->x - $extend_X;
-		$nelat = $swlat + $rect->height + 2 * $extend_Y;
-		$nelng = $swlng + $rect->width + 2 * $extend_X;
-
-		if( ($nelat <= MIN_LAT) || ($swlat >= MAX_LAT) || ($nelng <= MIN_LNG) || ($swlng >= MAX_LNG)){
-			//No geodata so return generic empty tile
-			echo file_get_contents(TILE_DIR.'empty.png');
-			exit();
-		}
-
-		//Get McDonald's spots
-		$spots = fGetPOI('Select * from stops where
-				(stop_lon > '.$swlng.' AND stop_lon < '.$nelng.')
-			AND (stop_lat < '.$nelat.' AND stop_lat > '.$swlat.')', $im, $X, $Y, $zoom, SPOT_RADIUS);
-
-		
-		if(empty($spots)){
-			//No geodata so return generic empty tile
-			header('Content-type: image/png');
-			echo file_get_contents(TILE_DIR.'empty.png');
-		}else{
-			if(!file_exists($dir)){
-				mkdir($dir, 0705);
-			}
-			//All the magics is in HeatMap class :)
-			$im = HeatMap::createImage($spots, GoogleMapUtility::TILE_SIZE, GoogleMapUtility::TILE_SIZE, heatMap::$WITH_ALPHA, SPOT_RADIUS, SPOT_DIMMING_LEVEL, HeatMap::$GRADIENT_FIRE);
-			//Store tile for reuse and output it
-			header('content-type:image/png;');
-			imagepng($im, $tilename);
-			echo file_get_contents($tilename);
-			imagedestroy($im);
-			unset($im);
-		}
-	}else{
-		//Output stored tile
-		header('content-type:image/png;');
-		echo file_get_contents($tilename);
-	}
-	/////////////
-	//Functions//
-	/////////////
-	function fGetPOI($query, &$im, $X, $Y, $zoom, $offset){
-            global $conn;
-		$nbPOIInsideTile = 0;
-
-        $spots = Array();
-	$query = $conn->prepare($query);
-	$query->execute();
-	if (!$query) {
-		databaseError($conn->errorInfo());
-		return Array();
-	}
-	foreach( $query->fetchAll() as $row){
-				$point = GoogleMapUtility::getOffsetPixelCoords($row['stop_lat'], $row['stop_lon'], $zoom, $X, $Y);
-				//Count result only in the tile
-				if( ($point->x > -$offset) && ($point->x < (GoogleMapUtility::TILE_SIZE+$offset)) && ($point->y > -$offset) && ($point->y < (GoogleMapUtility::TILE_SIZE+$offset))){
-					$spots[] = new HeatMapPoint($point->x, $point->y);
-				}
-				
-			}//while
-		return $spots;
-	}//fAddPOI
-?>
-
-

file:a/labs/googlemaps.php (deleted)
--- a/labs/googlemaps.php
+++ /dev/null
@@ -1,29 +1,1 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
-<style type="text/css">
-  html { height: 100% }
-  body { height: 100%; margin: 0px; padding: 0px }
-  #map_canvas { height: 100% }
-</style>
-<script type="text/javascript"
-    src="http://maps.google.com/maps/api/js?sensor=false">
-</script>
-<script type="text/javascript">
-  function initialize() {
-    var latlng = new google.maps.LatLng(-35.25, 149.125);
-    var myOptions = {
-      zoom: 10,
-      center: latlng,
-      mapTypeId: google.maps.MapTypeId.ROADMAP
-    };
-    var map = new google.maps.Map(document.getElementById("map_canvas"),
-        myOptions);
-  }
-</script>
-</head>
-<body onload="initialize()">
-  <div id="map_canvas" style="width:100%; height:100%"></div>
-</body>
-</html>
+

 Binary files a/labs/gradient/classic.png and /dev/null differ
file:a/labs/gradient/fire.png (deleted)
 Binary files a/labs/gradient/fire.png and /dev/null differ
 Binary files a/labs/gradient/pgaitch.png and /dev/null differ
--- a/labs/openlayers/OpenLayers.js
+++ /dev/null
@@ -1,2553 +1,1 @@
-/*
 
-  OpenLayers.js -- OpenLayers Map Viewer Library
-
-  Copyright 2005-2010 OpenLayers Contributors, released under the Clear BSD
-  license. Please see http://svn.openlayers.org/trunk/openlayers/license.txt
-  for the full text of the license.
-
-  Includes compressed code under the following licenses:
-
-  (For uncompressed versions of the code used please see the
-  OpenLayers SVN repository: <http://openlayers.org/>)
-
-*/
-
-/* Contains portions of Prototype.js:
- *
- * Prototype JavaScript framework, version 1.4.0
- *  (c) 2005 Sam Stephenson <sam@conio.net>
- *
- *  Prototype is freely distributable under the terms of an MIT-style license.
- *  For details, see the Prototype web site: http://prototype.conio.net/
- *
- *--------------------------------------------------------------------------*/
-
-/**  
-*  
-*  Contains portions of Rico <http://openrico.org/>
-* 
-*  Copyright 2005 Sabre Airline Solutions  
-*  
-*  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. 
-*
-**/
-
-/**
- * Contains XMLHttpRequest.js <http://code.google.com/p/xmlhttprequest/>
- * Copyright 2007 Sergey Ilinsky (http://www.ilinsky.com)
- *
- * 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
- */
-
-/**
- * Contains portions of Gears <http://code.google.com/apis/gears/>
- *
- * Copyright 2007, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. 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.
- *  3. Neither the name of Google Inc. 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 AUTHOR ``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 AUTHOR 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.
- *
- * Sets up google.gears.*, which is *the only* supported way to access Gears.
- *
- * Circumvent this file at your own risk!
- *
- * In the future, Gears may automatically define google.gears.* without this
- * file. Gears may use these objects to transparently fix bugs and compatibility
- * issues. Applications that use the code below will continue to work seamlessly
- * when that happens.
- */
-var OpenLayers={singleFile:true};(function(){var singleFile=(typeof OpenLayers=="object"&&OpenLayers.singleFile);var scriptLocation;window.OpenLayers={_scriptName:(!singleFile)?"lib/OpenLayers.js":"OpenLayers.js",_getScriptLocation:function(){if(scriptLocation!=undefined){return scriptLocation;}
-scriptLocation="";var isOL=new RegExp("(^|(.*?\\/))("+OpenLayers._scriptName+")(\\?|$)");var scripts=document.getElementsByTagName('script');for(var i=0,len=scripts.length;i<len;i++){var src=scripts[i].getAttribute('src');if(src){var match=src.match(isOL);if(match){scriptLocation=match[1];break;}}}
-return scriptLocation;}};if(!singleFile){var jsfiles=new Array("OpenLayers/Util.js","OpenLayers/BaseTypes.js","OpenLayers/BaseTypes/Class.js","OpenLayers/BaseTypes/Bounds.js","OpenLayers/BaseTypes/Element.js","OpenLayers/BaseTypes/LonLat.js","OpenLayers/BaseTypes/Pixel.js","OpenLayers/BaseTypes/Size.js","OpenLayers/Console.js","OpenLayers/Tween.js","Rico/Corner.js","Rico/Color.js","OpenLayers/Ajax.js","OpenLayers/Events.js","OpenLayers/Request.js","OpenLayers/Request/XMLHttpRequest.js","OpenLayers/Projection.js","OpenLayers/Map.js","OpenLayers/Layer.js","OpenLayers/Icon.js","OpenLayers/Marker.js","OpenLayers/Marker/Box.js","OpenLayers/Popup.js","OpenLayers/Tile.js","OpenLayers/Tile/Image.js","OpenLayers/Tile/Image/IFrame.js","OpenLayers/Tile/WFS.js","OpenLayers/Layer/Image.js","OpenLayers/Layer/SphericalMercator.js","OpenLayers/Layer/EventPane.js","OpenLayers/Layer/FixedZoomLevels.js","OpenLayers/Layer/Google.js","OpenLayers/Layer/Google/v3.js","OpenLayers/Layer/VirtualEarth.js","OpenLayers/Layer/Yahoo.js","OpenLayers/Layer/HTTPRequest.js","OpenLayers/Layer/Grid.js","OpenLayers/Layer/MapGuide.js","OpenLayers/Layer/MapServer.js","OpenLayers/Layer/MapServer/Untiled.js","OpenLayers/Layer/KaMap.js","OpenLayers/Layer/KaMapCache.js","OpenLayers/Layer/MultiMap.js","OpenLayers/Layer/Markers.js","OpenLayers/Layer/Text.js","OpenLayers/Layer/WorldWind.js","OpenLayers/Layer/ArcGIS93Rest.js","OpenLayers/Layer/WMS.js","OpenLayers/Layer/WMS/Untiled.js","OpenLayers/Layer/WMS/Post.js","OpenLayers/Layer/WMTS.js","OpenLayers/Layer/ArcIMS.js","OpenLayers/Layer/GeoRSS.js","OpenLayers/Layer/Boxes.js","OpenLayers/Layer/XYZ.js","OpenLayers/Layer/TMS.js","OpenLayers/Layer/TileCache.js","OpenLayers/Layer/Zoomify.js","OpenLayers/Popup/Anchored.js","OpenLayers/Popup/AnchoredBubble.js","OpenLayers/Popup/Framed.js","OpenLayers/Popup/FramedCloud.js","OpenLayers/Feature.js","OpenLayers/Feature/Vector.js","OpenLayers/Feature/WFS.js","OpenLayers/Handler.js","OpenLayers/Handler/Click.js","OpenLayers/Handler/Hover.js","OpenLayers/Handler/Point.js","OpenLayers/Handler/Path.js","OpenLayers/Handler/Polygon.js","OpenLayers/Handler/Feature.js","OpenLayers/Handler/Drag.js","OpenLayers/Handler/RegularPolygon.js","OpenLayers/Handler/Box.js","OpenLayers/Handler/MouseWheel.js","OpenLayers/Handler/Keyboard.js","OpenLayers/Control.js","OpenLayers/Control/Attribution.js","OpenLayers/Control/Button.js","OpenLayers/Control/ZoomBox.js","OpenLayers/Control/ZoomToMaxExtent.js","OpenLayers/Control/DragPan.js","OpenLayers/Control/Navigation.js","OpenLayers/Control/MouseDefaults.js","OpenLayers/Control/MousePosition.js","OpenLayers/Control/OverviewMap.js","OpenLayers/Control/KeyboardDefaults.js","OpenLayers/Control/PanZoom.js","OpenLayers/Control/PanZoomBar.js","OpenLayers/Control/ArgParser.js","OpenLayers/Control/Permalink.js","OpenLayers/Control/Scale.js","OpenLayers/Control/ScaleLine.js","OpenLayers/Control/Snapping.js","OpenLayers/Control/Split.js","OpenLayers/Control/LayerSwitcher.js","OpenLayers/Control/DrawFeature.js","OpenLayers/Control/DragFeature.js","OpenLayers/Control/ModifyFeature.js","OpenLayers/Control/Panel.js","OpenLayers/Control/SelectFeature.js","OpenLayers/Control/NavigationHistory.js","OpenLayers/Control/Measure.js","OpenLayers/Control/WMSGetFeatureInfo.js","OpenLayers/Control/WMTSGetFeatureInfo.js","OpenLayers/Control/Graticule.js","OpenLayers/Control/TransformFeature.js","OpenLayers/Control/SLDSelect.js","OpenLayers/Geometry.js","OpenLayers/Geometry/Rectangle.js","OpenLayers/Geometry/Collection.js","OpenLayers/Geometry/Point.js","OpenLayers/Geometry/MultiPoint.js","OpenLayers/Geometry/Curve.js","OpenLayers/Geometry/LineString.js","OpenLayers/Geometry/LinearRing.js","OpenLayers/Geometry/Polygon.js","OpenLayers/Geometry/MultiLineString.js","OpenLayers/Geometry/MultiPolygon.js","OpenLayers/Geometry/Surface.js","OpenLayers/Renderer.js","OpenLayers/Renderer/Elements.js","OpenLayers/Renderer/SVG.js","OpenLayers/Renderer/Canvas.js","OpenLayers/Renderer/VML.js","OpenLayers/Layer/Vector.js","OpenLayers/Layer/Vector/RootContainer.js","OpenLayers/Strategy.js","OpenLayers/Strategy/Filter.js","OpenLayers/Strategy/Fixed.js","OpenLayers/Strategy/Cluster.js","OpenLayers/Strategy/Paging.js","OpenLayers/Strategy/BBOX.js","OpenLayers/Strategy/Save.js","OpenLayers/Strategy/Refresh.js","OpenLayers/Filter.js","OpenLayers/Filter/FeatureId.js","OpenLayers/Filter/Logical.js","OpenLayers/Filter/Comparison.js","OpenLayers/Filter/Spatial.js","OpenLayers/Protocol.js","OpenLayers/Protocol/HTTP.js","OpenLayers/Protocol/SQL.js","OpenLayers/Protocol/SQL/Gears.js","OpenLayers/Protocol/WFS.js","OpenLayers/Protocol/WFS/v1.js","OpenLayers/Protocol/WFS/v1_0_0.js","OpenLayers/Protocol/WFS/v1_1_0.js","OpenLayers/Protocol/SOS.js","OpenLayers/Protocol/SOS/v1_0_0.js","OpenLayers/Layer/PointTrack.js","OpenLayers/Layer/GML.js","OpenLayers/Style.js","OpenLayers/Style2.js","OpenLayers/StyleMap.js","OpenLayers/Rule.js","OpenLayers/Format.js","OpenLayers/Format/XML.js","OpenLayers/Format/Context.js","OpenLayers/Format/ArcXML.js","OpenLayers/Format/ArcXML/Features.js","OpenLayers/Format/GML.js","OpenLayers/Format/GML/Base.js","OpenLayers/Format/GML/v2.js","OpenLayers/Format/GML/v3.js","OpenLayers/Format/Atom.js","OpenLayers/Format/KML.js","OpenLayers/Format/GeoRSS.js","OpenLayers/Format/WFS.js","OpenLayers/Format/WFSCapabilities.js","OpenLayers/Format/WFSCapabilities/v1.js","OpenLayers/Format/WFSCapabilities/v1_0_0.js","OpenLayers/Format/WFSCapabilities/v1_1_0.js","OpenLayers/Format/WFSDescribeFeatureType.js","OpenLayers/Format/WMSDescribeLayer.js","OpenLayers/Format/WMSDescribeLayer/v1_1.js","OpenLayers/Format/WKT.js","OpenLayers/Format/OSM.js","OpenLayers/Format/GPX.js","OpenLayers/Format/Filter.js","OpenLayers/Format/Filter/v1.js","OpenLayers/Format/Filter/v1_0_0.js","OpenLayers/Format/Filter/v1_1_0.js","OpenLayers/Format/SLD.js","OpenLayers/Format/SLD/v1.js","OpenLayers/Format/SLD/v1_0_0.js","OpenLayers/Format/OWSCommon/v1.js","OpenLayers/Format/OWSCommon/v1_0_0.js","OpenLayers/Format/OWSCommon/v1_1_0.js","OpenLayers/Format/CSWGetDomain.js","OpenLayers/Format/CSWGetDomain/v2_0_2.js","OpenLayers/Format/CSWGetRecords.js","OpenLayers/Format/CSWGetRecords/v2_0_2.js","OpenLayers/Format/WFST.js","OpenLayers/Format/WFST/v1.js","OpenLayers/Format/WFST/v1_0_0.js","OpenLayers/Format/WFST/v1_1_0.js","OpenLayers/Format/Text.js","OpenLayers/Format/JSON.js","OpenLayers/Format/GeoJSON.js","OpenLayers/Format/WMC.js","OpenLayers/Format/WMC/v1.js","OpenLayers/Format/WMC/v1_0_0.js","OpenLayers/Format/WMC/v1_1_0.js","OpenLayers/Format/WMSCapabilities.js","OpenLayers/Format/WMSCapabilities/v1.js","OpenLayers/Format/WMSCapabilities/v1_1.js","OpenLayers/Format/WMSCapabilities/v1_1_0.js","OpenLayers/Format/WMSCapabilities/v1_1_1.js","OpenLayers/Format/WMSCapabilities/v1_3.js","OpenLayers/Format/WMSCapabilities/v1_3_0.js","OpenLayers/Format/WMSGetFeatureInfo.js","OpenLayers/Format/SOSCapabilities.js","OpenLayers/Format/SOSCapabilities/v1_0_0.js","OpenLayers/Format/SOSGetObservation.js","OpenLayers/Format/SOSGetFeatureOfInterest.js","OpenLayers/Format/OWSContext.js","OpenLayers/Format/OWSContext/v0_3_1.js","OpenLayers/Format/WMTSCapabilities.js","OpenLayers/Format/WMTSCapabilities/v1_0_0.js","OpenLayers/Layer/WFS.js","OpenLayers/Control/GetFeature.js","OpenLayers/Control/MouseToolbar.js","OpenLayers/Control/NavToolbar.js","OpenLayers/Control/PanPanel.js","OpenLayers/Control/Pan.js","OpenLayers/Control/ZoomIn.js","OpenLayers/Control/ZoomOut.js","OpenLayers/Control/ZoomPanel.js","OpenLayers/Control/EditingToolbar.js","OpenLayers/Symbolizer.js","OpenLayers/Symbolizer/Point.js","OpenLayers/Symbolizer/Line.js","OpenLayers/Symbolizer/Polygon.js","OpenLayers/Symbolizer/Text.js","OpenLayers/Symbolizer/Raster.js","OpenLayers/Lang.js","OpenLayers/Lang/en.js");var agent=navigator.userAgent;var docWrite=(agent.match("MSIE")||agent.match("Safari"));if(docWrite){var allScriptTags=new Array(jsfiles.length);}
-var host=OpenLayers._getScriptLocation()+"lib/";for(var i=0,len=jsfiles.length;i<len;i++){if(docWrite){allScriptTags[i]="<script src='"+host+jsfiles[i]+"'></script>";}else{var s=document.createElement("script");s.src=host+jsfiles[i];var h=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body;h.appendChild(s);}}
-if(docWrite){document.write(allScriptTags.join(""));}}})();OpenLayers.VERSION_NUMBER="OpenLayers 2.10 -- $Revision: 10721 $";OpenLayers.String={startsWith:function(str,sub){return(str.indexOf(sub)==0);},contains:function(str,sub){return(str.indexOf(sub)!=-1);},trim:function(str){return str.replace(/^\s\s*/,'').replace(/\s\s*$/,'');},camelize:function(str){var oStringList=str.split('-');var camelizedString=oStringList[0];for(var i=1,len=oStringList.length;i<len;i++){var s=oStringList[i];camelizedString+=s.charAt(0).toUpperCase()+s.substring(1);}
-return camelizedString;},format:function(template,context,args){if(!context){context=window;}
-var replacer=function(str,match){var replacement;var subs=match.split(/\.+/);for(var i=0;i<subs.length;i++){if(i==0){replacement=context;}
-replacement=replacement[subs[i]];}
-if(typeof replacement=="function"){replacement=args?replacement.apply(null,args):replacement();}
-if(typeof replacement=='undefined'){return'undefined';}else{return replacement;}};return template.replace(OpenLayers.String.tokenRegEx,replacer);},tokenRegEx:/\$\{([\w.]+?)\}/g,numberRegEx:/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,isNumeric:function(value){return OpenLayers.String.numberRegEx.test(value);},numericIf:function(value){return OpenLayers.String.isNumeric(value)?parseFloat(value):value;}};if(!String.prototype.startsWith){String.prototype.startsWith=function(sStart){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.String.startsWith'}));return OpenLayers.String.startsWith(this,sStart);};}
-if(!String.prototype.contains){String.prototype.contains=function(str){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.String.contains'}));return OpenLayers.String.contains(this,str);};}
-if(!String.prototype.trim){String.prototype.trim=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.String.trim'}));return OpenLayers.String.trim(this);};}
-if(!String.prototype.camelize){String.prototype.camelize=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.String.camelize'}));return OpenLayers.String.camelize(this);};}
-OpenLayers.Number={decimalSeparator:".",thousandsSeparator:",",limitSigDigs:function(num,sig){var fig=0;if(sig>0){fig=parseFloat(num.toPrecision(sig));}
-return fig;},format:function(num,dec,tsep,dsep){dec=(typeof dec!="undefined")?dec:0;tsep=(typeof tsep!="undefined")?tsep:OpenLayers.Number.thousandsSeparator;dsep=(typeof dsep!="undefined")?dsep:OpenLayers.Number.decimalSeparator;if(dec!=null){num=parseFloat(num.toFixed(dec));}
-var parts=num.toString().split(".");if(parts.length==1&&dec==null){dec=0;}
-var integer=parts[0];if(tsep){var thousands=/(-?[0-9]+)([0-9]{3})/;while(thousands.test(integer)){integer=integer.replace(thousands,"$1"+tsep+"$2");}}
-var str;if(dec==0){str=integer;}else{var rem=parts.length>1?parts[1]:"0";if(dec!=null){rem=rem+new Array(dec-rem.length+1).join("0");}
-str=integer+dsep+rem;}
-return str;}};if(!Number.prototype.limitSigDigs){Number.prototype.limitSigDigs=function(sig){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.Number.limitSigDigs'}));return OpenLayers.Number.limitSigDigs(this,sig);};}
-OpenLayers.Function={bind:function(func,object){var args=Array.prototype.slice.apply(arguments,[2]);return function(){var newArgs=args.concat(Array.prototype.slice.apply(arguments,[0]));return func.apply(object,newArgs);};},bindAsEventListener:function(func,object){return function(event){return func.call(object,event||window.event);};},False:function(){return false;},True:function(){return true;}};if(!Function.prototype.bind){Function.prototype.bind=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.Function.bind'}));Array.prototype.unshift.apply(arguments,[this]);return OpenLayers.Function.bind.apply(null,arguments);};}
-if(!Function.prototype.bindAsEventListener){Function.prototype.bindAsEventListener=function(object){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.Function.bindAsEventListener'}));return OpenLayers.Function.bindAsEventListener(this,object);};}
-OpenLayers.Array={filter:function(array,callback,caller){var selected=[];if(Array.prototype.filter){selected=array.filter(callback,caller);}else{var len=array.length;if(typeof callback!="function"){throw new TypeError();}
-for(var i=0;i<len;i++){if(i in array){var val=array[i];if(callback.call(caller,val,i,array)){selected.push(val);}}}}
-return selected;}};OpenLayers.Date={toISOString:(function(){if("toISOString"in Date.prototype){return function(date){return date.toISOString();}}else{function pad(num,len){var str=num+"";while(str.length<len){str="0"+str;}
-return str;}
-return function(date){var str;if(isNaN(date.getTime())){str="Invalid Date";}else{str=date.getUTCFullYear()+"-"+
-pad(date.getUTCMonth()+1,2)+"-"+
-pad(date.getUTCDate(),2)+"T"+
-pad(date.getUTCHours(),2)+":"+
-pad(date.getUTCMinutes(),2)+":"+
-pad(date.getUTCSeconds(),2)+"."+
-pad(date.getUTCMilliseconds(),3)+"Z";}
-return str;}}})(),parse:function(str){var date;var elapsed=Date.parse(str);if(!isNaN(elapsed)){date=new Date(elapsed);}else{var match=str.match(/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))?$/);var date;if(match&&(match[1]||match[7])){var year=parseInt(match[1],10)||0;var month=(parseInt(match[2],10)-1)||0;var day=parseInt(match[3],10)||1;date=new Date(Date.UTC(year,month,day));var type=match[7];if(type){var hours=parseInt(match[4],10);var minutes=parseInt(match[5],10);var secFrac=parseFloat(match[6]);var seconds=secFrac|0;var milliseconds=Math.round(1000*(secFrac-seconds));date.setUTCHours(hours,minutes,seconds,milliseconds);if(type!=="Z"){var hoursOffset=parseInt(type,10);var minutesOffset=parseInt(match[8])||0;var offset=-1000*(60*(hoursOffset*60)+minutesOffset*60);date=new Date(date.getTime()+offset);}}}else{date=new Date("invalid");}}
-return date;}};OpenLayers.Class=function(){var Class=function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments);}};var extended={};var parent,initialize,Type;for(var i=0,len=arguments.length;i<len;++i){Type=arguments[i];if(typeof Type=="function"){if(i==0&&len>1){initialize=Type.prototype.initialize;Type.prototype.initialize=function(){};extended=new Type();if(initialize===undefined){delete Type.prototype.initialize;}else{Type.prototype.initialize=initialize;}}
-parent=Type.prototype;}else{parent=Type;}
-OpenLayers.Util.extend(extended,parent);}
-Class.prototype=extended;return Class;};OpenLayers.Class.isPrototype=function(){};OpenLayers.Class.create=function(){return function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments);}};};OpenLayers.Class.inherit=function(){var superClass=arguments[0];var proto=new superClass(OpenLayers.Class.isPrototype);for(var i=1,len=arguments.length;i<len;i++){if(typeof arguments[i]=="function"){var mixin=arguments[i];arguments[i]=new mixin(OpenLayers.Class.isPrototype);}
-OpenLayers.Util.extend(proto,arguments[i]);}
-return proto;};OpenLayers.Util={};OpenLayers.Util.getElement=function(){var elements=[];for(var i=0,len=arguments.length;i<len;i++){var element=arguments[i];if(typeof element=='string'){element=document.getElementById(element);}
-if(arguments.length==1){return element;}
-elements.push(element);}
-return elements;};OpenLayers.Util.isElement=function(o){return!!(o&&o.nodeType===1);};if(typeof window.$==="undefined"){window.$=OpenLayers.Util.getElement;}
-OpenLayers.Util.extend=function(destination,source){destination=destination||{};if(source){for(var property in source){var value=source[property];if(value!==undefined){destination[property]=value;}}
-var sourceIsEvt=typeof window.Event=="function"&&source instanceof window.Event;if(!sourceIsEvt&&source.hasOwnProperty&&source.hasOwnProperty('toString')){destination.toString=source.toString;}}
-return destination;};OpenLayers.Util.removeItem=function(array,item){for(var i=array.length-1;i>=0;i--){if(array[i]==item){array.splice(i,1);}}
-return array;};OpenLayers.Util.clearArray=function(array){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'array = []'}));array.length=0;};OpenLayers.Util.indexOf=function(array,obj){if(typeof array.indexOf=="function"){return array.indexOf(obj);}else{for(var i=0,len=array.length;i<len;i++){if(array[i]==obj){return i;}}
-return-1;}};OpenLayers.Util.modifyDOMElement=function(element,id,px,sz,position,border,overflow,opacity){if(id){element.id=id;}
-if(px){element.style.left=px.x+"px";element.style.top=px.y+"px";}
-if(sz){element.style.width=sz.w+"px";element.style.height=sz.h+"px";}
-if(position){element.style.position=position;}
-if(border){element.style.border=border;}
-if(overflow){element.style.overflow=overflow;}
-if(parseFloat(opacity)>=0.0&&parseFloat(opacity)<1.0){element.style.filter='alpha(opacity='+(opacity*100)+')';element.style.opacity=opacity;}else if(parseFloat(opacity)==1.0){element.style.filter='';element.style.opacity='';}};OpenLayers.Util.createDiv=function(id,px,sz,imgURL,position,border,overflow,opacity){var dom=document.createElement('div');if(imgURL){dom.style.backgroundImage='url('+imgURL+')';}
-if(!id){id=OpenLayers.Util.createUniqueID("OpenLayersDiv");}
-if(!position){position="absolute";}
-OpenLayers.Util.modifyDOMElement(dom,id,px,sz,position,border,overflow,opacity);return dom;};OpenLayers.Util.createImage=function(id,px,sz,imgURL,position,border,opacity,delayDisplay){var image=document.createElement("img");if(!id){id=OpenLayers.Util.createUniqueID("OpenLayersDiv");}
-if(!position){position="relative";}
-OpenLayers.Util.modifyDOMElement(image,id,px,sz,position,border,null,opacity);if(delayDisplay){image.style.display="none";OpenLayers.Event.observe(image,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,image));OpenLayers.Event.observe(image,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,image));}
-image.style.alt=id;image.galleryImg="no";if(imgURL){image.src=imgURL;}
-return image;};OpenLayers.Util.setOpacity=function(element,opacity){OpenLayers.Util.modifyDOMElement(element,null,null,null,null,null,null,opacity);};OpenLayers.Util.onImageLoad=function(){if(!this.viewRequestID||(this.map&&this.viewRequestID==this.map.viewRequestID)){this.style.display="";}
-OpenLayers.Element.removeClass(this,"olImageLoadError");};OpenLayers.IMAGE_RELOAD_ATTEMPTS=0;OpenLayers.Util.onImageLoadError=function(){this._attempts=(this._attempts)?(this._attempts+1):1;if(this._attempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS){var urls=this.urls;if(urls&&urls instanceof Array&&urls.length>1){var src=this.src.toString();var current_url,k;for(k=0;current_url=urls[k];k++){if(src.indexOf(current_url)!=-1){break;}}
-var guess=Math.floor(urls.length*Math.random());var new_url=urls[guess];k=0;while(new_url==current_url&&k++<4){guess=Math.floor(urls.length*Math.random());new_url=urls[guess];}
-this.src=src.replace(current_url,new_url);}else{this.src=this.src;}}else{OpenLayers.Element.addClass(this,"olImageLoadError");}
-this.style.display="";};OpenLayers.Util.alphaHackNeeded=null;OpenLayers.Util.alphaHack=function(){if(OpenLayers.Util.alphaHackNeeded==null){var arVersion=navigator.appVersion.split("MSIE");var version=parseFloat(arVersion[1]);var filter=false;try{filter=!!(document.body.filters);}catch(e){}
-OpenLayers.Util.alphaHackNeeded=(filter&&(version>=5.5)&&(version<7));}
-return OpenLayers.Util.alphaHackNeeded;};OpenLayers.Util.modifyAlphaImageDiv=function(div,id,px,sz,imgURL,position,border,sizing,opacity){OpenLayers.Util.modifyDOMElement(div,id,px,sz,position,null,null,opacity);var img=div.childNodes[0];if(imgURL){img.src=imgURL;}
-OpenLayers.Util.modifyDOMElement(img,div.id+"_innerImage",null,sz,"relative",border);if(OpenLayers.Util.alphaHack()){if(div.style.display!="none"){div.style.display="inline-block";}
-if(sizing==null){sizing="scale";}
-div.style.filter="progid:DXImageTransform.Microsoft"+".AlphaImageLoader(src='"+img.src+"', "+"sizingMethod='"+sizing+"')";if(parseFloat(div.style.opacity)>=0.0&&parseFloat(div.style.opacity)<1.0){div.style.filter+=" alpha(opacity="+div.style.opacity*100+")";}
-img.style.filter="alpha(opacity=0)";}};OpenLayers.Util.createAlphaImageDiv=function(id,px,sz,imgURL,position,border,sizing,opacity,delayDisplay){var div=OpenLayers.Util.createDiv();var img=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false);div.appendChild(img);if(delayDisplay){img.style.display="none";OpenLayers.Event.observe(img,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,div));OpenLayers.Event.observe(img,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,div));}
-OpenLayers.Util.modifyAlphaImageDiv(div,id,px,sz,imgURL,position,border,sizing,opacity);return div;};OpenLayers.Util.upperCaseObject=function(object){var uObject={};for(var key in object){uObject[key.toUpperCase()]=object[key];}
-return uObject;};OpenLayers.Util.applyDefaults=function(to,from){to=to||{};var fromIsEvt=typeof window.Event=="function"&&from instanceof window.Event;for(var key in from){if(to[key]===undefined||(!fromIsEvt&&from.hasOwnProperty&&from.hasOwnProperty(key)&&!to.hasOwnProperty(key))){to[key]=from[key];}}
-if(!fromIsEvt&&from&&from.hasOwnProperty&&from.hasOwnProperty('toString')&&!to.hasOwnProperty('toString')){to.toString=from.toString;}
-return to;};OpenLayers.Util.getParameterString=function(params){var paramsArray=[];for(var key in params){var value=params[key];if((value!=null)&&(typeof value!='function')){var encodedValue;if(typeof value=='object'&&value.constructor==Array){var encodedItemArray=[];var item;for(var itemIndex=0,len=value.length;itemIndex<len;itemIndex++){item=value[itemIndex];encodedItemArray.push(encodeURIComponent((item===null||item===undefined)?"":item));}
-encodedValue=encodedItemArray.join(",");}
-else{encodedValue=encodeURIComponent(value);}
-paramsArray.push(encodeURIComponent(key)+"="+encodedValue);}}
-return paramsArray.join("&");};OpenLayers.Util.urlAppend=function(url,paramStr){var newUrl=url;if(paramStr){var parts=(url+" ").split(/[?&]/);newUrl+=(parts.pop()===" "?paramStr:parts.length?"&"+paramStr:"?"+paramStr);}
-return newUrl;};OpenLayers.ImgPath='';OpenLayers.Util.getImagesLocation=function(){return OpenLayers.ImgPath||(OpenLayers._getScriptLocation()+"img/");};OpenLayers.Util.Try=function(){var returnValue=null;for(var i=0,len=arguments.length;i<len;i++){var lambda=arguments[i];try{returnValue=lambda();break;}catch(e){}}
-return returnValue;};OpenLayers.Util.getNodes=function(p,tagName){var nodes=OpenLayers.Util.Try(function(){return OpenLayers.Util._getNodes(p.documentElement.childNodes,tagName);},function(){return OpenLayers.Util._getNodes(p.childNodes,tagName);});return nodes;};OpenLayers.Util._getNodes=function(nodes,tagName){var retArray=[];for(var i=0,len=nodes.length;i<len;i++){if(nodes[i].nodeName==tagName){retArray.push(nodes[i]);}}
-return retArray;};OpenLayers.Util.getTagText=function(parent,item,index){var result=OpenLayers.Util.getNodes(parent,item);if(result&&(result.length>0))
-{if(!index){index=0;}
-if(result[index].childNodes.length>1){return result.childNodes[1].nodeValue;}
-else if(result[index].childNodes.length==1){return result[index].firstChild.nodeValue;}}else{return"";}};OpenLayers.Util.getXmlNodeValue=function(node){var val=null;OpenLayers.Util.Try(function(){val=node.text;if(!val){val=node.textContent;}
-if(!val){val=node.firstChild.nodeValue;}},function(){val=node.textContent;});return val;};OpenLayers.Util.mouseLeft=function(evt,div){var target=(evt.relatedTarget)?evt.relatedTarget:evt.toElement;while(target!=div&&target!=null){target=target.parentNode;}
-return(target!=div);};OpenLayers.Util.DEFAULT_PRECISION=14;OpenLayers.Util.toFloat=function(number,precision){if(precision==null){precision=OpenLayers.Util.DEFAULT_PRECISION;}
-var number;if(precision==0){number=parseFloat(number);}else{number=parseFloat(parseFloat(number).toPrecision(precision));}
-return number;};OpenLayers.Util.rad=function(x){return x*Math.PI/180;};OpenLayers.Util.deg=function(x){return x*180/Math.PI;};OpenLayers.Util.VincentyConstants={a:6378137,b:6356752.3142,f:1/298.257223563};OpenLayers.Util.distVincenty=function(p1,p2){var ct=OpenLayers.Util.VincentyConstants;var a=ct.a,b=ct.b,f=ct.f;var L=OpenLayers.Util.rad(p2.lon-p1.lon);var U1=Math.atan((1-f)*Math.tan(OpenLayers.Util.rad(p1.lat)));var U2=Math.atan((1-f)*Math.tan(OpenLayers.Util.rad(p2.lat)));var sinU1=Math.sin(U1),cosU1=Math.cos(U1);var sinU2=Math.sin(U2),cosU2=Math.cos(U2);var lambda=L,lambdaP=2*Math.PI;var iterLimit=20;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){var sinLambda=Math.sin(lambda),cosLambda=Math.cos(lambda);var sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+
-(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma==0){return 0;}
-var cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;var sigma=Math.atan2(sinSigma,cosSigma);var alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);var cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);var cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;var C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));}
-if(iterLimit==0){return NaN;}
-var uSq=cosSqAlpha*(a*a-b*b)/(b*b);var A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));var B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));var deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-
-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));var s=b*A*(sigma-deltaSigma);var d=s.toFixed(3)/1000;return d;};OpenLayers.Util.destinationVincenty=function(lonlat,brng,dist){var u=OpenLayers.Util;var ct=u.VincentyConstants;var a=ct.a,b=ct.b,f=ct.f;var lon1=lonlat.lon;var lat1=lonlat.lat;var s=dist;var alpha1=u.rad(brng);var sinAlpha1=Math.sin(alpha1);var cosAlpha1=Math.cos(alpha1);var tanU1=(1-f)*Math.tan(u.rad(lat1));var cosU1=1/Math.sqrt((1+tanU1*tanU1)),sinU1=tanU1*cosU1;var sigma1=Math.atan2(tanU1,cosAlpha1);var sinAlpha=cosU1*sinAlpha1;var cosSqAlpha=1-sinAlpha*sinAlpha;var uSq=cosSqAlpha*(a*a-b*b)/(b*b);var A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));var B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));var sigma=s/(b*A),sigmaP=2*Math.PI;while(Math.abs(sigma-sigmaP)>1e-12){var cos2SigmaM=Math.cos(2*sigma1+sigma);var sinSigma=Math.sin(sigma);var cosSigma=Math.cos(sigma);var deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-
-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));sigmaP=sigma;sigma=s/(b*A)+deltaSigma;}
-var tmp=sinU1*sinSigma-cosU1*cosSigma*cosAlpha1;var lat2=Math.atan2(sinU1*cosSigma+cosU1*sinSigma*cosAlpha1,(1-f)*Math.sqrt(sinAlpha*sinAlpha+tmp*tmp));var lambda=Math.atan2(sinSigma*sinAlpha1,cosU1*cosSigma-sinU1*sinSigma*cosAlpha1);var C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));var L=lambda-(1-C)*f*sinAlpha*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));var revAz=Math.atan2(sinAlpha,-tmp);return new OpenLayers.LonLat(lon1+u.deg(L),u.deg(lat2));};OpenLayers.Util.getParameters=function(url){url=url||window.location.href;var paramsString="";if(OpenLayers.String.contains(url,'?')){var start=url.indexOf('?')+1;var end=OpenLayers.String.contains(url,"#")?url.indexOf('#'):url.length;paramsString=url.substring(start,end);}
-var parameters={};var pairs=paramsString.split(/[&;]/);for(var i=0,len=pairs.length;i<len;++i){var keyValue=pairs[i].split('=');if(keyValue[0]){var key=decodeURIComponent(keyValue[0]);var value=keyValue[1]||'';value=decodeURIComponent(value.replace(/\+/g," ")).split(",");if(value.length==1){value=value[0];}
-parameters[key]=value;}}
-return parameters;};OpenLayers.Util.getArgs=function(url){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.Util.getParameters'}));return OpenLayers.Util.getParameters(url);};OpenLayers.Util.lastSeqID=0;OpenLayers.Util.createUniqueID=function(prefix){if(prefix==null){prefix="id_";}
-OpenLayers.Util.lastSeqID+=1;return prefix+OpenLayers.Util.lastSeqID;};OpenLayers.INCHES_PER_UNIT={'inches':1.0,'ft':12.0,'mi':63360.0,'m':39.3701,'km':39370.1,'dd':4374754,'yd':36};OpenLayers.INCHES_PER_UNIT["in"]=OpenLayers.INCHES_PER_UNIT.inches;OpenLayers.INCHES_PER_UNIT["degrees"]=OpenLayers.INCHES_PER_UNIT.dd;OpenLayers.INCHES_PER_UNIT["nmi"]=1852*OpenLayers.INCHES_PER_UNIT.m;OpenLayers.METERS_PER_INCH=0.02540005080010160020;OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{"Inch":OpenLayers.INCHES_PER_UNIT.inches,"Meter":1.0/OpenLayers.METERS_PER_INCH,"Foot":0.30480060960121920243/OpenLayers.METERS_PER_INCH,"IFoot":0.30480000000000000000/OpenLayers.METERS_PER_INCH,"ClarkeFoot":0.3047972651151/OpenLayers.METERS_PER_INCH,"SearsFoot":0.30479947153867624624/OpenLayers.METERS_PER_INCH,"GoldCoastFoot":0.30479971018150881758/OpenLayers.METERS_PER_INCH,"IInch":0.02540000000000000000/OpenLayers.METERS_PER_INCH,"MicroInch":0.00002540000000000000/OpenLayers.METERS_PER_INCH,"Mil":0.00000002540000000000/OpenLayers.METERS_PER_INCH,"Centimeter":0.01000000000000000000/OpenLayers.METERS_PER_INCH,"Kilometer":1000.00000000000000000000/OpenLayers.METERS_PER_INCH,"Yard":0.91440182880365760731/OpenLayers.METERS_PER_INCH,"SearsYard":0.914398414616029/OpenLayers.METERS_PER_INCH,"IndianYard":0.91439853074444079983/OpenLayers.METERS_PER_INCH,"IndianYd37":0.91439523/OpenLayers.METERS_PER_INCH,"IndianYd62":0.9143988/OpenLayers.METERS_PER_INCH,"IndianYd75":0.9143985/OpenLayers.METERS_PER_INCH,"IndianFoot":0.30479951/OpenLayers.METERS_PER_INCH,"IndianFt37":0.30479841/OpenLayers.METERS_PER_INCH,"IndianFt62":0.3047996/OpenLayers.METERS_PER_INCH,"IndianFt75":0.3047995/OpenLayers.METERS_PER_INCH,"Mile":1609.34721869443738887477/OpenLayers.METERS_PER_INCH,"IYard":0.91440000000000000000/OpenLayers.METERS_PER_INCH,"IMile":1609.34400000000000000000/OpenLayers.METERS_PER_INCH,"NautM":1852.00000000000000000000/OpenLayers.METERS_PER_INCH,"Lat-66":110943.316488932731/OpenLayers.METERS_PER_INCH,"Lat-83":110946.25736872234125/OpenLayers.METERS_PER_INCH,"Decimeter":0.10000000000000000000/OpenLayers.METERS_PER_INCH,"Millimeter":0.00100000000000000000/OpenLayers.METERS_PER_INCH,"Dekameter":10.00000000000000000000/OpenLayers.METERS_PER_INCH,"Decameter":10.00000000000000000000/OpenLayers.METERS_PER_INCH,"Hectometer":100.00000000000000000000/OpenLayers.METERS_PER_INCH,"GermanMeter":1.0000135965/OpenLayers.METERS_PER_INCH,"CaGrid":0.999738/OpenLayers.METERS_PER_INCH,"ClarkeChain":20.1166194976/OpenLayers.METERS_PER_INCH,"GunterChain":20.11684023368047/OpenLayers.METERS_PER_INCH,"BenoitChain":20.116782494375872/OpenLayers.METERS_PER_INCH,"SearsChain":20.11676512155/OpenLayers.METERS_PER_INCH,"ClarkeLink":0.201166194976/OpenLayers.METERS_PER_INCH,"GunterLink":0.2011684023368047/OpenLayers.METERS_PER_INCH,"BenoitLink":0.20116782494375872/OpenLayers.METERS_PER_INCH,"SearsLink":0.2011676512155/OpenLayers.METERS_PER_INCH,"Rod":5.02921005842012/OpenLayers.METERS_PER_INCH,"IntnlChain":20.1168/OpenLayers.METERS_PER_INCH,"IntnlLink":0.201168/OpenLayers.METERS_PER_INCH,"Perch":5.02921005842012/OpenLayers.METERS_PER_INCH,"Pole":5.02921005842012/OpenLayers.METERS_PER_INCH,"Furlong":201.1684023368046/OpenLayers.METERS_PER_INCH,"Rood":3.778266898/OpenLayers.METERS_PER_INCH,"CapeFoot":0.3047972615/OpenLayers.METERS_PER_INCH,"Brealey":375.00000000000000000000/OpenLayers.METERS_PER_INCH,"ModAmFt":0.304812252984505969011938/OpenLayers.METERS_PER_INCH,"Fathom":1.8288/OpenLayers.METERS_PER_INCH,"NautM-UK":1853.184/OpenLayers.METERS_PER_INCH,"50kilometers":50000.0/OpenLayers.METERS_PER_INCH,"150kilometers":150000.0/OpenLayers.METERS_PER_INCH});OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{"mm":OpenLayers.INCHES_PER_UNIT["Meter"]/1000.0,"cm":OpenLayers.INCHES_PER_UNIT["Meter"]/100.0,"dm":OpenLayers.INCHES_PER_UNIT["Meter"]*100.0,"km":OpenLayers.INCHES_PER_UNIT["Meter"]*1000.0,"kmi":OpenLayers.INCHES_PER_UNIT["nmi"],"fath":OpenLayers.INCHES_PER_UNIT["Fathom"],"ch":OpenLayers.INCHES_PER_UNIT["IntnlChain"],"link":OpenLayers.INCHES_PER_UNIT["IntnlLink"],"us-in":OpenLayers.INCHES_PER_UNIT["inches"],"us-ft":OpenLayers.INCHES_PER_UNIT["Foot"],"us-yd":OpenLayers.INCHES_PER_UNIT["Yard"],"us-ch":OpenLayers.INCHES_PER_UNIT["GunterChain"],"us-mi":OpenLayers.INCHES_PER_UNIT["Mile"],"ind-yd":OpenLayers.INCHES_PER_UNIT["IndianYd37"],"ind-ft":OpenLayers.INCHES_PER_UNIT["IndianFt37"],"ind-ch":20.11669506/OpenLayers.METERS_PER_INCH});OpenLayers.DOTS_PER_INCH=72;OpenLayers.Util.normalizeScale=function(scale){var normScale=(scale>1.0)?(1.0/scale):scale;return normScale;};OpenLayers.Util.getResolutionFromScale=function(scale,units){var resolution;if(scale){if(units==null){units="degrees";}
-var normScale=OpenLayers.Util.normalizeScale(scale);resolution=1/(normScale*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH);}
-return resolution;};OpenLayers.Util.getScaleFromResolution=function(resolution,units){if(units==null){units="degrees";}
-var scale=resolution*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH;return scale;};OpenLayers.Util.safeStopPropagation=function(evt){OpenLayers.Event.stop(evt,true);};OpenLayers.Util.pagePosition=function(forElement){var valueT=0,valueL=0;var element=forElement;var child=forElement;while(element){if(element==document.body){if(OpenLayers.Element.getStyle(child,'position')=='absolute'){break;}}
-valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;child=element;try{element=element.offsetParent;}catch(e){OpenLayers.Console.error(OpenLayers.i18n("pagePositionFailed",{'elemId':element.id}));break;}}
-element=forElement;while(element){valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;element=element.parentNode;}
-return[valueL,valueT];};OpenLayers.Util.isEquivalentUrl=function(url1,url2,options){options=options||{};OpenLayers.Util.applyDefaults(options,{ignoreCase:true,ignorePort80:true,ignoreHash:true});var urlObj1=OpenLayers.Util.createUrlObject(url1,options);var urlObj2=OpenLayers.Util.createUrlObject(url2,options);for(var key in urlObj1){if(key!=="args"){if(urlObj1[key]!=urlObj2[key]){return false;}}}
-for(var key in urlObj1.args){if(urlObj1.args[key]!=urlObj2.args[key]){return false;}
-delete urlObj2.args[key];}
-for(var key in urlObj2.args){return false;}
-return true;};OpenLayers.Util.createUrlObject=function(url,options){options=options||{};if(!(/^\w+:\/\//).test(url)){var loc=window.location;var port=loc.port?":"+loc.port:"";var fullUrl=loc.protocol+"//"+loc.host.split(":").shift()+port;if(url.indexOf("/")===0){url=fullUrl+url;}else{var parts=loc.pathname.split("/");parts.pop();url=fullUrl+parts.join("/")+"/"+url;}}
-if(options.ignoreCase){url=url.toLowerCase();}
-var a=document.createElement('a');a.href=url;var urlObject={};urlObject.host=a.host.split(":").shift();urlObject.protocol=a.protocol;if(options.ignorePort80){urlObject.port=(a.port=="80"||a.port=="0")?"":a.port;}else{urlObject.port=(a.port==""||a.port=="0")?"80":a.port;}
-urlObject.hash=(options.ignoreHash||a.hash==="#")?"":a.hash;var queryString=a.search;if(!queryString){var qMark=url.indexOf("?");queryString=(qMark!=-1)?url.substr(qMark):"";}
-urlObject.args=OpenLayers.Util.getParameters(queryString);urlObject.pathname=(a.pathname.charAt(0)=="/")?a.pathname:"/"+a.pathname;return urlObject;};OpenLayers.Util.removeTail=function(url){var head=null;var qMark=url.indexOf("?");var hashMark=url.indexOf("#");if(qMark==-1){head=(hashMark!=-1)?url.substr(0,hashMark):url;}else{head=(hashMark!=-1)?url.substr(0,Math.min(qMark,hashMark)):url.substr(0,qMark);}
-return head;};OpenLayers.Util.getBrowserName=function(){var browserName="";var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("opera")!=-1){browserName="opera";}else if(ua.indexOf("msie")!=-1){browserName="msie";}else if(ua.indexOf("safari")!=-1){browserName="safari";}else if(ua.indexOf("mozilla")!=-1){if(ua.indexOf("firefox")!=-1){browserName="firefox";}else{browserName="mozilla";}}
-return browserName;};OpenLayers.Util.getRenderedDimensions=function(contentHTML,size,options){var w,h;var container=document.createElement("div");container.style.visibility="hidden";var containerElement=(options&&options.containerElement)?options.containerElement:document.body;if(size){if(size.w){w=size.w;container.style.width=w+"px";}else if(size.h){h=size.h;container.style.height=h+"px";}}
-if(options&&options.displayClass){container.className=options.displayClass;}
-var content=document.createElement("div");content.innerHTML=contentHTML;content.style.overflow="visible";if(content.childNodes){for(var i=0,l=content.childNodes.length;i<l;i++){if(!content.childNodes[i].style)continue;content.childNodes[i].style.overflow="visible";}}
-container.appendChild(content);containerElement.appendChild(container);var parentHasPositionAbsolute=false;var parent=container.parentNode;while(parent&&parent.tagName.toLowerCase()!="body"){var parentPosition=OpenLayers.Element.getStyle(parent,"position");if(parentPosition=="absolute"){parentHasPositionAbsolute=true;break;}else if(parentPosition&&parentPosition!="static"){break;}
-parent=parent.parentNode;}
-if(!parentHasPositionAbsolute){container.style.position="absolute";}
-if(!w){w=parseInt(content.scrollWidth);container.style.width=w+"px";}
-if(!h){h=parseInt(content.scrollHeight);}
-container.removeChild(content);containerElement.removeChild(container);return new OpenLayers.Size(w,h);};OpenLayers.Util.getScrollbarWidth=function(){var scrollbarWidth=OpenLayers.Util._scrollbarWidth;if(scrollbarWidth==null){var scr=null;var inn=null;var wNoScroll=0;var wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='scroll';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);OpenLayers.Util._scrollbarWidth=(wNoScroll-wScroll);scrollbarWidth=OpenLayers.Util._scrollbarWidth;}
-return scrollbarWidth;};OpenLayers.Util.getFormattedLonLat=function(coordinate,axis,dmsOption){if(!dmsOption){dmsOption='dms';}
-var abscoordinate=Math.abs(coordinate)
-var coordinatedegrees=Math.floor(abscoordinate);var coordinateminutes=(abscoordinate-coordinatedegrees)/(1/60);var tempcoordinateminutes=coordinateminutes;coordinateminutes=Math.floor(coordinateminutes);var coordinateseconds=(tempcoordinateminutes-coordinateminutes)/(1/60);coordinateseconds=Math.round(coordinateseconds*10);coordinateseconds/=10;if(coordinatedegrees<10){coordinatedegrees="0"+coordinatedegrees;}
-var str=coordinatedegrees+"\u00B0";if(dmsOption.indexOf('dm')>=0){if(coordinateminutes<10){coordinateminutes="0"+coordinateminutes;}
-str+=coordinateminutes+"'";if(dmsOption.indexOf('dms')>=0){if(coordinateseconds<10){coordinateseconds="0"+coordinateseconds;}
-str+=coordinateseconds+'"';}}
-if(axis=="lon"){str+=coordinate<0?OpenLayers.i18n("W"):OpenLayers.i18n("E");}else{str+=coordinate<0?OpenLayers.i18n("S"):OpenLayers.i18n("N");}
-return str;};OpenLayers.Rico=new Object();OpenLayers.Rico.Corner={round:function(e,options){e=OpenLayers.Util.getElement(e);this._setOptions(options);var color=this.options.color;if(this.options.color=="fromElement"){color=this._background(e);}
-var bgColor=this.options.bgColor;if(this.options.bgColor=="fromParent"){bgColor=this._background(e.offsetParent);}
-this._roundCornersImpl(e,color,bgColor);},changeColor:function(theDiv,newColor){theDiv.style.backgroundColor=newColor;var spanElements=theDiv.parentNode.getElementsByTagName("span");for(var currIdx=0;currIdx<spanElements.length;currIdx++){spanElements[currIdx].style.backgroundColor=newColor;}},changeOpacity:function(theDiv,newOpacity){var mozillaOpacity=newOpacity;var ieOpacity='alpha(opacity='+newOpacity*100+')';theDiv.style.opacity=mozillaOpacity;theDiv.style.filter=ieOpacity;var spanElements=theDiv.parentNode.getElementsByTagName("span");for(var currIdx=0;currIdx<spanElements.length;currIdx++){spanElements[currIdx].style.opacity=mozillaOpacity;spanElements[currIdx].style.filter=ieOpacity;}},reRound:function(theDiv,options){var topRico=theDiv.parentNode.childNodes[0];var bottomRico=theDiv.parentNode.childNodes[2];theDiv.parentNode.removeChild(topRico);theDiv.parentNode.removeChild(bottomRico);this.round(theDiv.parentNode,options);},_roundCornersImpl:function(e,color,bgColor){if(this.options.border){this._renderBorder(e,bgColor);}
-if(this._isTopRounded()){this._roundTopCorners(e,color,bgColor);}
-if(this._isBottomRounded()){this._roundBottomCorners(e,color,bgColor);}},_renderBorder:function(el,bgColor){var borderValue="1px solid "+this._borderColor(bgColor);var borderL="border-left: "+borderValue;var borderR="border-right: "+borderValue;var style="style='"+borderL+";"+borderR+"'";el.innerHTML="<div "+style+">"+el.innerHTML+"</div>";},_roundTopCorners:function(el,color,bgColor){var corner=this._createCorner(bgColor);for(var i=0;i<this.options.numSlices;i++){corner.appendChild(this._createCornerSlice(color,bgColor,i,"top"));}
-el.style.paddingTop=0;el.insertBefore(corner,el.firstChild);},_roundBottomCorners:function(el,color,bgColor){var corner=this._createCorner(bgColor);for(var i=(this.options.numSlices-1);i>=0;i--){corner.appendChild(this._createCornerSlice(color,bgColor,i,"bottom"));}
-el.style.paddingBottom=0;el.appendChild(corner);},_createCorner:function(bgColor){var corner=document.createElement("div");corner.style.backgroundColor=(this._isTransparent()?"transparent":bgColor);return corner;},_createCornerSlice:function(color,bgColor,n,position){var slice=document.createElement("span");var inStyle=slice.style;inStyle.backgroundColor=color;inStyle.display="block";inStyle.height="1px";inStyle.overflow="hidden";inStyle.fontSize="1px";var borderColor=this._borderColor(color,bgColor);if(this.options.border&&n==0){inStyle.borderTopStyle="solid";inStyle.borderTopWidth="1px";inStyle.borderLeftWidth="0px";inStyle.borderRightWidth="0px";inStyle.borderBottomWidth="0px";inStyle.height="0px";inStyle.borderColor=borderColor;}
-else if(borderColor){inStyle.borderColor=borderColor;inStyle.borderStyle="solid";inStyle.borderWidth="0px 1px";}
-if(!this.options.compact&&(n==(this.options.numSlices-1))){inStyle.height="2px";}
-this._setMargin(slice,n,position);this._setBorder(slice,n,position);return slice;},_setOptions:function(options){this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false};OpenLayers.Util.extend(this.options,options||{});this.options.numSlices=this.options.compact?2:4;if(this._isTransparent()){this.options.blend=false;}},_whichSideTop:function(){if(this._hasString(this.options.corners,"all","top")){return"";}
-if(this.options.corners.indexOf("tl")>=0&&this.options.corners.indexOf("tr")>=0){return"";}
-if(this.options.corners.indexOf("tl")>=0){return"left";}else if(this.options.corners.indexOf("tr")>=0){return"right";}
-return"";},_whichSideBottom:function(){if(this._hasString(this.options.corners,"all","bottom")){return"";}
-if(this.options.corners.indexOf("bl")>=0&&this.options.corners.indexOf("br")>=0){return"";}
-if(this.options.corners.indexOf("bl")>=0){return"left";}else if(this.options.corners.indexOf("br")>=0){return"right";}
-return"";},_borderColor:function(color,bgColor){if(color=="transparent"){return bgColor;}else if(this.options.border){return this.options.border;}else if(this.options.blend){return this._blend(bgColor,color);}else{return"";}},_setMargin:function(el,n,corners){var marginSize=this._marginSize(n);var whichSide=corners=="top"?this._whichSideTop():this._whichSideBottom();if(whichSide=="left"){el.style.marginLeft=marginSize+"px";el.style.marginRight="0px";}
-else if(whichSide=="right"){el.style.marginRight=marginSize+"px";el.style.marginLeft="0px";}
-else{el.style.marginLeft=marginSize+"px";el.style.marginRight=marginSize+"px";}},_setBorder:function(el,n,corners){var borderSize=this._borderSize(n);var whichSide=corners=="top"?this._whichSideTop():this._whichSideBottom();if(whichSide=="left"){el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth="0px";}
-else if(whichSide=="right"){el.style.borderRightWidth=borderSize+"px";el.style.borderLeftWidth="0px";}
-else{el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth=borderSize+"px";}
-if(this.options.border!=false){el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth=borderSize+"px";}},_marginSize:function(n){if(this._isTransparent()){return 0;}
-var marginSizes=[5,3,2,1];var blendedMarginSizes=[3,2,1,0];var compactMarginSizes=[2,1];var smBlendedMarginSizes=[1,0];if(this.options.compact&&this.options.blend){return smBlendedMarginSizes[n];}else if(this.options.compact){return compactMarginSizes[n];}else if(this.options.blend){return blendedMarginSizes[n];}else{return marginSizes[n];}},_borderSize:function(n){var transparentBorderSizes=[5,3,2,1];var blendedBorderSizes=[2,1,1,1];var compactBorderSizes=[1,0];var actualBorderSizes=[0,2,0,0];if(this.options.compact&&(this.options.blend||this._isTransparent())){return 1;}else if(this.options.compact){return compactBorderSizes[n];}else if(this.options.blend){return blendedBorderSizes[n];}else if(this.options.border){return actualBorderSizes[n];}else if(this._isTransparent()){return transparentBorderSizes[n];}
-return 0;},_hasString:function(str){for(var i=1;i<arguments.length;i++)if(str.indexOf(arguments[i])>=0){return true;}return false;},_blend:function(c1,c2){var cc1=OpenLayers.Rico.Color.createFromHex(c1);cc1.blend(OpenLayers.Rico.Color.createFromHex(c2));return cc1;},_background:function(el){try{return OpenLayers.Rico.Color.createColorFromBackground(el).asHex();}catch(err){return"#ffffff";}},_isTransparent:function(){return this.options.color=="transparent";},_isTopRounded:function(){return this._hasString(this.options.corners,"all","top","tl","tr");},_isBottomRounded:function(){return this._hasString(this.options.corners,"all","bottom","bl","br");},_hasSingleTextChild:function(el){return el.childNodes.length==1&&el.childNodes[0].nodeType==3;}};(function(){if(window.google&&google.gears){return;}
-var factory=null;if(typeof GearsFactory!='undefined'){factory=new GearsFactory();}else{try{factory=new ActiveXObject('Gears.Factory');if(factory.getBuildInfo().indexOf('ie_mobile')!=-1){factory.privateSetGlobalObject(this);}}catch(e){if((typeof navigator.mimeTypes!='undefined')&&navigator.mimeTypes["application/x-googlegears"]){factory=document.createElement("object");factory.style.display="none";factory.width=0;factory.height=0;factory.type="application/x-googlegears";document.documentElement.appendChild(factory);}}}
-if(!factory){return;}
-if(!window.google){google={};}
-if(!google.gears){google.gears={factory:factory};}})();OpenLayers.Element={visible:function(element){return OpenLayers.Util.getElement(element).style.display!='none';},toggle:function(){for(var i=0,len=arguments.length;i<len;i++){var element=OpenLayers.Util.getElement(arguments[i]);var display=OpenLayers.Element.visible(element)?'hide':'show';OpenLayers.Element[display](element);}},hide:function(){for(var i=0,len=arguments.length;i<len;i++){var element=OpenLayers.Util.getElement(arguments[i]);if(element){element.style.display='none';}}},show:function(){for(var i=0,len=arguments.length;i<len;i++){var element=OpenLayers.Util.getElement(arguments[i]);if(element){element.style.display='';}}},remove:function(element){element=OpenLayers.Util.getElement(element);element.parentNode.removeChild(element);},getHeight:function(element){element=OpenLayers.Util.getElement(element);return element.offsetHeight;},getDimensions:function(element){element=OpenLayers.Util.getElement(element);if(OpenLayers.Element.getStyle(element,'display')!='none'){return{width:element.offsetWidth,height:element.offsetHeight};}
-var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;var originalDisplay=els.display;els.visibility='hidden';els.position='absolute';els.display='';var originalWidth=element.clientWidth;var originalHeight=element.clientHeight;els.display=originalDisplay;els.position=originalPosition;els.visibility=originalVisibility;return{width:originalWidth,height:originalHeight};},hasClass:function(element,name){var names=element.className;return(!!names&&new RegExp("(^|\\s)"+name+"(\\s|$)").test(names));},addClass:function(element,name){if(!OpenLayers.Element.hasClass(element,name)){element.className+=(element.className?" ":"")+name;}
-return element;},removeClass:function(element,name){var names=element.className;if(names){element.className=OpenLayers.String.trim(names.replace(new RegExp("(^|\\s+)"+name+"(\\s+|$)")," "));}
-return element;},toggleClass:function(element,name){if(OpenLayers.Element.hasClass(element,name)){OpenLayers.Element.removeClass(element,name);}else{OpenLayers.Element.addClass(element,name);}
-return element;},getStyle:function(element,style){element=OpenLayers.Util.getElement(element);var value=null;if(element&&element.style){value=element.style[OpenLayers.String.camelize(style)];if(!value){if(document.defaultView&&document.defaultView.getComputedStyle){var css=document.defaultView.getComputedStyle(element,null);value=css?css.getPropertyValue(style):null;}else if(element.currentStyle){value=element.currentStyle[OpenLayers.String.camelize(style)];}}
-var positions=['left','top','right','bottom'];if(window.opera&&(OpenLayers.Util.indexOf(positions,style)!=-1)&&(OpenLayers.Element.getStyle(element,'position')=='static')){value='auto';}}
-return value=='auto'?null:value;}};OpenLayers.Size=OpenLayers.Class({w:0.0,h:0.0,initialize:function(w,h){this.w=parseFloat(w);this.h=parseFloat(h);},toString:function(){return("w="+this.w+",h="+this.h);},clone:function(){return new OpenLayers.Size(this.w,this.h);},equals:function(sz){var equals=false;if(sz!=null){equals=((this.w==sz.w&&this.h==sz.h)||(isNaN(this.w)&&isNaN(this.h)&&isNaN(sz.w)&&isNaN(sz.h)));}
-return equals;},CLASS_NAME:"OpenLayers.Size"});OpenLayers.Console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},userError:function(error){alert(error);},assert:function(){},dir:function(){},dirxml:function(){},trace:function(){},group:function(){},groupEnd:function(){},time:function(){},timeEnd:function(){},profile:function(){},profileEnd:function(){},count:function(){},CLASS_NAME:"OpenLayers.Console"};(function(){var scripts=document.getElementsByTagName("script");for(var i=0,len=scripts.length;i<len;++i){if(scripts[i].src.indexOf("firebug.js")!=-1){if(console){OpenLayers.Util.extend(OpenLayers.Console,console);break;}}}})();OpenLayers.Icon=OpenLayers.Class({url:null,size:null,offset:null,calculateOffset:null,imageDiv:null,px:null,initialize:function(url,size,offset,calculateOffset){this.url=url;this.size=(size)?size:new OpenLayers.Size(20,20);this.offset=offset?offset:new OpenLayers.Pixel(-(this.size.w/2),-(this.size.h/2));this.calculateOffset=calculateOffset;var id=OpenLayers.Util.createUniqueID("OL_Icon_");this.imageDiv=OpenLayers.Util.createAlphaImageDiv(id);},destroy:function(){this.erase();OpenLayers.Event.stopObservingElement(this.imageDiv.firstChild);this.imageDiv.innerHTML="";this.imageDiv=null;},clone:function(){return new OpenLayers.Icon(this.url,this.size,this.offset,this.calculateOffset);},setSize:function(size){if(size!=null){this.size=size;}
-this.draw();},setUrl:function(url){if(url!=null){this.url=url;}
-this.draw();},draw:function(px){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,this.size,this.url,"absolute");this.moveTo(px);return this.imageDiv;},erase:function(){if(this.imageDiv!=null&&this.imageDiv.parentNode!=null){OpenLayers.Element.remove(this.imageDiv);}},setOpacity:function(opacity){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,null,null,null,null,null,opacity);},moveTo:function(px){if(px!=null){this.px=px;}
-if(this.imageDiv!=null){if(this.px==null){this.display(false);}else{if(this.calculateOffset){this.offset=this.calculateOffset(this.size);}
-var offsetPx=this.px.offset(this.offset);OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,offsetPx);}}},display:function(display){this.imageDiv.style.display=(display)?"":"none";},isDrawn:function(){var isDrawn=(this.imageDiv&&this.imageDiv.parentNode&&(this.imageDiv.parentNode.nodeType!=11));return isDrawn;},CLASS_NAME:"OpenLayers.Icon"});OpenLayers.Popup=OpenLayers.Class({events:null,id:"",lonlat:null,div:null,contentSize:null,size:null,contentHTML:null,backgroundColor:"",opacity:"",border:"",contentDiv:null,groupDiv:null,closeDiv:null,autoSize:false,minSize:null,maxSize:null,displayClass:"olPopup",contentDisplayClass:"olPopupContent",padding:0,disableFirefoxOverflowHack:false,fixPadding:function(){if(typeof this.padding=="number"){this.padding=new OpenLayers.Bounds(this.padding,this.padding,this.padding,this.padding);}},panMapIfOutOfView:false,keepInMap:false,closeOnMove:false,map:null,initialize:function(id,lonlat,contentSize,contentHTML,closeBox,closeBoxCallback){if(id==null){id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");}
-this.id=id;this.lonlat=lonlat;this.contentSize=(contentSize!=null)?contentSize:new OpenLayers.Size(OpenLayers.Popup.WIDTH,OpenLayers.Popup.HEIGHT);if(contentHTML!=null){this.contentHTML=contentHTML;}
-this.backgroundColor=OpenLayers.Popup.COLOR;this.opacity=OpenLayers.Popup.OPACITY;this.border=OpenLayers.Popup.BORDER;this.div=OpenLayers.Util.createDiv(this.id,null,null,null,null,null,"hidden");this.div.className=this.displayClass;var groupDivId=this.id+"_GroupDiv";this.groupDiv=OpenLayers.Util.createDiv(groupDivId,null,null,null,"relative",null,"hidden");var id=this.div.id+"_contentDiv";this.contentDiv=OpenLayers.Util.createDiv(id,null,this.contentSize.clone(),null,"relative");this.contentDiv.className=this.contentDisplayClass;this.groupDiv.appendChild(this.contentDiv);this.div.appendChild(this.groupDiv);if(closeBox){this.addCloseBox(closeBoxCallback);}
-this.registerEvents();},destroy:function(){this.id=null;this.lonlat=null;this.size=null;this.contentHTML=null;this.backgroundColor=null;this.opacity=null;this.border=null;if(this.closeOnMove&&this.map){this.map.events.unregister("movestart",this,this.hide);}
-this.events.destroy();this.events=null;if(this.closeDiv){OpenLayers.Event.stopObservingElement(this.closeDiv);this.groupDiv.removeChild(this.closeDiv);}
-this.closeDiv=null;this.div.removeChild(this.groupDiv);this.groupDiv=null;if(this.map!=null){this.map.removePopup(this);}
-this.map=null;this.div=null;this.autoSize=null;this.minSize=null;this.maxSize=null;this.padding=null;this.panMapIfOutOfView=null;},draw:function(px){if(px==null){if((this.lonlat!=null)&&(this.map!=null)){px=this.map.getLayerPxFromLonLat(this.lonlat);}}
-if(this.closeOnMove){this.map.events.register("movestart",this,this.hide);}
-if(!this.disableFirefoxOverflowHack&&OpenLayers.Util.getBrowserName()=='firefox'){this.map.events.register("movestart",this,function(){var style=document.defaultView.getComputedStyle(this.contentDiv,null);var currentOverflow=style.getPropertyValue("overflow");if(currentOverflow!="hidden"){this.contentDiv._oldOverflow=currentOverflow;this.contentDiv.style.overflow="hidden";}});this.map.events.register("moveend",this,function(){var oldOverflow=this.contentDiv._oldOverflow;if(oldOverflow){this.contentDiv.style.overflow=oldOverflow;this.contentDiv._oldOverflow=null;}});}
-this.moveTo(px);if(!this.autoSize&&!this.size){this.setSize(this.contentSize);}
-this.setBackgroundColor();this.setOpacity();this.setBorder();this.setContentHTML();if(this.panMapIfOutOfView){this.panIntoView();}
-return this.div;},updatePosition:function(){if((this.lonlat)&&(this.map)){var px=this.map.getLayerPxFromLonLat(this.lonlat);if(px){this.moveTo(px);}}},moveTo:function(px){if((px!=null)&&(this.div!=null)){this.div.style.left=px.x+"px";this.div.style.top=px.y+"px";}},visible:function(){return OpenLayers.Element.visible(this.div);},toggle:function(){if(this.visible()){this.hide();}else{this.show();}},show:function(){OpenLayers.Element.show(this.div);if(this.panMapIfOutOfView){this.panIntoView();}},hide:function(){OpenLayers.Element.hide(this.div);},setSize:function(contentSize){this.size=contentSize.clone();var contentDivPadding=this.getContentDivPadding();var wPadding=contentDivPadding.left+contentDivPadding.right;var hPadding=contentDivPadding.top+contentDivPadding.bottom;this.fixPadding();wPadding+=this.padding.left+this.padding.right;hPadding+=this.padding.top+this.padding.bottom;if(this.closeDiv){var closeDivWidth=parseInt(this.closeDiv.style.width);wPadding+=closeDivWidth+contentDivPadding.right;}
-this.size.w+=wPadding;this.size.h+=hPadding;if(OpenLayers.Util.getBrowserName()=="msie"){this.contentSize.w+=contentDivPadding.left+contentDivPadding.right;this.contentSize.h+=contentDivPadding.bottom+contentDivPadding.top;}
-if(this.div!=null){this.div.style.width=this.size.w+"px";this.div.style.height=this.size.h+"px";}
-if(this.contentDiv!=null){this.contentDiv.style.width=contentSize.w+"px";this.contentDiv.style.height=contentSize.h+"px";}},updateSize:function(){var preparedHTML="<div class='"+this.contentDisplayClass+"'>"+
-this.contentDiv.innerHTML+"</div>";var containerElement=(this.map)?this.map.layerContainerDiv:document.body;var realSize=OpenLayers.Util.getRenderedDimensions(preparedHTML,null,{displayClass:this.displayClass,containerElement:containerElement});var safeSize=this.getSafeContentSize(realSize);var newSize=null;if(safeSize.equals(realSize)){newSize=realSize;}else{var fixedSize=new OpenLayers.Size();fixedSize.w=(safeSize.w<realSize.w)?safeSize.w:null;fixedSize.h=(safeSize.h<realSize.h)?safeSize.h:null;if(fixedSize.w&&fixedSize.h){newSize=safeSize;}else{var clippedSize=OpenLayers.Util.getRenderedDimensions(preparedHTML,fixedSize,{displayClass:this.contentDisplayClass,containerElement:containerElement});var currentOverflow=OpenLayers.Element.getStyle(this.contentDiv,"overflow");if((currentOverflow!="hidden")&&(clippedSize.equals(safeSize))){var scrollBar=OpenLayers.Util.getScrollbarWidth();if(fixedSize.w){clippedSize.h+=scrollBar;}else{clippedSize.w+=scrollBar;}}
-newSize=this.getSafeContentSize(clippedSize);}}
-this.setSize(newSize);},setBackgroundColor:function(color){if(color!=undefined){this.backgroundColor=color;}
-if(this.div!=null){this.div.style.backgroundColor=this.backgroundColor;}},setOpacity:function(opacity){if(opacity!=undefined){this.opacity=opacity;}
-if(this.div!=null){this.div.style.opacity=this.opacity;this.div.style.filter='alpha(opacity='+this.opacity*100+')';}},setBorder:function(border){if(border!=undefined){this.border=border;}
-if(this.div!=null){this.div.style.border=this.border;}},setContentHTML:function(contentHTML){if(contentHTML!=null){this.contentHTML=contentHTML;}
-if((this.contentDiv!=null)&&(this.contentHTML!=null)&&(this.contentHTML!=this.contentDiv.innerHTML)){this.contentDiv.innerHTML=this.contentHTML;if(this.autoSize){this.registerImageListeners();this.updateSize();}}},registerImageListeners:function(){var onImgLoad=function(){this.popup.updateSize();if(this.popup.visible()&&this.popup.panMapIfOutOfView){this.popup.panIntoView();}
-OpenLayers.Event.stopObserving(this.img,"load",this.img._onImageLoad);};var images=this.contentDiv.getElementsByTagName("img");for(var i=0,len=images.length;i<len;i++){var img=images[i];if(img.width==0||img.height==0){var context={'popup':this,'img':img};img._onImgLoad=OpenLayers.Function.bind(onImgLoad,context);OpenLayers.Event.observe(img,'load',img._onImgLoad);}}},getSafeContentSize:function(size){var safeContentSize=size.clone();var contentDivPadding=this.getContentDivPadding();var wPadding=contentDivPadding.left+contentDivPadding.right;var hPadding=contentDivPadding.top+contentDivPadding.bottom;this.fixPadding();wPadding+=this.padding.left+this.padding.right;hPadding+=this.padding.top+this.padding.bottom;if(this.closeDiv){var closeDivWidth=parseInt(this.closeDiv.style.width);wPadding+=closeDivWidth+contentDivPadding.right;}
-if(this.minSize){safeContentSize.w=Math.max(safeContentSize.w,(this.minSize.w-wPadding));safeContentSize.h=Math.max(safeContentSize.h,(this.minSize.h-hPadding));}
-if(this.maxSize){safeContentSize.w=Math.min(safeContentSize.w,(this.maxSize.w-wPadding));safeContentSize.h=Math.min(safeContentSize.h,(this.maxSize.h-hPadding));}
-if(this.map&&this.map.size){var extraX=0,extraY=0;if(this.keepInMap&&!this.panMapIfOutOfView){var px=this.map.getPixelFromLonLat(this.lonlat);switch(this.relativePosition){case"tr":extraX=px.x;extraY=this.map.size.h-px.y;break;case"tl":extraX=this.map.size.w-px.x;extraY=this.map.size.h-px.y;break;case"bl":extraX=this.map.size.w-px.x;extraY=px.y;break;case"br":extraX=px.x;extraY=px.y;break;default:extraX=px.x;extraY=this.map.size.h-px.y;break;}}
-var maxY=this.map.size.h-
-this.map.paddingForPopups.top-
-this.map.paddingForPopups.bottom-
-hPadding-extraY;var maxX=this.map.size.w-
-this.map.paddingForPopups.left-
-this.map.paddingForPopups.right-
-wPadding-extraX;safeContentSize.w=Math.min(safeContentSize.w,maxX);safeContentSize.h=Math.min(safeContentSize.h,maxY);}
-return safeContentSize;},getContentDivPadding:function(){var contentDivPadding=this._contentDivPadding;if(!contentDivPadding){if(this.div.parentNode==null){this.div.style.display="none";document.body.appendChild(this.div);}
-contentDivPadding=new OpenLayers.Bounds(OpenLayers.Element.getStyle(this.contentDiv,"padding-left"),OpenLayers.Element.getStyle(this.contentDiv,"padding-bottom"),OpenLayers.Element.getStyle(this.contentDiv,"padding-right"),OpenLayers.Element.getStyle(this.contentDiv,"padding-top"));this._contentDivPadding=contentDivPadding;if(this.div.parentNode==document.body){document.body.removeChild(this.div);this.div.style.display="";}}
-return contentDivPadding;},addCloseBox:function(callback){this.closeDiv=OpenLayers.Util.createDiv(this.id+"_close",null,new OpenLayers.Size(17,17));this.closeDiv.className="olPopupCloseBox";var contentDivPadding=this.getContentDivPadding();this.closeDiv.style.right=contentDivPadding.right+"px";this.closeDiv.style.top=contentDivPadding.top+"px";this.groupDiv.appendChild(this.closeDiv);var closePopup=callback||function(e){this.hide();OpenLayers.Event.stop(e);};OpenLayers.Event.observe(this.closeDiv,"click",OpenLayers.Function.bindAsEventListener(closePopup,this));},panIntoView:function(){var mapSize=this.map.getSize();var origTL=this.map.getViewPortPxFromLayerPx(new OpenLayers.Pixel(parseInt(this.div.style.left),parseInt(this.div.style.top)));var newTL=origTL.clone();if(origTL.x<this.map.paddingForPopups.left){newTL.x=this.map.paddingForPopups.left;}else
-if((origTL.x+this.size.w)>(mapSize.w-this.map.paddingForPopups.right)){newTL.x=mapSize.w-this.map.paddingForPopups.right-this.size.w;}
-if(origTL.y<this.map.paddingForPopups.top){newTL.y=this.map.paddingForPopups.top;}else
-if((origTL.y+this.size.h)>(mapSize.h-this.map.paddingForPopups.bottom)){newTL.y=mapSize.h-this.map.paddingForPopups.bottom-this.size.h;}
-var dx=origTL.x-newTL.x;var dy=origTL.y-newTL.y;this.map.pan(dx,dy);},registerEvents:function(){this.events=new OpenLayers.Events(this,this.div,null,true);this.events.on({"mousedown":this.onmousedown,"mousemove":this.onmousemove,"mouseup":this.onmouseup,"click":this.onclick,"mouseout":this.onmouseout,"dblclick":this.ondblclick,scope:this});},onmousedown:function(evt){this.mousedown=true;OpenLayers.Event.stop(evt,true);},onmousemove:function(evt){if(this.mousedown){OpenLayers.Event.stop(evt,true);}},onmouseup:function(evt){if(this.mousedown){this.mousedown=false;OpenLayers.Event.stop(evt,true);}},onclick:function(evt){OpenLayers.Event.stop(evt,true);},onmouseout:function(evt){this.mousedown=false;},ondblclick:function(evt){OpenLayers.Event.stop(evt,true);},CLASS_NAME:"OpenLayers.Popup"});OpenLayers.Popup.WIDTH=200;OpenLayers.Popup.HEIGHT=200;OpenLayers.Popup.COLOR="white";OpenLayers.Popup.OPACITY=1;OpenLayers.Popup.BORDER="0px";OpenLayers.Protocol=OpenLayers.Class({format:null,options:null,autoDestroy:true,defaultFilter:null,initialize:function(options){options=options||{};OpenLayers.Util.extend(this,options);this.options=options;},mergeWithDefaultFilter:function(filter){var merged;if(filter&&this.defaultFilter){merged=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.defaultFilter,filter]});}else{merged=filter||this.defaultFilter||undefined;}
-return merged;},destroy:function(){this.options=null;this.format=null;},read:function(options){options=options||{};options.filter=this.mergeWithDefaultFilter(options.filter);},create:function(){},update:function(){},"delete":function(){},commit:function(){},abort:function(response){},createCallback:function(method,response,options){return OpenLayers.Function.bind(function(){method.apply(this,[response,options]);},this);},CLASS_NAME:"OpenLayers.Protocol"});OpenLayers.Protocol.Response=OpenLayers.Class({code:null,requestType:null,last:true,features:null,reqFeatures:null,priv:null,initialize:function(options){OpenLayers.Util.extend(this,options);},success:function(){return this.code>0;},CLASS_NAME:"OpenLayers.Protocol.Response"});OpenLayers.Protocol.Response.SUCCESS=1;OpenLayers.Protocol.Response.FAILURE=0;OpenLayers.Renderer=OpenLayers.Class({container:null,root:null,extent:null,locked:false,size:null,resolution:null,map:null,initialize:function(containerID,options){this.container=OpenLayers.Util.getElement(containerID);},destroy:function(){this.container=null;this.extent=null;this.size=null;this.resolution=null;this.map=null;},supported:function(){return false;},setExtent:function(extent,resolutionChanged){this.extent=extent.clone();if(resolutionChanged){this.resolution=null;}},setSize:function(size){this.size=size.clone();this.resolution=null;},getResolution:function(){this.resolution=this.resolution||this.map.getResolution();return this.resolution;},drawFeature:function(feature,style){if(style==null){style=feature.style;}
-if(feature.geometry){var bounds=feature.geometry.getBounds();if(bounds){if(!bounds.intersectsBounds(this.extent)){style={display:"none"};}
-var rendered=this.drawGeometry(feature.geometry,style,feature.id);if(style.display!="none"&&style.label&&rendered!==false){var location=feature.geometry.getCentroid();if(style.labelXOffset||style.labelYOffset){xOffset=isNaN(style.labelXOffset)?0:style.labelXOffset;yOffset=isNaN(style.labelYOffset)?0:style.labelYOffset;var res=this.getResolution();location.move(xOffset*res,yOffset*res);}
-this.drawText(feature.id,style,location);}else{this.removeText(feature.id);}
-return rendered;}}},drawGeometry:function(geometry,style,featureId){},drawText:function(featureId,style,location){},removeText:function(featureId){},clear:function(){},getFeatureIdFromEvent:function(evt){},eraseFeatures:function(features){if(!(features instanceof Array)){features=[features];}
-for(var i=0,len=features.length;i<len;++i){var feature=features[i];this.eraseGeometry(feature.geometry,feature.id);this.removeText(feature.id);}},eraseGeometry:function(geometry,featureId){},moveRoot:function(renderer){},getRenderLayerId:function(){return this.container.id;},applyDefaultSymbolizer:function(symbolizer){var result=OpenLayers.Util.extend({},OpenLayers.Renderer.defaultSymbolizer);if(symbolizer.stroke===false){delete result.strokeWidth;delete result.strokeColor;}
-if(symbolizer.fill===false){delete result.fillColor;}
-OpenLayers.Util.extend(result,symbolizer);return result;},CLASS_NAME:"OpenLayers.Renderer"});OpenLayers.Renderer.defaultSymbolizer={fillColor:"#000000",strokeColor:"#000000",strokeWidth:2,fillOpacity:1,strokeOpacity:1,pointRadius:0};OpenLayers.Strategy=OpenLayers.Class({layer:null,options:null,active:null,autoActivate:true,autoDestroy:true,initialize:function(options){OpenLayers.Util.extend(this,options);this.options=options;this.active=false;},destroy:function(){this.deactivate();this.layer=null;this.options=null;},setLayer:function(layer){this.layer=layer;},activate:function(){if(!this.active){this.active=true;return true;}
-return false;},deactivate:function(){if(this.active){this.active=false;return true;}
-return false;},CLASS_NAME:"OpenLayers.Strategy"});OpenLayers.Symbolizer=OpenLayers.Class({zIndex:0,initialize:function(config){OpenLayers.Util.extend(this,config);},clone:function(){var Type=eval(this.CLASS_NAME);return new Type(OpenLayers.Util.extend({},this));},CLASS_NAME:"OpenLayers.Symbolizer"});OpenLayers.Rico.Color=OpenLayers.Class({initialize:function(red,green,blue){this.rgb={r:red,g:green,b:blue};},setRed:function(r){this.rgb.r=r;},setGreen:function(g){this.rgb.g=g;},setBlue:function(b){this.rgb.b=b;},setHue:function(h){var hsb=this.asHSB();hsb.h=h;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,hsb.b);},setSaturation:function(s){var hsb=this.asHSB();hsb.s=s;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,hsb.b);},setBrightness:function(b){var hsb=this.asHSB();hsb.b=b;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,hsb.b);},darken:function(percent){var hsb=this.asHSB();this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,Math.max(hsb.b-percent,0));},brighten:function(percent){var hsb=this.asHSB();this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,Math.min(hsb.b+percent,1));},blend:function(other){this.rgb.r=Math.floor((this.rgb.r+other.rgb.r)/2);this.rgb.g=Math.floor((this.rgb.g+other.rgb.g)/2);this.rgb.b=Math.floor((this.rgb.b+other.rgb.b)/2);},isBright:function(){var hsb=this.asHSB();return this.asHSB().b>0.5;},isDark:function(){return!this.isBright();},asRGB:function(){return"rgb("+this.rgb.r+","+this.rgb.g+","+this.rgb.b+")";},asHex:function(){return"#"+this.rgb.r.toColorPart()+this.rgb.g.toColorPart()+this.rgb.b.toColorPart();},asHSB:function(){return OpenLayers.Rico.Color.RGBtoHSB(this.rgb.r,this.rgb.g,this.rgb.b);},toString:function(){return this.asHex();}});OpenLayers.Rico.Color.createFromHex=function(hexCode){if(hexCode.length==4){var shortHexCode=hexCode;var hexCode='#';for(var i=1;i<4;i++){hexCode+=(shortHexCode.charAt(i)+
-shortHexCode.charAt(i));}}
-if(hexCode.indexOf('#')==0){hexCode=hexCode.substring(1);}
-var red=hexCode.substring(0,2);var green=hexCode.substring(2,4);var blue=hexCode.substring(4,6);return new OpenLayers.Rico.Color(parseInt(red,16),parseInt(green,16),parseInt(blue,16));};OpenLayers.Rico.Color.createColorFromBackground=function(elem){var actualColor=RicoUtil.getElementsComputedStyle(OpenLayers.Util.getElement(elem),"backgroundColor","background-color");if(actualColor=="transparent"&&elem.parentNode){return OpenLayers.Rico.Color.createColorFromBackground(elem.parentNode);}
-if(actualColor==null){return new OpenLayers.Rico.Color(255,255,255);}
-if(actualColor.indexOf("rgb(")==0){var colors=actualColor.substring(4,actualColor.length-1);var colorArray=colors.split(",");return new OpenLayers.Rico.Color(parseInt(colorArray[0]),parseInt(colorArray[1]),parseInt(colorArray[2]));}
-else if(actualColor.indexOf("#")==0){return OpenLayers.Rico.Color.createFromHex(actualColor);}
-else{return new OpenLayers.Rico.Color(255,255,255);}};OpenLayers.Rico.Color.HSBtoRGB=function(hue,saturation,brightness){var red=0;var green=0;var blue=0;if(saturation==0){red=parseInt(brightness*255.0+0.5);green=red;blue=red;}
-else{var h=(hue-Math.floor(hue))*6.0;var f=h-Math.floor(h);var p=brightness*(1.0-saturation);var q=brightness*(1.0-saturation*f);var t=brightness*(1.0-(saturation*(1.0-f)));switch(parseInt(h)){case 0:red=(brightness*255.0+0.5);green=(t*255.0+0.5);blue=(p*255.0+0.5);break;case 1:red=(q*255.0+0.5);green=(brightness*255.0+0.5);blue=(p*255.0+0.5);break;case 2:red=(p*255.0+0.5);green=(brightness*255.0+0.5);blue=(t*255.0+0.5);break;case 3:red=(p*255.0+0.5);green=(q*255.0+0.5);blue=(brightness*255.0+0.5);break;case 4:red=(t*255.0+0.5);green=(p*255.0+0.5);blue=(brightness*255.0+0.5);break;case 5:red=(brightness*255.0+0.5);green=(p*255.0+0.5);blue=(q*255.0+0.5);break;}}
-return{r:parseInt(red),g:parseInt(green),b:parseInt(blue)};};OpenLayers.Rico.Color.RGBtoHSB=function(r,g,b){var hue;var saturation;var brightness;var cmax=(r>g)?r:g;if(b>cmax){cmax=b;}
-var cmin=(r<g)?r:g;if(b<cmin){cmin=b;}
-brightness=cmax/255.0;if(cmax!=0){saturation=(cmax-cmin)/cmax;}else{saturation=0;}
-if(saturation==0){hue=0;}else{var redc=(cmax-r)/(cmax-cmin);var greenc=(cmax-g)/(cmax-cmin);var bluec=(cmax-b)/(cmax-cmin);if(r==cmax){hue=bluec-greenc;}else if(g==cmax){hue=2.0+redc-bluec;}else{hue=4.0+greenc-redc;}
-hue=hue/6.0;if(hue<0){hue=hue+1.0;}}
-return{h:hue,s:saturation,b:brightness};};OpenLayers.Bounds=OpenLayers.Class({left:null,bottom:null,right:null,top:null,centerLonLat:null,initialize:function(left,bottom,right,top){if(left!=null){this.left=OpenLayers.Util.toFloat(left);}
-if(bottom!=null){this.bottom=OpenLayers.Util.toFloat(bottom);}
-if(right!=null){this.right=OpenLayers.Util.toFloat(right);}
-if(top!=null){this.top=OpenLayers.Util.toFloat(top);}},clone:function(){return new OpenLayers.Bounds(this.left,this.bottom,this.right,this.top);},equals:function(bounds){var equals=false;if(bounds!=null){equals=((this.left==bounds.left)&&(this.right==bounds.right)&&(this.top==bounds.top)&&(this.bottom==bounds.bottom));}
-return equals;},toString:function(){return("left-bottom=("+this.left+","+this.bottom+")"
-+" right-top=("+this.right+","+this.top+")");},toArray:function(reverseAxisOrder){if(reverseAxisOrder===true){return[this.bottom,this.left,this.top,this.right];}else{return[this.left,this.bottom,this.right,this.top];}},toBBOX:function(decimal,reverseAxisOrder){if(decimal==null){decimal=6;}
-var mult=Math.pow(10,decimal);var xmin=Math.round(this.left*mult)/mult;var ymin=Math.round(this.bottom*mult)/mult;var xmax=Math.round(this.right*mult)/mult;var ymax=Math.round(this.top*mult)/mult;if(reverseAxisOrder===true){return ymin+","+xmin+","+ymax+","+xmax;}else{return xmin+","+ymin+","+xmax+","+ymax;}},toGeometry:function(){return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(this.left,this.bottom),new OpenLayers.Geometry.Point(this.right,this.bottom),new OpenLayers.Geometry.Point(this.right,this.top),new OpenLayers.Geometry.Point(this.left,this.top)])]);},getWidth:function(){return(this.right-this.left);},getHeight:function(){return(this.top-this.bottom);},getSize:function(){return new OpenLayers.Size(this.getWidth(),this.getHeight());},getCenterPixel:function(){return new OpenLayers.Pixel((this.left+this.right)/2,(this.bottom+this.top)/2);},getCenterLonLat:function(){if(!this.centerLonLat){this.centerLonLat=new OpenLayers.LonLat((this.left+this.right)/2,(this.bottom+this.top)/2);}
-return this.centerLonLat;},scale:function(ratio,origin){if(origin==null){origin=this.getCenterLonLat();}
-var origx,origy;if(origin.CLASS_NAME=="OpenLayers.LonLat"){origx=origin.lon;origy=origin.lat;}else{origx=origin.x;origy=origin.y;}
-var left=(this.left-origx)*ratio+origx;var bottom=(this.bottom-origy)*ratio+origy;var right=(this.right-origx)*ratio+origx;var top=(this.top-origy)*ratio+origy;return new OpenLayers.Bounds(left,bottom,right,top);},add:function(x,y){if((x==null)||(y==null)){var msg=OpenLayers.i18n("boundsAddError");OpenLayers.Console.error(msg);return null;}
-return new OpenLayers.Bounds(this.left+x,this.bottom+y,this.right+x,this.top+y);},extend:function(object){var bounds=null;if(object){switch(object.CLASS_NAME){case"OpenLayers.LonLat":bounds=new OpenLayers.Bounds(object.lon,object.lat,object.lon,object.lat);break;case"OpenLayers.Geometry.Point":bounds=new OpenLayers.Bounds(object.x,object.y,object.x,object.y);break;case"OpenLayers.Bounds":bounds=object;break;}
-if(bounds){this.centerLonLat=null;if((this.left==null)||(bounds.left<this.left)){this.left=bounds.left;}
-if((this.bottom==null)||(bounds.bottom<this.bottom)){this.bottom=bounds.bottom;}
-if((this.right==null)||(bounds.right>this.right)){this.right=bounds.right;}
-if((this.top==null)||(bounds.top>this.top)){this.top=bounds.top;}}}},containsLonLat:function(ll,inclusive){return this.contains(ll.lon,ll.lat,inclusive);},containsPixel:function(px,inclusive){return this.contains(px.x,px.y,inclusive);},contains:function(x,y,inclusive){if(inclusive==null){inclusive=true;}
-if(x==null||y==null){return false;}
-x=OpenLayers.Util.toFloat(x);y=OpenLayers.Util.toFloat(y);var contains=false;if(inclusive){contains=((x>=this.left)&&(x<=this.right)&&(y>=this.bottom)&&(y<=this.top));}else{contains=((x>this.left)&&(x<this.right)&&(y>this.bottom)&&(y<this.top));}
-return contains;},intersectsBounds:function(bounds,inclusive){if(inclusive==null){inclusive=true;}
-var intersects=false;var mightTouch=(this.left==bounds.right||this.right==bounds.left||this.top==bounds.bottom||this.bottom==bounds.top);if(inclusive||!mightTouch){var inBottom=(((bounds.bottom>=this.bottom)&&(bounds.bottom<=this.top))||((this.bottom>=bounds.bottom)&&(this.bottom<=bounds.top)));var inTop=(((bounds.top>=this.bottom)&&(bounds.top<=this.top))||((this.top>bounds.bottom)&&(this.top<bounds.top)));var inLeft=(((bounds.left>=this.left)&&(bounds.left<=this.right))||((this.left>=bounds.left)&&(this.left<=bounds.right)));var inRight=(((bounds.right>=this.left)&&(bounds.right<=this.right))||((this.right>=bounds.left)&&(this.right<=bounds.right)));intersects=((inBottom||inTop)&&(inLeft||inRight));}
-return intersects;},containsBounds:function(bounds,partial,inclusive){if(partial==null){partial=false;}
-if(inclusive==null){inclusive=true;}
-var bottomLeft=this.contains(bounds.left,bounds.bottom,inclusive);var bottomRight=this.contains(bounds.right,bounds.bottom,inclusive);var topLeft=this.contains(bounds.left,bounds.top,inclusive);var topRight=this.contains(bounds.right,bounds.top,inclusive);return(partial)?(bottomLeft||bottomRight||topLeft||topRight):(bottomLeft&&bottomRight&&topLeft&&topRight);},determineQuadrant:function(lonlat){var quadrant="";var center=this.getCenterLonLat();quadrant+=(lonlat.lat<center.lat)?"b":"t";quadrant+=(lonlat.lon<center.lon)?"l":"r";return quadrant;},transform:function(source,dest){this.centerLonLat=null;var ll=OpenLayers.Projection.transform({'x':this.left,'y':this.bottom},source,dest);var lr=OpenLayers.Projection.transform({'x':this.right,'y':this.bottom},source,dest);var ul=OpenLayers.Projection.transform({'x':this.left,'y':this.top},source,dest);var ur=OpenLayers.Projection.transform({'x':this.right,'y':this.top},source,dest);this.left=Math.min(ll.x,ul.x);this.bottom=Math.min(ll.y,lr.y);this.right=Math.max(lr.x,ur.x);this.top=Math.max(ul.y,ur.y);return this;},wrapDateLine:function(maxExtent,options){options=options||{};var leftTolerance=options.leftTolerance||0;var rightTolerance=options.rightTolerance||0;var newBounds=this.clone();if(maxExtent){while(newBounds.left<maxExtent.left&&(newBounds.right-rightTolerance)<=maxExtent.left){newBounds=newBounds.add(maxExtent.getWidth(),0);}
-while((newBounds.left+leftTolerance)>=maxExtent.right&&newBounds.right>maxExtent.right){newBounds=newBounds.add(-maxExtent.getWidth(),0);}}
-return newBounds;},CLASS_NAME:"OpenLayers.Bounds"});OpenLayers.Bounds.fromString=function(str){var bounds=str.split(",");return OpenLayers.Bounds.fromArray(bounds);};OpenLayers.Bounds.fromArray=function(bbox){return new OpenLayers.Bounds(parseFloat(bbox[0]),parseFloat(bbox[1]),parseFloat(bbox[2]),parseFloat(bbox[3]));};OpenLayers.Bounds.fromSize=function(size){return new OpenLayers.Bounds(0,size.h,size.w,0);};OpenLayers.Bounds.oppositeQuadrant=function(quadrant){var opp="";opp+=(quadrant.charAt(0)=='t')?'b':'t';opp+=(quadrant.charAt(1)=='l')?'r':'l';return opp;};OpenLayers.LonLat=OpenLayers.Class({lon:0.0,lat:0.0,initialize:function(lon,lat){this.lon=OpenLayers.Util.toFloat(lon);this.lat=OpenLayers.Util.toFloat(lat);},toString:function(){return("lon="+this.lon+",lat="+this.lat);},toShortString:function(){return(this.lon+", "+this.lat);},clone:function(){return new OpenLayers.LonLat(this.lon,this.lat);},add:function(lon,lat){if((lon==null)||(lat==null)){var msg=OpenLayers.i18n("lonlatAddError");OpenLayers.Console.error(msg);return null;}
-return new OpenLayers.LonLat(this.lon+OpenLayers.Util.toFloat(lon),this.lat+OpenLayers.Util.toFloat(lat));},equals:function(ll){var equals=false;if(ll!=null){equals=((this.lon==ll.lon&&this.lat==ll.lat)||(isNaN(this.lon)&&isNaN(this.lat)&&isNaN(ll.lon)&&isNaN(ll.lat)));}
-return equals;},transform:function(source,dest){var point=OpenLayers.Projection.transform({'x':this.lon,'y':this.lat},source,dest);this.lon=point.x;this.lat=point.y;return this;},wrapDateLine:function(maxExtent){var newLonLat=this.clone();if(maxExtent){while(newLonLat.lon<maxExtent.left){newLonLat.lon+=maxExtent.getWidth();}
-while(newLonLat.lon>maxExtent.right){newLonLat.lon-=maxExtent.getWidth();}}
-return newLonLat;},CLASS_NAME:"OpenLayers.LonLat"});OpenLayers.LonLat.fromString=function(str){var pair=str.split(",");return new OpenLayers.LonLat(pair[0],pair[1]);};OpenLayers.Pixel=OpenLayers.Class({x:0.0,y:0.0,initialize:function(x,y){this.x=parseFloat(x);this.y=parseFloat(y);},toString:function(){return("x="+this.x+",y="+this.y);},clone:function(){return new OpenLayers.Pixel(this.x,this.y);},equals:function(px){var equals=false;if(px!=null){equals=((this.x==px.x&&this.y==px.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(px.x)&&isNaN(px.y)));}
-return equals;},add:function(x,y){if((x==null)||(y==null)){var msg=OpenLayers.i18n("pixelAddError");OpenLayers.Console.error(msg);return null;}
-return new OpenLayers.Pixel(this.x+x,this.y+y);},offset:function(px){var newPx=this.clone();if(px){newPx=this.add(px.x,px.y);}
-return newPx;},CLASS_NAME:"OpenLayers.Pixel"});OpenLayers.Control=OpenLayers.Class({id:null,map:null,div:null,type:null,allowSelection:false,displayClass:"",title:"",autoActivate:false,active:null,handler:null,eventListeners:null,events:null,EVENT_TYPES:["activate","deactivate"],initialize:function(options){this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(/\./g,"");OpenLayers.Util.extend(this,options);this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES);if(this.eventListeners instanceof Object){this.events.on(this.eventListeners);}
-if(this.id==null){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");}},destroy:function(){if(this.events){if(this.eventListeners){this.events.un(this.eventListeners);}
-this.events.destroy();this.events=null;}
-this.eventListeners=null;if(this.handler){this.handler.destroy();this.handler=null;}
-if(this.handlers){for(var key in this.handlers){if(this.handlers.hasOwnProperty(key)&&typeof this.handlers[key].destroy=="function"){this.handlers[key].destroy();}}
-this.handlers=null;}
-if(this.map){this.map.removeControl(this);this.map=null;}},setMap:function(map){this.map=map;if(this.handler){this.handler.setMap(map);}},draw:function(px){if(this.div==null){this.div=OpenLayers.Util.createDiv(this.id);this.div.className=this.displayClass;if(!this.allowSelection){this.div.className+=" olControlNoSelect";this.div.setAttribute("unselectable","on",0);this.div.onselectstart=OpenLayers.Function.False;}
-if(this.title!=""){this.div.title=this.title;}}
-if(px!=null){this.position=px.clone();}
-this.moveTo(this.position);return this.div;},moveTo:function(px){if((px!=null)&&(this.div!=null)){this.div.style.left=px.x+"px";this.div.style.top=px.y+"px";}},activate:function(){if(this.active){return false;}
-if(this.handler){this.handler.activate();}
-this.active=true;if(this.map){OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active");}
-this.events.triggerEvent("activate");return true;},deactivate:function(){if(this.active){if(this.handler){this.handler.deactivate();}
-this.active=false;if(this.map){OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active");}
-this.events.triggerEvent("deactivate");return true;}
-return false;},CLASS_NAME:"OpenLayers.Control"});OpenLayers.Control.TYPE_BUTTON=1;OpenLayers.Control.TYPE_TOGGLE=2;OpenLayers.Control.TYPE_TOOL=3;OpenLayers.Lang={code:null,defaultCode:"en",getCode:function(){if(!OpenLayers.Lang.code){OpenLayers.Lang.setCode();}
-return OpenLayers.Lang.code;},setCode:function(code){var lang;if(!code){code=(OpenLayers.Util.getBrowserName()=="msie")?navigator.userLanguage:navigator.language;}
-var parts=code.split('-');parts[0]=parts[0].toLowerCase();if(typeof OpenLayers.Lang[parts[0]]=="object"){lang=parts[0];}
-if(parts[1]){var testLang=parts[0]+'-'+parts[1].toUpperCase();if(typeof OpenLayers.Lang[testLang]=="object"){lang=testLang;}}
-if(!lang){OpenLayers.Console.warn('Failed to find OpenLayers.Lang.'+parts.join("-")+' dictionary, falling back to default language');lang=OpenLayers.Lang.defaultCode;}
-OpenLayers.Lang.code=lang;},translate:function(key,context){var dictionary=OpenLayers.Lang[OpenLayers.Lang.getCode()];var message=dictionary[key];if(!message){message=key;}
-if(context){message=OpenLayers.String.format(message,context);}
-return message;}};OpenLayers.i18n=OpenLayers.Lang.translate;OpenLayers.Popup.Anchored=OpenLayers.Class(OpenLayers.Popup,{relativePosition:null,keepInMap:true,anchor:null,initialize:function(id,lonlat,contentSize,contentHTML,anchor,closeBox,closeBoxCallback){var newArguments=[id,lonlat,contentSize,contentHTML,closeBox,closeBoxCallback];OpenLayers.Popup.prototype.initialize.apply(this,newArguments);this.anchor=(anchor!=null)?anchor:{size:new OpenLayers.Size(0,0),offset:new OpenLayers.Pixel(0,0)};},destroy:function(){this.anchor=null;this.relativePosition=null;OpenLayers.Popup.prototype.destroy.apply(this,arguments);},show:function(){this.updatePosition();OpenLayers.Popup.prototype.show.apply(this,arguments);},moveTo:function(px){var oldRelativePosition=this.relativePosition;this.relativePosition=this.calculateRelativePosition(px);var newPx=this.calculateNewPx(px);var newArguments=new Array(newPx);OpenLayers.Popup.prototype.moveTo.apply(this,newArguments);if(this.relativePosition!=oldRelativePosition){this.updateRelativePosition();}},setSize:function(contentSize){OpenLayers.Popup.prototype.setSize.apply(this,arguments);if((this.lonlat)&&(this.map)){var px=this.map.getLayerPxFromLonLat(this.lonlat);this.moveTo(px);}},calculateRelativePosition:function(px){var lonlat=this.map.getLonLatFromLayerPx(px);var extent=this.map.getExtent();var quadrant=extent.determineQuadrant(lonlat);return OpenLayers.Bounds.oppositeQuadrant(quadrant);},updateRelativePosition:function(){},calculateNewPx:function(px){var newPx=px.offset(this.anchor.offset);var size=this.size||this.contentSize;var top=(this.relativePosition.charAt(0)=='t');newPx.y+=(top)?-(size.h+this.anchor.size.h):this.anchor.size.h;var left=(this.relativePosition.charAt(1)=='l');newPx.x+=(left)?-(size.w+this.anchor.size.w):this.anchor.size.w;return newPx;},CLASS_NAME:"OpenLayers.Popup.Anchored"});OpenLayers.Protocol.SOS=function(options){options=OpenLayers.Util.applyDefaults(options,OpenLayers.Protocol.SOS.DEFAULTS);var cls=OpenLayers.Protocol.SOS["v"+options.version.replace(/\./g,"_")];if(!cls){throw"Unsupported SOS version: "+options.version;}
-return new cls(options);};OpenLayers.Protocol.SOS.DEFAULTS={"version":"1.0.0"};OpenLayers.Protocol.SQL=OpenLayers.Class(OpenLayers.Protocol,{databaseName:'ol',tableName:"ol_vector_features",postReadFiltering:true,initialize:function(options){OpenLayers.Protocol.prototype.initialize.apply(this,[options]);},destroy:function(){OpenLayers.Protocol.prototype.destroy.apply(this);},supported:function(){return false;},evaluateFilter:function(feature,filter){return filter&&this.postReadFiltering?filter.evaluate(feature):true;},CLASS_NAME:"OpenLayers.Protocol.SQL"});OpenLayers.Protocol.WFS=function(options){options=OpenLayers.Util.applyDefaults(options,OpenLayers.Protocol.WFS.DEFAULTS);var cls=OpenLayers.Protocol.WFS["v"+options.version.replace(/\./g,"_")];if(!cls){throw"Unsupported WFS version: "+options.version;}
-return new cls(options);};OpenLayers.Protocol.WFS.fromWMSLayer=function(layer,options){var typeName,featurePrefix;var param=layer.params["LAYERS"];var parts=(param instanceof Array?param[0]:param).split(":");if(parts.length>1){featurePrefix=parts[0];}
-typeName=parts.pop();var protocolOptions={url:layer.url,featureType:typeName,featurePrefix:featurePrefix,srsName:layer.projection&&layer.projection.getCode()||layer.map&&layer.map.getProjectionObject().getCode(),version:"1.1.0"};return new OpenLayers.Protocol.WFS(OpenLayers.Util.applyDefaults(options,protocolOptions));};OpenLayers.Protocol.WFS.DEFAULTS={"version":"1.0.0"};OpenLayers.Renderer.Canvas=OpenLayers.Class(OpenLayers.Renderer,{canvas:null,features:null,initialize:function(containerID){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.root=document.createElement("canvas");this.container.appendChild(this.root);this.canvas=this.root.getContext("2d");this.features={};},eraseGeometry:function(geometry,featureId){this.eraseFeatures(this.features[featureId][0]);},supported:function(){var canvas=document.createElement("canvas");return!!canvas.getContext;},setExtent:function(extent){this.extent=extent.clone();this.resolution=null;this.redraw();},setSize:function(size){this.size=size.clone();this.root.style.width=size.w+"px";this.root.style.height=size.h+"px";this.root.width=size.w;this.root.height=size.h;this.resolution=null;},drawFeature:function(feature,style){style=style||feature.style;style=this.applyDefaultSymbolizer(style);this.features[feature.id]=[feature,style];this.redraw();},drawGeometry:function(geometry,style){var className=geometry.CLASS_NAME;if((className=="OpenLayers.Geometry.Collection")||(className=="OpenLayers.Geometry.MultiPoint")||(className=="OpenLayers.Geometry.MultiLineString")||(className=="OpenLayers.Geometry.MultiPolygon")){for(var i=0;i<geometry.components.length;i++){this.drawGeometry(geometry.components[i],style);}
-return;}
-switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":this.drawPoint(geometry,style);break;case"OpenLayers.Geometry.LineString":this.drawLineString(geometry,style);break;case"OpenLayers.Geometry.LinearRing":this.drawLinearRing(geometry,style);break;case"OpenLayers.Geometry.Polygon":this.drawPolygon(geometry,style);break;default:break;}},drawExternalGraphic:function(pt,style){var img=new Image();if(style.graphicTitle){img.title=style.graphicTitle;}
-var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var context={img:img,x:(pt[0]+xOffset),y:(pt[1]+yOffset),width:width,height:height,opacity:style.graphicOpacity||style.fillOpacity,canvas:this.canvas};img.onload=OpenLayers.Function.bind(function(){this.canvas.globalAlpha=this.opacity;this.canvas.drawImage(this.img,this.x,this.y,this.width,this.height);},context);img.src=style.externalGraphic;},setCanvasStyle:function(type,style){if(type=="fill"){this.canvas.globalAlpha=style['fillOpacity'];this.canvas.fillStyle=style['fillColor'];}else if(type=="stroke"){this.canvas.globalAlpha=style['strokeOpacity'];this.canvas.strokeStyle=style['strokeColor'];this.canvas.lineWidth=style['strokeWidth'];}else{this.canvas.globalAlpha=0;this.canvas.lineWidth=1;}},drawPoint:function(geometry,style){if(style.graphic!==false){var pt=this.getLocalXY(geometry);if(style.externalGraphic){this.drawExternalGraphic(pt,style);}else{if(style.fill!==false){this.setCanvasStyle("fill",style);this.canvas.beginPath();this.canvas.arc(pt[0],pt[1],style.pointRadius,0,Math.PI*2,true);this.canvas.fill();}
-if(style.stroke!==false){this.setCanvasStyle("stroke",style);this.canvas.beginPath();this.canvas.arc(pt[0],pt[1],style.pointRadius,0,Math.PI*2,true);this.canvas.stroke();this.setCanvasStyle("reset");}}}},drawLineString:function(geometry,style){if(style.stroke!==false){this.setCanvasStyle("stroke",style);this.canvas.beginPath();var start=this.getLocalXY(geometry.components[0]);this.canvas.moveTo(start[0],start[1]);for(var i=1;i<geometry.components.length;i++){var pt=this.getLocalXY(geometry.components[i]);this.canvas.lineTo(pt[0],pt[1]);}
-this.canvas.stroke();}
-this.setCanvasStyle("reset");},drawLinearRing:function(geometry,style){if(style.fill!==false){this.setCanvasStyle("fill",style);this.canvas.beginPath();var start=this.getLocalXY(geometry.components[0]);this.canvas.moveTo(start[0],start[1]);for(var i=1;i<geometry.components.length-1;i++){var pt=this.getLocalXY(geometry.components[i]);this.canvas.lineTo(pt[0],pt[1]);}
-this.canvas.fill();}
-if(style.stroke!==false){this.setCanvasStyle("stroke",style);this.canvas.beginPath();var start=this.getLocalXY(geometry.components[0]);this.canvas.moveTo(start[0],start[1]);for(var i=1;i<geometry.components.length;i++){var pt=this.getLocalXY(geometry.components[i]);this.canvas.lineTo(pt[0],pt[1]);}
-this.canvas.stroke();}
-this.setCanvasStyle("reset");},drawPolygon:function(geometry,style){this.drawLinearRing(geometry.components[0],style);for(var i=1;i<geometry.components.length;i++){this.drawLinearRing(geometry.components[i],{fillOpacity:0,strokeWidth:0,strokeOpacity:0,strokeColor:'#000000',fillColor:'#000000'});}},drawText:function(location,style){style=OpenLayers.Util.extend({fontColor:"#000000",labelAlign:"cm"},style);var pt=this.getLocalXY(location);this.setCanvasStyle("reset");this.canvas.fillStyle=style.fontColor;this.canvas.globalAlpha=style.fontOpacity||1.0;var fontStyle=style.fontWeight+" "+style.fontSize+" "+style.fontFamily;if(this.canvas.fillText){var labelAlign=OpenLayers.Renderer.Canvas.LABEL_ALIGN[style.labelAlign[0]]||"center";this.canvas.font=fontStyle;this.canvas.textAlign=labelAlign;this.canvas.fillText(style.label,pt[0],pt[1]);}else if(this.canvas.mozDrawText){this.canvas.mozTextStyle=fontStyle;var len=this.canvas.mozMeasureText(style.label);switch(style.labelAlign[0]){case"l":break;case"r":pt[0]-=len;break;case"c":default:pt[0]-=len/2;}
-this.canvas.translate(pt[0],pt[1]);this.canvas.mozDrawText(style.label);this.canvas.translate(-1*pt[0],-1*pt[1]);}
-this.setCanvasStyle("reset");},getLocalXY:function(point){var resolution=this.getResolution();var extent=this.extent;var x=(point.x/resolution+(-extent.left/resolution));var y=((extent.top/resolution)-point.y/resolution);return[x,y];},clear:function(){this.canvas.clearRect(0,0,this.root.width,this.root.height);this.features={};},getFeatureIdFromEvent:function(evt){var loc=this.map.getLonLatFromPixel(evt.xy);var resolution=this.getResolution();var bounds=new OpenLayers.Bounds(loc.lon-resolution*5,loc.lat-resolution*5,loc.lon+resolution*5,loc.lat+resolution*5);var geom=bounds.toGeometry();for(var feat in this.features){if(!this.features.hasOwnProperty(feat)){continue;}
-if(this.features[feat][0].geometry.intersects(geom)){return feat;}}
-return null;},eraseFeatures:function(features){if(!(features instanceof Array)){features=[features];}
-for(var i=0;i<features.length;++i){delete this.features[features[i].id];}
-this.redraw();},redraw:function(){if(!this.locked){this.canvas.clearRect(0,0,this.root.width,this.root.height);var labelMap=[];var feature,style;for(var id in this.features){if(!this.features.hasOwnProperty(id)){continue;}
-feature=this.features[id][0];style=this.features[id][1];if(!feature.geometry){continue;}
-this.drawGeometry(feature.geometry,style);if(style.label){labelMap.push([feature,style]);}}
-var item;for(var i=0,len=labelMap.length;i<len;++i){item=labelMap[i];this.drawText(item[0].geometry.getCentroid(),item[1]);}}},CLASS_NAME:"OpenLayers.Renderer.Canvas"});OpenLayers.Renderer.Canvas.LABEL_ALIGN={"l":"left","r":"right"};OpenLayers.ElementsIndexer=OpenLayers.Class({maxZIndex:null,order:null,indices:null,compare:null,initialize:function(yOrdering){this.compare=yOrdering?OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_Y_ORDER:OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_DRAWING_ORDER;this.order=[];this.indices={};this.maxZIndex=0;},insert:function(newNode){if(this.exists(newNode)){this.remove(newNode);}
-var nodeId=newNode.id;this.determineZIndex(newNode);var leftIndex=-1;var rightIndex=this.order.length;var middle;while(rightIndex-leftIndex>1){middle=parseInt((leftIndex+rightIndex)/2);var placement=this.compare(this,newNode,OpenLayers.Util.getElement(this.order[middle]));if(placement>0){leftIndex=middle;}else{rightIndex=middle;}}
-this.order.splice(rightIndex,0,nodeId);this.indices[nodeId]=this.getZIndex(newNode);return this.getNextElement(rightIndex);},remove:function(node){var nodeId=node.id;var arrayIndex=OpenLayers.Util.indexOf(this.order,nodeId);if(arrayIndex>=0){this.order.splice(arrayIndex,1);delete this.indices[nodeId];if(this.order.length>0){var lastId=this.order[this.order.length-1];this.maxZIndex=this.indices[lastId];}else{this.maxZIndex=0;}}},clear:function(){this.order=[];this.indices={};this.maxZIndex=0;},exists:function(node){return(this.indices[node.id]!=null);},getZIndex:function(node){return node._style.graphicZIndex;},determineZIndex:function(node){var zIndex=node._style.graphicZIndex;if(zIndex==null){zIndex=this.maxZIndex;node._style.graphicZIndex=zIndex;}else if(zIndex>this.maxZIndex){this.maxZIndex=zIndex;}},getNextElement:function(index){var nextIndex=index+1;if(nextIndex<this.order.length){var nextElement=OpenLayers.Util.getElement(this.order[nextIndex]);if(nextElement==undefined){nextElement=this.getNextElement(nextIndex);}
-return nextElement;}else{return null;}},CLASS_NAME:"OpenLayers.ElementsIndexer"});OpenLayers.ElementsIndexer.IndexingMethods={Z_ORDER:function(indexer,newNode,nextNode){var newZIndex=indexer.getZIndex(newNode);var returnVal=0;if(nextNode){var nextZIndex=indexer.getZIndex(nextNode);returnVal=newZIndex-nextZIndex;}
-return returnVal;},Z_ORDER_DRAWING_ORDER:function(indexer,newNode,nextNode){var returnVal=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(indexer,newNode,nextNode);if(nextNode&&returnVal==0){returnVal=1;}
-return returnVal;},Z_ORDER_Y_ORDER:function(indexer,newNode,nextNode){var returnVal=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(indexer,newNode,nextNode);if(nextNode&&returnVal===0){var result=nextNode._boundsBottom-newNode._boundsBottom;returnVal=(result===0)?1:result;}
-return returnVal;}};OpenLayers.Renderer.Elements=OpenLayers.Class(OpenLayers.Renderer,{rendererRoot:null,root:null,vectorRoot:null,textRoot:null,xmlns:null,indexer:null,BACKGROUND_ID_SUFFIX:"_background",LABEL_ID_SUFFIX:"_label",initialize:function(containerID,options){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.rendererRoot=this.createRenderRoot();this.root=this.createRoot("_root");this.vectorRoot=this.createRoot("_vroot");this.textRoot=this.createRoot("_troot");this.root.appendChild(this.vectorRoot);this.root.appendChild(this.textRoot);this.rendererRoot.appendChild(this.root);this.container.appendChild(this.rendererRoot);if(options&&(options.zIndexing||options.yOrdering)){this.indexer=new OpenLayers.ElementsIndexer(options.yOrdering);}},destroy:function(){this.clear();this.rendererRoot=null;this.root=null;this.xmlns=null;OpenLayers.Renderer.prototype.destroy.apply(this,arguments);},clear:function(){var child;var root=this.vectorRoot;if(root){while(child=root.firstChild){root.removeChild(child);}}
-root=this.textRoot;if(root){while(child=root.firstChild){root.removeChild(child);}}
-if(this.indexer){this.indexer.clear();}},getNodeType:function(geometry,style){},drawGeometry:function(geometry,style,featureId){var className=geometry.CLASS_NAME;var rendered=true;if((className=="OpenLayers.Geometry.Collection")||(className=="OpenLayers.Geometry.MultiPoint")||(className=="OpenLayers.Geometry.MultiLineString")||(className=="OpenLayers.Geometry.MultiPolygon")){for(var i=0,len=geometry.components.length;i<len;i++){rendered=this.drawGeometry(geometry.components[i],style,featureId)&&rendered;}
-return rendered;};rendered=false;if(style.display!="none"){if(style.backgroundGraphic){this.redrawBackgroundNode(geometry.id,geometry,style,featureId);}
-rendered=this.redrawNode(geometry.id,geometry,style,featureId);}
-if(rendered==false){var node=document.getElementById(geometry.id);if(node){if(node._style.backgroundGraphic){node.parentNode.removeChild(document.getElementById(geometry.id+this.BACKGROUND_ID_SUFFIX));}
-node.parentNode.removeChild(node);}}
-return rendered;},redrawNode:function(id,geometry,style,featureId){style=this.applyDefaultSymbolizer(style);var node=this.nodeFactory(id,this.getNodeType(geometry,style));node._featureId=featureId;node._boundsBottom=geometry.getBounds().bottom;node._geometryClass=geometry.CLASS_NAME;node._style=style;var drawResult=this.drawGeometryNode(node,geometry,style);if(drawResult===false){return false;}
-node=drawResult.node;if(this.indexer){var insert=this.indexer.insert(node);if(insert){this.vectorRoot.insertBefore(node,insert);}else{this.vectorRoot.appendChild(node);}}else{if(node.parentNode!==this.vectorRoot){this.vectorRoot.appendChild(node);}}
-this.postDraw(node);return drawResult.complete;},redrawBackgroundNode:function(id,geometry,style,featureId){var backgroundStyle=OpenLayers.Util.extend({},style);backgroundStyle.externalGraphic=backgroundStyle.backgroundGraphic;backgroundStyle.graphicXOffset=backgroundStyle.backgroundXOffset;backgroundStyle.graphicYOffset=backgroundStyle.backgroundYOffset;backgroundStyle.graphicZIndex=backgroundStyle.backgroundGraphicZIndex;backgroundStyle.graphicWidth=backgroundStyle.backgroundWidth||backgroundStyle.graphicWidth;backgroundStyle.graphicHeight=backgroundStyle.backgroundHeight||backgroundStyle.graphicHeight;backgroundStyle.backgroundGraphic=null;backgroundStyle.backgroundXOffset=null;backgroundStyle.backgroundYOffset=null;backgroundStyle.backgroundGraphicZIndex=null;return this.redrawNode(id+this.BACKGROUND_ID_SUFFIX,geometry,backgroundStyle,null);},drawGeometryNode:function(node,geometry,style){style=style||node._style;var options={'isFilled':style.fill===undefined?true:style.fill,'isStroked':style.stroke===undefined?!!style.strokeWidth:style.stroke};var drawn;switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":if(style.graphic===false){options.isFilled=false;options.isStroked=false;}
-drawn=this.drawPoint(node,geometry);break;case"OpenLayers.Geometry.LineString":options.isFilled=false;drawn=this.drawLineString(node,geometry);break;case"OpenLayers.Geometry.LinearRing":drawn=this.drawLinearRing(node,geometry);break;case"OpenLayers.Geometry.Polygon":drawn=this.drawPolygon(node,geometry);break;case"OpenLayers.Geometry.Surface":drawn=this.drawSurface(node,geometry);break;case"OpenLayers.Geometry.Rectangle":drawn=this.drawRectangle(node,geometry);break;default:break;}
-node._options=options;if(drawn!=false){return{node:this.setStyle(node,style,options,geometry),complete:drawn};}else{return false;}},postDraw:function(node){},drawPoint:function(node,geometry){},drawLineString:function(node,geometry){},drawLinearRing:function(node,geometry){},drawPolygon:function(node,geometry){},drawRectangle:function(node,geometry){},drawCircle:function(node,geometry){},drawSurface:function(node,geometry){},removeText:function(featureId){var label=document.getElementById(featureId+this.LABEL_ID_SUFFIX);if(label){this.textRoot.removeChild(label);}},getFeatureIdFromEvent:function(evt){var target=evt.target;var useElement=target&&target.correspondingUseElement;var node=useElement?useElement:(target||evt.srcElement);var featureId=node._featureId;return featureId;},eraseGeometry:function(geometry,featureId){if((geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPoint")||(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiLineString")||(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPolygon")||(geometry.CLASS_NAME=="OpenLayers.Geometry.Collection")){for(var i=0,len=geometry.components.length;i<len;i++){this.eraseGeometry(geometry.components[i],featureId);}}else{var element=OpenLayers.Util.getElement(geometry.id);if(element&&element.parentNode){if(element.geometry){element.geometry.destroy();element.geometry=null;}
-element.parentNode.removeChild(element);if(this.indexer){this.indexer.remove(element);}
-if(element._style.backgroundGraphic){var backgroundId=geometry.id+this.BACKGROUND_ID_SUFFIX;var bElem=OpenLayers.Util.getElement(backgroundId);if(bElem&&bElem.parentNode){bElem.parentNode.removeChild(bElem);}}}}},nodeFactory:function(id,type){var node=OpenLayers.Util.getElement(id);if(node){if(!this.nodeTypeCompare(node,type)){node.parentNode.removeChild(node);node=this.nodeFactory(id,type);}}else{node=this.createNode(type,id);}
-return node;},nodeTypeCompare:function(node,type){},createNode:function(type,id){},moveRoot:function(renderer){var root=this.root;if(renderer.root.parentNode==this.rendererRoot){root=renderer.root;}
-root.parentNode.removeChild(root);renderer.rendererRoot.appendChild(root);},getRenderLayerId:function(){return this.root.parentNode.parentNode.id;},isComplexSymbol:function(graphicName){return(graphicName!="circle")&&!!graphicName;},CLASS_NAME:"OpenLayers.Renderer.Elements"});OpenLayers.Renderer.symbol={"star":[350,75,379,161,469,161,397,215,423,301,350,250,277,301,303,215,231,161,321,161,350,75],"cross":[4,0,6,0,6,4,10,4,10,6,6,6,6,10,4,10,4,6,0,6,0,4,4,4,4,0],"x":[0,0,25,0,50,35,75,0,100,0,65,50,100,100,75,100,50,65,25,100,0,100,35,50,0,0],"square":[0,0,0,1,1,1,1,0,0,0],"triangle":[0,10,10,10,5,0,0,10]};OpenLayers.Strategy.Cluster=OpenLayers.Class(OpenLayers.Strategy,{distance:20,threshold:null,features:null,clusters:null,clustering:false,resolution:null,initialize:function(options){OpenLayers.Strategy.prototype.initialize.apply(this,[options]);},activate:function(){var activated=OpenLayers.Strategy.prototype.activate.call(this);if(activated){this.layer.events.on({"beforefeaturesadded":this.cacheFeatures,"moveend":this.cluster,scope:this});}
-return activated;},deactivate:function(){var deactivated=OpenLayers.Strategy.prototype.deactivate.call(this);if(deactivated){this.clearCache();this.layer.events.un({"beforefeaturesadded":this.cacheFeatures,"moveend":this.cluster,scope:this});}
-return deactivated;},cacheFeatures:function(event){var propagate=true;if(!this.clustering){this.clearCache();this.features=event.features;this.cluster();propagate=false;}
-return propagate;},clearCache:function(){this.features=null;},cluster:function(event){if((!event||event.zoomChanged)&&this.features){var resolution=this.layer.map.getResolution();if(resolution!=this.resolution||!this.clustersExist()){this.resolution=resolution;var clusters=[];var feature,clustered,cluster;for(var i=0;i<this.features.length;++i){feature=this.features[i];if(feature.geometry){clustered=false;for(var j=clusters.length-1;j>=0;--j){cluster=clusters[j];if(this.shouldCluster(cluster,feature)){this.addToCluster(cluster,feature);clustered=true;break;}}
-if(!clustered){clusters.push(this.createCluster(this.features[i]));}}}
-this.layer.removeAllFeatures();if(clusters.length>0){if(this.threshold>1){var clone=clusters.slice();clusters=[];var candidate;for(var i=0,len=clone.length;i<len;++i){candidate=clone[i];if(candidate.attributes.count<this.threshold){Array.prototype.push.apply(clusters,candidate.cluster);}else{clusters.push(candidate);}}}
-this.clustering=true;this.layer.addFeatures(clusters);this.clustering=false;}
-this.clusters=clusters;}}},clustersExist:function(){var exist=false;if(this.clusters&&this.clusters.length>0&&this.clusters.length==this.layer.features.length){exist=true;for(var i=0;i<this.clusters.length;++i){if(this.clusters[i]!=this.layer.features[i]){exist=false;break;}}}
-return exist;},shouldCluster:function(cluster,feature){var cc=cluster.geometry.getBounds().getCenterLonLat();var fc=feature.geometry.getBounds().getCenterLonLat();var distance=(Math.sqrt(Math.pow((cc.lon-fc.lon),2)+Math.pow((cc.lat-fc.lat),2))/this.resolution);return(distance<=this.distance);},addToCluster:function(cluster,feature){cluster.cluster.push(feature);cluster.attributes.count+=1;},createCluster:function(feature){var center=feature.geometry.getBounds().getCenterLonLat();var cluster=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(center.lon,center.lat),{count:1});cluster.cluster=[feature];return cluster;},CLASS_NAME:"OpenLayers.Strategy.Cluster"});OpenLayers.Strategy.Fixed=OpenLayers.Class(OpenLayers.Strategy,{preload:false,initialize:function(options){OpenLayers.Strategy.prototype.initialize.apply(this,[options]);},destroy:function(){OpenLayers.Strategy.prototype.destroy.apply(this,arguments);},activate:function(){if(OpenLayers.Strategy.prototype.activate.apply(this,arguments)){this.layer.events.on({"refresh":this.load,scope:this});if(this.layer.visibility==true||this.preload){this.load();}else{this.layer.events.on({"visibilitychanged":this.load,scope:this});}
-return true;}
-return false;},deactivate:function(){var deactivated=OpenLayers.Strategy.prototype.deactivate.call(this);if(deactivated){this.layer.events.un({"refresh":this.load,"visibilitychanged":this.load,scope:this});}
-return deactivated;},load:function(options){this.layer.events.triggerEvent("loadstart");this.layer.protocol.read(OpenLayers.Util.applyDefaults({callback:this.merge,filter:this.layer.filter,scope:this},options));this.layer.events.un({"visibilitychanged":this.load,scope:this});},merge:function(resp){this.layer.destroyFeatures();var features=resp.features;if(features&&features.length>0){var remote=this.layer.projection;var local=this.layer.map.getProjectionObject();if(!local.equals(remote)){var geom;for(var i=0,len=features.length;i<len;++i){geom=features[i].geometry;if(geom){geom.transform(remote,local);}}}
-this.layer.addFeatures(features);}
-this.layer.events.triggerEvent("loadend");},CLASS_NAME:"OpenLayers.Strategy.Fixed"});OpenLayers.Strategy.Paging=OpenLayers.Class(OpenLayers.Strategy,{features:null,length:10,num:null,paging:false,initialize:function(options){OpenLayers.Strategy.prototype.initialize.apply(this,[options]);},activate:function(){var activated=OpenLayers.Strategy.prototype.activate.call(this);if(activated){this.layer.events.on({"beforefeaturesadded":this.cacheFeatures,scope:this});}
-return activated;},deactivate:function(){var deactivated=OpenLayers.Strategy.prototype.deactivate.call(this);if(deactivated){this.clearCache();this.layer.events.un({"beforefeaturesadded":this.cacheFeatures,scope:this});}
-return deactivated;},cacheFeatures:function(event){if(!this.paging){this.clearCache();this.features=event.features;this.pageNext(event);}},clearCache:function(){if(this.features){for(var i=0;i<this.features.length;++i){this.features[i].destroy();}}
-this.features=null;this.num=null;},pageCount:function(){var numFeatures=this.features?this.features.length:0;return Math.ceil(numFeatures/this.length);},pageNum:function(){return this.num;},pageLength:function(newLength){if(newLength&&newLength>0){this.length=newLength;}
-return this.length;},pageNext:function(event){var changed=false;if(this.features){if(this.num===null){this.num=-1;}
-var start=(this.num+1)*this.length;changed=this.page(start,event);}
-return changed;},pagePrevious:function(){var changed=false;if(this.features){if(this.num===null){this.num=this.pageCount();}
-var start=(this.num-1)*this.length;changed=this.page(start);}
-return changed;},page:function(start,event){var changed=false;if(this.features){if(start>=0&&start<this.features.length){var num=Math.floor(start/this.length);if(num!=this.num){this.paging=true;var features=this.features.slice(start,start+this.length);this.layer.removeFeatures(this.layer.features);this.num=num;if(event&&event.features){event.features=features;}else{this.layer.addFeatures(features);}
-this.paging=false;changed=true;}}}
-return changed;},CLASS_NAME:"OpenLayers.Strategy.Paging"});OpenLayers.Strategy.Refresh=OpenLayers.Class(OpenLayers.Strategy,{force:false,interval:0,timer:null,initialize:function(options){OpenLayers.Strategy.prototype.initialize.apply(this,[options]);},activate:function(){var activated=OpenLayers.Strategy.prototype.activate.call(this);if(activated){if(this.layer.visibility===true){this.start();}
-this.layer.events.on({"visibilitychanged":this.reset,scope:this});}
-return activated;},deactivate:function(){var deactivated=OpenLayers.Strategy.prototype.deactivate.call(this);if(deactivated){this.stop();}
-return deactivated;},reset:function(){if(this.layer.visibility===true){this.start();}else{this.stop();}},start:function(){if(this.interval&&typeof this.interval==="number"&&this.interval>0){this.timer=window.setInterval(OpenLayers.Function.bind(this.refresh,this),this.interval);}},refresh:function(){if(this.layer&&this.layer.refresh&&typeof this.layer.refresh=="function"){this.layer.refresh({force:this.force});}},stop:function(){if(this.timer!==null){window.clearInterval(this.timer);this.timer=null;}},CLASS_NAME:"OpenLayers.Strategy.Refresh"});OpenLayers.Strategy.Save=OpenLayers.Class(OpenLayers.Strategy,{EVENT_TYPES:["start","success","fail"],events:null,auto:false,timer:null,initialize:function(options){OpenLayers.Strategy.prototype.initialize.apply(this,[options]);this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES);},activate:function(){var activated=OpenLayers.Strategy.prototype.activate.call(this);if(activated){if(this.auto){if(typeof this.auto==="number"){this.timer=window.setInterval(OpenLayers.Function.bind(this.save,this),this.auto*1000);}else{this.layer.events.on({"featureadded":this.triggerSave,"afterfeaturemodified":this.triggerSave,scope:this});}}}
-return activated;},deactivate:function(){var deactivated=OpenLayers.Strategy.prototype.deactivate.call(this);if(deactivated){if(this.auto){if(typeof this.auto==="number"){window.clearInterval(this.timer);}else{this.layer.events.un({"featureadded":this.triggerSave,"afterfeaturemodified":this.triggerSave,scope:this});}}}
-return deactivated;},triggerSave:function(event){var feature=event.feature;if(feature.state===OpenLayers.State.INSERT||feature.state===OpenLayers.State.UPDATE||feature.state===OpenLayers.State.DELETE){this.save([event.feature]);}},save:function(features){if(!features){features=this.layer.features;}
-this.events.triggerEvent("start",{features:features});var remote=this.layer.projection;var local=this.layer.map.getProjectionObject();if(!local.equals(remote)){var len=features.length;var clones=new Array(len);var orig,clone;for(var i=0;i<len;++i){orig=features[i];clone=orig.clone();clone.fid=orig.fid;clone.state=orig.state;if(orig.url){clone.url=orig.url;}
-clone._original=orig;clone.geometry.transform(local,remote);clones[i]=clone;}
-features=clones;}
-this.layer.protocol.commit(features,{callback:this.onCommit,scope:this});},onCommit:function(response){var evt={"response":response};if(response.success()){var features=response.reqFeatures;var state,feature;var destroys=[];var insertIds=response.insertIds||[];var j=0;for(var i=0,len=features.length;i<len;++i){feature=features[i];feature=feature._original||feature;state=feature.state;if(state){if(state==OpenLayers.State.DELETE){destroys.push(feature);}else if(state==OpenLayers.State.INSERT){feature.fid=insertIds[j];++j;}
-feature.state=null;}}
-if(destroys.length>0){this.layer.destroyFeatures(destroys);}
-this.events.triggerEvent("success",evt);}else{this.events.triggerEvent("fail",evt);}},CLASS_NAME:"OpenLayers.Strategy.Save"});OpenLayers.Symbolizer.Line=OpenLayers.Class(OpenLayers.Symbolizer,{strokeColor:null,strokeOpacity:null,strokeWidth:null,strokeLinecap:null,strokeDashstyle:null,initialize:function(config){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Symbolizer.Line"});OpenLayers.Symbolizer.Point=OpenLayers.Class(OpenLayers.Symbolizer,{strokeColor:null,strokeOpacity:null,strokeWidth:null,strokeLinecap:null,strokeDashstyle:null,fillColor:null,fillOpacity:null,pointRadius:null,externalGraphic:null,graphicWidth:null,graphicHeight:null,graphicOpacity:null,graphicXOffset:null,graphicYOffset:null,rotation:null,graphicName:null,initialize:function(config){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Symbolizer.Point"});OpenLayers.Symbolizer.Polygon=OpenLayers.Class(OpenLayers.Symbolizer,{strokeColor:null,strokeOpacity:null,strokeWidth:null,strokeLinecap:null,strokeDashstyle:null,fillColor:null,fillOpacity:null,initialize:function(config){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Symbolizer.Polygon"});OpenLayers.Symbolizer.Raster=OpenLayers.Class(OpenLayers.Symbolizer,{initialize:function(config){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Symbolizer.Raster"});OpenLayers.Symbolizer.Text=OpenLayers.Class(OpenLayers.Symbolizer,{label:null,fontFamily:null,fontSize:null,fontWeight:null,fontStyle:null,initialize:function(config){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Symbolizer.Text"});OpenLayers.Tween=OpenLayers.Class({INTERVAL:10,easing:null,begin:null,finish:null,duration:null,callbacks:null,time:null,interval:null,playing:false,initialize:function(easing){this.easing=(easing)?easing:OpenLayers.Easing.Expo.easeOut;},start:function(begin,finish,duration,options){this.playing=true;this.begin=begin;this.finish=finish;this.duration=duration;this.callbacks=options.callbacks;this.time=0;if(this.interval){window.clearInterval(this.interval);this.interval=null;}
-if(this.callbacks&&this.callbacks.start){this.callbacks.start.call(this,this.begin);}
-this.interval=window.setInterval(OpenLayers.Function.bind(this.play,this),this.INTERVAL);},stop:function(){if(!this.playing){return;}
-if(this.callbacks&&this.callbacks.done){this.callbacks.done.call(this,this.finish);}
-window.clearInterval(this.interval);this.interval=null;this.playing=false;},play:function(){var value={};for(var i in this.begin){var b=this.begin[i];var f=this.finish[i];if(b==null||f==null||isNaN(b)||isNaN(f)){OpenLayers.Console.error('invalid value for Tween');}
-var c=f-b;value[i]=this.easing.apply(this,[this.time,b,c,this.duration]);}
-this.time++;if(this.callbacks&&this.callbacks.eachStep){this.callbacks.eachStep.call(this,value);}
-if(this.time>this.duration){this.stop();}},CLASS_NAME:"OpenLayers.Tween"});OpenLayers.Easing={CLASS_NAME:"OpenLayers.Easing"};OpenLayers.Easing.Linear={easeIn:function(t,b,c,d){return c*t/d+b;},easeOut:function(t,b,c,d){return c*t/d+b;},easeInOut:function(t,b,c,d){return c*t/d+b;},CLASS_NAME:"OpenLayers.Easing.Linear"};OpenLayers.Easing.Expo={easeIn:function(t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOut:function(t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOut:function(t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},CLASS_NAME:"OpenLayers.Easing.Expo"};OpenLayers.Easing.Quad={easeIn:function(t,b,c,d){return c*(t/=d)*t+b;},easeOut:function(t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOut:function(t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},CLASS_NAME:"OpenLayers.Easing.Quad"};OpenLayers.Control.ArgParser=OpenLayers.Class(OpenLayers.Control,{center:null,zoom:null,layers:null,displayProjection:null,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);},setMap:function(map){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var i=0,len=this.map.controls.length;i<len;i++){var control=this.map.controls[i];if((control!=this)&&(control.CLASS_NAME=="OpenLayers.Control.ArgParser")){if(control.displayProjection!=this.displayProjection){this.displayProjection=control.displayProjection;}
-break;}}
-if(i==this.map.controls.length){var args=OpenLayers.Util.getParameters();if(args.layers){this.layers=args.layers;this.map.events.register('addlayer',this,this.configureLayers);this.configureLayers();}
-if(args.lat&&args.lon){this.center=new OpenLayers.LonLat(parseFloat(args.lon),parseFloat(args.lat));if(args.zoom){this.zoom=parseInt(args.zoom);}
-this.map.events.register('changebaselayer',this,this.setCenter);this.setCenter();}}},setCenter:function(){if(this.map.baseLayer){this.map.events.unregister('changebaselayer',this,this.setCenter);if(this.displayProjection){this.center.transform(this.displayProjection,this.map.getProjectionObject());}
-this.map.setCenter(this.center,this.zoom);}},configureLayers:function(){if(this.layers.length==this.map.layers.length){this.map.events.unregister('addlayer',this,this.configureLayers);for(var i=0,len=this.layers.length;i<len;i++){var layer=this.map.layers[i];var c=this.layers.charAt(i);if(c=="B"){this.map.setBaseLayer(layer);}else if((c=="T")||(c=="F")){layer.setVisibility(c=="T");}}}},CLASS_NAME:"OpenLayers.Control.ArgParser"});OpenLayers.Control.Attribution=OpenLayers.Class(OpenLayers.Control,{separator:", ",initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){this.map.events.un({"removelayer":this.updateAttribution,"addlayer":this.updateAttribution,"changelayer":this.updateAttribution,"changebaselayer":this.updateAttribution,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.map.events.on({'changebaselayer':this.updateAttribution,'changelayer':this.updateAttribution,'addlayer':this.updateAttribution,'removelayer':this.updateAttribution,scope:this});this.updateAttribution();return this.div;},updateAttribution:function(){var attributions=[];if(this.map&&this.map.layers){for(var i=0,len=this.map.layers.length;i<len;i++){var layer=this.map.layers[i];if(layer.attribution&&layer.getVisibility()){if(OpenLayers.Util.indexOf(attributions,layer.attribution)===-1){attributions.push(layer.attribution);}}}
-this.div.innerHTML=attributions.join(this.separator);}},CLASS_NAME:"OpenLayers.Control.Attribution"});OpenLayers.Control.Button=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){},CLASS_NAME:"OpenLayers.Control.Button"});OpenLayers.Control.Graticule=OpenLayers.Class(OpenLayers.Control,{autoActivate:true,intervals:[45,30,20,10,5,2,1,0.5,0.2,0.1,0.05,0.01,0.005,0.002,0.001],displayInLayerSwitcher:true,visible:true,numPoints:50,targetSize:200,layerName:null,labelled:true,labelFormat:'dm',lineSymbolizer:{strokeColor:"#333",strokeWidth:1,strokeOpacity:0.5},labelSymbolizer:{},gratLayer:null,initialize:function(options){options=options||{};options.layerName=options.layerName||OpenLayers.i18n("graticule");OpenLayers.Control.prototype.initialize.apply(this,[options]);this.labelSymbolizer.stroke=false;this.labelSymbolizer.fill=false;this.labelSymbolizer.label="${label}";this.labelSymbolizer.labelAlign="${labelAlign}";this.labelSymbolizer.labelXOffset="${xOffset}";this.labelSymbolizer.labelYOffset="${yOffset}";},destroy:function(){this.deactivate();OpenLayers.Control.prototype.destroy.apply(this,arguments);if(this.gratLayer){this.gratLayer.destroy();this.gratLayer=null;}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.gratLayer){var gratStyle=new OpenLayers.Style({},{rules:[new OpenLayers.Rule({'symbolizer':{"Point":this.labelSymbolizer,"Line":this.lineSymbolizer}})]});this.gratLayer=new OpenLayers.Layer.Vector(this.layerName,{styleMap:new OpenLayers.StyleMap({'default':gratStyle}),visibility:this.visible,displayInLayerSwitcher:this.displayInLayerSwitcher});}
-return this.div;},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){this.map.addLayer(this.gratLayer);this.map.events.register('moveend',this,this.update);this.update();return true;}else{return false;}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.map.events.unregister('moveend',this,this.update);this.map.removeLayer(this.gratLayer);return true;}else{return false;}},update:function(){var mapBounds=this.map.getExtent();if(!mapBounds){return;}
-this.gratLayer.destroyFeatures();var llProj=new OpenLayers.Projection("EPSG:4326");var mapProj=this.map.getProjectionObject();var mapRes=this.map.getResolution();if(mapProj.proj&&mapProj.proj.projName=="longlat"){this.numPoints=1;}
-var mapCenter=this.map.getCenter();var mapCenterLL=new OpenLayers.Pixel(mapCenter.lon,mapCenter.lat);OpenLayers.Projection.transform(mapCenterLL,mapProj,llProj);var testSq=this.targetSize*mapRes;testSq*=testSq;var llInterval;for(var i=0;i<this.intervals.length;++i){llInterval=this.intervals[i];var delta=llInterval/2;var p1=mapCenterLL.offset(new OpenLayers.Pixel(-delta,-delta));var p2=mapCenterLL.offset(new OpenLayers.Pixel(delta,delta));OpenLayers.Projection.transform(p1,llProj,mapProj);OpenLayers.Projection.transform(p2,llProj,mapProj);var distSq=(p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y);if(distSq<=testSq){break;}}
-mapCenterLL.x=Math.floor(mapCenterLL.x/llInterval)*llInterval;mapCenterLL.y=Math.floor(mapCenterLL.y/llInterval)*llInterval;var iter=0;var centerLonPoints=[mapCenterLL.clone()];var newPoint=mapCenterLL.clone();var mapXY;do{newPoint=newPoint.offset(new OpenLayers.Pixel(0,llInterval));mapXY=OpenLayers.Projection.transform(newPoint.clone(),llProj,mapProj);centerLonPoints.unshift(newPoint);}while(mapBounds.containsPixel(mapXY)&&++iter<1000);newPoint=mapCenterLL.clone();do{newPoint=newPoint.offset(new OpenLayers.Pixel(0,-llInterval));mapXY=OpenLayers.Projection.transform(newPoint.clone(),llProj,mapProj);centerLonPoints.push(newPoint);}while(mapBounds.containsPixel(mapXY)&&++iter<1000);iter=0;var centerLatPoints=[mapCenterLL.clone()];newPoint=mapCenterLL.clone();do{newPoint=newPoint.offset(new OpenLayers.Pixel(-llInterval,0));mapXY=OpenLayers.Projection.transform(newPoint.clone(),llProj,mapProj);centerLatPoints.unshift(newPoint);}while(mapBounds.containsPixel(mapXY)&&++iter<1000);newPoint=mapCenterLL.clone();do{newPoint=newPoint.offset(new OpenLayers.Pixel(llInterval,0));mapXY=OpenLayers.Projection.transform(newPoint.clone(),llProj,mapProj);centerLatPoints.push(newPoint);}while(mapBounds.containsPixel(mapXY)&&++iter<1000);var lines=[];for(var i=0;i<centerLatPoints.length;++i){var lon=centerLatPoints[i].x;var pointList=[];var labelPoint=null;var latEnd=Math.min(centerLonPoints[0].y,90);var latStart=Math.max(centerLonPoints[centerLonPoints.length-1].y,-90);var latDelta=(latEnd-latStart)/this.numPoints;var lat=latStart;for(var j=0;j<=this.numPoints;++j){var gridPoint=new OpenLayers.Geometry.Point(lon,lat);gridPoint.transform(llProj,mapProj);pointList.push(gridPoint);lat+=latDelta;if(gridPoint.y>=mapBounds.bottom&&!labelPoint){labelPoint=gridPoint;}}
-if(this.labelled){var labelPos=new OpenLayers.Geometry.Point(labelPoint.x,mapBounds.bottom);var labelAttrs={value:lon,label:this.labelled?OpenLayers.Util.getFormattedLonLat(lon,"lon",this.labelFormat):"",labelAlign:"cb",xOffset:0,yOffset:2};this.gratLayer.addFeatures(new OpenLayers.Feature.Vector(labelPos,labelAttrs));}
-var geom=new OpenLayers.Geometry.LineString(pointList);lines.push(new OpenLayers.Feature.Vector(geom));}
-for(var j=0;j<centerLonPoints.length;++j){lat=centerLonPoints[j].y;if(lat<-90||lat>90){continue;}
-var pointList=[];var lonStart=centerLatPoints[0].x;var lonEnd=centerLatPoints[centerLatPoints.length-1].x;var lonDelta=(lonEnd-lonStart)/this.numPoints;var lon=lonStart;var labelPoint=null;for(var i=0;i<=this.numPoints;++i){var gridPoint=new OpenLayers.Geometry.Point(lon,lat);gridPoint.transform(llProj,mapProj);pointList.push(gridPoint);lon+=lonDelta;if(gridPoint.x<mapBounds.right){labelPoint=gridPoint;}}
-if(this.labelled){var labelPos=new OpenLayers.Geometry.Point(mapBounds.right,labelPoint.y);var labelAttrs={value:lat,label:this.labelled?OpenLayers.Util.getFormattedLonLat(lat,"lat",this.labelFormat):"",labelAlign:"rb",xOffset:-2,yOffset:2};this.gratLayer.addFeatures(new OpenLayers.Feature.Vector(labelPos,labelAttrs));}
-var geom=new OpenLayers.Geometry.LineString(pointList);lines.push(new OpenLayers.Feature.Vector(geom));}
-this.gratLayer.addFeatures(lines);},CLASS_NAME:"OpenLayers.Control.Graticule"});OpenLayers.Control.LayerSwitcher=OpenLayers.Class(OpenLayers.Control,{roundedCorner:true,roundedCornerColor:"darkblue",layerStates:null,layersDiv:null,baseLayersDiv:null,baseLayers:null,dataLbl:null,dataLayersDiv:null,dataLayers:null,minimizeDiv:null,maximizeDiv:null,ascending:true,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.layerStates=[];},destroy:function(){OpenLayers.Event.stopObservingElement(this.div);OpenLayers.Event.stopObservingElement(this.minimizeDiv);OpenLayers.Event.stopObservingElement(this.maximizeDiv);this.clearLayersArray("base");this.clearLayersArray("data");this.map.events.un({"addlayer":this.redraw,"changelayer":this.redraw,"removelayer":this.redraw,"changebaselayer":this.redraw,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments);},setMap:function(map){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.on({"addlayer":this.redraw,"changelayer":this.redraw,"removelayer":this.redraw,"changebaselayer":this.redraw,scope:this});},draw:function(){OpenLayers.Control.prototype.draw.apply(this);this.loadContents();if(!this.outsideViewport){this.minimizeControl();}
-this.redraw();return this.div;},clearLayersArray:function(layersType){var layers=this[layersType+"Layers"];if(layers){for(var i=0,len=layers.length;i<len;i++){var layer=layers[i];OpenLayers.Event.stopObservingElement(layer.inputElem);OpenLayers.Event.stopObservingElement(layer.labelSpan);}}
-this[layersType+"LayersDiv"].innerHTML="";this[layersType+"Layers"]=[];},checkRedraw:function(){var redraw=false;if(!this.layerStates.length||(this.map.layers.length!=this.layerStates.length)){redraw=true;}else{for(var i=0,len=this.layerStates.length;i<len;i++){var layerState=this.layerStates[i];var layer=this.map.layers[i];if((layerState.name!=layer.name)||(layerState.inRange!=layer.inRange)||(layerState.id!=layer.id)||(layerState.visibility!=layer.visibility)){redraw=true;break;}}}
-return redraw;},redraw:function(){if(!this.checkRedraw()){return this.div;}
-this.clearLayersArray("base");this.clearLayersArray("data");var containsOverlays=false;var containsBaseLayers=false;var len=this.map.layers.length;this.layerStates=new Array(len);for(var i=0;i<len;i++){var layer=this.map.layers[i];this.layerStates[i]={'name':layer.name,'visibility':layer.visibility,'inRange':layer.inRange,'id':layer.id};}
-var layers=this.map.layers.slice();if(!this.ascending){layers.reverse();}
-for(var i=0,len=layers.length;i<len;i++){var layer=layers[i];var baseLayer=layer.isBaseLayer;if(layer.displayInLayerSwitcher){if(baseLayer){containsBaseLayers=true;}else{containsOverlays=true;}
-var checked=(baseLayer)?(layer==this.map.baseLayer):layer.getVisibility();var inputElem=document.createElement("input");inputElem.id=this.id+"_input_"+layer.name;inputElem.name=(baseLayer)?this.id+"_baseLayers":layer.name;inputElem.type=(baseLayer)?"radio":"checkbox";inputElem.value=layer.name;inputElem.checked=checked;inputElem.defaultChecked=checked;if(!baseLayer&&!layer.inRange){inputElem.disabled=true;}
-var context={'inputElem':inputElem,'layer':layer,'layerSwitcher':this};OpenLayers.Event.observe(inputElem,"mouseup",OpenLayers.Function.bindAsEventListener(this.onInputClick,context));var labelSpan=document.createElement("span");OpenLayers.Element.addClass(labelSpan,"labelSpan")
-if(!baseLayer&&!layer.inRange){labelSpan.style.color="gray";}
-labelSpan.innerHTML=layer.name;labelSpan.style.verticalAlign=(baseLayer)?"bottom":"baseline";OpenLayers.Event.observe(labelSpan,"click",OpenLayers.Function.bindAsEventListener(this.onInputClick,context));var br=document.createElement("br");var groupArray=(baseLayer)?this.baseLayers:this.dataLayers;groupArray.push({'layer':layer,'inputElem':inputElem,'labelSpan':labelSpan});var groupDiv=(baseLayer)?this.baseLayersDiv:this.dataLayersDiv;groupDiv.appendChild(inputElem);groupDiv.appendChild(labelSpan);groupDiv.appendChild(br);}}
-this.dataLbl.style.display=(containsOverlays)?"":"none";this.baseLbl.style.display=(containsBaseLayers)?"":"none";return this.div;},onInputClick:function(e){if(!this.inputElem.disabled){if(this.inputElem.type=="radio"){this.inputElem.checked=true;this.layer.map.setBaseLayer(this.layer);}else{this.inputElem.checked=!this.inputElem.checked;this.layerSwitcher.updateMap();}}
-OpenLayers.Event.stop(e);},onLayerClick:function(e){this.updateMap();},updateMap:function(){for(var i=0,len=this.baseLayers.length;i<len;i++){var layerEntry=this.baseLayers[i];if(layerEntry.inputElem.checked){this.map.setBaseLayer(layerEntry.layer,false);}}
-for(var i=0,len=this.dataLayers.length;i<len;i++){var layerEntry=this.dataLayers[i];layerEntry.layer.setVisibility(layerEntry.inputElem.checked);}},maximizeControl:function(e){this.div.style.width="";this.div.style.height="";this.showControls(false);if(e!=null){OpenLayers.Event.stop(e);}},minimizeControl:function(e){this.div.style.width="0px";this.div.style.height="0px";this.showControls(true);if(e!=null){OpenLayers.Event.stop(e);}},showControls:function(minimize){this.maximizeDiv.style.display=minimize?"":"none";this.minimizeDiv.style.display=minimize?"none":"";this.layersDiv.style.display=minimize?"none":"";},loadContents:function(){OpenLayers.Event.observe(this.div,"mouseup",OpenLayers.Function.bindAsEventListener(this.mouseUp,this));OpenLayers.Event.observe(this.div,"click",this.ignoreEvent);OpenLayers.Event.observe(this.div,"mousedown",OpenLayers.Function.bindAsEventListener(this.mouseDown,this));OpenLayers.Event.observe(this.div,"dblclick",this.ignoreEvent);this.layersDiv=document.createElement("div");this.layersDiv.id=this.id+"_layersDiv";OpenLayers.Element.addClass(this.layersDiv,"layersDiv");this.baseLbl=document.createElement("div");this.baseLbl.innerHTML=OpenLayers.i18n("baseLayer");OpenLayers.Element.addClass(this.baseLbl,"baseLbl");this.baseLayersDiv=document.createElement("div");OpenLayers.Element.addClass(this.baseLayersDiv,"baseLayersDiv");this.dataLbl=document.createElement("div");this.dataLbl.innerHTML=OpenLayers.i18n("overlays");OpenLayers.Element.addClass(this.dataLbl,"dataLbl");this.dataLayersDiv=document.createElement("div");OpenLayers.Element.addClass(this.dataLayersDiv,"dataLayersDiv");if(this.ascending){this.layersDiv.appendChild(this.baseLbl);this.layersDiv.appendChild(this.baseLayersDiv);this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv);}else{this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv);this.layersDiv.appendChild(this.baseLbl);this.layersDiv.appendChild(this.baseLayersDiv);}
-this.div.appendChild(this.layersDiv);if(this.roundedCorner){OpenLayers.Rico.Corner.round(this.div,{corners:"tl bl",bgColor:"transparent",color:this.roundedCornerColor,blend:false});OpenLayers.Rico.Corner.changeOpacity(this.layersDiv,0.75);}
-var imgLocation=OpenLayers.Util.getImagesLocation();var sz=new OpenLayers.Size(18,18);var img=imgLocation+'layer-switcher-maximize.png';this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MaximizeDiv",null,sz,img,"absolute");OpenLayers.Element.addClass(this.maximizeDiv,"maximizeDiv");this.maximizeDiv.style.display="none";OpenLayers.Event.observe(this.maximizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.maximizeControl,this));this.div.appendChild(this.maximizeDiv);var img=imgLocation+'layer-switcher-minimize.png';var sz=new OpenLayers.Size(18,18);this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MinimizeDiv",null,sz,img,"absolute");OpenLayers.Element.addClass(this.minimizeDiv,"minimizeDiv");this.minimizeDiv.style.display="none";OpenLayers.Event.observe(this.minimizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.minimizeControl,this));this.div.appendChild(this.minimizeDiv);},ignoreEvent:function(evt){OpenLayers.Event.stop(evt);},mouseDown:function(evt){this.isMouseDown=true;this.ignoreEvent(evt);},mouseUp:function(evt){if(this.isMouseDown){this.isMouseDown=false;this.ignoreEvent(evt);}},CLASS_NAME:"OpenLayers.Control.LayerSwitcher"});OpenLayers.Control.MouseDefaults=OpenLayers.Class(OpenLayers.Control,{performedDrag:false,wheelObserver:null,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){if(this.handler){this.handler.destroy();}
-this.handler=null;this.map.events.un({"click":this.defaultClick,"dblclick":this.defaultDblClick,"mousedown":this.defaultMouseDown,"mouseup":this.defaultMouseUp,"mousemove":this.defaultMouseMove,"mouseout":this.defaultMouseOut,scope:this});OpenLayers.Event.stopObserving(window,"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.stopObserving(window,"mousewheel",this.wheelObserver);OpenLayers.Event.stopObserving(document,"mousewheel",this.wheelObserver);this.wheelObserver=null;OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){this.map.events.on({"click":this.defaultClick,"dblclick":this.defaultDblClick,"mousedown":this.defaultMouseDown,"mouseup":this.defaultMouseUp,"mousemove":this.defaultMouseMove,"mouseout":this.defaultMouseOut,scope:this});this.registerWheelEvents();},registerWheelEvents:function(){this.wheelObserver=OpenLayers.Function.bindAsEventListener(this.onWheelEvent,this);OpenLayers.Event.observe(window,"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.observe(window,"mousewheel",this.wheelObserver);OpenLayers.Event.observe(document,"mousewheel",this.wheelObserver);},defaultClick:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;}
-var notAfterDrag=!this.performedDrag;this.performedDrag=false;return notAfterDrag;},defaultDblClick:function(evt){var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom+1);OpenLayers.Event.stop(evt);return false;},defaultMouseDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;}
-this.mouseDragStart=evt.xy.clone();this.performedDrag=false;if(evt.shiftKey){this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv('zoomBox',this.mouseDragStart,null,null,"absolute","2px solid red");this.zoomBox.style.backgroundColor="white";this.zoomBox.style.filter="alpha(opacity=50)";this.zoomBox.style.opacity="0.50";this.zoomBox.style.fontSize="1px";this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.viewPortDiv.appendChild(this.zoomBox);}
-document.onselectstart=OpenLayers.Function.False;OpenLayers.Event.stop(evt);},defaultMouseMove:function(evt){this.mousePosition=evt.xy.clone();if(this.mouseDragStart!=null){if(this.zoomBox){var deltaX=Math.abs(this.mouseDragStart.x-evt.xy.x);var deltaY=Math.abs(this.mouseDragStart.y-evt.xy.y);this.zoomBox.style.width=Math.max(1,deltaX)+"px";this.zoomBox.style.height=Math.max(1,deltaY)+"px";if(evt.xy.x<this.mouseDragStart.x){this.zoomBox.style.left=evt.xy.x+"px";}
-if(evt.xy.y<this.mouseDragStart.y){this.zoomBox.style.top=evt.xy.y+"px";}}else{var deltaX=this.mouseDragStart.x-evt.xy.x;var deltaY=this.mouseDragStart.y-evt.xy.y;var size=this.map.getSize();var newXY=new OpenLayers.Pixel(size.w/2+deltaX,size.h/2+deltaY);var newCenter=this.map.getLonLatFromViewPortPx(newXY);this.map.setCenter(newCenter,null,true);this.mouseDragStart=evt.xy.clone();this.map.div.style.cursor="move";}
-this.performedDrag=true;}},defaultMouseUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;}
-if(this.zoomBox){this.zoomBoxEnd(evt);}else{if(this.performedDrag){this.map.setCenter(this.map.center);}}
-document.onselectstart=null;this.mouseDragStart=null;this.map.div.style.cursor="";},defaultMouseOut:function(evt){if(this.mouseDragStart!=null&&OpenLayers.Util.mouseLeft(evt,this.map.div)){if(this.zoomBox){this.removeZoomBox();}
-this.mouseDragStart=null;}},defaultWheelUp:function(evt){if(this.map.getZoom()<=this.map.getNumZoomLevels()){this.map.setCenter(this.map.getLonLatFromPixel(evt.xy),this.map.getZoom()+1);}},defaultWheelDown:function(evt){if(this.map.getZoom()>0){this.map.setCenter(this.map.getLonLatFromPixel(evt.xy),this.map.getZoom()-1);}},zoomBoxEnd:function(evt){if(this.mouseDragStart!=null){if(Math.abs(this.mouseDragStart.x-evt.xy.x)>5||Math.abs(this.mouseDragStart.y-evt.xy.y)>5){var start=this.map.getLonLatFromViewPortPx(this.mouseDragStart);var end=this.map.getLonLatFromViewPortPx(evt.xy);var top=Math.max(start.lat,end.lat);var bottom=Math.min(start.lat,end.lat);var left=Math.min(start.lon,end.lon);var right=Math.max(start.lon,end.lon);var bounds=new OpenLayers.Bounds(left,bottom,right,top);this.map.zoomToExtent(bounds);}else{var end=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(new OpenLayers.LonLat((end.lon),(end.lat)),this.map.getZoom()+1);}
-this.removeZoomBox();}},removeZoomBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.zoomBox=null;},onWheelEvent:function(e){var inMap=false;var elem=OpenLayers.Event.element(e);while(elem!=null){if(this.map&&elem==this.map.div){inMap=true;break;}
-elem=elem.parentNode;}
-if(inMap){var delta=0;if(!e){e=window.event;}
-if(e.wheelDelta){delta=e.wheelDelta/120;if(window.opera&&window.opera.version()<9.2){delta=-delta;}}else if(e.detail){delta=-e.detail/3;}
-if(delta){e.xy=this.mousePosition;if(delta<0){this.defaultWheelDown(e);}else{this.defaultWheelUp(e);}}
-OpenLayers.Event.stop(e);}},CLASS_NAME:"OpenLayers.Control.MouseDefaults"});OpenLayers.Control.MousePosition=OpenLayers.Class(OpenLayers.Control,{autoActivate:true,element:null,prefix:'',separator:', ',suffix:'',numDigits:5,granularity:10,emptyString:null,lastXy:null,displayProjection:null,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){this.deactivate();OpenLayers.Control.prototype.destroy.apply(this,arguments);},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){this.map.events.register('mousemove',this,this.redraw);this.map.events.register('mouseout',this,this.reset);this.redraw();return true;}else{return false;}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.map.events.unregister('mousemove',this,this.redraw);this.map.events.unregister('mouseout',this,this.reset);this.element.innerHTML="";return true;}else{return false;}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.div.left="";this.div.top="";this.element=this.div;}
-return this.div;},redraw:function(evt){var lonLat;if(evt==null){this.reset();return;}else{if(this.lastXy==null||Math.abs(evt.xy.x-this.lastXy.x)>this.granularity||Math.abs(evt.xy.y-this.lastXy.y)>this.granularity)
-{this.lastXy=evt.xy;return;}
-lonLat=this.map.getLonLatFromPixel(evt.xy);if(!lonLat){return;}
-if(this.displayProjection){lonLat.transform(this.map.getProjectionObject(),this.displayProjection);}
-this.lastXy=evt.xy;}
-var newHtml=this.formatOutput(lonLat);if(newHtml!=this.element.innerHTML){this.element.innerHTML=newHtml;}},reset:function(evt){if(this.emptyString!=null){this.element.innerHTML=this.emptyString;}},formatOutput:function(lonLat){var digits=parseInt(this.numDigits);var newHtml=this.prefix+
-lonLat.lon.toFixed(digits)+
-this.separator+
-lonLat.lat.toFixed(digits)+
-this.suffix;return newHtml;},CLASS_NAME:"OpenLayers.Control.MousePosition"});OpenLayers.Control.Pan=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,direction:null,type:OpenLayers.Control.TYPE_BUTTON,initialize:function(direction,options){this.direction=direction;this.CLASS_NAME+=this.direction;OpenLayers.Control.prototype.initialize.apply(this,[options]);},trigger:function(){switch(this.direction){case OpenLayers.Control.Pan.NORTH:this.map.pan(0,-this.slideFactor);break;case OpenLayers.Control.Pan.SOUTH:this.map.pan(0,this.slideFactor);break;case OpenLayers.Control.Pan.WEST:this.map.pan(-this.slideFactor,0);break;case OpenLayers.Control.Pan.EAST:this.map.pan(this.slideFactor,0);break;}},CLASS_NAME:"OpenLayers.Control.Pan"});OpenLayers.Control.Pan.NORTH="North";OpenLayers.Control.Pan.SOUTH="South";OpenLayers.Control.Pan.EAST="East";OpenLayers.Control.Pan.WEST="West";OpenLayers.Control.PanZoom=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,slideRatio:null,buttons:null,position:null,initialize:function(options){this.position=new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X,OpenLayers.Control.PanZoom.Y);OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);this.removeButtons();this.buttons=null;this.position=null;},draw:function(px){OpenLayers.Control.prototype.draw.apply(this,arguments);px=this.position;this.buttons=[];var sz=new OpenLayers.Size(18,18);var centered=new OpenLayers.Pixel(px.x+sz.w/2,px.y);this._addButton("panup","north-mini.png",centered,sz);px.y=centered.y+sz.h;this._addButton("panleft","west-mini.png",px,sz);this._addButton("panright","east-mini.png",px.add(sz.w,0),sz);this._addButton("pandown","south-mini.png",centered.add(0,sz.h*2),sz);this._addButton("zoomin","zoom-plus-mini.png",centered.add(0,sz.h*3+5),sz);this._addButton("zoomworld","zoom-world-mini.png",centered.add(0,sz.h*4+5),sz);this._addButton("zoomout","zoom-minus-mini.png",centered.add(0,sz.h*5+5),sz);return this.div;},_addButton:function(id,img,xy,sz){var imgLocation=OpenLayers.Util.getImagesLocation()+img;var btn=OpenLayers.Util.createAlphaImageDiv(this.id+"_"+id,xy,sz,imgLocation,"absolute");this.div.appendChild(btn);OpenLayers.Event.observe(btn,"mousedown",OpenLayers.Function.bindAsEventListener(this.buttonDown,btn));OpenLayers.Event.observe(btn,"dblclick",OpenLayers.Function.bindAsEventListener(this.doubleClick,btn));OpenLayers.Event.observe(btn,"click",OpenLayers.Function.bindAsEventListener(this.doubleClick,btn));btn.action=id;btn.map=this.map;if(!this.slideRatio){var slideFactorPixels=this.slideFactor;var getSlideFactor=function(){return slideFactorPixels;};}else{var slideRatio=this.slideRatio;var getSlideFactor=function(dim){return this.map.getSize()[dim]*slideRatio;};}
-btn.getSlideFactor=getSlideFactor;this.buttons.push(btn);return btn;},_removeButton:function(btn){OpenLayers.Event.stopObservingElement(btn);btn.map=null;btn.getSlideFactor=null;this.div.removeChild(btn);OpenLayers.Util.removeItem(this.buttons,btn);},removeButtons:function(){for(var i=this.buttons.length-1;i>=0;--i){this._removeButton(this.buttons[i]);}},doubleClick:function(evt){OpenLayers.Event.stop(evt);return false;},buttonDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;}
-switch(this.action){case"panup":this.map.pan(0,-this.getSlideFactor("h"));break;case"pandown":this.map.pan(0,this.getSlideFactor("h"));break;case"panleft":this.map.pan(-this.getSlideFactor("w"),0);break;case"panright":this.map.pan(this.getSlideFactor("w"),0);break;case"zoomin":this.map.zoomIn();break;case"zoomout":this.map.zoomOut();break;case"zoomworld":this.map.zoomToMaxExtent();break;}
-OpenLayers.Event.stop(evt);},CLASS_NAME:"OpenLayers.Control.PanZoom"});OpenLayers.Control.PanZoom.X=4;OpenLayers.Control.PanZoom.Y=4;OpenLayers.Control.Panel=OpenLayers.Class(OpenLayers.Control,{controls:null,autoActivate:true,defaultControl:null,saveState:false,activeState:null,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.controls=[];this.activeState={};},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);for(var i=this.controls.length-1;i>=0;i--){if(this.controls[i].events){this.controls[i].events.un({"activate":this.redraw,"deactivate":this.redraw,scope:this});}
-OpenLayers.Event.stopObservingElement(this.controls[i].panel_div);this.controls[i].panel_div=null;}
-this.activeState=null;},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){var control;for(var i=0,len=this.controls.length;i<len;i++){control=this.controls[i];if(control===this.defaultControl||(this.saveState&&this.activeState[control.id])){control.activate();}}
-if(this.saveState===true){this.defaultControl=null;}
-this.redraw();return true;}else{return false;}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){var control;for(var i=0,len=this.controls.length;i<len;i++){control=this.controls[i];this.activeState[control.id]=control.deactivate();}
-return true;}else{return false;}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.addControlsToMap(this.controls);return this.div;},redraw:function(){if(this.div.children.length>0){for(var l=this.div.children.length,i=l-1;i>=0;i--){this.div.removeChild(this.div.children[i]);}}
-this.div.innerHTML="";if(this.active){for(var i=0,len=this.controls.length;i<len;i++){var element=this.controls[i].panel_div;if(this.controls[i].active){element.className=this.controls[i].displayClass+"ItemActive";}else{element.className=this.controls[i].displayClass+"ItemInactive";}
-this.div.appendChild(element);}}},activateControl:function(control){if(!this.active){return false;}
-if(control.type==OpenLayers.Control.TYPE_BUTTON){control.trigger();this.redraw();return;}
-if(control.type==OpenLayers.Control.TYPE_TOGGLE){if(control.active){control.deactivate();}else{control.activate();}
-this.redraw();return;}
-var c;for(var i=0,len=this.controls.length;i<len;i++){c=this.controls[i];if(c!=control&&(c.type===OpenLayers.Control.TYPE_TOOL||c.type==null)){c.deactivate();}}
-control.activate();},addControls:function(controls){if(!(controls instanceof Array)){controls=[controls];}
-this.controls=this.controls.concat(controls);for(var i=0,len=controls.length;i<len;i++){var element=document.createElement("div");controls[i].panel_div=element;if(controls[i].title!=""){controls[i].panel_div.title=controls[i].title;}
-OpenLayers.Event.observe(controls[i].panel_div,"click",OpenLayers.Function.bind(this.onClick,this,controls[i]));OpenLayers.Event.observe(controls[i].panel_div,"dblclick",OpenLayers.Function.bind(this.onDoubleClick,this,controls[i]));OpenLayers.Event.observe(controls[i].panel_div,"mousedown",OpenLayers.Function.bindAsEventListener(OpenLayers.Event.stop));}
-if(this.map){this.addControlsToMap(controls);this.redraw();}},addControlsToMap:function(controls){var control;for(var i=0,len=controls.length;i<len;i++){control=controls[i];if(control.autoActivate===true){control.autoActivate=false;this.map.addControl(control);control.autoActivate=true;}else{this.map.addControl(control);control.deactivate();}
-control.events.on({"activate":this.redraw,"deactivate":this.redraw,scope:this});}},onClick:function(ctrl,evt){OpenLayers.Event.stop(evt?evt:window.event);this.activateControl(ctrl);},onDoubleClick:function(ctrl,evt){OpenLayers.Event.stop(evt?evt:window.event);},getControlsBy:function(property,match){var test=(typeof match.test=="function");var found=OpenLayers.Array.filter(this.controls,function(item){return item[property]==match||(test&&match.test(item[property]));});return found;},getControlsByName:function(match){return this.getControlsBy("name",match);},getControlsByClass:function(match){return this.getControlsBy("CLASS_NAME",match);},CLASS_NAME:"OpenLayers.Control.Panel"});OpenLayers.Control.Scale=OpenLayers.Class(OpenLayers.Control,{element:null,geodesic:false,initialize:function(element,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.element=OpenLayers.Util.getElement(element);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.element=document.createElement("div");this.div.appendChild(this.element);}
-this.map.events.register('moveend',this,this.updateScale);this.updateScale();return this.div;},updateScale:function(){var scale;if(this.geodesic===true){var units=this.map.getUnits();if(!units){return;}
-var inches=OpenLayers.INCHES_PER_UNIT;scale=(this.map.getGeodesicPixelSize().w||0.000001)*inches["km"]*OpenLayers.DOTS_PER_INCH;}else{scale=this.map.getScale();}
-if(!scale){return;}
-if(scale>=9500&&scale<=950000){scale=Math.round(scale/1000)+"K";}else if(scale>=950000){scale=Math.round(scale/1000000)+"M";}else{scale=Math.round(scale);}
-this.element.innerHTML=OpenLayers.i18n("scale",{'scaleDenom':scale});},CLASS_NAME:"OpenLayers.Control.Scale"});OpenLayers.Control.ScaleLine=OpenLayers.Class(OpenLayers.Control,{maxWidth:100,topOutUnits:"km",topInUnits:"m",bottomOutUnits:"mi",bottomInUnits:"ft",eTop:null,eBottom:null,geodesic:false,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,[options]);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.eTop){this.eTop=document.createElement("div");this.eTop.className=this.displayClass+"Top";var theLen=this.topInUnits.length;this.div.appendChild(this.eTop);if((this.topOutUnits=="")||(this.topInUnits=="")){this.eTop.style.visibility="hidden";}else{this.eTop.style.visibility="visible";}
-this.eBottom=document.createElement("div");this.eBottom.className=this.displayClass+"Bottom";this.div.appendChild(this.eBottom);if((this.bottomOutUnits=="")||(this.bottomInUnits=="")){this.eBottom.style.visibility="hidden";}else{this.eBottom.style.visibility="visible";}}
-this.map.events.register('moveend',this,this.update);this.update();return this.div;},getBarLen:function(maxLen){var digits=parseInt(Math.log(maxLen)/Math.log(10));var pow10=Math.pow(10,digits);var firstChar=parseInt(maxLen/pow10);var barLen;if(firstChar>5){barLen=5;}else if(firstChar>2){barLen=2;}else{barLen=1;}
-return barLen*pow10;},update:function(){var res=this.map.getResolution();if(!res){return;}
-var curMapUnits=this.map.getUnits();var inches=OpenLayers.INCHES_PER_UNIT;var maxSizeData=this.maxWidth*res*inches[curMapUnits];var geodesicRatio=1;if(this.geodesic===true){var maxSizeGeodesic=(this.map.getGeodesicPixelSize().w||0.000001)*this.maxWidth;var maxSizeKilometers=maxSizeData/inches["km"];geodesicRatio=maxSizeGeodesic/maxSizeKilometers;maxSizeData*=geodesicRatio;}
-var topUnits;var bottomUnits;if(maxSizeData>100000){topUnits=this.topOutUnits;bottomUnits=this.bottomOutUnits;}else{topUnits=this.topInUnits;bottomUnits=this.bottomInUnits;}
-var topMax=maxSizeData/inches[topUnits];var bottomMax=maxSizeData/inches[bottomUnits];var topRounded=this.getBarLen(topMax);var bottomRounded=this.getBarLen(bottomMax);topMax=topRounded/inches[curMapUnits]*inches[topUnits];bottomMax=bottomRounded/inches[curMapUnits]*inches[bottomUnits];var topPx=topMax/res/geodesicRatio;var bottomPx=bottomMax/res/geodesicRatio;if(this.eBottom.style.visibility=="visible"){this.eBottom.style.width=Math.round(bottomPx)+"px";this.eBottom.innerHTML=bottomRounded+" "+bottomUnits;}
-if(this.eTop.style.visibility=="visible"){this.eTop.style.width=Math.round(topPx)+"px";this.eTop.innerHTML=topRounded+" "+topUnits;}},CLASS_NAME:"OpenLayers.Control.ScaleLine"});OpenLayers.Control.ZoomIn=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){this.map.zoomIn();},CLASS_NAME:"OpenLayers.Control.ZoomIn"});OpenLayers.Control.ZoomOut=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){this.map.zoomOut();},CLASS_NAME:"OpenLayers.Control.ZoomOut"});OpenLayers.Control.ZoomToMaxExtent=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){if(this.map){this.map.zoomToMaxExtent();}},CLASS_NAME:"OpenLayers.Control.ZoomToMaxExtent"});OpenLayers.Event={observers:false,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(event){return event.target||event.srcElement;},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)));},isRightClick:function(event){return(((event.which)&&(event.which==3))||((event.button)&&(event.button==2)));},stop:function(event,allowDefault){if(!allowDefault){if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;}}
-if(event.stopPropagation){event.stopPropagation();}else{event.cancelBubble=true;}},findElement:function(event,tagName){var element=OpenLayers.Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase()))){element=element.parentNode;}
-return element;},observe:function(elementParam,name,observer,useCapture){var element=OpenLayers.Util.getElement(elementParam);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent)){name='keydown';}
-if(!this.observers){this.observers={};}
-if(!element._eventCacheID){var idPrefix="eventCacheID_";if(element.id){idPrefix=element.id+"_"+idPrefix;}
-element._eventCacheID=OpenLayers.Util.createUniqueID(idPrefix);}
-var cacheID=element._eventCacheID;if(!this.observers[cacheID]){this.observers[cacheID]=[];}
-this.observers[cacheID].push({'element':element,'name':name,'observer':observer,'useCapture':useCapture});if(element.addEventListener){element.addEventListener(name,observer,useCapture);}else if(element.attachEvent){element.attachEvent('on'+name,observer);}},stopObservingElement:function(elementParam){var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[cacheID]);},_removeElementObservers:function(elementObservers){if(elementObservers){for(var i=elementObservers.length-1;i>=0;i--){var entry=elementObservers[i];var args=new Array(entry.element,entry.name,entry.observer,entry.useCapture);var removed=OpenLayers.Event.stopObserving.apply(this,args);}}},stopObserving:function(elementParam,name,observer,useCapture){useCapture=useCapture||false;var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;if(name=='keypress'){if(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.detachEvent){name='keydown';}}
-var foundEntry=false;var elementObservers=OpenLayers.Event.observers[cacheID];if(elementObservers){var i=0;while(!foundEntry&&i<elementObservers.length){var cacheEntry=elementObservers[i];if((cacheEntry.name==name)&&(cacheEntry.observer==observer)&&(cacheEntry.useCapture==useCapture)){elementObservers.splice(i,1);if(elementObservers.length==0){delete OpenLayers.Event.observers[cacheID];}
-foundEntry=true;break;}
-i++;}}
-if(foundEntry){if(element.removeEventListener){element.removeEventListener(name,observer,useCapture);}else if(element&&element.detachEvent){element.detachEvent('on'+name,observer);}}
-return foundEntry;},unloadCache:function(){if(OpenLayers.Event&&OpenLayers.Event.observers){for(var cacheID in OpenLayers.Event.observers){var elementObservers=OpenLayers.Event.observers[cacheID];OpenLayers.Event._removeElementObservers.apply(this,[elementObservers]);}
-OpenLayers.Event.observers=false;}},CLASS_NAME:"OpenLayers.Event"};OpenLayers.Event.observe(window,'unload',OpenLayers.Event.unloadCache,false);if(window.Event){OpenLayers.Util.applyDefaults(window.Event,OpenLayers.Event);}else{var Event=OpenLayers.Event;}
-OpenLayers.Events=OpenLayers.Class({BROWSER_EVENTS:["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur"],listeners:null,object:null,element:null,eventTypes:null,eventHandler:null,fallThrough:null,includeXY:false,clearMouseListener:null,initialize:function(object,element,eventTypes,fallThrough,options){OpenLayers.Util.extend(this,options);this.object=object;this.fallThrough=fallThrough;this.listeners={};this.eventHandler=OpenLayers.Function.bindAsEventListener(this.handleBrowserEvent,this);this.clearMouseListener=OpenLayers.Function.bind(this.clearMouseCache,this);this.eventTypes=[];if(eventTypes!=null){for(var i=0,len=eventTypes.length;i<len;i++){this.addEventType(eventTypes[i]);}}
-if(element!=null){this.attachToElement(element);}},destroy:function(){if(this.element){OpenLayers.Event.stopObservingElement(this.element);if(this.element.hasScrollEvent){OpenLayers.Event.stopObserving(window,"scroll",this.clearMouseListener);}}
-this.element=null;this.listeners=null;this.object=null;this.eventTypes=null;this.fallThrough=null;this.eventHandler=null;},addEventType:function(eventName){if(!this.listeners[eventName]){this.eventTypes.push(eventName);this.listeners[eventName]=[];}},attachToElement:function(element){if(this.element){OpenLayers.Event.stopObservingElement(this.element);}
-this.element=element;for(var i=0,len=this.BROWSER_EVENTS.length;i<len;i++){var eventType=this.BROWSER_EVENTS[i];this.addEventType(eventType);OpenLayers.Event.observe(element,eventType,this.eventHandler);}
-OpenLayers.Event.observe(element,"dragstart",OpenLayers.Event.stop);},on:function(object){for(var type in object){if(type!="scope"){this.register(type,object.scope,object[type]);}}},register:function(type,obj,func){if((func!=null)&&(OpenLayers.Util.indexOf(this.eventTypes,type)!=-1)){if(obj==null){obj=this.object;}
-var listeners=this.listeners[type];listeners.push({obj:obj,func:func});}},registerPriority:function(type,obj,func){if(func!=null){if(obj==null){obj=this.object;}
-var listeners=this.listeners[type];if(listeners!=null){listeners.unshift({obj:obj,func:func});}}},un:function(object){for(var type in object){if(type!="scope"){this.unregister(type,object.scope,object[type]);}}},unregister:function(type,obj,func){if(obj==null){obj=this.object;}
-var listeners=this.listeners[type];if(listeners!=null){for(var i=0,len=listeners.length;i<len;i++){if(listeners[i].obj==obj&&listeners[i].func==func){listeners.splice(i,1);break;}}}},remove:function(type){if(this.listeners[type]!=null){this.listeners[type]=[];}},triggerEvent:function(type,evt){var listeners=this.listeners[type];if(!listeners||listeners.length==0){return;}
-if(evt==null){evt={};}
-evt.object=this.object;evt.element=this.element;if(!evt.type){evt.type=type;}
-var listeners=listeners.slice(),continueChain;for(var i=0,len=listeners.length;i<len;i++){var callback=listeners[i];continueChain=callback.func.apply(callback.obj,[evt]);if((continueChain!=undefined)&&(continueChain==false)){break;}}
-if(!this.fallThrough){OpenLayers.Event.stop(evt,true);}
-return continueChain;},handleBrowserEvent:function(evt){if(this.includeXY){evt.xy=this.getMousePosition(evt);}
-this.triggerEvent(evt.type,evt);},clearMouseCache:function(){this.element.scrolls=null;this.element.lefttop=null;this.element.offsets=null;},getMousePosition:function(evt){if(!this.includeXY){this.clearMouseCache();}else if(!this.element.hasScrollEvent){OpenLayers.Event.observe(window,"scroll",this.clearMouseListener);this.element.hasScrollEvent=true;}
-if(!this.element.scrolls){this.element.scrolls=[(document.documentElement.scrollLeft||document.body.scrollLeft),(document.documentElement.scrollTop||document.body.scrollTop)];}
-if(!this.element.lefttop){this.element.lefttop=[(document.documentElement.clientLeft||0),(document.documentElement.clientTop||0)];}
-if(!this.element.offsets){this.element.offsets=OpenLayers.Util.pagePosition(this.element);this.element.offsets[0]+=this.element.scrolls[0];this.element.offsets[1]+=this.element.scrolls[1];}
-return new OpenLayers.Pixel((evt.clientX+this.element.scrolls[0])-this.element.offsets[0]
--this.element.lefttop[0],(evt.clientY+this.element.scrolls[1])-this.element.offsets[1]
--this.element.lefttop[1]);},CLASS_NAME:"OpenLayers.Events"});OpenLayers.Format=OpenLayers.Class({options:null,externalProjection:null,internalProjection:null,data:null,keepData:false,initialize:function(options){OpenLayers.Util.extend(this,options);this.options=options;},destroy:function(){},read:function(data){OpenLayers.Console.userError(OpenLayers.i18n("readNotImplemented"));},write:function(object){OpenLayers.Console.userError(OpenLayers.i18n("writeNotImplemented"));},CLASS_NAME:"OpenLayers.Format"});OpenLayers.Lang["ar"]=OpenLayers.Util.applyDefaults({'permalink':"وصلة دائمة",'baseLayer':"الطبقة الاساسية",'readNotImplemented':"القراءة غير محققة.",'writeNotImplemented':"الكتابة غير محققة",'errorLoadingGML':"خطأ عند تحميل الملف جي ام ال ${url}",'scale':"النسبة = 1 : ${scaleDenom}",'W':"غ",'E':"شر",'N':"شم",'S':"ج"});OpenLayers.Lang["be-tarask"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Неапрацаваны вынік запыту ${statusText}",'permalink':"Сталая спасылка",'overlays':"Слаі",'baseLayer':"Базавы слой",'sameProjection':"Аглядная мапа працуе толькі калі яна мае тую ж праекцыю, што і асноўная мапа",'readNotImplemented':"Функцыянальнасьць чытаньня ня створаная.",'writeNotImplemented':"Функцыянальнасьць запісу ня створаная.",'noFID':"Немагчыма абнавіць магчымасьць, для якога не існуе FID.",'errorLoadingGML':"Памылка загрузкі файла GML ${url}",'browserNotSupported':"Ваш браўзэр не падтрымлівае вэктарную графіку. У цяперашні момант падтрымліваюцца: ${renderers}",'componentShouldBe':"addFeatures : кампанэнт павінен быць ${geomType}",'getFeatureError':"getFeatureFromEvent выкліканы для слоя бяз рэндэру. Звычайна гэта азначае, што Вы зьнішчылі слой, але пакінулі зьвязаны зь ім апрацоўшчык.",'minZoomLevelError':"Уласьцівасьць minZoomLevel прызначана толькі для выкарыстаньня са слаямі вытворнымі ад FixedZoomLevels. Тое, што  гэты wfs-слой правяраецца на minZoomLevel — рэха прошлага. Але мы ня можам выдаліць гэтую магчымасьць, таму што ад яе залежаць некаторыя заснаваныя на OL дастасаваньні. Тым ня менш, праверка minZoomLevel будзе выдаленая ў вэрсіі 3.0. Калі ласка, выкарыстоўваеце замест яе ўстаноўкі мінімальнага/максымальнага памераў, як апісана тут: http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"WFS-транзакцыя: ПОСЬПЕХ ${response}",'commitFailed':"WFS-транзакцыя: ПАМЫЛКА ${response}",'googleWarning':"Не атрымалася загрузіць слой Google. \x3cbr\x3e\x3cbr\x3eКаб пазбавіцца гэтага паведамленьня, выберыце новы базавы слой у сьпісе ў верхнім правым куце.\x3cbr\x3e\x3cbr\x3e Хутчэй за ўсё, прычына ў тым, што скрыпт бібліятэкі Google Maps ня быў уключаныя альбо не ўтрымлівае слушны API-ключ для Вашага сайта.\x3cbr\x3e\x3cbr\x3eРаспрацоўшчыкам: Для таго, каб даведацца як зрабіць так, каб усё працавала, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eнацісьніце тут\x3c/a\x3e",'getLayerWarning':"Немагчыма загрузіць слой ${layerType}.\x3cbr\x3e\x3cbr\x3eКаб пазбавіцца гэтага паведамленьня, выберыце новы базавы слой у сьпісе ў верхнім правым куце.\x3cbr\x3e\x3cbr\x3eХутчэй за ўсё, прычына ў тым, што скрыпт бібліятэкі ${layerLib} ня быў слушна ўключаны.\x3cbr\x3e\x3cbr\x3eРаспрацоўшчыкам: Для таго, каб даведацца як зрабіць так, каб усё працавала, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eнацісьніце тут\x3c/a\x3e",'scale':"Маштаб = 1 : ${scaleDenom}",'W':"З",'E':"У",'N':"Пн",'S':"Пд",'layerAlreadyAdded':"Вы паспрабавалі дадаць слой ${layerName} на мапу, але ён ужо дададзены",'reprojectDeprecated':"Вы выкарыстоўваеце ўстаноўку \'reproject\' для слоя ${layerName}. Гэтая ўстаноўка зьяўляецца састарэлай: яна выкарыстоўвалася для падтрымкі паказу зьвестак на камэрцыйных базавых мапах, але гэта функцыя цяпер рэалізаваная ў убудаванай падтрымцы сфэрычнай праекцыі Мэркатара. Дадатковая інфармацыя ёсьць на http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Гэты мэтад састарэлы і будзе выдалены ў вэрсіі 3.0. Калі ласка, замест яго выкарыстоўвайце ${newMethod}.",'boundsAddError':"Вам неабходна падаць абодва значэньні x і y для функцыі складаньня.",'lonlatAddError':"Вам неабходна падаць абодва значэньні lon і lat для функцыі складаньня.",'pixelAddError':"Вам неабходна падаць абодва значэньні x і y для функцыі складаньня.",'unsupportedGeometryType':"Тып геамэтрыі не падтрымліваецца: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition failed: верагодна элемэнт з ідэнтыфікатарам ${elemId} займае няслушнае месца.",'filterEvaluateNotImplemented':"evaluate не рэалізаваны для гэтага тыпу фільтру."});OpenLayers.Lang["bg"]=OpenLayers.Util.applyDefaults({'permalink':"Постоянна препратка",'baseLayer':"Основен слой",'errorLoadingGML':"Грешка при зареждане на GML файл ${url}",'scale':"Мащаб = 1 : ${scaleDenom}",'layerAlreadyAdded':"Опитахте да добавите слой ${layerName} в картата, но той вече е добавен",'methodDeprecated':"Този метод е остарял и ще бъде премахват в 3.0. Вместо него използвайте ${newMethod}."});OpenLayers.Lang["br"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Distro evel reked anveret ${statusText}",'permalink':"Peurliamm",'overlays':"Gwiskadoù",'baseLayer':"Gwiskad diazez",'sameProjection':"Ne\'z ar gartenn lec\'hiañ en-dro nemet pa vez heñvel ar banndres anezhi ha hini ar gartenn bennañ",'readNotImplemented':"N\'eo ket emplementet al lenn.",'writeNotImplemented':"N\'eo ket emplementet ar skrivañ.",'noFID':"N\'haller ket hizivaat un elfenn ma n\'eus ket a niverenn-anaout (FID) eviti.",'errorLoadingGML':"Fazi e-ser kargañ ar restr GML ${url}",'browserNotSupported':"N\'eo ket skoret an daskor vektorel gant ho merdeer. Setu aze an daskorerioù skoret evit ar poent :\n${renderers}",'componentShouldBe':"addFeatures : bez\' e tlefe ar parzh besañ eus ar seurt ${geomType}",'getFeatureError':"Galvet eo bet getFeatureFromEvent called war ur gwiskad hep daskorer. Kement-se a dalvez ez eus bet freuzet ur gwiskad hag hoc\'h eus miret un embreger bennak stag outañ.",'minZoomLevelError':"Ne zleer implijout ar perzh minZoomLevel nemet evit gwiskadoù FixedZoomLevels-descendent. Ar fed ma wiria ar gwiskad WHS-se hag-eñ ez eus eus minZoomLevel zo un aspadenn gozh. Koulskoude n\'omp ket evit e ziverkañ kuit da derriñ arloadoù diazezet war OL a c\'hallfe bezañ stag outañ. Setu perak eo dispredet -- Lamet kuit e vo ar gwiriañ minZoomLevel a-is er stumm 3.0. Ober gant an arventennoù bihanañ/brasañ evel deskrivet amañ e plas : http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"Treuzgread WFS : MAT EO ${response}",'commitFailed':"Treuzgread WFS Transaction: C\'HWITET ${response}",'googleWarning':"N\'eus ket bet gallet kargañ ar gwiskad Google ent reizh.\x3cbr\x3e\x3cbr\x3eEvit en em zizober eus ar c\'hemenn-mañ, dibabit ur BaseLayer nevez en diuzer gwiskadoù er c\'horn dehoù el laez.\x3cbr\x3e\x3cbr\x3eSur a-walc\'h eo peogwir n\'eo ket bet ensoc\'het levraoueg Google Maps pe neuze ne glot ket an alc\'hwez API gant ho lec\'hienn.\x3cbr\x3e\x3cbr\x3eDiorroerien : Evit reizhañ an dra-se, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eclick here\x3c/a\x3e",'getLayerWarning':"N\'haller ket kargañ ar gwiskad ${layerType} ent reizh.\x3cbr\x3e\x3cbr\x3eEvit en em zizober eus ar c\'hemenn-mañ, dibabit ur BaseLayer nevez en diuzer gwiskadoù er c\'horn dehoù el laez.\x3cbr\x3e\x3cbr\x3eSur a-walc\'h eo peogwir n\'eo ket bet ensoc\'het mat al levraoueg ${layerLib}.\x3cbr\x3e\x3cbr\x3eDiorroerien : Evit gouzout penaos reizhañ an dra-se, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eclick here\x3c/a\x3e",'scale':"Skeul = 1 : ${scaleDenom}",'W':"K",'E':"R",'N':"N",'S':"S",'layerAlreadyAdded':"Klasket hoc\'h eus ouzhpennañ ar gwiskad : ${layerName} d\'ar gartenn, met ouzhpennet e oa bet c\'hoazh",'reprojectDeprecated':"Emaoc\'h oc\'h implijout an dibarzh \'reproject\' war ar gwiskad ${layerName}. Dispredet eo an dibarzh-mañ : bet eo hag e talveze da ziskwel roadennoù war-c\'horre kartennoù diazez kenwerzhel, un dra hag a c\'haller ober bremañ gant an arc\'hwel dre skor banndres boullek Mercator. Muioc\'h a ditouroù a c\'haller da gaout war http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Dispredet eo an daore-se ha tennet e vo kuit eus ar stumm 3.0. Grit gant ${newMethod} e plas.",'boundsAddError':"Rekis eo tremen an div dalvoudenn x ha y d\'an arc\'hwel add.",'lonlatAddError':"Rekis eo tremen an div dalvoudenn hedred ha ledred d\'an arc\'hwel add.",'pixelAddError':"Rekis eo tremen an div dalvoudenn x ha y d\'an arc\'hwel add.",'unsupportedGeometryType':"Seurt mentoniezh anskoret : ${geomType}",'pagePositionFailed':"C\'hwitet eo OpenLayers.Util.pagePosition : marteze emañ lec\'hiet fall an elfenn id ${elemId}.",'filterEvaluateNotImplemented':"N\'eo ket bet emplementet ar priziañ evit seurt siloù c\'hoazh."});OpenLayers.Lang["el"]=OpenLayers.Util.applyDefaults({'scale':"Κλίμακα ~ 1 : ${scaleDenom}"});OpenLayers.Lang.en={'unhandledRequest':"Unhandled request return ${statusText}",'permalink':"Permalink",'overlays':"Overlays",'baseLayer':"Base Layer",'sameProjection':"The overview map only works when it is in the same projection as the main map",'readNotImplemented':"Read not implemented.",'writeNotImplemented':"Write not implemented.",'noFID':"Can't update a feature for which there is no FID.",'errorLoadingGML':"Error in loading GML file ${url}",'browserNotSupported':"Your browser does not support vector rendering. Currently supported renderers are:\n${renderers}",'componentShouldBe':"addFeatures : component should be an ${geomType}",'getFeatureError':"getFeatureFromEvent called on layer with no renderer. This usually means you "+"destroyed a layer, but not some handler which is associated with it.",'minZoomLevelError':"The minZoomLevel property is only intended for use "+"with the FixedZoomLevels-descendent layers. That this "+"wfs layer checks for minZoomLevel is a relic of the"+"past. We cannot, however, remove it without possibly "+"breaking OL based applications that may depend on it."+" Therefore we are deprecating it -- the minZoomLevel "+"check below will be removed at 3.0. Please instead "+"use min/max resolution setting as described here: "+"http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"WFS Transaction: SUCCESS ${response}",'commitFailed':"WFS Transaction: FAILED ${response}",'googleWarning':"The Google Layer was unable to load correctly.<br><br>"+"To get rid of this message, select a new BaseLayer "+"in the layer switcher in the upper-right corner.<br><br>"+"Most likely, this is because the Google Maps library "+"script was either not included, or does not contain the "+"correct API key for your site.<br><br>"+"Developers: For help getting this working correctly, "+"<a href='http://trac.openlayers.org/wiki/Google' "+"target='_blank'>click here</a>",'getLayerWarning':"The ${layerType} Layer was unable to load correctly.<br><br>"+"To get rid of this message, select a new BaseLayer "+"in the layer switcher in the upper-right corner.<br><br>"+"Most likely, this is because the ${layerLib} library "+"script was not correctly included.<br><br>"+"Developers: For help getting this working correctly, "+"<a href='http://trac.openlayers.org/wiki/${layerLib}' "+"target='_blank'>click here</a>",'scale':"Scale = 1 : ${scaleDenom}",'W':'W','E':'E','N':'N','S':'S','graticule':'Graticule','layerAlreadyAdded':"You tried to add the layer: ${layerName} to the map, but it has already been added",'reprojectDeprecated':"You are using the 'reproject' option "+"on the ${layerName} layer. This option is deprecated: "+"its use was designed to support displaying data over commercial "+"basemaps, but that functionality should now be achieved by using "+"Spherical Mercator support. More information is available from "+"http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"This method has been deprecated and will be removed in 3.0. "+"Please use ${newMethod} instead.",'boundsAddError':"You must pass both x and y values to the add function.",'lonlatAddError':"You must pass both lon and lat values to the add function.",'pixelAddError':"You must pass both x and y values to the add function.",'unsupportedGeometryType':"Unsupported geometry type: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition failed: element with id ${elemId} may be misplaced.",'filterEvaluateNotImplemented':"evaluate is not implemented for this filter type.",'end':''};OpenLayers.Lang["fi"]=OpenLayers.Util.applyDefaults({'permalink':"Ikilinkki",'overlays':"Kerrokset",'baseLayer':"Peruskerros",'sameProjection':"Yleiskuvakarttaa voi käyttää vain, kun sillä on sama projektio kuin pääkartalla.",'W':"L",'E':"I",'N':"P",'S':"E"});OpenLayers.Lang["fur"]=OpenLayers.Util.applyDefaults({'permalink':"Leam Permanent",'overlays':"Livei parsore",'baseLayer':"Livel di base",'browserNotSupported':"Il to sgarfadôr nol supuarte la renderizazion vetoriâl. Al moment a son supuartâts:\n${renderers}",'scale':"Scjale = 1 : ${scaleDenom}",'W':"O",'E':"E",'N':"N",'S':"S"});OpenLayers.Lang["gl"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Solicitude non xerada; a resposta foi: ${statusText}",'permalink':"Ligazón permanente",'overlays':"Capas superpostas",'baseLayer':"Capa base",'sameProjection':"A vista xeral do mapa só funciona cando está na mesma proxección có mapa principal",'readNotImplemented':"Lectura non implementada.",'writeNotImplemented':"Escritura non implementada.",'noFID':"Non se pode actualizar a funcionalidade para a que non hai FID.",'errorLoadingGML':"Erro ao cargar o ficheiro GML ${url}",'browserNotSupported':"O seu navegador non soporta a renderización de vectores. Os renderizadores soportados actualmente son:\n${renderers}",'componentShouldBe':"addFeatures: o compoñente debera ser de tipo ${geomType}",'getFeatureError':"getFeatureFromEvent ten sido chamado a unha capa sen renderizador. Isto normalmente significa que destruíu unha capa, mais non o executador que está asociado con ela.",'minZoomLevelError':"A propiedade minZoomLevel é só para uso conxuntamente coas capas FixedZoomLevels-descendent. O feito de que esa capa wfs verifique o minZoomLevel é unha reliquia do pasado. Non podemos, con todo, eliminala sen a posibilidade de non romper as aplicacións baseadas en OL que poidan depender dela. Por iso a estamos deixando obsoleta (a comprobación minZoomLevel de embaixo será eliminada na versión 3.0). Por favor, no canto diso use o axuste de resolución mín/máx tal e como está descrito aquí: http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"Transacción WFS: ÉXITO ${response}",'commitFailed':"Transacción WFS: FALLIDA ${response}",'googleWarning':"A capa do Google non puido cargarse correctamente.\x3cbr\x3e\x3cbr\x3ePara evitar esta mensaxe, escolla unha nova capa base no seleccionador de capas na marxe superior dereita.\x3cbr\x3e\x3cbr\x3eProbablemente, isto acontece porque a escritura da libraría do Google Maps ou ben non foi incluída ou ben non contén a clave API correcta para o seu sitio.\x3cbr\x3e\x3cbr\x3eDesenvolvedores: para axudar a facer funcionar isto correctamente, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3epremede aquí\x3c/a\x3e",'getLayerWarning':"A capa ${layerType} foi incapaz de cargarse correctamente.\x3cbr\x3e\x3cbr\x3ePara evitar esta mensaxe, escolla unha nova capa base no seleccionador de capas na marxe superior dereita.\x3cbr\x3e\x3cbr\x3eProbablemente, isto acontece porque a escritura da libraría ${layerLib} non foi ben incluída.\x3cbr\x3e\x3cbr\x3eDesenvolvedores: para axudar a facer funcionar isto correctamente, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3epremede aquí\x3c/a\x3e",'scale':"Escala = 1 : ${scaleDenom}",'W':"O",'E':"L",'N':"N",'S':"S",'layerAlreadyAdded':"Intentou engadir a capa: ${layerName} ao mapa, pero xa fora engadida",'reprojectDeprecated':"Está usando a opción \"reproject\" na capa ${layerName}. Esta opción está obsoleta: o seu uso foi deseñado para a visualización de datos sobre mapas base comerciais, pero esta funcionalidade debera agora ser obtida utilizando a proxección Spherical Mercator. Hai dispoñible máis información en http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Este método está obsoleto e será eliminado na versión 3.0. Por favor, no canto deste use ${newMethod}.",'boundsAddError':"Debe achegar os valores x e y á función add.",'lonlatAddError':"Debe achegar tanto o valor lon coma o lat á función add.",'pixelAddError':"Debe achegar os valores x e y á función add.",'unsupportedGeometryType':"Tipo xeométrico non soportado: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition fallou: o elemento con id ${elemId} pode non estar na súa posición.",'filterEvaluateNotImplemented':"avaliar non está implementado para este tipo de filtro."});OpenLayers.Lang["gsw"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Nit behandleti Aafrogsruckmäldig ${statusText}",'permalink':"Permalink",'overlays':"Iberlagerige",'baseLayer':"Grundcharte",'sameProjection':"D Ibersichts-Charte funktioniert nume, wänn si di glych Projäktion brucht wie d Hauptcharte",'readNotImplemented':"Läse nit implementiert.",'writeNotImplemented':"Schrybe nit implementiert.",'noFID':"E Feature, wu s kei FID derfir git, cha nit aktualisiert wäre.",'errorLoadingGML':"Fähler bim Lade vu dr GML-Datei ${url}",'browserNotSupported':"Dyy Browser unterstitzt kei Vektordarstellig. Aktuäll unterstitzti Renderer:\n${renderers}",'componentShouldBe':"addFeatures : Komponänt sott dr Typ ${geomType} syy",'getFeatureError':"getFeatureFromEvent isch uf eme Layer ohni Renderer ufgruefe wore. Des heisst normalerwys, ass Du e Layer kaputt gmacht hesch, aber nit dr Handler, wu derzue ghert.",'minZoomLevelError':"D minZoomLevel-Eigeschaft isch nume dänk fir d Layer, wu vu dr FixedZoomLevels abstamme. Ass dää wfs-Layer minZoomLevel prieft, scih e Relikt us dr Vergangeheit. Mir chenne s aber nit ändere ohni OL_basierti Aawändige villicht kaputt gehn, wu dervu abhänge.  Us däm Grund het die Funktion d Eigeschaft \'deprecated\' iberchuu. D minZoomLevel-Priefig unte wird in dr Version 3.0 usegnuu. Bitte verwänd statt däm e min/max-Uflesig wie s do bschriben isch: http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"WFS-Transaktion: ERFOLGRYCH ${response}",'commitFailed':"WFS-Transaktion: FÄHLGSCHLAA ${response}",'googleWarning':"Dr Google-Layer het nit korräkt chenne glade wäre.\x3cbr\x3e\x3cbr\x3eGo die Mäldig nimi z kriege, wehl e andere Hintergrundlayer us em LayerSwitcher im rächte obere Ecke.\x3cbr\x3e\x3cbr\x3eDää Fähler git s seli hyfig, wel s Skript vu dr Google-Maps-Bibliothek nit yybunde woren isch oder wel s kei giltige API-Schlissel fir Dyy URL din het.\x3cbr\x3e\x3cbr\x3eEntwickler: Fir Hilf zum korräkte Yybinde vum Google-Layer \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3edoo drucke\x3c/a\x3e",'getLayerWarning':"Dr ${layerType}-Layer het nit korräkt chenne glade wäre.\x3cbr\x3e\x3cbr\x3eGo die Mäldig nimi z kriege, wehl e andere Hintergrundlayer us em LayerSwitcher im rächte obere Ecke.\x3cbr\x3e\x3cbr\x3eDää Fähler git s seli hyfig, wel s Skript vu dr \'${layerLib}\'-Bibliothek nit yybunde woren isch oder wel s kei giltige API-Schlissel fir Dyy URL din het.\x3cbr\x3e\x3cbr\x3eEntwickler: Fir Hilf zum korräkte Yybinde vu Layer \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3edoo drucke\x3c/a\x3e",'scale':"Maßstab = 1 : ${scaleDenom}",'W':"W",'E':"O",'N':"N",'S':"S",'layerAlreadyAdded':"Du hesch versuecht dää Layer in d Charte yyzfiege: ${layerName}, aber är isch schoi yygfiegt",'reprojectDeprecated':"Du bruchsch d \'reproject\'-Option bim ${layerName}-Layer. Die Option isch nimi giltig: si isch aagleit wore go   Date iber kommerziälli Grundcharte lege, aber des sott mer jetz mache mit dr Unterstitzig vu Spherical Mercator. Meh Informatione git s uf http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Die Methode isch veraltet un wird us dr Version 3.0 usegnuu. Bitte verwäbnd statt däm ${newMethod}.",'boundsAddError':"Du muesch e x-Wärt un e y-Wärt yygee bi dr Zuefieg-Funktion",'lonlatAddError':"Du meusch e Lengi- un e Breiti-Grad yygee bi dr Zuefieg-Funktion.",'pixelAddError':"Du muesch x- un y-Wärt aagee bi dr Zuefieg-Funktion.",'unsupportedGeometryType':"Nit unterstitze Geometrii-Typ: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition fählgschlaa: Elemänt mit ID ${elemId} isch villicht falsch gsetzt.",'filterEvaluateNotImplemented':"evaluiere isch nit implemäntiert in däm Filtertyp."});OpenLayers.Lang["hr"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Nepodržani zahtjev ${statusText}",'permalink':"Permalink",'overlays':"Overlays",'baseLayer':"Osnovna karta",'sameProjection':"Pregledna karta radi jedino kao je u istoj projekciji kao i glava karta",'readNotImplemented':"Čitanje nije implementirano.",'writeNotImplemented':"Pisanje nije implementirano.",'noFID':"Ne mogu ažurirati značajku za koju ne postoji FID.",'errorLoadingGML':"Greška u učitavanju GML datoteke ${url}",'browserNotSupported':"Vaš preglednik ne podržava vektorsko renderiranje. Trenutno podržani rendereri su: ${renderers}",'componentShouldBe':"addFeatures : komponenta bi trebala biti ${geomType}",'getFeatureError':"getFeatureFromEvent je pozvao Layer bez renderera. Ovo obično znači da ste uništiili Layer, a ne neki Handler koji je povezan s njim.",'commitSuccess':"WFS Transakcija: USPJEŠNA ${response}",'commitFailed':"WFS Transakcija: NEUSPJEŠNA ${response}",'scale':"Mjerilo = 1 : ${scaleDenom}",'layerAlreadyAdded':"Pokušali ste dodati layer:  ${layerName} na kartu, ali je već dodan",'methodDeprecated':"Ova metoda nije odobrena i biti će maknuta u 3.0. Koristite ${newMethod}.",'boundsAddError':"Morate dati obje vrijednosti ,  x i y  da bi dodali funkciju.",'lonlatAddError':"Morate dati obje vrijednosti , (lon i lat) da bi dodali funkciju.",'pixelAddError':"Morate dati obje vrijednosti ,  x i y  da bi dodali funkciju.",'unsupportedGeometryType':"Nepodržani tip geometrije: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition nije uspjelo: element sa id ${elemId} može biti krivo smješten."});OpenLayers.Lang["hsb"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Wotmołwa njewobdźěłaneho naprašowanja ${statusText}",'permalink':"Trajny wotkaz",'overlays':"Naworštowanja",'baseLayer':"Zakładna runina",'sameProjection':"Přehladowa karta jenož funguje, hdyž je w samsnej projekciji kaž hłowna karta",'readNotImplemented':"Čitanje njeimplementowane.",'writeNotImplemented':"Pisanje njeimplementowane.",'noFID':"Funkcija, za kotruž FID njeje, njeda so aktualizować.",'errorLoadingGML':"Zmylk při začitowanju dataje ${url}",'browserNotSupported':"Twój wobhladowak wektorowe rysowanje njepodpěruje. Tuchwilu podpěrowane rysowaki su:\n${renderers}",'componentShouldBe':"addFeatures: komponenta měła ${geomType} być",'getFeatureError':"getFeatureFromEvent bu na woršće bjez rysowak zawołany. To zwjetša woznamjenja, zo sy worštu zničił, ale nic wobdźěłak, kotryž je z njej zwjazany.",'minZoomLevelError':"Kajkosć minZoomLevel je jenož za wužiwanje z worštami myslena, kotrež wot FixedZoomLevels pochadźeja. Zo tuta woršta wfs za minZoomLevel přepruwuje, je relikt zańdźenosće. Njemóžemy wšak ju wotstronić, bjeztoho zo aplikacije, kotrež na OpenLayers bazěruja a snano tutu kajkosć wužiwaja, hižo njefunguja. Tohodla smy ju jako zestarjenu woznamjenili -- přepruwowanje za minZoomLevel budu so we wersiji 3.0 wotstronjeć. Prošu wužij město toho nastajenje min/max, kaž je tu wopisane: http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"WFS-Transakcija: WUSPĚŠNA ${response}",'commitFailed':"WFS-Transakcija: NJEPORADŹENA ${response}",'googleWarning':"Woršta Google njemóžeše so korektnje začitać.\x3cbr\x3e\x3cbr\x3eZo by tutu zdźělenku wotbył, wubjer nowy BaseLayer z wuběra worštow horjeka naprawo.\x3cbr\x3e\x3cbr\x3eNajskerje so to stawa, dokelž skript biblioteki Google Maps pak njebu zapřijaty pak njewobsahuje korektny kluč API za twoje sydło.\x3cbr\x3e\x3cbr\x3eWuwiwarjo: Za pomoc ke korektnemu fungowanju worštow\n\x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3etu kliknyć\x3c/a\x3e",'getLayerWarning':"Woršta ${layerType} njemóžeše so korektnje začitać.\x3cbr\x3e\x3cbr\x3eZo by tutu zdźělenku wotbył, wubjer nowy BaseLayer z wuběra worštow horjeka naprawo.\x3cbr\x3e\x3cbr\x3eNajskerje so to stawa, dokelž skript biblioteki ${layerLib} njebu korektnje zapřijaty.\x3cbr\x3e\x3cbr\x3eWuwiwarjo: Za pomoc ke korektnemu fungowanju worštow\n\x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3etu kliknyć\x3c/a\x3e",'scale':"Měritko = 1 : ${scaleDenom}",'W':"Z",'E':"W",'N':"S",'S':"J",'layerAlreadyAdded':"Sy spytał runinu ${layerName} karće dodać, ale je so hižo dodała",'reprojectDeprecated':"Wužiwaš opciju \"reproject\" wořšty ${layerName}. Tuta opcija je zestarjena: jeje wužiwanje bě myslene, zo by zwobraznjenje datow nad komercielnymi bazowymi kartami podpěrało, ale funkcionalnosć měła so nětko z pomocu Sperical Mercator docpěć. Dalše informacije steja na http://trac.openlayers.org/wiki/SphericalMercator k dispoziciji.",'methodDeprecated':"Tuta metoda je so njeschwaliła a budźe so w 3.0 wotstronjeć. Prošu wužij ${newMethod} město toho.",'boundsAddError':"Dyrbiš hódnotu x kaž tež y funkciji \"add\" přepodać.",'lonlatAddError':"Dyrbiš hódnotu lon kaž tež lat funkciji \"add\" přepodać.",'pixelAddError':"Dyrbiš hódnotu x kaž tež y funkciji \"add\" přepodać.",'unsupportedGeometryType':"Njepodpěrowany geometrijowy typ: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition je so njeporadźił: element z id ${elemId} bu snano wopak zaměstnjeny.",'filterEvaluateNotImplemented':"wuhódnoćenje njeje za tutón filtrowy typ implementowany."});OpenLayers.Lang["hu"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Nem kezelt kérés visszatérése ${statusText}",'permalink':"Permalink",'overlays':"Rávetítések",'baseLayer':"Alapréteg",'sameProjection':"Az áttekintő térkép csak abban az esetben működik, ha ugyanazon a vetületen van, mint a fő térkép.",'readNotImplemented':"Olvasás nincs végrehajtva.",'writeNotImplemented':"Írás nincs végrehajtva.",'noFID':"Nem frissíthető olyan jellemző, amely nem rendelkezik FID-del.",'errorLoadingGML':"Hiba GML-fájl betöltésekor ${url}",'browserNotSupported':"A böngészője nem támogatja a vektoros renderelést. A jelenleg támogatott renderelők:\n${renderers}",'componentShouldBe':"addFeatures : az összetevőnek ilyen típusúnak kell lennie: ${geomType}",'getFeatureError':"getFeatureFromEvent réteget hívott meg renderelő nélkül. Ez rendszerint azt jelenti, hogy megsemmisített egy fóliát, de néhány ahhoz társított kezelőt nem.",'minZoomLevelError':"A minZoomLevel tulajdonságot csak a következővel való használatra szánták: FixedZoomLevels-leszármazott fóliák. Ez azt jelenti, hogy a minZoomLevel wfs fólia jelölőnégyzetei már a múlté. Mi azonban nem távolíthatjuk el annak a veszélye nélkül, hogy az esetlegesen ettől függő OL alapú alkalmazásokat tönkretennénk. Ezért ezt érvénytelenítjük -- a minZoomLevel az alul levő jelölőnégyzet a 3.0-s verzióból el lesz távolítva. Kérjük, helyette használja a  min/max felbontás beállítást, amelyről az alábbi helyen talál leírást: http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"WFS tranzakció: SIKERES ${response}",'commitFailed':"WFS tranzakció: SIKERTELEN ${response}",'googleWarning':"A Google fólia betöltése sikertelen.\x3cbr\x3e\x3cbr\x3eAhhoz, hogy ez az üzenet eltűnjön, válasszon egy új BaseLayer fóliát a jobb felső sarokban található fóliakapcsoló segítségével.\x3cbr\x3e\x3cbr\x3eNagy valószínűséggel ez azért van, mert a Google Maps könyvtár parancsfájlja nem található, vagy nem tartalmazza az Ön oldalához tartozó megfelelő API-kulcsot.\x3cbr\x3e\x3cbr\x3eFejlesztőknek: A helyes működtetésre vonatkozó segítség az alábbi helyen érhető el, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3ekattintson ide\x3c/a\x3e",'getLayerWarning':"A(z) ${layerType} fólia nem töltődött be helyesen.\x3cbr\x3e\x3cbr\x3eAhhoz, hogy ez az üzenet eltűnjön, válasszon egy új BaseLayer fóliát a jobb felső sarokban található fóliakapcsoló segítségével.\x3cbr\x3e\x3cbr\x3eNagy valószínűséggel ez azért van, mert a(z) ${layerLib} könyvtár parancsfájlja helytelen.\x3cbr\x3e\x3cbr\x3eFejlesztőknek: A helyes működtetésre vonatkozó segítség az alábbi helyen érhető el, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3ekattintson ide\x3c/a\x3e",'scale':"Lépték = 1 : ${scaleDenom}",'W':"Ny",'E':"K",'N':"É",'S':"D",'layerAlreadyAdded':"Megpróbálta hozzáadni a(z) ${layerName} fóliát a térképhez, de az már hozzá van adva",'reprojectDeprecated':"Ön a \'reproject\' beállítást használja a(z) ${layerName} fólián. Ez a beállítás érvénytelen: használata az üzleti alaptérképek fölötti adatok megjelenítésének támogatására szolgált, de ezt a funkció ezentúl a Gömbi Mercator használatával érhető el. További információ az alábbi helyen érhető el: http://trac.openlayers.org/wiki/SphericalMercator",'methodDeprecated':"Ez a módszer érvénytelenítve lett és a 3.0-s verzióból el lesz távolítva. Használja a(z) ${newMethod} módszert helyette.",'boundsAddError':"Az x és y értékeknek egyaránt meg kell felelnie, hogy a funkciót hozzáadhassa.",'lonlatAddError':"A hossz. és szél. értékeknek egyaránt meg kell felelnie, hogy a funkciót hozzáadhassa.",'pixelAddError':"Az x és y értékeknek egyaránt meg kell felelnie, hogy a funkciót hozzáadhassa.",'unsupportedGeometryType':"Nem támogatott geometriatípus: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition sikertelen: lehetséges, hogy a(z) ${elemId} azonosítójú elem téves helyre került.",'filterEvaluateNotImplemented':"ennél a szűrőtípusnál kiértékelés nem hajtódik végre."});OpenLayers.Lang["ia"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Le responsa a un requesta non esseva maneate: ${statusText}",'permalink':"Permaligamine",'overlays':"Superpositiones",'baseLayer':"Strato de base",'sameProjection':"Le mini-carta functiona solmente si illo es in le mesme projection que le carta principal",'readNotImplemented':"Lectura non implementate.",'writeNotImplemented':"Scriptura non implementate.",'noFID':"Non pote actualisar un elemento sin FID.",'errorLoadingGML':"Error al cargamento del file GML ${url}",'browserNotSupported':"Tu navigator non supporta le rendition de vectores. Le renditores actualmente supportate es:\n${renderers}",'componentShouldBe':"addFeatures: le componente debe esser del typo ${geomType}",'getFeatureError':"getFeatureFromEvent ha essite appellate in un strato sin renditor. Isto significa generalmente que tu ha destruite un strato, ma lassava un gestor associate con illo.",'minZoomLevelError':"Le proprietate minZoomLevel es solmente pro uso con le stratos descendente de FixedZoomLevels. Le facto que iste strato WFS verifica minZoomLevel es un reliquia del passato. Nonobstante, si nos lo remove immediatemente, nos pote rumper applicationes a base de OL que depende de illo. Ergo nos lo declara obsolete; le verification de minZoomLevel in basso essera removite in version 3.0. Per favor usa in su loco le configuration de resolutiones min/max como describite a: http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"Transaction WFS: SUCCESSO ${response}",'commitFailed':"Transaction WFS: FALLEVA ${response}",'googleWarning':"Le strato Google non poteva esser cargate correctemente.\x3cbr\x3e\x3cbr\x3ePro disfacer te de iste message, selige un nove BaseLayer in le selector de strato in alto a dextra.\x3cbr\x3e\x3cbr\x3eMulto probabilemente, isto es proque le script del libreria de Google Maps non esseva includite o non contine le clave API correcte pro tu sito.\x3cbr\x3e\x3cbr\x3eDisveloppatores: Pro adjuta de corriger isto, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eclicca hic\x3c/a",'getLayerWarning':"Le strato ${layerType} non poteva esser cargate correctemente.\x3cbr\x3e\x3cbr\x3ePro disfacer te de iste message, selige un nove BaseLayer in le selector de strato in alto a dextra.\x3cbr\x3e\x3cbr\x3eMulto probabilemente, isto es proque le script del libreria de ${layerLib} non esseva correctemente includite.\x3cbr\x3e\x3cbr\x3eDisveloppatores: Pro adjuta de corriger isto, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eclicca hic\x3c/a\x3e",'scale':"Scala = 1 : ${scaleDenom}",'W':"W",'E':"E",'N':"N",'S':"S",'layerAlreadyAdded':"Tu tentava adder le strato: ${layerName} al carta, ma illo es ja presente",'reprojectDeprecated':"Tu usa le option \'reproject\' in le strato ${layerName} layer. Iste option es obsolescente: illo esseva pro poter monstrar datos super cartas de base commercial, ma iste functionalitate pote ora esser attingite con le uso de Spherical Mercator. Ulterior information es disponibile a http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Iste methodo ha essite declarate obsolescente e essera removite in version 3.0. Per favor usa ${newMethod} in su loco.",'boundsAddError':"Tu debe passar le duo valores x e y al function add.",'lonlatAddError':"Tu debe passar le duo valores lon e lat al function add.",'pixelAddError':"Tu debe passar le duo valores x e y al function add.",'unsupportedGeometryType':"Typo de geometria non supportate: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition falleva: le elemento con id ${elemId} pote esser mal placiate.",'filterEvaluateNotImplemented':"\"evaluate\" non es implementate pro iste typo de filtro."});OpenLayers.Lang["id"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Permintaan yang tak tertangani menghasilkan ${statusText}",'permalink':"Pranala permanen",'overlays':"Hamparan",'baseLayer':"Lapisan Dasar",'sameProjection':"Peta tinjauan hanya bekerja bila dalam proyeksi yang sama dengan peta utama",'readNotImplemented':"Membaca tidak diterapkan.",'writeNotImplemented':"Menyimpan tidak diterapkan.",'noFID':"Tidak dapat memperbarui fitur yang tidak memiliki FID.",'errorLoadingGML':"Kesalahan dalam memuat berkas GML ${url}",'browserNotSupported':"Peramban Anda tidak mendukung penggambaran vektor. Penggambar yang didukung saat ini adalah:\n${renderers}",'componentShouldBe':"addFeatures : komponen harus berupa ${geomType}",'getFeatureError':"getFeatureFromEvent diterapkan pada lapisan tanpa penggambar. Ini biasanya berarti Anda menghapus sebuah lapisan, tetapi tidak menghapus penangan yang terkait dengannya.",'minZoomLevelError':"Properti minZoomLevel hanya ditujukan bekerja dengan lapisan FixedZoomLevels-descendent. Pengecekan minZoomLevel oleh lapisan wfs adalah peninggalan masa lalu. Kami tidak dapat menghapusnya tanpa kemungkinan merusak aplikasi berbasis OL yang mungkin bergantung padanya. Karenanya, kami menganggapnya tidak berlaku -- Cek minZoomLevel di bawah ini akan dihapus pada 3.0. Silakan gunakan penyetelan resolusi min/maks seperti dijabarkan di sini: http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"WFS Transaksi: BERHASIL ${respon}",'commitFailed':"WFS Transaksi: GAGAL ${respon}",'googleWarning':"Lapisan Google tidak dapat dimuat dengan benar.\x3cbr\x3e\x3cbr\x3eUntuk menghilangkan pesan ini, pilih suatu BaseLayer baru melalui penukar lapisan (layer switcher) di ujung kanan atas.\x3cbr\x3e\x3cbr\x3eKemungkinan besar ini karena pustaka skrip Google Maps tidak disertakan atau tidak mengandung kunci API yang tepat untuk situs Anda.\x3cbr\x3e\x3cbr\x3ePengembang: Untuk bantuan mengatasi masalah ini, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eklik di sini\x3c/a\x3e",'getLayerWarning':"Lapisan ${layerType} tidak dapat dimuat dengan benar.\x3cbr\x3e\x3cbr\x3eUntuk menghilangkan pesan ini, pilih suatu BaseLayer baru melalui penukar lapisan (layer switcher) di ujung kanan atas.\x3cbr\x3e\x3cbr\x3eKemungkinan besar ini karena pustaka skrip Google Maps tidak disertakan dengan benar.\x3cbr\x3e\x3cbr\x3ePengembang: Untuk bantuan mengatasi masalah ini, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eklik di sini\x3c/a\x3e",'scale':"Sekala = 1 : ${scaleDenom}",'W':"B",'E':"T",'N':"U",'S':"S",'layerAlreadyAdded':"Anda mencoba menambahkan lapisan: ${layerName} ke dalam peta, tapi lapisan itu telah ditambahkan",'reprojectDeprecated':"Anda menggunakan opsi \'reproject\' pada lapisan ${layerName}. Opsi ini telah ditinggalkan: penggunaannya dirancang untuk mendukung tampilan data melalui peta dasar komersial, tapi fungsionalitas tersebut saat ini harus dilakukan dengan menggunakan dukungan Spherical Mercator. Informasi lebih lanjut tersedia di http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Metode ini telah usang dan akan dihapus di 3.0. Sebaliknya, harap gunakan ${newMethod}.",'boundsAddError':"Anda harus memberikan kedua nilai x dan y ke fungsi penambah.",'lonlatAddError':"Anda harus memberikan kedua nilai lon dan lat ke fungsi penambah.",'pixelAddError':"Anda harus memberikan kedua nilai x dan y ke fungsi penambah.",'unsupportedGeometryType':"Tipe geometri tak didukung: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition gagal: elemen dengan id ${elemId} mungkin salah tempat.",'filterEvaluateNotImplemented':"evaluasi tidak tersedia untuk tipe filter ini."});OpenLayers.Lang["io"]=OpenLayers.Util.applyDefaults({'scale':"Skalo = 1 : ${scaleDenom}"});OpenLayers.Lang["is"]=OpenLayers.Util.applyDefaults({'permalink':"Varanlegur tengill",'overlays':"Þekjur",'baseLayer':"Grunnlag",'sameProjection':"Yfirlitskortið virkar aðeins ef það er í sömu vörpun og aðalkortið",'readNotImplemented':"Skrifun er óútfærð.",'writeNotImplemented':"Lestur er óútfærður.",'errorLoadingGML':"Villa kom upp við að hlaða inn GML skránni ${url}",'scale':"Skali = 1 : ${scaleDenom}",'layerAlreadyAdded':"Þú reyndir að bæta laginu ${layerName} á kortið en það er þegar búið að bæta því við",'methodDeprecated':"Þetta fall hefur verið úrelt og verður fjarlægt í 3.0. Notaðu ${newMethod} í staðin."});OpenLayers.Lang["ja"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"未処理の要求は ${statusText} を返します",'permalink':"パーマリンク",'overlays':"オーバーレイ",'baseLayer':"基底レイヤー",'sameProjection':"概観地図はメインの地図と同じ投影法をとる場合のみ機能します",'readNotImplemented':"読み込みは実装されていません。",'writeNotImplemented':"書き込みは実装されていません。",'noFID':"FID のない地物は更新できません。",'errorLoadingGML':"GML ファイル ${url} の読み込みエラー",'browserNotSupported':"あなたのブラウザはベクターグラフィックスの描写に対応していません。現時点で対応しているソフトウェアは以下のものです。\n${renderers}",'componentShouldBe':"addFeatures: 要素は ${geomType} であるべきです",'getFeatureError':"getFeatureFromEvent がレンダラーのないレイヤーから呼ばれました。通常、これはあなたがレイヤーを、それに関連づけられたいくつかのハンドラを除いて、破壊してしまったことを意味します。",'minZoomLevelError':"minZoomLevel プロパティは FixedZoomLevels を継承するレイヤーでの使用のみを想定しています。この minZoomLevel に対する WFS レイヤーの検査は歴史的なものです。しかしながら、この検査を除去するとそれに依存する OpenLayers ベースのアプリケーションを破壊してしまう可能性があります。よって廃止が予定されており、この minZoomLevel 検査はバージョン3.0で除去されます。代わりに、http://trac.openlayers.org/wiki/SettingZoomLevels で解説されている、最小および最大解像度設定を使用してください。",'commitSuccess':"WFS トランザクション: 成功 ${response}",'commitFailed':"WFS トランザクション: 失敗 ${response}",'googleWarning':"Google レイヤーが正しく読み込みを行えませんでした。\x3cbr\x3e\x3cbr\x3eこのメッセージを消すには、右上の隅にあるレイヤー切り替え部分で新しい基底レイヤーを選んでください。\x3cbr\x3e\x3cbr\x3eおそらく、これは Google マップ用ライブラリのスクリプトが組み込まれていないか、あなたのサイトに対応する正しい API キーが設定されていないためです。\x3cbr\x3e\x3cbr\x3e開発者の方へ: 正しい動作をさせるために\x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eこちらのウィキ\x3c/a\x3eを参照してください。",'getLayerWarning':"${layerType} レイヤーが正しく読み込みを行えませんでした。\x3cbr\x3e\x3cbr\x3eこのメッセージを消すには、右上の隅にあるレイヤー切り替え部分で新しい基底レイヤーを選んでください。\x3cbr\x3e\x3cbr\x3eおそらく、これは ${layerLib} ライブラリのスクリプトが正しく組み込まれていないためです。\x3cbr\x3e\x3cbr\x3e開発者の方へ: 正しい動作をさせるために\x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eこちらのウィキ\x3c/a\x3eを参照してください。",'scale':"縮尺 = 1 : ${scaleDenom}",'W':"西",'E':"東",'N':"北",'S':"南",'layerAlreadyAdded':"あなたは「${layerName}」を地図に追加しようと試みましたが、そのレイヤーは既に追加されています",'reprojectDeprecated':"あなたは「${layerName}」レイヤーで reproject オプションを使っています。このオプションは商用の基底地図上に情報を表示する目的で設計されましたが、現在ではその機能は Spherical Mercator サポートを利用して実現されており、このオプションの使用は非推奨です。追加の情報は http://trac.openlayers.org/wiki/SphericalMercator で入手できます。",'methodDeprecated':"このメソッドは廃止が予定されており、バージョン3.0で除去されます。代わりに ${newMethod} を使用してください。",'boundsAddError':"x と y 両方の値を add 関数に渡さなければなりません。",'lonlatAddError':"lon と lat 両方の値を add 関数に渡さなければなりません。",'pixelAddError':"x と y の値両方を add 関数に渡さなければなりません。",'unsupportedGeometryType':"未対応の形状型: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition が失敗しました: id ${elemId} をもつ要素が誤った位置にある可能性があります。",'filterEvaluateNotImplemented':"このフィルター型について evaluate は実装されていません。"});OpenLayers.Lang["km"]=OpenLayers.Util.applyDefaults({'permalink':"តំណភ្ជាប់អចិន្ត្រៃយ៍",'baseLayer':"ស្រទាប់បាត​",'errorLoadingGML':"កំហុសកំឡុងពេលផ្ទុកឯកសារ GML ${url}",'scale':"មាត្រដ្ឋាន = ១ ៖ ${scaleDenom}"});OpenLayers.Lang["ksh"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Met dä Antwoot op en Aanfrooch ham_mer nix aanjefange: ${statusText}",'permalink':"Lengk op Duuer",'overlays':"Drövver jelaat",'baseLayer':"Jrund-Nivoh",'sameProjection':"De Övverseeschs_Kaat deiht et bloß, wann se de sälve Projäxjuhn bruche deiht, wi de Houp_Kaat",'readNotImplemented':"„\x3ccode lang=\"en\"\x3eread\x3c/code\x3e“ is em Projramm nit fürjesinn.",'writeNotImplemented':"„\x3ccode lang=\"en\"\x3ewrite\x3c/code\x3e“ is em Projramm nit fürjesinn.",'noFID':"En Saach, woh kein \x3ci lang=\"en\"\x3eFID\x3c/i\x3e för doh es, löht sesch nit ändere.",'errorLoadingGML':"Fähler beim \x3ci lang=\"en\"\x3eGML\x3c/i\x3e-Datei-Laade vun \x3ccode\x3e${url}\x3c/code\x3e",'browserNotSupported':"Dinge Brauser kann kein Väktore ußjävve. De Zoote Ußjaabe, di em Momang jon, sen:\n${renderers}",'componentShouldBe':"\x3ccode lang=\"en\"\x3eaddFeatures\x3c/code\x3e: dä Aandeil sullt vun dä Zoot „\x3ccode lang=\"en\"\x3e${geomType}\x3c/code\x3e“ sin.",'getFeatureError':"\x3ccode lang=\"en\"\x3egetFeatureFromEvent\x3c/code\x3e es vun enem Nivoh opjeroofe woode, woh et kei Projramm zom Ußjävve jit. Dat bedügg för jewöhnlesch, dat De e Nivoh kapott jemaat häs, ävver nit e Projramm för domet ömzejonn, wat domet verbonge es.",'minZoomLevelError':"De Eijeschaff „\x3ccode lang=\"en\"\x3eminZoomLevel\x3c/code\x3e“ es bloß doför jedaach, dat mer se met dä Nivvohß bruch, di vun \x3ccode lang=\"en\"\x3eFixedZoomLevels\x3c/code\x3e affhange don. Dat dat \x3ci lang=\"en\"\x3eWFS\x3c/i\x3e-Nivvoh övverhoup de Eijeschaff „\x3ccode lang=\"en\"\x3eminZoomLevel\x3c/code\x3e“ pröhfe deiht, es noch övveresch vun fröhjer. Mer künne dat ävver jez nit fott lohße, oohne dat mer Jevaa loufe, dat Aanwendunge vun OpenLayers nit mieh loufe, di sesch doh velleijsch noch drop am verlohße sin. Dröm sare mer, dat mer et nit mieh han welle, un de „\x3ccode lang=\"en\"\x3eminZoomLevel\x3c/code\x3e“-Eijeschaff weed hee vun de Version 3.0 af nit mieh jeprööf wäde. Nemm doför de Enstellung för de hühßte un de kleinßte Oplöhsung, esu wi et en http://trac.openlayers.org/wiki/SettingZoomLevels opjeschrevve es.",'commitSuccess':"Dä \x3ci lang=\"en\"\x3eWFS\x3c/i\x3e-Vörjang es joot jeloufe: ${response}",'commitFailed':"Dä \x3ci lang=\"en\"\x3eWFS\x3c/i\x3e-Vörjang es scheif jejange: ${response}",'googleWarning':"Dat Nivvoh \x3ccode lang=\"en\"\x3eGoogle\x3c/code\x3e kunnt nit reschtesch jelaade wääde.\x3cbr /\x3e\x3cbr /\x3eÖm hee di Nohreesch loß ze krijje, donn en ander Jrund-Nivvoh ußsöhke, rähß bovve en de Äk.\x3cbr /\x3e\x3cbr /\x3eWascheinlesch es dat wiel dat \x3ci lang=\"en\"\x3eGoogle-Maps\x3c/i\x3e-Skrepp entweeder nit reschtesch enjebonge wood, udder nit dä reschtejje \x3ci lang=\"en\"\x3eAPI\x3c/i\x3e-Schlößel för Ding Web-ßait scheke deiht.\x3cbr /\x3e\x3cbr /\x3eFör Projrammierer jidd_et Hölp do_drövver, \x3ca href=\"http://trac.openlayers.org/wiki/Google\" target=\"_blank\"\x3ewi mer dat aan et Loufe brengk\x3c/a\x3e.",'getLayerWarning':"Dat Nivvoh \x3ccode\x3e${layerType}\x3c/code\x3e kunnt nit reschtesch jelaade wääde.\x3cbr /\x3e\x3cbr /\x3eÖm hee di Nohreesch loß ze krijje, donn en ander Jrund-Nivvoh ußsöhkre, rähß bovve en de Äk.\x3cbr /\x3e\x3cbr /\x3eWascheinlesch es dat, wiel dat Skrepp \x3ccode\x3e${layerLib}\x3c/code\x3e nit reschtesch enjebonge wood.\x3cbr /\x3e\x3cbr /\x3eFör Projrammierer jidd_Et Hölp do_drövver, \x3ca href=\"http://trac.openlayers.org/wiki/${layerLib}\" target=\"_blank\"\x3ewi mer dat aan et Loufe brengk\x3c/a\x3e.",'scale':"Mohßshtaab = 1 : ${scaleDenom}",'W':"W",'E':"O",'N':"N",'S':"S",'layerAlreadyAdded':"Do häß versöhk, dat Nivvoh \x3ccode\x3e${layerName}\x3c/code\x3e en di Kaat eren ze bränge, et wohr ävver ald do dren.",'reprojectDeprecated':"Do bruchs de Ußwahl \x3ccode\x3ereproject\x3c/code\x3e op däm Nivvoh \x3ccode\x3e${layerName}\x3c/code\x3e. Di Ußwahl es nit mieh jähn jesinn. Se wohr doför jedaach, öm Date op jeschääfsmäßesch eruß jejovve Kaate bovve drop ze moole, wat ävver enzwesche besser met dä Öngershtözung för de ßfääresche Mäkaator Beldscher jeiht. Doh kanns De mieh drövver fenge op dä Sigg: http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Hee di Metood es nim_mih aktoäll un et weed se en dä Version 3.0 nit mieh jävve. Nemm \x3ccode\x3e${newMethod}\x3c/code\x3e doföör.",'boundsAddError':"Do moß beeds vun de \x3ccode\x3ex\x3c/code\x3e un \x3ccode\x3ey\x3c/code\x3e Wääte aan de Fungkßjohn \x3ccode\x3eadd\x3c/code\x3e jävve.",'lonlatAddError':"Do moß beeds \x3ccode\x3elon\x3c/code\x3e un \x3ccode\x3elat\x3c/code\x3e aan de Fungkßjohn \x3ccode\x3eadd\x3c/code\x3e jävve.",'pixelAddError':"Do moß beeds \x3ccode\x3ex\x3c/code\x3e un \x3ccode\x3ey\x3c/code\x3e aan de Fungkßjohn \x3ccode\x3eadd\x3c/code\x3e jävve.",'unsupportedGeometryType':"De Zoot Jommetrii dom_mer nit ongershtöze: \x3ccode\x3e${geomType}\x3c/code\x3e",'pagePositionFailed':"\x3ccode lang=\"en\"\x3eOpenLayers.Util.pagePosition\x3c/code\x3e es donevve jejange: dat Denge met dä Kännong \x3ccode\x3e${elemId}\x3c/code\x3e künnt am verkeehte Plaz sin.",'filterEvaluateNotImplemented':"„\x3ccode lang=\"en\"\x3eevaluate\x3c/code\x3e“ es för di Zoot Fellter nit enjereschdt."});OpenLayers.Lang["nds"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Unbehannelt Trüchmellels för de Anfraag ${statusText}",'permalink':"Permalink",'overlays':"Overlays",'baseLayer':"Achtergrundkoort",'sameProjection':"De Översichtskoort geiht blot, wenn de sülve Projekschoon as bi de Hööftkoort bruukt warrt",'readNotImplemented':"Lesen is nich inricht.",'writeNotImplemented':"Schrieven is nich inricht.",'noFID':"En Feature, dat keen FID hett, kann nich aktuell maakt warrn.",'errorLoadingGML':"Fehler bi’t Laden vun de GML-Datei ${url}",'browserNotSupported':"Dien Browser ünnerstütt keen Vektorbiller. Ünnerstütt Renderers:\n${renderers}",'componentShouldBe':"addFeatures : Kumponent schull man den Typ ${geomType} hebben",'getFeatureError':"getFeatureFromEvent is von en Laag ahn Render opropen worrn. Dat bedüüdt normalerwies, dat en Laag wegmaakt worrn is, aver nich de Handler, de dor op verwiest.",'commitSuccess':"WFS-Transakschoon: hett klappt ${response}",'commitFailed':"WFS-Transakschoon: hett nich klappt ${response}",'scale':"Skaal = 1 : ${scaleDenom}",'layerAlreadyAdded':"Du versöchst de Laag „${layerName}“ to de Koort totofögen, man de is al toföögt",'methodDeprecated':"Disse Methood is oold un schall dat in 3.0 nich mehr geven. Bruuk dor man beter ${newMethod} för.",'boundsAddError':"De Weert x un y, de mööt all beid an de add-Funkschoon övergeven warrn.",'lonlatAddError':"De Weert lon un lat, de mööt all beid an de add-Funkschoon övergeven warrn.",'pixelAddError':"De Weert x un y, de mööt all beid an de add-Funkschoon övergeven warrn.",'unsupportedGeometryType':"Nich ünnerstütt Geometrie-Typ: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition güng nich: Element mit de Id ${elemId} is villicht an’n verkehrten Platz."});OpenLayers.Lang["nn"]=OpenLayers.Util.applyDefaults({'scale':"Skala = 1 : ${scaleDenom}",'layerAlreadyAdded':"Du freista å leggja til laget «${layerName}» på kartet, men det har alt vorte lagt til.",'boundsAddError':"Du er nøydd til å gje både ein x- og ein y-verdi til «add»-funksjonen.",'lonlatAddError':"Du er nøydd til å gje både lon- og lat-verdiar til «add»-funksjonen.",'pixelAddError':"Du er nøydd til å gje både ein x- og ein y-verdi til «add»-funksjonen."});OpenLayers.Lang["oc"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Requèsta pas gerida, retorna ${statusText}",'permalink':"Permaligam",'overlays':"Calques",'baseLayer':"Calc de basa",'sameProjection':"La carta de situacion fonciona pas que quora sa projeccion es la meteissa que la de la carta principala",'readNotImplemented':"Lectura pas implementada.",'writeNotImplemented':"Escritura pas implementada.",'noFID':"Impossible de metre a jorn un objècte sens identificant (fid).",'errorLoadingGML':"Error al cargament del fichièr GML ${url}",'browserNotSupported':"Vòstre navegidor supòrta pas lo rendut vectorial. Los renderers actualament suportats son : \n${renderers}",'componentShouldBe':"addFeatures : lo compausant deuriá èsser de tipe ${geomType}",'getFeatureError':"getFeatureFromEvent es estat apelat sus un calc sens renderer. Aquò significa generalament qu\'avètz destruch aqueste jaç, mas qu\'avètz conservat un handler que li èra associat.",'minZoomLevelError':"La proprietat minZoomLevel deu èsser utilizada solament per de jaces FixedZoomLevels-descendent. Lo fach qu\'aqueste jaç WFS verifique la preséncia de minZoomLevel es una relica del passat. Çaquelà, la podèm suprimir sens copar d\'aplicacions que ne poirián dependre. Es per aquò que la depreciam -- la verificacion del minZoomLevel serà suprimida en version 3.0. A la plaça, mercés d\'utilizar los paramètres de resolucions min/max tal coma descrich sus : http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"Transaccion WFS : SUCCES ${response}",'commitFailed':"Transaccion WFS : FRACAS ${response}",'googleWarning':"Lo jaç Google es pas estat en mesura de se cargar corrèctament.\x3cbr\x3e\x3cbr\x3ePer suprimir aqueste messatge, causissètz una BaseLayer novèla dins lo selector de jaç en naut a drecha.\x3cbr\x3e\x3cbr\x3eAquò es possiblament causat par la non-inclusion de la librariá Google Maps, o alara perque que la clau de l\'API correspond pas a vòstre site.\x3cbr\x3e\x3cbr\x3eDesvolopaires : per saber cossí corregir aquò, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eclicatz aicí\x3c/a\x3e",'getLayerWarning':"Lo jaç ${layerType} es pas en mesura de se cargar corrèctament.\x3cbr\x3e\x3cbr\x3ePer suprimir aqueste messatge, causissètz una  BaseLayer novèla dins lo selector de jaç en naut a drecha.\x3cbr\x3e\x3cbr\x3eAquò es possiblament causat per la non-inclusion de la librariá ${layerLib}.\x3cbr\x3e\x3cbr\x3eDesvolopaires : per saber cossí corregir aquí, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eclicatz aicí\x3c/a\x3e",'scale':"Escala ~ 1 : ${scaleDenom}",'W':"O",'E':"È",'N':"N",'S':"S",'layerAlreadyAdded':"Avètz ensajat d\'apondre a la carta lo calc : ${layerName}, mas ja es present",'reprojectDeprecated':"Utilizatz l\'opcion \'reproject\' sul jaç ${layerName}. Aquesta opcion es despreciada : Son usatge permetiá d\'afichar de donadas al dessús de jaces raster comercials. Aquesta foncionalitat ara es suportada en utilizant lo supòrt de la projeccion Mercator Esferica. Mai d\'informacion es disponibla sus http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Aqueste metòde es despreciada, e serà suprimida a la version 3.0. Mercés d\'utilizar ${newMethod} a la plaça.",'boundsAddError':"Vos cal passar las doas valors x e y a la foncion add.",'lonlatAddError':"Vos cal passar las doas valors lon e lat a la foncion add.",'pixelAddError':"Vos cal passar las doas valors x e y a la foncion add.",'unsupportedGeometryType':"Tipe de geometria pas suportat : ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition a fracassat : l\'element d\'id ${elemId} poiriá èsser mal posicionat.",'filterEvaluateNotImplemented':"evaluar es pas encara estat implementat per aqueste tipe de filtre."});OpenLayers.Lang["pt"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Servidor devolveu erro não contemplado ${statusText}",'permalink':"Ligação permanente",'overlays':"Sobreposições",'baseLayer':"Camada Base",'sameProjection':"O mapa panorâmico só funciona quando está na mesma projeção que o mapa principal",'readNotImplemented':"Leitura não implementada.",'writeNotImplemented':"Escrita não implementada.",'noFID':"Não é possível atualizar um elemento para a qual não há FID.",'errorLoadingGML':"Erro ao carregar ficheiro GML ${url}",'browserNotSupported':"O seu navegador não suporta renderização vetorial. Actualmente os renderizadores suportados são:\n${renderers}",'componentShouldBe':"addFeatures: componente deve ser um(a) ${geomType}",'getFeatureError':"getFeatureFromEvent foi chamado numa camada sem renderizador. Isto normalmente significa que destruiu uma camada, mas não um manipulador \'\'(handler)\'\' que lhe está associado.",'minZoomLevelError':"A propriedade minZoomLevel só deve ser usada com as camadas descendentes da FixedZoomLevels. A verificação da propriedade por esta camada wfs é uma relíquia do passado. No entanto, não podemos removê-la sem correr o risco de afectar aplicações OL que dependam dela. Portanto, estamos a torná-la obsoleta -- a verificação minZoomLevel será removida na versão 3.0. Em vez dela, por favor, use as opções de resolução min/max descritas aqui: http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"Transacção WFS: SUCESSO ${response}",'commitFailed':"Transacção WFS: FALHOU ${response}",'googleWarning':"A Camada Google não foi correctamente carregada.\x3cbr\x3e\x3cbr\x3ePara deixar de receber esta mensagem, seleccione uma nova Camada-Base no \'\'switcher\'\' de camadas no canto superior direito.\x3cbr\x3e\x3cbr\x3eProvavelmente, isto acontece porque o \'\'script\'\' da biblioteca do Google Maps não foi incluído ou não contém a chave API correcta para o seu sítio.\x3cbr\x3e\x3cbr\x3eProgramadores: Para ajuda sobre como solucionar o problema \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eclique aqui\x3c/a\x3e .",'getLayerWarning':"A camada ${layerType} não foi correctamente carregada.\x3cbr\x3e\x3cbr\x3ePara desactivar esta mensagem, seleccione uma nova Camada-Base no \'\'switcher\'\' de camadas no canto superior direito.\x3cbr\x3e\x3cbr\x3eProvavelmente, isto acontece porque o \'\'script\'\' da biblioteca ${layerLib} não foi incluído correctamente.\x3cbr\x3e\x3cbr\x3eProgramadores: Para ajuda sobre como solucionar o problema \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eclique aqui\x3c/a\x3e .",'scale':"Escala = 1 : ${scaleDenom}",'W':"O",'E':"E",'N':"N",'S':"S",'layerAlreadyAdded':"Você tentou adicionar a camada: ${layerName} ao mapa, mas ela já tinha sido adicionada antes",'reprojectDeprecated':"Está usando a opção \'reproject\' na camada ${layerName}. Esta opção é obsoleta: foi concebida para permitir a apresentação de dados sobre mapas-base comerciais, mas esta funcionalidade é agora suportada pelo Mercator Esférico. Mais informação está disponível em http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Este método foi declarado obsoleto e será removido na versão 3.0. Por favor, use ${newMethod} em vez disso.",'boundsAddError':"Você deve passar tanto o valor x como o y à função de adição.",'lonlatAddError':"Você deve passar tanto o valor lon como o lat à função de adição.",'pixelAddError':"Você deve passar tanto o valor x como o y à função de adição.",'unsupportedGeometryType':"Tipo de geometria não suportado: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition falhou: o elemento com o id ${elemId} poderá estar mal-posicionado.",'filterEvaluateNotImplemented':"avaliar não está implementado para este tipo de filtro."});OpenLayers.Lang["ru"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Необработанный запрос вернул ${statusText}",'permalink':"Постоянная ссылка",'overlays':"Слои",'baseLayer':"Основной слой",'sameProjection':"Обзорная карта работает только тогда, когда имеет ту же проекцию, что и основная",'readNotImplemented':"Чтение не реализовано.",'writeNotImplemented':"Запись не реализована.",'noFID':"Невозможно обновить объект, для которого нет FID.",'errorLoadingGML':"Ошибка при загрузке файла GML ${url}",'browserNotSupported':"Ваш браузер не поддерживает векторную графику. На данный момент поддерживаются:\n${renderers}",'componentShouldBe':"addFeatures: компонент должен быть ${geomType}",'getFeatureError':"getFeatureFromEvent вызван для слоя без рендерера. Обычно это говорит о том, что вы уничтожили слой, но оставили связанный с ним обработчик.",'minZoomLevelError':"Свойство minZoomLevel предназначено только для использования со слоями, являющимися потомками FixedZoomLevels. То, что этот WFS-слой проверяется на minZoomLevel — реликт прошлого. Однако мы не можем удалить эту функцию, так как, возможно, от неё зависят некоторые основанные на OpenLayers приложения. Функция объявлена устаревшей — проверка minZoomLevel будет удалена в 3.0. Пожалуйста, используйте вместо неё настройку мин/макс разрешения, описанную здесь: http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"Транзакция WFS: УСПЕШНО ${response}",'commitFailed':"Транзакция WFS: ОШИБКА ${response}",'googleWarning':"Слой Google не удалось нормально загрузить.\x3cbr\x3e\x3cbr\x3eЧтобы избавиться от этого сообщения, выбите другой основной слой в переключателе в правом верхнем углу.\x3cbr\x3e\x3cbr\x3eСкорее всего, причина в том, что библиотека Google Maps не была включена или не содержит корректного API-ключа для вашего сайта.\x3cbr\x3e\x3cbr\x3eРазработчикам: чтобы узнать, как сделать, чтобы всё заработало, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eщёлкните тут\x3c/a\x3e",'getLayerWarning':"Слой ${layerType} не удалось нормально загрузить. \x3cbr\x3e\x3cbr\x3eЧтобы избавиться от этого сообщения, выбите другой основной слой в переключателе в правом верхнем углу.\x3cbr\x3e\x3cbr\x3eСкорее всего, причина в том, что библиотека ${layerLib} не была включена или была включена некорректно.\x3cbr\x3e\x3cbr\x3eРазработчикам: чтобы узнать, как сделать, чтобы всё заработало, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eщёлкните тут\x3c/a\x3e",'scale':"Масштаб = 1 : ${scaleDenom}",'W':"З",'E':"В",'N':"С",'S':"Ю",'layerAlreadyAdded':"Вы попытались добавить слой «${layerName}» на карту, но он уже был добавлен",'reprojectDeprecated':"Вы используете опцию \'reproject\' для слоя ${layerName}. Эта опция является устаревшей: ее использование предполагалось для поддержки показа данных поверх коммерческих базовых карт, но теперь этот функционал несёт встроенная поддержка сферической проекции Меркатора. Больше сведений доступно на http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Этот метод считается устаревшим и будет удалён в версии 3.0. Пожалуйста, пользуйтесь ${newMethod}.",'boundsAddError':"Функции add надо передавать оба значения, x и y.",'lonlatAddError':"Функции add надо передавать оба значения, lon и lat.",'pixelAddError':"Функции add надо передавать оба значения, x и y.",'unsupportedGeometryType':"Неподдерживаемый тип геометрии: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition failed: элемент с id ${elemId} может находиться не в нужном месте.",'filterEvaluateNotImplemented':"evaluate не реализовано для фильтра данного типа."});OpenLayers.Lang["sk"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Neobslúžené požiadavky vracajú ${statusText}",'permalink':"Trvalý odkaz",'overlays':"Prekrytia",'baseLayer':"Základná vrstva",'sameProjection':"Prehľadová mapka funguje iba vtedy, keď je v rovnakej projekcii ako hlavná mapa",'readNotImplemented':"Čítanie nie je implementované.",'writeNotImplemented':"Zápis nie je implementovaný.",'noFID':"Nie je možné aktualizovať vlastnosť, pre ktorú neexistuje FID.",'errorLoadingGML':"Chyba pri načítaní súboru GML ${url}",'browserNotSupported':"Váš prehliadač nepodporuje vykresľovanie vektorov. Momentálne podporované vykresľovače sú:\n${renderers}",'componentShouldBe':"addFeatures: komponent by mal byť ${geomType}",'getFeatureError':"getFeatureFromEvent bola zavolaná na vrstve bez vykresľovača. To zvyčajne znamená, že ste odstránili vrstvu, ale nie niektorú z obslúh, ktorá je s ňou asociovaná.",'minZoomLevelError':"Vlastnosť minZoomLevel je určený iba na použitie s vrstvami odvodenými od FixedZoomLevels. To, že táto wfs vrstva kontroluje minZoomLevel je pozostatok z minulosti. Nemôžeme ho však odstrániť, aby sme sa vyhli možnému porušeniu aplikácií založených na Open Layers, ktoré na tomto môže závisieť. Preto ho označujeme ako zavrhovaný - dolu uvedená kontrola minZoomLevel bude odstránená vo verzii 3.0. Použite prosím namiesto toho kontrolu min./max. rozlíšenia podľa tu uvedeného popisu: http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"Transakcia WFS: ÚSPEŠNÁ ${response}",'commitFailed':"Transakcia WFS: ZLYHALA ${response}",'googleWarning':"Vrstvu Google nebolo možné správne načítať.\x3cbr\x3e\x3cbr\x3eAby ste sa tejto správy zbavili vyberte novú BaseLayer v prepínači vrstiev v pravom hornom rohu.\x3cbr\x3e\x3cbr\x3eToto sa stalo pravdepodobne preto, že skript knižnice Google Maps buď nebol načítaný alebo neobsahuje správny kľúč API pre vašu lokalitu.\x3cbr\x3e\x3cbr\x3eVývojári: Tu môžete získať \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3epomoc so sfunkčnením\x3c/a\x3e",'getLayerWarning':"Vrstvu ${layerType} nebolo možné správne načítať.\x3cbr\x3e\x3cbr\x3eAby ste sa tejto správy zbavili vyberte novú BaseLayer v prepínači vrstiev v pravom hornom rohu.\x3cbr\x3e\x3cbr\x3eToto sa stalo pravdepodobne preto, že skript knižnice ${layerType} buď nebol načítaný alebo neobsahuje správny kľúč API pre vašu lokalitu.\x3cbr\x3e\x3cbr\x3eVývojári: Tu môžete získať \x3ca href=\'http://trac.openlayers.org/wiki/${layerType}\' target=\'_blank\'\x3epomoc so sfunkčnením\x3c/a\x3e",'scale':"Mierka = 1 : ${scaleDenom}",'layerAlreadyAdded':"Pokúsili ste sa do mapy pridať vrstvu ${layerName}, ale tá už bola pridaná",'reprojectDeprecated':"Používate voľby „reproject“ vrstvy ${layerType}. Táto voľba je zzavrhovaná: jej použitie bolo navrhnuté na podporu zobrazovania údajov nad komerčnými základovými mapami, ale túto funkcionalitu je teraz možné dosiahnuť pomocou Spherical Mercator. Ďalšie informácie získate na stránke http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Táto metóda je zavrhovaná a bude odstránená vo verzii 3.0. Použite prosím namiesto nej metódu ${newMethod}.",'boundsAddError':"Sčítacej funkcii musíte dať hodnoty x aj y.",'lonlatAddError':"Sčítacej funkcii musíte dať hodnoty lon (zem. dĺžka) aj lat (zem. šírka).",'pixelAddError':"Sčítacej funkcii musíte dať hodnoty x aj y.",'unsupportedGeometryType':"Nepodporovaný typ geometrie: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition zlyhalo: prvok s id ${elemId} môže byť zle umiestnený.",'filterEvaluateNotImplemented':"evaluate nie je implementovaný pre tento typ filtra"});OpenLayers.Lang["te"]=OpenLayers.Util.applyDefaults({'permalink':"స్థిరలింకు",'W':"ప",'E':"తూ",'N':"ఉ",'S':"ద"});OpenLayers.Lang["vi"]=OpenLayers.Util.applyDefaults({'unhandledRequest':"Không xử lý được phản hồi ${statusText} cho yêu cầu",'permalink':"Liên kết thường trực",'overlays':"Lấp bản đồ",'baseLayer':"Lớp nền",'sameProjection':"Bản đồ toàn cảnh chỉ hoạt động khi cùng phép chiếu với bản đồ chính",'readNotImplemented':"Chưa hỗ trợ chức năng đọc.",'writeNotImplemented':"Chưa hỗ trợ chức năng viết.",'noFID':"Không thể cập nhật tính năng thiếu FID.",'errorLoadingGML':"Lỗi tải tập tin GML tại ${url}",'browserNotSupported':"Trình duyệt của bạn không hỗ trợ chức năng vẽ bằng vectơ. Hiện hỗ trợ các bộ kết xuất:\n${renderers}",'componentShouldBe':"addFeatures: bộ phận cần phải là ${geomType}",'getFeatureError':"getFeatureFromEvent được gọi từ lớp không có bộ kết xuất. Thường thì có lẽ lớp bị xóa nhưng một phần xử lý của nó vẫn còn.",'minZoomLevelError':"Chỉ nên sử dụng thuộc tính minZoomLevel với các lớp FixedZoomLevels-descendent. Việc lớp wfs này tìm cho minZoomLevel là di tích còn lại từ xưa. Tuy nhiên, nếu chúng tôi dời nó thì sẽ vỡ các chương trình OpenLayers mà dựa trên nó. Bởi vậy chúng tôi phản đối sử dụng nó\x26nbsp;– bước tìm cho minZoomLevel sẽ được dời vào phiên bản 3.0. Xin sử dụng thiết lập độ phân tích tối thiểu / tối đa thay thế, theo hướng dẫn này: http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"Giao dịch WFS: THÀNH CÔNG ${response}",'commitFailed':"Giao dịch WFS: THẤT BẠI ${response}",'googleWarning':"Không thể tải lớp Google đúng đắn.\x3cbr\x3e\x3cbr\x3eĐể tránh thông báo này lần sau, hãy chọn BaseLayer mới dùng điều khiển chọn lớp ở góc trên phải.\x3cbr\x3e\x3cbr\x3eChắc script thư viện Google Maps hoặc không được bao gồm hoặc không chứa khóa API hợp với website của bạn.\x3cbr\x3e\x3cbr\x3e\x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eTrợ giúp về tính năng này\x3c/a\x3e cho người phát triển.",'getLayerWarning':"Không thể tải lớp ${layerType} đúng đắn.\x3cbr\x3e\x3cbr\x3eĐể tránh thông báo này lần sau, hãy chọn BaseLayer mới dùng điều khiển chọn lớp ở góc trên phải.\x3cbr\x3e\x3cbr\x3eChắc script thư viện ${layerLib} không được bao gồm đúng kiểu.\x3cbr\x3e\x3cbr\x3e\x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eTrợ giúp về tính năng này\x3c/a\x3e cho người phát triển.",'scale':"Tỷ lệ = 1 : ${scaleDenom}",'W':"T",'E':"Đ",'N':"B",'S':"N",'layerAlreadyAdded':"Bạn muốn thêm lớp ${layerName} vào bản đồ, nhưng lớp này đã được thêm",'reprojectDeprecated':"Bạn đang áp dụng chế độ “reproject” vào lớp ${layerName}. Chế độ này đã bị phản đối: nó có mục đích hỗ trợ lấp dữ liệu trên các nền bản đồ thương mại; nên thực hiện hiệu ứng đó dùng tính năng Mercator Hình cầu. Có sẵn thêm chi tiết tại http://trac.openlayers.org/wiki/SphericalMercator .",'methodDeprecated':"Phương thức này đã bị phản đối và sẽ bị dời vào phiên bản 3.0. Xin hãy sử dụng ${newMethod} thay thế.",'boundsAddError':"Cần phải cho cả giá trị x và y vào hàm add.",'lonlatAddError':"Cần phải cho cả giá trị lon và lat vào hàm add.",'pixelAddError':"Cần phải cho cả giá trị x và y vào hàm add.",'unsupportedGeometryType':"Không hỗ trợ kiểu địa lý: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition bị thất bại: nguyên tố với ID ${elemId} có thể ở chỗ sai.",'filterEvaluateNotImplemented':"chưa hỗ trợ evaluate cho loại bộ lọc này."});OpenLayers.Popup.AnchoredBubble=OpenLayers.Class(OpenLayers.Popup.Anchored,{rounded:false,initialize:function(id,lonlat,contentSize,contentHTML,anchor,closeBox,closeBoxCallback){this.padding=new OpenLayers.Bounds(0,OpenLayers.Popup.AnchoredBubble.CORNER_SIZE,0,OpenLayers.Popup.AnchoredBubble.CORNER_SIZE);OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments);},draw:function(px){OpenLayers.Popup.Anchored.prototype.draw.apply(this,arguments);this.setContentHTML();this.setBackgroundColor();this.setOpacity();return this.div;},updateRelativePosition:function(){this.setRicoCorners();},setSize:function(contentSize){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.setRicoCorners();},setBackgroundColor:function(color){if(color!=undefined){this.backgroundColor=color;}
-if(this.div!=null){if(this.contentDiv!=null){this.div.style.background="transparent";OpenLayers.Rico.Corner.changeColor(this.groupDiv,this.backgroundColor);}}},setOpacity:function(opacity){OpenLayers.Popup.Anchored.prototype.setOpacity.call(this,opacity);if(this.div!=null){if(this.groupDiv!=null){OpenLayers.Rico.Corner.changeOpacity(this.groupDiv,this.opacity);}}},setBorder:function(border){this.border=0;},setRicoCorners:function(){var corners=this.getCornersToRound(this.relativePosition);var options={corners:corners,color:this.backgroundColor,bgColor:"transparent",blend:false};if(!this.rounded){OpenLayers.Rico.Corner.round(this.div,options);this.rounded=true;}else{OpenLayers.Rico.Corner.reRound(this.groupDiv,options);this.setBackgroundColor();this.setOpacity();}},getCornersToRound:function(){var corners=['tl','tr','bl','br'];var corner=OpenLayers.Bounds.oppositeQuadrant(this.relativePosition);OpenLayers.Util.removeItem(corners,corner);return corners.join(" ");},CLASS_NAME:"OpenLayers.Popup.AnchoredBubble"});OpenLayers.Popup.AnchoredBubble.CORNER_SIZE=5;OpenLayers.Popup.Framed=OpenLayers.Class(OpenLayers.Popup.Anchored,{imageSrc:null,imageSize:null,isAlphaImage:false,positionBlocks:null,blocks:null,fixedRelativePosition:false,initialize:function(id,lonlat,contentSize,contentHTML,anchor,closeBox,closeBoxCallback){OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments);if(this.fixedRelativePosition){this.updateRelativePosition();this.calculateRelativePosition=function(px){return this.relativePosition;};}
-this.contentDiv.style.position="absolute";this.contentDiv.style.zIndex=1;if(closeBox){this.closeDiv.style.zIndex=1;}
-this.groupDiv.style.position="absolute";this.groupDiv.style.top="0px";this.groupDiv.style.left="0px";this.groupDiv.style.height="100%";this.groupDiv.style.width="100%";},destroy:function(){this.imageSrc=null;this.imageSize=null;this.isAlphaImage=null;this.fixedRelativePosition=false;this.positionBlocks=null;for(var i=0;i<this.blocks.length;i++){var block=this.blocks[i];if(block.image){block.div.removeChild(block.image);}
-block.image=null;if(block.div){this.groupDiv.removeChild(block.div);}
-block.div=null;}
-this.blocks=null;OpenLayers.Popup.Anchored.prototype.destroy.apply(this,arguments);},setBackgroundColor:function(color){},setBorder:function(){},setOpacity:function(opacity){},setSize:function(contentSize){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.updateBlocks();},updateRelativePosition:function(){this.padding=this.positionBlocks[this.relativePosition].padding;if(this.closeDiv){var contentDivPadding=this.getContentDivPadding();this.closeDiv.style.right=contentDivPadding.right+
-this.padding.right+"px";this.closeDiv.style.top=contentDivPadding.top+
-this.padding.top+"px";}
-this.updateBlocks();},calculateNewPx:function(px){var newPx=OpenLayers.Popup.Anchored.prototype.calculateNewPx.apply(this,arguments);newPx=newPx.offset(this.positionBlocks[this.relativePosition].offset);return newPx;},createBlocks:function(){this.blocks=[];var firstPosition=null;for(var key in this.positionBlocks){firstPosition=key;break;}
-var position=this.positionBlocks[firstPosition];for(var i=0;i<position.blocks.length;i++){var block={};this.blocks.push(block);var divId=this.id+'_FrameDecorationDiv_'+i;block.div=OpenLayers.Util.createDiv(divId,null,null,null,"absolute",null,"hidden",null);var imgId=this.id+'_FrameDecorationImg_'+i;var imageCreator=(this.isAlphaImage)?OpenLayers.Util.createAlphaImageDiv:OpenLayers.Util.createImage;block.image=imageCreator(imgId,null,this.imageSize,this.imageSrc,"absolute",null,null,null);block.div.appendChild(block.image);this.groupDiv.appendChild(block.div);}},updateBlocks:function(){if(!this.blocks){this.createBlocks();}
-if(this.size&&this.relativePosition){var position=this.positionBlocks[this.relativePosition];for(var i=0;i<position.blocks.length;i++){var positionBlock=position.blocks[i];var block=this.blocks[i];var l=positionBlock.anchor.left;var b=positionBlock.anchor.bottom;var r=positionBlock.anchor.right;var t=positionBlock.anchor.top;var w=(isNaN(positionBlock.size.w))?this.size.w-(r+l):positionBlock.size.w;var h=(isNaN(positionBlock.size.h))?this.size.h-(b+t):positionBlock.size.h;block.div.style.width=(w<0?0:w)+'px';block.div.style.height=(h<0?0:h)+'px';block.div.style.left=(l!=null)?l+'px':'';block.div.style.bottom=(b!=null)?b+'px':'';block.div.style.right=(r!=null)?r+'px':'';block.div.style.top=(t!=null)?t+'px':'';block.image.style.left=positionBlock.position.x+'px';block.image.style.top=positionBlock.position.y+'px';}
-this.contentDiv.style.left=this.padding.left+"px";this.contentDiv.style.top=this.padding.top+"px";}},CLASS_NAME:"OpenLayers.Popup.Framed"});OpenLayers.Projection=OpenLayers.Class({proj:null,projCode:null,initialize:function(projCode,options){OpenLayers.Util.extend(this,options);this.projCode=projCode;if(window.Proj4js){this.proj=new Proj4js.Proj(projCode);}},getCode:function(){return this.proj?this.proj.srsCode:this.projCode;},getUnits:function(){return this.proj?this.proj.units:null;},toString:function(){return this.getCode();},equals:function(projection){if(projection&&projection.getCode){return this.getCode()==projection.getCode();}else{return false;}},destroy:function(){delete this.proj;delete this.projCode;},CLASS_NAME:"OpenLayers.Projection"});OpenLayers.Projection.transforms={};OpenLayers.Projection.addTransform=function(from,to,method){if(!OpenLayers.Projection.transforms[from]){OpenLayers.Projection.transforms[from]={};}
-OpenLayers.Projection.transforms[from][to]=method;};OpenLayers.Projection.transform=function(point,source,dest){if(source.proj&&dest.proj){point=Proj4js.transform(source.proj,dest.proj,point);}else if(source&&dest&&OpenLayers.Projection.transforms[source.getCode()]&&OpenLayers.Projection.transforms[source.getCode()][dest.getCode()]){OpenLayers.Projection.transforms[source.getCode()][dest.getCode()](point);}
-return point;};OpenLayers.Protocol.WFS.v1=OpenLayers.Class(OpenLayers.Protocol,{version:null,srsName:"EPSG:4326",featureType:null,featureNS:null,geometryName:"the_geom",schema:null,featurePrefix:"feature",formatOptions:null,readFormat:null,initialize:function(options){OpenLayers.Protocol.prototype.initialize.apply(this,[options]);if(!options.format){this.format=OpenLayers.Format.WFST(OpenLayers.Util.extend({version:this.version,featureType:this.featureType,featureNS:this.featureNS,featurePrefix:this.featurePrefix,geometryName:this.geometryName,srsName:this.srsName,schema:this.schema},this.formatOptions));}
-if(!this.featureNS&&this.featurePrefix){var readNode=this.format.readNode;this.format.readNode=function(node,obj){if(!this.featureNS&&node.prefix==this.featurePrefix){this.featureNS=node.namespaceURI;this.setNamespace("feature",this.featureNS);}
-return readNode.apply(this,arguments);};}},destroy:function(){if(this.options&&!this.options.format){this.format.destroy();}
-this.format=null;OpenLayers.Protocol.prototype.destroy.apply(this);},read:function(options){OpenLayers.Protocol.prototype.read.apply(this,arguments);options=OpenLayers.Util.extend({},options);OpenLayers.Util.applyDefaults(options,this.options||{});var response=new OpenLayers.Protocol.Response({requestType:"read"});var data=OpenLayers.Format.XML.prototype.write.apply(this.format,[this.format.writeNode("wfs:GetFeature",options)]);response.priv=OpenLayers.Request.POST({url:options.url,callback:this.createCallback(this.handleRead,response,options),params:options.params,headers:options.headers,data:data});return response;},handleRead:function(response,options){if(options.callback){var request=response.priv;if(request.status>=200&&request.status<300){response.features=this.parseFeatures(request);response.code=OpenLayers.Protocol.Response.SUCCESS;}else{response.code=OpenLayers.Protocol.Response.FAILURE;}
-options.callback.call(options.scope,response);}},parseFeatures:function(request){var doc=request.responseXML;if(!doc||!doc.documentElement){doc=request.responseText;}
-if(!doc||doc.length<=0){return null;}
-return(this.readFormat!==null)?this.readFormat.read(doc):this.format.read(doc);},commit:function(features,options){options=OpenLayers.Util.extend({},options);OpenLayers.Util.applyDefaults(options,this.options);var response=new OpenLayers.Protocol.Response({requestType:"commit",reqFeatures:features});response.priv=OpenLayers.Request.POST({url:options.url,data:this.format.write(features,options),callback:this.createCallback(this.handleCommit,response,options)});return response;},handleCommit:function(response,options){if(options.callback){var request=response.priv;var data=request.responseXML;if(!data||!data.documentElement){data=request.responseText;}
-var obj=this.format.read(data)||{};response.insertIds=obj.insertIds||[];response.code=(obj.success)?OpenLayers.Protocol.Response.SUCCESS:OpenLayers.Protocol.Response.FAILURE;options.callback.call(options.scope,response);}},filterDelete:function(filter,options){options=OpenLayers.Util.extend({},options);OpenLayers.Util.applyDefaults(options,this.options);var response=new OpenLayers.Protocol.Response({requestType:"commit"});var root=this.format.createElementNSPlus("wfs:Transaction",{attributes:{service:"WFS",version:this.version}});var deleteNode=this.format.createElementNSPlus("wfs:Delete",{attributes:{typeName:(options.featureNS?this.featurePrefix+":":"")+
-options.featureType}});if(options.featureNS){deleteNode.setAttribute("xmlns:"+this.featurePrefix,options.featureNS);}
-var filterNode=this.format.writeNode("ogc:Filter",filter);deleteNode.appendChild(filterNode);root.appendChild(deleteNode);var data=OpenLayers.Format.XML.prototype.write.apply(this.format,[root]);return OpenLayers.Request.POST({url:this.url,callback:options.callback||function(){},data:data});},abort:function(response){if(response){response.priv.abort();}},CLASS_NAME:"OpenLayers.Protocol.WFS.v1"});OpenLayers.Renderer.SVG=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"http://www.w3.org/2000/svg",xlinkns:"http://www.w3.org/1999/xlink",MAX_PIXEL:15000,translationParameters:null,symbolMetrics:null,isGecko:null,supportUse:null,initialize:function(containerID){if(!this.supported()){return;}
-OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);this.translationParameters={x:0,y:0};this.supportUse=(navigator.userAgent.toLowerCase().indexOf("applewebkit/5")==-1);this.isGecko=(navigator.userAgent.toLowerCase().indexOf("gecko/")!=-1);this.symbolMetrics={};},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments);},supported:function(){var svgFeature="http://www.w3.org/TR/SVG11/feature#";return(document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature(svgFeature+"SVG","1.1")||document.implementation.hasFeature(svgFeature+"BasicStructure","1.1")));},inValidRange:function(x,y,xyOnly){var left=x+(xyOnly?0:this.translationParameters.x);var top=y+(xyOnly?0:this.translationParameters.y);return(left>=-this.MAX_PIXEL&&left<=this.MAX_PIXEL&&top>=-this.MAX_PIXEL&&top<=this.MAX_PIXEL);},setExtent:function(extent,resolutionChanged){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var resolution=this.getResolution();var left=-extent.left/resolution;var top=extent.top/resolution;if(resolutionChanged){this.left=left;this.top=top;var extentString="0 0 "+this.size.w+" "+this.size.h;this.rendererRoot.setAttributeNS(null,"viewBox",extentString);this.translate(0,0);return true;}else{var inRange=this.translate(left-this.left,top-this.top);if(!inRange){this.setExtent(extent,true);}
-return inRange;}},translate:function(x,y){if(!this.inValidRange(x,y,true)){return false;}else{var transformString="";if(x||y){transformString="translate("+x+","+y+")";}
-this.root.setAttributeNS(null,"transform",transformString);this.translationParameters={x:x,y:y};return true;}},setSize:function(size){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);this.rendererRoot.setAttributeNS(null,"width",this.size.w);this.rendererRoot.setAttributeNS(null,"height",this.size.h);},getNodeType:function(geometry,style){var nodeType=null;switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":if(style.externalGraphic){nodeType="image";}else if(this.isComplexSymbol(style.graphicName)){nodeType=this.supportUse===false?"svg":"use";}else{nodeType="circle";}
-break;case"OpenLayers.Geometry.Rectangle":nodeType="rect";break;case"OpenLayers.Geometry.LineString":nodeType="polyline";break;case"OpenLayers.Geometry.LinearRing":nodeType="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="path";break;default:break;}
-return nodeType;},setStyle:function(node,style,options){style=style||node._style;options=options||node._options;var r=parseFloat(node.getAttributeNS(null,"r"));var widthFactor=1;var pos;if(node._geometryClass=="OpenLayers.Geometry.Point"&&r){node.style.visibility="";if(style.graphic===false){node.style.visibility="hidden";}else if(style.externalGraphic){pos=this.getPosition(node);if(style.graphicTitle){node.setAttributeNS(null,"title",style.graphicTitle);}
-if(style.graphicWidth&&style.graphicHeight){node.setAttributeNS(null,"preserveAspectRatio","none");}
-var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var opacity=style.graphicOpacity||style.fillOpacity;node.setAttributeNS(null,"x",(pos.x+xOffset).toFixed());node.setAttributeNS(null,"y",(pos.y+yOffset).toFixed());node.setAttributeNS(null,"width",width);node.setAttributeNS(null,"height",height);node.setAttributeNS(this.xlinkns,"href",style.externalGraphic);node.setAttributeNS(null,"style","opacity: "+opacity);}else if(this.isComplexSymbol(style.graphicName)){var offset=style.pointRadius*3;var size=offset*2;var id=this.importSymbol(style.graphicName);pos=this.getPosition(node);widthFactor=this.symbolMetrics[id][0]*3/size;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);}
-if(this.supportUse===false){var src=document.getElementById(id);node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));}else{node.setAttributeNS(this.xlinkns,"href","#"+id);}
-node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",pos.x-offset);node.setAttributeNS(null,"y",pos.y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius);}
-var rotation=style.rotation;if((rotation!==undefined||node._rotation!==undefined)&&pos){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform","rotate("+rotation+" "+pos.x+" "+
-pos.y+")");}else{var metrics=this.symbolMetrics[id];node.firstChild.setAttributeNS(null,"transform","rotate("+style.rotation+" "+metrics[1]+" "+metrics[2]+")");}}}
-if(options.isFilled){node.setAttributeNS(null,"fill",style.fillColor);node.setAttributeNS(null,"fill-opacity",style.fillOpacity);}else{node.setAttributeNS(null,"fill","none");}
-if(options.isStroked){node.setAttributeNS(null,"stroke",style.strokeColor);node.setAttributeNS(null,"stroke-opacity",style.strokeOpacity);node.setAttributeNS(null,"stroke-width",style.strokeWidth*widthFactor);node.setAttributeNS(null,"stroke-linecap",style.strokeLinecap||"round");node.setAttributeNS(null,"stroke-linejoin","round");style.strokeDashstyle&&node.setAttributeNS(null,"stroke-dasharray",this.dashStyle(style,widthFactor));}else{node.setAttributeNS(null,"stroke","none");}
-if(style.pointerEvents){node.setAttributeNS(null,"pointer-events",style.pointerEvents);}
-if(style.cursor!=null){node.setAttributeNS(null,"cursor",style.cursor);}
-return node;},dashStyle:function(style,widthFactor){var w=style.strokeWidth*widthFactor;var str=style.strokeDashstyle;switch(str){case'solid':return'none';case'dot':return[1,4*w].join();case'dash':return[4*w,4*w].join();case'dashdot':return[4*w,4*w,1,4*w].join();case'longdash':return[8*w,4*w].join();case'longdashdot':return[8*w,4*w,1,4*w].join();default:return OpenLayers.String.trim(str).replace(/\s+/g,",");}},createNode:function(type,id){var node=document.createElementNS(this.xmlns,type);if(id){node.setAttributeNS(null,"id",id);}
-return node;},nodeTypeCompare:function(node,type){return(type==node.nodeName);},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_svgRoot","svg");},createRoot:function(suffix){return this.nodeFactory(this.container.id+suffix,"g");},createDefs:function(){var defs=this.nodeFactory(this.container.id+"_defs","defs");this.rendererRoot.appendChild(defs);return defs;},drawPoint:function(node,geometry){return this.drawCircle(node,geometry,1);},drawCircle:function(node,geometry,radius){var resolution=this.getResolution();var x=(geometry.x/resolution+this.left);var y=(this.top-geometry.y/resolution);if(this.inValidRange(x,y)){node.setAttributeNS(null,"cx",x);node.setAttributeNS(null,"cy",y);node.setAttributeNS(null,"r",radius);return node;}else{return false;}},drawLineString:function(node,geometry){var componentsResult=this.getComponentsString(geometry.components);if(componentsResult.path){node.setAttributeNS(null,"points",componentsResult.path);return(componentsResult.complete?node:null);}else{return false;}},drawLinearRing:function(node,geometry){var componentsResult=this.getComponentsString(geometry.components);if(componentsResult.path){node.setAttributeNS(null,"points",componentsResult.path);return(componentsResult.complete?node:null);}else{return false;}},drawPolygon:function(node,geometry){var d="";var draw=true;var complete=true;var linearRingResult,path;for(var j=0,len=geometry.components.length;j<len;j++){d+=" M";linearRingResult=this.getComponentsString(geometry.components[j].components," ");path=linearRingResult.path;if(path){d+=" "+path;complete=linearRingResult.complete&&complete;}else{draw=false;}}
-d+=" z";if(draw){node.setAttributeNS(null,"d",d);node.setAttributeNS(null,"fill-rule","evenodd");return complete?node:null;}else{return false;}},drawRectangle:function(node,geometry){var resolution=this.getResolution();var x=(geometry.x/resolution+this.left);var y=(this.top-geometry.y/resolution);if(this.inValidRange(x,y)){node.setAttributeNS(null,"x",x);node.setAttributeNS(null,"y",y);node.setAttributeNS(null,"width",geometry.width/resolution);node.setAttributeNS(null,"height",geometry.height/resolution);return node;}else{return false;}},drawSurface:function(node,geometry){var d=null;var draw=true;for(var i=0,len=geometry.components.length;i<len;i++){if((i%3)==0&&(i/3)==0){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
-d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
-d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;}
-d+=" "+component;}}
-d+=" Z";if(draw){node.setAttributeNS(null,"d",d);return node;}else{return false;}},drawText:function(featureId,style,location){var resolution=this.getResolution();var x=(location.x/resolution+this.left);var y=(location.y/resolution-this.top);var label=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX,"text");var tspan=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX+"_tspan","tspan");label.setAttributeNS(null,"x",x);label.setAttributeNS(null,"y",-y);if(style.fontColor){label.setAttributeNS(null,"fill",style.fontColor);}
-if(style.fontOpacity){label.setAttributeNS(null,"opacity",style.fontOpacity);}
-if(style.fontFamily){label.setAttributeNS(null,"font-family",style.fontFamily);}
-if(style.fontSize){label.setAttributeNS(null,"font-size",style.fontSize);}
-if(style.fontWeight){label.setAttributeNS(null,"font-weight",style.fontWeight);}
-if(style.labelSelect===true){label.setAttributeNS(null,"pointer-events","visible");label._featureId=featureId;tspan._featureId=featureId;tspan._geometry=location;tspan._geometryClass=location.CLASS_NAME;}else{label.setAttributeNS(null,"pointer-events","none");}
-var align=style.labelAlign||"cm";label.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[0]]||"middle");if(this.isGecko){label.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]]||"central");}else{tspan.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[align[1]]||"-35%");}
-tspan.textContent=style.label;if(!label.parentNode){label.appendChild(tspan);this.textRoot.appendChild(label);}},getComponentsString:function(components,separator){var renderCmp=[];var complete=true;var len=components.length;var strings=[];var str,component;for(var i=0;i<len;i++){component=components[i];renderCmp.push(component);str=this.getShortString(component);if(str){strings.push(str);}else{if(i>0){if(this.getShortString(components[i-1])){strings.push(this.clipLine(components[i],components[i-1]));}}
-if(i<len-1){if(this.getShortString(components[i+1])){strings.push(this.clipLine(components[i],components[i+1]));}}
-complete=false;}}
-return{path:strings.join(separator||","),complete:complete};},clipLine:function(badComponent,goodComponent){if(goodComponent.equals(badComponent)){return"";}
-var resolution=this.getResolution();var maxX=this.MAX_PIXEL-this.translationParameters.x;var maxY=this.MAX_PIXEL-this.translationParameters.y;var x1=goodComponent.x/resolution+this.left;var y1=this.top-goodComponent.y/resolution;var x2=badComponent.x/resolution+this.left;var y2=this.top-badComponent.y/resolution;var k;if(x2<-maxX||x2>maxX){k=(y2-y1)/(x2-x1);x2=x2<0?-maxX:maxX;y2=y1+(x2-x1)*k;}
-if(y2<-maxY||y2>maxY){k=(x2-x1)/(y2-y1);y2=y2<0?-maxY:maxY;x2=x1+(y2-y1)*k;}
-return x2+","+y2;},getShortString:function(point){var resolution=this.getResolution();var x=(point.x/resolution+this.left);var y=(this.top-point.y/resolution);if(this.inValidRange(x,y)){return x+","+y;}else{return false;}},getPosition:function(node){return({x:parseFloat(node.getAttributeNS(null,"cx")),y:parseFloat(node.getAttributeNS(null,"cy"))});},importSymbol:function(graphicName){if(!this.defs){this.defs=this.createDefs();}
-var id=this.container.id+"-"+graphicName;if(document.getElementById(id)!=null){return id;}
-var symbol=OpenLayers.Renderer.symbol[graphicName];if(!symbol){throw new Error(graphicName+' is not a valid symbol name');}
-var symbolNode=this.nodeFactory(id,"symbol");var node=this.nodeFactory(null,"polygon");symbolNode.appendChild(node);var symbolExtent=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var points=[];var x,y;for(var i=0;i<symbol.length;i=i+2){x=symbol[i];y=symbol[i+1];symbolExtent.left=Math.min(symbolExtent.left,x);symbolExtent.bottom=Math.min(symbolExtent.bottom,y);symbolExtent.right=Math.max(symbolExtent.right,x);symbolExtent.top=Math.max(symbolExtent.top,y);points.push(x,",",y);}
-node.setAttributeNS(null,"points",points.join(" "));var width=symbolExtent.getWidth();var height=symbolExtent.getHeight();var viewBox=[symbolExtent.left-width,symbolExtent.bottom-height,width*3,height*3];symbolNode.setAttributeNS(null,"viewBox",viewBox.join(" "));this.symbolMetrics[id]=[Math.max(width,height),symbolExtent.getCenterLonLat().lon,symbolExtent.getCenterLonLat().lat];this.defs.appendChild(symbolNode);return symbolNode.id;},getFeatureIdFromEvent:function(evt){var featureId=OpenLayers.Renderer.Elements.prototype.getFeatureIdFromEvent.apply(this,arguments);if(this.supportUse===false&&!featureId){var target=evt.target;featureId=target.parentNode&&target!=this.rendererRoot&&target.parentNode._featureId;}
-return featureId;},CLASS_NAME:"OpenLayers.Renderer.SVG"});OpenLayers.Renderer.SVG.LABEL_ALIGN={"l":"start","r":"end","b":"bottom","t":"hanging"};OpenLayers.Renderer.SVG.LABEL_VSHIFT={"t":"-70%","b":"0"};OpenLayers.Renderer.VML=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"urn:schemas-microsoft-com:vml",symbolCache:{},offset:null,initialize:function(containerID){if(!this.supported()){return;}
-if(!document.namespaces.olv){document.namespaces.add("olv",this.xmlns);var style=document.createStyleSheet();var shapes=['shape','rect','oval','fill','stroke','imagedata','group','textbox'];for(var i=0,len=shapes.length;i<len;i++){style.addRule('olv\\:'+shapes[i],"behavior: url(#default#VML); "+"position: absolute; display: inline-block;");}}
-OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments);},supported:function(){return!!(document.namespaces);},setExtent:function(extent,resolutionChanged){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var resolution=this.getResolution();var left=(extent.left/resolution)|0;var top=(extent.top/resolution-this.size.h)|0;if(resolutionChanged||!this.offset){this.offset={x:left,y:top};left=0;top=0;}else{left=left-this.offset.x;top=top-this.offset.y;}
-var org=left+" "+top;this.root.coordorigin=org;var roots=[this.root,this.vectorRoot,this.textRoot];var root;for(var i=0,len=roots.length;i<len;++i){root=roots[i];var size=this.size.w+" "+this.size.h;root.coordsize=size;}
-this.root.style.flip="y";return true;},setSize:function(size){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);var roots=[this.rendererRoot,this.root,this.vectorRoot,this.textRoot];var w=this.size.w+"px";var h=this.size.h+"px";var root;for(var i=0,len=roots.length;i<len;++i){root=roots[i];root.style.width=w;root.style.height=h;}},getNodeType:function(geometry,style){var nodeType=null;switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":if(style.externalGraphic){nodeType="olv:rect";}else if(this.isComplexSymbol(style.graphicName)){nodeType="olv:shape";}else{nodeType="olv:oval";}
-break;case"OpenLayers.Geometry.Rectangle":nodeType="olv:rect";break;case"OpenLayers.Geometry.LineString":case"OpenLayers.Geometry.LinearRing":case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="olv:shape";break;default:break;}
-return nodeType;},setStyle:function(node,style,options,geometry){style=style||node._style;options=options||node._options;var fillColor=style.fillColor;if(node._geometryClass==="OpenLayers.Geometry.Point"){if(style.externalGraphic){if(style.graphicTitle){node.title=style.graphicTitle;}
-var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var resolution=this.getResolution();var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);node.style.left=(((geometry.x/resolution-this.offset.x)+xOffset)|0)+"px";node.style.top=(((geometry.y/resolution-this.offset.y)-(yOffset+height))|0)+"px";node.style.width=width+"px";node.style.height=height+"px";node.style.flip="y";fillColor="none";options.isStroked=false;}else if(this.isComplexSymbol(style.graphicName)){var cache=this.importSymbol(style.graphicName);node.path=cache.path;node.coordorigin=cache.left+","+cache.bottom;var size=cache.size;node.coordsize=size+","+size;this.drawCircle(node,geometry,style.pointRadius);node.style.flip="y";}else{this.drawCircle(node,geometry,style.pointRadius);}}
-if(options.isFilled){node.fillcolor=fillColor;}else{node.filled="false";}
-var fills=node.getElementsByTagName("fill");var fill=(fills.length==0)?null:fills[0];if(!options.isFilled){if(fill){node.removeChild(fill);}}else{if(!fill){fill=this.createNode('olv:fill',node.id+"_fill");}
-fill.opacity=style.fillOpacity;if(node._geometryClass==="OpenLayers.Geometry.Point"&&style.externalGraphic){if(style.graphicOpacity){fill.opacity=style.graphicOpacity;}
-fill.src=style.externalGraphic;fill.type="frame";if(!(style.graphicWidth&&style.graphicHeight)){fill.aspect="atmost";}}
-if(fill.parentNode!=node){node.appendChild(fill);}}
-var rotation=style.rotation;if((rotation!==undefined||node._rotation!==undefined)){node._rotation=rotation;if(style.externalGraphic){this.graphicRotate(node,xOffset,yOffset,style);fill.opacity=0;}else if(node._geometryClass==="OpenLayers.Geometry.Point"){node.style.rotation=rotation||0;}}
-var strokes=node.getElementsByTagName("stroke");var stroke=(strokes.length==0)?null:strokes[0];if(!options.isStroked){node.stroked=false;if(stroke){stroke.on=false;}}else{if(!stroke){stroke=this.createNode('olv:stroke',node.id+"_stroke");node.appendChild(stroke);}
-stroke.on=true;stroke.color=style.strokeColor;stroke.weight=style.strokeWidth+"px";stroke.opacity=style.strokeOpacity;stroke.endcap=style.strokeLinecap=='butt'?'flat':(style.strokeLinecap||'round');if(style.strokeDashstyle){stroke.dashstyle=this.dashStyle(style);}}
-if(style.cursor!="inherit"&&style.cursor!=null){node.style.cursor=style.cursor;}
-return node;},graphicRotate:function(node,xOffset,yOffset,style){var style=style||node._style;var rotation=style.rotation||0;var aspectRatio,size;if(!(style.graphicWidth&&style.graphicHeight)){var img=new Image();img.onreadystatechange=OpenLayers.Function.bind(function(){if(img.readyState=="complete"||img.readyState=="interactive"){aspectRatio=img.width/img.height;size=Math.max(style.pointRadius*2,style.graphicWidth||0,style.graphicHeight||0);xOffset=xOffset*aspectRatio;style.graphicWidth=size*aspectRatio;style.graphicHeight=size;this.graphicRotate(node,xOffset,yOffset,style);}},this);img.src=style.externalGraphic;return;}else{size=Math.max(style.graphicWidth,style.graphicHeight);aspectRatio=style.graphicWidth/style.graphicHeight;}
-var width=Math.round(style.graphicWidth||size*aspectRatio);var height=Math.round(style.graphicHeight||size);node.style.width=width+"px";node.style.height=height+"px";var image=document.getElementById(node.id+"_image");if(!image){image=this.createNode("olv:imagedata",node.id+"_image");node.appendChild(image);}
-image.style.width=width+"px";image.style.height=height+"px";image.src=style.externalGraphic;image.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader("+"src='', sizingMethod='scale')";var rot=rotation*Math.PI/180;var sintheta=Math.sin(rot);var costheta=Math.cos(rot);var filter="progid:DXImageTransform.Microsoft.Matrix(M11="+costheta+",M12="+(-sintheta)+",M21="+sintheta+",M22="+costheta+",SizingMethod='auto expand')\n";var opacity=style.graphicOpacity||style.fillOpacity;if(opacity&&opacity!=1){filter+="progid:DXImageTransform.Microsoft.BasicImage(opacity="+
-opacity+")\n";}
-node.style.filter=filter;var centerPoint=new OpenLayers.Geometry.Point(-xOffset,-yOffset);var imgBox=new OpenLayers.Bounds(0,0,width,height).toGeometry();imgBox.rotate(style.rotation,centerPoint);var imgBounds=imgBox.getBounds();node.style.left=Math.round(parseInt(node.style.left)+imgBounds.left)+"px";node.style.top=Math.round(parseInt(node.style.top)-imgBounds.bottom)+"px";},postDraw:function(node){node.style.visibility="visible";var fillColor=node._style.fillColor;var strokeColor=node._style.strokeColor;if(fillColor=="none"&&node.fillcolor!=fillColor){node.fillcolor=fillColor;}
-if(strokeColor=="none"&&node.strokecolor!=strokeColor){node.strokecolor=strokeColor;}},setNodeDimension:function(node,geometry){var bbox=geometry.getBounds();if(bbox){var resolution=this.getResolution();var scaledBox=new OpenLayers.Bounds((bbox.left/resolution-this.offset.x)|0,(bbox.bottom/resolution-this.offset.y)|0,(bbox.right/resolution-this.offset.x)|0,(bbox.top/resolution-this.offset.y)|0);node.style.left=scaledBox.left+"px";node.style.top=scaledBox.top+"px";node.style.width=scaledBox.getWidth()+"px";node.style.height=scaledBox.getHeight()+"px";node.coordorigin=scaledBox.left+" "+scaledBox.top;node.coordsize=scaledBox.getWidth()+" "+scaledBox.getHeight();}},dashStyle:function(style){var dash=style.strokeDashstyle;switch(dash){case'solid':case'dot':case'dash':case'dashdot':case'longdash':case'longdashdot':return dash;default:var parts=dash.split(/[ ,]/);if(parts.length==2){if(1*parts[0]>=2*parts[1]){return"longdash";}
-return(parts[0]==1||parts[1]==1)?"dot":"dash";}else if(parts.length==4){return(1*parts[0]>=2*parts[1])?"longdashdot":"dashdot";}
-return"solid";}},createNode:function(type,id){var node=document.createElement(type);if(id){node.id=id;}
-node.unselectable='on';node.onselectstart=OpenLayers.Function.False;return node;},nodeTypeCompare:function(node,type){var subType=type;var splitIndex=subType.indexOf(":");if(splitIndex!=-1){subType=subType.substr(splitIndex+1);}
-var nodeName=node.nodeName;splitIndex=nodeName.indexOf(":");if(splitIndex!=-1){nodeName=nodeName.substr(splitIndex+1);}
-return(subType==nodeName);},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_vmlRoot","div");},createRoot:function(suffix){return this.nodeFactory(this.container.id+suffix,"olv:group");},drawPoint:function(node,geometry){return this.drawCircle(node,geometry,1);},drawCircle:function(node,geometry,radius){if(!isNaN(geometry.x)&&!isNaN(geometry.y)){var resolution=this.getResolution();node.style.left=(((geometry.x/resolution-this.offset.x)|0)-radius)+"px";node.style.top=(((geometry.y/resolution-this.offset.y)|0)-radius)+"px";var diameter=radius*2;node.style.width=diameter+"px";node.style.height=diameter+"px";return node;}
-return false;},drawLineString:function(node,geometry){return this.drawLine(node,geometry,false);},drawLinearRing:function(node,geometry){return this.drawLine(node,geometry,true);},drawLine:function(node,geometry,closeLine){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var numComponents=geometry.components.length;var parts=new Array(numComponents);var comp,x,y;for(var i=0;i<numComponents;i++){comp=geometry.components[i];x=(comp.x/resolution-this.offset.x)|0;y=(comp.y/resolution-this.offset.y)|0;parts[i]=" "+x+","+y+" l ";}
-var end=(closeLine)?" x e":" e";node.path="m"+parts.join("")+end;return node;},drawPolygon:function(node,geometry){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var path=[];var linearRing,i,j,len,ilen,comp,x,y;for(j=0,len=geometry.components.length;j<len;j++){linearRing=geometry.components[j];path.push("m");for(i=0,ilen=linearRing.components.length;i<ilen;i++){comp=linearRing.components[i];x=(comp.x/resolution-this.offset.x)|0;y=(comp.y/resolution-this.offset.y)|0;path.push(" "+x+","+y);if(i==0){path.push(" l");}}
-path.push(" x ");}
-path.push("e");node.path=path.join("");return node;},drawRectangle:function(node,geometry){var resolution=this.getResolution();node.style.left=((geometry.x/resolution-this.offset.x)|0)+"px";node.style.top=((geometry.y/resolution-this.offset.y)|0)+"px";node.style.width=((geometry.width/resolution)|0)+"px";node.style.height=((geometry.height/resolution)|0)+"px";return node;},drawText:function(featureId,style,location){var label=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX,"olv:rect");var textbox=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX+"_textbox","olv:textbox");var resolution=this.getResolution();label.style.left=((location.x/resolution-this.offset.x)|0)+"px";label.style.top=((location.y/resolution-this.offset.y)|0)+"px";label.style.flip="y";textbox.innerText=style.label;if(style.fontColor){textbox.style.color=style.fontColor;}
-if(style.fontOpacity){textbox.style.filter='alpha(opacity='+(style.fontOpacity*100)+')';}
-if(style.fontFamily){textbox.style.fontFamily=style.fontFamily;}
-if(style.fontSize){textbox.style.fontSize=style.fontSize;}
-if(style.fontWeight){textbox.style.fontWeight=style.fontWeight;}
-if(style.labelSelect===true){label._featureId=featureId;textbox._featureId=featureId;textbox._geometry=location;textbox._geometryClass=location.CLASS_NAME;}
-textbox.style.whiteSpace="nowrap";textbox.inset="1px,0px,0px,0px";if(!label.parentNode){label.appendChild(textbox);this.textRoot.appendChild(label);}
-var align=style.labelAlign||"cm";if(align.length==1){align+="m";}
-var xshift=textbox.clientWidth*(OpenLayers.Renderer.VML.LABEL_SHIFT[align.substr(0,1)]);var yshift=textbox.clientHeight*(OpenLayers.Renderer.VML.LABEL_SHIFT[align.substr(1,1)]);label.style.left=parseInt(label.style.left)-xshift-1+"px";label.style.top=parseInt(label.style.top)+yshift+"px";},drawSurface:function(node,geometry){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var path=[];var comp,x,y;for(var i=0,len=geometry.components.length;i<len;i++){comp=geometry.components[i];x=(comp.x/resolution-this.offset.x)|0;y=(comp.y/resolution-this.offset.y)|0;if((i%3)==0&&(i/3)==0){path.push("m");}else if((i%3)==1){path.push(" c");}
-path.push(" "+x+","+y);}
-path.push(" x e");node.path=path.join("");return node;},moveRoot:function(renderer){var layer=this.map.getLayer(renderer.container.id);if(layer instanceof OpenLayers.Layer.Vector.RootContainer){layer=this.map.getLayer(this.container.id);}
-layer&&layer.renderer.clear();OpenLayers.Renderer.Elements.prototype.moveRoot.apply(this,arguments);layer&&layer.redraw();},importSymbol:function(graphicName){var id=this.container.id+"-"+graphicName;var cache=this.symbolCache[id];if(cache){return cache;}
-var symbol=OpenLayers.Renderer.symbol[graphicName];if(!symbol){throw new Error(graphicName+' is not a valid symbol name');}
-var symbolExtent=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var pathitems=["m"];for(var i=0;i<symbol.length;i=i+2){var x=symbol[i];var y=symbol[i+1];symbolExtent.left=Math.min(symbolExtent.left,x);symbolExtent.bottom=Math.min(symbolExtent.bottom,y);symbolExtent.right=Math.max(symbolExtent.right,x);symbolExtent.top=Math.max(symbolExtent.top,y);pathitems.push(x);pathitems.push(y);if(i==0){pathitems.push("l");}}
-pathitems.push("x e");var path=pathitems.join(" ");var diff=(symbolExtent.getWidth()-symbolExtent.getHeight())/2;if(diff>0){symbolExtent.bottom=symbolExtent.bottom-diff;symbolExtent.top=symbolExtent.top+diff;}else{symbolExtent.left=symbolExtent.left+diff;symbolExtent.right=symbolExtent.right-diff;}
-cache={path:path,size:symbolExtent.getWidth(),left:symbolExtent.left,bottom:symbolExtent.bottom};this.symbolCache[id]=cache;return cache;},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Renderer.VML.LABEL_SHIFT={"l":0,"c":.5,"r":1,"t":0,"m":.5,"b":1};OpenLayers.Tile=OpenLayers.Class({EVENT_TYPES:["loadstart","loadend","reload","unload"],events:null,id:null,layer:null,url:null,bounds:null,size:null,position:null,isLoading:false,initialize:function(layer,position,bounds,url,size){this.layer=layer;this.position=position.clone();this.bounds=bounds.clone();this.url=url;this.size=size.clone();this.id=OpenLayers.Util.createUniqueID("Tile_");this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES);},unload:function(){if(this.isLoading){this.isLoading=false;this.events.triggerEvent("unload");}},destroy:function(){this.layer=null;this.bounds=null;this.size=null;this.position=null;this.events.destroy();this.events=null;},clone:function(obj){if(obj==null){obj=new OpenLayers.Tile(this.layer,this.position,this.bounds,this.url,this.size);}
-OpenLayers.Util.applyDefaults(obj,this);return obj;},draw:function(){var maxExtent=this.layer.maxExtent;var withinMaxExtent=(maxExtent&&this.bounds.intersectsBounds(maxExtent,false));this.shouldDraw=(withinMaxExtent||this.layer.displayOutsideMaxExtent);this.clear();return this.shouldDraw;},moveTo:function(bounds,position,redraw){if(redraw==null){redraw=true;}
-this.bounds=bounds.clone();this.position=position.clone();if(redraw){this.draw();}},clear:function(){},getBoundsFromBaseLayer:function(position){var msg=OpenLayers.i18n('reprojectDeprecated',{'layerName':this.layer.name});OpenLayers.Console.warn(msg);var topLeft=this.layer.map.getLonLatFromLayerPx(position);var bottomRightPx=position.clone();bottomRightPx.x+=this.size.w;bottomRightPx.y+=this.size.h;var bottomRight=this.layer.map.getLonLatFromLayerPx(bottomRightPx);if(topLeft.lon>bottomRight.lon){if(topLeft.lon<0){topLeft.lon=-180-(topLeft.lon+180);}else{bottomRight.lon=180+bottomRight.lon+180;}}
-var bounds=new OpenLayers.Bounds(topLeft.lon,bottomRight.lat,bottomRight.lon,topLeft.lat);return bounds;},showTile:function(){if(this.shouldDraw){this.show();}},show:function(){},hide:function(){},CLASS_NAME:"OpenLayers.Tile"});OpenLayers.Control.MouseToolbar=OpenLayers.Class(OpenLayers.Control.MouseDefaults,{mode:null,buttons:null,direction:"vertical",buttonClicked:null,initialize:function(position,direction){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.position=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,OpenLayers.Control.MouseToolbar.Y);if(position){this.position=position;}
-if(direction){this.direction=direction;}
-this.measureDivs=[];},destroy:function(){for(var btnId in this.buttons){var btn=this.buttons[btnId];btn.map=null;btn.events.destroy();}
-OpenLayers.Control.MouseDefaults.prototype.destroy.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);OpenLayers.Control.MouseDefaults.prototype.draw.apply(this,arguments);this.buttons={};var sz=new OpenLayers.Size(28,28);var centered=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,0);this._addButton("zoombox","drag-rectangle-off.png","drag-rectangle-on.png",centered,sz,"Shift->Drag to zoom to area");centered=centered.add((this.direction=="vertical"?0:sz.w),(this.direction=="vertical"?sz.h:0));this._addButton("pan","panning-hand-off.png","panning-hand-on.png",centered,sz,"Drag the map to pan.");centered=centered.add((this.direction=="vertical"?0:sz.w),(this.direction=="vertical"?sz.h:0));this.switchModeTo("pan");return this.div;},_addButton:function(id,img,activeImg,xy,sz,title){var imgLocation=OpenLayers.Util.getImagesLocation()+img;var activeImgLocation=OpenLayers.Util.getImagesLocation()+activeImg;var btn=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MouseToolbar_"+id,xy,sz,imgLocation,"absolute");this.div.appendChild(btn);btn.imgLocation=imgLocation;btn.activeImgLocation=activeImgLocation;btn.events=new OpenLayers.Events(this,btn,null,true);btn.events.on({"mousedown":this.buttonDown,"mouseup":this.buttonUp,"dblclick":OpenLayers.Event.stop,scope:this});btn.action=id;btn.title=title;btn.alt=title;btn.map=this.map;this.buttons[id]=btn;return btn;},buttonDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;}
-this.buttonClicked=evt.element.action;OpenLayers.Event.stop(evt);},buttonUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;}
-if(this.buttonClicked!=null){if(this.buttonClicked==evt.element.action){this.switchModeTo(evt.element.action);}
-OpenLayers.Event.stop(evt);this.buttonClicked=null;}},defaultDblClick:function(evt){this.switchModeTo("pan");this.performedDrag=false;var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom+1);OpenLayers.Event.stop(evt);return false;},defaultMouseDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;}
-this.mouseDragStart=evt.xy.clone();this.performedDrag=false;this.startViaKeyboard=false;if(evt.shiftKey&&this.mode!="zoombox"){this.switchModeTo("zoombox");this.startViaKeyboard=true;}else if(evt.altKey&&this.mode!="measure"){this.switchModeTo("measure");}else if(!this.mode){this.switchModeTo("pan");}
-switch(this.mode){case"zoombox":this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv('zoomBox',this.mouseDragStart,null,null,"absolute","2px solid red");this.zoomBox.style.backgroundColor="white";this.zoomBox.style.filter="alpha(opacity=50)";this.zoomBox.style.opacity="0.50";this.zoomBox.style.fontSize="1px";this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.viewPortDiv.appendChild(this.zoomBox);this.performedDrag=true;break;case"measure":var distance="";if(this.measureStart){var measureEnd=this.map.getLonLatFromViewPortPx(this.mouseDragStart);distance=OpenLayers.Util.distVincenty(this.measureStart,measureEnd);distance=Math.round(distance*100)/100;distance=distance+"km";this.measureStartBox=this.measureBox;}
-this.measureStart=this.map.getLonLatFromViewPortPx(this.mouseDragStart);;this.measureBox=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),-2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBox.style.width="4px";this.measureBox.style.height="4px";this.measureBox.style.fontSize="1px";this.measureBox.style.backgroundColor="red";this.measureBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.layerContainerDiv.appendChild(this.measureBox);if(distance){this.measureBoxDistance=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBoxDistance.innerHTML=distance;this.measureBoxDistance.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.layerContainerDiv.appendChild(this.measureBoxDistance);this.measureDivs.push(this.measureBoxDistance);}
-this.measureBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.layerContainerDiv.appendChild(this.measureBox);this.measureDivs.push(this.measureBox);break;default:this.map.div.style.cursor="move";break;}
-document.onselectstart=OpenLayers.Function.False;OpenLayers.Event.stop(evt);},switchModeTo:function(mode){if(mode!=this.mode){if(this.mode&&this.buttons[this.mode]){OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode],null,null,null,this.buttons[this.mode].imgLocation);}
-if(this.mode=="measure"&&mode!="measure"){for(var i=0,len=this.measureDivs.length;i<len;i++){if(this.measureDivs[i]){this.map.layerContainerDiv.removeChild(this.measureDivs[i]);}}
-this.measureDivs=[];this.measureStart=null;}
-this.mode=mode;if(this.buttons[mode]){OpenLayers.Util.modifyAlphaImageDiv(this.buttons[mode],null,null,null,this.buttons[mode].activeImgLocation);}
-switch(this.mode){case"zoombox":this.map.div.style.cursor="crosshair";break;default:this.map.div.style.cursor="";break;}}},leaveMode:function(){this.switchModeTo("pan");},defaultMouseMove:function(evt){if(this.mouseDragStart!=null){switch(this.mode){case"zoombox":var deltaX=Math.abs(this.mouseDragStart.x-evt.xy.x);var deltaY=Math.abs(this.mouseDragStart.y-evt.xy.y);this.zoomBox.style.width=Math.max(1,deltaX)+"px";this.zoomBox.style.height=Math.max(1,deltaY)+"px";if(evt.xy.x<this.mouseDragStart.x){this.zoomBox.style.left=evt.xy.x+"px";}
-if(evt.xy.y<this.mouseDragStart.y){this.zoomBox.style.top=evt.xy.y+"px";}
-break;default:var deltaX=this.mouseDragStart.x-evt.xy.x;var deltaY=this.mouseDragStart.y-evt.xy.y;var size=this.map.getSize();var newXY=new OpenLayers.Pixel(size.w/2+deltaX,size.h/2+deltaY);var newCenter=this.map.getLonLatFromViewPortPx(newXY);this.map.setCenter(newCenter,null,true);this.mouseDragStart=evt.xy.clone();}
-this.performedDrag=true;}},defaultMouseUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;}
-switch(this.mode){case"zoombox":this.zoomBoxEnd(evt);if(this.startViaKeyboard){this.leaveMode();}
-break;case"pan":if(this.performedDrag){this.map.setCenter(this.map.center);}}
-document.onselectstart=null;this.mouseDragStart=null;this.map.div.style.cursor="default";},defaultMouseOut:function(evt){if(this.mouseDragStart!=null&&OpenLayers.Util.mouseLeft(evt,this.map.div)){if(this.zoomBox){this.removeZoomBox();if(this.startViaKeyboard){this.leaveMode();}}
-this.mouseDragStart=null;this.map.div.style.cursor="default";}},defaultClick:function(evt){if(this.performedDrag){this.performedDrag=false;return false;}},CLASS_NAME:"OpenLayers.Control.MouseToolbar"});OpenLayers.Control.MouseToolbar.X=6;OpenLayers.Control.MouseToolbar.Y=300;OpenLayers.Control.NavigationHistory=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOGGLE,previous:null,previousOptions:null,next:null,nextOptions:null,limit:50,autoActivate:true,clearOnDeactivate:false,registry:null,nextStack:null,previousStack:null,listeners:null,restoring:false,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.registry=OpenLayers.Util.extend({"moveend":this.getState},this.registry);var previousOptions={trigger:OpenLayers.Function.bind(this.previousTrigger,this),displayClass:this.displayClass+" "+this.displayClass+"Previous"};OpenLayers.Util.extend(previousOptions,this.previousOptions);this.previous=new OpenLayers.Control.Button(previousOptions);var nextOptions={trigger:OpenLayers.Function.bind(this.nextTrigger,this),displayClass:this.displayClass+" "+this.displayClass+"Next"};OpenLayers.Util.extend(nextOptions,this.nextOptions);this.next=new OpenLayers.Control.Button(nextOptions);this.clear();},onPreviousChange:function(state,length){if(state&&!this.previous.active){this.previous.activate();}else if(!state&&this.previous.active){this.previous.deactivate();}},onNextChange:function(state,length){if(state&&!this.next.active){this.next.activate();}else if(!state&&this.next.active){this.next.deactivate();}},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this);this.previous.destroy();this.next.destroy();this.deactivate();for(var prop in this){this[prop]=null;}},setMap:function(map){this.map=map;this.next.setMap(map);this.previous.setMap(map);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.next.draw();this.previous.draw();},previousTrigger:function(){var current=this.previousStack.shift();var state=this.previousStack.shift();if(state!=undefined){this.nextStack.unshift(current);this.previousStack.unshift(state);this.restoring=true;this.restore(state);this.restoring=false;this.onNextChange(this.nextStack[0],this.nextStack.length);this.onPreviousChange(this.previousStack[1],this.previousStack.length-1);}else{this.previousStack.unshift(current);}
-return state;},nextTrigger:function(){var state=this.nextStack.shift();if(state!=undefined){this.previousStack.unshift(state);this.restoring=true;this.restore(state);this.restoring=false;this.onNextChange(this.nextStack[0],this.nextStack.length);this.onPreviousChange(this.previousStack[1],this.previousStack.length-1);}
-return state;},clear:function(){this.previousStack=[];this.previous.deactivate();this.nextStack=[];this.next.deactivate();},getState:function(){return{center:this.map.getCenter(),resolution:this.map.getResolution(),projection:this.map.getProjectionObject(),units:this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units};},restore:function(state){var center,zoom;if(this.map.getProjectionObject()==state.projection){zoom=this.map.getZoomForResolution(state.resolution);center=state.center;}else{center=state.center.clone();center.transform(state.projection,this.map.getProjectionObject());var sourceUnits=state.units;var targetUnits=this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units;var resolutionFactor=sourceUnits&&targetUnits?OpenLayers.INCHES_PER_UNIT[sourceUnits]/OpenLayers.INCHES_PER_UNIT[targetUnits]:1;zoom=this.map.getZoomForResolution(resolutionFactor*state.resolution);}
-this.map.setCenter(center,zoom);},setListeners:function(){this.listeners={};for(var type in this.registry){this.listeners[type]=OpenLayers.Function.bind(function(){if(!this.restoring){var state=this.registry[type].apply(this,arguments);this.previousStack.unshift(state);if(this.previousStack.length>1){this.onPreviousChange(this.previousStack[1],this.previousStack.length-1);}
-if(this.previousStack.length>(this.limit+1)){this.previousStack.pop();}
-if(this.nextStack.length>0){this.nextStack=[];this.onNextChange(null,0);}}
-return true;},this);}},activate:function(){var activated=false;if(this.map){if(OpenLayers.Control.prototype.activate.apply(this)){if(this.listeners==null){this.setListeners();}
-for(var type in this.listeners){this.map.events.register(type,this,this.listeners[type]);}
-activated=true;if(this.previousStack.length==0){this.initStack();}}}
-return activated;},initStack:function(){if(this.map.getCenter()){this.listeners.moveend();}},deactivate:function(){var deactivated=false;if(this.map){if(OpenLayers.Control.prototype.deactivate.apply(this)){for(var type in this.listeners){this.map.events.unregister(type,this,this.listeners[type]);}
-if(this.clearOnDeactivate){this.clear();}
-deactivated=true;}}
-return deactivated;},CLASS_NAME:"OpenLayers.Control.NavigationHistory"});OpenLayers.Control.PanPanel=OpenLayers.Class(OpenLayers.Control.Panel,{slideFactor:50,initialize:function(options){OpenLayers.Control.Panel.prototype.initialize.apply(this,[options]);this.addControls([new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH,{slideFactor:this.slideFactor}),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH,{slideFactor:this.slideFactor}),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST,{slideFactor:this.slideFactor}),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST,{slideFactor:this.slideFactor})]);},CLASS_NAME:"OpenLayers.Control.PanPanel"});OpenLayers.Control.PanZoomBar=OpenLayers.Class(OpenLayers.Control.PanZoom,{zoomStopWidth:18,zoomStopHeight:11,slider:null,sliderEvents:null,zoombarDiv:null,divEvents:null,zoomWorldIcon:false,forceFixedZoomLevel:false,mouseDragStart:null,zoomStart:null,initialize:function(){OpenLayers.Control.PanZoom.prototype.initialize.apply(this,arguments);},destroy:function(){this._removeZoomBar();this.map.events.un({"changebaselayer":this.redraw,scope:this});OpenLayers.Control.PanZoom.prototype.destroy.apply(this,arguments);delete this.mouseDragStart;delete this.zoomStart;},setMap:function(map){OpenLayers.Control.PanZoom.prototype.setMap.apply(this,arguments);this.map.events.register("changebaselayer",this,this.redraw);},redraw:function(){if(this.div!=null){this.removeButtons();this._removeZoomBar();}
-this.draw();},draw:function(px){OpenLayers.Control.prototype.draw.apply(this,arguments);px=this.position.clone();this.buttons=[];var sz=new OpenLayers.Size(18,18);var centered=new OpenLayers.Pixel(px.x+sz.w/2,px.y);var wposition=sz.w;if(this.zoomWorldIcon){centered=new OpenLayers.Pixel(px.x+sz.w,px.y);}
-this._addButton("panup","north-mini.png",centered,sz);px.y=centered.y+sz.h;this._addButton("panleft","west-mini.png",px,sz);if(this.zoomWorldIcon){this._addButton("zoomworld","zoom-world-mini.png",px.add(sz.w,0),sz);wposition*=2;}
-this._addButton("panright","east-mini.png",px.add(wposition,0),sz);this._addButton("pandown","south-mini.png",centered.add(0,sz.h*2),sz);this._addButton("zoomin","zoom-plus-mini.png",centered.add(0,sz.h*3+5),sz);centered=this._addZoomBar(centered.add(0,sz.h*4+5));this._addButton("zoomout","zoom-minus-mini.png",centered,sz);return this.div;},_addZoomBar:function(centered){var imgLocation=OpenLayers.Util.getImagesLocation();var id=this.id+"_"+this.map.id;var zoomsToEnd=this.map.getNumZoomLevels()-1-this.map.getZoom();var slider=OpenLayers.Util.createAlphaImageDiv(id,centered.add(-1,zoomsToEnd*this.zoomStopHeight),new OpenLayers.Size(20,9),imgLocation+"slider.png","absolute");this.slider=slider;this.sliderEvents=new OpenLayers.Events(this,slider,null,true,{includeXY:true});this.sliderEvents.on({"mousedown":this.zoomBarDown,"mousemove":this.zoomBarDrag,"mouseup":this.zoomBarUp,"dblclick":this.doubleClick,"click":this.doubleClick});var sz=new OpenLayers.Size();sz.h=this.zoomStopHeight*this.map.getNumZoomLevels();sz.w=this.zoomStopWidth;var div=null;if(OpenLayers.Util.alphaHack()){var id=this.id+"_"+this.map.id;div=OpenLayers.Util.createAlphaImageDiv(id,centered,new OpenLayers.Size(sz.w,this.zoomStopHeight),imgLocation+"zoombar.png","absolute",null,"crop");div.style.height=sz.h+"px";}else{div=OpenLayers.Util.createDiv('OpenLayers_Control_PanZoomBar_Zoombar'+this.map.id,centered,sz,imgLocation+"zoombar.png");}
-this.zoombarDiv=div;this.divEvents=new OpenLayers.Events(this,div,null,true,{includeXY:true});this.divEvents.on({"mousedown":this.divClick,"mousemove":this.passEventToSlider,"dblclick":this.doubleClick,"click":this.doubleClick});this.div.appendChild(div);this.startTop=parseInt(div.style.top);this.div.appendChild(slider);this.map.events.register("zoomend",this,this.moveZoomBar);centered=centered.add(0,this.zoomStopHeight*this.map.getNumZoomLevels());return centered;},_removeZoomBar:function(){this.sliderEvents.un({"mousedown":this.zoomBarDown,"mousemove":this.zoomBarDrag,"mouseup":this.zoomBarUp,"dblclick":this.doubleClick,"click":this.doubleClick});this.sliderEvents.destroy();this.divEvents.un({"mousedown":this.divClick,"mousemove":this.passEventToSlider,"dblclick":this.doubleClick,"click":this.doubleClick});this.divEvents.destroy();this.div.removeChild(this.zoombarDiv);this.zoombarDiv=null;this.div.removeChild(this.slider);this.slider=null;this.map.events.unregister("zoomend",this,this.moveZoomBar);},passEventToSlider:function(evt){this.sliderEvents.handleBrowserEvent(evt);},divClick:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;}
-var y=evt.xy.y;var top=OpenLayers.Util.pagePosition(evt.object)[1];var levels=(y-top)/this.zoomStopHeight;if(this.forceFixedZoomLevel||!this.map.fractionalZoom){levels=Math.floor(levels);}
-var zoom=(this.map.getNumZoomLevels()-1)-levels;zoom=Math.min(Math.max(zoom,0),this.map.getNumZoomLevels()-1);this.map.zoomTo(zoom);OpenLayers.Event.stop(evt);},zoomBarDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;}
-this.map.events.on({"mousemove":this.passEventToSlider,"mouseup":this.passEventToSlider,scope:this});this.mouseDragStart=evt.xy.clone();this.zoomStart=evt.xy.clone();this.div.style.cursor="move";this.zoombarDiv.offsets=null;OpenLayers.Event.stop(evt);},zoomBarDrag:function(evt){if(this.mouseDragStart!=null){var deltaY=this.mouseDragStart.y-evt.xy.y;var offsets=OpenLayers.Util.pagePosition(this.zoombarDiv);if((evt.clientY-offsets[1])>0&&(evt.clientY-offsets[1])<parseInt(this.zoombarDiv.style.height)-2){var newTop=parseInt(this.slider.style.top)-deltaY;this.slider.style.top=newTop+"px";this.mouseDragStart=evt.xy.clone();}
-OpenLayers.Event.stop(evt);}},zoomBarUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;}
-if(this.mouseDragStart){this.div.style.cursor="";this.map.events.un({"mouseup":this.passEventToSlider,"mousemove":this.passEventToSlider,scope:this});var deltaY=this.zoomStart.y-evt.xy.y;var zoomLevel=this.map.zoom;if(!this.forceFixedZoomLevel&&this.map.fractionalZoom){zoomLevel+=deltaY/this.zoomStopHeight;zoomLevel=Math.min(Math.max(zoomLevel,0),this.map.getNumZoomLevels()-1);}else{zoomLevel+=Math.round(deltaY/this.zoomStopHeight);}
-this.map.zoomTo(zoomLevel);this.mouseDragStart=null;this.zoomStart=null;OpenLayers.Event.stop(evt);}},moveZoomBar:function(){var newTop=((this.map.getNumZoomLevels()-1)-this.map.getZoom())*this.zoomStopHeight+this.startTop+1;this.slider.style.top=newTop+"px";},CLASS_NAME:"OpenLayers.Control.PanZoomBar"});OpenLayers.Control.Permalink=OpenLayers.Class(OpenLayers.Control,{argParserClass:OpenLayers.Control.ArgParser,element:null,base:'',displayProjection:null,initialize:function(element,base,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.element=OpenLayers.Util.getElement(element);this.base=base||document.location.href;},destroy:function(){if(this.element.parentNode==this.div){this.div.removeChild(this.element);}
-this.element=null;this.map.events.unregister('moveend',this,this.updateLink);OpenLayers.Control.prototype.destroy.apply(this,arguments);},setMap:function(map){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var i=0,len=this.map.controls.length;i<len;i++){var control=this.map.controls[i];if(control.CLASS_NAME==this.argParserClass.CLASS_NAME){if(control.displayProjection!=this.displayProjection){this.displayProjection=control.displayProjection;}
-break;}}
-if(i==this.map.controls.length){this.map.addControl(new this.argParserClass({'displayProjection':this.displayProjection}));}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.div.className=this.displayClass;this.element=document.createElement("a");this.element.innerHTML=OpenLayers.i18n("permalink");this.element.href="";this.div.appendChild(this.element);}
-this.map.events.on({'moveend':this.updateLink,'changelayer':this.updateLink,'changebaselayer':this.updateLink,scope:this});this.updateLink();return this.div;},updateLink:function(){var href=this.base;if(href.indexOf('?')!=-1){href=href.substring(0,href.indexOf('?'));}
-href+='?'+OpenLayers.Util.getParameterString(this.createParams());this.element.href=href;},createParams:function(center,zoom,layers){center=center||this.map.getCenter();var params=OpenLayers.Util.getParameters(this.base);if(center){params.zoom=zoom||this.map.getZoom();var lat=center.lat;var lon=center.lon;if(this.displayProjection){var mapPosition=OpenLayers.Projection.transform({x:lon,y:lat},this.map.getProjectionObject(),this.displayProjection);lon=mapPosition.x;lat=mapPosition.y;}
-params.lat=Math.round(lat*100000)/100000;params.lon=Math.round(lon*100000)/100000;layers=layers||this.map.layers;params.layers='';for(var i=0,len=layers.length;i<len;i++){var layer=layers[i];if(layer.isBaseLayer){params.layers+=(layer==this.map.baseLayer)?"B":"0";}else{params.layers+=(layer.getVisibility())?"T":"F";}}}
-return params;},CLASS_NAME:"OpenLayers.Control.Permalink"});OpenLayers.Control.ZoomPanel=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(options){OpenLayers.Control.Panel.prototype.initialize.apply(this,[options]);this.addControls([new OpenLayers.Control.ZoomIn(),new OpenLayers.Control.ZoomToMaxExtent(),new OpenLayers.Control.ZoomOut()]);},CLASS_NAME:"OpenLayers.Control.ZoomPanel"});OpenLayers.Format.CSWGetDomain=function(options){options=OpenLayers.Util.applyDefaults(options,OpenLayers.Format.CSWGetDomain.DEFAULTS);var cls=OpenLayers.Format.CSWGetDomain["v"+options.version.replace(/\./g,"_")];if(!cls){throw"Unsupported CSWGetDomain version: "+options.version;}
-return new cls(options);};OpenLayers.Format.CSWGetDomain.DEFAULTS={"version":"2.0.2"};OpenLayers.Format.CSWGetRecords=function(options){options=OpenLayers.Util.applyDefaults(options,OpenLayers.Format.CSWGetRecords.DEFAULTS);var cls=OpenLayers.Format.CSWGetRecords["v"+options.version.replace(/\./g,"_")];if(!cls){throw"Unsupported CSWGetRecords version: "+options.version;}
-return new cls(options);};OpenLayers.Format.CSWGetRecords.DEFAULTS={"version":"2.0.2"};OpenLayers.Format.JSON=OpenLayers.Class(OpenLayers.Format,{indent:"    ",space:" ",newline:"\n",level:0,pretty:false,initialize:function(options){OpenLayers.Format.prototype.initialize.apply(this,[options]);},read:function(json,filter){try{if(/^[\],:{}\s]*$/.test(json.replace(/\\["\\\/bfnrtu]/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){var object=eval('('+json+')');if(typeof filter==='function'){function walk(k,v){if(v&&typeof v==='object'){for(var i in v){if(v.hasOwnProperty(i)){v[i]=walk(i,v[i]);}}}
-return filter(k,v);}
-object=walk('',object);}
-if(this.keepData){this.data=object;}
-return object;}}catch(e){}
-return null;},write:function(value,pretty){this.pretty=!!pretty;var json=null;var type=typeof value;if(this.serialize[type]){try{json=this.serialize[type].apply(this,[value]);}catch(err){OpenLayers.Console.error("Trouble serializing: "+err);}}
-return json;},writeIndent:function(){var pieces=[];if(this.pretty){for(var i=0;i<this.level;++i){pieces.push(this.indent);}}
-return pieces.join('');},writeNewline:function(){return(this.pretty)?this.newline:'';},writeSpace:function(){return(this.pretty)?this.space:'';},serialize:{'object':function(object){if(object==null){return"null";}
-if(object.constructor==Date){return this.serialize.date.apply(this,[object]);}
-if(object.constructor==Array){return this.serialize.array.apply(this,[object]);}
-var pieces=['{'];this.level+=1;var key,keyJSON,valueJSON;var addComma=false;for(key in object){if(object.hasOwnProperty(key)){keyJSON=OpenLayers.Format.JSON.prototype.write.apply(this,[key,this.pretty]);valueJSON=OpenLayers.Format.JSON.prototype.write.apply(this,[object[key],this.pretty]);if(keyJSON!=null&&valueJSON!=null){if(addComma){pieces.push(',');}
-pieces.push(this.writeNewline(),this.writeIndent(),keyJSON,':',this.writeSpace(),valueJSON);addComma=true;}}}
-this.level-=1;pieces.push(this.writeNewline(),this.writeIndent(),'}');return pieces.join('');},'array':function(array){var json;var pieces=['['];this.level+=1;for(var i=0,len=array.length;i<len;++i){json=OpenLayers.Format.JSON.prototype.write.apply(this,[array[i],this.pretty]);if(json!=null){if(i>0){pieces.push(',');}
-pieces.push(this.writeNewline(),this.writeIndent(),json);}}
-this.level-=1;pieces.push(this.writeNewline(),this.writeIndent(),']');return pieces.join('');},'string':function(string){var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};if(/["\\\x00-\x1f]/.test(string)){return'"'+string.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;}
-c=b.charCodeAt();return'\\u00'+
-Math.floor(c/16).toString(16)+
-(c%16).toString(16);})+'"';}
-return'"'+string+'"';},'number':function(number){return isFinite(number)?String(number):"null";},'boolean':function(bool){return String(bool);},'date':function(date){function format(number){return(number<10)?'0'+number:number;}
-return'"'+date.getFullYear()+'-'+
-format(date.getMonth()+1)+'-'+
-format(date.getDate())+'T'+
-format(date.getHours())+':'+
-format(date.getMinutes())+':'+
-format(date.getSeconds())+'"';}},CLASS_NAME:"OpenLayers.Format.JSON"});OpenLayers.Format.WFST=function(options){options=OpenLayers.Util.applyDefaults(options,OpenLayers.Format.WFST.DEFAULTS);var cls=OpenLayers.Format.WFST["v"+options.version.replace(/\./g,"_")];if(!cls){throw"Unsupported WFST version: "+options.version;}
-return new cls(options);};OpenLayers.Format.WFST.DEFAULTS={"version":"1.0.0"};OpenLayers.Format.XML=OpenLayers.Class(OpenLayers.Format,{namespaces:null,namespaceAlias:null,defaultPrefix:null,readers:{},writers:{},xmldom:null,initialize:function(options){if(window.ActiveXObject){this.xmldom=new ActiveXObject("Microsoft.XMLDOM");}
-OpenLayers.Format.prototype.initialize.apply(this,[options]);this.namespaces=OpenLayers.Util.extend({},this.namespaces);this.namespaceAlias={};for(var alias in this.namespaces){this.namespaceAlias[this.namespaces[alias]]=alias;}},destroy:function(){this.xmldom=null;OpenLayers.Format.prototype.destroy.apply(this,arguments);},setNamespace:function(alias,uri){this.namespaces[alias]=uri;this.namespaceAlias[uri]=alias;},read:function(text){var index=text.indexOf('<');if(index>0){text=text.substring(index);}
-var node=OpenLayers.Util.Try(OpenLayers.Function.bind((function(){var xmldom;if(window.ActiveXObject&&!this.xmldom){xmldom=new ActiveXObject("Microsoft.XMLDOM");}else{xmldom=this.xmldom;}
-xmldom.loadXML(text);return xmldom;}),this),function(){return new DOMParser().parseFromString(text,'text/xml');},function(){var req=new XMLHttpRequest();req.open("GET","data:"+"text/xml"+";charset=utf-8,"+encodeURIComponent(text),false);if(req.overrideMimeType){req.overrideMimeType("text/xml");}
-req.send(null);return req.responseXML;});if(this.keepData){this.data=node;}
-return node;},write:function(node){var data;if(this.xmldom){data=node.xml;}else{var serializer=new XMLSerializer();if(node.nodeType==1){var doc=document.implementation.createDocument("","",null);if(doc.importNode){node=doc.importNode(node,true);}
-doc.appendChild(node);data=serializer.serializeToString(doc);}else{data=serializer.serializeToString(node);}}
-return data;},createElementNS:function(uri,name){var element;if(this.xmldom){if(typeof uri=="string"){element=this.xmldom.createNode(1,name,uri);}else{element=this.xmldom.createNode(1,name,"");}}else{element=document.createElementNS(uri,name);}
-return element;},createTextNode:function(text){var node;if(typeof text!=="string"){text=String(text);}
-if(this.xmldom){node=this.xmldom.createTextNode(text);}else{node=document.createTextNode(text);}
-return node;},getElementsByTagNameNS:function(node,uri,name){var elements=[];if(node.getElementsByTagNameNS){elements=node.getElementsByTagNameNS(uri,name);}else{var allNodes=node.getElementsByTagName("*");var potentialNode,fullName;for(var i=0,len=allNodes.length;i<len;++i){potentialNode=allNodes[i];fullName=(potentialNode.prefix)?(potentialNode.prefix+":"+name):name;if((name=="*")||(fullName==potentialNode.nodeName)){if((uri=="*")||(uri==potentialNode.namespaceURI)){elements.push(potentialNode);}}}}
-return elements;},getAttributeNodeNS:function(node,uri,name){var attributeNode=null;if(node.getAttributeNodeNS){attributeNode=node.getAttributeNodeNS(uri,name);}else{var attributes=node.attributes;var potentialNode,fullName;for(var i=0,len=attributes.length;i<len;++i){potentialNode=attributes[i];if(potentialNode.namespaceURI==uri){fullName=(potentialNode.prefix)?(potentialNode.prefix+":"+name):name;if(fullName==potentialNode.nodeName){attributeNode=potentialNode;break;}}}}
-return attributeNode;},getAttributeNS:function(node,uri,name){var attributeValue="";if(node.getAttributeNS){attributeValue=node.getAttributeNS(uri,name)||"";}else{var attributeNode=this.getAttributeNodeNS(node,uri,name);if(attributeNode){attributeValue=attributeNode.nodeValue;}}
-return attributeValue;},getChildValue:function(node,def){var value=def||"";if(node){for(var child=node.firstChild;child;child=child.nextSibling){switch(child.nodeType){case 3:case 4:value+=child.nodeValue;}}}
-return value;},concatChildValues:function(node,def){var value="";var child=node.firstChild;var childValue;while(child){childValue=child.nodeValue;if(childValue){value+=childValue;}
-child=child.nextSibling;}
-if(value==""&&def!=undefined){value=def;}
-return value;},isSimpleContent:function(node){var simple=true;for(var child=node.firstChild;child;child=child.nextSibling){if(child.nodeType===1){simple=false;break;}}
-return simple;},contentType:function(node){var simple=false,complex=false;var type=OpenLayers.Format.XML.CONTENT_TYPE.EMPTY;for(var child=node.firstChild;child;child=child.nextSibling){switch(child.nodeType){case 1:complex=true;break;case 8:break;default:simple=true;}
-if(complex&&simple){break;}}
-if(complex&&simple){type=OpenLayers.Format.XML.CONTENT_TYPE.MIXED;}else if(complex){return OpenLayers.Format.XML.CONTENT_TYPE.COMPLEX;}else if(simple){return OpenLayers.Format.XML.CONTENT_TYPE.SIMPLE;}
-return type;},hasAttributeNS:function(node,uri,name){var found=false;if(node.hasAttributeNS){found=node.hasAttributeNS(uri,name);}else{found=!!this.getAttributeNodeNS(node,uri,name);}
-return found;},setAttributeNS:function(node,uri,name,value){if(node.setAttributeNS){node.setAttributeNS(uri,name,value);}else{if(this.xmldom){if(uri){var attribute=node.ownerDocument.createNode(2,name,uri);attribute.nodeValue=value;node.setAttributeNode(attribute);}else{node.setAttribute(name,value);}}else{throw"setAttributeNS not implemented";}}},createElementNSPlus:function(name,options){options=options||{};var uri=options.uri||this.namespaces[options.prefix];if(!uri){var loc=name.indexOf(":");uri=this.namespaces[name.substring(0,loc)];}
-if(!uri){uri=this.namespaces[this.defaultPrefix];}
-var node=this.createElementNS(uri,name);if(options.attributes){this.setAttributes(node,options.attributes);}
-var value=options.value;if(value!=null){node.appendChild(this.createTextNode(value));}
-return node;},setAttributes:function(node,obj){var value,uri;for(var name in obj){if(obj[name]!=null&&obj[name].toString){value=obj[name].toString();uri=this.namespaces[name.substring(0,name.indexOf(":"))]||null;this.setAttributeNS(node,uri,name,value);}}},readNode:function(node,obj){if(!obj){obj={};}
-var group=this.readers[node.namespaceURI?this.namespaceAlias[node.namespaceURI]:this.defaultPrefix];if(group){var local=node.localName||node.nodeName.split(":").pop();var reader=group[local]||group["*"];if(reader){reader.apply(this,[node,obj]);}}
-return obj;},readChildNodes:function(node,obj){if(!obj){obj={};}
-var children=node.childNodes;var child;for(var i=0,len=children.length;i<len;++i){child=children[i];if(child.nodeType==1){this.readNode(child,obj);}}
-return obj;},writeNode:function(name,obj,parent){var prefix,local;var split=name.indexOf(":");if(split>0){prefix=name.substring(0,split);local=name.substring(split+1);}else{if(parent){prefix=this.namespaceAlias[parent.namespaceURI];}else{prefix=this.defaultPrefix;}
-local=name;}
-var child=this.writers[prefix][local].apply(this,[obj]);if(parent){parent.appendChild(child);}
-return child;},getChildEl:function(node,name,uri){return node&&this.getThisOrNextEl(node.firstChild,name,uri);},getNextEl:function(node,name,uri){return node&&this.getThisOrNextEl(node.nextSibling,name,uri);},getThisOrNextEl:function(node,name,uri){outer:for(var sibling=node;sibling;sibling=sibling.nextSibling){switch(sibling.nodeType){case 1:if((!name||name===(sibling.localName||sibling.nodeName.split(":").pop()))&&(!uri||uri===sibling.namespaceURI)){break outer;}
-sibling=null;break outer;case 3:if(/^\s*$/.test(sibling.nodeValue)){break;}
-case 4:case 6:case 12:case 10:case 11:sibling=null;break outer;}}
-return sibling||null;},lookupNamespaceURI:function(node,prefix){var uri=null;if(node){if(node.lookupNamespaceURI){uri=node.lookupNamespaceURI(prefix);}else{outer:switch(node.nodeType){case 1:if(node.namespaceURI!==null&&node.prefix===prefix){uri=node.namespaceURI;break outer;}
-var len=node.attributes.length;if(len){var attr;for(var i=0;i<len;++i){attr=node.attributes[i];if(attr.prefix==="xmlns"&&attr.name==="xmlns:"+prefix){uri=attr.value||null;break outer;}else if(attr.name==="xmlns"&&prefix===null){uri=attr.value||null;break outer;}}}
-uri=this.lookupNamespaceURI(node.parentNode,prefix);break outer;case 2:uri=this.lookupNamespaceURI(node.ownerElement,prefix);break outer;case 9:uri=this.lookupNamespaceURI(node.documentElement,prefix);break outer;case 6:case 12:case 10:case 11:break outer;default:uri=this.lookupNamespaceURI(node.parentNode,prefix);break outer;}}}
-return uri;},CLASS_NAME:"OpenLayers.Format.XML"});OpenLayers.Format.XML.CONTENT_TYPE={EMPTY:0,SIMPLE:1,COMPLEX:2,MIXED:3};OpenLayers.Format.XML.lookupNamespaceURI=OpenLayers.Function.bind(OpenLayers.Format.XML.prototype.lookupNamespaceURI,OpenLayers.Format.XML.prototype);OpenLayers.Handler=OpenLayers.Class({id:null,control:null,map:null,keyMask:null,active:false,evt:null,initialize:function(control,callbacks,options){OpenLayers.Util.extend(this,options);this.control=control;this.callbacks=callbacks;var map=this.map||control.map;if(map){this.setMap(map);}
-this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},setMap:function(map){this.map=map;},checkModifiers:function(evt){if(this.keyMask==null){return true;}
-var keyModifiers=(evt.shiftKey?OpenLayers.Handler.MOD_SHIFT:0)|(evt.ctrlKey?OpenLayers.Handler.MOD_CTRL:0)|(evt.altKey?OpenLayers.Handler.MOD_ALT:0);return(keyModifiers==this.keyMask);},activate:function(){if(this.active){return false;}
-var events=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var i=0,len=events.length;i<len;i++){if(this[events[i]]){this.register(events[i],this[events[i]]);}}
-this.active=true;return true;},deactivate:function(){if(!this.active){return false;}
-var events=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var i=0,len=events.length;i<len;i++){if(this[events[i]]){this.unregister(events[i],this[events[i]]);}}
-this.active=false;return true;},callback:function(name,args){if(name&&this.callbacks[name]){this.callbacks[name].apply(this.control,args);}},register:function(name,method){this.map.events.registerPriority(name,this,method);this.map.events.registerPriority(name,this,this.setEvent);},unregister:function(name,method){this.map.events.unregister(name,this,method);this.map.events.unregister(name,this,this.setEvent);},setEvent:function(evt){this.evt=evt;return true;},destroy:function(){this.deactivate();this.control=this.map=null;},CLASS_NAME:"OpenLayers.Handler"});OpenLayers.Handler.MOD_NONE=0;OpenLayers.Handler.MOD_SHIFT=1;OpenLayers.Handler.MOD_CTRL=2;OpenLayers.Handler.MOD_ALT=4;OpenLayers.Map=OpenLayers.Class({Z_INDEX_BASE:{BaseLayer:100,Overlay:325,Feature:725,Popup:750,Control:1000},EVENT_TYPES:["preaddlayer","addlayer","removelayer","changelayer","movestart","move","moveend","zoomend","popupopen","popupclose","addmarker","removemarker","clearmarkers","mouseover","mouseout","mousemove","dragstart","drag","dragend","changebaselayer"],id:null,fractionalZoom:false,events:null,allOverlays:false,div:null,dragging:false,size:null,viewPortDiv:null,layerContainerOrigin:null,layerContainerDiv:null,layers:null,controls:null,popups:null,baseLayer:null,center:null,resolution:null,zoom:0,panRatio:1.5,viewRequestID:0,tileSize:null,projection:"EPSG:4326",units:'degrees',resolutions:null,maxResolution:1.40625,minResolution:null,maxScale:null,minScale:null,maxExtent:null,minExtent:null,restrictedExtent:null,numZoomLevels:16,theme:null,displayProjection:null,fallThrough:true,panTween:null,eventListeners:null,panMethod:OpenLayers.Easing.Expo.easeOut,panDuration:50,paddingForPopups:null,initialize:function(div,options){if(arguments.length===1&&typeof div==="object"){options=div;div=options&&options.div;}
-this.tileSize=new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,OpenLayers.Map.TILE_HEIGHT);this.maxExtent=new OpenLayers.Bounds(-180,-90,180,90);this.paddingForPopups=new OpenLayers.Bounds(15,15,15,15);this.theme=OpenLayers._getScriptLocation()+'theme/default/style.css';OpenLayers.Util.extend(this,options);this.layers=[];this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=OpenLayers.Util.getElement(div);if(!this.div){this.div=document.createElement("div");this.div.style.height="1px";this.div.style.width="1px";}
-OpenLayers.Element.addClass(this.div,'olMap');var id=this.id+"_OpenLayers_ViewPort";this.viewPortDiv=OpenLayers.Util.createDiv(id,null,null,null,"relative",null,"hidden");this.viewPortDiv.style.width="100%";this.viewPortDiv.style.height="100%";this.viewPortDiv.className="olMapViewport";this.div.appendChild(this.viewPortDiv);id=this.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(id);this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE['Popup']-1;this.viewPortDiv.appendChild(this.layerContainerDiv);this.events=new OpenLayers.Events(this,this.div,this.EVENT_TYPES,this.fallThrough,{includeXY:true});this.updateSize();if(this.eventListeners instanceof Object){this.events.on(this.eventListeners);}
-this.events.register("movestart",this,this.updateSize);if(OpenLayers.String.contains(navigator.appName,"Microsoft")){this.events.register("resize",this,this.updateSize);}else{this.updateSizeDestroy=OpenLayers.Function.bind(this.updateSize,this);OpenLayers.Event.observe(window,'resize',this.updateSizeDestroy);}
-if(this.theme){var addNode=true;var nodes=document.getElementsByTagName('link');for(var i=0,len=nodes.length;i<len;++i){if(OpenLayers.Util.isEquivalentUrl(nodes.item(i).href,this.theme)){addNode=false;break;}}
-if(addNode){var cssNode=document.createElement('link');cssNode.setAttribute('rel','stylesheet');cssNode.setAttribute('type','text/css');cssNode.setAttribute('href',this.theme);document.getElementsByTagName('head')[0].appendChild(cssNode);}}
-if(this.controls==null){if(OpenLayers.Control!=null){this.controls=[new OpenLayers.Control.Navigation(),new OpenLayers.Control.PanZoom(),new OpenLayers.Control.ArgParser(),new OpenLayers.Control.Attribution()];}else{this.controls=[];}}
-for(var i=0,len=this.controls.length;i<len;i++){this.addControlToMap(this.controls[i]);}
-this.popups=[];this.unloadDestroy=OpenLayers.Function.bind(this.destroy,this);OpenLayers.Event.observe(window,'unload',this.unloadDestroy);if(options&&options.layers){this.addLayers(options.layers);if(options.center){this.setCenter(options.center,options.zoom);}}},render:function(div){this.div=OpenLayers.Util.getElement(div);OpenLayers.Element.addClass(this.div,'olMap');this.events.attachToElement(this.div);this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);this.div.appendChild(this.viewPortDiv);this.updateSize();},unloadDestroy:null,updateSizeDestroy:null,destroy:function(){if(!this.unloadDestroy){return false;}
-if(this.panTween){this.panTween.stop();this.panTween=null;}
-OpenLayers.Event.stopObserving(window,'unload',this.unloadDestroy);this.unloadDestroy=null;if(this.updateSizeDestroy){OpenLayers.Event.stopObserving(window,'resize',this.updateSizeDestroy);}else{this.events.unregister("resize",this,this.updateSize);}
-this.paddingForPopups=null;if(this.controls!=null){for(var i=this.controls.length-1;i>=0;--i){this.controls[i].destroy();}
-this.controls=null;}
-if(this.layers!=null){for(var i=this.layers.length-1;i>=0;--i){this.layers[i].destroy(false);}
-this.layers=null;}
-if(this.viewPortDiv){this.div.removeChild(this.viewPortDiv);}
-this.viewPortDiv=null;if(this.eventListeners){this.events.un(this.eventListeners);this.eventListeners=null;}
-this.events.destroy();this.events=null;},setOptions:function(options){OpenLayers.Util.extend(this,options);},getTileSize:function(){return this.tileSize;},getBy:function(array,property,match){var test=(typeof match.test=="function");var found=OpenLayers.Array.filter(this[array],function(item){return item[property]==match||(test&&match.test(item[property]));});return found;},getLayersBy:function(property,match){return this.getBy("layers",property,match);},getLayersByName:function(match){return this.getLayersBy("name",match);},getLayersByClass:function(match){return this.getLayersBy("CLASS_NAME",match);},getControlsBy:function(property,match){return this.getBy("controls",property,match);},getControlsByClass:function(match){return this.getControlsBy("CLASS_NAME",match);},getLayer:function(id){var foundLayer=null;for(var i=0,len=this.layers.length;i<len;i++){var layer=this.layers[i];if(layer.id==id){foundLayer=layer;break;}}
-return foundLayer;},setLayerZIndex:function(layer,zIdx){layer.setZIndex(this.Z_INDEX_BASE[layer.isBaseLayer?'BaseLayer':'Overlay']
-+zIdx*5);},resetLayersZIndex:function(){for(var i=0,len=this.layers.length;i<len;i++){var layer=this.layers[i];this.setLayerZIndex(layer,i);}},addLayer:function(layer){for(var i=0,len=this.layers.length;i<len;i++){if(this.layers[i]==layer){var msg=OpenLayers.i18n('layerAlreadyAdded',{'layerName':layer.name});OpenLayers.Console.warn(msg);return false;}}
-if(this.allOverlays){layer.isBaseLayer=false;}
-if(this.events.triggerEvent("preaddlayer",{layer:layer})===false){return;}
-layer.div.className="olLayerDiv";layer.div.style.overflow="";this.setLayerZIndex(layer,this.layers.length);if(layer.isFixed){this.viewPortDiv.appendChild(layer.div);}else{this.layerContainerDiv.appendChild(layer.div);}
-this.layers.push(layer);layer.setMap(this);if(layer.isBaseLayer||(this.allOverlays&&!this.baseLayer)){if(this.baseLayer==null){this.setBaseLayer(layer);}else{layer.setVisibility(false);}}else{layer.redraw();}
-this.events.triggerEvent("addlayer",{layer:layer});layer.afterAdd();},addLayers:function(layers){for(var i=0,len=layers.length;i<len;i++){this.addLayer(layers[i]);}},removeLayer:function(layer,setNewBaseLayer){if(setNewBaseLayer==null){setNewBaseLayer=true;}
-if(layer.isFixed){this.viewPortDiv.removeChild(layer.div);}else{this.layerContainerDiv.removeChild(layer.div);}
-OpenLayers.Util.removeItem(this.layers,layer);layer.removeMap(this);layer.map=null;if(this.baseLayer==layer){this.baseLayer=null;if(setNewBaseLayer){for(var i=0,len=this.layers.length;i<len;i++){var iLayer=this.layers[i];if(iLayer.isBaseLayer||this.allOverlays){this.setBaseLayer(iLayer);break;}}}}
-this.resetLayersZIndex();this.events.triggerEvent("removelayer",{layer:layer});},getNumLayers:function(){return this.layers.length;},getLayerIndex:function(layer){return OpenLayers.Util.indexOf(this.layers,layer);},setLayerIndex:function(layer,idx){var base=this.getLayerIndex(layer);if(idx<0){idx=0;}else if(idx>this.layers.length){idx=this.layers.length;}
-if(base!=idx){this.layers.splice(base,1);this.layers.splice(idx,0,layer);for(var i=0,len=this.layers.length;i<len;i++){this.setLayerZIndex(this.layers[i],i);}
-this.events.triggerEvent("changelayer",{layer:layer,property:"order"});if(this.allOverlays){if(idx===0){this.setBaseLayer(layer);}else if(this.baseLayer!==this.layers[0]){this.setBaseLayer(this.layers[0]);}}}},raiseLayer:function(layer,delta){var idx=this.getLayerIndex(layer)+delta;this.setLayerIndex(layer,idx);},setBaseLayer:function(newBaseLayer){if(newBaseLayer!=this.baseLayer){if(OpenLayers.Util.indexOf(this.layers,newBaseLayer)!=-1){var center=this.getCenter();var newResolution=OpenLayers.Util.getResolutionFromScale(this.getScale(),newBaseLayer.units);if(this.baseLayer!=null&&!this.allOverlays){this.baseLayer.setVisibility(false);}
-this.baseLayer=newBaseLayer;this.viewRequestID++;if(!this.allOverlays||this.baseLayer.visibility){this.baseLayer.setVisibility(true);}
-if(center!=null){var newZoom=this.getZoomForResolution(newResolution||this.resolution,true);this.setCenter(center,newZoom,false,true);}
-this.events.triggerEvent("changebaselayer",{layer:this.baseLayer});}}},addControl:function(control,px){this.controls.push(control);this.addControlToMap(control,px);},addControls:function(controls,pixels){var pxs=(arguments.length===1)?[]:pixels;for(var i=0,len=controls.length;i<len;i++){var ctrl=controls[i];var px=(pxs[i])?pxs[i]:null;this.addControl(ctrl,px);}},addControlToMap:function(control,px){control.outsideViewport=(control.div!=null);if(this.displayProjection&&!control.displayProjection){control.displayProjection=this.displayProjection;}
-control.setMap(this);var div=control.draw(px);if(div){if(!control.outsideViewport){div.style.zIndex=this.Z_INDEX_BASE['Control']+
-this.controls.length;this.viewPortDiv.appendChild(div);}}
-if(control.autoActivate){control.activate();}},getControl:function(id){var returnControl=null;for(var i=0,len=this.controls.length;i<len;i++){var control=this.controls[i];if(control.id==id){returnControl=control;break;}}
-return returnControl;},removeControl:function(control){if((control)&&(control==this.getControl(control.id))){if(control.div&&(control.div.parentNode==this.viewPortDiv)){this.viewPortDiv.removeChild(control.div);}
-OpenLayers.Util.removeItem(this.controls,control);}},addPopup:function(popup,exclusive){if(exclusive){for(var i=this.popups.length-1;i>=0;--i){this.removePopup(this.popups[i]);}}
-popup.map=this;this.popups.push(popup);var popupDiv=popup.draw();if(popupDiv){popupDiv.style.zIndex=this.Z_INDEX_BASE['Popup']+
-this.popups.length;this.layerContainerDiv.appendChild(popupDiv);}},removePopup:function(popup){OpenLayers.Util.removeItem(this.popups,popup);if(popup.div){try{this.layerContainerDiv.removeChild(popup.div);}
-catch(e){}}
-popup.map=null;},getSize:function(){var size=null;if(this.size!=null){size=this.size.clone();}
-return size;},updateSize:function(){var newSize=this.getCurrentSize();if(newSize&&!isNaN(newSize.h)&&!isNaN(newSize.w)){this.events.clearMouseCache();var oldSize=this.getSize();if(oldSize==null){this.size=oldSize=newSize;}
-if(!newSize.equals(oldSize)){this.size=newSize;for(var i=0,len=this.layers.length;i<len;i++){this.layers[i].onMapResize();}
-var center=this.getCenter();if(this.baseLayer!=null&&center!=null){var zoom=this.getZoom();this.zoom=null;this.setCenter(center,zoom);}}}},getCurrentSize:function(){var size=new OpenLayers.Size(this.div.clientWidth,this.div.clientHeight);if(size.w==0&&size.h==0||isNaN(size.w)&&isNaN(size.h)){size.w=this.div.offsetWidth;size.h=this.div.offsetHeight;}
-if(size.w==0&&size.h==0||isNaN(size.w)&&isNaN(size.h)){size.w=parseInt(this.div.style.width);size.h=parseInt(this.div.style.height);}
-return size;},calculateBounds:function(center,resolution){var extent=null;if(center==null){center=this.getCenter();}
-if(resolution==null){resolution=this.getResolution();}
-if((center!=null)&&(resolution!=null)){var size=this.getSize();var w_deg=size.w*resolution;var h_deg=size.h*resolution;extent=new OpenLayers.Bounds(center.lon-w_deg/2,center.lat-h_deg/2,center.lon+w_deg/2,center.lat+h_deg/2);}
-return extent;},getCenter:function(){var center=null;if(this.center){center=this.center.clone();}
-return center;},getZoom:function(){return this.zoom;},pan:function(dx,dy,options){options=OpenLayers.Util.applyDefaults(options,{animate:true,dragging:false});var centerPx=this.getViewPortPxFromLonLat(this.getCenter());var newCenterPx=centerPx.add(dx,dy);if(!options.dragging||!newCenterPx.equals(centerPx)){var newCenterLonLat=this.getLonLatFromViewPortPx(newCenterPx);if(options.animate){this.panTo(newCenterLonLat);}else{this.setCenter(newCenterLonLat,null,options.dragging);}}},panTo:function(lonlat){if(this.panMethod&&this.getExtent().scale(this.panRatio).containsLonLat(lonlat)){if(!this.panTween){this.panTween=new OpenLayers.Tween(this.panMethod);}
-var center=this.getCenter();if(lonlat.lon==center.lon&&lonlat.lat==center.lat){return;}
-var from={lon:center.lon,lat:center.lat};var to={lon:lonlat.lon,lat:lonlat.lat};this.panTween.start(from,to,this.panDuration,{callbacks:{start:OpenLayers.Function.bind(function(lonlat){this.events.triggerEvent("movestart");},this),eachStep:OpenLayers.Function.bind(function(lonlat){lonlat=new OpenLayers.LonLat(lonlat.lon,lonlat.lat);this.moveTo(lonlat,this.zoom,{'dragging':true,'noEvent':true});},this),done:OpenLayers.Function.bind(function(lonlat){lonlat=new OpenLayers.LonLat(lonlat.lon,lonlat.lat);this.moveTo(lonlat,this.zoom,{'noEvent':true});this.events.triggerEvent("moveend");},this)}});}else{this.setCenter(lonlat);}},setCenter:function(lonlat,zoom,dragging,forceZoomChange){this.moveTo(lonlat,zoom,{'dragging':dragging,'forceZoomChange':forceZoomChange,'caller':'setCenter'});},moveTo:function(lonlat,zoom,options){if(!options){options={};}
-if(zoom!=null){zoom=parseFloat(zoom);if(!this.fractionalZoom){zoom=Math.round(zoom);}}
-var dragging=options.dragging;var forceZoomChange=options.forceZoomChange;var noEvent=options.noEvent;if(this.panTween&&options.caller=="setCenter"){this.panTween.stop();}
-if(!this.center&&!this.isValidLonLat(lonlat)){lonlat=this.maxExtent.getCenterLonLat();}
-if(this.restrictedExtent!=null){if(lonlat==null){lonlat=this.getCenter();}
-if(zoom==null){zoom=this.getZoom();}
-var resolution=this.getResolutionForZoom(zoom);var extent=this.calculateBounds(lonlat,resolution);if(!this.restrictedExtent.containsBounds(extent)){var maxCenter=this.restrictedExtent.getCenterLonLat();if(extent.getWidth()>this.restrictedExtent.getWidth()){lonlat=new OpenLayers.LonLat(maxCenter.lon,lonlat.lat);}else if(extent.left<this.restrictedExtent.left){lonlat=lonlat.add(this.restrictedExtent.left-
-extent.left,0);}else if(extent.right>this.restrictedExtent.right){lonlat=lonlat.add(this.restrictedExtent.right-
-extent.right,0);}
-if(extent.getHeight()>this.restrictedExtent.getHeight()){lonlat=new OpenLayers.LonLat(lonlat.lon,maxCenter.lat);}else if(extent.bottom<this.restrictedExtent.bottom){lonlat=lonlat.add(0,this.restrictedExtent.bottom-
-extent.bottom);}
-else if(extent.top>this.restrictedExtent.top){lonlat=lonlat.add(0,this.restrictedExtent.top-
-extent.top);}}}
-var zoomChanged=forceZoomChange||((this.isValidZoomLevel(zoom))&&(zoom!=this.getZoom()));var centerChanged=(this.isValidLonLat(lonlat))&&(!lonlat.equals(this.center));if(zoomChanged||centerChanged||!dragging){if(!this.dragging&&!noEvent){this.events.triggerEvent("movestart");}
-if(centerChanged){if((!zoomChanged)&&(this.center)){this.centerLayerContainer(lonlat);}
-this.center=lonlat.clone();}
-if((zoomChanged)||(this.layerContainerOrigin==null)){this.layerContainerOrigin=this.center.clone();this.layerContainerDiv.style.left="0px";this.layerContainerDiv.style.top="0px";}
-if(zoomChanged){this.zoom=zoom;this.resolution=this.getResolutionForZoom(zoom);this.viewRequestID++;}
-var bounds=this.getExtent();if(this.baseLayer.visibility){this.baseLayer.moveTo(bounds,zoomChanged,dragging);if(dragging){this.baseLayer.events.triggerEvent("move");}else{this.baseLayer.events.triggerEvent("moveend",{"zoomChanged":zoomChanged});}}
-bounds=this.baseLayer.getExtent();for(var i=0,len=this.layers.length;i<len;i++){var layer=this.layers[i];if(layer!==this.baseLayer&&!layer.isBaseLayer){var inRange=layer.calculateInRange();if(layer.inRange!=inRange){layer.inRange=inRange;if(!inRange){layer.display(false);}
-this.events.triggerEvent("changelayer",{layer:layer,property:"visibility"});}
-if(inRange&&layer.visibility){layer.moveTo(bounds,zoomChanged,dragging);if(dragging){layer.events.triggerEvent("move");}else{layer.events.triggerEvent("moveend",{"zoomChanged":zoomChanged});}}}}
-if(zoomChanged){for(var i=0,len=this.popups.length;i<len;i++){this.popups[i].updatePosition();}}
-this.events.triggerEvent("move");if(zoomChanged){this.events.triggerEvent("zoomend");}}
-if(!dragging&&!noEvent){this.events.triggerEvent("moveend");}
-this.dragging=!!dragging;},centerLayerContainer:function(lonlat){var originPx=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var newPx=this.getViewPortPxFromLonLat(lonlat);if((originPx!=null)&&(newPx!=null)){this.layerContainerDiv.style.left=Math.round(originPx.x-newPx.x)+"px";this.layerContainerDiv.style.top=Math.round(originPx.y-newPx.y)+"px";}},isValidZoomLevel:function(zoomLevel){return((zoomLevel!=null)&&(zoomLevel>=0)&&(zoomLevel<this.getNumZoomLevels()));},isValidLonLat:function(lonlat){var valid=false;if(lonlat!=null){var maxExtent=this.getMaxExtent();valid=maxExtent.containsLonLat(lonlat);}
-return valid;},getProjection:function(){var projection=this.getProjectionObject();return projection?projection.getCode():null;},getProjectionObject:function(){var projection=null;if(this.baseLayer!=null){projection=this.baseLayer.projection;}
-return projection;},getMaxResolution:function(){var maxResolution=null;if(this.baseLayer!=null){maxResolution=this.baseLayer.maxResolution;}
-return maxResolution;},getMaxExtent:function(options){var maxExtent=null;if(options&&options.restricted&&this.restrictedExtent){maxExtent=this.restrictedExtent;}else if(this.baseLayer!=null){maxExtent=this.baseLayer.maxExtent;}
-return maxExtent;},getNumZoomLevels:function(){var numZoomLevels=null;if(this.baseLayer!=null){numZoomLevels=this.baseLayer.numZoomLevels;}
-return numZoomLevels;},getExtent:function(){var extent=null;if(this.baseLayer!=null){extent=this.baseLayer.getExtent();}
-return extent;},getResolution:function(){var resolution=null;if(this.baseLayer!=null){resolution=this.baseLayer.getResolution();}else if(this.allOverlays===true&&this.layers.length>0){resolution=this.layers[0].getResolution();}
-return resolution;},getUnits:function(){var units=null;if(this.baseLayer!=null){units=this.baseLayer.units;}
-return units;},getScale:function(){var scale=null;if(this.baseLayer!=null){var res=this.getResolution();var units=this.baseLayer.units;scale=OpenLayers.Util.getScaleFromResolution(res,units);}
-return scale;},getZoomForExtent:function(bounds,closest){var zoom=null;if(this.baseLayer!=null){zoom=this.baseLayer.getZoomForExtent(bounds,closest);}
-return zoom;},getResolutionForZoom:function(zoom){var resolution=null;if(this.baseLayer){resolution=this.baseLayer.getResolutionForZoom(zoom);}
-return resolution;},getZoomForResolution:function(resolution,closest){var zoom=null;if(this.baseLayer!=null){zoom=this.baseLayer.getZoomForResolution(resolution,closest);}
-return zoom;},zoomTo:function(zoom){if(this.isValidZoomLevel(zoom)){this.setCenter(null,zoom);}},zoomIn:function(){this.zoomTo(this.getZoom()+1);},zoomOut:function(){this.zoomTo(this.getZoom()-1);},zoomToExtent:function(bounds,closest){var center=bounds.getCenterLonLat();if(this.baseLayer.wrapDateLine){var maxExtent=this.getMaxExtent();bounds=bounds.clone();while(bounds.right<bounds.left){bounds.right+=maxExtent.getWidth();}
-center=bounds.getCenterLonLat().wrapDateLine(maxExtent);}
-this.setCenter(center,this.getZoomForExtent(bounds,closest));},zoomToMaxExtent:function(options){var restricted=(options)?options.restricted:true;var maxExtent=this.getMaxExtent({'restricted':restricted});this.zoomToExtent(maxExtent);},zoomToScale:function(scale,closest){var res=OpenLayers.Util.getResolutionFromScale(scale,this.baseLayer.units);var size=this.getSize();var w_deg=size.w*res;var h_deg=size.h*res;var center=this.getCenter();var extent=new OpenLayers.Bounds(center.lon-w_deg/2,center.lat-h_deg/2,center.lon+w_deg/2,center.lat+h_deg/2);this.zoomToExtent(extent,closest);},getLonLatFromViewPortPx:function(viewPortPx){var lonlat=null;if(this.baseLayer!=null){lonlat=this.baseLayer.getLonLatFromViewPortPx(viewPortPx);}
-return lonlat;},getViewPortPxFromLonLat:function(lonlat){var px=null;if(this.baseLayer!=null){px=this.baseLayer.getViewPortPxFromLonLat(lonlat);}
-return px;},getLonLatFromPixel:function(px){return this.getLonLatFromViewPortPx(px);},getPixelFromLonLat:function(lonlat){var px=this.getViewPortPxFromLonLat(lonlat);px.x=Math.round(px.x);px.y=Math.round(px.y);return px;},getGeodesicPixelSize:function(px){var lonlat=px?this.getLonLatFromPixel(px):(this.getCenter()||new OpenLayers.LonLat(0,0));var res=this.getResolution();var left=lonlat.add(-res/2,0);var right=lonlat.add(res/2,0);var bottom=lonlat.add(0,-res/2);var top=lonlat.add(0,res/2);var dest=new OpenLayers.Projection("EPSG:4326");var source=this.getProjectionObject()||dest;if(!source.equals(dest)){left.transform(source,dest);right.transform(source,dest);bottom.transform(source,dest);top.transform(source,dest);}
-return new OpenLayers.Size(OpenLayers.Util.distVincenty(left,right),OpenLayers.Util.distVincenty(bottom,top));},getViewPortPxFromLayerPx:function(layerPx){var viewPortPx=null;if(layerPx!=null){var dX=parseInt(this.layerContainerDiv.style.left);var dY=parseInt(this.layerContainerDiv.style.top);viewPortPx=layerPx.add(dX,dY);}
-return viewPortPx;},getLayerPxFromViewPortPx:function(viewPortPx){var layerPx=null;if(viewPortPx!=null){var dX=-parseInt(this.layerContainerDiv.style.left);var dY=-parseInt(this.layerContainerDiv.style.top);layerPx=viewPortPx.add(dX,dY);if(isNaN(layerPx.x)||isNaN(layerPx.y)){layerPx=null;}}
-return layerPx;},getLonLatFromLayerPx:function(px){px=this.getViewPortPxFromLayerPx(px);return this.getLonLatFromViewPortPx(px);},getLayerPxFromLonLat:function(lonlat){var px=this.getPixelFromLonLat(lonlat);return this.getLayerPxFromViewPortPx(px);},CLASS_NAME:"OpenLayers.Map"});OpenLayers.Map.TILE_WIDTH=256;OpenLayers.Map.TILE_HEIGHT=256;OpenLayers.Marker=OpenLayers.Class({icon:null,lonlat:null,events:null,map:null,initialize:function(lonlat,icon){this.lonlat=lonlat;var newIcon=(icon)?icon:OpenLayers.Marker.defaultIcon();if(this.icon==null){this.icon=newIcon;}else{this.icon.url=newIcon.url;this.icon.size=newIcon.size;this.icon.offset=newIcon.offset;this.icon.calculateOffset=newIcon.calculateOffset;}
-this.events=new OpenLayers.Events(this,this.icon.imageDiv,null);},destroy:function(){this.erase();this.map=null;this.events.destroy();this.events=null;if(this.icon!=null){this.icon.destroy();this.icon=null;}},draw:function(px){return this.icon.draw(px);},erase:function(){if(this.icon!=null){this.icon.erase();}},moveTo:function(px){if((px!=null)&&(this.icon!=null)){this.icon.moveTo(px);}
-this.lonlat=this.map.getLonLatFromLayerPx(px);},isDrawn:function(){var isDrawn=(this.icon&&this.icon.isDrawn());return isDrawn;},onScreen:function(){var onScreen=false;if(this.map){var screenBounds=this.map.getExtent();onScreen=screenBounds.containsLonLat(this.lonlat);}
-return onScreen;},inflate:function(inflate){if(this.icon){var newSize=new OpenLayers.Size(this.icon.size.w*inflate,this.icon.size.h*inflate);this.icon.setSize(newSize);}},setOpacity:function(opacity){this.icon.setOpacity(opacity);},setUrl:function(url){this.icon.setUrl(url);},display:function(display){this.icon.display(display);},CLASS_NAME:"OpenLayers.Marker"});OpenLayers.Marker.defaultIcon=function(){var url=OpenLayers.Util.getImagesLocation()+"marker.png";var size=new OpenLayers.Size(21,25);var calculateOffset=function(size){return new OpenLayers.Pixel(-(size.w/2),-size.h);};return new OpenLayers.Icon(url,size,null,calculateOffset);};OpenLayers.Popup.FramedCloud=OpenLayers.Class(OpenLayers.Popup.Framed,{contentDisplayClass:"olFramedCloudPopupContent",autoSize:true,panMapIfOutOfView:true,imageSize:new OpenLayers.Size(1276,736),isAlphaImage:false,fixedRelativePosition:false,positionBlocks:{"tl":{'offset':new OpenLayers.Pixel(44,0),'padding':new OpenLayers.Bounds(8,40,8,9),'blocks':[{size:new OpenLayers.Size('auto','auto'),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,'auto'),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-1238,0)},{size:new OpenLayers.Size('auto',19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,18),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-1238,-632)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(0,-688)}]},"tr":{'offset':new OpenLayers.Pixel(-45,0),'padding':new OpenLayers.Bounds(8,40,8,9),'blocks':[{size:new OpenLayers.Size('auto','auto'),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,'auto'),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-1238,0)},{size:new OpenLayers.Size('auto',19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,19),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-1238,-631)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(0,0,null,null),position:new OpenLayers.Pixel(-215,-687)}]},"bl":{'offset':new OpenLayers.Pixel(45,0),'padding':new OpenLayers.Bounds(8,9,8,40),'blocks':[{size:new OpenLayers.Size('auto','auto'),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,'auto'),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-1238,0)},{size:new OpenLayers.Size('auto',21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-1238,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(null,null,0,0),position:new OpenLayers.Pixel(-101,-674)}]},"br":{'offset':new OpenLayers.Pixel(-44,0),'padding':new OpenLayers.Bounds(8,9,8,40),'blocks':[{size:new OpenLayers.Size('auto','auto'),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,'auto'),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-1238,0)},{size:new OpenLayers.Size('auto',21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-1238,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(0,null,null,0),position:new OpenLayers.Pixel(-311,-674)}]}},minSize:new OpenLayers.Size(105,10),maxSize:new OpenLayers.Size(1200,660),initialize:function(id,lonlat,contentSize,contentHTML,anchor,closeBox,closeBoxCallback){this.imageSrc=OpenLayers.Util.getImagesLocation()+'cloud-popup-relative.png';OpenLayers.Popup.Framed.prototype.initialize.apply(this,arguments);this.contentDiv.className=this.contentDisplayClass;},destroy:function(){OpenLayers.Popup.Framed.prototype.destroy.apply(this,arguments);},CLASS_NAME:"OpenLayers.Popup.FramedCloud"});OpenLayers.Request={DEFAULT_CONFIG:{method:"GET",url:window.location.href,async:true,user:undefined,password:undefined,params:null,proxy:OpenLayers.ProxyHost,headers:{},data:null,callback:function(){},success:null,failure:null,scope:null},events:new OpenLayers.Events(this,null,["complete","success","failure"]),issue:function(config){var defaultConfig=OpenLayers.Util.extend(this.DEFAULT_CONFIG,{proxy:OpenLayers.ProxyHost});config=OpenLayers.Util.applyDefaults(config,defaultConfig);var request=new OpenLayers.Request.XMLHttpRequest();var url=config.url;if(config.params){var paramString=OpenLayers.Util.getParameterString(config.params);if(paramString.length>0){var separator=(url.indexOf('?')>-1)?'&':'?';url+=separator+paramString;}}
-if(config.proxy&&(url.indexOf("http")==0)){if(typeof config.proxy=="function"){url=config.proxy(url);}else{url=config.proxy+encodeURIComponent(url);}}
-request.open(config.method,url,config.async,config.user,config.password);for(var header in config.headers){request.setRequestHeader(header,config.headers[header]);}
-var events=this.events;var self=this;request.onreadystatechange=function(){if(request.readyState==OpenLayers.Request.XMLHttpRequest.DONE){var proceed=events.triggerEvent("complete",{request:request,config:config,requestUrl:url});if(proceed!==false){self.runCallbacks({request:request,config:config,requestUrl:url});}}};if(config.async===false){request.send(config.data);}else{window.setTimeout(function(){if(request._aborted!==true){request.send(config.data);}},0);}
-return request;},runCallbacks:function(options){var request=options.request;var config=options.config;var complete=(config.scope)?OpenLayers.Function.bind(config.callback,config.scope):config.callback;var success;if(config.success){success=(config.scope)?OpenLayers.Function.bind(config.success,config.scope):config.success;}
-var failure;if(config.failure){failure=(config.scope)?OpenLayers.Function.bind(config.failure,config.scope):config.failure;}
-complete(request);if(!request.status||(request.status>=200&&request.status<300)){this.events.triggerEvent("success",options);if(success){success(request);}}
-if(request.status&&(request.status<200||request.status>=300)){this.events.triggerEvent("failure",options);if(failure){failure(request);}}},GET:function(config){config=OpenLayers.Util.extend(config,{method:"GET"});return OpenLayers.Request.issue(config);},POST:function(config){config=OpenLayers.Util.extend(config,{method:"POST"});config.headers=config.headers?config.headers:{};if(!("CONTENT-TYPE"in OpenLayers.Util.upperCaseObject(config.headers))){config.headers["Content-Type"]="application/xml";}
-return OpenLayers.Request.issue(config);},PUT:function(config){config=OpenLayers.Util.extend(config,{method:"PUT"});config.headers=config.headers?config.headers:{};if(!("CONTENT-TYPE"in OpenLayers.Util.upperCaseObject(config.headers))){config.headers["Content-Type"]="application/xml";}
-return OpenLayers.Request.issue(config);},DELETE:function(config){config=OpenLayers.Util.extend(config,{method:"DELETE"});return OpenLayers.Request.issue(config);},HEAD:function(config){config=OpenLayers.Util.extend(config,{method:"HEAD"});return OpenLayers.Request.issue(config);},OPTIONS:function(config){config=OpenLayers.Util.extend(config,{method:"OPTIONS"});return OpenLayers.Request.issue(config);}};OpenLayers.Tile.Image=OpenLayers.Class(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,layerAlphaHack:null,isBackBuffer:false,lastRatio:1,isFirstDraw:true,backBufferTile:null,initialize:function(layer,position,bounds,url,size){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=url;this.frame=document.createElement('div');this.frame.style.overflow='hidden';this.frame.style.position='absolute';this.layerAlphaHack=this.layer.alpha&&OpenLayers.Util.alphaHack();},destroy:function(){if(this.imgDiv!=null){if(this.layerAlphaHack){OpenLayers.Event.stopObservingElement(this.imgDiv.childNodes[0]);}
-OpenLayers.Event.stopObservingElement(this.imgDiv);if(this.imgDiv.parentNode==this.frame){this.frame.removeChild(this.imgDiv);this.imgDiv.map=null;}
-this.imgDiv.urls=null;this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif";}
-this.imgDiv=null;if((this.frame!=null)&&(this.frame.parentNode==this.layer.div)){this.layer.div.removeChild(this.frame);}
-this.frame=null;if(this.backBufferTile){this.backBufferTile.destroy();this.backBufferTile=null;}
-this.layer.events.unregister("loadend",this,this.resetBackBuffer);OpenLayers.Tile.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Tile.Image(this.layer,this.position,this.bounds,this.url,this.size);}
-obj=OpenLayers.Tile.prototype.clone.apply(this,[obj]);obj.imgDiv=null;return obj;},draw:function(){if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject){this.bounds=this.getBoundsFromBaseLayer(this.position);}
-var drawTile=OpenLayers.Tile.prototype.draw.apply(this,arguments);if((OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1)||this.layer.singleTile){if(drawTile){if(!this.backBufferTile){this.backBufferTile=this.clone();this.backBufferTile.hide();this.backBufferTile.isBackBuffer=true;this.events.register('loadend',this,this.resetBackBuffer);this.layer.events.register("loadend",this,this.resetBackBuffer);}
-this.startTransition();}else{if(this.backBufferTile){this.backBufferTile.clear();}}}else{if(drawTile&&this.isFirstDraw){this.events.register('loadend',this,this.showTile);this.isFirstDraw=false;}}
-if(!drawTile){return false;}
-if(this.isLoading){this.events.triggerEvent("reload");}else{this.isLoading=true;this.events.triggerEvent("loadstart");}
-return this.renderTile();},resetBackBuffer:function(){this.showTile();if(this.backBufferTile&&(this.isFirstDraw||!this.layer.numLoadingTiles)){this.isFirstDraw=false;var maxExtent=this.layer.maxExtent;var withinMaxExtent=(maxExtent&&this.bounds.intersectsBounds(maxExtent,false));if(withinMaxExtent){this.backBufferTile.position=this.position;this.backBufferTile.bounds=this.bounds;this.backBufferTile.size=this.size;this.backBufferTile.imageSize=this.layer.getImageSize(this.bounds)||this.size;this.backBufferTile.imageOffset=this.layer.imageOffset;this.backBufferTile.resolution=this.layer.getResolution();this.backBufferTile.renderTile();}
-this.backBufferTile.hide();}},renderTile:function(){if(this.imgDiv==null){this.initImgDiv();}
-this.imgDiv.viewRequestID=this.layer.map.viewRequestID;if(this.layer.async){this.layer.getURLasync(this.bounds,this,"url",this.positionImage);}else{if(this.layer.url instanceof Array){this.imgDiv.urls=this.layer.url.slice();}
-this.url=this.layer.getURL(this.bounds);this.positionImage();}
-return true;},positionImage:function(){if(this.layer===null){return;}
-OpenLayers.Util.modifyDOMElement(this.frame,null,this.position,this.size);var imageSize=this.layer.getImageSize(this.bounds);if(this.layerAlphaHack){OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,null,null,imageSize,this.url);}else{OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,imageSize);this.imgDiv.src=this.url;}},clear:function(){if(this.imgDiv){this.hide();if(OpenLayers.Tile.Image.useBlankTile){this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif";}}},initImgDiv:function(){var offset=this.layer.imageOffset;var size=this.layer.getImageSize(this.bounds);if(this.layerAlphaHack){this.imgDiv=OpenLayers.Util.createAlphaImageDiv(null,offset,size,null,"relative",null,null,null,true);}else{this.imgDiv=OpenLayers.Util.createImage(null,offset,size,null,"relative",null,null,true);}
-this.imgDiv.className='olTileImage';this.frame.style.zIndex=this.isBackBuffer?0:1;this.frame.appendChild(this.imgDiv);this.layer.div.appendChild(this.frame);if(this.layer.opacity!=null){OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,null,null,null,null,this.layer.opacity);}
-this.imgDiv.map=this.layer.map;var onload=function(){if(this.isLoading){this.isLoading=false;this.events.triggerEvent("loadend");}};if(this.layerAlphaHack){OpenLayers.Event.observe(this.imgDiv.childNodes[0],'load',OpenLayers.Function.bind(onload,this));}else{OpenLayers.Event.observe(this.imgDiv,'load',OpenLayers.Function.bind(onload,this));}
-var onerror=function(){if(this.imgDiv._attempts>OpenLayers.IMAGE_RELOAD_ATTEMPTS){onload.call(this);}};OpenLayers.Event.observe(this.imgDiv,"error",OpenLayers.Function.bind(onerror,this));},checkImgURL:function(){if(this.layer){var loaded=this.layerAlphaHack?this.imgDiv.firstChild.src:this.imgDiv.src;if(!OpenLayers.Util.isEquivalentUrl(loaded,this.url)){this.hide();}}},startTransition:function(){if(!this.backBufferTile||!this.backBufferTile.imgDiv){return;}
-var ratio=1;if(this.backBufferTile.resolution){ratio=this.backBufferTile.resolution/this.layer.getResolution();}
-if(ratio!=this.lastRatio){if(this.layer.transitionEffect=='resize'){var upperLeft=new OpenLayers.LonLat(this.backBufferTile.bounds.left,this.backBufferTile.bounds.top);var size=new OpenLayers.Size(this.backBufferTile.size.w*ratio,this.backBufferTile.size.h*ratio);var px=this.layer.map.getLayerPxFromLonLat(upperLeft);OpenLayers.Util.modifyDOMElement(this.backBufferTile.frame,null,px,size);var imageSize=this.backBufferTile.imageSize;imageSize=new OpenLayers.Size(imageSize.w*ratio,imageSize.h*ratio);var imageOffset=this.backBufferTile.imageOffset;if(imageOffset){imageOffset=new OpenLayers.Pixel(imageOffset.x*ratio,imageOffset.y*ratio);}
-OpenLayers.Util.modifyDOMElement(this.backBufferTile.imgDiv,null,imageOffset,imageSize);this.backBufferTile.show();}}else{if(this.layer.singleTile){this.backBufferTile.show();}else{this.backBufferTile.hide();}}
-this.lastRatio=ratio;},show:function(){this.frame.style.display='';if(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1){if(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1){this.frame.scrollLeft=this.frame.scrollLeft;}}},hide:function(){this.frame.style.display='none';},CLASS_NAME:"OpenLayers.Tile.Image"});OpenLayers.Tile.Image.useBlankTile=(OpenLayers.Util.getBrowserName()=="safari"||OpenLayers.Util.getBrowserName()=="opera");OpenLayers.Control.OverviewMap=OpenLayers.Class(OpenLayers.Control,{element:null,ovmap:null,size:new OpenLayers.Size(180,90),layers:null,minRectSize:15,minRectDisplayClass:"RectReplacement",minRatio:8,maxRatio:32,mapOptions:null,autoPan:false,handlers:null,resolutionFactor:1,maximized:false,initialize:function(options){this.layers=[];this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,[options]);},destroy:function(){if(!this.mapDiv){return;}
-if(this.handlers.click){this.handlers.click.destroy();}
-if(this.handlers.drag){this.handlers.drag.destroy();}
-this.mapDiv.removeChild(this.extentRectangle);this.extentRectangle=null;if(this.rectEvents){this.rectEvents.destroy();this.rectEvents=null;}
-if(this.ovmap){this.ovmap.destroy();this.ovmap=null;}
-this.element.removeChild(this.mapDiv);this.mapDiv=null;this.div.removeChild(this.element);this.element=null;if(this.maximizeDiv){OpenLayers.Event.stopObservingElement(this.maximizeDiv);this.div.removeChild(this.maximizeDiv);this.maximizeDiv=null;}
-if(this.minimizeDiv){OpenLayers.Event.stopObservingElement(this.minimizeDiv);this.div.removeChild(this.minimizeDiv);this.minimizeDiv=null;}
-this.map.events.un({"moveend":this.update,"changebaselayer":this.baseLayerDraw,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!(this.layers.length>0)){if(this.map.baseLayer){var layer=this.map.baseLayer.clone();this.layers=[layer];}else{this.map.events.register("changebaselayer",this,this.baseLayerDraw);return this.div;}}
-this.element=document.createElement('div');this.element.className=this.displayClass+'Element';this.element.style.display='none';this.mapDiv=document.createElement('div');this.mapDiv.style.width=this.size.w+'px';this.mapDiv.style.height=this.size.h+'px';this.mapDiv.style.position='relative';this.mapDiv.style.overflow='hidden';this.mapDiv.id=OpenLayers.Util.createUniqueID('overviewMap');this.extentRectangle=document.createElement('div');this.extentRectangle.style.position='absolute';this.extentRectangle.style.zIndex=1000;this.extentRectangle.className=this.displayClass+'ExtentRectangle';this.mapDiv.appendChild(this.extentRectangle);this.element.appendChild(this.mapDiv);this.div.appendChild(this.element);if(!this.outsideViewport){this.div.className+=" "+this.displayClass+'Container';var imgLocation=OpenLayers.Util.getImagesLocation();var img=imgLocation+'layer-switcher-maximize.png';this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv(this.displayClass+'MaximizeButton',null,new OpenLayers.Size(18,18),img,'absolute');this.maximizeDiv.style.display='none';this.maximizeDiv.className=this.displayClass+'MaximizeButton';OpenLayers.Event.observe(this.maximizeDiv,'click',OpenLayers.Function.bindAsEventListener(this.maximizeControl,this));this.div.appendChild(this.maximizeDiv);var img=imgLocation+'layer-switcher-minimize.png';this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv('OpenLayers_Control_minimizeDiv',null,new OpenLayers.Size(18,18),img,'absolute');this.minimizeDiv.style.display='none';this.minimizeDiv.className=this.displayClass+'MinimizeButton';OpenLayers.Event.observe(this.minimizeDiv,'click',OpenLayers.Function.bindAsEventListener(this.minimizeControl,this));this.div.appendChild(this.minimizeDiv);var eventsToStop=['dblclick','mousedown'];for(var i=0,len=eventsToStop.length;i<len;i++){OpenLayers.Event.observe(this.maximizeDiv,eventsToStop[i],OpenLayers.Event.stop);OpenLayers.Event.observe(this.minimizeDiv,eventsToStop[i],OpenLayers.Event.stop);}
-this.minimizeControl();}else{this.element.style.display='';}
-if(this.map.getExtent()){this.update();}
-this.map.events.register('moveend',this,this.update);if(this.maximized){this.maximizeControl();}
-return this.div;},baseLayerDraw:function(){this.draw();this.map.events.unregister("changebaselayer",this,this.baseLayerDraw);},rectDrag:function(px){var deltaX=this.handlers.drag.last.x-px.x;var deltaY=this.handlers.drag.last.y-px.y;if(deltaX!=0||deltaY!=0){var rectTop=this.rectPxBounds.top;var rectLeft=this.rectPxBounds.left;var rectHeight=Math.abs(this.rectPxBounds.getHeight());var rectWidth=this.rectPxBounds.getWidth();var newTop=Math.max(0,(rectTop-deltaY));newTop=Math.min(newTop,this.ovmap.size.h-this.hComp-rectHeight);var newLeft=Math.max(0,(rectLeft-deltaX));newLeft=Math.min(newLeft,this.ovmap.size.w-this.wComp-rectWidth);this.setRectPxBounds(new OpenLayers.Bounds(newLeft,newTop+rectHeight,newLeft+rectWidth,newTop));}},mapDivClick:function(evt){var pxCenter=this.rectPxBounds.getCenterPixel();var deltaX=evt.xy.x-pxCenter.x;var deltaY=evt.xy.y-pxCenter.y;var top=this.rectPxBounds.top;var left=this.rectPxBounds.left;var height=Math.abs(this.rectPxBounds.getHeight());var width=this.rectPxBounds.getWidth();var newTop=Math.max(0,(top+deltaY));newTop=Math.min(newTop,this.ovmap.size.h-height);var newLeft=Math.max(0,(left+deltaX));newLeft=Math.min(newLeft,this.ovmap.size.w-width);this.setRectPxBounds(new OpenLayers.Bounds(newLeft,newTop+height,newLeft+width,newTop));this.updateMapToRect();},maximizeControl:function(e){this.element.style.display='';this.showToggle(false);if(e!=null){OpenLayers.Event.stop(e);}},minimizeControl:function(e){this.element.style.display='none';this.showToggle(true);if(e!=null){OpenLayers.Event.stop(e);}},showToggle:function(minimize){this.maximizeDiv.style.display=minimize?'':'none';this.minimizeDiv.style.display=minimize?'none':'';},update:function(){if(this.ovmap==null){this.createMap();}
-if(this.autoPan||!this.isSuitableOverview()){this.updateOverview();}
-this.updateRectToMap();},isSuitableOverview:function(){var mapExtent=this.map.getExtent();var maxExtent=this.map.maxExtent;var testExtent=new OpenLayers.Bounds(Math.max(mapExtent.left,maxExtent.left),Math.max(mapExtent.bottom,maxExtent.bottom),Math.min(mapExtent.right,maxExtent.right),Math.min(mapExtent.top,maxExtent.top));if(this.ovmap.getProjection()!=this.map.getProjection()){testExtent=testExtent.transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject());}
-var resRatio=this.ovmap.getResolution()/this.map.getResolution();return((resRatio>this.minRatio)&&(resRatio<=this.maxRatio)&&(this.ovmap.getExtent().containsBounds(testExtent)));},updateOverview:function(){var mapRes=this.map.getResolution();var targetRes=this.ovmap.getResolution();var resRatio=targetRes/mapRes;if(resRatio>this.maxRatio){targetRes=this.minRatio*mapRes;}else if(resRatio<=this.minRatio){targetRes=this.maxRatio*mapRes;}
-var center;if(this.ovmap.getProjection()!=this.map.getProjection()){center=this.map.center.clone();center.transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject());}else{center=this.map.center;}
-this.ovmap.setCenter(center,this.ovmap.getZoomForResolution(targetRes*this.resolutionFactor));this.updateRectToMap();},createMap:function(){var options=OpenLayers.Util.extend({controls:[],maxResolution:'auto',fallThrough:false},this.mapOptions);this.ovmap=new OpenLayers.Map(this.mapDiv,options);OpenLayers.Event.stopObserving(window,'unload',this.ovmap.unloadDestroy);this.ovmap.addLayers(this.layers);this.ovmap.zoomToMaxExtent();this.wComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-left-width'))+
-parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-right-width'));this.wComp=(this.wComp)?this.wComp:2;this.hComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-top-width'))+
-parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-bottom-width'));this.hComp=(this.hComp)?this.hComp:2;this.handlers.drag=new OpenLayers.Handler.Drag(this,{move:this.rectDrag,done:this.updateMapToRect},{map:this.ovmap});this.handlers.click=new OpenLayers.Handler.Click(this,{"click":this.mapDivClick},{"single":true,"double":false,"stopSingle":true,"stopDouble":true,"pixelTolerance":1,map:this.ovmap});this.handlers.click.activate();this.rectEvents=new OpenLayers.Events(this,this.extentRectangle,null,true);this.rectEvents.register("mouseover",this,function(e){if(!this.handlers.drag.active&&!this.map.dragging){this.handlers.drag.activate();}});this.rectEvents.register("mouseout",this,function(e){if(!this.handlers.drag.dragging){this.handlers.drag.deactivate();}});if(this.ovmap.getProjection()!=this.map.getProjection()){var sourceUnits=this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units;var targetUnits=this.ovmap.getProjectionObject().getUnits()||this.ovmap.units||this.ovmap.baseLayer.units;this.resolutionFactor=sourceUnits&&targetUnits?OpenLayers.INCHES_PER_UNIT[sourceUnits]/OpenLayers.INCHES_PER_UNIT[targetUnits]:1;}},updateRectToMap:function(){var bounds;if(this.ovmap.getProjection()!=this.map.getProjection()){bounds=this.map.getExtent().transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject());}else{bounds=this.map.getExtent();}
-var pxBounds=this.getRectBoundsFromMapBounds(bounds);if(pxBounds){this.setRectPxBounds(pxBounds);}},updateMapToRect:function(){var lonLatBounds=this.getMapBoundsFromRectBounds(this.rectPxBounds);if(this.ovmap.getProjection()!=this.map.getProjection()){lonLatBounds=lonLatBounds.transform(this.ovmap.getProjectionObject(),this.map.getProjectionObject());}
-this.map.panTo(lonLatBounds.getCenterLonLat());},setRectPxBounds:function(pxBounds){var top=Math.max(pxBounds.top,0);var left=Math.max(pxBounds.left,0);var bottom=Math.min(pxBounds.top+Math.abs(pxBounds.getHeight()),this.ovmap.size.h-this.hComp);var right=Math.min(pxBounds.left+pxBounds.getWidth(),this.ovmap.size.w-this.wComp);var width=Math.max(right-left,0);var height=Math.max(bottom-top,0);if(width<this.minRectSize||height<this.minRectSize){this.extentRectangle.className=this.displayClass+
-this.minRectDisplayClass;var rLeft=left+(width/2)-(this.minRectSize/2);var rTop=top+(height/2)-(this.minRectSize/2);this.extentRectangle.style.top=Math.round(rTop)+'px';this.extentRectangle.style.left=Math.round(rLeft)+'px';this.extentRectangle.style.height=this.minRectSize+'px';this.extentRectangle.style.width=this.minRectSize+'px';}else{this.extentRectangle.className=this.displayClass+'ExtentRectangle';this.extentRectangle.style.top=Math.round(top)+'px';this.extentRectangle.style.left=Math.round(left)+'px';this.extentRectangle.style.height=Math.round(height)+'px';this.extentRectangle.style.width=Math.round(width)+'px';}
-this.rectPxBounds=new OpenLayers.Bounds(Math.round(left),Math.round(bottom),Math.round(right),Math.round(top));},getRectBoundsFromMapBounds:function(lonLatBounds){var leftBottomLonLat=new OpenLayers.LonLat(lonLatBounds.left,lonLatBounds.bottom);var rightTopLonLat=new OpenLayers.LonLat(lonLatBounds.right,lonLatBounds.top);var leftBottomPx=this.getOverviewPxFromLonLat(leftBottomLonLat);var rightTopPx=this.getOverviewPxFromLonLat(rightTopLonLat);var bounds=null;if(leftBottomPx&&rightTopPx){bounds=new OpenLayers.Bounds(leftBottomPx.x,leftBottomPx.y,rightTopPx.x,rightTopPx.y);}
-return bounds;},getMapBoundsFromRectBounds:function(pxBounds){var leftBottomPx=new OpenLayers.Pixel(pxBounds.left,pxBounds.bottom);var rightTopPx=new OpenLayers.Pixel(pxBounds.right,pxBounds.top);var leftBottomLonLat=this.getLonLatFromOverviewPx(leftBottomPx);var rightTopLonLat=this.getLonLatFromOverviewPx(rightTopPx);return new OpenLayers.Bounds(leftBottomLonLat.lon,leftBottomLonLat.lat,rightTopLonLat.lon,rightTopLonLat.lat);},getLonLatFromOverviewPx:function(overviewMapPx){var size=this.ovmap.size;var res=this.ovmap.getResolution();var center=this.ovmap.getExtent().getCenterLonLat();var delta_x=overviewMapPx.x-(size.w/2);var delta_y=overviewMapPx.y-(size.h/2);return new OpenLayers.LonLat(center.lon+delta_x*res,center.lat-delta_y*res);},getOverviewPxFromLonLat:function(lonlat){var res=this.ovmap.getResolution();var extent=this.ovmap.getExtent();var px=null;if(extent){px=new OpenLayers.Pixel(Math.round(1/res*(lonlat.lon-extent.left)),Math.round(1/res*(extent.top-lonlat.lat)));}
-return px;},CLASS_NAME:'OpenLayers.Control.OverviewMap'});OpenLayers.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:OpenLayers.Popup.AnchoredBubble,popup:null,initialize:function(layer,lonlat,data){this.layer=layer;this.lonlat=lonlat;this.data=(data!=null)?data:{};this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){if((this.layer!=null)&&(this.layer.map!=null)){if(this.popup!=null){this.layer.map.removePopup(this.popup);}}
-if(this.layer!=null&&this.marker!=null){this.layer.removeMarker(this.marker);}
-this.layer=null;this.id=null;this.lonlat=null;this.data=null;if(this.marker!=null){this.destroyMarker(this.marker);this.marker=null;}
-if(this.popup!=null){this.destroyPopup(this.popup);this.popup=null;}},onScreen:function(){var onScreen=false;if((this.layer!=null)&&(this.layer.map!=null)){var screenBounds=this.layer.map.getExtent();onScreen=screenBounds.containsLonLat(this.lonlat);}
-return onScreen;},createMarker:function(){if(this.lonlat!=null){this.marker=new OpenLayers.Marker(this.lonlat,this.data.icon);}
-return this.marker;},destroyMarker:function(){this.marker.destroy();},createPopup:function(closeBox){if(this.lonlat!=null){var id=this.id+"_popup";var anchor=(this.marker)?this.marker.icon:null;if(!this.popup){this.popup=new this.popupClass(id,this.lonlat,this.data.popupSize,this.data.popupContentHTML,anchor,closeBox);}
-if(this.data.overflow!=null){this.popup.contentDiv.style.overflow=this.data.overflow;}
-this.popup.feature=this;}
-return this.popup;},destroyPopup:function(){if(this.popup){this.popup.feature=null;this.popup.destroy();this.popup=null;}},CLASS_NAME:"OpenLayers.Feature"});OpenLayers.Format.CSWGetDomain.v2_0_2=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",csw:"http://www.opengis.net/cat/csw/2.0.2"},defaultPrefix:"csw",version:"2.0.2",schemaLocation:"http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd",PropertyName:null,ParameterName:null,initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-if(data&&data.nodeType==9){data=data.documentElement;}
-var obj={};this.readNode(data,obj);return obj;},readers:{"csw":{"GetDomainResponse":function(node,obj){this.readChildNodes(node,obj);},"DomainValues":function(node,obj){if(!(obj.DomainValues instanceof Array)){obj.DomainValues=[];}
-var attrs=node.attributes;var domainValue={};for(var i=0,len=attrs.length;i<len;++i){domainValue[attrs[i].name]=attrs[i].nodeValue;}
-this.readChildNodes(node,domainValue);obj.DomainValues.push(domainValue);},"PropertyName":function(node,obj){obj.PropertyName=this.getChildValue(node);},"ParameterName":function(node,obj){obj.ParameterName=this.getChildValue(node);},"ListOfValues":function(node,obj){if(!(obj.ListOfValues instanceof Array)){obj.ListOfValues=[];}
-this.readChildNodes(node,obj.ListOfValues);},"Value":function(node,obj){var attrs=node.attributes;var value={}
-for(var i=0,len=attrs.length;i<len;++i){value[attrs[i].name]=attrs[i].nodeValue;}
-value.value=this.getChildValue(node);obj.push({Value:value});},"ConceptualScheme":function(node,obj){obj.ConceptualScheme={};this.readChildNodes(node,obj.ConceptualScheme);},"Name":function(node,obj){obj.Name=this.getChildValue(node);},"Document":function(node,obj){obj.Document=this.getChildValue(node);},"Authority":function(node,obj){obj.Authority=this.getChildValue(node);},"RangeOfValues":function(node,obj){obj.RangeOfValues={};this.readChildNodes(node,obj.RangeOfValues);},"MinValue":function(node,obj){var attrs=node.attributes;var value={}
-for(var i=0,len=attrs.length;i<len;++i){value[attrs[i].name]=attrs[i].nodeValue;}
-value.value=this.getChildValue(node);obj.MinValue=value;},"MaxValue":function(node,obj){var attrs=node.attributes;var value={}
-for(var i=0,len=attrs.length;i<len;++i){value[attrs[i].name]=attrs[i].nodeValue;}
-value.value=this.getChildValue(node);obj.MaxValue=value;}}},write:function(options){var node=this.writeNode("csw:GetDomain",options);return OpenLayers.Format.XML.prototype.write.apply(this,[node]);},writers:{"csw":{"GetDomain":function(options){var node=this.createElementNSPlus("csw:GetDomain",{attributes:{service:"CSW",version:this.version}});if(options.PropertyName||this.PropertyName){this.writeNode("csw:PropertyName",options.PropertyName||this.PropertyName,node);}else if(options.ParameterName||this.ParameterName){this.writeNode("csw:ParameterName",options.ParameterName||this.ParameterName,node);}
-this.readChildNodes(node,options);return node;},"PropertyName":function(value){var node=this.createElementNSPlus("csw:PropertyName",{value:value});return node;},"ParameterName":function(value){var node=this.createElementNSPlus("csw:ParameterName",{value:value});return node;}}},CLASS_NAME:"OpenLayers.Format.CSWGetDomain.v2_0_2"});OpenLayers.Format.Context=OpenLayers.Class({version:null,layerOptions:null,layerParams:null,parser:null,initialize:function(options){OpenLayers.Util.extend(this,options);this.options=options;},read:function(data,options){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-var root=data.documentElement;var version=this.version;if(!version){version=root.getAttribute("version");}
-var parser=this.getParser(version);var context=parser.read(data,options);var map;if(options&&options.map){this.context=context;if(options.map instanceof OpenLayers.Map){map=this.mergeContextToMap(context,options.map);}else{var mapOptions=options.map;if(OpenLayers.Util.isElement(mapOptions)||typeof mapOptions=="string"){mapOptions={div:mapOptions};}
-map=this.contextToMap(context,mapOptions);}}else{map=context;}
-return map;},getLayerFromContext:function(layerContext){var i,len;var options={queryable:layerContext.queryable,visibility:layerContext.visibility,maxExtent:layerContext.maxExtent,metadata:OpenLayers.Util.applyDefaults(layerContext.metadata,{styles:layerContext.styles}),numZoomLevels:layerContext.numZoomLevels,units:layerContext.units,isBaseLayer:layerContext.isBaseLayer,opacity:layerContext.opacity,displayInLayerSwitcher:layerContext.displayInLayerSwitcher,singleTile:layerContext.singleTile,tileSize:(layerContext.tileSize)?new OpenLayers.Size(layerContext.tileSize.width,layerContext.tileSize.height):undefined,minScale:layerContext.minScale||layerContext.maxScaleDenominator,maxScale:layerContext.maxScale||layerContext.minScaleDenominator};if(this.layerOptions){OpenLayers.Util.applyDefaults(options,this.layerOptions);}
-var params={layers:layerContext.name,transparent:layerContext.transparent,version:layerContext.version};if(layerContext.formats&&layerContext.formats.length>0){params.format=layerContext.formats[0].value;for(i=0,len=layerContext.formats.length;i<len;i++){var format=layerContext.formats[i];if(format.current==true){params.format=format.value;break;}}}
-if(layerContext.styles&&layerContext.styles.length>0){for(i=0,len=layerContext.styles.length;i<len;i++){var style=layerContext.styles[i];if(style.current==true){if(style.href){params.sld=style.href;}else if(style.body){params.sld_body=style.body;}else{params.styles=style.name;}
-break;}}}
-if(this.layerParams){OpenLayers.Util.applyDefaults(params,this.layerParams);}
-var layer=null;var service=layerContext.service;if(service==OpenLayers.Format.Context.serviceTypes.WFS){options.strategies=[new OpenLayers.Strategy.BBOX()];options.protocol=new OpenLayers.Protocol.WFS({url:layerContext.url,featurePrefix:layerContext.name.split(":")[0],featureType:layerContext.name.split(":").pop()});layer=new OpenLayers.Layer.Vector(layerContext.title||layerContext.name,options);}else if(service==OpenLayers.Format.Context.serviceTypes.KML){options.strategies=[new OpenLayers.Strategy.Fixed()];options.protocol=new OpenLayers.Protocol.HTTP({url:layerContext.url,format:new OpenLayers.Format.KML()});layer=new OpenLayers.Layer.Vector(layerContext.title||layerContext.name,options);}else if(service==OpenLayers.Format.Context.serviceTypes.GML){options.strategies=[new OpenLayers.Strategy.Fixed()];options.protocol=new OpenLayers.Protocol.HTTP({url:layerContext.url,format:new OpenLayers.Format.GML()});layer=new OpenLayers.Layer.Vector(layerContext.title||layerContext.name,options);}else if(layerContext.features){layer=new OpenLayers.Layer.Vector(layerContext.title||layerContext.name,options);layer.addFeatures(layerContext.features);}else if(layerContext.categoryLayer!==true){layer=new OpenLayers.Layer.WMS(layerContext.title||layerContext.name,layerContext.url,params,options);}
-return layer;},getLayersFromContext:function(layersContext){var layers=[];for(var i=0,len=layersContext.length;i<len;i++){var layer=this.getLayerFromContext(layersContext[i]);if(layer!==null){layers.push(layer);}}
-return layers;},contextToMap:function(context,options){options=OpenLayers.Util.applyDefaults({maxExtent:context.maxExtent,projection:context.projection},options);var map=new OpenLayers.Map(options);map.addLayers(this.getLayersFromContext(context.layersContext));map.setCenter(context.bounds.getCenterLonLat(),map.getZoomForExtent(context.bounds,true));return map;},mergeContextToMap:function(context,map){map.addLayers(this.getLayersFromContext(context.layersContext));return map;},write:function(obj,options){obj=this.toContext(obj);var version=options&&options.version;var parser=this.getParser(version);var context=parser.write(obj,options);return context;},CLASS_NAME:"OpenLayers.Format.Context"});OpenLayers.Format.Context.serviceTypes={"WMS":"urn:ogc:serviceType:WMS","WFS":"urn:ogc:serviceType:WFS","WCS":"urn:ogc:serviceType:WCS","GML":"urn:ogc:serviceType:GML","SLD":"urn:ogc:serviceType:SLD","FES":"urn:ogc:serviceType:FES","KML":"urn:ogc:serviceType:KML"};if(!OpenLayers.Format.OWSCommon){OpenLayers.Format.OWSCommon={};}
-OpenLayers.Format.OWSCommon.v1=OpenLayers.Class(OpenLayers.Format.XML,{regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},readers:{"ows":{"ServiceIdentification":function(node,obj){obj.serviceIdentification={};this.readChildNodes(node,obj.serviceIdentification);},"Title":function(node,obj){obj.title=this.getChildValue(node);},"Abstract":function(node,serviceIdentification){serviceIdentification["abstract"]=this.getChildValue(node);},"Keywords":function(node,serviceIdentification){serviceIdentification.keywords={};this.readChildNodes(node,serviceIdentification.keywords);},"Keyword":function(node,keywords){keywords[this.getChildValue(node)]=true;},"ServiceType":function(node,serviceIdentification){serviceIdentification.serviceType={codeSpace:node.getAttribute('codeSpace'),value:this.getChildValue(node)};},"ServiceTypeVersion":function(node,serviceIdentification){serviceIdentification.serviceTypeVersion=this.getChildValue(node);},"Fees":function(node,serviceIdentification){serviceIdentification.fees=this.getChildValue(node);},"AccessConstraints":function(node,serviceIdentification){serviceIdentification.accessConstraints=this.getChildValue(node);},"ServiceProvider":function(node,obj){obj.serviceProvider={};this.readChildNodes(node,obj.serviceProvider);},"ProviderName":function(node,serviceProvider){serviceProvider.providerName=this.getChildValue(node);},"ProviderSite":function(node,serviceProvider){serviceProvider.providerSite=this.getAttributeNS(node,this.namespaces.xlink,"href");},"ServiceContact":function(node,serviceProvider){serviceProvider.serviceContact={};this.readChildNodes(node,serviceProvider.serviceContact);},"IndividualName":function(node,serviceContact){serviceContact.individualName=this.getChildValue(node);},"PositionName":function(node,serviceContact){serviceContact.positionName=this.getChildValue(node);},"ContactInfo":function(node,serviceContact){serviceContact.contactInfo={};this.readChildNodes(node,serviceContact.contactInfo);},"Phone":function(node,contactInfo){contactInfo.phone={};this.readChildNodes(node,contactInfo.phone);},"Voice":function(node,phone){phone.voice=this.getChildValue(node);},"Address":function(node,contactInfo){contactInfo.address={};this.readChildNodes(node,contactInfo.address);},"DeliveryPoint":function(node,address){address.deliveryPoint=this.getChildValue(node);},"City":function(node,address){address.city=this.getChildValue(node);},"AdministrativeArea":function(node,address){address.administrativeArea=this.getChildValue(node);},"PostalCode":function(node,address){address.postalCode=this.getChildValue(node);},"Country":function(node,address){address.country=this.getChildValue(node);},"ElectronicMailAddress":function(node,address){address.electronicMailAddress=this.getChildValue(node);},"Role":function(node,serviceContact){serviceContact.role=this.getChildValue(node);},"OperationsMetadata":function(node,obj){obj.operationsMetadata={};this.readChildNodes(node,obj.operationsMetadata);},"Operation":function(node,operationsMetadata){var name=node.getAttribute("name");operationsMetadata[name]={};this.readChildNodes(node,operationsMetadata[name]);},"DCP":function(node,operation){operation.dcp={};this.readChildNodes(node,operation.dcp);},"HTTP":function(node,dcp){dcp.http={};this.readChildNodes(node,dcp.http);},"Get":function(node,http){http.get=this.getAttributeNS(node,this.namespaces.xlink,"href");},"Post":function(node,http){http.post=this.getAttributeNS(node,this.namespaces.xlink,"href");},"Parameter":function(node,operation){if(!operation.parameters){operation.parameters={};}
-var name=node.getAttribute("name");operation.parameters[name]={};this.readChildNodes(node,operation.parameters[name]);},"Value":function(node,allowedValues){allowedValues[this.getChildValue(node)]=true;},"OutputFormat":function(node,obj){obj.formats.push({value:this.getChildValue(node)});this.readChildNodes(node,obj);},"WGS84BoundingBox":function(node,obj){var boundingBox={};boundingBox.crs=node.getAttribute("crs");if(obj.BoundingBox){obj.BoundingBox.push(boundingBox);}else{obj.projection=boundingBox.crs;boundingBox=obj;}
-this.readChildNodes(node,boundingBox);},"BoundingBox":function(node,obj){this.readers['ows']['WGS84BoundingBox'].apply(this,[node,obj]);},"LowerCorner":function(node,obj){var str=this.getChildValue(node).replace(this.regExes.trimSpace,"");str=str.replace(this.regExes.trimComma,",");var pointList=str.split(this.regExes.splitSpace);obj.left=pointList[0];obj.bottom=pointList[1];},"UpperCorner":function(node,obj){var str=this.getChildValue(node).replace(this.regExes.trimSpace,"");str=str.replace(this.regExes.trimComma,",");var pointList=str.split(this.regExes.splitSpace);obj.right=pointList[0];obj.top=pointList[1];obj.bounds=new OpenLayers.Bounds(obj.left,obj.bottom,obj.right,obj.top);delete obj.left;delete obj.bottom;delete obj.right;delete obj.top;}}},writers:{"ows":{"BoundingBox":function(options){var node=this.createElementNSPlus("ows:BoundingBox",{attributes:{crs:options.projection}});this.writeNode("ows:LowerCorner",options,node);this.writeNode("ows:UpperCorner",options,node);return node;},"LowerCorner":function(options){var node=this.createElementNSPlus("ows:LowerCorner",{value:options.bounds.left+" "+options.bounds.bottom});return node;},"UpperCorner":function(options){var node=this.createElementNSPlus("ows:UpperCorner",{value:options.bounds.right+" "+options.bounds.top});return node;},"Title":function(title){var node=this.createElementNSPlus("ows:Title",{value:title});return node;},"OutputFormat":function(format){var node=this.createElementNSPlus("ows:OutputFormat",{value:format});return node;}}},CLASS_NAME:"OpenLayers.Format.OWSCommon.v1"});OpenLayers.Format.SOSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,parser:null,initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);this.options=options;},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-var root=data.documentElement;var version=this.version||root.getAttribute("version")||this.defaultVersion;if(!this.parser||this.parser.version!==version){var constr=OpenLayers.Format.SOSCapabilities["v"+version.replace(/\./g,"_")];if(!constr){throw"Can't find a SOS capabilities parser for version "+version;}
-var parser=new constr(this.options);}
-var capabilities=parser.read(data);capabilities.version=version;return capabilities;},CLASS_NAME:"OpenLayers.Format.SOSCapabilities"});OpenLayers.Format.WFSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.1.0",version:null,initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);this.options=options;},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-var root=data.documentElement;var version=this.version;if(!version){version=root.getAttribute("version");if(!version){version=this.defaultVersion;}}
-var constr=OpenLayers.Format.WFSCapabilities["v"+version.replace(/\./g,"_")];if(!constr){throw"Can't find a WFS capabilities parser for version "+version;}
-var parser=new constr(this.options);var capabilities=parser.read(data);capabilities.version=version;return capabilities;},CLASS_NAME:"OpenLayers.Format.WFSCapabilities"});OpenLayers.Format.WFSDescribeFeatureType=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xsd:"http://www.w3.org/2001/XMLSchema"},initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},readers:{"xsd":{"schema":function(node,obj){var complexTypes=[];var customTypes={};var schema={complexTypes:complexTypes,customTypes:customTypes};this.readChildNodes(node,schema);var attributes=node.attributes;var attr,name;for(var i=0,len=attributes.length;i<len;++i){attr=attributes[i];name=attr.name;if(name.indexOf("xmlns")==0){this.setNamespace(name.split(":")[1]||"",attr.value);}else{obj[name]=attr.value;}}
-obj.featureTypes=complexTypes;obj.targetPrefix=this.namespaceAlias[obj.targetNamespace];var complexType,customType;for(var i=0,len=complexTypes.length;i<len;++i){complexType=complexTypes[i];customType=customTypes[complexType.typeName];if(customTypes[complexType.typeName]){complexType.typeName=customType.name;}}},"complexType":function(node,obj){var complexType={"typeName":node.getAttribute("name")};this.readChildNodes(node,complexType);obj.complexTypes.push(complexType);},"complexContent":function(node,obj){this.readChildNodes(node,obj);},"extension":function(node,obj){this.readChildNodes(node,obj);},"sequence":function(node,obj){var sequence={elements:[]};this.readChildNodes(node,sequence);obj.properties=sequence.elements;},"element":function(node,obj){if(obj.elements){var element={};var attributes=node.attributes;var attr;for(var i=0,len=attributes.length;i<len;++i){attr=attributes[i];element[attr.name]=attr.value;}
-var type=element.type;if(!type){type={};this.readChildNodes(node,type);element.restriction=type;element.type=type.base;}
-var fullType=type.base||type;element.localType=fullType.split(":").pop();obj.elements.push(element);}
-if(obj.complexTypes){var type=node.getAttribute("type");var localType=type.split(":").pop();obj.customTypes[localType]={"name":node.getAttribute("name"),"type":type};}},"simpleType":function(node,obj){this.readChildNodes(node,obj);},"restriction":function(node,obj){obj.base=node.getAttribute("base");this.readRestriction(node,obj);}}},readRestriction:function(node,obj){var children=node.childNodes;var child,nodeName,value;for(var i=0,len=children.length;i<len;++i){child=children[i];if(child.nodeType==1){nodeName=child.nodeName.split(":").pop();value=child.getAttribute("value");if(!obj[nodeName]){obj[nodeName]=value;}else{if(typeof obj[nodeName]=="string"){obj[nodeName]=[obj[nodeName]];}
-obj[nodeName].push(value);}}}},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-if(data&&data.nodeType==9){data=data.documentElement;}
-var schema={};this.readNode(data,schema);return schema;},CLASS_NAME:"OpenLayers.Format.WFSDescribeFeatureType"});OpenLayers.Format.WFST.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",wfs:"http://www.opengis.net/wfs",gml:"http://www.opengis.net/gml",ogc:"http://www.opengis.net/ogc"},defaultPrefix:"wfs",version:null,schemaLocations:null,srsName:null,extractAttributes:true,xy:true,stateName:null,initialize:function(options){this.stateName={};this.stateName[OpenLayers.State.INSERT]="wfs:Insert";this.stateName[OpenLayers.State.UPDATE]="wfs:Update";this.stateName[OpenLayers.State.DELETE]="wfs:Delete";OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},getSrsName:function(feature,options){var srsName=options&&options.srsName;if(!srsName){if(feature&&feature.layer){srsName=feature.layer.projection.getCode();}else{srsName=this.srsName;}}
-return srsName;},read:function(data,options){options=options||{};OpenLayers.Util.applyDefaults(options,{output:"features"});if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-if(data&&data.nodeType==9){data=data.documentElement;}
-var obj={};if(data){this.readNode(data,obj);}
-if(obj.features&&options.output==="features"){obj=obj.features;}
-return obj;},readers:{"wfs":{"FeatureCollection":function(node,obj){obj.features=[];this.readChildNodes(node,obj);}}},write:function(features){var node=this.writeNode("wfs:Transaction",features);var value=this.schemaLocationAttr();if(value){this.setAttributeNS(node,this.namespaces["xsi"],"xsi:schemaLocation",value)}
-return OpenLayers.Format.XML.prototype.write.apply(this,[node]);},writers:{"wfs":{"GetFeature":function(options){var node=this.createElementNSPlus("wfs:GetFeature",{attributes:{service:"WFS",version:this.version,outputFormat:options&&options.outputFormat,maxFeatures:options&&options.maxFeatures,"xsi:schemaLocation":this.schemaLocationAttr(options)}});if(typeof this.featureType=="string"){this.writeNode("Query",options,node);}else{for(var i=0,len=this.featureType.length;i<len;i++){options.featureType=this.featureType[i];this.writeNode("Query",options,node);}}
-return node;},"Transaction":function(features){var node=this.createElementNSPlus("wfs:Transaction",{attributes:{service:"WFS",version:this.version}});if(features){var name,feature;for(var i=0,len=features.length;i<len;++i){feature=features[i];name=this.stateName[feature.state];if(name){this.writeNode(name,feature,node);}}}
-return node;},"Insert":function(feature){var node=this.createElementNSPlus("wfs:Insert");this.srsName=this.getSrsName(feature);this.writeNode("feature:_typeName",feature,node);return node;},"Update":function(feature){var node=this.createElementNSPlus("wfs:Update",{attributes:{typeName:(this.featureNS?this.featurePrefix+":":"")+
-this.featureType}});if(this.featureNS){node.setAttribute("xmlns:"+this.featurePrefix,this.featureNS);}
-if(this.geometryName!==null){this.writeNode("Property",{name:this.geometryName,value:feature},node);}
-for(var key in feature.attributes){if(feature.attributes[key]!==undefined){this.writeNode("Property",{name:key,value:feature.attributes[key]},node);}}
-this.writeNode("ogc:Filter",new OpenLayers.Filter.FeatureId({fids:[feature.fid]}),node);return node;},"Property":function(obj){var node=this.createElementNSPlus("wfs:Property");this.writeNode("Name",obj.name,node);if(obj.value!==null){this.writeNode("Value",obj.value,node);}
-return node;},"Name":function(name){return this.createElementNSPlus("wfs:Name",{value:name});},"Value":function(obj){var node;if(obj instanceof OpenLayers.Feature.Vector){node=this.createElementNSPlus("wfs:Value");this.srsName=this.getSrsName(obj);var geom=this.writeNode("feature:_geometry",obj.geometry).firstChild;node.appendChild(geom);}else{node=this.createElementNSPlus("wfs:Value",{value:obj});}
-return node;},"Delete":function(feature){var node=this.createElementNSPlus("wfs:Delete",{attributes:{typeName:(this.featureNS?this.featurePrefix+":":"")+
-this.featureType}});if(this.featureNS){node.setAttribute("xmlns:"+this.featurePrefix,this.featureNS);}
-this.writeNode("ogc:Filter",new OpenLayers.Filter.FeatureId({fids:[feature.fid]}),node);return node;}}},schemaLocationAttr:function(options){options=OpenLayers.Util.extend({featurePrefix:this.featurePrefix,schema:this.schema},options);var schemaLocations=OpenLayers.Util.extend({},this.schemaLocations);if(options.schema){schemaLocations[options.featurePrefix]=options.schema;}
-var parts=[];var uri;for(var key in schemaLocations){uri=this.namespaces[key];if(uri){parts.push(uri+" "+schemaLocations[key]);}}
-var value=parts.join(" ")||undefined;return value;},setFilterProperty:function(filter){if(filter.filters){for(var i=0,len=filter.filters.length;i<len;++i){this.setFilterProperty(filter.filters[i]);}}else{if(filter instanceof OpenLayers.Filter.Spatial){filter.property=this.geometryName;}}},CLASS_NAME:"OpenLayers.Format.WFST.v1"});OpenLayers.Format.WMSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.1.1",version:null,parser:null,initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);this.options=options;},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-var root=data.documentElement;var version=this.version||root.getAttribute("version")||this.defaultVersion;if(!this.parser||this.parser.version!==version){var constr=OpenLayers.Format.WMSCapabilities["v"+version.replace(/\./g,"_")];if(!constr){throw"Can't find a WMS capabilities parser for version "+version;}
-this.parser=new constr(this.options);}
-var capabilities=this.parser.read(data);capabilities.version=version;return capabilities;},CLASS_NAME:"OpenLayers.Format.WMSCapabilities"});OpenLayers.Format.WMSDescribeLayer=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.1.1",version:null,initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);this.options=options;},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-var root=data.documentElement;var version=this.version;if(!version){version=root.getAttribute("version");if(!version){version=this.defaultVersion;}}
-if(version=="1.1.1"||version=="1.1.0"){version="1.1";}
-var constructor=OpenLayers.Format.WMSDescribeLayer["v"+version.replace(/\./g,"_")];if(!constructor){throw"Can't find a WMS DescribeLayer parser for version "+
-version;}
-var parser=new constructor(this.options);var describelayer=parser.read(data);describelayer.version=version;return describelayer;},CLASS_NAME:"OpenLayers.Format.WMSDescribeLayer"});OpenLayers.Format.WMSGetFeatureInfo=OpenLayers.Class(OpenLayers.Format.XML,{layerIdentifier:'_layer',featureIdentifier:'_feature',regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},gmlFormat:null,initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,arguments);OpenLayers.Util.extend(this,options);this.options=options;},read:function(data){var result;if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-var root=data.documentElement;if(root){var scope=this;var read=this["read_"+root.nodeName];if(read){result=read.call(this,root);}else{result=new OpenLayers.Format.GML((this.options?this.options:{})).read(data);}}else{result=data;}
-return result;},read_msGMLOutput:function(data){var response=[];var layerNodes=this.getSiblingNodesByTagCriteria(data,this.layerIdentifier);if(layerNodes){for(var i=0,len=layerNodes.length;i<len;++i){var node=layerNodes[i];var layerName=node.nodeName;if(node.prefix){layerName=layerName.split(':')[1];}
-var layerName=layerName.replace(this.layerIdentifier,'');var featureNodes=this.getSiblingNodesByTagCriteria(node,this.featureIdentifier);if(featureNodes){for(var j=0;j<featureNodes.length;j++){var featureNode=featureNodes[j];var geomInfo=this.parseGeometry(featureNode);var attributes=this.parseAttributes(featureNode);var feature=new OpenLayers.Feature.Vector(geomInfo.geometry,attributes,null);feature.bounds=geomInfo.bounds;feature.type=layerName;response.push(feature);}}}}
-return response;},read_FeatureInfoResponse:function(data){var response=[];var featureNodes=this.getElementsByTagNameNS(data,'*','FIELDS');for(var i=0,len=featureNodes.length;i<len;i++){var featureNode=featureNodes[i];var geom=null;var attributes={};for(var j=0,jlen=featureNode.attributes.length;j<jlen;j++){var attribute=featureNode.attributes[j];attributes[attribute.nodeName]=attribute.nodeValue;}
-response.push(new OpenLayers.Feature.Vector(geom,attributes,null));}
-return response;},getSiblingNodesByTagCriteria:function(node,criteria){var nodes=[];var children,tagName,n,matchNodes,child;if(node&&node.hasChildNodes()){children=node.childNodes;n=children.length;for(var k=0;k<n;k++){child=children[k];while(child&&child.nodeType!=1){child=child.nextSibling;k++;}
-tagName=(child?child.nodeName:'');if(tagName.length>0&&tagName.indexOf(criteria)>-1){nodes.push(child);}else{matchNodes=this.getSiblingNodesByTagCriteria(child,criteria);if(matchNodes.length>0){(nodes.length==0)?nodes=matchNodes:nodes.push(matchNodes);}}}}
-return nodes;},parseAttributes:function(node){var attributes={};if(node.nodeType==1){var children=node.childNodes;var n=children.length;for(var i=0;i<n;++i){var child=children[i];if(child.nodeType==1){var grandchildren=child.childNodes;if(grandchildren.length==1){var grandchild=grandchildren[0];if(grandchild.nodeType==3||grandchild.nodeType==4){var name=(child.prefix)?child.nodeName.split(":")[1]:child.nodeName;var value=grandchild.nodeValue.replace(this.regExes.trimSpace,"");attributes[name]=value;}}}}}
-return attributes;},parseGeometry:function(node){if(!this.gmlFormat){this.gmlFormat=new OpenLayers.Format.GML();}
-var feature=this.gmlFormat.parseFeature(node);var geometry,bounds=null;if(feature){geometry=feature.geometry&&feature.geometry.clone();bounds=feature.bounds&&feature.bounds.clone();feature.destroy();}
-return{geometry:geometry,bounds:bounds};},CLASS_NAME:"OpenLayers.Format.WMSGetFeatureInfo"});OpenLayers.Format.WMTSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,parser:null,yx:{"urn:ogc:def:crs:EPSG::4326":true},initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);this.options=options;},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-var root=data.documentElement;var version=this.version||root.getAttribute("version")||this.defaultVersion;if(!this.parser||this.parser.version!==version){var constr=OpenLayers.Format.WMTSCapabilities["v"+version.replace(/\./g,"_")];if(!constr){throw new Error("Can't find a WMTS capabilities parser for version "+version);}
-this.parser=new constr(this.options);}
-return this.parser.read(data);},createLayer:function(capabilities,config){var layer;var required={layer:true,matrixSet:true};for(var prop in required){if(!(prop in config)){throw new Error("Missing property '"+prop+"' in layer configuration.");}}
-var contents=capabilities.contents;var matrixSet=contents.tileMatrixSets[config.matrixSet];var layers=contents.layers;var layerDef;for(var i=0,ii=contents.layers.length;i<ii;++i){if(contents.layers[i].identifier===config.layer){layerDef=contents.layers[i];break;}}
-if(layerDef&&matrixSet){var style;for(var i=0,ii=layerDef.styles.length;i<ii;++i){style=layerDef.styles[i];if(style.isDefault){break;}}
-layer=new OpenLayers.Layer.WMTS(OpenLayers.Util.applyDefaults(config,{url:capabilities.operationsMetadata.GetTile.dcp.http.get,name:layerDef.title,style:style,matrixIds:matrixSet.matrixIds}));}
-return layer;},CLASS_NAME:"OpenLayers.Format.WMTSCapabilities"});OpenLayers.Handler.Click=OpenLayers.Class(OpenLayers.Handler,{delay:300,single:true,'double':false,pixelTolerance:0,stopSingle:false,stopDouble:false,timerId:null,down:null,rightclickTimerId:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);if(this.pixelTolerance!=null){this.mousedown=function(evt){this.down=evt.xy;return true;};}},mousedown:null,mouseup:function(evt){var propagate=true;if(this.checkModifiers(evt)&&this.control.handleRightClicks&&OpenLayers.Event.isRightClick(evt)){propagate=this.rightclick(evt);}
-return propagate;},rightclick:function(evt){if(this.passesTolerance(evt)){if(this.rightclickTimerId!=null){this.clearTimer();this.callback('dblrightclick',[evt]);return!this.stopDouble;}else{var clickEvent=this['double']?OpenLayers.Util.extend({},evt):this.callback('rightclick',[evt]);var delayedRightCall=OpenLayers.Function.bind(this.delayedRightCall,this,clickEvent);this.rightclickTimerId=window.setTimeout(delayedRightCall,this.delay);}}
-return!this.stopSingle;},delayedRightCall:function(evt){this.rightclickTimerId=null;if(evt){this.callback('rightclick',[evt]);}
-return!this.stopSingle;},dblclick:function(evt){if(this.passesTolerance(evt)){if(this["double"]){this.callback('dblclick',[evt]);}
-this.clearTimer();}
-return!this.stopDouble;},click:function(evt){if(this.passesTolerance(evt)){if(this.timerId!=null){this.clearTimer();}else{var clickEvent=this.single?OpenLayers.Util.extend({},evt):null;this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,clickEvent),this.delay);}}
-return!this.stopSingle;},passesTolerance:function(evt){var passes=true;if(this.pixelTolerance!=null&&this.down){var dpx=Math.sqrt(Math.pow(this.down.x-evt.xy.x,2)+
-Math.pow(this.down.y-evt.xy.y,2));if(dpx>this.pixelTolerance){passes=false;}}
-return passes;},clearTimer:function(){if(this.timerId!=null){window.clearTimeout(this.timerId);this.timerId=null;}
-if(this.rightclickTimerId!=null){window.clearTimeout(this.rightclickTimerId);this.rightclickTimerId=null;}},delayedCall:function(evt){this.timerId=null;if(evt){this.callback('click',[evt]);}},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.clearTimer();this.down=null;deactivated=true;}
-return deactivated;},CLASS_NAME:"OpenLayers.Handler.Click"});OpenLayers.Handler.Drag=OpenLayers.Class(OpenLayers.Handler,{started:false,stopDown:true,dragging:false,last:null,start:null,oldOnselectstart:null,interval:0,timeoutId:null,documentDrag:false,documentEvents:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);},down:function(evt){},move:function(evt){},up:function(evt){},out:function(evt){},mousedown:function(evt){var propagate=true;this.dragging=false;if(this.checkModifiers(evt)&&OpenLayers.Event.isLeftClick(evt)){this.started=true;this.start=evt.xy;this.last=evt.xy;OpenLayers.Element.addClass(this.map.viewPortDiv,"olDragDown");this.down(evt);this.callback("down",[evt.xy]);OpenLayers.Event.stop(evt);if(!this.oldOnselectstart){this.oldOnselectstart=(document.onselectstart)?document.onselectstart:OpenLayers.Function.True;}
-document.onselectstart=OpenLayers.Function.False;propagate=!this.stopDown;}else{this.started=false;this.start=null;this.last=null;}
-return propagate;},mousemove:function(evt){if(this.started&&!this.timeoutId&&(evt.xy.x!=this.last.x||evt.xy.y!=this.last.y)){if(this.documentDrag===true&&this.documentEvents){if(evt.element===document){this.adjustXY(evt);this.setEvent(evt);}else{this.destroyDocumentEvents();}}
-if(this.interval>0){this.timeoutId=setTimeout(OpenLayers.Function.bind(this.removeTimeout,this),this.interval);}
-this.dragging=true;this.move(evt);this.callback("move",[evt.xy]);if(!this.oldOnselectstart){this.oldOnselectstart=document.onselectstart;document.onselectstart=OpenLayers.Function.False;}
-this.last=this.evt.xy;}
-return true;},removeTimeout:function(){this.timeoutId=null;},mouseup:function(evt){if(this.started){if(this.documentDrag===true&&this.documentEvents){this.adjustXY(evt);this.destroyDocumentEvents();}
-var dragged=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.up(evt);this.callback("up",[evt.xy]);if(dragged){this.callback("done",[evt.xy]);}
-document.onselectstart=this.oldOnselectstart;}
-return true;},mouseout:function(evt){if(this.started&&OpenLayers.Util.mouseLeft(evt,this.map.div)){if(this.documentDrag===true){this.documentEvents=new OpenLayers.Events(this,document,null,null,{includeXY:true});this.documentEvents.on({mousemove:this.mousemove,mouseup:this.mouseup});OpenLayers.Element.addClass(document.body,"olDragDown");}else{var dragged=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.out(evt);this.callback("out",[]);if(dragged){this.callback("done",[evt.xy]);}
-if(document.onselectstart){document.onselectstart=this.oldOnselectstart;}}}
-return true;},click:function(evt){return(this.start==this.last);},activate:function(){var activated=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragging=false;activated=true;}
-return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.started=false;this.dragging=false;this.start=null;this.last=null;deactivated=true;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");}
-return deactivated;},adjustXY:function(evt){var pos=OpenLayers.Util.pagePosition(this.map.div);evt.xy.x-=pos[0];evt.xy.y-=pos[1];},destroyDocumentEvents:function(){OpenLayers.Element.removeClass(document.body,"olDragDown");this.documentEvents.destroy();this.documentEvents=null;},CLASS_NAME:"OpenLayers.Handler.Drag"});OpenLayers.Handler.Feature=OpenLayers.Class(OpenLayers.Handler,{EVENTMAP:{'click':{'in':'click','out':'clickout'},'mousemove':{'in':'over','out':'out'},'dblclick':{'in':'dblclick','out':null},'mousedown':{'in':null,'out':null},'mouseup':{'in':null,'out':null}},feature:null,lastFeature:null,down:null,up:null,clickTolerance:4,geometryTypes:null,stopClick:true,stopDown:true,stopUp:false,initialize:function(control,layer,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,[control,callbacks,options]);this.layer=layer;},mousedown:function(evt){this.down=evt.xy;return this.handle(evt)?!this.stopDown:true;},mouseup:function(evt){this.up=evt.xy;return this.handle(evt)?!this.stopUp:true;},click:function(evt){return this.handle(evt)?!this.stopClick:true;},mousemove:function(evt){if(!this.callbacks['over']&&!this.callbacks['out']){return true;}
-this.handle(evt);return true;},dblclick:function(evt){return!this.handle(evt);},geometryTypeMatches:function(feature){return this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,feature.geometry.CLASS_NAME)>-1;},handle:function(evt){if(this.feature&&!this.feature.layer){this.feature=null;}
-var type=evt.type;var handled=false;var previouslyIn=!!(this.feature);var click=(type=="click"||type=="dblclick");this.feature=this.layer.getFeatureFromEvent(evt);if(this.feature&&!this.feature.layer){this.feature=null;}
-if(this.lastFeature&&!this.lastFeature.layer){this.lastFeature=null;}
-if(this.feature){var inNew=(this.feature!=this.lastFeature);if(this.geometryTypeMatches(this.feature)){if(previouslyIn&&inNew){if(this.lastFeature){this.triggerCallback(type,'out',[this.lastFeature]);}
-this.triggerCallback(type,'in',[this.feature]);}else if(!previouslyIn||click){this.triggerCallback(type,'in',[this.feature]);}
-this.lastFeature=this.feature;handled=true;}else{if(this.lastFeature&&(previouslyIn&&inNew||click)){this.triggerCallback(type,'out',[this.lastFeature]);}
-this.feature=null;}}else{if(this.lastFeature&&(previouslyIn||click)){this.triggerCallback(type,'out',[this.lastFeature]);}}
-return handled;},triggerCallback:function(type,mode,args){var key=this.EVENTMAP[type][mode];if(key){if(type=='click'&&this.up&&this.down){var dpx=Math.sqrt(Math.pow(this.up.x-this.down.x,2)+
-Math.pow(this.up.y-this.down.y,2));if(dpx<=this.clickTolerance){this.callback(key,args);}}else{this.callback(key,args);}}},activate:function(){var activated=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.moveLayerToTop();this.map.events.on({"removelayer":this.handleMapEvents,"changelayer":this.handleMapEvents,scope:this});activated=true;}
-return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.moveLayerBack();this.feature=null;this.lastFeature=null;this.down=null;this.up=null;this.map.events.un({"removelayer":this.handleMapEvents,"changelayer":this.handleMapEvents,scope:this});deactivated=true;}
-return deactivated;},handleMapEvents:function(evt){if(!evt.property||evt.property=="order"){this.moveLayerToTop();}},moveLayerToTop:function(){var index=Math.max(this.map.Z_INDEX_BASE['Feature']-1,this.layer.getZIndex())+1;this.layer.setZIndex(index);},moveLayerBack:function(){var index=this.layer.getZIndex()-1;if(index>=this.map.Z_INDEX_BASE['Feature']){this.layer.setZIndex(index);}else{this.map.setLayerZIndex(this.layer,this.map.getLayerIndex(this.layer));}},CLASS_NAME:"OpenLayers.Handler.Feature"});OpenLayers.Handler.Hover=OpenLayers.Class(OpenLayers.Handler,{delay:500,pixelTolerance:null,stopMove:false,px:null,timerId:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);},mousemove:function(evt){if(this.passesTolerance(evt.xy)){this.clearTimer();this.callback('move',[evt]);this.px=evt.xy;evt=OpenLayers.Util.extend({},evt);this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,evt),this.delay);}
-return!this.stopMove;},mouseout:function(evt){if(OpenLayers.Util.mouseLeft(evt,this.map.div)){this.clearTimer();this.callback('move',[evt]);}
-return true;},passesTolerance:function(px){var passes=true;if(this.pixelTolerance&&this.px){var dpx=Math.sqrt(Math.pow(this.px.x-px.x,2)+
-Math.pow(this.px.y-px.y,2));if(dpx<this.pixelTolerance){passes=false;}}
-return passes;},clearTimer:function(){if(this.timerId!=null){window.clearTimeout(this.timerId);this.timerId=null;}},delayedCall:function(evt){this.callback('pause',[evt]);},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.clearTimer();deactivated=true;}
-return deactivated;},CLASS_NAME:"OpenLayers.Handler.Hover"});OpenLayers.Handler.Keyboard=OpenLayers.Class(OpenLayers.Handler,{KEY_EVENTS:["keydown","keyup"],eventListener:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.eventListener=OpenLayers.Function.bindAsEventListener(this.handleKeyEvent,this);},destroy:function(){this.deactivate();this.eventListener=null;OpenLayers.Handler.prototype.destroy.apply(this,arguments);},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){for(var i=0,len=this.KEY_EVENTS.length;i<len;i++){OpenLayers.Event.observe(document,this.KEY_EVENTS[i],this.eventListener);}
-return true;}else{return false;}},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){for(var i=0,len=this.KEY_EVENTS.length;i<len;i++){OpenLayers.Event.stopObserving(document,this.KEY_EVENTS[i],this.eventListener);}
-deactivated=true;}
-return deactivated;},handleKeyEvent:function(evt){if(this.checkModifiers(evt)){this.callback(evt.type,[evt]);}},CLASS_NAME:"OpenLayers.Handler.Keyboard"});OpenLayers.Handler.MouseWheel=OpenLayers.Class(OpenLayers.Handler,{wheelListener:null,mousePosition:null,interval:0,delta:0,cumulative:true,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.wheelListener=OpenLayers.Function.bindAsEventListener(this.onWheelEvent,this);},destroy:function(){OpenLayers.Handler.prototype.destroy.apply(this,arguments);this.wheelListener=null;},onWheelEvent:function(e){if(!this.map||!this.checkModifiers(e)){return;}
-var overScrollableDiv=false;var overLayerDiv=false;var overMapDiv=false;var elem=OpenLayers.Event.element(e);while((elem!=null)&&!overMapDiv&&!overScrollableDiv){if(!overScrollableDiv){try{if(elem.currentStyle){overflow=elem.currentStyle["overflow"];}else{var style=document.defaultView.getComputedStyle(elem,null);var overflow=style.getPropertyValue("overflow");}
-overScrollableDiv=(overflow&&(overflow=="auto")||(overflow=="scroll"));}catch(err){}}
-if(!overLayerDiv){for(var i=0,len=this.map.layers.length;i<len;i++){if(elem==this.map.layers[i].div||elem==this.map.layers[i].pane){overLayerDiv=true;break;}}}
-overMapDiv=(elem==this.map.div);elem=elem.parentNode;}
-if(!overScrollableDiv&&overMapDiv){if(overLayerDiv){var delta=0;if(!e){e=window.event;}
-if(e.wheelDelta){delta=e.wheelDelta/120;if(window.opera&&window.opera.version()<9.2){delta=-delta;}}else if(e.detail){delta=-e.detail/3;}
-this.delta=this.delta+delta;if(this.interval){window.clearTimeout(this._timeoutId);this._timeoutId=window.setTimeout(OpenLayers.Function.bind(function(){this.wheelZoom(e);},this),this.interval);}else{this.wheelZoom(e);}}
-OpenLayers.Event.stop(e);}},wheelZoom:function(e){var delta=this.delta;this.delta=0;if(delta){if(this.mousePosition){e.xy=this.mousePosition;}
-if(!e.xy){e.xy=this.map.getPixelFromLonLat(this.map.getCenter());}
-if(delta<0){this.callback("down",[e,this.cumulative?delta:-1]);}else{this.callback("up",[e,this.cumulative?delta:1]);}}},mousemove:function(evt){this.mousePosition=evt.xy;},activate:function(evt){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var wheelListener=this.wheelListener;OpenLayers.Event.observe(window,"DOMMouseScroll",wheelListener);OpenLayers.Event.observe(window,"mousewheel",wheelListener);OpenLayers.Event.observe(document,"mousewheel",wheelListener);return true;}else{return false;}},deactivate:function(evt){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){var wheelListener=this.wheelListener;OpenLayers.Event.stopObserving(window,"DOMMouseScroll",wheelListener);OpenLayers.Event.stopObserving(window,"mousewheel",wheelListener);OpenLayers.Event.stopObserving(document,"mousewheel",wheelListener);return true;}else{return false;}},CLASS_NAME:"OpenLayers.Handler.MouseWheel"});OpenLayers.Layer=OpenLayers.Class({id:null,name:null,div:null,opacity:null,alwaysInRange:null,EVENT_TYPES:["loadstart","loadend","loadcancel","visibilitychanged","move","moveend"],RESOLUTION_PROPERTIES:['scales','resolutions','maxScale','minScale','maxResolution','minResolution','numZoomLevels','maxZoomLevel'],events:null,map:null,isBaseLayer:false,alpha:false,displayInLayerSwitcher:true,visibility:true,attribution:null,inRange:false,imageSize:null,imageOffset:null,options:null,eventListeners:null,gutter:0,projection:null,units:null,scales:null,resolutions:null,maxExtent:null,minExtent:null,maxResolution:null,minResolution:null,numZoomLevels:null,minScale:null,maxScale:null,displayOutsideMaxExtent:false,wrapDateLine:false,transitionEffect:null,SUPPORTED_TRANSITIONS:['resize'],metadata:{},initialize:function(name,options){this.addOptions(options);this.name=name;if(this.id==null){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");this.div=OpenLayers.Util.createDiv(this.id);this.div.style.width="100%";this.div.style.height="100%";this.div.dir="ltr";this.events=new OpenLayers.Events(this,this.div,this.EVENT_TYPES);if(this.eventListeners instanceof Object){this.events.on(this.eventListeners);}}
-if(this.wrapDateLine){this.displayOutsideMaxExtent=true;}},destroy:function(setNewBaseLayer){if(setNewBaseLayer==null){setNewBaseLayer=true;}
-if(this.map!=null){this.map.removeLayer(this,setNewBaseLayer);}
-this.projection=null;this.map=null;this.name=null;this.div=null;this.options=null;if(this.events){if(this.eventListeners){this.events.un(this.eventListeners);}
-this.events.destroy();}
-this.eventListeners=null;this.events=null;},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer(this.name,this.getOptions());}
-OpenLayers.Util.applyDefaults(obj,this);obj.map=null;return obj;},getOptions:function(){var options={};for(var o in this.options){options[o]=this[o];}
-return options;},setName:function(newName){if(newName!=this.name){this.name=newName;if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"name"});}}},addOptions:function(newOptions){if(this.options==null){this.options={};}
-OpenLayers.Util.extend(this.options,newOptions);OpenLayers.Util.extend(this,newOptions);if(typeof this.projection=="string"){this.projection=new OpenLayers.Projection(this.projection);}
-if(this.projection&&this.projection.getUnits()){this.units=this.projection.getUnits();}
-if(this.map){var properties=this.RESOLUTION_PROPERTIES.concat(["projection","units","minExtent","maxExtent"]);for(var o in newOptions){if(newOptions.hasOwnProperty(o)&&OpenLayers.Util.indexOf(properties,o)>=0){this.initResolutions();break;}}}},onMapResize:function(){},redraw:function(){var redrawn=false;if(this.map){this.inRange=this.calculateInRange();var extent=this.getExtent();if(extent&&this.inRange&&this.visibility){var zoomChanged=true;this.moveTo(extent,zoomChanged,false);this.events.triggerEvent("moveend",{"zoomChanged":zoomChanged});redrawn=true;}}
-return redrawn;},moveTo:function(bounds,zoomChanged,dragging){var display=this.visibility;if(!this.isBaseLayer){display=display&&this.inRange;}
-this.display(display);},setMap:function(map){if(this.map==null){this.map=map;this.maxExtent=this.maxExtent||this.map.maxExtent;this.minExtent=this.minExtent||this.map.minExtent;this.projection=this.projection||this.map.projection;if(typeof this.projection=="string"){this.projection=new OpenLayers.Projection(this.projection);}
-this.units=this.projection.getUnits()||this.units||this.map.units;this.initResolutions();if(!this.isBaseLayer){this.inRange=this.calculateInRange();var show=((this.visibility)&&(this.inRange));this.div.style.display=show?"":"none";}
-this.setTileSize();}},afterAdd:function(){},removeMap:function(map){},getImageSize:function(bounds){return(this.imageSize||this.tileSize);},setTileSize:function(size){var tileSize=(size)?size:((this.tileSize)?this.tileSize:this.map.getTileSize());this.tileSize=tileSize;if(this.gutter){this.imageOffset=new OpenLayers.Pixel(-this.gutter,-this.gutter);this.imageSize=new OpenLayers.Size(tileSize.w+(2*this.gutter),tileSize.h+(2*this.gutter));}},getVisibility:function(){return this.visibility;},setVisibility:function(visibility){if(visibility!=this.visibility){this.visibility=visibility;this.display(visibility);this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"visibility"});}
-this.events.triggerEvent("visibilitychanged");}},display:function(display){if(display!=(this.div.style.display!="none")){this.div.style.display=(display&&this.calculateInRange())?"block":"none";}},calculateInRange:function(){var inRange=false;if(this.alwaysInRange){inRange=true;}else{if(this.map){var resolution=this.map.getResolution();inRange=((resolution>=this.minResolution)&&(resolution<=this.maxResolution));}}
-return inRange;},setIsBaseLayer:function(isBaseLayer){if(isBaseLayer!=this.isBaseLayer){this.isBaseLayer=isBaseLayer;if(this.map!=null){this.map.events.triggerEvent("changebaselayer",{layer:this});}}},initResolutions:function(){var i,len;var props={},alwaysInRange=true;for(i=0,len=this.RESOLUTION_PROPERTIES.length;i<len;i++){var p=this.RESOLUTION_PROPERTIES[i];props[p]=this.options[p];if(alwaysInRange&&this.options[p]){alwaysInRange=false;}}
-if(this.alwaysInRange==null){this.alwaysInRange=alwaysInRange;}
-if(props.resolutions==null){props.resolutions=this.resolutionsFromScales(props.scales);}
-if(props.resolutions==null){props.resolutions=this.calculateResolutions(props);}
-if(props.resolutions==null){for(i=0,len=this.RESOLUTION_PROPERTIES.length;i<len;i++){var p=this.RESOLUTION_PROPERTIES[i];props[p]=this.options[p]!=null?this.options[p]:this.map[p];}
-if(props.resolutions==null){props.resolutions=this.resolutionsFromScales(props.scales);}
-if(props.resolutions==null){props.resolutions=this.calculateResolutions(props);}}
-var maxResolution;if(this.options.maxResolution&&this.options.maxResolution!=="auto"){maxResolution=this.options.maxResolution;}
-if(this.options.minScale){maxResolution=OpenLayers.Util.getResolutionFromScale(this.options.minScale,this.units);}
-var minResolution;if(this.options.minResolution&&this.options.minResolution!=="auto"){minResolution=this.options.minResolution;}
-if(this.options.maxScale){minResolution=OpenLayers.Util.getResolutionFromScale(this.options.maxScale,this.units);}
-if(props.resolutions){props.resolutions.sort(function(a,b){return(b-a);});if(!maxResolution){maxResolution=props.resolutions[0];}
-if(!minResolution){var lastIdx=props.resolutions.length-1;minResolution=props.resolutions[lastIdx];}}
-this.resolutions=props.resolutions;if(this.resolutions){len=this.resolutions.length;this.scales=new Array(len);for(i=0;i<len;i++){this.scales[i]=OpenLayers.Util.getScaleFromResolution(this.resolutions[i],this.units);}
-this.numZoomLevels=len;}
-this.minResolution=minResolution;if(minResolution){this.maxScale=OpenLayers.Util.getScaleFromResolution(minResolution,this.units);}
-this.maxResolution=maxResolution;if(maxResolution){this.minScale=OpenLayers.Util.getScaleFromResolution(maxResolution,this.units);}},resolutionsFromScales:function(scales){if(scales==null){return;}
-var resolutions,i,len;len=scales.length;resolutions=new Array(len);for(i=0;i<len;i++){resolutions[i]=OpenLayers.Util.getResolutionFromScale(scales[i],this.units);}
-return resolutions;},calculateResolutions:function(props){var maxResolution=props.maxResolution;if(props.minScale!=null){maxResolution=OpenLayers.Util.getResolutionFromScale(props.minScale,this.units);}else if(maxResolution=="auto"&&this.maxExtent!=null){var viewSize=this.map.getSize();var wRes=this.maxExtent.getWidth()/viewSize.w;var hRes=this.maxExtent.getHeight()/viewSize.h;maxResolution=Math.max(wRes,hRes);}
-var minResolution=props.minResolution;if(props.maxScale!=null){minResolution=OpenLayers.Util.getResolutionFromScale(props.maxScale,this.units);}else if(props.minResolution=="auto"&&this.minExtent!=null){var viewSize=this.map.getSize();var wRes=this.minExtent.getWidth()/viewSize.w;var hRes=this.minExtent.getHeight()/viewSize.h;minResolution=Math.max(wRes,hRes);}
-var maxZoomLevel=props.maxZoomLevel;var numZoomLevels=props.numZoomLevels;if(typeof minResolution==="number"&&typeof maxResolution==="number"&&numZoomLevels===undefined){var ratio=maxResolution/minResolution;numZoomLevels=Math.floor(Math.log(ratio)/Math.log(2))+1;}else if(numZoomLevels===undefined&&maxZoomLevel!=null){numZoomLevels=maxZoomLevel+1;}
-if(typeof numZoomLevels!=="number"||numZoomLevels<=0||(typeof maxResolution!=="number"&&typeof minResolution!=="number")){return;}
-var resolutions=new Array(numZoomLevels);var base=2;if(typeof minResolution=="number"&&typeof maxResolution=="number"){base=Math.pow((maxResolution/minResolution),(1/(numZoomLevels-1)));}
-var i;if(typeof maxResolution==="number"){for(i=0;i<numZoomLevels;i++){resolutions[i]=maxResolution/Math.pow(base,i);}}else{for(i=0;i<numZoomLevels;i++){resolutions[numZoomLevels-1-i]=minResolution*Math.pow(base,i);}}
-return resolutions;},getResolution:function(){var zoom=this.map.getZoom();return this.getResolutionForZoom(zoom);},getExtent:function(){return this.map.calculateBounds();},getZoomForExtent:function(extent,closest){var viewSize=this.map.getSize();var idealResolution=Math.max(extent.getWidth()/viewSize.w,extent.getHeight()/viewSize.h);return this.getZoomForResolution(idealResolution,closest);},getDataExtent:function(){},getResolutionForZoom:function(zoom){zoom=Math.max(0,Math.min(zoom,this.resolutions.length-1));var resolution;if(this.map.fractionalZoom){var low=Math.floor(zoom);var high=Math.ceil(zoom);resolution=this.resolutions[low]-
-((zoom-low)*(this.resolutions[low]-this.resolutions[high]));}else{resolution=this.resolutions[Math.round(zoom)];}
-return resolution;},getZoomForResolution:function(resolution,closest){var zoom;if(this.map.fractionalZoom){var lowZoom=0;var highZoom=this.resolutions.length-1;var highRes=this.resolutions[lowZoom];var lowRes=this.resolutions[highZoom];var res;for(var i=0,len=this.resolutions.length;i<len;++i){res=this.resolutions[i];if(res>=resolution){highRes=res;lowZoom=i;}
-if(res<=resolution){lowRes=res;highZoom=i;break;}}
-var dRes=highRes-lowRes;if(dRes>0){zoom=lowZoom+((highRes-resolution)/dRes);}else{zoom=lowZoom;}}else{var diff;var minDiff=Number.POSITIVE_INFINITY;for(var i=0,len=this.resolutions.length;i<len;i++){if(closest){diff=Math.abs(this.resolutions[i]-resolution);if(diff>minDiff){break;}
-minDiff=diff;}else{if(this.resolutions[i]<resolution){break;}}}
-zoom=Math.max(0,i-1);}
-return zoom;},getLonLatFromViewPortPx:function(viewPortPx){var lonlat=null;if(viewPortPx!=null){var size=this.map.getSize();var center=this.map.getCenter();if(center){var res=this.map.getResolution();var delta_x=viewPortPx.x-(size.w/2);var delta_y=viewPortPx.y-(size.h/2);lonlat=new OpenLayers.LonLat(center.lon+delta_x*res,center.lat-delta_y*res);if(this.wrapDateLine){lonlat=lonlat.wrapDateLine(this.maxExtent);}}}
-return lonlat;},getViewPortPxFromLonLat:function(lonlat){var px=null;if(lonlat!=null){var resolution=this.map.getResolution();var extent=this.map.getExtent();px=new OpenLayers.Pixel((1/resolution*(lonlat.lon-extent.left)),(1/resolution*(extent.top-lonlat.lat)));}
-return px;},setOpacity:function(opacity){if(opacity!=this.opacity){this.opacity=opacity;for(var i=0,len=this.div.childNodes.length;i<len;++i){var element=this.div.childNodes[i].firstChild;OpenLayers.Util.modifyDOMElement(element,null,null,null,null,null,null,opacity);}
-if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"opacity"});}}},getZIndex:function(){return this.div.style.zIndex;},setZIndex:function(zIndex){this.div.style.zIndex=zIndex;},adjustBounds:function(bounds){if(this.gutter){var mapGutter=this.gutter*this.map.getResolution();bounds=new OpenLayers.Bounds(bounds.left-mapGutter,bounds.bottom-mapGutter,bounds.right+mapGutter,bounds.top+mapGutter);}
-if(this.wrapDateLine){var wrappingOptions={'rightTolerance':this.getResolution()};bounds=bounds.wrapDateLine(this.maxExtent,wrappingOptions);}
-return bounds;},CLASS_NAME:"OpenLayers.Layer"});OpenLayers.Marker.Box=OpenLayers.Class(OpenLayers.Marker,{bounds:null,div:null,initialize:function(bounds,borderColor,borderWidth){this.bounds=bounds;this.div=OpenLayers.Util.createDiv();this.div.style.overflow='hidden';this.events=new OpenLayers.Events(this,this.div,null);this.setBorder(borderColor,borderWidth);},destroy:function(){this.bounds=null;this.div=null;OpenLayers.Marker.prototype.destroy.apply(this,arguments);},setBorder:function(color,width){if(!color){color="red";}
-if(!width){width=2;}
-this.div.style.border=width+"px solid "+color;},draw:function(px,sz){OpenLayers.Util.modifyDOMElement(this.div,null,px,sz);return this.div;},onScreen:function(){var onScreen=false;if(this.map){var screenBounds=this.map.getExtent();onScreen=screenBounds.containsBounds(this.bounds,true,true);}
-return onScreen;},display:function(display){this.div.style.display=(display)?"":"none";},CLASS_NAME:"OpenLayers.Marker.Box"});(function(){var oXMLHttpRequest=window.XMLHttpRequest;var bGecko=!!window.controllers,bIE=window.document.all&&!window.opera,bIE7=bIE&&window.navigator.userAgent.match(/MSIE ([\.0-9]+)/)&&RegExp.$1==7;function cXMLHttpRequest(){this._object=oXMLHttpRequest&&!bIE7?new oXMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");this._listeners=[];};if(bGecko&&oXMLHttpRequest.wrapped)
-cXMLHttpRequest.wrapped=oXMLHttpRequest.wrapped;cXMLHttpRequest.UNSENT=0;cXMLHttpRequest.OPENED=1;cXMLHttpRequest.HEADERS_RECEIVED=2;cXMLHttpRequest.LOADING=3;cXMLHttpRequest.DONE=4;cXMLHttpRequest.prototype.readyState=cXMLHttpRequest.UNSENT;cXMLHttpRequest.prototype.responseText='';cXMLHttpRequest.prototype.responseXML=null;cXMLHttpRequest.prototype.status=0;cXMLHttpRequest.prototype.statusText='';cXMLHttpRequest.prototype.onreadystatechange=null;cXMLHttpRequest.onreadystatechange=null;cXMLHttpRequest.onopen=null;cXMLHttpRequest.onsend=null;cXMLHttpRequest.onabort=null;cXMLHttpRequest.prototype.open=function(sMethod,sUrl,bAsync,sUser,sPassword){delete this._headers;if(arguments.length<3)
-bAsync=true;this._async=bAsync;var oRequest=this,nState=this.readyState,fOnUnload;if(bIE&&bAsync){fOnUnload=function(){if(nState!=cXMLHttpRequest.DONE){fCleanTransport(oRequest);oRequest.abort();}};window.attachEvent("onunload",fOnUnload);}
-if(cXMLHttpRequest.onopen)
-cXMLHttpRequest.onopen.apply(this,arguments);if(arguments.length>4)
-this._object.open(sMethod,sUrl,bAsync,sUser,sPassword);else
-if(arguments.length>3)
-this._object.open(sMethod,sUrl,bAsync,sUser);else
-this._object.open(sMethod,sUrl,bAsync);if(!bGecko&&!bIE){this.readyState=cXMLHttpRequest.OPENED;fReadyStateChange(this);}
-this._object.onreadystatechange=function(){if(bGecko&&!bAsync)
-return;oRequest.readyState=oRequest._object.readyState;fSynchronizeValues(oRequest);if(oRequest._aborted){oRequest.readyState=cXMLHttpRequest.UNSENT;return;}
-if(oRequest.readyState==cXMLHttpRequest.DONE){fCleanTransport(oRequest);if(bIE&&bAsync)
-window.detachEvent("onunload",fOnUnload);}
-if(nState!=oRequest.readyState)
-fReadyStateChange(oRequest);nState=oRequest.readyState;}};cXMLHttpRequest.prototype.send=function(vData){if(cXMLHttpRequest.onsend)
-cXMLHttpRequest.onsend.apply(this,arguments);if(vData&&vData.nodeType){vData=window.XMLSerializer?new window.XMLSerializer().serializeToString(vData):vData.xml;if(!this._headers["Content-Type"])
-this._object.setRequestHeader("Content-Type","application/xml");}
-this._object.send(vData);if(bGecko&&!this._async){this.readyState=cXMLHttpRequest.OPENED;fSynchronizeValues(this);while(this.readyState<cXMLHttpRequest.DONE){this.readyState++;fReadyStateChange(this);if(this._aborted)
-return;}}};cXMLHttpRequest.prototype.abort=function(){if(cXMLHttpRequest.onabort)
-cXMLHttpRequest.onabort.apply(this,arguments);if(this.readyState>cXMLHttpRequest.UNSENT)
-this._aborted=true;this._object.abort();fCleanTransport(this);};cXMLHttpRequest.prototype.getAllResponseHeaders=function(){return this._object.getAllResponseHeaders();};cXMLHttpRequest.prototype.getResponseHeader=function(sName){return this._object.getResponseHeader(sName);};cXMLHttpRequest.prototype.setRequestHeader=function(sName,sValue){if(!this._headers)
-this._headers={};this._headers[sName]=sValue;return this._object.setRequestHeader(sName,sValue);};cXMLHttpRequest.prototype.addEventListener=function(sName,fHandler,bUseCapture){for(var nIndex=0,oListener;oListener=this._listeners[nIndex];nIndex++)
-if(oListener[0]==sName&&oListener[1]==fHandler&&oListener[2]==bUseCapture)
-return;this._listeners.push([sName,fHandler,bUseCapture]);};cXMLHttpRequest.prototype.removeEventListener=function(sName,fHandler,bUseCapture){for(var nIndex=0,oListener;oListener=this._listeners[nIndex];nIndex++)
-if(oListener[0]==sName&&oListener[1]==fHandler&&oListener[2]==bUseCapture)
-break;if(oListener)
-this._listeners.splice(nIndex,1);};cXMLHttpRequest.prototype.dispatchEvent=function(oEvent){var oEventPseudo={'type':oEvent.type,'target':this,'currentTarget':this,'eventPhase':2,'bubbles':oEvent.bubbles,'cancelable':oEvent.cancelable,'timeStamp':oEvent.timeStamp,'stopPropagation':function(){},'preventDefault':function(){},'initEvent':function(){}};if(oEventPseudo.type=="readystatechange"&&this.onreadystatechange)
-(this.onreadystatechange.handleEvent||this.onreadystatechange).apply(this,[oEventPseudo]);for(var nIndex=0,oListener;oListener=this._listeners[nIndex];nIndex++)
-if(oListener[0]==oEventPseudo.type&&!oListener[2])
-(oListener[1].handleEvent||oListener[1]).apply(this,[oEventPseudo]);};cXMLHttpRequest.prototype.toString=function(){return'['+"object"+' '+"XMLHttpRequest"+']';};cXMLHttpRequest.toString=function(){return'['+"XMLHttpRequest"+']';};function fReadyStateChange(oRequest){if(cXMLHttpRequest.onreadystatechange)
-cXMLHttpRequest.onreadystatechange.apply(oRequest);oRequest.dispatchEvent({'type':"readystatechange",'bubbles':false,'cancelable':false,'timeStamp':new Date+0});};function fGetDocument(oRequest){var oDocument=oRequest.responseXML,sResponse=oRequest.responseText;if(bIE&&sResponse&&oDocument&&!oDocument.documentElement&&oRequest.getResponseHeader("Content-Type").match(/[^\/]+\/[^\+]+\+xml/)){oDocument=new window.ActiveXObject("Microsoft.XMLDOM");oDocument.async=false;oDocument.validateOnParse=false;oDocument.loadXML(sResponse);}
-if(oDocument)
-if((bIE&&oDocument.parseError!=0)||!oDocument.documentElement||(oDocument.documentElement&&oDocument.documentElement.tagName=="parsererror"))
-return null;return oDocument;};function fSynchronizeValues(oRequest){try{oRequest.responseText=oRequest._object.responseText;}catch(e){}
-try{oRequest.responseXML=fGetDocument(oRequest._object);}catch(e){}
-try{oRequest.status=oRequest._object.status;}catch(e){}
-try{oRequest.statusText=oRequest._object.statusText;}catch(e){}};function fCleanTransport(oRequest){oRequest._object.onreadystatechange=new window.Function;};if(!window.Function.prototype.apply){window.Function.prototype.apply=function(oRequest,oArguments){if(!oArguments)
-oArguments=[];oRequest.__func=this;oRequest.__func(oArguments[0],oArguments[1],oArguments[2],oArguments[3],oArguments[4]);delete oRequest.__func;};};OpenLayers.Request.XMLHttpRequest=cXMLHttpRequest;})();OpenLayers.Tile.Image.IFrame=OpenLayers.Class(OpenLayers.Tile.Image,{initialize:function(layer,position,bounds,url,size){OpenLayers.Tile.Image.prototype.initialize.apply(this,arguments);this.layerAlphaHack=false;},destroy:function(){if(this.imgDiv!=null){OpenLayers.Event.stopObservingElement(this.imgDiv.firstChild);}
-OpenLayers.Tile.Image.prototype.destroy.apply(this,arguments);},clear:function(){if(this.imgDiv){var iFrame=this.imgDiv.firstChild;OpenLayers.Event.stopObservingElement(iFrame);this.imgDiv.removeChild(iFrame);}},clone:function(obj){if(obj==null){obj=new OpenLayers.Tile.Image.IFrame(this.layer,this.position,this.bounds,this.url,this.size);}
-obj=OpenLayers.Tile.Image.prototype.clone.apply(this,[obj]);return obj;},renderTile:function(){if(OpenLayers.Tile.Image.prototype.renderTile.apply(this,arguments)){var form=this.createRequestForm();this.imgDiv.appendChild(form);form.submit();this.imgDiv.removeChild(form);}},initImgDiv:function(){this.imgDiv=this.createImgDiv();OpenLayers.Util.modifyDOMElement(this.imgDiv,this.id,null,this.layer.getImageSize(),"relative");this.imgDiv.className='olTileImage';this.frame.appendChild(this.imgDiv);this.layer.div.appendChild(this.frame);if(this.layer.opacity!=null){OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,null,null,null,null,this.layer.opacity);}
-this.imgDiv.map=this.layer.map;},createImgDiv:function(){var eventPane=document.createElement("div");if(OpenLayers.Util.getBrowserName()=="msie"){eventPane.style.backgroundColor='#FFFFFF';eventPane.style.filter='chroma(color=#FFFFFF)';}
-OpenLayers.Util.modifyDOMElement(eventPane,null,new OpenLayers.Pixel(0,0),this.layer.getImageSize(),"absolute");var imgDiv=document.createElement("div");imgDiv.appendChild(eventPane);return imgDiv;},createIFrame:function(){var id=this.id+'_iFrame';var iframe;if(OpenLayers.Util.getBrowserName()=="msie"){iframe=document.createElement('<iframe name="'+id+'">');iframe.style.backgroundColor='#FFFFFF';iframe.style.filter='chroma(color=#FFFFFF)';}
-else{iframe=document.createElement('iframe');iframe.style.backgroundColor='transparent';iframe.name=id;}
-iframe.id=id;iframe.scrolling='no';iframe.marginWidth='0px';iframe.marginHeight='0px';iframe.frameBorder='0';OpenLayers.Util.modifyDOMElement(iframe,id,new OpenLayers.Pixel(0,0),this.layer.getImageSize(),"absolute");var onload=function(){this.show();if(this.isLoading){this.isLoading=false;this.events.triggerEvent("loadend");}};OpenLayers.Event.observe(iframe,'load',OpenLayers.Function.bind(onload,this));return iframe;},createRequestForm:function(){var form=document.createElement('form');form.method='POST';var cacheId=this.layer.params["_OLSALT"];cacheId=(cacheId?cacheId+"_":"")+this.bounds.toBBOX();form.action=OpenLayers.Util.urlAppend(this.layer.url,cacheId);this.imgDiv.insertBefore(this.createIFrame(),this.imgDiv.firstChild);form.target=this.id+'_iFrame';var imageSize=this.layer.getImageSize();var params=OpenLayers.Util.extend({"BBOX":this.encodeBBOX?this.bounds.toBBOX():this.bounds.toArray(),"WIDTH":imageSize.w,"HEIGHT":imageSize.h},this.layer.params);for(var par in params){var field=document.createElement('input');field.type='hidden';field.name=par;field.value=params[par];form.appendChild(field);}
-return form;},CLASS_NAME:"OpenLayers.Tile.Image.IFrame"});OpenLayers.ProxyHost="";OpenLayers.nullHandler=function(request){OpenLayers.Console.userError(OpenLayers.i18n("unhandledRequest",{'statusText':request.statusText}));};OpenLayers.loadURL=function(uri,params,caller,onComplete,onFailure){if(typeof params=='string'){params=OpenLayers.Util.getParameters(params);}
-var success=(onComplete)?onComplete:OpenLayers.nullHandler;var failure=(onFailure)?onFailure:OpenLayers.nullHandler;return OpenLayers.Request.GET({url:uri,params:params,success:success,failure:failure,scope:caller});};OpenLayers.parseXMLString=function(text){var index=text.indexOf('<');if(index>0){text=text.substring(index);}
-var ajaxResponse=OpenLayers.Util.Try(function(){var xmldom=new ActiveXObject('Microsoft.XMLDOM');xmldom.loadXML(text);return xmldom;},function(){return new DOMParser().parseFromString(text,'text/xml');},function(){var req=new XMLHttpRequest();req.open("GET","data:"+"text/xml"+";charset=utf-8,"+encodeURIComponent(text),false);if(req.overrideMimeType){req.overrideMimeType("text/xml");}
-req.send(null);return req.responseXML;});return ajaxResponse;};OpenLayers.Ajax={emptyFunction:function(){},getTransport:function(){return OpenLayers.Util.Try(function(){return new XMLHttpRequest();},function(){return new ActiveXObject('Msxml2.XMLHTTP');},function(){return new ActiveXObject('Microsoft.XMLHTTP');})||false;},activeRequestCount:0};OpenLayers.Ajax.Responders={responders:[],register:function(responderToAdd){for(var i=0;i<this.responders.length;i++){if(responderToAdd==this.responders[i]){return;}}
-this.responders.push(responderToAdd);},unregister:function(responderToRemove){OpenLayers.Util.removeItem(this.reponders,responderToRemove);},dispatch:function(callback,request,transport){var responder;for(var i=0;i<this.responders.length;i++){responder=this.responders[i];if(responder[callback]&&typeof responder[callback]=='function'){try{responder[callback].apply(responder,[request,transport]);}catch(e){}}}}};OpenLayers.Ajax.Responders.register({onCreate:function(){OpenLayers.Ajax.activeRequestCount++;},onComplete:function(){OpenLayers.Ajax.activeRequestCount--;}});OpenLayers.Ajax.Base=OpenLayers.Class({initialize:function(options){this.options={method:'post',asynchronous:true,contentType:'application/xml',parameters:''};OpenLayers.Util.extend(this.options,options||{});this.options.method=this.options.method.toLowerCase();if(typeof this.options.parameters=='string'){this.options.parameters=OpenLayers.Util.getParameters(this.options.parameters);}}});OpenLayers.Ajax.Request=OpenLayers.Class(OpenLayers.Ajax.Base,{_complete:false,initialize:function(url,options){OpenLayers.Ajax.Base.prototype.initialize.apply(this,[options]);if(OpenLayers.ProxyHost&&OpenLayers.String.startsWith(url,"http")){url=OpenLayers.ProxyHost+encodeURIComponent(url);}
-this.transport=OpenLayers.Ajax.getTransport();this.request(url);},request:function(url){this.url=url;this.method=this.options.method;var params=OpenLayers.Util.extend({},this.options.parameters);if(this.method!='get'&&this.method!='post'){params['_method']=this.method;this.method='post';}
-this.parameters=params;if(params=OpenLayers.Util.getParameterString(params)){if(this.method=='get'){this.url+=((this.url.indexOf('?')>-1)?'&':'?')+params;}else if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){params+='&_=';}}
-try{var response=new OpenLayers.Ajax.Response(this);if(this.options.onCreate){this.options.onCreate(response);}
-OpenLayers.Ajax.Responders.dispatch('onCreate',this,response);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){window.setTimeout(OpenLayers.Function.bind(this.respondToReadyState,this,1),10);}
-this.transport.onreadystatechange=OpenLayers.Function.bind(this.onStateChange,this);this.setRequestHeaders();this.body=this.method=='post'?(this.options.postBody||params):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange();}}catch(e){this.dispatchException(e);}},onStateChange:function(){var readyState=this.transport.readyState;if(readyState>1&&!((readyState==4)&&this._complete)){this.respondToReadyState(this.transport.readyState);}},setRequestHeaders:function(){var headers={'X-Requested-With':'XMLHttpRequest','Accept':'text/javascript, text/html, application/xml, text/xml, */*','OpenLayers':true};if(this.method=='post'){headers['Content-type']=this.options.contentType+
-(this.options.encoding?'; charset='+this.options.encoding:'');if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){headers['Connection']='close';}}
-if(typeof this.options.requestHeaders=='object'){var extras=this.options.requestHeaders;if(typeof extras.push=='function'){for(var i=0,length=extras.length;i<length;i+=2){headers[extras[i]]=extras[i+1];}}else{for(var i in extras){headers[i]=extras[i];}}}
-for(var name in headers){this.transport.setRequestHeader(name,headers[name]);}},success:function(){var status=this.getStatus();return!status||(status>=200&&status<300);},getStatus:function(){try{return this.transport.status||0;}catch(e){return 0;}},respondToReadyState:function(readyState){var state=OpenLayers.Ajax.Request.Events[readyState];var response=new OpenLayers.Ajax.Response(this);if(state=='Complete'){try{this._complete=true;(this.options['on'+response.status]||this.options['on'+(this.success()?'Success':'Failure')]||OpenLayers.Ajax.emptyFunction)(response);}catch(e){this.dispatchException(e);}
-var contentType=response.getHeader('Content-type');}
-try{(this.options['on'+state]||OpenLayers.Ajax.emptyFunction)(response);OpenLayers.Ajax.Responders.dispatch('on'+state,this,response);}catch(e){this.dispatchException(e);}
-if(state=='Complete'){this.transport.onreadystatechange=OpenLayers.Ajax.emptyFunction;}},getHeader:function(name){try{return this.transport.getResponseHeader(name);}catch(e){return null;}},dispatchException:function(exception){var handler=this.options.onException;if(handler){handler(this,exception);OpenLayers.Ajax.Responders.dispatch('onException',this,exception);}else{var listener=false;var responders=OpenLayers.Ajax.Responders.responders;for(var i=0;i<responders.length;i++){if(responders[i].onException){listener=true;break;}}
-if(listener){OpenLayers.Ajax.Responders.dispatch('onException',this,exception);}else{throw exception;}}}});OpenLayers.Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];OpenLayers.Ajax.Response=OpenLayers.Class({status:0,statusText:'',initialize:function(request){this.request=request;var transport=this.transport=request.transport,readyState=this.readyState=transport.readyState;if((readyState>2&&!(!!(window.attachEvent&&!window.opera)))||readyState==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=transport.responseText==null?'':String(transport.responseText);}
-if(readyState==4){var xml=transport.responseXML;this.responseXML=xml===undefined?null:xml;}},getStatus:OpenLayers.Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||'';}catch(e){return'';}},getHeader:OpenLayers.Ajax.Request.prototype.getHeader,getResponseHeader:function(name){return this.transport.getResponseHeader(name);}});OpenLayers.Ajax.getElementsByTagNameNS=function(parentnode,nsuri,nsprefix,tagname){var elem=null;if(parentnode.getElementsByTagNameNS){elem=parentnode.getElementsByTagNameNS(nsuri,tagname);}else{elem=parentnode.getElementsByTagName(nsprefix+':'+tagname);}
-return elem;};OpenLayers.Ajax.serializeXMLToString=function(xmldom){var serializer=new XMLSerializer();var data=serializer.serializeToString(xmldom);return data;};OpenLayers.Control.DragFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,onStart:function(feature,pixel){},onDrag:function(feature,pixel){},onComplete:function(feature,pixel){},documentDrag:false,layer:null,feature:null,dragCallbacks:{},featureCallbacks:{},lastPixel:null,initialize:function(layer,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.layer=layer;this.handlers={drag:new OpenLayers.Handler.Drag(this,OpenLayers.Util.extend({down:this.downFeature,move:this.moveFeature,up:this.upFeature,out:this.cancel,done:this.doneDragging},this.dragCallbacks),{documentDrag:this.documentDrag}),feature:new OpenLayers.Handler.Feature(this,this.layer,OpenLayers.Util.extend({over:this.overFeature,out:this.outFeature},this.featureCallbacks),{geometryTypes:this.geometryTypes})};},destroy:function(){this.layer=null;OpenLayers.Control.prototype.destroy.apply(this,[]);},activate:function(){return(this.handlers.feature.activate()&&OpenLayers.Control.prototype.activate.apply(this,arguments));},deactivate:function(){this.handlers.drag.deactivate();this.handlers.feature.deactivate();this.feature=null;this.dragging=false;this.lastPixel=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over");return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},overFeature:function(feature){if(!this.handlers.drag.dragging){this.feature=feature;this.handlers.drag.activate();this.over=true;OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass+"Over");}else{if(this.feature.id==feature.id){this.over=true;}else{this.over=false;}}},downFeature:function(pixel){this.lastPixel=pixel;this.onStart(this.feature,pixel);},moveFeature:function(pixel){var res=this.map.getResolution();this.feature.geometry.move(res*(pixel.x-this.lastPixel.x),res*(this.lastPixel.y-pixel.y));this.layer.drawFeature(this.feature);this.lastPixel=pixel;this.onDrag(this.feature,pixel);},upFeature:function(pixel){if(!this.over){this.handlers.drag.deactivate();}},doneDragging:function(pixel){this.onComplete(this.feature,pixel);},outFeature:function(feature){if(!this.handlers.drag.dragging){this.over=false;this.handlers.drag.deactivate();OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over");this.feature=null;}else{if(this.feature.id==feature.id){this.over=false;}}},cancel:function(){this.handlers.drag.deactivate();this.over=false;},setMap:function(map){this.handlers.drag.setMap(map);this.handlers.feature.setMap(map);OpenLayers.Control.prototype.setMap.apply(this,arguments);},CLASS_NAME:"OpenLayers.Control.DragFeature"});OpenLayers.Control.DragPan=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,panned:false,interval:25,documentDrag:false,draw:function(){this.handler=new OpenLayers.Handler.Drag(this,{"move":this.panMap,"done":this.panMapDone},{interval:this.interval,documentDrag:this.documentDrag});},panMap:function(xy){this.panned=true;this.map.pan(this.handler.last.x-xy.x,this.handler.last.y-xy.y,{dragging:this.handler.dragging,animate:false});},panMapDone:function(xy){if(this.panned){this.panMap(xy);this.panned=false;}},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.Control.KeyboardDefaults=OpenLayers.Class(OpenLayers.Control,{autoActivate:true,slideFactor:75,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){if(this.handler){this.handler.destroy();}
-this.handler=null;OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){this.handler=new OpenLayers.Handler.Keyboard(this,{"keydown":this.defaultKeyPress});},defaultKeyPress:function(evt){switch(evt.keyCode){case OpenLayers.Event.KEY_LEFT:this.map.pan(-this.slideFactor,0);break;case OpenLayers.Event.KEY_RIGHT:this.map.pan(this.slideFactor,0);break;case OpenLayers.Event.KEY_UP:this.map.pan(0,-this.slideFactor);break;case OpenLayers.Event.KEY_DOWN:this.map.pan(0,this.slideFactor);break;case 33:var size=this.map.getSize();this.map.pan(0,-0.75*size.h);break;case 34:var size=this.map.getSize();this.map.pan(0,0.75*size.h);break;case 35:var size=this.map.getSize();this.map.pan(0.75*size.w,0);break;case 36:var size=this.map.getSize();this.map.pan(-0.75*size.w,0);break;case 43:case 61:case 187:case 107:this.map.zoomIn();break;case 45:case 109:case 189:case 95:this.map.zoomOut();break;}},CLASS_NAME:"OpenLayers.Control.KeyboardDefaults"});OpenLayers.Control.WMSGetFeatureInfo=OpenLayers.Class(OpenLayers.Control,{hover:false,drillDown:false,maxFeatures:10,clickCallback:"click",layers:null,queryVisible:false,url:null,layerUrls:null,infoFormat:'text/html',vendorParams:{},format:null,formatOptions:null,handlerOptions:null,handler:null,hoverRequest:null,EVENT_TYPES:["beforegetfeatureinfo","nogetfeatureinfo","getfeatureinfo"],initialize:function(options){this.EVENT_TYPES=OpenLayers.Control.WMSGetFeatureInfo.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);options=options||{};options.handlerOptions=options.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[options]);if(!this.format){this.format=new OpenLayers.Format.WMSGetFeatureInfo(options.formatOptions);}
-if(this.drillDown===true){this.hover=false;}
-if(this.hover){this.handler=new OpenLayers.Handler.Hover(this,{'move':this.cancelHover,'pause':this.getInfoForHover},OpenLayers.Util.extend(this.handlerOptions.hover||{},{'delay':250}));}else{var callbacks={};callbacks[this.clickCallback]=this.getInfoForClick;this.handler=new OpenLayers.Handler.Click(this,callbacks,this.handlerOptions.click||{});}},activate:function(){if(!this.active){this.handler.activate();}
-return OpenLayers.Control.prototype.activate.apply(this,arguments);},deactivate:function(){return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},getInfoForClick:function(evt){this.events.triggerEvent("beforegetfeatureinfo",{xy:evt.xy});OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait");this.request(evt.xy,{});},getInfoForHover:function(evt){this.events.triggerEvent("beforegetfeatureinfo",{xy:evt.xy});this.request(evt.xy,{hover:true});},cancelHover:function(){if(this.hoverRequest){this.hoverRequest.abort();this.hoverRequest=null;}},findLayers:function(){var candidates=this.layers||this.map.layers;var layers=[];var layer,url;for(var i=0,len=candidates.length;i<len;++i){layer=candidates[i];if(layer instanceof OpenLayers.Layer.WMS&&(!this.queryVisible||layer.getVisibility())){url=layer.url instanceof Array?layer.url[0]:layer.url;if(this.drillDown===false&&!this.url){this.url=url;}
-if(this.drillDown===true||this.urlMatches(url)){layers.push(layer);}}}
-return layers;},urlMatches:function(url){var matches=OpenLayers.Util.isEquivalentUrl(this.url,url);if(!matches&&this.layerUrls){for(var i=0,len=this.layerUrls.length;i<len;++i){if(OpenLayers.Util.isEquivalentUrl(this.layerUrls[i],url)){matches=true;break;}}}
-return matches;},buildWMSOptions:function(url,layers,clickPosition,format){var layerNames=[],styleNames=[];for(var i=0,len=layers.length;i<len;i++){layerNames=layerNames.concat(layers[i].params.LAYERS);styleNames=styleNames.concat(this.getStyleNames(layers[i]));}
-var params=OpenLayers.Util.extend({service:"WMS",version:layers[0].params.VERSION,request:"GetFeatureInfo",layers:layerNames,query_layers:layerNames,styles:styleNames,bbox:this.map.getExtent().toBBOX(null,layers[0].reverseAxisOrder()),feature_count:this.maxFeatures,height:this.map.getSize().h,width:this.map.getSize().w,format:format,info_format:this.infoFormat},(parseFloat(layers[0].params.VERSION)>=1.3)?{crs:this.map.getProjection(),i:clickPosition.x,j:clickPosition.y}:{srs:this.map.getProjection(),x:clickPosition.x,y:clickPosition.y});OpenLayers.Util.applyDefaults(params,this.vendorParams);return{url:url,params:OpenLayers.Util.upperCaseObject(params),callback:function(request){this.handleResponse(clickPosition,request);},scope:this};},getStyleNames:function(layer){var styleNames;if(layer.params.STYLES){styleNames=layer.params.STYLES;}else{if(layer.params.LAYERS instanceof Array){styleNames=new Array(layer.params.LAYERS.length);}else{styleNames=layer.params.LAYERS.replace(/[^,]/g,"");}}
-return styleNames;},request:function(clickPosition,options){var layers=this.findLayers();if(layers.length==0){this.events.triggerEvent("nogetfeatureinfo");OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");return;}
-options=options||{};if(this.drillDown===false){var wmsOptions=this.buildWMSOptions(this.url,layers,clickPosition,layers[0].params.FORMAT);var request=OpenLayers.Request.GET(wmsOptions);if(options.hover===true){this.hoverRequest=request;}}else{this._requestCount=0;this._numRequests=0;this.features=[];var services={},url;for(var i=0,len=layers.length;i<len;i++){var layer=layers[i];var service,found=false;url=layer.url instanceof Array?layer.url[0]:layer.url;if(url in services){services[url].push(layer);}else{this._numRequests++;services[url]=[layer];}}
-var layers;for(var url in services){layers=services[url];var wmsOptions=this.buildWMSOptions(url,layers,clickPosition,layers[0].params.FORMAT);OpenLayers.Request.GET(wmsOptions);}}},triggerGetFeatureInfo:function(request,xy,features){this.events.triggerEvent("getfeatureinfo",{text:request.responseText,features:features,request:request,xy:xy});OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");},handleResponse:function(xy,request){var doc=request.responseXML;if(!doc||!doc.documentElement){doc=request.responseText;}
-var features=this.format.read(doc);if(this.drillDown===false){this.triggerGetFeatureInfo(request,xy,features);}else{this._requestCount++;this._features=(this._features||[]).concat(features);if(this._requestCount===this._numRequests){this.triggerGetFeatureInfo(request,xy,this._features.concat());delete this._features;delete this._requestCount;delete this._numRequests;}}},CLASS_NAME:"OpenLayers.Control.WMSGetFeatureInfo"});OpenLayers.Control.WMTSGetFeatureInfo=OpenLayers.Class(OpenLayers.Control,{hover:false,requestEncoding:"KVP",drillDown:false,maxFeatures:10,clickCallback:"click",layers:null,queryVisible:true,infoFormat:'text/html',vendorParams:{},format:null,formatOptions:null,handlerOptions:null,handler:null,hoverRequest:null,EVENT_TYPES:["beforegetfeatureinfo","getfeatureinfo","exception"],pending:0,initialize:function(options){this.EVENT_TYPES=OpenLayers.Control.WMTSGetFeatureInfo.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);options=options||{};options.handlerOptions=options.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[options]);if(!this.format){this.format=new OpenLayers.Format.WMSGetFeatureInfo(options.formatOptions);}
-if(this.drillDown===true){this.hover=false;}
-if(this.hover){this.handler=new OpenLayers.Handler.Hover(this,{move:this.cancelHover,pause:this.getInfoForHover},OpenLayers.Util.extend(this.handlerOptions.hover||{},{delay:250}));}else{var callbacks={};callbacks[this.clickCallback]=this.getInfoForClick;this.handler=new OpenLayers.Handler.Click(this,callbacks,this.handlerOptions.click||{});}},activate:function(){if(!this.active){this.handler.activate();}
-return OpenLayers.Control.prototype.activate.apply(this,arguments);},deactivate:function(){return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},getInfoForClick:function(evt){this.request(evt.xy,{});},getInfoForHover:function(evt){this.request(evt.xy,{hover:true});},cancelHover:function(){if(this.hoverRequest){--this.pending;if(this.pending<=0){OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");this.pending=0;}
-this.hoverRequest.abort();this.hoverRequest=null;}},findLayers:function(){var candidates=this.layers||this.map.layers;var layers=[];var layer;for(var i=candidates.length-1;i>=0;--i){layer=candidates[i];if(layer instanceof OpenLayers.Layer.WMTS&&layer.requestEncoding===this.requestEncoding&&(!this.queryVisible||layer.getVisibility())){layers.push(layer);if(!this.drillDown||this.hover){break;}}}
-return layers;},buildRequestOptions:function(layer,xy){var loc=this.map.getLonLatFromPixel(xy);var getTileUrl=layer.getURL(new OpenLayers.Bounds(loc.lon,loc.lat,loc.lon,loc.lat));var params=OpenLayers.Util.getParameters(getTileUrl);var tileInfo=layer.getTileInfo(loc);OpenLayers.Util.extend(params,{service:"WMTS",version:layer.version,request:"GetFeatureInfo",infoFormat:this.infoFormat,i:tileInfo.i,j:tileInfo.j});OpenLayers.Util.applyDefaults(params,this.vendorParams);return{url:layer.url instanceof Array?layer.url[0]:layer.url,params:OpenLayers.Util.upperCaseObject(params),callback:function(request){this.handleResponse(xy,request,layer);},scope:this};},request:function(xy,options){options=options||{};var layers=this.findLayers();if(layers.length>0){var issue,layer;for(var i=0,len=layers.length;i<len;i++){layer=layers[i];issue=this.events.triggerEvent("beforegetfeatureinfo",{xy:xy,layer:layer});if(issue!==false){++this.pending;var requestOptions=this.buildRequestOptions(layer,xy);var request=OpenLayers.Request.GET(requestOptions);if(options.hover===true){this.hoverRequest=request;}}}
-if(this.pending>0){OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait");}}},handleResponse:function(xy,request,layer){--this.pending;if(this.pending<=0){OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");this.pending=0;}
-if(request.status&&(request.status<200||request.status>=300)){this.events.triggerEvent("exception",{xy:xy,request:request,layer:layer});}else{var doc=request.responseXML;if(!doc||!doc.documentElement){doc=request.responseText;}
-var features,except;try{features=this.format.read(doc);}catch(error){except=true;this.events.triggerEvent("exception",{xy:xy,request:request,error:error,layer:layer});}
-if(!except){this.events.triggerEvent("getfeatureinfo",{text:request.responseText,features:features,request:request,xy:xy,layer:layer});}}},setMap:function(map){this.handler.setMap(map);OpenLayers.Control.prototype.setMap.apply(this,arguments);},CLASS_NAME:"OpenLayers.Control.WMTSGetFeatureInfo"});OpenLayers.State={UNKNOWN:'Unknown',INSERT:'Insert',UPDATE:'Update',DELETE:'Delete'};OpenLayers.Feature.Vector=OpenLayers.Class(OpenLayers.Feature,{fid:null,geometry:null,attributes:null,bounds:null,state:null,style:null,url:null,renderIntent:"default",initialize:function(geometry,attributes,style){OpenLayers.Feature.prototype.initialize.apply(this,[null,null,attributes]);this.lonlat=null;this.geometry=geometry?geometry:null;this.state=null;this.attributes={};if(attributes){this.attributes=OpenLayers.Util.extend(this.attributes,attributes);}
-this.style=style?style:null;},destroy:function(){if(this.layer){this.layer.removeFeatures(this);this.layer=null;}
-this.geometry=null;OpenLayers.Feature.prototype.destroy.apply(this,arguments);},clone:function(){return new OpenLayers.Feature.Vector(this.geometry?this.geometry.clone():null,this.attributes,this.style);},onScreen:function(boundsOnly){var onScreen=false;if(this.layer&&this.layer.map){var screenBounds=this.layer.map.getExtent();if(boundsOnly){var featureBounds=this.geometry.getBounds();onScreen=screenBounds.intersectsBounds(featureBounds);}else{var screenPoly=screenBounds.toGeometry();onScreen=screenPoly.intersects(this.geometry);}}
-return onScreen;},getVisibility:function(){return!(this.style&&this.style.display=='none'||!this.layer||this.layer&&this.layer.styleMap&&this.layer.styleMap.createSymbolizer(this,this.renderIntent).display=='none'||this.layer&&!this.layer.getVisibility());},createMarker:function(){return null;},destroyMarker:function(){},createPopup:function(){return null;},atPoint:function(lonlat,toleranceLon,toleranceLat){var atPoint=false;if(this.geometry){atPoint=this.geometry.atPoint(lonlat,toleranceLon,toleranceLat);}
-return atPoint;},destroyPopup:function(){},move:function(location){if(!this.layer||!this.geometry.move){return;}
-var pixel;if(location.CLASS_NAME=="OpenLayers.LonLat"){pixel=this.layer.getViewPortPxFromLonLat(location);}else{pixel=location;}
-var lastPixel=this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat());var res=this.layer.map.getResolution();this.geometry.move(res*(pixel.x-lastPixel.x),res*(lastPixel.y-pixel.y));this.layer.drawFeature(this);return lastPixel;},toState:function(state){if(state==OpenLayers.State.UPDATE){switch(this.state){case OpenLayers.State.UNKNOWN:case OpenLayers.State.DELETE:this.state=state;break;case OpenLayers.State.UPDATE:case OpenLayers.State.INSERT:break;}}else if(state==OpenLayers.State.INSERT){switch(this.state){case OpenLayers.State.UNKNOWN:break;default:this.state=state;break;}}else if(state==OpenLayers.State.DELETE){switch(this.state){case OpenLayers.State.INSERT:break;case OpenLayers.State.DELETE:break;case OpenLayers.State.UNKNOWN:case OpenLayers.State.UPDATE:this.state=state;break;}}else if(state==OpenLayers.State.UNKNOWN){this.state=state;}},CLASS_NAME:"OpenLayers.Feature.Vector"});OpenLayers.Feature.Vector.style={'default':{fillColor:"#ee9900",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit"},'select':{fillColor:"blue",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer"},'temporary':{fillColor:"#66cccc",fillOpacity:0.2,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit"},'delete':{display:"none"}};OpenLayers.Feature.WFS=OpenLayers.Class(OpenLayers.Feature,{initialize:function(layer,xmlNode){var newArguments=arguments;var data=this.processXMLNode(xmlNode);newArguments=new Array(layer,data.lonlat,data);OpenLayers.Feature.prototype.initialize.apply(this,newArguments);this.createMarker();this.layer.addMarker(this.marker);},destroy:function(){if(this.marker!=null){this.layer.removeMarker(this.marker);}
-OpenLayers.Feature.prototype.destroy.apply(this,arguments);},processXMLNode:function(xmlNode){var point=OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,"http://www.opengis.net/gml","gml","Point");var text=OpenLayers.Util.getXmlNodeValue(OpenLayers.Ajax.getElementsByTagNameNS(point[0],"http://www.opengis.net/gml","gml","coordinates")[0]);var floats=text.split(",");return{lonlat:new OpenLayers.LonLat(parseFloat(floats[0]),parseFloat(floats[1])),id:null};},CLASS_NAME:"OpenLayers.Feature.WFS"});OpenLayers.Format.OWSCommon.v1_0_0=OpenLayers.Class(OpenLayers.Format.OWSCommon.v1,{namespaces:{ows:"http://www.opengis.net/ows/1.0",xlink:"http://www.w3.org/1999/xlink"},readers:{"ows":OpenLayers.Format.OWSCommon.v1.prototype.readers["ows"]},writers:{"ows":OpenLayers.Format.OWSCommon.v1.prototype.writers["ows"]},CLASS_NAME:"OpenLayers.Format.OWSCommon.v1_1_0"});OpenLayers.Format.OWSCommon.v1_1_0=OpenLayers.Class(OpenLayers.Format.OWSCommon.v1,{namespaces:{ows:"http://www.opengis.net/ows/1.1",xlink:"http://www.w3.org/1999/xlink"},readers:{"ows":OpenLayers.Util.applyDefaults({"AllowedValues":function(node,parameter){parameter.allowedValues={};this.readChildNodes(node,parameter.allowedValues);},"AnyValue":function(node,parameter){parameter.anyValue=true;},"Range":function(node,allowedValues){allowedValues.range={};this.readChildNodes(node,allowedValues.range);},"MinimumValue":function(node,range){range.minValue=this.getChildValue(node);},"MaximumValue":function(node,range){range.maxValue=this.getChildValue(node);},"Identifier":function(node,obj){obj.identifier=this.getChildValue(node);},"SupportedCRS":function(node,obj){obj.supportedCRS=this.getChildValue(node);}},OpenLayers.Format.OWSCommon.v1.prototype.readers["ows"])},CLASS_NAME:"OpenLayers.Format.OWSCommon.v1_1_0"});OpenLayers.Format.OWSContext=OpenLayers.Class(OpenLayers.Format.Context,{defaultVersion:"0.3.1",getParser:function(version){var v=version||this.version||this.defaultVersion;if(v==="0.3.0"){v=this.defaultVersion;}
-if(!this.parser||this.parser.VERSION!=v){var format=OpenLayers.Format.OWSContext["v"+v.replace(/\./g,"_")];if(!format){throw"Can't find a OWSContext parser for version "+v;}
-this.parser=new format(this.options);}
-return this.parser;},toContext:function(obj){var context={};if(obj.CLASS_NAME=="OpenLayers.Map"){context.bounds=obj.getExtent();context.maxExtent=obj.maxExtent;context.projection=obj.projection;context.size=obj.getSize();context.layers=obj.layers;}
-return context;},CLASS_NAME:"OpenLayers.Format.OWSContext"});OpenLayers.Format.WFSCapabilities.v1=OpenLayers.Class(OpenLayers.Format.WFSCapabilities,{initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);this.options=options;},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-var capabilities={};var root=data.documentElement;this.runChildNodes(capabilities,root);return capabilities;},runChildNodes:function(obj,node){var children=node.childNodes;var childNode,processor;for(var i=0;i<children.length;++i){childNode=children[i];if(childNode.nodeType==1){processor=this["read_cap_"+childNode.nodeName];if(processor){processor.apply(this,[obj,childNode]);}}}},read_cap_FeatureTypeList:function(request,node){var featureTypeList={featureTypes:[]};this.runChildNodes(featureTypeList,node);request.featureTypeList=featureTypeList;},read_cap_FeatureType:function(featureTypeList,node,parentLayer){var featureType={};this.runChildNodes(featureType,node);featureTypeList.featureTypes.push(featureType);},read_cap_Name:function(obj,node){var name=this.getChildValue(node);if(name){var parts=name.split(":");obj.name=parts.pop();if(parts.length>0){obj.featureNS=this.lookupNamespaceURI(node,parts[0]);}}},read_cap_Title:function(obj,node){var title=this.getChildValue(node);if(title){obj.title=title;}},read_cap_Abstract:function(obj,node){var abst=this.getChildValue(node);if(abst){obj["abstract"]=abst;}},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1"});OpenLayers.Format.WMC=OpenLayers.Class(OpenLayers.Format.Context,{defaultVersion:"1.1.0",getParser:function(version){var v=version||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=v){var format=OpenLayers.Format.WMC["v"+v.replace(/\./g,"_")];if(!format){throw"Can't find a WMC parser for version "+v;}
-this.parser=new format(this.options);}
-return this.parser;},layerToContext:function(layer){var parser=this.getParser();var layerContext={queryable:layer.queryable,visibility:layer.visibility,name:layer.params["LAYERS"],title:layer.name,metadataURL:layer.metadataURL,version:layer.params["VERSION"],url:layer.url,maxExtent:layer.maxExtent,transparent:layer.params["TRANSPARENT"],numZoomLevels:layer.numZoomLevels,units:layer.units,isBaseLayer:layer.isBaseLayer,opacity:layer.opacity,displayInLayerSwitcher:layer.displayInLayerSwitcher,singleTile:layer.singleTile,tileSize:(layer.singleTile||!layer.tileSize)?undefined:{width:layer.tileSize.w,height:layer.tileSize.h},minScale:(layer.options.resolutions||layer.options.scales||layer.options.maxResolution||layer.options.minScale)?layer.minScale:undefined,maxScale:(layer.options.resolutions||layer.options.scales||layer.options.minResolution||layer.options.maxScale)?layer.maxScale:undefined,formats:[{value:layer.params["FORMAT"],current:true}],styles:[{href:layer.params["SLD"],body:layer.params["SLD_BODY"],name:layer.params["STYLES"]||parser.defaultStyleName,title:parser.defaultStyleTitle,current:true}]};return layerContext;},toContext:function(obj){var context={};var layers=obj.layers;if(obj.CLASS_NAME=="OpenLayers.Map"){context.bounds=obj.getExtent();context.maxExtent=obj.maxExtent;context.projection=obj.projection;context.size=obj.getSize();}
-else{OpenLayers.Util.applyDefaults(context,obj);if(context.layers!=undefined){delete(context.layers);}}
-if(context.layersContext==undefined){context.layersContext=[];}
-if(layers!=undefined&&layers instanceof Array){for(var i=0,len=layers.length;i<len;i++){var layer=layers[i];if(layer instanceof OpenLayers.Layer.WMS){context.layersContext.push(this.layerToContext(layer));}}}
-return context;},CLASS_NAME:"OpenLayers.Format.WMC"});OpenLayers.Format.WMSCapabilities.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{wms:"http://www.opengis.net/wms",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"wms",initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-if(data&&data.nodeType==9){data=data.documentElement;}
-var capabilities={};this.readNode(data,capabilities);this.postProcessLayers(capabilities);return capabilities;},postProcessLayers:function(capabilities){if(capabilities.capability){capabilities.capability.layers=[];var layers=capabilities.capability.nestedLayers;for(var i=0,len=layers.length;i<len;++i){var layer=layers[i];this.processLayer(capabilities.capability,layer);}}},processLayer:function(capability,layer,parentLayer){if(layer.formats===undefined){layer.formats=capability.request.getmap.formats;}
-if(parentLayer){layer.styles=layer.styles.concat(parentLayer.styles);var attributes=["queryable","cascaded","fixedWidth","fixedHeight","opaque","noSubsets","llbbox","minScale","maxScale","attribution"];var complexAttr=["srs","bbox","dimensions","authorityURLs"];var key;for(var j=0;j<attributes.length;j++){key=attributes[j];if(key in parentLayer){if(layer[key]==null){layer[key]=parentLayer[key];}
-if(layer[key]==null){var intAttr=["cascaded","fixedWidth","fixedHeight"];var boolAttr=["queryable","opaque","noSubsets"];if(OpenLayers.Util.indexOf(intAttr,key)!=-1){layer[key]=0;}
-if(OpenLayers.Util.indexOf(boolAttr,key)!=-1){layer[key]=false;}}}}
-for(var j=0;j<complexAttr.length;j++){key=complexAttr[j];layer[key]=OpenLayers.Util.extend(layer[key],parentLayer[key]);}}
-for(var i=0,len=layer.nestedLayers.length;i<len;i++){var childLayer=layer.nestedLayers[i];this.processLayer(capability,childLayer,layer);}
-if(layer.name){capability.layers.push(layer);}},readers:{"wms":{"Service":function(node,obj){obj.service={};this.readChildNodes(node,obj.service);},"Name":function(node,obj){obj.name=this.getChildValue(node);},"Title":function(node,obj){obj.title=this.getChildValue(node);},"Abstract":function(node,obj){obj["abstract"]=this.getChildValue(node);},"BoundingBox":function(node,obj){var bbox={};bbox.bbox=[parseFloat(node.getAttribute("minx")),parseFloat(node.getAttribute("miny")),parseFloat(node.getAttribute("maxx")),parseFloat(node.getAttribute("maxy"))];var res={x:parseFloat(node.getAttribute("resx")),y:parseFloat(node.getAttribute("resy"))};if(!(isNaN(res.x)&&isNaN(res.y))){bbox.res=res;}
-return bbox;},"OnlineResource":function(node,obj){obj.href=this.getAttributeNS(node,this.namespaces.xlink,"href");},"ContactInformation":function(node,obj){obj.contactInformation={};this.readChildNodes(node,obj.contactInformation);},"ContactPersonPrimary":function(node,obj){obj.personPrimary={};this.readChildNodes(node,obj.personPrimary);},"ContactPerson":function(node,obj){obj.person=this.getChildValue(node);},"ContactOrganization":function(node,obj){obj.organization=this.getChildValue(node);},"ContactPosition":function(node,obj){obj.position=this.getChildValue(node);},"ContactAddress":function(node,obj){obj.contactAddress={};this.readChildNodes(node,obj.contactAddress);},"AddressType":function(node,obj){obj.type=this.getChildValue(node);},"Address":function(node,obj){obj.address=this.getChildValue(node);},"City":function(node,obj){obj.city=this.getChildValue(node);},"StateOrProvince":function(node,obj){obj.stateOrProvince=this.getChildValue(node);},"PostCode":function(node,obj){obj.postcode=this.getChildValue(node);},"Country":function(node,obj){obj.country=this.getChildValue(node);},"ContactVoiceTelephone":function(node,obj){obj.phone=this.getChildValue(node);},"ContactFacsimileTelephone":function(node,obj){obj.fax=this.getChildValue(node);},"ContactElectronicMailAddress":function(node,obj){obj.email=this.getChildValue(node);},"Fees":function(node,obj){var fees=this.getChildValue(node);if(fees&&fees.toLowerCase()!="none"){obj.fees=fees;}},"AccessConstraints":function(node,obj){var constraints=this.getChildValue(node);if(constraints&&constraints.toLowerCase()!="none"){obj.accessConstraints=constraints;}},"Capability":function(node,obj){obj.capability={nestedLayers:[]};this.readChildNodes(node,obj.capability);},"Request":function(node,obj){obj.request={};this.readChildNodes(node,obj.request);},"GetCapabilities":function(node,obj){obj.getcapabilities={formats:[]};this.readChildNodes(node,obj.getcapabilities);},"Format":function(node,obj){if(obj.formats instanceof Array){obj.formats.push(this.getChildValue(node));}else{obj.format=this.getChildValue(node);}},"DCPType":function(node,obj){this.readChildNodes(node,obj);},"HTTP":function(node,obj){this.readChildNodes(node,obj);},"Get":function(node,obj){this.readChildNodes(node,obj);},"Post":function(node,obj){this.readChildNodes(node,obj);},"GetMap":function(node,obj){obj.getmap={formats:[]};this.readChildNodes(node,obj.getmap);},"GetFeatureInfo":function(node,obj){obj.getfeatureinfo={formats:[]};this.readChildNodes(node,obj.getfeatureinfo);},"Exception":function(node,obj){obj.exception={formats:[]};this.readChildNodes(node,obj.exception);},"Layer":function(node,obj){var attrNode=node.getAttributeNode("queryable");var queryable=(attrNode&&attrNode.specified)?node.getAttribute("queryable"):null;attrNode=node.getAttributeNode("cascaded");var cascaded=(attrNode&&attrNode.specified)?node.getAttribute("cascaded"):null;attrNode=node.getAttributeNode("opaque");var opaque=(attrNode&&attrNode.specified)?node.getAttribute('opaque'):null;var noSubsets=node.getAttribute('noSubsets');var fixedWidth=node.getAttribute('fixedWidth');var fixedHeight=node.getAttribute('fixedHeight');var layer={nestedLayers:[],styles:[],srs:{},metadataURLs:[],bbox:{},dimensions:{},authorityURLs:{},identifiers:{},keywords:[],queryable:(queryable&&queryable!=="")?(queryable==="1"||queryable==="true"):null,cascaded:(cascaded!==null)?parseInt(cascaded):null,opaque:opaque?(opaque==="1"||opaque==="true"):null,noSubsets:(noSubsets!==null)?(noSubsets==="1"||noSubsets==="true"):null,fixedWidth:(fixedWidth!=null)?parseInt(fixedWidth):null,fixedHeight:(fixedHeight!=null)?parseInt(fixedHeight):null};obj.nestedLayers.push(layer);this.readChildNodes(node,layer);if(layer.name){var parts=layer.name.split(":");if(parts.length>0){layer.prefix=parts[0];}}},"Attribution":function(node,obj){obj.attribution={};this.readChildNodes(node,obj.attribution);},"LogoURL":function(node,obj){obj.logo={width:node.getAttribute("width"),height:node.getAttribute("height")};this.readChildNodes(node,obj.logo);},"Style":function(node,obj){var style={};obj.styles.push(style);this.readChildNodes(node,style);},"LegendURL":function(node,obj){var legend={width:node.getAttribute("width"),height:node.getAttribute("height")};obj.legend=legend;this.readChildNodes(node,legend);},"MetadataURL":function(node,obj){var metadataURL={type:node.getAttribute("type")};obj.metadataURLs.push(metadataURL);this.readChildNodes(node,metadataURL);},"DataURL":function(node,obj){obj.dataURL={};this.readChildNodes(node,obj.dataURL);},"FeatureListURL":function(node,obj){obj.featureListURL={};this.readChildNodes(node,obj.featureListURL);},"AuthorityURL":function(node,obj){var name=node.getAttribute("name");var authority={};this.readChildNodes(node,authority);obj.authorityURLs[name]=authority.href;},"Identifier":function(node,obj){var authority=node.getAttribute("authority");obj.identifiers[authority]=this.getChildValue(node);},"KeywordList":function(node,obj){this.readChildNodes(node,obj);},"SRS":function(node,obj){obj.srs[this.getChildValue(node)]=true;}}},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1"});OpenLayers.Format.WMSDescribeLayer.v1_1=OpenLayers.Class(OpenLayers.Format.WMSDescribeLayer,{initialize:function(options){OpenLayers.Format.WMSDescribeLayer.prototype.initialize.apply(this,[options]);},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-var root=data.documentElement;var children=root.childNodes;var describelayer=[];var childNode,nodeName;for(var i=0;i<children.length;++i){childNode=children[i];nodeName=childNode.nodeName;if(nodeName=='LayerDescription'){var layerName=childNode.getAttribute('name');var owsType='';var owsURL='';var typeName='';if(childNode.getAttribute('owsType')){owsType=childNode.getAttribute('owsType');owsURL=childNode.getAttribute('owsURL');}else{if(childNode.getAttribute('wfs')!=''){owsType='WFS';owsURL=childNode.getAttribute('wfs');}else if(childNode.getAttribute('wcs')!=''){owsType='WCS';owsURL=childNode.getAttribute('wcs');}}
-var query=childNode.getElementsByTagName('Query');if(query.length>0){typeName=query[0].getAttribute('typeName');if(!typeName){typeName=query[0].getAttribute('typename');}}
-describelayer.push({layerName:layerName,owsType:owsType,owsURL:owsURL,typeName:typeName});}}
-return describelayer;},CLASS_NAME:"OpenLayers.Format.WMSDescribeLayer.v1_1"});OpenLayers.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,boxDivClassName:'olHandlerBoxZoomBox',boxCharacteristics:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);var callbacks={"down":this.startBox,"move":this.moveBox,"out":this.removeBox,"up":this.endBox};this.dragHandler=new OpenLayers.Handler.Drag(this,callbacks,{keyMask:this.keyMask});},destroy:function(){if(this.dragHandler){this.dragHandler.destroy();this.dragHandler=null;}
-OpenLayers.Handler.prototype.destroy.apply(this,arguments);},setMap:function(map){OpenLayers.Handler.prototype.setMap.apply(this,arguments);if(this.dragHandler){this.dragHandler.setMap(map);}},startBox:function(xy){this.zoomBox=OpenLayers.Util.createDiv('zoomBox',this.dragHandler.start);this.zoomBox.className=this.boxDivClassName;this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.viewPortDiv.appendChild(this.zoomBox);OpenLayers.Element.addClass(this.map.viewPortDiv,"olDrawBox");},moveBox:function(xy){var startX=this.dragHandler.start.x;var startY=this.dragHandler.start.y;var deltaX=Math.abs(startX-xy.x);var deltaY=Math.abs(startY-xy.y);this.zoomBox.style.width=Math.max(1,deltaX)+"px";this.zoomBox.style.height=Math.max(1,deltaY)+"px";this.zoomBox.style.left=xy.x<startX?xy.x+"px":startX+"px";this.zoomBox.style.top=xy.y<startY?xy.y+"px":startY+"px";var box=this.getBoxCharacteristics();if(box.newBoxModel){if(xy.x>startX){this.zoomBox.style.width=Math.max(1,deltaX-box.xOffset)+"px";}
-if(xy.y>startY){this.zoomBox.style.height=Math.max(1,deltaY-box.yOffset)+"px";}}},endBox:function(end){var result;if(Math.abs(this.dragHandler.start.x-end.x)>5||Math.abs(this.dragHandler.start.y-end.y)>5){var start=this.dragHandler.start;var top=Math.min(start.y,end.y);var bottom=Math.max(start.y,end.y);var left=Math.min(start.x,end.x);var right=Math.max(start.x,end.x);result=new OpenLayers.Bounds(left,bottom,right,top);}else{result=this.dragHandler.start.clone();}
-this.removeBox();this.callback("done",[result]);},removeBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.zoomBox=null;this.boxCharacteristics=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDrawBox");},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragHandler.activate();return true;}else{return false;}},deactivate:function(){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.dragHandler.deactivate();return true;}else{return false;}},getBoxCharacteristics:function(){if(!this.boxCharacteristics){var xOffset=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-left-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-right-width"))+1;var yOffset=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-top-width"))+parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-bottom-width"))+1;var newBoxModel=OpenLayers.Util.getBrowserName()=="msie"?document.compatMode!="BackCompat":true;this.boxCharacteristics={xOffset:xOffset,yOffset:yOffset,newBoxModel:newBoxModel};}
-return this.boxCharacteristics;},CLASS_NAME:"OpenLayers.Handler.Box"});OpenLayers.Handler.RegularPolygon=OpenLayers.Class(OpenLayers.Handler.Drag,{sides:4,radius:null,snapAngle:null,snapToggle:'shiftKey',layerOptions:null,persist:false,irregular:false,angle:null,fixedRadius:false,feature:null,layer:null,origin:null,initialize:function(control,callbacks,options){if(!(options&&options.layerOptions&&options.layerOptions.styleMap)){this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'],{});}
-OpenLayers.Handler.prototype.initialize.apply(this,[control,callbacks,options]);this.options=(options)?options:{};},setOptions:function(newOptions){OpenLayers.Util.extend(this.options,newOptions);OpenLayers.Util.extend(this,newOptions);},activate:function(){var activated=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var options=OpenLayers.Util.extend({displayInLayerSwitcher:false,calculateInRange:OpenLayers.Function.True},this.layerOptions);this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,options);this.map.addLayer(this.layer);activated=true;}
-return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.Drag.prototype.deactivate.apply(this,arguments)){if(this.dragging){this.cancel();}
-if(this.layer.map!=null){this.layer.destroy(false);if(this.feature){this.feature.destroy();}}
-this.layer=null;this.feature=null;deactivated=true;}
-return deactivated;},down:function(evt){this.fixedRadius=!!(this.radius);var maploc=this.map.getLonLatFromPixel(evt.xy);this.origin=new OpenLayers.Geometry.Point(maploc.lon,maploc.lat);if(!this.fixedRadius||this.irregular){this.radius=this.map.getResolution();}
-if(this.persist){this.clear();}
-this.feature=new OpenLayers.Feature.Vector();this.createGeometry();this.callback("create",[this.origin,this.feature]);this.layer.addFeatures([this.feature],{silent:true});this.layer.drawFeature(this.feature,this.style);},move:function(evt){var maploc=this.map.getLonLatFromPixel(evt.xy);var point=new OpenLayers.Geometry.Point(maploc.lon,maploc.lat);if(this.irregular){var ry=Math.sqrt(2)*Math.abs(point.y-this.origin.y)/2;this.radius=Math.max(this.map.getResolution()/2,ry);}else if(this.fixedRadius){this.origin=point;}else{this.calculateAngle(point,evt);this.radius=Math.max(this.map.getResolution()/2,point.distanceTo(this.origin));}
-this.modifyGeometry();if(this.irregular){var dx=point.x-this.origin.x;var dy=point.y-this.origin.y;var ratio;if(dy==0){ratio=dx/(this.radius*Math.sqrt(2));}else{ratio=dx/dy;}
-this.feature.geometry.resize(1,this.origin,ratio);this.feature.geometry.move(dx/2,dy/2);}
-this.layer.drawFeature(this.feature,this.style);},up:function(evt){this.finalize();if(this.start==this.last){this.callback("done",[evt.xy]);}},out:function(evt){this.finalize();},createGeometry:function(){this.angle=Math.PI*((1/this.sides)-(1/2));if(this.snapAngle){this.angle+=this.snapAngle*(Math.PI/180);}
-this.feature.geometry=OpenLayers.Geometry.Polygon.createRegularPolygon(this.origin,this.radius,this.sides,this.snapAngle);},modifyGeometry:function(){var angle,point;var ring=this.feature.geometry.components[0];if(ring.components.length!=(this.sides+1)){this.createGeometry();ring=this.feature.geometry.components[0];}
-for(var i=0;i<this.sides;++i){point=ring.components[i];angle=this.angle+(i*2*Math.PI/this.sides);point.x=this.origin.x+(this.radius*Math.cos(angle));point.y=this.origin.y+(this.radius*Math.sin(angle));point.clearBounds();}},calculateAngle:function(point,evt){var alpha=Math.atan2(point.y-this.origin.y,point.x-this.origin.x);if(this.snapAngle&&(this.snapToggle&&!evt[this.snapToggle])){var snapAngleRad=(Math.PI/180)*this.snapAngle;this.angle=Math.round(alpha/snapAngleRad)*snapAngleRad;}else{this.angle=alpha;}},cancel:function(){this.callback("cancel",null);this.finalize();},finalize:function(){this.origin=null;this.radius=this.options.radius;},clear:function(){if(this.layer){this.layer.renderer.clear();this.layer.destroyFeatures();}},callback:function(name,args){if(this.callbacks[name]){this.callbacks[name].apply(this.control,[this.feature.geometry.clone()]);}
-if(!this.persist&&(name=="done"||name=="cancel")){this.clear();}},CLASS_NAME:"OpenLayers.Handler.RegularPolygon"});OpenLayers.Layer.EventPane=OpenLayers.Class(OpenLayers.Layer,{smoothDragPan:true,isBaseLayer:true,isFixed:true,pane:null,mapObject:null,initialize:function(name,options){OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(this.pane==null){this.pane=OpenLayers.Util.createDiv(this.div.id+"_EventPane");}},destroy:function(){this.mapObject=null;this.pane=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},setMap:function(map){OpenLayers.Layer.prototype.setMap.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1;this.pane.style.display=this.div.style.display;this.pane.style.width="100%";this.pane.style.height="100%";if(OpenLayers.Util.getBrowserName()=="msie"){this.pane.style.background="url("+OpenLayers.Util.getImagesLocation()+"blank.gif)";}
-if(this.isFixed){this.map.viewPortDiv.appendChild(this.pane);}else{this.map.layerContainerDiv.appendChild(this.pane);}
-this.loadMapObject();if(this.mapObject==null){this.loadWarningMessage();}},removeMap:function(map){if(this.pane&&this.pane.parentNode){this.pane.parentNode.removeChild(this.pane);}
-OpenLayers.Layer.prototype.removeMap.apply(this,arguments);},loadWarningMessage:function(){this.div.style.backgroundColor="darkblue";var viewSize=this.map.getSize();var msgW=Math.min(viewSize.w,300);var msgH=Math.min(viewSize.h,200);var size=new OpenLayers.Size(msgW,msgH);var centerPx=new OpenLayers.Pixel(viewSize.w/2,viewSize.h/2);var topLeft=centerPx.add(-size.w/2,-size.h/2);var div=OpenLayers.Util.createDiv(this.name+"_warning",topLeft,size,null,null,null,"auto");div.style.padding="7px";div.style.backgroundColor="yellow";div.innerHTML=this.getWarningHTML();this.div.appendChild(div);},getWarningHTML:function(){return"";},display:function(display){OpenLayers.Layer.prototype.display.apply(this,arguments);this.pane.style.display=this.div.style.display;},setZIndex:function(zIndex){OpenLayers.Layer.prototype.setZIndex.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1;},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(this.mapObject!=null){var newCenter=this.map.getCenter();var newZoom=this.map.getZoom();if(newCenter!=null){var moOldCenter=this.getMapObjectCenter();var oldCenter=this.getOLLonLatFromMapObjectLonLat(moOldCenter);var moOldZoom=this.getMapObjectZoom();var oldZoom=this.getOLZoomFromMapObjectZoom(moOldZoom);if(!(newCenter.equals(oldCenter))||!(newZoom==oldZoom)){if(dragging&&this.dragPanMapObject&&this.smoothDragPan){var oldPx=this.map.getViewPortPxFromLonLat(oldCenter);var newPx=this.map.getViewPortPxFromLonLat(newCenter);this.dragPanMapObject(newPx.x-oldPx.x,oldPx.y-newPx.y);}else{var center=this.getMapObjectLonLatFromOLLonLat(newCenter);var zoom=this.getMapObjectZoomFromOLZoom(newZoom);this.setMapObjectCenter(center,zoom,dragging);}}}}},getLonLatFromViewPortPx:function(viewPortPx){var lonlat=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var moPixel=this.getMapObjectPixelFromOLPixel(viewPortPx);var moLonLat=this.getMapObjectLonLatFromMapObjectPixel(moPixel);lonlat=this.getOLLonLatFromMapObjectLonLat(moLonLat);}
-return lonlat;},getViewPortPxFromLonLat:function(lonlat){var viewPortPx=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var moLonLat=this.getMapObjectLonLatFromOLLonLat(lonlat);var moPixel=this.getMapObjectPixelFromMapObjectLonLat(moLonLat);viewPortPx=this.getOLPixelFromMapObjectPixel(moPixel);}
-return viewPortPx;},getOLLonLatFromMapObjectLonLat:function(moLonLat){var olLonLat=null;if(moLonLat!=null){var lon=this.getLongitudeFromMapObjectLonLat(moLonLat);var lat=this.getLatitudeFromMapObjectLonLat(moLonLat);olLonLat=new OpenLayers.LonLat(lon,lat);}
-return olLonLat;},getMapObjectLonLatFromOLLonLat:function(olLonLat){var moLatLng=null;if(olLonLat!=null){moLatLng=this.getMapObjectLonLatFromLonLat(olLonLat.lon,olLonLat.lat);}
-return moLatLng;},getOLPixelFromMapObjectPixel:function(moPixel){var olPixel=null;if(moPixel!=null){var x=this.getXFromMapObjectPixel(moPixel);var y=this.getYFromMapObjectPixel(moPixel);olPixel=new OpenLayers.Pixel(x,y);}
-return olPixel;},getMapObjectPixelFromOLPixel:function(olPixel){var moPixel=null;if(olPixel!=null){moPixel=this.getMapObjectPixelFromXY(olPixel.x,olPixel.y);}
-return moPixel;},CLASS_NAME:"OpenLayers.Layer.EventPane"});OpenLayers.Layer.FixedZoomLevels=OpenLayers.Class({initialize:function(){},initResolutions:function(){var props=new Array('minZoomLevel','maxZoomLevel','numZoomLevels');for(var i=0,len=props.length;i<len;i++){var property=props[i];this[property]=(this.options[property]!=null)?this.options[property]:this.map[property];}
-if((this.minZoomLevel==null)||(this.minZoomLevel<this.MIN_ZOOM_LEVEL)){this.minZoomLevel=this.MIN_ZOOM_LEVEL;}
-var desiredZoomLevels;var limitZoomLevels=this.MAX_ZOOM_LEVEL-this.minZoomLevel+1;if(((this.options.numZoomLevels==null)&&(this.options.maxZoomLevel!=null))||((this.numZoomLevels==null)&&(this.maxZoomLevel!=null))){desiredZoomLevels=this.maxZoomLevel-this.minZoomLevel+1;}else{desiredZoomLevels=this.numZoomLevels;}
-if(desiredZoomLevels!=null){this.numZoomLevels=Math.min(desiredZoomLevels,limitZoomLevels);}else{this.numZoomLevels=limitZoomLevels;}
-this.maxZoomLevel=this.minZoomLevel+this.numZoomLevels-1;if(this.RESOLUTIONS!=null){var resolutionsIndex=0;this.resolutions=[];for(var i=this.minZoomLevel;i<=this.maxZoomLevel;i++){this.resolutions[resolutionsIndex++]=this.RESOLUTIONS[i];}
-this.maxResolution=this.resolutions[0];this.minResolution=this.resolutions[this.resolutions.length-1];}},getResolution:function(){if(this.resolutions!=null){return OpenLayers.Layer.prototype.getResolution.apply(this,arguments);}else{var resolution=null;var viewSize=this.map.getSize();var extent=this.getExtent();if((viewSize!=null)&&(extent!=null)){resolution=Math.max(extent.getWidth()/viewSize.w,extent.getHeight()/viewSize.h);}
-return resolution;}},getExtent:function(){var extent=null;var size=this.map.getSize();var tlPx=new OpenLayers.Pixel(0,0);var tlLL=this.getLonLatFromViewPortPx(tlPx);var brPx=new OpenLayers.Pixel(size.w,size.h);var brLL=this.getLonLatFromViewPortPx(brPx);if((tlLL!=null)&&(brLL!=null)){extent=new OpenLayers.Bounds(tlLL.lon,brLL.lat,brLL.lon,tlLL.lat);}
-return extent;},getZoomForResolution:function(resolution){if(this.resolutions!=null){return OpenLayers.Layer.prototype.getZoomForResolution.apply(this,arguments);}else{var extent=OpenLayers.Layer.prototype.getExtent.apply(this,[]);return this.getZoomForExtent(extent);}},getOLZoomFromMapObjectZoom:function(moZoom){var zoom=null;if(moZoom!=null){zoom=moZoom-this.minZoomLevel;}
-return zoom;},getMapObjectZoomFromOLZoom:function(olZoom){var zoom=null;if(olZoom!=null){zoom=olZoom+this.minZoomLevel;}
-return zoom;},CLASS_NAME:"OpenLayers.Layer.FixedZoomLevels"});OpenLayers.Layer.HTTPRequest=OpenLayers.Class(OpenLayers.Layer,{URL_HASH_FACTOR:(Math.sqrt(5)-1)/2,url:null,params:null,reproject:false,initialize:function(name,url,params,options){var newArguments=arguments;newArguments=[name,options];OpenLayers.Layer.prototype.initialize.apply(this,newArguments);this.url=url;this.params=OpenLayers.Util.extend({},params);},destroy:function(){this.url=null;this.params=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.HTTPRequest(this.name,this.url,this.params,this.getOptions());}
-obj=OpenLayers.Layer.prototype.clone.apply(this,[obj]);return obj;},setUrl:function(newUrl){this.url=newUrl;},mergeNewParams:function(newParams){this.params=OpenLayers.Util.extend(this.params,newParams);var ret=this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"params"});}
-return ret;},redraw:function(force){if(force){return this.mergeNewParams({"_olSalt":Math.random()});}else{return OpenLayers.Layer.prototype.redraw.apply(this,[]);}},selectUrl:function(paramString,urls){var product=1;for(var i=0,len=paramString.length;i<len;i++){product*=paramString.charCodeAt(i)*this.URL_HASH_FACTOR;product-=Math.floor(product);}
-return urls[Math.floor(product*urls.length)];},getFullRequestString:function(newParams,altUrl){var url=altUrl||this.url;var allParams=OpenLayers.Util.extend({},this.params);allParams=OpenLayers.Util.extend(allParams,newParams);var paramsString=OpenLayers.Util.getParameterString(allParams);if(url instanceof Array){url=this.selectUrl(paramsString,url);}
-var urlParams=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(url));for(var key in allParams){if(key.toUpperCase()in urlParams){delete allParams[key];}}
-paramsString=OpenLayers.Util.getParameterString(allParams);return OpenLayers.Util.urlAppend(url,paramsString);},CLASS_NAME:"OpenLayers.Layer.HTTPRequest"});OpenLayers.Layer.Image=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:true,url:null,extent:null,size:null,tile:null,aspectRatio:null,initialize:function(name,url,extent,size,options){this.url=url;this.extent=extent;this.maxExtent=extent;this.size=size;OpenLayers.Layer.prototype.initialize.apply(this,[name,options]);this.aspectRatio=(this.extent.getHeight()/this.size.h)/(this.extent.getWidth()/this.size.w);},destroy:function(){if(this.tile){this.removeTileMonitoringHooks(this.tile);this.tile.destroy();this.tile=null;}
-OpenLayers.Layer.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.Image(this.name,this.url,this.extent,this.size,this.getOptions());}
-obj=OpenLayers.Layer.prototype.clone.apply(this,[obj]);return obj;},setMap:function(map){if(this.options.maxResolution==null){this.options.maxResolution=this.aspectRatio*this.extent.getWidth()/this.size.w;}
-OpenLayers.Layer.prototype.setMap.apply(this,arguments);},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var firstRendering=(this.tile==null);if(zoomChanged||firstRendering){this.setTileSize();var ul=new OpenLayers.LonLat(this.extent.left,this.extent.top);var ulPx=this.map.getLayerPxFromLonLat(ul);if(firstRendering){this.tile=new OpenLayers.Tile.Image(this,ulPx,this.extent,null,this.tileSize);this.addTileMonitoringHooks(this.tile);}else{this.tile.size=this.tileSize.clone();this.tile.position=ulPx.clone();}
-this.tile.draw();}},setTileSize:function(){var tileWidth=this.extent.getWidth()/this.map.getResolution();var tileHeight=this.extent.getHeight()/this.map.getResolution();this.tileSize=new OpenLayers.Size(tileWidth,tileHeight);},addTileMonitoringHooks:function(tile){tile.onLoadStart=function(){this.events.triggerEvent("loadstart");};tile.events.register("loadstart",this,tile.onLoadStart);tile.onLoadEnd=function(){this.events.triggerEvent("loadend");};tile.events.register("loadend",this,tile.onLoadEnd);tile.events.register("unload",this,tile.onLoadEnd);},removeTileMonitoringHooks:function(tile){tile.unload();tile.events.un({"loadstart":tile.onLoadStart,"loadend":tile.onLoadEnd,"unload":tile.onLoadEnd,scope:this});},setUrl:function(newUrl){this.url=newUrl;this.tile.draw();},getURL:function(bounds){return this.url;},CLASS_NAME:"OpenLayers.Layer.Image"});OpenLayers.Layer.Markers=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:false,markers:null,drawn:false,initialize:function(name,options){OpenLayers.Layer.prototype.initialize.apply(this,arguments);this.markers=[];},destroy:function(){this.clearMarkers();this.markers=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},setOpacity:function(opacity){if(opacity!=this.opacity){this.opacity=opacity;for(var i=0,len=this.markers.length;i<len;i++){this.markers[i].setOpacity(this.opacity);}}},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(zoomChanged||!this.drawn){for(var i=0,len=this.markers.length;i<len;i++){this.drawMarker(this.markers[i]);}
-this.drawn=true;}},addMarker:function(marker){this.markers.push(marker);if(this.opacity!=null){marker.setOpacity(this.opacity);}
-if(this.map&&this.map.getExtent()){marker.map=this.map;this.drawMarker(marker);}},removeMarker:function(marker){if(this.markers&&this.markers.length){OpenLayers.Util.removeItem(this.markers,marker);marker.erase();}},clearMarkers:function(){if(this.markers!=null){while(this.markers.length>0){this.removeMarker(this.markers[0]);}}},drawMarker:function(marker){var px=this.map.getLayerPxFromLonLat(marker.lonlat);if(px==null){marker.display(false);}else{if(!marker.isDrawn()){var markerImg=marker.draw(px);this.div.appendChild(markerImg);}else if(marker.icon){marker.icon.moveTo(px);}}},getDataExtent:function(){var maxExtent=null;if(this.markers&&(this.markers.length>0)){var maxExtent=new OpenLayers.Bounds();for(var i=0,len=this.markers.length;i<len;i++){var marker=this.markers[i];maxExtent.extend(marker.lonlat);}}
-return maxExtent;},CLASS_NAME:"OpenLayers.Layer.Markers"});OpenLayers.Layer.SphericalMercator={getExtent:function(){var extent=null;if(this.sphericalMercator){extent=this.map.calculateBounds();}else{extent=OpenLayers.Layer.FixedZoomLevels.prototype.getExtent.apply(this);}
-return extent;},getLonLatFromViewPortPx:function(viewPortPx){return OpenLayers.Layer.prototype.getLonLatFromViewPortPx.apply(this,arguments);},getViewPortPxFromLonLat:function(lonlat){return OpenLayers.Layer.prototype.getViewPortPxFromLonLat.apply(this,arguments);},initMercatorParameters:function(){this.RESOLUTIONS=[];var maxResolution=156543.0339;for(var zoom=0;zoom<=this.MAX_ZOOM_LEVEL;++zoom){this.RESOLUTIONS[zoom]=maxResolution/Math.pow(2,zoom);}
-this.units="m";this.projection=this.projection||"EPSG:900913";},forwardMercator:function(lon,lat){var x=lon*20037508.34/180;var y=Math.log(Math.tan((90+lat)*Math.PI/360))/(Math.PI/180);y=y*20037508.34/180;return new OpenLayers.LonLat(x,y);},inverseMercator:function(x,y){var lon=(x/20037508.34)*180;var lat=(y/20037508.34)*180;lat=180/Math.PI*(2*Math.atan(Math.exp(lat*Math.PI/180))-Math.PI/2);return new OpenLayers.LonLat(lon,lat);},projectForward:function(point){var lonlat=OpenLayers.Layer.SphericalMercator.forwardMercator(point.x,point.y);point.x=lonlat.lon;point.y=lonlat.lat;return point;},projectInverse:function(point){var lonlat=OpenLayers.Layer.SphericalMercator.inverseMercator(point.x,point.y);point.x=lonlat.lon;point.y=lonlat.lat;return point;}};OpenLayers.Projection.addTransform("EPSG:4326","EPSG:900913",OpenLayers.Layer.SphericalMercator.projectForward);OpenLayers.Projection.addTransform("EPSG:900913","EPSG:4326",OpenLayers.Layer.SphericalMercator.projectInverse);OpenLayers.Tile.WFS=OpenLayers.Class(OpenLayers.Tile,{features:null,url:null,request:null,initialize:function(layer,position,bounds,url,size){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=url;this.features=[];},destroy:function(){OpenLayers.Tile.prototype.destroy.apply(this,arguments);this.destroyAllFeatures();this.features=null;this.url=null;if(this.request){this.request.abort();this.request=null;}},clear:function(){this.destroyAllFeatures();},draw:function(){if(OpenLayers.Tile.prototype.draw.apply(this,arguments)){if(this.isLoading){this.events.triggerEvent("reload");}else{this.isLoading=true;this.events.triggerEvent("loadstart");}
-this.loadFeaturesForRegion(this.requestSuccess);}},loadFeaturesForRegion:function(success,failure){if(this.request){this.request.abort();}
-this.request=OpenLayers.Request.GET({url:this.url,success:success,failure:failure,scope:this});},requestSuccess:function(request){if(this.features){var doc=request.responseXML;if(!doc||!doc.documentElement){doc=request.responseText;}
-if(this.layer.vectorMode){this.layer.addFeatures(this.layer.formatObject.read(doc));}else{var xml=new OpenLayers.Format.XML();if(typeof doc=="string"){doc=xml.read(doc);}
-var resultFeatures=xml.getElementsByTagNameNS(doc,"http://www.opengis.net/gml","featureMember");this.addResults(resultFeatures);}}
-if(this.events){this.events.triggerEvent("loadend");}
-this.request=null;},addResults:function(results){for(var i=0;i<results.length;i++){var feature=new this.layer.featureClass(this.layer,results[i]);this.features.push(feature);}},destroyAllFeatures:function(){while(this.features.length>0){var feature=this.features.shift();feature.destroy();}},CLASS_NAME:"OpenLayers.Tile.WFS"});OpenLayers.Control.DrawFeature=OpenLayers.Class(OpenLayers.Control,{layer:null,callbacks:null,EVENT_TYPES:["featureadded"],multi:false,featureAdded:function(){},handlerOptions:null,initialize:function(layer,handler,options){this.EVENT_TYPES=OpenLayers.Control.DrawFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[options]);this.callbacks=OpenLayers.Util.extend({done:this.drawFeature,modify:function(vertex,feature){this.layer.events.triggerEvent("sketchmodified",{vertex:vertex,feature:feature});},create:function(vertex,feature){this.layer.events.triggerEvent("sketchstarted",{vertex:vertex,feature:feature});}},this.callbacks);this.layer=layer;this.handlerOptions=this.handlerOptions||{};if(!("multi"in this.handlerOptions)){this.handlerOptions.multi=this.multi;}
-var sketchStyle=this.layer.styleMap&&this.layer.styleMap.styles.temporary;if(sketchStyle){this.handlerOptions.layerOptions=OpenLayers.Util.applyDefaults(this.handlerOptions.layerOptions,{styleMap:new OpenLayers.StyleMap({"default":sketchStyle})});}
-this.handler=new handler(this,this.callbacks,this.handlerOptions);},drawFeature:function(geometry){var feature=new OpenLayers.Feature.Vector(geometry);var proceed=this.layer.events.triggerEvent("sketchcomplete",{feature:feature});if(proceed!==false){feature.state=OpenLayers.State.INSERT;this.layer.addFeatures([feature]);this.featureAdded(feature);this.events.triggerEvent("featureadded",{feature:feature});}},CLASS_NAME:"OpenLayers.Control.DrawFeature"});OpenLayers.Control.Measure=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:['measure','measurepartial'],handlerOptions:null,callbacks:null,displaySystem:'metric',geodesic:false,displaySystemUnits:{geographic:['dd'],english:['mi','ft','in'],metric:['km','m']},partialDelay:300,delayedTrigger:null,persist:false,initialize:function(handler,options){this.EVENT_TYPES=OpenLayers.Control.Measure.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[options]);this.callbacks=OpenLayers.Util.extend({done:this.measureComplete,point:this.measurePartial},this.callbacks);this.handlerOptions=OpenLayers.Util.extend({persist:this.persist},this.handlerOptions);this.handler=new handler(this,this.callbacks,this.handlerOptions);},cancel:function(){this.handler.cancel();},updateHandler:function(handler,options){var active=this.active;if(active){this.deactivate();}
-this.handler=new handler(this,this.callbacks,options);if(active){this.activate();}},measureComplete:function(geometry){if(this.delayedTrigger){window.clearTimeout(this.delayedTrigger);}
-this.measure(geometry,"measure");},measurePartial:function(point,geometry){if(geometry.getLength()>0){geometry=geometry.clone();this.delayedTrigger=window.setTimeout(OpenLayers.Function.bind(function(){this.measure(geometry,"measurepartial");},this),this.partialDelay);}},measure:function(geometry,eventType){var stat,order;if(geometry.CLASS_NAME.indexOf('LineString')>-1){stat=this.getBestLength(geometry);order=1;}else{stat=this.getBestArea(geometry);order=2;}
-this.events.triggerEvent(eventType,{measure:stat[0],units:stat[1],order:order,geometry:geometry});},getBestArea:function(geometry){var units=this.displaySystemUnits[this.displaySystem];var unit,area;for(var i=0,len=units.length;i<len;++i){unit=units[i];area=this.getArea(geometry,unit);if(area>1){break;}}
-return[area,unit];},getArea:function(geometry,units){var area,geomUnits;if(this.geodesic){area=geometry.getGeodesicArea(this.map.getProjectionObject());geomUnits="m";}else{area=geometry.getArea();geomUnits=this.map.getUnits();}
-var inPerDisplayUnit=OpenLayers.INCHES_PER_UNIT[units];if(inPerDisplayUnit){var inPerMapUnit=OpenLayers.INCHES_PER_UNIT[geomUnits];area*=Math.pow((inPerMapUnit/inPerDisplayUnit),2);}
-return area;},getBestLength:function(geometry){var units=this.displaySystemUnits[this.displaySystem];var unit,length;for(var i=0,len=units.length;i<len;++i){unit=units[i];length=this.getLength(geometry,unit);if(length>1){break;}}
-return[length,unit];},getLength:function(geometry,units){var length,geomUnits;if(this.geodesic){length=geometry.getGeodesicLength(this.map.getProjectionObject());geomUnits="m";}else{length=geometry.getLength();geomUnits=this.map.getUnits();}
-var inPerDisplayUnit=OpenLayers.INCHES_PER_UNIT[units];if(inPerDisplayUnit){var inPerMapUnit=OpenLayers.INCHES_PER_UNIT[geomUnits];length*=(inPerMapUnit/inPerDisplayUnit);}
-return length;},CLASS_NAME:"OpenLayers.Control.Measure"});OpenLayers.Control.ZoomBox=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,out:false,alwaysZoom:false,draw:function(){this.handler=new OpenLayers.Handler.Box(this,{done:this.zoomBox},{keyMask:this.keyMask});},zoomBox:function(position){if(position instanceof OpenLayers.Bounds){var bounds;if(!this.out){var minXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.left,position.bottom));var maxXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.right,position.top));bounds=new OpenLayers.Bounds(minXY.lon,minXY.lat,maxXY.lon,maxXY.lat);}else{var pixWidth=Math.abs(position.right-position.left);var pixHeight=Math.abs(position.top-position.bottom);var zoomFactor=Math.min((this.map.size.h/pixHeight),(this.map.size.w/pixWidth));var extent=this.map.getExtent();var center=this.map.getLonLatFromPixel(position.getCenterPixel());var xmin=center.lon-(extent.getWidth()/2)*zoomFactor;var xmax=center.lon+(extent.getWidth()/2)*zoomFactor;var ymin=center.lat-(extent.getHeight()/2)*zoomFactor;var ymax=center.lat+(extent.getHeight()/2)*zoomFactor;bounds=new OpenLayers.Bounds(xmin,ymin,xmax,ymax);}
-var lastZoom=this.map.getZoom();this.map.zoomToExtent(bounds);if(lastZoom==this.map.getZoom()&&this.alwaysZoom==true){this.map.zoomTo(lastZoom+(this.out?-1:1));}}else{if(!this.out){this.map.setCenter(this.map.getLonLatFromPixel(position),this.map.getZoom()+1);}else{this.map.setCenter(this.map.getLonLatFromPixel(position),this.map.getZoom()-1);}}},CLASS_NAME:"OpenLayers.Control.ZoomBox"});OpenLayers.Format.WFSCapabilities.v1_0_0=OpenLayers.Class(OpenLayers.Format.WFSCapabilities.v1,{initialize:function(options){OpenLayers.Format.WFSCapabilities.v1.prototype.initialize.apply(this,[options]);},read_cap_Service:function(capabilities,node){var service={};this.runChildNodes(service,node);capabilities.service=service;},read_cap_Fees:function(service,node){var fees=this.getChildValue(node);if(fees&&fees.toLowerCase()!="none"){service.fees=fees;}},read_cap_AccessConstraints:function(service,node){var constraints=this.getChildValue(node);if(constraints&&constraints.toLowerCase()!="none"){service.accessConstraints=constraints;}},read_cap_OnlineResource:function(service,node){var onlineResource=this.getChildValue(node);if(onlineResource&&onlineResource.toLowerCase()!="none"){service.onlineResource=onlineResource;}},read_cap_Keywords:function(service,node){var keywords=this.getChildValue(node);if(keywords&&keywords.toLowerCase()!="none"){service.keywords=keywords.split(', ');}},read_cap_Capability:function(capabilities,node){var capability={};this.runChildNodes(capability,node);capabilities.capability=capability;},read_cap_Request:function(obj,node){var request={};this.runChildNodes(request,node);obj.request=request;},read_cap_GetFeature:function(request,node){var getfeature={href:{},formats:[]};this.runChildNodes(getfeature,node);request.getfeature=getfeature;},read_cap_ResultFormat:function(obj,node){var children=node.childNodes;var childNode;for(var i=0;i<children.length;i++){childNode=children[i];if(childNode.nodeType==1){obj.formats.push(childNode.nodeName);}}},read_cap_DCPType:function(obj,node){this.runChildNodes(obj,node);},read_cap_HTTP:function(obj,node){this.runChildNodes(obj.href,node);},read_cap_Get:function(obj,node){obj.get=node.getAttribute("onlineResource");},read_cap_Post:function(obj,node){obj.post=node.getAttribute("onlineResource");},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1_0_0"});OpenLayers.Format.WFSCapabilities.v1_1_0=OpenLayers.Class(OpenLayers.Format.WFSCapabilities.v1,{initialize:function(options){OpenLayers.Format.WFSCapabilities.v1.prototype.initialize.apply(this,[options]);},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1_1_0"});OpenLayers.Format.WKT=OpenLayers.Class(OpenLayers.Format,{initialize:function(options){this.regExes={'typeStr':/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,'spaces':/\s+/,'parenComma':/\)\s*,\s*\(/,'doubleParenComma':/\)\s*\)\s*,\s*\(\s*\(/,'trimParens':/^\s*\(?(.*?)\)?\s*$/};OpenLayers.Format.prototype.initialize.apply(this,[options]);},read:function(wkt){var features,type,str;var matches=this.regExes.typeStr.exec(wkt);if(matches){type=matches[1].toLowerCase();str=matches[2];if(this.parse[type]){features=this.parse[type].apply(this,[str]);}
-if(this.internalProjection&&this.externalProjection){if(features&&features.CLASS_NAME=="OpenLayers.Feature.Vector"){features.geometry.transform(this.externalProjection,this.internalProjection);}else if(features&&type!="geometrycollection"&&typeof features=="object"){for(var i=0,len=features.length;i<len;i++){var component=features[i];component.geometry.transform(this.externalProjection,this.internalProjection);}}}}
-return features;},write:function(features){var collection,geometry,type,data,isCollection;if(features.constructor==Array){collection=features;isCollection=true;}else{collection=[features];isCollection=false;}
-var pieces=[];if(isCollection){pieces.push('GEOMETRYCOLLECTION(');}
-for(var i=0,len=collection.length;i<len;++i){if(isCollection&&i>0){pieces.push(',');}
-geometry=collection[i].geometry;type=geometry.CLASS_NAME.split('.')[2].toLowerCase();if(!this.extract[type]){return null;}
-if(this.internalProjection&&this.externalProjection){geometry=geometry.clone();geometry.transform(this.internalProjection,this.externalProjection);}
-data=this.extract[type].apply(this,[geometry]);pieces.push(type.toUpperCase()+'('+data+')');}
-if(isCollection){pieces.push(')');}
-return pieces.join('');},extract:{'point':function(point){return point.x+' '+point.y;},'multipoint':function(multipoint){var array=[];for(var i=0,len=multipoint.components.length;i<len;++i){array.push('('+
-this.extract.point.apply(this,[multipoint.components[i]])+')');}
-return array.join(',');},'linestring':function(linestring){var array=[];for(var i=0,len=linestring.components.length;i<len;++i){array.push(this.extract.point.apply(this,[linestring.components[i]]));}
-return array.join(',');},'multilinestring':function(multilinestring){var array=[];for(var i=0,len=multilinestring.components.length;i<len;++i){array.push('('+
-this.extract.linestring.apply(this,[multilinestring.components[i]])+')');}
-return array.join(',');},'polygon':function(polygon){var array=[];for(var i=0,len=polygon.components.length;i<len;++i){array.push('('+
-this.extract.linestring.apply(this,[polygon.components[i]])+')');}
-return array.join(',');},'multipolygon':function(multipolygon){var array=[];for(var i=0,len=multipolygon.components.length;i<len;++i){array.push('('+
-this.extract.polygon.apply(this,[multipolygon.components[i]])+')');}
-return array.join(',');}},parse:{'point':function(str){var coords=OpenLayers.String.trim(str).split(this.regExes.spaces);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(coords[0],coords[1]));},'multipoint':function(str){var point;var points=OpenLayers.String.trim(str).split(this.regExes.parenComma);var components=[];for(var i=0,len=points.length;i<len;++i){point=points[i].replace(this.regExes.trimParens,'$1');components.push(this.parse.point.apply(this,[point]).geometry);}
-return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint(components));},'linestring':function(str){var points=OpenLayers.String.trim(str).split(',');var components=[];for(var i=0,len=points.length;i<len;++i){components.push(this.parse.point.apply(this,[points[i]]).geometry);}
-return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(components));},'multilinestring':function(str){var line;var lines=OpenLayers.String.trim(str).split(this.regExes.parenComma);var components=[];for(var i=0,len=lines.length;i<len;++i){line=lines[i].replace(this.regExes.trimParens,'$1');components.push(this.parse.linestring.apply(this,[line]).geometry);}
-return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiLineString(components));},'polygon':function(str){var ring,linestring,linearring;var rings=OpenLayers.String.trim(str).split(this.regExes.parenComma);var components=[];for(var i=0,len=rings.length;i<len;++i){ring=rings[i].replace(this.regExes.trimParens,'$1');linestring=this.parse.linestring.apply(this,[ring]).geometry;linearring=new OpenLayers.Geometry.LinearRing(linestring.components);components.push(linearring);}
-return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon(components));},'multipolygon':function(str){var polygon;var polygons=OpenLayers.String.trim(str).split(this.regExes.doubleParenComma);var components=[];for(var i=0,len=polygons.length;i<len;++i){polygon=polygons[i].replace(this.regExes.trimParens,'$1');components.push(this.parse.polygon.apply(this,[polygon]).geometry);}
-return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPolygon(components));},'geometrycollection':function(str){str=str.replace(/,\s*([A-Za-z])/g,'|$1');var wktArray=OpenLayers.String.trim(str).split('|');var components=[];for(var i=0,len=wktArray.length;i<len;++i){components.push(OpenLayers.Format.WKT.prototype.read.apply(this,[wktArray[i]]));}
-return components;}},CLASS_NAME:"OpenLayers.Format.WKT"});OpenLayers.Format.WMC.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ol:"http://openlayers.org/context",wmc:"http://www.opengis.net/context",sld:"http://www.opengis.net/sld",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},schemaLocation:"",getNamespacePrefix:function(uri){var prefix=null;if(uri==null){prefix=this.namespaces[this.defaultPrefix];}else{for(prefix in this.namespaces){if(this.namespaces[prefix]==uri){break;}}}
-return prefix;},defaultPrefix:"wmc",rootPrefix:null,defaultStyleName:"",defaultStyleTitle:"Default",initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-var root=data.documentElement;this.rootPrefix=root.prefix;var context={version:root.getAttribute("version")};this.runChildNodes(context,root);return context;},runChildNodes:function(obj,node){var children=node.childNodes;var childNode,processor,prefix,local;for(var i=0,len=children.length;i<len;++i){childNode=children[i];if(childNode.nodeType==1){prefix=this.getNamespacePrefix(childNode.namespaceURI);local=childNode.nodeName.split(":").pop();processor=this["read_"+prefix+"_"+local];if(processor){processor.apply(this,[obj,childNode]);}}}},read_wmc_General:function(context,node){this.runChildNodes(context,node);},read_wmc_BoundingBox:function(context,node){context.projection=node.getAttribute("SRS");context.bounds=new OpenLayers.Bounds(parseFloat(node.getAttribute("minx")),parseFloat(node.getAttribute("miny")),parseFloat(node.getAttribute("maxx")),parseFloat(node.getAttribute("maxy")));},read_wmc_LayerList:function(context,node){context.layersContext=[];this.runChildNodes(context,node);},read_wmc_Layer:function(context,node){var layerContext={visibility:(node.getAttribute("hidden")!="1"),queryable:(node.getAttribute("queryable")=="1"),formats:[],styles:[]};this.runChildNodes(layerContext,node);context.layersContext.push(layerContext);},read_wmc_Extension:function(obj,node){this.runChildNodes(obj,node);},read_ol_units:function(layerContext,node){layerContext.units=this.getChildValue(node);},read_ol_maxExtent:function(obj,node){var bounds=new OpenLayers.Bounds(node.getAttribute("minx"),node.getAttribute("miny"),node.getAttribute("maxx"),node.getAttribute("maxy"));obj.maxExtent=bounds;},read_ol_transparent:function(layerContext,node){layerContext.transparent=this.getChildValue(node);},read_ol_numZoomLevels:function(layerContext,node){layerContext.numZoomLevels=parseInt(this.getChildValue(node));},read_ol_opacity:function(layerContext,node){layerContext.opacity=parseFloat(this.getChildValue(node));},read_ol_singleTile:function(layerContext,node){layerContext.singleTile=(this.getChildValue(node)=="true");},read_ol_tileSize:function(layerContext,node){var obj={"width":node.getAttribute("width"),"height":node.getAttribute("height")};layerContext.tileSize=obj;},read_ol_isBaseLayer:function(layerContext,node){layerContext.isBaseLayer=(this.getChildValue(node)=="true");},read_ol_displayInLayerSwitcher:function(layerContext,node){layerContext.displayInLayerSwitcher=(this.getChildValue(node)=="true");},read_wmc_Server:function(layerContext,node){layerContext.version=node.getAttribute("version");var server={};var links=node.getElementsByTagName("OnlineResource");if(links.length>0){this.read_wmc_OnlineResource(server,links[0]);}
-layerContext.url=server.href;},read_wmc_FormatList:function(layerContext,node){this.runChildNodes(layerContext,node);},read_wmc_Format:function(layerContext,node){var format={value:this.getChildValue(node)};if(node.getAttribute("current")=="1"){format.current=true;}
-layerContext.formats.push(format);},read_wmc_StyleList:function(layerContext,node){this.runChildNodes(layerContext,node);},read_wmc_Style:function(layerContext,node){var style={};this.runChildNodes(style,node);if(node.getAttribute("current")=="1"){style.current=true;}
-layerContext.styles.push(style);},read_wmc_SLD:function(style,node){this.runChildNodes(style,node);},read_sld_StyledLayerDescriptor:function(sld,node){var xml=OpenLayers.Format.XML.prototype.write.apply(this,[node]);sld.body=xml;},read_wmc_OnlineResource:function(obj,node){obj.href=this.getAttributeNS(node,this.namespaces.xlink,"href");},read_wmc_Name:function(obj,node){var name=this.getChildValue(node);if(name){obj.name=name;}},read_wmc_Title:function(obj,node){var title=this.getChildValue(node);if(title){obj.title=title;}},read_wmc_MetadataURL:function(layerContext,node){var metadataURL={};var links=node.getElementsByTagName("OnlineResource");if(links.length>0){this.read_wmc_OnlineResource(metadataURL,links[0]);}
-layerContext.metadataURL=metadataURL.href;},read_wmc_Abstract:function(obj,node){var abst=this.getChildValue(node);if(abst){obj["abstract"]=abst;}},read_wmc_LegendURL:function(style,node){var legend={width:node.getAttribute('width'),height:node.getAttribute('height')};var links=node.getElementsByTagName("OnlineResource");if(links.length>0){this.read_wmc_OnlineResource(legend,links[0]);}
-style.legend=legend;},write:function(context,options){var root=this.createElementDefaultNS("ViewContext");this.setAttributes(root,{version:this.VERSION,id:(options&&typeof options.id=="string")?options.id:OpenLayers.Util.createUniqueID("OpenLayers_Context_")});this.setAttributeNS(root,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);root.appendChild(this.write_wmc_General(context));root.appendChild(this.write_wmc_LayerList(context));return OpenLayers.Format.XML.prototype.write.apply(this,[root]);},createElementDefaultNS:function(name,childValue,attributes){var node=this.createElementNS(this.namespaces[this.defaultPrefix],name);if(childValue){node.appendChild(this.createTextNode(childValue));}
-if(attributes){this.setAttributes(node,attributes);}
-return node;},setAttributes:function(node,obj){var value;for(var name in obj){value=obj[name].toString();if(value.match(/[A-Z]/)){this.setAttributeNS(node,null,name,value);}else{node.setAttribute(name,value);}}},write_wmc_General:function(context){var node=this.createElementDefaultNS("General");if(context.size){node.appendChild(this.createElementDefaultNS("Window",null,{width:context.size.w,height:context.size.h}));}
-var bounds=context.bounds;node.appendChild(this.createElementDefaultNS("BoundingBox",null,{minx:bounds.left.toPrecision(18),miny:bounds.bottom.toPrecision(18),maxx:bounds.right.toPrecision(18),maxy:bounds.top.toPrecision(18),SRS:context.projection}));node.appendChild(this.createElementDefaultNS("Title",context.title));node.appendChild(this.write_ol_MapExtension(context));return node;},write_ol_MapExtension:function(context){var node=this.createElementDefaultNS("Extension");var bounds=context.maxExtent;if(bounds){var maxExtent=this.createElementNS(this.namespaces.ol,"ol:maxExtent");this.setAttributes(maxExtent,{minx:bounds.left.toPrecision(18),miny:bounds.bottom.toPrecision(18),maxx:bounds.right.toPrecision(18),maxy:bounds.top.toPrecision(18)});node.appendChild(maxExtent);}
-return node;},write_wmc_LayerList:function(context){var list=this.createElementDefaultNS("LayerList");for(var i=0,len=context.layersContext.length;i<len;++i){list.appendChild(this.write_wmc_Layer(context.layersContext[i]));}
-return list;},write_wmc_Layer:function(context){var node=this.createElementDefaultNS("Layer",null,{queryable:context.queryable?"1":"0",hidden:context.visibility?"0":"1"});node.appendChild(this.write_wmc_Server(context));node.appendChild(this.createElementDefaultNS("Name",context.name));node.appendChild(this.createElementDefaultNS("Title",context.title));if(context.metadataURL){node.appendChild(this.write_wmc_MetadataURL(context.metadataURL));}
-return node;},write_wmc_LayerExtension:function(context){var node=this.createElementDefaultNS("Extension");var bounds=context.maxExtent;var maxExtent=this.createElementNS(this.namespaces.ol,"ol:maxExtent");this.setAttributes(maxExtent,{minx:bounds.left.toPrecision(18),miny:bounds.bottom.toPrecision(18),maxx:bounds.right.toPrecision(18),maxy:bounds.top.toPrecision(18)});node.appendChild(maxExtent);if(context.tileSize&&!context.singleTile){var size=this.createElementNS(this.namespaces.ol,"ol:tileSize");this.setAttributes(size,context.tileSize);node.appendChild(size);}
-var properties=["transparent","numZoomLevels","units","isBaseLayer","opacity","displayInLayerSwitcher","singleTile"];var child;for(var i=0,len=properties.length;i<len;++i){child=this.createOLPropertyNode(context,properties[i]);if(child){node.appendChild(child);}}
-return node;},createOLPropertyNode:function(obj,prop){var node=null;if(obj[prop]!=null){node=this.createElementNS(this.namespaces.ol,"ol:"+prop);node.appendChild(this.createTextNode(obj[prop].toString()));}
-return node;},write_wmc_Server:function(context){var node=this.createElementDefaultNS("Server");this.setAttributes(node,{service:"OGC:WMS",version:context.version});node.appendChild(this.write_wmc_OnlineResource(context.url));return node;},write_wmc_MetadataURL:function(metadataURL){var node=this.createElementDefaultNS("MetadataURL");node.appendChild(this.write_wmc_OnlineResource(metadataURL));return node;},write_wmc_FormatList:function(context){var node=this.createElementDefaultNS("FormatList");for(var i=0,len=context.formats.length;i<len;i++){var format=context.formats[i];node.appendChild(this.createElementDefaultNS("Format",format.value,(format.current&&format.current==true)?{current:"1"}:null));}
-return node;},write_wmc_StyleList:function(layer){var node=this.createElementDefaultNS("StyleList");var styles=layer.styles;if(styles&&styles instanceof Array){var sld;for(var i=0,len=styles.length;i<len;i++){var s=styles[i];var style=this.createElementDefaultNS("Style",null,(s.current&&s.current==true)?{current:"1"}:null);if(s.href){sld=this.createElementDefaultNS("SLD");var link=this.write_wmc_OnlineResource(s.href);sld.appendChild(link);sld.appendChild(this.createElementDefaultNS("Name",s.name));if(s.title){sld.appendChild(this.createElementDefaultNS("Title",s.title));}
-style.appendChild(sld);}else if(s.body){sld=this.createElementDefaultNS("SLD");var doc=OpenLayers.Format.XML.prototype.read.apply(this,[s.body]);var imported=doc.documentElement;if(sld.ownerDocument&&sld.ownerDocument.importNode){imported=sld.ownerDocument.importNode(imported,true);}
-sld.appendChild(imported);sld.appendChild(this.createElementDefaultNS("Name",s.name));if(s.title){sld.appendChild(this.createElementDefaultNS("Title",s.title));}
-style.appendChild(sld);}else{style.appendChild(this.createElementDefaultNS("Name",s.name));style.appendChild(this.createElementDefaultNS("Title",s.title));if(s['abstract']){style.appendChild(this.createElementDefaultNS("Abstract",s['abstract']));}}
-node.appendChild(style);}}
-return node;},write_wmc_OnlineResource:function(href){var node=this.createElementDefaultNS("OnlineResource");this.setAttributeNS(node,this.namespaces.xlink,"xlink:type","simple");this.setAttributeNS(node,this.namespaces.xlink,"xlink:href",href);return node;},CLASS_NAME:"OpenLayers.Format.WMC.v1"});OpenLayers.Format.WMSCapabilities.v1_1=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1,{readers:{"wms":OpenLayers.Util.applyDefaults({"WMT_MS_Capabilities":function(node,obj){this.readChildNodes(node,obj);},"Keyword":function(node,obj){if(obj.keywords){obj.keywords.push(this.getChildValue(node));}},"DescribeLayer":function(node,obj){obj.describelayer={formats:[]};this.readChildNodes(node,obj.describelayer);},"GetLegendGraphic":function(node,obj){obj.getlegendgraphic={formats:[]};this.readChildNodes(node,obj.getlegendgraphic);},"GetStyles":function(node,obj){obj.getstyles={formats:[]};this.readChildNodes(node,obj.getstyles);},"PutStyles":function(node,obj){obj.putstyles={formats:[]};this.readChildNodes(node,obj.putstyles);},"UserDefinedSymbolization":function(node,obj){var userSymbols={supportSLD:parseInt(node.getAttribute("SupportSLD"))==1,userLayer:parseInt(node.getAttribute("UserLayer"))==1,userStyle:parseInt(node.getAttribute("UserStyle"))==1,remoteWFS:parseInt(node.getAttribute("RemoteWFS"))==1};obj.userSymbols=userSymbols;},"LatLonBoundingBox":function(node,obj){obj.llbbox=[parseFloat(node.getAttribute("minx")),parseFloat(node.getAttribute("miny")),parseFloat(node.getAttribute("maxx")),parseFloat(node.getAttribute("maxy"))];},"BoundingBox":function(node,obj){var bbox=OpenLayers.Format.WMSCapabilities.v1.prototype.readers["wms"].BoundingBox.apply(this,[node,obj]);bbox.srs=node.getAttribute("SRS");obj.bbox[bbox.srs]=bbox;},"ScaleHint":function(node,obj){var min=node.getAttribute("min");var max=node.getAttribute("max");var rad2=Math.pow(2,0.5);var ipm=OpenLayers.INCHES_PER_UNIT["m"];obj.maxScale=parseFloat(((min/rad2)*ipm*OpenLayers.DOTS_PER_INCH).toPrecision(13));obj.minScale=parseFloat(((max/rad2)*ipm*OpenLayers.DOTS_PER_INCH).toPrecision(13));},"Dimension":function(node,obj){var name=node.getAttribute("name").toLowerCase();var dim={name:name,units:node.getAttribute("units"),unitsymbol:node.getAttribute("unitSymbol")};obj.dimensions[dim.name]=dim;},"Extent":function(node,obj){var name=node.getAttribute("name").toLowerCase();if(name in obj["dimensions"]){var extent=obj.dimensions[name];extent.nearestVal=node.getAttribute("nearestValue")==="1";extent.multipleVal=node.getAttribute("multipleValues")==="1";extent.current=node.getAttribute("current")==="1";extent["default"]=node.getAttribute("default")||"";var values=this.getChildValue(node);extent.values=values.split(",");}}},OpenLayers.Format.WMSCapabilities.v1.prototype.readers["wms"])},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1"});OpenLayers.Format.WMSCapabilities.v1_3=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1,{readers:{"wms":OpenLayers.Util.applyDefaults({"WMS_Capabilities":function(node,obj){this.readChildNodes(node,obj);},"LayerLimit":function(node,obj){obj.layerLimit=parseInt(this.getChildValue(node));},"MaxWidth":function(node,obj){obj.maxWidth=parseInt(this.getChildValue(node));},"MaxHeight":function(node,obj){obj.maxHeight=parseInt(this.getChildValue(node));},"BoundingBox":function(node,obj){var bbox=OpenLayers.Format.WMSCapabilities.v1.prototype.readers["wms"].BoundingBox.apply(this,[node,obj]);bbox.srs=node.getAttribute("CRS");obj.bbox[bbox.srs]=bbox;},"CRS":function(node,obj){this.readers.wms.SRS.apply(this,[node,obj]);},"EX_GeographicBoundingBox":function(node,obj){obj.llbbox=[];this.readChildNodes(node,obj.llbbox);},"westBoundLongitude":function(node,obj){obj[0]=this.getChildValue(node);},"eastBoundLongitude":function(node,obj){obj[2]=this.getChildValue(node);},"southBoundLatitude":function(node,obj){obj[1]=this.getChildValue(node);},"northBoundLatitude":function(node,obj){obj[3]=this.getChildValue(node);},"MinScaleDenominator":function(node,obj){obj.maxScale=parseFloat(this.getChildValue(node)).toPrecision(16);},"MaxScaleDenominator":function(node,obj){obj.minScale=parseFloat(this.getChildValue(node)).toPrecision(16);},"Dimension":function(node,obj){var name=node.getAttribute("name").toLowerCase();var dim={name:name,units:node.getAttribute("units"),unitsymbol:node.getAttribute("unitSymbol"),nearestVal:node.getAttribute("nearestValue")==="1",multipleVal:node.getAttribute("multipleValues")==="1","default":node.getAttribute("default")||"",current:node.getAttribute("current")==="1",values:this.getChildValue(node).split(",")};obj.dimensions[dim.name]=dim;},"Keyword":function(node,obj){var keyword={value:this.getChildValue(node),vocabulary:node.getAttribute("vocabulary")};if(obj.keywords){obj.keywords.push(keyword);}}},OpenLayers.Format.WMSCapabilities.v1.prototype.readers["wms"]),"sld":{"UserDefinedSymbolization":function(node,obj){this.readers.wms.UserDefinedSymbolization.apply(this,[node,obj]);obj.userSymbols.inlineFeature=parseInt(node.getAttribute("InlineFeature"))==1;obj.userSymbols.remoteWCS=parseInt(node.getAttribute("RemoteWCS"))==1;},"DescribeLayer":function(node,obj){this.readers.wms.DescribeLayer.apply(this,[node,obj]);},"GetLegendGraphic":function(node,obj){this.readers.wms.GetLegendGraphic.apply(this,[node,obj]);}}},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_3"});OpenLayers.Format.WMTSCapabilities.v1_0_0=OpenLayers.Class(OpenLayers.Format.OWSCommon.v1_1_0,{version:"1.0.0",namespaces:{ows:"http://www.opengis.net/ows/1.1",wmts:"http://www.opengis.net/wmts/1.0",xlink:"http://www.w3.org/1999/xlink"},yx:null,defaultPrefix:"wmts",initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);this.options=options;var yx=OpenLayers.Util.extend({},OpenLayers.Format.WMTSCapabilities.prototype.yx);this.yx=OpenLayers.Util.extend(yx,this.yx);},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-if(data&&data.nodeType==9){data=data.documentElement;}
-var capabilities={};this.readNode(data,capabilities);capabilities.version=this.version;return capabilities;},readers:{"wmts":{"Capabilities":function(node,obj){this.readChildNodes(node,obj);},"Contents":function(node,obj){obj.contents={};obj.contents.layers=[];obj.contents.tileMatrixSets={};this.readChildNodes(node,obj.contents);},"Layer":function(node,obj){var layer={styles:[],formats:[],tileMatrixSetLinks:[]};layer.layers=[];this.readChildNodes(node,layer);obj.layers.push(layer);},"Style":function(node,obj){var style={};style.isDefault=(node.getAttribute("isDefault")==="true");this.readChildNodes(node,style);obj.styles.push(style);},"Format":function(node,obj){obj.formats.push(this.getChildValue(node));},"TileMatrixSetLink":function(node,obj){var tileMatrixSetLink={};this.readChildNodes(node,tileMatrixSetLink);obj.tileMatrixSetLinks.push(tileMatrixSetLink);},"TileMatrixSet":function(node,obj){if(obj.layers){var tileMatrixSet={matrixIds:[]};this.readChildNodes(node,tileMatrixSet);obj.tileMatrixSets[tileMatrixSet.identifier]=tileMatrixSet;}else{obj.tileMatrixSet=this.getChildValue(node);}},"TileMatrix":function(node,obj){var tileMatrix={supportedCRS:obj.supportedCRS};this.readChildNodes(node,tileMatrix);obj.matrixIds.push(tileMatrix);},"ScaleDenominator":function(node,obj){obj.scaleDenominator=parseFloat(this.getChildValue(node));},"TopLeftCorner":function(node,obj){var topLeftCorner=this.getChildValue(node);var coords=topLeftCorner.split(" ");var yx;if(obj.supportedCRS){var crs=obj.supportedCRS.replace(/urn:ogc:def:crs:(\w+):.+:(\w+)$/,"urn:ogc:def:crs:$1::$2");yx=!!this.yx[crs];}
-if(yx){obj.topLeftCorner=new OpenLayers.LonLat(coords[1],coords[0]);}else{obj.topLeftCorner=new OpenLayers.LonLat(coords[0],coords[1]);}},"TileWidth":function(node,obj){obj.tileWidth=parseInt(this.getChildValue(node));},"TileHeight":function(node,obj){obj.tileHeight=parseInt(this.getChildValue(node));},"MatrixWidth":function(node,obj){obj.matrixWidth=parseInt(this.getChildValue(node));},"MatrixHeight":function(node,obj){obj.matrixHeight=parseInt(this.getChildValue(node));},"WSDL":function(node,obj){obj.wsdl={};obj.wsdl.href=node.getAttribute("xlink:href");},"ServiceMetadataURL":function(node,obj){obj.serviceMetadataUrl={};obj.serviceMetadataUrl.href=node.getAttribute("xlink:href");}},"ows":OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"]},CLASS_NAME:"OpenLayers.Format.WMTSCapabilities.v1_0_0"});OpenLayers.Layer.Boxes=OpenLayers.Class(OpenLayers.Layer.Markers,{initialize:function(name,options){OpenLayers.Layer.Markers.prototype.initialize.apply(this,arguments);},drawMarker:function(marker){var bounds=marker.bounds;var topleft=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(bounds.left,bounds.top));var botright=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(bounds.right,bounds.bottom));if(botright==null||topleft==null){marker.display(false);}else{var sz=new OpenLayers.Size(Math.max(1,botright.x-topleft.x),Math.max(1,botright.y-topleft.y));var markerDiv=marker.draw(topleft,sz);if(!marker.drawn){this.div.appendChild(markerDiv);marker.drawn=true;}}},removeMarker:function(marker){OpenLayers.Util.removeItem(this.markers,marker);if((marker.div!=null)&&(marker.div.parentNode==this.div)){this.div.removeChild(marker.div);}},CLASS_NAME:"OpenLayers.Layer.Boxes"});OpenLayers.Layer.GeoRSS=OpenLayers.Class(OpenLayers.Layer.Markers,{location:null,features:null,formatOptions:null,selectedFeature:null,icon:null,popupSize:null,useFeedTitle:true,initialize:function(name,location,options){OpenLayers.Layer.Markers.prototype.initialize.apply(this,[name,options]);this.location=location;this.features=[];},destroy:function(){OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);this.clearFeatures();this.features=null;},loadRSS:function(){if(!this.loaded){this.events.triggerEvent("loadstart");OpenLayers.Request.GET({url:this.location,success:this.parseData,scope:this});this.loaded=true;}},moveTo:function(bounds,zoomChanged,minor){OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadRSS();}},parseData:function(ajaxRequest){var doc=ajaxRequest.responseXML;if(!doc||!doc.documentElement){doc=OpenLayers.Format.XML.prototype.read(ajaxRequest.responseText);}
-if(this.useFeedTitle){var name=null;try{name=doc.getElementsByTagNameNS('*','title')[0].firstChild.nodeValue;}
-catch(e){name=doc.getElementsByTagName('title')[0].firstChild.nodeValue;}
-if(name){this.setName(name);}}
-var options={};OpenLayers.Util.extend(options,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){options.externalProjection=this.projection;options.internalProjection=this.map.getProjectionObject();}
-var format=new OpenLayers.Format.GeoRSS(options);var features=format.read(doc);for(var i=0,len=features.length;i<len;i++){var data={};var feature=features[i];if(!feature.geometry){continue;}
-var title=feature.attributes.title?feature.attributes.title:"Untitled";var description=feature.attributes.description?feature.attributes.description:"No description.";var link=feature.attributes.link?feature.attributes.link:"";var location=feature.geometry.getBounds().getCenterLonLat();data.icon=this.icon==null?OpenLayers.Marker.defaultIcon():this.icon.clone();data.popupSize=this.popupSize?this.popupSize.clone():new OpenLayers.Size(250,120);if(title||description){data.title=title;data.description=description;var contentHTML='<div class="olLayerGeoRSSClose">[x]</div>';contentHTML+='<div class="olLayerGeoRSSTitle">';if(link){contentHTML+='<a class="link" href="'+link+'" target="_blank">';}
-contentHTML+=title;if(link){contentHTML+='</a>';}
-contentHTML+='</div>';contentHTML+='<div style="" class="olLayerGeoRSSDescription">';contentHTML+=description;contentHTML+='</div>';data['popupContentHTML']=contentHTML;}
-var feature=new OpenLayers.Feature(this,location,data);this.features.push(feature);var marker=feature.createMarker();marker.events.register('click',feature,this.markerClick);this.addMarker(marker);}
-this.events.triggerEvent("loadend");},markerClick:function(evt){var sameMarkerClicked=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!sameMarkerClicked)?this:null;for(var i=0,len=this.layer.map.popups.length;i<len;i++){this.layer.map.removePopup(this.layer.map.popups[i]);}
-if(!sameMarkerClicked){var popup=this.createPopup();OpenLayers.Event.observe(popup.div,"click",OpenLayers.Function.bind(function(){for(var i=0,len=this.layer.map.popups.length;i<len;i++){this.layer.map.removePopup(this.layer.map.popups[i]);}},this));this.layer.map.addPopup(popup);}
-OpenLayers.Event.stop(evt);},clearFeatures:function(){if(this.features!=null){while(this.features.length>0){var feature=this.features[0];OpenLayers.Util.removeItem(this.features,feature);feature.destroy();}}},CLASS_NAME:"OpenLayers.Layer.GeoRSS"});OpenLayers.Layer.Google=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:21,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.00002145767211914062,0.00001072883605957031,0.00000536441802978515,0.00000268220901489257,0.0000013411045074462891,0.00000067055225372314453],type:null,wrapDateLine:true,sphericalMercator:false,version:null,initialize:function(name,options){options=options||{};if(!options.version){options.version=typeof GMap2==="function"?"2":"3";}
-var mixin=OpenLayers.Layer.Google["v"+
-options.version.replace(/\./g,"_")];if(mixin){OpenLayers.Util.applyDefaults(options,mixin);}else{throw"Unsupported Google Maps API version: "+options.version;}
-OpenLayers.Util.applyDefaults(options,mixin.DEFAULTS);if(options.maxExtent){options.maxExtent=options.maxExtent.clone();}
-OpenLayers.Layer.EventPane.prototype.initialize.apply(this,[name,options]);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,[name,options]);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();}},clone:function(){return new OpenLayers.Layer.Google(this.name,this.getOptions());},setVisibility:function(visible){var opacity=this.opacity==null?1:this.opacity;OpenLayers.Layer.EventPane.prototype.setVisibility.apply(this,arguments);this.setOpacity(opacity);},display:function(visible){if(!this._dragging){this.setGMapVisibility(visible);}
-OpenLayers.Layer.EventPane.prototype.display.apply(this,arguments);},moveTo:function(bounds,zoomChanged,dragging){this._dragging=dragging;OpenLayers.Layer.EventPane.prototype.moveTo.apply(this,arguments);delete this._dragging;},setOpacity:function(opacity){if(opacity!==this.opacity){if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"opacity"});}
-this.opacity=opacity;}
-if(this.getVisibility()){var container=this.getMapContainer();OpenLayers.Util.modifyDOMElement(container,null,null,null,null,null,null,opacity);}},destroy:function(){if(this.map){this.setGMapVisibility(false);var cache=OpenLayers.Layer.Google.cache[this.map.id];if(cache&&cache.count<=1){this.removeGMapElements();}}
-OpenLayers.Layer.EventPane.prototype.destroy.apply(this,arguments);},removeGMapElements:function(){var cache=OpenLayers.Layer.Google.cache[this.map.id];if(cache){var container=this.mapObject&&this.getMapContainer();if(container&&container.parentNode){container.parentNode.removeChild(container);}
-var termsOfUse=cache.termsOfUse;if(termsOfUse&&termsOfUse.parentNode){termsOfUse.parentNode.removeChild(termsOfUse);}
-var poweredBy=cache.poweredBy;if(poweredBy&&poweredBy.parentNode){poweredBy.parentNode.removeChild(poweredBy);}}},removeMap:function(map){if(this.visibility&&this.mapObject){this.setGMapVisibility(false);}
-var cache=OpenLayers.Layer.Google.cache[map.id];if(cache){if(cache.count<=1){this.removeGMapElements();delete OpenLayers.Layer.Google.cache[map.id];}else{--cache.count;}}
-delete this.termsOfUse;delete this.poweredBy;delete this.mapObject;delete this.dragObject;OpenLayers.Layer.EventPane.prototype.removeMap.apply(this,arguments);},getOLBoundsFromMapObjectBounds:function(moBounds){var olBounds=null;if(moBounds!=null){var sw=moBounds.getSouthWest();var ne=moBounds.getNorthEast();if(this.sphericalMercator){sw=this.forwardMercator(sw.lng(),sw.lat());ne=this.forwardMercator(ne.lng(),ne.lat());}else{sw=new OpenLayers.LonLat(sw.lng(),sw.lat());ne=new OpenLayers.LonLat(ne.lng(),ne.lat());}
-olBounds=new OpenLayers.Bounds(sw.lon,sw.lat,ne.lon,ne.lat);}
-return olBounds;},getWarningHTML:function(){return OpenLayers.i18n("googleWarning");},getMapObjectCenter:function(){return this.mapObject.getCenter();},getMapObjectZoom:function(){return this.mapObject.getZoom();},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lng(),moLonLat.lat()).lon:moLonLat.lng();},getLatitudeFromMapObjectLonLat:function(moLonLat){var lat=this.sphericalMercator?this.forwardMercator(moLonLat.lng(),moLonLat.lat()).lat:moLonLat.lat();return lat;},getXFromMapObjectPixel:function(moPixel){return moPixel.x;},getYFromMapObjectPixel:function(moPixel){return moPixel.y;},CLASS_NAME:"OpenLayers.Layer.Google"});OpenLayers.Layer.Google.cache={};OpenLayers.Layer.Google.v2={termsOfUse:null,poweredBy:null,dragObject:null,loadMapObject:function(){if(!this.type){this.type=G_NORMAL_MAP;}
-var mapObject,termsOfUse,poweredBy;var cache=OpenLayers.Layer.Google.cache[this.map.id];if(cache){mapObject=cache.mapObject;termsOfUse=cache.termsOfUse;poweredBy=cache.poweredBy;++cache.count;}else{var container=this.map.viewPortDiv;var div=document.createElement("div");div.id=this.map.id+"_GMap2Container";div.style.position="absolute";div.style.width="100%";div.style.height="100%";container.appendChild(div);try{mapObject=new GMap2(div);termsOfUse=div.lastChild;container.appendChild(termsOfUse);termsOfUse.style.zIndex="1100";termsOfUse.style.right="";termsOfUse.style.bottom="";termsOfUse.className="olLayerGoogleCopyright";poweredBy=div.lastChild;container.appendChild(poweredBy);poweredBy.style.zIndex="1100";poweredBy.style.right="";poweredBy.style.bottom="";poweredBy.className="olLayerGooglePoweredBy gmnoprint";}catch(e){throw(e);}
-OpenLayers.Layer.Google.cache[this.map.id]={mapObject:mapObject,termsOfUse:termsOfUse,poweredBy:poweredBy,count:1};}
-this.mapObject=mapObject;this.termsOfUse=termsOfUse;this.poweredBy=poweredBy;if(OpenLayers.Util.indexOf(this.mapObject.getMapTypes(),this.type)===-1){this.mapObject.addMapType(this.type);}
-if(typeof mapObject.getDragObject=="function"){this.dragObject=mapObject.getDragObject();}else{this.dragPanMapObject=null;}
-if(this.isBaseLayer===false){this.setGMapVisibility(this.div.style.display!=="none");}},onMapResize:function(){if(this.visibility&&this.mapObject.isLoaded()){this.mapObject.checkResize();}else{if(!this._resized){var layer=this;var handle=GEvent.addListener(this.mapObject,"load",function(){GEvent.removeListener(handle);delete layer._resized;layer.mapObject.checkResize();layer.moveTo(layer.map.getCenter(),layer.map.getZoom());});}
-this._resized=true;}},setGMapVisibility:function(visible){var cache=OpenLayers.Layer.Google.cache[this.map.id];if(cache){var container=this.mapObject.getContainer();if(visible===true){this.mapObject.setMapType(this.type);container.style.display="";this.termsOfUse.style.left="";this.termsOfUse.style.display="";this.poweredBy.style.display="";cache.displayed=this.id;}else{if(cache.displayed===this.id){delete cache.displayed;}
-if(!cache.displayed){container.style.display="none";this.termsOfUse.style.display="none";this.termsOfUse.style.left="-9999px";this.poweredBy.style.display="none";}}}},getMapContainer:function(){return this.mapObject.getContainer();},getMapObjectBoundsFromOLBounds:function(olBounds){var moBounds=null;if(olBounds!=null){var sw=this.sphericalMercator?this.inverseMercator(olBounds.bottom,olBounds.left):new OpenLayers.LonLat(olBounds.bottom,olBounds.left);var ne=this.sphericalMercator?this.inverseMercator(olBounds.top,olBounds.right):new OpenLayers.LonLat(olBounds.top,olBounds.right);moBounds=new GLatLngBounds(new GLatLng(sw.lat,sw.lon),new GLatLng(ne.lat,ne.lon));}
-return moBounds;},setMapObjectCenter:function(center,zoom){this.mapObject.setCenter(center,zoom);},dragPanMapObject:function(dX,dY){this.dragObject.moveBy(new GSize(-dX,dY));},getMapObjectLonLatFromMapObjectPixel:function(moPixel){return this.mapObject.fromContainerPixelToLatLng(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.fromLatLngToContainerPixel(moLonLat);},getMapObjectZoomFromMapObjectBounds:function(moBounds){return this.mapObject.getBoundsZoomLevel(moBounds);},getMapObjectLonLatFromLonLat:function(lon,lat){var gLatLng;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);gLatLng=new GLatLng(lonlat.lat,lonlat.lon);}else{gLatLng=new GLatLng(lat,lon);}
-return gLatLng;},getMapObjectPixelFromXY:function(x,y){return new GPoint(x,y);}};OpenLayers.Layer.Grid=OpenLayers.Class(OpenLayers.Layer.HTTPRequest,{tileSize:null,grid:null,singleTile:false,ratio:1.5,buffer:2,numLoadingTiles:0,initialize:function(name,url,params,options){OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this,arguments);this.events.addEventType("tileloaded");this.grid=[];},destroy:function(){this.clearGrid();this.grid=null;this.tileSize=null;OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this,arguments);},clearGrid:function(){if(this.grid){for(var iRow=0,len=this.grid.length;iRow<len;iRow++){var row=this.grid[iRow];for(var iCol=0,clen=row.length;iCol<clen;iCol++){var tile=row[iCol];this.removeTileMonitoringHooks(tile);tile.destroy();}}
-this.grid=[];}},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.Grid(this.name,this.url,this.params,this.getOptions());}
-obj=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[obj]);if(this.tileSize!=null){obj.tileSize=this.tileSize.clone();}
-obj.grid=[];return obj;},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);bounds=bounds||this.map.getExtent();if(bounds!=null){var forceReTile=!this.grid.length||zoomChanged;var tilesBounds=this.getTilesBounds();if(this.singleTile){if(forceReTile||(!dragging&&!tilesBounds.containsBounds(bounds))){this.initSingleTile(bounds);}}else{if(forceReTile||!tilesBounds.containsBounds(bounds,true)){this.initGriddedTiles(bounds);}else{this.moveGriddedTiles(bounds);}}}},setTileSize:function(size){if(this.singleTile){size=this.map.getSize();size.h=parseInt(size.h*this.ratio);size.w=parseInt(size.w*this.ratio);}
-OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this,[size]);},getGridBounds:function(){var msg="The getGridBounds() function is deprecated. It will be "+"removed in 3.0. Please use getTilesBounds() instead.";OpenLayers.Console.warn(msg);return this.getTilesBounds();},getTilesBounds:function(){var bounds=null;if(this.grid.length){var bottom=this.grid.length-1;var bottomLeftTile=this.grid[bottom][0];var right=this.grid[0].length-1;var topRightTile=this.grid[0][right];bounds=new OpenLayers.Bounds(bottomLeftTile.bounds.left,bottomLeftTile.bounds.bottom,topRightTile.bounds.right,topRightTile.bounds.top);}
-return bounds;},initSingleTile:function(bounds){var center=bounds.getCenterLonLat();var tileWidth=bounds.getWidth()*this.ratio;var tileHeight=bounds.getHeight()*this.ratio;var tileBounds=new OpenLayers.Bounds(center.lon-(tileWidth/2),center.lat-(tileHeight/2),center.lon+(tileWidth/2),center.lat+(tileHeight/2));var ul=new OpenLayers.LonLat(tileBounds.left,tileBounds.top);var px=this.map.getLayerPxFromLonLat(ul);if(!this.grid.length){this.grid[0]=[];}
-var tile=this.grid[0][0];if(!tile){tile=this.addTile(tileBounds,px);this.addTileMonitoringHooks(tile);tile.draw();this.grid[0][0]=tile;}else{tile.moveTo(tileBounds,px);}
-this.removeExcessTiles(1,1);},calculateGridLayout:function(bounds,extent,resolution){var tilelon=resolution*this.tileSize.w;var tilelat=resolution*this.tileSize.h;var offsetlon=bounds.left-extent.left;var tilecol=Math.floor(offsetlon/tilelon)-this.buffer;var tilecolremain=offsetlon/tilelon-tilecol;var tileoffsetx=-tilecolremain*this.tileSize.w;var tileoffsetlon=extent.left+tilecol*tilelon;var offsetlat=bounds.top-(extent.bottom+tilelat);var tilerow=Math.ceil(offsetlat/tilelat)+this.buffer;var tilerowremain=tilerow-offsetlat/tilelat;var tileoffsety=-tilerowremain*this.tileSize.h;var tileoffsetlat=extent.bottom+tilerow*tilelat;return{tilelon:tilelon,tilelat:tilelat,tileoffsetlon:tileoffsetlon,tileoffsetlat:tileoffsetlat,tileoffsetx:tileoffsetx,tileoffsety:tileoffsety};},initGriddedTiles:function(bounds){var viewSize=this.map.getSize();var minRows=Math.ceil(viewSize.h/this.tileSize.h)+
-Math.max(1,2*this.buffer);var minCols=Math.ceil(viewSize.w/this.tileSize.w)+
-Math.max(1,2*this.buffer);var extent=this.getMaxExtent();var resolution=this.map.getResolution();var tileLayout=this.calculateGridLayout(bounds,extent,resolution);var tileoffsetx=Math.round(tileLayout.tileoffsetx);var tileoffsety=Math.round(tileLayout.tileoffsety);var tileoffsetlon=tileLayout.tileoffsetlon;var tileoffsetlat=tileLayout.tileoffsetlat;var tilelon=tileLayout.tilelon;var tilelat=tileLayout.tilelat;this.origin=new OpenLayers.Pixel(tileoffsetx,tileoffsety);var startX=tileoffsetx;var startLon=tileoffsetlon;var rowidx=0;var layerContainerDivLeft=parseInt(this.map.layerContainerDiv.style.left);var layerContainerDivTop=parseInt(this.map.layerContainerDiv.style.top);do{var row=this.grid[rowidx++];if(!row){row=[];this.grid.push(row);}
-tileoffsetlon=startLon;tileoffsetx=startX;var colidx=0;do{var tileBounds=new OpenLayers.Bounds(tileoffsetlon,tileoffsetlat,tileoffsetlon+tilelon,tileoffsetlat+tilelat);var x=tileoffsetx;x-=layerContainerDivLeft;var y=tileoffsety;y-=layerContainerDivTop;var px=new OpenLayers.Pixel(x,y);var tile=row[colidx++];if(!tile){tile=this.addTile(tileBounds,px);this.addTileMonitoringHooks(tile);row.push(tile);}else{tile.moveTo(tileBounds,px,false);}
-tileoffsetlon+=tilelon;tileoffsetx+=this.tileSize.w;}while((tileoffsetlon<=bounds.right+tilelon*this.buffer)||colidx<minCols);tileoffsetlat-=tilelat;tileoffsety+=this.tileSize.h;}while((tileoffsetlat>=bounds.bottom-tilelat*this.buffer)||rowidx<minRows);this.removeExcessTiles(rowidx,colidx);this.spiralTileLoad();},getMaxExtent:function(){return this.maxExtent;},spiralTileLoad:function(){var tileQueue=[];var directions=["right","down","left","up"];var iRow=0;var iCell=-1;var direction=OpenLayers.Util.indexOf(directions,"right");var directionsTried=0;while(directionsTried<directions.length){var testRow=iRow;var testCell=iCell;switch(directions[direction]){case"right":testCell++;break;case"down":testRow++;break;case"left":testCell--;break;case"up":testRow--;break;}
-var tile=null;if((testRow<this.grid.length)&&(testRow>=0)&&(testCell<this.grid[0].length)&&(testCell>=0)){tile=this.grid[testRow][testCell];}
-if((tile!=null)&&(!tile.queued)){tileQueue.unshift(tile);tile.queued=true;directionsTried=0;iRow=testRow;iCell=testCell;}else{direction=(direction+1)%4;directionsTried++;}}
-for(var i=0,len=tileQueue.length;i<len;i++){var tile=tileQueue[i];tile.draw();tile.queued=false;}},addTile:function(bounds,position){},addTileMonitoringHooks:function(tile){tile.onLoadStart=function(){if(this.numLoadingTiles==0){this.events.triggerEvent("loadstart");}
-this.numLoadingTiles++;};tile.events.register("loadstart",this,tile.onLoadStart);tile.onLoadEnd=function(){this.numLoadingTiles--;this.events.triggerEvent("tileloaded");if(this.numLoadingTiles==0){this.events.triggerEvent("loadend");}};tile.events.register("loadend",this,tile.onLoadEnd);tile.events.register("unload",this,tile.onLoadEnd);},removeTileMonitoringHooks:function(tile){tile.unload();tile.events.un({"loadstart":tile.onLoadStart,"loadend":tile.onLoadEnd,"unload":tile.onLoadEnd,scope:this});},moveGriddedTiles:function(bounds){var buffer=this.buffer||1;while(true){var tlLayer=this.grid[0][0].position;var tlViewPort=this.map.getViewPortPxFromLayerPx(tlLayer);if(tlViewPort.x>-this.tileSize.w*(buffer-1)){this.shiftColumn(true);}else if(tlViewPort.x<-this.tileSize.w*buffer){this.shiftColumn(false);}else if(tlViewPort.y>-this.tileSize.h*(buffer-1)){this.shiftRow(true);}else if(tlViewPort.y<-this.tileSize.h*buffer){this.shiftRow(false);}else{break;}};},shiftRow:function(prepend){var modelRowIndex=(prepend)?0:(this.grid.length-1);var grid=this.grid;var modelRow=grid[modelRowIndex];var resolution=this.map.getResolution();var deltaY=(prepend)?-this.tileSize.h:this.tileSize.h;var deltaLat=resolution*-deltaY;var row=(prepend)?grid.pop():grid.shift();for(var i=0,len=modelRow.length;i<len;i++){var modelTile=modelRow[i];var bounds=modelTile.bounds.clone();var position=modelTile.position.clone();bounds.bottom=bounds.bottom+deltaLat;bounds.top=bounds.top+deltaLat;position.y=position.y+deltaY;row[i].moveTo(bounds,position);}
-if(prepend){grid.unshift(row);}else{grid.push(row);}},shiftColumn:function(prepend){var deltaX=(prepend)?-this.tileSize.w:this.tileSize.w;var resolution=this.map.getResolution();var deltaLon=resolution*deltaX;for(var i=0,len=this.grid.length;i<len;i++){var row=this.grid[i];var modelTileIndex=(prepend)?0:(row.length-1);var modelTile=row[modelTileIndex];var bounds=modelTile.bounds.clone();var position=modelTile.position.clone();bounds.left=bounds.left+deltaLon;bounds.right=bounds.right+deltaLon;position.x=position.x+deltaX;var tile=prepend?this.grid[i].pop():this.grid[i].shift();tile.moveTo(bounds,position);if(prepend){row.unshift(tile);}else{row.push(tile);}}},removeExcessTiles:function(rows,columns){while(this.grid.length>rows){var row=this.grid.pop();for(var i=0,l=row.length;i<l;i++){var tile=row[i];this.removeTileMonitoringHooks(tile);tile.destroy();}}
-while(this.grid[0].length>columns){for(var i=0,l=this.grid.length;i<l;i++){var row=this.grid[i];var tile=row.pop();this.removeTileMonitoringHooks(tile);tile.destroy();}}},onMapResize:function(){if(this.singleTile){this.clearGrid();this.setTileSize();}},getTileBounds:function(viewPortPx){var maxExtent=this.maxExtent;var resolution=this.getResolution();var tileMapWidth=resolution*this.tileSize.w;var tileMapHeight=resolution*this.tileSize.h;var mapPoint=this.getLonLatFromViewPortPx(viewPortPx);var tileLeft=maxExtent.left+(tileMapWidth*Math.floor((mapPoint.lon-
-maxExtent.left)/tileMapWidth));var tileBottom=maxExtent.bottom+(tileMapHeight*Math.floor((mapPoint.lat-
-maxExtent.bottom)/tileMapHeight));return new OpenLayers.Bounds(tileLeft,tileBottom,tileLeft+tileMapWidth,tileBottom+tileMapHeight);},CLASS_NAME:"OpenLayers.Layer.Grid"});OpenLayers.Layer.MultiMap=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[9,1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();this.RESOLUTIONS.unshift(10);}},loadMapObject:function(){try{this.mapObject=new MultimapViewer(this.div);}catch(e){}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{'layerType':"MM",'layerLib':"MultiMap"});},setMapObjectCenter:function(center,zoom){this.mapObject.goToPosition(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCurrentPosition();},getMapObjectZoom:function(){return this.mapObject.getZoomFactor();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){moPixel.x=moPixel.x-(this.map.getSize().w/2);moPixel.y=moPixel.y-(this.map.getSize().h/2);return this.mapObject.getMapPositionAt(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.geoPosToContainerPixels(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lon:moLonLat.lon;},getLatitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lat:moLonLat.lat;},getMapObjectLonLatFromLonLat:function(lon,lat){var mmLatLon;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);mmLatLon=new MMLatLon(lonlat.lat,lonlat.lon);}else{mmLatLon=new MMLatLon(lat,lon);}
-return mmLatLon;},getXFromMapObjectPixel:function(moPixel){return moPixel.x;},getYFromMapObjectPixel:function(moPixel){return moPixel.y;},getMapObjectPixelFromXY:function(x,y){return new MMPoint(x,y);},CLASS_NAME:"OpenLayers.Layer.MultiMap"});OpenLayers.Layer.VirtualEarth=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:19,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.00002145767211914062,0.00001072883605957031,0.00000536441802978515],type:null,wrapDateLine:true,sphericalMercator:false,animationEnabled:true,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();}},loadMapObject:function(){var veDiv=OpenLayers.Util.createDiv(this.name);var sz=this.map.getSize();veDiv.style.width=sz.w+"px";veDiv.style.height=sz.h+"px";this.div.appendChild(veDiv);try{this.mapObject=new VEMap(this.name);}catch(e){}
-if(this.mapObject!=null){try{this.mapObject.LoadMap(null,null,this.type,true);this.mapObject.AttachEvent("onmousedown",OpenLayers.Function.True);}catch(e){}
-this.mapObject.HideDashboard();if(typeof this.mapObject.SetAnimationEnabled=="function"){this.mapObject.SetAnimationEnabled(this.animationEnabled);}}
-if(!this.mapObject||!this.mapObject.vemapcontrol||!this.mapObject.vemapcontrol.PanMap||(typeof this.mapObject.vemapcontrol.PanMap!="function")){this.dragPanMapObject=null;}},onMapResize:function(){this.mapObject.Resize(this.map.size.w,this.map.size.h);},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{'layerType':'VE','layerLib':'VirtualEarth'});},setMapObjectCenter:function(center,zoom){this.mapObject.SetCenterAndZoom(center,zoom);},getMapObjectCenter:function(){return this.mapObject.GetCenter();},dragPanMapObject:function(dX,dY){this.mapObject.vemapcontrol.PanMap(dX,-dY);},getMapObjectZoom:function(){return this.mapObject.GetZoomLevel();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){return(typeof VEPixel!='undefined')?this.mapObject.PixelToLatLong(moPixel):this.mapObject.PixelToLatLong(moPixel.x,moPixel.y);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.LatLongToPixel(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.Longitude,moLonLat.Latitude).lon:moLonLat.Longitude;},getLatitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.Longitude,moLonLat.Latitude).lat:moLonLat.Latitude;},getMapObjectLonLatFromLonLat:function(lon,lat){var veLatLong;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);veLatLong=new VELatLong(lonlat.lat,lonlat.lon);}else{veLatLong=new VELatLong(lat,lon);}
-return veLatLong;},getXFromMapObjectPixel:function(moPixel){return moPixel.x;},getYFromMapObjectPixel:function(moPixel){return moPixel.y;},getMapObjectPixelFromXY:function(x,y){return(typeof VEPixel!='undefined')?new VEPixel(x,y):new Msn.VE.Pixel(x,y);},CLASS_NAME:"OpenLayers.Layer.VirtualEarth"});OpenLayers.Layer.Yahoo=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.00002145767211914062,0.00001072883605957031],type:null,wrapDateLine:true,sphericalMercator:false,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();}},loadMapObject:function(){try{var size=this.getMapObjectSizeFromOLSize(this.map.getSize());this.mapObject=new YMap(this.div,this.type,size);this.mapObject.disableKeyControls();this.mapObject.disableDragMap();if(!this.mapObject.moveByXY||(typeof this.mapObject.moveByXY!="function")){this.dragPanMapObject=null;}}catch(e){}},onMapResize:function(){try{var size=this.getMapObjectSizeFromOLSize(this.map.getSize());this.mapObject.resizeTo(size);}catch(e){}},setMap:function(map){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);this.map.events.register("moveend",this,this.fixYahooEventPane);},fixYahooEventPane:function(){var yahooEventPane=OpenLayers.Util.getElement("ygddfdiv");if(yahooEventPane!=null){if(yahooEventPane.parentNode!=null){yahooEventPane.parentNode.removeChild(yahooEventPane);}
-this.map.events.unregister("moveend",this,this.fixYahooEventPane);}},getWarningHTML:function(){return OpenLayers.i18n("getLayerWarning",{'layerType':'Yahoo','layerLib':'Yahoo'});},getOLZoomFromMapObjectZoom:function(moZoom){var zoom=null;if(moZoom!=null){zoom=OpenLayers.Layer.FixedZoomLevels.prototype.getOLZoomFromMapObjectZoom.apply(this,[moZoom]);zoom=18-zoom;}
-return zoom;},getMapObjectZoomFromOLZoom:function(olZoom){var zoom=null;if(olZoom!=null){zoom=OpenLayers.Layer.FixedZoomLevels.prototype.getMapObjectZoomFromOLZoom.apply(this,[olZoom]);zoom=18-zoom;}
-return zoom;},setMapObjectCenter:function(center,zoom){this.mapObject.drawZoomAndCenter(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCenterLatLon();},dragPanMapObject:function(dX,dY){this.mapObject.moveByXY({'x':-dX,'y':dY});},getMapObjectZoom:function(){return this.mapObject.getZoomLevel();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){return this.mapObject.convertXYLatLon(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.convertLatLonXY(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.Lon,moLonLat.Lat).lon:moLonLat.Lon;},getLatitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.Lon,moLonLat.Lat).lat:moLonLat.Lat;},getMapObjectLonLatFromLonLat:function(lon,lat){var yLatLong;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);yLatLong=new YGeoPoint(lonlat.lat,lonlat.lon);}else{yLatLong=new YGeoPoint(lat,lon);}
-return yLatLong;},getXFromMapObjectPixel:function(moPixel){return moPixel.x;},getYFromMapObjectPixel:function(moPixel){return moPixel.y;},getMapObjectPixelFromXY:function(x,y){return new YCoordPoint(x,y);},getMapObjectSizeFromOLSize:function(olSize){return new YSize(olSize.w,olSize.h);},CLASS_NAME:"OpenLayers.Layer.Yahoo"});OpenLayers.Style=OpenLayers.Class({id:null,name:null,title:null,description:null,layerName:null,isDefault:false,rules:null,context:null,defaultStyle:null,defaultsPerSymbolizer:false,propertyStyles:null,initialize:function(style,options){OpenLayers.Util.extend(this,options);this.rules=[];if(options&&options.rules){this.addRules(options.rules);}
-this.setDefaultStyle(style||OpenLayers.Feature.Vector.style["default"]);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){for(var i=0,len=this.rules.length;i<len;i++){this.rules[i].destroy();this.rules[i]=null;}
-this.rules=null;this.defaultStyle=null;},createSymbolizer:function(feature){var style=this.defaultsPerSymbolizer?{}:this.createLiterals(OpenLayers.Util.extend({},this.defaultStyle),feature);var rules=this.rules;var rule,context;var elseRules=[];var appliedRules=false;for(var i=0,len=rules.length;i<len;i++){rule=rules[i];var applies=rule.evaluate(feature);if(applies){if(rule instanceof OpenLayers.Rule&&rule.elseFilter){elseRules.push(rule);}else{appliedRules=true;this.applySymbolizer(rule,style,feature);}}}
-if(appliedRules==false&&elseRules.length>0){appliedRules=true;for(var i=0,len=elseRules.length;i<len;i++){this.applySymbolizer(elseRules[i],style,feature);}}
-if(rules.length>0&&appliedRules==false){style.display="none";}
-return style;},applySymbolizer:function(rule,style,feature){var symbolizerPrefix=feature.geometry?this.getSymbolizerPrefix(feature.geometry):OpenLayers.Style.SYMBOLIZER_PREFIXES[0];var symbolizer=rule.symbolizer[symbolizerPrefix]||rule.symbolizer;if(this.defaultsPerSymbolizer===true){var defaults=this.defaultStyle;OpenLayers.Util.applyDefaults(symbolizer,{pointRadius:defaults.pointRadius});if(symbolizer.stroke===true||symbolizer.graphic===true){OpenLayers.Util.applyDefaults(symbolizer,{strokeWidth:defaults.strokeWidth,strokeColor:defaults.strokeColor,strokeOpacity:defaults.strokeOpacity,strokeDashstyle:defaults.strokeDashstyle,strokeLinecap:defaults.strokeLinecap});}
-if(symbolizer.fill===true||symbolizer.graphic===true){OpenLayers.Util.applyDefaults(symbolizer,{fillColor:defaults.fillColor,fillOpacity:defaults.fillOpacity});}
-if(symbolizer.graphic===true){OpenLayers.Util.applyDefaults(symbolizer,{pointRadius:this.defaultStyle.pointRadius,externalGraphic:this.defaultStyle.externalGraphic,graphicName:this.defaultStyle.graphicName,graphicOpacity:this.defaultStyle.graphicOpacity,graphicWidth:this.defaultStyle.graphicWidth,graphicHeight:this.defaultStyle.graphicHeight,graphicXOffset:this.defaultStyle.graphicXOffset,graphicYOffset:this.defaultStyle.graphicYOffset});}}
-return this.createLiterals(OpenLayers.Util.extend(style,symbolizer),feature);},createLiterals:function(style,feature){var context=OpenLayers.Util.extend({},feature.attributes||feature.data);OpenLayers.Util.extend(context,this.context);for(var i in this.propertyStyles){style[i]=OpenLayers.Style.createLiteral(style[i],context,feature,i);}
-return style;},findPropertyStyles:function(){var propertyStyles={};var style=this.defaultStyle;this.addPropertyStyles(propertyStyles,style);var rules=this.rules;var symbolizer,value;for(var i=0,len=rules.length;i<len;i++){symbolizer=rules[i].symbolizer;for(var key in symbolizer){value=symbolizer[key];if(typeof value=="object"){this.addPropertyStyles(propertyStyles,value);}else{this.addPropertyStyles(propertyStyles,symbolizer);break;}}}
-return propertyStyles;},addPropertyStyles:function(propertyStyles,symbolizer){var property;for(var key in symbolizer){property=symbolizer[key];if(typeof property=="string"&&property.match(/\$\{\w+\}/)){propertyStyles[key]=true;}}
-return propertyStyles;},addRules:function(rules){Array.prototype.push.apply(this.rules,rules);this.propertyStyles=this.findPropertyStyles();},setDefaultStyle:function(style){this.defaultStyle=style;this.propertyStyles=this.findPropertyStyles();},getSymbolizerPrefix:function(geometry){var prefixes=OpenLayers.Style.SYMBOLIZER_PREFIXES;for(var i=0,len=prefixes.length;i<len;i++){if(geometry.CLASS_NAME.indexOf(prefixes[i])!=-1){return prefixes[i];}}},clone:function(){var options=OpenLayers.Util.extend({},this);if(this.rules){options.rules=[];for(var i=0,len=this.rules.length;i<len;++i){options.rules.push(this.rules[i].clone());}}
-options.context=this.context&&OpenLayers.Util.extend({},this.context);var defaultStyle=OpenLayers.Util.extend({},this.defaultStyle);return new OpenLayers.Style(defaultStyle,options);},CLASS_NAME:"OpenLayers.Style"});OpenLayers.Style.createLiteral=function(value,context,feature,property){if(typeof value=="string"&&value.indexOf("${")!=-1){value=OpenLayers.String.format(value,context,[feature,property]);value=(isNaN(value)||!value)?value:parseFloat(value);}
-return value;};OpenLayers.Style.SYMBOLIZER_PREFIXES=['Point','Line','Polygon','Text','Raster'];OpenLayers.Control.Navigation=OpenLayers.Class(OpenLayers.Control,{dragPan:null,dragPanOptions:null,documentDrag:false,zoomBox:null,zoomBoxEnabled:true,zoomWheelEnabled:true,mouseWheelOptions:null,handleRightClicks:false,zoomBoxKeyMask:OpenLayers.Handler.MOD_SHIFT,autoActivate:true,initialize:function(options){this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){this.deactivate();if(this.dragPan){this.dragPan.destroy();}
-this.dragPan=null;if(this.zoomBox){this.zoomBox.destroy();}
-this.zoomBox=null;OpenLayers.Control.prototype.destroy.apply(this,arguments);},activate:function(){this.dragPan.activate();if(this.zoomWheelEnabled){this.handlers.wheel.activate();}
-this.handlers.click.activate();if(this.zoomBoxEnabled){this.zoomBox.activate();}
-return OpenLayers.Control.prototype.activate.apply(this,arguments);},deactivate:function(){this.zoomBox.deactivate();this.dragPan.deactivate();this.handlers.click.deactivate();this.handlers.wheel.deactivate();return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},draw:function(){if(this.handleRightClicks){this.map.viewPortDiv.oncontextmenu=OpenLayers.Function.False;}
-var clickCallbacks={'dblclick':this.defaultDblClick,'dblrightclick':this.defaultDblRightClick};var clickOptions={'double':true,'stopDouble':true};this.handlers.click=new OpenLayers.Handler.Click(this,clickCallbacks,clickOptions);this.dragPan=new OpenLayers.Control.DragPan(OpenLayers.Util.extend({map:this.map,documentDrag:this.documentDrag},this.dragPanOptions));this.zoomBox=new OpenLayers.Control.ZoomBox({map:this.map,keyMask:this.zoomBoxKeyMask});this.dragPan.draw();this.zoomBox.draw();this.handlers.wheel=new OpenLayers.Handler.MouseWheel(this,{"up":this.wheelUp,"down":this.wheelDown},this.mouseWheelOptions);},defaultDblClick:function(evt){var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom+1);},defaultDblRightClick:function(evt){var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom-1);},wheelChange:function(evt,deltaZ){var currentZoom=this.map.getZoom();var newZoom=this.map.getZoom()+Math.round(deltaZ);newZoom=Math.max(newZoom,0);newZoom=Math.min(newZoom,this.map.getNumZoomLevels());if(newZoom===currentZoom){return;}
-var size=this.map.getSize();var deltaX=size.w/2-evt.xy.x;var deltaY=evt.xy.y-size.h/2;var newRes=this.map.baseLayer.getResolutionForZoom(newZoom);var zoomPoint=this.map.getLonLatFromPixel(evt.xy);var newCenter=new OpenLayers.LonLat(zoomPoint.lon+deltaX*newRes,zoomPoint.lat+deltaY*newRes);this.map.setCenter(newCenter,newZoom);},wheelUp:function(evt,delta){this.wheelChange(evt,delta||1);},wheelDown:function(evt,delta){this.wheelChange(evt,delta||-1);},disableZoomBox:function(){this.zoomBoxEnabled=false;this.zoomBox.deactivate();},enableZoomBox:function(){this.zoomBoxEnabled=true;if(this.active){this.zoomBox.activate();}},disableZoomWheel:function(){this.zoomWheelEnabled=false;this.handlers.wheel.deactivate();},enableZoomWheel:function(){this.zoomWheelEnabled=true;if(this.active){this.handlers.wheel.activate();}},CLASS_NAME:"OpenLayers.Control.Navigation"});OpenLayers.Filter=OpenLayers.Class({initialize:function(options){OpenLayers.Util.extend(this,options);},destroy:function(){},evaluate:function(context){return true;},clone:function(){return null;},CLASS_NAME:"OpenLayers.Filter"});OpenLayers.Format.WMC.v1_0_0=OpenLayers.Class(OpenLayers.Format.WMC.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/context http://schemas.opengis.net/context/1.0.0/context.xsd",initialize:function(options){OpenLayers.Format.WMC.v1.prototype.initialize.apply(this,[options]);},write_wmc_Layer:function(context){var node=OpenLayers.Format.WMC.v1.prototype.write_wmc_Layer.apply(this,[context]);node.appendChild(this.write_wmc_FormatList(context));node.appendChild(this.write_wmc_StyleList(context));node.appendChild(this.write_wmc_LayerExtension(context));},CLASS_NAME:"OpenLayers.Format.WMC.v1_0_0"});OpenLayers.Format.WMC.v1_1_0=OpenLayers.Class(OpenLayers.Format.WMC.v1,{VERSION:"1.1.0",schemaLocation:"http://www.opengis.net/context http://schemas.opengis.net/context/1.1.0/context.xsd",initialize:function(options){OpenLayers.Format.WMC.v1.prototype.initialize.apply(this,[options]);},read_sld_MinScaleDenominator:function(layerContext,node){var minScaleDenominator=parseFloat(this.getChildValue(node));if(minScaleDenominator>0){layerContext.maxScale=minScaleDenominator;}},read_sld_MaxScaleDenominator:function(layerContext,node){layerContext.minScale=parseFloat(this.getChildValue(node));},write_wmc_Layer:function(context){var node=OpenLayers.Format.WMC.v1.prototype.write_wmc_Layer.apply(this,[context]);if(context.maxScale){var minSD=this.createElementNS(this.namespaces.sld,"sld:MinScaleDenominator");minSD.appendChild(this.createTextNode(context.maxScale.toPrecision(16)));node.appendChild(minSD);}
-if(context.minScale){var maxSD=this.createElementNS(this.namespaces.sld,"sld:MaxScaleDenominator");maxSD.appendChild(this.createTextNode(context.minScale.toPrecision(16)));node.appendChild(maxSD);}
-node.appendChild(this.write_wmc_FormatList(context));node.appendChild(this.write_wmc_StyleList(context));node.appendChild(this.write_wmc_LayerExtension(context));return node;},CLASS_NAME:"OpenLayers.Format.WMC.v1_1_0"});OpenLayers.Format.WMSCapabilities.v1_1_0=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_1,{version:"1.1.0",initialize:function(options){OpenLayers.Format.WMSCapabilities.v1_1.prototype.initialize.apply(this,[options]);},readers:{"wms":OpenLayers.Util.applyDefaults({"SRS":function(node,obj){var srs=this.getChildValue(node);var values=srs.split(/ +/);for(var i=0,len=values.length;i<len;i++){obj.srs[values[i]]=true;}}},OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers["wms"])},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1_0"});OpenLayers.Format.WMSCapabilities.v1_1_1=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_1,{version:"1.1.1",initialize:function(options){OpenLayers.Format.WMSCapabilities.v1_1.prototype.initialize.apply(this,[options]);},readers:{"wms":OpenLayers.Util.applyDefaults({"SRS":function(node,obj){obj.srs[this.getChildValue(node)]=true;}},OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers["wms"])},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1_1"});OpenLayers.Format.WMSCapabilities.v1_3_0=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_3,{version:"1.3.0",CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_3_0"});OpenLayers.Geometry=OpenLayers.Class({id:null,parent:null,bounds:null,initialize:function(){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){this.id=null;this.bounds=null;},clone:function(){return new OpenLayers.Geometry();},setBounds:function(bounds){if(bounds){this.bounds=bounds.clone();}},clearBounds:function(){this.bounds=null;if(this.parent){this.parent.clearBounds();}},extendBounds:function(newBounds){var bounds=this.getBounds();if(!bounds){this.setBounds(newBounds);}else{this.bounds.extend(newBounds);}},getBounds:function(){if(this.bounds==null){this.calculateBounds();}
-return this.bounds;},calculateBounds:function(){},distanceTo:function(geometry,options){},getVertices:function(nodes){},atPoint:function(lonlat,toleranceLon,toleranceLat){var atPoint=false;var bounds=this.getBounds();if((bounds!=null)&&(lonlat!=null)){var dX=(toleranceLon!=null)?toleranceLon:0;var dY=(toleranceLat!=null)?toleranceLat:0;var toleranceBounds=new OpenLayers.Bounds(this.bounds.left-dX,this.bounds.bottom-dY,this.bounds.right+dX,this.bounds.top+dY);atPoint=toleranceBounds.containsLonLat(lonlat);}
-return atPoint;},getLength:function(){return 0.0;},getArea:function(){return 0.0;},getCentroid:function(){return null;},toString:function(){return OpenLayers.Format.WKT.prototype.write(new OpenLayers.Feature.Vector(this));},CLASS_NAME:"OpenLayers.Geometry"});OpenLayers.Geometry.fromWKT=function(wkt){var format=arguments.callee.format;if(!format){format=new OpenLayers.Format.WKT();arguments.callee.format=format;}
-var geom;var result=format.read(wkt);if(result instanceof OpenLayers.Feature.Vector){geom=result.geometry;}else if(result instanceof Array){var len=result.length;var components=new Array(len);for(var i=0;i<len;++i){components[i]=result[i].geometry;}
-geom=new OpenLayers.Geometry.Collection(components);}
-return geom;};OpenLayers.Geometry.segmentsIntersect=function(seg1,seg2,options){var point=options&&options.point;var tolerance=options&&options.tolerance;var intersection=false;var x11_21=seg1.x1-seg2.x1;var y11_21=seg1.y1-seg2.y1;var x12_11=seg1.x2-seg1.x1;var y12_11=seg1.y2-seg1.y1;var y22_21=seg2.y2-seg2.y1;var x22_21=seg2.x2-seg2.x1;var d=(y22_21*x12_11)-(x22_21*y12_11);var n1=(x22_21*y11_21)-(y22_21*x11_21);var n2=(x12_11*y11_21)-(y12_11*x11_21);if(d==0){if(n1==0&&n2==0){intersection=true;}}else{var along1=n1/d;var along2=n2/d;if(along1>=0&&along1<=1&&along2>=0&&along2<=1){if(!point){intersection=true;}else{var x=seg1.x1+(along1*x12_11);var y=seg1.y1+(along1*y12_11);intersection=new OpenLayers.Geometry.Point(x,y);}}}
-if(tolerance){var dist;if(intersection){if(point){var segs=[seg1,seg2];var seg,x,y;outer:for(var i=0;i<2;++i){seg=segs[i];for(var j=1;j<3;++j){x=seg["x"+j];y=seg["y"+j];dist=Math.sqrt(Math.pow(x-intersection.x,2)+
-Math.pow(y-intersection.y,2));if(dist<tolerance){intersection.x=x;intersection.y=y;break outer;}}}}}else{var segs=[seg1,seg2];var source,target,x,y,p,result;outer:for(var i=0;i<2;++i){source=segs[i];target=segs[(i+1)%2];for(var j=1;j<3;++j){p={x:source["x"+j],y:source["y"+j]};result=OpenLayers.Geometry.distanceToSegment(p,target);if(result.distance<tolerance){if(point){intersection=new OpenLayers.Geometry.Point(p.x,p.y);}else{intersection=true;}
-break outer;}}}}}
-return intersection;};OpenLayers.Geometry.distanceToSegment=function(point,segment){var x0=point.x;var y0=point.y;var x1=segment.x1;var y1=segment.y1;var x2=segment.x2;var y2=segment.y2;var dx=x2-x1;var dy=y2-y1;var along=((dx*(x0-x1))+(dy*(y0-y1)))/(Math.pow(dx,2)+Math.pow(dy,2));var x,y;if(along<=0.0){x=x1;y=y1;}else if(along>=1.0){x=x2;y=y2;}else{x=x1+along*dx;y=y1+along*dy;}
-return{distance:Math.sqrt(Math.pow(x-x0,2)+Math.pow(y-y0,2)),x:x,y:y};};OpenLayers.Layer.ArcGIS93Rest=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{format:"png"},isBaseLayer:true,initialize:function(name,url,params,options){var newArguments=[];params=OpenLayers.Util.upperCaseObject(params);newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(this.params.TRANSPARENT&&this.params.TRANSPARENT.toString().toLowerCase()=="true"){if((options==null)||(!options.isBaseLayer)){this.isBaseLayer=false;}
-if(this.params.FORMAT=="jpg"){this.params.FORMAT=OpenLayers.Util.alphaHack()?"gif":"png";}}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.ArcGIS93Rest(this.name,this.url,this.params,this.getOptions());}
-obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){bounds=this.adjustBounds(bounds);var projWords=this.projection.getCode().split(":");var srid=projWords[projWords.length-1];var imageSize=this.getImageSize();var newParams={'BBOX':bounds.toBBOX(),'SIZE':imageSize.w+","+imageSize.h,'F':"image",'BBOXSR':srid,'IMAGESR':srid};if(this.layerDefs){var layerDefStrList=[];var layerID;for(layerID in this.layerDefs){if(this.layerDefs.hasOwnProperty(layerID)){if(this.layerDefs[layerID]){layerDefStrList.push(layerID);layerDefStrList.push(":");layerDefStrList.push(this.layerDefs[layerID]);layerDefStrList.push(";");}}}
-if(layerDefStrList.length>0){newParams['LAYERDEFS']=layerDefStrList.join("");}}
-var requestString=this.getFullRequestString(newParams);return requestString;},setLayerFilter:function(id,queryDef){if(!this.layerDefs){this.layerDefs={};}
-if(queryDef){this.layerDefs[id]=queryDef;}else{delete this.layerDefs[id];}},clearLayerFilter:function(id){if(id){delete this.layerDefs[id];}else{delete this.layerDefs;}},mergeNewParams:function(newParams){var upperParams=OpenLayers.Util.upperCaseObject(newParams);var newArguments=[upperParams];return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,newArguments);},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},CLASS_NAME:"OpenLayers.Layer.ArcGIS93Rest"});OpenLayers.Layer.Google.v3={DEFAULTS:{maxExtent:new OpenLayers.Bounds(-128*156543.0339,-128*156543.0339,128*156543.0339,128*156543.0339),sphericalMercator:true,maxResolution:156543.0339,units:"m",projection:"EPSG:900913"},loadMapObject:function(){if(!this.type){this.type=google.maps.MapTypeId.ROADMAP;}
-var mapObject;var cache=OpenLayers.Layer.Google.cache[this.map.id];if(cache){mapObject=cache.mapObject;++cache.count;}else{var container=this.map.viewPortDiv;var div=document.createElement("div");div.id=this.map.id+"_GMapContainer";div.style.position="absolute";div.style.width="100%";div.style.height="100%";container.appendChild(div);var center=this.map.getCenter();mapObject=new google.maps.Map(div,{center:center?new google.maps.LatLng(center.lat,center.lon):new google.maps.LatLng(0,0),zoom:this.map.getZoom()||0,mapTypeId:this.type,disableDefaultUI:true,keyboardShortcuts:false,draggable:false,disableDoubleClickZoom:true,scrollwheel:false});cache={mapObject:mapObject,count:1};OpenLayers.Layer.Google.cache[this.map.id]=cache;this.repositionListener=google.maps.event.addListenerOnce(mapObject,"center_changed",OpenLayers.Function.bind(this.repositionMapElements,this));}
-this.mapObject=mapObject;this.setGMapVisibility(this.visibility);},repositionMapElements:function(){google.maps.event.trigger(this.mapObject,"resize");var div=this.mapObject.getDiv().firstChild;if(!div||div.childNodes.length<3){this.repositionTimer=window.setTimeout(OpenLayers.Function.bind(this.repositionMapElements,this),250);return false;}
-var cache=OpenLayers.Layer.Google.cache[this.map.id];var container=this.map.viewPortDiv;var termsOfUse=div.lastChild;container.appendChild(termsOfUse);termsOfUse.style.zIndex="1100";termsOfUse.style.bottom="";termsOfUse.className="olLayerGoogleCopyright olLayerGoogleV3";termsOfUse.style.display="";cache.termsOfUse=termsOfUse;var poweredBy=div.lastChild;container.appendChild(poweredBy);poweredBy.style.zIndex="1100";poweredBy.style.bottom="";poweredBy.className="olLayerGooglePoweredBy olLayerGoogleV3 gmnoprint";poweredBy.style.display="";cache.poweredBy=poweredBy;this.setGMapVisibility(this.visibility);},onMapResize:function(){if(this.visibility){google.maps.event.trigger(this.mapObject,"resize");}else{if(!this._resized){var layer=this;google.maps.event.addListenerOnce(this.mapObject,"tilesloaded",function(){delete layer._resized;google.maps.event.trigger(layer.mapObject,"resize");layer.moveTo(layer.map.getCenter(),layer.map.getZoom());});}
-this._resized=true;}},setGMapVisibility:function(visible){var cache=OpenLayers.Layer.Google.cache[this.map.id];if(cache){var type=this.type;var layers=this.map.layers;var layer;for(var i=layers.length-1;i>=0;--i){layer=layers[i];if(layer instanceof OpenLayers.Layer.Google&&layer.visibility===true&&layer.inRange===true){type=layer.type;visible=true;break;}}
-var container=this.mapObject.getDiv();if(visible===true){this.mapObject.setMapTypeId(type);container.style.left="";if(cache.termsOfUse&&cache.termsOfUse.style){cache.termsOfUse.style.left="";cache.termsOfUse.style.display="";cache.poweredBy.style.display="";}
-cache.displayed=this.id;}else{delete cache.displayed;container.style.left="-9999px";if(cache.termsOfUse&&cache.termsOfUse.style){cache.termsOfUse.style.display="none";cache.termsOfUse.style.left="-9999px";cache.poweredBy.style.display="none";}}}},getMapContainer:function(){return this.mapObject.getDiv();},getMapObjectBoundsFromOLBounds:function(olBounds){var moBounds=null;if(olBounds!=null){var sw=this.sphericalMercator?this.inverseMercator(olBounds.bottom,olBounds.left):new OpenLayers.LonLat(olBounds.bottom,olBounds.left);var ne=this.sphericalMercator?this.inverseMercator(olBounds.top,olBounds.right):new OpenLayers.LonLat(olBounds.top,olBounds.right);moBounds=new google.maps.LatLngBounds(new google.maps.LatLng(sw.lat,sw.lon),new google.maps.LatLng(ne.lat,ne.lon));}
-return moBounds;},getMapObjectLonLatFromMapObjectPixel:function(moPixel){var size=this.map.getSize();var lon=this.getLongitudeFromMapObjectLonLat(this.mapObject.center);var lat=this.getLatitudeFromMapObjectLonLat(this.mapObject.center);var res=this.map.getResolution();var delta_x=moPixel.x-(size.w/2);var delta_y=moPixel.y-(size.h/2);var lonlat=new OpenLayers.LonLat(lon+delta_x*res,lat-delta_y*res);if(this.wrapDateLine){lonlat=lonlat.wrapDateLine(this.maxExtent);}
-return this.getMapObjectLonLatFromLonLat(lonlat.lon,lonlat.lat);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){var lon=this.getLongitudeFromMapObjectLonLat(moLonLat);var lat=this.getLatitudeFromMapObjectLonLat(moLonLat);var res=this.map.getResolution();var extent=this.map.getExtent();var px=new OpenLayers.Pixel((1/res*(lon-extent.left)),(1/res*(extent.top-lat)));return this.getMapObjectPixelFromXY(px.x,px.y);},setMapObjectCenter:function(center,zoom){this.mapObject.setOptions({center:center,zoom:zoom});},getMapObjectZoomFromMapObjectBounds:function(moBounds){return this.mapObject.getBoundsZoomLevel(moBounds);},getMapObjectLonLatFromLonLat:function(lon,lat){var gLatLng;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);gLatLng=new google.maps.LatLng(lonlat.lat,lonlat.lon);}else{gLatLng=new google.maps.LatLng(lat,lon);}
-return gLatLng;},getMapObjectPixelFromXY:function(x,y){return new google.maps.Point(x,y);},destroy:function(){if(this.repositionListener){google.maps.event.removeListener(this.repositionListener);}
-if(this.repositionTimer){window.clearTimeout(this.repositionTimer);}
-OpenLayers.Layer.Google.prototype.destroy.apply(this,arguments);}};OpenLayers.Layer.KaMap=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,units:null,resolution:OpenLayers.DOTS_PER_INCH,DEFAULT_PARAMS:{i:'jpeg',map:''},initialize:function(name,url,params,options){var newArguments=[];newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);this.params=OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);},getURL:function(bounds){bounds=this.adjustBounds(bounds);var mapRes=this.map.getResolution();var scale=Math.round((this.map.getScale()*10000))/10000;var pX=Math.round(bounds.left/mapRes);var pY=-Math.round(bounds.top/mapRes);return this.getFullRequestString({t:pY,l:pX,s:scale});},addTile:function(bounds,position){var url=this.getURL(bounds);return new OpenLayers.Tile.Image(this,position,bounds,url,this.tileSize);},calculateGridLayout:function(bounds,extent,resolution){var tilelon=resolution*this.tileSize.w;var tilelat=resolution*this.tileSize.h;var offsetlon=bounds.left;var tilecol=Math.floor(offsetlon/tilelon)-this.buffer;var tilecolremain=offsetlon/tilelon-tilecol;var tileoffsetx=-tilecolremain*this.tileSize.w;var tileoffsetlon=tilecol*tilelon;var offsetlat=bounds.top;var tilerow=Math.ceil(offsetlat/tilelat)+this.buffer;var tilerowremain=tilerow-offsetlat/tilelat;var tileoffsety=-(tilerowremain+1)*this.tileSize.h;var tileoffsetlat=tilerow*tilelat;return{tilelon:tilelon,tilelat:tilelat,tileoffsetlon:tileoffsetlon,tileoffsetlat:tileoffsetlat,tileoffsetx:tileoffsetx,tileoffsety:tileoffsety};},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.KaMap(this.name,this.url,this.params,this.getOptions());}
-obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);if(this.tileSize!=null){obj.tileSize=this.tileSize.clone();}
-obj.grid=[];return obj;},getTileBounds:function(viewPortPx){var resolution=this.getResolution();var tileMapWidth=resolution*this.tileSize.w;var tileMapHeight=resolution*this.tileSize.h;var mapPoint=this.getLonLatFromViewPortPx(viewPortPx);var tileLeft=tileMapWidth*Math.floor(mapPoint.lon/tileMapWidth);var tileBottom=tileMapHeight*Math.floor(mapPoint.lat/tileMapHeight);return new OpenLayers.Bounds(tileLeft,tileBottom,tileLeft+tileMapWidth,tileBottom+tileMapHeight);},CLASS_NAME:"OpenLayers.Layer.KaMap"});OpenLayers.Layer.MapGuide=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,useHttpTile:false,singleTile:false,useOverlay:false,useAsyncOverlay:true,TILE_PARAMS:{operation:'GETTILEIMAGE',version:'1.2.0'},SINGLE_TILE_PARAMS:{operation:'GETMAPIMAGE',format:'PNG',locale:'en',clip:'1',version:'1.0.0'},OVERLAY_PARAMS:{operation:'GETDYNAMICMAPOVERLAYIMAGE',format:'PNG',locale:'en',clip:'1',version:'2.0.0'},FOLDER_PARAMS:{tileColumnsPerFolder:30,tileRowsPerFolder:30,format:'png',querystring:null},defaultSize:new OpenLayers.Size(300,300),initialize:function(name,url,params,options){OpenLayers.Layer.Grid.prototype.initialize.apply(this,arguments);if(options==null||options.isBaseLayer==null){this.isBaseLayer=((this.transparent!="true")&&(this.transparent!=true));}
-if(options&&options.useOverlay!=null){this.useOverlay=options.useOverlay;}
-if(this.singleTile){if(this.useOverlay){OpenLayers.Util.applyDefaults(this.params,this.OVERLAY_PARAMS);if(!this.useAsyncOverlay){this.params.version="1.0.0";}}else{OpenLayers.Util.applyDefaults(this.params,this.SINGLE_TILE_PARAMS);}}else{if(this.useHttpTile){OpenLayers.Util.applyDefaults(this.params,this.FOLDER_PARAMS);}else{OpenLayers.Util.applyDefaults(this.params,this.TILE_PARAMS);}
-this.setTileSize(this.defaultSize);}},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.MapGuide(this.name,this.url,this.params,this.getOptions());}
-obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},getURL:function(bounds){var url;var center=bounds.getCenterLonLat();var mapSize=this.map.getSize();if(this.singleTile){var params={setdisplaydpi:OpenLayers.DOTS_PER_INCH,setdisplayheight:mapSize.h*this.ratio,setdisplaywidth:mapSize.w*this.ratio,setviewcenterx:center.lon,setviewcentery:center.lat,setviewscale:this.map.getScale()};if(this.useOverlay&&!this.useAsyncOverlay){var getVisParams={};getVisParams=OpenLayers.Util.extend(getVisParams,params);getVisParams.operation="GETVISIBLEMAPEXTENT";getVisParams.version="1.0.0";getVisParams.session=this.params.session;getVisParams.mapName=this.params.mapName;getVisParams.format='text/xml';url=this.getFullRequestString(getVisParams);OpenLayers.Request.GET({url:url,async:false});}
-url=this.getFullRequestString(params);}else{var currentRes=this.map.getResolution();var colidx=Math.floor((bounds.left-this.maxExtent.left)/currentRes);colidx=Math.round(colidx/this.tileSize.w);var rowidx=Math.floor((this.maxExtent.top-bounds.top)/currentRes);rowidx=Math.round(rowidx/this.tileSize.h);if(this.useHttpTile){url=this.getImageFilePath({tilecol:colidx,tilerow:rowidx,scaleindex:this.resolutions.length-this.map.zoom-1});}else{url=this.getFullRequestString({tilecol:colidx,tilerow:rowidx,scaleindex:this.resolutions.length-this.map.zoom-1});}}
-return url;},getFullRequestString:function(newParams,altUrl){var url=(altUrl==null)?this.url:altUrl;if(typeof url=="object"){url=url[Math.floor(Math.random()*url.length)];}
-var requestString=url;var allParams=OpenLayers.Util.extend({},this.params);allParams=OpenLayers.Util.extend(allParams,newParams);var urlParams=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(url));for(var key in allParams){if(key.toUpperCase()in urlParams){delete allParams[key];}}
-var paramsString=OpenLayers.Util.getParameterString(allParams);paramsString=paramsString.replace(/,/g,"+");if(paramsString!=""){var lastServerChar=url.charAt(url.length-1);if((lastServerChar=="&")||(lastServerChar=="?")){requestString+=paramsString;}else{if(url.indexOf('?')==-1){requestString+='?'+paramsString;}else{requestString+='&'+paramsString;}}}
-return requestString;},getImageFilePath:function(newParams,altUrl){var url=(altUrl==null)?this.url:altUrl;if(typeof url=="object"){url=url[Math.floor(Math.random()*url.length)];}
-var requestString=url;var tileRowGroup="";var tileColGroup="";if(newParams.tilerow<0){tileRowGroup='-';}
-if(newParams.tilerow==0){tileRowGroup+='0';}else{tileRowGroup+=Math.floor(Math.abs(newParams.tilerow/this.params.tileRowsPerFolder))*this.params.tileRowsPerFolder;}
-if(newParams.tilecol<0){tileColGroup='-';}
-if(newParams.tilecol==0){tileColGroup+='0';}else{tileColGroup+=Math.floor(Math.abs(newParams.tilecol/this.params.tileColumnsPerFolder))*this.params.tileColumnsPerFolder;}
-var tilePath='/S'+Math.floor(newParams.scaleindex)
-+'/'+this.params.basemaplayergroupname
-+'/R'+tileRowGroup
-+'/C'+tileColGroup
-+'/'+(newParams.tilerow%this.params.tileRowsPerFolder)
-+'_'+(newParams.tilecol%this.params.tileColumnsPerFolder)
-+'.'+this.params.format;if(this.params.querystring){tilePath+="?"+this.params.querystring;}
-requestString+=tilePath;return requestString;},calculateGridLayout:function(bounds,extent,resolution){var tilelon=resolution*this.tileSize.w;var tilelat=resolution*this.tileSize.h;var offsetlon=bounds.left-extent.left;var tilecol=Math.floor(offsetlon/tilelon)-this.buffer;var tilecolremain=offsetlon/tilelon-tilecol;var tileoffsetx=-tilecolremain*this.tileSize.w;var tileoffsetlon=extent.left+tilecol*tilelon;var offsetlat=extent.top-bounds.top+tilelat;var tilerow=Math.floor(offsetlat/tilelat)-this.buffer;var tilerowremain=tilerow-offsetlat/tilelat;var tileoffsety=tilerowremain*this.tileSize.h;var tileoffsetlat=extent.top-tilelat*tilerow;return{tilelon:tilelon,tilelat:tilelat,tileoffsetlon:tileoffsetlon,tileoffsetlat:tileoffsetlat,tileoffsetx:tileoffsetx,tileoffsety:tileoffsety};},CLASS_NAME:"OpenLayers.Layer.MapGuide"});OpenLayers.Layer.MapServer=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{mode:"map",map_imagetype:"png"},initialize:function(name,url,params,options){var newArguments=[];newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);this.params=OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);if(options==null||options.isBaseLayer==null){this.isBaseLayer=((this.params.transparent!="true")&&(this.params.transparent!=true));}},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.MapServer(this.name,this.url,this.params,this.getOptions());}
-obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},getURL:function(bounds){bounds=this.adjustBounds(bounds);var extent=[bounds.left,bounds.bottom,bounds.right,bounds.top];var imageSize=this.getImageSize();var url=this.getFullRequestString({mapext:extent,imgext:extent,map_size:[imageSize.w,imageSize.h],imgx:imageSize.w/2,imgy:imageSize.h/2,imgxy:[imageSize.w,imageSize.h]});return url;},getFullRequestString:function(newParams,altUrl){var url=(altUrl==null)?this.url:altUrl;var allParams=OpenLayers.Util.extend({},this.params);allParams=OpenLayers.Util.extend(allParams,newParams);var paramsString=OpenLayers.Util.getParameterString(allParams);if(url instanceof Array){url=this.selectUrl(paramsString,url);}
-var urlParams=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(url));for(var key in allParams){if(key.toUpperCase()in urlParams){delete allParams[key];}}
-paramsString=OpenLayers.Util.getParameterString(allParams);var requestString=url;paramsString=paramsString.replace(/,/g,"+");if(paramsString!=""){var lastServerChar=url.charAt(url.length-1);if((lastServerChar=="&")||(lastServerChar=="?")){requestString+=paramsString;}else{if(url.indexOf('?')==-1){requestString+='?'+paramsString;}else{requestString+='&'+paramsString;}}}
-return requestString;},CLASS_NAME:"OpenLayers.Layer.MapServer"});OpenLayers.Layer.TMS=OpenLayers.Class(OpenLayers.Layer.Grid,{serviceVersion:"1.0.0",isBaseLayer:true,tileOrigin:null,serverResolutions:null,zoomOffset:0,initialize:function(name,url,options){var newArguments=[];newArguments.push(name,url,{},options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.TMS(this.name,this.url,this.getOptions());}
-obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){bounds=this.adjustBounds(bounds);var res=this.map.getResolution();var x=Math.round((bounds.left-this.tileOrigin.lon)/(res*this.tileSize.w));var y=Math.round((bounds.bottom-this.tileOrigin.lat)/(res*this.tileSize.h));var z=this.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,res):this.map.getZoom()+this.zoomOffset;var path=this.serviceVersion+"/"+this.layername+"/"+z+"/"+x+"/"+y+"."+this.type;var url=this.url;if(url instanceof Array){url=this.selectUrl(path,url);}
-return url+path;},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},setMap:function(map){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.bottom);}},CLASS_NAME:"OpenLayers.Layer.TMS"});OpenLayers.Layer.TileCache=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,format:'image/png',serverResolutions:null,initialize:function(name,url,layername,options){this.layername=layername;OpenLayers.Layer.Grid.prototype.initialize.apply(this,[name,url,{},options]);this.extension=this.format.split('/')[1].toLowerCase();this.extension=(this.extension=='jpg')?'jpeg':this.extension;},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.TileCache(this.name,this.url,this.layername,this.getOptions());}
-obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){var res=this.map.getResolution();var bbox=this.maxExtent;var size=this.tileSize;var tileX=Math.round((bounds.left-bbox.left)/(res*size.w));var tileY=Math.round((bounds.bottom-bbox.bottom)/(res*size.h));var tileZ=this.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,res):this.map.getZoom();function zeroPad(number,length){number=String(number);var zeros=[];for(var i=0;i<length;++i){zeros.push('0');}
-return zeros.join('').substring(0,length-number.length)+number;}
-var components=[this.layername,zeroPad(tileZ,2),zeroPad(parseInt(tileX/1000000),3),zeroPad((parseInt(tileX/1000)%1000),3),zeroPad((parseInt(tileX)%1000),3),zeroPad(parseInt(tileY/1000000),3),zeroPad((parseInt(tileY/1000)%1000),3),zeroPad((parseInt(tileY)%1000),3)+'.'+this.extension];var path=components.join('/');var url=this.url;if(url instanceof Array){url=this.selectUrl(path,url);}
-url=(url.charAt(url.length-1)=='/')?url:url+'/';return url+path;},addTile:function(bounds,position){var url=this.getURL(bounds);return new OpenLayers.Tile.Image(this,position,bounds,url,this.tileSize);},CLASS_NAME:"OpenLayers.Layer.TileCache"});OpenLayers.Layer.WMS=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{service:"WMS",version:"1.1.1",request:"GetMap",styles:"",exceptions:"application/vnd.ogc.se_inimage",format:"image/jpeg"},reproject:false,isBaseLayer:true,encodeBBOX:false,noMagic:false,yx:{'EPSG:4326':true},initialize:function(name,url,params,options){var newArguments=[];params=OpenLayers.Util.upperCaseObject(params);if(parseFloat(params.VERSION)>=1.3&&!params.EXCEPTIONS){params.EXCEPTIONS="INIMAGE";}
-newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(!this.noMagic&&this.params.TRANSPARENT&&this.params.TRANSPARENT.toString().toLowerCase()=="true"){if((options==null)||(!options.isBaseLayer)){this.isBaseLayer=false;}
-if(this.params.FORMAT=="image/jpeg"){this.params.FORMAT=OpenLayers.Util.alphaHack()?"image/gif":"image/png";}}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.WMS(this.name,this.url,this.params,this.getOptions());}
-obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},reverseAxisOrder:function(){return(parseFloat(this.params.VERSION)>=1.3&&!!this.yx[this.map.getProjectionObject().getCode()]);},getURL:function(bounds){bounds=this.adjustBounds(bounds);var imageSize=this.getImageSize();var newParams={};var reverseAxisOrder=this.reverseAxisOrder();newParams.BBOX=this.encodeBBOX?bounds.toBBOX(null,reverseAxisOrder):bounds.toArray(reverseAxisOrder);newParams.WIDTH=imageSize.w;newParams.HEIGHT=imageSize.h;var requestString=this.getFullRequestString(newParams);return requestString;},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},mergeNewParams:function(newParams){var upperParams=OpenLayers.Util.upperCaseObject(newParams);var newArguments=[upperParams];return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,newArguments);},getFullRequestString:function(newParams,altUrl){var projectionCode=this.map.getProjection();var value=(projectionCode=="none")?null:projectionCode
-if(parseFloat(this.params.VERSION)>=1.3){this.params.CRS=value;}else{this.params.SRS=value;}
-return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);},CLASS_NAME:"OpenLayers.Layer.WMS"});OpenLayers.Layer.WMTS=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,version:"1.0.0",requestEncoding:"KVP",url:null,layer:null,matrixSet:null,style:null,format:"image/jpeg",tileOrigin:null,tileFullExtent:null,formatSuffix:null,matrixIds:null,dimensions:null,params:null,zoomOffset:0,formatSuffixMap:{"image/png":"png","image/png8":"png","image/png24":"png","image/png32":"png","png":"png","image/jpeg":"jpg","image/jpg":"jpg","jpeg":"jpg","jpg":"jpg"},matrix:null,initialize:function(config){var required={url:true,layer:true,style:true,matrixSet:true};for(var prop in required){if(!(prop in config)){throw new Error("Missing property '"+prop+"' in layer configuration.");}}
-config.params=OpenLayers.Util.upperCaseObject(config.params);var args=[config.name,config.url,config.params,config];OpenLayers.Layer.Grid.prototype.initialize.apply(this,args);if(!this.formatSuffix){this.formatSuffix=this.formatSuffixMap[this.format]||this.format.split("/").pop();}
-if(this.matrixIds){var len=this.matrixIds.length;if(len&&typeof this.matrixIds[0]==="string"){var ids=this.matrixIds;this.matrixIds=new Array(len);for(var i=0;i<len;++i){this.matrixIds[i]={identifier:ids[i]};}}}},setMap:function(){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);this.updateMatrixProperties();},updateMatrixProperties:function(){this.matrix=this.getMatrix();if(this.matrix){if(this.matrix.topLeftCorner){this.tileOrigin=this.matrix.topLeftCorner;}
-if(this.matrix.tileWidth&&this.matrix.tileHeight){this.tileSize=new OpenLayers.Size(this.matrix.tileWidth,this.matrix.tileHeight);}
-if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.maxExtent.left,this.maxExtent.top);}
-if(!this.tileFullExtent){this.tileFullExtent=this.maxExtent;}}},moveTo:function(bounds,zoomChanged,dragging){if(zoomChanged||!this.matrix){this.updateMatrixProperties();}
-return OpenLayers.Layer.Grid.prototype.moveTo.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.WMTS(this.options);}
-obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getMatrix:function(){var matrix;if(!this.matrixIds||this.matrixIds.length===0){matrix={identifier:this.map.getZoom()+this.zoomOffset};}else{if("scaleDenominator"in this.matrixIds[0]){var denom=OpenLayers.METERS_PER_INCH*OpenLayers.INCHES_PER_UNIT[this.units]*this.map.getResolution()/0.28E-3;var diff=Number.POSITIVE_INFINITY;var delta;for(var i=0,ii=this.matrixIds.length;i<ii;++i){delta=Math.abs(1-(this.matrixIds[i].scaleDenominator/denom));if(delta<diff){diff=delta;matrix=this.matrixIds[i];}}}else{matrix=this.matrixIds[this.map.getZoom()+this.zoomOffset];}}
-return matrix;},getTileInfo:function(loc){var res=this.map.getResolution();var fx=(loc.lon-this.tileOrigin.lon)/(res*this.tileSize.w);var fy=(this.tileOrigin.lat-loc.lat)/(res*this.tileSize.h);var col=Math.floor(fx);var row=Math.floor(fy);return{col:col,row:row,i:Math.floor((fx-col)*this.tileSize.w),j:Math.floor((fy-row)*this.tileSize.h)};},getURL:function(bounds){bounds=this.adjustBounds(bounds);var url="";if(!this.tileFullExtent||this.tileFullExtent.intersectsBounds(bounds)){var center=bounds.getCenterLonLat();var info=this.getTileInfo(center);var matrixId=this.matrix.identifier;if(this.requestEncoding.toUpperCase()==="REST"){var path=this.version+"/"+this.layer+"/"+this.style+"/";if(this.dimensions){for(var i=0;i<this.dimensions.length;i++){if(this.params[this.dimensions[i]]){path=path+this.params[this.dimensions[i]]+"/";}}}
-path=path+this.matrixSet+"/"+this.matrix.identifier+"/"+info.row+"/"+info.col+"."+this.formatSuffix;if(this.url instanceof Array){url=this.selectUrl(path,this.url);}else{url=this.url;}
-if(!url.match(/\/$/)){url=url+"/";}
-url=url+path;}else if(this.requestEncoding.toUpperCase()==="KVP"){var params={SERVICE:"WMTS",REQUEST:"GetTile",VERSION:this.version,LAYER:this.layer,STYLE:this.style,TILEMATRIXSET:this.matrixSet,TILEMATRIX:this.matrix.identifier,TILEROW:info.row,TILECOL:info.col,FORMAT:this.format};url=OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,[params]);}}
-return url;},mergeNewParams:function(newParams){if(this.requestEncoding.toUpperCase()==="KVP"){return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,[OpenLayers.Util.upperCaseObject(newParams)]);}},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},CLASS_NAME:"OpenLayers.Layer.WMTS"});OpenLayers.Layer.WorldWind=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{},isBaseLayer:true,lzd:null,zoomLevels:null,initialize:function(name,url,lzd,zoomLevels,params,options){this.lzd=lzd;this.zoomLevels=zoomLevels;var newArguments=[];newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);this.params=OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},getZoom:function(){var zoom=this.map.getZoom();var extent=this.map.getMaxExtent();zoom=zoom-Math.log(this.maxResolution/(this.lzd/512))/Math.log(2);return zoom;},getURL:function(bounds){bounds=this.adjustBounds(bounds);var zoom=this.getZoom();var extent=this.map.getMaxExtent();var deg=this.lzd/Math.pow(2,this.getZoom());var x=Math.floor((bounds.left-extent.left)/deg);var y=Math.floor((bounds.bottom-extent.bottom)/deg);if(this.map.getResolution()<=(this.lzd/512)&&this.getZoom()<=this.zoomLevels){return this.getFullRequestString({L:zoom,X:x,Y:y});}else{return OpenLayers.Util.getImagesLocation()+"blank.gif";}},CLASS_NAME:"OpenLayers.Layer.WorldWind"});OpenLayers.Layer.XYZ=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,sphericalMercator:false,zoomOffset:0,initialize:function(name,url,options){if(options&&options.sphericalMercator||this.sphericalMercator){options=OpenLayers.Util.extend({maxExtent:new OpenLayers.Bounds(-128*156543.0339,-128*156543.0339,128*156543.0339,128*156543.0339),maxResolution:156543.0339,numZoomLevels:19,units:"m",projection:"EPSG:900913"},options);}
-url=url||this.url;name=name||this.name;var newArguments=[name,url,{},options];OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.XYZ(this.name,this.url,this.getOptions());}
-obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){var res=this.map.getResolution();var x=Math.round((bounds.left-this.maxExtent.left)/(res*this.tileSize.w));var y=Math.round((this.maxExtent.top-bounds.top)/(res*this.tileSize.h));var z=this.map.getZoom()+this.zoomOffset;var url=this.url;var s=''+x+y+z;if(url instanceof Array)
-{url=this.selectUrl(s,url);}
-var path=OpenLayers.String.format(url,{'x':x,'y':y,'z':z});return path;},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},setMap:function(map){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.maxExtent.left,this.maxExtent.bottom);}},CLASS_NAME:"OpenLayers.Layer.XYZ"});OpenLayers.Layer.OSM=OpenLayers.Class(OpenLayers.Layer.XYZ,{name:"OpenStreetMap",attribution:"Data CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>",sphericalMercator:true,url:'http://tile.openstreetmap.org/${z}/${x}/${y}.png',clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.OSM(this.name,this.url,this.getOptions());}
-obj=OpenLayers.Layer.XYZ.prototype.clone.apply(this,[obj]);return obj;},CLASS_NAME:"OpenLayers.Layer.OSM"});OpenLayers.Layer.Zoomify=OpenLayers.Class(OpenLayers.Layer.Grid,{url:null,size:null,isBaseLayer:true,standardTileSize:256,numberOfTiers:0,tileCountUpToTier:new Array(),tierSizeInTiles:new Array(),tierImageSize:new Array(),initialize:function(name,url,size,options){this.initializeZoomify(size);var newArguments=[];newArguments.push(name,url,size,{},options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);},initializeZoomify:function(size){var imageSize=size.clone()
-var tiles=new OpenLayers.Size(Math.ceil(imageSize.w/this.standardTileSize),Math.ceil(imageSize.h/this.standardTileSize));this.tierSizeInTiles.push(tiles);this.tierImageSize.push(imageSize);while(imageSize.w>this.standardTileSize||imageSize.h>this.standardTileSize){imageSize=new OpenLayers.Size(Math.floor(imageSize.w/2),Math.floor(imageSize.h/2));tiles=new OpenLayers.Size(Math.ceil(imageSize.w/this.standardTileSize),Math.ceil(imageSize.h/this.standardTileSize));this.tierSizeInTiles.push(tiles);this.tierImageSize.push(imageSize);}
-this.tierSizeInTiles.reverse();this.tierImageSize.reverse();this.numberOfTiers=this.tierSizeInTiles.length;this.tileCountUpToTier[0]=0;for(var i=1;i<this.numberOfTiers;i++){this.tileCountUpToTier.push(this.tierSizeInTiles[i-1].w*this.tierSizeInTiles[i-1].h+
-this.tileCountUpToTier[i-1]);}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);this.tileCountUpToTier.length=0
-this.tierSizeInTiles.length=0
-this.tierImageSize.length=0},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.Zoomify(this.name,this.url,this.size,this.options);}
-obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){bounds=this.adjustBounds(bounds);var res=this.map.getResolution();var x=Math.round((bounds.left-this.tileOrigin.lon)/(res*this.tileSize.w));var y=Math.round((this.tileOrigin.lat-bounds.top)/(res*this.tileSize.h));var z=this.map.getZoom();var tileIndex=x+y*this.tierSizeInTiles[z].w+this.tileCountUpToTier[z];var path="TileGroup"+Math.floor((tileIndex)/256)+"/"+z+"-"+x+"-"+y+".jpg";var url=this.url;if(url instanceof Array){url=this.selectUrl(path,url);}
-return url+path;},getImageSize:function(){if(arguments.length>0){bounds=this.adjustBounds(arguments[0]);var res=this.map.getResolution();var x=Math.round((bounds.left-this.tileOrigin.lon)/(res*this.tileSize.w));var y=Math.round((this.tileOrigin.lat-bounds.top)/(res*this.tileSize.h));var z=this.map.getZoom();var w=this.standardTileSize;var h=this.standardTileSize;if(x==this.tierSizeInTiles[z].w-1){var w=this.tierImageSize[z].w%this.standardTileSize;};if(y==this.tierSizeInTiles[z].h-1){var h=this.tierImageSize[z].h%this.standardTileSize;};return(new OpenLayers.Size(w,h));}else{return this.tileSize;}},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},setMap:function(map){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.top);},calculateGridLayout:function(bounds,extent,resolution){var tilelon=resolution*this.tileSize.w;var tilelat=resolution*this.tileSize.h;var offsetlon=bounds.left-extent.left;var tilecol=Math.floor(offsetlon/tilelon)-this.buffer;var tilecolremain=offsetlon/tilelon-tilecol;var tileoffsetx=-tilecolremain*this.tileSize.w;var tileoffsetlon=extent.left+tilecol*tilelon;var offsetlat=extent.top-bounds.top+tilelat;var tilerow=Math.floor(offsetlat/tilelat)-this.buffer;var tilerowremain=tilerow-offsetlat/tilelat;var tileoffsety=tilerowremain*this.tileSize.h;var tileoffsetlat=extent.top-tilelat*tilerow;return{tilelon:tilelon,tilelat:tilelat,tileoffsetlon:tileoffsetlon,tileoffsetlat:tileoffsetlat,tileoffsetx:tileoffsetx,tileoffsety:tileoffsety};},CLASS_NAME:"OpenLayers.Layer.Zoomify"});OpenLayers.Protocol.SQL.Gears=OpenLayers.Class(OpenLayers.Protocol.SQL,{FID_PREFIX:'__gears_fid__',NULL_GEOMETRY:'__gears_null_geometry__',NULL_FEATURE_STATE:'__gears_null_feature_state__',jsonParser:null,wktParser:null,fidRegExp:null,saveFeatureState:true,typeOfFid:"string",db:null,initialize:function(options){if(!this.supported()){return;}
-OpenLayers.Protocol.SQL.prototype.initialize.apply(this,[options]);this.jsonParser=new OpenLayers.Format.JSON();this.wktParser=new OpenLayers.Format.WKT();this.fidRegExp=new RegExp('^'+this.FID_PREFIX);this.initializeDatabase();},initializeDatabase:function(){this.db=google.gears.factory.create('beta.database');this.db.open(this.databaseName);this.db.execute("CREATE TABLE IF NOT EXISTS "+this.tableName+" (fid TEXT UNIQUE, geometry TEXT, properties TEXT,"+"  state TEXT)");},destroy:function(){this.db.close();this.db=null;this.jsonParser=null;this.wktParser=null;OpenLayers.Protocol.SQL.prototype.destroy.apply(this);},supported:function(){return!!(window.google&&google.gears);},read:function(options){OpenLayers.Protocol.prototype.read.apply(this,arguments);options=OpenLayers.Util.applyDefaults(options,this.options);var feature,features=[];var rs=this.db.execute("SELECT * FROM "+this.tableName);while(rs.isValidRow()){feature=this.unfreezeFeature(rs);if(this.evaluateFilter(feature,options.filter)){if(!options.noFeatureStateReset){feature.state=null;}
-features.push(feature);}
-rs.next();}
-rs.close();var resp=new OpenLayers.Protocol.Response({code:OpenLayers.Protocol.Response.SUCCESS,requestType:"read",features:features});if(options&&options.callback){options.callback.call(options.scope,resp);}
-return resp;},unfreezeFeature:function(row){var feature;var wkt=row.fieldByName('geometry');if(wkt==this.NULL_GEOMETRY){feature=new OpenLayers.Feature.Vector();}else{feature=this.wktParser.read(wkt);}
-feature.attributes=this.jsonParser.read(row.fieldByName('properties'));feature.fid=this.extractFidFromField(row.fieldByName('fid'));var state=row.fieldByName('state');if(state==this.NULL_FEATURE_STATE){state=null;}
-feature.state=state;return feature;},extractFidFromField:function(field){if(!field.match(this.fidRegExp)&&this.typeOfFid=="number"){field=parseFloat(field);}
-return field;},create:function(features,options){options=OpenLayers.Util.applyDefaults(options,this.options);var resp=this.createOrUpdate(features);resp.requestType="create";if(options&&options.callback){options.callback.call(options.scope,resp);}
-return resp;},update:function(features,options){options=OpenLayers.Util.applyDefaults(options,this.options);var resp=this.createOrUpdate(features);resp.requestType="update";if(options&&options.callback){options.callback.call(options.scope,resp);}
-return resp;},createOrUpdate:function(features){if(!(features instanceof Array)){features=[features];}
-var i,len=features.length,feature;var insertedFeatures=new Array(len);for(i=0;i<len;i++){feature=features[i];var params=this.freezeFeature(feature);this.db.execute("REPLACE INTO "+this.tableName+" (fid, geometry, properties, state)"+" VALUES (?, ?, ?, ?)",params);var clone=feature.clone();clone.fid=this.extractFidFromField(params[0]);insertedFeatures[i]=clone;}
-return new OpenLayers.Protocol.Response({code:OpenLayers.Protocol.Response.SUCCESS,features:insertedFeatures,reqFeatures:features});},freezeFeature:function(feature){feature.fid=feature.fid!=null?""+feature.fid:OpenLayers.Util.createUniqueID(this.FID_PREFIX);var geometry=feature.geometry!=null?feature.geometry.toString():this.NULL_GEOMETRY;var properties=this.jsonParser.write(feature.attributes);var state=this.getFeatureStateForFreeze(feature);return[feature.fid,geometry,properties,state];},getFeatureStateForFreeze:function(feature){var state;if(!this.saveFeatureState){state=this.NULL_FEATURE_STATE;}else if(this.createdOffline(feature)){state=OpenLayers.State.INSERT;}else{state=feature.state;}
-return state;},"delete":function(features,options){if(!(features instanceof Array)){features=[features];}
-options=OpenLayers.Util.applyDefaults(options,this.options);var i,len,feature;for(i=0,len=features.length;i<len;i++){feature=features[i];if(this.saveFeatureState&&!this.createdOffline(feature)){var toDelete=feature.clone();toDelete.fid=feature.fid;if(toDelete.geometry){toDelete.geometry.destroy();toDelete.geometry=null;}
-toDelete.state=feature.state;this.createOrUpdate(toDelete);}else{this.db.execute("DELETE FROM "+this.tableName+" WHERE fid = ?",[feature.fid]);}}
-var resp=new OpenLayers.Protocol.Response({code:OpenLayers.Protocol.Response.SUCCESS,requestType:"delete",reqFeatures:features});if(options&&options.callback){options.callback.call(options.scope,resp);}
-return resp;},createdOffline:function(feature){return(typeof feature.fid=="string"&&!!(feature.fid.match(this.fidRegExp)));},commit:function(features,options){var opt,resp=[],nRequests=0,nResponses=0;function callback(resp){if(++nResponses<nRequests){resp.last=false;}
-this.callUserCallback(options,resp);}
-var feature,toCreate=[],toUpdate=[],toDelete=[];for(var i=features.length-1;i>=0;i--){feature=features[i];switch(feature.state){case OpenLayers.State.INSERT:toCreate.push(feature);break;case OpenLayers.State.UPDATE:toUpdate.push(feature);break;case OpenLayers.State.DELETE:toDelete.push(feature);break;}}
-if(toCreate.length>0){nRequests++;opt=OpenLayers.Util.applyDefaults({"callback":callback,"scope":this},options.create);resp.push(this.create(toCreate,opt));}
-if(toUpdate.length>0){nRequests++;opt=OpenLayers.Util.applyDefaults({"callback":callback,"scope":this},options.update);resp.push(this.update(toUpdate,opt));}
-if(toDelete.length>0){nRequests++;opt=OpenLayers.Util.applyDefaults({"callback":callback,"scope":this},options["delete"]);resp.push(this["delete"](toDelete,opt));}
-return resp;},clear:function(){this.db.execute("DELETE FROM "+this.tableName);},callUserCallback:function(options,resp){var opt=options[resp.requestType];if(opt&&opt.callback){opt.callback.call(opt.scope,resp);}
-if(resp.last&&options.callback){options.callback.call(options.scope);}},CLASS_NAME:"OpenLayers.Protocol.SQL.Gears"});OpenLayers.Rule=OpenLayers.Class({id:null,name:null,title:null,description:null,context:null,filter:null,elseFilter:false,symbolizer:null,symbolizers:null,minScaleDenominator:null,maxScaleDenominator:null,initialize:function(options){this.symbolizer={};OpenLayers.Util.extend(this,options);if(this.symbolizers){delete this.symbolizer;}
-this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){for(var i in this.symbolizer){this.symbolizer[i]=null;}
-this.symbolizer=null;delete this.symbolizers;},evaluate:function(feature){var context=this.getContext(feature);var applies=true;if(this.minScaleDenominator||this.maxScaleDenominator){var scale=feature.layer.map.getScale();}
-if(this.minScaleDenominator){applies=scale>=OpenLayers.Style.createLiteral(this.minScaleDenominator,context);}
-if(applies&&this.maxScaleDenominator){applies=scale<OpenLayers.Style.createLiteral(this.maxScaleDenominator,context);}
-if(applies&&this.filter){if(this.filter.CLASS_NAME=="OpenLayers.Filter.FeatureId"){applies=this.filter.evaluate(feature);}else{applies=this.filter.evaluate(context);}}
-return applies;},getContext:function(feature){var context=this.context;if(!context){context=feature.attributes||feature.data;}
-if(typeof this.context=="function"){context=this.context(feature);}
-return context;},clone:function(){var options=OpenLayers.Util.extend({},this);if(this.symbolizers){var len=this.symbolizers.length;options.symbolizers=new Array(len);for(var i=0;i<len;++i){options.symbolizers[i]=this.symbolizers[i].clone();}}else{options.symbolizer={};var value,type;for(var key in this.symbolizer){value=this.symbolizer[key];type=typeof value;if(type==="object"){options.symbolizer[key]=OpenLayers.Util.extend({},value);}else if(type==="string"){options.symbolizer[key]=value;}}}
-options.filter=this.filter&&this.filter.clone();options.context=this.context&&OpenLayers.Util.extend({},this.context);return new OpenLayers.Rule(options);},CLASS_NAME:"OpenLayers.Rule"});OpenLayers.StyleMap=OpenLayers.Class({styles:null,extendDefault:true,initialize:function(style,options){this.styles={"default":new OpenLayers.Style(OpenLayers.Feature.Vector.style["default"]),"select":new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"]),"temporary":new OpenLayers.Style(OpenLayers.Feature.Vector.style["temporary"]),"delete":new OpenLayers.Style(OpenLayers.Feature.Vector.style["delete"])};if(style instanceof OpenLayers.Style){this.styles["default"]=style;this.styles["select"]=style;this.styles["temporary"]=style;this.styles["delete"]=style;}else if(typeof style=="object"){for(var key in style){if(style[key]instanceof OpenLayers.Style){this.styles[key]=style[key];}else if(typeof style[key]=="object"){this.styles[key]=new OpenLayers.Style(style[key]);}else{this.styles["default"]=new OpenLayers.Style(style);this.styles["select"]=new OpenLayers.Style(style);this.styles["temporary"]=new OpenLayers.Style(style);this.styles["delete"]=new OpenLayers.Style(style);break;}}}
-OpenLayers.Util.extend(this,options);},destroy:function(){for(var key in this.styles){this.styles[key].destroy();}
-this.styles=null;},createSymbolizer:function(feature,intent){if(!feature){feature=new OpenLayers.Feature.Vector();}
-if(!this.styles[intent]){intent="default";}
-feature.renderIntent=intent;var defaultSymbolizer={};if(this.extendDefault&&intent!="default"){defaultSymbolizer=this.styles["default"].createSymbolizer(feature);}
-return OpenLayers.Util.extend(defaultSymbolizer,this.styles[intent].createSymbolizer(feature));},addUniqueValueRules:function(renderIntent,property,symbolizers,context){var rules=[];for(var value in symbolizers){rules.push(new OpenLayers.Rule({symbolizer:symbolizers[value],context:context,filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,property:property,value:value})}));}
-this.styles[renderIntent].addRules(rules);},CLASS_NAME:"OpenLayers.StyleMap"});OpenLayers.Control.NavToolbar=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(options){OpenLayers.Control.Panel.prototype.initialize.apply(this,[options]);this.addControls([new OpenLayers.Control.Navigation(),new OpenLayers.Control.ZoomBox()]);},draw:function(){var div=OpenLayers.Control.Panel.prototype.draw.apply(this,arguments);this.activateControl(this.controls[0]);return div;},CLASS_NAME:"OpenLayers.Control.NavToolbar"});OpenLayers.Filter.Comparison=OpenLayers.Class(OpenLayers.Filter,{type:null,property:null,value:null,matchCase:true,lowerBoundary:null,upperBoundary:null,initialize:function(options){OpenLayers.Filter.prototype.initialize.apply(this,[options]);},evaluate:function(context){if(context instanceof OpenLayers.Feature.Vector){context=context.attributes;}
-var result=false;var got=context[this.property];switch(this.type){case OpenLayers.Filter.Comparison.EQUAL_TO:var exp=this.value;if(!this.matchCase&&typeof got=="string"&&typeof exp=="string"){result=(got.toUpperCase()==exp.toUpperCase());}else{result=(got==exp);}
-break;case OpenLayers.Filter.Comparison.NOT_EQUAL_TO:var exp=this.value;if(!this.matchCase&&typeof got=="string"&&typeof exp=="string"){result=(got.toUpperCase()!=exp.toUpperCase());}else{result=(got!=exp);}
-break;case OpenLayers.Filter.Comparison.LESS_THAN:result=got<this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN:result=got>this.value;break;case OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO:result=got<=this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO:result=got>=this.value;break;case OpenLayers.Filter.Comparison.BETWEEN:result=(got>=this.lowerBoundary)&&(got<=this.upperBoundary);break;case OpenLayers.Filter.Comparison.LIKE:var regexp=new RegExp(this.value,"gi");result=regexp.test(got);break;}
-return result;},value2regex:function(wildCard,singleChar,escapeChar){if(wildCard=="."){var msg="'.' is an unsupported wildCard character for "+"OpenLayers.Filter.Comparison";OpenLayers.Console.error(msg);return null;}
-wildCard=wildCard?wildCard:"*";singleChar=singleChar?singleChar:".";escapeChar=escapeChar?escapeChar:"!";this.value=this.value.replace(new RegExp("\\"+escapeChar+"(.|$)","g"),"\\$1");this.value=this.value.replace(new RegExp("\\"+singleChar,"g"),".");this.value=this.value.replace(new RegExp("\\"+wildCard,"g"),".*");this.value=this.value.replace(new RegExp("\\\\.\\*","g"),"\\"+wildCard);this.value=this.value.replace(new RegExp("\\\\\\.","g"),"\\"+singleChar);return this.value;},regex2value:function(){var value=this.value;value=value.replace(/!/g,"!!");value=value.replace(/(\\)?\\\./g,function($0,$1){return $1?$0:"!.";});value=value.replace(/(\\)?\\\*/g,function($0,$1){return $1?$0:"!*";});value=value.replace(/\\\\/g,"\\");value=value.replace(/\.\*/g,"*");return value;},clone:function(){return OpenLayers.Util.extend(new OpenLayers.Filter.Comparison(),this);},CLASS_NAME:"OpenLayers.Filter.Comparison"});OpenLayers.Filter.Comparison.EQUAL_TO="==";OpenLayers.Filter.Comparison.NOT_EQUAL_TO="!=";OpenLayers.Filter.Comparison.LESS_THAN="<";OpenLayers.Filter.Comparison.GREATER_THAN=">";OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO="<=";OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO=">=";OpenLayers.Filter.Comparison.BETWEEN="..";OpenLayers.Filter.Comparison.LIKE="~";OpenLayers.Filter.FeatureId=OpenLayers.Class(OpenLayers.Filter,{fids:null,initialize:function(options){this.fids=[];OpenLayers.Filter.prototype.initialize.apply(this,[options]);},evaluate:function(feature){for(var i=0,len=this.fids.length;i<len;i++){var fid=feature.fid||feature.id;if(fid==this.fids[i]){return true;}}
-return false;},clone:function(){var filter=new OpenLayers.Filter.FeatureId();OpenLayers.Util.extend(filter,this);filter.fids=this.fids.slice();return filter;},CLASS_NAME:"OpenLayers.Filter.FeatureId"});OpenLayers.Filter.Logical=OpenLayers.Class(OpenLayers.Filter,{filters:null,type:null,initialize:function(options){this.filters=[];OpenLayers.Filter.prototype.initialize.apply(this,[options]);},destroy:function(){this.filters=null;OpenLayers.Filter.prototype.destroy.apply(this);},evaluate:function(context){switch(this.type){case OpenLayers.Filter.Logical.AND:for(var i=0,len=this.filters.length;i<len;i++){if(this.filters[i].evaluate(context)==false){return false;}}
-return true;case OpenLayers.Filter.Logical.OR:for(var i=0,len=this.filters.length;i<len;i++){if(this.filters[i].evaluate(context)==true){return true;}}
-return false;case OpenLayers.Filter.Logical.NOT:return(!this.filters[0].evaluate(context));}},clone:function(){var filters=[];for(var i=0,len=this.filters.length;i<len;++i){filters.push(this.filters[i].clone());}
-return new OpenLayers.Filter.Logical({type:this.type,filters:filters});},CLASS_NAME:"OpenLayers.Filter.Logical"});OpenLayers.Filter.Logical.AND="&&";OpenLayers.Filter.Logical.OR="||";OpenLayers.Filter.Logical.NOT="!";OpenLayers.Filter.Spatial=OpenLayers.Class(OpenLayers.Filter,{type:null,property:null,value:null,distance:null,distanceUnits:null,initialize:function(options){OpenLayers.Filter.prototype.initialize.apply(this,[options]);},evaluate:function(feature){var intersect=false;switch(this.type){case OpenLayers.Filter.Spatial.BBOX:case OpenLayers.Filter.Spatial.INTERSECTS:if(feature.geometry){var geom=this.value;if(this.value.CLASS_NAME=="OpenLayers.Bounds"){geom=this.value.toGeometry();}
-if(feature.geometry.intersects(geom)){intersect=true;}}
-break;default:OpenLayers.Console.error(OpenLayers.i18n("filterEvaluateNotImplemented"));break;}
-return intersect;},clone:function(){var options=OpenLayers.Util.applyDefaults({value:this.value&&this.value.clone&&this.value.clone()},this);return new OpenLayers.Filter.Spatial(options);},CLASS_NAME:"OpenLayers.Filter.Spatial"});OpenLayers.Filter.Spatial.BBOX="BBOX";OpenLayers.Filter.Spatial.INTERSECTS="INTERSECTS";OpenLayers.Filter.Spatial.DWITHIN="DWITHIN";OpenLayers.Filter.Spatial.WITHIN="WITHIN";OpenLayers.Filter.Spatial.CONTAINS="CONTAINS";OpenLayers.Geometry.Collection=OpenLayers.Class(OpenLayers.Geometry,{components:null,componentTypes:null,initialize:function(components){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.components=[];if(components!=null){this.addComponents(components);}},destroy:function(){this.components.length=0;this.components=null;OpenLayers.Geometry.prototype.destroy.apply(this,arguments);},clone:function(){var geometry=eval("new "+this.CLASS_NAME+"()");for(var i=0,len=this.components.length;i<len;i++){geometry.addComponent(this.components[i].clone());}
-OpenLayers.Util.applyDefaults(geometry,this);return geometry;},getComponentsString:function(){var strings=[];for(var i=0,len=this.components.length;i<len;i++){strings.push(this.components[i].toShortString());}
-return strings.join(",");},calculateBounds:function(){this.bounds=null;if(this.components&&this.components.length>0){this.setBounds(this.components[0].getBounds());for(var i=1,len=this.components.length;i<len;i++){this.extendBounds(this.components[i].getBounds());}}},addComponents:function(components){if(!(components instanceof Array)){components=[components];}
-for(var i=0,len=components.length;i<len;i++){this.addComponent(components[i]);}},addComponent:function(component,index){var added=false;if(component){if(this.componentTypes==null||(OpenLayers.Util.indexOf(this.componentTypes,component.CLASS_NAME)>-1)){if(index!=null&&(index<this.components.length)){var components1=this.components.slice(0,index);var components2=this.components.slice(index,this.components.length);components1.push(component);this.components=components1.concat(components2);}else{this.components.push(component);}
-component.parent=this;this.clearBounds();added=true;}}
-return added;},removeComponents:function(components){if(!(components instanceof Array)){components=[components];}
-for(var i=components.length-1;i>=0;--i){this.removeComponent(components[i]);}},removeComponent:function(component){OpenLayers.Util.removeItem(this.components,component);this.clearBounds();},getLength:function(){var length=0.0;for(var i=0,len=this.components.length;i<len;i++){length+=this.components[i].getLength();}
-return length;},getArea:function(){var area=0.0;for(var i=0,len=this.components.length;i<len;i++){area+=this.components[i].getArea();}
-return area;},getGeodesicArea:function(projection){var area=0.0;for(var i=0,len=this.components.length;i<len;i++){area+=this.components[i].getGeodesicArea(projection);}
-return area;},getCentroid:function(weighted){if(!weighted){return this.components.length&&this.components[0].getCentroid();}
-var len=this.components.length;if(!len){return false;}
-var areas=[];var centroids=[];var areaSum=0;var minArea=Number.MAX_VALUE;var component;for(var i=0;i<len;++i){component=this.components[i];var area=component.getArea();var centroid=component.getCentroid(true);if(isNaN(area)||isNaN(centroid.x)||isNaN(centroid.y)){continue;}
-areas.push(area);areaSum+=area;minArea=(area<minArea&&area>0)?area:minArea;centroids.push(centroid);}
-len=areas.length;if(areaSum===0){for(var i=0;i<len;++i){areas[i]=1;}
-areaSum=areas.length;}else{for(var i=0;i<len;++i){areas[i]/=minArea;}
-areaSum/=minArea;}
-var xSum=0,ySum=0,centroid,area;for(var i=0;i<len;++i){centroid=centroids[i];area=areas[i];xSum+=centroid.x*area;ySum+=centroid.y*area;}
-return new OpenLayers.Geometry.Point(xSum/areaSum,ySum/areaSum);},getGeodesicLength:function(projection){var length=0.0;for(var i=0,len=this.components.length;i<len;i++){length+=this.components[i].getGeodesicLength(projection);}
-return length;},move:function(x,y){for(var i=0,len=this.components.length;i<len;i++){this.components[i].move(x,y);}},rotate:function(angle,origin){for(var i=0,len=this.components.length;i<len;++i){this.components[i].rotate(angle,origin);}},resize:function(scale,origin,ratio){for(var i=0;i<this.components.length;++i){this.components[i].resize(scale,origin,ratio);}
-return this;},distanceTo:function(geometry,options){var edge=!(options&&options.edge===false);var details=edge&&options&&options.details;var result,best,distance;var min=Number.POSITIVE_INFINITY;for(var i=0,len=this.components.length;i<len;++i){result=this.components[i].distanceTo(geometry,options);distance=details?result.distance:result;if(distance<min){min=distance;best=result;if(min==0){break;}}}
-return best;},equals:function(geometry){var equivalent=true;if(!geometry||!geometry.CLASS_NAME||(this.CLASS_NAME!=geometry.CLASS_NAME)){equivalent=false;}else if(!(geometry.components instanceof Array)||(geometry.components.length!=this.components.length)){equivalent=false;}else{for(var i=0,len=this.components.length;i<len;++i){if(!this.components[i].equals(geometry.components[i])){equivalent=false;break;}}}
-return equivalent;},transform:function(source,dest){if(source&&dest){for(var i=0,len=this.components.length;i<len;i++){var component=this.components[i];component.transform(source,dest);}
-this.bounds=null;}
-return this;},intersects:function(geometry){var intersect=false;for(var i=0,len=this.components.length;i<len;++i){intersect=geometry.intersects(this.components[i]);if(intersect){break;}}
-return intersect;},getVertices:function(nodes){var vertices=[];for(var i=0,len=this.components.length;i<len;++i){Array.prototype.push.apply(vertices,this.components[i].getVertices(nodes));}
-return vertices;},CLASS_NAME:"OpenLayers.Geometry.Collection"});OpenLayers.Geometry.Point=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,initialize:function(x,y){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=parseFloat(x);this.y=parseFloat(y);},clone:function(obj){if(obj==null){obj=new OpenLayers.Geometry.Point(this.x,this.y);}
-OpenLayers.Util.applyDefaults(obj,this);return obj;},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x,this.y);},distanceTo:function(geometry,options){var edge=!(options&&options.edge===false);var details=edge&&options&&options.details;var distance,x0,y0,x1,y1,result;if(geometry instanceof OpenLayers.Geometry.Point){x0=this.x;y0=this.y;x1=geometry.x;y1=geometry.y;distance=Math.sqrt(Math.pow(x0-x1,2)+Math.pow(y0-y1,2));result=!details?distance:{x0:x0,y0:y0,x1:x1,y1:y1,distance:distance};}else{result=geometry.distanceTo(this,options);if(details){result={x0:result.x1,y0:result.y1,x1:result.x0,y1:result.y0,distance:result.distance};}}
-return result;},equals:function(geom){var equals=false;if(geom!=null){equals=((this.x==geom.x&&this.y==geom.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(geom.x)&&isNaN(geom.y)));}
-return equals;},toShortString:function(){return(this.x+", "+this.y);},move:function(x,y){this.x=this.x+x;this.y=this.y+y;this.clearBounds();},rotate:function(angle,origin){angle*=Math.PI/180;var radius=this.distanceTo(origin);var theta=angle+Math.atan2(this.y-origin.y,this.x-origin.x);this.x=origin.x+(radius*Math.cos(theta));this.y=origin.y+(radius*Math.sin(theta));this.clearBounds();},getCentroid:function(){return new OpenLayers.Geometry.Point(this.x,this.y);},resize:function(scale,origin,ratio){ratio=(ratio==undefined)?1:ratio;this.x=origin.x+(scale*ratio*(this.x-origin.x));this.y=origin.y+(scale*(this.y-origin.y));this.clearBounds();return this;},intersects:function(geometry){var intersect=false;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){intersect=this.equals(geometry);}else{intersect=geometry.intersects(this);}
-return intersect;},transform:function(source,dest){if((source&&dest)){OpenLayers.Projection.transform(this,source,dest);this.bounds=null;}
-return this;},getVertices:function(nodes){return[this];},CLASS_NAME:"OpenLayers.Geometry.Point"});OpenLayers.Geometry.Rectangle=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,width:null,height:null,initialize:function(x,y,width,height){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=x;this.y=y;this.width=width;this.height=height;},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x+this.width,this.y+this.height);},getLength:function(){var length=(2*this.width)+(2*this.height);return length;},getArea:function(){var area=this.width*this.height;return area;},CLASS_NAME:"OpenLayers.Geometry.Rectangle"});OpenLayers.Geometry.Surface=OpenLayers.Class(OpenLayers.Geometry,{initialize:function(){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Geometry.Surface"});OpenLayers.Layer.KaMapCache=OpenLayers.Class(OpenLayers.Layer.KaMap,{IMAGE_EXTENSIONS:{'jpeg':'jpg','gif':'gif','png':'png','png8':'png','png24':'png','dithered':'png'},DEFAULT_FORMAT:'jpeg',initialize:function(name,url,params,options){OpenLayers.Layer.KaMap.prototype.initialize.apply(this,arguments);this.extension=this.IMAGE_EXTENSIONS[this.params.i.toLowerCase()||DEFAULT_FORMAT];},getURL:function(bounds){bounds=this.adjustBounds(bounds);var mapRes=this.map.getResolution();var scale=Math.round((this.map.getScale()*10000))/10000;var pX=Math.round(bounds.left/mapRes);var pY=-Math.round(bounds.top/mapRes);var metaX=Math.floor(pX/this.tileSize.w/this.params.metaTileSize.w)*this.tileSize.w*this.params.metaTileSize.w;var metaY=Math.floor(pY/this.tileSize.h/this.params.metaTileSize.h)*this.tileSize.h*this.params.metaTileSize.h;var url=this.url;if(url instanceof Array){url=this.selectUrl(paramsString,url);}
-var components=[url,"/",this.params.map,"/",scale,"/",this.params.g.replace(/\s/g,'_'),"/def/t",metaY,"/l",metaX,"/t",pY,"l",pX,".",this.extension];return components.join("");},CLASS_NAME:"OpenLayers.Layer.KaMapCache"});OpenLayers.Layer.MapServer.Untiled=OpenLayers.Class(OpenLayers.Layer.MapServer,{singleTile:true,initialize:function(name,url,params,options){OpenLayers.Layer.MapServer.prototype.initialize.apply(this,arguments);var msg="The OpenLayers.Layer.MapServer.Untiled class is deprecated and "+"will be removed in 3.0. Instead, you should use the "+"normal OpenLayers.Layer.MapServer class, passing it the option "+"'singleTile' as true.";OpenLayers.Console.warn(msg);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.MapServer.Untiled(this.name,this.url,this.params,this.getOptions());}
-obj=OpenLayers.Layer.MapServer.prototype.clone.apply(this,[obj]);return obj;},CLASS_NAME:"OpenLayers.Layer.MapServer.Untiled"});OpenLayers.Layer.Vector=OpenLayers.Class(OpenLayers.Layer,{EVENT_TYPES:["beforefeatureadded","beforefeaturesadded","featureadded","featuresadded","beforefeatureremoved","beforefeaturesremoved","featureremoved","featuresremoved","beforefeatureselected","featureselected","featureunselected","beforefeaturemodified","featuremodified","afterfeaturemodified","vertexmodified","sketchstarted","sketchmodified","sketchcomplete","refresh"],isBaseLayer:false,isFixed:false,isVector:true,features:null,filter:null,selectedFeatures:null,unrenderedFeatures:null,reportError:true,style:null,styleMap:null,strategies:null,protocol:null,renderers:['SVG','VML','Canvas'],renderer:null,rendererOptions:null,geometryType:null,drawn:false,initialize:function(name,options){this.EVENT_TYPES=OpenLayers.Layer.Vector.prototype.EVENT_TYPES.concat(OpenLayers.Layer.prototype.EVENT_TYPES);OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(!this.renderer||!this.renderer.supported()){this.assignRenderer();}
-if(!this.renderer||!this.renderer.supported()){this.renderer=null;this.displayError();}
-if(!this.styleMap){this.styleMap=new OpenLayers.StyleMap();}
-this.features=[];this.selectedFeatures=[];this.unrenderedFeatures={};if(this.strategies){for(var i=0,len=this.strategies.length;i<len;i++){this.strategies[i].setLayer(this);}}},destroy:function(){if(this.strategies){var strategy,i,len;for(i=0,len=this.strategies.length;i<len;i++){strategy=this.strategies[i];if(strategy.autoDestroy){strategy.destroy();}}
-this.strategies=null;}
-if(this.protocol){if(this.protocol.autoDestroy){this.protocol.destroy();}
-this.protocol=null;}
-this.destroyFeatures();this.features=null;this.selectedFeatures=null;this.unrenderedFeatures=null;if(this.renderer){this.renderer.destroy();}
-this.renderer=null;this.geometryType=null;this.drawn=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.Vector(this.name,this.getOptions());}
-obj=OpenLayers.Layer.prototype.clone.apply(this,[obj]);var features=this.features;var len=features.length;var clonedFeatures=new Array(len);for(var i=0;i<len;++i){clonedFeatures[i]=features[i].clone();}
-obj.features=clonedFeatures;return obj;},refresh:function(obj){if(this.calculateInRange()&&this.visibility){this.events.triggerEvent("refresh",obj);}},assignRenderer:function(){for(var i=0,len=this.renderers.length;i<len;i++){var rendererClass=this.renderers[i];var renderer=(typeof rendererClass=="function")?rendererClass:OpenLayers.Renderer[rendererClass];if(renderer&&renderer.prototype.supported()){this.renderer=new renderer(this.div,this.rendererOptions);break;}}},displayError:function(){if(this.reportError){OpenLayers.Console.userError(OpenLayers.i18n("browserNotSupported",{'renderers':this.renderers.join("\n")}));}},setMap:function(map){OpenLayers.Layer.prototype.setMap.apply(this,arguments);if(!this.renderer){this.map.removeLayer(this);}else{this.renderer.map=this.map;this.renderer.setSize(this.map.getSize());}},afterAdd:function(){if(this.strategies){var strategy,i,len;for(i=0,len=this.strategies.length;i<len;i++){strategy=this.strategies[i];if(strategy.autoActivate){strategy.activate();}}}},removeMap:function(map){this.drawn=false;if(this.strategies){var strategy,i,len;for(i=0,len=this.strategies.length;i<len;i++){strategy=this.strategies[i];if(strategy.autoActivate){strategy.deactivate();}}}},onMapResize:function(){OpenLayers.Layer.prototype.onMapResize.apply(this,arguments);this.renderer.setSize(this.map.getSize());},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var coordSysUnchanged=true;if(!dragging){this.renderer.root.style.visibility="hidden";this.div.style.left=-parseInt(this.map.layerContainerDiv.style.left)+"px";this.div.style.top=-parseInt(this.map.layerContainerDiv.style.top)+"px";var extent=this.map.getExtent();coordSysUnchanged=this.renderer.setExtent(extent,zoomChanged);this.renderer.root.style.visibility="visible";if(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1){this.div.scrollLeft=this.div.scrollLeft;}
-if(!zoomChanged&&coordSysUnchanged){for(var i in this.unrenderedFeatures){var feature=this.unrenderedFeatures[i];this.drawFeature(feature);}}}
-if(!this.drawn||zoomChanged||!coordSysUnchanged){this.drawn=true;var feature;for(var i=0,len=this.features.length;i<len;i++){this.renderer.locked=(i!==(len-1));feature=this.features[i];this.drawFeature(feature);}}},display:function(display){OpenLayers.Layer.prototype.display.apply(this,arguments);var currentDisplay=this.div.style.display;if(currentDisplay!=this.renderer.root.style.display){this.renderer.root.style.display=currentDisplay;}},addFeatures:function(features,options){if(!(features instanceof Array)){features=[features];}
-var notify=!options||!options.silent;if(notify){var event={features:features};var ret=this.events.triggerEvent("beforefeaturesadded",event);if(ret===false){return;}
-features=event.features;}
-var featuresAdded=[];for(var i=0,len=features.length;i<len;i++){if(i!=(features.length-1)){this.renderer.locked=true;}else{this.renderer.locked=false;}
-var feature=features[i];if(this.geometryType&&!(feature.geometry instanceof this.geometryType)){var throwStr=OpenLayers.i18n('componentShouldBe',{'geomType':this.geometryType.prototype.CLASS_NAME});throw throwStr;}
-feature.layer=this;if(!feature.style&&this.style){feature.style=OpenLayers.Util.extend({},this.style);}
-if(notify){if(this.events.triggerEvent("beforefeatureadded",{feature:feature})===false){continue;};this.preFeatureInsert(feature);}
-featuresAdded.push(feature);this.features.push(feature);this.drawFeature(feature);if(notify){this.events.triggerEvent("featureadded",{feature:feature});this.onFeatureInsert(feature);}}
-if(notify){this.events.triggerEvent("featuresadded",{features:featuresAdded});}},removeFeatures:function(features,options){if(!features||features.length===0){return;}
-if(features===this.features){return this.removeAllFeatures(options);}
-if(!(features instanceof Array)){features=[features];}
-if(features===this.selectedFeatures){features=features.slice();}
-var notify=!options||!options.silent;if(notify){this.events.triggerEvent("beforefeaturesremoved",{features:features});}
-for(var i=features.length-1;i>=0;i--){if(i!=0&&features[i-1].geometry){this.renderer.locked=true;}else{this.renderer.locked=false;}
-var feature=features[i];delete this.unrenderedFeatures[feature.id];if(notify){this.events.triggerEvent("beforefeatureremoved",{feature:feature});}
-this.features=OpenLayers.Util.removeItem(this.features,feature);feature.layer=null;if(feature.geometry){this.renderer.eraseFeatures(feature);}
-if(OpenLayers.Util.indexOf(this.selectedFeatures,feature)!=-1){OpenLayers.Util.removeItem(this.selectedFeatures,feature);}
-if(notify){this.events.triggerEvent("featureremoved",{feature:feature});}}
-if(notify){this.events.triggerEvent("featuresremoved",{features:features});}},removeAllFeatures:function(options){var notify=!options||!options.silent;var features=this.features;if(notify){this.events.triggerEvent("beforefeaturesremoved",{features:features});}
-var feature;for(var i=features.length-1;i>=0;i--){feature=features[i];if(notify){this.events.triggerEvent("beforefeatureremoved",{feature:feature});}
-feature.layer=null;if(notify){this.events.triggerEvent("featureremoved",{feature:feature});}}
-this.renderer.clear();this.features=[];this.unrenderedFeatures={};this.selectedFeatures=[];if(notify){this.events.triggerEvent("featuresremoved",{features:features});}},destroyFeatures:function(features,options){var all=(features==undefined);if(all){features=this.features;}
-if(features){this.removeFeatures(features,options);for(var i=features.length-1;i>=0;i--){features[i].destroy();}}},drawFeature:function(feature,style){if(!this.drawn){return}
-if(typeof style!="object"){if(!style&&feature.state===OpenLayers.State.DELETE){style="delete";}
-var renderIntent=style||feature.renderIntent;style=feature.style||this.style;if(!style){style=this.styleMap.createSymbolizer(feature,renderIntent);}}
-if(!this.renderer.drawFeature(feature,style)){this.unrenderedFeatures[feature.id]=feature;}else{delete this.unrenderedFeatures[feature.id];};},eraseFeatures:function(features){this.renderer.eraseFeatures(features);},getFeatureFromEvent:function(evt){if(!this.renderer){OpenLayers.Console.error(OpenLayers.i18n("getFeatureError"));return null;}
-var featureId=this.renderer.getFeatureIdFromEvent(evt);return this.getFeatureById(featureId);},getFeatureBy:function(property,value){var feature=null;for(var i=0,len=this.features.length;i<len;++i){if(this.features[i][property]==value){feature=this.features[i];break;}}
-return feature;},getFeatureById:function(featureId){return this.getFeatureBy('id',featureId);},getFeatureByFid:function(featureFid){return this.getFeatureBy('fid',featureFid);},onFeatureInsert:function(feature){},preFeatureInsert:function(feature){},getDataExtent:function(){var maxExtent=null;var features=this.features;if(features&&(features.length>0)){maxExtent=new OpenLayers.Bounds();var geometry=null;for(var i=0,len=features.length;i<len;i++){geometry=features[i].geometry;if(geometry){maxExtent.extend(geometry.getBounds());}}}
-return maxExtent;},CLASS_NAME:"OpenLayers.Layer.Vector"});OpenLayers.Layer.WMS.Post=OpenLayers.Class(OpenLayers.Layer.WMS,{tileClass:null,unsupportedBrowsers:["mozilla","firefox","opera"],SUPPORTED_TRANSITIONS:[],initialize:function(name,url,params,options){var newArguments=[];newArguments.push(name,url,params,options);OpenLayers.Layer.WMS.prototype.initialize.apply(this,newArguments);this.tileClass=OpenLayers.Util.indexOf(this.unsupportedBrowsers,OpenLayers.Util.getBrowserName())!=-1?OpenLayers.Tile.Image:OpenLayers.Tile.Image.IFrame;},addTile:function(bounds,position){return new this.tileClass(this,position,bounds,null,this.tileSize);},CLASS_NAME:'OpenLayers.Layer.WMS.Post'});OpenLayers.Layer.WMS.Untiled=OpenLayers.Class(OpenLayers.Layer.WMS,{singleTile:true,initialize:function(name,url,params,options){OpenLayers.Layer.WMS.prototype.initialize.apply(this,arguments);var msg="The OpenLayers.Layer.WMS.Untiled class is deprecated and "+"will be removed in 3.0. Instead, you should use the "+"normal OpenLayers.Layer.WMS class, passing it the option "+"'singleTile' as true.";OpenLayers.Console.warn(msg);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.WMS.Untiled(this.name,this.url,this.params,this.getOptions());}
-obj=OpenLayers.Layer.WMS.prototype.clone.apply(this,[obj]);return obj;},CLASS_NAME:"OpenLayers.Layer.WMS.Untiled"});OpenLayers.Strategy.Filter=OpenLayers.Class(OpenLayers.Strategy,{filter:null,cache:null,caching:false,initialize:function(options){OpenLayers.Strategy.prototype.initialize.apply(this,[options]);if(!this.filter||!(this.filter instanceof OpenLayers.Filter)){throw new Error("Filter strategy must be constructed with a filter");}},activate:function(){var activated=OpenLayers.Strategy.prototype.activate.apply(this,arguments);if(activated){this.cache=[];this.layer.events.on({"beforefeaturesadded":this.handleAdd,"beforefeaturesremoved":this.handleRemove,scope:this});}
-return activated;},deactivate:function(){this.cache=null;if(this.layer&&this.layer.events){this.layer.events.un({"beforefeaturesadded":this.handleAdd,"beforefeaturesremoved":this.handleRemove,scope:this});}
-return OpenLayers.Strategy.prototype.deactivate.apply(this,arguments);},handleAdd:function(event){if(!this.caching){var features=event.features;event.features=[];var feature;for(var i=0,ii=features.length;i<ii;++i){feature=features[i];if(this.filter.evaluate(feature)){event.features.push(feature);}else{this.cache.push(feature);}}}},handleRemove:function(event){if(!this.caching){this.cache=[];}},setFilter:function(filter){this.filter=filter;var previousCache=this.cache;this.cache=[];this.handleAdd({features:this.layer.features});if(this.cache.length>0){this.caching=true;this.layer.removeFeatures(this.cache.slice(),{silent:true});this.caching=false;}
-if(previousCache.length>0){var event={features:previousCache};this.handleAdd(event);this.caching=true;this.layer.addFeatures(event.features,{silent:true});this.caching=false;}},CLASS_NAME:"OpenLayers.Strategy.Filter"});OpenLayers.Style2=OpenLayers.Class({id:null,name:null,title:null,description:null,layerName:null,isDefault:false,rules:null,initialize:function(config){OpenLayers.Util.extend(this,config);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){for(var i=0,len=this.rules.length;i<len;i++){this.rules[i].destroy();}
-delete this.rules;},clone:function(){var config=OpenLayers.Util.extend({},this);if(this.rules){config.rules=[];for(var i=0,len=this.rules.length;i<len;++i){config.rules.push(this.rules[i].clone());}}
-return new OpenLayers.Style2(config);},CLASS_NAME:"OpenLayers.Style2"});OpenLayers.Control.GetFeature=OpenLayers.Class(OpenLayers.Control,{protocol:null,multipleKey:null,toggleKey:null,modifiers:null,multiple:false,click:true,single:true,clickout:true,toggle:false,clickTolerance:5,hover:false,box:false,maxFeatures:10,features:null,hoverFeature:null,handlerOptions:null,handlers:null,hoverResponse:null,filterType:OpenLayers.Filter.Spatial.BBOX,EVENT_TYPES:["featureselected","featuresselected","featureunselected","clickout","beforefeatureselected","beforefeaturesselected","hoverfeature","outfeature"],initialize:function(options){this.EVENT_TYPES=OpenLayers.Control.GetFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);options.handlerOptions=options.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[options]);this.features={};this.handlers={};if(this.click){this.handlers.click=new OpenLayers.Handler.Click(this,{click:this.selectClick},this.handlerOptions.click||{});}
-if(this.box){this.handlers.box=new OpenLayers.Handler.Box(this,{done:this.selectBox},OpenLayers.Util.extend(this.handlerOptions.box,{boxDivClassName:"olHandlerBoxSelectFeature"}));}
-if(this.hover){this.handlers.hover=new OpenLayers.Handler.Hover(this,{'move':this.cancelHover,'pause':this.selectHover},OpenLayers.Util.extend(this.handlerOptions.hover,{'delay':250}));}},activate:function(){if(!this.active){for(var i in this.handlers){this.handlers[i].activate();}}
-return OpenLayers.Control.prototype.activate.apply(this,arguments);},deactivate:function(){if(this.active){for(var i in this.handlers){this.handlers[i].deactivate();}}
-return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},selectClick:function(evt){var bounds=this.pixelToBounds(evt.xy);this.setModifiers(evt);this.request(bounds,{single:this.single});},selectBox:function(position){var bounds;if(position instanceof OpenLayers.Bounds){var minXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.left,position.bottom));var maxXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.right,position.top));bounds=new OpenLayers.Bounds(minXY.lon,minXY.lat,maxXY.lon,maxXY.lat);}else{if(this.click){return;}
-bounds=this.pixelToBounds(position);}
-this.setModifiers(this.handlers.box.dragHandler.evt);this.request(bounds);},selectHover:function(evt){var bounds=this.pixelToBounds(evt.xy);this.request(bounds,{single:true,hover:true});},cancelHover:function(){if(this.hoverResponse){this.protocol.abort(this.hoverResponse);this.hoverResponse=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");}},request:function(bounds,options){options=options||{};var filter=new OpenLayers.Filter.Spatial({type:this.filterType,value:bounds});OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait");var response=this.protocol.read({maxFeatures:options.single==true?this.maxFeatures:undefined,filter:filter,callback:function(result){if(result.success()){if(result.features.length){if(options.single==true){this.selectBestFeature(result.features,bounds.getCenterLonLat(),options);}else{this.select(result.features);}}else if(options.hover){this.hoverSelect();}else{this.events.triggerEvent("clickout");if(this.clickout){this.unselectAll();}}}
-OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait");},scope:this});if(options.hover==true){this.hoverResponse=response;}},selectBestFeature:function(features,clickPosition,options){options=options||{};if(features.length){var point=new OpenLayers.Geometry.Point(clickPosition.lon,clickPosition.lat);var feature,resultFeature,dist;var minDist=Number.MAX_VALUE;for(var i=0;i<features.length;++i){feature=features[i];if(feature.geometry){dist=point.distanceTo(feature.geometry,{edge:false});if(dist<minDist){minDist=dist;resultFeature=feature;if(minDist==0){break;}}}}
-if(options.hover==true){this.hoverSelect(resultFeature);}else{this.select(resultFeature||features);}}},setModifiers:function(evt){this.modifiers={multiple:this.multiple||(this.multipleKey&&evt[this.multipleKey]),toggle:this.toggle||(this.toggleKey&&evt[this.toggleKey])};},select:function(features){if(!this.modifiers.multiple&&!this.modifiers.toggle){this.unselectAll();}
-if(!(features instanceof Array)){features=[features];}
-var cont=this.events.triggerEvent("beforefeaturesselected",{features:features});if(cont!==false){var selectedFeatures=[];var feature;for(var i=0,len=features.length;i<len;++i){feature=features[i];if(this.features[feature.fid||feature.id]){if(this.modifiers.toggle){this.unselect(this.features[feature.fid||feature.id]);}}else{cont=this.events.triggerEvent("beforefeatureselected",{feature:feature});if(cont!==false){this.features[feature.fid||feature.id]=feature;selectedFeatures.push(feature);this.events.triggerEvent("featureselected",{feature:feature});}}}
-this.events.triggerEvent("featuresselected",{features:selectedFeatures});}},hoverSelect:function(feature){var fid=feature?feature.fid||feature.id:null;var hfid=this.hoverFeature?this.hoverFeature.fid||this.hoverFeature.id:null;if(hfid&&hfid!=fid){this.events.triggerEvent("outfeature",{feature:this.hoverFeature});this.hoverFeature=null;}
-if(fid&&fid!=hfid){this.events.triggerEvent("hoverfeature",{feature:feature});this.hoverFeature=feature;}},unselect:function(feature){delete this.features[feature.fid||feature.id];this.events.triggerEvent("featureunselected",{feature:feature});},unselectAll:function(){for(var fid in this.features){this.unselect(this.features[fid]);}},setMap:function(map){for(var i in this.handlers){this.handlers[i].setMap(map);}
-OpenLayers.Control.prototype.setMap.apply(this,arguments);},pixelToBounds:function(pixel){var llPx=pixel.add(-this.clickTolerance/2,this.clickTolerance/2);var urPx=pixel.add(this.clickTolerance/2,-this.clickTolerance/2);var ll=this.map.getLonLatFromPixel(llPx);var ur=this.map.getLonLatFromPixel(urPx);return new OpenLayers.Bounds(ll.lon,ll.lat,ur.lon,ur.lat);},CLASS_NAME:"OpenLayers.Control.GetFeature"});OpenLayers.Control.Snapping=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforesnap","snap","unsnap"],DEFAULTS:{tolerance:10,node:true,edge:true,vertex:true},greedy:true,precedence:["node","vertex","edge"],resolution:null,geoToleranceCache:null,layer:null,feature:null,point:null,initialize:function(options){Array.prototype.push.apply(this.EVENT_TYPES,OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[options]);this.options=options||{};if(this.options.layer){this.setLayer(this.options.layer);}
-var defaults=OpenLayers.Util.extend({},this.options.defaults);this.defaults=OpenLayers.Util.applyDefaults(defaults,this.DEFAULTS);this.setTargets(this.options.targets);if(this.targets.length===0&&this.layer){this.addTargetLayer(this.layer);}
-this.geoToleranceCache={};},setLayer:function(layer){if(this.active){this.deactivate();this.layer=layer;this.activate();}else{this.layer=layer;}},setTargets:function(targets){this.targets=[];if(targets&&targets.length){var target;for(var i=0,len=targets.length;i<len;++i){target=targets[i];if(target instanceof OpenLayers.Layer.Vector){this.addTargetLayer(target);}else{this.addTarget(target);}}}},addTargetLayer:function(layer){this.addTarget({layer:layer});},addTarget:function(target){target=OpenLayers.Util.applyDefaults(target,this.defaults);target.nodeTolerance=target.nodeTolerance||target.tolerance;target.vertexTolerance=target.vertexTolerance||target.tolerance;target.edgeTolerance=target.edgeTolerance||target.tolerance;this.targets.push(target);},removeTargetLayer:function(layer){var target;for(var i=this.targets.length-1;i>=0;--i){target=this.targets[i];if(target.layer===layer){this.removeTarget(target);}}},removeTarget:function(target){return OpenLayers.Util.removeItem(this.targets,target);},activate:function(){var activated=OpenLayers.Control.prototype.activate.call(this);if(activated){if(this.layer&&this.layer.events){this.layer.events.on({sketchstarted:this.onSketchModified,sketchmodified:this.onSketchModified,vertexmodified:this.onVertexModified,scope:this});}}
-return activated;},deactivate:function(){var deactivated=OpenLayers.Control.prototype.deactivate.call(this);if(deactivated){if(this.layer&&this.layer.events){this.layer.events.un({sketchstarted:this.onSketchModified,sketchmodified:this.onSketchModified,vertexmodified:this.onVertexModified,scope:this});}}
-this.feature=null;this.point=null;return deactivated;},onSketchModified:function(event){this.feature=event.feature;this.considerSnapping(event.vertex,event.vertex);},onVertexModified:function(event){this.feature=event.feature;var loc=this.layer.map.getLonLatFromViewPortPx(event.pixel);this.considerSnapping(event.vertex,new OpenLayers.Geometry.Point(loc.lon,loc.lat));},considerSnapping:function(point,loc){var best={rank:Number.POSITIVE_INFINITY,dist:Number.POSITIVE_INFINITY,x:null,y:null};var snapped=false;var result,target;for(var i=0,len=this.targets.length;i<len;++i){target=this.targets[i];result=this.testTarget(target,loc);if(result){if(this.greedy){best=result;best.target=target;snapped=true;break;}else{if((result.rank<best.rank)||(result.rank===best.rank&&result.dist<best.dist)){best=result;best.target=target;snapped=true;}}}}
-if(snapped){var proceed=this.events.triggerEvent("beforesnap",{point:point,x:best.x,y:best.y,distance:best.dist,layer:best.target.layer,snapType:this.precedence[best.rank]});if(proceed!==false){point.x=best.x;point.y=best.y;this.point=point;this.events.triggerEvent("snap",{point:point,snapType:this.precedence[best.rank],layer:best.target.layer,distance:best.dist});}else{snapped=false;}}
-if(this.point&&!snapped){point.x=loc.x;point.y=loc.y;this.point=null;this.events.triggerEvent("unsnap",{point:point});}},testTarget:function(target,loc){var tolerance={node:this.getGeoTolerance(target.nodeTolerance),vertex:this.getGeoTolerance(target.vertexTolerance),edge:this.getGeoTolerance(target.edgeTolerance)};var maxTolerance=Math.max(tolerance.node,tolerance.vertex,tolerance.edge);var result={rank:Number.POSITIVE_INFINITY,dist:Number.POSITIVE_INFINITY};var eligible=false;var features=target.layer.features;var feature,type,vertices,vertex,closest,dist,found;var numTypes=this.precedence.length;var ll=new OpenLayers.LonLat(loc.x,loc.y);for(var i=0,len=features.length;i<len;++i){feature=features[i];if(feature!==this.feature&&!feature._sketch&&feature.state!==OpenLayers.State.DELETE&&(!target.filter||target.filter.evaluate(feature.attributes))){if(feature.atPoint(ll,maxTolerance,maxTolerance)){for(var j=0,stop=Math.min(result.rank+1,numTypes);j<stop;++j){type=this.precedence[j];if(target[type]){if(type==="edge"){closest=feature.geometry.distanceTo(loc,{details:true});dist=closest.distance;if(dist<=tolerance[type]&&dist<result.dist){result={rank:j,dist:dist,x:closest.x0,y:closest.y0};eligible=true;break;}}else{vertices=feature.geometry.getVertices(type==="node");found=false;for(var k=0,klen=vertices.length;k<klen;++k){vertex=vertices[k];dist=vertex.distanceTo(loc);if(dist<=tolerance[type]&&(j<result.rank||(j===result.rank&&dist<result.dist))){result={rank:j,dist:dist,x:vertex.x,y:vertex.y};eligible=true;found=true;}}
-if(found){break;}}}}}}}
-return eligible?result:null;},getGeoTolerance:function(tolerance){var resolution=this.layer.map.getResolution();if(resolution!==this.resolution){this.resolution=resolution;this.geoToleranceCache={};}
-var geoTolerance=this.geoToleranceCache[tolerance];if(geoTolerance===undefined){geoTolerance=tolerance*resolution;this.geoToleranceCache[tolerance]=geoTolerance;}
-return geoTolerance;},destroy:function(){if(this.active){this.deactivate();}
-delete this.layer;delete this.targets;OpenLayers.Control.prototype.destroy.call(this);},CLASS_NAME:"OpenLayers.Control.Snapping"});OpenLayers.Format.Filter=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,parser:null,initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},write:function(filter,options){var version=(options&&options.version)||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=version){var format=OpenLayers.Format.Filter["v"+version.replace(/\./g,"_")];if(!format){throw"Can't find a Filter parser for version "+
-version;}
-this.parser=new format(this.options);}
-return this.parser.write(filter);},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-var version=this.version;if(!version){version=this.defaultVersion;}
-if(!this.parser||this.parser.VERSION!=version){var format=OpenLayers.Format.Filter["v"+version.replace(/\./g,"_")];if(!format){throw"Can't find a Filter parser for version "+
-version;}
-this.parser=new format(this.options);}
-var filter=this.parser.read(data);return filter;},CLASS_NAME:"OpenLayers.Format.Filter"});OpenLayers.Format.SLD=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:"1.0.0",version:null,namedLayersAsArray:false,parser:null,initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},write:function(sld,options){var version=(options&&options.version)||this.version||this.defaultVersion;if(!this.parser||this.parser.VERSION!=version){var format=OpenLayers.Format.SLD["v"+version.replace(/\./g,"_")];if(!format){throw"Can't find a SLD parser for version "+
-version;}
-this.parser=new format(this.options);}
-var root=this.parser.write(sld);return OpenLayers.Format.XML.prototype.write.apply(this,[root]);},read:function(data,options){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-var root=data.documentElement;var version=this.version;if(!version){version=root.getAttribute("version");if(!version){version=this.defaultVersion;}}
-if(!this.parser||this.parser.VERSION!=version){var format=OpenLayers.Format.SLD["v"+version.replace(/\./g,"_")];if(!format){throw"Can't find a SLD parser for version "+
-version;}
-this.parser=new format(this.options);}
-var sld=this.parser.read(data,options);return sld;},CLASS_NAME:"OpenLayers.Format.SLD"});OpenLayers.Format.Text=OpenLayers.Class(OpenLayers.Format,{defaultStyle:null,extractStyles:true,initialize:function(options){options=options||{};if(options.extractStyles!==false){options.defaultStyle={'externalGraphic':OpenLayers.Util.getImagesLocation()+"marker.png",'graphicWidth':21,'graphicHeight':25,'graphicXOffset':-10.5,'graphicYOffset':-12.5};}
-OpenLayers.Format.prototype.initialize.apply(this,[options]);},read:function(text){var lines=text.split('\n');var columns;var features=[];for(var lcv=0;lcv<(lines.length-1);lcv++){var currLine=lines[lcv].replace(/^\s*/,'').replace(/\s*$/,'');if(currLine.charAt(0)!='#'){if(!columns){columns=currLine.split('\t');}else{var vals=currLine.split('\t');var geometry=new OpenLayers.Geometry.Point(0,0);var attributes={};var style=this.defaultStyle?OpenLayers.Util.applyDefaults({},this.defaultStyle):null;var icon,iconSize,iconOffset,overflow;var set=false;for(var valIndex=0;valIndex<vals.length;valIndex++){if(vals[valIndex]){if(columns[valIndex]=='point'){var coords=vals[valIndex].split(',');geometry.y=parseFloat(coords[0]);geometry.x=parseFloat(coords[1]);set=true;}else if(columns[valIndex]=='lat'){geometry.y=parseFloat(vals[valIndex]);set=true;}else if(columns[valIndex]=='lon'){geometry.x=parseFloat(vals[valIndex]);set=true;}else if(columns[valIndex]=='title')
-attributes['title']=vals[valIndex];else if(columns[valIndex]=='image'||columns[valIndex]=='icon'&&style){style['externalGraphic']=vals[valIndex];}else if(columns[valIndex]=='iconSize'&&style){var size=vals[valIndex].split(',');style['graphicWidth']=parseFloat(size[0]);style['graphicHeight']=parseFloat(size[1]);}else if(columns[valIndex]=='iconOffset'&&style){var offset=vals[valIndex].split(',');style['graphicXOffset']=parseFloat(offset[0]);style['graphicYOffset']=parseFloat(offset[1]);}else if(columns[valIndex]=='description'){attributes['description']=vals[valIndex];}else if(columns[valIndex]=='overflow'){attributes['overflow']=vals[valIndex];}else{attributes[columns[valIndex]]=vals[valIndex];}}}
-if(set){if(this.internalProjection&&this.externalProjection){geometry.transform(this.externalProjection,this.internalProjection);}
-var feature=new OpenLayers.Feature.Vector(geometry,attributes,style);features.push(feature);}}}}
-return features;},CLASS_NAME:"OpenLayers.Format.Text"});OpenLayers.Geometry.MultiPoint=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},addPoint:function(point,index){this.addComponent(point,index);},removePoint:function(point){this.removeComponent(point);},CLASS_NAME:"OpenLayers.Geometry.MultiPoint"});OpenLayers.Handler.Point=OpenLayers.Class(OpenLayers.Handler,{point:null,layer:null,multi:false,drawing:false,mouseDown:false,lastDown:null,lastUp:null,persist:false,layerOptions:null,initialize:function(control,callbacks,options){if(!(options&&options.layerOptions&&options.layerOptions.styleMap)){this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'],{});}
-OpenLayers.Handler.prototype.initialize.apply(this,arguments);},activate:function(){if(!OpenLayers.Handler.prototype.activate.apply(this,arguments)){return false;}
-var options=OpenLayers.Util.extend({displayInLayerSwitcher:false,calculateInRange:OpenLayers.Function.True},this.layerOptions);this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,options);this.map.addLayer(this.layer);return true;},createFeature:function(pixel){var lonlat=this.map.getLonLatFromPixel(pixel);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat));this.callback("create",[this.point.geometry,this.point]);this.point.geometry.clearBounds();this.layer.addFeatures([this.point],{silent:true});},deactivate:function(){if(!OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){return false;}
-if(this.drawing){this.cancel();}
-this.destroyFeature();if(this.layer.map!=null){this.layer.destroy(false);}
-this.layer=null;return true;},destroyFeature:function(){if(this.layer){this.layer.destroyFeatures();}
-this.point=null;},finalize:function(cancel){var key=cancel?"cancel":"done";this.drawing=false;this.mouseDown=false;this.lastDown=null;this.lastUp=null;this.callback(key,[this.geometryClone()]);if(cancel||!this.persist){this.destroyFeature();}},cancel:function(){this.finalize(true);},click:function(evt){OpenLayers.Event.stop(evt);return false;},dblclick:function(evt){OpenLayers.Event.stop(evt);return false;},modifyFeature:function(pixel){var lonlat=this.map.getLonLatFromPixel(pixel);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;this.callback("modify",[this.point.geometry,this.point]);this.point.geometry.clearBounds();this.drawFeature();},drawFeature:function(){this.layer.drawFeature(this.point,this.style);},getGeometry:function(){var geometry=this.point&&this.point.geometry;if(geometry&&this.multi){geometry=new OpenLayers.Geometry.MultiPoint([geometry]);}
-return geometry;},geometryClone:function(){var geom=this.getGeometry();return geom&&geom.clone();},mousedown:function(evt){if(!this.checkModifiers(evt)){return true;}
-if(this.lastDown&&this.lastDown.equals(evt.xy)){return true;}
-this.drawing=true;if(this.lastDown==null){if(this.persist){this.destroyFeature();}
-this.createFeature(evt.xy);}else{this.modifyFeature(evt.xy);}
-this.lastDown=evt.xy;return false;},mousemove:function(evt){if(this.drawing){this.modifyFeature(evt.xy);}
-return true;},mouseup:function(evt){if(this.drawing){this.finalize();return false;}else{return true;}},CLASS_NAME:"OpenLayers.Handler.Point"});OpenLayers.Layer.GML=OpenLayers.Class(OpenLayers.Layer.Vector,{loaded:false,format:null,formatOptions:null,initialize:function(name,url,options){var newArguments=[];newArguments.push(name,options);OpenLayers.Layer.Vector.prototype.initialize.apply(this,newArguments);this.url=url;},setVisibility:function(visibility,noEvent){OpenLayers.Layer.Vector.prototype.setVisibility.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadGML();}},moveTo:function(bounds,zoomChanged,minor){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadGML();}},loadGML:function(){if(!this.loaded){this.events.triggerEvent("loadstart");OpenLayers.Request.GET({url:this.url,success:this.requestSuccess,failure:this.requestFailure,scope:this});this.loaded=true;}},setUrl:function(url){this.url=url;this.destroyFeatures();this.loaded=false;this.loadGML();},requestSuccess:function(request){var doc=request.responseXML;if(!doc||!doc.documentElement){doc=request.responseText;}
-var options={};OpenLayers.Util.extend(options,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){options.externalProjection=this.projection;options.internalProjection=this.map.getProjectionObject();}
-var gml=this.format?new this.format(options):new OpenLayers.Format.GML(options);this.addFeatures(gml.read(doc));this.events.triggerEvent("loadend");},requestFailure:function(request){OpenLayers.Console.userError(OpenLayers.i18n("errorLoadingGML",{'url':this.url}));this.events.triggerEvent("loadend");},CLASS_NAME:"OpenLayers.Layer.GML"});OpenLayers.Layer.PointTrack=OpenLayers.Class(OpenLayers.Layer.Vector,{dataFrom:null,initialize:function(name,options){OpenLayers.Layer.Vector.prototype.initialize.apply(this,arguments);},addNodes:function(pointFeatures){if(pointFeatures.length<2){OpenLayers.Console.error("At least two point features have to be added to create"+"a line from");return;}
-var lines=new Array(pointFeatures.length-1);var pointFeature,startPoint,endPoint;for(var i=0,len=pointFeatures.length;i<len;i++){pointFeature=pointFeatures[i];endPoint=pointFeature.geometry;if(!endPoint){var lonlat=pointFeature.lonlat;endPoint=new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat);}else if(endPoint.CLASS_NAME!="OpenLayers.Geometry.Point"){OpenLayers.Console.error("Only features with point geometries are supported.");return;}
-if(i>0){var attributes=(this.dataFrom!=null)?(pointFeatures[i+this.dataFrom].data||pointFeatures[i+this.dataFrom].attributes):null;var line=new OpenLayers.Geometry.LineString([startPoint,endPoint]);lines[i-1]=new OpenLayers.Feature.Vector(line,attributes);}
-startPoint=endPoint;}
-this.addFeatures(lines);},CLASS_NAME:"OpenLayers.Layer.PointTrack"});OpenLayers.Layer.PointTrack.dataFrom={'SOURCE_NODE':-1,'TARGET_NODE':0};OpenLayers.Layer.Vector.RootContainer=OpenLayers.Class(OpenLayers.Layer.Vector,{displayInLayerSwitcher:false,layers:null,initialize:function(name,options){OpenLayers.Layer.Vector.prototype.initialize.apply(this,arguments);},display:function(){},getFeatureFromEvent:function(evt){var layers=this.layers;var feature;for(var i=0;i<layers.length;i++){feature=layers[i].getFeatureFromEvent(evt);if(feature){return feature;}}},setMap:function(map){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);this.collectRoots();map.events.register("changelayer",this,this.handleChangeLayer);},removeMap:function(map){map.events.unregister("changelayer",this,this.handleChangeLayer);this.resetRoots();OpenLayers.Layer.Vector.prototype.removeMap.apply(this,arguments);},collectRoots:function(){var layer;for(var i=0;i<this.map.layers.length;++i){layer=this.map.layers[i];if(OpenLayers.Util.indexOf(this.layers,layer)!=-1){layer.renderer.moveRoot(this.renderer);}}},resetRoots:function(){var layer;for(var i=0;i<this.layers.length;++i){layer=this.layers[i];if(this.renderer&&layer.renderer.getRenderLayerId()==this.id){this.renderer.moveRoot(layer.renderer);}}},handleChangeLayer:function(evt){var layer=evt.layer;if(evt.property=="order"&&OpenLayers.Util.indexOf(this.layers,layer)!=-1){this.resetRoots();this.collectRoots();}},CLASS_NAME:"OpenLayers.Layer.Vector.RootContainer"});OpenLayers.Layer.WFS=OpenLayers.Class(OpenLayers.Layer.Vector,OpenLayers.Layer.Markers,{isBaseLayer:false,tile:null,ratio:2,DEFAULT_PARAMS:{service:"WFS",version:"1.0.0",request:"GetFeature"},featureClass:null,format:null,formatObject:null,formatOptions:null,vectorMode:true,encodeBBOX:false,extractAttributes:false,initialize:function(name,url,params,options){if(options==undefined){options={};}
-if(options.featureClass||!OpenLayers.Layer.Vector||!OpenLayers.Feature.Vector){this.vectorMode=false;}
-params=OpenLayers.Util.upperCaseObject(params);OpenLayers.Util.extend(options,{'reportError':false});var newArguments=[];newArguments.push(name,options);OpenLayers.Layer.Vector.prototype.initialize.apply(this,newArguments);if(!this.renderer||!this.vectorMode){this.vectorMode=false;if(!options.featureClass){options.featureClass=OpenLayers.Feature.WFS;}
-OpenLayers.Layer.Markers.prototype.initialize.apply(this,newArguments);}
-if(this.params&&this.params.typename&&!this.options.typename){this.options.typename=this.params.typename;}
-if(!this.options.geometry_column){this.options.geometry_column="the_geom";}
-this.params=OpenLayers.Util.applyDefaults(params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));this.url=url;},destroy:function(){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.destroy.apply(this,arguments);}else{OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);}
-if(this.tile){this.tile.destroy();}
-this.tile=null;this.ratio=null;this.featureClass=null;this.format=null;if(this.formatObject&&this.formatObject.destroy){this.formatObject.destroy();}
-this.formatObject=null;this.formatOptions=null;this.vectorMode=null;this.encodeBBOX=null;this.extractAttributes=null;},setMap:function(map){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);var options={'extractAttributes':this.extractAttributes};OpenLayers.Util.extend(options,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){options.externalProjection=this.projection;options.internalProjection=this.map.getProjectionObject();}
-this.formatObject=this.format?new this.format(options):new OpenLayers.Format.GML(options);}else{OpenLayers.Layer.Markers.prototype.setMap.apply(this,arguments);}},moveTo:function(bounds,zoomChanged,dragging){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments);}else{OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments);}
-if(dragging){return false;}
-if(zoomChanged){if(this.vectorMode){this.renderer.clear();}}
-if(this.options.minZoomLevel){OpenLayers.Console.warn(OpenLayers.i18n('minZoomLevelError'));if(this.map.getZoom()<this.options.minZoomLevel){return null;}}
-if(bounds==null){bounds=this.map.getExtent();}
-var firstRendering=(this.tile==null);var outOfBounds=(!firstRendering&&!this.tile.bounds.containsBounds(bounds));if(zoomChanged||firstRendering||(!dragging&&outOfBounds)){var center=bounds.getCenterLonLat();var tileWidth=bounds.getWidth()*this.ratio;var tileHeight=bounds.getHeight()*this.ratio;var tileBounds=new OpenLayers.Bounds(center.lon-(tileWidth/2),center.lat-(tileHeight/2),center.lon+(tileWidth/2),center.lat+(tileHeight/2));var tileSize=this.map.getSize();tileSize.w=tileSize.w*this.ratio;tileSize.h=tileSize.h*this.ratio;var ul=new OpenLayers.LonLat(tileBounds.left,tileBounds.top);var pos=this.map.getLayerPxFromLonLat(ul);var url=this.getFullRequestString();var params=null;var filter=this.params.filter||this.params.FILTER;if(filter){params={FILTER:filter};}
-else{params={BBOX:this.encodeBBOX?tileBounds.toBBOX():tileBounds.toArray()};}
-if(this.map&&!this.projection.equals(this.map.getProjectionObject())){var projectedBounds=tileBounds.clone();projectedBounds.transform(this.map.getProjectionObject(),this.projection);if(!filter){params.BBOX=this.encodeBBOX?projectedBounds.toBBOX():projectedBounds.toArray();}}
-url+="&"+OpenLayers.Util.getParameterString(params);if(!this.tile){this.tile=new OpenLayers.Tile.WFS(this,pos,tileBounds,url,tileSize);this.addTileMonitoringHooks(this.tile);this.tile.draw();}else{if(this.vectorMode){this.destroyFeatures();this.renderer.clear();}else{this.clearMarkers();}
-this.removeTileMonitoringHooks(this.tile);this.tile.destroy();this.tile=null;this.tile=new OpenLayers.Tile.WFS(this,pos,tileBounds,url,tileSize);this.addTileMonitoringHooks(this.tile);this.tile.draw();}}},addTileMonitoringHooks:function(tile){tile.onLoadStart=function(){if(this==this.layer.tile){this.layer.events.triggerEvent("loadstart");}};tile.events.register("loadstart",tile,tile.onLoadStart);tile.onLoadEnd=function(){if(this==this.layer.tile){this.layer.events.triggerEvent("tileloaded");this.layer.events.triggerEvent("loadend");}};tile.events.register("loadend",tile,tile.onLoadEnd);tile.events.register("unload",tile,tile.onLoadEnd);},removeTileMonitoringHooks:function(tile){tile.unload();tile.events.un({"loadstart":tile.onLoadStart,"loadend":tile.onLoadEnd,"unload":tile.onLoadEnd,scope:tile});},onMapResize:function(){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.onMapResize.apply(this,arguments);}else{OpenLayers.Layer.Markers.prototype.onMapResize.apply(this,arguments);}},display:function(){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.display.apply(this,arguments);}else{OpenLayers.Layer.Markers.prototype.display.apply(this,arguments);}},mergeNewParams:function(newParams){var upperParams=OpenLayers.Util.upperCaseObject(newParams);var newArguments=[upperParams];return OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this,newArguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.WFS(this.name,this.url,this.params,this.getOptions());}
-if(this.vectorMode){obj=OpenLayers.Layer.Vector.prototype.clone.apply(this,[obj]);}else{obj=OpenLayers.Layer.Markers.prototype.clone.apply(this,[obj]);}
-return obj;},getFullRequestString:function(newParams,altUrl){var projectionCode=this.projection.getCode()||this.map.getProjection();this.params.SRS=(projectionCode=="none")?null:projectionCode;return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);},commit:function(){if(!this.writer){var options={};if(this.map&&!this.projection.equals(this.map.getProjectionObject())){options.externalProjection=this.projection;options.internalProjection=this.map.getProjectionObject();}
-this.writer=new OpenLayers.Format.WFS(options,this);}
-var data=this.writer.write(this.features);OpenLayers.Request.POST({url:this.url,data:data,success:this.commitSuccess,failure:this.commitFailure,scope:this});},commitSuccess:function(request){var response=request.responseText;if(response.indexOf('SUCCESS')!=-1){this.commitReport(OpenLayers.i18n("commitSuccess",{'response':response}));for(var i=0;i<this.features.length;i++){this.features[i].state=null;}}else if(response.indexOf('FAILED')!=-1||response.indexOf('Exception')!=-1){this.commitReport(OpenLayers.i18n("commitFailed",{'response':response}));}},commitFailure:function(request){},commitReport:function(string,response){OpenLayers.Console.userError(string);},refresh:function(){if(this.tile){if(this.vectorMode){this.renderer.clear();this.features.length=0;}else{this.clearMarkers();this.markers.length=0;}
-this.tile.draw();}},getDataExtent:function(){var extent;if(this.vectorMode){extent=OpenLayers.Layer.Vector.prototype.getDataExtent.apply(this);}else{extent=OpenLayers.Layer.Markers.prototype.getDataExtent.apply(this);}
-return extent;},setOpacity:function(opacity){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.setOpacity.apply(this,[opacity]);}else{OpenLayers.Layer.Markers.prototype.setOpacity.apply(this,[opacity]);}},CLASS_NAME:"OpenLayers.Layer.WFS"});OpenLayers.Protocol.HTTP=OpenLayers.Class(OpenLayers.Protocol,{url:null,headers:null,params:null,callback:null,scope:null,readWithPOST:false,wildcarded:false,initialize:function(options){options=options||{};this.params={};this.headers={};OpenLayers.Protocol.prototype.initialize.apply(this,arguments);},destroy:function(){this.params=null;this.headers=null;OpenLayers.Protocol.prototype.destroy.apply(this);},read:function(options){OpenLayers.Protocol.prototype.read.apply(this,arguments);options=OpenLayers.Util.applyDefaults(options,this.options);options.params=OpenLayers.Util.applyDefaults(options.params,this.options.params);if(options.filter){options.params=this.filterToParams(options.filter,options.params);}
-var readWithPOST=(options.readWithPOST!==undefined)?options.readWithPOST:this.readWithPOST;var resp=new OpenLayers.Protocol.Response({requestType:"read"});if(readWithPOST){resp.priv=OpenLayers.Request.POST({url:options.url,callback:this.createCallback(this.handleRead,resp,options),data:OpenLayers.Util.getParameterString(options.params),headers:{"Content-Type":"application/x-www-form-urlencoded"}});}else{resp.priv=OpenLayers.Request.GET({url:options.url,callback:this.createCallback(this.handleRead,resp,options),params:options.params,headers:options.headers});}
-return resp;},handleRead:function(resp,options){this.handleResponse(resp,options);},filterToParams:function(filter,params){params=params||{};var className=filter.CLASS_NAME;var filterType=className.substring(className.lastIndexOf(".")+1);switch(filterType){case"Spatial":switch(filter.type){case OpenLayers.Filter.Spatial.BBOX:params.bbox=filter.value.toArray();break;case OpenLayers.Filter.Spatial.DWITHIN:params.tolerance=filter.distance;case OpenLayers.Filter.Spatial.WITHIN:params.lon=filter.value.x;params.lat=filter.value.y;break;default:OpenLayers.Console.warn("Unknown spatial filter type "+filter.type);}
-break;case"Comparison":var op=OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR[filter.type];if(op!==undefined){var value=filter.value;if(filter.type==OpenLayers.Filter.Comparison.LIKE){value=this.regex2value(value);if(this.wildcarded){value="%"+value+"%";}}
-params[filter.property+"__"+op]=value;params.queryable=params.queryable||[];params.queryable.push(filter.property);}else{OpenLayers.Console.warn("Unknown comparison filter type "+filter.type);}
-break;case"Logical":if(filter.type===OpenLayers.Filter.Logical.AND){for(var i=0,len=filter.filters.length;i<len;i++){params=this.filterToParams(filter.filters[i],params);}}else{OpenLayers.Console.warn("Unsupported logical filter type "+filter.type);}
-break;default:OpenLayers.Console.warn("Unknown filter type "+filterType);}
-return params;},regex2value:function(value){value=value.replace(/%/g,"\\%");value=value.replace(/\\\\\.(\*)?/g,function($0,$1){return $1?$0:"\\\\_";});value=value.replace(/\\\\\.\*/g,"\\\\%");value=value.replace(/(\\)?\.(\*)?/g,function($0,$1,$2){return $1||$2?$0:"_";});value=value.replace(/(\\)?\.\*/g,function($0,$1){return $1?$0:"%";});value=value.replace(/\\\./g,".");value=value.replace(/(\\)?\\\*/g,function($0,$1){return $1?$0:"*";});return value;},create:function(features,options){options=OpenLayers.Util.applyDefaults(options,this.options);var resp=new OpenLayers.Protocol.Response({reqFeatures:features,requestType:"create"});resp.priv=OpenLayers.Request.POST({url:options.url,callback:this.createCallback(this.handleCreate,resp,options),headers:options.headers,data:this.format.write(features)});return resp;},handleCreate:function(resp,options){this.handleResponse(resp,options);},update:function(feature,options){options=options||{};var url=options.url||feature.url||this.options.url+"/"+feature.fid;options=OpenLayers.Util.applyDefaults(options,this.options);var resp=new OpenLayers.Protocol.Response({reqFeatures:feature,requestType:"update"});resp.priv=OpenLayers.Request.PUT({url:url,callback:this.createCallback(this.handleUpdate,resp,options),headers:options.headers,data:this.format.write(feature)});return resp;},handleUpdate:function(resp,options){this.handleResponse(resp,options);},"delete":function(feature,options){options=options||{};var url=options.url||feature.url||this.options.url+"/"+feature.fid;options=OpenLayers.Util.applyDefaults(options,this.options);var resp=new OpenLayers.Protocol.Response({reqFeatures:feature,requestType:"delete"});resp.priv=OpenLayers.Request.DELETE({url:url,callback:this.createCallback(this.handleDelete,resp,options),headers:options.headers});return resp;},handleDelete:function(resp,options){this.handleResponse(resp,options);},handleResponse:function(resp,options){var request=resp.priv;if(options.callback){if(request.status>=200&&request.status<300){if(resp.requestType!="delete"){resp.features=this.parseFeatures(request);}
-resp.code=OpenLayers.Protocol.Response.SUCCESS;}else{resp.code=OpenLayers.Protocol.Response.FAILURE;}
-options.callback.call(options.scope,resp);}},parseFeatures:function(request){var doc=request.responseXML;if(!doc||!doc.documentElement){doc=request.responseText;}
-if(!doc||doc.length<=0){return null;}
-return this.format.read(doc);},commit:function(features,options){options=OpenLayers.Util.applyDefaults(options,this.options);var resp=[],nResponses=0;var types={};types[OpenLayers.State.INSERT]=[];types[OpenLayers.State.UPDATE]=[];types[OpenLayers.State.DELETE]=[];var feature,list,requestFeatures=[];for(var i=0,len=features.length;i<len;++i){feature=features[i];list=types[feature.state];if(list){list.push(feature);requestFeatures.push(feature);}}
-var nRequests=(types[OpenLayers.State.INSERT].length>0?1:0)+
-types[OpenLayers.State.UPDATE].length+
-types[OpenLayers.State.DELETE].length;var success=true;var finalResponse=new OpenLayers.Protocol.Response({reqFeatures:requestFeatures});function insertCallback(response){var len=response.features?response.features.length:0;var fids=new Array(len);for(var i=0;i<len;++i){fids[i]=response.features[i].fid;}
-finalResponse.insertIds=fids;callback.apply(this,[response]);}
-function callback(response){this.callUserCallback(response,options);success=success&&response.success();nResponses++;if(nResponses>=nRequests){if(options.callback){finalResponse.code=success?OpenLayers.Protocol.Response.SUCCESS:OpenLayers.Protocol.Response.FAILURE;options.callback.apply(options.scope,[finalResponse]);}}}
-var queue=types[OpenLayers.State.INSERT];if(queue.length>0){resp.push(this.create(queue,OpenLayers.Util.applyDefaults({callback:insertCallback,scope:this},options.create)));}
-queue=types[OpenLayers.State.UPDATE];for(var i=queue.length-1;i>=0;--i){resp.push(this.update(queue[i],OpenLayers.Util.applyDefaults({callback:callback,scope:this},options.update)));}
-queue=types[OpenLayers.State.DELETE];for(var i=queue.length-1;i>=0;--i){resp.push(this["delete"](queue[i],OpenLayers.Util.applyDefaults({callback:callback,scope:this},options["delete"])));}
-return resp;},abort:function(response){if(response){response.priv.abort();}},callUserCallback:function(resp,options){var opt=options[resp.requestType];if(opt&&opt.callback){opt.callback.call(opt.scope,resp);}},CLASS_NAME:"OpenLayers.Protocol.HTTP"});(function(){var o=OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR={};o[OpenLayers.Filter.Comparison.EQUAL_TO]="eq";o[OpenLayers.Filter.Comparison.NOT_EQUAL_TO]="ne";o[OpenLayers.Filter.Comparison.LESS_THAN]="lt";o[OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO]="lte";o[OpenLayers.Filter.Comparison.GREATER_THAN]="gt";o[OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO]="gte";o[OpenLayers.Filter.Comparison.LIKE]="ilike";})();OpenLayers.Strategy.BBOX=OpenLayers.Class(OpenLayers.Strategy,{bounds:null,resolution:null,ratio:2,resFactor:null,response:null,initialize:function(options){OpenLayers.Strategy.prototype.initialize.apply(this,[options]);},activate:function(){var activated=OpenLayers.Strategy.prototype.activate.call(this);if(activated){this.layer.events.on({"moveend":this.update,scope:this});this.layer.events.on({"refresh":this.update,scope:this});}
-return activated;},deactivate:function(){var deactivated=OpenLayers.Strategy.prototype.deactivate.call(this);if(deactivated){this.layer.events.un({"moveend":this.update,scope:this});this.layer.events.un({"refresh":this.update,scope:this});}
-return deactivated;},update:function(options){var mapBounds=this.getMapBounds();if((options&&options.force)||this.invalidBounds(mapBounds)){this.calculateBounds(mapBounds);this.resolution=this.layer.map.getResolution();this.triggerRead();}},getMapBounds:function(){var bounds=this.layer.map.getExtent();if(!this.layer.projection.equals(this.layer.map.getProjectionObject())){bounds=bounds.clone().transform(this.layer.map.getProjectionObject(),this.layer.projection);}
-return bounds;},invalidBounds:function(mapBounds){if(!mapBounds){mapBounds=this.getMapBounds();}
-var invalid=!this.bounds||!this.bounds.containsBounds(mapBounds);if(!invalid&&this.resFactor){var ratio=this.resolution/this.layer.map.getResolution();invalid=(ratio>=this.resFactor||ratio<=(1/this.resFactor));}
-return invalid;},calculateBounds:function(mapBounds){if(!mapBounds){mapBounds=this.getMapBounds();}
-var center=mapBounds.getCenterLonLat();var dataWidth=mapBounds.getWidth()*this.ratio;var dataHeight=mapBounds.getHeight()*this.ratio;this.bounds=new OpenLayers.Bounds(center.lon-(dataWidth/2),center.lat-(dataHeight/2),center.lon+(dataWidth/2),center.lat+(dataHeight/2));},triggerRead:function(){if(this.response){this.layer.protocol.abort(this.response);this.layer.events.triggerEvent("loadend");}
-this.layer.events.triggerEvent("loadstart");this.response=this.layer.protocol.read({filter:this.createFilter(),callback:this.merge,scope:this});},createFilter:function(){var filter=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,value:this.bounds,projection:this.layer.projection});if(this.layer.filter){filter=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.layer.filter,filter]});}
-return filter;},merge:function(resp){this.layer.destroyFeatures();var features=resp.features;if(features&&features.length>0){var remote=this.layer.projection;var local=this.layer.map.getProjectionObject();if(!local.equals(remote)){var geom;for(var i=0,len=features.length;i<len;++i){geom=features[i].geometry;if(geom){geom.transform(remote,local);}}}
-this.layer.addFeatures(features);}
-this.response=null;this.layer.events.triggerEvent("loadend");},CLASS_NAME:"OpenLayers.Strategy.BBOX"});OpenLayers.Control.SelectFeature=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforefeaturehighlighted","featurehighlighted","featureunhighlighted"],multipleKey:null,toggleKey:null,multiple:false,clickout:true,toggle:false,hover:false,highlightOnly:false,box:false,onBeforeSelect:function(){},onSelect:function(){},onUnselect:function(){},scope:null,geometryTypes:null,layer:null,layers:null,callbacks:null,selectStyle:null,renderIntent:"select",handlers:null,initialize:function(layers,options){this.EVENT_TYPES=OpenLayers.Control.SelectFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[options]);if(this.scope===null){this.scope=this;}
-this.initLayer(layers);var callbacks={click:this.clickFeature,clickout:this.clickoutFeature};if(this.hover){callbacks.over=this.overFeature;callbacks.out=this.outFeature;}
-this.callbacks=OpenLayers.Util.extend(callbacks,this.callbacks);this.handlers={feature:new OpenLayers.Handler.Feature(this,this.layer,this.callbacks,{geometryTypes:this.geometryTypes})};if(this.box){this.handlers.box=new OpenLayers.Handler.Box(this,{done:this.selectBox},{boxDivClassName:"olHandlerBoxSelectFeature"});}},initLayer:function(layers){if(layers instanceof Array){this.layers=layers;this.layer=new OpenLayers.Layer.Vector.RootContainer(this.id+"_container",{layers:layers});}else{this.layer=layers;}},destroy:function(){if(this.active&&this.layers){this.map.removeLayer(this.layer);}
-OpenLayers.Control.prototype.destroy.apply(this,arguments);if(this.layers){this.layer.destroy();}},activate:function(){if(!this.active){if(this.layers){this.map.addLayer(this.layer);}
-this.handlers.feature.activate();if(this.box&&this.handlers.box){this.handlers.box.activate();}}
-return OpenLayers.Control.prototype.activate.apply(this,arguments);},deactivate:function(){if(this.active){this.handlers.feature.deactivate();if(this.handlers.box){this.handlers.box.deactivate();}
-if(this.layers){this.map.removeLayer(this.layer);}}
-return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},unselectAll:function(options){var layers=this.layers||[this.layer];var layer,feature;for(var l=0;l<layers.length;++l){layer=layers[l];for(var i=layer.selectedFeatures.length-1;i>=0;--i){feature=layer.selectedFeatures[i];if(!options||options.except!=feature){this.unselect(feature);}}}},clickFeature:function(feature){if(!this.hover){var selected=(OpenLayers.Util.indexOf(feature.layer.selectedFeatures,feature)>-1);if(selected){if(this.toggleSelect()){this.unselect(feature);}else if(!this.multipleSelect()){this.unselectAll({except:feature});}}else{if(!this.multipleSelect()){this.unselectAll({except:feature});}
-this.select(feature);}}},multipleSelect:function(){return this.multiple||(this.handlers.feature.evt&&this.handlers.feature.evt[this.multipleKey]);},toggleSelect:function(){return this.toggle||(this.handlers.feature.evt&&this.handlers.feature.evt[this.toggleKey]);},clickoutFeature:function(feature){if(!this.hover&&this.clickout){this.unselectAll();}},overFeature:function(feature){var layer=feature.layer;if(this.hover){if(this.highlightOnly){this.highlight(feature);}else if(OpenLayers.Util.indexOf(layer.selectedFeatures,feature)==-1){this.select(feature);}}},outFeature:function(feature){if(this.hover){if(this.highlightOnly){if(feature._lastHighlighter==this.id){if(feature._prevHighlighter&&feature._prevHighlighter!=this.id){delete feature._lastHighlighter;var control=this.map.getControl(feature._prevHighlighter);if(control){control.highlight(feature);}}else{this.unhighlight(feature);}}}else{this.unselect(feature);}}},highlight:function(feature){var layer=feature.layer;var cont=this.events.triggerEvent("beforefeaturehighlighted",{feature:feature});if(cont!==false){feature._prevHighlighter=feature._lastHighlighter;feature._lastHighlighter=this.id;var style=this.selectStyle||this.renderIntent;layer.drawFeature(feature,style);this.events.triggerEvent("featurehighlighted",{feature:feature});}},unhighlight:function(feature){var layer=feature.layer;feature._lastHighlighter=feature._prevHighlighter;delete feature._prevHighlighter;layer.drawFeature(feature,feature.style||feature.layer.style||"default");this.events.triggerEvent("featureunhighlighted",{feature:feature});},select:function(feature){var cont=this.onBeforeSelect.call(this.scope,feature);var layer=feature.layer;if(cont!==false){cont=layer.events.triggerEvent("beforefeatureselected",{feature:feature});if(cont!==false){layer.selectedFeatures.push(feature);this.highlight(feature);if(!this.handlers.feature.lastFeature){this.handlers.feature.lastFeature=layer.selectedFeatures[0];}
-layer.events.triggerEvent("featureselected",{feature:feature});this.onSelect.call(this.scope,feature);}}},unselect:function(feature){var layer=feature.layer;this.unhighlight(feature);OpenLayers.Util.removeItem(layer.selectedFeatures,feature);layer.events.triggerEvent("featureunselected",{feature:feature});this.onUnselect.call(this.scope,feature);},selectBox:function(position){if(position instanceof OpenLayers.Bounds){var minXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.left,position.bottom));var maxXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.right,position.top));var bounds=new OpenLayers.Bounds(minXY.lon,minXY.lat,maxXY.lon,maxXY.lat);if(!this.multipleSelect()){this.unselectAll();}
-var prevMultiple=this.multiple;this.multiple=true;var layers=this.layers||[this.layer];var layer;for(var l=0;l<layers.length;++l){layer=layers[l];for(var i=0,len=layer.features.length;i<len;++i){var feature=layer.features[i];if(!feature.getVisibility()){continue;}
-if(this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,feature.geometry.CLASS_NAME)>-1){if(bounds.toGeometry().intersects(feature.geometry)){if(OpenLayers.Util.indexOf(layer.selectedFeatures,feature)==-1){this.select(feature);}}}}}
-this.multiple=prevMultiple;}},setMap:function(map){this.handlers.feature.setMap(map);if(this.box){this.handlers.box.setMap(map);}
-OpenLayers.Control.prototype.setMap.apply(this,arguments);},setLayer:function(layers){var isActive=this.active;this.unselectAll();this.deactivate();if(this.layers){this.layer.destroy();this.layers=null;}
-this.initLayer(layers);this.handlers.feature.layer=this.layer;if(isActive){this.activate();}},CLASS_NAME:"OpenLayers.Control.SelectFeature"});OpenLayers.Format.Filter.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ogc:"http://www.opengis.net/ogc",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"ogc",schemaLocation:null,initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){var obj={};this.readers.ogc["Filter"].apply(this,[data,obj]);return obj.filter;},readers:{"ogc":{"Filter":function(node,parent){var obj={fids:[],filters:[]};this.readChildNodes(node,obj);if(obj.fids.length>0){parent.filter=new OpenLayers.Filter.FeatureId({fids:obj.fids});}else if(obj.filters.length>0){parent.filter=obj.filters[0];}},"FeatureId":function(node,obj){var fid=node.getAttribute("fid");if(fid){obj.fids.push(fid);}},"And":function(node,obj){var filter=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND});this.readChildNodes(node,filter);obj.filters.push(filter);},"Or":function(node,obj){var filter=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.OR});this.readChildNodes(node,filter);obj.filters.push(filter);},"Not":function(node,obj){var filter=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.NOT});this.readChildNodes(node,filter);obj.filters.push(filter);},"PropertyIsLessThan":function(node,obj){var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN});this.readChildNodes(node,filter);obj.filters.push(filter);},"PropertyIsGreaterThan":function(node,obj){var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.GREATER_THAN});this.readChildNodes(node,filter);obj.filters.push(filter);},"PropertyIsLessThanOrEqualTo":function(node,obj){var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO});this.readChildNodes(node,filter);obj.filters.push(filter);},"PropertyIsGreaterThanOrEqualTo":function(node,obj){var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO});this.readChildNodes(node,filter);obj.filters.push(filter);},"PropertyIsBetween":function(node,obj){var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.BETWEEN});this.readChildNodes(node,filter);obj.filters.push(filter);},"Literal":function(node,obj){obj.value=OpenLayers.String.numericIf(this.getChildValue(node));},"PropertyName":function(node,filter){filter.property=this.getChildValue(node);},"LowerBoundary":function(node,filter){filter.lowerBoundary=OpenLayers.String.numericIf(this.readOgcExpression(node));},"UpperBoundary":function(node,filter){filter.upperBoundary=OpenLayers.String.numericIf(this.readOgcExpression(node));},"Intersects":function(node,obj){this.readSpatial(node,obj,OpenLayers.Filter.Spatial.INTERSECTS);},"Within":function(node,obj){this.readSpatial(node,obj,OpenLayers.Filter.Spatial.WITHIN);},"Contains":function(node,obj){this.readSpatial(node,obj,OpenLayers.Filter.Spatial.CONTAINS);},"DWithin":function(node,obj){this.readSpatial(node,obj,OpenLayers.Filter.Spatial.DWITHIN);},"Distance":function(node,obj){obj.distance=parseInt(this.getChildValue(node));obj.distanceUnits=node.getAttribute("units");}}},readSpatial:function(node,obj,type){var filter=new OpenLayers.Filter.Spatial({type:type});this.readChildNodes(node,filter);filter.value=filter.components[0];delete filter.components;obj.filters.push(filter);},readOgcExpression:function(node){var obj={};this.readChildNodes(node,obj);var value=obj.value;if(value===undefined){value=this.getChildValue(node);}
-return value;},write:function(filter){return this.writers.ogc["Filter"].apply(this,[filter]);},writers:{"ogc":{"Filter":function(filter){var node=this.createElementNSPlus("ogc:Filter");var sub=filter.CLASS_NAME.split(".").pop();if(sub=="FeatureId"){for(var i=0;i<filter.fids.length;++i){this.writeNode("FeatureId",filter.fids[i],node);}}else{this.writeNode(this.getFilterType(filter),filter,node);}
-return node;},"FeatureId":function(fid){return this.createElementNSPlus("ogc:FeatureId",{attributes:{fid:fid}});},"And":function(filter){var node=this.createElementNSPlus("ogc:And");var childFilter;for(var i=0;i<filter.filters.length;++i){childFilter=filter.filters[i];this.writeNode(this.getFilterType(childFilter),childFilter,node);}
-return node;},"Or":function(filter){var node=this.createElementNSPlus("ogc:Or");var childFilter;for(var i=0;i<filter.filters.length;++i){childFilter=filter.filters[i];this.writeNode(this.getFilterType(childFilter),childFilter,node);}
-return node;},"Not":function(filter){var node=this.createElementNSPlus("ogc:Not");var childFilter=filter.filters[0];this.writeNode(this.getFilterType(childFilter),childFilter,node);return node;},"PropertyIsLessThan":function(filter){var node=this.createElementNSPlus("ogc:PropertyIsLessThan");this.writeNode("PropertyName",filter,node);this.writeNode("Literal",filter.value,node);return node;},"PropertyIsGreaterThan":function(filter){var node=this.createElementNSPlus("ogc:PropertyIsGreaterThan");this.writeNode("PropertyName",filter,node);this.writeNode("Literal",filter.value,node);return node;},"PropertyIsLessThanOrEqualTo":function(filter){var node=this.createElementNSPlus("ogc:PropertyIsLessThanOrEqualTo");this.writeNode("PropertyName",filter,node);this.writeNode("Literal",filter.value,node);return node;},"PropertyIsGreaterThanOrEqualTo":function(filter){var node=this.createElementNSPlus("ogc:PropertyIsGreaterThanOrEqualTo");this.writeNode("PropertyName",filter,node);this.writeNode("Literal",filter.value,node);return node;},"PropertyIsBetween":function(filter){var node=this.createElementNSPlus("ogc:PropertyIsBetween");this.writeNode("PropertyName",filter,node);this.writeNode("LowerBoundary",filter,node);this.writeNode("UpperBoundary",filter,node);return node;},"PropertyName":function(filter){return this.createElementNSPlus("ogc:PropertyName",{value:filter.property});},"Literal":function(value){return this.createElementNSPlus("ogc:Literal",{value:value});},"LowerBoundary":function(filter){var node=this.createElementNSPlus("ogc:LowerBoundary");this.writeNode("Literal",filter.lowerBoundary,node);return node;},"UpperBoundary":function(filter){var node=this.createElementNSPlus("ogc:UpperBoundary");this.writeNode("Literal",filter.upperBoundary,node);return node;},"INTERSECTS":function(filter){return this.writeSpatial(filter,"Intersects");},"WITHIN":function(filter){return this.writeSpatial(filter,"Within");},"CONTAINS":function(filter){return this.writeSpatial(filter,"Contains");},"DWITHIN":function(filter){var node=this.writeSpatial(filter,"DWithin");this.writeNode("Distance",filter,node);return node;},"Distance":function(filter){return this.createElementNSPlus("ogc:Distance",{attributes:{units:filter.distanceUnits},value:filter.distance});}}},getFilterType:function(filter){var filterType=this.filterMap[filter.type];if(!filterType){throw"Filter writing not supported for rule type: "+filter.type;}
-return filterType;},filterMap:{"&&":"And","||":"Or","!":"Not","==":"PropertyIsEqualTo","!=":"PropertyIsNotEqualTo","<":"PropertyIsLessThan",">":"PropertyIsGreaterThan","<=":"PropertyIsLessThanOrEqualTo",">=":"PropertyIsGreaterThanOrEqualTo","..":"PropertyIsBetween","~":"PropertyIsLike","BBOX":"BBOX","DWITHIN":"DWITHIN","WITHIN":"WITHIN","CONTAINS":"CONTAINS","INTERSECTS":"INTERSECTS"},CLASS_NAME:"OpenLayers.Format.Filter.v1"});OpenLayers.Geometry.Curve=OpenLayers.Class(OpenLayers.Geometry.MultiPoint,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(points){OpenLayers.Geometry.MultiPoint.prototype.initialize.apply(this,arguments);},getLength:function(){var length=0.0;if(this.components&&(this.components.length>1)){for(var i=1,len=this.components.length;i<len;i++){length+=this.components[i-1].distanceTo(this.components[i]);}}
-return length;},getGeodesicLength:function(projection){var geom=this;if(projection){var gg=new OpenLayers.Projection("EPSG:4326");if(!gg.equals(projection)){geom=this.clone().transform(projection,gg);}}
-var length=0.0;if(geom.components&&(geom.components.length>1)){var p1,p2;for(var i=1,len=geom.components.length;i<len;i++){p1=geom.components[i-1];p2=geom.components[i];length+=OpenLayers.Util.distVincenty({lon:p1.x,lat:p1.y},{lon:p2.x,lat:p2.y});}}
-return length*1000;},CLASS_NAME:"OpenLayers.Geometry.Curve"});OpenLayers.Layer.Text=OpenLayers.Class(OpenLayers.Layer.Markers,{location:null,features:null,formatOptions:null,selectedFeature:null,initialize:function(name,options){OpenLayers.Layer.Markers.prototype.initialize.apply(this,arguments);this.features=new Array();},destroy:function(){OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);this.clearFeatures();this.features=null;},loadText:function(){if(!this.loaded){if(this.location!=null){var onFail=function(e){this.events.triggerEvent("loadend");};this.events.triggerEvent("loadstart");OpenLayers.Request.GET({url:this.location,success:this.parseData,failure:onFail,scope:this});this.loaded=true;}}},moveTo:function(bounds,zoomChanged,minor){OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadText();}},parseData:function(ajaxRequest){var text=ajaxRequest.responseText;var options={};OpenLayers.Util.extend(options,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){options.externalProjection=this.projection;options.internalProjection=this.map.getProjectionObject();}
-var parser=new OpenLayers.Format.Text(options);var features=parser.read(text);for(var i=0,len=features.length;i<len;i++){var data={};var feature=features[i];var location;var iconSize,iconOffset;location=new OpenLayers.LonLat(feature.geometry.x,feature.geometry.y);if(feature.style.graphicWidth&&feature.style.graphicHeight){iconSize=new OpenLayers.Size(feature.style.graphicWidth,feature.style.graphicHeight);}
-if(feature.style.graphicXOffset!==undefined&&feature.style.graphicYOffset!==undefined){iconOffset=new OpenLayers.Pixel(feature.style.graphicXOffset,feature.style.graphicYOffset);}
-if(feature.style.externalGraphic!=null){data.icon=new OpenLayers.Icon(feature.style.externalGraphic,iconSize,iconOffset);}else{data.icon=OpenLayers.Marker.defaultIcon();if(iconSize!=null){data.icon.setSize(iconSize);}}
-if((feature.attributes.title!=null)&&(feature.attributes.description!=null)){data['popupContentHTML']='<h2>'+feature.attributes.title+'</h2>'+'<p>'+feature.attributes.description+'</p>';}
-data['overflow']=feature.attributes.overflow||"auto";var markerFeature=new OpenLayers.Feature(this,location,data);this.features.push(markerFeature);var marker=markerFeature.createMarker();if((feature.attributes.title!=null)&&(feature.attributes.description!=null)){marker.events.register('click',markerFeature,this.markerClick);}
-this.addMarker(marker);}
-this.events.triggerEvent("loadend");},markerClick:function(evt){var sameMarkerClicked=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!sameMarkerClicked)?this:null;for(var i=0,len=this.layer.map.popups.length;i<len;i++){this.layer.map.removePopup(this.layer.map.popups[i]);}
-if(!sameMarkerClicked){this.layer.map.addPopup(this.createPopup());}
-OpenLayers.Event.stop(evt);},clearFeatures:function(){if(this.features!=null){while(this.features.length>0){var feature=this.features[0];OpenLayers.Util.removeItem(this.features,feature);feature.destroy();}}},CLASS_NAME:"OpenLayers.Layer.Text"});OpenLayers.Control.ModifyFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,clickout:true,toggle:true,standalone:false,layer:null,feature:null,vertices:null,virtualVertices:null,selectControl:null,dragControl:null,handlers:null,deleteCodes:null,virtualStyle:null,mode:null,modified:false,radiusHandle:null,dragHandle:null,onModificationStart:function(){},onModification:function(){},onModificationEnd:function(){},initialize:function(layer,options){this.layer=layer;this.vertices=[];this.virtualVertices=[];this.virtualStyle=OpenLayers.Util.extend({},this.layer.style||this.layer.styleMap.createSymbolizer());this.virtualStyle.fillOpacity=0.3;this.virtualStyle.strokeOpacity=0.3;this.deleteCodes=[46,68];this.mode=OpenLayers.Control.ModifyFeature.RESHAPE;OpenLayers.Control.prototype.initialize.apply(this,[options]);if(!(this.deleteCodes instanceof Array)){this.deleteCodes=[this.deleteCodes];}
-var control=this;var selectOptions={geometryTypes:this.geometryTypes,clickout:this.clickout,toggle:this.toggle,onBeforeSelect:this.beforeSelectFeature,onSelect:this.selectFeature,onUnselect:this.unselectFeature,scope:this};if(this.standalone===false){this.selectControl=new OpenLayers.Control.SelectFeature(layer,selectOptions);}
-var dragOptions={geometryTypes:["OpenLayers.Geometry.Point"],snappingOptions:this.snappingOptions,onStart:function(feature,pixel){control.dragStart.apply(control,[feature,pixel]);},onDrag:function(feature,pixel){control.dragVertex.apply(control,[feature,pixel]);},onComplete:function(feature){control.dragComplete.apply(control,[feature]);},featureCallbacks:{over:function(feature){if(control.standalone!==true||feature._sketch||control.feature===feature){control.dragControl.overFeature.apply(control.dragControl,[feature]);}}}};this.dragControl=new OpenLayers.Control.DragFeature(layer,dragOptions);var keyboardOptions={keydown:this.handleKeypress};this.handlers={keyboard:new OpenLayers.Handler.Keyboard(this,keyboardOptions)};},destroy:function(){this.layer=null;this.standalone||this.selectControl.destroy();this.dragControl.destroy();OpenLayers.Control.prototype.destroy.apply(this,[]);},activate:function(){return((this.standalone||this.selectControl.activate())&&this.handlers.keyboard.activate()&&OpenLayers.Control.prototype.activate.apply(this,arguments));},deactivate:function(){var deactivated=false;if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.layer.removeFeatures(this.vertices,{silent:true});this.layer.removeFeatures(this.virtualVertices,{silent:true});this.vertices=[];this.dragControl.deactivate();var feature=this.feature;var valid=feature&&feature.geometry&&feature.layer;if(this.standalone===false){if(valid){this.selectControl.unselect.apply(this.selectControl,[feature]);}
-this.selectControl.deactivate();}else{if(valid){this.unselectFeature(feature);}}
-this.handlers.keyboard.deactivate();deactivated=true;}
-return deactivated;},beforeSelectFeature:function(feature){return this.layer.events.triggerEvent("beforefeaturemodified",{feature:feature});},selectFeature:function(feature){this.feature=feature;this.modified=false;this.resetVertices();this.dragControl.activate();this.onModificationStart(this.feature);},unselectFeature:function(feature){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[];this.layer.destroyFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[];if(this.dragHandle){this.layer.destroyFeatures([this.dragHandle],{silent:true});delete this.dragHandle;}
-if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});delete this.radiusHandle;}
-this.feature=null;this.dragControl.deactivate();this.onModificationEnd(feature);this.layer.events.triggerEvent("afterfeaturemodified",{feature:feature,modified:this.modified});this.modified=false;},dragStart:function(feature,pixel){if(feature!=this.feature&&!feature.geometry.parent&&feature!=this.dragHandle&&feature!=this.radiusHandle){if(this.standalone===false&&this.feature){this.selectControl.clickFeature.apply(this.selectControl,[this.feature]);}
-if(this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,feature.geometry.CLASS_NAME)!=-1){this.standalone||this.selectControl.clickFeature.apply(this.selectControl,[feature]);this.dragControl.overFeature.apply(this.dragControl,[feature]);this.dragControl.lastPixel=pixel;this.dragControl.handlers.drag.started=true;this.dragControl.handlers.drag.start=pixel;this.dragControl.handlers.drag.last=pixel;}}},dragVertex:function(vertex,pixel){this.modified=true;if(this.feature.geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){if(this.feature!=vertex){this.feature=vertex;}
-this.layer.events.triggerEvent("vertexmodified",{vertex:vertex.geometry,feature:this.feature,pixel:pixel});}else{if(vertex._index){vertex.geometry.parent.addComponent(vertex.geometry,vertex._index);delete vertex._index;OpenLayers.Util.removeItem(this.virtualVertices,vertex);this.vertices.push(vertex);}else if(vertex==this.dragHandle){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[];if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});this.radiusHandle=null;}}else if(vertex!==this.radiusHandle){this.layer.events.triggerEvent("vertexmodified",{vertex:vertex.geometry,feature:this.feature,pixel:pixel});}
-if(this.virtualVertices.length>0){this.layer.destroyFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[];}
-this.layer.drawFeature(this.feature,this.standalone?undefined:this.selectControl.renderIntent);}
-this.layer.drawFeature(vertex);},dragComplete:function(vertex){this.resetVertices();this.setFeatureState();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature});},setFeatureState:function(){if(this.feature.state!=OpenLayers.State.INSERT&&this.feature.state!=OpenLayers.State.DELETE){this.feature.state=OpenLayers.State.UPDATE;}},resetVertices:function(){if(this.dragControl.feature){this.dragControl.outFeature(this.dragControl.feature);}
-if(this.vertices.length>0){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[];}
-if(this.virtualVertices.length>0){this.layer.removeFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[];}
-if(this.dragHandle){this.layer.destroyFeatures([this.dragHandle],{silent:true});this.dragHandle=null;}
-if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});this.radiusHandle=null;}
-if(this.feature&&this.feature.geometry.CLASS_NAME!="OpenLayers.Geometry.Point"){if((this.mode&OpenLayers.Control.ModifyFeature.DRAG)){this.collectDragHandle();}
-if((this.mode&(OpenLayers.Control.ModifyFeature.ROTATE|OpenLayers.Control.ModifyFeature.RESIZE))){this.collectRadiusHandle();}
-if(this.mode&OpenLayers.Control.ModifyFeature.RESHAPE){if(!(this.mode&OpenLayers.Control.ModifyFeature.RESIZE)){this.collectVertices();}}}},handleKeypress:function(evt){var code=evt.keyCode;if(this.feature&&OpenLayers.Util.indexOf(this.deleteCodes,code)!=-1){var vertex=this.dragControl.feature;if(vertex&&OpenLayers.Util.indexOf(this.vertices,vertex)!=-1&&!this.dragControl.handlers.drag.dragging&&vertex.geometry.parent){vertex.geometry.parent.removeComponent(vertex.geometry);this.layer.drawFeature(this.feature,this.standalone?undefined:this.selectControl.renderIntent);this.resetVertices();this.setFeatureState();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature});}}},collectVertices:function(){this.vertices=[];this.virtualVertices=[];var control=this;function collectComponentVertices(geometry){var i,vertex,component,len;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){vertex=new OpenLayers.Feature.Vector(geometry);vertex._sketch=true;control.vertices.push(vertex);}else{var numVert=geometry.components.length;if(geometry.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){numVert-=1;}
-for(i=0;i<numVert;++i){component=geometry.components[i];if(component.CLASS_NAME=="OpenLayers.Geometry.Point"){vertex=new OpenLayers.Feature.Vector(component);vertex._sketch=true;control.vertices.push(vertex);}else{collectComponentVertices(component);}}
-if(geometry.CLASS_NAME!="OpenLayers.Geometry.MultiPoint"){for(i=0,len=geometry.components.length;i<len-1;++i){var prevVertex=geometry.components[i];var nextVertex=geometry.components[i+1];if(prevVertex.CLASS_NAME=="OpenLayers.Geometry.Point"&&nextVertex.CLASS_NAME=="OpenLayers.Geometry.Point"){var x=(prevVertex.x+nextVertex.x)/2;var y=(prevVertex.y+nextVertex.y)/2;var point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(x,y),null,control.virtualStyle);point.geometry.parent=geometry;point._index=i+1;point._sketch=true;control.virtualVertices.push(point);}}}}}
-collectComponentVertices.call(this,this.feature.geometry);this.layer.addFeatures(this.virtualVertices,{silent:true});this.layer.addFeatures(this.vertices,{silent:true});},collectDragHandle:function(){var geometry=this.feature.geometry;var center=geometry.getBounds().getCenterLonLat();var originGeometry=new OpenLayers.Geometry.Point(center.lon,center.lat);var origin=new OpenLayers.Feature.Vector(originGeometry);originGeometry.move=function(x,y){OpenLayers.Geometry.Point.prototype.move.call(this,x,y);geometry.move(x,y);};origin._sketch=true;this.dragHandle=origin;this.layer.addFeatures([this.dragHandle],{silent:true});},collectRadiusHandle:function(){var geometry=this.feature.geometry;var bounds=geometry.getBounds();var center=bounds.getCenterLonLat();var originGeometry=new OpenLayers.Geometry.Point(center.lon,center.lat);var radiusGeometry=new OpenLayers.Geometry.Point(bounds.right,bounds.bottom);var radius=new OpenLayers.Feature.Vector(radiusGeometry);var resize=(this.mode&OpenLayers.Control.ModifyFeature.RESIZE);var reshape=(this.mode&OpenLayers.Control.ModifyFeature.RESHAPE);var rotate=(this.mode&OpenLayers.Control.ModifyFeature.ROTATE);radiusGeometry.move=function(x,y){OpenLayers.Geometry.Point.prototype.move.call(this,x,y);var dx1=this.x-originGeometry.x;var dy1=this.y-originGeometry.y;var dx0=dx1-x;var dy0=dy1-y;if(rotate){var a0=Math.atan2(dy0,dx0);var a1=Math.atan2(dy1,dx1);var angle=a1-a0;angle*=180/Math.PI;geometry.rotate(angle,originGeometry);}
-if(resize){var scale,ratio;if(reshape){scale=dy1/dy0;ratio=(dx1/dx0)/scale;}else{var l0=Math.sqrt((dx0*dx0)+(dy0*dy0));var l1=Math.sqrt((dx1*dx1)+(dy1*dy1));scale=l1/l0;}
-geometry.resize(scale,originGeometry,ratio);}};radius._sketch=true;this.radiusHandle=radius;this.layer.addFeatures([this.radiusHandle],{silent:true});},setMap:function(map){this.standalone||this.selectControl.setMap(map);this.dragControl.setMap(map);OpenLayers.Control.prototype.setMap.apply(this,arguments);},CLASS_NAME:"OpenLayers.Control.ModifyFeature"});OpenLayers.Control.ModifyFeature.RESHAPE=1;OpenLayers.Control.ModifyFeature.RESIZE=2;OpenLayers.Control.ModifyFeature.ROTATE=4;OpenLayers.Control.ModifyFeature.DRAG=8;OpenLayers.Geometry.LineString=OpenLayers.Class(OpenLayers.Geometry.Curve,{initialize:function(points){OpenLayers.Geometry.Curve.prototype.initialize.apply(this,arguments);},removeComponent:function(point){if(this.components&&(this.components.length>2)){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);}},intersects:function(geometry){var intersect=false;var type=geometry.CLASS_NAME;if(type=="OpenLayers.Geometry.LineString"||type=="OpenLayers.Geometry.LinearRing"||type=="OpenLayers.Geometry.Point"){var segs1=this.getSortedSegments();var segs2;if(type=="OpenLayers.Geometry.Point"){segs2=[{x1:geometry.x,y1:geometry.y,x2:geometry.x,y2:geometry.y}];}else{segs2=geometry.getSortedSegments();}
-var seg1,seg1x1,seg1x2,seg1y1,seg1y2,seg2,seg2y1,seg2y2;outer:for(var i=0,len=segs1.length;i<len;++i){seg1=segs1[i];seg1x1=seg1.x1;seg1x2=seg1.x2;seg1y1=seg1.y1;seg1y2=seg1.y2;inner:for(var j=0,jlen=segs2.length;j<jlen;++j){seg2=segs2[j];if(seg2.x1>seg1x2){break;}
-if(seg2.x2<seg1x1){continue;}
-seg2y1=seg2.y1;seg2y2=seg2.y2;if(Math.min(seg2y1,seg2y2)>Math.max(seg1y1,seg1y2)){continue;}
-if(Math.max(seg2y1,seg2y2)<Math.min(seg1y1,seg1y2)){continue;}
-if(OpenLayers.Geometry.segmentsIntersect(seg1,seg2)){intersect=true;break outer;}}}}else{intersect=geometry.intersects(this);}
-return intersect;},getSortedSegments:function(){var numSeg=this.components.length-1;var segments=new Array(numSeg),point1,point2;for(var i=0;i<numSeg;++i){point1=this.components[i];point2=this.components[i+1];if(point1.x<point2.x){segments[i]={x1:point1.x,y1:point1.y,x2:point2.x,y2:point2.y};}else{segments[i]={x1:point2.x,y1:point2.y,x2:point1.x,y2:point1.y};}}
-function byX1(seg1,seg2){return seg1.x1-seg2.x1;}
-return segments.sort(byX1);},splitWithSegment:function(seg,options){var edge=!(options&&options.edge===false);var tolerance=options&&options.tolerance;var lines=[];var verts=this.getVertices();var points=[];var intersections=[];var split=false;var vert1,vert2,point;var node,vertex,target;var interOptions={point:true,tolerance:tolerance};var result=null;for(var i=0,stop=verts.length-2;i<=stop;++i){vert1=verts[i];points.push(vert1.clone());vert2=verts[i+1];target={x1:vert1.x,y1:vert1.y,x2:vert2.x,y2:vert2.y};point=OpenLayers.Geometry.segmentsIntersect(seg,target,interOptions);if(point instanceof OpenLayers.Geometry.Point){if((point.x===seg.x1&&point.y===seg.y1)||(point.x===seg.x2&&point.y===seg.y2)||point.equals(vert1)||point.equals(vert2)){vertex=true;}else{vertex=false;}
-if(vertex||edge){if(!point.equals(intersections[intersections.length-1])){intersections.push(point.clone());}
-if(i===0){if(point.equals(vert1)){continue;}}
-if(point.equals(vert2)){continue;}
-split=true;if(!point.equals(vert1)){points.push(point);}
-lines.push(new OpenLayers.Geometry.LineString(points));points=[point.clone()];}}}
-if(split){points.push(vert2.clone());lines.push(new OpenLayers.Geometry.LineString(points));}
-if(intersections.length>0){var xDir=seg.x1<seg.x2?1:-1;var yDir=seg.y1<seg.y2?1:-1;result={lines:lines,points:intersections.sort(function(p1,p2){return(xDir*p1.x-xDir*p2.x)||(yDir*p1.y-yDir*p2.y);})};}
-return result;},split:function(target,options){var results=null;var mutual=options&&options.mutual;var sourceSplit,targetSplit,sourceParts,targetParts;if(target instanceof OpenLayers.Geometry.LineString){var verts=this.getVertices();var vert1,vert2,seg,splits,lines,point;var points=[];sourceParts=[];for(var i=0,stop=verts.length-2;i<=stop;++i){vert1=verts[i];vert2=verts[i+1];seg={x1:vert1.x,y1:vert1.y,x2:vert2.x,y2:vert2.y};targetParts=targetParts||[target];if(mutual){points.push(vert1.clone());}
-for(var j=0;j<targetParts.length;++j){splits=targetParts[j].splitWithSegment(seg,options);if(splits){lines=splits.lines;if(lines.length>0){lines.unshift(j,1);Array.prototype.splice.apply(targetParts,lines);j+=lines.length-2;}
-if(mutual){for(var k=0,len=splits.points.length;k<len;++k){point=splits.points[k];if(!point.equals(vert1)){points.push(point);sourceParts.push(new OpenLayers.Geometry.LineString(points));if(point.equals(vert2)){points=[];}else{points=[point.clone()];}}}}}}}
-if(mutual&&sourceParts.length>0&&points.length>0){points.push(vert2.clone());sourceParts.push(new OpenLayers.Geometry.LineString(points));}}else{results=target.splitWith(this,options);}
-if(targetParts&&targetParts.length>1){targetSplit=true;}else{targetParts=[];}
-if(sourceParts&&sourceParts.length>1){sourceSplit=true;}else{sourceParts=[];}
-if(targetSplit||sourceSplit){if(mutual){results=[sourceParts,targetParts];}else{results=targetParts;}}
-return results;},splitWith:function(geometry,options){return geometry.split(this,options);},getVertices:function(nodes){var vertices;if(nodes===true){vertices=[this.components[0],this.components[this.components.length-1]];}else if(nodes===false){vertices=this.components.slice(1,this.components.length-1);}else{vertices=this.components.slice();}
-return vertices;},distanceTo:function(geometry,options){var edge=!(options&&options.edge===false);var details=edge&&options&&options.details;var result,best={};var min=Number.POSITIVE_INFINITY;if(geometry instanceof OpenLayers.Geometry.Point){var segs=this.getSortedSegments();var x=geometry.x;var y=geometry.y;var seg;for(var i=0,len=segs.length;i<len;++i){seg=segs[i];result=OpenLayers.Geometry.distanceToSegment(geometry,seg);if(result.distance<min){min=result.distance;best=result;if(min===0){break;}}else{if(seg.x2>x&&((y>seg.y1&&y<seg.y2)||(y<seg.y1&&y>seg.y2))){break;}}}
-if(details){best={distance:best.distance,x0:best.x,y0:best.y,x1:x,y1:y};}else{best=best.distance;}}else if(geometry instanceof OpenLayers.Geometry.LineString){var segs0=this.getSortedSegments();var segs1=geometry.getSortedSegments();var seg0,seg1,intersection,x0,y0;var len1=segs1.length;var interOptions={point:true};outer:for(var i=0,len=segs0.length;i<len;++i){seg0=segs0[i];x0=seg0.x1;y0=seg0.y1;for(var j=0;j<len1;++j){seg1=segs1[j];intersection=OpenLayers.Geometry.segmentsIntersect(seg0,seg1,interOptions);if(intersection){min=0;best={distance:0,x0:intersection.x,y0:intersection.y,x1:intersection.x,y1:intersection.y};break outer;}else{result=OpenLayers.Geometry.distanceToSegment({x:x0,y:y0},seg1);if(result.distance<min){min=result.distance;best={distance:min,x0:x0,y0:y0,x1:result.x,y1:result.y};}}}}
-if(!details){best=best.distance;}
-if(min!==0){if(seg0){result=geometry.distanceTo(new OpenLayers.Geometry.Point(seg0.x2,seg0.y2),options);var dist=details?result.distance:result;if(dist<min){if(details){best={distance:min,x0:result.x1,y0:result.y1,x1:result.x0,y1:result.y0};}else{best=dist;}}}}}else{best=geometry.distanceTo(this,options);if(details){best={distance:best.distance,x0:best.x1,y0:best.y1,x1:best.x0,y1:best.y0};}}
-return best;},CLASS_NAME:"OpenLayers.Geometry.LineString"});OpenLayers.Control.TransformFeature=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforesetfeature","setfeature","beforetransform","transform","transformcomplete"],geometryTypes:null,layer:null,preserveAspectRatio:false,rotate:true,feature:null,renderIntent:"temporary",rotationHandleSymbolizer:null,box:null,center:null,scale:1,ratio:1,rotation:0,handles:null,rotationHandles:null,dragControl:null,initialize:function(layer,options){this.EVENT_TYPES=OpenLayers.Control.TransformFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[options]);this.layer=layer;if(!this.rotationHandleSymbolizer){this.rotationHandleSymbolizer={stroke:false,pointRadius:10,fillOpacity:0,cursor:"pointer"};}
-this.createBox();this.createControl();},activate:function(){var activated=false;if(OpenLayers.Control.prototype.activate.apply(this,arguments)){this.dragControl.activate();this.layer.addFeatures([this.box]);this.rotate&&this.layer.addFeatures(this.rotationHandles);this.layer.addFeatures(this.handles);activated=true;}
-return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.layer.removeFeatures(this.handles);this.rotate&&this.layer.removeFeatures(this.rotationHandles);this.layer.removeFeatures([this.box]);this.dragControl.deactivate();deactivated=true;}
-return deactivated;},setMap:function(map){this.dragControl.setMap(map);OpenLayers.Control.prototype.setMap.apply(this,arguments);},setFeature:function(feature,initialParams){initialParams=OpenLayers.Util.applyDefaults(initialParams,{rotation:0,scale:1,ratio:1});var evt={feature:feature};var oldRotation=this.rotation;var oldCenter=this.center;OpenLayers.Util.extend(this,initialParams);if(this.events.triggerEvent("beforesetfeature",evt)===false){return;}
-this.feature=feature;this.activate();this._setfeature=true;var featureBounds=this.feature.geometry.getBounds();this.box.move(featureBounds.getCenterLonLat());this.box.geometry.rotate(-oldRotation,oldCenter);this._angle=0;var ll;if(this.rotation){var geom=feature.geometry.clone();geom.rotate(-this.rotation,this.center);var box=new OpenLayers.Feature.Vector(geom.getBounds().toGeometry());box.geometry.rotate(this.rotation,this.center);this.box.geometry.rotate(this.rotation,this.center);this.box.move(box.geometry.getBounds().getCenterLonLat());var llGeom=box.geometry.components[0].components[0];ll=llGeom.getBounds().getCenterLonLat();}else{ll=new OpenLayers.LonLat(featureBounds.left,featureBounds.bottom);}
-this.handles[0].move(ll);delete this._setfeature;this.events.triggerEvent("setfeature",evt);},createBox:function(){var control=this;this.center=new OpenLayers.Geometry.Point(0,0);var box=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString([new OpenLayers.Geometry.Point(-1,-1),new OpenLayers.Geometry.Point(0,-1),new OpenLayers.Geometry.Point(1,-1),new OpenLayers.Geometry.Point(1,0),new OpenLayers.Geometry.Point(1,1),new OpenLayers.Geometry.Point(0,1),new OpenLayers.Geometry.Point(-1,1),new OpenLayers.Geometry.Point(-1,0),new OpenLayers.Geometry.Point(-1,-1)]),null,typeof this.renderIntent=="string"?null:this.renderIntent);box.geometry.move=function(x,y){control._moving=true;OpenLayers.Geometry.LineString.prototype.move.apply(this,arguments);control.center.move(x,y);delete control._moving;};var vertexMoveFn=function(x,y){OpenLayers.Geometry.Point.prototype.move.apply(this,arguments);this._rotationHandle&&this._rotationHandle.geometry.move(x,y);this._handle.geometry.move(x,y);};var vertexResizeFn=function(scale,center,ratio){OpenLayers.Geometry.Point.prototype.resize.apply(this,arguments);this._rotationHandle&&this._rotationHandle.geometry.resize(scale,center,ratio);this._handle.geometry.resize(scale,center,ratio);};var vertexRotateFn=function(angle,center){OpenLayers.Geometry.Point.prototype.rotate.apply(this,arguments);this._rotationHandle&&this._rotationHandle.geometry.rotate(angle,center);this._handle.geometry.rotate(angle,center);};var handleMoveFn=function(x,y){var oldX=this.x,oldY=this.y;OpenLayers.Geometry.Point.prototype.move.call(this,x,y);if(control._moving){return;}
-var evt=control.dragControl.handlers.drag.evt;var preserveAspectRatio=!control._setfeature&&control.preserveAspectRatio;var reshape=!preserveAspectRatio&&!(evt&&evt.shiftKey);var oldGeom=new OpenLayers.Geometry.Point(oldX,oldY);var centerGeometry=control.center;this.rotate(-control.rotation,centerGeometry);oldGeom.rotate(-control.rotation,centerGeometry);var dx1=this.x-centerGeometry.x;var dy1=this.y-centerGeometry.y;var dx0=dx1-(this.x-oldGeom.x);var dy0=dy1-(this.y-oldGeom.y);this.x=oldX;this.y=oldY;var scale,ratio=1;if(reshape){scale=Math.abs(dy0)<0.00001?1:dy1/dy0;ratio=(Math.abs(dx0)<0.00001?1:(dx1/dx0))/scale;}else{var l0=Math.sqrt((dx0*dx0)+(dy0*dy0));var l1=Math.sqrt((dx1*dx1)+(dy1*dy1));scale=l1/l0;}
-control._moving=true;control.box.geometry.rotate(-control.rotation,centerGeometry);delete control._moving;control.box.geometry.resize(scale,centerGeometry,ratio);control.box.geometry.rotate(control.rotation,centerGeometry);control.transformFeature({scale:scale,ratio:ratio});};var rotationHandleMoveFn=function(x,y){var oldX=this.x,oldY=this.y;OpenLayers.Geometry.Point.prototype.move.call(this,x,y);if(control._moving){return;}
-var evt=control.dragControl.handlers.drag.evt;var constrain=(evt&&evt.shiftKey)?45:1;var centerGeometry=control.center;var dx1=this.x-centerGeometry.x;var dy1=this.y-centerGeometry.y;var dx0=dx1-x;var dy0=dy1-y;this.x=oldX;this.y=oldY;var a0=Math.atan2(dy0,dx0);var a1=Math.atan2(dy1,dx1);var angle=a1-a0;angle*=180/Math.PI;control._angle=(control._angle+angle)%360;var diff=control.rotation%constrain;if(Math.abs(control._angle)>=constrain||diff!==0){angle=Math.round(control._angle/constrain)*constrain-
-diff;control._angle=0;control.box.geometry.rotate(angle,centerGeometry);control.transformFeature({rotation:angle});}};var handles=new Array(8);var rotationHandles=new Array(4);var geom,handle,rotationHandle;for(var i=0;i<8;++i){geom=box.geometry.components[i];handle=new OpenLayers.Feature.Vector(geom.clone(),null,typeof this.renderIntent=="string"?null:this.renderIntent);if(i%2==0){rotationHandle=new OpenLayers.Feature.Vector(geom.clone(),null,typeof this.rotationHandleSymbolizer=="string"?null:this.rotationHandleSymbolizer);rotationHandle.geometry.move=rotationHandleMoveFn;geom._rotationHandle=rotationHandle;rotationHandles[i/2]=rotationHandle;}
-geom.move=vertexMoveFn;geom.resize=vertexResizeFn;geom.rotate=vertexRotateFn;handle.geometry.move=handleMoveFn;geom._handle=handle;handles[i]=handle;}
-this.box=box;this.rotationHandles=rotationHandles;this.handles=handles;},createControl:function(){var control=this;this.dragControl=new OpenLayers.Control.DragFeature(this.layer,{documentDrag:true,moveFeature:function(pixel){if(this.feature===control.feature){this.feature=control.box;}
-OpenLayers.Control.DragFeature.prototype.moveFeature.apply(this,arguments);},onDrag:function(feature,pixel){if(feature===control.box){control.transformFeature({center:control.center});control.drawHandles();}},onStart:function(feature,pixel){var eligible=!control.geometryTypes||OpenLayers.Util.indexOf(control.geometryTypes,feature.geometry.CLASS_NAME)!==-1;var i=OpenLayers.Util.indexOf(control.handles,feature);i+=OpenLayers.Util.indexOf(control.rotationHandles,feature);if(feature!==control.feature&&feature!==control.box&&i==-2&&eligible){control.setFeature(feature);}},onComplete:function(feature,pixel){control.events.triggerEvent("transformcomplete",{feature:control.feature});}});},drawHandles:function(){var layer=this.layer;for(var i=0;i<8;++i){if(this.rotate&&i%2===0){layer.drawFeature(this.rotationHandles[i/2],this.rotationHandleSymbolizer);}
-layer.drawFeature(this.handles[i],this.renderIntent);}},transformFeature:function(mods){if(!this._setfeature){this.scale*=(mods.scale||1);this.ratio*=(mods.ratio||1);var oldRotation=this.rotation;this.rotation=(this.rotation+(mods.rotation||0))%360;if(this.events.triggerEvent("beforetransform",mods)!==false){var feature=this.feature;var geom=feature.geometry;var center=this.center;geom.rotate(-oldRotation,center);if(mods.scale||mods.ratio){geom.resize(mods.scale,center,mods.ratio);}else if(mods.center){feature.move(mods.center.getBounds().getCenterLonLat());}
-geom.rotate(this.rotation,center);this.layer.drawFeature(feature);feature.toState(OpenLayers.State.UPDATE);this.events.triggerEvent("transform",mods);}}
-this.layer.drawFeature(this.box,this.renderIntent);this.drawHandles();},destroy:function(){var geom;for(var i=0;i<8;++i){geom=this.box.geometry.components[i];geom._handle.destroy();geom._handle=null;geom._rotationHandle&&geom._rotationHandle.destroy();geom._rotationHandle=null;}
-this.box.destroy();this.box=null;this.layer=null;this.dragControl.destroy();OpenLayers.Control.prototype.destroy.apply(this,arguments);},CLASS_NAME:"OpenLayers.Control.TransformFeature"});OpenLayers.Format.GPX=OpenLayers.Class(OpenLayers.Format.XML,{extractWaypoints:true,extractTracks:true,extractRoutes:true,extractAttributes:true,initialize:function(options){this.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(doc){if(typeof doc=="string"){doc=OpenLayers.Format.XML.prototype.read.apply(this,[doc]);}
-var features=[];if(this.extractTracks){var tracks=doc.getElementsByTagName("trk");for(var i=0,len=tracks.length;i<len;i++){var attrs={};if(this.extractAttributes){attrs=this.parseAttributes(tracks[i]);}
-var segs=this.getElementsByTagNameNS(tracks[i],tracks[i].namespaceURI,"trkseg");for(var j=0,seglen=segs.length;j<seglen;j++){var track=this.extractSegment(segs[j],"trkpt");features.push(new OpenLayers.Feature.Vector(track,attrs));}}}
-if(this.extractRoutes){var routes=doc.getElementsByTagName("rte");for(var k=0,klen=routes.length;k<klen;k++){var attrs={};if(this.extractAttributes){attrs=this.parseAttributes(routes[k]);}
-var route=this.extractSegment(routes[k],"rtept");features.push(new OpenLayers.Feature.Vector(route,attrs));}}
-if(this.extractWaypoints){var waypoints=doc.getElementsByTagName("wpt");for(var l=0,len=waypoints.length;l<len;l++){var attrs={};if(this.extractAttributes){attrs=this.parseAttributes(waypoints[l]);}
-var wpt=new OpenLayers.Geometry.Point(waypoints[l].getAttribute("lon"),waypoints[l].getAttribute("lat"));features.push(new OpenLayers.Feature.Vector(wpt,attrs));}}
-if(this.internalProjection&&this.externalProjection){for(var g=0,featLength=features.length;g<featLength;g++){features[g].geometry.transform(this.externalProjection,this.internalProjection);}}
-return features;},extractSegment:function(segment,segmentType){var points=this.getElementsByTagNameNS(segment,segment.namespaceURI,segmentType);var point_features=[];for(var i=0,len=points.length;i<len;i++){point_features.push(new OpenLayers.Geometry.Point(points[i].getAttribute("lon"),points[i].getAttribute("lat")));}
-return new OpenLayers.Geometry.LineString(point_features);},parseAttributes:function(node){var attributes={};var attrNode=node.firstChild;while(attrNode){if(attrNode.nodeType==1){var value=attrNode.firstChild;if(value.nodeType==3||value.nodeType==4){name=(attrNode.prefix)?attrNode.nodeName.split(":")[1]:attrNode.nodeName;if(name!="trkseg"&&name!="rtept"){attributes[name]=value.nodeValue;}}}
-attrNode=attrNode.nextSibling;}
-return attributes;},CLASS_NAME:"OpenLayers.Format.GPX"});OpenLayers.Geometry.LinearRing=OpenLayers.Class(OpenLayers.Geometry.LineString,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(points){OpenLayers.Geometry.LineString.prototype.initialize.apply(this,arguments);},addComponent:function(point,index){var added=false;var lastPoint=this.components.pop();if(index!=null||!point.equals(lastPoint)){added=OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,arguments);}
-var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint]);return added;},removeComponent:function(point){if(this.components.length>4){this.components.pop();OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint]);}},move:function(x,y){for(var i=0,len=this.components.length;i<len-1;i++){this.components[i].move(x,y);}},rotate:function(angle,origin){for(var i=0,len=this.components.length;i<len-1;++i){this.components[i].rotate(angle,origin);}},resize:function(scale,origin,ratio){for(var i=0,len=this.components.length;i<len-1;++i){this.components[i].resize(scale,origin,ratio);}
-return this;},transform:function(source,dest){if(source&&dest){for(var i=0,len=this.components.length;i<len-1;i++){var component=this.components[i];component.transform(source,dest);}
-this.bounds=null;}
-return this;},getCentroid:function(){if(this.components&&(this.components.length>2)){var sumX=0.0;var sumY=0.0;for(var i=0;i<this.components.length-1;i++){var b=this.components[i];var c=this.components[i+1];sumX+=(b.x+c.x)*(b.x*c.y-c.x*b.y);sumY+=(b.y+c.y)*(b.x*c.y-c.x*b.y);}
-var area=-1*this.getArea();var x=sumX/(6*area);var y=sumY/(6*area);return new OpenLayers.Geometry.Point(x,y);}else{return null;}},getArea:function(){var area=0.0;if(this.components&&(this.components.length>2)){var sum=0.0;for(var i=0,len=this.components.length;i<len-1;i++){var b=this.components[i];var c=this.components[i+1];sum+=(b.x+c.x)*(c.y-b.y);}
-area=-sum/2.0;}
-return area;},getGeodesicArea:function(projection){var ring=this;if(projection){var gg=new OpenLayers.Projection("EPSG:4326");if(!gg.equals(projection)){ring=this.clone().transform(projection,gg);}}
-var area=0.0;var len=ring.components&&ring.components.length;if(len>2){var p1,p2;for(var i=0;i<len-1;i++){p1=ring.components[i];p2=ring.components[i+1];area+=OpenLayers.Util.rad(p2.x-p1.x)*(2+Math.sin(OpenLayers.Util.rad(p1.y))+
-Math.sin(OpenLayers.Util.rad(p2.y)));}
-area=area*6378137.0*6378137.0/2.0;}
-return area;},containsPoint:function(point){var approx=OpenLayers.Number.limitSigDigs;var digs=14;var px=approx(point.x,digs);var py=approx(point.y,digs);function getX(y,x1,y1,x2,y2){return(((x1-x2)*y)+((x2*y1)-(x1*y2)))/(y1-y2);}
-var numSeg=this.components.length-1;var start,end,x1,y1,x2,y2,cx,cy;var crosses=0;for(var i=0;i<numSeg;++i){start=this.components[i];x1=approx(start.x,digs);y1=approx(start.y,digs);end=this.components[i+1];x2=approx(end.x,digs);y2=approx(end.y,digs);if(y1==y2){if(py==y1){if(x1<=x2&&(px>=x1&&px<=x2)||x1>=x2&&(px<=x1&&px>=x2)){crosses=-1;break;}}
-continue;}
-cx=approx(getX(py,x1,y1,x2,y2),digs);if(cx==px){if(y1<y2&&(py>=y1&&py<=y2)||y1>y2&&(py<=y1&&py>=y2)){crosses=-1;break;}}
-if(cx<=px){continue;}
-if(x1!=x2&&(cx<Math.min(x1,x2)||cx>Math.max(x1,x2))){continue;}
-if(y1<y2&&(py>=y1&&py<y2)||y1>y2&&(py<y1&&py>=y2)){++crosses;}}
-var contained=(crosses==-1)?1:!!(crosses&1);return contained;},intersects:function(geometry){var intersect=false;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){intersect=this.containsPoint(geometry);}else if(geometry.CLASS_NAME=="OpenLayers.Geometry.LineString"){intersect=geometry.intersects(this);}else if(geometry.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){intersect=OpenLayers.Geometry.LineString.prototype.intersects.apply(this,[geometry]);}else{for(var i=0,len=geometry.components.length;i<len;++i){intersect=geometry.components[i].intersects(this);if(intersect){break;}}}
-return intersect;},getVertices:function(nodes){return(nodes===true)?[]:this.components.slice(0,this.components.length-1);},CLASS_NAME:"OpenLayers.Geometry.LinearRing"});OpenLayers.Geometry.MultiLineString=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LineString"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},split:function(geometry,options){var results=null;var mutual=options&&options.mutual;var splits,sourceLine,sourceLines,sourceSplit,targetSplit;var sourceParts=[];var targetParts=[geometry];for(var i=0,len=this.components.length;i<len;++i){sourceLine=this.components[i];sourceSplit=false;for(var j=0;j<targetParts.length;++j){splits=sourceLine.split(targetParts[j],options);if(splits){if(mutual){sourceLines=splits[0];for(var k=0,klen=sourceLines.length;k<klen;++k){if(k===0&&sourceParts.length){sourceParts[sourceParts.length-1].addComponent(sourceLines[k]);}else{sourceParts.push(new OpenLayers.Geometry.MultiLineString([sourceLines[k]]));}}
-sourceSplit=true;splits=splits[1];}
-if(splits.length){splits.unshift(j,1);Array.prototype.splice.apply(targetParts,splits);break;}}}
-if(!sourceSplit){if(sourceParts.length){sourceParts[sourceParts.length-1].addComponent(sourceLine.clone());}else{sourceParts=[new OpenLayers.Geometry.MultiLineString(sourceLine.clone())];}}}
-if(sourceParts&&sourceParts.length>1){sourceSplit=true;}else{sourceParts=[];}
-if(targetParts&&targetParts.length>1){targetSplit=true;}else{targetParts=[];}
-if(sourceSplit||targetSplit){if(mutual){results=[sourceParts,targetParts];}else{results=targetParts;}}
-return results;},splitWith:function(geometry,options){var results=null;var mutual=options&&options.mutual;var splits,targetLine,sourceLines,sourceSplit,targetSplit,sourceParts,targetParts;if(geometry instanceof OpenLayers.Geometry.LineString){targetParts=[];sourceParts=[geometry];for(var i=0,len=this.components.length;i<len;++i){targetSplit=false;targetLine=this.components[i];for(var j=0;j<sourceParts.length;++j){splits=sourceParts[j].split(targetLine,options);if(splits){if(mutual){sourceLines=splits[0];if(sourceLines.length){sourceLines.unshift(j,1);Array.prototype.splice.apply(sourceParts,sourceLines);j+=sourceLines.length-2;}
-splits=splits[1];if(splits.length===0){splits=[targetLine.clone()];}}
-for(var k=0,klen=splits.length;k<klen;++k){if(k===0&&targetParts.length){targetParts[targetParts.length-1].addComponent(splits[k]);}else{targetParts.push(new OpenLayers.Geometry.MultiLineString([splits[k]]));}}
-targetSplit=true;}}
-if(!targetSplit){if(targetParts.length){targetParts[targetParts.length-1].addComponent(targetLine.clone());}else{targetParts=[new OpenLayers.Geometry.MultiLineString([targetLine.clone()])];}}}}else{results=geometry.split(this);}
-if(sourceParts&&sourceParts.length>1){sourceSplit=true;}else{sourceParts=[];}
-if(targetParts&&targetParts.length>1){targetSplit=true;}else{targetParts=[];}
-if(sourceSplit||targetSplit){if(mutual){results=[sourceParts,targetParts];}else{results=targetParts;}}
-return results;},CLASS_NAME:"OpenLayers.Geometry.MultiLineString"});OpenLayers.Handler.Path=OpenLayers.Class(OpenLayers.Handler.Point,{line:null,freehand:false,freehandToggle:'shiftKey',initialize:function(control,callbacks,options){OpenLayers.Handler.Point.prototype.initialize.apply(this,arguments);},createFeature:function(pixel){var lonlat=this.control.map.getLonLatFromPixel(pixel);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat));this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString([this.point.geometry]));this.callback("create",[this.point.geometry,this.getSketch()]);this.point.geometry.clearBounds();this.layer.addFeatures([this.line,this.point],{silent:true});},destroyFeature:function(){OpenLayers.Handler.Point.prototype.destroyFeature.apply(this);this.line=null;},removePoint:function(){if(this.point){this.layer.removeFeatures([this.point]);}},addPoint:function(pixel){this.layer.removeFeatures([this.point]);var lonlat=this.control.map.getLonLatFromPixel(pixel);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat));this.line.geometry.addComponent(this.point.geometry,this.line.geometry.components.length);this.callback("point",[this.point.geometry,this.getGeometry()]);this.callback("modify",[this.point.geometry,this.getSketch()]);this.drawFeature();},freehandMode:function(evt){return(this.freehandToggle&&evt[this.freehandToggle])?!this.freehand:this.freehand;},modifyFeature:function(pixel){var lonlat=this.control.map.getLonLatFromPixel(pixel);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;this.callback("modify",[this.point.geometry,this.getSketch()]);this.point.geometry.clearBounds();this.drawFeature();},drawFeature:function(){this.layer.drawFeature(this.line,this.style);this.layer.drawFeature(this.point,this.style);},getSketch:function(){return this.line;},getGeometry:function(){var geometry=this.line&&this.line.geometry;if(geometry&&this.multi){geometry=new OpenLayers.Geometry.MultiLineString([geometry]);}
-return geometry;},mousedown:function(evt){if(this.lastDown&&this.lastDown.equals(evt.xy)){return false;}
-if(this.lastDown==null){if(this.persist){this.destroyFeature();}
-this.createFeature(evt.xy);}else if((this.lastUp==null)||!this.lastUp.equals(evt.xy)){this.addPoint(evt.xy);}
-this.mouseDown=true;this.lastDown=evt.xy;this.drawing=true;return false;},mousemove:function(evt){if(this.drawing){if(this.mouseDown&&this.freehandMode(evt)){this.addPoint(evt.xy);}else{this.modifyFeature(evt.xy);}}
-return true;},mouseup:function(evt){this.mouseDown=false;if(this.drawing){if(this.freehandMode(evt)){this.removePoint();this.finalize();}else{if(this.lastUp==null){this.addPoint(evt.xy);}
-this.lastUp=evt.xy;}
-return false;}
-return true;},dblclick:function(evt){if(!this.freehandMode(evt)){var index=this.line.geometry.components.length-1;this.line.geometry.removeComponent(this.line.geometry.components[index]);this.removePoint();this.finalize();}
-return false;},CLASS_NAME:"OpenLayers.Handler.Path"});OpenLayers.Control.Split=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforesplit","split","aftersplit"],layer:null,source:null,sourceOptions:null,tolerance:null,edge:true,deferDelete:false,mutual:true,targetFilter:null,sourceFilter:null,handler:null,initialize:function(options){Array.prototype.push.apply(this.EVENT_TYPES,OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[options]);this.options=options||{};if(this.options.source){this.setSource(this.options.source);}},setSource:function(layer){if(this.active){this.deactivate();if(this.handler){this.handler.destroy();delete this.handler;}
-this.source=layer;this.activate();}else{this.source=layer;}},activate:function(){var activated=OpenLayers.Control.prototype.activate.call(this);if(activated){if(!this.source){if(!this.handler){this.handler=new OpenLayers.Handler.Path(this,{done:function(geometry){this.onSketchComplete({feature:new OpenLayers.Feature.Vector(geometry)});}},{layerOptions:this.sourceOptions});}
-this.handler.activate();}else if(this.source.events){this.source.events.on({sketchcomplete:this.onSketchComplete,afterfeaturemodified:this.afterFeatureModified,scope:this});}}
-return activated;},deactivate:function(){var deactivated=OpenLayers.Control.prototype.deactivate.call(this);if(deactivated){if(this.source&&this.source.events){this.layer.events.un({sketchcomplete:this.onSketchComplete,afterfeaturemodified:this.afterFeatureModified,scope:this});}}
-return deactivated;},onSketchComplete:function(event){this.feature=null;return!this.considerSplit(event.feature);},afterFeatureModified:function(event){if(event.modified){var feature=event.feature;if(feature.geometry instanceof OpenLayers.Geometry.LineString||feature.geometry instanceof OpenLayers.Geometry.MultiLineString){this.feature=event.feature;this.considerSplit(event.feature);}}},removeByGeometry:function(features,geometry){for(var i=0,len=features.length;i<len;++i){if(features[i].geometry===geometry){features.splice(i,1);break;}}},isEligible:function(target){return(target.state!==OpenLayers.State.DELETE)&&(target.geometry instanceof OpenLayers.Geometry.LineString||target.geometry instanceof OpenLayers.Geometry.MultiLineString)&&(this.feature!==target)&&(!this.targetFilter||this.targetFilter.evaluate(target.attributes));},considerSplit:function(feature){var sourceSplit=false;var targetSplit=false;if(!this.sourceFilter||this.sourceFilter.evaluate(feature.attributes)){var features=this.layer&&this.layer.features||[];var target,results,proceed;var additions=[],removals=[];var mutual=(this.layer===this.source)&&this.mutual;var options={edge:this.edge,tolerance:this.tolerance,mutual:mutual};var sourceParts=[feature.geometry];var targetFeature,targetParts;var source,parts;for(var i=0,len=features.length;i<len;++i){targetFeature=features[i];if(this.isEligible(targetFeature)){targetParts=[targetFeature.geometry];for(var j=0;j<sourceParts.length;++j){source=sourceParts[j];for(var k=0;k<targetParts.length;++k){target=targetParts[k];if(source.getBounds().intersectsBounds(target.getBounds())){results=source.split(target,options);if(results){proceed=this.events.triggerEvent("beforesplit",{source:feature,target:targetFeature});if(proceed!==false){if(mutual){parts=results[0];if(parts.length>1){parts.unshift(j,1);Array.prototype.splice.apply(sourceParts,parts);j+=parts.length-3;}
-results=results[1];}
-if(results.length>1){results.unshift(k,1);Array.prototype.splice.apply(targetParts,results);k+=results.length-3;}}}}}}
-if(targetParts&&targetParts.length>1){this.geomsToFeatures(targetFeature,targetParts);this.events.triggerEvent("split",{original:targetFeature,features:targetParts});Array.prototype.push.apply(additions,targetParts);removals.push(targetFeature);targetSplit=true;}}}
-if(sourceParts&&sourceParts.length>1){this.geomsToFeatures(feature,sourceParts);this.events.triggerEvent("split",{original:feature,features:sourceParts});Array.prototype.push.apply(additions,sourceParts);removals.push(feature);sourceSplit=true;}
-if(sourceSplit||targetSplit){if(this.deferDelete){var feat,destroys=[];for(var i=0,len=removals.length;i<len;++i){feat=removals[i];if(feat.state===OpenLayers.State.INSERT){destroys.push(feat);}else{feat.state=OpenLayers.State.DELETE;this.layer.drawFeature(feat);}}
-this.layer.destroyFeatures(destroys,{silent:true});for(var i=0,len=additions.length;i<len;++i){additions[i].state=OpenLayers.State.INSERT;}}else{this.layer.destroyFeatures(removals,{silent:true});}
-this.layer.addFeatures(additions,{silent:true});this.events.triggerEvent("aftersplit",{source:feature,features:additions});}}
-return sourceSplit;},geomsToFeatures:function(feature,geoms){var clone=feature.clone();delete clone.geometry;var newFeature;for(var i=0,len=geoms.length;i<len;++i){newFeature=clone.clone();newFeature.geometry=geoms[i];newFeature.state=OpenLayers.State.INSERT;geoms[i]=newFeature;}},destroy:function(){if(this.active){this.deactivate();}
-OpenLayers.Control.prototype.destroy.call(this);},CLASS_NAME:"OpenLayers.Control.Split"});OpenLayers.Geometry.Polygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LinearRing"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},getArea:function(){var area=0.0;if(this.components&&(this.components.length>0)){area+=Math.abs(this.components[0].getArea());for(var i=1,len=this.components.length;i<len;i++){area-=Math.abs(this.components[i].getArea());}}
-return area;},getGeodesicArea:function(projection){var area=0.0;if(this.components&&(this.components.length>0)){area+=Math.abs(this.components[0].getGeodesicArea(projection));for(var i=1,len=this.components.length;i<len;i++){area-=Math.abs(this.components[i].getGeodesicArea(projection));}}
-return area;},containsPoint:function(point){var numRings=this.components.length;var contained=false;if(numRings>0){contained=this.components[0].containsPoint(point);if(contained!==1){if(contained&&numRings>1){var hole;for(var i=1;i<numRings;++i){hole=this.components[i].containsPoint(point);if(hole){if(hole===1){contained=1;}else{contained=false;}
-break;}}}}}
-return contained;},intersects:function(geometry){var intersect=false;var i,len;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){intersect=this.containsPoint(geometry);}else if(geometry.CLASS_NAME=="OpenLayers.Geometry.LineString"||geometry.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){for(i=0,len=this.components.length;i<len;++i){intersect=geometry.intersects(this.components[i]);if(intersect){break;}}
-if(!intersect){for(i=0,len=geometry.components.length;i<len;++i){intersect=this.containsPoint(geometry.components[i]);if(intersect){break;}}}}else{for(i=0,len=geometry.components.length;i<len;++i){intersect=this.intersects(geometry.components[i]);if(intersect){break;}}}
-if(!intersect&&geometry.CLASS_NAME=="OpenLayers.Geometry.Polygon"){var ring=this.components[0];for(i=0,len=ring.components.length;i<len;++i){intersect=geometry.containsPoint(ring.components[i]);if(intersect){break;}}}
-return intersect;},distanceTo:function(geometry,options){var edge=!(options&&options.edge===false);var result;if(!edge&&this.intersects(geometry)){result=0;}else{result=OpenLayers.Geometry.Collection.prototype.distanceTo.apply(this,[geometry,options]);}
-return result;},CLASS_NAME:"OpenLayers.Geometry.Polygon"});OpenLayers.Geometry.Polygon.createRegularPolygon=function(origin,radius,sides,rotation){var angle=Math.PI*((1/sides)-(1/2));if(rotation){angle+=(rotation/180)*Math.PI;}
-var rotatedAngle,x,y;var points=[];for(var i=0;i<sides;++i){rotatedAngle=angle+(i*2*Math.PI/sides);x=origin.x+(radius*Math.cos(rotatedAngle));y=origin.y+(radius*Math.sin(rotatedAngle));points.push(new OpenLayers.Geometry.Point(x,y));}
-var ring=new OpenLayers.Geometry.LinearRing(points);return new OpenLayers.Geometry.Polygon([ring]);};OpenLayers.Format.GeoRSS=OpenLayers.Class(OpenLayers.Format.XML,{rssns:"http://backend.userland.com/rss2",featureNS:"http://mapserver.gis.umn.edu/mapserver",georssns:"http://www.georss.org/georss",geons:"http://www.w3.org/2003/01/geo/wgs84_pos#",featureTitle:"Untitled",featureDescription:"No Description",gmlParser:null,xy:false,initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},createGeometryFromItem:function(item){var point=this.getElementsByTagNameNS(item,this.georssns,"point");var lat=this.getElementsByTagNameNS(item,this.geons,'lat');var lon=this.getElementsByTagNameNS(item,this.geons,'long');var line=this.getElementsByTagNameNS(item,this.georssns,"line");var polygon=this.getElementsByTagNameNS(item,this.georssns,"polygon");var where=this.getElementsByTagNameNS(item,this.georssns,"where");var box=this.getElementsByTagNameNS(item,this.georssns,"box");if(point.length>0||(lat.length>0&&lon.length>0)){var location;if(point.length>0){location=OpenLayers.String.trim(point[0].firstChild.nodeValue).split(/\s+/);if(location.length!=2){location=OpenLayers.String.trim(point[0].firstChild.nodeValue).split(/\s*,\s*/);}}else{location=[parseFloat(lat[0].firstChild.nodeValue),parseFloat(lon[0].firstChild.nodeValue)];}
-var geometry=new OpenLayers.Geometry.Point(parseFloat(location[1]),parseFloat(location[0]));}else if(line.length>0){var coords=OpenLayers.String.trim(this.concatChildValues(line[0])).split(/\s+/);var components=[];var point;for(var i=0,len=coords.length;i<len;i+=2){point=new OpenLayers.Geometry.Point(parseFloat(coords[i+1]),parseFloat(coords[i]));components.push(point);}
-geometry=new OpenLayers.Geometry.LineString(components);}else if(polygon.length>0){var coords=OpenLayers.String.trim(this.concatChildValues(polygon[0])).split(/\s+/);var components=[];var point;for(var i=0,len=coords.length;i<len;i+=2){point=new OpenLayers.Geometry.Point(parseFloat(coords[i+1]),parseFloat(coords[i]));components.push(point);}
-geometry=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]);}else if(where.length>0){if(!this.gmlParser){this.gmlParser=new OpenLayers.Format.GML({'xy':this.xy});}
-var feature=this.gmlParser.parseFeature(where[0]);geometry=feature.geometry;}else if(box.length>0){var coords=OpenLayers.String.trim(box[0].firstChild.nodeValue).split(/\s+/);var components=[];var point;if(coords.length>3){point=new OpenLayers.Geometry.Point(parseFloat(coords[1]),parseFloat(coords[0]));components.push(point);point=new OpenLayers.Geometry.Point(parseFloat(coords[1]),parseFloat(coords[2]));components.push(point);point=new OpenLayers.Geometry.Point(parseFloat(coords[3]),parseFloat(coords[2]));components.push(point);point=new OpenLayers.Geometry.Point(parseFloat(coords[3]),parseFloat(coords[0]));components.push(point);point=new OpenLayers.Geometry.Point(parseFloat(coords[1]),parseFloat(coords[0]));components.push(point);}
-geometry=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]);}
-if(geometry&&this.internalProjection&&this.externalProjection){geometry.transform(this.externalProjection,this.internalProjection);}
-return geometry;},createFeatureFromItem:function(item){var geometry=this.createGeometryFromItem(item);var title=this.getChildValue(item,"*","title",this.featureTitle);var description=this.getChildValue(item,"*","description",this.getChildValue(item,"*","content",this.getChildValue(item,"*","summary",this.featureDescription)));var link=this.getChildValue(item,"*","link");if(!link){try{link=this.getElementsByTagNameNS(item,"*","link")[0].getAttribute("href");}catch(e){link=null;}}
-var id=this.getChildValue(item,"*","id",null);var data={"title":title,"description":description,"link":link};var feature=new OpenLayers.Feature.Vector(geometry,data);feature.fid=id;return feature;},getChildValue:function(node,nsuri,name,def){var value;var eles=this.getElementsByTagNameNS(node,nsuri,name);if(eles&&eles[0]&&eles[0].firstChild&&eles[0].firstChild.nodeValue){value=eles[0].firstChild.nodeValue;}else{value=(def==undefined)?"":def;}
-return value;},read:function(doc){if(typeof doc=="string"){doc=OpenLayers.Format.XML.prototype.read.apply(this,[doc]);}
-var itemlist=null;itemlist=this.getElementsByTagNameNS(doc,'*','item');if(itemlist.length==0){itemlist=this.getElementsByTagNameNS(doc,'*','entry');}
-var numItems=itemlist.length;var features=new Array(numItems);for(var i=0;i<numItems;i++){features[i]=this.createFeatureFromItem(itemlist[i]);}
-return features;},write:function(features){var georss;if(features instanceof Array){georss=this.createElementNS(this.rssns,"rss");for(var i=0,len=features.length;i<len;i++){georss.appendChild(this.createFeatureXML(features[i]));}}else{georss=this.createFeatureXML(features);}
-return OpenLayers.Format.XML.prototype.write.apply(this,[georss]);},createFeatureXML:function(feature){var geometryNode=this.buildGeometryNode(feature.geometry);var featureNode=this.createElementNS(this.rssns,"item");var titleNode=this.createElementNS(this.rssns,"title");titleNode.appendChild(this.createTextNode(feature.attributes.title?feature.attributes.title:""));var descNode=this.createElementNS(this.rssns,"description");descNode.appendChild(this.createTextNode(feature.attributes.description?feature.attributes.description:""));featureNode.appendChild(titleNode);featureNode.appendChild(descNode);if(feature.attributes.link){var linkNode=this.createElementNS(this.rssns,"link");linkNode.appendChild(this.createTextNode(feature.attributes.link));featureNode.appendChild(linkNode);}
-for(var attr in feature.attributes){if(attr=="link"||attr=="title"||attr=="description"){continue;}
-var attrText=this.createTextNode(feature.attributes[attr]);var nodename=attr;if(attr.search(":")!=-1){nodename=attr.split(":")[1];}
-var attrContainer=this.createElementNS(this.featureNS,"feature:"+nodename);attrContainer.appendChild(attrText);featureNode.appendChild(attrContainer);}
-featureNode.appendChild(geometryNode);return featureNode;},buildGeometryNode:function(geometry){if(this.internalProjection&&this.externalProjection){geometry=geometry.clone();geometry.transform(this.internalProjection,this.externalProjection);}
-var node;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Polygon"){node=this.createElementNS(this.georssns,'georss:polygon');node.appendChild(this.buildCoordinatesNode(geometry.components[0]));}
-else if(geometry.CLASS_NAME=="OpenLayers.Geometry.LineString"){node=this.createElementNS(this.georssns,'georss:line');node.appendChild(this.buildCoordinatesNode(geometry));}
-else if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){node=this.createElementNS(this.georssns,'georss:point');node.appendChild(this.buildCoordinatesNode(geometry));}else{throw"Couldn't parse "+geometry.CLASS_NAME;}
-return node;},buildCoordinatesNode:function(geometry){var points=null;if(geometry.components){points=geometry.components;}
-var path;if(points){var numPoints=points.length;var parts=new Array(numPoints);for(var i=0;i<numPoints;i++){parts[i]=points[i].y+" "+points[i].x;}
-path=parts.join(" ");}else{path=geometry.y+" "+geometry.x;}
-return this.createTextNode(path);},CLASS_NAME:"OpenLayers.Format.GeoRSS"});OpenLayers.Format.KML=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{kml:"http://www.opengis.net/kml/2.2",gx:"http://www.google.com/kml/ext/2.2"},kmlns:"http://earth.google.com/kml/2.0",placemarksDesc:"No description available",foldersName:"OpenLayers export",foldersDesc:"Exported on "+new Date(),extractAttributes:true,extractStyles:false,extractTracks:false,trackAttributes:null,internalns:null,features:null,styles:null,styleBaseUrl:"",fetched:null,maxDepth:0,initialize:function(options){this.regExes={trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g),kmlColor:(/(\w{2})(\w{2})(\w{2})(\w{2})/),kmlIconPalette:(/root:\/\/icons\/palette-(\d+)(\.\w+)/),straightBracket:(/\$\[(.*?)\]/g)};this.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){this.features=[];this.styles={};this.fetched={};var options={depth:0,styleBaseUrl:this.styleBaseUrl};return this.parseData(data,options);},parseData:function(data,options){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-var types=["Link","NetworkLink","Style","StyleMap","Placemark"];for(var i=0,len=types.length;i<len;++i){var type=types[i];var nodes=this.getElementsByTagNameNS(data,"*",type);if(nodes.length==0){continue;}
-switch(type.toLowerCase()){case"link":case"networklink":this.parseLinks(nodes,options);break;case"style":if(this.extractStyles){this.parseStyles(nodes,options);}
-break;case"stylemap":if(this.extractStyles){this.parseStyleMaps(nodes,options);}
-break;case"placemark":this.parseFeatures(nodes,options);break;}}
-return this.features;},parseLinks:function(nodes,options){if(options.depth>=this.maxDepth){return false;}
-var newOptions=OpenLayers.Util.extend({},options);newOptions.depth++;for(var i=0,len=nodes.length;i<len;i++){var href=this.parseProperty(nodes[i],"*","href");if(href&&!this.fetched[href]){this.fetched[href]=true;var data=this.fetchLink(href);if(data){this.parseData(data,newOptions);}}}},fetchLink:function(href){var request=OpenLayers.Request.GET({url:href,async:false});if(request){return request.responseText;}},parseStyles:function(nodes,options){for(var i=0,len=nodes.length;i<len;i++){var style=this.parseStyle(nodes[i]);if(style){var styleName=(options.styleBaseUrl||"")+"#"+style.id;this.styles[styleName]=style;}}},parseKmlColor:function(kmlColor){var color=null;if(kmlColor){var matches=kmlColor.match(this.regExes.kmlColor);if(matches){color={color:'#'+matches[4]+matches[3]+matches[2],opacity:parseInt(matches[1],16)/255};}}
-return color;},parseStyle:function(node){var style={};var types=["LineStyle","PolyStyle","IconStyle","BalloonStyle","LabelStyle"];var type,nodeList,geometry,parser;for(var i=0,len=types.length;i<len;++i){type=types[i];styleTypeNode=this.getElementsByTagNameNS(node,"*",type)[0];if(!styleTypeNode){continue;}
-switch(type.toLowerCase()){case"linestyle":var kmlColor=this.parseProperty(styleTypeNode,"*","color");var color=this.parseKmlColor(kmlColor);if(color){style["strokeColor"]=color.color;style["strokeOpacity"]=color.opacity;}
-var width=this.parseProperty(styleTypeNode,"*","width");if(width){style["strokeWidth"]=width;}
-break;case"polystyle":var kmlColor=this.parseProperty(styleTypeNode,"*","color");var color=this.parseKmlColor(kmlColor);if(color){style["fillOpacity"]=color.opacity;style["fillColor"]=color.color;}
-var fill=this.parseProperty(styleTypeNode,"*","fill");if(fill=="0"){style["fillColor"]="none";}
-var outline=this.parseProperty(styleTypeNode,"*","outline");if(outline=="0"){style["strokeWidth"]="0";}
-break;case"iconstyle":var scale=parseFloat(this.parseProperty(styleTypeNode,"*","scale")||1);var width=32*scale;var height=32*scale;var iconNode=this.getElementsByTagNameNS(styleTypeNode,"*","Icon")[0];if(iconNode){var href=this.parseProperty(iconNode,"*","href");if(href){var w=this.parseProperty(iconNode,"*","w");var h=this.parseProperty(iconNode,"*","h");var google="http://maps.google.com/mapfiles/kml";if(OpenLayers.String.startsWith(href,google)&&!w&&!h){w=64;h=64;scale=scale/2;}
-w=w||h;h=h||w;if(w){width=parseInt(w)*scale;}
-if(h){height=parseInt(h)*scale;}
-var matches=href.match(this.regExes.kmlIconPalette);if(matches){var palette=matches[1];var file_extension=matches[2];var x=this.parseProperty(iconNode,"*","x");var y=this.parseProperty(iconNode,"*","y");var posX=x?x/32:0;var posY=y?(7-y/32):7;var pos=posY*8+posX;href="http://maps.google.com/mapfiles/kml/pal"
-+palette+"/icon"+pos+file_extension;}
-style["graphicOpacity"]=1;style["externalGraphic"]=href;}}
-var hotSpotNode=this.getElementsByTagNameNS(styleTypeNode,"*","hotSpot")[0];if(hotSpotNode){var x=parseFloat(hotSpotNode.getAttribute("x"));var y=parseFloat(hotSpotNode.getAttribute("y"));var xUnits=hotSpotNode.getAttribute("xunits");if(xUnits=="pixels"){style["graphicXOffset"]=-x*scale;}
-else if(xUnits=="insetPixels"){style["graphicXOffset"]=-width+(x*scale);}
-else if(xUnits=="fraction"){style["graphicXOffset"]=-width*x;}
-var yUnits=hotSpotNode.getAttribute("yunits");if(yUnits=="pixels"){style["graphicYOffset"]=-height+(y*scale)+1;}
-else if(yUnits=="insetPixels"){style["graphicYOffset"]=-(y*scale)+1;}
-else if(yUnits=="fraction"){style["graphicYOffset"]=-height*(1-y)+1;}}
-style["graphicWidth"]=width;style["graphicHeight"]=height;break;case"balloonstyle":var balloonStyle=OpenLayers.Util.getXmlNodeValue(styleTypeNode);if(balloonStyle){style["balloonStyle"]=balloonStyle.replace(this.regExes.straightBracket,"${$1}");}
-break;case"labelstyle":var kmlColor=this.parseProperty(styleTypeNode,"*","color");var color=this.parseKmlColor(kmlColor);if(color){style["fontColor"]=color.color;style["fontOpacity"]=color.opacity;}
-break;default:}}
-if(!style["strokeColor"]&&style["fillColor"]){style["strokeColor"]=style["fillColor"];}
-var id=node.getAttribute("id");if(id&&style){style.id=id;}
-return style;},parseStyleMaps:function(nodes,options){for(var i=0,len=nodes.length;i<len;i++){var node=nodes[i];var pairs=this.getElementsByTagNameNS(node,"*","Pair");var id=node.getAttribute("id");for(var j=0,jlen=pairs.length;j<jlen;j++){var pair=pairs[j];var key=this.parseProperty(pair,"*","key");var styleUrl=this.parseProperty(pair,"*","styleUrl");if(styleUrl&&key=="normal"){this.styles[(options.styleBaseUrl||"")+"#"+id]=this.styles[(options.styleBaseUrl||"")+styleUrl];}
-if(styleUrl&&key=="highlight"){}}}},parseFeatures:function(nodes,options){var features=[];for(var i=0,len=nodes.length;i<len;i++){var featureNode=nodes[i];var feature=this.parseFeature.apply(this,[featureNode]);if(feature){if(this.extractStyles&&feature.attributes&&feature.attributes.styleUrl){feature.style=this.getStyle(feature.attributes.styleUrl,options);}
-if(this.extractStyles){var inlineStyleNode=this.getElementsByTagNameNS(featureNode,"*","Style")[0];if(inlineStyleNode){var inlineStyle=this.parseStyle(inlineStyleNode);if(inlineStyle){feature.style=OpenLayers.Util.extend(feature.style,inlineStyle);}}}
-if(this.extractTracks){var tracks=this.getElementsByTagNameNS(featureNode,this.namespaces.gx,"Track");if(tracks&&tracks.length>0){var track=tracks[0];var container={features:[],feature:feature};this.readNode(track,container);if(container.features.length>0){features.push.apply(features,container.features);}}}else{features.push(feature);}}else{throw"Bad Placemark: "+i;}}
-this.features=this.features.concat(features);},readers:{"kml":{"when":function(node,container){container.whens.push(OpenLayers.Date.parse(this.getChildValue(node)));},"_trackPointAttribute":function(node,container){var name=node.nodeName.split(":").pop();container.attributes[name].push(this.getChildValue(node));}},"gx":{"Track":function(node,container){var obj={whens:[],points:[],angles:[]};if(this.trackAttributes){var name;obj.attributes={};for(var i=0,ii=this.trackAttributes.length;i<ii;++i){name=this.trackAttributes[i];obj.attributes[name]=[];if(!(name in this.readers.kml)){this.readers.kml[name]=this.readers.kml._trackPointAttribute;}}}
-this.readChildNodes(node,obj);if(obj.whens.length!==obj.points.length){throw new Error("gx:Track with unequal number of when ("+obj.whens.length+") and gx:coord ("+obj.points.length+") elements.");}
-var hasAngles=obj.angles.length>0;if(hasAngles&&obj.whens.length!==obj.angles.length){throw new Error("gx:Track with unequal number of when ("+obj.whens.length+") and gx:angles ("+obj.angles.length+") elements.");}
-var feature,point,angles;for(var i=0,ii=obj.whens.length;i<ii;++i){feature=container.feature.clone();feature.fid=container.feature.fid||container.feature.id;point=obj.points[i];feature.geometry=point;if("z"in point){feature.attributes.altitude=point.z;}
-if(this.internalProjection&&this.externalProjection){feature.geometry.transform(this.externalProjection,this.internalProjection);}
-if(this.trackAttributes){for(var j=0,jj=this.trackAttributes.length;j<jj;++j){feature.attributes[name]=obj.attributes[this.trackAttributes[j]][i];}}
-feature.attributes.when=obj.whens[i];feature.attributes.trackId=container.feature.id;if(hasAngles){angles=obj.angles[i];feature.attributes.heading=parseFloat(angles[0]);feature.attributes.tilt=parseFloat(angles[1]);feature.attributes.roll=parseFloat(angles[2]);}
-container.features.push(feature);}},"coord":function(node,container){var str=this.getChildValue(node);var coords=str.replace(this.regExes.trimSpace,"").split(/\s+/);var point=new OpenLayers.Geometry.Point(coords[0],coords[1]);if(coords.length>2){point.z=parseFloat(coords[2]);}
-container.points.push(point);},"angles":function(node,container){var str=this.getChildValue(node);var parts=str.replace(this.regExes.trimSpace,"").split(/\s+/);container.angles.push(parts);}}},parseFeature:function(node){var order=["MultiGeometry","Polygon","LineString","Point"];var type,nodeList,geometry,parser;for(var i=0,len=order.length;i<len;++i){type=order[i];this.internalns=node.namespaceURI?node.namespaceURI:this.kmlns;nodeList=this.getElementsByTagNameNS(node,this.internalns,type);if(nodeList.length>0){var parser=this.parseGeometry[type.toLowerCase()];if(parser){geometry=parser.apply(this,[nodeList[0]]);if(this.internalProjection&&this.externalProjection){geometry.transform(this.externalProjection,this.internalProjection);}}else{OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{'geomType':type}));}
-break;}}
-var attributes;if(this.extractAttributes){attributes=this.parseAttributes(node);}
-var feature=new OpenLayers.Feature.Vector(geometry,attributes);var fid=node.getAttribute("id")||node.getAttribute("name");if(fid!=null){feature.fid=fid;}
-return feature;},getStyle:function(styleUrl,options){var styleBaseUrl=OpenLayers.Util.removeTail(styleUrl);var newOptions=OpenLayers.Util.extend({},options);newOptions.depth++;newOptions.styleBaseUrl=styleBaseUrl;if(!this.styles[styleUrl]&&!OpenLayers.String.startsWith(styleUrl,"#")&&newOptions.depth<=this.maxDepth&&!this.fetched[styleBaseUrl]){var data=this.fetchLink(styleBaseUrl);if(data){this.parseData(data,newOptions);}}
-var style=OpenLayers.Util.extend({},this.styles[styleUrl]);return style;},parseGeometry:{point:function(node){var nodeList=this.getElementsByTagNameNS(node,this.internalns,"coordinates");var coords=[];if(nodeList.length>0){var coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.removeSpace,"");coords=coordString.split(",");}
-var point=null;if(coords.length>1){if(coords.length==2){coords[2]=null;}
-point=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{throw"Bad coordinate string: "+coordString;}
-return point;},linestring:function(node,ring){var nodeList=this.getElementsByTagNameNS(node,this.internalns,"coordinates");var line=null;if(nodeList.length>0){var coordString=this.getChildValue(nodeList[0]);coordString=coordString.replace(this.regExes.trimSpace,"");coordString=coordString.replace(this.regExes.trimComma,",");var pointList=coordString.split(this.regExes.splitSpace);var numPoints=pointList.length;var points=new Array(numPoints);var coords,numCoords;for(var i=0;i<numPoints;++i){coords=pointList[i].split(",");numCoords=coords.length;if(numCoords>1){if(coords.length==2){coords[2]=null;}
-points[i]=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{throw"Bad LineString point coordinates: "+
-pointList[i];}}
-if(numPoints){if(ring){line=new OpenLayers.Geometry.LinearRing(points);}else{line=new OpenLayers.Geometry.LineString(points);}}else{throw"Bad LineString coordinates: "+coordString;}}
-return line;},polygon:function(node){var nodeList=this.getElementsByTagNameNS(node,this.internalns,"LinearRing");var numRings=nodeList.length;var components=new Array(numRings);if(numRings>0){var ring;for(var i=0,len=nodeList.length;i<len;++i){ring=this.parseGeometry.linestring.apply(this,[nodeList[i],true]);if(ring){components[i]=ring;}else{throw"Bad LinearRing geometry: "+i;}}}
-return new OpenLayers.Geometry.Polygon(components);},multigeometry:function(node){var child,parser;var parts=[];var children=node.childNodes;for(var i=0,len=children.length;i<len;++i){child=children[i];if(child.nodeType==1){var type=(child.prefix)?child.nodeName.split(":")[1]:child.nodeName;var parser=this.parseGeometry[type.toLowerCase()];if(parser){parts.push(parser.apply(this,[child]));}}}
-return new OpenLayers.Geometry.Collection(parts);}},parseAttributes:function(node){var attributes={};var edNodes=node.getElementsByTagName("ExtendedData");if(edNodes.length){attributes=this.parseExtendedData(edNodes[0]);}
-var child,grandchildren,grandchild;var children=node.childNodes;for(var i=0,len=children.length;i<len;++i){child=children[i];if(child.nodeType==1){grandchildren=child.childNodes;if(grandchildren.length>=1&&grandchildren.length<=3){var grandchild;switch(grandchildren.length){case 1:grandchild=grandchildren[0];break;case 2:var c1=grandchildren[0];var c2=grandchildren[1];grandchild=(c1.nodeType==3||c1.nodeType==4)?c1:c2;break;case 3:default:grandchild=grandchildren[1];break;}
-if(grandchild.nodeType==3||grandchild.nodeType==4){var name=(child.prefix)?child.nodeName.split(":")[1]:child.nodeName;var value=OpenLayers.Util.getXmlNodeValue(grandchild);if(value){value=value.replace(this.regExes.trimSpace,"");attributes[name]=value;}}}}}
-return attributes;},parseExtendedData:function(node){var attributes={};var i,len,data,key;var dataNodes=node.getElementsByTagName("Data");for(i=0,len=dataNodes.length;i<len;i++){data=dataNodes[i];key=data.getAttribute("name");var ed={};var valueNode=data.getElementsByTagName("value");if(valueNode.length){ed['value']=this.getChildValue(valueNode[0]);}
-var nameNode=data.getElementsByTagName("displayName");if(nameNode.length){ed['displayName']=this.getChildValue(nameNode[0]);}
-attributes[key]=ed;}
-var simpleDataNodes=node.getElementsByTagName("SimpleData");for(i=0,len=simpleDataNodes.length;i<len;i++){var ed={};data=simpleDataNodes[i];key=data.getAttribute("name");ed['value']=this.getChildValue(data);ed['displayName']=key;attributes[key]=ed;}
-return attributes;},parseProperty:function(xmlNode,namespace,tagName){var value;var nodeList=this.getElementsByTagNameNS(xmlNode,namespace,tagName);try{value=OpenLayers.Util.getXmlNodeValue(nodeList[0]);}catch(e){value=null;}
-return value;},write:function(features){if(!(features instanceof Array)){features=[features];}
-var kml=this.createElementNS(this.kmlns,"kml");var folder=this.createFolderXML();for(var i=0,len=features.length;i<len;++i){folder.appendChild(this.createPlacemarkXML(features[i]));}
-kml.appendChild(folder);return OpenLayers.Format.XML.prototype.write.apply(this,[kml]);},createFolderXML:function(){var folder=this.createElementNS(this.kmlns,"Folder");if(this.foldersName){var folderName=this.createElementNS(this.kmlns,"name");var folderNameText=this.createTextNode(this.foldersName);folderName.appendChild(folderNameText);folder.appendChild(folderName);}
-if(this.foldersDesc){var folderDesc=this.createElementNS(this.kmlns,"description");var folderDescText=this.createTextNode(this.foldersDesc);folderDesc.appendChild(folderDescText);folder.appendChild(folderDesc);}
-return folder;},createPlacemarkXML:function(feature){var placemarkName=this.createElementNS(this.kmlns,"name");var name=feature.style&&feature.style.label?feature.style.label:feature.attributes.name||feature.id;placemarkName.appendChild(this.createTextNode(name));var placemarkDesc=this.createElementNS(this.kmlns,"description");var desc=feature.attributes.description||this.placemarksDesc;placemarkDesc.appendChild(this.createTextNode(desc));var placemarkNode=this.createElementNS(this.kmlns,"Placemark");if(feature.fid!=null){placemarkNode.setAttribute("id",feature.fid);}
-placemarkNode.appendChild(placemarkName);placemarkNode.appendChild(placemarkDesc);var geometryNode=this.buildGeometryNode(feature.geometry);placemarkNode.appendChild(geometryNode);return placemarkNode;},buildGeometryNode:function(geometry){if(this.internalProjection&&this.externalProjection){geometry=geometry.clone();geometry.transform(this.internalProjection,this.externalProjection);}
-var className=geometry.CLASS_NAME;var type=className.substring(className.lastIndexOf(".")+1);var builder=this.buildGeometry[type.toLowerCase()];var node=null;if(builder){node=builder.apply(this,[geometry]);}
-return node;},buildGeometry:{point:function(geometry){var kml=this.createElementNS(this.kmlns,"Point");kml.appendChild(this.buildCoordinatesNode(geometry));return kml;},multipoint:function(geometry){return this.buildGeometry.collection.apply(this,[geometry]);},linestring:function(geometry){var kml=this.createElementNS(this.kmlns,"LineString");kml.appendChild(this.buildCoordinatesNode(geometry));return kml;},multilinestring:function(geometry){return this.buildGeometry.collection.apply(this,[geometry]);},linearring:function(geometry){var kml=this.createElementNS(this.kmlns,"LinearRing");kml.appendChild(this.buildCoordinatesNode(geometry));return kml;},polygon:function(geometry){var kml=this.createElementNS(this.kmlns,"Polygon");var rings=geometry.components;var ringMember,ringGeom,type;for(var i=0,len=rings.length;i<len;++i){type=(i==0)?"outerBoundaryIs":"innerBoundaryIs";ringMember=this.createElementNS(this.kmlns,type);ringGeom=this.buildGeometry.linearring.apply(this,[rings[i]]);ringMember.appendChild(ringGeom);kml.appendChild(ringMember);}
-return kml;},multipolygon:function(geometry){return this.buildGeometry.collection.apply(this,[geometry]);},collection:function(geometry){var kml=this.createElementNS(this.kmlns,"MultiGeometry");var child;for(var i=0,len=geometry.components.length;i<len;++i){child=this.buildGeometryNode.apply(this,[geometry.components[i]]);if(child){kml.appendChild(child);}}
-return kml;}},buildCoordinatesNode:function(geometry){var coordinatesNode=this.createElementNS(this.kmlns,"coordinates");var path;var points=geometry.components;if(points){var point;var numPoints=points.length;var parts=new Array(numPoints);for(var i=0;i<numPoints;++i){point=points[i];parts[i]=point.x+","+point.y;}
-path=parts.join(" ");}else{path=geometry.x+","+geometry.y;}
-var txtNode=this.createTextNode(path);coordinatesNode.appendChild(txtNode);return coordinatesNode;},CLASS_NAME:"OpenLayers.Format.KML"});OpenLayers.Format.OSM=OpenLayers.Class(OpenLayers.Format.XML,{checkTags:false,interestingTagsExclude:null,areaTags:null,initialize:function(options){var layer_defaults={'interestingTagsExclude':['source','source_ref','source:ref','history','attribution','created_by'],'areaTags':['area','building','leisure','tourism','ruins','historic','landuse','military','natural','sport']};layer_defaults=OpenLayers.Util.extend(layer_defaults,options);var interesting={};for(var i=0;i<layer_defaults.interestingTagsExclude.length;i++){interesting[layer_defaults.interestingTagsExclude[i]]=true;}
-layer_defaults.interestingTagsExclude=interesting;var area={};for(var i=0;i<layer_defaults.areaTags.length;i++){area[layer_defaults.areaTags[i]]=true;}
-layer_defaults.areaTags=area;this.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.XML.prototype.initialize.apply(this,[layer_defaults]);},read:function(doc){if(typeof doc=="string"){doc=OpenLayers.Format.XML.prototype.read.apply(this,[doc]);}
-var nodes=this.getNodes(doc);var ways=this.getWays(doc);var feat_list=new Array(ways.length);for(var i=0;i<ways.length;i++){var point_list=new Array(ways[i].nodes.length);var poly=this.isWayArea(ways[i])?1:0;for(var j=0;j<ways[i].nodes.length;j++){var node=nodes[ways[i].nodes[j]];var point=new OpenLayers.Geometry.Point(node.lon,node.lat);point.osm_id=parseInt(ways[i].nodes[j]);point_list[j]=point;node.used=true;}
-var geometry=null;if(poly){geometry=new OpenLayers.Geometry.Polygon(new OpenLayers.Geometry.LinearRing(point_list));}else{geometry=new OpenLayers.Geometry.LineString(point_list);}
-if(this.internalProjection&&this.externalProjection){geometry.transform(this.externalProjection,this.internalProjection);}
-var feat=new OpenLayers.Feature.Vector(geometry,ways[i].tags);feat.osm_id=parseInt(ways[i].id);feat.fid="way."+feat.osm_id;feat_list[i]=feat;}
-for(var node_id in nodes){var node=nodes[node_id];if(!node.used||this.checkTags){var tags=null;if(this.checkTags){var result=this.getTags(node.node,true);if(node.used&&!result[1]){continue;}
-tags=result[0];}else{tags=this.getTags(node.node);}
-var feat=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(node['lon'],node['lat']),tags);if(this.internalProjection&&this.externalProjection){feat.geometry.transform(this.externalProjection,this.internalProjection);}
-feat.osm_id=parseInt(node_id);feat.fid="node."+feat.osm_id;feat_list.push(feat);}
-node.node=null;}
-return feat_list;},getNodes:function(doc){var node_list=doc.getElementsByTagName("node");var nodes={};for(var i=0;i<node_list.length;i++){var node=node_list[i];var id=node.getAttribute("id");nodes[id]={'lat':node.getAttribute("lat"),'lon':node.getAttribute("lon"),'node':node};}
-return nodes;},getWays:function(doc){var way_list=doc.getElementsByTagName("way");var return_ways=[];for(var i=0;i<way_list.length;i++){var way=way_list[i];var way_object={id:way.getAttribute("id")};way_object.tags=this.getTags(way);var node_list=way.getElementsByTagName("nd");way_object.nodes=new Array(node_list.length);for(var j=0;j<node_list.length;j++){way_object.nodes[j]=node_list[j].getAttribute("ref");}
-return_ways.push(way_object);}
-return return_ways;},getTags:function(dom_node,interesting_tags){var tag_list=dom_node.getElementsByTagName("tag");var tags={};var interesting=false;for(var j=0;j<tag_list.length;j++){var key=tag_list[j].getAttribute("k");tags[key]=tag_list[j].getAttribute("v");if(interesting_tags){if(!this.interestingTagsExclude[key]){interesting=true;}}}
-return interesting_tags?[tags,interesting]:tags;},isWayArea:function(way){var poly_shaped=false;var poly_tags=false;if(way.nodes[0]==way.nodes[way.nodes.length-1]){poly_shaped=true;}
-if(this.checkTags){for(var key in way.tags){if(this.areaTags[key]){poly_tags=true;break;}}}
-return poly_shaped&&(this.checkTags?poly_tags:true);},write:function(features){if(!(features instanceof Array)){features=[features];}
-this.osm_id=1;this.created_nodes={};var root_node=this.createElementNS(null,"osm");root_node.setAttribute("version","0.5");root_node.setAttribute("generator","OpenLayers "+OpenLayers.VERSION_NUMBER);for(var i=features.length-1;i>=0;i--){var nodes=this.createFeatureNodes(features[i]);for(var j=0;j<nodes.length;j++){root_node.appendChild(nodes[j]);}}
-return OpenLayers.Format.XML.prototype.write.apply(this,[root_node]);},createFeatureNodes:function(feature){var nodes=[];var className=feature.geometry.CLASS_NAME;var type=className.substring(className.lastIndexOf(".")+1);type=type.toLowerCase();var builder=this.createXML[type];if(builder){nodes=builder.apply(this,[feature]);}
-return nodes;},createXML:{'point':function(point){var id=null;var geometry=point.geometry?point.geometry:point;var already_exists=false;if(point.osm_id){id=point.osm_id;if(this.created_nodes[id]){already_exists=true;}}else{id=-this.osm_id;this.osm_id++;}
-if(already_exists){node=this.created_nodes[id];}else{var node=this.createElementNS(null,"node");}
-this.created_nodes[id]=node;node.setAttribute("id",id);node.setAttribute("lon",geometry.x);node.setAttribute("lat",geometry.y);if(point.attributes){this.serializeTags(point,node);}
-this.setState(point,node);return already_exists?[]:[node];},linestring:function(feature){var nodes=[];var geometry=feature.geometry;if(feature.osm_id){id=feature.osm_id;}else{id=-this.osm_id;this.osm_id++;}
-var way=this.createElementNS(null,"way");way.setAttribute("id",id);for(var i=0;i<geometry.components.length;i++){var node=this.createXML['point'].apply(this,[geometry.components[i]]);if(node.length){node=node[0];var node_ref=node.getAttribute("id");nodes.push(node);}else{node_ref=geometry.components[i].osm_id;node=this.created_nodes[node_ref];}
-this.setState(feature,node);var nd_dom=this.createElementNS(null,"nd");nd_dom.setAttribute("ref",node_ref);way.appendChild(nd_dom);}
-this.serializeTags(feature,way);nodes.push(way);return nodes;},polygon:function(feature){var attrs=OpenLayers.Util.extend({'area':'yes'},feature.attributes);var feat=new OpenLayers.Feature.Vector(feature.geometry.components[0],attrs);feat.osm_id=feature.osm_id;return this.createXML['linestring'].apply(this,[feat]);}},serializeTags:function(feature,node){for(var key in feature.attributes){var tag=this.createElementNS(null,"tag");tag.setAttribute("k",key);tag.setAttribute("v",feature.attributes[key]);node.appendChild(tag);}},setState:function(feature,node){if(feature.state){var state=null;switch(feature.state){case OpenLayers.State.UPDATE:state="modify";case OpenLayers.State.DELETE:state="delete";}
-if(state){node.setAttribute("action",state);}}},CLASS_NAME:"OpenLayers.Format.OSM"});OpenLayers.Geometry.MultiPolygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Polygon"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Geometry.MultiPolygon"});OpenLayers.Handler.Polygon=OpenLayers.Class(OpenLayers.Handler.Path,{polygon:null,initialize:function(control,callbacks,options){OpenLayers.Handler.Path.prototype.initialize.apply(this,arguments);},createFeature:function(pixel){var lonlat=this.control.map.getLonLatFromPixel(pixel);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat));this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LinearRing([this.point.geometry]));this.polygon=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([this.line.geometry]));this.callback("create",[this.point.geometry,this.getSketch()]);this.point.geometry.clearBounds();this.layer.addFeatures([this.polygon,this.point],{silent:true});},destroyFeature:function(){OpenLayers.Handler.Path.prototype.destroyFeature.apply(this);this.polygon=null;},drawFeature:function(){this.layer.drawFeature(this.polygon,this.style);this.layer.drawFeature(this.point,this.style);},getSketch:function(){return this.polygon;},getGeometry:function(){var geometry=this.polygon&&this.polygon.geometry;if(geometry&&this.multi){geometry=new OpenLayers.Geometry.MultiPolygon([geometry]);}
-return geometry;},dblclick:function(evt){if(!this.freehandMode(evt)){var index=this.line.geometry.components.length-2;this.line.geometry.removeComponent(this.line.geometry.components[index]);this.removePoint();this.finalize();}
-return false;},CLASS_NAME:"OpenLayers.Handler.Polygon"});OpenLayers.Control.EditingToolbar=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(layer,options){OpenLayers.Control.Panel.prototype.initialize.apply(this,[options]);this.addControls([new OpenLayers.Control.Navigation()]);var controls=[new OpenLayers.Control.DrawFeature(layer,OpenLayers.Handler.Point,{'displayClass':'olControlDrawFeaturePoint'}),new OpenLayers.Control.DrawFeature(layer,OpenLayers.Handler.Path,{'displayClass':'olControlDrawFeaturePath'}),new OpenLayers.Control.DrawFeature(layer,OpenLayers.Handler.Polygon,{'displayClass':'olControlDrawFeaturePolygon'})];this.addControls(controls);},draw:function(){var div=OpenLayers.Control.Panel.prototype.draw.apply(this,arguments);this.activateControl(this.controls[0]);return div;},CLASS_NAME:"OpenLayers.Control.EditingToolbar"});OpenLayers.Control.SLDSelect=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["selected"],clearOnDeactivate:false,layers:null,callbacks:null,selectionSymbolizer:{'Polygon':{fillColor:'#FF0000',stroke:false},'Line':{strokeColor:'#FF0000',strokeWidth:2},'Point':{graphicName:'square',fillColor:'#FF0000',pointRadius:5}},layerOptions:null,handlerOptions:null,sketchStyle:null,wfsCache:{},layerCache:{},initialize:function(handler,options){this.EVENT_TYPES=OpenLayers.Control.SLDSelect.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[options]);this.callbacks=OpenLayers.Util.extend({done:this.select,click:this.select},this.callbacks);this.handlerOptions=this.handlerOptions||{};this.layerOptions=OpenLayers.Util.applyDefaults(this.layerOptions,{displayInLayerSwitcher:false});if(this.sketchStyle){this.handlerOptions.layerOptions=OpenLayers.Util.applyDefaults(this.handlerOptions.layerOptions,{styleMap:new OpenLayers.StyleMap({"default":this.sketchStyle})});}
-this.handler=new handler(this,this.callbacks,this.handlerOptions);},destroy:function(){for(var key in this.layerCache){delete this.layerCache[key];}
-for(var key in this.wfsCache){delete this.wfsCache[key];}
-OpenLayers.Control.prototype.destroy.apply(this,arguments);},coupleLayerVisiblity:function(evt){this.setVisibility(evt.object.getVisibility());},createSelectionLayer:function(source){var selectionLayer;if(!this.layerCache[source.id]){selectionLayer=new OpenLayers.Layer.WMS.Post(source.name,source.url,source.params,OpenLayers.Util.applyDefaults(this.layerOptions,source.getOptions()));this.layerCache[source.id]=selectionLayer;if(this.layerOptions.displayInLayerSwitcher===false){source.events.on({"visibilitychanged":this.coupleLayerVisiblity,scope:selectionLayer});}
-this.map.addLayer(selectionLayer);}else{selectionLayer=this.layerCache[source.id];}
-return selectionLayer;},createSLD:function(layer,filters,geometryAttributes){var sld={version:"1.0.0",namedLayers:{}};var layerNames=[layer.params.LAYERS].join(",").split(",");for(var i=0,len=layerNames.length;i<len;i++){var name=layerNames[i];sld.namedLayers[name]={name:name,userStyles:[]};var symbolizer=this.selectionSymbolizer;var geometryAttribute=geometryAttributes[i];if(geometryAttribute.type.indexOf('Polygon')>=0){symbolizer={Polygon:this.selectionSymbolizer['Polygon']};}else if(geometryAttribute.type.indexOf('LineString')>=0){symbolizer={Line:this.selectionSymbolizer['Line']};}else if(geometryAttribute.type.indexOf('Point')>=0){symbolizer={Point:this.selectionSymbolizer['Point']};}
-var filter=filters[i];sld.namedLayers[name].userStyles.push({name:'default',rules:[new OpenLayers.Rule({symbolizer:symbolizer,filter:filter,maxScaleDenominator:layer.options.minScale})]});}
-return new OpenLayers.Format.SLD().write(sld);},parseDescribeLayer:function(request){var format=new OpenLayers.Format.WMSDescribeLayer();var doc=request.responseXML;if(!doc||!doc.documentElement){doc=request.responseText;}
-var describeLayer=format.read(doc);var typeNames=[];var url=null;for(var i=0,len=describeLayer.length;i<len;i++){if(describeLayer[i].owsType=="WFS"){typeNames.push(describeLayer[i].typeName);url=describeLayer[i].owsURL;}}
-var options={url:url,params:{SERVICE:"WFS",TYPENAME:typeNames.toString(),REQUEST:"DescribeFeatureType",VERSION:"1.0.0"},callback:function(request){var format=new OpenLayers.Format.WFSDescribeFeatureType();var doc=request.responseXML;if(!doc||!doc.documentElement){doc=request.responseText;}
-var describeFeatureType=format.read(doc);this.control.wfsCache[this.layer.id]=describeFeatureType;this.control._queue&&this.control.applySelection();},scope:this};OpenLayers.Request.GET(options);},getGeometryAttributes:function(layer){var result=[];var cache=this.wfsCache[layer.id];for(var i=0,len=cache.featureTypes.length;i<len;i++){var typeName=cache.featureTypes[i];var properties=typeName.properties;for(var j=0,lenj=properties.length;j<lenj;j++){var property=properties[j];var type=property.type;if((type.indexOf('LineString')>=0)||(type.indexOf('GeometryAssociationType')>=0)||(type.indexOf('GeometryPropertyType')>=0)||(type.indexOf('Point')>=0)||(type.indexOf('Polygon')>=0)){result.push(property);}}}
-return result;},activate:function(){var activated=OpenLayers.Control.prototype.activate.call(this);if(activated){for(var i=0,len=this.layers.length;i<len;i++){var layer=this.layers[i];if(layer&&!this.wfsCache[layer.id]){var options={url:layer.url,params:{SERVICE:"WMS",VERSION:layer.params.VERSION,LAYERS:layer.params.LAYERS,REQUEST:"DescribeLayer"},callback:this.parseDescribeLayer,scope:{layer:layer,control:this}};OpenLayers.Request.GET(options);}}}
-return activated;},deactivate:function(){var deactivated=OpenLayers.Control.prototype.deactivate.call(this);if(deactivated){for(var i=0,len=this.layers.length;i<len;i++){var layer=this.layers[i];if(layer&&this.clearOnDeactivate===true){var layerCache=this.layerCache;var selectionLayer=layerCache[layer.id];if(selectionLayer){layer.events.un({"visibilitychanged":this.coupleLayerVisiblity,scope:selectionLayer});selectionLayer.destroy();delete layerCache[layer.id];}}}}
-return deactivated;},setLayers:function(layers){if(this.active){this.deactivate();this.layers=layers;this.activate();}else{this.layers=layers;}},createFilter:function(geometryAttribute,geometry){var filter=null;if(this.handler instanceof OpenLayers.Handler.RegularPolygon){if(this.handler.irregular===true){filter=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,property:geometryAttribute.name,value:geometry.getBounds()});}else{filter=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:geometryAttribute.name,value:geometry});}}else if(this.handler instanceof OpenLayers.Handler.Polygon){filter=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:geometryAttribute.name,value:geometry});}else if(this.handler instanceof OpenLayers.Handler.Path){if(geometryAttribute.type.indexOf('Point')>=0){filter=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.DWITHIN,property:geometryAttribute.name,distance:this.map.getExtent().getWidth()*0.01,distanceUnits:this.map.getUnits(),value:geometry});}else{filter=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:geometryAttribute.name,value:geometry});}}else if(this.handler instanceof OpenLayers.Handler.Click){if(geometryAttribute.type.indexOf('Polygon')>=0){filter=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:geometryAttribute.name,value:geometry});}else{filter=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.DWITHIN,property:geometryAttribute.name,distance:this.map.getExtent().getWidth()*0.01,distanceUnits:this.map.getUnits(),value:geometry});}}
-return filter;},select:function(geometry){this._queue=function(){for(var i=0,len=this.layers.length;i<len;i++){var layer=this.layers[i];var geometryAttributes=this.getGeometryAttributes(layer);var filters=[];for(var j=0,lenj=geometryAttributes.length;j<lenj;j++){var geometryAttribute=geometryAttributes[j];if(geometryAttribute!==null){if(!(geometry instanceof OpenLayers.Geometry)){var point=this.map.getLonLatFromPixel(geometry.xy);geometry=new OpenLayers.Geometry.Point(point.lon,point.lat);}
-var filter=this.createFilter(geometryAttribute,geometry);if(filter!==null){filters.push(filter);}}}
-var selectionLayer=this.createSelectionLayer(layer);var sld=this.createSLD(layer,filters,geometryAttributes);this.events.triggerEvent("selected",{layer:layer,filters:filters});selectionLayer.mergeNewParams({SLD_BODY:sld});delete this._queue;}};this.applySelection();},applySelection:function(){var canApply=true;for(var i=0,len=this.layers.length;i<len;i++){if(!this.wfsCache[this.layers[i].id]){canApply=false;break;}}
-canApply&&this._queue.call(this);},CLASS_NAME:"OpenLayers.Control.SLDSelect"});OpenLayers.Format.ArcXML=OpenLayers.Class(OpenLayers.Format.XML,{fontStyleKeys:['antialiasing','blockout','font','fontcolor','fontsize','fontstyle','glowing','interval','outline','printmode','shadow','transparency'],request:null,response:null,initialize:function(options){this.request=new OpenLayers.Format.ArcXML.Request();this.response=new OpenLayers.Format.ArcXML.Response();if(options){if(options.requesttype=="feature"){this.request.get_image=null;var qry=this.request.get_feature.query;this.addCoordSys(qry.featurecoordsys,options.featureCoordSys);this.addCoordSys(qry.filtercoordsys,options.filterCoordSys);if(options.polygon){qry.isspatial=true;qry.spatialfilter.polygon=options.polygon;}else if(options.envelope){qry.isspatial=true;qry.spatialfilter.envelope={minx:0,miny:0,maxx:0,maxy:0};this.parseEnvelope(qry.spatialfilter.envelope,options.envelope);}}else if(options.requesttype=="image"){this.request.get_feature=null;var props=this.request.get_image.properties;this.parseEnvelope(props.envelope,options.envelope);this.addLayers(props.layerlist,options.layers);this.addImageSize(props.imagesize,options.tileSize);this.addCoordSys(props.featurecoordsys,options.featureCoordSys);this.addCoordSys(props.filtercoordsys,options.filterCoordSys);}else{this.request=null;}}
-OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},parseEnvelope:function(env,arr){if(arr&&arr.length==4){env.minx=arr[0];env.miny=arr[1];env.maxx=arr[2];env.maxy=arr[3];}},addLayers:function(ll,lyrs){for(var lind=0,len=lyrs.length;lind<len;lind++){ll.push(lyrs[lind]);}},addImageSize:function(imsize,olsize){if(olsize!==null){imsize.width=olsize.w;imsize.height=olsize.h;imsize.printwidth=olsize.w;imsize.printheight=olsize.h;}},addCoordSys:function(featOrFilt,fsys){if(typeof fsys=="string"){featOrFilt.id=parseInt(fsys);featOrFilt.string=fsys;}
-else if(typeof fsys=="object"&&fsys.proj!==null){featOrFilt.id=fsys.proj.srsProjNumber;featOrFilt.string=fsys.proj.srsCode;}else{featOrFilt=fsys;}},iserror:function(data){var ret=null;if(!data){ret=(this.response.error!=='');}else{data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);var errorNodes=data.documentElement.getElementsByTagName("ERROR");ret=(errorNodes!==null&&errorNodes.length>0);}
-return ret;},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-var arcNode=null;if(data&&data.documentElement){if(data.documentElement.nodeName=="ARCXML"){arcNode=data.documentElement;}else{arcNode=data.documentElement.getElementsByTagName("ARCXML")[0];}}
-if(!arcNode||arcNode.firstChild.nodeName==='parsererror'){var error,source;try{error=data.firstChild.nodeValue;source=data.firstChild.childNodes[1].firstChild.nodeValue;}catch(err){}
-throw{message:"Error parsing the ArcXML request",error:error,source:source};}
-var response=this.parseResponse(arcNode);return response;},write:function(request){if(!request){request=this.request;}
-var root=this.createElementNS("","ARCXML");root.setAttribute("version","1.1");var reqElem=this.createElementNS("","REQUEST");if(request.get_image!=null){var getElem=this.createElementNS("","GET_IMAGE");reqElem.appendChild(getElem);var propElem=this.createElementNS("","PROPERTIES");getElem.appendChild(propElem);var props=request.get_image.properties;if(props.featurecoordsys!=null){var feat=this.createElementNS("","FEATURECOORDSYS");propElem.appendChild(feat);if(props.featurecoordsys.id===0){feat.setAttribute("string",props.featurecoordsys['string']);}
-else{feat.setAttribute("id",props.featurecoordsys.id);}}
-if(props.filtercoordsys!=null){var filt=this.createElementNS("","FILTERCOORDSYS");propElem.appendChild(filt);if(props.filtercoordsys.id===0){filt.setAttribute("string",props.filtercoordsys.string);}
-else{filt.setAttribute("id",props.filtercoordsys.id);}}
-if(props.envelope!=null){var env=this.createElementNS("","ENVELOPE");propElem.appendChild(env);env.setAttribute("minx",props.envelope.minx);env.setAttribute("miny",props.envelope.miny);env.setAttribute("maxx",props.envelope.maxx);env.setAttribute("maxy",props.envelope.maxy);}
-var imagesz=this.createElementNS("","IMAGESIZE");propElem.appendChild(imagesz);imagesz.setAttribute("height",props.imagesize.height);imagesz.setAttribute("width",props.imagesize.width);if(props.imagesize.height!=props.imagesize.printheight||props.imagesize.width!=props.imagesize.printwidth){imagesz.setAttribute("printheight",props.imagesize.printheight);imagesz.setArrtibute("printwidth",props.imagesize.printwidth);}
-if(props.background!=null){var backgrnd=this.createElementNS("","BACKGROUND");propElem.appendChild(backgrnd);backgrnd.setAttribute("color",props.background.color.r+","+
-props.background.color.g+","+
-props.background.color.b);if(props.background.transcolor!==null){backgrnd.setAttribute("transcolor",props.background.transcolor.r+","+
-props.background.transcolor.g+","+
-props.background.transcolor.b);}}
-if(props.layerlist!=null&&props.layerlist.length>0){var layerlst=this.createElementNS("","LAYERLIST");propElem.appendChild(layerlst);for(var ld=0;ld<props.layerlist.length;ld++){var ldef=this.createElementNS("","LAYERDEF");layerlst.appendChild(ldef);ldef.setAttribute("id",props.layerlist[ld].id);ldef.setAttribute("visible",props.layerlist[ld].visible);if(typeof props.layerlist[ld].query=="object"){var query=props.layerlist[ld].query;if(query.where.length<0){continue;}
-var queryElem=null;if(typeof query.spatialfilter=="boolean"&&query.spatialfilter){queryElem=this.createElementNS("","SPATIALQUERY");}
-else{queryElem=this.createElementNS("","QUERY");}
-queryElem.setAttribute("where",query.where);if(typeof query.accuracy=="number"&&query.accuracy>0){queryElem.setAttribute("accuracy",query.accuracy);}
-if(typeof query.featurelimit=="number"&&query.featurelimit<2000){queryElem.setAttribute("featurelimit",query.featurelimit);}
-if(typeof query.subfields=="string"&&query.subfields!="#ALL#"){queryElem.setAttribute("subfields",query.subfields);}
-if(typeof query.joinexpression=="string"&&query.joinexpression.length>0){queryElem.setAttribute("joinexpression",query.joinexpression);}
-if(typeof query.jointables=="string"&&query.jointables.length>0){queryElem.setAttribute("jointables",query.jointables);}
-ldef.appendChild(queryElem);}
-if(typeof props.layerlist[ld].renderer=="object"){this.addRenderer(ldef,props.layerlist[ld].renderer);}}}}else if(request.get_feature!=null){var getElem=this.createElementNS("","GET_FEATURES");getElem.setAttribute("outputmode","newxml");getElem.setAttribute("checkesc","true");if(request.get_feature.geometry){getElem.setAttribute("geometry",request.get_feature.geometry);}
-else{getElem.setAttribute("geometry","false");}
-if(request.get_feature.compact){getElem.setAttribute("compact",request.get_feature.compact);}
-if(request.get_feature.featurelimit=="number"){getElem.setAttribute("featurelimit",request.get_feature.featurelimit);}
-getElem.setAttribute("globalenvelope","true");reqElem.appendChild(getElem);if(request.get_feature.layer!=null&&request.get_feature.layer.length>0){var lyrElem=this.createElementNS("","LAYER");lyrElem.setAttribute("id",request.get_feature.layer);getElem.appendChild(lyrElem);}
-var fquery=request.get_feature.query;if(fquery!=null){var qElem=null;if(fquery.isspatial){qElem=this.createElementNS("","SPATIALQUERY");}else{qElem=this.createElementNS("","QUERY");}
-getElem.appendChild(qElem);if(typeof fquery.accuracy=="number"){qElem.setAttribute("accuracy",fquery.accuracy);}
-if(fquery.featurecoordsys!=null){var fcsElem1=this.createElementNS("","FEATURECOORDSYS");if(fquery.featurecoordsys.id==0){fcsElem1.setAttribute("string",fquery.featurecoordsys.string);}else{fcsElem1.setAttribute("id",fquery.featurecoordsys.id);}
-qElem.appendChild(fcsElem1);}
-if(fquery.filtercoordsys!=null){var fcsElem2=this.createElementNS("","FILTERCOORDSYS");if(fquery.filtercoordsys.id===0){fcsElem2.setAttribute("string",fquery.filtercoordsys.string);}else{fcsElem2.setAttribute("id",fquery.filtercoordsys.id);}
-qElem.appendChild(fcsElem2);}
-if(fquery.buffer>0){var bufElem=this.createElementNS("","BUFFER");bufElem.setAttribute("distance",fquery.buffer);qElem.appendChild(bufElem);}
-if(fquery.isspatial){var spfElem=this.createElementNS("","SPATIALFILTER");spfElem.setAttribute("relation",fquery.spatialfilter.relation);qElem.appendChild(spfElem);if(fquery.spatialfilter.envelope){var envElem=this.createElementNS("","ENVELOPE");envElem.setAttribute("minx",fquery.spatialfilter.envelope.minx);envElem.setAttribute("miny",fquery.spatialfilter.envelope.miny);envElem.setAttribute("maxx",fquery.spatialfilter.envelope.maxx);envElem.setAttribute("maxy",fquery.spatialfilter.envelope.maxy);spfElem.appendChild(envElem);}else if(typeof fquery.spatialfilter.polygon=="object"){spfElem.appendChild(this.writePolygonGeometry(fquery.spatialfilter.polygon));}}
-if(fquery.where!=null&&fquery.where.length>0){qElem.setAttribute("where",fquery.where);}}}
-root.appendChild(reqElem);return OpenLayers.Format.XML.prototype.write.apply(this,[root]);},addGroupRenderer:function(ldef,toprenderer){var topRelem=this.createElementNS("","GROUPRENDERER");ldef.appendChild(topRelem);for(var rind=0;rind<toprenderer.length;rind++){var renderer=toprenderer[rind];this.addRenderer(topRelem,renderer);}},addRenderer:function(topRelem,renderer){if(renderer instanceof Array){this.addGroupRenderer(topRelem,renderer);}else{var renderElem=this.createElementNS("",renderer.type.toUpperCase()+"RENDERER");topRelem.appendChild(renderElem);if(renderElem.tagName=="VALUEMAPRENDERER"){this.addValueMapRenderer(renderElem,renderer);}else if(renderElem.tagName=="VALUEMAPLABELRENDERER"){this.addValueMapLabelRenderer(renderElem,renderer);}else if(renderElem.tagName=="SIMPLELABELRENDERER"){this.addSimpleLabelRenderer(renderElem,renderer);}else if(renderElem.tagName=="SCALEDEPENDENTRENDERER"){this.addScaleDependentRenderer(renderElem,renderer);}}},addScaleDependentRenderer:function(renderElem,renderer){if(typeof renderer.lower=="string"||typeof renderer.lower=="number"){renderElem.setAttribute("lower",renderer.lower);}
-if(typeof renderer.upper=="string"||typeof renderer.upper=="number"){renderElem.setAttribute("upper",renderer.upper);}
-this.addRenderer(renderElem,renderer.renderer);},addValueMapLabelRenderer:function(renderElem,renderer){renderElem.setAttribute("lookupfield",renderer.lookupfield);renderElem.setAttribute("labelfield",renderer.labelfield);if(typeof renderer.exacts=="object"){for(var ext=0,extlen=renderer.exacts.length;ext<extlen;ext++){var exact=renderer.exacts[ext];var eelem=this.createElementNS("","EXACT");if(typeof exact.value=="string"){eelem.setAttribute("value",exact.value);}
-if(typeof exact.label=="string"){eelem.setAttribute("label",exact.label);}
-if(typeof exact.method=="string"){eelem.setAttribute("method",exact.method);}
-renderElem.appendChild(eelem);if(typeof exact.symbol=="object"){var selem=null;if(exact.symbol.type=="text"){selem=this.createElementNS("","TEXTSYMBOL");}
-if(selem!=null){var keys=this.fontStyleKeys;for(var i=0,len=keys.length;i<len;i++){var key=keys[i];if(exact.symbol[key]){selem.setAttribute(key,exact.symbol[key]);}}
-eelem.appendChild(selem);}}}}},addValueMapRenderer:function(renderElem,renderer){renderElem.setAttribute("lookupfield",renderer.lookupfield);if(typeof renderer.ranges=="object"){for(var rng=0,rnglen=renderer.ranges.length;rng<rnglen;rng++){var range=renderer.ranges[rng];var relem=this.createElementNS("","RANGE");relem.setAttribute("lower",range.lower);relem.setAttribute("upper",range.upper);renderElem.appendChild(relem);if(typeof range.symbol=="object"){var selem=null;if(range.symbol.type=="simplepolygon"){selem=this.createElementNS("","SIMPLEPOLYGONSYMBOL");}
-if(selem!=null){if(typeof range.symbol.boundarycolor=="string"){selem.setAttribute("boundarycolor",range.symbol.boundarycolor);}
-if(typeof range.symbol.fillcolor=="string"){selem.setAttribute("fillcolor",range.symbol.fillcolor);}
-if(typeof range.symbol.filltransparency=="number"){selem.setAttribute("filltransparency",range.symbol.filltransparency);}
-relem.appendChild(selem);}}}}else if(typeof renderer.exacts=="object"){for(var ext=0,extlen=renderer.exacts.length;ext<extlen;ext++){var exact=renderer.exacts[ext];var eelem=this.createElementNS("","EXACT");if(typeof exact.value=="string"){eelem.setAttribute("value",exact.value);}
-if(typeof exact.label=="string"){eelem.setAttribute("label",exact.label);}
-if(typeof exact.method=="string"){eelem.setAttribute("method",exact.method);}
-renderElem.appendChild(eelem);if(typeof exact.symbol=="object"){var selem=null;if(exact.symbol.type=="simplemarker"){selem=this.createElementNS("","SIMPLEMARKERSYMBOL");}
-if(selem!=null){if(typeof exact.symbol.antialiasing=="string"){selem.setAttribute("antialiasing",exact.symbol.antialiasing);}
-if(typeof exact.symbol.color=="string"){selem.setAttribute("color",exact.symbol.color);}
-if(typeof exact.symbol.outline=="string"){selem.setAttribute("outline",exact.symbol.outline);}
-if(typeof exact.symbol.overlap=="string"){selem.setAttribute("overlap",exact.symbol.overlap);}
-if(typeof exact.symbol.shadow=="string"){selem.setAttribute("shadow",exact.symbol.shadow);}
-if(typeof exact.symbol.transparency=="number"){selem.setAttribute("transparency",exact.symbol.transparency);}
-if(typeof exact.symbol.usecentroid=="string"){selem.setAttribute("usecentroid",exact.symbol.usecentroid);}
-if(typeof exact.symbol.width=="number"){selem.setAttribute("width",exact.symbol.width);}
-eelem.appendChild(selem);}}}}},addSimpleLabelRenderer:function(renderElem,renderer){renderElem.setAttribute("field",renderer.field);var keys=['featureweight','howmanylabels','labelbufferratio','labelpriorities','labelweight','linelabelposition','rotationalangles'];for(var i=0,len=keys.length;i<len;i++){var key=keys[i];if(renderer[key]){renderElem.setAttribute(key,renderer[key]);}}
-if(renderer.symbol.type=="text"){var symbol=renderer.symbol;var selem=this.createElementNS("","TEXTSYMBOL");renderElem.appendChild(selem);var keys=this.fontStyleKeys;for(var i=0,len=keys.length;i<len;i++){var key=keys[i];if(symbol[key]){selem.setAttribute(key,renderer[key]);}}}},writePolygonGeometry:function(polygon){if(!(polygon instanceof OpenLayers.Geometry.Polygon)){throw{message:'Cannot write polygon geometry to ArcXML with an '+
-polygon.CLASS_NAME+' object.',geometry:polygon};}
-var polyElem=this.createElementNS("","POLYGON");for(var ln=0,lnlen=polygon.components.length;ln<lnlen;ln++){var ring=polygon.components[ln];var ringElem=this.createElementNS("","RING");for(var rn=0,rnlen=ring.components.length;rn<rnlen;rn++){var point=ring.components[rn];var pointElem=this.createElementNS("","POINT");pointElem.setAttribute("x",point.x);pointElem.setAttribute("y",point.y);ringElem.appendChild(pointElem);}
-polyElem.appendChild(ringElem);}
-return polyElem;},parseResponse:function(data){if(typeof data=="string"){var newData=new OpenLayers.Format.XML();data=newData.read(data);}
-var response=new OpenLayers.Format.ArcXML.Response();var errorNode=data.getElementsByTagName("ERROR");if(errorNode!=null&&errorNode.length>0){response.error=this.getChildValue(errorNode,"Unknown error.");}else{var responseNode=data.getElementsByTagName("RESPONSE");if(responseNode==null||responseNode.length==0){response.error="No RESPONSE tag found in ArcXML response.";return response;}
-var rtype=responseNode[0].firstChild.nodeName;if(rtype=="#text"){rtype=responseNode[0].firstChild.nextSibling.nodeName;}
-if(rtype=="IMAGE"){var envelopeNode=data.getElementsByTagName("ENVELOPE");var outputNode=data.getElementsByTagName("OUTPUT");if(envelopeNode==null||envelopeNode.length==0){response.error="No ENVELOPE tag found in ArcXML response.";}else if(outputNode==null||outputNode.length==0){response.error="No OUTPUT tag found in ArcXML response.";}else{var envAttr=this.parseAttributes(envelopeNode[0]);var outputAttr=this.parseAttributes(outputNode[0]);if(typeof outputAttr.type=="string"){response.image={envelope:envAttr,output:{type:outputAttr.type,data:this.getChildValue(outputNode[0])}};}else{response.image={envelope:envAttr,output:outputAttr};}}}else if(rtype=="FEATURES"){var features=responseNode[0].getElementsByTagName("FEATURES");var featureCount=features[0].getElementsByTagName("FEATURECOUNT");response.features.featurecount=featureCount[0].getAttribute("count");if(response.features.featurecount>0){var envelope=features[0].getElementsByTagName("ENVELOPE");response.features.envelope=this.parseAttributes(envelope[0],typeof(0));var featureList=features[0].getElementsByTagName("FEATURE");for(var fn=0;fn<featureList.length;fn++){var feature=new OpenLayers.Feature.Vector();var fields=featureList[fn].getElementsByTagName("FIELD");for(var fdn=0;fdn<fields.length;fdn++){var fieldName=fields[fdn].getAttribute("name");var fieldValue=fields[fdn].getAttribute("value");feature.attributes[fieldName]=fieldValue;}
-var geom=featureList[fn].getElementsByTagName("POLYGON");if(geom.length>0){var ring=geom[0].getElementsByTagName("RING");var polys=[];for(var rn=0;rn<ring.length;rn++){var linearRings=[];linearRings.push(this.parsePointGeometry(ring[rn]));var holes=ring[rn].getElementsByTagName("HOLE");for(var hn=0;hn<holes.length;hn++){linearRings.push(this.parsePointGeometry(holes[hn]));}
-holes=null;polys.push(new OpenLayers.Geometry.Polygon(linearRings));linearRings=null;}
-ring=null;if(polys.length==1){feature.geometry=polys[0];}else
-{feature.geometry=new OpenLayers.Geometry.MultiPolygon(polys);}}
-response.features.feature.push(feature);}}}else{response.error="Unidentified response type.";}}
-return response;},parseAttributes:function(node,type){var attributes={};for(var attr=0;attr<node.attributes.length;attr++){if(type=="number"){attributes[node.attributes[attr].nodeName]=parseFloat(node.attributes[attr].nodeValue);}else{attributes[node.attributes[attr].nodeName]=node.attributes[attr].nodeValue;}}
-return attributes;},parsePointGeometry:function(node){var ringPoints=[];var coords=node.getElementsByTagName("COORDS");if(coords.length>0){var coordArr=this.getChildValue(coords[0]);coordArr=coordArr.split(/;/);for(var cn=0;cn<coordArr.length;cn++){var coordItems=coordArr[cn].split(/ /);ringPoints.push(new OpenLayers.Geometry.Point(parseFloat(coordItems[0]),parseFloat(coordItems[1])));}
-coords=null;}else{var point=node.getElementsByTagName("POINT");if(point.length>0){for(var pn=0;pn<point.length;pn++){ringPoints.push(new OpenLayers.Geometry.Point(parseFloat(point[pn].getAttribute("x")),parseFloat(point[pn].getAttribute("y"))));}}
-point=null;}
-return new OpenLayers.Geometry.LinearRing(ringPoints);},CLASS_NAME:"OpenLayers.Format.ArcXML"});OpenLayers.Format.ArcXML.Request=OpenLayers.Class({initialize:function(params){var defaults={get_image:{properties:{background:null,draw:true,envelope:{minx:0,miny:0,maxx:0,maxy:0},featurecoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},filtercoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},imagesize:{height:0,width:0,dpi:96,printheight:0,printwidth:0,scalesymbols:false},layerlist:[],output:{baseurl:"",legendbaseurl:"",legendname:"",legendpath:"",legendurl:"",name:"",path:"",type:"jpg",url:""}}},get_feature:{layer:"",query:{isspatial:false,featurecoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},filtercoordsys:{id:0,string:"",datumtransformid:0,datumtransformstring:""},buffer:0,where:"",spatialfilter:{relation:"envelope_intersection",envelope:null}}},environment:{separators:{cs:" ",ts:";"}},layer:[],workspaces:[]};return OpenLayers.Util.extend(this,defaults);},CLASS_NAME:"OpenLayers.Format.ArcXML.Request"});OpenLayers.Format.ArcXML.Response=OpenLayers.Class({initialize:function(params){var defaults={image:{envelope:null,output:''},features:{featurecount:0,envelope:null,feature:[]},error:''};return OpenLayers.Util.extend(this,defaults);},CLASS_NAME:"OpenLayers.Format.ArcXML.Response"});OpenLayers.Format.GML=OpenLayers.Class(OpenLayers.Format.XML,{featureNS:"http://mapserver.gis.umn.edu/mapserver",featurePrefix:"feature",featureName:"featureMember",layerName:"features",geometryName:"geometry",collectionName:"FeatureCollection",gmlns:"http://www.opengis.net/gml",extractAttributes:true,xy:true,initialize:function(options){this.regExes={trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)};OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-var featureNodes=this.getElementsByTagNameNS(data.documentElement,this.gmlns,this.featureName);var features=[];for(var i=0;i<featureNodes.length;i++){var feature=this.parseFeature(featureNodes[i]);if(feature){features.push(feature);}}
-return features;},parseFeature:function(node){var order=["MultiPolygon","Polygon","MultiLineString","LineString","MultiPoint","Point","Envelope"];var type,nodeList,geometry,parser;for(var i=0;i<order.length;++i){type=order[i];nodeList=this.getElementsByTagNameNS(node,this.gmlns,type);if(nodeList.length>0){parser=this.parseGeometry[type.toLowerCase()];if(parser){geometry=parser.apply(this,[nodeList[0]]);if(this.internalProjection&&this.externalProjection){geometry.transform(this.externalProjection,this.internalProjection);}}else{OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{'geomType':type}));}
-break;}}
-var bounds;var boxNodes=this.getElementsByTagNameNS(node,this.gmlns,"Box");for(i=0;i<boxNodes.length;++i){var boxNode=boxNodes[i];var box=this.parseGeometry["box"].apply(this,[boxNode]);var parentNode=boxNode.parentNode;var parentName=parentNode.localName||parentNode.nodeName.split(":").pop();if(parentName==="boundedBy"){bounds=box;}else{geometry=box.toGeometry();}}
-var attributes;if(this.extractAttributes){attributes=this.parseAttributes(node);}
-var feature=new OpenLayers.Feature.Vector(geometry,attributes);feature.bounds=bounds;feature.gml={featureType:node.firstChild.nodeName.split(":")[1],featureNS:node.firstChild.namespaceURI,featureNSPrefix:node.firstChild.prefix};var childNode=node.firstChild;var fid;while(childNode){if(childNode.nodeType==1){fid=childNode.getAttribute("fid")||childNode.getAttribute("id");if(fid){break;}}
-childNode=childNode.nextSibling;}
-feature.fid=fid;return feature;},parseGeometry:{point:function(node){var nodeList,coordString;var coords=[];var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"pos");if(nodeList.length>0){coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);}
-if(coords.length==0){nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coordinates");if(nodeList.length>0){coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.removeSpace,"");coords=coordString.split(",");}}
-if(coords.length==0){nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coord");if(nodeList.length>0){var xList=this.getElementsByTagNameNS(nodeList[0],this.gmlns,"X");var yList=this.getElementsByTagNameNS(nodeList[0],this.gmlns,"Y");if(xList.length>0&&yList.length>0){coords=[xList[0].firstChild.nodeValue,yList[0].firstChild.nodeValue];}}}
-if(coords.length==2){coords[2]=null;}
-if(this.xy){return new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}
-else{return new OpenLayers.Geometry.Point(coords[1],coords[0],coords[2]);}},multipoint:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"Point");var components=[];if(nodeList.length>0){var point;for(var i=0;i<nodeList.length;++i){point=this.parseGeometry.point.apply(this,[nodeList[i]]);if(point){components.push(point);}}}
-return new OpenLayers.Geometry.MultiPoint(components);},linestring:function(node,ring){var nodeList,coordString;var coords=[];var points=[];nodeList=this.getElementsByTagNameNS(node,this.gmlns,"posList");if(nodeList.length>0){coordString=this.getChildValue(nodeList[0]);coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);var dim=parseInt(nodeList[0].getAttribute("dimension"));var j,x,y,z;for(var i=0;i<coords.length/dim;++i){j=i*dim;x=coords[j];y=coords[j+1];z=(dim==2)?null:coords[j+2];if(this.xy){points.push(new OpenLayers.Geometry.Point(x,y,z));}else{points.push(new OpenLayers.Geometry.Point(y,x,z));}}}
-if(coords.length==0){nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coordinates");if(nodeList.length>0){coordString=this.getChildValue(nodeList[0]);coordString=coordString.replace(this.regExes.trimSpace,"");coordString=coordString.replace(this.regExes.trimComma,",");var pointList=coordString.split(this.regExes.splitSpace);for(var i=0;i<pointList.length;++i){coords=pointList[i].split(",");if(coords.length==2){coords[2]=null;}
-if(this.xy){points.push(new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]));}else{points.push(new OpenLayers.Geometry.Point(coords[1],coords[0],coords[2]));}}}}
-var line=null;if(points.length!=0){if(ring){line=new OpenLayers.Geometry.LinearRing(points);}else{line=new OpenLayers.Geometry.LineString(points);}}
-return line;},multilinestring:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"LineString");var components=[];if(nodeList.length>0){var line;for(var i=0;i<nodeList.length;++i){line=this.parseGeometry.linestring.apply(this,[nodeList[i]]);if(line){components.push(line);}}}
-return new OpenLayers.Geometry.MultiLineString(components);},polygon:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"LinearRing");var components=[];if(nodeList.length>0){var ring;for(var i=0;i<nodeList.length;++i){ring=this.parseGeometry.linestring.apply(this,[nodeList[i],true]);if(ring){components.push(ring);}}}
-return new OpenLayers.Geometry.Polygon(components);},multipolygon:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"Polygon");var components=[];if(nodeList.length>0){var polygon;for(var i=0;i<nodeList.length;++i){polygon=this.parseGeometry.polygon.apply(this,[nodeList[i]]);if(polygon){components.push(polygon);}}}
-return new OpenLayers.Geometry.MultiPolygon(components);},envelope:function(node){var components=[];var coordString;var envelope;var lpoint=this.getElementsByTagNameNS(node,this.gmlns,"lowerCorner");if(lpoint.length>0){var coords=[];if(lpoint.length>0){coordString=lpoint[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);}
-if(coords.length==2){coords[2]=null;}
-if(this.xy){var lowerPoint=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{var lowerPoint=new OpenLayers.Geometry.Point(coords[1],coords[0],coords[2]);}}
-var upoint=this.getElementsByTagNameNS(node,this.gmlns,"upperCorner");if(upoint.length>0){var coords=[];if(upoint.length>0){coordString=upoint[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);}
-if(coords.length==2){coords[2]=null;}
-if(this.xy){var upperPoint=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{var upperPoint=new OpenLayers.Geometry.Point(coords[1],coords[0],coords[2]);}}
-if(lowerPoint&&upperPoint){components.push(new OpenLayers.Geometry.Point(lowerPoint.x,lowerPoint.y));components.push(new OpenLayers.Geometry.Point(upperPoint.x,lowerPoint.y));components.push(new OpenLayers.Geometry.Point(upperPoint.x,upperPoint.y));components.push(new OpenLayers.Geometry.Point(lowerPoint.x,upperPoint.y));components.push(new OpenLayers.Geometry.Point(lowerPoint.x,lowerPoint.y));var ring=new OpenLayers.Geometry.LinearRing(components);envelope=new OpenLayers.Geometry.Polygon([ring]);}
-return envelope;},box:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coordinates");var coordString;var coords,beginPoint=null,endPoint=null;if(nodeList.length>0){coordString=nodeList[0].firstChild.nodeValue;coords=coordString.split(" ");if(coords.length==2){beginPoint=coords[0].split(",");endPoint=coords[1].split(",");}}
-if(beginPoint!==null&&endPoint!==null){return new OpenLayers.Bounds(parseFloat(beginPoint[0]),parseFloat(beginPoint[1]),parseFloat(endPoint[0]),parseFloat(endPoint[1]));}}},parseAttributes:function(node){var attributes={};var childNode=node.firstChild;var children,i,child,grandchildren,grandchild,name,value;while(childNode){if(childNode.nodeType==1){children=childNode.childNodes;for(i=0;i<children.length;++i){child=children[i];if(child.nodeType==1){grandchildren=child.childNodes;if(grandchildren.length==1){grandchild=grandchildren[0];if(grandchild.nodeType==3||grandchild.nodeType==4){name=(child.prefix)?child.nodeName.split(":")[1]:child.nodeName;value=grandchild.nodeValue.replace(this.regExes.trimSpace,"");attributes[name]=value;}}else{attributes[child.nodeName.split(":").pop()]=null;}}}
-break;}
-childNode=childNode.nextSibling;}
-return attributes;},write:function(features){if(!(features instanceof Array)){features=[features];}
-var gml=this.createElementNS("http://www.opengis.net/wfs","wfs:"+this.collectionName);for(var i=0;i<features.length;i++){gml.appendChild(this.createFeatureXML(features[i]));}
-return OpenLayers.Format.XML.prototype.write.apply(this,[gml]);},createFeatureXML:function(feature){var geometry=feature.geometry;var geometryNode=this.buildGeometryNode(geometry);var geomContainer=this.createElementNS(this.featureNS,this.featurePrefix+":"+
-this.geometryName);geomContainer.appendChild(geometryNode);var featureNode=this.createElementNS(this.gmlns,"gml:"+this.featureName);var featureContainer=this.createElementNS(this.featureNS,this.featurePrefix+":"+
-this.layerName);var fid=feature.fid||feature.id;featureContainer.setAttribute("fid",fid);featureContainer.appendChild(geomContainer);for(var attr in feature.attributes){var attrText=this.createTextNode(feature.attributes[attr]);var nodename=attr.substring(attr.lastIndexOf(":")+1);var attrContainer=this.createElementNS(this.featureNS,this.featurePrefix+":"+
-nodename);attrContainer.appendChild(attrText);featureContainer.appendChild(attrContainer);}
-featureNode.appendChild(featureContainer);return featureNode;},buildGeometryNode:function(geometry){if(this.externalProjection&&this.internalProjection){geometry=geometry.clone();geometry.transform(this.internalProjection,this.externalProjection);}
-var className=geometry.CLASS_NAME;var type=className.substring(className.lastIndexOf(".")+1);var builder=this.buildGeometry[type.toLowerCase()];return builder.apply(this,[geometry]);},buildGeometry:{point:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:Point");gml.appendChild(this.buildCoordinatesNode(geometry));return gml;},multipoint:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:MultiPoint");var points=geometry.components;var pointMember,pointGeom;for(var i=0;i<points.length;i++){pointMember=this.createElementNS(this.gmlns,"gml:pointMember");pointGeom=this.buildGeometry.point.apply(this,[points[i]]);pointMember.appendChild(pointGeom);gml.appendChild(pointMember);}
-return gml;},linestring:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:LineString");gml.appendChild(this.buildCoordinatesNode(geometry));return gml;},multilinestring:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:MultiLineString");var lines=geometry.components;var lineMember,lineGeom;for(var i=0;i<lines.length;++i){lineMember=this.createElementNS(this.gmlns,"gml:lineStringMember");lineGeom=this.buildGeometry.linestring.apply(this,[lines[i]]);lineMember.appendChild(lineGeom);gml.appendChild(lineMember);}
-return gml;},linearring:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:LinearRing");gml.appendChild(this.buildCoordinatesNode(geometry));return gml;},polygon:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:Polygon");var rings=geometry.components;var ringMember,ringGeom,type;for(var i=0;i<rings.length;++i){type=(i==0)?"outerBoundaryIs":"innerBoundaryIs";ringMember=this.createElementNS(this.gmlns,"gml:"+type);ringGeom=this.buildGeometry.linearring.apply(this,[rings[i]]);ringMember.appendChild(ringGeom);gml.appendChild(ringMember);}
-return gml;},multipolygon:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:MultiPolygon");var polys=geometry.components;var polyMember,polyGeom;for(var i=0;i<polys.length;++i){polyMember=this.createElementNS(this.gmlns,"gml:polygonMember");polyGeom=this.buildGeometry.polygon.apply(this,[polys[i]]);polyMember.appendChild(polyGeom);gml.appendChild(polyMember);}
-return gml;},bounds:function(bounds){var gml=this.createElementNS(this.gmlns,"gml:Box");gml.appendChild(this.buildCoordinatesNode(bounds));return gml;}},buildCoordinatesNode:function(geometry){var coordinatesNode=this.createElementNS(this.gmlns,"gml:coordinates");coordinatesNode.setAttribute("decimal",".");coordinatesNode.setAttribute("cs",",");coordinatesNode.setAttribute("ts"," ");var parts=[];if(geometry instanceof OpenLayers.Bounds){parts.push(geometry.left+","+geometry.bottom);parts.push(geometry.right+","+geometry.top);}else{var points=(geometry.components)?geometry.components:[geometry];for(var i=0;i<points.length;i++){parts.push(points[i].x+","+points[i].y);}}
-var txtNode=this.createTextNode(parts.join(" "));coordinatesNode.appendChild(txtNode);return coordinatesNode;},CLASS_NAME:"OpenLayers.Format.GML"});OpenLayers.Format.GeoJSON=OpenLayers.Class(OpenLayers.Format.JSON,{ignoreExtraDims:false,initialize:function(options){OpenLayers.Format.JSON.prototype.initialize.apply(this,[options]);},read:function(json,type,filter){type=(type)?type:"FeatureCollection";var results=null;var obj=null;if(typeof json=="string"){obj=OpenLayers.Format.JSON.prototype.read.apply(this,[json,filter]);}else{obj=json;}
-if(!obj){OpenLayers.Console.error("Bad JSON: "+json);}else if(typeof(obj.type)!="string"){OpenLayers.Console.error("Bad GeoJSON - no type: "+json);}else if(this.isValidType(obj,type)){switch(type){case"Geometry":try{results=this.parseGeometry(obj);}catch(err){OpenLayers.Console.error(err);}
-break;case"Feature":try{results=this.parseFeature(obj);results.type="Feature";}catch(err){OpenLayers.Console.error(err);}
-break;case"FeatureCollection":results=[];switch(obj.type){case"Feature":try{results.push(this.parseFeature(obj));}catch(err){results=null;OpenLayers.Console.error(err);}
-break;case"FeatureCollection":for(var i=0,len=obj.features.length;i<len;++i){try{results.push(this.parseFeature(obj.features[i]));}catch(err){results=null;OpenLayers.Console.error(err);}}
-break;default:try{var geom=this.parseGeometry(obj);results.push(new OpenLayers.Feature.Vector(geom));}catch(err){results=null;OpenLayers.Console.error(err);}}
-break;}}
-return results;},isValidType:function(obj,type){var valid=false;switch(type){case"Geometry":if(OpenLayers.Util.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],obj.type)==-1){OpenLayers.Console.error("Unsupported geometry type: "+
-obj.type);}else{valid=true;}
-break;case"FeatureCollection":valid=true;break;default:if(obj.type==type){valid=true;}else{OpenLayers.Console.error("Cannot convert types from "+
-obj.type+" to "+type);}}
-return valid;},parseFeature:function(obj){var feature,geometry,attributes,bbox;attributes=(obj.properties)?obj.properties:{};bbox=(obj.geometry&&obj.geometry.bbox)||obj.bbox;try{geometry=this.parseGeometry(obj.geometry);}catch(err){throw err;}
-feature=new OpenLayers.Feature.Vector(geometry,attributes);if(bbox){feature.bounds=OpenLayers.Bounds.fromArray(bbox);}
-if(obj.id){feature.fid=obj.id;}
-return feature;},parseGeometry:function(obj){if(obj==null){return null;}
-var geometry,collection=false;if(obj.type=="GeometryCollection"){if(!(obj.geometries instanceof Array)){throw"GeometryCollection must have geometries array: "+obj;}
-var numGeom=obj.geometries.length;var components=new Array(numGeom);for(var i=0;i<numGeom;++i){components[i]=this.parseGeometry.apply(this,[obj.geometries[i]]);}
-geometry=new OpenLayers.Geometry.Collection(components);collection=true;}else{if(!(obj.coordinates instanceof Array)){throw"Geometry must have coordinates array: "+obj;}
-if(!this.parseCoords[obj.type.toLowerCase()]){throw"Unsupported geometry type: "+obj.type;}
-try{geometry=this.parseCoords[obj.type.toLowerCase()].apply(this,[obj.coordinates]);}catch(err){throw err;}}
-if(this.internalProjection&&this.externalProjection&&!collection){geometry.transform(this.externalProjection,this.internalProjection);}
-return geometry;},parseCoords:{"point":function(array){if(this.ignoreExtraDims==false&&array.length!=2){throw"Only 2D points are supported: "+array;}
-return new OpenLayers.Geometry.Point(array[0],array[1]);},"multipoint":function(array){var points=[];var p=null;for(var i=0,len=array.length;i<len;++i){try{p=this.parseCoords["point"].apply(this,[array[i]]);}catch(err){throw err;}
-points.push(p);}
-return new OpenLayers.Geometry.MultiPoint(points);},"linestring":function(array){var points=[];var p=null;for(var i=0,len=array.length;i<len;++i){try{p=this.parseCoords["point"].apply(this,[array[i]]);}catch(err){throw err;}
-points.push(p);}
-return new OpenLayers.Geometry.LineString(points);},"multilinestring":function(array){var lines=[];var l=null;for(var i=0,len=array.length;i<len;++i){try{l=this.parseCoords["linestring"].apply(this,[array[i]]);}catch(err){throw err;}
-lines.push(l);}
-return new OpenLayers.Geometry.MultiLineString(lines);},"polygon":function(array){var rings=[];var r,l;for(var i=0,len=array.length;i<len;++i){try{l=this.parseCoords["linestring"].apply(this,[array[i]]);}catch(err){throw err;}
-r=new OpenLayers.Geometry.LinearRing(l.components);rings.push(r);}
-return new OpenLayers.Geometry.Polygon(rings);},"multipolygon":function(array){var polys=[];var p=null;for(var i=0,len=array.length;i<len;++i){try{p=this.parseCoords["polygon"].apply(this,[array[i]]);}catch(err){throw err;}
-polys.push(p);}
-return new OpenLayers.Geometry.MultiPolygon(polys);},"box":function(array){if(array.length!=2){throw"GeoJSON box coordinates must have 2 elements";}
-return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(array[0][0],array[0][1]),new OpenLayers.Geometry.Point(array[1][0],array[0][1]),new OpenLayers.Geometry.Point(array[1][0],array[1][1]),new OpenLayers.Geometry.Point(array[0][0],array[1][1]),new OpenLayers.Geometry.Point(array[0][0],array[0][1])])]);}},write:function(obj,pretty){var geojson={"type":null};if(obj instanceof Array){geojson.type="FeatureCollection";var numFeatures=obj.length;geojson.features=new Array(numFeatures);for(var i=0;i<numFeatures;++i){var element=obj[i];if(!element instanceof OpenLayers.Feature.Vector){var msg="FeatureCollection only supports collections "+"of features: "+element;throw msg;}
-geojson.features[i]=this.extract.feature.apply(this,[element]);}}else if(obj.CLASS_NAME.indexOf("OpenLayers.Geometry")==0){geojson=this.extract.geometry.apply(this,[obj]);}else if(obj instanceof OpenLayers.Feature.Vector){geojson=this.extract.feature.apply(this,[obj]);if(obj.layer&&obj.layer.projection){geojson.crs=this.createCRSObject(obj);}}
-return OpenLayers.Format.JSON.prototype.write.apply(this,[geojson,pretty]);},createCRSObject:function(object){var proj=object.layer.projection.toString();var crs={};if(proj.match(/epsg:/i)){var code=parseInt(proj.substring(proj.indexOf(":")+1));if(code==4326){crs={"type":"OGC","properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}};}else{crs={"type":"EPSG","properties":{"code":code}};}}
-return crs;},extract:{'feature':function(feature){var geom=this.extract.geometry.apply(this,[feature.geometry]);return{"type":"Feature","id":feature.fid==null?feature.id:feature.fid,"properties":feature.attributes,"geometry":geom};},'geometry':function(geometry){if(geometry==null){return null;}
-if(this.internalProjection&&this.externalProjection){geometry=geometry.clone();geometry.transform(this.internalProjection,this.externalProjection);}
-var geometryType=geometry.CLASS_NAME.split('.')[2];var data=this.extract[geometryType.toLowerCase()].apply(this,[geometry]);var json;if(geometryType=="Collection"){json={"type":"GeometryCollection","geometries":data};}else{json={"type":geometryType,"coordinates":data};}
-return json;},'point':function(point){return[point.x,point.y];},'multipoint':function(multipoint){var array=[];for(var i=0,len=multipoint.components.length;i<len;++i){array.push(this.extract.point.apply(this,[multipoint.components[i]]));}
-return array;},'linestring':function(linestring){var array=[];for(var i=0,len=linestring.components.length;i<len;++i){array.push(this.extract.point.apply(this,[linestring.components[i]]));}
-return array;},'multilinestring':function(multilinestring){var array=[];for(var i=0,len=multilinestring.components.length;i<len;++i){array.push(this.extract.linestring.apply(this,[multilinestring.components[i]]));}
-return array;},'polygon':function(polygon){var array=[];for(var i=0,len=polygon.components.length;i<len;++i){array.push(this.extract.linestring.apply(this,[polygon.components[i]]));}
-return array;},'multipolygon':function(multipolygon){var array=[];for(var i=0,len=multipolygon.components.length;i<len;++i){array.push(this.extract.polygon.apply(this,[multipolygon.components[i]]));}
-return array;},'collection':function(collection){var len=collection.components.length;var array=new Array(len);for(var i=0;i<len;++i){array[i]=this.extract.geometry.apply(this,[collection.components[i]]);}
-return array;}},CLASS_NAME:"OpenLayers.Format.GeoJSON"});OpenLayers.Format.ArcXML.Features=OpenLayers.Class(OpenLayers.Format.XML,{initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){var axl=new OpenLayers.Format.ArcXML();var parsed=axl.read(data);return parsed.features.feature;}});if(!OpenLayers.Format.GML){OpenLayers.Format.GML={};}
-OpenLayers.Format.GML.Base=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",wfs:"http://www.opengis.net/wfs"},defaultPrefix:"gml",schemaLocation:null,featureType:null,featureNS:null,geometryName:"geometry",extractAttributes:true,srsName:null,xy:true,geometryTypes:null,singleFeatureType:null,regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);this.setGeometryTypes();if(options&&options.featureNS){this.setNamespace("feature",options.featureNS);}
-this.singleFeatureType=!options||(typeof options.featureType==="string");},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-if(data&&data.nodeType==9){data=data.documentElement;}
-var features=[];this.readNode(data,{features:features});if(features.length==0){var elements=this.getElementsByTagNameNS(data,this.namespaces.gml,"featureMember");if(elements.length){for(var i=0,len=elements.length;i<len;++i){this.readNode(elements[i],{features:features});}}else{var elements=this.getElementsByTagNameNS(data,this.namespaces.gml,"featureMembers");if(elements.length){this.readNode(elements[0],{features:features});}}}
-return features;},readers:{"gml":{"featureMember":function(node,obj){this.readChildNodes(node,obj);},"featureMembers":function(node,obj){this.readChildNodes(node,obj);},"name":function(node,obj){obj.name=this.getChildValue(node);},"boundedBy":function(node,obj){var container={};this.readChildNodes(node,container);if(container.components&&container.components.length>0){obj.bounds=container.components[0];}},"Point":function(node,container){var obj={points:[]};this.readChildNodes(node,obj);if(!container.components){container.components=[];}
-container.components.push(obj.points[0]);},"coordinates":function(node,obj){var str=this.getChildValue(node).replace(this.regExes.trimSpace,"");str=str.replace(this.regExes.trimComma,",");var pointList=str.split(this.regExes.splitSpace);var coords;var numPoints=pointList.length;var points=new Array(numPoints);for(var i=0;i<numPoints;++i){coords=pointList[i].split(",");if(this.xy){points[i]=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{points[i]=new OpenLayers.Geometry.Point(coords[1],coords[0],coords[2]);}}
-obj.points=points;},"coord":function(node,obj){var coord={};this.readChildNodes(node,coord);if(!obj.points){obj.points=[];}
-obj.points.push(new OpenLayers.Geometry.Point(coord.x,coord.y,coord.z));},"X":function(node,coord){coord.x=this.getChildValue(node);},"Y":function(node,coord){coord.y=this.getChildValue(node);},"Z":function(node,coord){coord.z=this.getChildValue(node);},"MultiPoint":function(node,container){var obj={components:[]};this.readChildNodes(node,obj);container.components=[new OpenLayers.Geometry.MultiPoint(obj.components)];},"pointMember":function(node,obj){this.readChildNodes(node,obj);},"LineString":function(node,container){var obj={};this.readChildNodes(node,obj);if(!container.components){container.components=[];}
-container.components.push(new OpenLayers.Geometry.LineString(obj.points));},"MultiLineString":function(node,container){var obj={components:[]};this.readChildNodes(node,obj);container.components=[new OpenLayers.Geometry.MultiLineString(obj.components)];},"lineStringMember":function(node,obj){this.readChildNodes(node,obj);},"Polygon":function(node,container){var obj={outer:null,inner:[]};this.readChildNodes(node,obj);obj.inner.unshift(obj.outer);if(!container.components){container.components=[];}
-container.components.push(new OpenLayers.Geometry.Polygon(obj.inner));},"LinearRing":function(node,obj){var container={};this.readChildNodes(node,container);obj.components=[new OpenLayers.Geometry.LinearRing(container.points)];},"MultiPolygon":function(node,container){var obj={components:[]};this.readChildNodes(node,obj);container.components=[new OpenLayers.Geometry.MultiPolygon(obj.components)];},"polygonMember":function(node,obj){this.readChildNodes(node,obj);},"GeometryCollection":function(node,container){var obj={components:[]};this.readChildNodes(node,obj);container.components=[new OpenLayers.Geometry.Collection(obj.components)];},"geometryMember":function(node,obj){this.readChildNodes(node,obj);}},"feature":{"*":function(node,obj){var name;var local=node.localName||node.nodeName.split(":").pop();if(obj.features){if(!this.singleFeatureType&&(OpenLayers.Util.indexOf(this.featureType,local)!==-1)){name="_typeName";}else if(local===this.featureType){name="_typeName";}}else{if(node.childNodes.length==0||(node.childNodes.length==1&&node.firstChild.nodeType==3)){if(this.extractAttributes){name="_attribute";}}else{name="_geometry";}}
-if(name){this.readers.feature[name].apply(this,[node,obj]);}},"_typeName":function(node,obj){var container={components:[],attributes:{}};this.readChildNodes(node,container);if(container.name){container.attributes.name=container.name;}
-var feature=new OpenLayers.Feature.Vector(container.components[0],container.attributes);if(!this.singleFeatureType){feature.type=node.nodeName.split(":").pop();feature.namespace=node.namespaceURI;}
-var fid=node.getAttribute("fid")||this.getAttributeNS(node,this.namespaces["gml"],"id");if(fid){feature.fid=fid;}
-if(this.internalProjection&&this.externalProjection&&feature.geometry){feature.geometry.transform(this.externalProjection,this.internalProjection);}
-if(container.bounds){feature.bounds=container.bounds;}
-obj.features.push(feature);},"_geometry":function(node,obj){this.readChildNodes(node,obj);},"_attribute":function(node,obj){var local=node.localName||node.nodeName.split(":").pop();var value=this.getChildValue(node);obj.attributes[local]=value;}},"wfs":{"FeatureCollection":function(node,obj){this.readChildNodes(node,obj);}}},write:function(features){var name;if(features instanceof Array){name="featureMembers";}else{name="featureMember";}
-var root=this.writeNode("gml:"+name,features);this.setAttributeNS(root,this.namespaces["xsi"],"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[root]);},writers:{"gml":{"featureMember":function(feature){var node=this.createElementNSPlus("gml:featureMember");this.writeNode("feature:_typeName",feature,node);return node;},"MultiPoint":function(geometry){var node=this.createElementNSPlus("gml:MultiPoint");for(var i=0;i<geometry.components.length;++i){this.writeNode("pointMember",geometry.components[i],node);}
-return node;},"pointMember":function(geometry){var node=this.createElementNSPlus("gml:pointMember");this.writeNode("Point",geometry,node);return node;},"MultiLineString":function(geometry){var node=this.createElementNSPlus("gml:MultiLineString");for(var i=0;i<geometry.components.length;++i){this.writeNode("lineStringMember",geometry.components[i],node);}
-return node;},"lineStringMember":function(geometry){var node=this.createElementNSPlus("gml:lineStringMember");this.writeNode("LineString",geometry,node);return node;},"MultiPolygon":function(geometry){var node=this.createElementNSPlus("gml:MultiPolygon");for(var i=0;i<geometry.components.length;++i){this.writeNode("polygonMember",geometry.components[i],node);}
-return node;},"polygonMember":function(geometry){var node=this.createElementNSPlus("gml:polygonMember");this.writeNode("Polygon",geometry,node);return node;},"GeometryCollection":function(geometry){var node=this.createElementNSPlus("gml:GeometryCollection");for(var i=0,len=geometry.components.length;i<len;++i){this.writeNode("geometryMember",geometry.components[i],node);}
-return node;},"geometryMember":function(geometry){var node=this.createElementNSPlus("gml:geometryMember");var child=this.writeNode("feature:_geometry",geometry);node.appendChild(child.firstChild);return node;}},"feature":{"_typeName":function(feature){var node=this.createElementNSPlus("feature:"+this.featureType,{attributes:{fid:feature.fid}});if(feature.geometry){this.writeNode("feature:_geometry",feature.geometry,node);}
-for(var name in feature.attributes){var value=feature.attributes[name];if(value!=null){this.writeNode("feature:_attribute",{name:name,value:value},node);}}
-return node;},"_geometry":function(geometry){if(this.externalProjection&&this.internalProjection){geometry=geometry.clone().transform(this.internalProjection,this.externalProjection);}
-var node=this.createElementNSPlus("feature:"+this.geometryName);var type=this.geometryTypes[geometry.CLASS_NAME];var child=this.writeNode("gml:"+type,geometry,node);if(this.srsName){child.setAttribute("srsName",this.srsName);}
-return node;},"_attribute":function(obj){return this.createElementNSPlus("feature:"+obj.name,{value:obj.value});}},"wfs":{"FeatureCollection":function(features){var node=this.createElementNSPlus("wfs:FeatureCollection");for(var i=0,len=features.length;i<len;++i){this.writeNode("gml:featureMember",features[i],node);}
-return node;}}},setGeometryTypes:function(){this.geometryTypes={"OpenLayers.Geometry.Point":"Point","OpenLayers.Geometry.MultiPoint":"MultiPoint","OpenLayers.Geometry.LineString":"LineString","OpenLayers.Geometry.MultiLineString":"MultiLineString","OpenLayers.Geometry.Polygon":"Polygon","OpenLayers.Geometry.MultiPolygon":"MultiPolygon","OpenLayers.Geometry.Collection":"GeometryCollection"};},CLASS_NAME:"OpenLayers.Format.GML.Base"});OpenLayers.Format.WFS=OpenLayers.Class(OpenLayers.Format.GML,{layer:null,wfsns:"http://www.opengis.net/wfs",ogcns:"http://www.opengis.net/ogc",initialize:function(options,layer){OpenLayers.Format.GML.prototype.initialize.apply(this,[options]);this.layer=layer;if(this.layer.featureNS){this.featureNS=this.layer.featureNS;}
-if(this.layer.options.geometry_column){this.geometryName=this.layer.options.geometry_column;}
-if(this.layer.options.typename){this.featureName=this.layer.options.typename;}},write:function(features){var transaction=this.createElementNS(this.wfsns,'wfs:Transaction');transaction.setAttribute("version","1.0.0");transaction.setAttribute("service","WFS");for(var i=0;i<features.length;i++){switch(features[i].state){case OpenLayers.State.INSERT:transaction.appendChild(this.insert(features[i]));break;case OpenLayers.State.UPDATE:transaction.appendChild(this.update(features[i]));break;case OpenLayers.State.DELETE:transaction.appendChild(this.remove(features[i]));break;}}
-return OpenLayers.Format.XML.prototype.write.apply(this,[transaction]);},createFeatureXML:function(feature){var geometryNode=this.buildGeometryNode(feature.geometry);var geomContainer=this.createElementNS(this.featureNS,"feature:"+this.geometryName);geomContainer.appendChild(geometryNode);var featureContainer=this.createElementNS(this.featureNS,"feature:"+this.featureName);featureContainer.appendChild(geomContainer);for(var attr in feature.attributes){var attrText=this.createTextNode(feature.attributes[attr]);var nodename=attr;if(attr.search(":")!=-1){nodename=attr.split(":")[1];}
-var attrContainer=this.createElementNS(this.featureNS,"feature:"+nodename);attrContainer.appendChild(attrText);featureContainer.appendChild(attrContainer);}
-return featureContainer;},insert:function(feature){var insertNode=this.createElementNS(this.wfsns,'wfs:Insert');insertNode.appendChild(this.createFeatureXML(feature));return insertNode;},update:function(feature){if(!feature.fid){OpenLayers.Console.userError(OpenLayers.i18n("noFID"));}
-var updateNode=this.createElementNS(this.wfsns,'wfs:Update');updateNode.setAttribute("typeName",this.featurePrefix+':'+this.featureName);updateNode.setAttribute("xmlns:"+this.featurePrefix,this.featureNS);var propertyNode=this.createElementNS(this.wfsns,'wfs:Property');var nameNode=this.createElementNS(this.wfsns,'wfs:Name');var txtNode=this.createTextNode(this.geometryName);nameNode.appendChild(txtNode);propertyNode.appendChild(nameNode);var valueNode=this.createElementNS(this.wfsns,'wfs:Value');var geometryNode=this.buildGeometryNode(feature.geometry);if(feature.layer){geometryNode.setAttribute("srsName",feature.layer.projection.getCode());}
-valueNode.appendChild(geometryNode);propertyNode.appendChild(valueNode);updateNode.appendChild(propertyNode);for(var propName in feature.attributes){propertyNode=this.createElementNS(this.wfsns,'wfs:Property');nameNode=this.createElementNS(this.wfsns,'wfs:Name');nameNode.appendChild(this.createTextNode(propName));propertyNode.appendChild(nameNode);valueNode=this.createElementNS(this.wfsns,'wfs:Value');valueNode.appendChild(this.createTextNode(feature.attributes[propName]));propertyNode.appendChild(valueNode);updateNode.appendChild(propertyNode);}
-var filterNode=this.createElementNS(this.ogcns,'ogc:Filter');var filterIdNode=this.createElementNS(this.ogcns,'ogc:FeatureId');filterIdNode.setAttribute("fid",feature.fid);filterNode.appendChild(filterIdNode);updateNode.appendChild(filterNode);return updateNode;},remove:function(feature){if(!feature.fid){OpenLayers.Console.userError(OpenLayers.i18n("noFID"));return false;}
-var deleteNode=this.createElementNS(this.wfsns,'wfs:Delete');deleteNode.setAttribute("typeName",this.featurePrefix+':'+this.featureName);deleteNode.setAttribute("xmlns:"+this.featurePrefix,this.featureNS);var filterNode=this.createElementNS(this.ogcns,'ogc:Filter');var filterIdNode=this.createElementNS(this.ogcns,'ogc:FeatureId');filterIdNode.setAttribute("fid",feature.fid);filterNode.appendChild(filterIdNode);deleteNode.appendChild(filterNode);return deleteNode;},destroy:function(){this.layer=null;},CLASS_NAME:"OpenLayers.Format.WFS"});OpenLayers.Layer.ArcIMS=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{ClientVersion:"9.2",ServiceName:''},tileSize:null,featureCoordSys:"4326",filterCoordSys:"4326",layers:null,async:true,name:"ArcIMS",isBaseLayer:true,DEFAULT_OPTIONS:{tileSize:new OpenLayers.Size(512,512),featureCoordSys:"4326",filterCoordSys:"4326",layers:null,isBaseLayer:true,async:true,name:"ArcIMS"},initialize:function(name,url,options){this.tileSize=new OpenLayers.Size(512,512);this.params=OpenLayers.Util.applyDefaults({ServiceName:options.serviceName},this.DEFAULT_PARAMS);this.options=OpenLayers.Util.applyDefaults(options,this.DEFAULT_OPTIONS);OpenLayers.Layer.Grid.prototype.initialize.apply(this,[name,url,this.params,options]);if(this.transparent){if(!this.isBaseLayer){this.isBaseLayer=false;}
-if(this.format=="image/jpeg"){this.format=OpenLayers.Util.alphaHack()?"image/gif":"image/png";}}
-if(this.options.layers===null){this.options.layers=[];}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);},getURL:function(bounds){var url="";bounds=this.adjustBounds(bounds);var axlReq=new OpenLayers.Format.ArcXML(OpenLayers.Util.extend(this.options,{requesttype:"image",envelope:bounds.toArray(),tileSize:this.tileSize}));var req=new OpenLayers.Request.POST({url:this.getFullRequestString(),data:axlReq.write(),async:false});if(req!=null){var doc=req.responseXML;if(!doc||!doc.documentElement){doc=req.responseText;}
-var axlResp=new OpenLayers.Format.ArcXML();var arcxml=axlResp.read(doc);url=this.getUrlOrImage(arcxml.image.output);}
-return url;},getURLasync:function(bounds,scope,prop,callback){bounds=this.adjustBounds(bounds);var axlReq=new OpenLayers.Format.ArcXML(OpenLayers.Util.extend(this.options,{requesttype:"image",envelope:bounds.toArray(),tileSize:this.tileSize}));OpenLayers.Request.POST({url:this.getFullRequestString(),async:true,data:axlReq.write(),callback:function(req){var doc=req.responseXML;if(!doc||!doc.documentElement){doc=req.responseText;}
-var axlResp=new OpenLayers.Format.ArcXML();var arcxml=axlResp.read(doc);scope[prop]=this.getUrlOrImage(arcxml.image.output);callback.apply(scope);},scope:this});},getUrlOrImage:function(output){var ret="";if(output.url){ret=output.url;}else if(output.data){ret="data:image/"+output.type+";base64,"+output.data;}
-return ret;},setLayerQuery:function(id,querydef){for(var lyr=0;lyr<this.options.layers.length;lyr++){if(id==this.options.layers[lyr].id){this.options.layers[lyr].query=querydef;return;}}
-this.options.layers.push({id:id,visible:true,query:querydef});},getFeatureInfo:function(geometry,layer,options){var buffer=options.buffer||1;var callback=options.callback||function(){};var scope=options.scope||window;var requestOptions={};OpenLayers.Util.extend(requestOptions,this.options);requestOptions.requesttype="feature";if(geometry instanceof OpenLayers.LonLat){requestOptions.polygon=null;requestOptions.envelope=[geometry.lon-buffer,geometry.lat-buffer,geometry.lon+buffer,geometry.lat+buffer];}else if(geometry instanceof OpenLayers.Geometry.Polygon){requestOptions.envelope=null;requestOptions.polygon=geometry;}
-var arcxml=new OpenLayers.Format.ArcXML(requestOptions);OpenLayers.Util.extend(arcxml.request.get_feature,options);arcxml.request.get_feature.layer=layer.id;if(typeof layer.query.accuracy=="number"){arcxml.request.get_feature.query.accuracy=layer.query.accuracy;}else{var mapCenter=this.map.getCenter();var viewPx=this.map.getViewPortPxFromLonLat(mapCenter);viewPx.x++;var mapOffCenter=this.map.getLonLatFromPixel(viewPx);arcxml.request.get_feature.query.accuracy=mapOffCenter.lon-mapCenter.lon;}
-arcxml.request.get_feature.query.where=layer.query.where;arcxml.request.get_feature.query.spatialfilter.relation="area_intersection";OpenLayers.Request.POST({url:this.getFullRequestString({'CustomService':'Query'}),data:arcxml.write(),callback:function(request){var response=arcxml.parseResponse(request.responseText);if(!arcxml.iserror()){callback.call(scope,response.features);}else{callback.call(scope,null);}}});},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.ArcIMS(this.name,this.url,this.getOptions());}
-obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},CLASS_NAME:"OpenLayers.Layer.ArcIMS"});OpenLayers.Format.GML.v2=OpenLayers.Class(OpenLayers.Format.GML.Base,{schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",initialize:function(options){OpenLayers.Format.GML.Base.prototype.initialize.apply(this,[options]);},readers:{"gml":OpenLayers.Util.applyDefaults({"outerBoundaryIs":function(node,container){var obj={};this.readChildNodes(node,obj);container.outer=obj.components[0];},"innerBoundaryIs":function(node,container){var obj={};this.readChildNodes(node,obj);container.inner.push(obj.components[0]);},"Box":function(node,container){var obj={};this.readChildNodes(node,obj);if(!container.components){container.components=[];}
-var min=obj.points[0];var max=obj.points[1];container.components.push(new OpenLayers.Bounds(min.x,min.y,max.x,max.y));}},OpenLayers.Format.GML.Base.prototype.readers["gml"]),"feature":OpenLayers.Format.GML.Base.prototype.readers["feature"],"wfs":OpenLayers.Format.GML.Base.prototype.readers["wfs"]},write:function(features){var name;if(features instanceof Array){name="wfs:FeatureCollection";}else{name="gml:featureMember";}
-var root=this.writeNode(name,features);this.setAttributeNS(root,this.namespaces["xsi"],"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[root]);},writers:{"gml":OpenLayers.Util.applyDefaults({"Point":function(geometry){var node=this.createElementNSPlus("gml:Point");this.writeNode("coordinates",[geometry],node);return node;},"coordinates":function(points){var numPoints=points.length;var parts=new Array(numPoints);var point;for(var i=0;i<numPoints;++i){point=points[i];if(this.xy){parts[i]=point.x+","+point.y;}else{parts[i]=point.y+","+point.x;}
-if(point.z!=undefined){parts[i]+=","+point.z;}}
-return this.createElementNSPlus("gml:coordinates",{attributes:{decimal:".",cs:",",ts:" "},value:(numPoints==1)?parts[0]:parts.join(" ")});},"LineString":function(geometry){var node=this.createElementNSPlus("gml:LineString");this.writeNode("coordinates",geometry.components,node);return node;},"Polygon":function(geometry){var node=this.createElementNSPlus("gml:Polygon");this.writeNode("outerBoundaryIs",geometry.components[0],node);for(var i=1;i<geometry.components.length;++i){this.writeNode("innerBoundaryIs",geometry.components[i],node);}
-return node;},"outerBoundaryIs":function(ring){var node=this.createElementNSPlus("gml:outerBoundaryIs");this.writeNode("LinearRing",ring,node);return node;},"innerBoundaryIs":function(ring){var node=this.createElementNSPlus("gml:innerBoundaryIs");this.writeNode("LinearRing",ring,node);return node;},"LinearRing":function(ring){var node=this.createElementNSPlus("gml:LinearRing");this.writeNode("coordinates",ring.components,node);return node;},"Box":function(bounds){var node=this.createElementNSPlus("gml:Box");this.writeNode("coordinates",[{x:bounds.left,y:bounds.bottom},{x:bounds.right,y:bounds.top}],node);if(this.srsName){node.setAttribute("srsName",this.srsName);}
-return node;}},OpenLayers.Format.GML.Base.prototype.writers["gml"]),"feature":OpenLayers.Format.GML.Base.prototype.writers["feature"],"wfs":OpenLayers.Format.GML.Base.prototype.writers["wfs"]},CLASS_NAME:"OpenLayers.Format.GML.v2"});OpenLayers.Format.GML.v3=OpenLayers.Class(OpenLayers.Format.GML.Base,{schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",curve:false,multiCurve:true,surface:false,multiSurface:true,initialize:function(options){OpenLayers.Format.GML.Base.prototype.initialize.apply(this,[options]);},readers:{"gml":OpenLayers.Util.applyDefaults({"featureMembers":function(node,obj){this.readChildNodes(node,obj);},"Curve":function(node,container){var obj={points:[]};this.readChildNodes(node,obj);if(!container.components){container.components=[];}
-container.components.push(new OpenLayers.Geometry.LineString(obj.points));},"segments":function(node,obj){this.readChildNodes(node,obj);},"LineStringSegment":function(node,container){var obj={};this.readChildNodes(node,obj);if(obj.points){Array.prototype.push.apply(container.points,obj.points);}},"pos":function(node,obj){var str=this.getChildValue(node).replace(this.regExes.trimSpace,"");var coords=str.split(this.regExes.splitSpace);var point;if(this.xy){point=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{point=new OpenLayers.Geometry.Point(coords[1],coords[0],coords[2]);}
-obj.points=[point];},"posList":function(node,obj){var str=this.getChildValue(node).replace(this.regExes.trimSpace,"");var coords=str.split(this.regExes.splitSpace);var dim=parseInt(node.getAttribute("dimension"))||2;var j,x,y,z;var numPoints=coords.length/dim;var points=new Array(numPoints);for(var i=0,len=coords.length;i<len;i+=dim){x=coords[i];y=coords[i+1];z=(dim==2)?undefined:coords[i+2];if(this.xy){points[i/dim]=new OpenLayers.Geometry.Point(x,y,z);}else{points[i/dim]=new OpenLayers.Geometry.Point(y,x,z);}}
-obj.points=points;},"Surface":function(node,obj){this.readChildNodes(node,obj);},"patches":function(node,obj){this.readChildNodes(node,obj);},"PolygonPatch":function(node,obj){this.readers.gml.Polygon.apply(this,[node,obj]);},"exterior":function(node,container){var obj={};this.readChildNodes(node,obj);container.outer=obj.components[0];},"interior":function(node,container){var obj={};this.readChildNodes(node,obj);container.inner.push(obj.components[0]);},"MultiCurve":function(node,container){var obj={components:[]};this.readChildNodes(node,obj);if(obj.components.length>0){container.components=[new OpenLayers.Geometry.MultiLineString(obj.components)];}},"curveMember":function(node,obj){this.readChildNodes(node,obj);},"MultiSurface":function(node,container){var obj={components:[]};this.readChildNodes(node,obj);if(obj.components.length>0){container.components=[new OpenLayers.Geometry.MultiPolygon(obj.components)];}},"surfaceMember":function(node,obj){this.readChildNodes(node,obj);},"surfaceMembers":function(node,obj){this.readChildNodes(node,obj);},"pointMembers":function(node,obj){this.readChildNodes(node,obj);},"lineStringMembers":function(node,obj){this.readChildNodes(node,obj);},"polygonMembers":function(node,obj){this.readChildNodes(node,obj);},"geometryMembers":function(node,obj){this.readChildNodes(node,obj);},"Envelope":function(node,container){var obj={points:new Array(2)};this.readChildNodes(node,obj);if(!container.components){container.components=[];}
-var min=obj.points[0];var max=obj.points[1];container.components.push(new OpenLayers.Bounds(min.x,min.y,max.x,max.y));},"lowerCorner":function(node,container){var obj={};this.readers.gml.pos.apply(this,[node,obj]);container.points[0]=obj.points[0];},"upperCorner":function(node,container){var obj={};this.readers.gml.pos.apply(this,[node,obj]);container.points[1]=obj.points[0];}},OpenLayers.Format.GML.Base.prototype.readers["gml"]),"feature":OpenLayers.Format.GML.Base.prototype.readers["feature"],"wfs":OpenLayers.Format.GML.Base.prototype.readers["wfs"]},write:function(features){var name;if(features instanceof Array){name="featureMembers";}else{name="featureMember";}
-var root=this.writeNode("gml:"+name,features);this.setAttributeNS(root,this.namespaces["xsi"],"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[root]);},writers:{"gml":OpenLayers.Util.applyDefaults({"featureMembers":function(features){var node=this.createElementNSPlus("gml:featureMembers");for(var i=0,len=features.length;i<len;++i){this.writeNode("feature:_typeName",features[i],node);}
-return node;},"Point":function(geometry){var node=this.createElementNSPlus("gml:Point");this.writeNode("pos",geometry,node);return node;},"pos":function(point){var pos=(this.xy)?(point.x+" "+point.y):(point.y+" "+point.x);return this.createElementNSPlus("gml:pos",{value:pos});},"LineString":function(geometry){var node=this.createElementNSPlus("gml:LineString");this.writeNode("posList",geometry.components,node);return node;},"Curve":function(geometry){var node=this.createElementNSPlus("gml:Curve");this.writeNode("segments",geometry,node);return node;},"segments":function(geometry){var node=this.createElementNSPlus("gml:segments");this.writeNode("LineStringSegment",geometry,node);return node;},"LineStringSegment":function(geometry){var node=this.createElementNSPlus("gml:LineStringSegment");this.writeNode("posList",geometry.components,node);return node;},"posList":function(points){var len=points.length;var parts=new Array(len);var point;for(var i=0;i<len;++i){point=points[i];if(this.xy){parts[i]=point.x+" "+point.y;}else{parts[i]=point.y+" "+point.x;}}
-return this.createElementNSPlus("gml:posList",{value:parts.join(" ")});},"Surface":function(geometry){var node=this.createElementNSPlus("gml:Surface");this.writeNode("patches",geometry,node);return node;},"patches":function(geometry){var node=this.createElementNSPlus("gml:patches");this.writeNode("PolygonPatch",geometry,node);return node;},"PolygonPatch":function(geometry){var node=this.createElementNSPlus("gml:PolygonPatch",{attributes:{interpolation:"planar"}});this.writeNode("exterior",geometry.components[0],node);for(var i=1,len=geometry.components.length;i<len;++i){this.writeNode("interior",geometry.components[i],node);}
-return node;},"Polygon":function(geometry){var node=this.createElementNSPlus("gml:Polygon");this.writeNode("exterior",geometry.components[0],node);for(var i=1,len=geometry.components.length;i<len;++i){this.writeNode("interior",geometry.components[i],node);}
-return node;},"exterior":function(ring){var node=this.createElementNSPlus("gml:exterior");this.writeNode("LinearRing",ring,node);return node;},"interior":function(ring){var node=this.createElementNSPlus("gml:interior");this.writeNode("LinearRing",ring,node);return node;},"LinearRing":function(ring){var node=this.createElementNSPlus("gml:LinearRing");this.writeNode("posList",ring.components,node);return node;},"MultiCurve":function(geometry){var node=this.createElementNSPlus("gml:MultiCurve");for(var i=0,len=geometry.components.length;i<len;++i){this.writeNode("curveMember",geometry.components[i],node);}
-return node;},"curveMember":function(geometry){var node=this.createElementNSPlus("gml:curveMember");if(this.curve){this.writeNode("Curve",geometry,node);}else{this.writeNode("LineString",geometry,node);}
-return node;},"MultiSurface":function(geometry){var node=this.createElementNSPlus("gml:MultiSurface");for(var i=0,len=geometry.components.length;i<len;++i){this.writeNode("surfaceMember",geometry.components[i],node);}
-return node;},"surfaceMember":function(polygon){var node=this.createElementNSPlus("gml:surfaceMember");if(this.surface){this.writeNode("Surface",polygon,node);}else{this.writeNode("Polygon",polygon,node);}
-return node;},"Envelope":function(bounds){var node=this.createElementNSPlus("gml:Envelope");this.writeNode("lowerCorner",bounds,node);this.writeNode("upperCorner",bounds,node);if(this.srsName){node.setAttribute("srsName",this.srsName);}
-return node;},"lowerCorner":function(bounds){var pos=(this.xy)?(bounds.left+" "+bounds.bottom):(bounds.bottom+" "+bounds.left);return this.createElementNSPlus("gml:lowerCorner",{value:pos});},"upperCorner":function(bounds){var pos=(this.xy)?(bounds.right+" "+bounds.top):(bounds.top+" "+bounds.right);return this.createElementNSPlus("gml:upperCorner",{value:pos});}},OpenLayers.Format.GML.Base.prototype.writers["gml"]),"feature":OpenLayers.Format.GML.Base.prototype.writers["feature"],"wfs":OpenLayers.Format.GML.Base.prototype.writers["wfs"]},setGeometryTypes:function(){this.geometryTypes={"OpenLayers.Geometry.Point":"Point","OpenLayers.Geometry.MultiPoint":"MultiPoint","OpenLayers.Geometry.LineString":(this.curve===true)?"Curve":"LineString","OpenLayers.Geometry.MultiLineString":(this.multiCurve===false)?"MultiLineString":"MultiCurve","OpenLayers.Geometry.Polygon":(this.surface===true)?"Surface":"Polygon","OpenLayers.Geometry.MultiPolygon":(this.multiSurface===false)?"MultiPolygon":"MultiSurface","OpenLayers.Geometry.Collection":"GeometryCollection"};},CLASS_NAME:"OpenLayers.Format.GML.v3"});OpenLayers.Format.Atom=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{atom:"http://www.w3.org/2005/Atom",georss:"http://www.georss.org/georss"},feedTitle:"untitled",defaultEntryTitle:"untitled",gmlParser:null,xy:false,initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(doc){if(typeof doc=="string"){doc=OpenLayers.Format.XML.prototype.read.apply(this,[doc]);}
-return this.parseFeatures(doc);},write:function(features){var doc;if(features instanceof Array){doc=this.createElementNSPlus("atom:feed");doc.appendChild(this.createElementNSPlus("atom:title",{value:this.feedTitle}));for(var i=0,ii=features.length;i<ii;i++){doc.appendChild(this.buildEntryNode(features[i]));}}
-else{doc=this.buildEntryNode(features);}
-return OpenLayers.Format.XML.prototype.write.apply(this,[doc]);},buildContentNode:function(content){var node=this.createElementNSPlus("atom:content",{attributes:{type:content.type||null}});if(content.src){node.setAttribute("src",content.src);}else{if(content.type=="text"||content.type==null){node.appendChild(this.createTextNode(content.value));}else if(content.type=="html"){if(typeof content.value!="string"){throw"HTML content must be in form of an escaped string";}
-node.appendChild(this.createTextNode(content.value));}else if(content.type=="xhtml"){node.appendChild(content.value);}else if(content.type=="xhtml"||content.type.match(/(\+|\/)xml$/)){node.appendChild(content.value);}
-else{node.appendChild(this.createTextNode(content.value));}}
-return node;},buildEntryNode:function(feature){var attrib=feature.attributes;var atomAttrib=attrib.atom||{};var entryNode=this.createElementNSPlus("atom:entry");if(atomAttrib.authors){var authors=atomAttrib.authors instanceof Array?atomAttrib.authors:[atomAttrib.authors];for(var i=0,ii=authors.length;i<ii;i++){entryNode.appendChild(this.buildPersonConstructNode("author",authors[i]));}}
-if(atomAttrib.categories){var categories=atomAttrib.categories instanceof Array?atomAttrib.categories:[atomAttrib.categories];var category;for(var i=0,ii=categories.length;i<ii;i++){category=categories[i];entryNode.appendChild(this.createElementNSPlus("atom:category",{attributes:{term:category.term,scheme:category.scheme||null,label:category.label||null}}));}}
-if(atomAttrib.content){entryNode.appendChild(this.buildContentNode(atomAttrib.content));}
-if(atomAttrib.contributors){var contributors=atomAttrib.contributors instanceof Array?atomAttrib.contributors:[atomAttrib.contributors];for(var i=0,ii=contributors.length;i<ii;i++){entryNode.appendChild(this.buildPersonConstructNode("contributor",contributors[i]));}}
-if(feature.fid){entryNode.appendChild(this.createElementNSPlus("atom:id",{value:feature.fid}));}
-if(atomAttrib.links){var links=atomAttrib.links instanceof Array?atomAttrib.links:[atomAttrib.links];var link;for(var i=0,ii=links.length;i<ii;i++){link=links[i];entryNode.appendChild(this.createElementNSPlus("atom:link",{attributes:{href:link.href,rel:link.rel||null,type:link.type||null,hreflang:link.hreflang||null,title:link.title||null,length:link.length||null}}));}}
-if(atomAttrib.published){entryNode.appendChild(this.createElementNSPlus("atom:published",{value:atomAttrib.published}));}
-if(atomAttrib.rights){entryNode.appendChild(this.createElementNSPlus("atom:rights",{value:atomAttrib.rights}));}
-if(atomAttrib.summary||attrib.description){entryNode.appendChild(this.createElementNSPlus("atom:summary",{value:atomAttrib.summary||attrib.description}));}
-entryNode.appendChild(this.createElementNSPlus("atom:title",{value:atomAttrib.title||attrib.title||this.defaultEntryTitle}));if(atomAttrib.updated){entryNode.appendChild(this.createElementNSPlus("atom:updated",{value:atomAttrib.updated}));}
-if(feature.geometry){var whereNode=this.createElementNSPlus("georss:where");whereNode.appendChild(this.buildGeometryNode(feature.geometry));entryNode.appendChild(whereNode);}
-return entryNode;},initGmlParser:function(){this.gmlParser=new OpenLayers.Format.GML.v3({xy:this.xy,featureNS:"http://example.com#feature",internalProjection:this.internalProjection,externalProjection:this.externalProjection});},buildGeometryNode:function(geometry){if(!this.gmlParser){this.initGmlParser();}
-var node=this.gmlParser.writeNode("feature:_geometry",geometry);return node.firstChild;},buildPersonConstructNode:function(name,value){var oNames=["uri","email"];var personNode=this.createElementNSPlus("atom:"+name);personNode.appendChild(this.createElementNSPlus("atom:name",{value:value.name}));for(var i=0,ii=oNames.length;i<ii;i++){if(value[oNames[i]]){personNode.appendChild(this.createElementNSPlus("atom:"+oNames[i],{value:value[oNames[i]]}));}}
-return personNode;},getFirstChildValue:function(node,nsuri,name,def){var value;var nodes=this.getElementsByTagNameNS(node,nsuri,name);if(nodes&&nodes.length>0){value=this.getChildValue(nodes[0],def);}else{value=def;}
-return value;},parseFeature:function(node){var atomAttrib={};var value=null;var nodes=null;var attval=null;var atomns=this.namespaces.atom;this.parsePersonConstructs(node,"author",atomAttrib);nodes=this.getElementsByTagNameNS(node,atomns,"category");if(nodes.length>0){atomAttrib.categories=[];}
-for(var i=0,ii=nodes.length;i<ii;i++){value={};value.term=nodes[i].getAttribute("term");attval=nodes[i].getAttribute("scheme");if(attval){value.scheme=attval;}
-attval=nodes[i].getAttribute("label");if(attval){value.label=attval;}
-atomAttrib.categories.push(value);}
-nodes=this.getElementsByTagNameNS(node,atomns,"content");if(nodes.length>0){value={};attval=nodes[0].getAttribute("type");if(attval){value.type=attval;}
-attval=nodes[0].getAttribute("src");if(attval){value.src=attval;}else{if(value.type=="text"||value.type=="html"||value.type==null){value.value=this.getFirstChildValue(node,atomns,"content",null);}else if(value.type=="xhtml"||value.type.match(/(\+|\/)xml$/)){value.value=this.getChildEl(nodes[0]);}else{value.value=this.getFirstChildValue(node,atomns,"content",null);}
-atomAttrib.content=value;}}
-this.parsePersonConstructs(node,"contributor",atomAttrib);atomAttrib.id=this.getFirstChildValue(node,atomns,"id",null);nodes=this.getElementsByTagNameNS(node,atomns,"link");if(nodes.length>0){atomAttrib.links=new Array(nodes.length);}
-var oAtts=["rel","type","hreflang","title","length"];for(var i=0,ii=nodes.length;i<ii;i++){value={};value.href=nodes[i].getAttribute("href");for(var j=0,jj=oAtts.length;j<jj;j++){attval=nodes[i].getAttribute(oAtts[j]);if(attval){value[oAtts[j]]=attval;}}
-atomAttrib.links[i]=value;}
-value=this.getFirstChildValue(node,atomns,"published",null);if(value){atomAttrib.published=value;}
-value=this.getFirstChildValue(node,atomns,"rights",null);if(value){atomAttrib.rights=value;}
-value=this.getFirstChildValue(node,atomns,"summary",null);if(value){atomAttrib.summary=value;}
-atomAttrib.title=this.getFirstChildValue(node,atomns,"title",null);atomAttrib.updated=this.getFirstChildValue(node,atomns,"updated",null);var featureAttrib={title:atomAttrib.title,description:atomAttrib.summary,atom:atomAttrib};var geometry=this.parseLocations(node)[0];var feature=new OpenLayers.Feature.Vector(geometry,featureAttrib);feature.fid=atomAttrib.id;return feature;},parseFeatures:function(node){var features=[];var entries=this.getElementsByTagNameNS(node,this.namespaces.atom,"entry");if(entries.length==0){entries=[node];}
-for(var i=0,ii=entries.length;i<ii;i++){features.push(this.parseFeature(entries[i]));}
-return features;},parseLocations:function(node){var georssns=this.namespaces.georss;var locations={components:[]};var where=this.getElementsByTagNameNS(node,georssns,"where");if(where&&where.length>0){if(!this.gmlParser){this.initGmlParser();}
-for(var i=0,ii=where.length;i<ii;i++){this.gmlParser.readChildNodes(where[i],locations);}}
-var components=locations.components;var point=this.getElementsByTagNameNS(node,georssns,"point");if(point&&point.length>0){for(var i=0,ii=point.length;i<ii;i++){var xy=OpenLayers.String.trim(point[i].firstChild.nodeValue).split(/\s+/);if(xy.length!=2){xy=OpenLayers.String.trim(point[i].firstChild.nodeValue).split(/\s*,\s*/);}
-components.push(new OpenLayers.Geometry.Point(parseFloat(xy[1]),parseFloat(xy[0])));}}
-var line=this.getElementsByTagNameNS(node,georssns,"line");if(line&&line.length>0){var coords;var p;var points;for(var i=0,ii=line.length;i<ii;i++){coords=OpenLayers.String.trim(line[i].firstChild.nodeValue).split(/\s+/);points=[];for(var j=0,jj=coords.length;j<jj;j+=2){p=new OpenLayers.Geometry.Point(parseFloat(coords[j+1]),parseFloat(coords[j]));points.push(p);}
-components.push(new OpenLayers.Geometry.LineString(points));}}
-var polygon=this.getElementsByTagNameNS(node,georssns,"polygon");if(polygon&&polygon.length>0){var coords;var p;var points;for(var i=0,ii=polygon.length;i<ii;i++){coords=OpenLayers.String.trim(polygon[i].firstChild.nodeValue).split(/\s+/);points=[];for(var j=0,jj=coords.length;j<jj;j+=2){p=new OpenLayers.Geometry.Point(parseFloat(coords[j+1]),parseFloat(coords[j]));points.push(p);}
-components.push(new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]));}}
-if(this.internalProjection&&this.externalProjection){for(var i=0,ii=components.length;i<ii;i++){if(components[i]){components[i].transform(this.externalProjection,this.internalProjection);}}}
-return components;},parsePersonConstructs:function(node,name,data){var persons=[];var atomns=this.namespaces.atom;var nodes=this.getElementsByTagNameNS(node,atomns,name);var oAtts=["uri","email"];for(var i=0,ii=nodes.length;i<ii;i++){var value={};value.name=this.getFirstChildValue(nodes[i],atomns,"name",null);for(var j=0,jj=oAtts.length;j<jj;j++){var attval=this.getFirstChildValue(nodes[i],atomns,oAtts[j],null);if(attval){value[oAtts[j]]=attval;}}
-persons.push(value);}
-if(persons.length>0){data[name+"s"]=persons;}},CLASS_NAME:"OpenLayers.Format.Atom"});OpenLayers.Format.Filter.v1_0_0=OpenLayers.Class(OpenLayers.Format.GML.v2,OpenLayers.Format.Filter.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/ogc/filter/1.0.0/filter.xsd",initialize:function(options){OpenLayers.Format.GML.v2.prototype.initialize.apply(this,[options]);},readers:{"ogc":OpenLayers.Util.applyDefaults({"PropertyIsEqualTo":function(node,obj){var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO});this.readChildNodes(node,filter);obj.filters.push(filter);},"PropertyIsNotEqualTo":function(node,obj){var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.NOT_EQUAL_TO});this.readChildNodes(node,filter);obj.filters.push(filter);},"PropertyIsLike":function(node,obj){var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE});this.readChildNodes(node,filter);var wildCard=node.getAttribute("wildCard");var singleChar=node.getAttribute("singleChar");var esc=node.getAttribute("escape");filter.value2regex(wildCard,singleChar,esc);obj.filters.push(filter);}},OpenLayers.Format.Filter.v1.prototype.readers["ogc"]),"gml":OpenLayers.Format.GML.v2.prototype.readers["gml"],"feature":OpenLayers.Format.GML.v2.prototype.readers["feature"]},writers:{"ogc":OpenLayers.Util.applyDefaults({"PropertyIsEqualTo":function(filter){var node=this.createElementNSPlus("ogc:PropertyIsEqualTo");this.writeNode("PropertyName",filter,node);this.writeNode("Literal",filter.value,node);return node;},"PropertyIsNotEqualTo":function(filter){var node=this.createElementNSPlus("ogc:PropertyIsNotEqualTo");this.writeNode("PropertyName",filter,node);this.writeNode("Literal",filter.value,node);return node;},"PropertyIsLike":function(filter){var node=this.createElementNSPlus("ogc:PropertyIsLike",{attributes:{wildCard:"*",singleChar:".",escape:"!"}});this.writeNode("PropertyName",filter,node);this.writeNode("Literal",filter.regex2value(),node);return node;},"BBOX":function(filter){var node=this.createElementNSPlus("ogc:BBOX");this.writeNode("PropertyName",filter,node);var box=this.writeNode("gml:Box",filter.value,node);if(filter.projection){box.setAttribute("srsName",filter.projection);}
-return node;}},OpenLayers.Format.Filter.v1.prototype.writers["ogc"]),"gml":OpenLayers.Format.GML.v2.prototype.writers["gml"],"feature":OpenLayers.Format.GML.v2.prototype.writers["feature"]},writeSpatial:function(filter,name){var node=this.createElementNSPlus("ogc:"+name);this.writeNode("PropertyName",filter,node);var child;if(filter.value instanceof OpenLayers.Geometry){child=this.writeNode("feature:_geometry",filter.value).firstChild;}else{child=this.writeNode("gml:Box",filter.value);}
-if(filter.projection){child.setAttribute("srsName",filter.projection);}
-node.appendChild(child);return node;},CLASS_NAME:"OpenLayers.Format.Filter.v1_0_0"});OpenLayers.Format.Filter.v1_1_0=OpenLayers.Class(OpenLayers.Format.GML.v3,OpenLayers.Format.Filter.v1,{VERSION:"1.1.0",schemaLocation:"http://www.opengis.net/ogc/filter/1.1.0/filter.xsd",initialize:function(options){OpenLayers.Format.GML.v3.prototype.initialize.apply(this,[options]);},readers:{"ogc":OpenLayers.Util.applyDefaults({"PropertyIsEqualTo":function(node,obj){var matchCase=node.getAttribute("matchCase");var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,matchCase:!(matchCase==="false"||matchCase==="0")});this.readChildNodes(node,filter);obj.filters.push(filter);},"PropertyIsNotEqualTo":function(node,obj){var matchCase=node.getAttribute("matchCase");var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.NOT_EQUAL_TO,matchCase:!(matchCase==="false"||matchCase==="0")});this.readChildNodes(node,filter);obj.filters.push(filter);},"PropertyIsLike":function(node,obj){var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE});this.readChildNodes(node,filter);var wildCard=node.getAttribute("wildCard");var singleChar=node.getAttribute("singleChar");var esc=node.getAttribute("escapeChar");filter.value2regex(wildCard,singleChar,esc);obj.filters.push(filter);}},OpenLayers.Format.Filter.v1.prototype.readers["ogc"]),"gml":OpenLayers.Format.GML.v3.prototype.readers["gml"],"feature":OpenLayers.Format.GML.v3.prototype.readers["feature"]},writers:{"ogc":OpenLayers.Util.applyDefaults({"PropertyIsEqualTo":function(filter){var node=this.createElementNSPlus("ogc:PropertyIsEqualTo",{attributes:{matchCase:filter.matchCase}});this.writeNode("PropertyName",filter,node);this.writeNode("Literal",filter.value,node);return node;},"PropertyIsNotEqualTo":function(filter){var node=this.createElementNSPlus("ogc:PropertyIsNotEqualTo",{attributes:{matchCase:filter.matchCase}});this.writeNode("PropertyName",filter,node);this.writeNode("Literal",filter.value,node);return node;},"PropertyIsLike":function(filter){var node=this.createElementNSPlus("ogc:PropertyIsLike",{attributes:{wildCard:"*",singleChar:".",escapeChar:"!"}});this.writeNode("PropertyName",filter,node);this.writeNode("Literal",filter.regex2value(),node);return node;},"BBOX":function(filter){var node=this.createElementNSPlus("ogc:BBOX");this.writeNode("PropertyName",filter,node);var box=this.writeNode("gml:Envelope",filter.value);if(filter.projection){box.setAttribute("srsName",filter.projection);}
-node.appendChild(box);return node;}},OpenLayers.Format.Filter.v1.prototype.writers["ogc"]),"gml":OpenLayers.Format.GML.v3.prototype.writers["gml"],"feature":OpenLayers.Format.GML.v3.prototype.writers["feature"]},writeSpatial:function(filter,name){var node=this.createElementNSPlus("ogc:"+name);this.writeNode("PropertyName",filter,node);var child;if(filter.value instanceof OpenLayers.Geometry){child=this.writeNode("feature:_geometry",filter.value).firstChild;}else{child=this.writeNode("gml:Envelope",filter.value);}
-if(filter.projection){child.setAttribute("srsName",filter.projection);}
-node.appendChild(child);return node;},CLASS_NAME:"OpenLayers.Format.Filter.v1_1_0"});OpenLayers.Format.SOSCapabilities.v1_0_0=OpenLayers.Class(OpenLayers.Format.SOSCapabilities,{namespaces:{ows:"http://www.opengis.net/ows/1.1",sos:"http://www.opengis.net/sos/1.0",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink"},regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);this.options=options;},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-if(data&&data.nodeType==9){data=data.documentElement;}
-var capabilities={};this.readNode(data,capabilities);return capabilities;},readers:{"gml":OpenLayers.Util.applyDefaults({"name":function(node,obj){obj.name=this.getChildValue(node);},"TimePeriod":function(node,obj){obj.timePeriod={};this.readChildNodes(node,obj.timePeriod);},"beginPosition":function(node,timePeriod){timePeriod.beginPosition=this.getChildValue(node);},"endPosition":function(node,timePeriod){timePeriod.endPosition=this.getChildValue(node);}},OpenLayers.Format.GML.v3.prototype.readers["gml"]),"sos":{"Capabilities":function(node,obj){this.readChildNodes(node,obj);},"Contents":function(node,obj){obj.contents={};this.readChildNodes(node,obj.contents);},"ObservationOfferingList":function(node,contents){contents.offeringList={};this.readChildNodes(node,contents.offeringList);},"ObservationOffering":function(node,offeringList){var id=this.getAttributeNS(node,this.namespaces.gml,"id");offeringList[id]={procedures:[],observedProperties:[],featureOfInterestIds:[],responseFormats:[],resultModels:[],responseModes:[]};this.readChildNodes(node,offeringList[id]);},"time":function(node,offering){offering.time={};this.readChildNodes(node,offering.time);},"procedure":function(node,offering){offering.procedures.push(this.getAttributeNS(node,this.namespaces.xlink,"href"));},"observedProperty":function(node,offering){offering.observedProperties.push(this.getAttributeNS(node,this.namespaces.xlink,"href"));},"featureOfInterest":function(node,offering){offering.featureOfInterestIds.push(this.getAttributeNS(node,this.namespaces.xlink,"href"));},"responseFormat":function(node,offering){offering.responseFormats.push(this.getChildValue(node));},"resultModel":function(node,offering){offering.resultModels.push(this.getChildValue(node));},"responseMode":function(node,offering){offering.responseModes.push(this.getChildValue(node));;}},"ows":OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"]},CLASS_NAME:"OpenLayers.Format.SOSCapabilities.v1_0_0"});OpenLayers.Format.SOSGetFeatureOfInterest=OpenLayers.Class(OpenLayers.Format.XML,{VERSION:"1.0.0",namespaces:{sos:"http://www.opengis.net/sos/1.0",gml:"http://www.opengis.net/gml",sa:"http://www.opengis.net/sampling/1.0",xsi:"http://www.w3.org/2001/XMLSchema-instance"},schemaLocation:"http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosAll.xsd",defaultPrefix:"sos",regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-if(data&&data.nodeType==9){data=data.documentElement;}
-var info={features:[]};this.readNode(data,info);var features=[];for(var i=0,len=info.features.length;i<len;i++){var container=info.features[i];if(this.internalProjection&&this.externalProjection&&container.components[0]){container.components[0].transform(this.externalProjection,this.internalProjection);}
-var feature=new OpenLayers.Feature.Vector(container.components[0],container.attributes);features.push(feature);}
-return features;},readers:{"sa":{"SamplingPoint":function(node,obj){if(!obj.attributes){var feature={attributes:{}};obj.features.push(feature);obj=feature;}
-obj.attributes.id=this.getAttributeNS(node,this.namespaces.gml,"id");this.readChildNodes(node,obj);},"position":function(node,obj){this.readChildNodes(node,obj);}},"gml":OpenLayers.Util.applyDefaults({"FeatureCollection":function(node,obj){this.readChildNodes(node,obj);},"featureMember":function(node,obj){var feature={attributes:{}};obj.features.push(feature);this.readChildNodes(node,feature);},"name":function(node,obj){obj.attributes.name=this.getChildValue(node);},"pos":function(node,obj){if(!this.externalProjection){this.externalProjection=new OpenLayers.Projection(node.getAttribute("srsName"));}
-OpenLayers.Format.GML.v3.prototype.readers.gml.pos.apply(this,[node,obj]);}},OpenLayers.Format.GML.v3.prototype.readers.gml)},writers:{"sos":{"GetFeatureOfInterest":function(options){var node=this.createElementNSPlus("GetFeatureOfInterest",{attributes:{version:this.VERSION,service:'SOS',"xsi:schemaLocation":this.schemaLocation}});for(var i=0,len=options.fois.length;i<len;i++){this.writeNode("FeatureOfInterestId",{foi:options.fois[i]},node);}
-return node;},"FeatureOfInterestId":function(options){var node=this.createElementNSPlus("FeatureOfInterestId",{value:options.foi});return node;}}},CLASS_NAME:"OpenLayers.Format.SOSGetFeatureOfInterest"});OpenLayers.Format.SOSGetObservation=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ows:"http://www.opengis.net/ows",gml:"http://www.opengis.net/gml",sos:"http://www.opengis.net/sos/1.0",ogc:"http://www.opengis.net/ogc",om:"http://www.opengis.net/om/1.0",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosGetObservation.xsd",defaultPrefix:"sos",initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-if(data&&data.nodeType==9){data=data.documentElement;}
-var info={measurements:[]};this.readNode(data,info);return info;},write:function(options){var node=this.writeNode("sos:GetObservation",options);node.setAttribute("xmlns:om",this.namespaces.om);this.setAttributeNS(node,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[node]);},readers:{"om":{"ObservationCollection":function(node,obj){obj.id=this.getAttributeNS(node,this.namespaces.gml,"id");this.readChildNodes(node,obj);},"member":function(node,observationCollection){this.readChildNodes(node,observationCollection);},"Measurement":function(node,observationCollection){var measurement={};observationCollection.measurements.push(measurement);this.readChildNodes(node,measurement);},"samplingTime":function(node,measurement){var samplingTime={};measurement.samplingTime=samplingTime;this.readChildNodes(node,samplingTime);},"observedProperty":function(node,measurement){measurement.observedProperty=this.getAttributeNS(node,this.namespaces.xlink,"href");this.readChildNodes(node,measurement);},"procedure":function(node,measurement){measurement.procedure=this.getAttributeNS(node,this.namespaces.xlink,"href");this.readChildNodes(node,measurement);},"result":function(node,measurement){var result={};measurement.result=result;if(this.getChildValue(node)!==''){result.value=this.getChildValue(node);result.uom=node.getAttribute("uom");}else{this.readChildNodes(node,result);}}},"gml":OpenLayers.Util.applyDefaults({"TimeInstant":function(node,samplingTime){var timeInstant={};samplingTime.timeInstant=timeInstant;this.readChildNodes(node,timeInstant);},"timePosition":function(node,timeInstant){timeInstant.timePosition=this.getChildValue(node);}},OpenLayers.Format.GML.v3.prototype.readers.gml)},writers:{"sos":{"GetObservation":function(options){var node=this.createElementNSPlus("GetObservation",{attributes:{version:this.VERSION,service:'SOS'}});this.writeNode("offering",options,node);this.writeNode("eventTime",options,node);this.writeNode("procedure",options,node);this.writeNode("observedProperty",options,node);this.writeNode("responseFormat",options,node);this.writeNode("resultModel",options,node);this.writeNode("responseMode",options,node);return node;},"responseFormat":function(options){return this.createElementNSPlus("responseFormat",{value:options.responseFormat});},"procedure":function(options){return this.createElementNSPlus("procedure",{value:options.procedure});},"offering":function(options){return this.createElementNSPlus("offering",{value:options.offering});},"observedProperty":function(options){return this.createElementNSPlus("observedProperty",{value:options.observedProperty});},"eventTime":function(options){var node=this.createElementNSPlus("eventTime");if(options.eventTime==='latest'){this.writeNode("ogc:TM_Equals",options,node);}
-return node;},"resultModel":function(options){return this.createElementNSPlus("resultModel",{value:options.resultModel});},"responseMode":function(options){return this.createElementNSPlus("responseMode",{value:options.responseMode});}},"ogc":{"TM_Equals":function(options){var node=this.createElementNSPlus("ogc:TM_Equals");this.writeNode("ogc:PropertyName",{property:"urn:ogc:data:time:iso8601"},node);if(options.eventTime==='latest'){this.writeNode("gml:TimeInstant",{value:'latest'},node);}
-return node;},"PropertyName":function(options){return this.createElementNSPlus("ogc:PropertyName",{value:options.property});}},"gml":{"TimeInstant":function(options){var node=this.createElementNSPlus("gml:TimeInstant");this.writeNode("gml:timePosition",options,node);return node;},"timePosition":function(options){var node=this.createElementNSPlus("gml:timePosition",{value:options.value});return node;}}},CLASS_NAME:"OpenLayers.Format.SOSGetObservation"});OpenLayers.Format.CSWGetRecords.v2_0_2=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",csw:"http://www.opengis.net/cat/csw/2.0.2",dc:"http://purl.org/dc/elements/1.1/",dct:"http://purl.org/dc/terms/",ows:"http://www.opengis.net/ows"},defaultPrefix:"csw",version:"2.0.2",schemaLocation:"http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd",requestId:null,resultType:null,outputFormat:null,outputSchema:null,startPosition:null,maxRecords:null,DistributedSearch:null,ResponseHandler:null,Query:null,regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-if(data&&data.nodeType==9){data=data.documentElement;}
-var obj={};this.readNode(data,obj);return obj;},readers:{"csw":{"GetRecordsResponse":function(node,obj){obj.records=[];this.readChildNodes(node,obj);var version=this.getAttributeNS(node,"",'version');if(version!=""){obj.version=version;}},"RequestId":function(node,obj){obj.RequestId=this.getChildValue(node);},"SearchStatus":function(node,obj){obj.SearchStatus={};var timestamp=this.getAttributeNS(node,"",'timestamp');if(timestamp!=""){obj.SearchStatus.timestamp=timestamp;}},"SearchResults":function(node,obj){this.readChildNodes(node,obj);var attrs=node.attributes;var SearchResults={};for(var i=0,len=attrs.length;i<len;++i){if((attrs[i].name=="numberOfRecordsMatched")||(attrs[i].name=="numberOfRecordsReturned")||(attrs[i].name=="nextRecord")){SearchResults[attrs[i].name]=parseInt(attrs[i].nodeValue);}else{SearchResults[attrs[i].name]=attrs[i].nodeValue;}}
-obj.SearchResults=SearchResults;},"SummaryRecord":function(node,obj){var record={type:"SummaryRecord"};this.readChildNodes(node,record);obj.records.push(record);},"BriefRecord":function(node,obj){var record={type:"BriefRecord"};this.readChildNodes(node,record);obj.records.push(record);},"DCMIRecord":function(node,obj){var record={type:"DCMIRecord"};this.readChildNodes(node,record);obj.records.push(record);},"Record":function(node,obj){var record={type:"Record"};this.readChildNodes(node,record);obj.records.push(record);}},"dc":{"*":function(node,obj){var name=node.localName||node.nodeName.split(":").pop();if(!(obj[name]instanceof Array)){obj[name]=new Array();}
-var dc_element={};var attrs=node.attributes;for(var i=0,len=attrs.length;i<len;++i){dc_element[attrs[i].name]=attrs[i].nodeValue;}
-dc_element.value=this.getChildValue(node);obj[name].push(dc_element);}},"dct":{"*":function(node,obj){var name=node.localName||node.nodeName.split(":").pop();if(!(obj[name]instanceof Array)){obj[name]=new Array();}
-obj[name].push(this.getChildValue(node));}},"ows":OpenLayers.Util.applyDefaults({"BoundingBox":function(node,obj){if(obj.bounds){obj.BoundingBox=[{crs:obj.projection,value:[obj.bounds.left,obj.bounds.bottom,obj.bounds.right,obj.bounds.top]}];delete obj.projection;delete obj.bounds;}
-OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers["ows"]["BoundingBox"].apply(this,arguments);}},OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers["ows"])},write:function(options){var node=this.writeNode("csw:GetRecords",options);return OpenLayers.Format.XML.prototype.write.apply(this,[node]);},writers:{"csw":{"GetRecords":function(options){if(!options){options={};}
-var node=this.createElementNSPlus("csw:GetRecords",{attributes:{service:"CSW",version:this.version,requestId:options.requestId||this.requestId,resultType:options.resultType||this.resultType,outputFormat:options.outputFormat||this.outputFormat,outputSchema:options.outputSchema||this.outputSchema,startPosition:options.startPosition||this.startPosition,maxRecords:options.maxRecords||this.maxRecords}});if(options.DistributedSearch||this.DistributedSearch){this.writeNode("csw:DistributedSearch",options.DistributedSearch||this.DistributedSearch,node);}
-var ResponseHandler=options.ResponseHandler||this.ResponseHandler;if(ResponseHandler instanceof Array&&ResponseHandler.length>0){for(var i=0,len=ResponseHandler.length;i<len;i++){this.writeNode("csw:ResponseHandler",ResponseHandler[i],node);}}
-this.writeNode("Query",options.Query||this.Query,node);return node;},"DistributedSearch":function(options){var node=this.createElementNSPlus("csw:DistributedSearch",{attributes:{hopCount:options.hopCount}});return node;},"ResponseHandler":function(options){var node=this.createElementNSPlus("csw:ResponseHandler",{value:options.value});return node;},"Query":function(options){if(!options){options={};}
-var node=this.createElementNSPlus("csw:Query",{attributes:{typeNames:options.typeNames||"csw:Record"}});var ElementName=options.ElementName;if(ElementName instanceof Array&&ElementName.length>0){for(var i=0,len=ElementName.length;i<len;i++){this.writeNode("csw:ElementName",ElementName[i],node);}}else{this.writeNode("csw:ElementSetName",options.ElementSetName||{value:'summary'},node);}
-if(options.Constraint){this.writeNode("csw:Constraint",options.Constraint,node);}
-return node;},"ElementName":function(options){var node=this.createElementNSPlus("csw:ElementName",{value:options.value});return node;},"ElementSetName":function(options){var node=this.createElementNSPlus("csw:ElementSetName",{attributes:{typeNames:options.typeNames},value:options.value});return node;},"Constraint":function(options){var node=this.createElementNSPlus("csw:Constraint",{attributes:{version:options.version}});if(options.Filter){var format=new OpenLayers.Format.Filter({version:options.version});node.appendChild(format.write(options.Filter));}else if(options.CqlText){var child=this.createElementNSPlus("CqlText",{value:options.CqlText.value});node.appendChild(child);}
-return node;}}},CLASS_NAME:"OpenLayers.Format.CSWGetRecords.v2_0_2"});OpenLayers.Format.SLD.v1=OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0,{namespaces:{sld:"http://www.opengis.net/sld",ogc:"http://www.opengis.net/ogc",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"sld",schemaLocation:null,multipleSymbolizers:false,featureTypeCounter:null,defaultSymbolizer:{fillColor:"#808080",fillOpacity:1,strokeColor:"#000000",strokeOpacity:1,strokeWidth:1,strokeDashstyle:"solid",pointRadius:3,graphicName:"square"},initialize:function(options){OpenLayers.Format.Filter.v1_0_0.prototype.initialize.apply(this,[options]);},read:function(data,options){options=OpenLayers.Util.applyDefaults(options,this.options);var sld={namedLayers:options.namedLayersAsArray===true?[]:{}};this.readChildNodes(data,sld);return sld;},readers:OpenLayers.Util.applyDefaults({"sld":{"StyledLayerDescriptor":function(node,sld){sld.version=node.getAttribute("version");this.readChildNodes(node,sld);},"Name":function(node,obj){obj.name=this.getChildValue(node);},"Title":function(node,obj){obj.title=this.getChildValue(node);},"Abstract":function(node,obj){obj.description=this.getChildValue(node);},"NamedLayer":function(node,sld){var layer={userStyles:[],namedStyles:[]};this.readChildNodes(node,layer);for(var i=0,len=layer.userStyles.length;i<len;++i){layer.userStyles[i].layerName=layer.name;}
-if(sld.namedLayers instanceof Array){sld.namedLayers.push(layer);}else{sld.namedLayers[layer.name]=layer;}},"NamedStyle":function(node,layer){layer.namedStyles.push(this.getChildName(node.firstChild));},"UserStyle":function(node,layer){var obj={defaultsPerSymbolizer:true,rules:[]};this.featureTypeCounter=-1;this.readChildNodes(node,obj);var style;if(this.multipleSymbolizers){delete obj.defaultsPerSymbolizer;style=new OpenLayers.Style2(obj);}else{style=new OpenLayers.Style(this.defaultSymbolizer,obj);}
-layer.userStyles.push(style);},"IsDefault":function(node,style){if(this.getChildValue(node)=="1"){style.isDefault=true;}},"FeatureTypeStyle":function(node,style){++this.featureTypeCounter;var obj={rules:this.multipleSymbolizers?style.rules:[]};this.readChildNodes(node,obj);if(!this.multipleSymbolizers){style.rules=obj.rules;}},"Rule":function(node,obj){var config;if(this.multipleSymbolizers){config={symbolizers:[]};}
-var rule=new OpenLayers.Rule(config);this.readChildNodes(node,rule);obj.rules.push(rule);},"ElseFilter":function(node,rule){rule.elseFilter=true;},"MinScaleDenominator":function(node,rule){rule.minScaleDenominator=parseFloat(this.getChildValue(node));},"MaxScaleDenominator":function(node,rule){rule.maxScaleDenominator=parseFloat(this.getChildValue(node));},"TextSymbolizer":function(node,rule){var config={};this.readChildNodes(node,config);if(this.multipleSymbolizers){config.zIndex=this.featureTypeCounter;rule.symbolizers.push(new OpenLayers.Symbolizer.Text(config));}else{rule.symbolizer["Text"]=OpenLayers.Util.applyDefaults(config,rule.symbolizer["Text"]);}},"Label":function(node,symbolizer){var obj={};this.readChildNodes(node,obj);if(obj.property){symbolizer.label="${"+obj.property+"}";}else{var value=this.readOgcExpression(node);if(value){symbolizer.label=value;}}},"Font":function(node,symbolizer){this.readChildNodes(node,symbolizer);},"Halo":function(node,symbolizer){var obj={};this.readChildNodes(node,obj);symbolizer.haloRadius=obj.haloRadius;symbolizer.haloColor=obj.fillColor;symbolizer.haloOpacity=obj.fillOpacity;},"Radius":function(node,symbolizer){var radius=this.readOgcExpression(node);if(radius!=null){symbolizer.haloRadius=radius;}},"RasterSymbolizer":function(node,rule){var config={};this.readChildNodes(node,config);if(this.multipleSymbolizers){config.zIndex=this.featureTypeCounter;rule.symbolizers.push(new OpenLayers.Symbolizer.Raster(config));}else{rule.symbolizer["Raster"]=OpenLayers.Util.applyDefaults(config,rule.symbolizer["Raster"]);}},"Geometry":function(node,obj){obj.geometry={};this.readChildNodes(node,obj.geometry);},"ColorMap":function(node,symbolizer){symbolizer.colorMap=[];this.readChildNodes(node,symbolizer.colorMap);},"ColorMapEntry":function(node,colorMap){var q=node.getAttribute("quantity");var o=node.getAttribute("opacity");colorMap.push({color:node.getAttribute("color"),quantity:q!==null?parseFloat(q):undefined,label:node.getAttribute("label")||undefined,opacity:o!==null?parseFloat(o):undefined});},"LineSymbolizer":function(node,rule){var config={};this.readChildNodes(node,config);if(this.multipleSymbolizers){config.zIndex=this.featureTypeCounter;rule.symbolizers.push(new OpenLayers.Symbolizer.Line(config));}else{rule.symbolizer["Line"]=OpenLayers.Util.applyDefaults(config,rule.symbolizer["Line"]);}},"PolygonSymbolizer":function(node,rule){var config={fill:false,stroke:false};if(!this.multipleSymbolizers){config=rule.symbolizer["Polygon"]||config;}
-this.readChildNodes(node,config);if(this.multipleSymbolizers){config.zIndex=this.featureTypeCounter;rule.symbolizers.push(new OpenLayers.Symbolizer.Polygon(config));}else{rule.symbolizer["Polygon"]=config;}},"PointSymbolizer":function(node,rule){var config={fill:false,stroke:false,graphic:false};if(!this.multipleSymbolizers){config=rule.symbolizer["Point"]||config;}
-this.readChildNodes(node,config);if(this.multipleSymbolizers){config.zIndex=this.featureTypeCounter;rule.symbolizers.push(new OpenLayers.Symbolizer.Point(config));}else{rule.symbolizer["Point"]=config;}},"Stroke":function(node,symbolizer){symbolizer.stroke=true;this.readChildNodes(node,symbolizer);},"Fill":function(node,symbolizer){symbolizer.fill=true;this.readChildNodes(node,symbolizer);},"CssParameter":function(node,symbolizer){var cssProperty=node.getAttribute("name");var symProperty=this.cssMap[cssProperty];if(symProperty){var value=this.readOgcExpression(node);if(value){symbolizer[symProperty]=value;}}},"Graphic":function(node,symbolizer){symbolizer.graphic=true;var graphic={};this.readChildNodes(node,graphic);var properties=["stroke","strokeColor","strokeWidth","strokeOpacity","strokeLinecap","fill","fillColor","fillOpacity","graphicName","rotation","graphicFormat"];var prop,value;for(var i=0,len=properties.length;i<len;++i){prop=properties[i];value=graphic[prop];if(value!=undefined){symbolizer[prop]=value;}}
-if(graphic.opacity!=undefined){symbolizer.graphicOpacity=graphic.opacity;}
-if(graphic.size!=undefined){symbolizer.pointRadius=graphic.size/2;}
-if(graphic.href!=undefined){symbolizer.externalGraphic=graphic.href;}
-if(graphic.rotation!=undefined){symbolizer.rotation=graphic.rotation;}},"ExternalGraphic":function(node,graphic){this.readChildNodes(node,graphic);},"Mark":function(node,graphic){this.readChildNodes(node,graphic);},"WellKnownName":function(node,graphic){graphic.graphicName=this.getChildValue(node);},"Opacity":function(node,obj){var opacity=this.readOgcExpression(node);if(opacity){obj.opacity=opacity;}},"Size":function(node,obj){var size=this.readOgcExpression(node);if(size){obj.size=size;}},"Rotation":function(node,obj){var rotation=this.readOgcExpression(node);if(rotation){obj.rotation=rotation;}},"OnlineResource":function(node,obj){obj.href=this.getAttributeNS(node,this.namespaces.xlink,"href");},"Format":function(node,graphic){graphic.graphicFormat=this.getChildValue(node);}}},OpenLayers.Format.Filter.v1_0_0.prototype.readers),cssMap:{"stroke":"strokeColor","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-dasharray":"strokeDashstyle","fill":"fillColor","fill-opacity":"fillOpacity","font-family":"fontFamily","font-size":"fontSize","font-weight":"fontWeight","font-style":"fontStyle"},getCssProperty:function(sym){var css=null;for(var prop in this.cssMap){if(this.cssMap[prop]==sym){css=prop;break;}}
-return css;},getGraphicFormat:function(href){var format,regex;for(var key in this.graphicFormats){if(this.graphicFormats[key].test(href)){format=key;break;}}
-return format||this.defautlGraphicFormat;},defaultGraphicFormat:"image/png",graphicFormats:{"image/jpeg":/\.jpe?g$/i,"image/gif":/\.gif$/i,"image/png":/\.png$/i},write:function(sld){return this.writers.sld.StyledLayerDescriptor.apply(this,[sld]);},writers:OpenLayers.Util.applyDefaults({"sld":{"StyledLayerDescriptor":function(sld){var root=this.createElementNSPlus("sld:StyledLayerDescriptor",{attributes:{"version":this.VERSION,"xsi:schemaLocation":this.schemaLocation}});root.setAttribute("xmlns:ogc",this.namespaces.ogc);root.setAttribute("xmlns:gml",this.namespaces.gml);if(sld.name){this.writeNode("Name",sld.name,root);}
-if(sld.title){this.writeNode("Title",sld.title,root);}
-if(sld.description){this.writeNode("Abstract",sld.description,root);}
-if(sld.namedLayers instanceof Array){for(var i=0,len=sld.namedLayers.length;i<len;++i){this.writeNode("NamedLayer",sld.namedLayers[i],root);}}else{for(var name in sld.namedLayers){this.writeNode("NamedLayer",sld.namedLayers[name],root);}}
-return root;},"Name":function(name){return this.createElementNSPlus("sld:Name",{value:name});},"Title":function(title){return this.createElementNSPlus("sld:Title",{value:title});},"Abstract":function(description){return this.createElementNSPlus("sld:Abstract",{value:description});},"NamedLayer":function(layer){var node=this.createElementNSPlus("sld:NamedLayer");this.writeNode("Name",layer.name,node);if(layer.namedStyles){for(var i=0,len=layer.namedStyles.length;i<len;++i){this.writeNode("NamedStyle",layer.namedStyles[i],node);}}
-if(layer.userStyles){for(var i=0,len=layer.userStyles.length;i<len;++i){this.writeNode("UserStyle",layer.userStyles[i],node);}}
-return node;},"NamedStyle":function(name){var node=this.createElementNSPlus("sld:NamedStyle");this.writeNode("Name",name,node);return node;},"UserStyle":function(style){var node=this.createElementNSPlus("sld:UserStyle");if(style.name){this.writeNode("Name",style.name,node);}
-if(style.title){this.writeNode("Title",style.title,node);}
-if(style.description){this.writeNode("Abstract",style.description,node);}
-if(style.isDefault){this.writeNode("IsDefault",style.isDefault,node);}
-if(this.multipleSymbolizers&&style.rules){var rulesByZ={0:[]};var zValues=[0];var rule,ruleMap,symbolizer,zIndex,clone;for(var i=0,ii=style.rules.length;i<ii;++i){rule=style.rules[i];if(rule.symbolizers){ruleMap={};for(var j=0,jj=rule.symbolizers.length;j<jj;++j){symbolizer=rule.symbolizers[j];zIndex=symbolizer.zIndex;if(!(zIndex in ruleMap)){clone=rule.clone();clone.symbolizers=[];ruleMap[zIndex]=clone;}
-ruleMap[zIndex].symbolizers.push(symbolizer.clone());}
-for(zIndex in ruleMap){if(!(zIndex in rulesByZ)){zValues.push(zIndex);rulesByZ[zIndex]=[];}
-rulesByZ[zIndex].push(ruleMap[zIndex]);}}else{rulesByZ[0].push(rule.clone());}}
-zValues.sort();var rules;for(var i=0,ii=zValues.length;i<ii;++i){rules=rulesByZ[zValues[i]];if(rules.length>0){clone=style.clone();clone.rules=rulesByZ[zValues[i]];this.writeNode("FeatureTypeStyle",clone,node);}}}else{this.writeNode("FeatureTypeStyle",style,node);}
-return node;},"IsDefault":function(bool){return this.createElementNSPlus("sld:IsDefault",{value:(bool)?"1":"0"});},"FeatureTypeStyle":function(style){var node=this.createElementNSPlus("sld:FeatureTypeStyle");for(var i=0,len=style.rules.length;i<len;++i){this.writeNode("Rule",style.rules[i],node);}
-return node;},"Rule":function(rule){var node=this.createElementNSPlus("sld:Rule");if(rule.name){this.writeNode("Name",rule.name,node);}
-if(rule.title){this.writeNode("Title",rule.title,node);}
-if(rule.description){this.writeNode("Abstract",rule.description,node);}
-if(rule.elseFilter){this.writeNode("ElseFilter",null,node);}else if(rule.filter){this.writeNode("ogc:Filter",rule.filter,node);}
-if(rule.minScaleDenominator!=undefined){this.writeNode("MinScaleDenominator",rule.minScaleDenominator,node);}
-if(rule.maxScaleDenominator!=undefined){this.writeNode("MaxScaleDenominator",rule.maxScaleDenominator,node);}
-var type,symbolizer;if(this.multipleSymbolizers&&rule.symbolizers){var symbolizer;for(var i=0,ii=rule.symbolizers.length;i<ii;++i){symbolizer=rule.symbolizers[i];type=symbolizer.CLASS_NAME.split(".").pop();this.writeNode(type+"Symbolizer",symbolizer,node);}}else{var types=OpenLayers.Style.SYMBOLIZER_PREFIXES;for(var i=0,len=types.length;i<len;++i){type=types[i];symbolizer=rule.symbolizer[type];if(symbolizer){this.writeNode(type+"Symbolizer",symbolizer,node);}}}
-return node;},"ElseFilter":function(){return this.createElementNSPlus("sld:ElseFilter");},"MinScaleDenominator":function(scale){return this.createElementNSPlus("sld:MinScaleDenominator",{value:scale});},"MaxScaleDenominator":function(scale){return this.createElementNSPlus("sld:MaxScaleDenominator",{value:scale});},"LineSymbolizer":function(symbolizer){var node=this.createElementNSPlus("sld:LineSymbolizer");this.writeNode("Stroke",symbolizer,node);return node;},"Stroke":function(symbolizer){var node=this.createElementNSPlus("sld:Stroke");if(symbolizer.strokeColor!=undefined){this.writeNode("CssParameter",{symbolizer:symbolizer,key:"strokeColor"},node);}
-if(symbolizer.strokeOpacity!=undefined){this.writeNode("CssParameter",{symbolizer:symbolizer,key:"strokeOpacity"},node);}
-if(symbolizer.strokeWidth!=undefined){this.writeNode("CssParameter",{symbolizer:symbolizer,key:"strokeWidth"},node);}
-if(symbolizer.strokeDashstyle!=undefined&&symbolizer.strokeDashstyle!=="solid"){this.writeNode("CssParameter",{symbolizer:symbolizer,key:"strokeDashstyle"},node);}
-if(symbolizer.strokeLinecap!=undefined){this.writeNode("CssParameter",{symbolizer:symbolizer,key:"strokeLinecap"},node);}
-return node;},"CssParameter":function(obj){return this.createElementNSPlus("sld:CssParameter",{attributes:{name:this.getCssProperty(obj.key)},value:obj.symbolizer[obj.key]});},"TextSymbolizer":function(symbolizer){var node=this.createElementNSPlus("sld:TextSymbolizer");if(symbolizer.label!=null){this.writeNode("Label",symbolizer.label,node);}
-if(symbolizer.fontFamily!=null||symbolizer.fontSize!=null||symbolizer.fontWeight!=null||symbolizer.fontStyle!=null){this.writeNode("Font",symbolizer,node);}
-if(symbolizer.haloRadius!=null||symbolizer.haloColor!=null||symbolizer.haloOpacity!=null){this.writeNode("Halo",symbolizer,node);}
-if(symbolizer.fillColor!=null||symbolizer.fillOpacity!=null){this.writeNode("Fill",symbolizer,node);}
-return node;},"Font":function(symbolizer){var node=this.createElementNSPlus("sld:Font");if(symbolizer.fontFamily){this.writeNode("CssParameter",{symbolizer:symbolizer,key:"fontFamily"},node);}
-if(symbolizer.fontSize){this.writeNode("CssParameter",{symbolizer:symbolizer,key:"fontSize"},node);}
-if(symbolizer.fontWeight){this.writeNode("CssParameter",{symbolizer:symbolizer,key:"fontWeight"},node);}
-if(symbolizer.fontStyle){this.writeNode("CssParameter",{symbolizer:symbolizer,key:"fontStyle"},node);}
-return node;},"Label":function(label){var node=this.createElementNSPlus("sld:Label");var tokens=label.split("${");node.appendChild(this.createTextNode(tokens[0]));var item,last;for(var i=1,len=tokens.length;i<len;i++){item=tokens[i];last=item.indexOf("}");if(last>0){this.writeNode("ogc:PropertyName",{property:item.substring(0,last)},node);node.appendChild(this.createTextNode(item.substring(++last)));}else{node.appendChild(this.createTextNode("${"+item));}}
-return node;},"Halo":function(symbolizer){var node=this.createElementNSPlus("sld:Halo");if(symbolizer.haloRadius){this.writeNode("Radius",symbolizer.haloRadius,node);}
-if(symbolizer.haloColor||symbolizer.haloOpacity){this.writeNode("Fill",{fillColor:symbolizer.haloColor,fillOpacity:symbolizer.haloOpacity},node);}
-return node;},"Radius":function(value){return this.createElementNSPlus("sld:Radius",{value:value});},"RasterSymbolizer":function(symbolizer){var node=this.createElementNSPlus("sld:RasterSymbolizer");if(symbolizer.geometry){this.writeNode("Geometry",symbolizer.geometry,node);}
-if(symbolizer.opacity){this.writeNode("Opacity",symbolizer.opacity,node);}
-if(symbolizer.colorMap){this.writeNode("ColorMap",symbolizer.colorMap,node);}
-return node;},"Geometry":function(geometry){var node=this.createElementNSPlus("sld:Geometry");if(geometry.property){this.writeNode("ogc:PropertyName",geometry,node);}
-return node;},"ColorMap":function(colorMap){var node=this.createElementNSPlus("sld:ColorMap");for(var i=0,len=colorMap.length;i<len;++i){this.writeNode("ColorMapEntry",colorMap[i],node);}
-return node;},"ColorMapEntry":function(colorMapEntry){var node=this.createElementNSPlus("sld:ColorMapEntry");var a=colorMapEntry;node.setAttribute("color",a.color);a.opacity!==undefined&&node.setAttribute("opacity",parseFloat(a.opacity));a.quantity!==undefined&&node.setAttribute("quantity",parseFloat(a.quantity));a.label!==undefined&&node.setAttribute("label",a.label);return node;},"PolygonSymbolizer":function(symbolizer){var node=this.createElementNSPlus("sld:PolygonSymbolizer");if(symbolizer.fill!==false){this.writeNode("Fill",symbolizer,node);}
-if(symbolizer.stroke!==false){this.writeNode("Stroke",symbolizer,node);}
-return node;},"Fill":function(symbolizer){var node=this.createElementNSPlus("sld:Fill");if(symbolizer.fillColor){this.writeNode("CssParameter",{symbolizer:symbolizer,key:"fillColor"},node);}
-if(symbolizer.fillOpacity!=null){this.writeNode("CssParameter",{symbolizer:symbolizer,key:"fillOpacity"},node);}
-return node;},"PointSymbolizer":function(symbolizer){var node=this.createElementNSPlus("sld:PointSymbolizer");this.writeNode("Graphic",symbolizer,node);return node;},"Graphic":function(symbolizer){var node=this.createElementNSPlus("sld:Graphic");if(symbolizer.externalGraphic!=undefined){this.writeNode("ExternalGraphic",symbolizer,node);}else{this.writeNode("Mark",symbolizer,node);}
-if(symbolizer.graphicOpacity!=undefined){this.writeNode("Opacity",symbolizer.graphicOpacity,node);}
-if(symbolizer.pointRadius!=undefined){this.writeNode("Size",symbolizer.pointRadius*2,node);}
-if(symbolizer.rotation!=undefined){this.writeNode("Rotation",symbolizer.rotation,node);}
-return node;},"ExternalGraphic":function(symbolizer){var node=this.createElementNSPlus("sld:ExternalGraphic");this.writeNode("OnlineResource",symbolizer.externalGraphic,node);var format=symbolizer.graphicFormat||this.getGraphicFormat(symbolizer.externalGraphic);this.writeNode("Format",format,node);return node;},"Mark":function(symbolizer){var node=this.createElementNSPlus("sld:Mark");if(symbolizer.graphicName){this.writeNode("WellKnownName",symbolizer.graphicName,node);}
-if(symbolizer.fill!==false){this.writeNode("Fill",symbolizer,node);}
-if(symbolizer.stroke!==false){this.writeNode("Stroke",symbolizer,node);}
-return node;},"WellKnownName":function(name){return this.createElementNSPlus("sld:WellKnownName",{value:name});},"Opacity":function(value){return this.createElementNSPlus("sld:Opacity",{value:value});},"Size":function(value){return this.createElementNSPlus("sld:Size",{value:value});},"Rotation":function(value){return this.createElementNSPlus("sld:Rotation",{value:value});},"OnlineResource":function(href){return this.createElementNSPlus("sld:OnlineResource",{attributes:{"xlink:type":"simple","xlink:href":href}});},"Format":function(format){return this.createElementNSPlus("sld:Format",{value:format});}}},OpenLayers.Format.Filter.v1_0_0.prototype.writers),CLASS_NAME:"OpenLayers.Format.SLD.v1"});OpenLayers.Format.WFST.v1_0_0=OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0,OpenLayers.Format.WFST.v1,{version:"1.0.0",srsNameInQuery:false,schemaLocations:{"wfs":"http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd"},initialize:function(options){OpenLayers.Format.Filter.v1_0_0.prototype.initialize.apply(this,[options]);OpenLayers.Format.WFST.v1.prototype.initialize.apply(this,[options]);},readers:{"wfs":OpenLayers.Util.applyDefaults({"WFS_TransactionResponse":function(node,obj){obj.insertIds=[];obj.success=false;this.readChildNodes(node,obj);},"InsertResult":function(node,container){var obj={fids:[]};this.readChildNodes(node,obj);container.insertIds.push(obj.fids[0]);},"TransactionResult":function(node,obj){this.readChildNodes(node,obj);},"Status":function(node,obj){this.readChildNodes(node,obj);},"SUCCESS":function(node,obj){obj.success=true;}},OpenLayers.Format.WFST.v1.prototype.readers["wfs"]),"gml":OpenLayers.Format.GML.v2.prototype.readers["gml"],"feature":OpenLayers.Format.GML.v2.prototype.readers["feature"],"ogc":OpenLayers.Format.Filter.v1_0_0.prototype.readers["ogc"]},writers:{"wfs":OpenLayers.Util.applyDefaults({"Query":function(options){options=OpenLayers.Util.extend({featureNS:this.featureNS,featurePrefix:this.featurePrefix,featureType:this.featureType,srsName:this.srsName,srsNameInQuery:this.srsNameInQuery},options);var node=this.createElementNSPlus("wfs:Query",{attributes:{typeName:(options.featureNS?options.featurePrefix+":":"")+
-options.featureType}});if(options.srsNameInQuery&&options.srsName){node.setAttribute("srsName",options.srsName);}
-if(options.featureNS){node.setAttribute("xmlns:"+options.featurePrefix,options.featureNS);}
-if(options.propertyNames){for(var i=0,len=options.propertyNames.length;i<len;i++){this.writeNode("ogc:PropertyName",{property:options.propertyNames[i]},node);}}
-if(options.filter){this.setFilterProperty(options.filter);this.writeNode("ogc:Filter",options.filter,node);}
-return node;}},OpenLayers.Format.WFST.v1.prototype.writers["wfs"]),"gml":OpenLayers.Format.GML.v2.prototype.writers["gml"],"feature":OpenLayers.Format.GML.v2.prototype.writers["feature"],"ogc":OpenLayers.Format.Filter.v1_0_0.prototype.writers["ogc"]},CLASS_NAME:"OpenLayers.Format.WFST.v1_0_0"});OpenLayers.Format.WFST.v1_1_0=OpenLayers.Class(OpenLayers.Format.Filter.v1_1_0,OpenLayers.Format.WFST.v1,{version:"1.1.0",schemaLocations:{"wfs":"http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"},initialize:function(options){OpenLayers.Format.Filter.v1_1_0.prototype.initialize.apply(this,[options]);OpenLayers.Format.WFST.v1.prototype.initialize.apply(this,[options]);},readers:{"wfs":OpenLayers.Util.applyDefaults({"FeatureCollection":function(node,obj){obj.numberOfFeatures=parseInt(node.getAttribute("numberOfFeatures"));OpenLayers.Format.WFST.v1.prototype.readers["wfs"]["FeatureCollection"].apply(this,arguments);},"TransactionResponse":function(node,obj){obj.insertIds=[];obj.success=false;this.readChildNodes(node,obj);},"TransactionSummary":function(node,obj){obj.success=true;},"InsertResults":function(node,obj){this.readChildNodes(node,obj);},"Feature":function(node,container){var obj={fids:[]};this.readChildNodes(node,obj);container.insertIds.push(obj.fids[0]);}},OpenLayers.Format.WFST.v1.prototype.readers["wfs"]),"gml":OpenLayers.Format.GML.v3.prototype.readers["gml"],"feature":OpenLayers.Format.GML.v3.prototype.readers["feature"],"ogc":OpenLayers.Format.Filter.v1_1_0.prototype.readers["ogc"]},writers:{"wfs":OpenLayers.Util.applyDefaults({"GetFeature":function(options){var node=OpenLayers.Format.WFST.v1.prototype.writers["wfs"]["GetFeature"].apply(this,arguments);options&&options.resultType&&this.setAttributes(node,{resultType:options.resultType});return node;},"Query":function(options){options=OpenLayers.Util.extend({featureNS:this.featureNS,featurePrefix:this.featurePrefix,featureType:this.featureType,srsName:this.srsName},options);var node=this.createElementNSPlus("wfs:Query",{attributes:{typeName:(options.featureNS?options.featurePrefix+":":"")+
-options.featureType,srsName:options.srsName}});if(options.featureNS){node.setAttribute("xmlns:"+options.featurePrefix,options.featureNS);}
-if(options.propertyNames){for(var i=0,len=options.propertyNames.length;i<len;i++){this.writeNode("wfs:PropertyName",{property:options.propertyNames[i]},node);}}
-if(options.filter){this.setFilterProperty(options.filter);this.writeNode("ogc:Filter",options.filter,node);}
-return node;},"PropertyName":function(obj){return this.createElementNSPlus("wfs:PropertyName",{value:obj.property});}},OpenLayers.Format.WFST.v1.prototype.writers["wfs"]),"gml":OpenLayers.Format.GML.v3.prototype.writers["gml"],"feature":OpenLayers.Format.GML.v3.prototype.writers["feature"],"ogc":OpenLayers.Format.Filter.v1_1_0.prototype.writers["ogc"]},CLASS_NAME:"OpenLayers.Format.WFST.v1_1_0"});OpenLayers.Protocol.SOS.v1_0_0=OpenLayers.Class(OpenLayers.Protocol,{fois:null,formatOptions:null,initialize:function(options){OpenLayers.Protocol.prototype.initialize.apply(this,[options]);if(!options.format){this.format=new OpenLayers.Format.SOSGetFeatureOfInterest(this.formatOptions);}},destroy:function(){if(this.options&&!this.options.format){this.format.destroy();}
-this.format=null;OpenLayers.Protocol.prototype.destroy.apply(this);},read:function(options){options=OpenLayers.Util.extend({},options);OpenLayers.Util.applyDefaults(options,this.options||{});var response=new OpenLayers.Protocol.Response({requestType:"read"});var format=this.format;var data=OpenLayers.Format.XML.prototype.write.apply(format,[format.writeNode("sos:GetFeatureOfInterest",{fois:this.fois})]);response.priv=OpenLayers.Request.POST({url:options.url,callback:this.createCallback(this.handleRead,response,options),data:data});return response;},handleRead:function(response,options){if(options.callback){var request=response.priv;if(request.status>=200&&request.status<300){response.features=this.parseFeatures(request);response.code=OpenLayers.Protocol.Response.SUCCESS;}else{response.code=OpenLayers.Protocol.Response.FAILURE;}
-options.callback.call(options.scope,response);}},parseFeatures:function(request){var doc=request.responseXML;if(!doc||!doc.documentElement){doc=request.responseText;}
-if(!doc||doc.length<=0){return null;}
-return this.format.read(doc);},CLASS_NAME:"OpenLayers.Protocol.SOS.v1_0_0"});OpenLayers.Format.SLD.v1_0_0=OpenLayers.Class(OpenLayers.Format.SLD.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd",initialize:function(options){OpenLayers.Format.SLD.v1.prototype.initialize.apply(this,[options]);},CLASS_NAME:"OpenLayers.Format.SLD.v1_0_0"});OpenLayers.Protocol.WFS.v1_0_0=OpenLayers.Class(OpenLayers.Protocol.WFS.v1,{version:"1.0.0",CLASS_NAME:"OpenLayers.Protocol.WFS.v1_0_0"});OpenLayers.Protocol.WFS.v1_1_0=OpenLayers.Class(OpenLayers.Protocol.WFS.v1,{version:"1.1.0",CLASS_NAME:"OpenLayers.Protocol.WFS.v1_1_0"});OpenLayers.Format.OWSContext.v0_3_1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{owc:"http://www.opengis.net/ows-context",gml:"http://www.opengis.net/gml",kml:"http://www.opengis.net/kml/2.2",ogc:"http://www.opengis.net/ogc",ows:"http://www.opengis.net/ows",sld:"http://www.opengis.net/sld",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},VERSION:"0.3.1",schemaLocation:"http://www.opengis.net/ows-context http://www.ogcnetwork.net/schemas/owc/0.3.1/owsContext.xsd",defaultPrefix:"owc",extractAttributes:true,xy:true,regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},featureNS:"http://mapserver.gis.umn.edu/mapserver",featureType:'vector',geometryName:'geometry',nestingLayerLookup:null,initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);OpenLayers.Format.GML.v2.prototype.setGeometryTypes.call(this);},setNestingPath:function(l){if(l.layersContext){for(var i=0,len=l.layersContext.length;i<len;i++){var layerContext=l.layersContext[i];var nPath=[];var nTitle=l.title||"";if(l.metadata&&l.metadata.nestingPath){nPath=l.metadata.nestingPath.slice();}
-if(nTitle!=""){nPath.push(nTitle);}
-layerContext.metadata.nestingPath=nPath;if(layerContext.layersContext){this.setNestingPath(layerContext);}}}},decomposeNestingPath:function(nPath){var a=[];if(nPath instanceof Array){while(nPath.length>0){a.push(nPath.slice());nPath.pop();}
-a.reverse();}
-return a;},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);}
-if(data&&data.nodeType==9){data=data.documentElement;}
-var context={};this.readNode(data,context);this.setNestingPath({layersContext:context.layersContext});var layers=[];this.processLayer(layers,context);delete context.layersContext;context.layersContext=layers;return context;},processLayer:function(layerArray,layer){if(layer.layersContext){for(var i=0,len=layer.layersContext.length;i<len;i++){var l=layer.layersContext[i];layerArray.push(l);if(l.layersContext){this.processLayer(layerArray,l);}}}},write:function(context,options){var name="OWSContext";this.nestingLayerLookup={};options=options||{};OpenLayers.Util.applyDefaults(options,context);var root=this.writeNode(name,options);this.nestingLayerLookup=null;this.setAttributeNS(root,this.namespaces["xsi"],"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[root]);},readers:{"kml":{"Document":function(node,obj){obj.features=new OpenLayers.Format.KML({kmlns:this.namespaces.kml,extractStyles:true}).read(node);}},"owc":{"OWSContext":function(node,obj){this.readChildNodes(node,obj);},"General":function(node,obj){this.readChildNodes(node,obj);},"ResourceList":function(node,obj){this.readChildNodes(node,obj);},"Layer":function(node,obj){var layerContext={metadata:{},visibility:(node.getAttribute("hidden")!="1"),queryable:(node.getAttribute("queryable")=="1"),opacity:((node.getAttribute("opacity")!=null)?parseFloat(node.getAttribute("opacity")):null),name:node.getAttribute("name"),categoryLayer:(node.getAttribute("name")==null),formats:[],styles:[]};if(!obj.layersContext){obj.layersContext=[];}
-obj.layersContext.push(layerContext);this.readChildNodes(node,layerContext);},"InlineGeometry":function(node,obj){obj.features=[];var elements=this.getElementsByTagNameNS(node,this.namespaces.gml,"featureMember");var el;if(elements.length>=1){el=elements[0];}
-if(el&&el.firstChild){var featurenode=(el.firstChild.nextSibling)?el.firstChild.nextSibling:el.firstChild;this.setNamespace("feature",featurenode.namespaceURI);this.featureType=featurenode.localName||featurenode.nodeName.split(":").pop();this.readChildNodes(node,obj);}},"Server":function(node,obj){if((!obj.service&&!obj.version)||(obj.service!=OpenLayers.Format.Context.serviceTypes.WMS)){obj.service=node.getAttribute("service");obj.version=node.getAttribute("version");this.readChildNodes(node,obj);}},"Name":function(node,obj){obj.name=this.getChildValue(node);this.readChildNodes(node,obj);},"Title":function(node,obj){obj.title=this.getChildValue(node);this.readChildNodes(node,obj);},"StyleList":function(node,obj){this.readChildNodes(node,obj.styles);},"Style":function(node,obj){var style={};obj.push(style);this.readChildNodes(node,style);},"LegendURL":function(node,obj){var legend={};obj.legend=legend;this.readChildNodes(node,legend);},"OnlineResource":function(node,obj){obj.url=this.getAttributeNS(node,this.namespaces.xlink,"href");this.readChildNodes(node,obj);}},"ows":OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers.ows,"gml":OpenLayers.Format.GML.v2.prototype.readers.gml,"sld":OpenLayers.Format.SLD.v1_0_0.prototype.readers.sld,"feature":OpenLayers.Format.GML.v2.prototype.readers.feature},writers:{"owc":{"OWSContext":function(options){var node=this.createElementNSPlus("OWSContext",{attributes:{version:this.VERSION,id:options.id||OpenLayers.Util.createUniqueID("OpenLayers_OWSContext_")}});this.writeNode("General",options,node);this.writeNode("ResourceList",options,node);return node;},"General":function(options){var node=this.createElementNSPlus("General");this.writeNode("ows:BoundingBox",options,node);this.writeNode("ows:Title",options.title||'OpenLayers OWSContext',node);return node;},"ResourceList":function(options){var node=this.createElementNSPlus("ResourceList");for(var i=0,len=options.layers.length;i<len;i++){var layer=options.layers[i];var decomposedPath=this.decomposeNestingPath(layer.metadata.nestingPath);this.writeNode("_Layer",{layer:layer,subPaths:decomposedPath},node);}
-return node;},"Server":function(options){var node=this.createElementNSPlus("Server",{attributes:{version:options.version,service:options.service}});this.writeNode("OnlineResource",options,node);return node;},"OnlineResource":function(options){var node=this.createElementNSPlus("OnlineResource",{attributes:{"xlink:href":options.url}});return node;},"InlineGeometry":function(layer){var node=this.createElementNSPlus("InlineGeometry");this.writeNode("gml:boundedBy",layer.getDataExtent(),node);for(var i=0,len=layer.features.length;i<len;i++){this.writeNode("gml:featureMember",layer.features[i],node);}
-return node;},"StyleList":function(styles){var node=this.createElementNSPlus("StyleList");for(var i=0,len=styles.length;i<len;i++){this.writeNode("Style",styles[i],node);}
-return node;},"Style":function(style){var node=this.createElementNSPlus("Style");this.writeNode("Name",style,node);this.writeNode("Title",style,node);this.writeNode("LegendURL",style,node);return node;},"Name":function(obj){var node=this.createElementNSPlus("Name",{value:obj.name});return node;},"Title":function(obj){var node=this.createElementNSPlus("Title",{value:obj.title});return node;},"LegendURL":function(style){var node=this.createElementNSPlus("LegendURL");this.writeNode("OnlineResource",style.legend,node);return node;},"_WMS":function(layer){var node=this.createElementNSPlus("Layer",{attributes:{name:layer.params.LAYERS,queryable:layer.queryable?"1":"0",hidden:layer.visibility?"0":"1",opacity:layer.opacity?layer.opacity:null}});this.writeNode("ows:Title",layer.name,node);this.writeNode("ows:OutputFormat",layer.params.FORMAT,node);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.WMS,version:layer.params.VERSION,url:layer.url},node);if(layer.metadata.styles&&layer.metadata.styles.length>0){this.writeNode("StyleList",layer.metadata.styles,node);}
-return node;},"_Layer":function(options){var layer,subPaths,node,title;layer=options.layer;subPaths=options.subPaths;node=null;title=null;if(subPaths.length>0){var path=subPaths[0].join("/");var index=path.lastIndexOf("/");node=this.nestingLayerLookup[path];title=(index>0)?path.substring(index+1,path.length):path;if(!node){node=this.createElementNSPlus("Layer");this.writeNode("ows:Title",title,node);this.nestingLayerLookup[path]=node;}
-options.subPaths.shift();this.writeNode("_Layer",options,node);return node;}else{if(layer instanceof OpenLayers.Layer.WMS){node=this.writeNode("_WMS",layer);}else if(layer instanceof OpenLayers.Layer.Vector){if(layer.protocol instanceof OpenLayers.Protocol.WFS.v1){node=this.writeNode("_WFS",layer);}else if(layer.protocol instanceof OpenLayers.Protocol.HTTP){if(layer.protocol.format instanceof OpenLayers.Format.GML){layer.protocol.format.version="2.1.2";node=this.writeNode("_GML",layer);}else if(layer.protocol.format instanceof OpenLayers.Format.KML){layer.protocol.format.version="2.2";node=this.writeNode("_KML",layer);}}else{this.setNamespace("feature",this.featureNS);node=this.writeNode("_InlineGeometry",layer);}}
-if(layer.options.maxScale){this.writeNode("sld:MinScaleDenominator",layer.options.maxScale,node);}
-if(layer.options.minScale){this.writeNode("sld:MaxScaleDenominator",layer.options.minScale,node);}
-this.nestingLayerLookup[layer.name]=node;return node;}},"_WFS":function(layer){var node=this.createElementNSPlus("Layer",{attributes:{name:layer.protocol.featurePrefix+":"+layer.protocol.featureType,hidden:layer.visibility?"0":"1"}});this.writeNode("ows:Title",layer.name,node);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.WFS,version:layer.protocol.version,url:layer.protocol.url},node);return node;},"_InlineGeometry":function(layer){var node=this.createElementNSPlus("Layer",{attributes:{name:this.featureType,hidden:layer.visibility?"0":"1"}});this.writeNode("ows:Title",layer.name,node);this.writeNode("InlineGeometry",layer,node);return node;},"_GML":function(layer){var node=this.createElementNSPlus("Layer");this.writeNode("ows:Title",layer.name,node);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.GML,url:layer.protocol.url,version:layer.protocol.format.version},node);return node;},"_KML":function(layer){var node=this.createElementNSPlus("Layer");this.writeNode("ows:Title",layer.name,node);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.KML,version:layer.protocol.format.version,url:layer.protocol.url},node);return node;}},"gml":OpenLayers.Util.applyDefaults({"boundedBy":function(bounds){var node=this.createElementNSPlus("gml:boundedBy");this.writeNode("gml:Box",bounds,node);return node;}},OpenLayers.Format.GML.v2.prototype.writers.gml),"ows":OpenLayers.Format.OWSCommon.v1_0_0.prototype.writers.ows,"sld":OpenLayers.Format.SLD.v1_0_0.prototype.writers.sld,"feature":OpenLayers.Format.GML.v2.prototype.writers.feature},CLASS_NAME:"OpenLayers.Format.OWSContext.v0_3_1"});

--- a/labs/openlayers/build/README.txt
+++ /dev/null
@@ -1,15 +1,1 @@
 
-## HowTo: Build & deploy "Shrunk" Single File Library version of OpenLayers ##
-
- * Build:
-
-     cd build
-     ./build.py
-     cd ..
-
- * Upload the result to the server: e.g.
-
-  scp build/OpenLayers.js openlayers@openlayers.org:openlayers.org/htdocs/code/
-
-
-

--- a/labs/openlayers/build/build.py
+++ /dev/null
@@ -1,54 +1,1 @@
-#!/usr/bin/env python
 
-import sys
-sys.path.append("../tools")
-import mergejs
-
-def build():
-    have_compressor = None
-    try:
-        import jsmin
-        have_compressor = "jsmin"
-    except ImportError:
-        try:
-            import minimize
-            have_compressor = "minimize"
-        except Exception, E:
-            print E
-            pass
-
-    sourceDirectory = "../lib"
-    configFilename = "full.cfg"
-    outputFilename = "OpenLayers.js"
-
-    if len(sys.argv) > 1:
-        configFilename = sys.argv[1]
-        extension = configFilename[-4:]
-
-        if extension  != ".cfg":
-            configFilename = sys.argv[1] + ".cfg"
-
-    if len(sys.argv) > 2:
-        outputFilename = sys.argv[2]
-
-    print "Merging libraries."
-    merged = mergejs.run(sourceDirectory, None, configFilename)
-    if have_compressor == "jsmin":
-        print "Compressing using jsmin."
-        minimized = jsmin.jsmin(merged)
-    elif have_compressor == "minimize":
-        print "Compressing using minimize."
-        minimized = minimize.minimize(merged)
-    else: # fallback
-        print "Not compressing."
-        minimized = merged 
-    print "Adding license file."
-    minimized = file("license.txt").read() + minimized
-
-    print "Writing to %s." % outputFilename
-    file(outputFilename, "w").write(minimized)
-
-    print "Done."
-
-if __name__ == '__main__':
-  build()

--- a/labs/openlayers/build/buildUncompressed.py
+++ /dev/null
@@ -1,26 +1,1 @@
-#!/usr/bin/env python
 
-import sys
-sys.path.append("../tools")
-
-import jsmin, mergejs
-
-sourceDirectory = "../lib"
-configFilename = "full.cfg"
-outputFilename = "OpenLayers.js"
-
-if len(sys.argv) > 1:
-    configFilename = sys.argv[1] + ".cfg"
-if len(sys.argv) > 2:
-    outputFilename = sys.argv[2]
-
-print "Merging libraries."
-merged = mergejs.run(sourceDirectory, None, configFilename)
-print "Adding license file."
-merged = file("license.txt").read() + merged
-
-print "Writing to %s." % outputFilename
-file(outputFilename, "w").write(merged)
-
-print "Done."
-

--- a/labs/openlayers/build/full.cfg
+++ /dev/null
@@ -1,33 +1,1 @@
-# This is the full build with all files: this includes the vector-related files
-# like Renderers and Formats.
 
-[first]
-OpenLayers/SingleFile.js
-OpenLayers.js
-OpenLayers/BaseTypes.js
-OpenLayers/BaseTypes/Class.js
-OpenLayers/Util.js
-Rico/Corner.js
-
-[last]
-
-[include]
-
-[exclude]
-Firebug/firebug.js
-Firebug/firebugx.js
-OpenLayers/Lang/ca.js
-OpenLayers/Lang/cs-CZ.js
-OpenLayers/Lang/da-DK.js
-OpenLayers/Lang/de.js
-OpenLayers/Lang/en-CA.js
-OpenLayers/Lang/es.js
-OpenLayers/Lang/fr.js
-OpenLayers/Lang/it.js
-OpenLayers/Lang/nb.js
-OpenLayers/Lang/nl.js
-OpenLayers/Lang/pt-BR.js
-OpenLayers/Lang/sv-SE.js
-OpenLayers/Lang/zh-TW.js
-OpenLayers/Lang/zh-CN.js
-

--- a/labs/openlayers/build/library.cfg
+++ /dev/null
@@ -1,69 +1,1 @@
-# This file includes the OpenLayers code to create a build for everything that 
-# does not require vector support. build.py uses this profile if no other one
-# is specified.
 
-[first]
-OpenLayers/SingleFile.js
-OpenLayers.js
-OpenLayers/BaseTypes.js
-OpenLayers/BaseTypes/Class.js
-OpenLayers/Util.js
-Rico/Corner.js
-
-[last]
-
-[include]
-
-[exclude]
-Firebug/firebug.js
-Firebug/firebugx.js
-OpenLayers/Format/GeoRSS.js
-OpenLayers/Format/GML.js
-OpenLayers/Format/WKT.js
-OpenLayers/Format/KML.js
-OpenLayers/Format/WFS.js
-OpenLayers/Format.js
-OpenLayers/Handler/Path.js
-OpenLayers/Handler/Point.js
-OpenLayers/Handler/Polygon.js
-OpenLayers/Handler/Select.js
-OpenLayers/Geometry/Collection.js
-OpenLayers/Geometry/Curve.js
-OpenLayers/Geometry/LinearRing.js
-OpenLayers/Geometry/LineString.js
-OpenLayers/Geometry/MultiLineString.js
-OpenLayers/Geometry/MultiPoint.js
-OpenLayers/Geometry/MultiPolygon.js
-OpenLayers/Geometry/Point.js
-OpenLayers/Geometry/Polygon.js
-OpenLayers/Geometry/Rectangle.js
-OpenLayers/Geometry/Surface.js
-OpenLayers/Geometry.js
-OpenLayers/Layer/GML.js
-OpenLayers/Layer/Vector.js
-OpenLayers/Control/DrawFeature.js
-OpenLayers/Control/EditingToolbar.js
-OpenLayers/Control/SelectFeature.js
-OpenLayers/Feature/Vector.js
-OpenLayers/Renderer
-OpenLayers/Renderer/Elements.js
-OpenLayers/Renderer/SVG.js
-OpenLayers/Renderer/VML.js
-OpenLayers/Renderer.js
-OpenLayers/Lang/ca.js
-OpenLayers/Lang/cs-CZ.js
-OpenLayers/Lang/da-DK.js
-OpenLayers/Lang/de.js
-OpenLayers/Lang/en-CA.js
-OpenLayers/Lang/es.js
-OpenLayers/Lang/fr.js
-OpenLayers/Lang/it.js
-OpenLayers/Lang/nb.js
-OpenLayers/Lang/nl.js
-OpenLayers/Lang/pt-BR.js
-OpenLayers/Lang/sv-SE.js
-OpenLayers/Lang/zh-TW.js
-OpenLayers/Lang/zh-CN.js
-
-
-

--- a/labs/openlayers/build/license.txt
+++ /dev/null
@@ -1,93 +1,1 @@
-/*
 
-  OpenLayers.js -- OpenLayers Map Viewer Library
-
-  Copyright 2005-2010 OpenLayers Contributors, released under the Clear BSD
-  license. Please see http://svn.openlayers.org/trunk/openlayers/license.txt
-  for the full text of the license.
-
-  Includes compressed code under the following licenses:
-
-  (For uncompressed versions of the code used please see the
-  OpenLayers SVN repository: <http://openlayers.org/>)
-
-*/
-
-/* Contains portions of Prototype.js:
- *
- * Prototype JavaScript framework, version 1.4.0
- *  (c) 2005 Sam Stephenson <sam@conio.net>
- *
- *  Prototype is freely distributable under the terms of an MIT-style license.
- *  For details, see the Prototype web site: http://prototype.conio.net/
- *
- *--------------------------------------------------------------------------*/
-
-/**  
-*  
-*  Contains portions of Rico <http://openrico.org/>
-* 
-*  Copyright 2005 Sabre Airline Solutions  
-*  
-*  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. 
-*
-**/
-
-/**
- * Contains XMLHttpRequest.js <http://code.google.com/p/xmlhttprequest/>
- * Copyright 2007 Sergey Ilinsky (http://www.ilinsky.com)
- *
- * 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
- */
-
-/**
- * Contains portions of Gears <http://code.google.com/apis/gears/>
- *
- * Copyright 2007, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. 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.
- *  3. Neither the name of Google Inc. 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 AUTHOR ``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 AUTHOR 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.
- *
- * Sets up google.gears.*, which is *the only* supported way to access Gears.
- *
- * Circumvent this file at your own risk!
- *
- * In the future, Gears may automatically define google.gears.* without this
- * file. Gears may use these objects to transparently fix bugs and compatibility
- * issues. Applications that use the code below will continue to work seamlessly
- * when that happens.
- */
-

--- a/labs/openlayers/build/lite.cfg
+++ /dev/null
@@ -1,23 +1,1 @@
-# This file includes a small subset of OpenLayers code, designed to be
-# integrated into another application. It includes only the Layer types
-# neccesary to create tiled or untiled WMS, and does not include any Controls.
-# This is the result of what was at the time called "Webmap.js" at the FOSS4G
-# Web Mapping BOF.
 
-[first]
-OpenLayers/SingleFile.js
-OpenLayers.js
-OpenLayers/BaseTypes.js
-OpenLayers/BaseTypes/Class.js
-OpenLayers/Util.js
-
-[last]
-
-[include]
-OpenLayers/Map.js
-OpenLayers/Layer/WMS.js
-
-[exclude]
-
-
-

 Binary files a/labs/openlayers/img/blank.gif and /dev/null differ
 Binary files a/labs/openlayers/img/cloud-popup-relative.png and /dev/null differ
 Binary files a/labs/openlayers/img/drag-rectangle-off.png and /dev/null differ
 Binary files a/labs/openlayers/img/drag-rectangle-on.png and /dev/null differ
 Binary files a/labs/openlayers/img/east-mini.png and /dev/null differ
 Binary files a/labs/openlayers/img/layer-switcher-maximize.png and /dev/null differ
 Binary files a/labs/openlayers/img/layer-switcher-minimize.png and /dev/null differ
 Binary files a/labs/openlayers/img/marker-blue.png and /dev/null differ
 Binary files a/labs/openlayers/img/marker-gold.png and /dev/null differ
 Binary files a/labs/openlayers/img/marker-green.png and /dev/null differ
 Binary files a/labs/openlayers/img/marker.png and /dev/null differ
 Binary files a/labs/openlayers/img/measuring-stick-off.png and /dev/null differ
 Binary files a/labs/openlayers/img/measuring-stick-on.png and /dev/null differ
 Binary files a/labs/openlayers/img/north-mini.png and /dev/null differ
 Binary files a/labs/openlayers/img/panning-hand-off.png and /dev/null differ
 Binary files a/labs/openlayers/img/panning-hand-on.png and /dev/null differ
 Binary files a/labs/openlayers/img/slider.png and /dev/null differ
 Binary files a/labs/openlayers/img/south-mini.png and /dev/null differ
 Binary files a/labs/openlayers/img/west-mini.png and /dev/null differ
 Binary files a/labs/openlayers/img/zoom-minus-mini.png and /dev/null differ
 Binary files a/labs/openlayers/img/zoom-plus-mini.png and /dev/null differ
 Binary files a/labs/openlayers/img/zoom-world-mini.png and /dev/null differ
 Binary files a/labs/openlayers/img/zoombar.png and /dev/null differ
 Binary files a/labs/openlayers/lib/Firebug/errorIcon.png and /dev/null differ
--- a/labs/openlayers/lib/Firebug/firebug.css
+++ /dev/null
@@ -1,210 +1,1 @@
 
-html, body {
-    margin: 0;
-    background: #FFFFFF;
-    font-family: Lucida Grande, Tahoma, sans-serif;
-    font-size: 11px;
-    overflow: hidden;
-}
-
-a {
-    text-decoration: none;
-}
-
-a:hover {
-    text-decoration: underline;
-}
-
-.toolbar {
-    height: 14px;
-    border-top: 1px solid ThreeDHighlight;
-    border-bottom: 1px solid ThreeDShadow;
-    padding: 2px 6px;
-    background: ThreeDFace;
-}
-
-.toolbarRight {
-    position: absolute;
-    top: 4px;
-    right: 6px;
-}
-
-#log {
-    overflow: auto;
-    position: absolute;
-    left: 0;
-    width: 100%;
-}
-
-#commandLine {
-    position: absolute;
-    bottom: 0;
-    left: 0;
-    width: 100%;
-    height: 18px;
-    border: none;
-    border-top: 1px solid ThreeDShadow;
-}
-
-/************************************************************************************************/
-
-.logRow {
-    position: relative;
-    border-bottom: 1px solid #D7D7D7;
-    padding: 2px 4px 1px 6px;
-    background-color: #FFFFFF;
-}
-
-.logRow-command {
-    font-family: Monaco, monospace;
-    color: blue;
-}
-
-.objectBox-null {
-    padding: 0 2px;
-    border: 1px solid #666666;
-    background-color: #888888;
-    color: #FFFFFF;
-}
-
-.objectBox-string {
-    font-family: Monaco, monospace;
-    color: red;
-    white-space: pre;
-}
-
-.objectBox-number {
-    color: #000088;
-}
-
-.objectBox-function {
-    font-family: Monaco, monospace;
-    color: DarkGreen;
-}
-
-.objectBox-object {
-    color: DarkGreen;
-    font-weight: bold;
-}
-
-/************************************************************************************************/
-
-.logRow-info,
-.logRow-error,
-.logRow-warning {
-    background: #FFFFFF no-repeat 2px 2px;
-    padding-left: 20px;
-    padding-bottom: 3px;
-}
-
-.logRow-info {
-    background-image: url(infoIcon.png);
-}
-
-.logRow-warning {
-    background-color: cyan;
-    background-image: url(warningIcon.png);
-}
-
-.logRow-error {
-    background-color: LightYellow;
-    background-image: url(errorIcon.png);
-}
-
-.errorMessage {
-    vertical-align: top;
-    color: #FF0000;
-}
-
-.objectBox-sourceLink {
-    position: absolute;
-    right: 4px;
-    top: 2px;
-    padding-left: 8px;
-    font-family: Lucida Grande, sans-serif;
-    font-weight: bold;
-    color: #0000FF;
-}
-
-/************************************************************************************************/
-
-.logRow-group {
-    background: #EEEEEE;
-    border-bottom: none;
-}
-
-.logGroup {
-    background: #EEEEEE;
-}
-
-.logGroupBox {
-    margin-left: 24px;
-    border-top: 1px solid #D7D7D7;
-    border-left: 1px solid #D7D7D7;
-}
-
-/************************************************************************************************/
-
-.selectorTag,
-.selectorId,
-.selectorClass {
-    font-family: Monaco, monospace;
-    font-weight: normal;
-}
-
-.selectorTag {
-    color: #0000FF;
-}
-
-.selectorId {
-    color: DarkBlue;
-}
-
-.selectorClass {
-    color: red;
-}
-
-/************************************************************************************************/
-
-.objectBox-element {
-    font-family: Monaco, monospace;
-    color: #000088;
-}
-
-.nodeChildren {
-    margin-left: 16px;
-}
-
-.nodeTag {
-    color: blue;
-}
-
-.nodeValue {
-    color: #FF0000;
-    font-weight: normal;
-}
-
-.nodeText,
-.nodeComment {
-    margin: 0 2px;
-    vertical-align: top;
-}
-
-.nodeText {
-    color: #333333;
-}
-
-.nodeComment {
-    color: DarkGreen;
-}
-
-/************************************************************************************************/
-
-.propertyNameCell {
-    vertical-align: top;
-}
-
-.propertyName {
-    font-weight: bold;
-}
-

--- a/labs/openlayers/lib/Firebug/firebug.html
+++ /dev/null
@@ -1,24 +1,1 @@
-<!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">
-
-<head>
-    <title>Firebug</title>
-    <link rel="stylesheet" type="text/css" href="firebug.css">
-</head>
-
-<body>
-    <div id="toolbar" class="toolbar">
-        <a href="#" onclick="parent.console.clear()">Clear</a>
-        <span class="toolbarRight">
-            <a href="#" onclick="parent.console.close()">Close</a>
-        </span>
-    </div>
-    <div id="log"></div>
-    <input type="text" id="commandLine">
-    
-    <script>parent.onFirebugReady(document);</script>
-</body>
-</html>
-

--- a/labs/openlayers/lib/Firebug/firebug.js
+++ /dev/null
@@ -1,675 +1,1 @@
 
-if (!window.console || !console.firebug) { (function()
-{
-    window.console = 
-    {
-        log: function()
-        {
-            logFormatted(arguments, "");
-        },
-        
-        debug: function()
-        {
-            logFormatted(arguments, "debug");
-        },
-        
-        info: function()
-        {
-            logFormatted(arguments, "info");
-        },
-        
-        warn: function()
-        {
-            logFormatted(arguments, "warning");
-        },
-        
-        error: function()
-        {
-            logFormatted(arguments, "error");
-        },
-        
-        assert: function(truth, message)
-        {
-            if (!truth)
-            {
-                var args = [];
-                for (var i = 1; i < arguments.length; ++i)
-                    args.push(arguments[i]);
-                
-                logFormatted(args.length ? args : ["Assertion Failure"], "error");
-                throw message ? message : "Assertion Failure";
-            }
-        },
-        
-        dir: function(object)
-        {
-            var html = [];
-                        
-            var pairs = [];
-            for (var name in object)
-            {
-                try
-                {
-                    pairs.push([name, object[name]]);
-                }
-                catch (exc)
-                {
-                }
-            }
-            
-            pairs.sort(function(a, b) { return a[0] < b[0] ? -1 : 1; });
-            
-            html.push('<table>');
-            for (var i = 0; i < pairs.length; ++i)
-            {
-                var name = pairs[i][0], value = pairs[i][1];
-                
-                html.push('<tr>', 
-                '<td class="propertyNameCell"><span class="propertyName">',
-                    escapeHTML(name), '</span></td>', '<td><span class="propertyValue">');
-                appendObject(value, html);
-                html.push('</span></td></tr>');
-            }
-            html.push('</table>');
-            
-            logRow(html, "dir");
-        },
-        
-        dirxml: function(node)
-        {
-            var html = [];
-            
-            appendNode(node, html);
-            logRow(html, "dirxml");
-        },
-        
-        group: function()
-        {
-            logRow(arguments, "group", pushGroup);
-        },
-        
-        groupEnd: function()
-        {
-            logRow(arguments, "", popGroup);
-        },
-        
-        time: function(name)
-        {
-            timeMap[name] = (new Date()).getTime();
-        },
-        
-        timeEnd: function(name)
-        {
-            if (name in timeMap)
-            {
-                var delta = (new Date()).getTime() - timeMap[name];
-                logFormatted([name+ ":", delta+"ms"]);
-                delete timeMap[name];
-            }
-        },
-        
-        count: function()
-        {
-            this.warn(["count() not supported."]);
-        },
-        
-        trace: function()
-        {
-            this.warn(["trace() not supported."]);
-        },
-        
-        profile: function()
-        {
-            this.warn(["profile() not supported."]);
-        },
-        
-        profileEnd: function()
-        {
-        },
-        
-        clear: function()
-        {
-            consoleBody.innerHTML = "";
-        },
-
-        open: function()
-        {
-            toggleConsole(true);
-        },
-        
-        close: function()
-        {
-            if (frameVisible)
-                toggleConsole();
-        }
-    };
- 
-    // ********************************************************************************************
-       
-    var consoleFrame = null;
-    var consoleBody = null;
-    var commandLine = null;
-    
-    var frameVisible = false;
-    var messageQueue = [];
-    var groupStack = [];
-    var timeMap = {};
-    
-    var clPrefix = ">>> ";
-    
-    var isFirefox = navigator.userAgent.indexOf("Firefox") != -1;
-    var isIE = navigator.userAgent.indexOf("MSIE") != -1;
-    var isOpera = navigator.userAgent.indexOf("Opera") != -1;
-    var isSafari = navigator.userAgent.indexOf("AppleWebKit") != -1;
-
-    // ********************************************************************************************
-
-    function toggleConsole(forceOpen)
-    {
-        frameVisible = forceOpen || !frameVisible;
-        if (consoleFrame)
-            consoleFrame.style.visibility = frameVisible ? "visible" : "hidden";
-        else
-            waitForBody();
-    }
-
-    function focusCommandLine()
-    {
-        toggleConsole(true);
-        if (commandLine)
-            commandLine.focus();
-    }
-
-    function waitForBody()
-    {
-        if (document.body)
-            createFrame();
-        else
-            setTimeout(waitForBody, 200);
-    }    
-
-    function createFrame()
-    {
-        if (consoleFrame)
-            return;
-        
-        window.onFirebugReady = function(doc)
-        {
-            window.onFirebugReady = null;
-
-            var toolbar = doc.getElementById("toolbar");
-            toolbar.onmousedown = onSplitterMouseDown;
-
-            commandLine = doc.getElementById("commandLine");
-            addEvent(commandLine, "keydown", onCommandLineKeyDown);
-
-            addEvent(doc, isIE || isSafari ? "keydown" : "keypress", onKeyDown);
-            
-            consoleBody = doc.getElementById("log");
-            layout();
-            flush();
-        }
-
-        var baseURL = getFirebugURL();
-
-        consoleFrame = document.createElement("iframe");
-        consoleFrame.setAttribute("src", baseURL+"/firebug.html");
-        consoleFrame.setAttribute("frameBorder", "0");
-        consoleFrame.style.visibility = (frameVisible ? "visible" : "hidden");    
-        consoleFrame.style.zIndex = "2147483583";
-        consoleFrame.style.position = document.all ? "absolute" : "fixed";
-        consoleFrame.style.width = "100%";
-        consoleFrame.style.left = "0";
-        consoleFrame.style.bottom = "0";
-        consoleFrame.style.height = "200px";
-        document.body.appendChild(consoleFrame);
-    }
-    
-    function getFirebugURL()
-    {
-        var scripts = document.getElementsByTagName("script");
-        for (var i = 0; i < scripts.length; ++i)
-        {
-            if (scripts[i].src.indexOf("firebug.js") != -1)
-            {
-                var lastSlash = scripts[i].src.lastIndexOf("/");
-                return scripts[i].src.substr(0, lastSlash);
-            }
-        }
-    }
-    
-    function evalCommandLine()
-    {
-        var text = commandLine.value;
-        commandLine.value = "";
-
-        logRow([clPrefix, text], "command");
-        
-        var value;
-        try
-        {
-            value = eval(text);
-        }
-        catch (exc)
-        {
-        }
-
-        console.log(value);
-    }
-    
-    function layout()
-    {
-        var toolbar = consoleBody.ownerDocument.getElementById("toolbar");
-        var height = consoleFrame.offsetHeight - (toolbar.offsetHeight + commandLine.offsetHeight);
-        height = Math.max(height, 0);
-        consoleBody.style.top = toolbar.offsetHeight + "px";
-        consoleBody.style.height = height + "px";
-        
-        commandLine.style.top = (consoleFrame.offsetHeight - commandLine.offsetHeight) + "px";
-    }
-    
-    function logRow(message, className, handler)
-    {
-        if (consoleBody)
-            writeMessage(message, className, handler);
-        else
-        {
-            messageQueue.push([message, className, handler]);
-            waitForBody();
-        }
-    }
-    
-    function flush()
-    {
-        var queue = messageQueue;
-        messageQueue = [];
-        
-        for (var i = 0; i < queue.length; ++i)
-            writeMessage(queue[i][0], queue[i][1], queue[i][2]);
-    }
-
-    function writeMessage(message, className, handler)
-    {
-        var isScrolledToBottom =
-            consoleBody.scrollTop + consoleBody.offsetHeight >= consoleBody.scrollHeight;
-
-        if (!handler)
-            handler = writeRow;
-        
-        handler(message, className);
-        
-        if (isScrolledToBottom)
-            consoleBody.scrollTop = consoleBody.scrollHeight - consoleBody.offsetHeight;
-    }
-    
-    function appendRow(row)
-    {
-        var container = groupStack.length ? groupStack[groupStack.length-1] : consoleBody;
-        container.appendChild(row);
-    }
-
-    function writeRow(message, className)
-    {
-        var row = consoleBody.ownerDocument.createElement("div");
-        row.className = "logRow" + (className ? " logRow-"+className : "");
-        row.innerHTML = message.join("");
-        appendRow(row);
-    }
-
-    function pushGroup(message, className)
-    {
-        logFormatted(message, className);
-
-        var groupRow = consoleBody.ownerDocument.createElement("div");
-        groupRow.className = "logGroup";
-        var groupRowBox = consoleBody.ownerDocument.createElement("div");
-        groupRowBox.className = "logGroupBox";
-        groupRow.appendChild(groupRowBox);
-        appendRow(groupRowBox);
-        groupStack.push(groupRowBox);
-    }
-
-    function popGroup()
-    {
-        groupStack.pop();
-    }
-    
-    // ********************************************************************************************
-
-    function logFormatted(objects, className)
-    {
-        var html = [];
-
-        var format = objects[0];
-        var objIndex = 0;
-
-        if (typeof(format) != "string")
-        {
-            format = "";
-            objIndex = -1;
-        }
-
-        var parts = parseFormat(format);
-        for (var i = 0; i < parts.length; ++i)
-        {
-            var part = parts[i];
-            if (part && typeof(part) == "object")
-            {
-                var object = objects[++objIndex];
-                part.appender(object, html);
-            }
-            else
-                appendText(part, html);
-        }
-
-        for (var i = objIndex+1; i < objects.length; ++i)
-        {
-            appendText(" ", html);
-            
-            var object = objects[i];
-            if (typeof(object) == "string")
-                appendText(object, html);
-            else
-                appendObject(object, html);
-        }
-        
-        logRow(html, className);
-    }
-
-    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]) : (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 escapeHTML(value)
-    {
-        function replaceChars(ch)
-        {
-            switch (ch)
-            {
-                case "<":
-                    return "&lt;";
-                case ">":
-                    return "&gt;";
-                case "&":
-                    return "&amp;";
-                case "'":
-                    return "&#39;";
-                case '"':
-                    return "&quot;";
-            }
-            return "?";
-        };
-        return String(value).replace(/[<>&"']/g, replaceChars);
-    }
-
-    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('<span class="objectBox-null">', escapeHTML(objectToString(object)), '</span>');
-    }
-
-    function appendString(object, html)
-    {
-        html.push('<span class="objectBox-string">&quot;', escapeHTML(objectToString(object)),
-            '&quot;</span>');
-    }
-
-    function appendInteger(object, html)
-    {
-        html.push('<span class="objectBox-number">', escapeHTML(objectToString(object)), '</span>');
-    }
-
-    function appendFloat(object, html)
-    {
-        html.push('<span class="objectBox-number">', escapeHTML(objectToString(object)), '</span>');
-    }
-
-    function appendFunction(object, html)
-    {
-        var reName = /function ?(.*?)\(/;
-        var m = reName.exec(objectToString(object));
-        var name = m ? m[1] : "function";
-        html.push('<span class="objectBox-function">', escapeHTML(name), '()</span>');
-    }
-    
-    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 appendObjectFormatted(object, html)
-    {
-        var text = objectToString(object);
-        var reObject = /\[object (.*?)\]/;
-
-        var m = reObject.exec(text);
-        html.push('<span class="objectBox-object">', m ? m[1] : text, '</span>')
-    }
-    
-    function appendSelector(object, html)
-    {
-        html.push('<span class="objectBox-selector">');
-
-        html.push('<span class="selectorTag">', escapeHTML(object.nodeName.toLowerCase()), '</span>');
-        if (object.id)
-            html.push('<span class="selectorId">#', escapeHTML(object.id), '</span>');
-        if (object.className)
-            html.push('<span class="selectorClass">.', escapeHTML(object.className), '</span>');
-
-        html.push('</span>');
-    }
-
-    function appendNode(node, html)
-    {
-        if (node.nodeType == 1)
-        {
-            html.push(
-                '<div class="objectBox-element">',
-                    '&lt;<span class="nodeTag">', node.nodeName.toLowerCase(), '</span>');
-
-            for (var i = 0; i < node.attributes.length; ++i)
-            {
-                var attr = node.attributes[i];
-                if (!attr.specified)
-                    continue;
-                
-                html.push('&nbsp;<span class="nodeName">', attr.nodeName.toLowerCase(),
-                    '</span>=&quot;<span class="nodeValue">', escapeHTML(attr.nodeValue),
-                    '</span>&quot;')
-            }
-
-            if (node.firstChild)
-            {
-                html.push('&gt;</div><div class="nodeChildren">');
-
-                for (var child = node.firstChild; child; child = child.nextSibling)
-                    appendNode(child, html);
-                    
-                html.push('</div><div class="objectBox-element">&lt;/<span class="nodeTag">', 
-                    node.nodeName.toLowerCase(), '&gt;</span></div>');
-            }
-            else
-                html.push('/&gt;</div>');
-        }
-        else if (node.nodeType == 3)
-        {
-            html.push('<div class="nodeText">', escapeHTML(node.nodeValue),
-                '</div>');
-        }
-    }
-
-    // ********************************************************************************************
-    
-    function addEvent(object, name, handler)
-    {
-        if (document.all)
-            object.attachEvent("on"+name, handler);
-        else
-            object.addEventListener(name, handler, false);
-    }
-    
-    function removeEvent(object, name, handler)
-    {
-        if (document.all)
-            object.detachEvent("on"+name, handler);
-        else
-            object.removeEventListener(name, handler, false);
-    }
-    
-    function cancelEvent(event)
-    {
-        if (document.all)
-            event.cancelBubble = true;
-        else
-            event.stopPropagation();        
-    }
-
-    function onError(msg, href, lineNo)
-    {
-        var html = [];
-        
-        var lastSlash = href.lastIndexOf("/");
-        var fileName = lastSlash == -1 ? href : href.substr(lastSlash+1);
-        
-        html.push(
-            '<span class="errorMessage">', msg, '</span>', 
-            '<div class="objectBox-sourceLink">', fileName, ' (line ', lineNo, ')</div>'
-        );
-        
-        logRow(html, "error");
-    };
-
-    function onKeyDown(event)
-    {
-        if (event.keyCode == 123)
-            toggleConsole();
-        else if ((event.keyCode == 108 || event.keyCode == 76) && event.shiftKey
-                 && (event.metaKey || event.ctrlKey))
-            focusCommandLine();
-        else
-            return;
-        
-        cancelEvent(event);
-    }
-
-    function onSplitterMouseDown(event)
-    {
-        if (isSafari || isOpera)
-            return;
-        
-        addEvent(document, "mousemove", onSplitterMouseMove);
-        addEvent(document, "mouseup", onSplitterMouseUp);
-
-        for (var i = 0; i < frames.length; ++i)
-        {
-            addEvent(frames[i].document, "mousemove", onSplitterMouseMove);
-            addEvent(frames[i].document, "mouseup", onSplitterMouseUp);
-        }
-    }
-    
-    function onSplitterMouseMove(event)
-    {
-        var win = document.all
-            ? event.srcElement.ownerDocument.parentWindow
-            : event.target.ownerDocument.defaultView;
-
-        var clientY = event.clientY;
-        if (win != win.parent)
-            clientY += win.frameElement ? win.frameElement.offsetTop : 0;
-        
-        var height = consoleFrame.offsetTop + consoleFrame.clientHeight;
-        var toolbar = consoleBody.ownerDocument.getElementById("toolbar");
-        var y = Math.max(height - clientY,
-                         toolbar.offsetHeight + commandLine.offsetHeight);
-        
-        consoleFrame.style.height = y + "px";
-        layout();
-    }
-    
-    function onSplitterMouseUp(event)
-    {
-        removeEvent(document, "mousemove", onSplitterMouseMove);
-        removeEvent(document, "mouseup", onSplitterMouseUp);
-
-        for (var i = 0; i < frames.length; ++i)
-        {
-            removeEvent(frames[i].document, "mousemove", onSplitterMouseMove);
-            removeEvent(frames[i].document, "mouseup", onSplitterMouseUp);
-        }
-    }
-    
-    function onCommandLineKeyDown(event)
-    {
-        if (event.keyCode == 13)
-            evalCommandLine();
-        else if (event.keyCode == 27)
-            commandLine.value = "";
-    }
-    
-    window.onerror = onError;
-    addEvent(document, isIE || isSafari ? "keydown" : "keypress", onKeyDown);
-    
-    if (document.documentElement.getAttribute("debug") == "true")
-        toggleConsole(true);
-})();
-}
-

--- a/labs/openlayers/lib/Firebug/firebugx.js
+++ /dev/null
@@ -1,10 +1,1 @@
 
-if (!window.console || !console.firebug) {
-    var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
-    "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
-
-    window.console = {};
-    for (var i = 0; i < names.length; ++i)
-        window.console[names[i]] = function() {}
-}
-

 Binary files a/labs/openlayers/lib/Firebug/infoIcon.png and /dev/null differ
--- a/labs/openlayers/lib/Firebug/license.txt
+++ /dev/null
@@ -1,31 +1,1 @@
-Software License Agreement (BSD License)
 
-Copyright (c) 2007, Parakey Inc.
-All rights reserved.
-
-Redistribution and use of this software 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 Parakey Inc. nor the names of its
-  contributors may be used to endorse or promote products
-  derived from this software without specific prior
-  written permission of Parakey Inc.
-
-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.
-

--- a/labs/openlayers/lib/Firebug/readme.txt
+++ /dev/null
@@ -1,13 +1,1 @@
-This directory contains the source for Firebug Lite
-(http://www.getfirebug.com/lite.html).  This code is distributed with a
-BSD License, Copyright (c) 2007, Parakey Inc.  See the included license.txt
-for the full text of the license.
 
-This is a patched version of the trunk from
-http://fbug.googlecode.com/svn/trunk.
-
-Revision 36 was patched to resolve the issue described here
-http://code.google.com/p/fbug/issues/detail?id=85
-
-When this issue is resolved, Firebug Lite can be used directly - no further
-modifications are needed for OpenLayers.

 Binary files a/labs/openlayers/lib/Firebug/warningIcon.png and /dev/null differ
--- a/labs/openlayers/lib/Gears/gears_init.js
+++ /dev/null
@@ -1,89 +1,1 @@
-/*
- * Copyright 2007, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. 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.
- *  3. Neither the name of Google Inc. 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 AUTHOR ``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 AUTHOR 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.
- *
- * Sets up google.gears.*, which is *the only* supported way to access Gears.
- *
- * Circumvent this file at your own risk!
- *
- * In the future, Gears may automatically define google.gears.* without this
- * file. Gears may use these objects to transparently fix bugs and compatibility
- * issues. Applications that use the code below will continue to work seamlessly
- * when that happens.
- */
 
-(function() {
-  // We are already defined. Hooray!
-  if (window.google && google.gears) {
-    return;
-  }
-
-  var factory = null;
-
-  // Firefox
-  if (typeof GearsFactory != 'undefined') {
-    factory = new GearsFactory();
-  } else {
-    // IE
-    try {
-      factory = new ActiveXObject('Gears.Factory');
-      // privateSetGlobalObject is only required and supported on WinCE.
-      if (factory.getBuildInfo().indexOf('ie_mobile') != -1) {
-        factory.privateSetGlobalObject(this);
-      }
-    } catch (e) {
-      // Safari
-      if ((typeof navigator.mimeTypes != 'undefined')
-           && navigator.mimeTypes["application/x-googlegears"]) {
-        factory = document.createElement("object");
-        factory.style.display = "none";
-        factory.width = 0;
-        factory.height = 0;
-        factory.type = "application/x-googlegears";
-        document.documentElement.appendChild(factory);
-      }
-    }
-  }
-
-  // *Do not* define any objects if Gears is not installed. This mimics the
-  // behavior of Gears defining the objects in the future.
-  if (!factory) {
-    return;
-  }
-
-  // Now set up the objects, being careful not to overwrite anything.
-  //
-  // Note: In Internet Explorer for Windows Mobile, you can't add properties to
-  // the window object. However, global objects are automatically added as
-  // properties of the window object in all browsers.
-  if (!window.google) {
-    google = {};
-  }
-
-  if (!google.gears) {
-    google.gears = {factory: factory};
-  }
-})();
-

--- a/labs/openlayers/lib/OpenLayers.js
+++ /dev/null
@@ -1,349 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/* 
- * @requires OpenLayers/BaseTypes.js
- * @requires OpenLayers/Lang/en.js
- * @requires OpenLayers/Console.js
- */ 
-
-(function() {
-    /**
-     * Before creating the OpenLayers namespace, check to see if
-     * OpenLayers.singleFile is true.  This occurs if the
-     * OpenLayers/SingleFile.js script is included before this one - as is the
-     * case with single file builds.
-     */
-    var singleFile = (typeof OpenLayers == "object" && OpenLayers.singleFile);
-    
-    /**
-     * Cache for the script location returned from
-     * OpenLayers._getScriptLocation
-     */
-    var scriptLocation;
-    
-    /**
-     * Namespace: OpenLayers
-     * The OpenLayers object provides a namespace for all things OpenLayers
-     */
-    window.OpenLayers = {
-        
-        /**
-         * Property: _scriptName
-         * {String} Relative path of this script.
-         */
-        _scriptName: (!singleFile) ? "lib/OpenLayers.js" : "OpenLayers.js",
-
-        /**
-         * Function: _getScriptLocation
-         * Return the path to this script.
-         *
-         * Returns:
-         * {String} Path to this script
-         */
-        _getScriptLocation: function () {
-            if (scriptLocation != undefined) {
-                return scriptLocation;
-            }
-            scriptLocation = "";            
-            var isOL = new RegExp("(^|(.*?\\/))(" + OpenLayers._scriptName + ")(\\?|$)");
-         
-            var scripts = document.getElementsByTagName('script');
-            for (var i=0, len=scripts.length; i<len; i++) {
-                var src = scripts[i].getAttribute('src');
-                if (src) {
-                    var match = src.match(isOL);
-                    if(match) {
-                        scriptLocation = match[1];
-                        break;
-                    }
-                }
-            }
-            return scriptLocation;
-        }
-    };
-    /**
-     * OpenLayers.singleFile is a flag indicating this file is being included
-     * in a Single File Library build of the OpenLayers Library.
-     * 
-     * When we are *not* part of a SFL build we dynamically include the
-     * OpenLayers library code.
-     * 
-     * When we *are* part of a SFL build we do not dynamically include the 
-     * OpenLayers library code as it will be appended at the end of this file.
-      */
-    if(!singleFile) {
-        var jsfiles = new Array(
-            "OpenLayers/Util.js",
-            "OpenLayers/BaseTypes.js",
-            "OpenLayers/BaseTypes/Class.js",
-            "OpenLayers/BaseTypes/Bounds.js",
-            "OpenLayers/BaseTypes/Element.js",
-            "OpenLayers/BaseTypes/LonLat.js",
-            "OpenLayers/BaseTypes/Pixel.js",
-            "OpenLayers/BaseTypes/Size.js",
-            "OpenLayers/Console.js",
-            "OpenLayers/Tween.js",
-            "Rico/Corner.js",
-            "Rico/Color.js",
-            "OpenLayers/Ajax.js",
-            "OpenLayers/Events.js",
-            "OpenLayers/Request.js",
-            "OpenLayers/Request/XMLHttpRequest.js",
-            "OpenLayers/Projection.js",
-            "OpenLayers/Map.js",
-            "OpenLayers/Layer.js",
-            "OpenLayers/Icon.js",
-            "OpenLayers/Marker.js",
-            "OpenLayers/Marker/Box.js",
-            "OpenLayers/Popup.js",
-            "OpenLayers/Tile.js",
-            "OpenLayers/Tile/Image.js",
-            "OpenLayers/Tile/Image/IFrame.js",
-            "OpenLayers/Tile/WFS.js",
-            "OpenLayers/Layer/Image.js",
-            "OpenLayers/Layer/SphericalMercator.js",
-            "OpenLayers/Layer/EventPane.js",
-            "OpenLayers/Layer/FixedZoomLevels.js",
-            "OpenLayers/Layer/Google.js",
-            "OpenLayers/Layer/Google/v3.js",
-            "OpenLayers/Layer/VirtualEarth.js",
-            "OpenLayers/Layer/Yahoo.js",
-            "OpenLayers/Layer/HTTPRequest.js",
-            "OpenLayers/Layer/Grid.js",
-            "OpenLayers/Layer/MapGuide.js",
-            "OpenLayers/Layer/MapServer.js",
-            "OpenLayers/Layer/MapServer/Untiled.js",
-            "OpenLayers/Layer/KaMap.js",
-            "OpenLayers/Layer/KaMapCache.js",
-            "OpenLayers/Layer/MultiMap.js",
-            "OpenLayers/Layer/Markers.js",
-            "OpenLayers/Layer/Text.js",
-            "OpenLayers/Layer/WorldWind.js",
-            "OpenLayers/Layer/ArcGIS93Rest.js",
-            "OpenLayers/Layer/WMS.js",
-            "OpenLayers/Layer/WMS/Untiled.js",
-            "OpenLayers/Layer/WMS/Post.js",
-            "OpenLayers/Layer/WMTS.js",
-            "OpenLayers/Layer/ArcIMS.js",
-            "OpenLayers/Layer/GeoRSS.js",
-            "OpenLayers/Layer/Boxes.js",
-            "OpenLayers/Layer/XYZ.js",
-            "OpenLayers/Layer/TMS.js",
-            "OpenLayers/Layer/TileCache.js",
-            "OpenLayers/Layer/Zoomify.js",
-            "OpenLayers/Popup/Anchored.js",
-            "OpenLayers/Popup/AnchoredBubble.js",
-            "OpenLayers/Popup/Framed.js",
-            "OpenLayers/Popup/FramedCloud.js",
-            "OpenLayers/Feature.js",
-            "OpenLayers/Feature/Vector.js",
-            "OpenLayers/Feature/WFS.js",
-            "OpenLayers/Handler.js",
-            "OpenLayers/Handler/Click.js",
-            "OpenLayers/Handler/Hover.js",
-            "OpenLayers/Handler/Point.js",
-            "OpenLayers/Handler/Path.js",
-            "OpenLayers/Handler/Polygon.js",
-            "OpenLayers/Handler/Feature.js",
-            "OpenLayers/Handler/Drag.js",
-            "OpenLayers/Handler/RegularPolygon.js",
-            "OpenLayers/Handler/Box.js",
-            "OpenLayers/Handler/MouseWheel.js",
-            "OpenLayers/Handler/Keyboard.js",
-            "OpenLayers/Control.js",
-            "OpenLayers/Control/Attribution.js",
-            "OpenLayers/Control/Button.js",
-            "OpenLayers/Control/ZoomBox.js",
-            "OpenLayers/Control/ZoomToMaxExtent.js",
-            "OpenLayers/Control/DragPan.js",
-            "OpenLayers/Control/Navigation.js",
-            "OpenLayers/Control/MouseDefaults.js",
-            "OpenLayers/Control/MousePosition.js",
-            "OpenLayers/Control/OverviewMap.js",
-            "OpenLayers/Control/KeyboardDefaults.js",
-            "OpenLayers/Control/PanZoom.js",
-            "OpenLayers/Control/PanZoomBar.js",
-            "OpenLayers/Control/ArgParser.js",
-            "OpenLayers/Control/Permalink.js",
-            "OpenLayers/Control/Scale.js",
-            "OpenLayers/Control/ScaleLine.js",
-            "OpenLayers/Control/Snapping.js",
-            "OpenLayers/Control/Split.js",
-            "OpenLayers/Control/LayerSwitcher.js",
-            "OpenLayers/Control/DrawFeature.js",
-            "OpenLayers/Control/DragFeature.js",
-            "OpenLayers/Control/ModifyFeature.js",
-            "OpenLayers/Control/Panel.js",
-            "OpenLayers/Control/SelectFeature.js",
-            "OpenLayers/Control/NavigationHistory.js",
-            "OpenLayers/Control/Measure.js",
-            "OpenLayers/Control/WMSGetFeatureInfo.js",
-            "OpenLayers/Control/WMTSGetFeatureInfo.js",
-            "OpenLayers/Control/Graticule.js",
-            "OpenLayers/Control/TransformFeature.js",
-            "OpenLayers/Control/SLDSelect.js",
-            "OpenLayers/Geometry.js",
-            "OpenLayers/Geometry/Rectangle.js",
-            "OpenLayers/Geometry/Collection.js",
-            "OpenLayers/Geometry/Point.js",
-            "OpenLayers/Geometry/MultiPoint.js",
-            "OpenLayers/Geometry/Curve.js",
-            "OpenLayers/Geometry/LineString.js",
-            "OpenLayers/Geometry/LinearRing.js",        
-            "OpenLayers/Geometry/Polygon.js",
-            "OpenLayers/Geometry/MultiLineString.js",
-            "OpenLayers/Geometry/MultiPolygon.js",
-            "OpenLayers/Geometry/Surface.js",
-            "OpenLayers/Renderer.js",
-            "OpenLayers/Renderer/Elements.js",
-            "OpenLayers/Renderer/SVG.js",
-            "OpenLayers/Renderer/Canvas.js",
-            "OpenLayers/Renderer/VML.js",
-            "OpenLayers/Layer/Vector.js",
-            "OpenLayers/Layer/Vector/RootContainer.js",
-            "OpenLayers/Strategy.js",
-            "OpenLayers/Strategy/Filter.js",
-            "OpenLayers/Strategy/Fixed.js",
-            "OpenLayers/Strategy/Cluster.js",
-            "OpenLayers/Strategy/Paging.js",
-            "OpenLayers/Strategy/BBOX.js",
-            "OpenLayers/Strategy/Save.js",
-            "OpenLayers/Strategy/Refresh.js",
-            "OpenLayers/Filter.js",
-            "OpenLayers/Filter/FeatureId.js",
-            "OpenLayers/Filter/Logical.js",
-            "OpenLayers/Filter/Comparison.js",
-            "OpenLayers/Filter/Spatial.js",
-            "OpenLayers/Protocol.js",
-            "OpenLayers/Protocol/HTTP.js",
-            "OpenLayers/Protocol/SQL.js",
-            "OpenLayers/Protocol/SQL/Gears.js",
-            "OpenLayers/Protocol/WFS.js",
-            "OpenLayers/Protocol/WFS/v1.js",
-            "OpenLayers/Protocol/WFS/v1_0_0.js",
-            "OpenLayers/Protocol/WFS/v1_1_0.js",
-            "OpenLayers/Protocol/SOS.js",
-            "OpenLayers/Protocol/SOS/v1_0_0.js",
-            "OpenLayers/Layer/PointTrack.js",
-            "OpenLayers/Layer/GML.js",
-            "OpenLayers/Style.js",
-            "OpenLayers/Style2.js",
-            "OpenLayers/StyleMap.js",
-            "OpenLayers/Rule.js",
-            "OpenLayers/Format.js",
-            "OpenLayers/Format/XML.js",
-            "OpenLayers/Format/Context.js",
-            "OpenLayers/Format/ArcXML.js",
-            "OpenLayers/Format/ArcXML/Features.js",
-            "OpenLayers/Format/GML.js",
-            "OpenLayers/Format/GML/Base.js",
-            "OpenLayers/Format/GML/v2.js",
-            "OpenLayers/Format/GML/v3.js",
-            "OpenLayers/Format/Atom.js",
-            "OpenLayers/Format/KML.js",
-            "OpenLayers/Format/GeoRSS.js",
-            "OpenLayers/Format/WFS.js",
-            "OpenLayers/Format/WFSCapabilities.js",
-            "OpenLayers/Format/WFSCapabilities/v1.js",
-            "OpenLayers/Format/WFSCapabilities/v1_0_0.js",
-            "OpenLayers/Format/WFSCapabilities/v1_1_0.js",
-            "OpenLayers/Format/WFSDescribeFeatureType.js",
-            "OpenLayers/Format/WMSDescribeLayer.js",
-            "OpenLayers/Format/WMSDescribeLayer/v1_1.js",
-            "OpenLayers/Format/WKT.js",
-            "OpenLayers/Format/OSM.js",
-            "OpenLayers/Format/GPX.js",
-            "OpenLayers/Format/Filter.js",
-            "OpenLayers/Format/Filter/v1.js",
-            "OpenLayers/Format/Filter/v1_0_0.js",
-            "OpenLayers/Format/Filter/v1_1_0.js",
-            "OpenLayers/Format/SLD.js",
-            "OpenLayers/Format/SLD/v1.js",
-            "OpenLayers/Format/SLD/v1_0_0.js",
-            "OpenLayers/Format/OWSCommon/v1.js",
-            "OpenLayers/Format/OWSCommon/v1_0_0.js",
-            "OpenLayers/Format/OWSCommon/v1_1_0.js",
-            "OpenLayers/Format/CSWGetDomain.js",
-            "OpenLayers/Format/CSWGetDomain/v2_0_2.js",
-            "OpenLayers/Format/CSWGetRecords.js",
-            "OpenLayers/Format/CSWGetRecords/v2_0_2.js",
-            "OpenLayers/Format/WFST.js",
-            "OpenLayers/Format/WFST/v1.js",
-            "OpenLayers/Format/WFST/v1_0_0.js",
-            "OpenLayers/Format/WFST/v1_1_0.js",
-            "OpenLayers/Format/Text.js",
-            "OpenLayers/Format/JSON.js",
-            "OpenLayers/Format/GeoJSON.js",
-            "OpenLayers/Format/WMC.js",
-            "OpenLayers/Format/WMC/v1.js",
-            "OpenLayers/Format/WMC/v1_0_0.js",
-            "OpenLayers/Format/WMC/v1_1_0.js",
-            "OpenLayers/Format/WMSCapabilities.js",
-            "OpenLayers/Format/WMSCapabilities/v1.js",
-            "OpenLayers/Format/WMSCapabilities/v1_1.js",
-            "OpenLayers/Format/WMSCapabilities/v1_1_0.js",
-            "OpenLayers/Format/WMSCapabilities/v1_1_1.js",
-            "OpenLayers/Format/WMSCapabilities/v1_3.js",
-            "OpenLayers/Format/WMSCapabilities/v1_3_0.js",
-            "OpenLayers/Format/WMSGetFeatureInfo.js",
-            "OpenLayers/Format/SOSCapabilities.js",
-            "OpenLayers/Format/SOSCapabilities/v1_0_0.js",
-            "OpenLayers/Format/SOSGetObservation.js",
-            "OpenLayers/Format/SOSGetFeatureOfInterest.js",
-            "OpenLayers/Format/OWSContext.js",
-            "OpenLayers/Format/OWSContext/v0_3_1.js",
-            "OpenLayers/Format/WMTSCapabilities.js",
-            "OpenLayers/Format/WMTSCapabilities/v1_0_0.js",
-            "OpenLayers/Layer/WFS.js",
-            "OpenLayers/Control/GetFeature.js",
-            "OpenLayers/Control/MouseToolbar.js",
-            "OpenLayers/Control/NavToolbar.js",
-            "OpenLayers/Control/PanPanel.js",
-            "OpenLayers/Control/Pan.js",
-            "OpenLayers/Control/ZoomIn.js",
-            "OpenLayers/Control/ZoomOut.js",
-            "OpenLayers/Control/ZoomPanel.js",
-            "OpenLayers/Control/EditingToolbar.js",
-            "OpenLayers/Symbolizer.js",
-            "OpenLayers/Symbolizer/Point.js",
-            "OpenLayers/Symbolizer/Line.js",
-            "OpenLayers/Symbolizer/Polygon.js",
-            "OpenLayers/Symbolizer/Text.js",
-            "OpenLayers/Symbolizer/Raster.js",
-            "OpenLayers/Lang.js",
-            "OpenLayers/Lang/en.js"
-        ); // etc.
-
-        var agent = navigator.userAgent;
-        var docWrite = (agent.match("MSIE") || agent.match("Safari"));
-        if(docWrite) {
-            var allScriptTags = new Array(jsfiles.length);
-        }
-        var host = OpenLayers._getScriptLocation() + "lib/";    
-        for (var i=0, len=jsfiles.length; i<len; i++) {
-            if (docWrite) {
-                allScriptTags[i] = "<script src='" + host + jsfiles[i] +
-                                   "'></script>"; 
-            } else {
-                var s = document.createElement("script");
-                s.src = host + jsfiles[i];
-                var h = document.getElementsByTagName("head").length ? 
-                           document.getElementsByTagName("head")[0] : 
-                           document.body;
-                h.appendChild(s);
-            }
-        }
-        if (docWrite) {
-            document.write(allScriptTags.join(""));
-        }
-    }
-})();
-
-/**
- * Constant: VERSION_NUMBER
- */
-OpenLayers.VERSION_NUMBER="OpenLayers 2.10 -- $Revision: 10721 $";
-

--- a/labs/openlayers/lib/OpenLayers/Ajax.js
+++ /dev/null
@@ -1,679 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Request/XMLHttpRequest.js
- * @requires OpenLayers/Console.js
- */
-
-OpenLayers.ProxyHost = "";
-//OpenLayers.ProxyHost = "examples/proxy.cgi?url=";
-
-/**
- * Ajax reader for OpenLayers
- *
- *  @uri url to do remote XML http get
- *  @param {String} 'get' format params (x=y&a=b...)
- *  @who object to handle callbacks for this request
- *  @complete  the function to be called on success 
- *  @failure  the function to be called on failure
- *  
- *   example usage from a caller:
- *  
- *     caps: function(request) {
- *      -blah-  
- *     },
- *  
- *     OpenLayers.loadURL(url,params,this,caps);
- *
- * Notice the above example does not provide an error handler; a default empty
- * handler is provided which merely logs the error if a failure handler is not 
- * supplied
- *
- */
-
-
-/**
- * Function: OpenLayers.nullHandler
- * @param {} request
- */
-OpenLayers.nullHandler = function(request) {
-    OpenLayers.Console.userError(OpenLayers.i18n("unhandledRequest", {'statusText':request.statusText}));
-};
-
-/** 
- * APIFunction: OpenLayers.loadURL
- * Background load a document.  For more flexibility in using XMLHttpRequest,
- *     see the <OpenLayers.Request> methods.
- *
- * Parameters:
- * uri - {String} URI of source doc
- * params - {String} or {Object} GET params. Either a string in the form
- *     "?hello=world&foo=bar" (do not forget the leading question mark)
- *     or an object in the form {'hello': 'world', 'foo': 'bar}
- * caller - {Object} object which gets callbacks
- * onComplete - {Function} Optional callback for success.  The callback
- *     will be called with this set to caller and will receive the request
- *     object as an argument.  Note that if you do not specify an onComplete
- *     function, <OpenLayers.nullHandler> will be called (which pops up a 
- *     user friendly error message dialog).
- * onFailure - {Function} Optional callback for failure.  In the event of
- *     a failure, the callback will be called with this set to caller and will
- *     receive the request object as an argument.  Note that if you do not
- *     specify an onComplete function, <OpenLayers.nullHandler> will be called
- *     (which pops up a user friendly error message dialog).
- *
- * Returns:
- * {<OpenLayers.Request.XMLHttpRequest>}  The request object. To abort loading,
- *     call request.abort().
- */
-OpenLayers.loadURL = function(uri, params, caller,
-                                  onComplete, onFailure) {
-    
-    if(typeof params == 'string') {
-        params = OpenLayers.Util.getParameters(params);
-    }
-    var success = (onComplete) ? onComplete : OpenLayers.nullHandler;
-    var failure = (onFailure) ? onFailure : OpenLayers.nullHandler;
-    
-    return OpenLayers.Request.GET({
-        url: uri, params: params,
-        success: success, failure: failure, scope: caller
-    });
-};
-
-/** 
- * Function: OpenLayers.parseXMLString
- * Parse XML into a doc structure
- * 
- * Parameters:
- * text - {String} 
- * 
- * Returns:
- * {?} Parsed AJAX Responsev
- */
-OpenLayers.parseXMLString = function(text) {
-
-    //MS sucks, if the server is bad it dies
-    var index = text.indexOf('<');
-    if (index > 0) {
-        text = text.substring(index);
-    }
-
-    var ajaxResponse = OpenLayers.Util.Try(
-        function() {
-            var xmldom = new ActiveXObject('Microsoft.XMLDOM');
-            xmldom.loadXML(text);
-            return xmldom;
-        },
-        function() {
-            return new DOMParser().parseFromString(text, 'text/xml');
-        },
-        function() {
-            var req = new XMLHttpRequest();
-            req.open("GET", "data:" + "text/xml" +
-                     ";charset=utf-8," + encodeURIComponent(text), false);
-            if (req.overrideMimeType) {
-                req.overrideMimeType("text/xml");
-            }
-            req.send(null);
-            return req.responseXML;
-        }
-    );
-
-    return ajaxResponse;
-};
-
-
-/**
- * Namespace: OpenLayers.Ajax
- */
-OpenLayers.Ajax = {
-
-    /**
-     * Method: emptyFunction
-     */
-    emptyFunction: function () {},
-
-    /**
-     * Method: getTransport
-     * 
-     * Returns: 
-     * {Object} Transport mechanism for whichever browser we're in, or false if
-     *          none available.
-     */
-    getTransport: function() {
-        return OpenLayers.Util.Try(
-            function() {return new XMLHttpRequest();},
-            function() {return new ActiveXObject('Msxml2.XMLHTTP');},
-            function() {return new ActiveXObject('Microsoft.XMLHTTP');}
-        ) || false;
-    },
-
-    /**
-     * Property: activeRequestCount
-     * {Integer}
-     */
-    activeRequestCount: 0
-};
-
-/**
- * Namespace: OpenLayers.Ajax.Responders
- * {Object}
- */
-OpenLayers.Ajax.Responders = {
-  
-    /**
-     * Property: responders
-     * {Array}
-     */
-    responders: [],
-
-    /**
-     * Method: register
-     *  
-     * Parameters:
-     * responderToAdd - {?}
-     */
-    register: function(responderToAdd) {
-        for (var i = 0; i < this.responders.length; i++){
-            if (responderToAdd == this.responders[i]){
-                return;
-            }
-        }
-        this.responders.push(responderToAdd);
-    },
-
-    /**
-     * Method: unregister
-     *  
-     * Parameters:
-     * responderToRemove - {?}
-     */
-    unregister: function(responderToRemove) {
-        OpenLayers.Util.removeItem(this.reponders, responderToRemove);
-    },
-
-    /**
-     * Method: dispatch
-     * 
-     * Parameters:
-     * callback - {?}
-     * request - {?}
-     * transport - {?}
-     */
-    dispatch: function(callback, request, transport) {
-        var responder;
-        for (var i = 0; i < this.responders.length; i++) {
-            responder = this.responders[i];
-     
-            if (responder[callback] && 
-                typeof responder[callback] == 'function') {
-                try {
-                    responder[callback].apply(responder, 
-                                              [request, transport]);
-                } catch (e) {}
-            }
-        }
-    }
-};
-
-OpenLayers.Ajax.Responders.register({
-    /** 
-     * Function: onCreate
-     */
-    onCreate: function() {
-        OpenLayers.Ajax.activeRequestCount++;
-    },
-
-    /**
-     * Function: onComplete
-     */
-     onComplete: function() {
-         OpenLayers.Ajax.activeRequestCount--;
-     }
-});
-
-/**
- * Class: OpenLayers.Ajax.Base
- */
-OpenLayers.Ajax.Base = OpenLayers.Class({
-      
-    /**
-     * Constructor: OpenLayers.Ajax.Base
-     * 
-     * Parameters: 
-     * options - {Object}
-     */
-    initialize: function(options) {
-        this.options = {
-            method:       'post',
-            asynchronous: true,
-            contentType:  'application/xml',
-            parameters:   ''
-        };
-        OpenLayers.Util.extend(this.options, options || {});
-        
-        this.options.method = this.options.method.toLowerCase();
-        
-        if (typeof this.options.parameters == 'string') {
-            this.options.parameters = 
-                OpenLayers.Util.getParameters(this.options.parameters);
-        }
-    }
-});
-
-/**
- * Class: OpenLayers.Ajax.Request
- * *Deprecated*.  Use <OpenLayers.Request> method instead.
- *
- * Inherit:
- *  - <OpenLayers.Ajax.Base>
- */
-OpenLayers.Ajax.Request = OpenLayers.Class(OpenLayers.Ajax.Base, {
-
-    /**
-     * Property: _complete
-     *
-     * {Boolean}
-     */
-    _complete: false,
-      
-    /**
-     * Constructor: OpenLayers.Ajax.Request
-     * 
-     * Parameters: 
-     * url - {String}
-     * options - {Object}
-     */
-    initialize: function(url, options) {
-        OpenLayers.Ajax.Base.prototype.initialize.apply(this, [options]);
-        
-        if (OpenLayers.ProxyHost && OpenLayers.String.startsWith(url, "http")) {
-            url = OpenLayers.ProxyHost + encodeURIComponent(url);
-        }
-        
-        this.transport = OpenLayers.Ajax.getTransport();
-        this.request(url);
-    },
-
-    /**
-     * Method: request
-     * 
-     * Parameters:
-     * url - {String}
-     */
-    request: function(url) {
-        this.url = url;
-        this.method = this.options.method;
-        var params = OpenLayers.Util.extend({}, this.options.parameters);
-        
-        if (this.method != 'get' && this.method != 'post') {
-            // simulate other verbs over post
-            params['_method'] = this.method;
-            this.method = 'post';
-        }
-
-        this.parameters = params;        
-        
-        if (params = OpenLayers.Util.getParameterString(params)) {
-            // when GET, append parameters to URL
-            if (this.method == 'get') {
-                this.url += ((this.url.indexOf('?') > -1) ? '&' : '?') + params;
-            } else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) {
-                params += '&_=';
-            }
-        }
-        try {
-            var response = new OpenLayers.Ajax.Response(this);
-            if (this.options.onCreate) {
-                this.options.onCreate(response);
-            }
-            
-            OpenLayers.Ajax.Responders.dispatch('onCreate', 
-                                                this, 
-                                                response);
-    
-            this.transport.open(this.method.toUpperCase(), 
-                                this.url,
-                                this.options.asynchronous);
-    
-            if (this.options.asynchronous) {
-                window.setTimeout(
-                    OpenLayers.Function.bind(this.respondToReadyState, this, 1),
-                    10);
-            }
-            
-            this.transport.onreadystatechange = 
-                OpenLayers.Function.bind(this.onStateChange, this);    
-            this.setRequestHeaders();
-    
-            this.body =  this.method == 'post' ?
-                (this.options.postBody || params) : null;
-            this.transport.send(this.body);
-    
-            // Force Firefox to handle ready state 4 for synchronous requests
-            if (!this.options.asynchronous && 
-                this.transport.overrideMimeType) {
-                this.onStateChange();
-            }
-        } catch (e) {
-            this.dispatchException(e);
-        }
-    },
-
-    /**
-     * Method: onStateChange
-     */
-    onStateChange: function() {
-        var readyState = this.transport.readyState;
-        if (readyState > 1 && !((readyState == 4) && this._complete)) {
-            this.respondToReadyState(this.transport.readyState);
-        }
-    },
-     
-    /**
-     * Method: setRequestHeaders
-     */
-    setRequestHeaders: function() {
-        var headers = {
-            'X-Requested-With': 'XMLHttpRequest',
-            'Accept': 'text/javascript, text/html, application/xml, text/xml, */*',
-            'OpenLayers': true
-        };
-
-        if (this.method == 'post') {
-            headers['Content-type'] = this.options.contentType +
-                (this.options.encoding ? '; charset=' + this.options.encoding : '');
-    
-            /* Force "Connection: close" for older Mozilla browsers to work
-             * around a bug where XMLHttpRequest sends an incorrect
-             * Content-length header. See Mozilla Bugzilla #246651.
-             */
-            if (this.transport.overrideMimeType &&
-                (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) {
-                headers['Connection'] = 'close';
-            }
-        }
-        // user-defined headers
-        if (typeof this.options.requestHeaders == 'object') {    
-            var extras = this.options.requestHeaders;
-            
-            if (typeof extras.push == 'function') {
-                for (var i = 0, length = extras.length; i < length; i += 2) {
-                    headers[extras[i]] = extras[i+1];
-                }
-            } else {
-                for (var i in extras) {
-                    headers[i] = extras[i];
-                }
-            }
-        }
-        
-        for (var name in headers) {
-            this.transport.setRequestHeader(name, headers[name]);
-        }
-    },
-    
-    /**
-     * Method: success
-     *
-     * Returns:
-     * {Boolean} - 
-     */
-    success: function() {
-        var status = this.getStatus();
-        return !status || (status >=200 && status < 300);
-    },
-    
-    /**
-     * Method: getStatus
-     *
-     * Returns:
-     * {Integer} - Status
-     */
-    getStatus: function() {
-        try {
-            return this.transport.status || 0;
-        } catch (e) {
-            return 0;
-        }
-    },
-
-    /**
-     * Method: respondToReadyState
-     *
-     * Parameters:
-     * readyState - {?}
-     */
-    respondToReadyState: function(readyState) {
-        var state = OpenLayers.Ajax.Request.Events[readyState];
-        var response = new OpenLayers.Ajax.Response(this);
-    
-        if (state == 'Complete') {
-            try {
-                this._complete = true;
-                (this.options['on' + response.status] ||
-                    this.options['on' + (this.success() ? 'Success' : 'Failure')] ||
-                    OpenLayers.Ajax.emptyFunction)(response);
-            } catch (e) {
-                this.dispatchException(e);
-            }
-    
-            var contentType = response.getHeader('Content-type');
-        }
-    
-        try {
-            (this.options['on' + state] || 
-             OpenLayers.Ajax.emptyFunction)(response);
-             OpenLayers.Ajax.Responders.dispatch('on' + state, 
-                                                 this, 
-                                                 response);
-        } catch (e) {
-            this.dispatchException(e);
-        }
-    
-        if (state == 'Complete') {
-            // avoid memory leak in MSIE: clean up
-            this.transport.onreadystatechange = OpenLayers.Ajax.emptyFunction;
-        }
-    },
-    
-    /**
-     * Method: getHeader
-     * 
-     * Parameters:
-     * name - {String} Header name
-     *
-     * Returns:
-     * {?} - response header for the given name
-     */
-    getHeader: function(name) {
-        try {
-            return this.transport.getResponseHeader(name);
-        } catch (e) {
-            return null;
-        }
-    },
-
-    /**
-     * Method: dispatchException
-     * If the optional onException function is set, execute it
-     * and then dispatch the call to any other listener registered
-     * for onException.
-     * 
-     * If no optional onException function is set, we suspect that
-     * the user may have also not used
-     * OpenLayers.Ajax.Responders.register to register a listener
-     * for the onException call.  To make sure that something
-     * gets done with this exception, only dispatch the call if there
-     * are listeners.
-     *
-     * If you explicitly want to swallow exceptions, set
-     * request.options.onException to an empty function (function(){})
-     * or register an empty function with <OpenLayers.Ajax.Responders>
-     * for onException.
-     * 
-     * Parameters:
-     * exception - {?}
-     */
-    dispatchException: function(exception) {
-        var handler = this.options.onException;
-        if(handler) {
-            // call options.onException and alert any other listeners
-            handler(this, exception);
-            OpenLayers.Ajax.Responders.dispatch('onException', this, exception);
-        } else {
-            // check if there are any other listeners
-            var listener = false;
-            var responders = OpenLayers.Ajax.Responders.responders;
-            for (var i = 0; i < responders.length; i++) {
-                if(responders[i].onException) {
-                    listener = true;
-                    break;
-                }
-            }
-            if(listener) {
-                // call all listeners
-                OpenLayers.Ajax.Responders.dispatch('onException', this, exception);
-            } else {
-                // let the exception through
-                throw exception;
-            }
-        }
-    }
-});
-
-/** 
- * Property: Events
- * {Array(String)}
- */
-OpenLayers.Ajax.Request.Events =
-  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
-
-/**
- * Class: OpenLayers.Ajax.Response
- */
-OpenLayers.Ajax.Response = OpenLayers.Class({
-
-    /**
-     * Property: status
-     *
-     * {Integer}
-     */
-    status: 0,
-    
-
-    /**
-     * Property: statusText
-     *
-     * {String}
-     */
-    statusText: '',
-      
-    /**
-     * Constructor: OpenLayers.Ajax.Response
-     * 
-     * Parameters: 
-     * request - {Object}
-     */
-    initialize: function(request) {
-        this.request = request;
-        var transport = this.transport = request.transport,
-            readyState = this.readyState = transport.readyState;
-        
-        if ((readyState > 2 &&
-            !(!!(window.attachEvent && !window.opera))) ||
-            readyState == 4) {
-            this.status       = this.getStatus();
-            this.statusText   = this.getStatusText();
-            this.responseText = transport.responseText == null ?
-                '' : String(transport.responseText);
-        }
-        
-        if(readyState == 4) {
-            var xml = transport.responseXML;
-            this.responseXML  = xml === undefined ? null : xml;
-        }
-    },
-    
-    /**
-     * Method: getStatus
-     */
-    getStatus: OpenLayers.Ajax.Request.prototype.getStatus,
-    
-    /**
-     * Method: getStatustext
-     *
-     * Returns:
-     * {String} - statusText
-     */
-    getStatusText: function() {
-        try {
-            return this.transport.statusText || '';
-        } catch (e) {
-            return '';
-        }
-    },
-    
-    /**
-     * Method: getHeader
-     */
-    getHeader: OpenLayers.Ajax.Request.prototype.getHeader,
-    
-    /** 
-     * Method: getResponseHeader
-     *
-     * Returns:
-     * {?} - response header for given name
-     */
-    getResponseHeader: function(name) {
-        return this.transport.getResponseHeader(name);
-    }
-});
-
-
-/**
- * Function: getElementsByTagNameNS
- * 
- * Parameters:
- * parentnode - {?}
- * nsuri - {?}
- * nsprefix - {?}
- * tagname - {?}
- * 
- * Returns:
- * {?}
- */
-OpenLayers.Ajax.getElementsByTagNameNS  = function(parentnode, nsuri, 
-                                                   nsprefix, tagname) {
-    var elem = null;
-    if (parentnode.getElementsByTagNameNS) {
-        elem = parentnode.getElementsByTagNameNS(nsuri, tagname);
-    } else {
-        elem = parentnode.getElementsByTagName(nsprefix + ':' + tagname);
-    }
-    return elem;
-};
-
-
-/**
- * Function: serializeXMLToString
- * Wrapper function around XMLSerializer, which doesn't exist/work in
- *     IE/Safari. We need to come up with a way to serialize in those browser:
- *     for now, these browsers will just fail. #535, #536
- *
- * Parameters: 
- * xmldom {XMLNode} xml dom to serialize
- * 
- * Returns:
- * {?}
- */
-OpenLayers.Ajax.serializeXMLToString = function(xmldom) {
-    var serializer = new XMLSerializer();
-    var data = serializer.serializeToString(xmldom);
-    return data;
-};
-

--- a/labs/openlayers/lib/OpenLayers/BaseTypes.js
+++ /dev/null
@@ -1,682 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/BaseTypes/Class.js
- * @requires OpenLayers/BaseTypes/LonLat.js
- * @requires OpenLayers/BaseTypes/Size.js
- * @requires OpenLayers/BaseTypes/Pixel.js
- * @requires OpenLayers/BaseTypes/Bounds.js
- * @requires OpenLayers/BaseTypes/Element.js
- * @requires OpenLayers/Lang/en.js
- * @requires OpenLayers/Console.js
- */
- 
-/** 
- * Header: OpenLayers Base Types
- * OpenLayers custom string, number and function functions are described here.
- */
-
-/**
- * Namespace: OpenLayers.String
- * Contains convenience functions for string manipulation.
- */
-OpenLayers.String = {
-
-    /**
-     * APIFunction: startsWith
-     * Test whether a string starts with another string. 
-     * 
-     * Parameters:
-     * str - {String} The string to test.
-     * sub - {Sring} The substring to look for.
-     *  
-     * Returns:
-     * {Boolean} The first string starts with the second.
-     */
-    startsWith: function(str, sub) {
-        return (str.indexOf(sub) == 0);
-    },
-
-    /**
-     * APIFunction: contains
-     * Test whether a string contains another string.
-     * 
-     * Parameters:
-     * str - {String} The string to test.
-     * sub - {String} The substring to look for.
-     * 
-     * Returns:
-     * {Boolean} The first string contains the second.
-     */
-    contains: function(str, sub) {
-        return (str.indexOf(sub) != -1);
-    },
-    
-    /**
-     * APIFunction: trim
-     * Removes leading and trailing whitespace characters from a string.
-     * 
-     * Parameters:
-     * str - {String} The (potentially) space padded string.  This string is not
-     *     modified.
-     * 
-     * Returns:
-     * {String} A trimmed version of the string with all leading and 
-     *     trailing spaces removed.
-     */
-    trim: function(str) {
-        return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
-    },
-    
-    /**
-     * APIFunction: camelize
-     * Camel-case a hyphenated string. 
-     *     Ex. "chicken-head" becomes "chickenHead", and
-     *     "-chicken-head" becomes "ChickenHead".
-     *
-     * Parameters:
-     * str - {String} The string to be camelized.  The original is not modified.
-     * 
-     * Returns:
-     * {String} The string, camelized
-     */
-    camelize: function(str) {
-        var oStringList = str.split('-');
-        var camelizedString = oStringList[0];
-        for (var i=1, len=oStringList.length; i<len; i++) {
-            var s = oStringList[i];
-            camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
-        }
-        return camelizedString;
-    },
-    
-    /**
-     * APIFunction: format
-     * Given a string with tokens in the form ${token}, return a string
-     *     with tokens replaced with properties from the given context
-     *     object.  Represent a literal "${" by doubling it, e.g. "${${".
-     *
-     * Parameters:
-     * template - {String} A string with tokens to be replaced.  A template
-     *     has the form "literal ${token}" where the token will be replaced
-     *     by the value of context["token"].
-     * context - {Object} An optional object with properties corresponding
-     *     to the tokens in the format string.  If no context is sent, the
-     *     window object will be used.
-     * args - {Array} Optional arguments to pass to any functions found in
-     *     the context.  If a context property is a function, the token
-     *     will be replaced by the return from the function called with
-     *     these arguments.
-     *
-     * Returns:
-     * {String} A string with tokens replaced from the context object.
-     */
-    format: function(template, context, args) {
-        if(!context) {
-            context = window;
-        }
-
-        // Example matching: 
-        // str   = ${foo.bar}
-        // match = foo.bar
-        var replacer = function(str, match) {
-            var replacement;
-
-            // Loop through all subs. Example: ${a.b.c}
-            // 0 -> replacement = context[a];
-            // 1 -> replacement = context[a][b];
-            // 2 -> replacement = context[a][b][c];
-            var subs = match.split(/\.+/);
-            for (var i=0; i< subs.length; i++) {
-                if (i == 0) {
-                    replacement = context;
-                }
-
-                replacement = replacement[subs[i]];
-            }
-
-            if(typeof replacement == "function") {
-                replacement = args ?
-                    replacement.apply(null, args) :
-                    replacement();
-            }
-
-            // If replacement is undefined, return the string 'undefined'.
-            // This is a workaround for a bugs in browsers not properly 
-            // dealing with non-participating groups in regular expressions:
-            // http://blog.stevenlevithan.com/archives/npcg-javascript
-            if (typeof replacement == 'undefined') {
-                return 'undefined';
-            } else {
-                return replacement; 
-            }
-        };
-
-        return template.replace(OpenLayers.String.tokenRegEx, replacer);
-    },
-
-    /**
-     * Property: OpenLayers.String.tokenRegEx
-     * Used to find tokens in a string.
-     * Examples: ${a}, ${a.b.c}, ${a-b}, ${5}
-     */
-    tokenRegEx:  /\$\{([\w.]+?)\}/g,
-    
-    /**
-     * Property: OpenLayers.String.numberRegEx
-     * Used to test strings as numbers.
-     */
-    numberRegEx: /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,
-    
-    /**
-     * APIFunction: OpenLayers.String.isNumeric
-     * Determine whether a string contains only a numeric value.
-     *
-     * Examples:
-     * (code)
-     * OpenLayers.String.isNumeric("6.02e23") // true
-     * OpenLayers.String.isNumeric("12 dozen") // false
-     * OpenLayers.String.isNumeric("4") // true
-     * OpenLayers.String.isNumeric(" 4 ") // false
-     * (end)
-     *
-     * Returns:
-     * {Boolean} String contains only a number.
-     */
-    isNumeric: function(value) {
-        return OpenLayers.String.numberRegEx.test(value);
-    },
-    
-    /**
-     * APIFunction: numericIf
-     * Converts a string that appears to be a numeric value into a number.
-     * 
-     * Returns
-     * {Number|String} a Number if the passed value is a number, a String
-     *     otherwise. 
-     */
-    numericIf: function(value) {
-        return OpenLayers.String.isNumeric(value) ? parseFloat(value) : value;
-    }
-
-};
-
-if (!String.prototype.startsWith) {
-    /**
-     * APIMethod: String.startsWith
-     * *Deprecated*. Whether or not a string starts with another string. 
-     * 
-     * Parameters:
-     * sStart - {Sring} The string we're testing for.
-     *  
-     * Returns:
-     * {Boolean} Whether or not this string starts with the string passed in.
-     */
-    String.prototype.startsWith = function(sStart) {
-        OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",
-                                {'newMethod':'OpenLayers.String.startsWith'}));
-        return OpenLayers.String.startsWith(this, sStart);
-    };
-}
-
-if (!String.prototype.contains) {
-    /**
-     * APIMethod: String.contains
-     * *Deprecated*. Whether or not a string contains another string.
-     * 
-     * Parameters:
-     * str - {String} The string that we're testing for.
-     * 
-     * Returns:
-     * {Boolean} Whether or not this string contains with the string passed in.
-     */
-    String.prototype.contains = function(str) {
-        OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",
-                                  {'newMethod':'OpenLayers.String.contains'}));
-        return OpenLayers.String.contains(this, str);
-    };
-}
-
-if (!String.prototype.trim) {
-    /**
-     * APIMethod: String.trim
-     * *Deprecated*. Removes leading and trailing whitespace characters from a string.
-     * 
-     * Returns:
-     * {String} A trimmed version of the string - all leading and 
-     *          trailing spaces removed
-     */
-    String.prototype.trim = function() {
-        OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",
-                                      {'newMethod':'OpenLayers.String.trim'}));
-        return OpenLayers.String.trim(this);
-    };
-}
-
-if (!String.prototype.camelize) {
-    /**
-     * APIMethod: String.camelize
-     * *Deprecated*. Camel-case a hyphenated string. 
-     *     Ex. "chicken-head" becomes "chickenHead", and
-     *     "-chicken-head" becomes "ChickenHead".
-     * 
-     * Returns:
-     * {String} The string, camelized
-     */
-    String.prototype.camelize = function() {
-        OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",
-                                  {'newMethod':'OpenLayers.String.camelize'}));
-        return OpenLayers.String.camelize(this);
-    };
-}
-
-/**
- * Namespace: OpenLayers.Number
- * Contains convenience functions for manipulating numbers.
- */
-OpenLayers.Number = {
-
-    /**
-     * Property: decimalSeparator
-     * Decimal separator to use when formatting numbers.
-     */
-    decimalSeparator: ".",
-    
-    /**
-     * Property: thousandsSeparator
-     * Thousands separator to use when formatting numbers.
-     */
-    thousandsSeparator: ",",
-    
-    /**
-     * APIFunction: limitSigDigs
-     * Limit the number of significant digits on a float.
-     * 
-     * Parameters:
-     * num - {Float}
-     * sig - {Integer}
-     * 
-     * Returns:
-     * {Float} The number, rounded to the specified number of significant
-     *     digits.
-     */
-    limitSigDigs: function(num, sig) {
-        var fig = 0;
-        if (sig > 0) {
-            fig = parseFloat(num.toPrecision(sig));
-        }
-        return fig;
-    },
-    
-    /**
-     * APIFunction: format
-     * Formats a number for output.
-     * 
-     * Parameters:
-     * num  - {Float}
-     * dec  - {Integer} Number of decimal places to round to.
-     *        Defaults to 0. Set to null to leave decimal places unchanged.
-     * tsep - {String} Thousands separator.
-     *        Default is ",".
-     * dsep - {String} Decimal separator.
-     *        Default is ".".
-     *
-     * Returns:
-     * {String} A string representing the formatted number.
-     */
-    format: function(num, dec, tsep, dsep) {
-        dec = (typeof dec != "undefined") ? dec : 0; 
-        tsep = (typeof tsep != "undefined") ? tsep :
-            OpenLayers.Number.thousandsSeparator; 
-        dsep = (typeof dsep != "undefined") ? dsep :
-            OpenLayers.Number.decimalSeparator;
-
-        if (dec != null) {
-            num = parseFloat(num.toFixed(dec));
-        }
-
-        var parts = num.toString().split(".");
-        if (parts.length == 1 && dec == null) {
-            // integer where we do not want to touch the decimals
-            dec = 0;
-        }
-        
-        var integer = parts[0];
-        if (tsep) {
-            var thousands = /(-?[0-9]+)([0-9]{3})/; 
-            while(thousands.test(integer)) { 
-                integer = integer.replace(thousands, "$1" + tsep + "$2"); 
-            }
-        }
-        
-        var str;
-        if (dec == 0) {
-            str = integer;
-        } else {
-            var rem = parts.length > 1 ? parts[1] : "0";
-            if (dec != null) {
-                rem = rem + new Array(dec - rem.length + 1).join("0");
-            }
-            str = integer + dsep + rem;
-        }
-        return str;
-    }
-};
-
-if (!Number.prototype.limitSigDigs) {
-    /**
-     * APIMethod: Number.limitSigDigs
-     * *Deprecated*. Limit the number of significant digits on an integer. Does *not*
-     *     work with floats!
-     * 
-     * Parameters:
-     * sig - {Integer}
-     * 
-     * Returns:
-     * {Integer} The number, rounded to the specified number of significant digits.
-     *           If null, 0, or negative value passed in, returns 0
-     */
-    Number.prototype.limitSigDigs = function(sig) {
-        OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",
-                              {'newMethod':'OpenLayers.Number.limitSigDigs'}));
-        return OpenLayers.Number.limitSigDigs(this, sig);
-    };
-}
-
-/**
- * Namespace: OpenLayers.Function
- * Contains convenience functions for function manipulation.
- */
-OpenLayers.Function = {
-    /**
-     * APIFunction: bind
-     * Bind a function to an object.  Method to easily create closures with
-     *     'this' altered.
-     * 
-     * Parameters:
-     * func - {Function} Input function.
-     * object - {Object} The object to bind to the input function (as this).
-     * 
-     * Returns:
-     * {Function} A closure with 'this' set to the passed in object.
-     */
-    bind: function(func, object) {
-        // create a reference to all arguments past the second one
-        var args = Array.prototype.slice.apply(arguments, [2]);
-        return function() {
-            // Push on any additional arguments from the actual function call.
-            // These will come after those sent to the bind call.
-            var newArgs = args.concat(
-                Array.prototype.slice.apply(arguments, [0])
-            );
-            return func.apply(object, newArgs);
-        };
-    },
-    
-    /**
-     * APIFunction: bindAsEventListener
-     * Bind a function to an object, and configure it to receive the event
-     *     object as first parameter when called. 
-     * 
-     * Parameters:
-     * func - {Function} Input function to serve as an event listener.
-     * object - {Object} A reference to this.
-     * 
-     * Returns:
-     * {Function}
-     */
-    bindAsEventListener: function(func, object) {
-        return function(event) {
-            return func.call(object, event || window.event);
-        };
-    },
-    
-    /**
-     * APIFunction: False
-     * A simple function to that just does "return false". We use this to 
-     * avoid attaching anonymous functions to DOM event handlers, which 
-     * causes "issues" on IE<8.
-     * 
-     * Usage:
-     * document.onclick = OpenLayers.Function.False;
-     * 
-     * Returns:
-     * {Boolean}
-     */
-    False : function() {
-        return false;
-    },
-
-    /**
-     * APIFunction: True
-     * A simple function to that just does "return true". We use this to 
-     * avoid attaching anonymous functions to DOM event handlers, which 
-     * causes "issues" on IE<8.
-     * 
-     * Usage:
-     * document.onclick = OpenLayers.Function.True;
-     * 
-     * Returns:
-     * {Boolean}
-     */
-    True : function() {
-        return true;
-    }
-};
-
-if (!Function.prototype.bind) {
-    /**
-     * APIMethod: Function.bind
-     * *Deprecated*. Bind a function to an object. 
-     * Method to easily create closures with 'this' altered.
-     * 
-     * Parameters:
-     * object - {Object} the this parameter
-     * 
-     * Returns:
-     * {Function} A closure with 'this' altered to the first
-     *            argument.
-     */
-    Function.prototype.bind = function() {
-        OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",
-                                {'newMethod':'OpenLayers.Function.bind'}));
-        // new function takes the same arguments with this function up front
-        Array.prototype.unshift.apply(arguments, [this]);
-        return OpenLayers.Function.bind.apply(null, arguments);
-    };
-}
-
-if (!Function.prototype.bindAsEventListener) {
-    /**
-     * APIMethod: Function.bindAsEventListener
-     * *Deprecated*. Bind a function to an object, and configure it to receive the
-     *     event object as first parameter when called. 
-     * 
-     * Parameters:
-     * object - {Object} A reference to this.
-     * 
-     * Returns:
-     * {Function}
-     */
-    Function.prototype.bindAsEventListener = function(object) {
-        OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",
-                        {'newMethod':'OpenLayers.Function.bindAsEventListener'}));
-        return OpenLayers.Function.bindAsEventListener(this, object);
-    };
-}
-
-/**
- * Namespace: OpenLayers.Array
- * Contains convenience functions for array manipulation.
- */
-OpenLayers.Array = {
-
-    /**
-     * APIMethod: filter
-     * Filter an array.  Provides the functionality of the
-     *     Array.prototype.filter extension to the ECMA-262 standard.  Where
-     *     available, Array.prototype.filter will be used.
-     *
-     * Based on well known example from http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/filter
-     *
-     * Parameters:
-     * array - {Array} The array to be filtered.  This array is not mutated.
-     *     Elements added to this array by the callback will not be visited.
-     * callback - {Function} A function that is called for each element in
-     *     the array.  If this function returns true, the element will be
-     *     included in the return.  The function will be called with three
-     *     arguments: the element in the array, the index of that element, and
-     *     the array itself.  If the optional caller parameter is specified
-     *     the callback will be called with this set to caller.
-     * caller - {Object} Optional object to be set as this when the callback
-     *     is called.
-     *
-     * Returns:
-     * {Array} An array of elements from the passed in array for which the
-     *     callback returns true.
-     */
-    filter: function(array, callback, caller) {
-        var selected = [];
-        if (Array.prototype.filter) {
-            selected = array.filter(callback, caller);
-        } else {
-            var len = array.length;
-            if (typeof callback != "function") {
-                throw new TypeError();
-            }
-            for(var i=0; i<len; i++) {
-                if (i in array) {
-                    var val = array[i];
-                    if (callback.call(caller, val, i, array)) {
-                        selected.push(val);
-                    }
-                }
-            }        
-        }
-        return selected;
-    }
-    
-};
-
-/**
- * Namespace: OpenLayers.Date
- * Contains implementations of Date.parse and date.toISOString that match the 
- *     ECMAScript 5 specification for parsing RFC 3339 dates.
- *     http://tools.ietf.org/html/rfc3339
- */
-OpenLayers.Date = {
-    
-    /**
-     * APIMethod: toISOString
-     * Generates a string representing a date.  The format of the string follows 
-     *     the profile of ISO 8601 for date and time on the Internet (see 
-     *     http://tools.ietf.org/html/rfc3339).  If the toISOString method is 
-     *     available on the Date prototype, that is used.  The toISOString
-     *     method for Date instances is defined in ECMA-262.
-     *
-     * Parameters:
-     * date - {Date} A date object.
-     *
-     * Returns:
-     * {String} A string representing the date (e.g. 
-     *     "2010-08-07T16:58:23.123Z").  If the date does not have a valid time
-     *     (i.e. isNaN(date.getTime())) this method returns the string "Invalid
-     *     Date".  The ECMA standard says the toISOString method should throw
-     *     RangeError in this case, but Firefox returns a string instead.  For
-     *     best results, use isNaN(date.getTime()) to determine date validity
-     *     before generating date strings.  
-     */
-    toISOString: (function() {
-        if ("toISOString" in Date.prototype) {
-            return function(date) {
-                return date.toISOString();
-            }
-        } else {
-            function pad(num, len) {
-                var str = num + "";
-                while (str.length < len) {
-                    str = "0" + str;
-                }
-                return str;
-            }
-            return function(date) {
-                var str;
-                if (isNaN(date.getTime())) {
-                    // ECMA-262 says throw RangeError, Firefox returns 
-                    // "Invalid Date"
-                    str = "Invalid Date";
-                } else {
-                    str = 
-                        date.getUTCFullYear() + "-" +
-                        pad(date.getUTCMonth() + 1, 2) + "-" +
-                        pad(date.getUTCDate(), 2) + "T" +
-                        pad(date.getUTCHours(), 2) + ":" +
-                        pad(date.getUTCMinutes(), 2) + ":" +
-                        pad(date.getUTCSeconds(), 2) + "." +
-                        pad(date.getUTCMilliseconds(), 3) + "Z";
-                }
-                return str;
-            }
-        }
-
-    })(),
-    
-    /**
-     * APIMethod: parse
-     * Generate a date object from a string.  The format for the string follows
-     *     the profile of ISO 8601 for date and time on the Internet (see 
-     *     http://tools.ietf.org/html/rfc3339).  If the parse method on 
-     *     the Date constructor returns a valid date for the given string,
-     *     that method is used.
-     *
-     * Parameters:
-     * str - {String} A string representing the date (e.g. 
-     *     "2010", "2010-08", "2010-08-07", "2010-08-07T16:58:23.123Z",
-     *     "2010-08-07T11:58:23.123-06").
-     * 
-     * Returns:
-     * {Date} A date object.  If the string could not be parsed, an invalid
-     *     date is returned (i.e. isNaN(date.getTime())).
-     */
-    parse: function(str) {
-        var date;
-        // first check if the native parse method can parse it
-        var elapsed = Date.parse(str);
-        if (!isNaN(elapsed)) {
-            date = new Date(elapsed);
-        } else {
-            var match = str.match(/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))?$/);
-            var date;
-            if (match && (match[1] || match[7])) { // must have at least year or time
-                var year = parseInt(match[1], 10) || 0;
-                var month = (parseInt(match[2], 10) - 1) || 0;
-                var day = parseInt(match[3], 10) || 1;
-                date = new Date(Date.UTC(year, month, day));
-                // optional time
-                var type = match[7];
-                if (type) {
-                    var hours = parseInt(match[4], 10);
-                    var minutes = parseInt(match[5], 10);
-                    var secFrac = parseFloat(match[6]);
-                    var seconds = secFrac | 0;
-                    var milliseconds = Math.round(1000 * (secFrac - seconds));
-                    date.setUTCHours(hours, minutes, seconds, milliseconds);
-                    // check offset
-                    if (type !== "Z") {
-                        var hoursOffset = parseInt(type, 10);
-                        var minutesOffset = parseInt(match[8]) || 0;
-                        var offset = -1000 * (60 * (hoursOffset * 60) + minutesOffset * 60);
-                        date = new Date(date.getTime() + offset);
-                    }
-                }
-            } else {
-                date = new Date("invalid");
-            }
-        }
-        return date;
-    }
-
-};

--- a/labs/openlayers/lib/OpenLayers/BaseTypes/Bounds.js
+++ /dev/null
@@ -1,682 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Bounds
- * Instances of this class represent bounding boxes.  Data stored as left,
- * bottom, right, top floats. All values are initialized to null, however,
- * you should make sure you set them before using the bounds for anything.
- * 
- * Possible use case:
- * > bounds = new OpenLayers.Bounds();
- * > bounds.extend(new OpenLayers.LonLat(4,5));
- * > bounds.extend(new OpenLayers.LonLat(5,6));
- * > bounds.toBBOX(); // returns 4,5,5,6
- */
-OpenLayers.Bounds = OpenLayers.Class({
-
-    /**
-     * Property: left
-     * {Number} Minimum horizontal coordinate.
-     */
-    left: null,
-
-    /**
-     * Property: bottom
-     * {Number} Minimum vertical coordinate.
-     */
-    bottom: null,
-
-    /**
-     * Property: right
-     * {Number} Maximum horizontal coordinate.
-     */
-    right: null,
-
-    /**
-     * Property: top
-     * {Number} Maximum vertical coordinate.
-     */
-    top: null,
-    
-    /**
-     * Property: centerLonLat
-     * {<OpenLayers.LonLat>} A cached center location.  This should not be
-     *     accessed directly.  Use <getCenterLonLat> instead.
-     */
-    centerLonLat: null,
-
-    /**
-     * Constructor: OpenLayers.Bounds
-     * Construct a new bounds object.
-     *
-     * Parameters:
-     * left - {Number} The left bounds of the box.  Note that for width
-     *        calculations, this is assumed to be less than the right value.
-     * bottom - {Number} The bottom bounds of the box.  Note that for height
-     *          calculations, this is assumed to be more than the top value.
-     * right - {Number} The right bounds.
-     * top - {Number} The top bounds.
-     */
-    initialize: function(left, bottom, right, top) {
-        if (left != null) {
-            this.left = OpenLayers.Util.toFloat(left);
-        }
-        if (bottom != null) {
-            this.bottom = OpenLayers.Util.toFloat(bottom);
-        }
-        if (right != null) {
-            this.right = OpenLayers.Util.toFloat(right);
-        }
-        if (top != null) {
-            this.top = OpenLayers.Util.toFloat(top);
-        }
-    },
-
-    /**
-     * Method: clone
-     * Create a cloned instance of this bounds.
-     *
-     * Returns:
-     * {<OpenLayers.Bounds>} A fresh copy of the bounds
-     */
-    clone:function() {
-        return new OpenLayers.Bounds(this.left, this.bottom, 
-                                     this.right, this.top);
-    },
-
-    /**
-     * Method: equals
-     * Test a two bounds for equivalence.
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     *
-     * Returns:
-     * {Boolean} The passed-in bounds object has the same left,
-     *           right, top, bottom components as this.  Note that if bounds 
-     *           passed in is null, returns false.
-     */
-    equals:function(bounds) {
-        var equals = false;
-        if (bounds != null) {
-            equals = ((this.left == bounds.left) && 
-                      (this.right == bounds.right) &&
-                      (this.top == bounds.top) && 
-                      (this.bottom == bounds.bottom));
-        }
-        return equals;
-    },
-
-    /** 
-     * APIMethod: toString
-     * 
-     * Returns:
-     * {String} String representation of bounds object. 
-     *          (ex.<i>"left-bottom=(5,42) right-top=(10,45)"</i>)
-     */
-    toString:function() {
-        return ( "left-bottom=(" + this.left + "," + this.bottom + ")"
-                 + " right-top=(" + this.right + "," + this.top + ")" );
-    },
-
-    /**
-     * APIMethod: toArray
-     *
-     * Parameters:
-     * reverseAxisOrder - {Boolean} Should we reverse the axis order?
-     *
-     * Returns:
-     * {Array} array of left, bottom, right, top
-     */
-    toArray: function(reverseAxisOrder) {
-        if (reverseAxisOrder === true) {
-            return [this.bottom, this.left, this.top, this.right];
-        } else {
-            return [this.left, this.bottom, this.right, this.top];
-        }
-    },    
-
-    /** 
-     * APIMethod: toBBOX
-     * 
-     * Parameters:
-     * decimal - {Integer} How many significant digits in the bbox coords?
-     *                     Default is 6
-     * reverseAxisOrder - {Boolean} Should we reverse the axis order?
-     * 
-     * Returns:
-     * {String} Simple String representation of bounds object.
-     *          (ex. <i>"5,42,10,45"</i>)
-     */
-    toBBOX:function(decimal, reverseAxisOrder) {
-        if (decimal== null) {
-            decimal = 6; 
-        }
-        var mult = Math.pow(10, decimal);
-        var xmin = Math.round(this.left * mult) / mult;
-        var ymin = Math.round(this.bottom * mult) / mult;
-        var xmax = Math.round(this.right * mult) / mult;
-        var ymax = Math.round(this.top * mult) / mult;
-        if (reverseAxisOrder === true) {
-            return ymin + "," + xmin + "," + ymax + "," + xmax;
-        } else {
-            return xmin + "," + ymin + "," + xmax + "," + ymax;
-        }
-    },
- 
-    /**
-     * APIMethod: toGeometry
-     * Create a new polygon geometry based on this bounds.
-     *
-     * Returns:
-     * {<OpenLayers.Geometry.Polygon>} A new polygon with the coordinates
-     *     of this bounds.
-     */
-    toGeometry: function() {
-        return new OpenLayers.Geometry.Polygon([
-            new OpenLayers.Geometry.LinearRing([
-                new OpenLayers.Geometry.Point(this.left, this.bottom),
-                new OpenLayers.Geometry.Point(this.right, this.bottom),
-                new OpenLayers.Geometry.Point(this.right, this.top),
-                new OpenLayers.Geometry.Point(this.left, this.top)
-            ])
-        ]);
-    },
-    
-    /**
-     * APIMethod: getWidth
-     * 
-     * Returns:
-     * {Float} The width of the bounds
-     */
-    getWidth:function() {
-        return (this.right - this.left);
-    },
-
-    /**
-     * APIMethod: getHeight
-     * 
-     * Returns:
-     * {Float} The height of the bounds (top minus bottom).
-     */
-    getHeight:function() {
-        return (this.top - this.bottom);
-    },
-
-    /**
-     * APIMethod: getSize
-     * 
-     * Returns:
-     * {<OpenLayers.Size>} The size of the box.
-     */
-    getSize:function() {
-        return new OpenLayers.Size(this.getWidth(), this.getHeight());
-    },
-
-    /**
-     * APIMethod: getCenterPixel
-     * 
-     * Returns:
-     * {<OpenLayers.Pixel>} The center of the bounds in pixel space.
-     */
-    getCenterPixel:function() {
-        return new OpenLayers.Pixel( (this.left + this.right) / 2,
-                                     (this.bottom + this.top) / 2);
-    },
-
-    /**
-     * APIMethod: getCenterLonLat
-     * 
-     * Returns:
-     * {<OpenLayers.LonLat>} The center of the bounds in map space.
-     */
-    getCenterLonLat:function() {
-        if(!this.centerLonLat) {
-            this.centerLonLat = new OpenLayers.LonLat(
-                (this.left + this.right) / 2, (this.bottom + this.top) / 2
-            );
-        }
-        return this.centerLonLat;
-    },
-
-    /**
-     * Method: scale
-     * Scales the bounds around a pixel or lonlat. Note that the new 
-     *     bounds may return non-integer properties, even if a pixel
-     *     is passed. 
-     * 
-     * Parameters:
-     * ratio - {Float} 
-     * origin - {<OpenLayers.Pixel> or <OpenLayers.LonLat>}
-     *          Default is center.
-     *
-     * Returns:
-     * {<OpenLayers.Bound>} A new bounds that is scaled by ratio
-     *                      from origin.
-     */
-
-    scale: function(ratio, origin){
-        if(origin == null){
-            origin = this.getCenterLonLat();
-        }
-        
-        var origx,origy;
-
-        // get origin coordinates
-        if(origin.CLASS_NAME == "OpenLayers.LonLat"){
-            origx = origin.lon;
-            origy = origin.lat;
-        } else {
-            origx = origin.x;
-            origy = origin.y;
-        }
-
-        var left = (this.left - origx) * ratio + origx;
-        var bottom = (this.bottom - origy) * ratio + origy;
-        var right = (this.right - origx) * ratio + origx;
-        var top = (this.top - origy) * ratio + origy;
-        
-        return new OpenLayers.Bounds(left, bottom, right, top);
-    },
-
-    /**
-     * APIMethod: add
-     * 
-     * Parameters:
-     * x - {Float}
-     * y - {Float}
-     * 
-     * Returns:
-     * {<OpenLayers.Bounds>} A new bounds whose coordinates are the same as
-     *     this, but shifted by the passed-in x and y values.
-     */
-    add:function(x, y) {
-        if ( (x == null) || (y == null) ) {
-            var msg = OpenLayers.i18n("boundsAddError");
-            OpenLayers.Console.error(msg);
-            return null;
-        }
-        return new OpenLayers.Bounds(this.left + x, this.bottom + y,
-                                     this.right + x, this.top + y);
-    },
-    
-    /**
-     * APIMethod: extend
-     * Extend the bounds to include the point, lonlat, or bounds specified.
-     *     Note, this function assumes that left < right and bottom < top.
-     * 
-     * Parameters: 
-     * object - {Object} Can be LonLat, Point, or Bounds
-     */
-    extend:function(object) {
-        var bounds = null;
-        if (object) {
-            // clear cached center location
-            switch(object.CLASS_NAME) {
-                case "OpenLayers.LonLat":    
-                    bounds = new OpenLayers.Bounds(object.lon, object.lat,
-                                                    object.lon, object.lat);
-                    break;
-                case "OpenLayers.Geometry.Point":
-                    bounds = new OpenLayers.Bounds(object.x, object.y,
-                                                    object.x, object.y);
-                    break;
-                    
-                case "OpenLayers.Bounds":    
-                    bounds = object;
-                    break;
-            }
-    
-            if (bounds) {
-                this.centerLonLat = null;
-                if ( (this.left == null) || (bounds.left < this.left)) {
-                    this.left = bounds.left;
-                }
-                if ( (this.bottom == null) || (bounds.bottom < this.bottom) ) {
-                    this.bottom = bounds.bottom;
-                } 
-                if ( (this.right == null) || (bounds.right > this.right) ) {
-                    this.right = bounds.right;
-                }
-                if ( (this.top == null) || (bounds.top > this.top) ) { 
-                    this.top = bounds.top;
-                }
-            }
-        }
-    },
-
-    /**
-     * APIMethod: containsLonLat
-     * 
-     * Parameters:
-     * ll - {<OpenLayers.LonLat>}
-     * inclusive - {Boolean} Whether or not to include the border.
-     *     Default is true.
-     *
-     * Returns:
-     * {Boolean} The passed-in lonlat is within this bounds.
-     */
-    containsLonLat:function(ll, inclusive) {
-        return this.contains(ll.lon, ll.lat, inclusive);
-    },
-
-    /**
-     * APIMethod: containsPixel
-     * 
-     * Parameters:
-     * px - {<OpenLayers.Pixel>}
-     * inclusive - {Boolean} Whether or not to include the border. Default is
-     *     true.
-     *
-     * Returns:
-     * {Boolean} The passed-in pixel is within this bounds.
-     */
-    containsPixel:function(px, inclusive) {
-        return this.contains(px.x, px.y, inclusive);
-    },
-    
-    /**
-     * APIMethod: contains
-     * 
-     * Parameters:
-     * x - {Float}
-     * y - {Float}
-     * inclusive - {Boolean} Whether or not to include the border. Default is
-     *     true.
-     *
-     * Returns:
-     * {Boolean} Whether or not the passed-in coordinates are within this
-     *     bounds.
-     */
-    contains:function(x, y, inclusive) {
-        //set default
-        if (inclusive == null) {
-            inclusive = true;
-        }
-
-        if (x == null || y == null) {
-            return false;
-        }
-
-        x = OpenLayers.Util.toFloat(x);
-        y = OpenLayers.Util.toFloat(y);
-
-        var contains = false;
-        if (inclusive) {
-            contains = ((x >= this.left) && (x <= this.right) && 
-                        (y >= this.bottom) && (y <= this.top));
-        } else {
-            contains = ((x > this.left) && (x < this.right) && 
-                        (y > this.bottom) && (y < this.top));
-        }              
-        return contains;
-    },
-
-    /**
-     * APIMethod: intersectsBounds
-     * Determine whether the target bounds intersects this bounds.  Bounds are
-     *     considered intersecting if any of their edges intersect or if one
-     *     bounds contains the other.
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} The target bounds.
-     * inclusive - {Boolean} Treat coincident borders as intersecting.  Default
-     *     is true.  If false, bounds that do not overlap but only touch at the
-     *     border will not be considered as intersecting.
-     *
-     * Returns:
-     * {Boolean} The passed-in bounds object intersects this bounds.
-     */
-    intersectsBounds:function(bounds, inclusive) {
-        if (inclusive == null) {
-            inclusive = true;
-        }
-        var intersects = false;
-        var mightTouch = (
-            this.left == bounds.right ||
-            this.right == bounds.left ||
-            this.top == bounds.bottom ||
-            this.bottom == bounds.top
-        );
-        
-        // if the two bounds only touch at an edge, and inclusive is false,
-        // then the bounds don't *really* intersect.
-        if (inclusive || !mightTouch) {
-            // otherwise, if one of the boundaries even partially contains another,
-            // inclusive of the edges, then they do intersect.
-            var inBottom = (
-                ((bounds.bottom >= this.bottom) && (bounds.bottom <= this.top)) ||
-                ((this.bottom >= bounds.bottom) && (this.bottom <= bounds.top))
-            );
-            var inTop = (
-                ((bounds.top >= this.bottom) && (bounds.top <= this.top)) ||
-                ((this.top > bounds.bottom) && (this.top < bounds.top))
-            );
-            var inLeft = (
-                ((bounds.left >= this.left) && (bounds.left <= this.right)) ||
-                ((this.left >= bounds.left) && (this.left <= bounds.right))
-            );
-            var inRight = (
-                ((bounds.right >= this.left) && (bounds.right <= this.right)) ||
-                ((this.right >= bounds.left) && (this.right <= bounds.right))
-            );
-            intersects = ((inBottom || inTop) && (inLeft || inRight));
-        }
-        return intersects;
-    },
-    
-    /**
-     * APIMethod: containsBounds
-     * Determine whether the target bounds is contained within this bounds.
-     * 
-     * bounds - {<OpenLayers.Bounds>} The target bounds.
-     * partial - {Boolean} If any of the target corners is within this bounds
-     *     consider the bounds contained.  Default is false.  If false, the
-     *     entire target bounds must be contained within this bounds.
-     * inclusive - {Boolean} Treat shared edges as contained.  Default is
-     *     true.
-     *
-     * Returns:
-     * {Boolean} The passed-in bounds object is contained within this bounds. 
-     */
-    containsBounds:function(bounds, partial, inclusive) {
-        if (partial == null) {
-            partial = false;
-        }
-        if (inclusive == null) {
-            inclusive = true;
-        }
-        var bottomLeft  = this.contains(bounds.left, bounds.bottom, inclusive);
-        var bottomRight = this.contains(bounds.right, bounds.bottom, inclusive);
-        var topLeft  = this.contains(bounds.left, bounds.top, inclusive);
-        var topRight = this.contains(bounds.right, bounds.top, inclusive);
-        
-        return (partial) ? (bottomLeft || bottomRight || topLeft || topRight)
-                         : (bottomLeft && bottomRight && topLeft && topRight);
-    },
-
-    /** 
-     * APIMethod: determineQuadrant
-     * 
-     * Parameters:
-     * lonlat - {<OpenLayers.LonLat>}
-     * 
-     * Returns:
-     * {String} The quadrant ("br" "tr" "tl" "bl") of the bounds in which the
-     *     coordinate lies.
-     */
-    determineQuadrant: function(lonlat) {
-    
-        var quadrant = "";
-        var center = this.getCenterLonLat();
-        
-        quadrant += (lonlat.lat < center.lat) ? "b" : "t";
-        quadrant += (lonlat.lon < center.lon) ? "l" : "r";
-    
-        return quadrant; 
-    },
-    
-    /**
-     * APIMethod: transform
-     * Transform the Bounds object from source to dest. 
-     *
-     * Parameters: 
-     * source - {<OpenLayers.Projection>} Source projection. 
-     * dest   - {<OpenLayers.Projection>} Destination projection. 
-     *
-     * Returns:
-     * {<OpenLayers.Bounds>} Itself, for use in chaining operations.
-     */
-    transform: function(source, dest) {
-        // clear cached center location
-        this.centerLonLat = null;
-        var ll = OpenLayers.Projection.transform(
-            {'x': this.left, 'y': this.bottom}, source, dest);
-        var lr = OpenLayers.Projection.transform(
-            {'x': this.right, 'y': this.bottom}, source, dest);
-        var ul = OpenLayers.Projection.transform(
-            {'x': this.left, 'y': this.top}, source, dest);
-        var ur = OpenLayers.Projection.transform(
-            {'x': this.right, 'y': this.top}, source, dest);
-        this.left   = Math.min(ll.x, ul.x);
-        this.bottom = Math.min(ll.y, lr.y);
-        this.right  = Math.max(lr.x, ur.x);
-        this.top    = Math.max(ul.y, ur.y);
-        return this;
-    },
-
-    /**
-     * APIMethod: wrapDateLine
-     *  
-     * Parameters:
-     * maxExtent - {<OpenLayers.Bounds>}
-     * options - {Object} Some possible options are:
-     *                    leftTolerance - {float} Allow for a margin of error 
-     *                                            with the 'left' value of this 
-     *                                            bound.
-     *                                            Default is 0.
-     *                    rightTolerance - {float} Allow for a margin of error 
-     *                                             with the 'right' value of 
-     *                                             this bound.
-     *                                             Default is 0.
-     * 
-     * Returns:
-     * {<OpenLayers.Bounds>} A copy of this bounds, but wrapped around the 
-     *                       "dateline" (as specified by the borders of 
-     *                       maxExtent). Note that this function only returns 
-     *                       a different bounds value if this bounds is 
-     *                       *entirely* outside of the maxExtent. If this 
-     *                       bounds straddles the dateline (is part in/part 
-     *                       out of maxExtent), the returned bounds will be 
-     *                       merely a copy of this one.
-     */
-    wrapDateLine: function(maxExtent, options) {    
-        options = options || {};
-        
-        var leftTolerance = options.leftTolerance || 0;
-        var rightTolerance = options.rightTolerance || 0;
-
-        var newBounds = this.clone();
-    
-        if (maxExtent) {
-
-           //shift right?
-           while ( newBounds.left < maxExtent.left && 
-                   (newBounds.right - rightTolerance) <= maxExtent.left ) { 
-                newBounds = newBounds.add(maxExtent.getWidth(), 0);
-           }
-
-           //shift left?
-           while ( (newBounds.left + leftTolerance) >= maxExtent.right && 
-                   newBounds.right > maxExtent.right ) { 
-                newBounds = newBounds.add(-maxExtent.getWidth(), 0);
-           }
-        }
-                
-        return newBounds;
-    },
-
-    CLASS_NAME: "OpenLayers.Bounds"
-});
-
-/** 
- * APIFunction: fromString
- * Alternative constructor that builds a new OpenLayers.Bounds from a 
- *     parameter string
- * 
- * Parameters: 
- * str - {String}Comma-separated bounds string. (ex. <i>"5,42,10,45"</i>)
- * 
- * Returns:
- * {<OpenLayers.Bounds>} New bounds object built from the 
- *                       passed-in String.
- */
-OpenLayers.Bounds.fromString = function(str) {
-    var bounds = str.split(",");
-    return OpenLayers.Bounds.fromArray(bounds);
-};
-
-/** 
- * APIFunction: fromArray
- * Alternative constructor that builds a new OpenLayers.Bounds
- *     from an array
- * 
- * Parameters:
- * bbox - {Array(Float)} Array of bounds values (ex. <i>[5,42,10,45]</i>)
- *
- * Returns:
- * {<OpenLayers.Bounds>} New bounds object built from the passed-in Array.
- */
-OpenLayers.Bounds.fromArray = function(bbox) {
-    return new OpenLayers.Bounds(parseFloat(bbox[0]),
-                                 parseFloat(bbox[1]),
-                                 parseFloat(bbox[2]),
-                                 parseFloat(bbox[3]));
-};
-
-/** 
- * APIFunction: fromSize
- * Alternative constructor that builds a new OpenLayers.Bounds
- *     from a size
- * 
- * Parameters:
- * size - {<OpenLayers.Size>} 
- *
- * Returns:
- * {<OpenLayers.Bounds>} New bounds object built from the passed-in size.
- */
-OpenLayers.Bounds.fromSize = function(size) {
-    return new OpenLayers.Bounds(0,
-                                 size.h,
-                                 size.w,
-                                 0);
-};
-
-/**
- * Function: oppositeQuadrant
- * Get the opposite quadrant for a given quadrant string.
- *
- * Parameters:
- * quadrant - {String} two character quadrant shortstring
- *
- * Returns:
- * {String} The opposing quadrant ("br" "tr" "tl" "bl"). For Example, if 
- *          you pass in "bl" it returns "tr", if you pass in "br" it 
- *          returns "tl", etc.
- */
-OpenLayers.Bounds.oppositeQuadrant = function(quadrant) {
-    var opp = "";
-    
-    opp += (quadrant.charAt(0) == 't') ? 'b' : 't';
-    opp += (quadrant.charAt(1) == 'l') ? 'r' : 'l';
-    
-    return opp;
-};
-

--- a/labs/openlayers/lib/OpenLayers/BaseTypes/Class.js
+++ /dev/null
@@ -1,117 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * Constructor: OpenLayers.Class
- * Base class used to construct all other classes. Includes support for 
- *     multiple inheritance. 
- *     
- * This constructor is new in OpenLayers 2.5.  At OpenLayers 3.0, the old 
- *     syntax for creating classes and dealing with inheritance 
- *     will be removed.
- * 
- * To create a new OpenLayers-style class, use the following syntax:
- * > var MyClass = OpenLayers.Class(prototype);
- *
- * To create a new OpenLayers-style class with multiple inheritance, use the
- *     following syntax:
- * > var MyClass = OpenLayers.Class(Class1, Class2, prototype);
- * Note that instanceof reflection will only reveil Class1 as superclass.
- * Class2 ff are mixins.
- *
- */
-OpenLayers.Class = function() {
-    var Class = function() {
-        /**
-         * This following condition can be removed at 3.0 - this is only for
-         * backwards compatibility while the Class.inherit method is still
-         * in use.  So at 3.0, the following three lines would be replaced with
-         * simply:
-         * this.initialize.apply(this, arguments);
-         */
-        if (arguments && arguments[0] != OpenLayers.Class.isPrototype) {
-            this.initialize.apply(this, arguments);
-        }
-    };
-    var extended = {};
-    var parent, initialize, Type;
-    for(var i=0, len=arguments.length; i<len; ++i) {
-        Type = arguments[i];
-        if(typeof Type == "function") {
-            // make the class passed as the first argument the superclass
-            if(i == 0 && len > 1) {
-                initialize = Type.prototype.initialize;
-                // replace the initialize method with an empty function,
-                // because we do not want to create a real instance here
-                Type.prototype.initialize = function() {};
-                // the line below makes sure that the new class has a
-                // superclass
-                extended = new Type();
-                // restore the original initialize method
-                if(initialize === undefined) {
-                    delete Type.prototype.initialize;
-                } else {
-                    Type.prototype.initialize = initialize;
-                }
-            }
-            // get the prototype of the superclass
-            parent = Type.prototype;
-        } else {
-            // in this case we're extending with the prototype
-            parent = Type;
-        }
-        OpenLayers.Util.extend(extended, parent);
-    }
-    Class.prototype = extended;
-    return Class;
-};
-
-/**
- * Property: isPrototype
- * *Deprecated*.  This is no longer needed and will be removed at 3.0.
- */
-OpenLayers.Class.isPrototype = function () {};
-
-/**
- * APIFunction: OpenLayers.create
- * *Deprecated*.  Old method to create an OpenLayers style class.  Use the
- *     <OpenLayers.Class> constructor instead.
- *
- * Returns:
- * An OpenLayers class
- */
-OpenLayers.Class.create = function() {
-    return function() {
-        if (arguments && arguments[0] != OpenLayers.Class.isPrototype) {
-            this.initialize.apply(this, arguments);
-        }
-    };
-};
-
-
-/**
- * APIFunction: inherit
- * *Deprecated*.  Old method to inherit from one or more OpenLayers style
- *     classes.  Use the <OpenLayers.Class> constructor instead.
- *
- * Parameters:
- * class - One or more classes can be provided as arguments
- *
- * Returns:
- * An object prototype
- */
-OpenLayers.Class.inherit = function () {
-    var superClass = arguments[0];
-    var proto = new superClass(OpenLayers.Class.isPrototype);
-    for (var i=1, len=arguments.length; i<len; i++) {
-        if (typeof arguments[i] == "function") {
-            var mixin = arguments[i];
-            arguments[i] = new mixin(OpenLayers.Class.isPrototype);
-        }
-        OpenLayers.Util.extend(proto, arguments[i]);
-    }
-    return proto;
-};
-

--- a/labs/openlayers/lib/OpenLayers/BaseTypes/Element.js
+++ /dev/null
@@ -1,252 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * Namespace: OpenLayers.Element
- */
-OpenLayers.Element = {
-
-    /**
-     * APIFunction: visible
-     * 
-     * Parameters: 
-     * element - {DOMElement}
-     * 
-     * Returns:
-     * {Boolean} Is the element visible?
-     */
-    visible: function(element) {
-        return OpenLayers.Util.getElement(element).style.display != 'none';
-    },
-
-    /**
-     * APIFunction: toggle
-     * Toggle the visibility of element(s) passed in
-     * 
-     * Parameters:
-     * element - {DOMElement} Actually user can pass any number of elements
-     */
-    toggle: function() {
-        for (var i=0, len=arguments.length; i<len; i++) {
-            var element = OpenLayers.Util.getElement(arguments[i]);
-            var display = OpenLayers.Element.visible(element) ? 'hide' 
-                                                              : 'show';
-            OpenLayers.Element[display](element);
-        }
-    },
-
-
-    /**
-     * APIFunction: hide
-     * Hide element(s) passed in
-     * 
-     * Parameters:
-     * element - {DOMElement} Actually user can pass any number of elements
-     */
-    hide: function() {
-        for (var i=0, len=arguments.length; i<len; i++) {
-            var element = OpenLayers.Util.getElement(arguments[i]);
-            if (element) {
-                element.style.display = 'none';
-            }
-        }
-    },
-
-    /**
-     * APIFunction: show
-     * Show element(s) passed in
-     * 
-     * Parameters:
-     * element - {DOMElement} Actually user can pass any number of elements
-     */
-    show: function() {
-        for (var i=0, len=arguments.length; i<len; i++) {
-            var element = OpenLayers.Util.getElement(arguments[i]);
-            if (element) {
-                element.style.display = '';
-            }
-        }
-    },
-
-    /**
-     * APIFunction: remove
-     * Remove the specified element from the DOM.
-     * 
-     * Parameters:
-     * element - {DOMElement}
-     */
-    remove: function(element) {
-        element = OpenLayers.Util.getElement(element);
-        element.parentNode.removeChild(element);
-    },
-
-    /**
-     * APIFunction: getHeight
-     *  
-     * Parameters:
-     * element - {DOMElement}
-     * 
-     * Returns:
-     * {Integer} The offset height of the element passed in
-     */
-    getHeight: function(element) {
-        element = OpenLayers.Util.getElement(element);
-        return element.offsetHeight;
-    },
-
-    /**
-     * APIFunction: getDimensions
-     * *Deprecated*. Returns dimensions of the element passed in.
-     *  
-     * Parameters:
-     * element - {DOMElement}
-     * 
-     * Returns:
-     * {Object} Object with 'width' and 'height' properties which are the 
-     *          dimensions of the element passed in.
-     */
-    getDimensions: function(element) {
-        element = OpenLayers.Util.getElement(element);
-        if (OpenLayers.Element.getStyle(element, 'display') != 'none') {
-            return {width: element.offsetWidth, height: element.offsetHeight};
-        }
-    
-        // All *Width and *Height properties give 0 on elements with display none,
-        // so enable the element temporarily
-        var els = element.style;
-        var originalVisibility = els.visibility;
-        var originalPosition = els.position;
-        var originalDisplay = els.display;
-        els.visibility = 'hidden';
-        els.position = 'absolute';
-        els.display = '';
-        var originalWidth = element.clientWidth;
-        var originalHeight = element.clientHeight;
-        els.display = originalDisplay;
-        els.position = originalPosition;
-        els.visibility = originalVisibility;
-        return {width: originalWidth, height: originalHeight};
-    },
-
-    /**
-     * Function: hasClass
-     * Tests if an element has the given CSS class name.
-     *
-     * Parameters:
-     * element - {DOMElement} A DOM element node.
-     * name - {String} The CSS class name to search for.
-     *
-     * Returns:
-     * {Boolean} The element has the given class name.
-     */
-    hasClass: function(element, name) {
-        var names = element.className;
-        return (!!names && new RegExp("(^|\\s)" + name + "(\\s|$)").test(names));
-    },
-    
-    /**
-     * Function: addClass
-     * Add a CSS class name to an element.  Safe where element already has
-     *     the class name.
-     *
-     * Parameters:
-     * element - {DOMElement} A DOM element node.
-     * name - {String} The CSS class name to add.
-     *
-     * Returns:
-     * {DOMElement} The element.
-     */
-    addClass: function(element, name) {
-        if(!OpenLayers.Element.hasClass(element, name)) {
-            element.className += (element.className ? " " : "") + name;
-        }
-        return element;
-    },
-
-    /**
-     * Function: removeClass
-     * Remove a CSS class name from an element.  Safe where element does not
-     *     have the class name.
-     *
-     * Parameters:
-     * element - {DOMElement} A DOM element node.
-     * name - {String} The CSS class name to remove.
-     *
-     * Returns:
-     * {DOMElement} The element.
-     */
-    removeClass: function(element, name) {
-        var names = element.className;
-        if(names) {
-            element.className = OpenLayers.String.trim(
-                names.replace(
-                    new RegExp("(^|\\s+)" + name + "(\\s+|$)"), " "
-                )
-            );
-        }
-        return element;
-    },
-
-    /**
-     * Function: toggleClass
-     * Remove a CSS class name from an element if it exists.  Add the class name
-     *     if it doesn't exist.
-     *
-     * Parameters:
-     * element - {DOMElement} A DOM element node.
-     * name - {String} The CSS class name to toggle.
-     *
-     * Returns:
-     * {DOMElement} The element.
-     */
-    toggleClass: function(element, name) {
-        if(OpenLayers.Element.hasClass(element, name)) {
-            OpenLayers.Element.removeClass(element, name);
-        } else {
-            OpenLayers.Element.addClass(element, name);
-        }
-        return element;
-    },
-
-    /**
-     * APIFunction: getStyle
-     * 
-     * Parameters:
-     * element - {DOMElement}
-     * style - {?}
-     * 
-     * Returns:
-     * {?}
-     */
-    getStyle: function(element, style) {
-        element = OpenLayers.Util.getElement(element);
-
-        var value = null;
-        if (element && element.style) {
-            value = element.style[OpenLayers.String.camelize(style)];
-            if (!value) {
-                if (document.defaultView && 
-                    document.defaultView.getComputedStyle) {
-                    
-                    var css = document.defaultView.getComputedStyle(element, null);
-                    value = css ? css.getPropertyValue(style) : null;
-                } else if (element.currentStyle) {
-                    value = element.currentStyle[OpenLayers.String.camelize(style)];
-                }
-            }
-        
-            var positions = ['left', 'top', 'right', 'bottom'];
-            if (window.opera &&
-                (OpenLayers.Util.indexOf(positions,style) != -1) &&
-                (OpenLayers.Element.getStyle(element, 'position') == 'static')) { 
-                value = 'auto';
-            }
-        }
-    
-        return value == 'auto' ? null : value;
-    }
-
-};
-

--- a/labs/openlayers/lib/OpenLayers/BaseTypes/LonLat.js
+++ /dev/null
@@ -1,191 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.LonLat
- * This class represents a longitude and latitude pair
- */
-OpenLayers.LonLat = OpenLayers.Class({
-
-    /** 
-     * APIProperty: lon
-     * {Float} The x-axis coodinate in map units
-     */
-    lon: 0.0,
-    
-    /** 
-     * APIProperty: lat
-     * {Float} The y-axis coordinate in map units
-     */
-    lat: 0.0,
-
-    /**
-     * Constructor: OpenLayers.LonLat
-     * Create a new map location.
-     *
-     * Parameters:
-     * lon - {Number} The x-axis coordinate in map units.  If your map is in
-     *     a geographic projection, this will be the Longitude.  Otherwise,
-     *     it will be the x coordinate of the map location in your map units.
-     * lat - {Number} The y-axis coordinate in map units.  If your map is in
-     *     a geographic projection, this will be the Latitude.  Otherwise,
-     *     it will be the y coordinate of the map location in your map units.
-     */
-    initialize: function(lon, lat) {
-        this.lon = OpenLayers.Util.toFloat(lon);
-        this.lat = OpenLayers.Util.toFloat(lat);
-    },
-    
-    /**
-     * Method: toString
-     * Return a readable string version of the lonlat
-     *
-     * Returns:
-     * {String} String representation of OpenLayers.LonLat object. 
-     *           (ex. <i>"lon=5,lat=42"</i>)
-     */
-    toString:function() {
-        return ("lon=" + this.lon + ",lat=" + this.lat);
-    },
-
-    /** 
-     * APIMethod: toShortString
-     * 
-     * Returns:
-     * {String} Shortened String representation of OpenLayers.LonLat object. 
-     *         (ex. <i>"5, 42"</i>)
-     */
-    toShortString:function() {
-        return (this.lon + ", " + this.lat);
-    },
-
-    /** 
-     * APIMethod: clone
-     * 
-     * Returns:
-     * {<OpenLayers.LonLat>} New OpenLayers.LonLat object with the same lon 
-     *                       and lat values
-     */
-    clone:function() {
-        return new OpenLayers.LonLat(this.lon, this.lat);
-    },
-
-    /** 
-     * APIMethod: add
-     * 
-     * Parameters:
-     * lon - {Float}
-     * lat - {Float}
-     * 
-     * Returns:
-     * {<OpenLayers.LonLat>} A new OpenLayers.LonLat object with the lon and 
-     *                       lat passed-in added to this's. 
-     */
-    add:function(lon, lat) {
-        if ( (lon == null) || (lat == null) ) {
-            var msg = OpenLayers.i18n("lonlatAddError");
-            OpenLayers.Console.error(msg);
-            return null;
-        }
-        return new OpenLayers.LonLat(this.lon + OpenLayers.Util.toFloat(lon), 
-                                     this.lat + OpenLayers.Util.toFloat(lat));
-    },
-
-    /** 
-     * APIMethod: equals
-     * 
-     * Parameters:
-     * ll - {<OpenLayers.LonLat>}
-     * 
-     * Returns:
-     * {Boolean} Boolean value indicating whether the passed-in 
-     *           <OpenLayers.LonLat> object has the same lon and lat 
-     *           components as this.
-     *           Note: if ll passed in is null, returns false
-     */
-    equals:function(ll) {
-        var equals = false;
-        if (ll != null) {
-            equals = ((this.lon == ll.lon && this.lat == ll.lat) ||
-                      (isNaN(this.lon) && isNaN(this.lat) && isNaN(ll.lon) && isNaN(ll.lat)));
-        }
-        return equals;
-    },
-
-    /**
-     * APIMethod: transform
-     * Transform the LonLat object from source to dest. This transformation is
-     *    *in place*: if you want a *new* lonlat, use .clone() first.
-     *
-     * Parameters: 
-     * source - {<OpenLayers.Projection>} Source projection. 
-     * dest   - {<OpenLayers.Projection>} Destination projection. 
-     *
-     * Returns:
-     * {<OpenLayers.LonLat>} Itself, for use in chaining operations.
-     */
-    transform: function(source, dest) {
-        var point = OpenLayers.Projection.transform(
-            {'x': this.lon, 'y': this.lat}, source, dest);
-        this.lon = point.x;
-        this.lat = point.y;
-        return this;
-    },
-    
-    /**
-     * APIMethod: wrapDateLine
-     * 
-     * Parameters:
-     * maxExtent - {<OpenLayers.Bounds>}
-     * 
-     * Returns:
-     * {<OpenLayers.LonLat>} A copy of this lonlat, but wrapped around the 
-     *                       "dateline" (as specified by the borders of 
-     *                       maxExtent)
-     */
-    wrapDateLine: function(maxExtent) {    
-
-        var newLonLat = this.clone();
-    
-        if (maxExtent) {
-            //shift right?
-            while (newLonLat.lon < maxExtent.left) {
-                newLonLat.lon +=  maxExtent.getWidth();
-            }    
-           
-            //shift left?
-            while (newLonLat.lon > maxExtent.right) {
-                newLonLat.lon -= maxExtent.getWidth();
-            }    
-        }
-                
-        return newLonLat;
-    },
-
-    CLASS_NAME: "OpenLayers.LonLat"
-});
-
-/** 
- * Function: fromString
- * Alternative constructor that builds a new <OpenLayers.LonLat> from a 
- *     parameter string
- * 
- * Parameters:
- * str - {String} Comma-separated Lon,Lat coordinate string. 
- *                 (ex. <i>"5,40"</i>)
- * 
- * Returns:
- * {<OpenLayers.LonLat>} New <OpenLayers.LonLat> object built from the 
- *                       passed-in String.
- */
-OpenLayers.LonLat.fromString = function(str) {
-    var pair = str.split(",");
-    return new OpenLayers.LonLat(pair[0], pair[1]);
-};
-

--- a/labs/openlayers/lib/OpenLayers/BaseTypes/Pixel.js
+++ /dev/null
@@ -1,126 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Pixel
- * This class represents a screen coordinate, in x and y coordinates
- */
-OpenLayers.Pixel = OpenLayers.Class({
-    
-    /**
-     * APIProperty: x
-     * {Number} The x coordinate
-     */
-    x: 0.0,
-
-    /**
-     * APIProperty: y
-     * {Number} The y coordinate
-     */
-    y: 0.0,
-    
-    /**
-     * Constructor: OpenLayers.Pixel
-     * Create a new OpenLayers.Pixel instance
-     *
-     * Parameters:
-     * x - {Number} The x coordinate
-     * y - {Number} The y coordinate
-     *
-     * Returns:
-     * An instance of OpenLayers.Pixel
-     */
-    initialize: function(x, y) {
-        this.x = parseFloat(x);
-        this.y = parseFloat(y);
-    },
-    
-    /**
-     * Method: toString
-     * Cast this object into a string
-     *
-     * Returns:
-     * {String} The string representation of Pixel. ex: "x=200.4,y=242.2"
-     */
-    toString:function() {
-        return ("x=" + this.x + ",y=" + this.y);
-    },
-
-    /**
-     * APIMethod: clone
-     * Return a clone of this pixel object
-     *
-     * Returns:
-     * {<OpenLayers.Pixel>} A clone pixel
-     */
-    clone:function() {
-        return new OpenLayers.Pixel(this.x, this.y); 
-    },
-    
-    /**
-     * APIMethod: equals
-     * Determine whether one pixel is equivalent to another
-     *
-     * Parameters:
-     * px - {<OpenLayers.Pixel>}
-     *
-     * Returns:
-     * {Boolean} The point passed in as parameter is equal to this. Note that
-     * if px passed in is null, returns false.
-     */
-    equals:function(px) {
-        var equals = false;
-        if (px != null) {
-            equals = ((this.x == px.x && this.y == px.y) ||
-                      (isNaN(this.x) && isNaN(this.y) && isNaN(px.x) && isNaN(px.y)));
-        }
-        return equals;
-    },
-
-    /**
-     * APIMethod: add
-     *
-     * Parameters:
-     * x - {Integer}
-     * y - {Integer}
-     *
-     * Returns:
-     * {<OpenLayers.Pixel>} A new Pixel with this pixel's x&y augmented by the 
-     * values passed in.
-     */
-    add:function(x, y) {
-        if ( (x == null) || (y == null) ) {
-            var msg = OpenLayers.i18n("pixelAddError");
-            OpenLayers.Console.error(msg);
-            return null;
-        }
-        return new OpenLayers.Pixel(this.x + x, this.y + y);
-    },
-
-    /**
-    * APIMethod: offset
-    * 
-    * Parameters
-    * px - {<OpenLayers.Pixel>}
-    * 
-    * Returns:
-    * {<OpenLayers.Pixel>} A new Pixel with this pixel's x&y augmented by the 
-    *                      x&y values of the pixel passed in.
-    */
-    offset:function(px) {
-        var newPx = this.clone();
-        if (px) {
-            newPx = this.add(px.x, px.y);
-        }
-        return newPx;
-    },
-
-    CLASS_NAME: "OpenLayers.Pixel"
-});
-

--- a/labs/openlayers/lib/OpenLayers/BaseTypes/Size.js
+++ /dev/null
@@ -1,86 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * Class: OpenLayers.Size
- * Instances of this class represent a width/height pair
- */
-OpenLayers.Size = OpenLayers.Class({
-
-    /**
-     * APIProperty: w
-     * {Number} width
-     */
-    w: 0.0,
-    
-    /**
-     * APIProperty: h
-     * {Number} height
-     */
-    h: 0.0,
-
-
-    /**
-     * Constructor: OpenLayers.Size
-     * Create an instance of OpenLayers.Size
-     *
-     * Parameters:
-     * w - {Number} width
-     * h - {Number} height
-     */
-    initialize: function(w, h) {
-        this.w = parseFloat(w);
-        this.h = parseFloat(h);
-    },
-
-    /**
-     * Method: toString
-     * Return the string representation of a size object
-     *
-     * Returns:
-     * {String} The string representation of OpenLayers.Size object. 
-     * (ex. <i>"w=55,h=66"</i>)
-     */
-    toString:function() {
-        return ("w=" + this.w + ",h=" + this.h);
-    },
-
-    /**
-     * APIMethod: clone
-     * Create a clone of this size object
-     *
-     * Returns:
-     * {<OpenLayers.Size>} A new OpenLayers.Size object with the same w and h
-     * values
-     */
-    clone:function() {
-        return new OpenLayers.Size(this.w, this.h);
-    },
-
-    /**
-     *
-     * APIMethod: equals
-     * Determine where this size is equal to another
-     *
-     * Parameters:
-     * sz - {<OpenLayers.Size>}
-     *
-     * Returns: 
-     * {Boolean} The passed in size has the same h and w properties as this one.
-     * Note that if sz passed in is null, returns false.
-     *
-     */
-    equals:function(sz) {
-        var equals = false;
-        if (sz != null) {
-            equals = ((this.w == sz.w && this.h == sz.h) ||
-                      (isNaN(this.w) && isNaN(this.h) && isNaN(sz.w) && isNaN(sz.h)));
-        }
-        return equals;
-    },
-
-    CLASS_NAME: "OpenLayers.Size"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Console.js
+++ /dev/null
@@ -1,247 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * Namespace: OpenLayers.Console
- * The OpenLayers.Console namespace is used for debugging and error logging.
- * If the Firebug Lite (../Firebug/firebug.js) is included before this script,
- * calls to OpenLayers.Console methods will get redirected to window.console.
- * This makes use of the Firebug extension where available and allows for
- * cross-browser debugging Firebug style.
- *
- * Note:
- * Note that behavior will differ with the Firebug extention and Firebug Lite.
- * Most notably, the Firebug Lite console does not currently allow for
- * hyperlinks to code or for clicking on object to explore their properties.
- * 
- */
-OpenLayers.Console = {
-    /**
-     * Create empty functions for all console methods.  The real value of these
-     * properties will be set if Firebug Lite (../Firebug/firebug.js script) is
-     * included.  We explicitly require the Firebug Lite script to trigger
-     * functionality of the OpenLayers.Console methods.
-     */
-    
-    /**
-     * APIFunction: log
-     * Log an object in the console.  The Firebug Lite console logs string
-     * representation of objects.  Given multiple arguments, they will
-     * be cast to strings and logged with a space delimiter.  If the first
-     * argument is a string with printf-like formatting, subsequent arguments
-     * will be used in string substitution.  Any additional arguments (beyond
-     * the number substituted in a format string) will be appended in a space-
-     * delimited line.
-     * 
-     * Parameters:
-     * object - {Object}
-     */
-    log: function() {},
-
-    /**
-     * APIFunction: debug
-     * Writes a message to the console, including a hyperlink to the line
-     * where it was called.
-     *
-     * May be called with multiple arguments as with OpenLayers.Console.log().
-     * 
-     * Parameters:
-     * object - {Object}
-     */
-    debug: function() {},
-
-    /**
-     * APIFunction: info
-     * Writes a message to the console with the visual "info" icon and color
-     * coding and a hyperlink to the line where it was called.
-     *
-     * May be called with multiple arguments as with OpenLayers.Console.log().
-     * 
-     * Parameters:
-     * object - {Object}
-     */
-    info: function() {},
-
-    /**
-     * APIFunction: warn
-     * Writes a message to the console with the visual "warning" icon and
-     * color coding and a hyperlink to the line where it was called.
-     *
-     * May be called with multiple arguments as with OpenLayers.Console.log().
-     * 
-     * Parameters:
-     * object - {Object}
-     */
-    warn: function() {},
-
-    /**
-     * APIFunction: error
-     * Writes a message to the console with the visual "error" icon and color
-     * coding and a hyperlink to the line where it was called.
-     *
-     * May be called with multiple arguments as with OpenLayers.Console.log().
-     * 
-     * Parameters:
-     * object - {Object}
-     */
-    error: function() {},
-    
-    /**
-     * APIFunction: userError
-     * A single interface for showing error messages to the user. The default
-     * behavior is a Javascript alert, though this can be overridden by
-     * reassigning OpenLayers.Console.userError to a different function.
-     *
-     * Expects a single error message
-     * 
-     * Parameters:
-     * object - {Object}
-     */
-    userError: function(error) {
-        alert(error);
-    },
-
-    /**
-     * APIFunction: assert
-     * Tests that an expression is true. If not, it will write a message to
-     * the console and throw an exception.
-     *
-     * May be called with multiple arguments as with OpenLayers.Console.log().
-     * 
-     * Parameters:
-     * object - {Object}
-     */
-    assert: function() {},
-
-    /**
-     * APIFunction: dir
-     * Prints an interactive listing of all properties of the object. This
-     * looks identical to the view that you would see in the DOM tab.
-     * 
-     * Parameters:
-     * object - {Object}
-     */
-    dir: function() {},
-
-    /**
-     * APIFunction: dirxml
-     * Prints the XML source tree of an HTML or XML element. This looks
-     * identical to the view that you would see in the HTML tab. You can click
-     * on any node to inspect it in the HTML tab.
-     * 
-     * Parameters:
-     * object - {Object}
-     */
-    dirxml: function() {},
-
-    /**
-     * APIFunction: trace
-     * Prints an interactive stack trace of JavaScript execution at the point
-     * where it is called.  The stack trace details the functions on the stack,
-     * as well as the values that were passed as arguments to each function.
-     * You can click each function to take you to its source in the Script tab,
-     * and click each argument value to inspect it in the DOM or HTML tabs.
-     * 
-     */
-    trace: function() {},
-
-    /**
-     * APIFunction: group
-     * Writes a message to the console and opens a nested block to indent all
-     * future messages sent to the console. Call OpenLayers.Console.groupEnd()
-     * to close the block.
-     *
-     * May be called with multiple arguments as with OpenLayers.Console.log().
-     * 
-     * Parameters:
-     * object - {Object}
-     */
-    group: function() {},
-
-    /**
-     * APIFunction: groupEnd
-     * Closes the most recently opened block created by a call to
-     * OpenLayers.Console.group
-     */
-    groupEnd: function() {},
-    
-    /**
-     * APIFunction: time
-     * Creates a new timer under the given name. Call
-     * OpenLayers.Console.timeEnd(name)
-     * with the same name to stop the timer and print the time elapsed.
-     *
-     * Parameters:
-     * name - {String}
-     */
-    time: function() {},
-
-    /**
-     * APIFunction: timeEnd
-     * Stops a timer created by a call to OpenLayers.Console.time(name) and
-     * writes the time elapsed.
-     *
-     * Parameters:
-     * name - {String}
-     */
-    timeEnd: function() {},
-
-    /**
-     * APIFunction: profile
-     * Turns on the JavaScript profiler. The optional argument title would
-     * contain the text to be printed in the header of the profile report.
-     *
-     * This function is not currently implemented in Firebug Lite.
-     * 
-     * Parameters:
-     * title - {String} Optional title for the profiler
-     */
-    profile: function() {},
-
-    /**
-     * APIFunction: profileEnd
-     * Turns off the JavaScript profiler and prints its report.
-     * 
-     * This function is not currently implemented in Firebug Lite.
-     */
-    profileEnd: function() {},
-
-    /**
-     * APIFunction: count
-     * Writes the number of times that the line of code where count was called
-     * was executed. The optional argument title will print a message in
-     * addition to the number of the count.
-     *
-     * This function is not currently implemented in Firebug Lite.
-     *
-     * Parameters:
-     * title - {String} Optional title to be printed with count
-     */
-    count: function() {},
-
-    CLASS_NAME: "OpenLayers.Console"
-};
-
-/**
- * Execute an anonymous function to extend the OpenLayers.Console namespace
- * if the firebug.js script is included.  This closure is used so that the
- * "scripts" and "i" variables don't pollute the global namespace.
- */
-(function() {
-    /**
-     * If Firebug Lite is included (before this script), re-route all
-     * OpenLayers.Console calls to the console object.
-     */
-    var scripts = document.getElementsByTagName("script");
-    for(var i=0, len=scripts.length; i<len; ++i) {
-        if(scripts[i].src.indexOf("firebug.js") != -1) {
-            if(console) {
-                OpenLayers.Util.extend(OpenLayers.Console, console);
-                break;
-            }
-        }
-    }
-})();
-

--- a/labs/openlayers/lib/OpenLayers/Control.js
+++ /dev/null
@@ -1,369 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Control
- * Controls affect the display or behavior of the map. They allow everything
- * from panning and zooming to displaying a scale indicator. Controls by 
- * default are added to the map they are contained within however it is
- * possible to add a control to an external div by passing the div in the
- * options parameter.
- * 
- * Example:
- * The following example shows how to add many of the common controls
- * to a map.
- * 
- * > var map = new OpenLayers.Map('map', { controls: [] });
- * >
- * > map.addControl(new OpenLayers.Control.PanZoomBar());
- * > map.addControl(new OpenLayers.Control.MouseToolbar());
- * > map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':false}));
- * > map.addControl(new OpenLayers.Control.Permalink());
- * > map.addControl(new OpenLayers.Control.Permalink('permalink'));
- * > map.addControl(new OpenLayers.Control.MousePosition());
- * > map.addControl(new OpenLayers.Control.OverviewMap());
- * > map.addControl(new OpenLayers.Control.KeyboardDefaults());
- *
- * The next code fragment is a quick example of how to intercept 
- * shift-mouse click to display the extent of the bounding box
- * dragged out by the user.  Usually controls are not created
- * in exactly this manner.  See the source for a more complete 
- * example:
- *
- * > var control = new OpenLayers.Control();
- * > OpenLayers.Util.extend(control, {
- * >     draw: function () {
- * >         // this Handler.Box will intercept the shift-mousedown
- * >         // before Control.MouseDefault gets to see it
- * >         this.box = new OpenLayers.Handler.Box( control, 
- * >             {"done": this.notice},
- * >             {keyMask: OpenLayers.Handler.MOD_SHIFT});
- * >         this.box.activate();
- * >     },
- * >
- * >     notice: function (bounds) {
- * >         OpenLayers.Console.userError(bounds);
- * >     }
- * > }); 
- * > map.addControl(control);
- * 
- */
-OpenLayers.Control = OpenLayers.Class({
-
-    /** 
-     * Property: id 
-     * {String} 
-     */
-    id: null,
-    
-    /** 
-     * Property: map 
-     * {<OpenLayers.Map>} this gets set in the addControl() function in
-     * OpenLayers.Map 
-     */
-    map: null,
-
-    /** 
-     * Property: div 
-     * {DOMElement} 
-     */
-    div: null,
-
-    /** 
-     * Property: type 
-     * {Number} Controls can have a 'type'. The type determines the type of
-     * interactions which are possible with them when they are placed in an
-     * <OpenLayers.Control.Panel>. 
-     */
-    type: null, 
-
-    /** 
-     * Property: allowSelection
-     * {Boolean} By deafault, controls do not allow selection, because
-     * it may interfere with map dragging. If this is true, OpenLayers
-     * will not prevent selection of the control.
-     * Default is false.
-     */
-    allowSelection: false,  
-
-    /** 
-     * Property: displayClass 
-     * {string}  This property is used for CSS related to the drawing of the
-     * Control. 
-     */
-    displayClass: "",
-    
-    /**
-    * Property: title  
-    * {string}  This property is used for showing a tooltip over the  
-    * Control.  
-    */ 
-    title: "",
-
-    /**
-     * APIProperty: autoActivate
-     * {Boolean} Activate the control when it is added to a map.  Default is
-     *     false.
-     */
-    autoActivate: false,
-
-    /** 
-     * Property: active 
-     * {Boolean} The control is active.
-     */
-    active: null,
-
-    /** 
-     * Property: handler 
-     * {<OpenLayers.Handler>} null
-     */
-    handler: null,
-
-    /**
-     * APIProperty: eventListeners
-     * {Object} If set as an option at construction, the eventListeners
-     *     object will be registered with <OpenLayers.Events.on>.  Object
-     *     structure must be a listeners object as shown in the example for
-     *     the events.on method.
-     */
-    eventListeners: null,
-
-    /** 
-     * Property: events
-     * {<OpenLayers.Events>} Events instance for triggering control specific
-     *     events.
-     */
-    events: null,
-
-    /**
-     * Constant: EVENT_TYPES
-     * {Array(String)} Supported application event types.  Register a listener
-     *     for a particular event with the following syntax:
-     * (code)
-     * control.events.register(type, obj, listener);
-     * (end)
-     *
-     * Listeners will be called with a reference to an event object.  The
-     *     properties of this event depends on exactly what happened.
-     *
-     * All event objects have at least the following properties:
-     * object - {Object} A reference to control.events.object (a reference
-     *      to the control).
-     * element - {DOMElement} A reference to control.events.element (which
-     *      will be null unless documented otherwise).
-     *
-     * Supported map event types:
-     * activate - Triggered when activated.
-     * deactivate - Triggered when deactivated.
-     */
-    EVENT_TYPES: ["activate", "deactivate"],
-
-    /**
-     * Constructor: OpenLayers.Control
-     * Create an OpenLayers Control.  The options passed as a parameter
-     * directly extend the control.  For example passing the following:
-     * 
-     * > var control = new OpenLayers.Control({div: myDiv});
-     *
-     * Overrides the default div attribute value of null.
-     * 
-     * Parameters:
-     * options - {Object} 
-     */
-    initialize: function (options) {
-        // We do this before the extend so that instances can override
-        // className in options.
-        this.displayClass = 
-            this.CLASS_NAME.replace("OpenLayers.", "ol").replace(/\./g, "");
-        
-        OpenLayers.Util.extend(this, options);
-        
-        this.events = new OpenLayers.Events(this, null, this.EVENT_TYPES);
-        if(this.eventListeners instanceof Object) {
-            this.events.on(this.eventListeners);
-        }
-        if (this.id == null) {
-            this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
-        }
-    },
-
-    /**
-     * Method: destroy
-     * The destroy method is used to perform any clean up before the control
-     * is dereferenced.  Typically this is where event listeners are removed
-     * to prevent memory leaks.
-     */
-    destroy: function () {
-        if(this.events) {
-            if(this.eventListeners) {
-                this.events.un(this.eventListeners);
-            }
-            this.events.destroy();
-            this.events = null;
-        }
-        this.eventListeners = null;
-
-        // eliminate circular references
-        if (this.handler) {
-            this.handler.destroy();
-            this.handler = null;
-        }
-        if(this.handlers) {
-            for(var key in this.handlers) {
-                if(this.handlers.hasOwnProperty(key) &&
-                   typeof this.handlers[key].destroy == "function") {
-                    this.handlers[key].destroy();
-                }
-            }
-            this.handlers = null;
-        }
-        if (this.map) {
-            this.map.removeControl(this);
-            this.map = null;
-        }
-    },
-
-    /** 
-     * Method: setMap
-     * Set the map property for the control. This is done through an accessor
-     * so that subclasses can override this and take special action once 
-     * they have their map variable set. 
-     *
-     * Parameters:
-     * map - {<OpenLayers.Map>} 
-     */
-    setMap: function(map) {
-        this.map = map;
-        if (this.handler) {
-            this.handler.setMap(map);
-        }
-    },
-  
-    /**
-     * Method: draw
-     * The draw method is called when the control is ready to be displayed
-     * on the page.  If a div has not been created one is created.  Controls
-     * with a visual component will almost always want to override this method 
-     * to customize the look of control. 
-     *
-     * Parameters:
-     * px - {<OpenLayers.Pixel>} The top-left pixel position of the control
-     *      or null.
-     *
-     * Returns:
-     * {DOMElement} A reference to the DIV DOMElement containing the control
-     */
-    draw: function (px) {
-        if (this.div == null) {
-            this.div = OpenLayers.Util.createDiv(this.id);
-            this.div.className = this.displayClass;
-            if (!this.allowSelection) {
-                this.div.className += " olControlNoSelect";
-                this.div.setAttribute("unselectable", "on", 0);
-                this.div.onselectstart = OpenLayers.Function.False; 
-            }    
-            if (this.title != "") {
-                this.div.title = this.title;
-            }
-        }
-        if (px != null) {
-            this.position = px.clone();
-        }
-        this.moveTo(this.position);
-        return this.div;
-    },
-
-    /**
-     * Method: moveTo
-     * Sets the left and top style attributes to the passed in pixel 
-     * coordinates.
-     *
-     * Parameters:
-     * px - {<OpenLayers.Pixel>}
-     */
-    moveTo: function (px) {
-        if ((px != null) && (this.div != null)) {
-            this.div.style.left = px.x + "px";
-            this.div.style.top = px.y + "px";
-        }
-    },
-
-    /**
-     * Method: activate
-     * Explicitly activates a control and it's associated
-     * handler if one has been set.  Controls can be
-     * deactivated by calling the deactivate() method.
-     * 
-     * Returns:
-     * {Boolean}  True if the control was successfully activated or
-     *            false if the control was already active.
-     */
-    activate: function () {
-        if (this.active) {
-            return false;
-        }
-        if (this.handler) {
-            this.handler.activate();
-        }
-        this.active = true;
-        if(this.map) {
-            OpenLayers.Element.addClass(
-                this.map.viewPortDiv,
-                this.displayClass.replace(/ /g, "") + "Active"
-            );
-        }
-        this.events.triggerEvent("activate");
-        return true;
-    },
-    
-    /**
-     * Method: deactivate
-     * Deactivates a control and it's associated handler if any.  The exact
-     * effect of this depends on the control itself.
-     * 
-     * Returns:
-     * {Boolean} True if the control was effectively deactivated or false
-     *           if the control was already inactive.
-     */
-    deactivate: function () {
-        if (this.active) {
-            if (this.handler) {
-                this.handler.deactivate();
-            }
-            this.active = false;
-            if(this.map) {
-                OpenLayers.Element.removeClass(
-                    this.map.viewPortDiv,
-                    this.displayClass.replace(/ /g, "") + "Active"
-                );
-            }
-            this.events.triggerEvent("deactivate");
-            return true;
-        }
-        return false;
-    },
-
-    CLASS_NAME: "OpenLayers.Control"
-});
-
-/**
- * Constant: OpenLayers.Control.TYPE_BUTTON
- */
-OpenLayers.Control.TYPE_BUTTON = 1;
-
-/**
- * Constant: OpenLayers.Control.TYPE_TOGGLE
- */
-OpenLayers.Control.TYPE_TOGGLE = 2;
-
-/**
- * Constant: OpenLayers.Control.TYPE_TOOL
- */
-OpenLayers.Control.TYPE_TOOL   = 3;
-

--- a/labs/openlayers/lib/OpenLayers/Control/ArgParser.js
+++ /dev/null
@@ -1,167 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Control.js
- */
-
-/**
- * Class: OpenLayers.Control.ArgParser
- * The ArgParser control adds location bar querystring parsing functionality 
- * to an OpenLayers Map.
- * When added to a Map control, on a page load/refresh, the Map will 
- * automatically take the href string and parse it for lon, lat, zoom, and 
- * layers information. 
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * Parameter: center
-     * {<OpenLayers.LonLat>}
-     */
-    center: null,
-    
-    /**
-     * Parameter: zoom
-     * {int}
-     */
-    zoom: null,
-
-    /**
-     * Parameter: layers 
-     * {Array(<OpenLayers.Layer>)}
-     */
-    layers: null,
-    
-    /** 
-     * APIProperty: displayProjection
-     * {<OpenLayers.Projection>} Requires proj4js support. 
-     *     Projection used when reading the coordinates from the URL. This will
-     *
-     *     reproject the map coordinates from the URL into the map's
-     *     projection.
-     *
-     *     If you are using this functionality, be aware that any permalink
-     *     which is added to the map will determine the coordinate type which
-     *     is read from the URL, which means you should not add permalinks with
-     *     different displayProjections to the same map. 
-     */
-    displayProjection: null, 
-
-    /**
-     * Constructor: OpenLayers.Control.ArgParser
-     *
-     * Parameters:
-     * options - {Object}
-     */
-    initialize: function(options) {
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-    },
-
-    /**
-     * Method: setMap
-     * Set the map property for the control. 
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>} 
-     */
-    setMap: function(map) {
-        OpenLayers.Control.prototype.setMap.apply(this, arguments);
-
-        //make sure we dont already have an arg parser attached
-        for(var i=0, len=this.map.controls.length; i<len; i++) {
-            var control = this.map.controls[i];
-            if ( (control != this) &&
-                 (control.CLASS_NAME == "OpenLayers.Control.ArgParser") ) {
-                
-                // If a second argparser is added to the map, then we 
-                // override the displayProjection to be the one added to the
-                // map. 
-                if (control.displayProjection != this.displayProjection) {
-                    this.displayProjection = control.displayProjection;
-                }    
-                
-                break;
-            }
-        }
-        if (i == this.map.controls.length) {
-
-            var args = OpenLayers.Util.getParameters();
-            // Be careful to set layer first, to not trigger unnecessary layer loads
-            if (args.layers) {
-                this.layers = args.layers;
-    
-                // when we add a new layer, set its visibility 
-                this.map.events.register('addlayer', this, 
-                                         this.configureLayers);
-                this.configureLayers();
-            }
-            if (args.lat && args.lon) {
-                this.center = new OpenLayers.LonLat(parseFloat(args.lon),
-                                                    parseFloat(args.lat));
-                if (args.zoom) {
-                    this.zoom = parseInt(args.zoom);
-                }
-    
-                // when we add a new baselayer to see when we can set the center
-                this.map.events.register('changebaselayer', this, 
-                                         this.setCenter);
-                this.setCenter();
-            }
-        }
-    },
-   
-    /** 
-     * Method: setCenter
-     * As soon as a baseLayer has been loaded, we center and zoom
-     *   ...and remove the handler.
-     */
-    setCenter: function() {
-        
-        if (this.map.baseLayer) {
-            //dont need to listen for this one anymore
-            this.map.events.unregister('changebaselayer', this, 
-                                       this.setCenter);
-            
-            if (this.displayProjection) {
-                this.center.transform(this.displayProjection, 
-                                      this.map.getProjectionObject()); 
-            }      
-
-            this.map.setCenter(this.center, this.zoom);
-        }
-    },
-
-    /** 
-     * Method: configureLayers
-     * As soon as all the layers are loaded, cycle through them and 
-     *   hide or show them. 
-     */
-    configureLayers: function() {
-
-        if (this.layers.length == this.map.layers.length) { 
-            this.map.events.unregister('addlayer', this, this.configureLayers);
-
-            for(var i=0, len=this.layers.length; i<len; i++) {
-                
-                var layer = this.map.layers[i];
-                var c = this.layers.charAt(i);
-                
-                if (c == "B") {
-                    this.map.setBaseLayer(layer);
-                } else if ( (c == "T") || (c == "F") ) {
-                    layer.setVisibility(c == "T");
-                }
-            }
-        }
-    },     
-
-    CLASS_NAME: "OpenLayers.Control.ArgParser"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/Attribution.js
+++ /dev/null
@@ -1,98 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- */
-
-/**
- * Class: OpenLayers.Control.Attribution
- * The attribution control adds attribution from layers to the map display. 
- * It uses 'attribution' property of each layer.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.Attribution = 
-  OpenLayers.Class(OpenLayers.Control, {
-    
-    /**
-     * APIProperty: seperator
-     * {String} String used to seperate layers.
-     */
-    separator: ", ",
-    
-    /**
-     * Constructor: OpenLayers.Control.Attribution 
-     * 
-     * Parameters:
-     * options - {Object} Options for control.
-     */
-    initialize: function(options) {
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-    },
-
-    /** 
-     * Method: destroy
-     * Destroy control.
-     */
-    destroy: function() {
-        this.map.events.un({
-            "removelayer": this.updateAttribution,
-            "addlayer": this.updateAttribution,
-            "changelayer": this.updateAttribution,
-            "changebaselayer": this.updateAttribution,
-            scope: this
-        });
-        
-        OpenLayers.Control.prototype.destroy.apply(this, arguments);
-    },    
-    
-    /**
-     * Method: draw
-     * Initialize control.
-     * 
-     * Returns: 
-     * {DOMElement} A reference to the DIV DOMElement containing the control
-     */    
-    draw: function() {
-        OpenLayers.Control.prototype.draw.apply(this, arguments);
-        
-        this.map.events.on({
-            'changebaselayer': this.updateAttribution,
-            'changelayer': this.updateAttribution,
-            'addlayer': this.updateAttribution,
-            'removelayer': this.updateAttribution,
-            scope: this
-        });
-        this.updateAttribution();
-        
-        return this.div;    
-    },
-
-    /**
-     * Method: updateAttribution
-     * Update attribution string.
-     */
-    updateAttribution: function() {
-        var attributions = [];
-        if (this.map && this.map.layers) {
-            for(var i=0, len=this.map.layers.length; i<len; i++) {
-                var layer = this.map.layers[i];
-                if (layer.attribution && layer.getVisibility()) {
-                    // add attribution only if attribution text is unique
-                    if (OpenLayers.Util.indexOf(
-                                    attributions, layer.attribution) === -1) {
-                        attributions.push( layer.attribution );
-                    }
-                }
-            } 
-            this.div.innerHTML = attributions.join(this.separator);
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Control.Attribution"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/Button.js
+++ /dev/null
@@ -1,45 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- */
-
-/**
- * Class: OpenLayers.Control.Button 
- * The Button control is a very simple push-button, for use with 
- * <OpenLayers.Control.Panel>.
- * When clicked, the function trigger() is executed.
- * 
- * Inherits from:
- *  - <OpenLayers.Control>
- *
- * Use:
- * (code)
- * var button = new OpenLayers.Control.Button({
- *     displayClass: "MyButton", trigger: myFunction
- * });
- * panel.addControls([button]);
- * (end)
- * 
- * Will create a button with CSS class MyButtonItemInactive, that
- *     will call the function MyFunction() when clicked.
- */
-OpenLayers.Control.Button = OpenLayers.Class(OpenLayers.Control, {
-    /**
-     * Property: type
-     * {Integer} OpenLayers.Control.TYPE_BUTTON.
-     */
-    type: OpenLayers.Control.TYPE_BUTTON,
-    
-    /**
-     * Method: trigger
-     * Called by a control panel when the button is clicked.
-     */
-    trigger: function() {},
-
-    CLASS_NAME: "OpenLayers.Control.Button"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/DragFeature.js
+++ /dev/null
@@ -1,304 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Handler/Drag.js
- * @requires OpenLayers/Handler/Feature.js
- */
-
-/**
- * Class: OpenLayers.Control.DragFeature
- * The DragFeature control moves a feature with a drag of the mouse. Create a
- * new control with the <OpenLayers.Control.DragFeature> constructor.
- *
- * Inherits From:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * APIProperty: geometryTypes
-     * {Array(String)} To restrict dragging to a limited set of geometry types,
-     *     send a list of strings corresponding to the geometry class names.
-     */
-    geometryTypes: null,
-    
-    /**
-     * APIProperty: onStart
-     * {Function} Define this function if you want to know when a drag starts.
-     *     The function should expect to receive two arguments: the feature
-     *     that is about to be dragged and the pixel location of the mouse.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} The feature that is about to be
-     *     dragged.
-     * pixel - {<OpenLayers.Pixel>} The pixel location of the mouse.
-     */
-    onStart: function(feature, pixel) {},
-
-    /**
-     * APIProperty: onDrag
-     * {Function} Define this function if you want to know about each move of a
-     *     feature. The function should expect to receive two arguments: the
-     *     feature that is being dragged and the pixel location of the mouse.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} The feature that was dragged.
-     * pixel - {<OpenLayers.Pixel>} The pixel location of the mouse.
-     */
-    onDrag: function(feature, pixel) {},
-
-    /**
-     * APIProperty: onComplete
-     * {Function} Define this function if you want to know when a feature is
-     *     done dragging. The function should expect to receive two arguments:
-     *     the feature that is being dragged and the pixel location of the
-     *     mouse.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} The feature that was dragged.
-     * pixel - {<OpenLayers.Pixel>} The pixel location of the mouse.
-     */
-    onComplete: function(feature, pixel) {},
-
-    /**
-     * APIProperty: documentDrag
-     * {Boolean} If set to true, mouse dragging will continue even if the
-     *     mouse cursor leaves the map viewport. Default is false.
-     */
-    documentDrag: false,
-    
-    /**
-     * Property: layer
-     * {<OpenLayers.Layer.Vector>}
-     */
-    layer: null,
-    
-    /**
-     * Property: feature
-     * {<OpenLayers.Feature.Vector>}
-     */
-    feature: null,
-
-    /**
-     * Property: dragCallbacks
-     * {Object} The functions that are sent to the drag handler for callback.
-     */
-    dragCallbacks: {},
-
-    /**
-     * Property: featureCallbacks
-     * {Object} The functions that are sent to the feature handler for callback.
-     */
-    featureCallbacks: {},
-    
-    /**
-     * Property: lastPixel
-     * {<OpenLayers.Pixel>}
-     */
-    lastPixel: null,
-
-    /**
-     * Constructor: OpenLayers.Control.DragFeature
-     * Create a new control to drag features.
-     *
-     * Parameters:
-     * layer - {<OpenLayers.Layer.Vector>} The layer containing features to be
-     *     dragged.
-     * options - {Object} Optional object whose properties will be set on the
-     *     control.
-     */
-    initialize: function(layer, options) {
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        this.layer = layer;
-        this.handlers = {
-            drag: new OpenLayers.Handler.Drag(
-                this, OpenLayers.Util.extend({
-                    down: this.downFeature,
-                    move: this.moveFeature,
-                    up: this.upFeature,
-                    out: this.cancel,
-                    done: this.doneDragging
-                }, this.dragCallbacks), {
-                    documentDrag: this.documentDrag
-                }
-            ),
-            feature: new OpenLayers.Handler.Feature(
-                this, this.layer, OpenLayers.Util.extend({
-                    over: this.overFeature,
-                    out: this.outFeature
-                }, this.featureCallbacks),
-                {geometryTypes: this.geometryTypes}
-            )
-        };
-    },
-    
-    /**
-     * APIMethod: destroy
-     * Take care of things that are not handled in superclass
-     */
-    destroy: function() {
-        this.layer = null;
-        OpenLayers.Control.prototype.destroy.apply(this, []);
-    },
-
-    /**
-     * APIMethod: activate
-     * Activate the control and the feature handler.
-     * 
-     * Returns:
-     * {Boolean} Successfully activated the control and feature handler.
-     */
-    activate: function() {
-        return (this.handlers.feature.activate() &&
-                OpenLayers.Control.prototype.activate.apply(this, arguments));
-    },
-
-    /**
-     * APIMethod: deactivate
-     * Deactivate the control and all handlers.
-     * 
-     * Returns:
-     * {Boolean} Successfully deactivated the control.
-     */
-    deactivate: function() {
-        // the return from the handlers is unimportant in this case
-        this.handlers.drag.deactivate();
-        this.handlers.feature.deactivate();
-        this.feature = null;
-        this.dragging = false;
-        this.lastPixel = null;
-        OpenLayers.Element.removeClass(
-            this.map.viewPortDiv, this.displayClass + "Over"
-        );
-        return OpenLayers.Control.prototype.deactivate.apply(this, arguments);
-    },
-
-    /**
-     * Method: overFeature
-     * Called when the feature handler detects a mouse-over on a feature.
-     *     This activates the drag handler.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} The selected feature.
-     */
-    overFeature: function(feature) {
-        if(!this.handlers.drag.dragging) {
-            this.feature = feature;
-            this.handlers.drag.activate();
-            this.over = true;
-            OpenLayers.Element.addClass(this.map.viewPortDiv, this.displayClass + "Over");
-        } else {
-            if(this.feature.id == feature.id) {
-                this.over = true;
-            } else {
-                this.over = false;
-            }
-        }
-    },
-
-    /**
-     * Method: downFeature
-     * Called when the drag handler detects a mouse-down.
-     *
-     * Parameters:
-     * pixel - {<OpenLayers.Pixel>} Location of the mouse event.
-     */
-    downFeature: function(pixel) {
-        this.lastPixel = pixel;
-        this.onStart(this.feature, pixel);
-    },
-
-    /**
-     * Method: moveFeature
-     * Called when the drag handler detects a mouse-move.  Also calls the
-     *     optional onDrag method.
-     * 
-     * Parameters:
-     * pixel - {<OpenLayers.Pixel>} Location of the mouse event.
-     */
-    moveFeature: function(pixel) {
-        var res = this.map.getResolution();
-        this.feature.geometry.move(res * (pixel.x - this.lastPixel.x),
-                                   res * (this.lastPixel.y - pixel.y));
-        this.layer.drawFeature(this.feature);
-        this.lastPixel = pixel;
-        this.onDrag(this.feature, pixel);
-    },
-
-    /**
-     * Method: upFeature
-     * Called when the drag handler detects a mouse-up.
-     * 
-     * Parameters:
-     * pixel - {<OpenLayers.Pixel>} Location of the mouse event.
-     */
-    upFeature: function(pixel) {
-        if(!this.over) {
-            this.handlers.drag.deactivate();
-        }
-    },
-
-    /**
-     * Method: doneDragging
-     * Called when the drag handler is done dragging.
-     *
-     * Parameters:
-     * pixel - {<OpenLayers.Pixel>} The last event pixel location.  If this event
-     *     came from a mouseout, this may not be in the map viewport.
-     */
-    doneDragging: function(pixel) {
-        this.onComplete(this.feature, pixel);
-    },
-
-    /**
-     * Method: outFeature
-     * Called when the feature handler detects a mouse-out on a feature.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} The feature that the mouse left.
-     */
-    outFeature: function(feature) {
-        if(!this.handlers.drag.dragging) {
-            this.over = false;
-            this.handlers.drag.deactivate();
-            OpenLayers.Element.removeClass(
-                this.map.viewPortDiv, this.displayClass + "Over"
-            );
-            this.feature = null;
-        } else {
-            if(this.feature.id == feature.id) {
-                this.over = false;
-            }
-        }
-    },
-        
-    /**
-     * Method: cancel
-     * Called when the drag handler detects a mouse-out (from the map viewport).
-     */
-    cancel: function() {
-        this.handlers.drag.deactivate();
-        this.over = false;
-    },
-
-    /**
-     * Method: setMap
-     * Set the map property for the control and all handlers.
-     *
-     * Parameters: 
-     * map - {<OpenLayers.Map>} The control's map.
-     */
-    setMap: function(map) {
-        this.handlers.drag.setMap(map);
-        this.handlers.feature.setMap(map);
-        OpenLayers.Control.prototype.setMap.apply(this, arguments);
-    },
-
-    CLASS_NAME: "OpenLayers.Control.DragFeature"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/DragPan.js
+++ /dev/null
@@ -1,95 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Handler/Drag.js
- */
-
-/**
- * Class: OpenLayers.Control.DragPan
- * The DragPan control pans the map with a drag of the mouse.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, {
-
-    /** 
-     * Property: type
-     * {OpenLayers.Control.TYPES}
-     */
-    type: OpenLayers.Control.TYPE_TOOL,
-    
-    /**
-     * Property: panned
-     * {Boolean} The map moved.
-     */
-    panned: false,
-    
-    /**
-     * Property: interval
-     * {Integer} The number of milliseconds that should ellapse before
-     *     panning the map again. Set this to increase dragging performance.
-     *     Defaults to 25 milliseconds.
-     */
-    interval: 25,
-    
-    /**
-     * APIProperty: documentDrag
-     * {Boolean} If set to true, mouse dragging will continue even if the
-     *     mouse cursor leaves the map viewport. Default is false.
-     */
-    documentDrag: false,
-    
-    /**
-     * Method: draw
-     * Creates a Drag handler, using <panMap> and
-     * <panMapDone> as callbacks.
-     */    
-    draw: function() {
-        this.handler = new OpenLayers.Handler.Drag(this, {
-                "move": this.panMap,
-                "done": this.panMapDone
-            }, {
-                interval: this.interval,
-                documentDrag: this.documentDrag
-            }
-        );
-    },
-
-    /**
-    * Method: panMap
-    *
-    * Parameters:
-    * xy - {<OpenLayers.Pixel>} Pixel of the mouse position
-    */
-    panMap: function(xy) {
-        this.panned = true;
-        this.map.pan(
-            this.handler.last.x - xy.x,
-            this.handler.last.y - xy.y,
-            {dragging: this.handler.dragging, animate: false}
-        );
-    },
-    
-    /**
-     * Method: panMapDone
-     * Finish the panning operation.  Only call setCenter (through <panMap>)
-     *     if the map has actually been moved.
-     *
-     * Parameters:
-     * xy - {<OpenLayers.Pixel>} Pixel of the mouse position
-     */
-    panMapDone: function(xy) {
-        if(this.panned) {
-            this.panMap(xy);
-            this.panned = false;
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Control.DragPan"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/DrawFeature.js
+++ /dev/null
@@ -1,127 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Feature/Vector.js
- */
-
-/**
- * Class: OpenLayers.Control.DrawFeature
- * The DrawFeature control draws point, line or polygon features on a vector
- * layer when active.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.DrawFeature = OpenLayers.Class(OpenLayers.Control, {
-    
-    /**
-     * Property: layer
-     * {<OpenLayers.Layer.Vector>}
-     */
-    layer: null,
-
-    /**
-     * Property: callbacks
-     * {Object} The functions that are sent to the handler for callback
-     */
-    callbacks: null,
-    
-    /**
-     * Constant: EVENT_TYPES
-     *
-     * Supported event types:
-     * featureadded - Triggered when a feature is added
-     */
-    EVENT_TYPES: ["featureadded"],
-    
-    /**
-     * APIProperty: multi
-     * {Boolean} Cast features to multi-part geometries before passing to the
-     *     layer.  Default is false.
-     */
-    multi: false,
-
-    /**
-     * APIProperty: featureAdded
-     * {Function} Called after each feature is added
-     */
-    featureAdded: function() {},
-
-    /**
-     * APIProperty: handlerOptions
-     * {Object} Used to set non-default properties on the control's handler
-     */
-    handlerOptions: null,
-    
-    /**
-     * Constructor: OpenLayers.Control.DrawFeature
-     * 
-     * Parameters:
-     * layer - {<OpenLayers.Layer.Vector>} 
-     * handler - {<OpenLayers.Handler>} 
-     * options - {Object} 
-     */
-    initialize: function(layer, handler, options) {
-        
-        // concatenate events specific to vector with those from the base
-        this.EVENT_TYPES =
-            OpenLayers.Control.DrawFeature.prototype.EVENT_TYPES.concat(
-            OpenLayers.Control.prototype.EVENT_TYPES
-        );
-        
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        this.callbacks = OpenLayers.Util.extend(
-            {
-                done: this.drawFeature,
-                modify: function(vertex, feature) {
-                    this.layer.events.triggerEvent(
-                        "sketchmodified", {vertex: vertex, feature: feature}
-                    );
-                },
-                create: function(vertex, feature) {
-                    this.layer.events.triggerEvent(
-                        "sketchstarted", {vertex: vertex, feature: feature}
-                    );
-                }
-            },
-            this.callbacks
-        );
-        this.layer = layer;
-        this.handlerOptions = this.handlerOptions || {};
-        if (!("multi" in this.handlerOptions)) {
-            this.handlerOptions.multi = this.multi;
-        }
-        var sketchStyle = this.layer.styleMap && this.layer.styleMap.styles.temporary;
-        if(sketchStyle) {
-            this.handlerOptions.layerOptions = OpenLayers.Util.applyDefaults(
-                this.handlerOptions.layerOptions,
-                {styleMap: new OpenLayers.StyleMap({"default": sketchStyle})}
-            );
-        }
-        this.handler = new handler(this, this.callbacks, this.handlerOptions);
-    },
-
-    /**
-     * Method: drawFeature
-     */
-    drawFeature: function(geometry) {
-        var feature = new OpenLayers.Feature.Vector(geometry);
-        var proceed = this.layer.events.triggerEvent(
-            "sketchcomplete", {feature: feature}
-        );
-        if(proceed !== false) {
-            feature.state = OpenLayers.State.INSERT;
-            this.layer.addFeatures([feature]);
-            this.featureAdded(feature);
-            this.events.triggerEvent("featureadded",{feature : feature});
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Control.DrawFeature"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/EditingToolbar.js
+++ /dev/null
@@ -1,64 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control/Panel.js
- * @requires OpenLayers/Control/Navigation.js
- * @requires OpenLayers/Control/DrawFeature.js
- * @requires OpenLayers/Handler/Point.js
- * @requires OpenLayers/Handler/Path.js
- * @requires OpenLayers/Handler/Polygon.js
- */
-
-/**
- * Class: OpenLayers.Control.EditingToolbar 
- * The EditingToolbar is a panel of 4 controls to draw polygons, lines, 
- * points, or to navigate the map by panning. By default it appears in the 
- * upper right corner of the map.
- * 
- * Inherits from:
- *  - <OpenLayers.Control.Panel>
- */
-OpenLayers.Control.EditingToolbar = OpenLayers.Class(
-  OpenLayers.Control.Panel, {
-
-    /**
-     * Constructor: OpenLayers.Control.EditingToolbar
-     * Create an editing toolbar for a given layer. 
-     *
-     * Parameters:
-     * layer - {<OpenLayers.Layer.Vector>} 
-     * options - {Object} 
-     */
-    initialize: function(layer, options) {
-        OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
-        
-        this.addControls(
-          [ new OpenLayers.Control.Navigation() ]
-        );  
-        var controls = [
-          new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Point, {'displayClass': 'olControlDrawFeaturePoint'}),
-          new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Path, {'displayClass': 'olControlDrawFeaturePath'}),
-          new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Polygon, {'displayClass': 'olControlDrawFeaturePolygon'})
-        ];
-        this.addControls(controls);
-    },
-
-    /**
-     * Method: draw
-     * calls the default draw, and then activates mouse defaults.
-     *
-     * Returns:
-     * {DOMElement}
-     */
-    draw: function() {
-        var div = OpenLayers.Control.Panel.prototype.draw.apply(this, arguments);
-        this.activateControl(this.controls[0]);
-        return div;
-    },
-
-    CLASS_NAME: "OpenLayers.Control.EditingToolbar"
-});    
-

--- a/labs/openlayers/lib/OpenLayers/Control/GetFeature.js
+++ /dev/null
@@ -1,596 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Handler/Click.js
- * @requires OpenLayers/Handler/Box.js
- * @requires OpenLayers/Handler/Hover.js
- * @requires OpenLayers/Filter/Spatial.js
- */
-
-/**
- * Class: OpenLayers.Control.GetFeature
- * Gets vector features for locations underneath the mouse cursor. Can be
- *     configured to act on click, hover or dragged boxes. Uses an
- *     <OpenLayers.Protocol> that supports spatial filters to retrieve
- *     features from a server and fires events that notify applications of the
- *     selected features. 
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
-    
-    /**
-     * APIProperty: protocol
-     * {<OpenLayers.Protocol>} Required. The protocol used for fetching
-     *     features.
-     */
-    protocol: null,
-    
-    /**
-     * APIProperty: multipleKey
-     * {String} An event modifier ('altKey' or 'shiftKey') that temporarily sets
-     *     the <multiple> property to true.  Default is null.
-     */
-    multipleKey: null,
-    
-    /**
-     * APIProperty: toggleKey
-     * {String} An event modifier ('altKey' or 'shiftKey') that temporarily sets
-     *     the <toggle> property to true.  Default is null.
-     */
-    toggleKey: null,
-    
-    /**
-     * Property: modifiers
-     * {Object} The event modifiers to use, according to the current event
-     *     being handled by this control's handlers
-     */
-    modifiers: null,
-    
-    /**
-     * APIProperty: multiple
-     * {Boolean} Allow selection of multiple geometries.  Default is false.
-     */
-    multiple: false, 
-
-    /**
-     * APIProperty: click
-     * {Boolean} Use a click handler for selecting/unselecting features. If
-     *     both <click> and <box> are set to true, the click handler takes
-     *     precedence over the box handler if a box with zero extent was
-     *     selected.  Default is true.
-     */
-    click: true,
-
-    /**
-     * APIProperty: single
-     * {Boolean} Tells whether select by click should select a single
-     *     feature. If set to false, all matching features are selected.
-     *     If set to true, only the best matching feature is selected.
-     *     This option has an effect only of the <click> option is set
-     *     to true. Default is true.
-     */
-    single: true,
-    
-    /**
-     * APIProperty: clickout
-     * {Boolean} Unselect features when clicking outside any feature.
-     *     Applies only if <click> is true.  Default is true.
-     */
-    clickout: true,
-    
-    /**
-     * APIProperty: toggle
-     * {Boolean} Unselect a selected feature on click.  Applies only if
-     *     <click> is true.  Default is false.
-     */
-    toggle: false,
-
-    /**
-     * APIProperty: clickTolerance
-     * {Integer} Tolerance for the filter query in pixels. This has the
-     *     same effect as the tolerance parameter on WMS GetFeatureInfo
-     *     requests.  Will be ignored for box selections.  Applies only if
-     *     <click> or <hover> is true.  Default is 5.  Note that this not
-     *     only affects requests on click, but also on hover.
-     */
-    clickTolerance: 5,
-    
-    /**
-     * APIProperty: hover
-     * {Boolean} Send feature requests on mouse moves.  Default is false.
-     */
-    hover: false,
-
-    /**
-     * APIProperty: box
-     * {Boolean} Allow feature selection by drawing a box. If set to
-     *     true set <click> to false to disable the click handler and
-     *     rely on the box handler only, even for "zero extent" boxes.
-     *     See the description of the <click> option for additional
-     *     information.  Default is false.
-     */
-    box: false,
-    
-    /**
-     * APIProperty: maxFeatures
-     * {Integer} Maximum number of features to return from a query in single mode
-     *     if supported by the <protocol>. This set of features is then used to
-     *     determine the best match client-side. Default is 10.
-     */
-    maxFeatures: 10,
-    
-    /**
-     * Property: features
-     * {Object} Hash of {<OpenLayers.Feature.Vector>}, keyed by fid, holding
-     *     the currently selected features
-     */
-    features: null,
-    
-    /**
-     * Proeprty: hoverFeature
-     * {<OpenLayers.Feature.Vector>} The feature currently selected by the
-     *     hover handler
-     */
-    hoverFeature: null,
-    
-    /**
-     * APIProperty: handlerOptions
-     * {Object} Additional options for the handlers used by this control. This
-     *     is a hash with the keys "click", "box" and "hover".
-     */
-    handlerOptions: null,
-    
-    /**
-     * Property: handlers
-     * {Object} Object with references to multiple <OpenLayers.Handler>
-     *     instances.
-     */
-    handlers: null,
-
-    /**
-     * Property: hoverResponse
-     * {<OpenLayers.Protocol.Response>} The response object associated with
-     *     the currently running hover request (if any).
-     */
-    hoverResponse: null,
-    
-    /**
-     * Property: filterType
-     * {<String>} The type of filter to use when sending off a request. 
-     *     Possible values: 
-     *     OpenLayers.Filter.Spatial.<BBOX|INTERSECTS|WITHIN|CONTAINS>
-     *     Defaults to: OpenLayers.Filter.Spatial.BBOX
-     */
-    filterType: OpenLayers.Filter.Spatial.BBOX,
-
-    /**
-     * Constant: EVENT_TYPES
-     *
-     * Supported event types:
-     * beforefeatureselected - Triggered when <click> is true before a
-     *      feature is selected. The event object has a feature property with
-     *      the feature about to select
-     * featureselected - Triggered when <click> is true and a feature is
-     *      selected. The event object has a feature property with the
-     *      selected feature
-     * beforefeaturesselected - Triggered when <click> is true before a
-     *      set of features is selected. The event object is an array of
-     *      feature properties with the features about to be selected.  
-     *      Return false after receiving this event to discontinue processing
-     *      of all featureselected events and the featuresselected event.
-     * featuresselected - Triggered when <click> is true and a set of
-     *      features is selected.  The event object is an array of feature
-     *      properties of the selected features
-     * featureunselected - Triggered when <click> is true and a feature is
-     *      unselected. The event object has a feature property with the
-     *      unselected feature
-     * clickout - Triggered when when <click> is true and no feature was
-     *      selected.
-     * hoverfeature - Triggered when <hover> is true and the mouse has
-     *      stopped over a feature
-     * outfeature - Triggered when <hover> is true and the mouse moves
-     *      moved away from a hover-selected feature
-     */
-    EVENT_TYPES: ["featureselected", "featuresselected", "featureunselected", 
-        "clickout", "beforefeatureselected", "beforefeaturesselected", 
-        "hoverfeature", "outfeature"],
-
-    /**
-     * Constructor: OpenLayers.Control.GetFeature
-     * Create a new control for fetching remote features.
-     *
-     * Parameters:
-     * options - {Object} A configuration object which at least has to contain
-     *     a <protocol> property
-     */
-    initialize: function(options) {
-        // concatenate events specific to vector with those from the base
-        this.EVENT_TYPES =
-            OpenLayers.Control.GetFeature.prototype.EVENT_TYPES.concat(
-            OpenLayers.Control.prototype.EVENT_TYPES
-        );
-
-        options.handlerOptions = options.handlerOptions || {};
-
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        
-        this.features = {};
-
-        this.handlers = {};
-        
-        if(this.click) {
-            this.handlers.click = new OpenLayers.Handler.Click(this,
-                {click: this.selectClick}, this.handlerOptions.click || {});
-        }
-
-        if(this.box) {
-            this.handlers.box = new OpenLayers.Handler.Box(
-                this, {done: this.selectBox},
-                OpenLayers.Util.extend(this.handlerOptions.box, {
-                    boxDivClassName: "olHandlerBoxSelectFeature"
-                })
-            ); 
-        }
-        
-        if(this.hover) {
-            this.handlers.hover = new OpenLayers.Handler.Hover(
-                this, {'move': this.cancelHover, 'pause': this.selectHover},
-                OpenLayers.Util.extend(this.handlerOptions.hover, {
-                    'delay': 250
-                })
-            );
-        }
-    },
-    
-    /**
-     * Method: activate
-     * Activates the control.
-     * 
-     * Returns:
-     * {Boolean} The control was effectively activated.
-     */
-    activate: function () {
-        if (!this.active) {
-            for(var i in this.handlers) {
-                this.handlers[i].activate();
-            }
-        }
-        return OpenLayers.Control.prototype.activate.apply(
-            this, arguments
-        );
-    },
-
-    /**
-     * Method: deactivate
-     * Deactivates the control.
-     * 
-     * Returns:
-     * {Boolean} The control was effectively deactivated.
-     */
-    deactivate: function () {
-        if (this.active) {
-            for(var i in this.handlers) {
-                this.handlers[i].deactivate();
-            }
-        }
-        return OpenLayers.Control.prototype.deactivate.apply(
-            this, arguments
-        );
-    },
-    
-    /**
-     * Method: selectClick
-     * Called on click
-     *
-     * Parameters:
-     * evt - {<OpenLayers.Event>} 
-     */
-    selectClick: function(evt) {
-        var bounds = this.pixelToBounds(evt.xy);
-        
-        this.setModifiers(evt);
-        this.request(bounds, {single: this.single});
-    },
-
-    /**
-     * Method: selectBox
-     * Callback from the handlers.box set up when <box> selection is on
-     *
-     * Parameters:
-     * position - {<OpenLayers.Bounds>}  
-     */
-    selectBox: function(position) {
-        var bounds;
-        if (position instanceof OpenLayers.Bounds) {
-            var minXY = this.map.getLonLatFromPixel(
-                new OpenLayers.Pixel(position.left, position.bottom)
-            );
-            var maxXY = this.map.getLonLatFromPixel(
-                new OpenLayers.Pixel(position.right, position.top)
-            );
-            bounds = new OpenLayers.Bounds(
-                minXY.lon, minXY.lat, maxXY.lon, maxXY.lat
-            );
-            
-        } else {
-            if(this.click) {
-                // box without extent - let the click handler take care of it
-                return;
-            }
-            bounds = this.pixelToBounds(position);
-        }
-        this.setModifiers(this.handlers.box.dragHandler.evt);
-        this.request(bounds);
-    },
-    
-    /**
-     * Method selectHover
-     * Callback from the handlers.hover set up when <hover> selection is on
-     *
-     * Parameters:
-     * evt {Object} - event object with an xy property
-     */
-    selectHover: function(evt) {
-        var bounds = this.pixelToBounds(evt.xy);
-        this.request(bounds, {single: true, hover: true});
-    },
-
-    /**
-     * Method: cancelHover
-     * Callback from the handlers.hover set up when <hover> selection is on
-     */
-    cancelHover: function() {
-        if (this.hoverResponse) {
-            this.protocol.abort(this.hoverResponse);
-            this.hoverResponse = null;
-
-            OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait");
-        }
-    },
-
-    /**
-     * Method: request
-     * Sends a GetFeature request to the WFS
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} bounds for the request's BBOX filter
-     * options - {Object} additional options for this method.
-     * 
-     * Supported options include:
-     * single - {Boolean} A single feature should be returned.
-     *     Note that this will be ignored if the protocol does not
-     *     return the geometries of the features.
-     * hover - {Boolean} Do the request for the hover handler.
-     */
-    request: function(bounds, options) {
-        options = options || {};
-        var filter = new OpenLayers.Filter.Spatial({
-            type: this.filterType, 
-            value: bounds
-        });
-        
-        // Set the cursor to "wait" to tell the user we're working.
-        OpenLayers.Element.addClass(this.map.viewPortDiv, "olCursorWait");
-
-        var response = this.protocol.read({
-            maxFeatures: options.single == true ? this.maxFeatures : undefined,
-            filter: filter,
-            callback: function(result) {
-                if(result.success()) {
-                    if(result.features.length) {
-                        if(options.single == true) {
-                            this.selectBestFeature(result.features,
-                                bounds.getCenterLonLat(), options);
-                        } else {
-                            this.select(result.features);
-                        }
-                    } else if(options.hover) {
-                        this.hoverSelect();
-                    } else {
-                        this.events.triggerEvent("clickout");
-                        if(this.clickout) {
-                            this.unselectAll();
-                        }
-                    }
-                }
-                // Reset the cursor.
-                OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait");
-            },
-            scope: this
-        });
-        if(options.hover == true) {
-            this.hoverResponse = response;
-        }
-    },
-
-    /**
-     * Method: selectBestFeature
-     * Selects the feature from an array of features that is the best match
-     *     for the click position.
-     * 
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>)}
-     * clickPosition - {<OpenLayers.LonLat>}
-     * options - {Object} additional options for this method
-     * 
-     * Supported options include:
-     * hover - {Boolean} Do the selection for the hover handler.
-     */
-    selectBestFeature: function(features, clickPosition, options) {
-        options = options || {};
-        if(features.length) {
-            var point = new OpenLayers.Geometry.Point(clickPosition.lon,
-                clickPosition.lat);
-            var feature, resultFeature, dist;
-            var minDist = Number.MAX_VALUE;
-            for(var i=0; i<features.length; ++i) {
-                feature = features[i];
-                if(feature.geometry) {
-                    dist = point.distanceTo(feature.geometry, {edge: false});
-                    if(dist < minDist) {
-                        minDist = dist;
-                        resultFeature = feature;
-                        if(minDist == 0) {
-                            break;
-                        }
-                    }
-                }
-            }
-            
-            if(options.hover == true) {
-                this.hoverSelect(resultFeature);
-            } else {
-                this.select(resultFeature || features);
-            } 
-        }
-    },
-    
-    /**
-     * Method: setModifiers
-     * Sets the multiple and toggle modifiers according to the current event
-     * 
-     * Parameters:
-     * evt {<OpenLayers.Event>}
-     */
-    setModifiers: function(evt) {
-        this.modifiers = {
-            multiple: this.multiple || (this.multipleKey && evt[this.multipleKey]),
-            toggle: this.toggle || (this.toggleKey && evt[this.toggleKey])
-        };        
-    },
-
-    /**
-     * Method: select
-     * Add feature to the hash of selected features and trigger the
-     * featureselected and featuresselected events.
-     * 
-     * Parameters:
-     * features - {<OpenLayers.Feature.Vector>} or an array of features
-     */
-    select: function(features) {
-        if(!this.modifiers.multiple && !this.modifiers.toggle) {
-            this.unselectAll();
-        }
-        if(!(features instanceof Array)) {
-            features = [features];
-        }
-        
-        var cont = this.events.triggerEvent("beforefeaturesselected", {
-            features: features
-        });
-        if(cont !== false) {
-            var selectedFeatures = [];
-            var feature;
-            for(var i=0, len=features.length; i<len; ++i) {
-                feature = features[i];
-                if(this.features[feature.fid || feature.id]) {
-                    if(this.modifiers.toggle) {
-                        this.unselect(this.features[feature.fid || feature.id]);
-                    }
-                } else {
-                    cont = this.events.triggerEvent("beforefeatureselected", {
-                        feature: feature
-                    });
-                    if(cont !== false) {
-                        this.features[feature.fid || feature.id] = feature;
-                        selectedFeatures.push(feature);
-                
-                        this.events.triggerEvent("featureselected",
-                            {feature: feature});
-                    }
-                }
-            }
-            this.events.triggerEvent("featuresselected", {
-                features: selectedFeatures
-            });
-        }
-    },
-    
-    /**
-     * Method: hoverSelect
-     * Sets/unsets the <hoverFeature>
-     * 
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} the feature to hover-select.
-     *     If none is provided, the current <hoverFeature> will be nulled and
-     *     the outfeature event will be triggered.
-     */
-    hoverSelect: function(feature) {
-        var fid = feature ? feature.fid || feature.id : null;
-        var hfid = this.hoverFeature ?
-            this.hoverFeature.fid || this.hoverFeature.id : null;
-            
-        if(hfid && hfid != fid) {
-            this.events.triggerEvent("outfeature",
-                {feature: this.hoverFeature});
-            this.hoverFeature = null;
-        }
-        if(fid && fid != hfid) {
-            this.events.triggerEvent("hoverfeature", {feature: feature});
-            this.hoverFeature = feature;
-        }
-    },
-
-    /**
-     * Method: unselect
-     * Remove feature from the hash of selected features and trigger the
-     * featureunselected event.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>}
-     */
-    unselect: function(feature) {
-        delete this.features[feature.fid || feature.id];
-        this.events.triggerEvent("featureunselected", {feature: feature});
-    },
-    
-    /**
-     * Method: unselectAll
-     * Unselect all selected features.
-     */
-    unselectAll: function() {
-        // we'll want an option to supress notification here
-        for(var fid in this.features) {
-            this.unselect(this.features[fid]);
-        }
-    },
-    
-    /** 
-     * Method: setMap
-     * Set the map property for the control. 
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>} 
-     */
-    setMap: function(map) {
-        for(var i in this.handlers) {
-            this.handlers[i].setMap(map);
-        }
-        OpenLayers.Control.prototype.setMap.apply(this, arguments);
-    },
-    
-    /**
-     * Method: pixelToBounds
-     * Takes a pixel as argument and creates bounds after adding the
-     * <clickTolerance>.
-     * 
-     * Parameters:
-     * pixel - {<OpenLayers.Pixel>}
-     */
-    pixelToBounds: function(pixel) {
-        var llPx = pixel.add(-this.clickTolerance/2, this.clickTolerance/2);
-        var urPx = pixel.add(this.clickTolerance/2, -this.clickTolerance/2);
-        var ll = this.map.getLonLatFromPixel(llPx);
-        var ur = this.map.getLonLatFromPixel(urPx);
-        return new OpenLayers.Bounds(ll.lon, ll.lat, ur.lon, ur.lat);
-    },
-
-    CLASS_NAME: "OpenLayers.Control.GetFeature"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/Graticule.js
+++ /dev/null
@@ -1,374 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- */
-
-/**
- * Class: OpenLayers.Control.Graticule
- * The Graticule displays a grid of latitude/longitude lines reprojected on
- * the map.  
- * 
- * Inherits from:
- *  - <OpenLayers.Control>
- *  
- */
-OpenLayers.Control.Graticule = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * APIProperty: autoActivate
-     * {Boolean} Activate the control when it is added to a map. Default is
-     *     true. 
-     */
-    autoActivate: true,
-    
-    /**
-    * APIProperty: intervals
-    * {Array(Float)} A list of possible graticule widths in degrees.
-    */
-    intervals: [ 45, 30, 20, 10, 5, 2, 1,
-                 0.5, 0.2, 0.1, 0.05, 0.01, 
-                 0.005, 0.002, 0.001 ],
-
-    /**
-     * APIProperty: displayInLayerSwitcher
-     * {Boolean} Allows the Graticule control to be switched on and off by 
-     *     LayerSwitcher control. Defaults is true.
-     */
-    displayInLayerSwitcher: true,
-
-    /**
-     * APIProperty: visible
-     * {Boolean} should the graticule be initially visible (default=true)
-     */
-    visible: true,
-
-    /**
-     * APIProperty: numPoints
-     * {Integer} The number of points to use in each graticule line.  Higher
-     * numbers result in a smoother curve for projected maps 
-     */
-    numPoints: 50,
-
-    /**
-     * APIProperty: targetSize
-     * {Integer} The maximum size of the grid in pixels on the map
-     */
-    targetSize: 200,
-
-    /**
-     * APIProperty: layerName
-     * {String} The name to be displayed in the layer switcher, default is set 
-     *     by {<OpenLayers.Lang>}.
-     */
-    layerName: null,
-
-    /**
-     * APIProperty: labelled
-     * {Boolean} Should the graticule lines be labelled?. default=true
-     */
-    labelled: true,
-
-    /**
-     * APIProperty: labelFormat
-     * {String} the format of the labels, default = 'dm'. See
-     * <OpenLayers.Util.getFormattedLonLat> for other options.
-     */
-    labelFormat: 'dm',
-
-    /**
-     * APIProperty: lineSymbolizer
-     * {symbolizer} the symbolizer used to render lines
-     */
-    lineSymbolizer: {
-                strokeColor: "#333",
-                strokeWidth: 1,
-                strokeOpacity: 0.5
-            },
-
-    /**
-     * APIProperty: labelSymbolizer
-     * {symbolizer} the symbolizer used to render labels
-     */
-     labelSymbolizer: {},
-
-    /**
-     * Property: gratLayer
-     * {OpenLayers.Layer.Vector} vector layer used to draw the graticule on
-     */
-    gratLayer: null,
-
-    /**
-     * Constructor: OpenLayers.Control.Graticule
-     * Create a new graticule control to display a grid of latitude longitude
-     * lines.
-     * 
-     * Parameters:
-     * options - {Object} An optional object whose properties will be used
-     *     to extend the control.
-     */
-    initialize: function(options) {
-        options = options || {};
-        options.layerName = options.layerName || OpenLayers.i18n("graticule");
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        
-        this.labelSymbolizer.stroke = false;
-        this.labelSymbolizer.fill = false;
-        this.labelSymbolizer.label = "${label}";
-        this.labelSymbolizer.labelAlign = "${labelAlign}";
-        this.labelSymbolizer.labelXOffset = "${xOffset}";
-        this.labelSymbolizer.labelYOffset = "${yOffset}";
-    },
-
-    /**
-     * APIMethod: destroy
-     */
-    destroy: function() {
-        this.deactivate();        
-        OpenLayers.Control.prototype.destroy.apply(this, arguments);        
-        if (this.gratLayer) {
-            this.gratLayer.destroy();
-            this.gratLayer = null;
-        }
-    },
-    
-    /**
-     * Method: draw
-     *
-     * initializes the graticule layer and does the initial update
-     * 
-     * Returns:
-     * {DOMElement}
-     */
-    draw: function() {
-        OpenLayers.Control.prototype.draw.apply(this, arguments);
-        if (!this.gratLayer) {
-            var gratStyle = new OpenLayers.Style({},{
-                rules: [new OpenLayers.Rule({'symbolizer':
-                    {"Point":this.labelSymbolizer,
-                     "Line":this.lineSymbolizer}
-                })]
-            });
-            this.gratLayer = new OpenLayers.Layer.Vector(this.layerName, {
-                styleMap: new OpenLayers.StyleMap({'default':gratStyle}),
-                visibility: this.visible,
-                displayInLayerSwitcher: this.displayInLayerSwitcher
-            });
-        }
-        return this.div;
-    },
-
-     /**
-     * APIMethod: activate
-     */
-    activate: function() {
-        if (OpenLayers.Control.prototype.activate.apply(this, arguments)) {
-            this.map.addLayer(this.gratLayer);
-            this.map.events.register('moveend', this, this.update);     
-            this.update();
-            return true;            
-        } else {
-            return false;
-        }
-    },
-    
-    /**
-     * APIMethod: deactivate
-     */
-    deactivate: function() {
-        if (OpenLayers.Control.prototype.deactivate.apply(this, arguments)) {
-            this.map.events.unregister('moveend', this, this.update);
-            this.map.removeLayer(this.gratLayer);
-            return true;
-        } else {
-            return false;
-        }
-    },
-    /**
-     * Method: update
-     *
-     * calculates the grid to be displayed and actually draws it
-     * 
-     * Returns:
-     * {DOMElement}
-     */
-    update: function() {
-        //wait for the map to be initialized before proceeding
-        var mapBounds = this.map.getExtent();
-        if (!mapBounds) {
-            return;
-        }
-        
-        //clear out the old grid
-        this.gratLayer.destroyFeatures();
-        
-        //get the projection objects required
-        var llProj = new OpenLayers.Projection("EPSG:4326");
-        var mapProj = this.map.getProjectionObject();
-        var mapRes = this.map.getResolution();
-        
-        //if the map is in lon/lat, then the lines are straight and only one
-        //point is required
-        if (mapProj.proj && mapProj.proj.projName == "longlat") {
-            this.numPoints = 1;
-        }
-        
-        //get the map center in EPSG:4326
-        var mapCenter = this.map.getCenter(); //lon and lat here are really map x and y
-        var mapCenterLL = new OpenLayers.Pixel(mapCenter.lon, mapCenter.lat);
-        OpenLayers.Projection.transform(mapCenterLL, mapProj, llProj);
-        
-        /* This block of code determines the lon/lat interval to use for the
-         * grid by calculating the diagonal size of one grid cell at the map
-         * center.  Iterates through the intervals array until the diagonal
-         * length is less than the targetSize option.
-         */
-        //find lat/lon interval that results in a grid of less than the target size
-        var testSq = this.targetSize*mapRes;
-        testSq *= testSq;   //compare squares rather than doing a square root to save time
-        var llInterval;
-        for (var i=0; i<this.intervals.length; ++i) {
-            llInterval = this.intervals[i];   //could do this for both x and y??
-            var delta = llInterval/2;  
-            var p1 = mapCenterLL.offset(new OpenLayers.Pixel(-delta, -delta));  //test coords in EPSG:4326 space
-            var p2 = mapCenterLL.offset(new OpenLayers.Pixel( delta,  delta));
-            OpenLayers.Projection.transform(p1, llProj, mapProj); // convert them back to map projection
-            OpenLayers.Projection.transform(p2, llProj, mapProj);
-            var distSq = (p1.x-p2.x)*(p1.x-p2.x) + (p1.y-p2.y)*(p1.y-p2.y);
-            if (distSq <= testSq) {
-                break;
-            }
-        }
-        //alert(llInterval);
-        
-        //round the LL center to an even number based on the interval
-        mapCenterLL.x = Math.floor(mapCenterLL.x/llInterval)*llInterval;
-        mapCenterLL.y = Math.floor(mapCenterLL.y/llInterval)*llInterval;
-        //TODO adjust for minutses/seconds?
-        
-        /* The following 2 blocks calculate the nodes of the grid along a 
-         * line of constant longitude (then latitiude) running through the
-         * center of the map until it reaches the map edge.  The calculation
-         * goes from the center in both directions to the edge.
-         */
-        //get the central longitude line, increment the latitude
-        var iter = 0;
-        var centerLonPoints = [mapCenterLL.clone()];
-        var newPoint = mapCenterLL.clone();
-        var mapXY;
-        do {
-            newPoint = newPoint.offset(new OpenLayers.Pixel(0,llInterval));
-            mapXY = OpenLayers.Projection.transform(newPoint.clone(), llProj, mapProj);
-            centerLonPoints.unshift(newPoint);
-        } while (mapBounds.containsPixel(mapXY) && ++iter<1000);
-        newPoint = mapCenterLL.clone();
-        do {          
-            newPoint = newPoint.offset(new OpenLayers.Pixel(0,-llInterval));
-            mapXY = OpenLayers.Projection.transform(newPoint.clone(), llProj, mapProj);
-            centerLonPoints.push(newPoint);
-        } while (mapBounds.containsPixel(mapXY) && ++iter<1000);
-        
-        //get the central latitude line, increment the longitude
-        iter = 0;
-        var centerLatPoints = [mapCenterLL.clone()];
-        newPoint = mapCenterLL.clone();
-        do {
-            newPoint = newPoint.offset(new OpenLayers.Pixel(-llInterval, 0));
-            mapXY = OpenLayers.Projection.transform(newPoint.clone(), llProj, mapProj);
-            centerLatPoints.unshift(newPoint);
-        } while (mapBounds.containsPixel(mapXY) && ++iter<1000);
-        newPoint = mapCenterLL.clone();
-        do {          
-            newPoint = newPoint.offset(new OpenLayers.Pixel(llInterval, 0));
-            mapXY = OpenLayers.Projection.transform(newPoint.clone(), llProj, mapProj);
-            centerLatPoints.push(newPoint);
-        } while (mapBounds.containsPixel(mapXY) && ++iter<1000);
-        
-        //now generate a line for each node in the central lat and lon lines
-        //first loop over constant longitude
-        var lines = [];
-        for(var i=0; i < centerLatPoints.length; ++i) {
-            var lon = centerLatPoints[i].x;
-            var pointList = [];
-            var labelPoint = null;
-            var latEnd = Math.min(centerLonPoints[0].y, 90);
-            var latStart = Math.max(centerLonPoints[centerLonPoints.length - 1].y, -90);
-            var latDelta = (latEnd - latStart)/this.numPoints;
-            var lat = latStart;
-            for(var j=0; j<= this.numPoints; ++j) {
-                var gridPoint = new OpenLayers.Geometry.Point(lon,lat);
-                gridPoint.transform(llProj, mapProj);
-                pointList.push(gridPoint);
-                lat += latDelta;
-                if (gridPoint.y >= mapBounds.bottom && !labelPoint) {
-                    labelPoint = gridPoint;
-                }
-            }
-            if (this.labelled) {
-                //keep track of when this grid line crosses the map bounds to set
-                //the label position
-                //labels along the bottom, add 10 pixel offset up into the map
-                //TODO add option for labels on top
-                var labelPos = new OpenLayers.Geometry.Point(labelPoint.x,mapBounds.bottom);
-                var labelAttrs = {
-                    value: lon,
-                    label: this.labelled?OpenLayers.Util.getFormattedLonLat(lon, "lon", this.labelFormat):"",
-                    labelAlign: "cb",
-                    xOffset: 0,
-                    yOffset: 2
-                }; 
-                this.gratLayer.addFeatures(new OpenLayers.Feature.Vector(labelPos,labelAttrs));
-            }
-            var geom = new OpenLayers.Geometry.LineString(pointList);
-            lines.push(new OpenLayers.Feature.Vector(geom));
-        }
-        
-        //now draw the lines of constant latitude
-        for (var j=0; j < centerLonPoints.length; ++j) {
-            lat = centerLonPoints[j].y;
-            if (lat<-90 || lat>90) {  //latitudes only valid between -90 and 90
-                continue;
-            }
-            var pointList = [];
-            var lonStart = centerLatPoints[0].x;
-            var lonEnd = centerLatPoints[centerLatPoints.length - 1].x;
-            var lonDelta = (lonEnd - lonStart)/this.numPoints;
-            var lon = lonStart;
-            var labelPoint = null;
-            for(var i=0; i <= this.numPoints ; ++i) {
-                var gridPoint = new OpenLayers.Geometry.Point(lon,lat);
-                gridPoint.transform(llProj, mapProj);
-                pointList.push(gridPoint);
-                lon += lonDelta;
-                if (gridPoint.x < mapBounds.right) {
-                    labelPoint = gridPoint;
-                }
-            }
-            if (this.labelled) {
-                //keep track of when this grid line crosses the map bounds to set
-                //the label position
-                //labels along the right, 30 pixel offset left into the map
-                //TODO add option for labels on left
-                var labelPos = new OpenLayers.Geometry.Point(mapBounds.right, labelPoint.y); 
-                var labelAttrs = {
-                    value: lat,
-                    label: this.labelled?OpenLayers.Util.getFormattedLonLat(lat, "lat", this.labelFormat):"",
-                    labelAlign: "rb",
-                    xOffset: -2,
-                    yOffset: 2
-                }; 
-                this.gratLayer.addFeatures(new OpenLayers.Feature.Vector(labelPos,labelAttrs));
-            }
-            var geom = new OpenLayers.Geometry.LineString(pointList);
-            lines.push(new OpenLayers.Feature.Vector(geom));
-          }
-          this.gratLayer.addFeatures(lines);
-    },
-    
-    CLASS_NAME: "OpenLayers.Control.Graticule"
-});
-
-

--- a/labs/openlayers/lib/OpenLayers/Control/KeyboardDefaults.js
+++ /dev/null
@@ -1,128 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Handler/Keyboard.js
- */
-
-/**
- * Class: OpenLayers.Control.KeyboardDefaults
- * The KeyboardDefaults control adds panning and zooming functions, controlled
- * with the keyboard. By default arrow keys pan, +/- keys zoom & Page Up/Page
- * Down/Home/End scroll by three quarters of a page.
- * 
- * This control has no visible appearance.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.KeyboardDefaults = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * APIProperty: autoActivate
-     * {Boolean} Activate the control when it is added to a map.  Default is
-     *     true.
-     */
-    autoActivate: true,
-
-    /**
-     * APIProperty: slideFactor
-     * Pixels to slide by.
-     */
-    slideFactor: 75,
-
-    /**
-     * Constructor: OpenLayers.Control.KeyboardDefaults
-     */
-    initialize: function() {
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-    },
-    
-    /**
-     * APIMethod: destroy
-     */
-    destroy: function() {
-        if (this.handler) {
-            this.handler.destroy();
-        }        
-        this.handler = null;
-        
-        OpenLayers.Control.prototype.destroy.apply(this, arguments);
-    },
-    
-    /**
-     * Method: draw
-     * Create handler.
-     */
-    draw: function() {
-        this.handler = new OpenLayers.Handler.Keyboard( this, { 
-                                "keydown": this.defaultKeyPress });
-    },
-    
-    /**
-     * Method: defaultKeyPress
-     * When handling the key event, we only use evt.keyCode. This holds 
-     * some drawbacks, though we get around them below. When interpretting
-     * the keycodes below (including the comments associated with them),
-     * consult the URL below. For instance, the Safari browser returns
-     * "IE keycodes", and so is supported by any keycode labeled "IE".
-     * 
-     * Very informative URL:
-     *    http://unixpapa.com/js/key.html
-     *
-     * Parameters:
-     * code - {Integer} 
-     */
-    defaultKeyPress: function (evt) {
-        switch(evt.keyCode) {
-            case OpenLayers.Event.KEY_LEFT:
-                this.map.pan(-this.slideFactor, 0);
-                break;
-            case OpenLayers.Event.KEY_RIGHT: 
-                this.map.pan(this.slideFactor, 0);
-                break;
-            case OpenLayers.Event.KEY_UP:
-                this.map.pan(0, -this.slideFactor);
-                break;
-            case OpenLayers.Event.KEY_DOWN:
-                this.map.pan(0, this.slideFactor);
-                break;
-            
-            case 33: // Page Up. Same in all browsers.
-                var size = this.map.getSize();
-                this.map.pan(0, -0.75*size.h);
-                break;
-            case 34: // Page Down. Same in all browsers.
-                var size = this.map.getSize();
-                this.map.pan(0, 0.75*size.h);
-                break; 
-            case 35: // End. Same in all browsers.
-                var size = this.map.getSize();
-                this.map.pan(0.75*size.w, 0);
-                break; 
-            case 36: // Home. Same in all browsers.
-                var size = this.map.getSize();
-                this.map.pan(-0.75*size.w, 0);
-                break; 
-
-            case 43:  // +/= (ASCII), keypad + (ASCII, Opera)
-            case 61:  // +/= (Mozilla, Opera, some ASCII)
-            case 187: // +/= (IE)
-            case 107: // keypad + (IE, Mozilla)
-                this.map.zoomIn();
-                break; 
-            case 45:  // -/_ (ASCII, Opera), keypad - (ASCII, Opera)
-            case 109: // -/_ (Mozilla), keypad - (Mozilla, IE)
-            case 189: // -/_ (IE)
-            case 95:  // -/_ (some ASCII)
-                this.map.zoomOut();
-                break; 
-        } 
-    },
-
-    CLASS_NAME: "OpenLayers.Control.KeyboardDefaults"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/LayerSwitcher.js
+++ /dev/null
@@ -1,621 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/** 
- * @requires OpenLayers/Control.js
- */
-
-/**
- * Class: OpenLayers.Control.LayerSwitcher
- * The LayerSwitcher control displays a table of contents for the map. This 
- * allows the user interface to switch between BaseLasyers and to show or hide
- * Overlays. By default the switcher is shown minimized on the right edge of 
- * the map, the user may expand it by clicking on the handle.
- *
- * To create the LayerSwitcher outside of the map, pass the Id of a html div 
- * as the first argument to the constructor.
- * 
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.LayerSwitcher = 
-  OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * APIProperty: roundedCorner
-     * {Boolean} If true the Rico library is used for rounding the corners
-     *     of the layer switcher div, defaults to true.
-     */
-    roundedCorner: true,
-
-    /**  
-     * APIProperty: roundedCornerColor
-     * {String} The color of the rounded corners, only applies if roundedCorner
-     *     is true, defaults to "darkblue".
-     */
-    roundedCornerColor: "darkblue",
-    
-    /**  
-     * Property: layerStates 
-     * {Array(Object)} Basically a copy of the "state" of the map's layers 
-     *     the last time the control was drawn. We have this in order to avoid
-     *     unnecessarily redrawing the control.
-     */
-    layerStates: null,
-    
-
-  // DOM Elements
-  
-    /**
-     * Property: layersDiv
-     * {DOMElement} 
-     */
-    layersDiv: null,
-    
-    /** 
-     * Property: baseLayersDiv
-     * {DOMElement}
-     */
-    baseLayersDiv: null,
-
-    /** 
-     * Property: baseLayers
-     * {Array(<OpenLayers.Layer>)}
-     */
-    baseLayers: null,
-    
-    
-    /** 
-     * Property: dataLbl
-     * {DOMElement} 
-     */
-    dataLbl: null,
-    
-    /** 
-     * Property: dataLayersDiv
-     * {DOMElement} 
-     */
-    dataLayersDiv: null,
-
-    /** 
-     * Property: dataLayers
-     * {Array(<OpenLayers.Layer>)} 
-     */
-    dataLayers: null,
-
-
-    /** 
-     * Property: minimizeDiv
-     * {DOMElement} 
-     */
-    minimizeDiv: null,
-
-    /** 
-     * Property: maximizeDiv
-     * {DOMElement} 
-     */
-    maximizeDiv: null,
-    
-    /**
-     * APIProperty: ascending
-     * {Boolean} 
-     */
-    ascending: true,
- 
-    /**
-     * Constructor: OpenLayers.Control.LayerSwitcher
-     * 
-     * Parameters:
-     * options - {Object}
-     */
-    initialize: function(options) {
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-        this.layerStates = [];
-    },
-
-    /**
-     * APIMethod: destroy 
-     */    
-    destroy: function() {
-        
-        OpenLayers.Event.stopObservingElement(this.div);
-
-        OpenLayers.Event.stopObservingElement(this.minimizeDiv);
-        OpenLayers.Event.stopObservingElement(this.maximizeDiv);
-
-        //clear out layers info and unregister their events 
-        this.clearLayersArray("base");
-        this.clearLayersArray("data");
-        
-        this.map.events.un({
-            "addlayer": this.redraw,
-            "changelayer": this.redraw,
-            "removelayer": this.redraw,
-            "changebaselayer": this.redraw,
-            scope: this
-        });
-        
-        OpenLayers.Control.prototype.destroy.apply(this, arguments);
-    },
-
-    /** 
-     * Method: setMap
-     *
-     * Properties:
-     * map - {<OpenLayers.Map>} 
-     */
-    setMap: function(map) {
-        OpenLayers.Control.prototype.setMap.apply(this, arguments);
-
-        this.map.events.on({
-            "addlayer": this.redraw,
-            "changelayer": this.redraw,
-            "removelayer": this.redraw,
-            "changebaselayer": this.redraw,
-            scope: this
-        });
-    },
-
-    /**
-     * Method: draw
-     *
-     * Returns:
-     * {DOMElement} A reference to the DIV DOMElement containing the 
-     *     switcher tabs.
-     */  
-    draw: function() {
-        OpenLayers.Control.prototype.draw.apply(this);
-
-        // create layout divs
-        this.loadContents();
-
-        // set mode to minimize
-        if(!this.outsideViewport) {
-            this.minimizeControl();
-        }
-
-        // populate div with current info
-        this.redraw();    
-
-        return this.div;
-    },
-
-    /** 
-     * Method: clearLayersArray
-     * User specifies either "base" or "data". we then clear all the
-     *     corresponding listeners, the div, and reinitialize a new array.
-     * 
-     * Parameters:
-     * layersType - {String}  
-     */
-    clearLayersArray: function(layersType) {
-        var layers = this[layersType + "Layers"];
-        if (layers) {
-            for(var i=0, len=layers.length; i<len ; i++) {
-                var layer = layers[i];
-                OpenLayers.Event.stopObservingElement(layer.inputElem);
-                OpenLayers.Event.stopObservingElement(layer.labelSpan);
-            }
-        }
-        this[layersType + "LayersDiv"].innerHTML = "";
-        this[layersType + "Layers"] = [];
-    },
-
-
-    /**
-     * Method: checkRedraw
-     * Checks if the layer state has changed since the last redraw() call.
-     * 
-     * Returns:
-     * {Boolean} The layer state changed since the last redraw() call. 
-     */
-    checkRedraw: function() {
-        var redraw = false;
-        if ( !this.layerStates.length ||
-             (this.map.layers.length != this.layerStates.length) ) {
-            redraw = true;
-        } else {
-            for (var i=0, len=this.layerStates.length; i<len; i++) {
-                var layerState = this.layerStates[i];
-                var layer = this.map.layers[i];
-                if ( (layerState.name != layer.name) || 
-                     (layerState.inRange != layer.inRange) || 
-                     (layerState.id != layer.id) || 
-                     (layerState.visibility != layer.visibility) ) {
-                    redraw = true;
-                    break;
-                }    
-            }
-        }    
-        return redraw;
-    },
-    
-    /** 
-     * Method: redraw
-     * Goes through and takes the current state of the Map and rebuilds the
-     *     control to display that state. Groups base layers into a 
-     *     radio-button group and lists each data layer with a checkbox.
-     *
-     * Returns: 
-     * {DOMElement} A reference to the DIV DOMElement containing the control
-     */  
-    redraw: function() {
-        //if the state hasn't changed since last redraw, no need 
-        // to do anything. Just return the existing div.
-        if (!this.checkRedraw()) { 
-            return this.div; 
-        } 
-
-        //clear out previous layers 
-        this.clearLayersArray("base");
-        this.clearLayersArray("data");
-        
-        var containsOverlays = false;
-        var containsBaseLayers = false;
-        
-        // Save state -- for checking layer if the map state changed.
-        // We save this before redrawing, because in the process of redrawing
-        // we will trigger more visibility changes, and we want to not redraw
-        // and enter an infinite loop.
-        var len = this.map.layers.length;
-        this.layerStates = new Array(len);
-        for (var i=0; i <len; i++) {
-            var layer = this.map.layers[i];
-            this.layerStates[i] = {
-                'name': layer.name, 
-                'visibility': layer.visibility,
-                'inRange': layer.inRange,
-                'id': layer.id
-            };
-        }    
-
-        var layers = this.map.layers.slice();
-        if (!this.ascending) { layers.reverse(); }
-        for(var i=0, len=layers.length; i<len; i++) {
-            var layer = layers[i];
-            var baseLayer = layer.isBaseLayer;
-
-            if (layer.displayInLayerSwitcher) {
-
-                if (baseLayer) {
-                    containsBaseLayers = true;
-                } else {
-                    containsOverlays = true;
-                }    
-
-                // only check a baselayer if it is *the* baselayer, check data
-                //  layers if they are visible
-                var checked = (baseLayer) ? (layer == this.map.baseLayer)
-                                          : layer.getVisibility();
-    
-                // create input element
-                var inputElem = document.createElement("input");
-                inputElem.id = this.id + "_input_" + layer.name;
-                inputElem.name = (baseLayer) ? this.id + "_baseLayers" : layer.name;
-                inputElem.type = (baseLayer) ? "radio" : "checkbox";
-                inputElem.value = layer.name;
-                inputElem.checked = checked;
-                inputElem.defaultChecked = checked;
-
-                if (!baseLayer && !layer.inRange) {
-                    inputElem.disabled = true;
-                }
-                var context = {
-                    'inputElem': inputElem,
-                    'layer': layer,
-                    'layerSwitcher': this
-                };
-                OpenLayers.Event.observe(inputElem, "mouseup", 
-                    OpenLayers.Function.bindAsEventListener(this.onInputClick,
-                                                            context)
-                );
-                
-                // create span
-                var labelSpan = document.createElement("span");
-                OpenLayers.Element.addClass(labelSpan, "labelSpan")
-                if (!baseLayer && !layer.inRange) {
-                    labelSpan.style.color = "gray";
-                }
-                labelSpan.innerHTML = layer.name;
-                labelSpan.style.verticalAlign = (baseLayer) ? "bottom" 
-                                                            : "baseline";
-                OpenLayers.Event.observe(labelSpan, "click", 
-                    OpenLayers.Function.bindAsEventListener(this.onInputClick,
-                                                            context)
-                );
-                // create line break
-                var br = document.createElement("br");
-    
-                
-                var groupArray = (baseLayer) ? this.baseLayers
-                                             : this.dataLayers;
-                groupArray.push({
-                    'layer': layer,
-                    'inputElem': inputElem,
-                    'labelSpan': labelSpan
-                });
-                                                     
-    
-                var groupDiv = (baseLayer) ? this.baseLayersDiv
-                                           : this.dataLayersDiv;
-                groupDiv.appendChild(inputElem);
-                groupDiv.appendChild(labelSpan);
-                groupDiv.appendChild(br);
-            }
-        }
-
-        // if no overlays, dont display the overlay label
-        this.dataLbl.style.display = (containsOverlays) ? "" : "none";        
-        
-        // if no baselayers, dont display the baselayer label
-        this.baseLbl.style.display = (containsBaseLayers) ? "" : "none";        
-
-        return this.div;
-    },
-
-    /** 
-     * Method:
-     * A label has been clicked, check or uncheck its corresponding input
-     * 
-     * Parameters:
-     * e - {Event} 
-     *
-     * Context:  
-     *  - {DOMElement} inputElem
-     *  - {<OpenLayers.Control.LayerSwitcher>} layerSwitcher
-     *  - {<OpenLayers.Layer>} layer
-     */
-
-    onInputClick: function(e) {
-
-        if (!this.inputElem.disabled) {
-            if (this.inputElem.type == "radio") {
-                this.inputElem.checked = true;
-                this.layer.map.setBaseLayer(this.layer);
-            } else {
-                this.inputElem.checked = !this.inputElem.checked;
-                this.layerSwitcher.updateMap();
-            }
-        }
-        OpenLayers.Event.stop(e);
-    },
-    
-    /**
-     * Method: onLayerClick
-     * Need to update the map accordingly whenever user clicks in either of
-     *     the layers.
-     * 
-     * Parameters: 
-     * e - {Event} 
-     */
-    onLayerClick: function(e) {
-        this.updateMap();
-    },
-
-
-    /** 
-     * Method: updateMap
-     * Cycles through the loaded data and base layer input arrays and makes
-     *     the necessary calls to the Map object such that that the map's 
-     *     visual state corresponds to what the user has selected in 
-     *     the control.
-     */
-    updateMap: function() {
-
-        // set the newly selected base layer        
-        for(var i=0, len=this.baseLayers.length; i<len; i++) {
-            var layerEntry = this.baseLayers[i];
-            if (layerEntry.inputElem.checked) {
-                this.map.setBaseLayer(layerEntry.layer, false);
-            }
-        }
-
-        // set the correct visibilities for the overlays
-        for(var i=0, len=this.dataLayers.length; i<len; i++) {
-            var layerEntry = this.dataLayers[i];   
-            layerEntry.layer.setVisibility(layerEntry.inputElem.checked);
-        }
-
-    },
-
-    /** 
-     * Method: maximizeControl
-     * Set up the labels and divs for the control
-     * 
-     * Parameters:
-     * e - {Event} 
-     */
-    maximizeControl: function(e) {
-
-        // set the div's width and height to empty values, so
-        // the div dimensions can be controlled by CSS
-        this.div.style.width = "";
-        this.div.style.height = "";
-
-        this.showControls(false);
-
-        if (e != null) {
-            OpenLayers.Event.stop(e);                                            
-        }
-    },
-    
-    /** 
-     * Method: minimizeControl
-     * Hide all the contents of the control, shrink the size, 
-     *     add the maximize icon
-     *
-     * Parameters:
-     * e - {Event} 
-     */
-    minimizeControl: function(e) {
-
-        // to minimize the control we set its div's width
-        // and height to 0px, we cannot just set "display"
-        // to "none" because it would hide the maximize
-        // div
-        this.div.style.width = "0px";
-        this.div.style.height = "0px";
-
-        this.showControls(true);
-
-        if (e != null) {
-            OpenLayers.Event.stop(e);                                            
-        }
-    },
-
-    /**
-     * Method: showControls
-     * Hide/Show all LayerSwitcher controls depending on whether we are
-     *     minimized or not
-     * 
-     * Parameters:
-     * minimize - {Boolean}
-     */
-    showControls: function(minimize) {
-
-        this.maximizeDiv.style.display = minimize ? "" : "none";
-        this.minimizeDiv.style.display = minimize ? "none" : "";
-
-        this.layersDiv.style.display = minimize ? "none" : "";
-    },
-    
-    /** 
-     * Method: loadContents
-     * Set up the labels and divs for the control
-     */
-    loadContents: function() {
-
-        //configure main div
-
-        OpenLayers.Event.observe(this.div, "mouseup", 
-            OpenLayers.Function.bindAsEventListener(this.mouseUp, this));
-        OpenLayers.Event.observe(this.div, "click",
-                      this.ignoreEvent);
-        OpenLayers.Event.observe(this.div, "mousedown",
-            OpenLayers.Function.bindAsEventListener(this.mouseDown, this));
-        OpenLayers.Event.observe(this.div, "dblclick", this.ignoreEvent);
-
-        // layers list div        
-        this.layersDiv = document.createElement("div");
-        this.layersDiv.id = this.id + "_layersDiv";
-        OpenLayers.Element.addClass(this.layersDiv, "layersDiv");
-
-        this.baseLbl = document.createElement("div");
-        this.baseLbl.innerHTML = OpenLayers.i18n("baseLayer");
-        OpenLayers.Element.addClass(this.baseLbl, "baseLbl");
-        
-        this.baseLayersDiv = document.createElement("div");
-        OpenLayers.Element.addClass(this.baseLayersDiv, "baseLayersDiv");
-
-        this.dataLbl = document.createElement("div");
-        this.dataLbl.innerHTML = OpenLayers.i18n("overlays");
-        OpenLayers.Element.addClass(this.dataLbl, "dataLbl");
-        
-        this.dataLayersDiv = document.createElement("div");
-        OpenLayers.Element.addClass(this.dataLayersDiv, "dataLayersDiv");
-
-        if (this.ascending) {
-            this.layersDiv.appendChild(this.baseLbl);
-            this.layersDiv.appendChild(this.baseLayersDiv);
-            this.layersDiv.appendChild(this.dataLbl);
-            this.layersDiv.appendChild(this.dataLayersDiv);
-        } else {
-            this.layersDiv.appendChild(this.dataLbl);
-            this.layersDiv.appendChild(this.dataLayersDiv);
-            this.layersDiv.appendChild(this.baseLbl);
-            this.layersDiv.appendChild(this.baseLayersDiv);
-        }    
- 
-        this.div.appendChild(this.layersDiv);
-
-        if(this.roundedCorner) {
-            OpenLayers.Rico.Corner.round(this.div, {
-                corners: "tl bl",
-                bgColor: "transparent",
-                color: this.roundedCornerColor,
-                blend: false
-            });
-            OpenLayers.Rico.Corner.changeOpacity(this.layersDiv, 0.75);
-        }
-
-        var imgLocation = OpenLayers.Util.getImagesLocation();
-        var sz = new OpenLayers.Size(18,18);        
-
-        // maximize button div
-        var img = imgLocation + 'layer-switcher-maximize.png';
-        this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv(
-                                    "OpenLayers_Control_MaximizeDiv", 
-                                    null, 
-                                    sz, 
-                                    img, 
-                                    "absolute");
-        OpenLayers.Element.addClass(this.maximizeDiv, "maximizeDiv");
-        this.maximizeDiv.style.display = "none";
-        OpenLayers.Event.observe(this.maximizeDiv, "click", 
-            OpenLayers.Function.bindAsEventListener(this.maximizeControl, this)
-        );
-        
-        this.div.appendChild(this.maximizeDiv);
-
-        // minimize button div
-        var img = imgLocation + 'layer-switcher-minimize.png';
-        var sz = new OpenLayers.Size(18,18);        
-        this.minimizeDiv = OpenLayers.Util.createAlphaImageDiv(
-                                    "OpenLayers_Control_MinimizeDiv", 
-                                    null, 
-                                    sz, 
-                                    img, 
-                                    "absolute");
-        OpenLayers.Element.addClass(this.minimizeDiv, "minimizeDiv");
-        this.minimizeDiv.style.display = "none";
-        OpenLayers.Event.observe(this.minimizeDiv, "click", 
-            OpenLayers.Function.bindAsEventListener(this.minimizeControl, this)
-        );
-
-        this.div.appendChild(this.minimizeDiv);
-    },
-    
-    /** 
-     * Method: ignoreEvent
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    ignoreEvent: function(evt) {
-        OpenLayers.Event.stop(evt);
-    },
-
-    /** 
-     * Method: mouseDown
-     * Register a local 'mouseDown' flag so that we'll know whether or not
-     *     to ignore a mouseUp event
-     * 
-     * Parameters:
-     * evt - {Event}
-     */
-    mouseDown: function(evt) {
-        this.isMouseDown = true;
-        this.ignoreEvent(evt);
-    },
-
-    /** 
-     * Method: mouseUp
-     * If the 'isMouseDown' flag has been set, that means that the drag was 
-     *     started from within the LayerSwitcher control, and thus we can 
-     *     ignore the mouseup. Otherwise, let the Event continue.
-     *  
-     * Parameters:
-     * evt - {Event} 
-     */
-    mouseUp: function(evt) {
-        if (this.isMouseDown) {
-            this.isMouseDown = false;
-            this.ignoreEvent(evt);
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Control.LayerSwitcher"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/Measure.js
+++ /dev/null
@@ -1,322 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Feature/Vector.js
- */
-
-/**
- * Class: OpenLayers.Control.Measure
- * Allows for drawing of features for measurements.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * Constant: EVENT_TYPES
-     * {Array(String)} Supported application event types.  Register a listener
-     *     for a particular event with the following syntax:
-     * (code)
-     * control.events.register(type, obj, listener);
-     * (end)
-     *
-     * Listeners will be called with a reference to an event object.  The
-     *     properties of this event depends on exactly what happened.
-     *
-     * Supported control event types (in addition to those from <OpenLayers.Control>):
-     * measure - Triggered when a measurement sketch is complete.  Listeners
-     *      will receive an event with measure, units, order, and geometry
-     *      properties.
-     * measurepartial - Triggered when a new point is added to the
-     *      measurement sketch.  Listeners receive an event with measure,
-     *      units, order, and geometry.
-     */
-    EVENT_TYPES: ['measure', 'measurepartial'],
-
-    /**
-     * APIProperty: handlerOptions
-     * {Object} Used to set non-default properties on the control's handler
-     */
-    handlerOptions: null,
-    
-    /**
-     * Property: callbacks
-     * {Object} The functions that are sent to the handler for callback
-     */
-    callbacks: null,
-    
-    /**
-     * Property: displaySystem
-     * {String} Display system for output measurements.  Supported values
-     *     are 'english', 'metric', and 'geographic'.  Default is 'metric'.
-     */
-    displaySystem: 'metric',
-    
-    /**
-     * Property: geodesic
-     * {Boolean} Calculate geodesic metrics instead of planar metrics.  This
-     *     requires that geometries can be transformed into Geographic/WGS84
-     *     (if that is not already the map projection).  Default is false.
-     */
-    geodesic: false,
-    
-    /**
-     * Property: displaySystemUnits
-     * {Object} Units for various measurement systems.  Values are arrays
-     *     of unit abbreviations (from OpenLayers.INCHES_PER_UNIT) in decreasing
-     *     order of length.
-     */
-    displaySystemUnits: {
-        geographic: ['dd'],
-        english: ['mi', 'ft', 'in'],
-        metric: ['km', 'm']
-    },
-
-    /**
-     * Property: delay
-     * {Number} Number of milliseconds between clicks before the event is
-     *     considered a double-click.  The "measurepartial" event will not
-     *     be triggered if the sketch is completed within this time.  This
-     *     is required for IE where creating a browser reflow (if a listener
-     *     is modifying the DOM by displaying the measurement values) messes
-     *     with the dblclick listener in the sketch handler.
-     */
-    partialDelay: 300,
-
-    /**
-     * Property: delayedTrigger
-     * {Number} Timeout id of trigger for measurepartial.
-     */
-    delayedTrigger: null,
-    
-    /**
-     * APIProperty: persist
-     * {Boolean} Keep the temporary measurement sketch drawn after the
-     *     measurement is complete.  The geometry will persist until a new
-     *     measurement is started, the control is deactivated, or <cancel> is
-     *     called.
-     */
-    persist: false,
-
-    /**
-     * Constructor: OpenLayers.Control.Measure
-     * 
-     * Parameters:
-     * handler - {<OpenLayers.Handler>} 
-     * options - {Object} 
-     */
-    initialize: function(handler, options) {
-        // concatenate events specific to measure with those from the base
-        this.EVENT_TYPES =
-            OpenLayers.Control.Measure.prototype.EVENT_TYPES.concat(
-            OpenLayers.Control.prototype.EVENT_TYPES
-        );
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        this.callbacks = OpenLayers.Util.extend(
-            {done: this.measureComplete, point: this.measurePartial},
-            this.callbacks
-        );
-
-        // let the handler options override, so old code that passes 'persist' 
-        // directly to the handler does not need an update
-        this.handlerOptions = OpenLayers.Util.extend(
-            {persist: this.persist}, this.handlerOptions
-        );
-        this.handler = new handler(this, this.callbacks, this.handlerOptions);
-    },
-    
-    /**
-     * APIMethod: cancel
-     * Stop the control from measuring.  If <persist> is true, the temporary
-     *     sketch will be erased.
-     */
-    cancel: function() {
-        this.handler.cancel();
-    },
-    
-    /**
-     * Method: updateHandler
-     *
-     * Parameters:
-     * handler - {Function} One of the sketch handler constructors.
-     * options - {Object} Options for the handler.
-     */
-    updateHandler: function(handler, options) {
-        var active = this.active;
-        if(active) {
-            this.deactivate();
-        }
-        this.handler = new handler(this, this.callbacks, options);
-        if(active) {
-            this.activate();
-        }
-    },
-
-    /**
-     * Method: measureComplete
-     * Called when the measurement sketch is done.
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     */
-    measureComplete: function(geometry) {
-        if(this.delayedTrigger) {
-            window.clearTimeout(this.delayedTrigger);
-        }
-        this.measure(geometry, "measure");
-    },
-    
-    /**
-     * Method: measurePartial
-     * Called each time a new point is added to the measurement sketch.
-     *
-     * Parameters:
-     * point - {<OpenLayers.Geometry.Point>} The last point added.
-     * geometry - {<OpenLayers.Geometry>} The sketch geometry.
-     */
-    measurePartial: function(point, geometry) {
-        if (geometry.getLength() > 0) {
-            geometry = geometry.clone();
-            this.delayedTrigger = window.setTimeout(
-                OpenLayers.Function.bind(function() {
-                    this.measure(geometry, "measurepartial");
-                }, this),
-                this.partialDelay
-            );
-        }
-    },
-
-    /**
-     * Method: measure
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     * eventType - {String}
-     */
-    measure: function(geometry, eventType) {
-        var stat, order;
-        if(geometry.CLASS_NAME.indexOf('LineString') > -1) {
-            stat = this.getBestLength(geometry);
-            order = 1;
-        } else {
-            stat = this.getBestArea(geometry);
-            order = 2;
-        }
-        this.events.triggerEvent(eventType, {
-            measure: stat[0],
-            units: stat[1],
-            order: order,
-            geometry: geometry
-        });
-    },
-    
-    /**
-     * Method: getBestArea
-     * Based on the <displaySystem> returns the area of a geometry.
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     *
-     * Returns:
-     * {Array([Float, String])}  Returns a two item array containing the
-     *     area and the units abbreviation.
-     */
-    getBestArea: function(geometry) {
-        var units = this.displaySystemUnits[this.displaySystem];
-        var unit, area;
-        for(var i=0, len=units.length; i<len; ++i) {
-            unit = units[i];
-            area = this.getArea(geometry, unit);
-            if(area > 1) {
-                break;
-            }
-        }
-        return [area, unit];
-    },
-    
-    /**
-     * Method: getArea
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     * units - {String} Unit abbreviation
-     *
-     * Returns:
-     * {Float} The geometry area in the given units.
-     */
-    getArea: function(geometry, units) {
-        var area, geomUnits;
-        if(this.geodesic) {
-            area = geometry.getGeodesicArea(this.map.getProjectionObject());
-            geomUnits = "m";
-        } else {
-            area = geometry.getArea();
-            geomUnits = this.map.getUnits();
-        }
-        var inPerDisplayUnit = OpenLayers.INCHES_PER_UNIT[units];
-        if(inPerDisplayUnit) {
-            var inPerMapUnit = OpenLayers.INCHES_PER_UNIT[geomUnits];
-            area *= Math.pow((inPerMapUnit / inPerDisplayUnit), 2);
-        }
-        return area;
-    },
-    
-    /**
-     * Method: getBestLength
-     * Based on the <displaySystem> returns the length of a geometry.
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     *
-     * Returns:
-     * {Array([Float, String])}  Returns a two item array containing the
-     *     length and the units abbreviation.
-     */
-    getBestLength: function(geometry) {
-        var units = this.displaySystemUnits[this.displaySystem];
-        var unit, length;
-        for(var i=0, len=units.length; i<len; ++i) {
-            unit = units[i];
-            length = this.getLength(geometry, unit);
-            if(length > 1) {
-                break;
-            }
-        }
-        return [length, unit];
-    },
-
-    /**
-     * Method: getLength
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     * units - {String} Unit abbreviation
-     *
-     * Returns:
-     * {Float} The geometry length in the given units.
-     */
-    getLength: function(geometry, units) {
-        var length, geomUnits;
-        if(this.geodesic) {
-            length = geometry.getGeodesicLength(this.map.getProjectionObject());
-            geomUnits = "m";
-        } else {
-            length = geometry.getLength();
-            geomUnits = this.map.getUnits();
-        }
-        var inPerDisplayUnit = OpenLayers.INCHES_PER_UNIT[units];
-        if(inPerDisplayUnit) {
-            var inPerMapUnit = OpenLayers.INCHES_PER_UNIT[geomUnits];
-            length *= (inPerMapUnit / inPerDisplayUnit);
-        }
-        return length;
-    },
-
-    CLASS_NAME: "OpenLayers.Control.Measure"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/ModifyFeature.js
+++ /dev/null
@@ -1,778 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control/DragFeature.js
- * @requires OpenLayers/Control/SelectFeature.js
- * @requires OpenLayers/Handler/Keyboard.js
- */
-
-/**
- * Class: OpenLayers.Control.ModifyFeature
- * Control to modify features.  When activated, a click renders the vertices
- *     of a feature - these vertices can then be dragged.  By default, the
- *     delete key will delete the vertex under the mouse.  New features are
- *     added by dragging "virtual vertices" between vertices.  Create a new
- *     control with the <OpenLayers.Control.ModifyFeature> constructor.
- *
- * Inherits From:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * APIProperty: geometryTypes
-     * {Array(String)} To restrict modification to a limited set of geometry
-     *     types, send a list of strings corresponding to the geometry class
-     *     names.
-     */
-    geometryTypes: null,
-
-    /**
-     * APIProperty: clickout
-     * {Boolean} Unselect features when clicking outside any feature.
-     *     Default is true.
-     */
-    clickout: true,
-
-    /**
-     * APIProperty: toggle
-     * {Boolean} Unselect a selected feature on click.
-     *      Default is true.
-     */
-    toggle: true,
-    
-    /**
-     * APIProperty: standalone
-     * {Boolean} Set to true to create a control without SelectFeature
-     *     capabilities. Default is false.  If standalone is true, to modify
-     *     a feature, call the <selectFeature> method with the target feature.
-     *     Note that you must call the <unselectFeature> method to finish
-     *     feature modification in standalone mode (before starting to modify
-     *     another feature).
-     */
-    standalone: false,
-
-    /**
-     * Property: layer
-     * {<OpenLayers.Layer.Vector>}
-     */
-    layer: null,
-    
-    /**
-     * Property: feature
-     * {<OpenLayers.Feature.Vector>} Feature currently available for modification.
-     */
-    feature: null,
-    
-    /**
-     * Property: vertices
-     * {Array(<OpenLayers.Feature.Vector>)} Verticies currently available
-     *     for dragging.
-     */
-    vertices: null,
-    
-    /**
-     * Property: virtualVertices
-     * {Array(<OpenLayers.Feature.Vector>)} Virtual vertices in the middle
-     *     of each edge.
-     */
-    virtualVertices: null,
-
-    /**
-     * Property: selectControl
-     * {<OpenLayers.Control.SelectFeature>}
-     */
-    selectControl: null,
-    
-    /**
-     * Property: dragControl
-     * {<OpenLayers.Control.DragFeature>}
-     */
-    dragControl: null,
-    
-    /**
-     * Property: handlers
-     * {Object}
-     */
-    handlers: null,
-    
-    /**
-     * APIProperty: deleteCodes
-     * {Array(Integer)} Keycodes for deleting verticies.  Set to null to disable
-     *     vertex deltion by keypress.  If non-null, keypresses with codes
-     *     in this array will delete vertices under the mouse. Default
-     *     is 46 and 68, the 'delete' and lowercase 'd' keys.
-     */
-    deleteCodes: null,
-
-    /**
-     * APIProperty: virtualStyle
-     * {Object} A symbolizer to be used for virtual vertices.
-     */
-    virtualStyle: null,
-
-    /**
-     * APIProperty: mode
-     * {Integer} Bitfields specifying the modification mode. Defaults to
-     *      OpenLayers.Control.ModifyFeature.RESHAPE. To set the mode to a
-     *      combination of options, use the | operator. For example, to allow
-     *      the control to both resize and rotate features, use the following
-     *      syntax
-     * (code)
-     * control.mode = OpenLayers.Control.ModifyFeature.RESIZE |
-     *                OpenLayers.Control.ModifyFeature.ROTATE;
-     *  (end)
-     */
-    mode: null,
-
-    /**
-     * Property: modified
-     * {Boolean} The currently selected feature has been modified.
-     */
-    modified: false,
-
-    /**
-     * Property: radiusHandle
-     * {<OpenLayers.Feature.Vector>} A handle for rotating/resizing a feature.
-     */
-    radiusHandle: null,
-
-    /**
-     * Property: dragHandle
-     * {<OpenLayers.Feature.Vector>} A handle for dragging a feature.
-     */
-    dragHandle: null,
-
-    /**
-     * APIProperty: onModificationStart 
-     * {Function} *Deprecated*.  Register for "beforefeaturemodified" instead.
-     *     The "beforefeaturemodified" event is triggered on the layer before
-     *     any modification begins.
-     *
-     * Optional function to be called when a feature is selected
-     *     to be modified. The function should expect to be called with a
-     *     feature.  This could be used for example to allow to lock the
-     *     feature on server-side.
-     */
-    onModificationStart: function() {},
-
-    /**
-     * APIProperty: onModification
-     * {Function} *Deprecated*.  Register for "featuremodified" instead.
-     *     The "featuremodified" event is triggered on the layer with each
-     *     feature modification.
-     *
-     * Optional function to be called when a feature has been
-     *     modified.  The function should expect to be called with a feature.
-     */
-    onModification: function() {},
-
-    /**
-     * APIProperty: onModificationEnd
-     * {Function} *Deprecated*.  Register for "afterfeaturemodified" instead.
-     *     The "afterfeaturemodified" event is triggered on the layer after
-     *     a feature has been modified.
-     *
-     * Optional function to be called when a feature is finished 
-     *     being modified.  The function should expect to be called with a
-     *     feature.
-     */
-    onModificationEnd: function() {},
-
-    /**
-     * Constructor: OpenLayers.Control.ModifyFeature
-     * Create a new modify feature control.
-     *
-     * Parameters:
-     * layer - {<OpenLayers.Layer.Vector>} Layer that contains features that
-     *     will be modified.
-     * options - {Object} Optional object whose properties will be set on the
-     *     control.
-     */
-    initialize: function(layer, options) {
-        this.layer = layer;
-        this.vertices = [];
-        this.virtualVertices = [];
-        this.virtualStyle = OpenLayers.Util.extend({},
-            this.layer.style || this.layer.styleMap.createSymbolizer());
-        this.virtualStyle.fillOpacity = 0.3;
-        this.virtualStyle.strokeOpacity = 0.3;
-        this.deleteCodes = [46, 68];
-        this.mode = OpenLayers.Control.ModifyFeature.RESHAPE;
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        if(!(this.deleteCodes instanceof Array)) {
-            this.deleteCodes = [this.deleteCodes];
-        }
-        var control = this;
-
-        // configure the select control
-        var selectOptions = {
-            geometryTypes: this.geometryTypes,
-            clickout: this.clickout,
-            toggle: this.toggle,
-            onBeforeSelect: this.beforeSelectFeature,
-            onSelect: this.selectFeature,
-            onUnselect: this.unselectFeature,
-            scope: this
-        };
-        if(this.standalone === false) {
-            this.selectControl = new OpenLayers.Control.SelectFeature(
-                layer, selectOptions
-            );
-        }
-
-        // configure the drag control
-        var dragOptions = {
-            geometryTypes: ["OpenLayers.Geometry.Point"],
-            snappingOptions: this.snappingOptions,
-            onStart: function(feature, pixel) {
-                control.dragStart.apply(control, [feature, pixel]);
-            },
-            onDrag: function(feature, pixel) {
-                control.dragVertex.apply(control, [feature, pixel]);
-            },
-            onComplete: function(feature) {
-                control.dragComplete.apply(control, [feature]);
-            },
-            featureCallbacks: {
-                over: function(feature) {
-                    /**
-                     * In normal mode, the feature handler is set up to allow
-                     * dragging of all points.  In standalone mode, we only
-                     * want to allow dragging of sketch vertices and virtual
-                     * vertices - or, in the case of a modifiable point, the
-                     * point itself.
-                     */
-                    if(control.standalone !== true || feature._sketch ||
-                       control.feature === feature) {
-                        control.dragControl.overFeature.apply(
-                            control.dragControl, [feature]);
-                    }
-                }
-            }
-        };
-        this.dragControl = new OpenLayers.Control.DragFeature(
-            layer, dragOptions
-        );
-
-        // configure the keyboard handler
-        var keyboardOptions = {
-            keydown: this.handleKeypress
-        };
-        this.handlers = {
-            keyboard: new OpenLayers.Handler.Keyboard(this, keyboardOptions)
-        };
-    },
-
-    /**
-     * APIMethod: destroy
-     * Take care of things that are not handled in superclass.
-     */
-    destroy: function() {
-        this.layer = null;
-        this.standalone || this.selectControl.destroy();
-        this.dragControl.destroy();
-        OpenLayers.Control.prototype.destroy.apply(this, []);
-    },
-
-    /**
-     * APIMethod: activate
-     * Activate the control.
-     * 
-     * Returns:
-     * {Boolean} Successfully activated the control.
-     */
-    activate: function() {
-        return ((this.standalone || this.selectControl.activate()) &&
-                this.handlers.keyboard.activate() &&
-                OpenLayers.Control.prototype.activate.apply(this, arguments));
-    },
-
-    /**
-     * APIMethod: deactivate
-     * Deactivate the control.
-     *
-     * Returns: 
-     * {Boolean} Successfully deactivated the control.
-     */
-    deactivate: function() {
-        var deactivated = false;
-        // the return from the controls is unimportant in this case
-        if(OpenLayers.Control.prototype.deactivate.apply(this, arguments)) {
-            this.layer.removeFeatures(this.vertices, {silent: true});
-            this.layer.removeFeatures(this.virtualVertices, {silent: true});
-            this.vertices = [];
-            this.dragControl.deactivate();
-            var feature = this.feature;
-            var valid = feature && feature.geometry && feature.layer;
-            if(this.standalone === false) {
-                if(valid) {
-                    this.selectControl.unselect.apply(this.selectControl,
-                                                      [feature]);
-                }
-                this.selectControl.deactivate();
-            } else {
-                if(valid) {
-                    this.unselectFeature(feature);
-                }
-            }
-            this.handlers.keyboard.deactivate();
-            deactivated = true;
-        }
-        return deactivated;
-    },
-    
-    /**
-     * Method: beforeSelectFeature
-     * Called before a feature is selected.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} The feature about to be selected.
-     */
-    beforeSelectFeature: function(feature) {
-        return this.layer.events.triggerEvent(
-            "beforefeaturemodified", {feature: feature}
-        );
-    },
-
-    /**
-     * Method: selectFeature
-     * Called when the select feature control selects a feature.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} the selected feature.
-     */
-    selectFeature: function(feature) {
-        this.feature = feature;
-        this.modified = false;
-        this.resetVertices();
-        this.dragControl.activate();
-        this.onModificationStart(this.feature);
-    },
-
-    /**
-     * Method: unselectFeature
-     * Called when the select feature control unselects a feature.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} The unselected feature.
-     */
-    unselectFeature: function(feature) {
-        this.layer.removeFeatures(this.vertices, {silent: true});
-        this.vertices = [];
-        this.layer.destroyFeatures(this.virtualVertices, {silent: true});
-        this.virtualVertices = [];
-        if(this.dragHandle) {
-            this.layer.destroyFeatures([this.dragHandle], {silent: true});
-            delete this.dragHandle;
-        }
-        if(this.radiusHandle) {
-            this.layer.destroyFeatures([this.radiusHandle], {silent: true});
-            delete this.radiusHandle;
-        }
-        this.feature = null;
-        this.dragControl.deactivate();
-        this.onModificationEnd(feature);
-        this.layer.events.triggerEvent("afterfeaturemodified", {
-            feature: feature,
-            modified: this.modified
-        });
-        this.modified = false;
-    },
-
-    /**
-     * Method: dragStart
-     * Called by the drag feature control with before a feature is dragged.
-     *     This method is used to differentiate between points and vertices
-     *     of higher order geometries.  This respects the <geometryTypes>
-     *     property and forces a select of points when the drag control is
-     *     already active (and stops events from propagating to the select
-     *     control).
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} The point or vertex about to be
-     *     dragged.
-     * pixel - {<OpenLayers.Pixel>} Pixel location of the mouse event.
-     */
-    dragStart: function(feature, pixel) {
-        // only change behavior if the feature is not in the vertices array
-        if(feature != this.feature && !feature.geometry.parent &&
-           feature != this.dragHandle && feature != this.radiusHandle) {
-            if(this.standalone === false && this.feature) {
-                // unselect the currently selected feature
-                this.selectControl.clickFeature.apply(this.selectControl,
-                                                      [this.feature]);
-            }
-            // check any constraints on the geometry type
-            if(this.geometryTypes == null ||
-               OpenLayers.Util.indexOf(this.geometryTypes,
-                                       feature.geometry.CLASS_NAME) != -1) {
-                // select the point
-                this.standalone || this.selectControl.clickFeature.apply(
-                                            this.selectControl, [feature]);
-                /**
-                 * TBD: These lines improve workflow by letting the user
-                 *     immediately start dragging after the mouse down.
-                 *     However, it is very ugly to be messing with controls
-                 *     and their handlers in this way.  I'd like a better
-                 *     solution if the workflow change is necessary.
-                 */
-                // prepare the point for dragging
-                this.dragControl.overFeature.apply(this.dragControl,
-                                                   [feature]);
-                this.dragControl.lastPixel = pixel;
-                this.dragControl.handlers.drag.started = true;
-                this.dragControl.handlers.drag.start = pixel;
-                this.dragControl.handlers.drag.last = pixel;
-            }
-        }
-    },
-    
-    /**
-     * Method: dragVertex
-     * Called by the drag feature control with each drag move of a vertex.
-     *
-     * Parameters:
-     * vertex - {<OpenLayers.Feature.Vector>} The vertex being dragged.
-     * pixel - {<OpenLayers.Pixel>} Pixel location of the mouse event.
-     */
-    dragVertex: function(vertex, pixel) {
-        this.modified = true;
-        /**
-         * Five cases:
-         * 1) dragging a simple point
-         * 2) dragging a virtual vertex
-         * 3) dragging a drag handle
-         * 4) dragging a real vertex
-         * 5) dragging a radius handle
-         */
-        if(this.feature.geometry.CLASS_NAME == "OpenLayers.Geometry.Point") {
-            // dragging a simple point
-            if(this.feature != vertex) {
-                this.feature = vertex;
-            }
-            this.layer.events.triggerEvent("vertexmodified", {
-                vertex: vertex.geometry,
-                feature: this.feature,
-                pixel: pixel
-            });
-        } else {
-            if(vertex._index) {
-                // dragging a virtual vertex
-                vertex.geometry.parent.addComponent(vertex.geometry,
-                                                    vertex._index);
-                // move from virtual to real vertex
-                delete vertex._index;
-                OpenLayers.Util.removeItem(this.virtualVertices, vertex);
-                this.vertices.push(vertex);
-            } else if(vertex == this.dragHandle) {
-                // dragging a drag handle
-                this.layer.removeFeatures(this.vertices, {silent: true});
-                this.vertices = [];
-                if(this.radiusHandle) {
-                    this.layer.destroyFeatures([this.radiusHandle], {silent: true});
-                    this.radiusHandle = null;
-                }
-            } else if(vertex !== this.radiusHandle) {
-                // dragging a real vertex
-                this.layer.events.triggerEvent("vertexmodified", {
-                    vertex: vertex.geometry,
-                    feature: this.feature,
-                    pixel: pixel
-                });
-            }
-            // dragging a radius handle - no special treatment
-            if(this.virtualVertices.length > 0) {
-                this.layer.destroyFeatures(this.virtualVertices, {silent: true});
-                this.virtualVertices = [];
-            }
-            this.layer.drawFeature(this.feature, this.standalone ? undefined :
-                                            this.selectControl.renderIntent);
-        }
-        // keep the vertex on top so it gets the mouseout after dragging
-        // this should be removed in favor of an option to draw under or
-        // maintain node z-index
-        this.layer.drawFeature(vertex);
-    },
-    
-    /**
-     * Method: dragComplete
-     * Called by the drag feature control when the feature dragging is complete.
-     *
-     * Parameters:
-     * vertex - {<OpenLayers.Feature.Vector>} The vertex being dragged.
-     */
-    dragComplete: function(vertex) {
-        this.resetVertices();
-        this.setFeatureState();
-        this.onModification(this.feature);
-        this.layer.events.triggerEvent("featuremodified", 
-                                       {feature: this.feature});
-    },
-    
-    /**
-     * Method: setFeatureState
-     * Called when the feature is modified.  If the current state is not
-     *     INSERT or DELETE, the state is set to UPDATE.
-     */
-    setFeatureState: function() {
-        if(this.feature.state != OpenLayers.State.INSERT &&
-           this.feature.state != OpenLayers.State.DELETE) {
-            this.feature.state = OpenLayers.State.UPDATE;
-        }
-    },
-    
-    /**
-     * Method: resetVertices
-     */
-    resetVertices: function() {
-        // if coming from a drag complete we're about to destroy the vertex
-        // that was just dragged. For that reason, the drag feature control
-        // will never detect a mouse-out on that vertex, meaning that the drag
-        // handler won't be deactivated. This can cause errors because the drag
-        // feature control still has a feature to drag but that feature is
-        // destroyed. To prevent this, we call outFeature on the drag feature
-        // control if the control actually has a feature to drag.
-        if(this.dragControl.feature) {
-            this.dragControl.outFeature(this.dragControl.feature);
-        }
-        if(this.vertices.length > 0) {
-            this.layer.removeFeatures(this.vertices, {silent: true});
-            this.vertices = [];
-        }
-        if(this.virtualVertices.length > 0) {
-            this.layer.removeFeatures(this.virtualVertices, {silent: true});
-            this.virtualVertices = [];
-        }
-        if(this.dragHandle) {
-            this.layer.destroyFeatures([this.dragHandle], {silent: true});
-            this.dragHandle = null;
-        }
-        if(this.radiusHandle) {
-            this.layer.destroyFeatures([this.radiusHandle], {silent: true});
-            this.radiusHandle = null;
-        }
-        if(this.feature &&
-           this.feature.geometry.CLASS_NAME != "OpenLayers.Geometry.Point") {
-            if((this.mode & OpenLayers.Control.ModifyFeature.DRAG)) {
-                this.collectDragHandle();
-            }
-            if((this.mode & (OpenLayers.Control.ModifyFeature.ROTATE |
-                             OpenLayers.Control.ModifyFeature.RESIZE))) {
-                this.collectRadiusHandle();
-            }
-            if(this.mode & OpenLayers.Control.ModifyFeature.RESHAPE){
-                // Don't collect vertices when we're resizing
-                if (!(this.mode & OpenLayers.Control.ModifyFeature.RESIZE)){
-                    this.collectVertices();
-                }
-            }
-        }
-    },
-    
-    /**
-     * Method: handleKeypress
-     * Called by the feature handler on keypress.  This is used to delete
-     *     vertices. If the <deleteCode> property is set, vertices will
-     *     be deleted when a feature is selected for modification and
-     *     the mouse is over a vertex.
-     *
-     * Parameters:
-     * {Integer} Key code corresponding to the keypress event.
-     */
-    handleKeypress: function(evt) {
-        var code = evt.keyCode;
-        
-        // check for delete key
-        if(this.feature &&
-           OpenLayers.Util.indexOf(this.deleteCodes, code) != -1) {
-            var vertex = this.dragControl.feature;
-            if(vertex &&
-               OpenLayers.Util.indexOf(this.vertices, vertex) != -1 &&
-               !this.dragControl.handlers.drag.dragging &&
-               vertex.geometry.parent) {
-                // remove the vertex
-                vertex.geometry.parent.removeComponent(vertex.geometry);
-                this.layer.drawFeature(this.feature, this.standalone ?
-                                       undefined :
-                                       this.selectControl.renderIntent);
-                this.resetVertices();
-                this.setFeatureState();
-                this.onModification(this.feature);
-                this.layer.events.triggerEvent("featuremodified", 
-                                               {feature: this.feature});
-            }
-        }
-    },
-
-    /**
-     * Method: collectVertices
-     * Collect the vertices from the modifiable feature's geometry and push
-     *     them on to the control's vertices array.
-     */
-    collectVertices: function() {
-        this.vertices = [];
-        this.virtualVertices = [];        
-        var control = this;
-        function collectComponentVertices(geometry) {
-            var i, vertex, component, len;
-            if(geometry.CLASS_NAME == "OpenLayers.Geometry.Point") {
-                vertex = new OpenLayers.Feature.Vector(geometry);
-                vertex._sketch = true;
-                control.vertices.push(vertex);
-            } else {
-                var numVert = geometry.components.length;
-                if(geometry.CLASS_NAME == "OpenLayers.Geometry.LinearRing") {
-                    numVert -= 1;
-                }
-                for(i=0; i<numVert; ++i) {
-                    component = geometry.components[i];
-                    if(component.CLASS_NAME == "OpenLayers.Geometry.Point") {
-                        vertex = new OpenLayers.Feature.Vector(component);
-                        vertex._sketch = true;
-                        control.vertices.push(vertex);
-                    } else {
-                        collectComponentVertices(component);
-                    }
-                }
-                
-                // add virtual vertices in the middle of each edge
-                if(geometry.CLASS_NAME != "OpenLayers.Geometry.MultiPoint") {
-                    for(i=0, len=geometry.components.length; i<len-1; ++i) {
-                        var prevVertex = geometry.components[i];
-                        var nextVertex = geometry.components[i + 1];
-                        if(prevVertex.CLASS_NAME == "OpenLayers.Geometry.Point" &&
-                           nextVertex.CLASS_NAME == "OpenLayers.Geometry.Point") {
-                            var x = (prevVertex.x + nextVertex.x) / 2;
-                            var y = (prevVertex.y + nextVertex.y) / 2;
-                            var point = new OpenLayers.Feature.Vector(
-                                new OpenLayers.Geometry.Point(x, y),
-                                null, control.virtualStyle
-                            );
-                            // set the virtual parent and intended index
-                            point.geometry.parent = geometry;
-                            point._index = i + 1;
-                            point._sketch = true;
-                            control.virtualVertices.push(point);
-                        }
-                    }
-                }
-            }
-        }
-        collectComponentVertices.call(this, this.feature.geometry);
-        this.layer.addFeatures(this.virtualVertices, {silent: true});
-        this.layer.addFeatures(this.vertices, {silent: true});
-    },
-
-    /**
-     * Method: collectDragHandle
-     * Collect the drag handle for the selected geometry.
-     */
-    collectDragHandle: function() {
-        var geometry = this.feature.geometry;
-        var center = geometry.getBounds().getCenterLonLat();
-        var originGeometry = new OpenLayers.Geometry.Point(
-            center.lon, center.lat
-        );
-        var origin = new OpenLayers.Feature.Vector(originGeometry);
-        originGeometry.move = function(x, y) {
-            OpenLayers.Geometry.Point.prototype.move.call(this, x, y);
-            geometry.move(x, y);
-        };
-        origin._sketch = true;
-        this.dragHandle = origin;
-        this.layer.addFeatures([this.dragHandle], {silent: true});
-    },
-
-    /**
-     * Method: collectRadiusHandle
-     * Collect the radius handle for the selected geometry.
-     */
-    collectRadiusHandle: function() {
-        var geometry = this.feature.geometry;
-        var bounds = geometry.getBounds();
-        var center = bounds.getCenterLonLat();
-        var originGeometry = new OpenLayers.Geometry.Point(
-            center.lon, center.lat
-        );
-        var radiusGeometry = new OpenLayers.Geometry.Point(
-            bounds.right, bounds.bottom
-        );
-        var radius = new OpenLayers.Feature.Vector(radiusGeometry);
-        var resize = (this.mode & OpenLayers.Control.ModifyFeature.RESIZE);
-        var reshape = (this.mode & OpenLayers.Control.ModifyFeature.RESHAPE);
-        var rotate = (this.mode & OpenLayers.Control.ModifyFeature.ROTATE);
-
-        radiusGeometry.move = function(x, y) {
-            OpenLayers.Geometry.Point.prototype.move.call(this, x, y);
-            var dx1 = this.x - originGeometry.x;
-            var dy1 = this.y - originGeometry.y;
-            var dx0 = dx1 - x;
-            var dy0 = dy1 - y;
-            if(rotate) {
-                var a0 = Math.atan2(dy0, dx0);
-                var a1 = Math.atan2(dy1, dx1);
-                var angle = a1 - a0;
-                angle *= 180 / Math.PI;
-                geometry.rotate(angle, originGeometry);
-            }
-            if(resize) {
-                var scale, ratio;
-                // 'resize' together with 'reshape' implies that the aspect 
-                // ratio of the geometry will not be preserved whilst resizing 
-                if (reshape) {
-                    scale = dy1 / dy0;
-                    ratio = (dx1 / dx0) / scale;
-                } else {
-                    var l0 = Math.sqrt((dx0 * dx0) + (dy0 * dy0));
-                    var l1 = Math.sqrt((dx1 * dx1) + (dy1 * dy1));
-                    scale = l1 / l0;
-                }
-                geometry.resize(scale, originGeometry, ratio);
-            }
-        };
-        radius._sketch = true;
-        this.radiusHandle = radius;
-        this.layer.addFeatures([this.radiusHandle], {silent: true});
-    },
-
-    /**
-     * Method: setMap
-     * Set the map property for the control and all handlers.
-     *
-     * Parameters:
-     * map - {<OpenLayers.Map>} The control's map.
-     */
-    setMap: function(map) {
-        this.standalone || this.selectControl.setMap(map);
-        this.dragControl.setMap(map);
-        OpenLayers.Control.prototype.setMap.apply(this, arguments);
-    },
-
-    CLASS_NAME: "OpenLayers.Control.ModifyFeature"
-});
-
-/**
- * Constant: RESHAPE
- * {Integer} Constant used to make the control work in reshape mode
- */
-OpenLayers.Control.ModifyFeature.RESHAPE = 1;
-/**
- * Constant: RESIZE
- * {Integer} Constant used to make the control work in resize mode
- */
-OpenLayers.Control.ModifyFeature.RESIZE = 2;
-/**
- * Constant: ROTATE
- * {Integer} Constant used to make the control work in rotate mode
- */
-OpenLayers.Control.ModifyFeature.ROTATE = 4;
-/**
- * Constant: DRAG
- * {Integer} Constant used to make the control work in drag mode
- */
-OpenLayers.Control.ModifyFeature.DRAG = 8;
-

--- a/labs/openlayers/lib/OpenLayers/Control/MouseDefaults.js
+++ /dev/null
@@ -1,369 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- */
-
-/**
- * Class: OpenLayers.Control.MouseDefaults
- * This class is DEPRECATED in 2.4 and will be removed by 3.0.
- * If you need this functionality, use <OpenLayers.Control.Navigation> 
- * instead!!!
- *
- * This class is DEPRECATED in 2.4 and will be removed by 3.0.
- *     If you need this functionality, use Control.Navigation instead!!!
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.MouseDefaults = OpenLayers.Class(OpenLayers.Control, {
-
-    /** WARNING WARNING WARNING!!!
-        This class is DEPRECATED in 2.4 and will be removed by 3.0.
-        If you need this functionality, use Control.Navigation instead!!! */
-
-    /** 
-     * Property: performedDrag
-     * {Boolean}
-     */
-    performedDrag: false,
-
-    /** 
-     * Property: wheelObserver 
-     * {Function}
-     */
-    wheelObserver: null,
-
-    /** 
-     * Constructor: OpenLayers.Control.MouseDefaults
-     */
-    initialize: function() {
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-    },
-
-    /**
-     * APIMethod: destroy
-     */    
-    destroy: function() {
-        
-        if (this.handler) {
-            this.handler.destroy();
-        }
-        this.handler = null;
-
-        this.map.events.un({
-            "click": this.defaultClick,
-            "dblclick": this.defaultDblClick,
-            "mousedown": this.defaultMouseDown,
-            "mouseup": this.defaultMouseUp,
-            "mousemove": this.defaultMouseMove,
-            "mouseout": this.defaultMouseOut,
-            scope: this
-        });
-
-        //unregister mousewheel events specifically on the window and document
-        OpenLayers.Event.stopObserving(window, "DOMMouseScroll", 
-                                        this.wheelObserver);
-        OpenLayers.Event.stopObserving(window, "mousewheel", 
-                                        this.wheelObserver);
-        OpenLayers.Event.stopObserving(document, "mousewheel", 
-                                        this.wheelObserver);
-        this.wheelObserver = null;
-                      
-        OpenLayers.Control.prototype.destroy.apply(this, arguments);        
-    },
-
-    /**
-     * Method: draw
-     */
-    draw: function() {
-        this.map.events.on({
-            "click": this.defaultClick,
-            "dblclick": this.defaultDblClick,
-            "mousedown": this.defaultMouseDown,
-            "mouseup": this.defaultMouseUp,
-            "mousemove": this.defaultMouseMove,
-            "mouseout": this.defaultMouseOut,
-            scope: this
-        });
-
-        this.registerWheelEvents();
-
-    },
-
-    /**
-     * Method: registerWheelEvents
-     */
-    registerWheelEvents: function() {
-
-        this.wheelObserver = OpenLayers.Function.bindAsEventListener(
-            this.onWheelEvent, this
-        );
-        
-        //register mousewheel events specifically on the window and document
-        OpenLayers.Event.observe(window, "DOMMouseScroll", this.wheelObserver);
-        OpenLayers.Event.observe(window, "mousewheel", this.wheelObserver);
-        OpenLayers.Event.observe(document, "mousewheel", this.wheelObserver);
-    },
-
-    /**
-     * Method: defaultClick
-     * 
-     * Parameters:
-     * evt - {Event} 
-     *
-     * Returns:
-     * {Boolean}
-     */
-    defaultClick: function (evt) {
-        if (!OpenLayers.Event.isLeftClick(evt)) {
-            return;
-        }
-        var notAfterDrag = !this.performedDrag;
-        this.performedDrag = false;
-        return notAfterDrag;
-    },
-
-    /**
-     * Method: defaultDblClick
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    defaultDblClick: function (evt) {
-        var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); 
-        this.map.setCenter(newCenter, this.map.zoom + 1);
-        OpenLayers.Event.stop(evt);
-        return false;
-    },
-
-    /**
-     * Method: defaultMouseDown
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    defaultMouseDown: function (evt) {
-        if (!OpenLayers.Event.isLeftClick(evt)) {
-            return;
-        }
-        this.mouseDragStart = evt.xy.clone();
-        this.performedDrag  = false;
-        if (evt.shiftKey) {
-            this.map.div.style.cursor = "crosshair";
-            this.zoomBox = OpenLayers.Util.createDiv('zoomBox',
-                                                     this.mouseDragStart,
-                                                     null,
-                                                     null,
-                                                     "absolute",
-                                                     "2px solid red");
-            this.zoomBox.style.backgroundColor = "white";
-            this.zoomBox.style.filter = "alpha(opacity=50)"; // IE
-            this.zoomBox.style.opacity = "0.50";
-            this.zoomBox.style.fontSize = "1px";
-            this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
-            this.map.viewPortDiv.appendChild(this.zoomBox);
-        }
-        document.onselectstart = OpenLayers.Function.False;
-        OpenLayers.Event.stop(evt);
-    },
-
-    /**
-     * Method: defaultMouseMove
-     *
-     * Parameters:
-     * evt - {Event} 
-     */
-    defaultMouseMove: function (evt) {
-        // record the mouse position, used in onWheelEvent
-        this.mousePosition = evt.xy.clone();
-
-        if (this.mouseDragStart != null) {
-            if (this.zoomBox) {
-                var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x);
-                var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y);
-                this.zoomBox.style.width = Math.max(1, deltaX) + "px";
-                this.zoomBox.style.height = Math.max(1, deltaY) + "px";
-                if (evt.xy.x < this.mouseDragStart.x) {
-                    this.zoomBox.style.left = evt.xy.x+"px";
-                }
-                if (evt.xy.y < this.mouseDragStart.y) {
-                    this.zoomBox.style.top = evt.xy.y+"px";
-                }
-            } else {
-                var deltaX = this.mouseDragStart.x - evt.xy.x;
-                var deltaY = this.mouseDragStart.y - evt.xy.y;
-                var size = this.map.getSize();
-                var newXY = new OpenLayers.Pixel(size.w / 2 + deltaX,
-                                                 size.h / 2 + deltaY);
-                var newCenter = this.map.getLonLatFromViewPortPx( newXY ); 
-                this.map.setCenter(newCenter, null, true);
-                this.mouseDragStart = evt.xy.clone();
-                this.map.div.style.cursor = "move";
-            }
-            this.performedDrag = true;
-        }
-    },
-
-    /**
-     * Method: defaultMouseUp
-     * 
-     * Parameters:
-     * evt - {<OpenLayers.Event>} 
-     */
-    defaultMouseUp: function (evt) {
-        if (!OpenLayers.Event.isLeftClick(evt)) {
-            return;
-        }
-        if (this.zoomBox) {
-            this.zoomBoxEnd(evt);    
-        } else {
-            if (this.performedDrag) {
-                this.map.setCenter(this.map.center);
-            }
-        }
-        document.onselectstart=null;
-        this.mouseDragStart = null;
-        this.map.div.style.cursor = "";
-    },
-
-    /**
-     * Method: defaultMouseOut
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    defaultMouseOut: function (evt) {
-        if (this.mouseDragStart != null && 
-            OpenLayers.Util.mouseLeft(evt, this.map.div)) {
-            if (this.zoomBox) {
-                this.removeZoomBox();
-            }
-            this.mouseDragStart = null;
-        }
-    },
-
-
-    /** 
-     * Method: defaultWheelUp
-     * User spun scroll wheel up
-     * 
-     */
-    defaultWheelUp: function(evt) {
-        if (this.map.getZoom() <= this.map.getNumZoomLevels()) {
-            this.map.setCenter(this.map.getLonLatFromPixel(evt.xy),
-                               this.map.getZoom() + 1);
-        }
-    },
-
-    /**
-     * Method: defaultWheelDown
-     * User spun scroll wheel down
-     */
-    defaultWheelDown: function(evt) {
-        if (this.map.getZoom() > 0) {
-            this.map.setCenter(this.map.getLonLatFromPixel(evt.xy),
-                               this.map.getZoom() - 1);
-        }
-    },
-
-    /**
-     * Method: zoomBoxEnd
-     * Zoombox function. 
-     */
-    zoomBoxEnd: function(evt) {
-        if (this.mouseDragStart != null) {
-            if (Math.abs(this.mouseDragStart.x - evt.xy.x) > 5 ||    
-                Math.abs(this.mouseDragStart.y - evt.xy.y) > 5) {   
-                var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart ); 
-                var end = this.map.getLonLatFromViewPortPx( evt.xy );
-                var top = Math.max(start.lat, end.lat);
-                var bottom = Math.min(start.lat, end.lat);
-                var left = Math.min(start.lon, end.lon);
-                var right = Math.max(start.lon, end.lon);
-                var bounds = new OpenLayers.Bounds(left, bottom, right, top);
-                this.map.zoomToExtent(bounds);
-            } else {
-                var end = this.map.getLonLatFromViewPortPx( evt.xy );
-                this.map.setCenter(new OpenLayers.LonLat(
-                  (end.lon),
-                  (end.lat)
-                 ), this.map.getZoom() + 1);
-            }    
-            this.removeZoomBox();
-       }
-    },
-
-    /**
-     * Method: removeZoomBox
-     * Remove the zoombox from the screen and nullify our reference to it.
-     */
-    removeZoomBox: function() {
-        this.map.viewPortDiv.removeChild(this.zoomBox);
-        this.zoomBox = null;
-    },
-
-
-/**
- *  Mouse ScrollWheel code thanks to http://adomas.org/javascript-mouse-wheel/
- */
-
-
-    /**
-     * Method: onWheelEvent
-     * Catch the wheel event and handle it xbrowserly
-     *
-     * Parameters: 
-     * e - {Event} 
-     */
-    onWheelEvent: function(e){
-    
-        // first determine whether or not the wheeling was inside the map
-        var inMap = false;
-        var elem = OpenLayers.Event.element(e);
-        while(elem != null) {
-            if (this.map && elem == this.map.div) {
-                inMap = true;
-                break;
-            }
-            elem = elem.parentNode;
-        }
-        
-        if (inMap) {
-            
-            var delta = 0;
-            if (!e) {
-                e = window.event;
-            }
-            if (e.wheelDelta) {
-                delta = e.wheelDelta/120; 
-                if (window.opera && window.opera.version() < 9.2) {
-                    delta = -delta;
-                }
-            } else if (e.detail) {
-                delta = -e.detail / 3;
-            }
-            if (delta) {
-                // add the mouse position to the event because mozilla has a bug
-                // with clientX and clientY (see https://bugzilla.mozilla.org/show_bug.cgi?id=352179)
-                // getLonLatFromViewPortPx(e) returns wrong values
-                e.xy = this.mousePosition;
-
-                if (delta < 0) {
-                   this.defaultWheelDown(e);
-                } else {
-                   this.defaultWheelUp(e);
-                }
-            }
-            
-            //only wheel the map, not the window
-            OpenLayers.Event.stop(e);
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Control.MouseDefaults"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/MousePosition.js
+++ /dev/null
@@ -1,214 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Control.js
- */
-
-/**
- * Class: OpenLayers.Control.MousePosition
- * The MousePosition control displays geographic coordinates of the mouse
- * pointer, as it is moved about the map.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.MousePosition = OpenLayers.Class(OpenLayers.Control, {
-    
-    /**
-     * APIProperty: autoActivate
-     * {Boolean} Activate the control when it is added to a map.  Default is
-     *     true.
-     */
-    autoActivate: true,
-
-    /** 
-     * Property: element
-     * {DOMElement} 
-     */
-    element: null,
-    
-    /** 
-     * APIProperty: prefix
-     * {String}
-     */
-    prefix: '',
-    
-    /** 
-     * APIProperty: separator
-     * {String}
-     */
-    separator: ', ',
-    
-    /** 
-     * APIProperty: suffix
-     * {String}
-     */
-    suffix: '',
-    
-    /** 
-     * APIProperty: numDigits
-     * {Integer}
-     */
-    numDigits: 5,
-    
-    /** 
-     * APIProperty: granularity
-     * {Integer} 
-     */
-    granularity: 10,
-
-    /**
-     * APIProperty: emptyString 
-     * {String} Set this to some value to set when the mouse is outside the
-     *     map.
-     */
-    emptyString: null,
-    
-    /** 
-     * Property: lastXy
-     * {<OpenLayers.Pixel>}
-     */
-    lastXy: null,
-
-    /**
-     * APIProperty: displayProjection
-     * {<OpenLayers.Projection>} The projection in which the 
-     * mouse position is displayed
-     */
-    displayProjection: null, 
-    
-    /**
-     * Constructor: OpenLayers.Control.MousePosition
-     * 
-     * Parameters:
-     * options - {Object} Options for control.
-     */
-    initialize: function(options) {
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-    },
-
-    /**
-     * Method: destroy
-     */
-     destroy: function() {
-         this.deactivate();
-         OpenLayers.Control.prototype.destroy.apply(this, arguments);
-     },
-
-    /**
-     * APIMethod: activate
-     */
-    activate: function() {
-        if (OpenLayers.Control.prototype.activate.apply(this, arguments)) {
-            this.map.events.register('mousemove', this, this.redraw);
-            this.map.events.register('mouseout', this, this.reset);
-            this.redraw();
-            return true;
-        } else {
-            return false;
-        }
-    },
-    
-    /**
-     * APIMethod: deactivate
-     */
-    deactivate: function() {
-        if (OpenLayers.Control.prototype.deactivate.apply(this, arguments)) {
-            this.map.events.unregister('mousemove', this, this.redraw);
-            this.map.events.unregister('mouseout', this, this.reset);
-            this.element.innerHTML = "";
-            return true;
-        } else {
-            return false;
-        }
-    },
-
-    /**
-     * Method: draw
-     * {DOMElement}
-     */    
-    draw: function() {
-        OpenLayers.Control.prototype.draw.apply(this, arguments);
-
-        if (!this.element) {
-            this.div.left = "";
-            this.div.top = "";
-            this.element = this.div;
-        }
-        
-        return this.div;
-    },
-   
-    /**
-     * Method: redraw  
-     */
-    redraw: function(evt) {
-
-        var lonLat;
-
-        if (evt == null) {
-            this.reset();
-            return;
-        } else {
-            if (this.lastXy == null ||
-                Math.abs(evt.xy.x - this.lastXy.x) > this.granularity ||
-                Math.abs(evt.xy.y - this.lastXy.y) > this.granularity)
-            {
-                this.lastXy = evt.xy;
-                return;
-            }
-
-            lonLat = this.map.getLonLatFromPixel(evt.xy);
-            if (!lonLat) { 
-                // map has not yet been properly initialized
-                return;
-            }    
-            if (this.displayProjection) {
-                lonLat.transform(this.map.getProjectionObject(), 
-                                 this.displayProjection );
-            }      
-            this.lastXy = evt.xy;
-            
-        }
-        
-        var newHtml = this.formatOutput(lonLat);
-
-        if (newHtml != this.element.innerHTML) {
-            this.element.innerHTML = newHtml;
-        }
-    },
-
-    /**
-     * Method: reset
-     */
-    reset: function(evt) {
-        if (this.emptyString != null) {
-            this.element.innerHTML = this.emptyString;
-        }
-    },
-
-    /**
-     * Method: formatOutput
-     * Override to provide custom display output
-     *
-     * Parameters:
-     * lonLat - {<OpenLayers.LonLat>} Location to display
-     */
-    formatOutput: function(lonLat) {
-        var digits = parseInt(this.numDigits);
-        var newHtml =
-            this.prefix +
-            lonLat.lon.toFixed(digits) +
-            this.separator + 
-            lonLat.lat.toFixed(digits) +
-            this.suffix;
-        return newHtml;
-    },
-
-    CLASS_NAME: "OpenLayers.Control.MousePosition"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/MouseToolbar.js
+++ /dev/null
@@ -1,407 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Control/MouseDefaults.js
- */
-
-/**
- * Class: OpenLayers.Control.MouseToolbar
- * This class is DEPRECATED in 2.4 and will be removed by 3.0.
- * If you need this functionality, use <OpenLayers.Control.NavToolbar>
- * instead!!! 
- */
-OpenLayers.Control.MouseToolbar = OpenLayers.Class(
-                                            OpenLayers.Control.MouseDefaults, {
-    
-    /**
-     * Property: mode
-     */ 
-    mode: null,
-    /**
-     * Property: buttons
-     */
-    buttons: null,
-    
-    /**
-     * APIProperty: direction
-     * {String} 'vertical' or 'horizontal'
-     */
-    direction: "vertical",
-    
-    /**
-     * Property: buttonClicked
-     * {String}
-     */
-    buttonClicked: null,
-    
-    /**
-     * Constructor: OpenLayers.Control.MouseToolbar
-     *
-     * Parameters:
-     * position - {<OpenLayers.Pixel>}
-     * direction - {String}
-     */
-    initialize: function(position, direction) {
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-        this.position = new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,
-                                             OpenLayers.Control.MouseToolbar.Y);
-        if (position) {
-            this.position = position;
-        }
-        if (direction) {
-            this.direction = direction; 
-        }
-        this.measureDivs = [];
-    },
-    
-    /**
-     * APIMethod: destroy 
-     */
-    destroy: function() {
-        for( var btnId in this.buttons) {
-            var btn = this.buttons[btnId];
-            btn.map = null;
-            btn.events.destroy();
-        }
-        OpenLayers.Control.MouseDefaults.prototype.destroy.apply(this, 
-                                                                 arguments);
-    },
-    
-    /**
-     * Method: draw
-     */
-    draw: function() {
-        OpenLayers.Control.prototype.draw.apply(this, arguments); 
-        OpenLayers.Control.MouseDefaults.prototype.draw.apply(this, arguments);
-        this.buttons = {};
-        var sz = new OpenLayers.Size(28,28);
-        var centered = new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,0);
-        this._addButton("zoombox", "drag-rectangle-off.png", "drag-rectangle-on.png", centered, sz, "Shift->Drag to zoom to area");
-        centered = centered.add((this.direction == "vertical" ? 0 : sz.w), (this.direction == "vertical" ? sz.h : 0));
-        this._addButton("pan", "panning-hand-off.png", "panning-hand-on.png", centered, sz, "Drag the map to pan.");
-        centered = centered.add((this.direction == "vertical" ? 0 : sz.w), (this.direction == "vertical" ? sz.h : 0));
-        this.switchModeTo("pan");
-
-        return this.div;
-    },
-    
-    /**
-     * Method: _addButton
-     */
-    _addButton:function(id, img, activeImg, xy, sz, title) {
-        var imgLocation = OpenLayers.Util.getImagesLocation() + img;
-        var activeImgLocation = OpenLayers.Util.getImagesLocation() + activeImg;
-        // var btn = new ol.AlphaImage("_"+id, imgLocation, xy, sz);
-        var btn = OpenLayers.Util.createAlphaImageDiv(
-                                    "OpenLayers_Control_MouseToolbar_" + id, 
-                                    xy, sz, imgLocation, "absolute");
-
-        //we want to add the outer div
-        this.div.appendChild(btn);
-        btn.imgLocation = imgLocation;
-        btn.activeImgLocation = activeImgLocation;
-        
-        btn.events = new OpenLayers.Events(this, btn, null, true);
-        btn.events.on({
-            "mousedown": this.buttonDown,
-            "mouseup": this.buttonUp,
-            "dblclick": OpenLayers.Event.stop,
-            scope: this
-        });
-        btn.action = id;
-        btn.title = title;
-        btn.alt = title;
-        btn.map = this.map;
-
-        //we want to remember/reference the outer div
-        this.buttons[id] = btn;
-        return btn;
-    },
-
-    /**
-     * Method: buttonDown
-     *
-     * Parameters:
-     * evt - {Event} 
-     */
-    buttonDown: function(evt) {
-        if (!OpenLayers.Event.isLeftClick(evt)) {
-            return;
-        }
-        this.buttonClicked = evt.element.action;
-        OpenLayers.Event.stop(evt);
-    },
-
-    /**
-     * Method: buttonUp
-     *
-     * Parameters:
-     * evt - {Event} 
-     */
-    buttonUp: function(evt) {
-        if (!OpenLayers.Event.isLeftClick(evt)) {
-            return;
-        }
-        if (this.buttonClicked != null) {
-            if (this.buttonClicked == evt.element.action) {
-                this.switchModeTo(evt.element.action);
-            }
-            OpenLayers.Event.stop(evt);
-            this.buttonClicked = null;
-        }
-    },
-    
-    /**
-     * Method: defaultDblClick 
-     *
-     * Parameters:
-     * evt - {Event} 
-     */
-    defaultDblClick: function (evt) {
-        this.switchModeTo("pan");
-        this.performedDrag = false;
-        var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); 
-        this.map.setCenter(newCenter, this.map.zoom + 1);
-        OpenLayers.Event.stop(evt);
-        return false;
-    },
-
-    /**
-     * Method: defaultMouseDown
-     *
-     * Parameters:
-     * evt - {Event} 
-     */
-    defaultMouseDown: function (evt) {
-        if (!OpenLayers.Event.isLeftClick(evt)) {
-            return;
-        }
-        this.mouseDragStart = evt.xy.clone();
-        this.performedDrag = false;
-        this.startViaKeyboard = false;
-        if (evt.shiftKey && this.mode !="zoombox") {
-            this.switchModeTo("zoombox");
-            this.startViaKeyboard = true;
-        } else if (evt.altKey && this.mode !="measure") {
-            this.switchModeTo("measure");
-        } else if (!this.mode) {
-            this.switchModeTo("pan");
-        }
-        
-        switch (this.mode) {
-            case "zoombox":
-                this.map.div.style.cursor = "crosshair";
-                this.zoomBox = OpenLayers.Util.createDiv('zoomBox',
-                                                         this.mouseDragStart,
-                                                         null,
-                                                         null,
-                                                         "absolute",
-                                                         "2px solid red");
-                this.zoomBox.style.backgroundColor = "white";
-                this.zoomBox.style.filter = "alpha(opacity=50)"; // IE
-                this.zoomBox.style.opacity = "0.50";
-                this.zoomBox.style.fontSize = "1px";
-                this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
-                this.map.viewPortDiv.appendChild(this.zoomBox);
-                this.performedDrag = true;
-                break;
-            case "measure":
-                var distance = "";
-                if (this.measureStart) {
-                    var measureEnd = this.map.getLonLatFromViewPortPx(this.mouseDragStart);
-                    distance = OpenLayers.Util.distVincenty(this.measureStart, measureEnd);
-                    distance = Math.round(distance * 100) / 100;
-                    distance = distance + "km";
-                    this.measureStartBox = this.measureBox;
-                }    
-                this.measureStart = this.map.getLonLatFromViewPortPx(this.mouseDragStart);;
-                this.measureBox = OpenLayers.Util.createDiv(null,
-                                                         this.mouseDragStart.add(
-                                                           -2-parseInt(this.map.layerContainerDiv.style.left),
-                                                           -2-parseInt(this.map.layerContainerDiv.style.top)),
-                                                         null,
-                                                         null,
-                                                         "absolute");
-                this.measureBox.style.width="4px";
-                this.measureBox.style.height="4px";
-                this.measureBox.style.fontSize = "1px";
-                this.measureBox.style.backgroundColor="red";
-                this.measureBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
-                this.map.layerContainerDiv.appendChild(this.measureBox);
-                if (distance) {
-                    this.measureBoxDistance = OpenLayers.Util.createDiv(null,
-                                                         this.mouseDragStart.add(
-                                                           -2-parseInt(this.map.layerContainerDiv.style.left),
-                                                           2-parseInt(this.map.layerContainerDiv.style.top)),
-                                                         null,
-                                                         null,
-                                                         "absolute");
-                    
-                    this.measureBoxDistance.innerHTML = distance;
-                    this.measureBoxDistance.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
-                    this.map.layerContainerDiv.appendChild(this.measureBoxDistance);
-                    this.measureDivs.push(this.measureBoxDistance);
-                }
-                this.measureBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
-                this.map.layerContainerDiv.appendChild(this.measureBox);
-                this.measureDivs.push(this.measureBox);
-                break;
-            default:
-                this.map.div.style.cursor = "move";
-                break;
-        }
-        document.onselectstart = OpenLayers.Function.False;
-        OpenLayers.Event.stop(evt);
-    },
-
-    /**
-     * Method: switchModeTo 
-     *
-     * Parameters:
-     * mode - {String} 
-     */
-    switchModeTo: function(mode) {
-        if (mode != this.mode) {
-            
-
-            if (this.mode && this.buttons[this.mode]) {
-                OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode], null, null, null, this.buttons[this.mode].imgLocation);
-            }
-            if (this.mode == "measure" && mode != "measure") {
-                for(var i=0, len=this.measureDivs.length; i<len; i++) {
-                    if (this.measureDivs[i]) { 
-                        this.map.layerContainerDiv.removeChild(this.measureDivs[i]);
-                    }
-                }
-                this.measureDivs = [];
-                this.measureStart = null;
-            }
-            this.mode = mode;
-            if (this.buttons[mode]) {
-                OpenLayers.Util.modifyAlphaImageDiv(this.buttons[mode], null, null, null, this.buttons[mode].activeImgLocation);
-            }
-            switch (this.mode) {
-                case "zoombox":
-                    this.map.div.style.cursor = "crosshair";
-                    break;
-                default:
-                    this.map.div.style.cursor = "";
-                    break;
-            }
-
-        } 
-    }, 
-
-    /**
-     * Method: leaveMode
-     */
-    leaveMode: function() {
-        this.switchModeTo("pan");
-    },
-    
-    /**
-     * Method: defaultMouseMove
-     *
-     * Parameters:
-     * evt - {Event} 
-     */
-    defaultMouseMove: function (evt) {
-        if (this.mouseDragStart != null) {
-            switch (this.mode) {
-                case "zoombox": 
-                    var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x);
-                    var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y);
-                    this.zoomBox.style.width = Math.max(1, deltaX) + "px";
-                    this.zoomBox.style.height = Math.max(1, deltaY) + "px";
-                    if (evt.xy.x < this.mouseDragStart.x) {
-                        this.zoomBox.style.left = evt.xy.x+"px";
-                    }
-                    if (evt.xy.y < this.mouseDragStart.y) {
-                        this.zoomBox.style.top = evt.xy.y+"px";
-                    }
-                    break;
-                default:
-                    var deltaX = this.mouseDragStart.x - evt.xy.x;
-                    var deltaY = this.mouseDragStart.y - evt.xy.y;
-                    var size = this.map.getSize();
-                    var newXY = new OpenLayers.Pixel(size.w / 2 + deltaX,
-                                                     size.h / 2 + deltaY);
-                    var newCenter = this.map.getLonLatFromViewPortPx( newXY ); 
-                    this.map.setCenter(newCenter, null, true);
-                    this.mouseDragStart = evt.xy.clone();
-            }
-            this.performedDrag = true;
-        }
-    },
-
-    /**
-     * Method: defaultMouseUp
-     *
-     * Parameters:
-     * evt - {Event} 
-     */
-    defaultMouseUp: function (evt) {
-        if (!OpenLayers.Event.isLeftClick(evt)) {
-            return;
-        }
-        switch (this.mode) {
-            case "zoombox":
-                this.zoomBoxEnd(evt);
-                if (this.startViaKeyboard) {
-                    this.leaveMode();
-                }
-                break;
-            case "pan":
-                if (this.performedDrag) {
-                    this.map.setCenter(this.map.center);
-                }        
-        }
-        document.onselectstart = null;
-        this.mouseDragStart = null;
-        this.map.div.style.cursor = "default";
-    },
-
-    /**
-     * Method: defaultMouseOut
-     *
-     * Parameters:
-     * evt - {Event} 
-     */
-    defaultMouseOut: function (evt) {
-        if (this.mouseDragStart != null
-            && OpenLayers.Util.mouseLeft(evt, this.map.div)) {
-            if (this.zoomBox) {
-                this.removeZoomBox();
-                if (this.startViaKeyboard) {
-                    this.leaveMode();
-                }
-            }
-            this.mouseDragStart = null;
-            this.map.div.style.cursor = "default";
-        }
-    },
-
-    /**
-     * Method: defaultClick
-     *
-     * Parameters:
-     * evt - {Event} 
-     */
-    defaultClick: function (evt) {
-        if (this.performedDrag)  {
-            this.performedDrag = false;
-            return false;
-        }
-    },
-    
-    CLASS_NAME: "OpenLayers.Control.MouseToolbar"
-});
-
-OpenLayers.Control.MouseToolbar.X = 6;
-OpenLayers.Control.MouseToolbar.Y = 300;
-

--- a/labs/openlayers/lib/OpenLayers/Control/NavToolbar.js
+++ /dev/null
@@ -1,56 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control/Panel.js
- * @requires OpenLayers/Control/Navigation.js
- * @requires OpenLayers/Control/ZoomBox.js
- */
-
-/**
- * Class: OpenLayers.Control.NavToolbar
- * This Toolbar is an alternative to the Navigation control that displays
- *     the state of the control, and provides a UI for changing state to
- *     use the zoomBox via a Panel control.
- *
- * If you wish to change the properties of the Navigation control used
- *     in the NavToolbar, see: 
- *     http://trac.openlayers.org/wiki/Toolbars#SubclassingNavToolbar 
- * 
- * 
- * Inherits from:
- *  - <OpenLayers.Control.Panel>
- */
-OpenLayers.Control.NavToolbar = OpenLayers.Class(OpenLayers.Control.Panel, {
-
-    /**
-     * Constructor: OpenLayers.Control.NavToolbar 
-     * Add our two mousedefaults controls.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be used
-     *     to extend the control.
-     */
-    initialize: function(options) {
-        OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
-        this.addControls([
-          new OpenLayers.Control.Navigation(),
-          new OpenLayers.Control.ZoomBox()
-        ]);
-    },
-
-    /**
-     * Method: draw 
-     * calls the default draw, and then activates mouse defaults.
-     */
-    draw: function() {
-        var div = OpenLayers.Control.Panel.prototype.draw.apply(this, arguments);
-        this.activateControl(this.controls[0]);
-        return div;
-    },
-
-    CLASS_NAME: "OpenLayers.Control.NavToolbar"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/Navigation.js
+++ /dev/null
@@ -1,304 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control/ZoomBox.js
- * @requires OpenLayers/Control/DragPan.js
- * @requires OpenLayers/Handler/MouseWheel.js
- * @requires OpenLayers/Handler/Click.js
- */
-
-/**
- * Class: OpenLayers.Control.Navigation
- * The navigation control handles map browsing with mouse events (dragging,
- *     double-clicking, and scrolling the wheel).  Create a new navigation 
- *     control with the <OpenLayers.Control.Navigation> control.  
- * 
- *     Note that this control is added to the map by default (if no controls 
- *     array is sent in the options object to the <OpenLayers.Map> 
- *     constructor).
- * 
- * Inherits:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, {
-
-    /** 
-     * Property: dragPan
-     * {<OpenLayers.Control.DragPan>} 
-     */
-    dragPan: null,
-
-    /**
-     * APIProprety: dragPanOptions
-     * {Object} Options passed to the DragPan control.
-     */
-    dragPanOptions: null,
-
-    /**
-     * APIProperty: documentDrag
-     * {Boolean} Allow panning of the map by dragging outside map viewport.
-     *     Default is false.
-     */
-    documentDrag: false,
-
-    /** 
-     * Property: zoomBox
-     * {<OpenLayers.Control.ZoomBox>}
-     */
-    zoomBox: null,
-
-    /**
-     * APIProperty: zoomBoxEnabled
-     * {Boolean} Whether the user can draw a box to zoom
-     */
-    zoomBoxEnabled: true, 
-
-    /**
-     * APIProperty: zoomWheelEnabled
-     * {Boolean} Whether the mousewheel should zoom the map
-     */
-    zoomWheelEnabled: true,
-    
-    /**
-     * Property: mouseWheelOptions
-     * {Object} Options passed to the MouseWheel control (only useful if
-     *     <zoomWheelEnabled> is set to true)
-     */
-    mouseWheelOptions: null,
-
-    /**
-     * APIProperty: handleRightClicks
-     * {Boolean} Whether or not to handle right clicks. Default is false.
-     */
-    handleRightClicks: false,
-
-    /**
-     * APIProperty: zoomBoxKeyMask
-     * {Integer} <OpenLayers.Handler> key code of the key, which has to be
-     *    pressed, while drawing the zoom box with the mouse on the screen. 
-     *    You should probably set handleRightClicks to true if you use this
-     *    with MOD_CTRL, to disable the context menu for machines which use
-     *    CTRL-Click as a right click.
-     * Default: <OpenLayers.Handler.MOD_SHIFT
-     */
-    zoomBoxKeyMask: OpenLayers.Handler.MOD_SHIFT,
-    
-    /**
-     * APIProperty: autoActivate
-     * {Boolean} Activate the control when it is added to a map.  Default is
-     *     true.
-     */
-    autoActivate: true,
-
-    /**
-     * Constructor: OpenLayers.Control.Navigation
-     * Create a new navigation control
-     * 
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *                    the control
-     */
-    initialize: function(options) {
-        this.handlers = {};
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-    },
-
-    /**
-     * Method: destroy
-     * The destroy method is used to perform any clean up before the control
-     * is dereferenced.  Typically this is where event listeners are removed
-     * to prevent memory leaks.
-     */
-    destroy: function() {
-        this.deactivate();
-
-        if (this.dragPan) {
-            this.dragPan.destroy();
-        }
-        this.dragPan = null;
-
-        if (this.zoomBox) {
-            this.zoomBox.destroy();
-        }
-        this.zoomBox = null;
-        OpenLayers.Control.prototype.destroy.apply(this,arguments);
-    },
-    
-    /**
-     * Method: activate
-     */
-    activate: function() {
-        this.dragPan.activate();
-        if (this.zoomWheelEnabled) {
-            this.handlers.wheel.activate();
-        }    
-        this.handlers.click.activate();
-        if (this.zoomBoxEnabled) {
-            this.zoomBox.activate();
-        }
-        return OpenLayers.Control.prototype.activate.apply(this,arguments);
-    },
-
-    /**
-     * Method: deactivate
-     */
-    deactivate: function() {
-        this.zoomBox.deactivate();
-        this.dragPan.deactivate();
-        this.handlers.click.deactivate();
-        this.handlers.wheel.deactivate();
-        return OpenLayers.Control.prototype.deactivate.apply(this,arguments);
-    },
-    
-    /**
-     * Method: draw
-     */
-    draw: function() {
-        // disable right mouse context menu for support of right click events
-        if (this.handleRightClicks) {
-            this.map.viewPortDiv.oncontextmenu = OpenLayers.Function.False;
-        }
-
-        var clickCallbacks = { 
-            'dblclick': this.defaultDblClick, 
-            'dblrightclick': this.defaultDblRightClick 
-        };
-        var clickOptions = {
-            'double': true, 
-            'stopDouble': true
-        };
-        this.handlers.click = new OpenLayers.Handler.Click(
-            this, clickCallbacks, clickOptions
-        );
-        this.dragPan = new OpenLayers.Control.DragPan(
-            OpenLayers.Util.extend({
-                map: this.map,
-                documentDrag: this.documentDrag
-            }, this.dragPanOptions)
-        );
-        this.zoomBox = new OpenLayers.Control.ZoomBox(
-                    {map: this.map, keyMask: this.zoomBoxKeyMask});
-        this.dragPan.draw();
-        this.zoomBox.draw();
-        this.handlers.wheel = new OpenLayers.Handler.MouseWheel(
-                                    this, {"up"  : this.wheelUp,
-                                           "down": this.wheelDown},
-                                    this.mouseWheelOptions );
-    },
-
-    /**
-     * Method: defaultDblClick 
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    defaultDblClick: function (evt) {
-        var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); 
-        this.map.setCenter(newCenter, this.map.zoom + 1);
-    },
-
-    /**
-     * Method: defaultDblRightClick 
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    defaultDblRightClick: function (evt) {
-        var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); 
-        this.map.setCenter(newCenter, this.map.zoom - 1);
-    },
-    
-    /**
-     * Method: wheelChange  
-     *
-     * Parameters:
-     * evt - {Event}
-     * deltaZ - {Integer}
-     */
-    wheelChange: function(evt, deltaZ) {
-        var currentZoom = this.map.getZoom();
-        var newZoom = this.map.getZoom() + Math.round(deltaZ);
-        newZoom = Math.max(newZoom, 0);
-        newZoom = Math.min(newZoom, this.map.getNumZoomLevels());
-        if (newZoom === currentZoom) {
-            return;
-        }
-        var size    = this.map.getSize();
-        var deltaX  = size.w/2 - evt.xy.x;
-        var deltaY  = evt.xy.y - size.h/2;
-        var newRes  = this.map.baseLayer.getResolutionForZoom(newZoom);
-        var zoomPoint = this.map.getLonLatFromPixel(evt.xy);
-        var newCenter = new OpenLayers.LonLat(
-                            zoomPoint.lon + deltaX * newRes,
-                            zoomPoint.lat + deltaY * newRes );
-        this.map.setCenter( newCenter, newZoom );
-    },
-
-    /** 
-     * Method: wheelUp
-     * User spun scroll wheel up
-     * 
-     * Parameters:
-     * evt - {Event}
-     * delta - {Integer}
-     */
-    wheelUp: function(evt, delta) {
-        this.wheelChange(evt, delta || 1);
-    },
-
-    /** 
-     * Method: wheelDown
-     * User spun scroll wheel down
-     * 
-     * Parameters:
-     * evt - {Event}
-     * delta - {Integer}
-     */
-    wheelDown: function(evt, delta) {
-        this.wheelChange(evt, delta || -1);
-    },
-    
-    /**
-     * Method: disableZoomBox
-     */
-    disableZoomBox : function() {
-        this.zoomBoxEnabled = false;
-        this.zoomBox.deactivate();       
-    },
-    
-    /**
-     * Method: enableZoomBox
-     */
-    enableZoomBox : function() {
-        this.zoomBoxEnabled = true;
-        if (this.active) {
-            this.zoomBox.activate();
-        }    
-    },
-    
-    /**
-     * Method: disableZoomWheel
-     */
-    
-    disableZoomWheel : function() {
-        this.zoomWheelEnabled = false;
-        this.handlers.wheel.deactivate();       
-    },
-    
-    /**
-     * Method: enableZoomWheel
-     */
-    
-    enableZoomWheel : function() {
-        this.zoomWheelEnabled = true;
-        if (this.active) {
-            this.handlers.wheel.activate();
-        }    
-    },
-
-    CLASS_NAME: "OpenLayers.Control.Navigation"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/NavigationHistory.js
+++ /dev/null
@@ -1,424 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Control/Button.js
- */
-
-/**
- * Class: OpenLayers.Control.NavigationHistory
- * A navigation history control.  This is a meta-control, that creates two
- *     dependent controls: <previous> and <next>.  Call the trigger method
- *     on the <previous> and <next> controls to restore previous and next
- *     history states.  The previous and next controls will become active
- *     when there are available states to restore and will become deactive
- *     when there are no states to restore.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.NavigationHistory = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * Property: type
-     * {String} Note that this control is not intended to be added directly
-     *     to a control panel.  Instead, add the sub-controls previous and
-     *     next.  These sub-controls are button type controls that activate
-     *     and deactivate themselves.  If this parent control is added to
-     *     a panel, it will act as a toggle.
-     */
-    type: OpenLayers.Control.TYPE_TOGGLE,
-
-    /**
-     * APIProperty: previous
-     * {<OpenLayers.Control>} A button type control whose trigger method restores
-     *     the previous state managed by this control.
-     */
-    previous: null,
-    
-    /**
-     * APIProperty: previousOptions
-     * {Object} Set this property on the options argument of the constructor
-     *     to set optional properties on the <previous> control.
-     */
-    previousOptions: null,
-    
-    /**
-     * APIProperty: next
-     * {<OpenLayers.Control>} A button type control whose trigger method restores
-     *     the next state managed by this control.
-     */
-    next: null,
-
-    /**
-     * APIProperty: nextOptions
-     * {Object} Set this property on the options argument of the constructor
-     *     to set optional properties on the <next> control.
-     */
-    nextOptions: null,
-
-    /**
-     * APIProperty: limit
-     * {Integer} Optional limit on the number of history items to retain.  If
-     *     null, there is no limit.  Default is 50.
-     */
-    limit: 50,
-
-    /**
-     * APIProperty: autoActivate
-     * {Boolean} Activate the control when it is added to a map.  Default is
-     *     true.
-     */
-    autoActivate: true,
-
-    /**
-     * Property: clearOnDeactivate
-     * {Boolean} Clear the history when the control is deactivated.  Default
-     *     is false.
-     */
-    clearOnDeactivate: false,
-
-    /**
-     * Property: registry
-     * {Object} An object with keys corresponding to event types.  Values
-     *     are functions that return an object representing the current state.
-     */
-    registry: null,
-
-    /**
-     * Property: nextStack
-     * {Array} Array of items in the history.
-     */
-    nextStack: null,
-
-    /**
-     * Property: previousStack
-     * {Array} List of items in the history.  First item represents the current
-     *     state.
-     */
-    previousStack: null,
-    
-    /**
-     * Property: listeners
-     * {Object} An object containing properties corresponding to event types.
-     *     This object is used to configure the control and is modified on
-     *     construction.
-     */
-    listeners: null,
-    
-    /**
-     * Property: restoring
-     * {Boolean} Currently restoring a history state.  This is set to true
-     *     before calling restore and set to false after restore returns.
-     */
-    restoring: false,
-    
-    /**
-     * Constructor: OpenLayers.Control.NavigationHistory 
-     * 
-     * Parameters:
-     * options - {Object} An optional object whose properties will be used
-     *     to extend the control.
-     */
-    initialize: function(options) {
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        
-        this.registry = OpenLayers.Util.extend({
-            "moveend": this.getState
-        }, this.registry);
-        
-        var previousOptions = {
-            trigger: OpenLayers.Function.bind(this.previousTrigger, this),
-            displayClass: this.displayClass + " " + this.displayClass + "Previous"
-        };
-        OpenLayers.Util.extend(previousOptions, this.previousOptions);
-        this.previous = new OpenLayers.Control.Button(previousOptions);
-        
-        var nextOptions = {
-            trigger: OpenLayers.Function.bind(this.nextTrigger, this),
-            displayClass: this.displayClass + " " + this.displayClass + "Next"
-        };
-        OpenLayers.Util.extend(nextOptions, this.nextOptions);
-        this.next = new OpenLayers.Control.Button(nextOptions);
-
-        this.clear();
-    },
-    
-    /**
-     * Method: onPreviousChange
-     * Called when the previous history stack changes.
-     *
-     * Parameters:
-     * state - {Object} An object representing the state to be restored
-     *     if previous is triggered again or null if no previous states remain.
-     * length - {Integer} The number of remaining previous states that can
-     *     be restored.
-     */
-    onPreviousChange: function(state, length) {
-        if(state && !this.previous.active) {
-            this.previous.activate();
-        } else if(!state && this.previous.active) {
-            this.previous.deactivate();
-        }
-    },
-    
-    /**
-     * Method: onNextChange
-     * Called when the next history stack changes.
-     *
-     * Parameters:
-     * state - {Object} An object representing the state to be restored
-     *     if next is triggered again or null if no next states remain.
-     * length - {Integer} The number of remaining next states that can
-     *     be restored.
-     */
-    onNextChange: function(state, length) {
-        if(state && !this.next.active) {
-            this.next.activate();
-        } else if(!state && this.next.active) {
-            this.next.deactivate();
-        }
-    },
-    
-    /**
-     * APIMethod: destroy
-     * Destroy the control.
-     */
-    destroy: function() {
-        OpenLayers.Control.prototype.destroy.apply(this);
-        this.previous.destroy();
-        this.next.destroy();
-        this.deactivate();
-        for(var prop in this) {
-            this[prop] = null;
-        }
-    },
-    
-    /** 
-     * Method: setMap
-     * Set the map property for the control and <previous> and <next> child
-     *     controls.
-     *
-     * Parameters:
-     * map - {<OpenLayers.Map>} 
-     */
-    setMap: function(map) {
-        this.map = map;
-        this.next.setMap(map);
-        this.previous.setMap(map);
-    },
-
-    /**
-     * Method: draw
-     * Called when the control is added to the map.
-     */
-    draw: function() {
-        OpenLayers.Control.prototype.draw.apply(this, arguments);
-        this.next.draw();
-        this.previous.draw();
-    },
-    
-    /**
-     * Method: previousTrigger
-     * Restore the previous state.  If no items are in the previous history
-     *     stack, this has no effect.
-     *
-     * Returns:
-     * {Object} Item representing state that was restored.  Undefined if no
-     *     items are in the previous history stack.
-     */
-    previousTrigger: function() {
-        var current = this.previousStack.shift();
-        var state = this.previousStack.shift();
-        if(state != undefined) {
-            this.nextStack.unshift(current);
-            this.previousStack.unshift(state);
-            this.restoring = true;
-            this.restore(state);
-            this.restoring = false;
-            this.onNextChange(this.nextStack[0], this.nextStack.length);
-            this.onPreviousChange(
-                this.previousStack[1], this.previousStack.length - 1
-            );
-        } else {
-            this.previousStack.unshift(current);
-        }
-        return state;
-    },
-    
-    /**
-     * APIMethod: nextTrigger
-     * Restore the next state.  If no items are in the next history
-     *     stack, this has no effect.  The next history stack is populated
-     *     as states are restored from the previous history stack.
-     *
-     * Returns:
-     * {Object} Item representing state that was restored.  Undefined if no
-     *     items are in the next history stack.
-     */
-    nextTrigger: function() {
-        var state = this.nextStack.shift();
-        if(state != undefined) {
-            this.previousStack.unshift(state);
-            this.restoring = true;
-            this.restore(state);
-            this.restoring = false;
-            this.onNextChange(this.nextStack[0], this.nextStack.length);
-            this.onPreviousChange(
-                this.previousStack[1], this.previousStack.length - 1
-            );
-        }
-        return state;
-    },
-    
-    /**
-     * APIMethod: clear
-     * Clear history.
-     */
-    clear: function() {
-        this.previousStack = [];
-        this.previous.deactivate();
-        this.nextStack = [];
-        this.next.deactivate();
-    },
-
-    /**
-     * Method: getState
-     * Get the current state and return it.
-     *
-     * Returns:
-     * {Object} An object representing the current state.
-     */
-    getState: function() {
-        return {
-            center: this.map.getCenter(),
-            resolution: this.map.getResolution(),
-            projection: this.map.getProjectionObject(),
-            units: this.map.getProjectionObject().getUnits() || 
-                this.map.units || this.map.baseLayer.units
-        };
-    },
-
-    /**
-     * Method: restore
-     * Update the state with the given object.
-     *
-     * Parameters:
-     * state - {Object} An object representing the state to restore.
-     */
-    restore: function(state) {
-        var center, zoom;
-        if (this.map.getProjectionObject() == state.projection) { 
-            zoom = this.map.getZoomForResolution(state.resolution);
-            center = state.center;
-        } else {
-            center = state.center.clone();
-            center.transform(state.projection, this.map.getProjectionObject());
-            var sourceUnits = state.units;
-            var targetUnits = this.map.getProjectionObject().getUnits() || 
-                this.map.units || this.map.baseLayer.units;
-            var resolutionFactor = sourceUnits && targetUnits ? 
-                OpenLayers.INCHES_PER_UNIT[sourceUnits] / OpenLayers.INCHES_PER_UNIT[targetUnits] : 1;
-            zoom = this.map.getZoomForResolution(resolutionFactor*state.resolution); 
-        }
-        this.map.setCenter(center, zoom);
-    },
-    
-    /**
-     * Method: setListeners
-     * Sets functions to be registered in the listeners object.
-     */
-    setListeners: function() {
-        this.listeners = {};
-        for(var type in this.registry) {
-            this.listeners[type] = OpenLayers.Function.bind(function() {
-                if(!this.restoring) {
-                    var state = this.registry[type].apply(this, arguments);
-                    this.previousStack.unshift(state);
-                    if(this.previousStack.length > 1) {
-                        this.onPreviousChange(
-                            this.previousStack[1], this.previousStack.length - 1
-                        );
-                    }
-                    if(this.previousStack.length > (this.limit + 1)) {
-                        this.previousStack.pop();
-                    }
-                    if(this.nextStack.length > 0) {
-                        this.nextStack = [];
-                        this.onNextChange(null, 0);
-                    }
-                }
-                return true;
-            }, this);
-        }
-    },
-
-    /**
-     * APIMethod: activate
-     * Activate the control.  This registers any listeners.
-     *
-     * Returns:
-     * {Boolean} Control successfully activated.
-     */
-    activate: function() {
-        var activated = false;
-        if(this.map) {
-            if(OpenLayers.Control.prototype.activate.apply(this)) {
-                if(this.listeners == null) {
-                    this.setListeners();
-                }
-                for(var type in this.listeners) {
-                    this.map.events.register(type, this, this.listeners[type]);
-                }
-                activated = true;
-                if(this.previousStack.length == 0) {
-                    this.initStack();
-                }
-            }
-        }
-        return activated;
-    },
-    
-    /**
-     * Method: initStack
-     * Called after the control is activated if the previous history stack is
-     *     empty.
-     */
-    initStack: function() {
-        if(this.map.getCenter()) {
-            this.listeners.moveend();
-        }
-    },
-    
-    /**
-     * APIMethod: deactivate
-     * Deactivate the control.  This unregisters any listeners.
-     *
-     * Returns:
-     * {Boolean} Control successfully deactivated.
-     */
-    deactivate: function() {
-        var deactivated = false;
-        if(this.map) {
-            if(OpenLayers.Control.prototype.deactivate.apply(this)) {
-                for(var type in this.listeners) {
-                    this.map.events.unregister(
-                        type, this, this.listeners[type]
-                    );
-                }
-                if(this.clearOnDeactivate) {
-                    this.clear();
-                }
-                deactivated = true;
-            }
-        }
-        return deactivated;
-    },
-    
-    CLASS_NAME: "OpenLayers.Control.NavigationHistory"
-});
-
-

--- a/labs/openlayers/lib/OpenLayers/Control/OverviewMap.js
+++ /dev/null
@@ -1,721 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/** 
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/BaseTypes.js
- * @requires OpenLayers/Events.js
- */
-
-/**
- * Class: OpenLayers.Control.OverviewMap
- * The OverMap control creates a small overview map, useful to display the 
- * extent of a zoomed map and your main map and provide additional 
- * navigation options to the User.  By default the overview map is drawn in
- * the lower right corner of the main map. Create a new overview map with the
- * <OpenLayers.Control.OverviewMap> constructor.
- *
- * Inerits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * Property: element
-     * {DOMElement} The DOM element that contains the overview map
-     */
-    element: null,
-    
-    /**
-     * APIProperty: ovmap
-     * {<OpenLayers.Map>} A reference to the overview map itself.
-     */
-    ovmap: null,
-
-    /**
-     * APIProperty: size
-     * {<OpenLayers.Size>} The overvew map size in pixels.  Note that this is
-     * the size of the map itself - the element that contains the map (default
-     * class name olControlOverviewMapElement) may have padding or other style
-     * attributes added via CSS.
-     */
-    size: new OpenLayers.Size(180, 90),
-
-    /**
-     * APIProperty: layers
-     * {Array(<OpenLayers.Layer>)} Ordered list of layers in the overview map.
-     * If none are sent at construction, the base layer for the main map is used.
-     */
-    layers: null,
-    
-    /**
-     * APIProperty: minRectSize
-     * {Integer} The minimum width or height (in pixels) of the extent
-     *     rectangle on the overview map.  When the extent rectangle reaches
-     *     this size, it will be replaced depending on the value of the
-     *     <minRectDisplayClass> property.  Default is 15 pixels.
-     */
-    minRectSize: 15,
-    
-    /**
-     * APIProperty: minRectDisplayClass
-     * {String} Replacement style class name for the extent rectangle when
-     *     <minRectSize> is reached.  This string will be suffixed on to the
-     *     displayClass.  Default is "RectReplacement".
-     *
-     * Example CSS declaration:
-     * (code)
-     * .olControlOverviewMapRectReplacement {
-     *     overflow: hidden;
-     *     cursor: move;
-     *     background-image: url("img/overview_replacement.gif");
-     *     background-repeat: no-repeat;
-     *     background-position: center;
-     * }
-     * (end)
-     */
-    minRectDisplayClass: "RectReplacement",
-
-    /**
-     * APIProperty: minRatio
-     * {Float} The ratio of the overview map resolution to the main map
-     *     resolution at which to zoom farther out on the overview map.
-     */
-    minRatio: 8,
-
-    /**
-     * APIProperty: maxRatio
-     * {Float} The ratio of the overview map resolution to the main map
-     *     resolution at which to zoom farther in on the overview map.
-     */
-    maxRatio: 32,
-    
-    /**
-     * APIProperty: mapOptions
-     * {Object} An object containing any non-default properties to be sent to
-     *     the overview map's map constructor.  These should include any
-     *     non-default options that the main map was constructed with.
-     */
-    mapOptions: null,
-
-    /**
-     * APIProperty: autoPan
-     * {Boolean} Always pan the overview map, so the extent marker remains in
-     *     the center.  Default is false.  If true, when you drag the extent
-     *     marker, the overview map will update itself so the marker returns
-     *     to the center.
-     */
-    autoPan: false,
-    
-    /**
-     * Property: handlers
-     * {Object}
-     */
-    handlers: null,
-
-    /**
-     * Property: resolutionFactor
-     * {Object}
-     */
-    resolutionFactor: 1,
-
-    /**
-     * APIProperty: maximized
-     * {Boolean} Start as maximized (visible). Defaults to false.
-     */
-    maximized: false,
-
-    /**
-     * Constructor: OpenLayers.Control.OverviewMap
-     * Create a new overview map
-     *
-     * Parameters:
-     * object - {Object} Properties of this object will be set on the overview
-     * map object.  Note, to set options on the map object contained in this
-     * control, set <mapOptions> as one of the options properties.
-     */
-    initialize: function(options) {
-        this.layers = [];
-        this.handlers = {};
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * APIMethod: destroy
-     * Deconstruct the control
-     */
-    destroy: function() {
-        if (!this.mapDiv) { // we've already been destroyed
-            return;
-        }
-        if (this.handlers.click) {
-            this.handlers.click.destroy();
-        }
-        if (this.handlers.drag) {
-            this.handlers.drag.destroy();
-        }
-
-        this.mapDiv.removeChild(this.extentRectangle);
-        this.extentRectangle = null;
-
-        if (this.rectEvents) {
-            this.rectEvents.destroy();
-            this.rectEvents = null;
-        }
-
-        if (this.ovmap) {
-            this.ovmap.destroy();
-            this.ovmap = null;
-        }
-        
-        this.element.removeChild(this.mapDiv);
-        this.mapDiv = null;
-
-        this.div.removeChild(this.element);
-        this.element = null;
-
-        if (this.maximizeDiv) {
-            OpenLayers.Event.stopObservingElement(this.maximizeDiv);
-            this.div.removeChild(this.maximizeDiv);
-            this.maximizeDiv = null;
-        }
-        
-        if (this.minimizeDiv) {
-            OpenLayers.Event.stopObservingElement(this.minimizeDiv);
-            this.div.removeChild(this.minimizeDiv);
-            this.minimizeDiv = null;
-        }
-
-        this.map.events.un({
-            "moveend": this.update,
-            "changebaselayer": this.baseLayerDraw,
-            scope: this
-        });
-
-        OpenLayers.Control.prototype.destroy.apply(this, arguments);    
-    },
-
-    /**
-     * Method: draw
-     * Render the control in the browser.
-     */    
-    draw: function() {
-        OpenLayers.Control.prototype.draw.apply(this, arguments);
-        if(!(this.layers.length > 0)) {
-            if (this.map.baseLayer) {
-                var layer = this.map.baseLayer.clone();
-                this.layers = [layer];
-            } else {
-                this.map.events.register("changebaselayer", this, this.baseLayerDraw);
-                return this.div;
-            }
-        }
-
-        // create overview map DOM elements
-        this.element = document.createElement('div');
-        this.element.className = this.displayClass + 'Element';
-        this.element.style.display = 'none';
-
-        this.mapDiv = document.createElement('div');
-        this.mapDiv.style.width = this.size.w + 'px';
-        this.mapDiv.style.height = this.size.h + 'px';
-        this.mapDiv.style.position = 'relative';
-        this.mapDiv.style.overflow = 'hidden';
-        this.mapDiv.id = OpenLayers.Util.createUniqueID('overviewMap');
-        
-        this.extentRectangle = document.createElement('div');
-        this.extentRectangle.style.position = 'absolute';
-        this.extentRectangle.style.zIndex = 1000;  //HACK
-        this.extentRectangle.className = this.displayClass+'ExtentRectangle';
-        this.mapDiv.appendChild(this.extentRectangle);
-
-        this.element.appendChild(this.mapDiv);  
-
-        this.div.appendChild(this.element);
-
-        // Optionally add min/max buttons if the control will go in the
-        // map viewport.
-        if(!this.outsideViewport) {
-            this.div.className += " " + this.displayClass + 'Container';
-            var imgLocation = OpenLayers.Util.getImagesLocation();
-            // maximize button div
-            var img = imgLocation + 'layer-switcher-maximize.png';
-            this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv(
-                                        this.displayClass + 'MaximizeButton', 
-                                        null, 
-                                        new OpenLayers.Size(18,18), 
-                                        img, 
-                                        'absolute');
-            this.maximizeDiv.style.display = 'none';
-            this.maximizeDiv.className = this.displayClass + 'MaximizeButton';
-            OpenLayers.Event.observe(this.maximizeDiv, 'click', 
-                OpenLayers.Function.bindAsEventListener(this.maximizeControl,
-                                                        this)
-            );
-            this.div.appendChild(this.maximizeDiv);
-    
-            // minimize button div
-            var img = imgLocation + 'layer-switcher-minimize.png';
-            this.minimizeDiv = OpenLayers.Util.createAlphaImageDiv(
-                                        'OpenLayers_Control_minimizeDiv', 
-                                        null, 
-                                        new OpenLayers.Size(18,18), 
-                                        img, 
-                                        'absolute');
-            this.minimizeDiv.style.display = 'none';
-            this.minimizeDiv.className = this.displayClass + 'MinimizeButton';
-            OpenLayers.Event.observe(this.minimizeDiv, 'click', 
-                OpenLayers.Function.bindAsEventListener(this.minimizeControl,
-                                                        this)
-            );
-            this.div.appendChild(this.minimizeDiv);
-            
-            var eventsToStop = ['dblclick','mousedown'];
-            
-            for (var i=0, len=eventsToStop.length; i<len; i++) {
-
-                OpenLayers.Event.observe(this.maximizeDiv, 
-                                         eventsToStop[i], 
-                                         OpenLayers.Event.stop);
-
-                OpenLayers.Event.observe(this.minimizeDiv,
-                                         eventsToStop[i], 
-                                         OpenLayers.Event.stop);
-            }
-            
-            this.minimizeControl();
-        } else {
-            // show the overview map
-            this.element.style.display = '';
-        }
-        if(this.map.getExtent()) {
-            this.update();
-        }
-        
-        this.map.events.register('moveend', this, this.update);
-        
-        if (this.maximized) {
-            this.maximizeControl();
-        }
-        return this.div;
-    },
-    
-    /**
-     * Method: baseLayerDraw
-     * Draw the base layer - called if unable to complete in the initial draw
-     */
-    baseLayerDraw: function() {
-        this.draw();
-        this.map.events.unregister("changebaselayer", this, this.baseLayerDraw);
-    },
-
-    /**
-     * Method: rectDrag
-     * Handle extent rectangle drag
-     *
-     * Parameters:
-     * px - {<OpenLayers.Pixel>} The pixel location of the drag.
-     */
-    rectDrag: function(px) {
-        var deltaX = this.handlers.drag.last.x - px.x;
-        var deltaY = this.handlers.drag.last.y - px.y;
-        if(deltaX != 0 || deltaY != 0) {
-            var rectTop = this.rectPxBounds.top;
-            var rectLeft = this.rectPxBounds.left;
-            var rectHeight = Math.abs(this.rectPxBounds.getHeight());
-            var rectWidth = this.rectPxBounds.getWidth();
-            // don't allow dragging off of parent element
-            var newTop = Math.max(0, (rectTop - deltaY));
-            newTop = Math.min(newTop,
-                              this.ovmap.size.h - this.hComp - rectHeight);
-            var newLeft = Math.max(0, (rectLeft - deltaX));
-            newLeft = Math.min(newLeft,
-                               this.ovmap.size.w - this.wComp - rectWidth);
-            this.setRectPxBounds(new OpenLayers.Bounds(newLeft,
-                                                       newTop + rectHeight,
-                                                       newLeft + rectWidth,
-                                                       newTop));
-        }
-    },
-    
-    /**
-     * Method: mapDivClick
-     * Handle browser events
-     *
-     * Parameters:
-     * evt - {<OpenLayers.Event>} evt
-     */
-    mapDivClick: function(evt) {
-        var pxCenter = this.rectPxBounds.getCenterPixel();
-        var deltaX = evt.xy.x - pxCenter.x;
-        var deltaY = evt.xy.y - pxCenter.y;
-        var top = this.rectPxBounds.top;
-        var left = this.rectPxBounds.left;
-        var height = Math.abs(this.rectPxBounds.getHeight());
-        var width = this.rectPxBounds.getWidth();
-        var newTop = Math.max(0, (top + deltaY));
-        newTop = Math.min(newTop, this.ovmap.size.h - height);
-        var newLeft = Math.max(0, (left + deltaX));
-        newLeft = Math.min(newLeft, this.ovmap.size.w - width);
-        this.setRectPxBounds(new OpenLayers.Bounds(newLeft,
-                                                   newTop + height,
-                                                   newLeft + width,
-                                                   newTop));
-        this.updateMapToRect();
-    },
-
-    /**
-     * Method: maximizeControl
-     * Unhide the control.  Called when the control is in the map viewport.
-     *
-     * Parameters:
-     * e - {<OpenLayers.Event>}
-     */
-    maximizeControl: function(e) {
-        this.element.style.display = '';
-        this.showToggle(false);
-        if (e != null) {
-            OpenLayers.Event.stop(e);                                            
-        }
-    },
-
-    /**
-     * Method: minimizeControl
-     * Hide all the contents of the control, shrink the size, 
-     * add the maximize icon
-     * 
-     * Parameters:
-     * e - {<OpenLayers.Event>}
-     */
-    minimizeControl: function(e) {
-        this.element.style.display = 'none';
-        this.showToggle(true);
-        if (e != null) {
-            OpenLayers.Event.stop(e);                                            
-        }
-    },
-
-    /**
-     * Method: showToggle
-     * Hide/Show the toggle depending on whether the control is minimized
-     *
-     * Parameters:
-     * minimize - {Boolean} 
-     */
-    showToggle: function(minimize) {
-        this.maximizeDiv.style.display = minimize ? '' : 'none';
-        this.minimizeDiv.style.display = minimize ? 'none' : '';
-    },
-
-    /**
-     * Method: update
-     * Update the overview map after layers move.
-     */
-    update: function() {
-        if(this.ovmap == null) {
-            this.createMap();
-        }
-        
-        if(this.autoPan || !this.isSuitableOverview()) {
-            this.updateOverview();
-        }
-        
-        // update extent rectangle
-        this.updateRectToMap();
-    },
-    
-    /**
-     * Method: isSuitableOverview
-     * Determines if the overview map is suitable given the extent and
-     * resolution of the main map.
-     */
-    isSuitableOverview: function() {
-        var mapExtent = this.map.getExtent();
-        var maxExtent = this.map.maxExtent;
-        var testExtent = new OpenLayers.Bounds(
-                                Math.max(mapExtent.left, maxExtent.left),
-                                Math.max(mapExtent.bottom, maxExtent.bottom),
-                                Math.min(mapExtent.right, maxExtent.right),
-                                Math.min(mapExtent.top, maxExtent.top));        
-
-        if (this.ovmap.getProjection() != this.map.getProjection()) {
-            testExtent = testExtent.transform(
-                this.map.getProjectionObject(),
-                this.ovmap.getProjectionObject() );
-        }
-
-        var resRatio = this.ovmap.getResolution() / this.map.getResolution();
-        return ((resRatio > this.minRatio) &&
-                (resRatio <= this.maxRatio) &&
-                (this.ovmap.getExtent().containsBounds(testExtent)));
-    },
-    
-    /**
-     * Method updateOverview
-     * Called by <update> if <isSuitableOverview> returns true
-     */
-    updateOverview: function() {
-        var mapRes = this.map.getResolution();
-        var targetRes = this.ovmap.getResolution();
-        var resRatio = targetRes / mapRes;
-        if(resRatio > this.maxRatio) {
-            // zoom in overview map
-            targetRes = this.minRatio * mapRes;            
-        } else if(resRatio <= this.minRatio) {
-            // zoom out overview map
-            targetRes = this.maxRatio * mapRes;
-        }
-        var center;
-        if (this.ovmap.getProjection() != this.map.getProjection()) {
-            center = this.map.center.clone();
-            center.transform(this.map.getProjectionObject(),
-                this.ovmap.getProjectionObject() );
-        } else {
-            center = this.map.center;
-        }
-        this.ovmap.setCenter(center, this.ovmap.getZoomForResolution(
-            targetRes * this.resolutionFactor));
-        this.updateRectToMap();
-    },
-    
-    /**
-     * Method: createMap
-     * Construct the map that this control contains
-     */
-    createMap: function() {
-        // create the overview map
-        var options = OpenLayers.Util.extend(
-                        {controls: [], maxResolution: 'auto', 
-                         fallThrough: false}, this.mapOptions);
-        this.ovmap = new OpenLayers.Map(this.mapDiv, options);
-        
-        // prevent ovmap from being destroyed when the page unloads, because
-        // the OverviewMap control has to do this (and does it).
-        OpenLayers.Event.stopObserving(window, 'unload', this.ovmap.unloadDestroy);
-        
-        this.ovmap.addLayers(this.layers);
-        this.ovmap.zoomToMaxExtent();
-        // check extent rectangle border width
-        this.wComp = parseInt(OpenLayers.Element.getStyle(this.extentRectangle,
-                                               'border-left-width')) +
-                     parseInt(OpenLayers.Element.getStyle(this.extentRectangle,
-                                               'border-right-width'));
-        this.wComp = (this.wComp) ? this.wComp : 2;
-        this.hComp = parseInt(OpenLayers.Element.getStyle(this.extentRectangle,
-                                               'border-top-width')) +
-                     parseInt(OpenLayers.Element.getStyle(this.extentRectangle,
-                                               'border-bottom-width'));
-        this.hComp = (this.hComp) ? this.hComp : 2;
-
-        this.handlers.drag = new OpenLayers.Handler.Drag(
-            this, {move: this.rectDrag, done: this.updateMapToRect},
-            {map: this.ovmap}
-        );
-        this.handlers.click = new OpenLayers.Handler.Click(
-            this, {
-                "click": this.mapDivClick
-            },{
-                "single": true, "double": false,
-                "stopSingle": true, "stopDouble": true,
-                "pixelTolerance": 1,
-                map: this.ovmap
-            }
-        );
-        this.handlers.click.activate();
-        
-        this.rectEvents = new OpenLayers.Events(this, this.extentRectangle,
-                                                null, true);
-        this.rectEvents.register("mouseover", this, function(e) {
-            if(!this.handlers.drag.active && !this.map.dragging) {
-                this.handlers.drag.activate();
-            }
-        });
-        this.rectEvents.register("mouseout", this, function(e) {
-            if(!this.handlers.drag.dragging) {
-                this.handlers.drag.deactivate();
-            }
-        });
-
-        if (this.ovmap.getProjection() != this.map.getProjection()) {
-            var sourceUnits = this.map.getProjectionObject().getUnits() ||
-                this.map.units || this.map.baseLayer.units;
-            var targetUnits = this.ovmap.getProjectionObject().getUnits() ||
-                this.ovmap.units || this.ovmap.baseLayer.units;
-            this.resolutionFactor = sourceUnits && targetUnits ?
-                OpenLayers.INCHES_PER_UNIT[sourceUnits] /
-                OpenLayers.INCHES_PER_UNIT[targetUnits] : 1;
-        }
-    },
-        
-    /**
-     * Method: updateRectToMap
-     * Updates the extent rectangle position and size to match the map extent
-     */
-    updateRectToMap: function() {
-        // If the projections differ we need to reproject
-        var bounds;
-        if (this.ovmap.getProjection() != this.map.getProjection()) {
-            bounds = this.map.getExtent().transform(
-                this.map.getProjectionObject(), 
-                this.ovmap.getProjectionObject() );
-        } else {
-            bounds = this.map.getExtent();
-        }
-        var pxBounds = this.getRectBoundsFromMapBounds(bounds);
-        if (pxBounds) {
-            this.setRectPxBounds(pxBounds);
-        }
-    },
-    
-    /**
-     * Method: updateMapToRect
-     * Updates the map extent to match the extent rectangle position and size
-     */
-    updateMapToRect: function() {
-        var lonLatBounds = this.getMapBoundsFromRectBounds(this.rectPxBounds);
-        if (this.ovmap.getProjection() != this.map.getProjection()) {
-            lonLatBounds = lonLatBounds.transform(
-                this.ovmap.getProjectionObject(),
-                this.map.getProjectionObject() );
-        }
-        this.map.panTo(lonLatBounds.getCenterLonLat());
-    },
-
-    /**
-     * Method: setRectPxBounds
-     * Set extent rectangle pixel bounds.
-     *
-     * Parameters:
-     * pxBounds - {<OpenLayers.Bounds>}
-     */
-    setRectPxBounds: function(pxBounds) {
-        var top = Math.max(pxBounds.top, 0);
-        var left = Math.max(pxBounds.left, 0);
-        var bottom = Math.min(pxBounds.top + Math.abs(pxBounds.getHeight()),
-                              this.ovmap.size.h - this.hComp);
-        var right = Math.min(pxBounds.left + pxBounds.getWidth(),
-                             this.ovmap.size.w - this.wComp);
-        var width = Math.max(right - left, 0);
-        var height = Math.max(bottom - top, 0);
-        if(width < this.minRectSize || height < this.minRectSize) {
-            this.extentRectangle.className = this.displayClass +
-                                             this.minRectDisplayClass;
-            var rLeft = left + (width / 2) - (this.minRectSize / 2);
-            var rTop = top + (height / 2) - (this.minRectSize / 2);
-            this.extentRectangle.style.top = Math.round(rTop) + 'px';
-            this.extentRectangle.style.left = Math.round(rLeft) + 'px';
-            this.extentRectangle.style.height = this.minRectSize + 'px';
-            this.extentRectangle.style.width = this.minRectSize + 'px';
-        } else {
-            this.extentRectangle.className = this.displayClass +
-                                             'ExtentRectangle';
-            this.extentRectangle.style.top = Math.round(top) + 'px';
-            this.extentRectangle.style.left = Math.round(left) + 'px';
-            this.extentRectangle.style.height = Math.round(height) + 'px';
-            this.extentRectangle.style.width = Math.round(width) + 'px';
-        }
-        this.rectPxBounds = new OpenLayers.Bounds(
-            Math.round(left), Math.round(bottom),
-            Math.round(right), Math.round(top)
-        );
-    },
-
-    /**
-     * Method: getRectBoundsFromMapBounds
-     * Get the rect bounds from the map bounds.
-     *
-     * Parameters:
-     * lonLatBounds - {<OpenLayers.Bounds>}
-     *
-     * Returns:
-     * {<OpenLayers.Bounds>}A bounds which is the passed-in map lon/lat extent
-     * translated into pixel bounds for the overview map
-     */
-    getRectBoundsFromMapBounds: function(lonLatBounds) {
-        var leftBottomLonLat = new OpenLayers.LonLat(lonLatBounds.left,
-                                                     lonLatBounds.bottom);
-        var rightTopLonLat = new OpenLayers.LonLat(lonLatBounds.right,
-                                                   lonLatBounds.top);
-        var leftBottomPx = this.getOverviewPxFromLonLat(leftBottomLonLat);
-        var rightTopPx = this.getOverviewPxFromLonLat(rightTopLonLat);
-        var bounds = null;
-        if (leftBottomPx && rightTopPx) {
-            bounds = new OpenLayers.Bounds(leftBottomPx.x, leftBottomPx.y,
-                                           rightTopPx.x, rightTopPx.y);
-        }
-        return bounds;
-    },
-
-    /**
-     * Method: getMapBoundsFromRectBounds
-     * Get the map bounds from the rect bounds.
-     *
-     * Parameters:
-     * pxBounds - {<OpenLayers.Bounds>}
-     *
-     * Returns:
-     * {<OpenLayers.Bounds>} Bounds which is the passed-in overview rect bounds
-     * translated into lon/lat bounds for the overview map
-     */
-    getMapBoundsFromRectBounds: function(pxBounds) {
-        var leftBottomPx = new OpenLayers.Pixel(pxBounds.left,
-                                                pxBounds.bottom);
-        var rightTopPx = new OpenLayers.Pixel(pxBounds.right,
-                                              pxBounds.top);
-        var leftBottomLonLat = this.getLonLatFromOverviewPx(leftBottomPx);
-        var rightTopLonLat = this.getLonLatFromOverviewPx(rightTopPx);
-        return new OpenLayers.Bounds(leftBottomLonLat.lon, leftBottomLonLat.lat,
-                                     rightTopLonLat.lon, rightTopLonLat.lat);
-    },
-
-    /**
-     * Method: getLonLatFromOverviewPx
-     * Get a map location from a pixel location
-     *
-     * Parameters:
-     * overviewMapPx - {<OpenLayers.Pixel>}
-     *
-     * Returns:
-     * {<OpenLayers.LonLat>} Location which is the passed-in overview map
-     * OpenLayers.Pixel, translated into lon/lat by the overview map
-     */
-    getLonLatFromOverviewPx: function(overviewMapPx) {
-        var size = this.ovmap.size;
-        var res  = this.ovmap.getResolution();
-        var center = this.ovmap.getExtent().getCenterLonLat();
-    
-        var delta_x = overviewMapPx.x - (size.w / 2);
-        var delta_y = overviewMapPx.y - (size.h / 2);
-        
-        return new OpenLayers.LonLat(center.lon + delta_x * res ,
-                                     center.lat - delta_y * res); 
-    },
-
-    /**
-     * Method: getOverviewPxFromLonLat
-     * Get a pixel location from a map location
-     *
-     * Parameters:
-     * lonlat - {<OpenLayers.LonLat>}
-     *
-     * Returns:
-     * {<OpenLayers.Pixel>} Location which is the passed-in OpenLayers.LonLat, 
-     * translated into overview map pixels
-     */
-    getOverviewPxFromLonLat: function(lonlat) {
-        var res  = this.ovmap.getResolution();
-        var extent = this.ovmap.getExtent();
-        var px = null;
-        if (extent) {
-            px = new OpenLayers.Pixel(
-                        Math.round(1/res * (lonlat.lon - extent.left)),
-                        Math.round(1/res * (extent.top - lonlat.lat)));
-        } 
-        return px;
-    },
-
-    CLASS_NAME: 'OpenLayers.Control.OverviewMap'
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/Pan.js
+++ /dev/null
@@ -1,87 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- */
-
-/**
- * Class: OpenLayers.Control.Pan
- * The Pan control is a single button to pan the map in one direction. For
- * a more complete control see <OpenLayers.Control.PanPanel>.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.Pan = OpenLayers.Class(OpenLayers.Control, {
-
-    /** 
-     * APIProperty: slideFactor
-     * {Integer} Number of pixels by which we'll pan the map in any direction 
-     *     on clicking the arrow buttons, defaults to 50.
-     */
-    slideFactor: 50,
-
-    /** 
-     * Property: direction
-     * {String} in {'North', 'South', 'East', 'West'}
-     */
-    direction: null,
-
-    /**
-     * Property: type
-     * {String} The type of <OpenLayers.Control> -- When added to a 
-     *     <Control.Panel>, 'type' is used by the panel to determine how to 
-     *     handle our events.
-     */
-    type: OpenLayers.Control.TYPE_BUTTON,
-
-    /**
-     * Constructor: OpenLayers.Control.Pan 
-     * Control which handles the panning (in any of the cardinal directions)
-     *     of the map by a set px distance. 
-     *
-     * Parameters:
-     * direction - {String} The direction this button should pan.
-     * options - {Object} An optional object whose properties will be used
-     *     to extend the control.
-     */
-    initialize: function(direction, options) {
-    
-        this.direction = direction;
-        this.CLASS_NAME += this.direction;
-        
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * Method: trigger
-     */
-    trigger: function(){
-    
-        switch (this.direction) {
-            case OpenLayers.Control.Pan.NORTH: 
-                this.map.pan(0, -this.slideFactor);
-                break;
-            case OpenLayers.Control.Pan.SOUTH: 
-                this.map.pan(0, this.slideFactor);
-                break;
-            case OpenLayers.Control.Pan.WEST: 
-                this.map.pan(-this.slideFactor, 0);
-                break;
-            case OpenLayers.Control.Pan.EAST: 
-                this.map.pan(this.slideFactor, 0);
-                break;
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Control.Pan"
-});
-
-OpenLayers.Control.Pan.NORTH = "North";
-OpenLayers.Control.Pan.SOUTH = "South";
-OpenLayers.Control.Pan.EAST = "East";
-OpenLayers.Control.Pan.WEST = "West";
-

--- a/labs/openlayers/lib/OpenLayers/Control/PanPanel.js
+++ /dev/null
@@ -1,64 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control/Panel.js
- * @requires OpenLayers/Control/Pan.js
- */
-
-/**
- * Class: OpenLayers.Control.PanPanel
- * The PanPanel is visible control for panning the map North, South, East or
- * West in small steps. By default it is drawn in the top left corner of the
- * map.
- *
- * Note: 
- * If you wish to use this class with the default images and you want 
- *       it to look nice in ie6, you should add the following, conditionally
- *       added css stylesheet to your HTML file:
- * 
- * (code)
- * <!--[if lte IE 6]>
- *   <link rel="stylesheet" href="../theme/default/ie6-style.css" type="text/css" />
- * <![endif]-->
- * (end)
- *
- * Inherits from:
- *  - <OpenLayers.Control.Panel> 
- */
-OpenLayers.Control.PanPanel = OpenLayers.Class(OpenLayers.Control.Panel, {
-
-    /** 
-     * APIProperty: slideFactor
-     * {Integer} Number of pixels by which we'll pan the map in any direction 
-     *     on clicking the arrow buttons, defaults to 50.
-     */
-    slideFactor: 50,
-
-    /**
-     * Constructor: OpenLayers.Control.PanPanel 
-     * Add the four directional pan buttons.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be used
-     *     to extend the control.
-     */
-    initialize: function(options) {
-        OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
-        this.addControls([
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH,
-                                       {slideFactor: this.slideFactor}),
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH,
-                                       {slideFactor: this.slideFactor}),
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST,
-                                       {slideFactor: this.slideFactor}),
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST,
-                                       {slideFactor: this.slideFactor})
-        ]);
-    },
-
-    CLASS_NAME: "OpenLayers.Control.PanPanel"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/PanZoom.js
+++ /dev/null
@@ -1,247 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Control.js
- */
-
-/**
- * Class: OpenLayers.Control.PanZoom
- * The PanZoom is a visible control, composed of a
- * <OpenLayers.Control.PanPanel> and a <OpenLayers.Control.ZoomPanel>. By
- * default it is drawn in the upper left corner of the map.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, {
-
-    /** 
-     * APIProperty: slideFactor
-     * {Integer} Number of pixels by which we'll pan the map in any direction 
-     *     on clicking the arrow buttons.  If you want to pan by some ratio
-     *     of the map dimensions, use <slideRatio> instead.
-     */
-    slideFactor: 50,
-
-    /** 
-     * APIProperty: slideRatio
-     * {Number} The fraction of map width/height by which we'll pan the map            
-     *     on clicking the arrow buttons.  Default is null.  If set, will
-     *     override <slideFactor>. E.g. if slideRatio is .5, then the Pan Up
-     *     button will pan up half the map height. 
-     */
-    slideRatio: null,
-
-    /** 
-     * Property: buttons
-     * {Array(DOMElement)} Array of Button Divs 
-     */
-    buttons: null,
-
-    /** 
-     * Property: position
-     * {<OpenLayers.Pixel>} 
-     */
-    position: null,
-
-    /**
-     * Constructor: OpenLayers.Control.PanZoom
-     * 
-     * Parameters:
-     * options - {Object}
-     */
-    initialize: function(options) {
-        this.position = new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X,
-                                             OpenLayers.Control.PanZoom.Y);
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-    },
-
-    /**
-     * APIMethod: destroy
-     */
-    destroy: function() {
-        OpenLayers.Control.prototype.destroy.apply(this, arguments);
-        this.removeButtons();
-        this.buttons = null;
-        this.position = null;
-    },
-
-    /**
-     * Method: draw
-     *
-     * Parameters:
-     * px - {<OpenLayers.Pixel>} 
-     * 
-     * Returns:
-     * {DOMElement} A reference to the container div for the PanZoom control.
-     */
-    draw: function(px) {
-        // initialize our internal div
-        OpenLayers.Control.prototype.draw.apply(this, arguments);
-        px = this.position;
-
-        // place the controls
-        this.buttons = [];
-
-        var sz = new OpenLayers.Size(18,18);
-        var centered = new OpenLayers.Pixel(px.x+sz.w/2, px.y);
-
-        this._addButton("panup", "north-mini.png", centered, sz);
-        px.y = centered.y+sz.h;
-        this._addButton("panleft", "west-mini.png", px, sz);
-        this._addButton("panright", "east-mini.png", px.add(sz.w, 0), sz);
-        this._addButton("pandown", "south-mini.png", 
-                        centered.add(0, sz.h*2), sz);
-        this._addButton("zoomin", "zoom-plus-mini.png", 
-                        centered.add(0, sz.h*3+5), sz);
-        this._addButton("zoomworld", "zoom-world-mini.png", 
-                        centered.add(0, sz.h*4+5), sz);
-        this._addButton("zoomout", "zoom-minus-mini.png", 
-                        centered.add(0, sz.h*5+5), sz);
-        return this.div;
-    },
-    
-    /**
-     * Method: _addButton
-     * 
-     * Parameters:
-     * id - {String} 
-     * img - {String} 
-     * xy - {<OpenLayers.Pixel>} 
-     * sz - {<OpenLayers.Size>} 
-     * 
-     * Returns:
-     * {DOMElement} A Div (an alphaImageDiv, to be precise) that contains the
-     *     image of the button, and has all the proper event handlers set.
-     */
-    _addButton:function(id, img, xy, sz) {
-        var imgLocation = OpenLayers.Util.getImagesLocation() + img;
-        var btn = OpenLayers.Util.createAlphaImageDiv(
-                                    this.id + "_" + id, 
-                                    xy, sz, imgLocation, "absolute");
-
-        //we want to add the outer div
-        this.div.appendChild(btn);
-
-        OpenLayers.Event.observe(btn, "mousedown", 
-            OpenLayers.Function.bindAsEventListener(this.buttonDown, btn));
-        OpenLayers.Event.observe(btn, "dblclick", 
-            OpenLayers.Function.bindAsEventListener(this.doubleClick, btn));
-        OpenLayers.Event.observe(btn, "click", 
-            OpenLayers.Function.bindAsEventListener(this.doubleClick, btn));
-        btn.action = id;
-        btn.map = this.map;
-    
-        if(!this.slideRatio){
-            var slideFactorPixels = this.slideFactor;
-            var getSlideFactor = function() {
-                return slideFactorPixels;
-            };
-        } else {
-            var slideRatio = this.slideRatio;
-            var getSlideFactor = function(dim) {
-                return this.map.getSize()[dim] * slideRatio;
-            };
-        }
-
-        btn.getSlideFactor = getSlideFactor;
-
-        //we want to remember/reference the outer div
-        this.buttons.push(btn);
-        return btn;
-    },
-    
-    /**
-     * Method: _removeButton
-     * 
-     * Parameters:
-     * btn - {Object}
-     */
-    _removeButton: function(btn) {
-        OpenLayers.Event.stopObservingElement(btn);
-        btn.map = null;
-        btn.getSlideFactor = null;
-        this.div.removeChild(btn);
-        OpenLayers.Util.removeItem(this.buttons, btn);
-    },
-    
-    /**
-     * Method: removeButtons
-     */
-    removeButtons: function() {
-        for(var i=this.buttons.length-1; i>=0; --i) {
-            this._removeButton(this.buttons[i]);
-        }
-    },
-    
-    /**
-     * Method: doubleClick
-     *
-     * Parameters:
-     * evt - {Event} 
-     *
-     * Returns:
-     * {Boolean}
-     */
-    doubleClick: function (evt) {
-        OpenLayers.Event.stop(evt);
-        return false;
-    },
-    
-    /**
-     * Method: buttonDown
-     *
-     * Parameters:
-     * evt - {Event} 
-     */
-    buttonDown: function (evt) {
-        if (!OpenLayers.Event.isLeftClick(evt)) {
-            return;
-        }
-
-        switch (this.action) {
-            case "panup": 
-                this.map.pan(0, -this.getSlideFactor("h"));
-                break;
-            case "pandown": 
-                this.map.pan(0, this.getSlideFactor("h"));
-                break;
-            case "panleft": 
-                this.map.pan(-this.getSlideFactor("w"), 0);
-                break;
-            case "panright": 
-                this.map.pan(this.getSlideFactor("w"), 0);
-                break;
-            case "zoomin": 
-                this.map.zoomIn(); 
-                break;
-            case "zoomout": 
-                this.map.zoomOut(); 
-                break;
-            case "zoomworld": 
-                this.map.zoomToMaxExtent(); 
-                break;
-        }
-
-        OpenLayers.Event.stop(evt);
-    },
-
-    CLASS_NAME: "OpenLayers.Control.PanZoom"
-});
-
-/**
- * Constant: X
- * {Integer}
- */
-OpenLayers.Control.PanZoom.X = 4;
-
-/**
- * Constant: Y
- * {Integer}
- */
-OpenLayers.Control.PanZoom.Y = 4;
-

--- a/labs/openlayers/lib/OpenLayers/Control/PanZoomBar.js
+++ /dev/null
@@ -1,397 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Control/PanZoom.js
- */
-
-/**
- * Class: OpenLayers.Control.PanZoomBar
- * The PanZoomBar is a visible control composed of a
- * <OpenLayers.Control.PanPanel> and a <OpenLayers.Control.ZoomBar>. 
- * By default it is displayed in the upper left corner of the map as 4
- * directional arrows above a vertical slider.
- *
- * Inherits from:
- *  - <OpenLayers.Control.PanZoom>
- */
-OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
-
-    /** 
-     * APIProperty: zoomStopWidth
-     */
-    zoomStopWidth: 18,
-
-    /** 
-     * APIProperty: zoomStopHeight
-     */
-    zoomStopHeight: 11,
-
-    /** 
-     * Property: slider
-     */
-    slider: null,
-
-    /** 
-     * Property: sliderEvents
-     * {<OpenLayers.Events>}
-     */
-    sliderEvents: null,
-
-    /** 
-     * Property: zoombarDiv
-     * {DOMElement}
-     */
-    zoombarDiv: null,
-
-    /** 
-     * Property: divEvents
-     * {<OpenLayers.Events>}
-     */
-    divEvents: null,
-
-    /** 
-     * APIProperty: zoomWorldIcon
-     * {Boolean}
-     */
-    zoomWorldIcon: false,
-
-    /**
-     * APIProperty: forceFixedZoomLevel
-     * {Boolean} Force a fixed zoom level even though the map has 
-     *     fractionalZoom
-     */
-    forceFixedZoomLevel: false,
-
-    /**
-     * Property: mouseDragStart
-     * {<OpenLayers.Pixel>}
-     */
-    mouseDragStart: null,
-
-    /**
-     * Property: zoomStart
-     * {<OpenLayers.Pixel>}
-     */
-    zoomStart: null,
-
-    /**
-     * Constructor: OpenLayers.Control.PanZoomBar
-     */ 
-    initialize: function() {
-        OpenLayers.Control.PanZoom.prototype.initialize.apply(this, arguments);
-    },
-
-    /**
-     * APIMethod: destroy
-     */
-    destroy: function() {
-
-        this._removeZoomBar();
-
-        this.map.events.un({
-            "changebaselayer": this.redraw,
-            scope: this
-        });
-
-        OpenLayers.Control.PanZoom.prototype.destroy.apply(this, arguments);
-
-        delete this.mouseDragStart;
-        delete this.zoomStart;
-    },
-    
-    /**
-     * Method: setMap
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>} 
-     */
-    setMap: function(map) {
-        OpenLayers.Control.PanZoom.prototype.setMap.apply(this, arguments);
-        this.map.events.register("changebaselayer", this, this.redraw);
-    },
-
-    /** 
-     * Method: redraw
-     * clear the div and start over.
-     */
-    redraw: function() {
-        if (this.div != null) {
-            this.removeButtons();
-            this._removeZoomBar();
-        }  
-        this.draw();
-    },
-    
-    /**
-    * Method: draw 
-    *
-    * Parameters:
-    * px - {<OpenLayers.Pixel>} 
-    */
-    draw: function(px) {
-        // initialize our internal div
-        OpenLayers.Control.prototype.draw.apply(this, arguments);
-        px = this.position.clone();
-
-        // place the controls
-        this.buttons = [];
-
-        var sz = new OpenLayers.Size(18,18);
-        var centered = new OpenLayers.Pixel(px.x+sz.w/2, px.y);
-        var wposition = sz.w;
-
-        if (this.zoomWorldIcon) {
-            centered = new OpenLayers.Pixel(px.x+sz.w, px.y);
-        }
-
-        this._addButton("panup", "north-mini.png", centered, sz);
-        px.y = centered.y+sz.h;
-        this._addButton("panleft", "west-mini.png", px, sz);
-        if (this.zoomWorldIcon) {
-            this._addButton("zoomworld", "zoom-world-mini.png", px.add(sz.w, 0), sz);
-            
-            wposition *= 2;
-        }
-        this._addButton("panright", "east-mini.png", px.add(wposition, 0), sz);
-        this._addButton("pandown", "south-mini.png", centered.add(0, sz.h*2), sz);
-        this._addButton("zoomin", "zoom-plus-mini.png", centered.add(0, sz.h*3+5), sz);
-        centered = this._addZoomBar(centered.add(0, sz.h*4 + 5));
-        this._addButton("zoomout", "zoom-minus-mini.png", centered, sz);
-        return this.div;
-    },
-
-    /** 
-    * Method: _addZoomBar
-    * 
-    * Parameters:
-    * location - {<OpenLayers.Pixel>} where zoombar drawing is to start.
-    */
-    _addZoomBar:function(centered) {
-        var imgLocation = OpenLayers.Util.getImagesLocation();
-        
-        var id = this.id + "_" + this.map.id;
-        var zoomsToEnd = this.map.getNumZoomLevels() - 1 - this.map.getZoom();
-        var slider = OpenLayers.Util.createAlphaImageDiv(id,
-                       centered.add(-1, zoomsToEnd * this.zoomStopHeight), 
-                       new OpenLayers.Size(20,9), 
-                       imgLocation+"slider.png",
-                       "absolute");
-        this.slider = slider;
-        
-        this.sliderEvents = new OpenLayers.Events(this, slider, null, true,
-                                            {includeXY: true});
-        this.sliderEvents.on({
-            "mousedown": this.zoomBarDown,
-            "mousemove": this.zoomBarDrag,
-            "mouseup": this.zoomBarUp,
-            "dblclick": this.doubleClick,
-            "click": this.doubleClick
-        });
-        
-        var sz = new OpenLayers.Size();
-        sz.h = this.zoomStopHeight * this.map.getNumZoomLevels();
-        sz.w = this.zoomStopWidth;
-        var div = null;
-        
-        if (OpenLayers.Util.alphaHack()) {
-            var id = this.id + "_" + this.map.id;
-            div = OpenLayers.Util.createAlphaImageDiv(id, centered,
-                                      new OpenLayers.Size(sz.w, 
-                                              this.zoomStopHeight),
-                                      imgLocation + "zoombar.png", 
-                                      "absolute", null, "crop");
-            div.style.height = sz.h + "px";
-        } else {
-            div = OpenLayers.Util.createDiv(
-                        'OpenLayers_Control_PanZoomBar_Zoombar' + this.map.id,
-                        centered,
-                        sz,
-                        imgLocation+"zoombar.png");
-        }
-        
-        this.zoombarDiv = div;
-        
-        this.divEvents = new OpenLayers.Events(this, div, null, true, 
-                                                {includeXY: true});
-        this.divEvents.on({
-            "mousedown": this.divClick,
-            "mousemove": this.passEventToSlider,
-            "dblclick": this.doubleClick,
-            "click": this.doubleClick
-        });
-        
-        this.div.appendChild(div);
-
-        this.startTop = parseInt(div.style.top);
-        this.div.appendChild(slider);
-
-        this.map.events.register("zoomend", this, this.moveZoomBar);
-
-        centered = centered.add(0, 
-            this.zoomStopHeight * this.map.getNumZoomLevels());
-        return centered; 
-    },
-    
-    /**
-     * Method: _removeZoomBar
-     */
-    _removeZoomBar: function() {
-        this.sliderEvents.un({
-            "mousedown": this.zoomBarDown,
-            "mousemove": this.zoomBarDrag,
-            "mouseup": this.zoomBarUp,
-            "dblclick": this.doubleClick,
-            "click": this.doubleClick
-        });
-        this.sliderEvents.destroy();
-
-        this.divEvents.un({
-            "mousedown": this.divClick,
-            "mousemove": this.passEventToSlider,
-            "dblclick": this.doubleClick,
-            "click": this.doubleClick
-        });
-        this.divEvents.destroy();
-        
-        this.div.removeChild(this.zoombarDiv);
-        this.zoombarDiv = null;
-        this.div.removeChild(this.slider);
-        this.slider = null;
-        
-        this.map.events.unregister("zoomend", this, this.moveZoomBar);
-    },
-    
-    /**
-     * Method: passEventToSlider
-     * This function is used to pass events that happen on the div, or the map,
-     * through to the slider, which then does its moving thing.
-     *
-     * Parameters:
-     * evt - {<OpenLayers.Event>} 
-     */
-    passEventToSlider:function(evt) {
-        this.sliderEvents.handleBrowserEvent(evt);
-    },
-    
-    /**
-     * Method: divClick
-     * Picks up on clicks directly on the zoombar div
-     *           and sets the zoom level appropriately.
-     */
-    divClick: function (evt) {
-        if (!OpenLayers.Event.isLeftClick(evt)) {
-            return;
-        }
-        var y = evt.xy.y;
-        var top = OpenLayers.Util.pagePosition(evt.object)[1];
-        var levels = (y - top)/this.zoomStopHeight;
-        if(this.forceFixedZoomLevel || !this.map.fractionalZoom) {
-            levels = Math.floor(levels);
-        }    
-        var zoom = (this.map.getNumZoomLevels() - 1) - levels; 
-        zoom = Math.min(Math.max(zoom, 0), this.map.getNumZoomLevels() - 1);
-        this.map.zoomTo(zoom);
-        OpenLayers.Event.stop(evt);
-    },
-    
-    /*
-     * Method: zoomBarDown
-     * event listener for clicks on the slider
-     *
-     * Parameters:
-     * evt - {<OpenLayers.Event>} 
-     */
-    zoomBarDown:function(evt) {
-        if (!OpenLayers.Event.isLeftClick(evt)) {
-            return;
-        }
-        this.map.events.on({
-            "mousemove": this.passEventToSlider,
-            "mouseup": this.passEventToSlider,
-            scope: this
-        });
-        this.mouseDragStart = evt.xy.clone();
-        this.zoomStart = evt.xy.clone();
-        this.div.style.cursor = "move";
-        // reset the div offsets just in case the div moved
-        this.zoombarDiv.offsets = null; 
-        OpenLayers.Event.stop(evt);
-    },
-    
-    /*
-     * Method: zoomBarDrag
-     * This is what happens when a click has occurred, and the client is
-     * dragging.  Here we must ensure that the slider doesn't go beyond the
-     * bottom/top of the zoombar div, as well as moving the slider to its new
-     * visual location
-     *
-     * Parameters:
-     * evt - {<OpenLayers.Event>} 
-     */
-    zoomBarDrag:function(evt) {
-        if (this.mouseDragStart != null) {
-            var deltaY = this.mouseDragStart.y - evt.xy.y;
-            var offsets = OpenLayers.Util.pagePosition(this.zoombarDiv);
-            if ((evt.clientY - offsets[1]) > 0 && 
-                (evt.clientY - offsets[1]) < parseInt(this.zoombarDiv.style.height) - 2) {
-                var newTop = parseInt(this.slider.style.top) - deltaY;
-                this.slider.style.top = newTop+"px";
-                this.mouseDragStart = evt.xy.clone();
-            }
-            OpenLayers.Event.stop(evt);
-        }
-    },
-    
-    /*
-     * Method: zoomBarUp
-     * Perform cleanup when a mouseup event is received -- discover new zoom
-     * level and switch to it.
-     *
-     * Parameters:
-     * evt - {<OpenLayers.Event>} 
-     */
-    zoomBarUp:function(evt) {
-        if (!OpenLayers.Event.isLeftClick(evt)) {
-            return;
-        }
-        if (this.mouseDragStart) {
-            this.div.style.cursor="";
-            this.map.events.un({
-                "mouseup": this.passEventToSlider,
-                "mousemove": this.passEventToSlider,
-                scope: this
-            });
-            var deltaY = this.zoomStart.y - evt.xy.y;
-            var zoomLevel = this.map.zoom;
-            if (!this.forceFixedZoomLevel && this.map.fractionalZoom) {
-                zoomLevel += deltaY/this.zoomStopHeight;
-                zoomLevel = Math.min(Math.max(zoomLevel, 0), 
-                                     this.map.getNumZoomLevels() - 1);
-            } else {
-                zoomLevel += Math.round(deltaY/this.zoomStopHeight);
-            }
-            this.map.zoomTo(zoomLevel);
-            this.mouseDragStart = null;
-            this.zoomStart = null;
-            OpenLayers.Event.stop(evt);
-        }
-    },
-    
-    /*
-    * Method: moveZoomBar
-    * Change the location of the slider to match the current zoom level.
-    */
-    moveZoomBar:function() {
-        var newTop = 
-            ((this.map.getNumZoomLevels()-1) - this.map.getZoom()) * 
-            this.zoomStopHeight + this.startTop + 1;
-        this.slider.style.top = newTop + "px";
-    },    
-    
-    CLASS_NAME: "OpenLayers.Control.PanZoomBar"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/Panel.js
+++ /dev/null
@@ -1,372 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- */
-
-/**
- * Class: OpenLayers.Control.Panel
- * The Panel control is a container for other controls. With it toolbars
- * may be composed.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, {
-    /**
-     * Property: controls
-     * {Array(<OpenLayers.Control>)}
-     */
-    controls: null,    
-    
-    /**
-     * APIProperty: autoActivate
-     * {Boolean} Activate the control when it is added to a map.  Default is
-     *     true.
-     */
-    autoActivate: true,
-
-    /** 
-     * APIProperty: defaultControl
-     * {<OpenLayers.Control>} The control which is activated when the control is
-     * activated (turned on), which also happens at instantiation.
-     * If <saveState> is true, <defaultControl> will be nullified after the
-     * first activation of the panel.
-     */
-    defaultControl: null,
-    
-    /**
-     * APIProperty: saveState
-     * {Boolean} If set to true, the active state of this panel's controls will
-     * be stored on panel deactivation, and restored on reactivation. Default
-     * is false.
-     */
-    saveState: false,
-      
-    /**
-     * Property: activeState
-     * {Object} stores the active state of this panel's controls.
-     */
-    activeState: null,
-
-    /**
-     * Constructor: OpenLayers.Control.Panel
-     * Create a new control panel.
-     *
-     * Each control in the panel is represented by an icon. When clicking 
-     *     on an icon, the <activateControl> method is called.
-     *
-     * Specific properties for controls on a panel:
-     * type - {Number} One of <OpenLayers.Control.TYPE_TOOL>,
-     *     <OpenLayers.Control.TYPE_TOGGLE>, <OpenLayers.Control.TYPE_BUTTON>.
-     *     If not provided, <OpenLayers.Control.TYPE_TOOL> is assumed.
-     * title - {string} Text displayed when mouse is over the icon that 
-     *     represents the control.     
-     *
-     * The <OpenLayers.Control.type> of a control determines the behavior when
-     * clicking its icon:
-     * <OpenLayers.Control.TYPE_TOOL> - The control is activated and other
-     *     controls of this type in the same panel are deactivated. This is
-     *     the default type.
-     * <OpenLayers.Control.TYPE_TOGGLE> - The active state of the control is
-     *     toggled.
-     * <OpenLayers.Control.TYPE_BUTTON> - The
-     *     <OpenLayers.Control.Button.trigger> method of the control is called,
-     *     but its active state is not changed.
-     *
-     * If a control is <OpenLayers.Control.active>, it will be drawn with the
-     * olControl[Name]ItemActive class, otherwise with the
-     * olControl[Name]ItemInactive class.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be used
-     *     to extend the control.
-     */
-    initialize: function(options) {
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        this.controls = [];
-        this.activeState = {};
-    },
-
-    /**
-     * APIMethod: destroy
-     */
-    destroy: function() {
-        OpenLayers.Control.prototype.destroy.apply(this, arguments);
-        for(var i = this.controls.length - 1 ; i >= 0; i--) {
-            if(this.controls[i].events) {
-                this.controls[i].events.un({
-                    "activate": this.redraw,
-                    "deactivate": this.redraw,
-                    scope: this
-                });
-            }
-            OpenLayers.Event.stopObservingElement(this.controls[i].panel_div);
-            this.controls[i].panel_div = null;
-        }
-        this.activeState = null;
-    },
-
-    /**
-     * APIMethod: activate
-     */
-    activate: function() {
-        if (OpenLayers.Control.prototype.activate.apply(this, arguments)) {
-            var control;
-            for (var i=0, len=this.controls.length; i<len; i++) {
-                control = this.controls[i];
-                if (control === this.defaultControl ||
-                            (this.saveState && this.activeState[control.id])) {
-                    control.activate();
-                }
-            }    
-            if (this.saveState === true) {
-                this.defaultControl = null;
-            }
-            this.redraw();
-            return true;
-        } else {
-            return false;
-        }
-    },
-    
-    /**
-     * APIMethod: deactivate
-     */
-    deactivate: function() {
-        if (OpenLayers.Control.prototype.deactivate.apply(this, arguments)) {
-            var control;
-            for (var i=0, len=this.controls.length; i<len; i++) {
-                control = this.controls[i];
-                this.activeState[control.id] = control.deactivate();
-            }    
-            return true;
-        } else {
-            return false;
-        }
-    },
-    
-    /**
-     * Method: draw
-     *
-     * Returns:
-     * {DOMElement}
-     */    
-    draw: function() {
-        OpenLayers.Control.prototype.draw.apply(this, arguments);
-        this.addControlsToMap(this.controls);
-        return this.div;
-    },
-
-    /**
-     * Method: redraw
-     */
-    redraw: function() {
-        if (this.div.children.length>0) {
-            for (var l=this.div.children.length, i=l-1 ; i>=0 ; i--) {
-                this.div.removeChild(this.div.children[i]);
-            }
-        }
-        this.div.innerHTML = "";
-        if (this.active) {
-            for (var i=0, len=this.controls.length; i<len; i++) {
-                var element = this.controls[i].panel_div;
-                if (this.controls[i].active) {
-                    element.className = this.controls[i].displayClass + "ItemActive";
-                } else {    
-                    element.className = this.controls[i].displayClass + "ItemInactive";
-                }    
-                this.div.appendChild(element);
-            }
-        }
-    },
-
-    /**
-     * APIMethod: activateControl
-     * This method is called when the user click on the icon representing a 
-     *     control in the panel.
-     *
-     * Parameters:
-     * control - {<OpenLayers.Control>}
-     */
-    activateControl: function (control) {
-        if (!this.active) { return false; }
-        if (control.type == OpenLayers.Control.TYPE_BUTTON) {
-            control.trigger();
-            this.redraw();
-            return;
-        }
-        if (control.type == OpenLayers.Control.TYPE_TOGGLE) {
-            if (control.active) {
-                control.deactivate();
-            } else {
-                control.activate();
-            }
-            this.redraw();
-            return;
-        }
-        var c;
-        for (var i=0, len=this.controls.length; i<len; i++) {
-            c = this.controls[i];
-            if (c != control &&
-               (c.type === OpenLayers.Control.TYPE_TOOL || c.type == null)) {
-                c.deactivate();
-            }
-        }
-        control.activate();
-    },
-
-    /**
-     * APIMethod: addControls
-     * To build a toolbar, you add a set of controls to it. addControls
-     * lets you add a single control or a list of controls to the 
-     * Control Panel.
-     *
-     * Parameters:
-     * controls - {<OpenLayers.Control>} Controls to add in the panel.
-     */    
-    addControls: function(controls) {
-        if (!(controls instanceof Array)) {
-            controls = [controls];
-        }
-        this.controls = this.controls.concat(controls);
-        
-        // Give each control a panel_div which will be used later.
-        // Access to this div is via the panel_div attribute of the 
-        // control added to the panel.
-        // Also, stop mousedowns and clicks, but don't stop mouseup,
-        // since they need to pass through.
-        for (var i=0, len=controls.length; i<len; i++) {
-            var element = document.createElement("div");
-            controls[i].panel_div = element;
-            if (controls[i].title != "") {
-                controls[i].panel_div.title = controls[i].title;
-            }
-            OpenLayers.Event.observe(controls[i].panel_div, "click", 
-                OpenLayers.Function.bind(this.onClick, this, controls[i]));
-            OpenLayers.Event.observe(controls[i].panel_div, "dblclick", 
-                OpenLayers.Function.bind(this.onDoubleClick, this, controls[i]));
-            OpenLayers.Event.observe(controls[i].panel_div, "mousedown", 
-                OpenLayers.Function.bindAsEventListener(OpenLayers.Event.stop));
-        }    
-
-        if (this.map) { // map.addControl() has already been called on the panel
-            this.addControlsToMap(controls);
-            this.redraw();
-        }
-    },
-   
-    /**
-     * Method: addControlsToMap
-     * Only for internal use in draw() and addControls() methods.
-     *
-     * Parameters:
-     * controls - {Array(<OpenLayers.Control>)} Controls to add into map.
-     */         
-    addControlsToMap: function (controls) {
-        var control;
-        for (var i=0, len=controls.length; i<len; i++) {
-            control = controls[i];
-            if (control.autoActivate === true) {
-                control.autoActivate = false;
-                this.map.addControl(control);
-                control.autoActivate = true;
-            } else {
-                this.map.addControl(control);
-                control.deactivate();
-            }
-            control.events.on({
-                "activate": this.redraw,
-                "deactivate": this.redraw,
-                scope: this
-            });
-        }  
-    },
-
-    /**
-     * Method: onClick
-     */
-    onClick: function (ctrl, evt) {
-        OpenLayers.Event.stop(evt ? evt : window.event);
-        this.activateControl(ctrl);
-    },
-
-    /**
-     * Method: onDoubleClick
-     */
-    onDoubleClick: function(ctrl, evt) {
-        OpenLayers.Event.stop(evt ? evt : window.event);
-    },
-
-    /**
-     * APIMethod: getControlsBy
-     * Get a list of controls with properties matching the given criteria.
-     *
-     * Parameter:
-     * property - {String} A control property to be matched.
-     * match - {String | Object} A string to match.  Can also be a regular
-     *     expression literal or object.  In addition, it can be any object
-     *     with a method named test.  For reqular expressions or other, if
-     *     match.test(control[property]) evaluates to true, the control will be
-     *     included in the array returned.  If no controls are found, an empty
-     *     array is returned.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Control>)} A list of controls matching the given criteria.
-     *     An empty array is returned if no matches are found.
-     */
-    getControlsBy: function(property, match) {
-        var test = (typeof match.test == "function");
-        var found = OpenLayers.Array.filter(this.controls, function(item) {
-            return item[property] == match || (test && match.test(item[property]));
-        });
-        return found;
-    },
-
-    /**
-     * APIMethod: getControlsByName
-     * Get a list of contorls with names matching the given name.
-     *
-     * Parameter:
-     * match - {String | Object} A control name.  The name can also be a regular
-     *     expression literal or object.  In addition, it can be any object
-     *     with a method named test.  For reqular expressions or other, if
-     *     name.test(control.name) evaluates to true, the control will be included
-     *     in the list of controls returned.  If no controls are found, an empty
-     *     array is returned.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Control>)} A list of controls matching the given name.
-     *     An empty array is returned if no matches are found.
-     */
-    getControlsByName: function(match) {
-        return this.getControlsBy("name", match);
-    },
-
-    /**
-     * APIMethod: getControlsByClass
-     * Get a list of controls of a given type (CLASS_NAME).
-     *
-     * Parameter:
-     * match - {String | Object} A control class name.  The type can also be a
-     *     regular expression literal or object.  In addition, it can be any
-     *     object with a method named test.  For reqular expressions or other,
-     *     if type.test(control.CLASS_NAME) evaluates to true, the control will
-     *     be included in the list of controls returned.  If no controls are
-     *     found, an empty array is returned.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Control>)} A list of controls matching the given type.
-     *     An empty array is returned if no matches are found.
-     */
-    getControlsByClass: function(match) {
-        return this.getControlsBy("CLASS_NAME", match);
-    },
-
-    CLASS_NAME: "OpenLayers.Control.Panel"
-});
-
-

--- a/labs/openlayers/lib/OpenLayers/Control/Permalink.js
+++ /dev/null
@@ -1,221 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Control/ArgParser.js
- */
-
-/**
- * Class: OpenLayers.Control.Permalink
- * The Permalink control is hyperlink that will return the user to the 
- * current map view. By default it is drawn in the lower right corner of the
- * map. The href is updated as the map is zoomed, panned and whilst layers
- * are switched.
- * `
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.Permalink = OpenLayers.Class(OpenLayers.Control, {
-    
-    /**
-     * APIProperty: argParserClass
-     * {Class} The ArgParser control class (not instance) to use with this
-     *     control.
-     */
-    argParserClass: OpenLayers.Control.ArgParser,
-
-    /** 
-     * Property: element 
-     * {DOMElement}
-     */
-    element: null,
-    
-    /** 
-     * APIProperty: base
-     * {String}
-     */
-    base: '',
-
-    /** 
-     * APIProperty: displayProjection
-     * {<OpenLayers.Projection>} Requires proj4js support.  Projection used
-     *     when creating the coordinates in the link. This will reproject the
-     *     map coordinates into display coordinates. If you are using this
-     *     functionality, the permalink which is last added to the map will
-     *     determine the coordinate type which is read from the URL, which
-     *     means you should not add permalinks with different
-     *     displayProjections to the same map. 
-     */
-    displayProjection: null, 
-
-    /**
-     * Constructor: OpenLayers.Control.Permalink
-     *
-     * Parameters: 
-     * element - {DOMElement} 
-     * base - {String} 
-     * options - {Object} options to the control. 
-     */
-    initialize: function(element, base, options) {
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        this.element = OpenLayers.Util.getElement(element);        
-        this.base = base || document.location.href;
-    },
-
-    /**
-     * APIMethod: destroy
-     */
-    destroy: function()  {
-        if (this.element.parentNode == this.div) {
-            this.div.removeChild(this.element);
-        }
-        this.element = null;
-
-        this.map.events.unregister('moveend', this, this.updateLink);
-
-        OpenLayers.Control.prototype.destroy.apply(this, arguments); 
-    },
-
-    /**
-     * Method: setMap
-     * Set the map property for the control. 
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>} 
-     */
-    setMap: function(map) {
-        OpenLayers.Control.prototype.setMap.apply(this, arguments);
-
-        //make sure we have an arg parser attached
-        for(var i=0, len=this.map.controls.length; i<len; i++) {
-            var control = this.map.controls[i];
-            if (control.CLASS_NAME == this.argParserClass.CLASS_NAME) {
-                
-                // If a permalink is added to the map, and an ArgParser already
-                // exists, we override the displayProjection to be the one
-                // on the permalink. 
-                if (control.displayProjection != this.displayProjection) {
-                    this.displayProjection = control.displayProjection;
-                }    
-                
-                break;
-            }
-        }
-        if (i == this.map.controls.length) {
-            this.map.addControl(new this.argParserClass(
-                { 'displayProjection': this.displayProjection }));       
-        }
-
-    },
-
-    /**
-     * Method: draw
-     *
-     * Returns:
-     * {DOMElement}
-     */    
-    draw: function() {
-        OpenLayers.Control.prototype.draw.apply(this, arguments);
-          
-        if (!this.element) {
-            this.div.className = this.displayClass;
-            this.element = document.createElement("a");
-            this.element.innerHTML = OpenLayers.i18n("permalink");
-            this.element.href="";
-            this.div.appendChild(this.element);
-        }
-        this.map.events.on({
-            'moveend': this.updateLink,
-            'changelayer': this.updateLink,
-            'changebaselayer': this.updateLink,
-            scope: this
-        });
-        
-        // Make it so there is at least a link even though the map may not have
-        // moved yet.
-        this.updateLink();
-        
-        return this.div;
-    },
-   
-    /**
-     * Method: updateLink 
-     */
-    updateLink: function() {
-        var href = this.base;
-        if (href.indexOf('?') != -1) {
-            href = href.substring( 0, href.indexOf('?') );
-        }
-
-        href += '?' + OpenLayers.Util.getParameterString(this.createParams());
-        this.element.href = href;
-    }, 
-    
-    /**
-     * APIMethod: createParams
-     * Creates the parameters that need to be encoded into the permalink url.
-     * 
-     * Parameters:
-     * center - {<OpenLayers.LonLat>} center to encode in the permalink.
-     *     Defaults to the current map center.
-     * zoom - {Integer} zoom level to encode in the permalink. Defaults to the
-     *     current map zoom level.
-     * layers - {Array(<OpenLayers.Layer>)} layers to encode in the permalink.
-     *     Defaults to the current map layers.
-     * 
-     * Returns:
-     * {Object} Hash of parameters that will be url-encoded into the
-     * permalink.
-     */
-    createParams: function(center, zoom, layers) {
-        center = center || this.map.getCenter();
-          
-        var params = OpenLayers.Util.getParameters(this.base);
-        
-        // If there's still no center, map is not initialized yet. 
-        // Break out of this function, and simply return the params from the
-        // base link.
-        if (center) { 
-
-            //zoom
-            params.zoom = zoom || this.map.getZoom(); 
-
-            //lon,lat
-            var lat = center.lat;
-            var lon = center.lon;
-            
-            if (this.displayProjection) {
-                var mapPosition = OpenLayers.Projection.transform(
-                  { x: lon, y: lat }, 
-                  this.map.getProjectionObject(), 
-                  this.displayProjection );
-                lon = mapPosition.x;  
-                lat = mapPosition.y;  
-            }       
-            params.lat = Math.round(lat*100000)/100000;
-            params.lon = Math.round(lon*100000)/100000;
-    
-            //layers        
-            layers = layers || this.map.layers;  
-            params.layers = '';
-            for (var i=0, len=layers.length; i<len; i++) {
-                var layer = layers[i];
-    
-                if (layer.isBaseLayer) {
-                    params.layers += (layer == this.map.baseLayer) ? "B" : "0";
-                } else {
-                    params.layers += (layer.getVisibility()) ? "T" : "F";           
-                }
-            }
-        }
-
-        return params;
-    }, 
-
-    CLASS_NAME: "OpenLayers.Control.Permalink"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/SLDSelect.js
+++ /dev/null
@@ -1,570 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Layer/WMS/Post.js
- * @requires OpenLayers/Handler/RegularPolygon.js
- * @requires OpenLayers/Handler/Polygon.js
- * @requires OpenLayers/Handler/Path.js
- * @requires OpenLayers/Handler/Click.js
- * @requires OpenLayers/Filter/Spatial.js
- */
-
-/**
- * Class: OpenLayers.Control.SLDSelect
- * Perform selections on WMS layers using Styled Layer Descriptor (SLD)
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.SLDSelect = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * Constant: EVENT_TYPES
-     * {Array(String)} Supported application event types.  Register a listener
-     *     for a particular event with the following syntax:
-     * (code)
-     * control.events.register(type, obj, listener);
-     * (end)
-     *
-     * Listeners will be called with a reference to an event object.  The
-     *     properties of this event depends on exactly what happened.
-     *
-     * Supported control event types (in addition to those from 
-     * <OpenLayers.Control>):
-     * selected - Triggered when a selection occurs.  Listeners receive an 
-     *     event with *filters* and *layer* properties.  Filters will be an 
-     *     array of OpenLayers.Filter objects created in order to perform 
-     *     the particular selection.
-     */
-    EVENT_TYPES: ["selected"],
-
-    /**
-     * APIProperty: clearOnDeactivate
-     * {Boolean} Should the selection be cleared when the control is 
-     *     deactivated. Default value is false.
-     */
-    clearOnDeactivate: false,
-
-    /**
-     * APIProperty: layers
-     * {Array(<OpenLayers.Layer.WMS>)} The WMS layers this control will work 
-     *     on.
-     */
-    layers: null,
-
-    /**
-     * Property: callbacks
-     * {Object} The functions that are sent to the handler for callback
-     */
-    callbacks: null,
-
-    /**
-     * APIProperty: selectionSymbolizer
-     * {Object} Determines the styling of the selected objects. Default is
-     *     a selection in red.
-     */
-    selectionSymbolizer: {
-        'Polygon': {fillColor: '#FF0000', stroke: false},
-        'Line': {strokeColor: '#FF0000', strokeWidth: 2},
-        'Point': {graphicName: 'square', fillColor: '#FF0000', pointRadius: 5}
-    },
-
-    /**
-     * APIProperty: layerOptions
-     * {Object} The options to apply to the selection layer, by default the
-     *     selection layer will be kept out of the layer switcher.
-     */
-    layerOptions: null,
-
-    /**
-     * APIProperty: handlerOptions
-     * {Object} Used to set non-default properties on the control's handler
-     */
-    handlerOptions: null,
-
-    /**
-     * APIProperty: sketchStyle
-     * {<OpenLayers.Style>|Object} Style or symbolizer to use for the sketch
-     * handler. The recommended way of styling the sketch layer, however, is
-     * to configure an <OpenLayers.StyleMap> in the layerOptions of the
-     * <handlerOptions>:
-     * 
-     * (code)
-     * new OpenLayers.Control.SLDSelect(OpenLayers.Handler.Path, {
-     *     handlerOptions: {
-     *         layerOptions: {
-     *             styleMap: new OpenLayers.StyleMap({
-     *                 "default": {strokeColor: "yellow"}
-     *             });
-     *         }
-     *     }
-     * });
-     * (end)
-     */
-    sketchStyle: null,
-
-    /**
-     * APIProperty: wfsCache
-     * {Object} Cache to use for storing parsed results from
-     *     <OpenLayers.Format.WFSDescribeFeatureType.read>. If not provided,
-     *     these will be cached on the prototype.
-     */
-    wfsCache: {},
-
-    /**
-     * APIProperty: layerCache
-     * {Object} Cache to use for storing references to the selection layers.
-     *     Normally each source layer will have exactly 1 selection layer of
-     *     type OpenLayers.Layer.WMS.Post. If not provided, layers will
-     *     be cached on the prototype. Note that if <clearOnDeactivate> is
-     *     true, the layer will no longer be cached after deactivating the
-     *     control.
-     */
-    layerCache: {},
-
-    /**
-     * Constructor: OpenLayers.Control.SLDSelect
-     * Create a new control for selecting features in WMS layers using
-     *     Styled Layer Descriptor (SLD).
-     *
-     * Parameters:
-     * handler - {<OpenLayers.Class>} A sketch handler class. This determines
-     *     the type of selection, e.g. box (<OpenLayers.Handler.Box>), point
-     *     (<OpenLayers.Handler.Point>), path (<OpenLayers.Handler.Path>) or
-     *     polygon (<OpenLayers.Handler.Polygon>) selection. To use circle
-     *     type selection, use <OpenLayers.Handler.RegularPolygon> and pass
-     *     the number of desired sides (e.g. 40) as "sides" property to the
-     *     <handlerOptions>.
-     * options - {Object} An object containing all configuration properties for
-     *     the control.
-     *
-     * Valid options:
-     * layers - Array({<OpenLayers.Layer.WMS>}) The layers to perform the
-     *     selection on.
-     */
-    initialize: function(handler, options) {
-        // concatenate events specific to this control with those from the base
-        this.EVENT_TYPES =
-            OpenLayers.Control.SLDSelect.prototype.EVENT_TYPES.concat(
-            OpenLayers.Control.prototype.EVENT_TYPES
-        );
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-
-        this.callbacks = OpenLayers.Util.extend({done: this.select, 
-            click: this.select}, this.callbacks);
-        this.handlerOptions = this.handlerOptions || {};
-        this.layerOptions = OpenLayers.Util.applyDefaults(this.layerOptions, {
-            displayInLayerSwitcher: false
-        });
-        if (this.sketchStyle) {
-            this.handlerOptions.layerOptions = OpenLayers.Util.applyDefaults(
-                this.handlerOptions.layerOptions,
-                {styleMap: new OpenLayers.StyleMap({"default": this.sketchStyle})}
-            );
-        }
-        this.handler = new handler(this, this.callbacks, this.handlerOptions);
-    },
-
-    /**
-     * APIMethod: destroy
-     * Take care of things that are not handled in superclass.
-     */
-    destroy: function() {
-        for (var key in this.layerCache) {
-            delete this.layerCache[key];
-        }
-        for (var key in this.wfsCache) {
-            delete this.wfsCache[key];
-        }
-        OpenLayers.Control.prototype.destroy.apply(this, arguments);
-    },
-
-    /**
-     * Method: coupleLayerVisiblity
-     * Couple the selection layer and the source layer with respect to
-     *     layer visibility. So if the source layer is turned off, the
-     *     selection layer is also turned off.
-     *
-     * Parameters:
-     * evt - {Object}
-     */
-    coupleLayerVisiblity: function(evt) {
-        this.setVisibility(evt.object.getVisibility());
-    },
-
-    /**
-     * Method: createSelectionLayer
-     * Creates a "clone" from the source layer in which the selection can
-     * be drawn. This ensures both the source layer and the selection are 
-     * visible and not only the selection.
-     *
-     * Parameters:
-     * source - {<OpenLayers.Layer.WMS>} The source layer on which the selection
-     *     is performed.
-     *
-     * Returns:
-     * {<OpenLayers.Layer.WMS.Post>} A WMS Post layer since SLD selections can
-     *     easily get quite long.
-     */
-    createSelectionLayer: function(source) {
-        // check if we already have a selection layer for the source layer
-        var selectionLayer;
-        if (!this.layerCache[source.id]) {
-            selectionLayer = new OpenLayers.Layer.WMS.Post(source.name, 
-                source.url, source.params, 
-                OpenLayers.Util.applyDefaults(
-                    this.layerOptions,
-                    source.getOptions())
-            );
-            this.layerCache[source.id] = selectionLayer;
-            // make sure the layers are coupled wrt visibility, but only
-            // if they are not displayed in the layer switcher, because in
-            // that case the user cannot control visibility.
-            if (this.layerOptions.displayInLayerSwitcher === false) {
-                source.events.on({
-                    "visibilitychanged": this.coupleLayerVisiblity,
-                    scope: selectionLayer});
-            }
-            this.map.addLayer(selectionLayer);
-        } else {
-            selectionLayer = this.layerCache[source.id];
-        }
-        return selectionLayer;
-    },
-
-    /**
-     * Method: createSLD
-     * Create the SLD document for the layer using the supplied filters.
-     *
-     * Parameters:
-     * layer - {<OpenLayers.Layer.WMS>}
-     * filters - Array({<OpenLayers.Filter>}) The filters to be applied.
-     * geometryAttributes - Array({Object}) The geometry attributes of the 
-     *     layer.
-     *
-     * Returns:
-     * {String} The SLD document generated as a string.
-     */
-    createSLD: function(layer, filters, geometryAttributes) {
-        var sld = {version: "1.0.0", namedLayers: {}};
-        var layerNames = [layer.params.LAYERS].join(",").split(",");
-        for (var i=0, len=layerNames.length; i<len; i++) { 
-            var name = layerNames[i];
-            sld.namedLayers[name] = {name: name, userStyles: []};
-            var symbolizer = this.selectionSymbolizer;
-            var geometryAttribute = geometryAttributes[i];
-            if (geometryAttribute.type.indexOf('Polygon') >= 0) {
-                symbolizer = {Polygon: this.selectionSymbolizer['Polygon']};
-            } else if (geometryAttribute.type.indexOf('LineString') >= 0) {
-                symbolizer = {Line: this.selectionSymbolizer['Line']};
-            } else if (geometryAttribute.type.indexOf('Point') >= 0) {
-                symbolizer = {Point: this.selectionSymbolizer['Point']};
-            }
-            var filter = filters[i];
-            sld.namedLayers[name].userStyles.push({name: 'default', rules: [
-                new OpenLayers.Rule({symbolizer: symbolizer, 
-                    filter: filter, 
-                    maxScaleDenominator: layer.options.minScale})
-            ]});
-        }
-        return new OpenLayers.Format.SLD().write(sld);
-    },
-
-    /**
-     * Method: parseDescribeLayer
-     * Parse the SLD WMS DescribeLayer response and issue the corresponding
-     *     WFS DescribeFeatureType request
-     *
-     * request - {XMLHttpRequest} The request object.
-     */
-    parseDescribeLayer: function(request) {
-        var format = new OpenLayers.Format.WMSDescribeLayer();
-        var doc = request.responseXML;
-        if(!doc || !doc.documentElement) {
-            doc = request.responseText;
-        }
-        var describeLayer = format.read(doc);
-        var typeNames = [];
-        var url = null;
-        for (var i=0, len=describeLayer.length; i<len; i++) {
-            // perform a WFS DescribeFeatureType request
-            if (describeLayer[i].owsType == "WFS") {
-                typeNames.push(describeLayer[i].typeName);
-                url = describeLayer[i].owsURL;
-            }
-        }
-        var options = {
-            url: url,
-            params: {
-                SERVICE: "WFS",
-                TYPENAME: typeNames.toString(),
-                REQUEST: "DescribeFeatureType",
-                VERSION: "1.0.0"
-            },
-            callback: function(request) {
-                var format = new OpenLayers.Format.WFSDescribeFeatureType();
-                var doc = request.responseXML;
-                if(!doc || !doc.documentElement) {
-                    doc = request.responseText;
-                }
-                var describeFeatureType = format.read(doc);
-                this.control.wfsCache[this.layer.id] = describeFeatureType;
-                this.control._queue && this.control.applySelection();
-            },
-            scope: this
-        };
-        OpenLayers.Request.GET(options);
-    },
-
-   /**
-    * Method: getGeometryAttributes
-    * Look up the geometry attributes from the WFS DescribeFeatureType response
-    *
-    * Parameters:
-    * layer - {<OpenLayers.Layer.WMS>} The layer for which to look up the 
-    *     geometry attributes.
-    *
-    * Returns:
-    * Array({Object}) Array of geometry attributes
-    */ 
-   getGeometryAttributes: function(layer) {
-        var result = [];
-        var cache = this.wfsCache[layer.id];
-        for (var i=0, len=cache.featureTypes.length; i<len; i++) {
-            var typeName = cache.featureTypes[i];
-            var properties = typeName.properties;
-            for (var j=0, lenj=properties.length; j < lenj; j++) {
-                var property = properties[j];
-                var type = property.type;
-                if ((type.indexOf('LineString') >= 0) ||
-                    (type.indexOf('GeometryAssociationType') >=0) ||
-                    (type.indexOf('GeometryPropertyType') >= 0) ||
-                    (type.indexOf('Point') >= 0) ||
-                    (type.indexOf('Polygon') >= 0) ) {
-                        result.push(property);
-                }
-            }
-        }
-        return result;
-    },
-
-    /**
-     * APIMethod: activate
-     * Activate the control. Activating the control will perform a SLD WMS
-     *     DescribeLayer request followed by a WFS DescribeFeatureType request
-     *     so that the proper symbolizers can be chosen based on the geometry
-     *     type.
-     */
-    activate: function() {
-        var activated = OpenLayers.Control.prototype.activate.call(this);
-        if(activated) {
-            for (var i=0, len=this.layers.length; i<len; i++) {
-                var layer = this.layers[i];
-                if (layer && !this.wfsCache[layer.id]) {
-                    var options = {
-                        url: layer.url,
-                        params: {
-                            SERVICE: "WMS",
-                            VERSION: layer.params.VERSION,
-                            LAYERS: layer.params.LAYERS,
-                            REQUEST: "DescribeLayer"
-                        },
-                        callback: this.parseDescribeLayer,
-                        scope: {layer: layer, control: this}
-                    };
-                    OpenLayers.Request.GET(options);
-                }
-            }
-        }
-        return activated;
-    },
-
-    /**
-     * APIMethod: deactivate
-     * Deactivate the control. If clearOnDeactivate is true, remove the
-     *     selection layer(s).
-     */
-    deactivate: function() {
-        var deactivated = OpenLayers.Control.prototype.deactivate.call(this);
-        if(deactivated) {
-            for (var i=0, len=this.layers.length; i<len; i++) {
-                var layer = this.layers[i];
-                if (layer && this.clearOnDeactivate === true) {
-                    var layerCache = this.layerCache;
-                    var selectionLayer = layerCache[layer.id];
-                    if (selectionLayer) {
-                        layer.events.un({
-                            "visibilitychanged": this.coupleLayerVisiblity,
-                            scope: selectionLayer});
-                        selectionLayer.destroy();
-                        delete layerCache[layer.id];
-                    }
-                }
-            }
-        }
-        return deactivated;
-    },
-
-    /**
-     * APIMethod: setLayers
-     * Set the layers on which the selection should be performed.  Call the 
-     *     setLayers method if the layer(s) to be used change and the same 
-     *     control should be used on a new set of layers.
-     *     If the control is already active, it will be active after the new
-     *     set of layers is set.
-     *
-     * Parameters:
-     * layers - {Array(<OpenLayers.Layer.WMS>)}  The new set of layers on which 
-     *     the selection should be performed.
-     */
-    setLayers: function(layers) {
-        if(this.active) {
-            this.deactivate();
-            this.layers = layers;
-            this.activate();
-        } else {
-            this.layers = layers;
-        }
-    },
-
-    /**
-     * Function: createFilter
-     * Create the filter to be used in the SLD.
-     *
-     * Parameters:
-     * geometryAttribute - {Object} Used to get the name of the geometry 
-     *     attribute which is needed for constructing the spatial filter.
-     * geometry - {<OpenLayers.Geometry>} The geometry to use.
-     *
-     * Returns:
-     * {<OpenLayers.Filter.Spatial>} The spatial filter created.
-     */
-    createFilter: function(geometryAttribute, geometry) {
-        var filter = null;
-        if (this.handler instanceof OpenLayers.Handler.RegularPolygon) {
-            // box
-            if (this.handler.irregular === true) {
-                filter = new OpenLayers.Filter.Spatial({
-                    type: OpenLayers.Filter.Spatial.BBOX,
-                    property: geometryAttribute.name,
-                    value: geometry.getBounds()}
-                );
-            } else {
-                filter = new OpenLayers.Filter.Spatial({
-                    type: OpenLayers.Filter.Spatial.INTERSECTS,
-                    property: geometryAttribute.name,
-                    value: geometry}
-                );
-            }
-        } else if (this.handler instanceof OpenLayers.Handler.Polygon) {
-            filter = new OpenLayers.Filter.Spatial({
-                type: OpenLayers.Filter.Spatial.INTERSECTS,
-                property: geometryAttribute.name,
-                value: geometry}
-            );
-        } else if (this.handler instanceof OpenLayers.Handler.Path) {
-            // if source layer is point based, use DWITHIN instead
-            if (geometryAttribute.type.indexOf('Point') >= 0) {
-                filter = new OpenLayers.Filter.Spatial({
-                    type: OpenLayers.Filter.Spatial.DWITHIN,
-                    property: geometryAttribute.name,
-                    distance: this.map.getExtent().getWidth()*0.01 ,
-                    distanceUnits: this.map.getUnits(),
-                    value: geometry}
-                );
-            } else {
-                filter = new OpenLayers.Filter.Spatial({
-                    type: OpenLayers.Filter.Spatial.INTERSECTS,
-                    property: geometryAttribute.name,
-                    value: geometry}
-                );
-            }
-        } else if (this.handler instanceof OpenLayers.Handler.Click) {
-            if (geometryAttribute.type.indexOf('Polygon') >= 0) {
-                filter = new OpenLayers.Filter.Spatial({
-                    type: OpenLayers.Filter.Spatial.INTERSECTS,
-                    property: geometryAttribute.name,
-                    value: geometry}
-                );
-            } else {
-                filter = new OpenLayers.Filter.Spatial({
-                    type: OpenLayers.Filter.Spatial.DWITHIN,
-                    property: geometryAttribute.name,
-                    distance: this.map.getExtent().getWidth()*0.01 ,
-                    distanceUnits: this.map.getUnits(),
-                    value: geometry}
-                );
-            }
-        }
-        return filter;
-    },
-
-    /**
-     * Method: select
-     * When the handler is done, use SLD_BODY on the selection layer to
-     *     display the selection in the map.
-     *
-     * Parameters:
-     * geometry - {Object} or {<OpenLayers.Geometry>}
-     */
-    select: function(geometry) {
-        this._queue = function() {
-            for (var i=0, len=this.layers.length; i<len; i++) {
-                var layer = this.layers[i];
-                var geometryAttributes = this.getGeometryAttributes(layer);
-                var filters = [];
-                for (var j=0, lenj=geometryAttributes.length; j<lenj; j++) {
-                    var geometryAttribute = geometryAttributes[j];
-                    if (geometryAttribute !== null) {
-                        // from the click handler we will not get an actual 
-                        // geometry so transform
-                        if (!(geometry instanceof OpenLayers.Geometry)) {
-                            var point = this.map.getLonLatFromPixel(
-                                geometry.xy);
-                            geometry = new OpenLayers.Geometry.Point(
-                                point.lon, point.lat);
-                        }
-                        var filter = this.createFilter(geometryAttribute,
-                        geometry);
-                        if (filter !== null) {
-                            filters.push(filter);
-                        }
-                    }
-                }
-    
-                var selectionLayer = this.createSelectionLayer(layer);
-                var sld = this.createSLD(layer, filters, geometryAttributes);
-    
-                this.events.triggerEvent("selected", {
-                    layer: layer,
-                    filters: filters
-                });
-    
-                selectionLayer.mergeNewParams({SLD_BODY: sld});
-                delete this._queue;
-            }
-        };
-        this.applySelection();
-    },
-    
-    /**
-     * Method: applySelection
-     * Checks if all required wfs data is cached, and applies the selection
-     */
-    applySelection: function() {
-        var canApply = true;
-        for (var i=0, len=this.layers.length; i<len; i++) {
-            if(!this.wfsCache[this.layers[i].id]) {
-                canApply = false;
-                break;
-            }
-        }
-        canApply && this._queue.call(this);
-    },
-
-    CLASS_NAME: "OpenLayers.Control.SLDSelect"
-});

--- a/labs/openlayers/lib/OpenLayers/Control/Scale.js
+++ /dev/null
@@ -1,100 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Control.js
- */
-
-/**
- * Class: OpenLayers.Control.Scale
- * The Scale control displays the current map scale as a ratio (e.g. Scale = 
- * 1:1M). By default it is displayed in the lower right corner of the map.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.Scale = OpenLayers.Class(OpenLayers.Control, {
-    
-    /**
-     * Parameter: element
-     * {DOMElement}
-     */
-    element: null,
-    
-    /**
-     * APIProperty: geodesic
-     * {Boolean} Use geodesic measurement. Default is false. The recommended
-     * setting for maps in EPSG:4326 is false, and true EPSG:900913. If set to
-     * true, the scale will be calculated based on the horizontal size of the
-     * pixel in the center of the map viewport.
-     */
-    geodesic: false,
-
-    /**
-     * Constructor: OpenLayers.Control.Scale
-     * 
-     * Parameters:
-     * element - {DOMElement} 
-     * options - {Object} 
-     */
-    initialize: function(element, options) {
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        this.element = OpenLayers.Util.getElement(element);        
-    },
-
-    /**
-     * Method: draw
-     * 
-     * Returns:
-     * {DOMElement}
-     */    
-    draw: function() {
-        OpenLayers.Control.prototype.draw.apply(this, arguments);
-        if (!this.element) {
-            this.element = document.createElement("div");
-            this.div.appendChild(this.element);
-        }
-        this.map.events.register( 'moveend', this, this.updateScale);
-        this.updateScale();
-        return this.div;
-    },
-   
-    /**
-     * Method: updateScale
-     */
-    updateScale: function() {
-        var scale;
-        if(this.geodesic === true) {
-            var units = this.map.getUnits();
-            if(!units) {
-                return;
-            }
-            var inches = OpenLayers.INCHES_PER_UNIT;
-            scale = (this.map.getGeodesicPixelSize().w || 0.000001) *
-                    inches["km"] * OpenLayers.DOTS_PER_INCH;
-        } else {
-            scale = this.map.getScale();
-        }
-            
-        if (!scale) {
-            return;
-        }
-
-        if (scale >= 9500 && scale <= 950000) {
-            scale = Math.round(scale / 1000) + "K";
-        } else if (scale >= 950000) {
-            scale = Math.round(scale / 1000000) + "M";
-        } else {
-            scale = Math.round(scale);
-        }    
-        
-        this.element.innerHTML = OpenLayers.i18n("scale", {'scaleDenom':scale});
-    }, 
-
-    CLASS_NAME: "OpenLayers.Control.Scale"
-});
-
-

--- a/labs/openlayers/lib/OpenLayers/Control/ScaleLine.js
+++ /dev/null
@@ -1,224 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- */
-
-/**
- * Class: OpenLayers.Control.ScaleLine
- * The ScaleLine displays a small line indicator representing the current 
- * map scale on the map. By default it is drawn in the lower left corner of
- * the map.
- * 
- * Inherits from:
- *  - <OpenLayers.Control>
- *  
- * Is a very close copy of:
- *  - <OpenLayers.Control.Scale>
- */
-OpenLayers.Control.ScaleLine = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * Property: maxWidth
-     * {Integer} Maximum width of the scale line in pixels.  Default is 100.
-     */
-    maxWidth: 100,
-
-    /**
-     * Property: topOutUnits
-     * {String} Units for zoomed out on top bar.  Default is km.
-     */
-    topOutUnits: "km",
-    
-    /**
-     * Property: topInUnits
-     * {String} Units for zoomed in on top bar.  Default is m.
-     */
-    topInUnits: "m",
-
-    /**
-     * Property: bottomOutUnits
-     * {String} Units for zoomed out on bottom bar.  Default is mi.
-     */
-    bottomOutUnits: "mi",
-
-    /**
-     * Property: bottomInUnits
-     * {String} Units for zoomed in on bottom bar.  Default is ft.
-     */
-    bottomInUnits: "ft",
-    
-    /**
-     * Property: eTop
-     * {DOMElement}
-     */
-    eTop: null,
-
-    /**
-     * Property: eBottom
-     * {DOMElement}
-     */
-    eBottom:null,
-    
-    /**
-     * APIProperty: geodesic
-     * {Boolean} Use geodesic measurement. Default is false. The recommended
-     * setting for maps in EPSG:4326 is false, and true EPSG:900913. If set to
-     * true, the scale will be calculated based on the horizontal size of the
-     * pixel in the center of the map viewport.
-     */
-    geodesic: false,
-
-    /**
-     * Constructor: OpenLayers.Control.ScaleLine
-     * Create a new scale line control.
-     * 
-     * Parameters:
-     * options - {Object} An optional object whose properties will be used
-     *     to extend the control.
-     */
-    initialize: function(options) {
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);     
-    },
-
-    /**
-     * Method: draw
-     * 
-     * Returns:
-     * {DOMElement}
-     */
-    draw: function() {
-        OpenLayers.Control.prototype.draw.apply(this, arguments);
-        if (!this.eTop) {
-            // stick in the top bar
-            this.eTop = document.createElement("div");
-            this.eTop.className = this.displayClass + "Top";
-            var theLen = this.topInUnits.length;
-            this.div.appendChild(this.eTop);
-            if((this.topOutUnits == "") || (this.topInUnits == "")) {
-                this.eTop.style.visibility = "hidden";
-            } else {
-                this.eTop.style.visibility = "visible";
-            }
-
-            // and the bottom bar
-            this.eBottom = document.createElement("div");
-            this.eBottom.className = this.displayClass + "Bottom";
-            this.div.appendChild(this.eBottom);
-            if((this.bottomOutUnits == "") || (this.bottomInUnits == "")) {
-                this.eBottom.style.visibility = "hidden";
-            } else {
-                this.eBottom.style.visibility = "visible";
-            }
-        }
-        this.map.events.register('moveend', this, this.update);
-        this.update();
-        return this.div;
-    },
-
-    /** 
-     * Method: getBarLen
-     * Given a number, round it down to the nearest 1,2,5 times a power of 10.
-     * That seems a fairly useful set of number groups to use.
-     * 
-     * Parameters:
-     * maxLen - {float}  the number we're rounding down from
-     * 
-     * Returns:
-     * {Float} the rounded number (less than or equal to maxLen)
-     */
-    getBarLen: function(maxLen) {
-        // nearest power of 10 lower than maxLen
-        var digits = parseInt(Math.log(maxLen) / Math.log(10));
-        var pow10 = Math.pow(10, digits);
-        
-        // ok, find first character
-        var firstChar = parseInt(maxLen / pow10);
-
-        // right, put it into the correct bracket
-        var barLen;
-        if(firstChar > 5) {
-            barLen = 5;
-        } else if(firstChar > 2) {
-            barLen = 2;
-        } else {
-            barLen = 1;
-        }
-
-        // scale it up the correct power of 10
-        return barLen * pow10;
-    },
-
-    /**
-     * Method: update
-     * Update the size of the bars, and the labels they contain.
-     */
-    update: function() {
-        var res = this.map.getResolution();
-        if (!res) {
-            return;
-        }
-
-        var curMapUnits = this.map.getUnits();
-        var inches = OpenLayers.INCHES_PER_UNIT;
-
-        // convert maxWidth to map units
-        var maxSizeData = this.maxWidth * res * inches[curMapUnits];
-        var geodesicRatio = 1;
-        if(this.geodesic === true) {
-            var maxSizeGeodesic = (this.map.getGeodesicPixelSize().w ||
-                0.000001) * this.maxWidth;
-            var maxSizeKilometers = maxSizeData / inches["km"];
-            geodesicRatio = maxSizeGeodesic / maxSizeKilometers;
-            maxSizeData *= geodesicRatio;
-        }
-
-        // decide whether to use large or small scale units     
-        var topUnits;
-        var bottomUnits;
-        if(maxSizeData > 100000) {
-            topUnits = this.topOutUnits;
-            bottomUnits = this.bottomOutUnits;
-        } else {
-            topUnits = this.topInUnits;
-            bottomUnits = this.bottomInUnits;
-        }
-
-        // and to map units units
-        var topMax = maxSizeData / inches[topUnits];
-        var bottomMax = maxSizeData / inches[bottomUnits];
-
-        // now trim this down to useful block length
-        var topRounded = this.getBarLen(topMax);
-        var bottomRounded = this.getBarLen(bottomMax);
-
-        // and back to display units
-        topMax = topRounded / inches[curMapUnits] * inches[topUnits];
-        bottomMax = bottomRounded / inches[curMapUnits] * inches[bottomUnits];
-
-        // and to pixel units
-        var topPx = topMax / res / geodesicRatio;
-        var bottomPx = bottomMax / res / geodesicRatio;
-        
-        // now set the pixel widths
-        // and the values inside them
-        
-        if (this.eBottom.style.visibility == "visible"){
-            this.eBottom.style.width = Math.round(bottomPx) + "px"; 
-            this.eBottom.innerHTML = bottomRounded + " " + bottomUnits ;
-        }
-            
-        if (this.eTop.style.visibility == "visible"){
-            this.eTop.style.width = Math.round(topPx) + "px";
-            this.eTop.innerHTML = topRounded + " " + topUnits;
-        }
-        
-    }, 
-
-    CLASS_NAME: "OpenLayers.Control.ScaleLine"
-});
-
-

--- a/labs/openlayers/lib/OpenLayers/Control/SelectFeature.js
+++ /dev/null
@@ -1,614 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Feature/Vector.js
- * @requires OpenLayers/Handler/Feature.js
- * @requires OpenLayers/Layer/Vector/RootContainer.js
- */
-
-/**
- * Class: OpenLayers.Control.SelectFeature
- * The SelectFeature control selects vector features from a given layer on 
- * click or hover. 
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.SelectFeature = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * Constant: EVENT_TYPES
-     *
-     * Supported event types:
-     *  - *beforefeaturehighlighted* Triggered before a feature is highlighted
-     *  - *featurehighlighted* Triggered when a feature is highlighted
-     *  - *featureunhighlighted* Triggered when a feature is unhighlighted
-     */
-    EVENT_TYPES: ["beforefeaturehighlighted", "featurehighlighted", "featureunhighlighted"],
-    
-    /**
-     * Property: multipleKey
-     * {String} An event modifier ('altKey' or 'shiftKey') that temporarily sets
-     *     the <multiple> property to true.  Default is null.
-     */
-    multipleKey: null,
-    
-    /**
-     * Property: toggleKey
-     * {String} An event modifier ('altKey' or 'shiftKey') that temporarily sets
-     *     the <toggle> property to true.  Default is null.
-     */
-    toggleKey: null,
-    
-    /**
-     * APIProperty: multiple
-     * {Boolean} Allow selection of multiple geometries.  Default is false.
-     */
-    multiple: false, 
-
-    /**
-     * APIProperty: clickout
-     * {Boolean} Unselect features when clicking outside any feature.
-     *     Default is true.
-     */
-    clickout: true,
-
-    /**
-     * APIProperty: toggle
-     * {Boolean} Unselect a selected feature on click.  Default is false.  Only
-     *     has meaning if hover is false.
-     */
-    toggle: false,
-
-    /**
-     * APIProperty: hover
-     * {Boolean} Select on mouse over and deselect on mouse out.  If true, this
-     * ignores clicks and only listens to mouse moves.
-     */
-    hover: false,
-
-    /**
-     * APIProperty: highlightOnly
-     * {Boolean} If true do not actually select features (i.e. place them in the
-     * layer's selected features array), just highlight them. This property has
-     * no effect if hover is false. Defaults to false.
-     */
-    highlightOnly: false,
-    
-    /**
-     * APIProperty: box
-     * {Boolean} Allow feature selection by drawing a box.
-     */
-    box: false,
-    
-    /**
-     * Property: onBeforeSelect 
-     * {Function} Optional function to be called before a feature is selected.
-     *     The function should expect to be called with a feature.
-     */
-    onBeforeSelect: function() {},
-    
-    /**
-     * APIProperty: onSelect 
-     * {Function} Optional function to be called when a feature is selected.
-     *     The function should expect to be called with a feature.
-     */
-    onSelect: function() {},
-
-    /**
-     * APIProperty: onUnselect
-     * {Function} Optional function to be called when a feature is unselected.
-     *     The function should expect to be called with a feature.
-     */
-    onUnselect: function() {},
-    
-    /**
-     * Property: scope
-     * {Object} The scope to use with the onBeforeSelect, onSelect, onUnselect
-     *     callbacks. If null the scope will be this control.
-     */
-    scope: null,
-
-    /**
-     * APIProperty: geometryTypes
-     * {Array(String)} To restrict selecting to a limited set of geometry types,
-     *     send a list of strings corresponding to the geometry class names.
-     */
-    geometryTypes: null,
-
-    /**
-     * Property: layer
-     * {<OpenLayers.Layer.Vector>} The vector layer with a common renderer
-     * root for all layers this control is configured with (if an array of
-     * layers was passed to the constructor), or the vector layer the control
-     * was configured with (if a single layer was passed to the constructor).
-     */
-    layer: null,
-    
-    /**
-     * Property: layers
-     * {Array(<OpenLayers.Layer.Vector>} The layers this control will work on,
-     * or null if the control was configured with a single layer
-     */
-    layers: null,
-    
-    /**
-     * APIProperty: callbacks
-     * {Object} The functions that are sent to the handlers.feature for callback
-     */
-    callbacks: null,
-    
-    /**
-     * APIProperty: selectStyle 
-     * {Object} Hash of styles
-     */
-    selectStyle: null,
-    
-    /**
-     * Property: renderIntent
-     * {String} key used to retrieve the select style from the layer's
-     * style map.
-     */
-    renderIntent: "select",
-
-    /**
-     * Property: handlers
-     * {Object} Object with references to multiple <OpenLayers.Handler>
-     *     instances.
-     */
-    handlers: null,
-
-    /**
-     * Constructor: OpenLayers.Control.SelectFeature
-     * Create a new control for selecting features.
-     *
-     * Parameters:
-     * layers - {<OpenLayers.Layer.Vector>}, or an array of vector layers. The
-     *     layer(s) this control will select features from.
-     * options - {Object} 
-     */
-    initialize: function(layers, options) {
-        // concatenate events specific to this control with those from the base
-        this.EVENT_TYPES =
-            OpenLayers.Control.SelectFeature.prototype.EVENT_TYPES.concat(
-            OpenLayers.Control.prototype.EVENT_TYPES
-        );
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        
-        if(this.scope === null) {
-            this.scope = this;
-        }
-        this.initLayer(layers);
-        var callbacks = {
-            click: this.clickFeature,
-            clickout: this.clickoutFeature
-        };
-        if (this.hover) {
-            callbacks.over = this.overFeature;
-            callbacks.out = this.outFeature;
-        }
-             
-        this.callbacks = OpenLayers.Util.extend(callbacks, this.callbacks);
-        this.handlers = {
-            feature: new OpenLayers.Handler.Feature(
-                this, this.layer, this.callbacks,
-                {geometryTypes: this.geometryTypes}
-            )
-        };
-
-        if (this.box) {
-            this.handlers.box = new OpenLayers.Handler.Box(
-                this, {done: this.selectBox},
-                {boxDivClassName: "olHandlerBoxSelectFeature"}
-            ); 
-        }
-    },
-
-    /**
-     * Method: initLayer
-     * Assign the layer property. If layers is an array, we need to use
-     *     a RootContainer.
-     *
-     * Parameters:
-     * layers - {<OpenLayers.Layer.Vector>}, or an array of vector layers.
-     */
-    initLayer: function(layers) {
-        if(layers instanceof Array) {
-            this.layers = layers;
-            this.layer = new OpenLayers.Layer.Vector.RootContainer(
-                this.id + "_container", {
-                    layers: layers
-                }
-            );
-        } else {
-            this.layer = layers;
-        }
-    },
-    
-    /**
-     * Method: destroy
-     */
-    destroy: function() {
-        if(this.active && this.layers) {
-            this.map.removeLayer(this.layer);
-        }
-        OpenLayers.Control.prototype.destroy.apply(this, arguments);
-        if(this.layers) {
-            this.layer.destroy();
-        }
-    },
-
-    /**
-     * Method: activate
-     * Activates the control.
-     * 
-     * Returns:
-     * {Boolean} The control was effectively activated.
-     */
-    activate: function () {
-        if (!this.active) {
-            if(this.layers) {
-                this.map.addLayer(this.layer);
-            }
-            this.handlers.feature.activate();
-            if(this.box && this.handlers.box) {
-                this.handlers.box.activate();
-            }
-        }
-        return OpenLayers.Control.prototype.activate.apply(
-            this, arguments
-        );
-    },
-
-    /**
-     * Method: deactivate
-     * Deactivates the control.
-     * 
-     * Returns:
-     * {Boolean} The control was effectively deactivated.
-     */
-    deactivate: function () {
-        if (this.active) {
-            this.handlers.feature.deactivate();
-            if(this.handlers.box) {
-                this.handlers.box.deactivate();
-            }
-            if(this.layers) {
-                this.map.removeLayer(this.layer);
-            }
-        }
-        return OpenLayers.Control.prototype.deactivate.apply(
-            this, arguments
-        );
-    },
-
-    /**
-     * Method: unselectAll
-     * Unselect all selected features.  To unselect all except for a single
-     *     feature, set the options.except property to the feature.
-     *
-     * Parameters:
-     * options - {Object} Optional configuration object.
-     */
-    unselectAll: function(options) {
-        // we'll want an option to supress notification here
-        var layers = this.layers || [this.layer];
-        var layer, feature;
-        for(var l=0; l<layers.length; ++l) {
-            layer = layers[l];
-            for(var i=layer.selectedFeatures.length-1; i>=0; --i) {
-                feature = layer.selectedFeatures[i];
-                if(!options || options.except != feature) {
-                    this.unselect(feature);
-                }
-            }
-        }
-    },
-
-    /**
-     * Method: clickFeature
-     * Called on click in a feature
-     * Only responds if this.hover is false.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} 
-     */
-    clickFeature: function(feature) {
-        if(!this.hover) {
-            var selected = (OpenLayers.Util.indexOf(
-                feature.layer.selectedFeatures, feature) > -1);
-            if(selected) {
-                if(this.toggleSelect()) {
-                    this.unselect(feature);
-                } else if(!this.multipleSelect()) {
-                    this.unselectAll({except: feature});
-                }
-            } else {
-                if(!this.multipleSelect()) {
-                    this.unselectAll({except: feature});
-                }
-                this.select(feature);
-            }
-        }
-    },
-
-    /**
-     * Method: multipleSelect
-     * Allow for multiple selected features based on <multiple> property and
-     *     <multipleKey> event modifier.
-     *
-     * Returns:
-     * {Boolean} Allow for multiple selected features.
-     */
-    multipleSelect: function() {
-        return this.multiple || (this.handlers.feature.evt &&
-                                 this.handlers.feature.evt[this.multipleKey]);
-    },
-    
-    /**
-     * Method: toggleSelect
-     * Event should toggle the selected state of a feature based on <toggle>
-     *     property and <toggleKey> event modifier.
-     *
-     * Returns:
-     * {Boolean} Toggle the selected state of a feature.
-     */
-    toggleSelect: function() {
-        return this.toggle || (this.handlers.feature.evt &&
-                               this.handlers.feature.evt[this.toggleKey]);
-    },
-
-    /**
-     * Method: clickoutFeature
-     * Called on click outside a previously clicked (selected) feature.
-     * Only responds if this.hover is false.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Vector.Feature>} 
-     */
-    clickoutFeature: function(feature) {
-        if(!this.hover && this.clickout) {
-            this.unselectAll();
-        }
-    },
-
-    /**
-     * Method: overFeature
-     * Called on over a feature.
-     * Only responds if this.hover is true.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} 
-     */
-    overFeature: function(feature) {
-        var layer = feature.layer;
-        if(this.hover) {
-            if(this.highlightOnly) {
-                this.highlight(feature);
-            } else if(OpenLayers.Util.indexOf(
-                layer.selectedFeatures, feature) == -1) {
-                this.select(feature);
-            }
-        }
-    },
-
-    /**
-     * Method: outFeature
-     * Called on out of a selected feature.
-     * Only responds if this.hover is true.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} 
-     */
-    outFeature: function(feature) {
-        if(this.hover) {
-            if(this.highlightOnly) {
-                // we do nothing if we're not the last highlighter of the
-                // feature
-                if(feature._lastHighlighter == this.id) {
-                    // if another select control had highlighted the feature before
-                    // we did it ourself then we use that control to highlight the
-                    // feature as it was before we highlighted it, else we just
-                    // unhighlight it
-                    if(feature._prevHighlighter &&
-                       feature._prevHighlighter != this.id) {
-                        delete feature._lastHighlighter;
-                        var control = this.map.getControl(
-                            feature._prevHighlighter);
-                        if(control) {
-                            control.highlight(feature);
-                        }
-                    } else {
-                        this.unhighlight(feature);
-                    }
-                }
-            } else {
-                this.unselect(feature);
-            }
-        }
-    },
-
-    /**
-     * Method: highlight
-     * Redraw feature with the select style.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} 
-     */
-    highlight: function(feature) {
-        var layer = feature.layer;
-        var cont = this.events.triggerEvent("beforefeaturehighlighted", {
-            feature : feature
-        });
-        if(cont !== false) {
-            feature._prevHighlighter = feature._lastHighlighter;
-            feature._lastHighlighter = this.id;
-            var style = this.selectStyle || this.renderIntent;
-            layer.drawFeature(feature, style);
-            this.events.triggerEvent("featurehighlighted", {feature : feature});
-        }
-    },
-
-    /**
-     * Method: unhighlight
-     * Redraw feature with the "default" style
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} 
-     */
-    unhighlight: function(feature) {
-        var layer = feature.layer;
-        feature._lastHighlighter = feature._prevHighlighter;
-        delete feature._prevHighlighter;
-        layer.drawFeature(feature, feature.style || feature.layer.style ||
-            "default");
-        this.events.triggerEvent("featureunhighlighted", {feature : feature});
-    },
-    
-    /**
-     * Method: select
-     * Add feature to the layer's selectedFeature array, render the feature as
-     * selected, and call the onSelect function.
-     * 
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} 
-     */
-    select: function(feature) {
-        var cont = this.onBeforeSelect.call(this.scope, feature);
-        var layer = feature.layer;
-        if(cont !== false) {
-            cont = layer.events.triggerEvent("beforefeatureselected", {
-                feature: feature
-            });
-            if(cont !== false) {
-                layer.selectedFeatures.push(feature);
-                this.highlight(feature);
-                // if the feature handler isn't involved in the feature
-                // selection (because the box handler is used or the
-                // feature is selected programatically) we fake the
-                // feature handler to allow unselecting on click
-                if(!this.handlers.feature.lastFeature) {
-                    this.handlers.feature.lastFeature = layer.selectedFeatures[0];
-                }
-                layer.events.triggerEvent("featureselected", {feature: feature});
-                this.onSelect.call(this.scope, feature);
-            }
-        }
-    },
-
-    /**
-     * Method: unselect
-     * Remove feature from the layer's selectedFeature array, render the feature as
-     * normal, and call the onUnselect function.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>}
-     */
-    unselect: function(feature) {
-        var layer = feature.layer;
-        // Store feature style for restoration later
-        this.unhighlight(feature);
-        OpenLayers.Util.removeItem(layer.selectedFeatures, feature);
-        layer.events.triggerEvent("featureunselected", {feature: feature});
-        this.onUnselect.call(this.scope, feature);
-    },
-    
-    /**
-     * Method: selectBox
-     * Callback from the handlers.box set up when <box> selection is true
-     *     on.
-     *
-     * Parameters:
-     * position - {<OpenLayers.Bounds> || <OpenLayers.Pixel> }  
-     */
-    selectBox: function(position) {
-        if (position instanceof OpenLayers.Bounds) {
-            var minXY = this.map.getLonLatFromPixel(
-                new OpenLayers.Pixel(position.left, position.bottom)
-            );
-            var maxXY = this.map.getLonLatFromPixel(
-                new OpenLayers.Pixel(position.right, position.top)
-            );
-            var bounds = new OpenLayers.Bounds(
-                minXY.lon, minXY.lat, maxXY.lon, maxXY.lat
-            );
-            
-            // if multiple is false, first deselect currently selected features
-            if (!this.multipleSelect()) {
-                this.unselectAll();
-            }
-            
-            // because we're using a box, we consider we want multiple selection
-            var prevMultiple = this.multiple;
-            this.multiple = true;
-            var layers = this.layers || [this.layer];
-            var layer;
-            for(var l=0; l<layers.length; ++l) {
-                layer = layers[l];
-                for(var i=0, len = layer.features.length; i<len; ++i) {
-                    var feature = layer.features[i];
-                    // check if the feature is displayed
-                    if (!feature.getVisibility()) {
-                        continue;
-                    }
-
-                    if (this.geometryTypes == null || OpenLayers.Util.indexOf(
-                            this.geometryTypes, feature.geometry.CLASS_NAME) > -1) {
-                        if (bounds.toGeometry().intersects(feature.geometry)) {
-                            if (OpenLayers.Util.indexOf(layer.selectedFeatures, feature) == -1) {
-                                this.select(feature);
-                            }
-                        }
-                    }
-                }
-            }
-            this.multiple = prevMultiple;
-        }
-    },
-
-    /** 
-     * Method: setMap
-     * Set the map property for the control. 
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>} 
-     */
-    setMap: function(map) {
-        this.handlers.feature.setMap(map);
-        if (this.box) {
-            this.handlers.box.setMap(map);
-        }
-        OpenLayers.Control.prototype.setMap.apply(this, arguments);
-    },
-    
-    /**
-     * APIMethod: setLayer
-     * Attach a new layer to the control, overriding any existing layers.
-     *
-     * Parameters:
-     * layers - Array of {<OpenLayers.Layer.Vector>} or a single
-     *     {<OpenLayers.Layer.Vector>}
-     */
-    setLayer: function(layers) {
-        var isActive = this.active;
-        this.unselectAll();
-        this.deactivate();
-        if(this.layers) {
-            this.layer.destroy();
-            this.layers = null;
-        }
-        this.initLayer(layers);
-        this.handlers.feature.layer = this.layer;
-        if (isActive) {
-            this.activate();
-        }
-    },
-    
-    CLASS_NAME: "OpenLayers.Control.SelectFeature"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/Snapping.js
+++ /dev/null
@@ -1,548 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Layer/Vector.js
- */
-
-/**
- * Class: OpenLayers.Control.Snapping
- * Acts as a snapping agent while editing vector features.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * Constant: EVENT_TYPES
-     * {Array(String)} Supported application event types.  Register a listener
-     *     for a particular event with the following syntax:
-     * (code)
-     * control.events.register(type, obj, listener);
-     * (end)
-     *
-     * Listeners will be called with a reference to an event object.  The
-     *     properties of this event depends on exactly what happened.
-     *
-     * Supported control event types (in addition to those from <OpenLayers.Control>):
-     * beforesnap - Triggered before a snap occurs.  Listeners receive an
-     *     event object with *point*, *x*, *y*, *distance*, *layer*, and
-     *     *snapType* properties.  The point property will be original point
-     *     geometry considered for snapping. The x and y properties represent
-     *     coordinates the point will receive. The distance is the distance
-     *     of the snap.  The layer is the target layer.  The snapType property
-     *     will be one of "node", "vertex", or "edge". Return false to stop
-     *     snapping from occurring.
-     * snap - Triggered when a snap occurs.  Listeners receive an event with
-     *     *point*, *snapType*, *layer*, and *distance* properties.  The point
-     *     will be the location snapped to.  The snapType will be one of "node",
-     *     "vertex", or "edge".  The layer will be the target layer.  The
-     *     distance will be the distance of the snap in map units.
-     * unsnap - Triggered when a vertex is unsnapped.  Listeners receive an
-     *     event with a *point* property.
-     */
-    EVENT_TYPES: ["beforesnap", "snap", "unsnap"],
-    
-    /**
-     * CONSTANT: DEFAULTS
-     * Default target properties.
-     */
-    DEFAULTS: {
-        tolerance: 10,
-        node: true,
-        edge: true,
-        vertex: true
-    },
-    
-    /**
-     * Property: greedy
-     * {Boolean} Snap to closest feature in first layer with an eligible
-     *     feature.  Default is true.
-     */
-    greedy: true,
-    
-    /**
-     * Property: precedence
-     * {Array} List representing precedence of different snapping types.
-     *     Default is "node", "vertex", "edge".
-     */
-    precedence: ["node", "vertex", "edge"],
-    
-    /**
-     * Property: resolution
-     * {Float} The map resolution for the previously considered snap.
-     */
-    resolution: null,
-    
-    /**
-     * Property: geoToleranceCache
-     * {Object} A cache of geo-tolerances.  Tolerance values (in map units) are
-     *     calculated when the map resolution changes.
-     */
-    geoToleranceCache: null,
-    
-    /**
-     * Property: layer
-     * {<OpenLayers.Layer.Vector>} The current editable layer.  Set at
-     *     construction or after construction with <setLayer>.
-     */
-    layer: null,
-    
-    /**
-     * Property: feature
-     * {<OpenLayers.Feature.Vector>} The current editable feature.
-     */
-    feature: null,
-    
-    /**
-     * Property: point
-     * {<OpenLayers.Geometry.Point>} The currently snapped vertex.
-     */
-    point: null,
-
-    /**
-     * Constructor: OpenLayers.Control.Snapping
-     * Creates a new snapping control. A control is constructed with an editable
-     *     layer and a set of configuration objects for target layers. While the
-     *     control is active, dragging vertices while drawing new features or
-     *     modifying existing features on the editable layer will engage
-     *     snapping to features on the target layers. Whether a vertex snaps to
-     *     a feature on a target layer depends on the target layer configuration.
-     *
-     * Parameters:
-     * options - {Object} An object containing all configuration properties for
-     *     the control.
-     *
-     * Valid options:
-     * layer - {OpenLayers.Layer.Vector} The editable layer.  Features from this
-     *     layer that are digitized or modified may have vertices snapped to
-     *     features from any of the target layers.
-     * targets - {Array(Object | OpenLayers.Layer.Vector)} A list of objects for
-     *     configuring target layers.  See valid properties of the target
-     *     objects below.  If the items in the targets list are vector layers
-     *     (instead of configuration objects), the defaults from the <defaults>
-     *     property will apply.  The editable layer itself may be a target
-     *     layer - allowing newly created or edited features to be snapped to
-     *     existing features from the same layer.  If no targets are provided
-     *     the layer given in the constructor (as <layer>) will become the
-     *     initial target.
-     * defaults - {Object} An object with default properties to be applied
-     *     to all target objects.
-     * greedy - {Boolean} Snap to closest feature in first target layer that
-     *     applies.  Default is true.  If false, all features in all target
-     *     layers will be checked and the closest feature in all target layers
-     *     will be chosen.  The greedy property determines if the order of the
-     *     target layers is significant.  By default, the order of the target
-     *     layers is significant where layers earlier in the target layer list
-     *     have precedence over layers later in the list.  Within a single
-     *     layer, the closest feature is always chosen for snapping.  This
-     *     property only determines whether the search for a closer feature
-     *     continues after an eligible feature is found in a target layer.
-     *
-     * Valid target properties:
-     * layer - {OpenLayers.Layer.Vector} A target layer.  Features from this
-     *     layer will be eligible to act as snapping target for the editable
-     *     layer.
-     * tolerance - {Float} The distance (in pixels) at which snapping may occur.
-     *     Default is 10.
-     * node - {Boolean} Snap to nodes (first or last point in a geometry) in
-     *     target layer.  Default is true.
-     * nodeTolerance - {Float} Optional distance at which snapping may occur
-     *     for nodes specifically.  If none is provided, <tolerance> will be
-     *     used.
-     * vertex - {Boolean} Snap to vertices in target layer.  Default is true.
-     * vertexTolerance - {Float} Optional distance at which snapping may occur
-     *     for vertices specifically.  If none is provided, <tolerance> will be
-     *     used.
-     * edge - {Boolean} Snap to edges in target layer.  Default is true.
-     * edgeTolerance - {Float} Optional distance at which snapping may occur
-     *     for edges specifically.  If none is provided, <tolerance> will be
-     *     used.
-     * filter - {OpenLayers.Filter} Optional filter to evaluate to determine if
-     *     feature is eligible for snapping.  If filter evaluates to true for a
-     *     target feature a vertex may be snapped to the feature. 
-     */
-    initialize: function(options) {
-        // concatenate events specific to measure with those from the base
-        Array.prototype.push.apply(
-            this.EVENT_TYPES, OpenLayers.Control.prototype.EVENT_TYPES
-        );
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        this.options = options || {}; // TODO: this could be done by the super
-        
-        // set the editable layer if provided
-        if(this.options.layer) {
-            this.setLayer(this.options.layer);
-        }
-        // configure target layers
-        var defaults = OpenLayers.Util.extend({}, this.options.defaults);
-        this.defaults = OpenLayers.Util.applyDefaults(defaults, this.DEFAULTS);
-        this.setTargets(this.options.targets);
-        if(this.targets.length === 0 && this.layer) {
-            this.addTargetLayer(this.layer);
-        }
-
-        this.geoToleranceCache = {};
-    },
-    
-    /**
-     * APIMethod: setLayer
-     * Set the editable layer.  Call the setLayer method if the editable layer
-     *     changes and the same control should be used on a new editable layer.
-     *     If the control is already active, it will be active after the new
-     *     layer is set.
-     *
-     * Parameters:
-     * layer - {OpenLayers.Layer.Vector}  The new editable layer.
-     */
-    setLayer: function(layer) {
-        if(this.active) {
-            this.deactivate();
-            this.layer = layer;
-            this.activate();
-        } else {
-            this.layer = layer;
-        }
-    },
-    
-    /**
-     * Method: setTargets
-     * Set the targets for the snapping agent.
-     *
-     * Parameters:
-     * targets - {Array} An array of target configs or target layers.
-     */
-    setTargets: function(targets) {
-        this.targets = [];
-        if(targets && targets.length) {
-            var target;
-            for(var i=0, len=targets.length; i<len; ++i) {
-                target = targets[i];
-                if(target instanceof OpenLayers.Layer.Vector) {
-                    this.addTargetLayer(target);
-                } else {
-                    this.addTarget(target);
-                }
-            }
-        }
-    },
-    
-    /**
-     * Method: addTargetLayer
-     * Add a target layer with the default target config.
-     *
-     * Parameters:
-     * layer - {<OpenLayers.Layer.Vector>} A target layer.
-     */
-    addTargetLayer: function(layer) {
-        this.addTarget({layer: layer});
-    },
-    
-    /**
-     * Method: addTarget
-     * Add a configured target layer.
-     *
-     * Parameters:
-     * target - {Object} A target config.
-     */
-    addTarget: function(target) {
-        target = OpenLayers.Util.applyDefaults(target, this.defaults);
-        target.nodeTolerance = target.nodeTolerance || target.tolerance;
-        target.vertexTolerance = target.vertexTolerance || target.tolerance;
-        target.edgeTolerance = target.edgeTolerance || target.tolerance;
-        this.targets.push(target);
-    },
-    
-    /**
-     * Method: removeTargetLayer
-     * Remove a target layer.
-     *
-     * Parameters:
-     * layer - {<OpenLayers.Layer.Vector>} The target layer to remove.
-     */
-    removeTargetLayer: function(layer) {
-        var target;
-        for(var i=this.targets.length-1; i>=0; --i) {
-            target = this.targets[i];
-            if(target.layer === layer) {
-                this.removeTarget(target);
-            }
-        }
-    },
-    
-    /**
-     * Method: removeTarget
-     * Remove a target.
-     *
-     * Parameters:
-     * target - {Object} A target config.
-     *
-     * Returns:
-     * {Array} The targets array.
-     */
-    removeTarget: function(target) {
-        return OpenLayers.Util.removeItem(this.targets, target);
-    },
-    
-    /**
-     * APIMethod: activate
-     * Activate the control.  Activating the control registers listeners for
-     *     editing related events so that during feature creation and
-     *     modification, moving vertices will trigger snapping.
-     */
-    activate: function() {
-        var activated = OpenLayers.Control.prototype.activate.call(this);
-        if(activated) {
-            if(this.layer && this.layer.events) {
-                this.layer.events.on({
-                    sketchstarted: this.onSketchModified,
-                    sketchmodified: this.onSketchModified,
-                    vertexmodified: this.onVertexModified,
-                    scope: this
-                });
-            }
-        }
-        return activated;
-    },
-    
-    /**
-     * APIMethod: deactivate
-     * Deactivate the control.  Deactivating the control unregisters listeners
-     *     so feature editing may proceed without engaging the snapping agent.
-     */
-    deactivate: function() {
-        var deactivated = OpenLayers.Control.prototype.deactivate.call(this);
-        if(deactivated) {
-            if(this.layer && this.layer.events) {
-                this.layer.events.un({
-                    sketchstarted: this.onSketchModified,
-                    sketchmodified: this.onSketchModified,
-                    vertexmodified: this.onVertexModified,
-                    scope: this
-                });
-            }
-        }
-        this.feature = null;
-        this.point = null;
-        return deactivated;
-    },
-    
-    /**
-     * Method: onSketchModified
-     * Registered as a listener for the sketchmodified event on the editable
-     *     layer.
-     *
-     * Parameters:
-     * event - {Object} The sketch modified event.
-     */
-    onSketchModified: function(event) {
-        this.feature = event.feature;
-        this.considerSnapping(event.vertex, event.vertex);
-    },
-    
-    /**
-     * Method: onVertexModified
-     * Registered as a listener for the vertexmodified event on the editable
-     *     layer.
-     *
-     * Parameters:
-     * event - {Object} The vertex modified event.
-     */
-    onVertexModified: function(event) {
-        this.feature = event.feature;
-        var loc = this.layer.map.getLonLatFromViewPortPx(event.pixel);
-        this.considerSnapping(
-            event.vertex, new OpenLayers.Geometry.Point(loc.lon, loc.lat)
-        );
-    },
-
-    /**
-     * Method: considerSnapping
-     *
-     * Parameters:
-     * point - {<OpenLayers.Geometry.Point}} The vertex to be snapped (or
-     *     unsnapped).
-     * loc - {<OpenLayers.Geometry.Point>} The location of the mouse in map
-     *     coords.
-     */
-    considerSnapping: function(point, loc) {
-        var best = {
-            rank: Number.POSITIVE_INFINITY,
-            dist: Number.POSITIVE_INFINITY,
-            x: null, y: null
-        };
-        var snapped = false;
-        var result, target;
-        for(var i=0, len=this.targets.length; i<len; ++i) {
-            target = this.targets[i];
-            result = this.testTarget(target, loc);
-            if(result) {
-                if(this.greedy) {
-                    best = result;
-                    best.target = target; 
-                    snapped = true;
-                    break;
-                } else {
-                    if((result.rank < best.rank) ||
-                       (result.rank === best.rank && result.dist < best.dist)) {
-                        best = result;
-                        best.target = target;
-                        snapped = true;
-                    }
-                }
-            }
-        }
-        if(snapped) {
-            var proceed = this.events.triggerEvent("beforesnap", {
-                point: point, x: best.x, y: best.y, distance: best.dist,
-                layer: best.target.layer, snapType: this.precedence[best.rank]
-            });
-            if(proceed !== false) {
-                point.x = best.x;
-                point.y = best.y;
-                this.point = point;
-                this.events.triggerEvent("snap", {
-                    point: point,
-                    snapType: this.precedence[best.rank],
-                    layer: best.target.layer,
-                    distance: best.dist
-                });
-            } else {
-                snapped = false;
-            }
-        }
-        if(this.point && !snapped) {
-            point.x = loc.x;
-            point.y = loc.y;
-            this.point = null;
-            this.events.triggerEvent("unsnap", {point: point});
-        }
-    },
-    
-    /**
-     * Method: testTarget
-     *
-     * Parameters:
-     * target - {Object} Object with target layer configuration.
-     * loc - {<OpenLayers.Geometry.Point>} The location of the mouse in map
-     *     coords.
-     *
-     * Returns:
-     * {Object} A result object with rank, dist, x, and y properties.
-     *     Returns null if candidate is not eligible for snapping.
-     */
-    testTarget: function(target, loc) {
-        var tolerance = {
-            node: this.getGeoTolerance(target.nodeTolerance),
-            vertex: this.getGeoTolerance(target.vertexTolerance),
-            edge: this.getGeoTolerance(target.edgeTolerance)
-        };
-        // this could be cached if we don't support setting tolerance values directly
-        var maxTolerance = Math.max(
-            tolerance.node, tolerance.vertex, tolerance.edge
-        );
-        var result = {
-            rank: Number.POSITIVE_INFINITY, dist: Number.POSITIVE_INFINITY
-        };
-        var eligible = false;
-        var features = target.layer.features;
-        var feature, type, vertices, vertex, closest, dist, found;
-        var numTypes = this.precedence.length;
-        var ll = new OpenLayers.LonLat(loc.x, loc.y);
-        for(var i=0, len=features.length; i<len; ++i) {
-            feature = features[i];
-            if(feature !== this.feature && !feature._sketch &&
-               feature.state !== OpenLayers.State.DELETE &&
-               (!target.filter || target.filter.evaluate(feature.attributes))) {
-                if(feature.atPoint(ll, maxTolerance, maxTolerance)) {
-                    for(var j=0, stop=Math.min(result.rank+1, numTypes); j<stop; ++j) {
-                        type = this.precedence[j];
-                        if(target[type]) {
-                            if(type === "edge") {
-                                closest = feature.geometry.distanceTo(loc, {details: true});
-                                dist = closest.distance;
-                                if(dist <= tolerance[type] && dist < result.dist) {
-                                    result = {
-                                        rank: j, dist: dist,
-                                        x: closest.x0, y: closest.y0 // closest coords on feature
-                                    };
-                                    eligible = true;
-                                    // don't look for lower precedence types for this feature
-                                    break;
-                                }
-                            } else {
-                                // look for nodes or vertices
-                                vertices = feature.geometry.getVertices(type === "node");
-                                found = false;
-                                for(var k=0, klen=vertices.length; k<klen; ++k) {
-                                    vertex = vertices[k];
-                                    dist = vertex.distanceTo(loc);
-                                    if(dist <= tolerance[type] &&
-                                       (j < result.rank || (j === result.rank && dist < result.dist))) {
-                                        result = {
-                                            rank: j, dist: dist,
-                                            x: vertex.x, y: vertex.y
-                                        };
-                                        eligible = true;
-                                        found = true;
-                                    }
-                                }
-                                if(found) {
-                                    // don't look for lower precedence types for this feature
-                                    break;
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        return eligible ? result : null;
-    },
-    
-    /**
-     * Method: getGeoTolerance
-     * Calculate a tolerance in map units given a tolerance in pixels.  This
-     *     takes advantage of the <geoToleranceCache> when the map resolution
-     *     has not changed.
-     *     
-     * Parameters:
-     * tolerance - {Number} A tolerance value in pixels.
-     *
-     * Returns:
-     * {Number} A tolerance value in map units.
-     */
-    getGeoTolerance: function(tolerance) {
-        var resolution = this.layer.map.getResolution();
-        if(resolution !== this.resolution) {
-            this.resolution = resolution;
-            this.geoToleranceCache = {};
-        }
-        var geoTolerance = this.geoToleranceCache[tolerance];
-        if(geoTolerance === undefined) {
-            geoTolerance = tolerance * resolution;
-            this.geoToleranceCache[tolerance] = geoTolerance;
-        }
-        return geoTolerance;
-    },
-    
-    /**
-     * Method: destroy
-     * Clean up the control.
-     */
-    destroy: function() {
-        if(this.active) {
-            this.deactivate(); // TODO: this should be handled by the super
-        }
-        delete this.layer;
-        delete this.targets;
-        OpenLayers.Control.prototype.destroy.call(this);
-    },
-
-    CLASS_NAME: "OpenLayers.Control.Snapping"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/Split.js
+++ /dev/null
@@ -1,499 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Handler/Path.js
- * @requires OpenLayers/Layer/Vector.js
- */
-
-/**
- * Class: OpenLayers.Control.Split
- * Acts as a split feature agent while editing vector features.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.Split = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * Constant: EVENT_TYPES
-     * {Array(String)} Supported application event types.  Register a listener
-     *     for a particular event with the following syntax:
-     * (code)
-     * control.events.register(type, obj, listener);
-     * (end)
-     *
-     * Listeners will be called with a reference to an event object.  The
-     *     properties of this event depends on exactly what happened.
-     *
-     * Supported control event types (in addition to those from <OpenLayers.Control>):
-     * beforesplit - Triggered before a split occurs.  Listeners receive an
-     *     event object with *source* and *target* properties.
-     * split - Triggered when a split occurs.  Listeners receive an event with
-     *     an *original* property and a *features* property.  The original
-     *     is a reference to the target feature that the sketch or modified
-     *     feature intersects.  The features property is a list of all features
-     *     that result from this single split.  This event is triggered before
-     *     the resulting features are added to the layer (while the layer still
-     *     has a reference to the original).
-     * aftersplit - Triggered after all splits resulting from a single sketch
-     *     or feature modification have occurred.  The original features
-     *     have been destroyed and features that result from the split
-     *     have already been added to the layer.  Listeners receive an event
-     *     with a *source* and *features* property.  The source references the
-     *     sketch or modified feature used as a splitter.  The features
-     *     property is a list of all resulting features.
-     */
-    EVENT_TYPES: ["beforesplit", "split", "aftersplit"],
-    
-    /**
-     * APIProperty: layer
-     * {<OpenLayers.Layer.Vector>} The target layer with features to be split.
-     *     Set at construction or after construction with <setLayer>.
-     */
-    layer: null,
-    
-    /**
-     * Property: source
-     * {<OpenLayers.Layer.Vector>} Optional source layer.  Any newly created
-     *     or modified features from this layer will be used to split features
-     *     on the target layer.  If not provided, a temporary sketch layer will
-     *     be created.
-     */
-    source: null,
-    
-    /**
-     * Property: sourceOptions
-     * {Options} If a temporary sketch layer is created, these layer options
-     *     will be applied.
-     */
-    sourceOptions: null,
-
-    /**
-     * APIProperty: tolerance
-     * {Number} Distance between the calculated intersection and a vertex on
-     *     the source geometry below which the existing vertex will be used
-     *     for the split.  Default is null.
-     */
-    tolerance: null,
-    
-    /**
-     * APIProperty: edge
-     * {Boolean} Allow splits given intersection of edges only.  Default is
-     *     true.  If false, a vertex on the source must be within the
-     *     <tolerance> distance of the calculated intersection for a split
-     *     to occur.
-     */
-    edge: true,
-    
-    /**
-     * APIProperty: deferDelete
-     * {Boolean} Instead of removing features from the layer, set feature
-     *     states of split features to DELETE.  This assumes a save strategy
-     *     or other component is in charge of removing features from the
-     *     layer.  Default is false.  If false, split features will be
-     *     immediately deleted from the layer.
-     */
-    deferDelete: false,
-    
-    /**
-     * APIProperty: mutual
-     * {Boolean} If source and target layers are the same, split source
-     *     features and target features where they intersect.  Default is
-     *     true.  If false, only target features will be split.
-     */
-    mutual: true,
-    
-    /**
-     * APIProperty: targetFilter
-     * {OpenLayers.Filter} Optional filter that will be evaluated
-     *     to determine if a feature from the target layer is eligible for
-     *     splitting.
-     */
-    targetFilter: null,
-    
-    /**
-     * APIProperty: sourceFilter
-     * {OpenLayers.Filter} Optional filter that will be evaluated
-     *     to determine if a feature from the target layer is eligible for
-     *     splitting.
-     */
-    sourceFilter: null,
-    
-    /**
-     * Property: handler
-     * {<OpenLayers.Handler.Path>} The temporary sketch handler created if
-     *     no source layer is provided.
-     */
-    handler: null,
-
-    /**
-     * Constructor: OpenLayers.Control.Split
-     * Creates a new split control. A control is constructed with a target
-     *     layer and an optional source layer. While the control is active,
-     *     creating new features or modifying existing features on the source
-     *     layer will result in splitting any eligible features on the target
-     *     layer.  If no source layer is provided, a temporary sketch layer will
-     *     be created to create lines for splitting features on the target.
-     *
-     * Parameters:
-     * options - {Object} An object containing all configuration properties for
-     *     the control.
-     *
-     * Valid options:
-     * layer - {OpenLayers.Layer.Vector} The target layer.  Features from this
-     *     layer will be split by new or modified features on the source layer
-     *     or temporary sketch layer.
-     * source - {OpenLayers.Layer.Vector} Optional source layer.  If provided
-     *     newly created features or modified features will be used to split
-     *     features on the target layer.  If not provided, a temporary sketch
-     *     layer will be created for drawing lines.
-     * tolerance - {Number} Optional value for the distance between a source
-     *     vertex and the calculated intersection below which the split will
-     *     occur at the vertex.
-     * edge - {Boolean} Allow splits given intersection of edges only.  Default
-     *     is true.  If false, a vertex on the source must be within the
-     *     <tolerance> distance of the calculated intersection for a split
-     *     to occur.
-     * mutual - {Boolean} If source and target are the same, split source
-     *     features and target features where they intersect.  Default is
-     *     true.  If false, only target features will be split.
-     * targetFilter - {OpenLayers.Filter} Optional filter that will be evaluated
-     *     to determine if a feature from the target layer is eligible for
-     *     splitting.
-     * sourceFilter - {OpenLayers.Filter} Optional filter that will be evaluated
-     *     to determine if a feature from the target layer is eligible for
-     *     splitting.
-     */
-    initialize: function(options) {
-        // concatenate events specific to measure with those from the base
-        Array.prototype.push.apply(
-            this.EVENT_TYPES, OpenLayers.Control.prototype.EVENT_TYPES
-        );
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        this.options = options || {}; // TODO: this could be done by the super
-        
-        // set the source layer if provided
-        if(this.options.source) {
-            this.setSource(this.options.source);
-        }
-    },
-    
-    /**
-     * APIMethod: setSource
-     * Set the source layer for edits layer.
-     *
-     * Parameters:
-     * layer - {OpenLayers.Layer.Vector}  The new source layer layer.  If
-     *     null, a temporary sketch layer will be created.
-     */
-    setSource: function(layer) {
-        if(this.active) {
-            this.deactivate();
-            if(this.handler) {
-                this.handler.destroy();
-                delete this.handler;
-            }
-            this.source = layer;
-            this.activate();
-        } else {
-            this.source = layer;
-        }
-    },
-    
-    /**
-     * APIMethod: activate
-     * Activate the control.  Activating the control registers listeners for
-     *     editing related events so that during feature creation and
-     *     modification, features in the target will be considered for
-     *     splitting.
-     */
-    activate: function() {
-        var activated = OpenLayers.Control.prototype.activate.call(this);
-        if(activated) {
-            if(!this.source) {
-                if(!this.handler) {
-                    this.handler = new OpenLayers.Handler.Path(this,
-                        {done: function(geometry) {
-                            this.onSketchComplete({
-                                feature: new OpenLayers.Feature.Vector(geometry)
-                            });
-                        }},
-                        {layerOptions: this.sourceOptions}
-                    );
-                }
-                this.handler.activate();
-            } else if(this.source.events) {
-                this.source.events.on({
-                    sketchcomplete: this.onSketchComplete,
-                    afterfeaturemodified: this.afterFeatureModified,
-                    scope: this
-                });
-            }
-        }
-        return activated;
-    },
-    
-    /**
-     * APIMethod: deactivate
-     * Deactivate the control.  Deactivating the control unregisters listeners
-     *     so feature editing may proceed without engaging the split agent.
-     */
-    deactivate: function() {
-        var deactivated = OpenLayers.Control.prototype.deactivate.call(this);
-        if(deactivated) {
-            if(this.source && this.source.events) {
-                this.layer.events.un({
-                    sketchcomplete: this.onSketchComplete,
-                    afterfeaturemodified: this.afterFeatureModified,
-                    scope: this
-                });
-            }
-        }
-        return deactivated;
-    },
-    
-    /**
-     * Method: onSketchComplete
-     * Registered as a listener for the sketchcomplete event on the editable
-     *     layer.
-     *
-     * Parameters:
-     * event - {Object} The sketch complete event.
-     *
-     * Returns:
-     * {Boolean} Stop the sketch from being added to the layer (it has been
-     *     split).
-     */
-    onSketchComplete: function(event) {
-        this.feature = null;
-        return !this.considerSplit(event.feature);
-    },
-    
-    /**
-     * Method: afterFeatureModified
-     * Registered as a listener for the afterfeaturemodified event on the
-     *     editable layer.
-     *
-     * Parameters:
-     * event - {Object} The after feature modified event.
-     */
-    afterFeatureModified: function(event) {
-        if(event.modified) {
-            var feature = event.feature;
-            if(feature.geometry instanceof OpenLayers.Geometry.LineString ||
-               feature.geometry instanceof OpenLayers.Geometry.MultiLineString) {
-                this.feature = event.feature;
-                this.considerSplit(event.feature);
-            }
-        }
-    },
-    
-    /**
-     * Method: removeByGeometry
-     * Remove a feature from a list based on the given geometry.
-     *
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>} A list of features.
-     * geometry - {<OpenLayers.Geometry>} A geometry.
-     */
-    removeByGeometry: function(features, geometry) {
-        for(var i=0, len=features.length; i<len; ++i) {
-            if(features[i].geometry === geometry) {
-                features.splice(i, 1);
-                break;
-            }
-        }
-    },
-    
-    /**
-     * Method: isEligible
-     * Test if a target feature is eligible for splitting.
-     *
-     * Parameters:
-     * target - {<OpenLayers.Feature.Vector>} The target feature.
-     *
-     * Returns:
-     * {Boolean} The target is eligible for splitting.
-     */
-    isEligible: function(target) {
-        return (
-            target.state !== OpenLayers.State.DELETE
-        ) && (
-            target.geometry instanceof OpenLayers.Geometry.LineString ||
-            target.geometry instanceof OpenLayers.Geometry.MultiLineString
-        ) && (
-            this.feature !== target
-        ) && (
-            !this.targetFilter ||
-            this.targetFilter.evaluate(target.attributes)
-        );
-    },
-
-    /**
-     * Method: considerSplit
-     * Decide whether or not to split target features with the supplied
-     *     feature.  If <mutual> is true, both the source and target features
-     *     will be split if eligible.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector}} The newly created or modified
-     *     feature.
-     *
-     * Returns:
-     * {Boolean} The supplied feature was split (and destroyed).
-     */
-    considerSplit: function(feature) {
-        var sourceSplit = false;
-        var targetSplit = false;
-        if(!this.sourceFilter ||
-           this.sourceFilter.evaluate(feature.attributes)) {
-            var features = this.layer && this.layer.features || [];
-            var target, results, proceed;
-            var additions = [], removals = [];
-            var mutual = (this.layer === this.source) && this.mutual;
-            var options = {
-                edge: this.edge,
-                tolerance: this.tolerance,
-                mutual: mutual
-            };
-            var sourceParts = [feature.geometry];
-            var targetFeature, targetParts;
-            var source, parts;
-            for(var i=0, len=features.length; i<len; ++i) {
-                targetFeature = features[i];
-                if(this.isEligible(targetFeature)) {
-                    targetParts = [targetFeature.geometry];
-                    // work through source geoms - this array may change
-                    for(var j=0; j<sourceParts.length; ++j) { 
-                        source = sourceParts[j];
-                        // work through target parts - this array may change
-                        for(var k=0; k<targetParts.length; ++k) {
-                            target = targetParts[k];
-                            if(source.getBounds().intersectsBounds(target.getBounds())) {
-                                results = source.split(target, options);
-                                if(results) {
-                                    proceed = this.events.triggerEvent(
-                                        "beforesplit", {source: feature, target: targetFeature}
-                                    );
-                                    if(proceed !== false) {
-                                        if(mutual) {
-                                            parts = results[0];
-                                            // handle parts that result from source splitting
-                                            if(parts.length > 1) {
-                                                // splice in new source parts
-                                                parts.unshift(j, 1); // add args for splice below
-                                                Array.prototype.splice.apply(sourceParts, parts);
-                                                j += parts.length - 3;
-                                            }
-                                            results = results[1];
-                                        }
-                                        // handle parts that result from target splitting
-                                        if(results.length > 1) {
-                                            // splice in new target parts
-                                            results.unshift(k, 1); // add args for splice below
-                                            Array.prototype.splice.apply(targetParts, results);
-                                            k += results.length - 3;
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    if(targetParts && targetParts.length > 1) {
-                        this.geomsToFeatures(targetFeature, targetParts);
-                        this.events.triggerEvent("split", {
-                            original: targetFeature,
-                            features: targetParts
-                        });
-                        Array.prototype.push.apply(additions, targetParts);
-                        removals.push(targetFeature);
-                        targetSplit = true;
-                    }
-                }
-            }
-            if(sourceParts && sourceParts.length > 1) {
-                this.geomsToFeatures(feature, sourceParts);
-                this.events.triggerEvent("split", {
-                    original: feature,
-                    features: sourceParts
-                });
-                Array.prototype.push.apply(additions, sourceParts);
-                removals.push(feature);
-                sourceSplit = true;
-            }
-            if(sourceSplit || targetSplit) {
-                // remove and add feature events are suppressed
-                // listen for split event on this control instead
-                if(this.deferDelete) {
-                    // Set state instead of removing.  Take care to avoid
-                    // setting delete for features that have not yet been
-                    // inserted - those should be destroyed immediately.
-                    var feat, destroys = [];
-                    for(var i=0, len=removals.length; i<len; ++i) {
-                        feat = removals[i];
-                        if(feat.state === OpenLayers.State.INSERT) {
-                            destroys.push(feat);
-                        } else {
-                            feat.state = OpenLayers.State.DELETE;
-                            this.layer.drawFeature(feat);
-                        }
-                    }
-                    this.layer.destroyFeatures(destroys, {silent: true});
-                    for(var i=0, len=additions.length; i<len; ++i) {
-                        additions[i].state = OpenLayers.State.INSERT;
-                    }
-                } else {
-                    this.layer.destroyFeatures(removals, {silent: true});
-                }
-                this.layer.addFeatures(additions, {silent: true});
-                this.events.triggerEvent("aftersplit", {
-                    source: feature,
-                    features: additions
-                });
-            }
-        }
-        return sourceSplit;
-    },
-    
-    /**
-     * Method: geomsToFeatures
-     * Create new features given a template feature and a list of geometries.
-     *     The list of geometries is modified in place.  The result will be
-     *     a list of new features.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} The feature to be cloned.
-     * geoms - {Array(<OpenLayers.Geometry>)} List of goemetries.  This will
-     *     become a list of new features.
-     */
-    geomsToFeatures: function(feature, geoms) {
-        var clone = feature.clone();
-        delete clone.geometry;
-        var newFeature;
-        for(var i=0, len=geoms.length; i<len; ++i) {
-            // turn results list from geoms to features
-            newFeature = clone.clone();
-            newFeature.geometry = geoms[i];
-            newFeature.state = OpenLayers.State.INSERT;
-            geoms[i] = newFeature;
-        }
-    },
-    
-    /**
-     * Method: destroy
-     * Clean up the control.
-     */
-    destroy: function() {
-        if(this.active) {
-            this.deactivate(); // TODO: this should be handled by the super
-        }
-        OpenLayers.Control.prototype.destroy.call(this);
-    },
-
-    CLASS_NAME: "OpenLayers.Control.Split"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/TransformFeature.js
+++ /dev/null
@@ -1,580 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Control/DragFeature.js
- * @requires OpenLayers/Feature/Vector.js
- * @requires OpenLayers/Geometry/LineString.js
- * @requires OpenLayers/Geometry/Point.js
- */
-
-/**
- * Class: OpenLayers.Control.TransformFeature
- * Control to transform features with a standard transformation box.
- *
- * Inherits From:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.TransformFeature = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * Constant: EVENT_TYPES
-     *
-     * Supported event types:
-     *  - *beforesetfeature* Triggered before a feature is set for
-     *      tranformation. The feature will not be set if a listener returns
-     *      false. Listeners receive a *feature* property, with the feature
-     *      that will be set for transformation. Listeners are allowed to
-     *      set the control's *scale*, *ratio* and *rotation* properties,
-     *      which will set the initial scale, ratio and rotation of the
-     *      feature, like the <setFeature> method's initialParams argument.
-     *  - *setfeature* Triggered when a feature is set for tranformation.
-     *      Listeners receive a *feature* property, with the feature that
-     *      is now set for transformation.
-     *  - *beforetransform* Triggered while dragging, before a feature is
-     *      transformed. The feature will not be transformed if a listener
-     *      returns false (but the box still will). Listeners receive one or
-     *      more of *center*, *scale*, *ratio* and *rotation*. The *center*
-     *      property is an <OpenLayers.Geometry.Point> object with the new
-     *      center of the transformed feature, the others are Floats with the
-     *      scale, ratio or rotation change since the last transformation.
-     *  - *transform* Triggered while dragging, when a feature is transformed.
-     *      Listeners receive an event object with one or more of *center*,
-     *      *scale*, *ratio* and *rotation*. The *center* property is an
-     *      <OpenLayers.Geometry.Point> object with the new center of the
-     *      transformed feature, the others are Floats with the scale, ratio
-     *      or rotation change of the feature since the last transformation.
-     *  - *transformcomplete* Triggered after dragging. Listeners receive
-     *      an event object with the transformed *feature*.
-     */
-    EVENT_TYPES: ["beforesetfeature", "setfeature", "beforetransform",
-        "transform", "transformcomplete"],
-
-    /**
-     * APIProperty: geometryTypes
-     * {Array(String)} To restrict transformation to a limited set of geometry
-     *     types, send a list of strings corresponding to the geometry class
-     *     names.
-     */
-    geometryTypes: null,
-
-    /**
-     * Property: layer
-     * {<OpenLayers.Layer.Vector>}
-     */
-    layer: null,
-    
-    /**
-     * APIProperty: preserveAspectRatio
-     * {Boolean} set to true to not change the feature's aspect ratio.
-     */
-    preserveAspectRatio: false,
-    
-    /**
-     * APIProperty: rotate
-     * {Boolean} set to false if rotation should be disabled. Default is true.
-     *     To be passed with the constructor or set when the control is not
-     *     active.
-     */
-    rotate: true,
-    
-    /**
-     * APIProperty: feature
-     * {<OpenLayers.Feature.Vector>} Feature currently available for
-     *     transformation. Read-only, use <setFeature> to set it manually.
-     */
-    feature: null,
-    
-    /**
-     * APIProperty: renderIntent
-     * {String|Object} Render intent for the transformation box and
-     *     handles. A symbolizer object can also be provided here.
-     */
-    renderIntent: "temporary",
-    
-    /**
-     * APIProperty: rotationHandleSymbolizer
-     * {Object|String} Optional. A custom symbolizer for the rotation handles.
-     *     A render intent can also be provided here. Defaults to
-     *     (code)
-     *     {
-     *         stroke: false,
-     *         pointRadius: 10,
-     *         fillOpacity: 0,
-     *         cursor: "pointer"
-     *     }
-     *     (end)
-     */
-    rotationHandleSymbolizer: null,
-    
-    /**
-     * APIProperty: box
-     * {<OpenLayers.Feature.Vector>} The transformation box rectangle.
-     *     Read-only.
-     */
-    box: null,
-    
-    /**
-     * APIProperty: center
-     * {<OpenLayers.Geometry.Point>} The center of the feature bounds.
-     * Read-only.
-     */
-    center: null,
-    
-    /**
-     * APIProperty: scale
-     * {Float} The scale of the feature, relative to the scale the time the
-     *     feature was set. Read-only, except for *beforesetfeature*
-     *     listeners.
-     */
-    scale: 1,
-    
-    /**
-     * APIProperty: ratio
-     * {Float} The ratio of the feature relative to the ratio the time the
-     *     feature was set. Read-only, except for *beforesetfeature*
-     *     listeners.
-     */
-    ratio: 1,
-    
-    /**
-     * Property: rotation
-     * {Integer} the current rotation angle of the box. Read-only, except for
-     *     *beforesetfeature* listeners.
-     */
-    rotation: 0,
-    
-    /**
-     * APIProperty: handles
-     * {Array(<OpenLayers.Feature.Vector>)} The 8 handles currently available
-     *     for scaling/resizing. Numbered counterclockwise, starting from the
-     *     southwest corner. Read-only.
-     */
-    handles: null,
-    
-    /**
-     * APIProperty: rotationHandles
-     * {Array(<OpenLayers.Feature.Vector>)} The 4 rotation handles currently
-     *     available for rotating. Numbered counterclockwise, starting from
-     *     the southwest corner. Read-only.
-     */
-    rotationHandles: null,
-    
-    /**
-     * Property: dragControl
-     * {<OpenLayers.Control.DragFeature>}
-     */
-    dragControl: null,
-    
-    /**
-     * Constructor: OpenLayers.Control.TransformFeature
-     * Create a new transform feature control.
-     *
-     * Parameters:
-     * layer - {<OpenLayers.Layer.Vector>} Layer that contains features that
-     *     will be transformed.
-     * options - {Object} Optional object whose properties will be set on the
-     *     control.
-     */
-    initialize: function(layer, options) {
-        // concatenate events specific to this control with those from the base
-        this.EVENT_TYPES =
-            OpenLayers.Control.TransformFeature.prototype.EVENT_TYPES.concat(
-            OpenLayers.Control.prototype.EVENT_TYPES
-        );
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-
-        this.layer = layer;
-
-        if(!this.rotationHandleSymbolizer) {
-            this.rotationHandleSymbolizer = {
-                stroke: false,
-                pointRadius: 10,
-                fillOpacity: 0,
-                cursor: "pointer"
-            };
-        }
-
-        this.createBox();
-        this.createControl();        
-    },
-    
-    /**
-     * APIMethod: activate
-     * Activates the control.
-     */
-    activate: function() {
-        var activated = false;
-        if(OpenLayers.Control.prototype.activate.apply(this, arguments)) {
-            this.dragControl.activate();
-            this.layer.addFeatures([this.box]);
-            this.rotate && this.layer.addFeatures(this.rotationHandles);
-            this.layer.addFeatures(this.handles);        
-            activated = true;
-        }
-        return activated;
-    },
-    
-    /**
-     * APIMethod: deactivate
-     * Deactivates the control.
-     */
-    deactivate: function() {
-        var deactivated = false;
-        if(OpenLayers.Control.prototype.deactivate.apply(this, arguments)) {
-            this.layer.removeFeatures(this.handles);
-            this.rotate && this.layer.removeFeatures(this.rotationHandles);
-            this.layer.removeFeatures([this.box]);
-            this.dragControl.deactivate();
-            deactivated = true;
-        }
-        return deactivated;
-    },
-    
-    /**
-     * Method: setMap
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>}
-     */
-    setMap: function(map) {
-        this.dragControl.setMap(map);
-        OpenLayers.Control.prototype.setMap.apply(this, arguments);
-    },
-
-    /**
-     * APIMethod: setFeature
-     * Place the transformation box on a feature and start transforming it.
-     * If the control is not active, it will be activated.
-     * 
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>}
-     * initialParams - {Object} Initial values for rotation, scale or ratio.
-     *     Setting a rotation value here will cause the transformation box to
-     *     start rotated. Setting a scale or ratio will not affect the
-     *     transormation box, but applications may use this to keep track of
-     *     scale and ratio of a feature across multiple transforms.
-     */
-    setFeature: function(feature, initialParams) {
-        initialParams = OpenLayers.Util.applyDefaults(initialParams, {
-            rotation: 0,
-            scale: 1,
-            ratio: 1
-        });
-        var evt = {feature: feature};
-        
-        var oldRotation = this.rotation;
-        var oldCenter = this.center;
-        OpenLayers.Util.extend(this, initialParams);
-
-        if(this.events.triggerEvent("beforesetfeature", evt) === false) {
-            return;
-        }
-
-        this.feature = feature;
-        this.activate();
-
-        this._setfeature = true;
-
-        var featureBounds = this.feature.geometry.getBounds();
-        this.box.move(featureBounds.getCenterLonLat());
-        this.box.geometry.rotate(-oldRotation, oldCenter);
-        this._angle = 0;
-
-        var ll;
-        if(this.rotation) {
-            var geom = feature.geometry.clone();
-            geom.rotate(-this.rotation, this.center);
-            var box = new OpenLayers.Feature.Vector(
-                geom.getBounds().toGeometry());
-            box.geometry.rotate(this.rotation, this.center);
-            this.box.geometry.rotate(this.rotation, this.center);
-            this.box.move(box.geometry.getBounds().getCenterLonLat());
-            var llGeom = box.geometry.components[0].components[0];
-            ll = llGeom.getBounds().getCenterLonLat();
-        } else {
-            ll = new OpenLayers.LonLat(featureBounds.left, featureBounds.bottom);
-        }
-        this.handles[0].move(ll);
-        
-        delete this._setfeature;
-
-        this.events.triggerEvent("setfeature", evt);
-    },
-    
-    /**
-     * Method: createBox
-     * Creates the box with all handles and transformation handles.
-     */
-    createBox: function() {
-        var control = this;
-        
-        this.center = new OpenLayers.Geometry.Point(0, 0);
-        var box = new OpenLayers.Feature.Vector(
-            new OpenLayers.Geometry.LineString([
-                new OpenLayers.Geometry.Point(-1, -1),
-                new OpenLayers.Geometry.Point(0, -1),
-                new OpenLayers.Geometry.Point(1, -1),
-                new OpenLayers.Geometry.Point(1, 0),
-                new OpenLayers.Geometry.Point(1, 1),
-                new OpenLayers.Geometry.Point(0, 1),
-                new OpenLayers.Geometry.Point(-1, 1),
-                new OpenLayers.Geometry.Point(-1, 0),
-                new OpenLayers.Geometry.Point(-1, -1)
-            ]), null,
-            typeof this.renderIntent == "string" ? null : this.renderIntent
-        );
-        
-        // Override for box move - make sure that the center gets updated
-        box.geometry.move = function(x, y) {
-            control._moving = true;
-            OpenLayers.Geometry.LineString.prototype.move.apply(this, arguments);
-            control.center.move(x, y);
-            delete control._moving;
-        };
-
-        // Overrides for vertex move, resize and rotate - make sure that
-        // handle and rotationHandle geometries are also moved, resized and
-        // rotated.
-        var vertexMoveFn = function(x, y) {
-            OpenLayers.Geometry.Point.prototype.move.apply(this, arguments);
-            this._rotationHandle && this._rotationHandle.geometry.move(x, y);
-            this._handle.geometry.move(x, y);
-        };
-        var vertexResizeFn = function(scale, center, ratio) {
-            OpenLayers.Geometry.Point.prototype.resize.apply(this, arguments);
-            this._rotationHandle && this._rotationHandle.geometry.resize(
-                scale, center, ratio);
-            this._handle.geometry.resize(scale, center, ratio);
-        };
-        var vertexRotateFn = function(angle, center) {
-            OpenLayers.Geometry.Point.prototype.rotate.apply(this, arguments);
-            this._rotationHandle && this._rotationHandle.geometry.rotate(
-                angle, center);
-            this._handle.geometry.rotate(angle, center);
-        };
-        
-        // Override for handle move - make sure that the box and other handles
-        // are updated, and finally transform the feature.
-        var handleMoveFn = function(x, y) {
-            var oldX = this.x, oldY = this.y;
-            OpenLayers.Geometry.Point.prototype.move.call(this, x, y);
-            if(control._moving) {
-                return;
-            }
-            var evt = control.dragControl.handlers.drag.evt;
-            var preserveAspectRatio = !control._setfeature &&
-                control.preserveAspectRatio;
-            var reshape = !preserveAspectRatio && !(evt && evt.shiftKey);
-            var oldGeom = new OpenLayers.Geometry.Point(oldX, oldY);
-            var centerGeometry = control.center;
-            this.rotate(-control.rotation, centerGeometry);
-            oldGeom.rotate(-control.rotation, centerGeometry);
-            var dx1 = this.x - centerGeometry.x;
-            var dy1 = this.y - centerGeometry.y;
-            var dx0 = dx1 - (this.x - oldGeom.x);
-            var dy0 = dy1 - (this.y - oldGeom.y);
-            this.x = oldX;
-            this.y = oldY;
-            var scale, ratio = 1;
-            if (reshape) {
-                scale = Math.abs(dy0) < 0.00001 ? 1 : dy1 / dy0;
-                ratio = (Math.abs(dx0) < 0.00001 ? 1 : (dx1 / dx0)) / scale;
-            } else {
-                var l0 = Math.sqrt((dx0 * dx0) + (dy0 * dy0));
-                var l1 = Math.sqrt((dx1 * dx1) + (dy1 * dy1));
-                scale = l1 / l0;
-            }
-
-            // rotate the box to 0 before resizing - saves us some
-            // calculations and is inexpensive because we don't drawFeature.
-            control._moving = true;
-            control.box.geometry.rotate(-control.rotation, centerGeometry);
-            delete control._moving;
-
-            control.box.geometry.resize(scale, centerGeometry, ratio);
-            control.box.geometry.rotate(control.rotation, centerGeometry);
-            control.transformFeature({scale: scale, ratio: ratio});
-        };
-        
-        // Override for rotation handle move - make sure that the box and
-        // other handles are updated, and finally transform the feature.
-        var rotationHandleMoveFn = function(x, y){
-            var oldX = this.x, oldY = this.y;
-            OpenLayers.Geometry.Point.prototype.move.call(this, x, y);
-            if(control._moving) {
-                return;
-            }
-            var evt = control.dragControl.handlers.drag.evt;
-            var constrain = (evt && evt.shiftKey) ? 45 : 1;
-            var centerGeometry = control.center;
-            var dx1 = this.x - centerGeometry.x;
-            var dy1 = this.y - centerGeometry.y;
-            var dx0 = dx1 - x;
-            var dy0 = dy1 - y;
-            this.x = oldX;
-            this.y = oldY;
-            var a0 = Math.atan2(dy0, dx0);
-            var a1 = Math.atan2(dy1, dx1);
-            var angle = a1 - a0;
-            angle *= 180 / Math.PI;
-            control._angle = (control._angle + angle) % 360;
-            var diff = control.rotation % constrain;
-            if(Math.abs(control._angle) >= constrain || diff !== 0) {
-                angle = Math.round(control._angle / constrain) * constrain -
-                    diff;
-                control._angle = 0;
-                control.box.geometry.rotate(angle, centerGeometry);
-                control.transformFeature({rotation: angle});
-            } 
-        };
-
-        var handles = new Array(8);
-        var rotationHandles = new Array(4);
-        var geom, handle, rotationHandle;
-        for(var i=0; i<8; ++i) {
-            geom = box.geometry.components[i];
-            handle = new OpenLayers.Feature.Vector(geom.clone(), null,
-                typeof this.renderIntent == "string" ? null :
-                this.renderIntent);
-            if(i % 2 == 0) {
-                rotationHandle = new OpenLayers.Feature.Vector(geom.clone(),
-                    null, typeof this.rotationHandleSymbolizer == "string" ?
-                    null : this.rotationHandleSymbolizer);
-                rotationHandle.geometry.move = rotationHandleMoveFn;
-                geom._rotationHandle = rotationHandle;
-                rotationHandles[i/2] = rotationHandle;
-            }
-            geom.move = vertexMoveFn;
-            geom.resize = vertexResizeFn;
-            geom.rotate = vertexRotateFn;
-            handle.geometry.move = handleMoveFn;
-            geom._handle = handle;
-            handles[i] = handle;
-        }
-        
-        this.box = box;
-        this.rotationHandles = rotationHandles;
-        this.handles = handles;
-    },
-    
-    /**
-     * Method: createControl
-     * Creates a DragFeature control for this control.
-     */
-    createControl: function() {
-        var control = this;
-        this.dragControl = new OpenLayers.Control.DragFeature(this.layer, {
-            documentDrag: true,
-            // avoid moving the feature itself - move the box instead
-            moveFeature: function(pixel) {
-                if(this.feature === control.feature) {
-                    this.feature = control.box;
-                }
-                OpenLayers.Control.DragFeature.prototype.moveFeature.apply(this,
-                    arguments);
-            },
-            // transform while dragging
-            onDrag: function(feature, pixel) {
-                if(feature === control.box) {
-                    control.transformFeature({center: control.center});
-                    control.drawHandles();
-                }
-            },
-            // set a new feature
-            onStart: function(feature, pixel) {
-                var eligible = !control.geometryTypes ||
-                    OpenLayers.Util.indexOf(control.geometryTypes,
-                        feature.geometry.CLASS_NAME) !== -1;
-                var i = OpenLayers.Util.indexOf(control.handles, feature);
-                i += OpenLayers.Util.indexOf(control.rotationHandles,
-                    feature);
-                if(feature !== control.feature && feature !== control.box &&
-                                                        i == -2 && eligible) {
-                    control.setFeature(feature);
-                }
-            },
-            onComplete: function(feature, pixel) {
-                control.events.triggerEvent("transformcomplete",
-                    {feature: control.feature});
-            }
-        });
-    },
-    
-    /**
-     * Method: drawHandles
-     * Draws the handles to match the box.
-     */
-    drawHandles: function() {
-        var layer = this.layer;
-        for(var i=0; i<8; ++i) {
-            if(this.rotate && i % 2 === 0) {
-                layer.drawFeature(this.rotationHandles[i/2],
-                    this.rotationHandleSymbolizer);
-            }
-            layer.drawFeature(this.handles[i], this.renderIntent);
-        }
-    },
-    
-    /**
-     * Method: transformFeature
-     * Transforms the feature.
-     * 
-     * Parameters:
-     * mods - {Object} An object with optional scale, ratio, rotation and
-     *     center properties.
-     */
-    transformFeature: function(mods) {
-        if(!this._setfeature) {
-            this.scale *= (mods.scale || 1);
-            this.ratio *= (mods.ratio || 1);
-            var oldRotation = this.rotation;
-            this.rotation = (this.rotation + (mods.rotation || 0)) % 360;
-            
-            if(this.events.triggerEvent("beforetransform", mods) !== false) {
-                var feature = this.feature;
-                var geom = feature.geometry;
-                var center = this.center;
-                geom.rotate(-oldRotation, center);
-                if(mods.scale || mods.ratio) {
-                    geom.resize(mods.scale, center, mods.ratio);
-                } else if(mods.center) {
-                    feature.move(mods.center.getBounds().getCenterLonLat());
-                }
-                geom.rotate(this.rotation, center);
-                this.layer.drawFeature(feature);
-                feature.toState(OpenLayers.State.UPDATE);
-                this.events.triggerEvent("transform", mods);
-            }
-        }
-        this.layer.drawFeature(this.box, this.renderIntent);
-        this.drawHandles();
-    },
-        
-    /**
-     * APIMethod: destroy
-     * Take care of things that are not handled in superclass.
-     */
-    destroy: function() {
-        var geom;
-        for(var i=0; i<8; ++i) {
-            geom = this.box.geometry.components[i];
-            geom._handle.destroy();
-            geom._handle = null;
-            geom._rotationHandle && geom._rotationHandle.destroy();
-            geom._rotationHandle = null;
-        }
-        this.box.destroy();
-        this.box = null;
-        this.layer = null;
-        this.dragControl.destroy();
-        OpenLayers.Control.prototype.destroy.apply(this, arguments);
-    },
-
-    CLASS_NAME: "OpenLayers.Control.TransformFeature"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/WMSGetFeatureInfo.js
+++ /dev/null
@@ -1,525 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Handler/Click.js
- * @requires OpenLayers/Handler/Hover.js
- * @requires OpenLayers/Request.js
- */
-
-/**
- * Class: OpenLayers.Control.WMSGetFeatureInfo
- * The WMSGetFeatureInfo control uses a WMS query to get information about a point on the map.  The
- * information may be in a display-friendly format such as HTML, or a machine-friendly format such 
- * as GML, depending on the server's capabilities and the client's configuration.  This control 
- * handles click or hover events, attempts to parse the results using an OpenLayers.Format, and 
- * fires a 'getfeatureinfo' event with the click position, the raw body of the response, and an 
- * array of features if it successfully read the response.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
-
-   /**
-     * APIProperty: hover
-     * {Boolean} Send GetFeatureInfo requests when mouse stops moving.
-     *     Default is false.
-     */
-    hover: false,
-
-    /**
-     * APIProperty: drillDown
-     * {Boolean} Drill down over all WMS layers in the map. When
-     *     using drillDown mode, hover is not possible, and an infoFormat that
-     *     returns parseable features is required. Default is false.
-     */
-    drillDown: false,
-
-    /**
-     * APIProperty: maxFeatures
-     * {Integer} Maximum number of features to return from a WMS query. This
-     *     sets the feature_count parameter on WMS GetFeatureInfo
-     *     requests.
-     */
-    maxFeatures: 10,
-
-    /** APIProperty: clickCallback
-     *  {String} The click callback to register in the
-     *      {<OpenLayers.Handler.Click>} object created when the hover
-     *      option is set to false. Default is "click".
-     */
-    clickCallback: "click",
-    
-    /**
-     * Property: layers
-     * {Array(<OpenLayers.Layer.WMS>)} The layers to query for feature info.
-     *     If omitted, all map WMS layers with a url that matches this <url> or
-     *     <layerUrls> will be considered.
-     */
-    layers: null,
-
-    /**
-     * Property: queryVisible
-     * {Boolean} If true, filter out hidden layers when searching the map for
-     *     layers to query.  Default is false.
-     */
-    queryVisible: false,
-
-    /**
-     * Property: url
-     * {String} The URL of the WMS service to use.  If not provided, the url
-     *     of the first eligible layer will be used.
-     */
-    url: null,
-    
-    /**
-     * Property: layerUrls
-     * {Array(String)} Optional list of urls for layers that should be queried.
-     *     This can be used when the layer url differs from the url used for
-     *     making GetFeatureInfo requests (in the case of a layer using cached
-     *     tiles).
-     */
-    layerUrls: null,
-
-    /**
-     * Property: infoFormat
-     * {String} The mimetype to request from the server
-     */
-    infoFormat: 'text/html',
-    
-    /**
-     * Property: vendorParams
-     * {Object} Additional parameters that will be added to the request, for
-     * WMS implementations that support them. This could e.g. look like
-     * (start code)
-     * {
-     *     radius: 5
-     * }
-     * (end)
-     */
-    vendorParams: {},
-    
-    /**
-     * Property: format
-     * {<OpenLayers.Format>} A format for parsing GetFeatureInfo responses.
-     *     Default is <OpenLayers.Format.WMSGetFeatureInfo>.
-     */
-    format: null,
-    
-    /**
-     * Property: formatOptions
-     * {Object} Optional properties to set on the format (if one is not provided
-     *     in the <format> property.
-     */
-    formatOptions: null,
-
-    /**
-     * APIProperty: handlerOptions
-     * {Object} Additional options for the handlers used by this control, e.g.
-     * (start code)
-     * {
-     *     "click": {delay: 100},
-     *     "hover": {delay: 300}
-     * }
-     * (end)
-     */
-    handlerOptions: null,
-    
-    /**
-     * Property: handler
-     * {Object} Reference to the <OpenLayers.Handler> for this control
-     */
-    handler: null,
-    
-    /**
-     * Property: hoverRequest
-     * {<OpenLayers.Request>} contains the currently running hover request
-     *     (if any).
-     */
-    hoverRequest: null,
-    
-    /**
-     * Constant: EVENT_TYPES
-     *
-     * Supported event types (in addition to those from <OpenLayers.Control>):
-     * beforegetfeatureinfo - Triggered before the request is sent.
-     *      The event object has an *xy* property with the position of the 
-     *      mouse click or hover event that triggers the request.
-     * nogetfeatureinfo - no queryable layers were found.
-     * getfeatureinfo - Triggered when a GetFeatureInfo response is received.
-     *      The event object has a *text* property with the body of the
-     *      response (String), a *features* property with an array of the
-     *      parsed features, an *xy* property with the position of the mouse
-     *      click or hover event that triggered the request, and a *request*
-     *      property with the request itself. If drillDown is set to true and
-     *      multiple requests were issued to collect feature info from all
-     *      layers, *text* and *request* will only contain the response body
-     *      and request object of the last request.
-     */
-    EVENT_TYPES: ["beforegetfeatureinfo", "nogetfeatureinfo", "getfeatureinfo"],
-
-    /**
-     * Constructor: <OpenLayers.Control.WMSGetFeatureInfo>
-     *
-     * Parameters:
-     * options - {Object} 
-     */
-    initialize: function(options) {
-        // concatenate events specific to vector with those from the base
-        this.EVENT_TYPES =
-            OpenLayers.Control.WMSGetFeatureInfo.prototype.EVENT_TYPES.concat(
-            OpenLayers.Control.prototype.EVENT_TYPES
-        );
-
-        options = options || {};
-        options.handlerOptions = options.handlerOptions || {};
-
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        
-        if(!this.format) {
-            this.format = new OpenLayers.Format.WMSGetFeatureInfo(
-                options.formatOptions
-            );
-        }
-        
-        if(this.drillDown === true) {
-            this.hover = false;
-        }
-
-        if(this.hover) {
-            this.handler = new OpenLayers.Handler.Hover(
-                   this, {
-                       'move': this.cancelHover,
-                       'pause': this.getInfoForHover
-                   },
-                   OpenLayers.Util.extend(this.handlerOptions.hover || {}, {
-                       'delay': 250
-                   }));
-        } else {
-            var callbacks = {};
-            callbacks[this.clickCallback] = this.getInfoForClick;
-            this.handler = new OpenLayers.Handler.Click(
-                this, callbacks, this.handlerOptions.click || {});
-        }
-    },
-
-    /**
-     * Method: activate
-     * Activates the control.
-     * 
-     * Returns:
-     * {Boolean} The control was effectively activated.
-     */
-    activate: function () {
-        if (!this.active) {
-            this.handler.activate();
-        }
-        return OpenLayers.Control.prototype.activate.apply(
-            this, arguments
-        );
-    },
-
-    /**
-     * Method: deactivate
-     * Deactivates the control.
-     * 
-     * Returns:
-     * {Boolean} The control was effectively deactivated.
-     */
-    deactivate: function () {
-        return OpenLayers.Control.prototype.deactivate.apply(
-            this, arguments
-        );
-    },
-    
-    /**
-     * Method: getInfoForClick 
-     * Called on click
-     *
-     * Parameters:
-     * evt - {<OpenLayers.Event>} 
-     */
-    getInfoForClick: function(evt) {
-        this.events.triggerEvent("beforegetfeatureinfo", {xy: evt.xy});
-        // Set the cursor to "wait" to tell the user we're working on their
-        // click.
-        OpenLayers.Element.addClass(this.map.viewPortDiv, "olCursorWait");
-        this.request(evt.xy, {});
-    },
-   
-    /**
-     * Method: getInfoForHover
-     * Pause callback for the hover handler
-     *
-     * Parameters:
-     * evt - {Object}
-     */
-    getInfoForHover: function(evt) {
-        this.events.triggerEvent("beforegetfeatureinfo", {xy: evt.xy});
-        this.request(evt.xy, {hover: true});
-    },
-
-    /**
-     * Method: cancelHover
-     * Cancel callback for the hover handler
-     */
-    cancelHover: function() {
-        if (this.hoverRequest) {
-            this.hoverRequest.abort();
-            this.hoverRequest = null;
-        }
-    },
-
-    /**
-     * Method: findLayers
-     * Internal method to get the layers, independent of whether we are
-     *     inspecting the map or using a client-provided array
-     */
-    findLayers: function() {
-
-        var candidates = this.layers || this.map.layers;
-        var layers = [];
-        var layer, url;
-        for(var i=0, len=candidates.length; i<len; ++i) {
-            layer = candidates[i];
-            if(layer instanceof OpenLayers.Layer.WMS &&
-               (!this.queryVisible || layer.getVisibility())) {
-                url = layer.url instanceof Array ? layer.url[0] : layer.url;
-                // if the control was not configured with a url, set it
-                // to the first layer url
-                if(this.drillDown === false && !this.url) {
-                    this.url = url;
-                }
-                if(this.drillDown === true || this.urlMatches(url)) {
-                    layers.push(layer);
-                }
-            }
-        }
-        return layers;
-    },
-    
-    /**
-     * Method: urlMatches
-     * Test to see if the provided url matches either the control <url> or one
-     *     of the <layerUrls>.
-     *
-     * Parameters:
-     * url - {String} The url to test.
-     *
-     * Returns:
-     * {Boolean} The provided url matches the control <url> or one of the
-     *     <layerUrls>.
-     */
-    urlMatches: function(url) {
-        var matches = OpenLayers.Util.isEquivalentUrl(this.url, url);
-        if(!matches && this.layerUrls) {
-            for(var i=0, len=this.layerUrls.length; i<len; ++i) {
-                if(OpenLayers.Util.isEquivalentUrl(this.layerUrls[i], url)) {
-                    matches = true;
-                    break;
-                }
-            }
-        }
-        return matches;
-    },
-
-    /**
-     * Method: buildWMSOptions
-     * Build an object with the relevant WMS options for the GetFeatureInfo request
-     *
-     * Parameters:
-     * url - {String} The url to be used for sending the request
-     * layers - {Array(<OpenLayers.Layer.WMS)} An array of layers
-     * clickPosition - {<OpenLayers.Pixel>} The position on the map where the mouse
-     *     event occurred.
-     * format - {String} The format from the corresponding GetMap request
-     */
-    buildWMSOptions: function(url, layers, clickPosition, format) {
-        var layerNames = [], styleNames = [];
-        for (var i = 0, len = layers.length; i < len; i++) { 
-            layerNames = layerNames.concat(layers[i].params.LAYERS);
-            styleNames = styleNames.concat(this.getStyleNames(layers[i]));
-        }
-        var params = OpenLayers.Util.extend({
-            service: "WMS",
-            version: layers[0].params.VERSION,
-            request: "GetFeatureInfo",
-            layers: layerNames,
-            query_layers: layerNames,
-            styles: styleNames,
-            bbox: this.map.getExtent().toBBOX(null,
-                layers[0].reverseAxisOrder()),
-            feature_count: this.maxFeatures,
-            height: this.map.getSize().h,
-            width: this.map.getSize().w,
-            format: format,
-            info_format: this.infoFormat
-        }, (parseFloat(layers[0].params.VERSION) >= 1.3) ?
-            {
-                crs: this.map.getProjection(),
-                i: clickPosition.x,
-                j: clickPosition.y
-            } :
-            {
-                srs: this.map.getProjection(),
-                x: clickPosition.x,
-                y: clickPosition.y
-            }
-        );
-        OpenLayers.Util.applyDefaults(params, this.vendorParams);
-        return {
-            url: url,
-            params: OpenLayers.Util.upperCaseObject(params),
-            callback: function(request) {
-                this.handleResponse(clickPosition, request);
-            },
-            scope: this
-        };
-    },
-
-    /**
-     * Method: getStyleNames
-     * Gets the STYLES parameter for the layer. Make sure the STYLES parameter
-     * matches the LAYERS parameter
-     * 
-     * Parameters:
-     * layer - {<OpenLayers.Layer.WMS>}
-     *
-     * Returns:
-     * {Array(String)} The STYLES parameter
-     */
-    getStyleNames: function(layer) {
-        // in the event of a WMS layer bundling multiple layers but not
-        // specifying styles,we need the same number of commas to specify
-        // the default style for each of the layers.  We can't just leave it
-        // blank as we may be including other layers that do specify styles.
-        var styleNames;
-        if (layer.params.STYLES) {
-            styleNames = layer.params.STYLES;
-        } else {
-            if (layer.params.LAYERS instanceof Array) {
-                styleNames = new Array(layer.params.LAYERS.length);
-            } else { // Assume it's a String
-                styleNames = layer.params.LAYERS.replace(/[^,]/g, "");
-            }
-        }
-        return styleNames;
-    },
-
-    /**
-     * Method: request
-     * Sends a GetFeatureInfo request to the WMS
-     * 
-     * Parameters:
-     * clickPosition - {<OpenLayers.Pixel>} The position on the map where the
-     *     mouse event occurred.
-     * options - {Object} additional options for this method.
-     * 
-     * Valid options:
-     * - *hover* {Boolean} true if we do the request for the hover handler
-     */
-    request: function(clickPosition, options) {
-        var layers = this.findLayers();
-        if(layers.length == 0) {
-            this.events.triggerEvent("nogetfeatureinfo");
-            // Reset the cursor.
-            OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait");
-            return;
-        }
-        
-        options = options || {};
-        if(this.drillDown === false) {
-            var wmsOptions = this.buildWMSOptions(this.url, layers,
-                clickPosition, layers[0].params.FORMAT); 
-            var request = OpenLayers.Request.GET(wmsOptions);
-    
-            if (options.hover === true) {
-                this.hoverRequest = request;
-            }
-        } else {
-            this._requestCount = 0;
-            this._numRequests = 0;
-            this.features = [];
-            // group according to service url to combine requests
-            var services = {}, url;
-            for(var i=0, len=layers.length; i<len; i++) {
-                var layer = layers[i];
-                var service, found = false;
-                url = layer.url instanceof Array ? layer.url[0] : layer.url;
-                if(url in services) {
-                    services[url].push(layer);
-                } else {
-                    this._numRequests++;
-                    services[url] = [layer];
-                }
-            }
-            var layers;
-            for (var url in services) {
-                layers = services[url];
-                var wmsOptions = this.buildWMSOptions(url, layers, 
-                    clickPosition, layers[0].params.FORMAT);
-                OpenLayers.Request.GET(wmsOptions); 
-            }
-        }
-    },
-
-    /**
-     * Method: triggerGetFeatureInfo
-     * Trigger the getfeatureinfo event when all is done
-     *
-     * Parameters:
-     * request - {XMLHttpRequest} The request object
-     * xy - {<OpenLayers.Pixel>} The position on the map where the
-     *     mouse event occurred.
-     * features - {Array(<OpenLayers.Feature.Vector>)}
-     */
-    triggerGetFeatureInfo: function(request, xy, features) {
-        this.events.triggerEvent("getfeatureinfo", {
-            text: request.responseText,
-            features: features,
-            request: request,
-            xy: xy
-        });
-
-        // Reset the cursor.
-        OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait");
-    },
-    
-    /**
-     * Method: handleResponse
-     * Handler for the GetFeatureInfo response.
-     * 
-     * Parameters:
-     * xy - {<OpenLayers.Pixel>} The position on the map where the
-     *     mouse event occurred.
-     * request - {XMLHttpRequest} The request object.
-     */
-    handleResponse: function(xy, request) {
-        
-        var doc = request.responseXML;
-        if(!doc || !doc.documentElement) {
-            doc = request.responseText;
-        }
-        var features = this.format.read(doc);
-        if (this.drillDown === false) {
-            this.triggerGetFeatureInfo(request, xy, features);
-        } else {
-            this._requestCount++;
-            this._features = (this._features || []).concat(features);
-            if (this._requestCount === this._numRequests) {
-                this.triggerGetFeatureInfo(request, xy, this._features.concat()); 
-                delete this._features;
-                delete this._requestCount;
-                delete this._numRequests;
-            }
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Control.WMSGetFeatureInfo"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/WMTSGetFeatureInfo.js
+++ /dev/null
@@ -1,443 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Handler/Click.js
- * @requires OpenLayers/Handler/Hover.js
- * @requires OpenLayers/Request.js
- * @requires OpenLayers/Format/WMSGetFeatureInfo.js
- */
-
-/**
- * Class: OpenLayers.Control.WMTSGetFeatureInfo
- * The WMTSGetFeatureInfo control uses a WMTS query to get information about a 
- *     point on the map.  The information may be in a display-friendly format 
- *     such as HTML, or a machine-friendly format such as GML, depending on the 
- *     server's capabilities and the client's configuration.  This control 
- *     handles click or hover events, attempts to parse the results using an 
- *     OpenLayers.Format, and fires a 'getfeatureinfo' event for each layer
- *     queried.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.WMTSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
-
-   /**
-     * APIProperty: hover
-     * {Boolean} Send GetFeatureInfo requests when mouse stops moving.
-     *     Default is false.
-     */
-    hover: false,
-    
-    /**
-     * Property: requestEncoding
-     * {String} One of "KVP" or "REST".  Only KVP encoding is supported at this 
-     *     time.
-     */
-    requestEncoding: "KVP",
-
-    /**
-     * APIProperty: drillDown
-     * {Boolean} Drill down over all WMTS layers in the map. When
-     *     using drillDown mode, hover is not possible.  A getfeatureinfo event
-     *     will be fired for each layer queried.
-     */
-    drillDown: false,
-
-    /**
-     * APIProperty: maxFeatures
-     * {Integer} Maximum number of features to return from a WMTS query. This
-     *     sets the feature_count parameter on WMTS GetFeatureInfo
-     *     requests.
-     */
-    maxFeatures: 10,
-
-    /** APIProperty: clickCallback
-     *  {String} The click callback to register in the
-     *      {<OpenLayers.Handler.Click>} object created when the hover
-     *      option is set to false. Default is "click".
-     */
-    clickCallback: "click",
-    
-    /**
-     * Property: layers
-     * {Array(<OpenLayers.Layer.WMTS>)} The layers to query for feature info.
-     *     If omitted, all map WMTS layers will be considered.
-     */
-    layers: null,
-
-    /**
-     * APIProperty: queryVisible
-     * {Boolean} Filter out hidden layers when searching the map for layers to 
-     *     query.  Default is true.
-     */
-    queryVisible: true,
-
-    /**
-     * Property: infoFormat
-     * {String} The mimetype to request from the server
-     */
-    infoFormat: 'text/html',
-    
-    /**
-     * Property: vendorParams
-     * {Object} Additional parameters that will be added to the request, for
-     * WMTS implementations that support them. This could e.g. look like
-     * (start code)
-     * {
-     *     radius: 5
-     * }
-     * (end)
-     */
-    vendorParams: {},
-    
-    /**
-     * Property: format
-     * {<OpenLayers.Format>} A format for parsing GetFeatureInfo responses.
-     *     Default is <OpenLayers.Format.WMSGetFeatureInfo>.
-     */
-    format: null,
-    
-    /**
-     * Property: formatOptions
-     * {Object} Optional properties to set on the format (if one is not provided
-     *     in the <format> property.
-     */
-    formatOptions: null,
-
-    /**
-     * APIProperty: handlerOptions
-     * {Object} Additional options for the handlers used by this control, e.g.
-     * (start code)
-     * {
-     *     "click": {delay: 100},
-     *     "hover": {delay: 300}
-     * }
-     * (end)
-     */
-    handlerOptions: null,
-    
-    /**
-     * Property: handler
-     * {Object} Reference to the <OpenLayers.Handler> for this control
-     */
-    handler: null,
-    
-    /**
-     * Property: hoverRequest
-     * {<OpenLayers.Request>} contains the currently running hover request
-     *     (if any).
-     */
-    hoverRequest: null,
-    
-    /**
-     * Constant: EVENT_TYPES
-     *
-     * Supported event types (in addition to those from <OpenLayers.Control>):
-     * beforegetfeatureinfo - Triggered before each request is sent.
-     *      The event object has an *xy* property with the position of the 
-     *      mouse click or hover event that triggers the request and a *layer*
-     *      property referencing the layer about to be queried.  If a listener
-     *      returns false, the request will not be issued.
-     * getfeatureinfo - Triggered when a GetFeatureInfo response is received.
-     *      The event object has a *text* property with the body of the
-     *      response (String), a *features* property with an array of the
-     *      parsed features, an *xy* property with the position of the mouse
-     *      click or hover event that triggered the request, a *layer* property
-     *      referencing the layer queried and a *request* property with the 
-     *      request itself. If drillDown is set to true, one event will be fired
-     *      for each layer queried.
-     * exception - Triggered when a GetFeatureInfo request fails (with a 
-     *      status other than 200) or whenparsing fails.  Listeners will receive 
-     *      an event with *request*, *xy*, and *layer*  properties.  In the case 
-     *      of a parsing error, the event will also contain an *error* property.
-     */
-    EVENT_TYPES: ["beforegetfeatureinfo", "getfeatureinfo", "exception"],
-    
-    /** 
-     * Property: pending
-     * {Number}  The number of pending requests.
-     */
-    pending: 0,
-
-    /**
-     * Constructor: <OpenLayers.Control.WMTSGetFeatureInfo>
-     *
-     * Parameters:
-     * options - {Object} 
-     */
-    initialize: function(options) {
-        // concatenate events specific to vector with those from the base
-        this.EVENT_TYPES =
-            OpenLayers.Control.WMTSGetFeatureInfo.prototype.EVENT_TYPES.concat(
-            OpenLayers.Control.prototype.EVENT_TYPES
-        );
-
-        options = options || {};
-        options.handlerOptions = options.handlerOptions || {};
-
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        
-        if (!this.format) {
-            this.format = new OpenLayers.Format.WMSGetFeatureInfo(
-                options.formatOptions
-            );
-        }
-        
-        if (this.drillDown === true) {
-            this.hover = false;
-        }
-
-        if (this.hover) {
-            this.handler = new OpenLayers.Handler.Hover(
-                this, {
-                    move: this.cancelHover,
-                    pause: this.getInfoForHover
-                },
-                OpenLayers.Util.extend(
-                    this.handlerOptions.hover || {}, {delay: 250}
-                )
-            );
-        } else {
-            var callbacks = {};
-            callbacks[this.clickCallback] = this.getInfoForClick;
-            this.handler = new OpenLayers.Handler.Click(
-                this, callbacks, this.handlerOptions.click || {}
-            );
-        }
-    },
-
-    /**
-     * Method: activate
-     * Activates the control.
-     * 
-     * Returns:
-     * {Boolean} The control was effectively activated.
-     */
-    activate: function () {
-        if (!this.active) {
-            this.handler.activate();
-        }
-        return OpenLayers.Control.prototype.activate.apply(
-            this, arguments
-        );
-    },
-
-    /**
-     * Method: deactivate
-     * Deactivates the control.
-     * 
-     * Returns:
-     * {Boolean} The control was effectively deactivated.
-     */
-    deactivate: function () {
-        return OpenLayers.Control.prototype.deactivate.apply(
-            this, arguments
-        );
-    },
-    
-    /**
-     * Method: getInfoForClick 
-     * Called on click
-     *
-     * Parameters:
-     * evt - {<OpenLayers.Event>} 
-     */
-    getInfoForClick: function(evt) {
-        this.request(evt.xy, {});
-    },
-   
-    /**
-     * Method: getInfoForHover
-     * Pause callback for the hover handler
-     *
-     * Parameters:
-     * evt - {Object}
-     */
-    getInfoForHover: function(evt) {
-        this.request(evt.xy, {hover: true});
-    },
-
-    /**
-     * Method: cancelHover
-     * Cancel callback for the hover handler
-     */
-    cancelHover: function() {
-        if (this.hoverRequest) {
-            --this.pending;
-            if (this.pending <= 0) {
-                OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait");
-                this.pending = 0;
-            }            
-            this.hoverRequest.abort();
-            this.hoverRequest = null;
-        }
-    },
-
-    /**
-     * Method: findLayers
-     * Internal method to get the layers, independent of whether we are
-     *     inspecting the map or using a client-provided array
-     */
-    findLayers: function() {
-        var candidates = this.layers || this.map.layers;
-        var layers = [];
-        var layer;
-        for (var i=candidates.length-1; i>=0; --i) {
-            layer = candidates[i];
-            if (layer instanceof OpenLayers.Layer.WMTS &&
-                layer.requestEncoding === this.requestEncoding &&
-                (!this.queryVisible || layer.getVisibility())) {
-                layers.push(layer);
-                if (!this.drillDown || this.hover) {
-                    break;
-                }
-            }
-        }
-        return layers;
-    },
-    
-    /**
-     * Method: buildRequestOptions
-     * Build an object with the relevant options for the GetFeatureInfo request.
-     *
-     * Parameters:
-     * layer - {<OpenLayers.Layer.WMTS>} A WMTS layer.
-     * xy - {<OpenLayers.Pixel>} The position on the map where the 
-     *     mouse event occurred.
-     */
-    buildRequestOptions: function(layer, xy) {
-        var loc = this.map.getLonLatFromPixel(xy);
-        var getTileUrl = layer.getURL(
-            new OpenLayers.Bounds(loc.lon, loc.lat, loc.lon, loc.lat)
-        );
-        var params = OpenLayers.Util.getParameters(getTileUrl);
-        var tileInfo = layer.getTileInfo(loc);
-        OpenLayers.Util.extend(params, {
-            service: "WMTS",
-            version: layer.version,
-            request: "GetFeatureInfo",
-            infoFormat: this.infoFormat,
-            i: tileInfo.i,
-            j: tileInfo.j
-        });
-        OpenLayers.Util.applyDefaults(params, this.vendorParams);
-        return {
-            url: layer.url instanceof Array ? layer.url[0] : layer.url,
-            params: OpenLayers.Util.upperCaseObject(params),
-            callback: function(request) {
-                this.handleResponse(xy, request, layer);
-            },
-            scope: this
-        };
-    },
-
-    /**
-     * Method: request
-     * Sends a GetFeatureInfo request to the WMTS
-     * 
-     * Parameters:
-     * xy - {<OpenLayers.Pixel>} The position on the map where the mouse event 
-     *     occurred.
-     * options - {Object} additional options for this method.
-     * 
-     * Valid options:
-     * - *hover* {Boolean} true if we do the request for the hover handler
-     */
-    request: function(xy, options) {
-        options = options || {};
-        var layers = this.findLayers();
-        if (layers.length > 0) {
-            var issue, layer;
-            for (var i=0, len=layers.length; i<len; i++) {
-                layer = layers[i];
-                issue = this.events.triggerEvent("beforegetfeatureinfo", {
-                    xy: xy,
-                    layer: layer
-                });
-                if (issue !== false) {
-                    ++this.pending;
-                    var requestOptions = this.buildRequestOptions(layer, xy);
-                    var request = OpenLayers.Request.GET(requestOptions);
-                    if (options.hover === true) {
-                        this.hoverRequest = request;
-                    }
-                }
-            }
-            if (this.pending > 0) {
-                OpenLayers.Element.addClass(this.map.viewPortDiv, "olCursorWait");
-            }
-        }
-    },
-
-    /**
-     * Method: handleResponse
-     * Handler for the GetFeatureInfo response.
-     * 
-     * Parameters:
-     * xy - {<OpenLayers.Pixel>} The position on the map where the mouse event 
-     *     occurred.
-     * request - {XMLHttpRequest} The request object.
-     * layer - {<OpenLayers.Layer.WMTS>} The queried layer.
-     */
-    handleResponse: function(xy, request, layer) {
-        --this.pending;
-        if (this.pending <= 0) {
-            OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait");
-            this.pending = 0;
-        }
-        if (request.status && (request.status < 200 || request.status >= 300)) {
-            this.events.triggerEvent("exception", {
-                xy: xy, 
-                request: request,
-                layer: layer
-            });
-        } else {
-            var doc = request.responseXML;
-            if (!doc || !doc.documentElement) {
-                doc = request.responseText;
-            }
-            var features, except;
-            try {
-                features = this.format.read(doc);
-            } catch (error) {
-                except = true;
-                this.events.triggerEvent("exception", {
-                    xy: xy,
-                    request: request,
-                    error: error,
-                    layer: layer
-                });
-            }
-            if (!except) {
-                this.events.triggerEvent("getfeatureinfo", {
-                    text: request.responseText,
-                    features: features,
-                    request: request,
-                    xy: xy,
-                    layer: layer
-                });
-            }
-        }
-    },
-   
-    /** 
-     * Method: setMap
-     * Set the map property for the control. 
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>} 
-     */
-    setMap: function(map) {
-        this.handler.setMap(map);
-        OpenLayers.Control.prototype.setMap.apply(this, arguments);
-    },
-
-    CLASS_NAME: "OpenLayers.Control.WMTSGetFeatureInfo"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/ZoomBox.js
+++ /dev/null
@@ -1,96 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- * @requires OpenLayers/Handler/Box.js
- */
-
-/**
- * Class: OpenLayers.Control.ZoomBox
- * The ZoomBox control enables zooming directly to a given extent, by drawing 
- * a box on the map. The box is drawn by holding down shift, whilst dragging 
- * the mouse.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.ZoomBox = OpenLayers.Class(OpenLayers.Control, {
-    /**
-     * Property: type
-     * {OpenLayers.Control.TYPE}
-     */
-    type: OpenLayers.Control.TYPE_TOOL,
-
-    /**
-     * Property: out
-     * {Boolean} Should the control be used for zooming out?
-     */
-    out: false,
-
-    /**
-     * Property: alwaysZoom
-     * {Boolean} Always zoom in/out, when box drawed 
-     */
-    alwaysZoom: false,
-
-    /**
-     * Method: draw
-     */    
-    draw: function() {
-        this.handler = new OpenLayers.Handler.Box( this,
-                            {done: this.zoomBox}, {keyMask: this.keyMask} );
-    },
-
-    /**
-     * Method: zoomBox
-     *
-     * Parameters:
-     * position - {<OpenLayers.Bounds>} or {<OpenLayers.Pixel>}
-     */
-    zoomBox: function (position) {
-        if (position instanceof OpenLayers.Bounds) {
-            var bounds;
-            if (!this.out) {
-                var minXY = this.map.getLonLatFromPixel(
-                            new OpenLayers.Pixel(position.left, position.bottom));
-                var maxXY = this.map.getLonLatFromPixel(
-                            new OpenLayers.Pixel(position.right, position.top));
-                bounds = new OpenLayers.Bounds(minXY.lon, minXY.lat,
-                                               maxXY.lon, maxXY.lat);
-            } else {
-                var pixWidth = Math.abs(position.right-position.left);
-                var pixHeight = Math.abs(position.top-position.bottom);
-                var zoomFactor = Math.min((this.map.size.h / pixHeight),
-                    (this.map.size.w / pixWidth));
-                var extent = this.map.getExtent();
-                var center = this.map.getLonLatFromPixel(
-                    position.getCenterPixel());
-                var xmin = center.lon - (extent.getWidth()/2)*zoomFactor;
-                var xmax = center.lon + (extent.getWidth()/2)*zoomFactor;
-                var ymin = center.lat - (extent.getHeight()/2)*zoomFactor;
-                var ymax = center.lat + (extent.getHeight()/2)*zoomFactor;
-                bounds = new OpenLayers.Bounds(xmin, ymin, xmax, ymax);
-            }
-            // always zoom in/out 
-            var lastZoom = this.map.getZoom(); 
-            this.map.zoomToExtent(bounds);
-            if (lastZoom == this.map.getZoom() && this.alwaysZoom == true){ 
-                this.map.zoomTo(lastZoom + (this.out ? -1 : 1)); 
-            }
-        } else { // it's a pixel
-            if (!this.out) {
-                this.map.setCenter(this.map.getLonLatFromPixel(position),
-                               this.map.getZoom() + 1);
-            } else {
-                this.map.setCenter(this.map.getLonLatFromPixel(position),
-                               this.map.getZoom() - 1);
-            }
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Control.ZoomBox"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/ZoomIn.js
+++ /dev/null
@@ -1,36 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- */
-
-/**
- * Class: OpenLayers.Control.ZoomIn
- * The ZoomIn control is a button to increase the zoom level of a map.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.ZoomIn = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * Property: type
-     * {String} The type of <OpenLayers.Control> -- When added to a 
-     *     <Control.Panel>, 'type' is used by the panel to determine how to 
-     *     handle our events.
-     */
-    type: OpenLayers.Control.TYPE_BUTTON,
-    
-    /**
-     * Method: trigger
-     */
-    trigger: function(){
-        this.map.zoomIn();
-    },
-
-    CLASS_NAME: "OpenLayers.Control.ZoomIn"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/ZoomOut.js
+++ /dev/null
@@ -1,36 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- */
-
-/**
- * Class: OpenLayers.Control.ZoomOut
- * The ZoomOut control is a button to decrease the zoom level of a map.
- *
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.ZoomOut = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * Property: type
-     * {String} The type of <OpenLayers.Control> -- When added to a 
-     *     <Control.Panel>, 'type' is used by the panel to determine how to 
-     *     handle our events.
-     */
-    type: OpenLayers.Control.TYPE_BUTTON,
-    
-    /**
-     * Method: trigger
-     */
-    trigger: function(){
-        this.map.zoomOut();
-    },
-
-    CLASS_NAME: "OpenLayers.Control.ZoomOut"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/ZoomPanel.js
+++ /dev/null
@@ -1,55 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control/Panel.js
- * @requires OpenLayers/Control/ZoomIn.js
- * @requires OpenLayers/Control/ZoomOut.js
- * @requires OpenLayers/Control/ZoomToMaxExtent.js
- */
-
-/**
- * Class: OpenLayers.Control.ZoomPanel
- * The ZoomPanel control is a compact collecton of 3 zoom controls: a 
- * <OpenLayers.Control.ZoomIn>, a <OpenLayers.Control.ZoomToMaxExtent>, and a
- * <OpenLayers.Control.ZoomOut>. By default it is drawn in the upper left 
- * corner of the map.
- *
- * Note: 
- * If you wish to use this class with the default images and you want 
- *       it to look nice in ie6, you should add the following, conditionally
- *       added css stylesheet to your HTML file:
- * 
- * (code)
- * <!--[if lte IE 6]>
- *   <link rel="stylesheet" href="../theme/default/ie6-style.css" type="text/css" />
- * <![endif]-->
- * (end)
- * 
- * Inherits from:
- *  - <OpenLayers.Control.Panel>
- */
-OpenLayers.Control.ZoomPanel = OpenLayers.Class(OpenLayers.Control.Panel, {
-
-    /**
-     * Constructor: OpenLayers.Control.ZoomPanel 
-     * Add the three zooming controls.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be used
-     *     to extend the control.
-     */
-    initialize: function(options) {
-        OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
-        this.addControls([
-            new OpenLayers.Control.ZoomIn(),
-            new OpenLayers.Control.ZoomToMaxExtent(),
-            new OpenLayers.Control.ZoomOut()
-        ]);
-    },
-
-    CLASS_NAME: "OpenLayers.Control.ZoomPanel"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Control/ZoomToMaxExtent.js
+++ /dev/null
@@ -1,41 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Control.js
- */
-
-/**
- * Class: OpenLayers.Control.ZoomToMaxExtent 
- * The ZoomToMaxExtent control is a button that zooms out to the maximum
- * extent of the map. It is designed to be used with a 
- * <OpenLayers.Control.Panel>.
- * 
- * Inherits from:
- *  - <OpenLayers.Control>
- */
-OpenLayers.Control.ZoomToMaxExtent = OpenLayers.Class(OpenLayers.Control, {
-
-    /**
-     * Property: type
-     * {String} The type of <OpenLayers.Control> -- When added to a 
-     *     <Control.Panel>, 'type' is used by the panel to determine how to 
-     *     handle our events.
-     */
-    type: OpenLayers.Control.TYPE_BUTTON,
-    
-    /*
-     * Method: trigger
-     * Do the zoom.
-     */
-    trigger: function() {
-        if (this.map) {
-            this.map.zoomToMaxExtent();
-        }    
-    },
-
-    CLASS_NAME: "OpenLayers.Control.ZoomToMaxExtent"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Events.js
+++ /dev/null
@@ -1,856 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Util.js
- */
-
-/**
- * Namespace: OpenLayers.Event
- * Utility functions for event handling.
- */
-OpenLayers.Event = {
-
-    /** 
-     * Property: observers 
-     * {Object} A hashtable cache of the event observers. Keyed by
-     * element._eventCacheID 
-     */
-    observers: false,
-    
-    /** 
-     * Constant: KEY_BACKSPACE 
-     * {int} 
-     */
-    KEY_BACKSPACE: 8,
-
-    /** 
-     * Constant: KEY_TAB 
-     * {int} 
-     */
-    KEY_TAB: 9,
-
-    /** 
-     * Constant: KEY_RETURN 
-     * {int} 
-     */
-    KEY_RETURN: 13,
-
-    /** 
-     * Constant: KEY_ESC 
-     * {int} 
-     */
-    KEY_ESC: 27,
-
-    /** 
-     * Constant: KEY_LEFT 
-     * {int} 
-     */
-    KEY_LEFT: 37,
-
-    /** 
-     * Constant: KEY_UP 
-     * {int} 
-     */
-    KEY_UP: 38,
-
-    /** 
-     * Constant: KEY_RIGHT 
-     * {int} 
-     */
-    KEY_RIGHT: 39,
-
-    /** 
-     * Constant: KEY_DOWN 
-     * {int} 
-     */
-    KEY_DOWN: 40,
-
-    /** 
-     * Constant: KEY_DELETE 
-     * {int} 
-     */
-    KEY_DELETE: 46,
-
-
-    /**
-     * Method: element
-     * Cross browser event element detection.
-     * 
-     * Parameters:
-     * event - {Event} 
-     * 
-     * Returns:
-     * {DOMElement} The element that caused the event 
-     */
-    element: function(event) {
-        return event.target || event.srcElement;
-    },
-
-    /**
-     * Method: isLeftClick
-     * Determine whether event was caused by a left click. 
-     *
-     * Parameters:
-     * event - {Event} 
-     * 
-     * Returns:
-     * {Boolean}
-     */
-    isLeftClick: function(event) {
-        return (((event.which) && (event.which == 1)) ||
-                ((event.button) && (event.button == 1)));
-    },
-
-    /**
-     * Method: isRightClick
-     * Determine whether event was caused by a right mouse click. 
-     *
-     * Parameters:
-     * event - {Event} 
-     * 
-     * Returns:
-     * {Boolean}
-     */
-     isRightClick: function(event) {
-        return (((event.which) && (event.which == 3)) ||
-                ((event.button) && (event.button == 2)));
-    },
-     
-    /**
-     * Method: stop
-     * Stops an event from propagating. 
-     *
-     * Parameters: 
-     * event - {Event} 
-     * allowDefault - {Boolean} If true, we stop the event chain but 
-     *                               still allow the default browser 
-     *                               behaviour (text selection, radio-button 
-     *                               clicking, etc)
-     *                               Default false
-     */
-    stop: function(event, allowDefault) {
-        
-        if (!allowDefault) { 
-            if (event.preventDefault) {
-                event.preventDefault();
-            } else {
-                event.returnValue = false;
-            }
-        }
-                
-        if (event.stopPropagation) {
-            event.stopPropagation();
-        } else {
-            event.cancelBubble = true;
-        }
-    },
-
-    /** 
-     * Method: findElement
-     * 
-     * Parameters:
-     * event - {Event} 
-     * tagName - {String} 
-     * 
-     * Returns:
-     * {DOMElement} The first node with the given tagName, starting from the
-     * node the event was triggered on and traversing the DOM upwards
-     */
-    findElement: function(event, tagName) {
-        var element = OpenLayers.Event.element(event);
-        while (element.parentNode && (!element.tagName ||
-              (element.tagName.toUpperCase() != tagName.toUpperCase()))){
-            element = element.parentNode;
-        }
-        return element;
-    },
-
-    /** 
-     * Method: observe
-     * 
-     * Parameters:
-     * elementParam - {DOMElement || String} 
-     * name - {String} 
-     * observer - {function} 
-     * useCapture - {Boolean} 
-     */
-    observe: function(elementParam, name, observer, useCapture) {
-        var element = OpenLayers.Util.getElement(elementParam);
-        useCapture = useCapture || false;
-
-        if (name == 'keypress' &&
-           (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
-           || element.attachEvent)) {
-            name = 'keydown';
-        }
-
-        //if observers cache has not yet been created, create it
-        if (!this.observers) {
-            this.observers = {};
-        }
-
-        //if not already assigned, make a new unique cache ID
-        if (!element._eventCacheID) {
-            var idPrefix = "eventCacheID_";
-            if (element.id) {
-                idPrefix = element.id + "_" + idPrefix;
-            }
-            element._eventCacheID = OpenLayers.Util.createUniqueID(idPrefix);
-        }
-
-        var cacheID = element._eventCacheID;
-
-        //if there is not yet a hash entry for this element, add one
-        if (!this.observers[cacheID]) {
-            this.observers[cacheID] = [];
-        }
-
-        //add a new observer to this element's list
-        this.observers[cacheID].push({
-            'element': element,
-            'name': name,
-            'observer': observer,
-            'useCapture': useCapture
-        });
-
-        //add the actual browser event listener
-        if (element.addEventListener) {
-            element.addEventListener(name, observer, useCapture);
-        } else if (element.attachEvent) {
-            element.attachEvent('on' + name, observer);
-        }
-    },
-
-    /** 
-     * Method: stopObservingElement
-     * Given the id of an element to stop observing, cycle through the 
-     *   element's cached observers, calling stopObserving on each one, 
-     *   skipping those entries which can no longer be removed.
-     * 
-     * parameters:
-     * elementParam - {DOMElement || String} 
-     */
-    stopObservingElement: function(elementParam) {
-        var element = OpenLayers.Util.getElement(elementParam);
-        var cacheID = element._eventCacheID;
-
-        this._removeElementObservers(OpenLayers.Event.observers[cacheID]);
-    },
-
-    /**
-     * Method: _removeElementObservers
-     *
-     * Parameters:
-     * elementObservers - {Array(Object)} Array of (element, name, 
-     *                                         observer, usecapture) objects, 
-     *                                         taken directly from hashtable
-     */
-    _removeElementObservers: function(elementObservers) {
-        if (elementObservers) {
-            for(var i = elementObservers.length-1; i >= 0; i--) {
-                var entry = elementObservers[i];
-                var args = new Array(entry.element,
-                                     entry.name,
-                                     entry.observer,
-                                     entry.useCapture);
-                var removed = OpenLayers.Event.stopObserving.apply(this, args);
-            }
-        }
-    },
-
-    /**
-     * Method: stopObserving
-     * 
-     * Parameters:
-     * elementParam - {DOMElement || String} 
-     * name - {String} 
-     * observer - {function} 
-     * useCapture - {Boolean} 
-     *  
-     * Returns:
-     * {Boolean} Whether or not the event observer was removed
-     */
-    stopObserving: function(elementParam, name, observer, useCapture) {
-        useCapture = useCapture || false;
-    
-        var element = OpenLayers.Util.getElement(elementParam);
-        var cacheID = element._eventCacheID;
-
-        if (name == 'keypress') {
-            if ( navigator.appVersion.match(/Konqueror|Safari|KHTML/) || 
-                 element.detachEvent) {
-              name = 'keydown';
-            }
-        }
-
-        // find element's entry in this.observers cache and remove it
-        var foundEntry = false;
-        var elementObservers = OpenLayers.Event.observers[cacheID];
-        if (elementObservers) {
-    
-            // find the specific event type in the element's list
-            var i=0;
-            while(!foundEntry && i < elementObservers.length) {
-                var cacheEntry = elementObservers[i];
-    
-                if ((cacheEntry.name == name) &&
-                    (cacheEntry.observer == observer) &&
-                    (cacheEntry.useCapture == useCapture)) {
-    
-                    elementObservers.splice(i, 1);
-                    if (elementObservers.length == 0) {
-                        delete OpenLayers.Event.observers[cacheID];
-                    }
-                    foundEntry = true;
-                    break; 
-                }
-                i++;           
-            }
-        }
-    
-        //actually remove the event listener from browser
-        if (foundEntry) {
-            if (element.removeEventListener) {
-                element.removeEventListener(name, observer, useCapture);
-            } else if (element && element.detachEvent) {
-                element.detachEvent('on' + name, observer);
-            }
-        }
-        return foundEntry;
-    },
-    
-    /** 
-     * Method: unloadCache
-     * Cycle through all the element entries in the events cache and call
-     *   stopObservingElement on each. 
-     */
-    unloadCache: function() {
-        // check for OpenLayers.Event before checking for observers, because
-        // OpenLayers.Event may be undefined in IE if no map instance was
-        // created
-        if (OpenLayers.Event && OpenLayers.Event.observers) {
-            for (var cacheID in OpenLayers.Event.observers) {
-                var elementObservers = OpenLayers.Event.observers[cacheID];
-                OpenLayers.Event._removeElementObservers.apply(this, 
-                                                           [elementObservers]);
-            }
-            OpenLayers.Event.observers = false;
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Event"
-};
-
-/* prevent memory leaks in IE */
-OpenLayers.Event.observe(window, 'unload', OpenLayers.Event.unloadCache, false);
-
-// FIXME: Remove this in 3.0. In 3.0, Event.stop will no longer be provided
-// by OpenLayers.
-if (window.Event) {
-    OpenLayers.Util.applyDefaults(window.Event, OpenLayers.Event);
-} else {
-    var Event = OpenLayers.Event;
-}
-
-/**
- * Class: OpenLayers.Events
- */
-OpenLayers.Events = OpenLayers.Class({
-
-    /** 
-     * Constant: BROWSER_EVENTS
-     * {Array(String)} supported events 
-     */
-    BROWSER_EVENTS: [
-        "mouseover", "mouseout",
-        "mousedown", "mouseup", "mousemove", 
-        "click", "dblclick", "rightclick", "dblrightclick",
-        "resize", "focus", "blur"
-    ],
-
-    /** 
-     * Property: listeners 
-     * {Object} Hashtable of Array(Function): events listener functions  
-     */
-    listeners: null,
-
-    /** 
-     * Property: object 
-     * {Object}  the code object issuing application events 
-     */
-    object: null,
-
-    /** 
-     * Property: element 
-     * {DOMElement}  the DOM element receiving browser events 
-     */
-    element: null,
-
-    /** 
-     * Property: eventTypes 
-     * {Array(String)}  list of support application events 
-     */
-    eventTypes: null,
-
-    /** 
-     * Property: eventHandler 
-     * {Function}  bound event handler attached to elements 
-     */
-    eventHandler: null,
-
-    /** 
-     * APIProperty: fallThrough 
-     * {Boolean} 
-     */
-    fallThrough: null,
-
-    /** 
-     * APIProperty: includeXY
-     * {Boolean} Should the .xy property automatically be created for browser
-     *    mouse events? In general, this should be false. If it is true, then
-     *    mouse events will automatically generate a '.xy' property on the 
-     *    event object that is passed. (Prior to OpenLayers 2.7, this was true
-     *    by default.) Otherwise, you can call the getMousePosition on the
-     *    relevant events handler on the object available via the 'evt.object'
-     *    property of the evt object. So, for most events, you can call:
-     *    function named(evt) { 
-     *        this.xy = this.object.events.getMousePosition(evt) 
-     *    } 
-     *
-     *    This option typically defaults to false for performance reasons:
-     *    when creating an events object whose primary purpose is to manage
-     *    relatively positioned mouse events within a div, it may make
-     *    sense to set it to true.
-     *
-     *    This option is also used to control whether the events object caches
-     *    offsets. If this is false, it will not: the reason for this is that
-     *    it is only expected to be called many times if the includeXY property
-     *    is set to true. If you set this to true, you are expected to clear 
-     *    the offset cache manually (using this.clearMouseCache()) if:
-     *        the border of the element changes
-     *        the location of the element in the page changes
-    */
-    includeXY: false,      
-
-    /**
-     * Method: clearMouseListener
-     * A version of <clearMouseCache> that is bound to this instance so that
-     *     it can be used with <OpenLayers.Event.observe> and
-     *     <OpenLayers.Event.stopObserving>.
-     */
-    clearMouseListener: null,
-
-    /**
-     * Constructor: OpenLayers.Events
-     * Construct an OpenLayers.Events object.
-     *
-     * Parameters:
-     * object - {Object} The js object to which this Events object  is being
-     * added element - {DOMElement} A dom element to respond to browser events
-     * eventTypes - {Array(String)} Array of custom application events 
-     * fallThrough - {Boolean} Allow events to fall through after these have
-     *                         been handled?
-     * options - {Object} Options for the events object.
-     */
-    initialize: function (object, element, eventTypes, fallThrough, options) {
-        OpenLayers.Util.extend(this, options);
-        this.object     = object;
-        this.fallThrough = fallThrough;
-        this.listeners  = {};
-
-        // keep a bound copy of handleBrowserEvent() so that we can
-        // pass the same function to both Event.observe() and .stopObserving()
-        this.eventHandler = OpenLayers.Function.bindAsEventListener(
-            this.handleBrowserEvent, this
-        );
-        
-        // to be used with observe and stopObserving
-        this.clearMouseListener = OpenLayers.Function.bind(
-            this.clearMouseCache, this
-        );
-
-        // if eventTypes is specified, create a listeners list for each 
-        // custom application event.
-        this.eventTypes = [];
-        if (eventTypes != null) {
-            for (var i=0, len=eventTypes.length; i<len; i++) {
-                this.addEventType(eventTypes[i]);
-            }
-        }
-        
-        // if a dom element is specified, add a listeners list 
-        // for browser events on the element and register them
-        if (element != null) {
-            this.attachToElement(element);
-        }
-    },
-
-    /**
-     * APIMethod: destroy
-     */
-    destroy: function () {
-        if (this.element) {
-            OpenLayers.Event.stopObservingElement(this.element);
-            if(this.element.hasScrollEvent) {
-                OpenLayers.Event.stopObserving(
-                    window, "scroll", this.clearMouseListener
-                );
-            }
-        }
-        this.element = null;
-
-        this.listeners = null;
-        this.object = null;
-        this.eventTypes = null;
-        this.fallThrough = null;
-        this.eventHandler = null;
-    },
-
-    /**
-     * APIMethod: addEventType
-     * Add a new event type to this events object.
-     * If the event type has already been added, do nothing.
-     * 
-     * Parameters:
-     * eventName - {String}
-     */
-    addEventType: function(eventName) {
-        if (!this.listeners[eventName]) {
-            this.eventTypes.push(eventName);
-            this.listeners[eventName] = [];
-        }
-    },
-
-    /**
-     * Method: attachToElement
-     *
-     * Parameters:
-     * element - {HTMLDOMElement} a DOM element to attach browser events to
-     */
-    attachToElement: function (element) {
-        if(this.element) {
-            OpenLayers.Event.stopObservingElement(this.element);
-        }
-        this.element = element;
-        for (var i=0, len=this.BROWSER_EVENTS.length; i<len; i++) {
-            var eventType = this.BROWSER_EVENTS[i];
-
-            // every browser event has a corresponding application event 
-            // (whether it's listened for or not).
-            this.addEventType(eventType);
-            
-            // use Prototype to register the event cross-browser
-            OpenLayers.Event.observe(element, eventType, this.eventHandler);
-        }
-        // disable dragstart in IE so that mousedown/move/up works normally
-        OpenLayers.Event.observe(element, "dragstart", OpenLayers.Event.stop);
-    },
-    
-    /**
-     * APIMethod: on
-     * Convenience method for registering listeners with a common scope.
-     *     Internally, this method calls <register> as shown in the examples
-     *     below.
-     *
-     * Example use:
-     * (code)
-     * // register a single listener for the "loadstart" event
-     * events.on({"loadstart", loadStartListener});
-     *
-     * // this is equivalent to the following
-     * events.register("loadstart", undefined, loadStartListener);
-     *
-     * // register multiple listeners to be called with the same `this` object
-     * events.on({
-     *     "loadstart": loadStartListener,
-     *     "loadend": loadEndListener,
-     *     scope: object
-     * });
-     *
-     * // this is equivalent to the following
-     * events.register("loadstart", object, loadStartListener);
-     * events.register("loadstart", object, loadEndListener);
-     * (end)
-     */
-    on: function(object) {
-        for(var type in object) {
-            if(type != "scope") {
-                this.register(type, object.scope, object[type]);
-            }
-        }
-    },
-
-    /**
-     * APIMethod: register
-     * Register an event on the events object.
-     *
-     * When the event is triggered, the 'func' function will be called, in the
-     * context of 'obj'. Imagine we were to register an event, specifying an 
-     * OpenLayers.Bounds Object as 'obj'. When the event is triggered, the 
-     * context in the callback function will be our Bounds object. This means
-     * that within our callback function, we can access the properties and 
-     * methods of the Bounds object through the "this" variable. So our 
-     * callback could execute something like: 
-     * :    leftStr = "Left: " + this.left;
-     *   
-     *                   or
-     *  
-     * :    centerStr = "Center: " + this.getCenterLonLat();
-     *
-     * Parameters:
-     * type - {String} Name of the event to register
-     * obj - {Object} The object to bind the context to for the callback#.
-     *                     If no object is specified, default is the Events's 
-     *                     'object' property.
-     * func - {Function} The callback function. If no callback is 
-     *                        specified, this function does nothing.
-     * 
-     * 
-     */
-    register: function (type, obj, func) {
-
-        if ( (func != null) && 
-             (OpenLayers.Util.indexOf(this.eventTypes, type) != -1) ) {
-
-            if (obj == null)  {
-                obj = this.object;
-            }
-            var listeners = this.listeners[type];
-            listeners.push( {obj: obj, func: func} );
-        }
-    },
-
-    /**
-     * APIMethod: registerPriority
-     * Same as register() but adds the new listener to the *front* of the
-     *     events queue instead of to the end.
-     *    
-     *     TODO: get rid of this in 3.0 - Decide whether listeners should be 
-     *     called in the order they were registered or in reverse order.
-     *
-     *
-     * Parameters:
-     * type - {String} Name of the event to register
-     * obj - {Object} The object to bind the context to for the callback#.
-     *                If no object is specified, default is the Events's 
-     *                'object' property.
-     * func - {Function} The callback function. If no callback is 
-     *                   specified, this function does nothing.
-     */
-    registerPriority: function (type, obj, func) {
-
-        if (func != null) {
-            if (obj == null)  {
-                obj = this.object;
-            }
-            var listeners = this.listeners[type];
-            if (listeners != null) {
-                listeners.unshift( {obj: obj, func: func} );
-            }
-        }
-    },
-    
-    /**
-     * APIMethod: un
-     * Convenience method for unregistering listeners with a common scope.
-     *     Internally, this method calls <unregister> as shown in the examples
-     *     below.
-     *
-     * Example use:
-     * (code)
-     * // unregister a single listener for the "loadstart" event
-     * events.un({"loadstart", loadStartListener});
-     *
-     * // this is equivalent to the following
-     * events.unregister("loadstart", undefined, loadStartListener);
-     *
-     * // unregister multiple listeners with the same `this` object
-     * events.un({
-     *     "loadstart": loadStartListener,
-     *     "loadend": loadEndListener,
-     *     scope: object
-     * });
-     *
-     * // this is equivalent to the following
-     * events.unregister("loadstart", object, loadStartListener);
-     * events.unregister("loadstart", object, loadEndListener);
-     * (end)
-     */
-    un: function(object) {
-        for(var type in object) {
-            if(type != "scope") {
-                this.unregister(type, object.scope, object[type]);
-            }
-        }
-    },
-
-    /**
-     * APIMethod: unregister
-     *
-     * Parameters:
-     * type - {String} 
-     * obj - {Object} If none specified, defaults to this.object
-     * func - {Function} 
-     */
-    unregister: function (type, obj, func) {
-        if (obj == null)  {
-            obj = this.object;
-        }
-        var listeners = this.listeners[type];
-        if (listeners != null) {
-            for (var i=0, len=listeners.length; i<len; i++) {
-                if (listeners[i].obj == obj && listeners[i].func == func) {
-                    listeners.splice(i, 1);
-                    break;
-                }
-            }
-        }
-    },
-
-    /** 
-     * Method: remove
-     * Remove all listeners for a given event type. If type is not registered,
-     *     does nothing.
-     *
-     * Parameters:
-     * type - {String} 
-     */
-    remove: function(type) {
-        if (this.listeners[type] != null) {
-            this.listeners[type] = [];
-        }
-    },
-
-    /**
-     * APIMethod: triggerEvent
-     * Trigger a specified registered event.  
-     * 
-     * Parameters:
-     * type - {String} 
-     * evt - {Event}
-     *
-     * Returns:
-     * {Boolean} The last listener return.  If a listener returns false, the
-     *     chain of listeners will stop getting called.
-     */
-    triggerEvent: function (type, evt) {
-        var listeners = this.listeners[type];
-
-        // fast path
-        if(!listeners || listeners.length == 0) {
-            return;
-        }
-
-        // prep evt object with object & div references
-        if (evt == null) {
-            evt = {};
-        }
-        evt.object = this.object;
-        evt.element = this.element;
-        if(!evt.type) {
-            evt.type = type;
-        }
-    
-        // execute all callbacks registered for specified type
-        // get a clone of the listeners array to
-        // allow for splicing during callbacks
-        var listeners = listeners.slice(), continueChain;
-        for (var i=0, len=listeners.length; i<len; i++) {
-            var callback = listeners[i];
-            // bind the context to callback.obj
-            continueChain = callback.func.apply(callback.obj, [evt]);
-
-            if ((continueChain != undefined) && (continueChain == false)) {
-                // if callback returns false, execute no more callbacks.
-                break;
-            }
-        }
-        // don't fall through to other DOM elements
-        if (!this.fallThrough) {           
-            OpenLayers.Event.stop(evt, true);
-        }
-        return continueChain;
-    },
-
-    /**
-     * Method: handleBrowserEvent
-     * Basically just a wrapper to the triggerEvent() function, but takes 
-     *     care to set a property 'xy' on the event with the current mouse 
-     *     position.
-     *
-     * Parameters:
-     * evt - {Event} 
-     */
-    handleBrowserEvent: function (evt) {
-        if (this.includeXY) {
-            evt.xy = this.getMousePosition(evt);
-        } 
-        this.triggerEvent(evt.type, evt);
-    },
-
-    /**
-     * APIMethod: clearMouseCache
-     * Clear cached data about the mouse position. This should be called any 
-     *     time the element that events are registered on changes position 
-     *     within the page.
-     */
-    clearMouseCache: function() { 
-        this.element.scrolls = null;
-        this.element.lefttop = null;
-        this.element.offsets = null;
-    },      
-
-    /**
-     * Method: getMousePosition
-     * 
-     * Parameters:
-     * evt - {Event} 
-     * 
-     * Returns:
-     * {<OpenLayers.Pixel>} The current xy coordinate of the mouse, adjusted
-     *                      for offsets
-     */
-    getMousePosition: function (evt) {
-        if (!this.includeXY) {
-            this.clearMouseCache();
-        } else if (!this.element.hasScrollEvent) {
-            OpenLayers.Event.observe(window, "scroll", this.clearMouseListener);
-            this.element.hasScrollEvent = true;
-        }
-        
-        if (!this.element.scrolls) {
-            this.element.scrolls = [
-                (document.documentElement.scrollLeft
-                         || document.body.scrollLeft),
-                (document.documentElement.scrollTop
-                         || document.body.scrollTop)
-            ];
-        }
-
-        if (!this.element.lefttop) {
-            this.element.lefttop = [
-                (document.documentElement.clientLeft || 0),
-                (document.documentElement.clientTop  || 0)
-            ];
-        }
-        
-        if (!this.element.offsets) {
-            this.element.offsets = OpenLayers.Util.pagePosition(this.element);
-            this.element.offsets[0] += this.element.scrolls[0];
-            this.element.offsets[1] += this.element.scrolls[1];
-        }
-        return new OpenLayers.Pixel(
-            (evt.clientX + this.element.scrolls[0]) - this.element.offsets[0]
-                         - this.element.lefttop[0], 
-            (evt.clientY + this.element.scrolls[1]) - this.element.offsets[1]
-                         - this.element.lefttop[1]
-        ); 
-    },
-
-    CLASS_NAME: "OpenLayers.Events"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Feature.js
+++ /dev/null
@@ -1,228 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Util.js
- * @requires OpenLayers/Marker.js
- * @requires OpenLayers/Popup/AnchoredBubble.js
- */
-
-/**
- * Class: OpenLayers.Feature
- * Features are combinations of geography and attributes. The OpenLayers.Feature
- *     class specifically combines a marker and a lonlat.
- */
-OpenLayers.Feature = OpenLayers.Class({
-
-    /** 
-     * Property: layer 
-     * {<OpenLayers.Layer>} 
-     */
-    layer: null,
-
-    /** 
-     * Property: id 
-     * {String} 
-     */
-    id: null,
-    
-    /** 
-     * Property: lonlat 
-     * {<OpenLayers.LonLat>} 
-     */
-    lonlat: null,
-
-    /** 
-     * Property: data 
-     * {Object} 
-     */
-    data: null,
-
-    /** 
-     * Property: marker 
-     * {<OpenLayers.Marker>} 
-     */
-    marker: null,
-
-    /**
-     * APIProperty: popupClass
-     * {<OpenLayers.Class>} The class which will be used to instantiate
-     *     a new Popup. Default is <OpenLayers.Popup.AnchoredBubble>.
-     */
-    popupClass: OpenLayers.Popup.AnchoredBubble,
-
-    /** 
-     * Property: popup 
-     * {<OpenLayers.Popup>} 
-     */
-    popup: null,
-
-    /** 
-     * Constructor: OpenLayers.Feature
-     * Constructor for features.
-     *
-     * Parameters:
-     * layer - {<OpenLayers.Layer>} 
-     * lonlat - {<OpenLayers.LonLat>} 
-     * data - {Object} 
-     * 
-     * Returns:
-     * {<OpenLayers.Feature>}
-     */
-    initialize: function(layer, lonlat, data) {
-        this.layer = layer;
-        this.lonlat = lonlat;
-        this.data = (data != null) ? data : {};
-        this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); 
-    },
-
-    /** 
-     * Method: destroy
-     * nullify references to prevent circular references and memory leaks
-     */
-    destroy: function() {
-
-        //remove the popup from the map
-        if ((this.layer != null) && (this.layer.map != null)) {
-            if (this.popup != null) {
-                this.layer.map.removePopup(this.popup);
-            }
-        }
-        // remove the marker from the layer
-        if (this.layer != null && this.marker != null) {
-            this.layer.removeMarker(this.marker);
-        }
-
-        this.layer = null;
-        this.id = null;
-        this.lonlat = null;
-        this.data = null;
-        if (this.marker != null) {
-            this.destroyMarker(this.marker);
-            this.marker = null;
-        }
-        if (this.popup != null) {
-            this.destroyPopup(this.popup);
-            this.popup = null;
-        }
-    },
-    
-    /**
-     * Method: onScreen
-     * 
-     * Returns:
-     * {Boolean} Whether or not the feature is currently visible on screen
-     *           (based on its 'lonlat' property)
-     */
-    onScreen:function() {
-        
-        var onScreen = false;
-        if ((this.layer != null) && (this.layer.map != null)) {
-            var screenBounds = this.layer.map.getExtent();
-            onScreen = screenBounds.containsLonLat(this.lonlat);
-        }    
-        return onScreen;
-    },
-    
-
-    /**
-     * Method: createMarker
-     * Based on the data associated with the Feature, create and return a marker object.
-     *
-     * Returns: 
-     * {<OpenLayers.Marker>} A Marker Object created from the 'lonlat' and 'icon' properties
-     *          set in this.data. If no 'lonlat' is set, returns null. If no
-     *          'icon' is set, OpenLayers.Marker() will load the default image.
-     *          
-     *          Note - this.marker is set to return value
-     * 
-     */
-    createMarker: function() {
-
-        if (this.lonlat != null) {
-            this.marker = new OpenLayers.Marker(this.lonlat, this.data.icon);
-        }
-        return this.marker;
-    },
-
-    /**
-     * Method: destroyMarker
-     * Destroys marker.
-     * If user overrides the createMarker() function, s/he should be able
-     *   to also specify an alternative function for destroying it
-     */
-    destroyMarker: function() {
-        this.marker.destroy();  
-    },
-
-    /**
-     * Method: createPopup
-     * Creates a popup object created from the 'lonlat', 'popupSize',
-     *     and 'popupContentHTML' properties set in this.data. It uses
-     *     this.marker.icon as default anchor. 
-     *  
-     *  If no 'lonlat' is set, returns null. 
-     *  If no this.marker has been created, no anchor is sent.
-     *
-     *  Note - the returned popup object is 'owned' by the feature, so you
-     *      cannot use the popup's destroy method to discard the popup.
-     *      Instead, you must use the feature's destroyPopup
-     * 
-     *  Note - this.popup is set to return value
-     * 
-     * Parameters: 
-     * closeBox - {Boolean} create popup with closebox or not
-     * 
-     * Returns:
-     * {<OpenLayers.Popup>} Returns the created popup, which is also set
-     *     as 'popup' property of this feature. Will be of whatever type
-     *     specified by this feature's 'popupClass' property, but must be
-     *     of type <OpenLayers.Popup>.
-     * 
-     */
-    createPopup: function(closeBox) {
-
-        if (this.lonlat != null) {
-            
-            var id = this.id + "_popup";
-            var anchor = (this.marker) ? this.marker.icon : null;
-
-            if (!this.popup) {
-                this.popup = new this.popupClass(id, 
-                                                 this.lonlat,
-                                                 this.data.popupSize,
-                                                 this.data.popupContentHTML,
-                                                 anchor, 
-                                                 closeBox); 
-            }    
-            if (this.data.overflow != null) {
-                this.popup.contentDiv.style.overflow = this.data.overflow;
-            }    
-            
-            this.popup.feature = this;
-        }        
-        return this.popup;
-    },
-
-    
-    /**
-     * Method: destroyPopup
-     * Destroys the popup created via createPopup.
-     *
-     * As with the marker, if user overrides the createPopup() function, s/he 
-     *   should also be able to override the destruction
-     */
-    destroyPopup: function() {
-        if (this.popup) {
-            this.popup.feature = null;
-            this.popup.destroy();
-            this.popup = null;
-        }    
-    },
-
-    CLASS_NAME: "OpenLayers.Feature"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Feature/Vector.js
+++ /dev/null
@@ -1,455 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-// TRASH THIS
-OpenLayers.State = {
-    /** states */
-    UNKNOWN: 'Unknown',
-    INSERT: 'Insert',
-    UPDATE: 'Update',
-    DELETE: 'Delete'
-};
-
-/**
- * @requires OpenLayers/Feature.js
- * @requires OpenLayers/Util.js
- */
-
-/**
- * Class: OpenLayers.Feature.Vector
- * Vector features use the OpenLayers.Geometry classes as geometry description.
- * They have an 'attributes' property, which is the data object, and a 'style'
- * property, the default values of which are defined in the 
- * <OpenLayers.Feature.Vector.style> objects.
- * 
- * Inherits from:
- *  - <OpenLayers.Feature>
- */
-OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, {
-
-    /** 
-     * Property: fid 
-     * {String} 
-     */
-    fid: null,
-    
-    /** 
-     * APIProperty: geometry 
-     * {<OpenLayers.Geometry>} 
-     */
-    geometry: null,
-
-    /** 
-     * APIProperty: attributes 
-     * {Object} This object holds arbitrary, serializable properties that
-     *     describe the feature.
-     */
-    attributes: null,
-
-    /**
-     * Property: bounds
-     * {<OpenLayers.Bounds>} The box bounding that feature's geometry, that
-     *     property can be set by an <OpenLayers.Format> object when
-     *     deserializing the feature, so in most cases it represents an
-     *     information set by the server. 
-     */
-    bounds: null,
-
-    /** 
-     * Property: state 
-     * {String} 
-     */
-    state: null,
-    
-    /** 
-     * APIProperty: style 
-     * {Object} 
-     */
-    style: null,
-
-    /**
-     * APIProperty: url
-     * {String} If this property is set it will be taken into account by
-     *     {<OpenLayers.HTTP>} when upadting or deleting the feature.
-     */
-    url: null,
-    
-    /**
-     * Property: renderIntent
-     * {String} rendering intent currently being used
-     */
-    renderIntent: "default",
-
-    /** 
-     * Constructor: OpenLayers.Feature.Vector
-     * Create a vector feature. 
-     * 
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>} The geometry that this feature
-     *     represents.
-     * attributes - {Object} An optional object that will be mapped to the
-     *     <attributes> property. 
-     * style - {Object} An optional style object.
-     */
-    initialize: function(geometry, attributes, style) {
-        OpenLayers.Feature.prototype.initialize.apply(this,
-                                                      [null, null, attributes]);
-        this.lonlat = null;
-        this.geometry = geometry ? geometry : null;
-        this.state = null;
-        this.attributes = {};
-        if (attributes) {
-            this.attributes = OpenLayers.Util.extend(this.attributes,
-                                                     attributes);
-        }
-        this.style = style ? style : null; 
-    },
-    
-    /** 
-     * Method: destroy
-     * nullify references to prevent circular references and memory leaks
-     */
-    destroy: function() {
-        if (this.layer) {
-            this.layer.removeFeatures(this);
-            this.layer = null;
-        }
-            
-        this.geometry = null;
-        OpenLayers.Feature.prototype.destroy.apply(this, arguments);
-    },
-    
-    /**
-     * Method: clone
-     * Create a clone of this vector feature.  Does not set any non-standard
-     *     properties.
-     *
-     * Returns:
-     * {<OpenLayers.Feature.Vector>} An exact clone of this vector feature.
-     */
-    clone: function () {
-        return new OpenLayers.Feature.Vector(
-            this.geometry ? this.geometry.clone() : null,
-            this.attributes,
-            this.style);
-    },
-
-    /**
-     * Method: onScreen
-     * Determine whether the feature is within the map viewport.  This method
-     *     tests for an intersection between the geometry and the viewport
-     *     bounds.  If a more effecient but less precise geometry bounds
-     *     intersection is desired, call the method with the boundsOnly
-     *     parameter true.
-     *
-     * Parameters:
-     * boundsOnly - {Boolean} Only test whether a feature's bounds intersects
-     *     the viewport bounds.  Default is false.  If false, the feature's
-     *     geometry must intersect the viewport for onScreen to return true.
-     * 
-     * Returns:
-     * {Boolean} The feature is currently visible on screen (optionally
-     *     based on its bounds if boundsOnly is true).
-     */
-    onScreen:function(boundsOnly) {
-        var onScreen = false;
-        if(this.layer && this.layer.map) {
-            var screenBounds = this.layer.map.getExtent();
-            if(boundsOnly) {
-                var featureBounds = this.geometry.getBounds();
-                onScreen = screenBounds.intersectsBounds(featureBounds);
-            } else {
-                var screenPoly = screenBounds.toGeometry();
-                onScreen = screenPoly.intersects(this.geometry);
-            }
-        }    
-        return onScreen;
-    },
-
-    /**
-     * Method: getVisibility
-     * Determine whether the feature is displayed or not. It may not displayed
-     *     because:
-     *     - its style display property is set to 'none',
-     *     - it doesn't belong to any layer,
-     *     - the styleMap creates a symbolizer with display property set to 'none'
-     *          for it,
-     *     - the layer which it belongs to is not visible.
-     * 
-     * Returns:
-     * {Boolean} The feature is currently displayed.
-     */
-    getVisibility: function() {
-        return !(this.style && this.style.display == 'none' ||
-                 !this.layer ||
-                 this.layer && this.layer.styleMap &&
-                 this.layer.styleMap.createSymbolizer(this, this.renderIntent).display == 'none' ||
-                 this.layer && !this.layer.getVisibility());
-    },
-    
-    /**
-     * Method: createMarker
-     * HACK - we need to decide if all vector features should be able to
-     *     create markers
-     * 
-     * Returns:
-     * {<OpenLayers.Marker>} For now just returns null
-     */
-    createMarker: function() {
-        return null;
-    },
-
-    /**
-     * Method: destroyMarker
-     * HACK - we need to decide if all vector features should be able to
-     *     delete markers
-     * 
-     * If user overrides the createMarker() function, s/he should be able
-     *   to also specify an alternative function for destroying it
-     */
-    destroyMarker: function() {
-        // pass
-    },
-
-    /**
-     * Method: createPopup
-     * HACK - we need to decide if all vector features should be able to
-     *     create popups
-     * 
-     * Returns:
-     * {<OpenLayers.Popup>} For now just returns null
-     */
-    createPopup: function() {
-        return null;
-    },
-
-    /**
-     * Method: atPoint
-     * Determins whether the feature intersects with the specified location.
-     * 
-     * Parameters: 
-     * lonlat - {<OpenLayers.LonLat>} 
-     * toleranceLon - {float} Optional tolerance in Geometric Coords
-     * toleranceLat - {float} Optional tolerance in Geographic Coords
-     * 
-     * Returns:
-     * {Boolean} Whether or not the feature is at the specified location
-     */
-    atPoint: function(lonlat, toleranceLon, toleranceLat) {
-        var atPoint = false;
-        if(this.geometry) {
-            atPoint = this.geometry.atPoint(lonlat, toleranceLon, 
-                                                    toleranceLat);
-        }
-        return atPoint;
-    },
-
-    /**
-     * Method: destroyPopup
-     * HACK - we need to decide if all vector features should be able to
-     * delete popups
-     */
-    destroyPopup: function() {
-        // pass
-    },
-
-    /**
-     * Method: move
-     * Moves the feature and redraws it at its new location
-     *
-     * Parameters:
-     * state - {OpenLayers.LonLat or OpenLayers.Pixel} the
-     *         location to which to move the feature.
-     */
-    move: function(location) {
-
-        if(!this.layer || !this.geometry.move){
-            //do nothing if no layer or immoveable geometry
-            return;
-        }
-
-        var pixel;
-        if (location.CLASS_NAME == "OpenLayers.LonLat") {
-            pixel = this.layer.getViewPortPxFromLonLat(location);
-        } else {
-            pixel = location;
-        }
-        
-        var lastPixel = this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat());
-        var res = this.layer.map.getResolution();
-        this.geometry.move(res * (pixel.x - lastPixel.x),
-                           res * (lastPixel.y - pixel.y));
-        this.layer.drawFeature(this);
-        return lastPixel;
-    },
-    
-    /**
-     * Method: toState
-     * Sets the new state
-     *
-     * Parameters:
-     * state - {String} 
-     */
-    toState: function(state) {
-        if (state == OpenLayers.State.UPDATE) {
-            switch (this.state) {
-                case OpenLayers.State.UNKNOWN:
-                case OpenLayers.State.DELETE:
-                    this.state = state;
-                    break;
-                case OpenLayers.State.UPDATE:
-                case OpenLayers.State.INSERT:
-                    break;
-            }
-        } else if (state == OpenLayers.State.INSERT) {
-            switch (this.state) {
-                case OpenLayers.State.UNKNOWN:
-                    break;
-                default:
-                    this.state = state;
-                    break;
-            }
-        } else if (state == OpenLayers.State.DELETE) {
-            switch (this.state) {
-                case OpenLayers.State.INSERT:
-                    // the feature should be destroyed
-                    break;
-                case OpenLayers.State.DELETE:
-                    break;
-                case OpenLayers.State.UNKNOWN:
-                case OpenLayers.State.UPDATE:
-                    this.state = state;
-                    break;
-            }
-        } else if (state == OpenLayers.State.UNKNOWN) {
-            this.state = state;
-        }
-    },
-    
-    CLASS_NAME: "OpenLayers.Feature.Vector"
-});
-
-
-/**
- * Constant: OpenLayers.Feature.Vector.style
- * OpenLayers features can have a number of style attributes. The 'default' 
- *     style will typically be used if no other style is specified. These
- *     styles correspond for the most part, to the styling properties defined
- *     by the SVG standard. 
- *     Information on fill properties: http://www.w3.org/TR/SVG/painting.html#FillProperties
- *     Information on stroke properties: http://www.w3.org/TR/SVG/painting.html#StrokeProperties
- *
- * Symbolizer properties:
- * fill - {Boolean} Set to false if no fill is desired.
- * fillColor - {String} Hex fill color.  Default is "#ee9900".
- * fillOpacity - {Number} Fill opacity (0-1).  Default is 0.4 
- * stroke - {Boolean} Set to false if no stroke is desired.
- * strokeColor - {String} Hex stroke color.  Default is "#ee9900".
- * strokeOpacity - {Number} Stroke opacity (0-1).  Default is 1.
- * strokeWidth - {Number} Pixel stroke width.  Default is 1.
- * strokeLinecap - {String} Stroke cap type.  Default is "round".  [butt | round | square]
- * strokeDashstyle - {String} Stroke dash style.  Default is "solid". [dot | dash | dashdot | longdash | longdashdot | solid]
- * graphic - {Boolean} Set to false if no graphic is desired.
- * pointRadius - {Number} Pixel point radius.  Default is 6.
- * pointerEvents - {String}  Default is "visiblePainted".
- * cursor - {String} Default is "".
- * externalGraphic - {String} Url to an external graphic that will be used for rendering points.
- * graphicWidth - {Number} Pixel width for sizing an external graphic.
- * graphicHeight - {Number} Pixel height for sizing an external graphic.
- * graphicOpacity - {Number} Opacity (0-1) for an external graphic.
- * graphicXOffset - {Number} Pixel offset along the positive x axis for displacing an external graphic.
- * graphicYOffset - {Number} Pixel offset along the positive y axis for displacing an external graphic.
- * rotation - {Number} For point symbolizers, this is the rotation of a graphic in the clockwise direction about its center point (or any point off center as specified by graphicXOffset and graphicYOffset).
- * graphicZIndex - {Number} The integer z-index value to use in rendering.
- * graphicName - {String} Named graphic to use when rendering points.  Supported values include "circle" (default),
- *     "square", "star", "x", "cross", "triangle".
- * graphicTitle - {String} Tooltip for an external graphic. Only supported in Firefox and Internet Explorer.
- * backgroundGraphic - {String} Url to a graphic to be used as the background under an externalGraphic.
- * backgroundGraphicZIndex - {Number} The integer z-index value to use in rendering the background graphic.
- * backgroundXOffset - {Number} The x offset (in pixels) for the background graphic.
- * backgroundYOffset - {Number} The y offset (in pixels) for the background graphic.
- * backgroundHeight - {Number} The height of the background graphic.  If not provided, the graphicHeight will be used.
- * backgroundWidth - {Number} The width of the background width.  If not provided, the graphicWidth will be used.
- * label - {String} The text for an optional label. For browsers that use the canvas renderer, this requires either
- *     fillText or mozDrawText to be available.
- * labelAlign - {String} Label alignment. This specifies the insertion point relative to the text. It is a string
- *     composed of two characters. The first character is for the horizontal alignment, the second for the vertical
- *     alignment. Valid values for horizontal alignment: "l"=left, "c"=center, "r"=right. Valid values for vertical
- *     alignment: "t"=top, "m"=middle, "b"=bottom. Example values: "lt", "cm", "rb". The canvas renderer does not
- *     support vertical alignment, it will always use "b".
- * labelXOffset - {Number} Pixel offset along the positive x axis for displacing the label.
- * labelYOffset - {Number} Pixel offset along the positive y axis for displacing the label.
- * labelSelect - {Boolean} If set to true, labels will be selectable using SelectFeature or similar controls.
- *     Default is false.
- * fontColor - {String} The font color for the label, to be provided like CSS.
- * fontOpacity - {Number} Opacity (0-1) for the label
- * fontFamily - {String} The font family for the label, to be provided like in CSS.
- * fontSize - {String} The font size for the label, to be provided like in CSS.
- * fontWeight - {String} The font weight for the label, to be provided like in CSS.
- * display - {String} Symbolizers will have no effect if display is set to "none".  All other values have no effect.
- */ 
-OpenLayers.Feature.Vector.style = {
-    'default': {
-        fillColor: "#ee9900",
-        fillOpacity: 0.4, 
-        hoverFillColor: "white",
-        hoverFillOpacity: 0.8,
-        strokeColor: "#ee9900",
-        strokeOpacity: 1,
-        strokeWidth: 1,
-        strokeLinecap: "round",
-        strokeDashstyle: "solid",
-        hoverStrokeColor: "red",
-        hoverStrokeOpacity: 1,
-        hoverStrokeWidth: 0.2,
-        pointRadius: 6,
-        hoverPointRadius: 1,
-        hoverPointUnit: "%",
-        pointerEvents: "visiblePainted",
-        cursor: "inherit"
-    },
-    'select': {
-        fillColor: "blue",
-        fillOpacity: 0.4, 
-        hoverFillColor: "white",
-        hoverFillOpacity: 0.8,
-        strokeColor: "blue",
-        strokeOpacity: 1,
-        strokeWidth: 2,
-        strokeLinecap: "round",
-        strokeDashstyle: "solid",
-        hoverStrokeColor: "red",
-        hoverStrokeOpacity: 1,
-        hoverStrokeWidth: 0.2,
-        pointRadius: 6,
-        hoverPointRadius: 1,
-        hoverPointUnit: "%",
-        pointerEvents: "visiblePainted",
-        cursor: "pointer"
-    },
-    'temporary': {
-        fillColor: "#66cccc",
-        fillOpacity: 0.2, 
-        hoverFillColor: "white",
-        hoverFillOpacity: 0.8,
-        strokeColor: "#66cccc",
-        strokeOpacity: 1,
-        strokeLinecap: "round",
-        strokeWidth: 2,
-        strokeDashstyle: "solid",
-        hoverStrokeColor: "red",
-        hoverStrokeOpacity: 1,
-        hoverStrokeWidth: 0.2,
-        pointRadius: 6,
-        hoverPointRadius: 1,
-        hoverPointUnit: "%",
-        pointerEvents: "visiblePainted",
-        cursor: "inherit"
-    },
-    'delete': {
-        display: "none"
-    }
-};    
-

--- a/labs/openlayers/lib/OpenLayers/Feature/WFS.js
+++ /dev/null
@@ -1,81 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Feature.js
- */
-
-/**
- * Class: OpenLayers.Feature.WFS
- * WFS handling class, for use as a featureClass on the WFS layer for handling
- * 'point' WFS types. Good for subclassing when creating a custom WFS like
- * XML application.
- * 
- * Inherits from:
- *  - <OpenLayers.Feature>
- */
-OpenLayers.Feature.WFS = OpenLayers.Class(OpenLayers.Feature, {
-      
-    /** 
-     * Constructor: OpenLayers.Feature.WFS
-     * Create a WFS feature.
-     *
-     * Parameters:
-     * layer - {<OpenLayers.Layer>} 
-     * xmlNode - {XMLNode} 
-     */
-    initialize: function(layer, xmlNode) {
-        var newArguments = arguments;
-        var data = this.processXMLNode(xmlNode);
-        newArguments = new Array(layer, data.lonlat, data);
-        OpenLayers.Feature.prototype.initialize.apply(this, newArguments);
-        this.createMarker();
-        this.layer.addMarker(this.marker);
-    },
-    
-    /** 
-     * Method: destroy
-     * nullify references to prevent circular references and memory leaks
-     */
-    destroy: function() {
-        if (this.marker != null) {
-            this.layer.removeMarker(this.marker);  
-        }
-        OpenLayers.Feature.prototype.destroy.apply(this, arguments);
-    },
-
-    /**
-     * Method: processXMLNode
-     * When passed an xmlNode, parses it for a GML point, and passes
-     * back an object describing that point.
-     *
-     * For subclasses of Feature.WFS, this is the feature to change.
-     *
-     * Parameters:
-     * xmlNode - {XMLNode} 
-     * 
-     * Returns:
-     * {Object} Data Object with 'id', 'lonlat', and private properties set
-     */
-    processXMLNode: function(xmlNode) {
-        //this should be overridden by subclasses
-        // must return an Object with 'id' and 'lonlat' values set
-        var point = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, "http://www.opengis.net/gml", "gml", "Point");
-        var text  = OpenLayers.Util.getXmlNodeValue(OpenLayers.Ajax.getElementsByTagNameNS(point[0], "http://www.opengis.net/gml","gml", "coordinates")[0]);
-        var floats = text.split(",");
-        return {lonlat: new OpenLayers.LonLat(parseFloat(floats[0]),
-                                              parseFloat(floats[1])),
-                id: null};
-
-    },
-
-    CLASS_NAME: "OpenLayers.Feature.WFS"
-});
-  
-  
-  
-  
-
-

--- a/labs/openlayers/lib/OpenLayers/Filter.js
+++ /dev/null
@@ -1,69 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Util.js
- * @requires OpenLayers/Style.js
- */
-
-/**
- * Class: OpenLayers.Filter
- * This class represents an OGC Filter.
- */
-OpenLayers.Filter = OpenLayers.Class({
-    
-    /** 
-     * Constructor: OpenLayers.Filter
-     * This is an abstract class.  Create an instance of a filter subclass.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     * 
-     * Returns:
-     * {<OpenLayers.Filter>}
-     */
-    initialize: function(options) {
-        OpenLayers.Util.extend(this, options);
-    },
-
-    /** 
-     * APIMethod: destroy
-     * Remove reference to anything added.
-     */
-    destroy: function() {
-    },
-
-    /**
-     * APIMethod: evaluate
-     * Evaluates this filter in a specific context.  Should be implemented by
-     *     subclasses.
-     * 
-     * Parameters:
-     * context - {Object} Context to use in evaluating the filter.  If a vector
-     *     feature is provided, the feature.attributes will be used as context.
-     * 
-     * Returns:
-     * {Boolean} The filter applies.
-     */
-    evaluate: function(context) {
-        return true;
-    },
-    
-    /**
-     * APIMethod: clone
-     * Clones this filter. Should be implementted by subclasses.
-     * 
-     * Returns:
-     * {<OpenLayers.Filter>} Clone of this filter.
-     */
-    clone: function() {
-        return null;
-    },
-    
-    CLASS_NAME: "OpenLayers.Filter"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Filter/Comparison.js
+++ /dev/null
@@ -1,259 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Filter.js
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Filter.Comparison
- * This class represents a comparison filter.
- * 
- * Inherits from
- * - <OpenLayers.Filter>
- */
-OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, {
-
-    /**
-     * APIProperty: type
-     * {String} type: type of the comparison. This is one of
-     * - OpenLayers.Filter.Comparison.EQUAL_TO                 = "==";
-     * - OpenLayers.Filter.Comparison.NOT_EQUAL_TO             = "!=";
-     * - OpenLayers.Filter.Comparison.LESS_THAN                = "<";
-     * - OpenLayers.Filter.Comparison.GREATER_THAN             = ">";
-     * - OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO    = "<=";
-     * - OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO = ">=";
-     * - OpenLayers.Filter.Comparison.BETWEEN                  = "..";
-     * - OpenLayers.Filter.Comparison.LIKE                     = "~"; 
-     */
-    type: null,
-    
-    /**
-     * APIProperty: property
-     * {String}
-     * name of the context property to compare
-     */
-    property: null,
-    
-    /**
-     * APIProperty: value
-     * {Number} or {String}
-     * comparison value for binary comparisons. In the case of a String, this
-     * can be a combination of text and propertyNames in the form
-     * "literal ${propertyName}"
-     */
-    value: null,
-    
-    /**
-     * Property: matchCase
-     * {Boolean} Force case sensitive searches for EQUAL_TO and NOT_EQUAL_TO
-     *     comparisons.  The Filter Encoding 1.1 specification added a matchCase
-     *     attribute to ogc:PropertyIsEqualTo and ogc:PropertyIsNotEqualTo
-     *     elements.  This property will be serialized with those elements only
-     *     if using the v1.1.0 filter format. However, when evaluating filters
-     *     here, the matchCase property will always be respected (for EQUAL_TO
-     *     and NOT_EQUAL_TO).  Default is true.
-     */
-    matchCase: true,
-    
-    /**
-     * APIProperty: lowerBoundary
-     * {Number} or {String}
-     * lower boundary for between comparisons. In the case of a String, this
-     * can be a combination of text and propertyNames in the form
-     * "literal ${propertyName}"
-     */
-    lowerBoundary: null,
-    
-    /**
-     * APIProperty: upperBoundary
-     * {Number} or {String}
-     * upper boundary for between comparisons. In the case of a String, this
-     * can be a combination of text and propertyNames in the form
-     * "literal ${propertyName}"
-     */
-    upperBoundary: null,
-
-    /** 
-     * Constructor: OpenLayers.Filter.Comparison
-     * Creates a comparison rule.
-     *
-     * Parameters:
-     * options - {Object} An optional object with properties to set on the
-     *           rule
-     * 
-     * Returns:
-     * {<OpenLayers.Filter.Comparison>}
-     */
-    initialize: function(options) {
-        OpenLayers.Filter.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * APIMethod: evaluate
-     * Evaluates this filter in a specific context.
-     * 
-     * Parameters:
-     * context - {Object} Context to use in evaluating the filter.  If a vector
-     *     feature is provided, the feature.attributes will be used as context.
-     * 
-     * Returns:
-     * {Boolean} The filter applies.
-     */
-    evaluate: function(context) {
-        if (context instanceof OpenLayers.Feature.Vector) {
-            context = context.attributes;
-        }
-        var result = false;
-        var got = context[this.property];
-        switch(this.type) {
-            case OpenLayers.Filter.Comparison.EQUAL_TO:
-                var exp = this.value;
-                if(!this.matchCase &&
-                   typeof got == "string" && typeof exp == "string") {
-                    result = (got.toUpperCase() == exp.toUpperCase());
-                } else {
-                    result = (got == exp);
-                }
-                break;
-            case OpenLayers.Filter.Comparison.NOT_EQUAL_TO:
-                var exp = this.value;
-                if(!this.matchCase &&
-                   typeof got == "string" && typeof exp == "string") {
-                    result = (got.toUpperCase() != exp.toUpperCase());
-                } else {
-                    result = (got != exp);
-                }
-                break;
-            case OpenLayers.Filter.Comparison.LESS_THAN:
-                result = got < this.value;
-                break;
-            case OpenLayers.Filter.Comparison.GREATER_THAN:
-                result = got > this.value;
-                break;
-            case OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO:
-                result = got <= this.value;
-                break;
-            case OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO:
-                result = got >= this.value;
-                break;
-            case OpenLayers.Filter.Comparison.BETWEEN:
-                result = (got >= this.lowerBoundary) &&
-                    (got <= this.upperBoundary);
-                break;
-            case OpenLayers.Filter.Comparison.LIKE:
-                var regexp = new RegExp(this.value, "gi");
-                result = regexp.test(got);
-                break;
-        }
-        return result;
-    },
-    
-    /**
-     * APIMethod: value2regex
-     * Converts the value of this rule into a regular expression string,
-     * according to the wildcard characters specified. This method has to
-     * be called after instantiation of this class, if the value is not a
-     * regular expression already.
-     * 
-     * Parameters:
-     * wildCard   - {<Char>} wildcard character in the above value, default
-     *              is "*"
-     * singleChar - {<Char>) single-character wildcard in the above value
-     *              default is "."
-     * escape     - {<Char>) escape character in the above value, default is
-     *              "!"
-     * 
-     * Returns:
-     * {String} regular expression string
-     */
-    value2regex: function(wildCard, singleChar, escapeChar) {
-        if (wildCard == ".") {
-            var msg = "'.' is an unsupported wildCard character for "+
-                    "OpenLayers.Filter.Comparison";
-            OpenLayers.Console.error(msg);
-            return null;
-        }
-        
-
-        // set UMN MapServer defaults for unspecified parameters
-        wildCard = wildCard ? wildCard : "*";
-        singleChar = singleChar ? singleChar : ".";
-        escapeChar = escapeChar ? escapeChar : "!";
-        
-        this.value = this.value.replace(
-                new RegExp("\\"+escapeChar+"(.|$)", "g"), "\\$1");
-        this.value = this.value.replace(
-                new RegExp("\\"+singleChar, "g"), ".");
-        this.value = this.value.replace(
-                new RegExp("\\"+wildCard, "g"), ".*");
-        this.value = this.value.replace(
-                new RegExp("\\\\.\\*", "g"), "\\"+wildCard);
-        this.value = this.value.replace(
-                new RegExp("\\\\\\.", "g"), "\\"+singleChar);
-        
-        return this.value;
-    },
-    
-    /**
-     * Method: regex2value
-     * Convert the value of this rule from a regular expression string into an
-     *     ogc literal string using a wildCard of *, a singleChar of ., and an
-     *     escape of !.  Leaves the <value> property unmodified.
-     * 
-     * Returns:
-     * {String} A string value.
-     */
-    regex2value: function() {
-        
-        var value = this.value;
-        
-        // replace ! with !!
-        value = value.replace(/!/g, "!!");
-
-        // replace \. with !. (watching out for \\.)
-        value = value.replace(/(\\)?\\\./g, function($0, $1) {
-            return $1 ? $0 : "!.";
-        });
-        
-        // replace \* with #* (watching out for \\*)
-        value = value.replace(/(\\)?\\\*/g, function($0, $1) {
-            return $1 ? $0 : "!*";
-        });
-        
-        // replace \\ with \
-        value = value.replace(/\\\\/g, "\\");
-
-        // convert .* to * (the sequence #.* is not allowed)
-        value = value.replace(/\.\*/g, "*");
-        
-        return value;
-    },
-    
-    /**
-     * APIMethod: clone
-     * Clones this filter.
-     * 
-     * Returns:
-     * {<OpenLayers.Filter.Comparison>} Clone of this filter.
-     */
-    clone: function() {
-        return OpenLayers.Util.extend(new OpenLayers.Filter.Comparison(), this);
-    },
-    
-    CLASS_NAME: "OpenLayers.Filter.Comparison"
-});
-
-
-OpenLayers.Filter.Comparison.EQUAL_TO                 = "==";
-OpenLayers.Filter.Comparison.NOT_EQUAL_TO             = "!=";
-OpenLayers.Filter.Comparison.LESS_THAN                = "<";
-OpenLayers.Filter.Comparison.GREATER_THAN             = ">";
-OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO    = "<=";
-OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO = ">=";
-OpenLayers.Filter.Comparison.BETWEEN                  = "..";
-OpenLayers.Filter.Comparison.LIKE                     = "~";
-

--- a/labs/openlayers/lib/OpenLayers/Filter/FeatureId.js
+++ /dev/null
@@ -1,82 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Filter.js
- */
-
-/**
- * Class: OpenLayers.Filter.FeatureId
- * This class represents a ogc:FeatureId Filter, as being used for rule-based SLD
- * styling
- * 
- * Inherits from
- * - <OpenLayers.Filter>
- */
-OpenLayers.Filter.FeatureId = OpenLayers.Class(OpenLayers.Filter, {
-
-    /** 
-     * APIProperty: fids
-     * {Array(String)} Feature Ids to evaluate this rule against. To be passed
-     * To be passed inside the params object.
-     */
-    fids: null,
-    
-    /** 
-     * Constructor: OpenLayers.Filter.FeatureId
-     * Creates an ogc:FeatureId rule.
-     *
-     * Parameters:
-     * options - {Object} An optional object with properties to set on the
-     *           rule
-     * 
-     * Returns:
-     * {<OpenLayers.Filter.FeatureId>}
-     */
-    initialize: function(options) {
-        this.fids = [];
-        OpenLayers.Filter.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * APIMethod: evaluate
-     * evaluates this rule for a specific feature
-     * 
-     * Parameters:
-     * feature - {<OpenLayers.Feature>} feature to apply the rule to.
-     *           For vector features, the check is run against the fid,
-     *           for plain features against the id.
-     * 
-     * Returns:
-     * {Boolean} true if the rule applies, false if it does not
-     */
-    evaluate: function(feature) {
-        for (var i=0, len=this.fids.length; i<len; i++) {
-            var fid = feature.fid || feature.id;
-            if (fid == this.fids[i]) {
-                return true;
-            }
-        }
-        return false;
-    },
-    
-    /**
-     * APIMethod: clone
-     * Clones this filter.
-     * 
-     * Returns:
-     * {<OpenLayers.Filter.FeatureId>} Clone of this filter.
-     */
-    clone: function() {
-        var filter = new OpenLayers.Filter.FeatureId();
-        OpenLayers.Util.extend(filter, this);
-        filter.fids = this.fids.slice();
-        return filter;
-    },
-    
-    CLASS_NAME: "OpenLayers.Filter.FeatureId"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Filter/Logical.js
+++ /dev/null
@@ -1,120 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Filter.js
- */
-
-/**
- * Class: OpenLayers.Filter.Logical
- * This class represents ogc:And, ogc:Or and ogc:Not rules.
- * 
- * Inherits from
- * - <OpenLayers.Filter>
- */
-OpenLayers.Filter.Logical = OpenLayers.Class(OpenLayers.Filter, {
-
-    /**
-     * APIProperty: filters
-     * {Array(<OpenLayers.Filter>)} Child filters for this filter.
-     */
-    filters: null, 
-     
-    /**
-     * APIProperty: type
-     * {String} type of logical operator. Available types are:
-     * - OpenLayers.Filter.Logical.AND = "&&";
-     * - OpenLayers.Filter.Logical.OR  = "||";
-     * - OpenLayers.Filter.Logical.NOT = "!";
-     */
-    type: null,
-
-    /** 
-     * Constructor: OpenLayers.Filter.Logical
-     * Creates a logical filter (And, Or, Not).
-     *
-     * Parameters:
-     * options - {Object} An optional object with properties to set on the
-     *     filter.
-     * 
-     * Returns:
-     * {<OpenLayers.Filter.Logical>}
-     */
-    initialize: function(options) {
-        this.filters = [];
-        OpenLayers.Filter.prototype.initialize.apply(this, [options]);
-    },
-    
-    /** 
-     * APIMethod: destroy
-     * Remove reference to child filters.
-     */
-    destroy: function() {
-        this.filters = null;
-        OpenLayers.Filter.prototype.destroy.apply(this);
-    },
-
-    /**
-     * APIMethod: evaluate
-     * Evaluates this filter in a specific context.
-     * 
-     * Parameters:
-     * context - {Object} Context to use in evaluating the filter.  A vector
-     *     feature may also be provided to evaluate feature attributes in 
-     *     comparison filters or geometries in spatial filters.
-     * 
-     * Returns:
-     * {Boolean} The filter applies.
-     */
-    evaluate: function(context) {
-        switch(this.type) {
-            case OpenLayers.Filter.Logical.AND:
-                for (var i=0, len=this.filters.length; i<len; i++) {
-                    if (this.filters[i].evaluate(context) == false) {
-                        return false;
-                    }
-                }
-                return true;
-                
-            case OpenLayers.Filter.Logical.OR:
-                for (var i=0, len=this.filters.length; i<len; i++) {
-                    if (this.filters[i].evaluate(context) == true) {
-                        return true;
-                    }
-                }
-                return false;
-            
-            case OpenLayers.Filter.Logical.NOT:
-                return (!this.filters[0].evaluate(context));
-        }
-    },
-    
-    /**
-     * APIMethod: clone
-     * Clones this filter.
-     * 
-     * Returns:
-     * {<OpenLayers.Filter.Logical>} Clone of this filter.
-     */
-    clone: function() {
-        var filters = [];        
-        for(var i=0, len=this.filters.length; i<len; ++i) {
-            filters.push(this.filters[i].clone());
-        }
-        return new OpenLayers.Filter.Logical({
-            type: this.type,
-            filters: filters
-        });
-    },
-    
-    CLASS_NAME: "OpenLayers.Filter.Logical"
-});
-
-
-OpenLayers.Filter.Logical.AND = "&&";
-OpenLayers.Filter.Logical.OR  = "||";
-OpenLayers.Filter.Logical.NOT = "!";
-

--- a/labs/openlayers/lib/OpenLayers/Filter/Spatial.js
+++ /dev/null
@@ -1,129 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Filter.js
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Filter.Spatial
- * This class represents a spatial filter.
- * Currently implemented: BBOX, DWithin and Intersects
- * 
- * Inherits from
- * - <OpenLayers.Filter>
- */
-OpenLayers.Filter.Spatial = OpenLayers.Class(OpenLayers.Filter, {
-
-    /**
-     * APIProperty: type
-     * {String} Type of spatial filter.
-     *
-     * The type should be one of:
-     * - OpenLayers.Filter.Spatial.BBOX
-     * - OpenLayers.Filter.Spatial.INTERSECTS
-     * - OpenLayers.Filter.Spatial.DWITHIN
-     * - OpenLayers.Filter.Spatial.WITHIN
-     * - OpenLayers.Filter.Spatial.CONTAINS
-     */
-    type: null,
-    
-    /**
-     * APIProperty: property
-     * {String} Name of the context property to compare.
-     */
-    property: null,
-    
-    /**
-     * APIProperty: value
-     * {<OpenLayers.Bounds> || <OpenLayers.Geometry>} The bounds or geometry
-     *     to be used by the filter.  Use bounds for BBOX filters and geometry
-     *     for INTERSECTS or DWITHIN filters.
-     */
-    value: null,
-
-    /**
-     * APIProperty: distance
-     * {Number} The distance to use in a DWithin spatial filter.
-     */
-    distance: null,
-
-    /**
-     * APIProperty: distanceUnits
-     * {String} The units to use for the distance, e.g. 'm'.
-     */
-    distanceUnits: null,
-    
-    /** 
-     * Constructor: OpenLayers.Filter.Spatial
-     * Creates a spatial filter.
-     *
-     * Parameters:
-     * options - {Object} An optional object with properties to set on the
-     *     filter.
-     * 
-     * Returns:
-     * {<OpenLayers.Filter.Spatial>}
-     */
-    initialize: function(options) {
-        OpenLayers.Filter.prototype.initialize.apply(this, [options]);
-    },
-
-   /**
-    * Method: evaluate
-    * Evaluates this filter for a specific feature.
-    * 
-    * Parameters:
-    * feature - {<OpenLayers.Feature.Vector>} feature to apply the filter to.
-    * 
-    * Returns:
-    * {Boolean} The feature meets filter criteria.
-    */
-    evaluate: function(feature) {
-        var intersect = false;
-        switch(this.type) {
-            case OpenLayers.Filter.Spatial.BBOX:
-            case OpenLayers.Filter.Spatial.INTERSECTS:
-                if(feature.geometry) {
-                    var geom = this.value;
-                    if(this.value.CLASS_NAME == "OpenLayers.Bounds") {
-                        geom = this.value.toGeometry();
-                    }
-                    if(feature.geometry.intersects(geom)) {
-                        intersect = true;
-                    }
-                }
-                break;
-            default:
-                OpenLayers.Console.error(
-                    OpenLayers.i18n("filterEvaluateNotImplemented"));
-                break;
-        }
-        return intersect;
-    },
-
-    /**
-     * APIMethod: clone
-     * Clones this filter.
-     * 
-     * Returns:
-     * {<OpenLayers.Filter.Spatial>} Clone of this filter.
-     */
-    clone: function() {
-        var options = OpenLayers.Util.applyDefaults({
-            value: this.value && this.value.clone && this.value.clone()
-        }, this);
-        return new OpenLayers.Filter.Spatial(options);
-    },
-    CLASS_NAME: "OpenLayers.Filter.Spatial"
-});
-
-OpenLayers.Filter.Spatial.BBOX = "BBOX";
-OpenLayers.Filter.Spatial.INTERSECTS = "INTERSECTS";
-OpenLayers.Filter.Spatial.DWITHIN = "DWITHIN";
-OpenLayers.Filter.Spatial.WITHIN = "WITHIN";
-OpenLayers.Filter.Spatial.CONTAINS = "CONTAINS";
-

--- a/labs/openlayers/lib/OpenLayers/Format.js
+++ /dev/null
@@ -1,124 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Util.js
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Format
- * Base class for format reading/writing a variety of formats.  Subclasses
- *     of OpenLayers.Format are expected to have read and write methods.
- */
-OpenLayers.Format = OpenLayers.Class({
-    
-    /**
-     * Property: options
-     * {Object} A reference to options passed to the constructor.
-     */
-    options: null,
-    
-    /**
-     * APIProperty: externalProjection
-     * {<OpenLayers.Projection>} When passed a externalProjection and
-     *     internalProjection, the format will reproject the geometries it
-     *     reads or writes. The externalProjection is the projection used by
-     *     the content which is passed into read or which comes out of write.
-     *     In order to reproject, a projection transformation function for the
-     *     specified projections must be available. This support may be 
-     *     provided via proj4js or via a custom transformation function. See
-     *     {<OpenLayers.Projection.addTransform>} for more information on
-     *     custom transformations.
-     */
-    externalProjection: null,
-
-    /**
-     * APIProperty: internalProjection
-     * {<OpenLayers.Projection>} When passed a externalProjection and
-     *     internalProjection, the format will reproject the geometries it
-     *     reads or writes. The internalProjection is the projection used by
-     *     the geometries which are returned by read or which are passed into
-     *     write.  In order to reproject, a projection transformation function
-     *     for the specified projections must be available. This support may be
-     *     provided via proj4js or via a custom transformation function. See
-     *     {<OpenLayers.Projection.addTransform>} for more information on
-     *     custom transformations.
-     */
-    internalProjection: null,
-
-    /**
-     * APIProperty: data
-     * {Object} When <keepData> is true, this is the parsed string sent to
-     *     <read>.
-     */
-    data: null,
-
-    /**
-     * APIProperty: keepData
-     * {Object} Maintain a reference (<data>) to the most recently read data.
-     *     Default is false.
-     */
-    keepData: false,
-
-    /**
-     * Constructor: OpenLayers.Format
-     * Instances of this class are not useful.  See one of the subclasses.
-     *
-     * Parameters:
-     * options - {Object} An optional object with properties to set on the
-     *           format
-     *
-     * Valid options:
-     * keepData - {Boolean} If true, upon <read>, the data property will be
-     *     set to the parsed object (e.g. the json or xml object).
-     *
-     * Returns:
-     * An instance of OpenLayers.Format
-     */
-    initialize: function(options) {
-        OpenLayers.Util.extend(this, options);
-        this.options = options;
-    },
-    
-    /**
-     * APIMethod: destroy
-     * Clean up.
-     */
-    destroy: function() {
-    },
-
-    /**
-     * Method: read
-     * Read data from a string, and return an object whose type depends on the
-     * subclass. 
-     * 
-     * Parameters:
-     * data - {string} Data to read/parse.
-     *
-     * Returns:
-     * Depends on the subclass
-     */
-    read: function(data) {
-        OpenLayers.Console.userError(OpenLayers.i18n("readNotImplemented"));
-    },
-    
-    /**
-     * Method: write
-     * Accept an object, and return a string. 
-     *
-     * Parameters:
-     * object - {Object} Object to be serialized
-     *
-     * Returns:
-     * {String} A string representation of the object.
-     */
-    write: function(object) {
-        OpenLayers.Console.userError(OpenLayers.i18n("writeNotImplemented"));
-    },
-
-    CLASS_NAME: "OpenLayers.Format"
-});     
-

--- a/labs/openlayers/lib/OpenLayers/Format/ArcXML.js
+++ /dev/null
@@ -1,1029 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Geometry/Polygon.js
- * @requires OpenLayers/Geometry/Point.js
- * @requires OpenLayers/Geometry/MultiPolygon.js
- * @requires OpenLayers/Geometry/LinearRing.js
- */
-
-/**
- * Class: OpenLayers.Format.ArcXML
- * Read/Wite ArcXML. Create a new instance with the <OpenLayers.Format.ArcXML>
- *     constructor.
- * 
- * Inherits from:
- *  - <OpenLayers.Format>
- */
-OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, {
-
-    /**
-     * Property: fontStyleKeys
-     * {Array} List of keys used in font styling.
-     */
-    fontStyleKeys: [
-        'antialiasing', 'blockout', 'font', 'fontcolor','fontsize', 'fontstyle',
-        'glowing', 'interval', 'outline', 'printmode', 'shadow', 'transparency'
-    ],
-
-    /**
-     * Property: request
-     * A get_image request destined for an ArcIMS server.
-     */
-    request: null,
-    
-    /**
-     * Property: response
-     * A parsed response from an ArcIMS server.
-     */
-    response: null,
-
-    /**
-     * Constructor: OpenLayers.Format.ArcXML
-     * Create a new parser/writer for ArcXML.  Create an instance of this class
-     *    to begin authoring a request to an ArcIMS service.  This is used
-     *    primarily by the ArcIMS layer, but could be used to do other wild
-     *    stuff, like geocoding.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        this.request = new OpenLayers.Format.ArcXML.Request();
-        this.response = new OpenLayers.Format.ArcXML.Response();
-
-        if (options) {
-            if (options.requesttype == "feature") {
-                this.request.get_image = null;
-            
-                var qry = this.request.get_feature.query;
-                this.addCoordSys(qry.featurecoordsys, options.featureCoordSys);
-                this.addCoordSys(qry.filtercoordsys, options.filterCoordSys);
-            
-                if (options.polygon) {
-                    qry.isspatial = true;
-                    qry.spatialfilter.polygon = options.polygon;
-                } else if (options.envelope) {
-                    qry.isspatial = true;
-                    qry.spatialfilter.envelope = {minx:0, miny:0, maxx:0, maxy:0};
-                    this.parseEnvelope(qry.spatialfilter.envelope, options.envelope);
-                }
-            } else if (options.requesttype == "image") {
-                this.request.get_feature = null;
-            
-                var props = this.request.get_image.properties;
-                this.parseEnvelope(props.envelope, options.envelope);
-            
-                this.addLayers(props.layerlist, options.layers);
-                this.addImageSize(props.imagesize, options.tileSize);
-                this.addCoordSys(props.featurecoordsys, options.featureCoordSys);
-                this.addCoordSys(props.filtercoordsys, options.filterCoordSys);
-            } else {
-                // if an arcxml object is being created with no request type, it is
-                // probably going to consume a response, so do not throw an error if
-                // the requesttype is not defined
-                this.request = null;
-            }
-        }
-        
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * Method: parseEnvelope
-     * Parse an array of coordinates into an ArcXML envelope structure.
-     *
-     * Parameters:
-     * env - {Object} An envelope object that will contain the parsed coordinates.
-     * arr - {Array(double)} An array of coordinates in the order: [ minx, miny, maxx, maxy ]
-     */
-    parseEnvelope: function(env, arr) {
-        if (arr && arr.length == 4) {          
-            env.minx = arr[0];
-            env.miny = arr[1];
-            env.maxx = arr[2];
-            env.maxy = arr[3];
-        }
-    },
-    
-    /** 
-     * Method: addLayers
-     * Add a collection of layers to another collection of layers. Each layer in the list is tuple of
-     * { id, visible }.  These layer collections represent the 
-     * /ARCXML/REQUEST/get_image/PROPERTIES/LAYERLIST/LAYERDEF items in ArcXML
-     *
-     * TODO: Add support for dynamic layer rendering.
-     *
-     * Parameters:
-     * ll - {Array({id,visible})} A list of layer definitions.
-     * lyrs - {Array({id,visible})} A list of layer definitions.
-     */
-    addLayers: function(ll, lyrs) {
-        for(var lind = 0, len=lyrs.length; lind < len; lind++) {
-            ll.push(lyrs[lind]);
-        }
-    },
-    
-    /**
-     * Method: addImageSize
-     * Set the size of the requested image.
-     *
-     * Parameters:
-     * imsize - {Object} An ArcXML imagesize object.
-     * olsize - {OpenLayers.Size} The image size to set.
-     */
-    addImageSize: function(imsize, olsize) {
-        if (olsize !== null) {
-            imsize.width = olsize.w;
-            imsize.height = olsize.h;
-            imsize.printwidth = olsize.w;
-            imsize.printheight = olsize.h;
-        }
-    },
-
-    /**
-     * Method: addCoordSys
-     * Add the coordinate system information to an object. The object may be 
-     *
-     * Parameters:
-     * featOrFilt - {Object} A featurecoordsys or filtercoordsys ArcXML structure.
-     * fsys - {String} or {OpenLayers.Projection} or {filtercoordsys} or 
-     * {featurecoordsys} A projection representation. If it's a {String}, 
-     * the value is assumed to be the SRID.  If it's a {OpenLayers.Projection} 
-     * AND Proj4js is available, the projection number and name are extracted 
-     * from there.  If it's a filter or feature ArcXML structure, it is copied.
-     */
-    addCoordSys: function(featOrFilt, fsys) {
-        if (typeof fsys == "string") {
-            featOrFilt.id = parseInt(fsys);
-            featOrFilt.string = fsys;
-        }
-        // is this a proj4js instance?
-        else if (typeof fsys == "object" && fsys.proj !== null){
-            featOrFilt.id = fsys.proj.srsProjNumber;
-            featOrFilt.string = fsys.proj.srsCode;
-        } else {
-            featOrFilt = fsys;
-        }
-    },
-
-    /**
-     * APIMethod: iserror
-     * Check to see if the response from the server was an error.
-     *
-     * Parameters:
-     * data - {String} or {DOMElement} data to read/parse. If nothing is supplied,
-     * the current response is examined.
-     *
-     * Returns:
-     * {Boolean} true if the response was an error.
-     */
-    iserror: function(data) {
-        var ret = null; 
-        
-        if (!data) {
-            ret = (this.response.error !== '');
-        } else {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-            var errorNodes = data.documentElement.getElementsByTagName("ERROR");
-            ret = (errorNodes !== null && errorNodes.length > 0);
-        }
-
-        return ret;
-    },
-
-    /**
-     * APIMethod: read
-     * Read data from a string, and return an response. 
-     * 
-     * Parameters:
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {OpenLayers.Format.ArcXML.Response} An ArcXML response. Note that this response
-     *     data may change in the future. 
-     */
-    read: function(data) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        
-        var arcNode = null;
-        if (data && data.documentElement) {
-            if(data.documentElement.nodeName == "ARCXML") {
-                arcNode = data.documentElement;
-            } else {
-                arcNode = data.documentElement.getElementsByTagName("ARCXML")[0];
-            }
-        }
-          
-        // in Safari, arcNode will be there but will have a child named 
-        // parsererror
-        if (!arcNode || arcNode.firstChild.nodeName === 'parsererror') {
-            var error, source;
-            try {
-                error = data.firstChild.nodeValue;
-                source = data.firstChild.childNodes[1].firstChild.nodeValue;
-            } catch (err) {
-                // pass
-            }
-            throw {
-                message: "Error parsing the ArcXML request", 
-                error: error,
-                source: source
-            };
-        }
-        
-        var response = this.parseResponse(arcNode);
-        return response;
-    },
-    
-    /**
-     * APIMethod: write
-     * Generate an ArcXml document string for sending to an ArcIMS server. 
-     * 
-     * Returns:
-     * {String} A string representing the ArcXML document request.
-     */
-    write: function(request) {       
-        if (!request) {
-            request = this.request;
-        }    
-        var root = this.createElementNS("", "ARCXML");
-        root.setAttribute("version","1.1");
-
-        var reqElem = this.createElementNS("", "REQUEST");
-        
-        if (request.get_image != null) {
-            var getElem = this.createElementNS("", "GET_IMAGE");
-            reqElem.appendChild(getElem);
-
-            var propElem = this.createElementNS("", "PROPERTIES");
-            getElem.appendChild(propElem);
-
-            var props = request.get_image.properties;
-            if (props.featurecoordsys != null) {
-                var feat = this.createElementNS("", "FEATURECOORDSYS");
-                propElem.appendChild(feat);
-                
-                if (props.featurecoordsys.id === 0) {
-                    feat.setAttribute("string", props.featurecoordsys['string']);
-                }
-                else {
-                    feat.setAttribute("id", props.featurecoordsys.id);
-                }
-            }
-          
-            if (props.filtercoordsys != null) {
-                var filt = this.createElementNS("", "FILTERCOORDSYS");
-                propElem.appendChild(filt);
-
-                if (props.filtercoordsys.id === 0) {
-                    filt.setAttribute("string", props.filtercoordsys.string);
-                }
-                else {
-                    filt.setAttribute("id", props.filtercoordsys.id);
-                }
-            }
-          
-            if (props.envelope != null) {
-                var env = this.createElementNS("", "ENVELOPE");
-                propElem.appendChild(env);
-
-                env.setAttribute("minx", props.envelope.minx);
-                env.setAttribute("miny", props.envelope.miny);
-                env.setAttribute("maxx", props.envelope.maxx);
-                env.setAttribute("maxy", props.envelope.maxy);
-            }        
-          
-            var imagesz = this.createElementNS("", "IMAGESIZE");
-            propElem.appendChild(imagesz);
-          
-            imagesz.setAttribute("height", props.imagesize.height);
-            imagesz.setAttribute("width", props.imagesize.width);
-          
-            if (props.imagesize.height != props.imagesize.printheight ||
-                 props.imagesize.width != props.imagesize.printwidth) {
-                imagesz.setAttribute("printheight", props.imagesize.printheight);
-                imagesz.setArrtibute("printwidth", props.imagesize.printwidth);
-            }
-          
-            if (props.background != null) {
-                var backgrnd = this.createElementNS("", "BACKGROUND");
-                propElem.appendChild(backgrnd);
-            
-                backgrnd.setAttribute("color", 
-                    props.background.color.r + "," + 
-                    props.background.color.g + "," + 
-                    props.background.color.b);
-              
-                if (props.background.transcolor !== null) {
-                    backgrnd.setAttribute("transcolor", 
-                        props.background.transcolor.r + "," + 
-                        props.background.transcolor.g + "," + 
-                        props.background.transcolor.b);
-                }
-            }
-          
-            if (props.layerlist != null && props.layerlist.length > 0) {
-                var layerlst = this.createElementNS("", "LAYERLIST");
-                propElem.appendChild(layerlst);
-            
-                for (var ld = 0; ld < props.layerlist.length; ld++) {
-                    var ldef = this.createElementNS("", "LAYERDEF");
-                    layerlst.appendChild(ldef);
-              
-                    ldef.setAttribute("id", props.layerlist[ld].id);
-                    ldef.setAttribute("visible", props.layerlist[ld].visible);
-              
-                    if (typeof props.layerlist[ld].query == "object") {
-                        var query = props.layerlist[ld].query;
-
-                        if (query.where.length < 0) {
-                            continue;
-                        }
-                  
-                        var queryElem = null;
-                        if (typeof query.spatialfilter == "boolean" && query.spatialfilter) {
-                            // handle spatial filter madness
-                            queryElem = this.createElementNS("", "SPATIALQUERY");
-                        }
-                        else {
-                            queryElem = this.createElementNS("", "QUERY");
-                        }
-                
-                        queryElem.setAttribute("where", query.where);
-                
-                        if (typeof query.accuracy == "number" && query.accuracy > 0) {
-                            queryElem.setAttribute("accuracy", query.accuracy);
-                        }
-                        if (typeof query.featurelimit == "number" && query.featurelimit < 2000) {
-                            queryElem.setAttribute("featurelimit", query.featurelimit);
-                        }
-                        if (typeof query.subfields == "string" && query.subfields != "#ALL#") {
-                            queryElem.setAttribute("subfields", query.subfields);
-                        }
-                        if (typeof query.joinexpression == "string" && query.joinexpression.length > 0) {
-                            queryElem.setAttribute("joinexpression", query.joinexpression);
-                        }
-                        if (typeof query.jointables == "string" && query.jointables.length > 0) {
-                            queryElem.setAttribute("jointables", query.jointables);
-                        }
-
-                        ldef.appendChild(queryElem);
-                    }
-              
-                    if (typeof props.layerlist[ld].renderer == "object") {
-                        this.addRenderer(ldef, props.layerlist[ld].renderer);                  
-                    }
-                }
-            }
-        } else if (request.get_feature != null) {
-            var getElem = this.createElementNS("", "GET_FEATURES");
-            getElem.setAttribute("outputmode", "newxml");
-            getElem.setAttribute("checkesc", "true");
-          
-            if (request.get_feature.geometry) {
-                getElem.setAttribute("geometry", request.get_feature.geometry);
-            }
-            else {
-                getElem.setAttribute("geometry", "false");
-            }
-          
-            if (request.get_feature.compact) {
-                getElem.setAttribute("compact", request.get_feature.compact);
-            }
-          
-            if (request.get_feature.featurelimit == "number") {
-                getElem.setAttribute("featurelimit", request.get_feature.featurelimit);
-            }
-          
-            getElem.setAttribute("globalenvelope", "true");
-            reqElem.appendChild(getElem);
-          
-            if (request.get_feature.layer != null && request.get_feature.layer.length > 0) {
-                var lyrElem = this.createElementNS("", "LAYER");
-                lyrElem.setAttribute("id", request.get_feature.layer);
-                getElem.appendChild(lyrElem);
-            }
-          
-            var fquery = request.get_feature.query;
-            if (fquery != null) {
-                var qElem = null;
-                if (fquery.isspatial) {
-                    qElem = this.createElementNS("", "SPATIALQUERY");
-                } else {
-                    qElem = this.createElementNS("", "QUERY");
-                }
-                getElem.appendChild(qElem);
-                
-                if (typeof fquery.accuracy == "number") {
-                    qElem.setAttribute("accuracy", fquery.accuracy);
-                }
-                //qElem.setAttribute("featurelimit", "5");
-            
-                if (fquery.featurecoordsys != null) {
-                    var fcsElem1 = this.createElementNS("", "FEATURECOORDSYS");
-              
-                    if (fquery.featurecoordsys.id == 0) {
-                        fcsElem1.setAttribute("string", fquery.featurecoordsys.string);
-                    } else {
-                        fcsElem1.setAttribute("id", fquery.featurecoordsys.id);
-                    }
-                    qElem.appendChild(fcsElem1);
-                }
-            
-                if (fquery.filtercoordsys != null) {
-                    var fcsElem2 = this.createElementNS("", "FILTERCOORDSYS");
-              
-                    if (fquery.filtercoordsys.id === 0) {
-                        fcsElem2.setAttribute("string", fquery.filtercoordsys.string);
-                    } else {
-                        fcsElem2.setAttribute("id", fquery.filtercoordsys.id);
-                    }
-                    qElem.appendChild(fcsElem2);
-                }
-            
-                if (fquery.buffer > 0) {   
-                    var bufElem = this.createElementNS("", "BUFFER");
-                    bufElem.setAttribute("distance", fquery.buffer);
-                    qElem.appendChild(bufElem);
-                }
-            
-                if (fquery.isspatial) {
-                    var spfElem = this.createElementNS("", "SPATIALFILTER");
-                    spfElem.setAttribute("relation", fquery.spatialfilter.relation);
-                    qElem.appendChild(spfElem);
-              
-                    if (fquery.spatialfilter.envelope) {
-                        var envElem = this.createElementNS("", "ENVELOPE"); 
-                        envElem.setAttribute("minx", fquery.spatialfilter.envelope.minx);
-                        envElem.setAttribute("miny", fquery.spatialfilter.envelope.miny);
-                        envElem.setAttribute("maxx", fquery.spatialfilter.envelope.maxx);
-                        envElem.setAttribute("maxy", fquery.spatialfilter.envelope.maxy);
-                        spfElem.appendChild(envElem);
-                    } else if(typeof fquery.spatialfilter.polygon == "object") {
-                        spfElem.appendChild(this.writePolygonGeometry(fquery.spatialfilter.polygon));                
-                    }
-                }
-            
-                if (fquery.where != null && fquery.where.length > 0) {
-                    qElem.setAttribute("where", fquery.where);
-                }
-            }
-        }
-
-        root.appendChild(reqElem);
-
-        return OpenLayers.Format.XML.prototype.write.apply(this, [root]);
-    },
-    
-    
-    addGroupRenderer: function(ldef, toprenderer) {
-        var topRelem = this.createElementNS("", "GROUPRENDERER");
-        ldef.appendChild(topRelem);
-      
-        for (var rind = 0; rind < toprenderer.length; rind++) {
-            var renderer = toprenderer[rind];
-            this.addRenderer(topRelem, renderer);
-        }
-    },
-    
-    
-    addRenderer: function(topRelem, renderer) {
-        if (renderer instanceof Array) {
-            this.addGroupRenderer(topRelem, renderer);
-        } else {
-            var renderElem = this.createElementNS("", renderer.type.toUpperCase() + "RENDERER");
-            topRelem.appendChild(renderElem);
-          
-            if (renderElem.tagName == "VALUEMAPRENDERER") {
-                this.addValueMapRenderer(renderElem, renderer);
-            } else if (renderElem.tagName == "VALUEMAPLABELRENDERER") {
-                this.addValueMapLabelRenderer(renderElem, renderer);
-            } else if (renderElem.tagName == "SIMPLELABELRENDERER") {
-                this.addSimpleLabelRenderer(renderElem, renderer);
-            } else if (renderElem.tagName == "SCALEDEPENDENTRENDERER") {
-                this.addScaleDependentRenderer(renderElem, renderer);
-            }
-        }             
-    },
-    
-    
-    addScaleDependentRenderer: function(renderElem, renderer) {
-        if (typeof renderer.lower == "string" || typeof renderer.lower == "number") {
-            renderElem.setAttribute("lower", renderer.lower);
-        }
-        if (typeof renderer.upper == "string" || typeof renderer.upper == "number") {
-            renderElem.setAttribute("upper", renderer.upper);
-        }
-        
-        this.addRenderer(renderElem, renderer.renderer);
-    },
-    
-    
-    addValueMapLabelRenderer: function(renderElem, renderer) {
-        renderElem.setAttribute("lookupfield", renderer.lookupfield);
-        renderElem.setAttribute("labelfield", renderer.labelfield);
-      
-        if (typeof renderer.exacts == "object") {
-            for (var ext=0, extlen=renderer.exacts.length; ext<extlen; ext++) {
-                var exact = renderer.exacts[ext];
-          
-                var eelem = this.createElementNS("", "EXACT");
-          
-                if (typeof exact.value == "string") {
-                    eelem.setAttribute("value", exact.value);
-                }
-                if (typeof exact.label == "string") {
-                    eelem.setAttribute("label", exact.label);
-                }
-                if (typeof exact.method == "string") {
-                    eelem.setAttribute("method", exact.method);
-                }
-
-                renderElem.appendChild(eelem);
-            
-                if (typeof exact.symbol == "object") {
-                    var selem = null;
-                
-                    if (exact.symbol.type == "text") {
-                        selem = this.createElementNS("", "TEXTSYMBOL");
-                    }
-                
-                    if (selem != null) {
-                        var keys = this.fontStyleKeys;
-                        for (var i = 0, len = keys.length; i < len; i++) {
-                            var key = keys[i];
-                            if (exact.symbol[key]) {
-                                selem.setAttribute(key, exact.symbol[key]);
-                            }
-                        }    
-                        eelem.appendChild(selem);
-                    }
-                }
-            } // for each exact
-        }      
-    },
-    
-    addValueMapRenderer: function(renderElem, renderer) {
-        renderElem.setAttribute("lookupfield", renderer.lookupfield);
-        
-        if (typeof renderer.ranges == "object") {
-            for(var rng=0, rnglen=renderer.ranges.length; rng<rnglen; rng++) {
-                var range = renderer.ranges[rng];
-                
-                var relem = this.createElementNS("", "RANGE");
-                relem.setAttribute("lower", range.lower);
-                relem.setAttribute("upper", range.upper);
-                
-                renderElem.appendChild(relem);
-                
-                if (typeof range.symbol == "object") {
-                    var selem = null;
-              
-                    if (range.symbol.type == "simplepolygon") {
-                        selem = this.createElementNS("", "SIMPLEPOLYGONSYMBOL");
-                    }
-              
-                    if (selem != null) {
-                        if (typeof range.symbol.boundarycolor == "string") {
-                            selem.setAttribute("boundarycolor", range.symbol.boundarycolor);
-                        }
-                        if (typeof range.symbol.fillcolor == "string") {
-                            selem.setAttribute("fillcolor", range.symbol.fillcolor);
-                        }
-                        if (typeof range.symbol.filltransparency == "number") {
-                            selem.setAttribute("filltransparency", range.symbol.filltransparency);
-                        }
-                        relem.appendChild(selem);
-                    }   
-                }
-            } // for each range
-        } else if (typeof renderer.exacts == "object") {
-            for (var ext=0, extlen=renderer.exacts.length; ext<extlen; ext++) {
-                var exact = renderer.exacts[ext];
-          
-                var eelem = this.createElementNS("", "EXACT");
-                if (typeof exact.value == "string") {
-                    eelem.setAttribute("value", exact.value);
-                }
-                if (typeof exact.label == "string") {
-                    eelem.setAttribute("label", exact.label);
-                }
-                if (typeof exact.method == "string") {
-                    eelem.setAttribute("method", exact.method);
-                }
-            
-                renderElem.appendChild(eelem);
-            
-                if (typeof exact.symbol == "object") {
-                    var selem = null;
-            
-                    if (exact.symbol.type == "simplemarker") {
-                        selem = this.createElementNS("", "SIMPLEMARKERSYMBOL");
-                    }
-            
-                    if (selem != null) {
-                        if (typeof exact.symbol.antialiasing == "string") {
-                            selem.setAttribute("antialiasing", exact.symbol.antialiasing);
-                        }
-                        if (typeof exact.symbol.color == "string") {
-                            selem.setAttribute("color", exact.symbol.color);
-                        }
-                        if (typeof exact.symbol.outline == "string") {
-                            selem.setAttribute("outline", exact.symbol.outline);
-                        }
-                        if (typeof exact.symbol.overlap == "string") {
-                            selem.setAttribute("overlap", exact.symbol.overlap);
-                        }
-                        if (typeof exact.symbol.shadow == "string") {
-                            selem.setAttribute("shadow", exact.symbol.shadow);
-                        }
-                        if (typeof exact.symbol.transparency == "number") {
-                            selem.setAttribute("transparency", exact.symbol.transparency);
-                        }
-                        //if (typeof exact.symbol.type == "string")
-                        //    selem.setAttribute("type", exact.symbol.type);
-                        if (typeof exact.symbol.usecentroid == "string") {
-                            selem.setAttribute("usecentroid", exact.symbol.usecentroid);
-                        }
-                        if (typeof exact.symbol.width == "number") {
-                            selem.setAttribute("width", exact.symbol.width);
-                        }
-                
-                        eelem.appendChild(selem);
-                    }
-                }
-            } // for each exact
-        }
-    },
-    
-    
-    addSimpleLabelRenderer: function(renderElem, renderer) {
-        renderElem.setAttribute("field", renderer.field);
-        var keys = ['featureweight', 'howmanylabels', 'labelbufferratio', 
-                    'labelpriorities', 'labelweight', 'linelabelposition',
-                    'rotationalangles'];
-        for (var i=0, len=keys.length; i<len; i++) {
-            var key = keys[i];
-            if (renderer[key]) {
-                renderElem.setAttribute(key, renderer[key]);
-            }
-        }     
-           
-        if (renderer.symbol.type == "text") {
-            var symbol = renderer.symbol;
-            var selem = this.createElementNS("", "TEXTSYMBOL");
-            renderElem.appendChild(selem);
-          
-            var keys = this.fontStyleKeys;
-            for (var i=0, len=keys.length; i<len; i++) {
-                var key = keys[i];
-                if (symbol[key]) {
-                    selem.setAttribute(key, renderer[key]);
-                }
-            }    
-        }    
-    },
-    
-    writePolygonGeometry: function(polygon) {
-        if (!(polygon instanceof OpenLayers.Geometry.Polygon)) {
-            throw { 
-                message:'Cannot write polygon geometry to ArcXML with an ' +
-                    polygon.CLASS_NAME + ' object.',
-                geometry: polygon
-            };
-        }
-        
-        var polyElem = this.createElementNS("", "POLYGON");
-      
-        for (var ln=0, lnlen=polygon.components.length; ln<lnlen; ln++) {
-            var ring = polygon.components[ln];
-            var ringElem = this.createElementNS("", "RING");
-        
-            for (var rn=0, rnlen=ring.components.length; rn<rnlen; rn++) {
-                var point = ring.components[rn];
-                var pointElem = this.createElementNS("", "POINT");
-            
-                pointElem.setAttribute("x", point.x);
-                pointElem.setAttribute("y", point.y);
-            
-                ringElem.appendChild(pointElem);
-            }
-        
-            polyElem.appendChild(ringElem);
-        }
-      
-        return polyElem;
-    },
-    
-    /**
-     * Method: parseResponse
-     * Take an ArcXML response, and parse in into this object's internal properties.
-     *
-     * Parameters:
-     * data - {String} or {DOMElement} The ArcXML response, as either a string or the
-     * top level DOMElement of the response.
-     */
-    parseResponse: function(data) {
-        if(typeof data == "string") { 
-            var newData = new OpenLayers.Format.XML();
-            data = newData.read(data);
-        }
-        var response = new OpenLayers.Format.ArcXML.Response();
-        
-        var errorNode = data.getElementsByTagName("ERROR");
-        
-        if (errorNode != null && errorNode.length > 0) {
-            response.error = this.getChildValue(errorNode, "Unknown error.");
-        } else {
-            var responseNode = data.getElementsByTagName("RESPONSE");
-          
-            if (responseNode == null || responseNode.length == 0) {
-                response.error = "No RESPONSE tag found in ArcXML response.";
-                return response;
-            }
-          
-            var rtype = responseNode[0].firstChild.nodeName;
-            if (rtype == "#text") {
-                rtype = responseNode[0].firstChild.nextSibling.nodeName;
-            }
-          
-            if (rtype == "IMAGE") {
-                var envelopeNode = data.getElementsByTagName("ENVELOPE");
-                var outputNode = data.getElementsByTagName("OUTPUT");
-                
-                if (envelopeNode == null || envelopeNode.length == 0) {
-                    response.error = "No ENVELOPE tag found in ArcXML response.";
-                } else if (outputNode == null || outputNode.length == 0) {
-                    response.error = "No OUTPUT tag found in ArcXML response.";
-                } else {
-                    var envAttr = this.parseAttributes(envelopeNode[0]);            
-                    var outputAttr = this.parseAttributes(outputNode[0]);
-                  
-                    if (typeof outputAttr.type == "string") {
-                        response.image = { 
-                            envelope: envAttr, 
-                            output: { 
-                                type: outputAttr.type, 
-                                data: this.getChildValue(outputNode[0])
-                            }
-                        };
-                    } else {
-                        response.image = { envelope: envAttr, output: outputAttr };
-                    }
-                }
-            } else if (rtype == "FEATURES") {
-                var features = responseNode[0].getElementsByTagName("FEATURES");
-            
-                // get the feature count
-                var featureCount = features[0].getElementsByTagName("FEATURECOUNT");
-                response.features.featurecount = featureCount[0].getAttribute("count");
-            
-                if (response.features.featurecount > 0) {
-                    // get the feature envelope
-                    var envelope = features[0].getElementsByTagName("ENVELOPE");
-                    response.features.envelope = this.parseAttributes(envelope[0], typeof(0));
-
-                    // get the field values per feature
-                    var featureList = features[0].getElementsByTagName("FEATURE");
-                    for (var fn = 0; fn < featureList.length; fn++) {
-                        var feature = new OpenLayers.Feature.Vector();
-                        var fields = featureList[fn].getElementsByTagName("FIELD");
-
-                        for (var fdn = 0; fdn < fields.length; fdn++) {
-                            var fieldName = fields[fdn].getAttribute("name");
-                            var fieldValue = fields[fdn].getAttribute("value");
-                            feature.attributes[ fieldName ] = fieldValue;
-                        }
-
-                        var geom = featureList[fn].getElementsByTagName("POLYGON");
-
-                        if (geom.length > 0) {
-                            // if there is a polygon, create an openlayers polygon, and assign
-                            // it to the .geometry property of the feature
-                            var ring = geom[0].getElementsByTagName("RING");
-
-                            var polys = [];
-                            for (var rn = 0; rn < ring.length; rn++) {
-                                var linearRings = [];
-                                linearRings.push(this.parsePointGeometry(ring[rn]));
-
-                                var holes = ring[rn].getElementsByTagName("HOLE");
-                                for (var hn = 0; hn < holes.length; hn++) {
-                                    linearRings.push(this.parsePointGeometry(holes[hn]));
-                                }
-                                holes = null;
-                                polys.push(new OpenLayers.Geometry.Polygon(linearRings));
-                                linearRings = null;
-                            }
-                            ring = null;
-                          
-                            if (polys.length == 1) {
-                                feature.geometry = polys[0];
-                            } else
-                            {
-                                feature.geometry = new OpenLayers.Geometry.MultiPolygon(polys);
-                            }
-                        }
-
-                        response.features.feature.push(feature);
-                    }
-                }
-            } else {
-                response.error = "Unidentified response type.";
-            }
-        }
-        return response;
-    },
-    
-    
-    /**
-     * Method: parseAttributes
-     *
-     * Parameters:
-     * node - {<DOMElement>} An element to parse attributes from.
-     *
-     * Returns:
-     * {Object} An attributes object, with properties set to attribute values.
-     */
-    parseAttributes: function(node,type) {
-        var attributes = {};
-        for(var attr = 0; attr < node.attributes.length; attr++) {
-            if (type == "number") {
-                attributes[node.attributes[attr].nodeName] = parseFloat(node.attributes[attr].nodeValue);
-            } else {
-                attributes[node.attributes[attr].nodeName] = node.attributes[attr].nodeValue;
-            }
-        }
-        return attributes;
-    },
-    
-    
-    /**
-     * Method: parsePointGeometry
-     *
-     * Parameters:
-     * node - {<DOMElement>} An element to parse <COORDS> or <POINT> arcxml data from.
-     *
-     * Returns:
-     * {OpenLayers.Geometry.LinearRing} A linear ring represented by the node's points.
-     */
-    parsePointGeometry: function(node) {
-        var ringPoints = [];
-        var coords = node.getElementsByTagName("COORDS");
-
-        if (coords.length > 0) {
-            // if coords is present, it's the only coords item
-            var coordArr = this.getChildValue(coords[0]);
-            coordArr = coordArr.split(/;/);
-            for (var cn = 0; cn < coordArr.length; cn++) {
-                var coordItems = coordArr[cn].split(/ /);
-                ringPoints.push(new OpenLayers.Geometry.Point(parseFloat(coordItems[0]), parseFloat(coordItems[1])));
-            }
-            coords = null;
-        } else {
-            var point = node.getElementsByTagName("POINT");
-            if (point.length > 0) {
-                for (var pn = 0; pn < point.length; pn++) {
-                    ringPoints.push(
-                        new OpenLayers.Geometry.Point(
-                            parseFloat(point[pn].getAttribute("x")),
-                            parseFloat(point[pn].getAttribute("y"))
-                        )
-                    );
-                }
-            }
-            point = null;
-        }
-
-        return new OpenLayers.Geometry.LinearRing(ringPoints);      
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.ArcXML" 
-});
-
-OpenLayers.Format.ArcXML.Request = OpenLayers.Class({
-    initialize: function(params) {
-        var defaults = {
-            get_image: {
-                properties: {
-                    background: null,
-                    /*{ 
-                        color: { r:255, g:255, b:255 },
-                        transcolor: null
-                    },*/
-                    draw: true,
-                    envelope: {
-                        minx: 0, 
-                        miny: 0, 
-                        maxx: 0, 
-                        maxy: 0
-                    },
-                    featurecoordsys: { 
-                        id:0, 
-                        string:"",
-                        datumtransformid:0,
-                        datumtransformstring:""
-                    },
-                    filtercoordsys:{
-                        id:0,
-                        string:"",
-                        datumtransformid:0,
-                        datumtransformstring:""
-                    },
-                    imagesize:{
-                        height:0,
-                        width:0,
-                        dpi:96,
-                        printheight:0,
-                        printwidth:0,
-                        scalesymbols:false
-                    },
-                    layerlist:[],
-                    /* no support for legends */
-                    output:{
-                        baseurl:"",
-                        legendbaseurl:"",
-                        legendname:"",
-                        legendpath:"",
-                        legendurl:"",
-                        name:"",
-                        path:"",
-                        type:"jpg",
-                        url:""
-                    }
-                }
-            },
-
-            get_feature: {
-                layer: "",
-                query: {
-                    isspatial: false,
-                    featurecoordsys: {
-                        id:0,
-                        string:"",
-                        datumtransformid:0,
-                        datumtransformstring:""
-                    },
-                    filtercoordsys: {
-                        id:0,
-                        string:"",
-                        datumtransformid:0,
-                        datumtransformstring:""
-                    },
-                    buffer:0,
-                    where:"",
-                    spatialfilter: {
-                        relation: "envelope_intersection",
-                        envelope: null
-                    }
-                }
-            },
-      
-            environment: {
-                separators: {
-                    cs:" ",
-                    ts:";"
-                }
-            },
-      
-            layer: [],
-            workspaces: []
-        };
-      
-        return OpenLayers.Util.extend(this, defaults);      
-    },
-  
-    CLASS_NAME: "OpenLayers.Format.ArcXML.Request"
-});
-
-OpenLayers.Format.ArcXML.Response = OpenLayers.Class({  
-    initialize: function(params) {
-        var defaults = {
-            image: {
-                envelope:null,
-                output:''
-            },
-      
-            features: {
-                featurecount: 0,
-                envelope: null,
-                feature: []
-            },
-      
-            error:''
-        };
-  
-        return OpenLayers.Util.extend(this, defaults);
-    },
-  
-    CLASS_NAME: "OpenLayers.Format.ArcXML.Response"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/ArcXML/Features.js
+++ /dev/null
@@ -1,50 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/ArcXML.js
- */
-
-/**
- * Class: OpenLayers.Format.ArcXML.Features
- * Read/Wite ArcXML features. Create a new instance with the 
- *     <OpenLayers.Format.ArcXML.Features> constructor.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.ArcXML.Features = OpenLayers.Class(OpenLayers.Format.XML, {
-
-    /**
-     * Constructor: OpenLayers.Format.ArcXML.Features
-     * Create a new parser/writer for ArcXML Features.  Create an instance of this class
-     * to get a set of features from an ArcXML response.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {     
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * APIMethod: read
-     * Read data from a string of ArcXML, and return a set of OpenLayers features. 
-     * 
-     * Parameters:
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Feature.Vector>)} A collection of features.
-     */
-    read: function(data) {
-        var axl = new OpenLayers.Format.ArcXML();
-        var parsed = axl.read(data);
-        
-        return parsed.features.feature;
-    }
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/Atom.js
+++ /dev/null
@@ -1,728 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Format/GML/v3.js
- * @requires OpenLayers/Feature/Vector.js
- */
-
-/**
- * Class: OpenLayers.Format.Atom
- * Read/write Atom feeds. Create a new instance with the
- *     <OpenLayers.Format.AtomFeed> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.  Properties
-     *     of this object should not be set individually.  Read-only.  All
-     *     XML subclasses should have their own namespaces object.  Use
-     *     <setNamespace> to add or set a namespace alias after construction.
-     */
-    namespaces: {
-        atom: "http://www.w3.org/2005/Atom",
-        georss: "http://www.georss.org/georss"
-    },
-    
-    /**
-     * APIProperty: feedTitle
-     * {String} Atom feed elements require a title.  Default is "untitled".
-     */
-    feedTitle: "untitled",
-
-    /**
-     * APIProperty: defaultEntryTitle
-     * {String} Atom entry elements require a title.  In cases where one is
-     *     not provided in the feature attributes, this will be used.  Default
-     *     is "untitled".
-     */
-    defaultEntryTitle: "untitled",
-
-    /**
-     * Property: gmlParse
-     * {Object} GML Format object for parsing features
-     * Non-API and only created if necessary
-     */
-    gmlParser: null,
-    
-    /**
-     * APIProperty: xy
-     * {Boolean} Order of the GML coordinate: true:(x,y) or false:(y,x)
-     * For GeoRSS the default is (y,x), therefore: false
-     */
-    xy: false,
-    
-    /**
-     * Constructor: OpenLayers.Format.AtomEntry
-     * Create a new parser for Atom.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * APIMethod: read
-     * Return a list of features from an Atom feed or entry document.
-     
-     * Parameters:
-     * doc - {Element} or {String}
-     *
-     * Returns:
-     * An Array of <OpenLayers.Feature.Vector>s
-     */
-    read: function(doc) {
-        if (typeof doc == "string") {
-            doc = OpenLayers.Format.XML.prototype.read.apply(this, [doc]);
-        }
-        return this.parseFeatures(doc);
-    },
-    
-    /**
-     * APIMethod: write
-     * Serialize or more feature nodes to Atom documents.
-     *
-     * Parameters:
-     * features - a single {<OpenLayers.Feature.Vector>} or an
-     * Array({<OpenLayers.Feature.Vector>}).
-     *
-     * Returns:
-     * {String} an Atom entry document if passed one feature node, or a feed
-     * document if passed an array of feature nodes.
-     */
-    write: function(features) {
-        var doc;
-        if (features instanceof Array) {
-            doc = this.createElementNSPlus("atom:feed");
-            doc.appendChild(
-                this.createElementNSPlus("atom:title", {
-                    value: this.feedTitle
-                })
-            );
-            for (var i=0, ii=features.length; i<ii; i++) {
-                doc.appendChild(this.buildEntryNode(features[i]));
-            }
-        }
-        else {
-            doc = this.buildEntryNode(features);
-        }
-        return OpenLayers.Format.XML.prototype.write.apply(this, [doc]);
-    },
-    
-    /**
-     * Method: buildContentNode
-     *
-     * Parameters:
-     * content - {Object}
-     *
-     * Returns:
-     * {DOMElement} an Atom content node.
-     *
-     * TODO: types other than text.
-     */
-    buildContentNode: function(content) {
-        var node = this.createElementNSPlus("atom:content", {
-            attributes: {
-                type: content.type || null
-            }
-        });
-        if (content.src) {
-            node.setAttribute("src", content.src);
-        } else {
-            if (content.type == "text" || content.type == null) {
-                node.appendChild(
-                    this.createTextNode(content.value)
-                );
-            } else if (content.type == "html") {
-                if (typeof content.value != "string") {
-                    throw "HTML content must be in form of an escaped string";
-                }
-                node.appendChild(
-                    this.createTextNode(content.value)
-                );
-            } else if (content.type == "xhtml") {
-                node.appendChild(content.value);
-            } else if (content.type == "xhtml" ||
-                           content.type.match(/(\+|\/)xml$/)) {
-                node.appendChild(content.value);
-            }
-            else { // MUST be a valid Base64 encoding
-                node.appendChild(
-                    this.createTextNode(content.value)
-                );
-            }
-        }
-        return node;
-    },
-    
-    /**
-     * Method: buildEntryNode
-     * Build an Atom entry node from a feature object.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>}
-     *
-     * Returns:
-     * {DOMElement} an Atom entry node.
-     *
-     * These entries are geared for publication using AtomPub.
-     *
-     * TODO: support extension elements
-     */
-    buildEntryNode: function(feature) {
-        var attrib = feature.attributes;
-        var atomAttrib = attrib.atom || {};
-        var entryNode = this.createElementNSPlus("atom:entry");
-        
-        // atom:author
-        if (atomAttrib.authors) {
-            var authors = atomAttrib.authors instanceof Array ?
-                atomAttrib.authors : [atomAttrib.authors];
-            for (var i=0, ii=authors.length; i<ii; i++) {
-                entryNode.appendChild(
-                    this.buildPersonConstructNode(
-                        "author", authors[i]
-                    )
-                );
-            }
-        }
-        
-        // atom:category
-        if (atomAttrib.categories) {
-            var categories = atomAttrib.categories instanceof Array ?
-                atomAttrib.categories : [atomAttrib.categories];
-            var category;
-            for (var i=0, ii=categories.length; i<ii; i++) {
-                category = categories[i];
-                entryNode.appendChild(
-                    this.createElementNSPlus("atom:category", {
-                        attributes: {
-                            term: category.term,
-                            scheme: category.scheme || null,
-                            label: category.label || null
-                        }
-                    })
-                );
-            }
-        }
-        
-        // atom:content
-        if (atomAttrib.content) {
-            entryNode.appendChild(this.buildContentNode(atomAttrib.content));
-        }
-        
-        // atom:contributor
-        if (atomAttrib.contributors) {
-            var contributors = atomAttrib.contributors instanceof Array ?
-                atomAttrib.contributors : [atomAttrib.contributors];
-            for (var i=0, ii=contributors.length; i<ii; i++) {
-                entryNode.appendChild(
-                    this.buildPersonConstructNode(
-                        "contributor",
-                        contributors[i]
-                        )
-                    );
-            }
-        }
-        
-        // atom:id
-        if (feature.fid) {
-            entryNode.appendChild(
-                this.createElementNSPlus("atom:id", {
-                    value: feature.fid
-                })
-            );
-        }
-        
-        // atom:link
-        if (atomAttrib.links) {
-            var links = atomAttrib.links instanceof Array ?
-                atomAttrib.links : [atomAttrib.links];
-            var link;
-            for (var i=0, ii=links.length; i<ii; i++) {
-                link = links[i];
-                entryNode.appendChild(
-                    this.createElementNSPlus("atom:link", {
-                        attributes: {
-                            href: link.href,
-                            rel: link.rel || null,
-                            type: link.type || null,
-                            hreflang: link.hreflang || null,
-                            title: link.title || null,
-                            length: link.length || null
-                        }
-                    })
-                );
-            }
-        }
-        
-        // atom:published
-        if (atomAttrib.published) {
-            entryNode.appendChild(
-                this.createElementNSPlus("atom:published", {
-                    value: atomAttrib.published
-                })
-            );
-        }
-        
-        // atom:rights
-        if (atomAttrib.rights) {
-            entryNode.appendChild(
-                this.createElementNSPlus("atom:rights", {
-                    value: atomAttrib.rights
-                })
-            );
-        }
-        
-        // atom:source not implemented
-        
-        // atom:summary
-        if (atomAttrib.summary || attrib.description) {
-            entryNode.appendChild(
-                this.createElementNSPlus("atom:summary", {
-                    value: atomAttrib.summary || attrib.description
-                })
-            );
-        }
-        
-        // atom:title
-        entryNode.appendChild(
-            this.createElementNSPlus("atom:title", {
-                value: atomAttrib.title || attrib.title || this.defaultEntryTitle
-            })
-        );
-        
-        // atom:updated
-        if (atomAttrib.updated) {
-            entryNode.appendChild(
-                this.createElementNSPlus("atom:updated", {
-                    value: atomAttrib.updated
-                })
-            );
-        }
-        
-        // georss:where
-        if (feature.geometry) {
-            var whereNode = this.createElementNSPlus("georss:where");
-            whereNode.appendChild(
-                this.buildGeometryNode(feature.geometry)
-            );
-            entryNode.appendChild(whereNode);
-        }
-        
-        return entryNode;
-    },
-    
-    /**
-     * Method: initGmlParser
-     * Creates a GML parser.
-     */
-    initGmlParser: function() {
-        this.gmlParser = new OpenLayers.Format.GML.v3({
-            xy: this.xy,
-            featureNS: "http://example.com#feature",
-            internalProjection: this.internalProjection,
-            externalProjection: this.externalProjection
-        });
-    },
-    
-    /**
-     * Method: buildGeometryNode
-     * builds a GeoRSS node with a given geometry
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     *
-     * Returns:
-     * {DOMElement} A gml node.
-     */
-    buildGeometryNode: function(geometry) {
-        if (!this.gmlParser) {
-            this.initGmlParser();
-        }
-        var node = this.gmlParser.writeNode("feature:_geometry", geometry);
-        return node.firstChild;
-    },
-    
-    /**
-     * Method: buildPersonConstructNode
-     *
-     * Parameters:
-     * name - {String}
-     * value - {Object}
-     *
-     * Returns:
-     * {DOMElement} an Atom person construct node.
-     *
-     * Example:
-     * >>> buildPersonConstructNode("author", {name: "John Smith"})
-     * {<author><name>John Smith</name></author>}
-     *
-     * TODO: how to specify extension elements? Add to the oNames array?
-     */
-    buildPersonConstructNode: function(name, value) {
-        var oNames = ["uri", "email"];
-        var personNode = this.createElementNSPlus("atom:" + name);
-        personNode.appendChild(
-            this.createElementNSPlus("atom:name", {
-                value: value.name
-            })
-        );
-        for (var i=0, ii=oNames.length; i<ii; i++) {
-            if (value[oNames[i]]) {
-                personNode.appendChild(
-                    this.createElementNSPlus("atom:" + oNames[i], {
-                        value: value[oNames[i]]
-                    })
-                );
-            }
-        }
-        return personNode;
-    },
-    
-    /**
-     * Method: getFirstChildValue
-     *
-     * Parameters:
-     * node - {DOMElement}
-     * nsuri - {String} Child node namespace uri ("*" for any).
-     * name - {String} Child node name.
-     * def - {String} Optional string default to return if no child found.
-     *
-     * Returns:
-     * {String} The value of the first child with the given tag name.  Returns
-     *     default value or empty string if none found.
-     */
-    getFirstChildValue: function(node, nsuri, name, def) {
-        var value;
-        var nodes = this.getElementsByTagNameNS(node, nsuri, name);
-        if (nodes && nodes.length > 0) {
-            value = this.getChildValue(nodes[0], def);
-        } else {
-            value = def;
-        }
-        return value;
-    },
-    
-    /**
-     * Method: parseFeature
-     * Parse feature from an Atom entry node..
-     *
-     * Parameters:
-     * node - {DOMElement} An Atom entry or feed node.
-     *
-     * Returns:
-     * An <OpenLayers.Feature.Vector>.
-     */
-    parseFeature: function(node) {
-        var atomAttrib = {};
-        var value = null;
-        var nodes = null;
-        var attval = null;
-        var atomns = this.namespaces.atom;
-        
-        // atomAuthor*
-        this.parsePersonConstructs(node, "author", atomAttrib);
-        
-        // atomCategory*
-        nodes = this.getElementsByTagNameNS(node, atomns, "category");
-        if (nodes.length > 0) {
-            atomAttrib.categories = [];
-        }
-        for (var i=0, ii=nodes.length; i<ii; i++) {
-            value = {};
-            value.term = nodes[i].getAttribute("term");
-            attval = nodes[i].getAttribute("scheme");
-            if (attval) { value.scheme = attval; }
-            attval = nodes[i].getAttribute("label");
-            if (attval) { value.label = attval; }
-            atomAttrib.categories.push(value);
-        }
-        
-        // atomContent?
-        nodes = this.getElementsByTagNameNS(node, atomns, "content");
-        if (nodes.length > 0) {
-            value = {};
-            attval = nodes[0].getAttribute("type");
-            if (attval) {
-                value.type = attval;
-            }
-            attval = nodes[0].getAttribute("src");
-            if (attval) {
-                value.src = attval;
-            } else {
-                if (value.type == "text" || 
-                    value.type == "html" || 
-                    value.type == null ) {
-                    value.value = this.getFirstChildValue(
-                                        node,
-                                        atomns,
-                                        "content",
-                                        null
-                                        );
-                } else if (value.type == "xhtml" ||
-                           value.type.match(/(\+|\/)xml$/)) {
-                    value.value = this.getChildEl(nodes[0]);
-                } else { // MUST be base64 encoded
-                    value.value = this.getFirstChildValue(
-                                        node,
-                                        atomns,
-                                        "content",
-                                        null
-                                        );
-                }
-                atomAttrib.content = value;
-            }
-        }
-        
-        // atomContributor*
-        this.parsePersonConstructs(node, "contributor", atomAttrib);
-        
-        // atomId
-        atomAttrib.id = this.getFirstChildValue(node, atomns, "id", null);
-        
-        // atomLink*
-        nodes = this.getElementsByTagNameNS(node, atomns, "link");
-        if (nodes.length > 0) {
-            atomAttrib.links = new Array(nodes.length);
-        }
-        var oAtts = ["rel", "type", "hreflang", "title", "length"];
-        for (var i=0, ii=nodes.length; i<ii; i++) {
-            value = {};
-            value.href = nodes[i].getAttribute("href");
-            for (var j=0, jj=oAtts.length; j<jj; j++) {
-                attval = nodes[i].getAttribute(oAtts[j]);
-                if (attval) {
-                    value[oAtts[j]] = attval;
-                }
-            }
-            atomAttrib.links[i] = value;
-        }
-        
-        // atomPublished?
-        value = this.getFirstChildValue(node, atomns, "published", null);
-        if (value) {
-            atomAttrib.published = value;
-        }
-        
-        // atomRights?
-        value = this.getFirstChildValue(node, atomns, "rights", null);
-        if (value) {
-            atomAttrib.rights = value;
-        }
-        
-        // atomSource? -- not implemented
-        
-        // atomSummary?
-        value = this.getFirstChildValue(node, atomns, "summary", null);
-        if (value) {
-            atomAttrib.summary = value;
-        }
-        
-        // atomTitle
-        atomAttrib.title = this.getFirstChildValue(
-                                node, atomns, "title", null
-                                );
-        
-        // atomUpdated
-        atomAttrib.updated = this.getFirstChildValue(
-                                node, atomns, "updated", null
-                                );
-        
-        var featureAttrib = {
-            title: atomAttrib.title,
-            description: atomAttrib.summary,
-            atom: atomAttrib
-        };
-        var geometry = this.parseLocations(node)[0];
-        var feature = new OpenLayers.Feature.Vector(geometry, featureAttrib);
-        feature.fid = atomAttrib.id;
-        return feature;
-    },
-    
-    /**
-     * Method: parseFeatures
-     * Return features from an Atom entry or feed.
-     *
-     * Parameters:
-     * node - {DOMElement} An Atom entry or feed node.
-     *
-     * Returns:
-     * An Array of <OpenLayers.Feature.Vector>s.
-     */
-    parseFeatures: function(node) {
-        var features = [];
-        var entries = this.getElementsByTagNameNS(
-            node, this.namespaces.atom, "entry"
-        );
-        if (entries.length == 0) {
-            entries = [node];
-        }
-        for (var i=0, ii=entries.length; i<ii; i++) {
-            features.push(this.parseFeature(entries[i]));
-        }
-        return features;
-    },
-    
-    /**
-     * Method: parseLocations
-     * Parse the locations from an Atom entry or feed.
-     *
-     * Parameters:
-     * node - {DOMElement} An Atom entry or feed node.
-     *
-     * Returns:
-     * An Array of <OpenLayers.Geometry>s.
-     */
-    parseLocations: function(node) {
-        var georssns = this.namespaces.georss;
-
-        var locations = {components: []};
-        var where = this.getElementsByTagNameNS(node, georssns, "where");
-        if (where && where.length > 0) {
-            if (!this.gmlParser) {
-                this.initGmlParser();
-            }
-            for (var i=0, ii=where.length; i<ii; i++) {
-                this.gmlParser.readChildNodes(where[i], locations);
-            }
-        }
-        
-        var components = locations.components;
-        var point = this.getElementsByTagNameNS(node, georssns, "point");
-        if (point && point.length > 0) {
-            for (var i=0, ii=point.length; i<ii; i++) {
-                var xy = OpenLayers.String.trim(
-                            point[i].firstChild.nodeValue
-                            ).split(/\s+/);
-                if (xy.length !=2) {
-                    xy = OpenLayers.String.trim(
-                                point[i].firstChild.nodeValue
-                                ).split(/\s*,\s*/);
-                }
-                components.push(
-                    new OpenLayers.Geometry.Point(
-                        parseFloat(xy[1]),
-                        parseFloat(xy[0])
-                    )
-                );
-            }
-        }
-
-        var line = this.getElementsByTagNameNS(node, georssns, "line");
-        if (line && line.length > 0) {
-            var coords;
-            var p;
-            var points;
-            for (var i=0, ii=line.length; i<ii; i++) {
-                coords = OpenLayers.String.trim(
-                                line[i].firstChild.nodeValue
-                                ).split(/\s+/);
-                points = [];
-                for (var j=0, jj=coords.length; j<jj; j+=2) {
-                    p = new OpenLayers.Geometry.Point(
-                        parseFloat(coords[j+1]),
-                        parseFloat(coords[j])
-                    );
-                    points.push(p);
-                }
-                components.push(
-                    new OpenLayers.Geometry.LineString(points)
-                );
-            }
-        }        
-
-        var polygon = this.getElementsByTagNameNS(node, georssns, "polygon");
-        if (polygon && polygon.length > 0) {
-            var coords;
-            var p;
-            var points;
-            for (var i=0, ii=polygon.length; i<ii; i++) {
-                coords = OpenLayers.String.trim(
-                            polygon[i].firstChild.nodeValue
-                            ).split(/\s+/);
-                points = [];
-                for (var j=0, jj=coords.length; j<jj; j+=2) {
-                    p = new OpenLayers.Geometry.Point(
-                        parseFloat(coords[j+1]),
-                        parseFloat(coords[j])
-                    );
-                    points.push(p);
-                }
-                components.push(
-                    new OpenLayers.Geometry.Polygon(
-                        [new OpenLayers.Geometry.LinearRing(components)]
-                    )
-                );
-            }
-        }
-        
-        if (this.internalProjection && this.externalProjection) {
-            for (var i=0, ii=components.length; i<ii; i++) {
-                if (components[i]) {
-                    components[i].transform(
-                        this.externalProjection,
-                        this.internalProjection
-                    );
-                }
-            }
-        }
-        
-        return components;
-    },
-    
-    /**
-     * Method: parsePersonConstruct
-     * Parse Atom person constructs from an Atom entry node.
-     *
-     * Parameters:
-     * node - {DOMElement} An Atom entry or feed node.
-     * name - {String} Construcy name ("author" or "contributor")
-     * data = {Object} Object in which to put parsed persons.
-     *
-     * Returns:
-     * An {Object}.
-     */
-    parsePersonConstructs: function(node, name, data) {
-        var persons = [];
-        var atomns = this.namespaces.atom;
-        var nodes = this.getElementsByTagNameNS(node, atomns, name);
-        var oAtts = ["uri", "email"];
-        for (var i=0, ii=nodes.length; i<ii; i++) {
-            var value = {};
-            value.name = this.getFirstChildValue(
-                            nodes[i],
-                            atomns,
-                            "name",
-                            null
-                            );
-            for (var j=0, jj=oAtts.length; j<jj; j++) {
-                var attval = this.getFirstChildValue(
-                            nodes[i],
-                            atomns,
-                            oAtts[j],
-                            null);
-                if (attval) {
-                    value[oAtts[j]] = attval;
-                }
-            }
-            persons.push(value);
-        }
-        if (persons.length > 0) {
-            data[name + "s"] = persons;
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Format.Atom"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/CSWGetDomain.js
+++ /dev/null
@@ -1,35 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format.js
- */
-
-/**
- * Function: OpenLayers.Format.CSWGetDomain.
- *     Default version is 2.0.2.
- *
- * Returns:
- * {<OpenLayers.Format>} A CSWGetDomain format of the given version.
- */
-OpenLayers.Format.CSWGetDomain = function(options) {
-    options = OpenLayers.Util.applyDefaults(
-        options, OpenLayers.Format.CSWGetDomain.DEFAULTS
-    );
-    var cls = OpenLayers.Format.CSWGetDomain["v"+options.version.replace(/\./g, "_")];
-    if(!cls) {
-        throw "Unsupported CSWGetDomain version: " + options.version;
-    }
-    return new cls(options);
-};
-
-/**
- * Constant: OpenLayers.Format.CSWGetDomain.DEFAULTS
- * {Object} Default properties for the CSWGetDomain format.
- */
-OpenLayers.Format.CSWGetDomain.DEFAULTS = {
-    "version": "2.0.2"
-};
-

--- a/labs/openlayers/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js
+++ /dev/null
@@ -1,244 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Format/CSWGetDomain.js
- */
-
-/**
- * Class: OpenLayers.Format.CSWGetDomain.v2_0_2
- *     A format for creating CSWGetDomain v2.0.2 transactions. 
- *     Create a new instance with the
- *     <OpenLayers.Format.CSWGetDomain.v2_0_2> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.CSWGetDomain.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        xlink: "http://www.w3.org/1999/xlink",
-        xsi: "http://www.w3.org/2001/XMLSchema-instance",
-        csw: "http://www.opengis.net/cat/csw/2.0.2"
-    },
-
-    /**
-     * Property: defaultPrefix
-     * {String} The default prefix (used by Format.XML).
-     */
-    defaultPrefix: "csw",
-    
-    /**
-     * Property: version
-     * {String} CSW version number.
-     */
-    version: "2.0.2",
-    
-    /**
-     * Property: schemaLocation
-     * {String} http://www.opengis.net/cat/csw/2.0.2
-     *   http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd
-     */
-    schemaLocation: "http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd",
-
-    /**
-     * APIProperty: PropertyName
-     * {String} Value of the csw:PropertyName element, used when
-     *     writing a GetDomain document.
-     */
-    PropertyName: null,
-
-    /**
-     * APIProperty: ParameterName
-     * {String} Value of the csw:ParameterName element, used when
-     *     writing a GetDomain document.
-     */
-    ParameterName: null,
-    
-    /**
-     * Constructor: OpenLayers.Format.CSWGetDomain.v2_0_2
-     * A class for parsing and generating CSWGetDomain v2.0.2 transactions.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     *
-     * Valid options properties:
-     * - PropertyName
-     * - ParameterName
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * APIMethod: read
-     * Parse the response from a GetDomain request.
-     */
-    read: function(data) {
-        if(typeof data == "string") { 
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        if(data && data.nodeType == 9) {
-            data = data.documentElement;
-        }
-        var obj = {};
-        this.readNode(data, obj);
-        return obj;
-    },
-    
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "csw": {
-            "GetDomainResponse": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "DomainValues": function(node, obj) {
-                if (!(obj.DomainValues instanceof Array)) {
-                    obj.DomainValues = [];
-                }
-                var attrs = node.attributes;
-                var domainValue = {};
-                for(var i=0, len=attrs.length; i<len; ++i) {
-                    domainValue[attrs[i].name] = attrs[i].nodeValue;
-                }
-                this.readChildNodes(node, domainValue);
-                obj.DomainValues.push(domainValue);
-            },
-            "PropertyName": function(node, obj) {
-                obj.PropertyName = this.getChildValue(node);
-            },
-            "ParameterName": function(node, obj) {
-                obj.ParameterName = this.getChildValue(node);
-            },
-            "ListOfValues": function(node, obj) {
-                if (!(obj.ListOfValues instanceof Array)) {
-                    obj.ListOfValues = [];
-                }
-                this.readChildNodes(node, obj.ListOfValues);
-            },
-            "Value": function(node, obj) {
-                var attrs = node.attributes;
-                var value = {}
-                for(var i=0, len=attrs.length; i<len; ++i) {
-                    value[attrs[i].name] = attrs[i].nodeValue;
-                }
-                value.value = this.getChildValue(node);
-                obj.push({Value: value});
-            },
-            "ConceptualScheme": function(node, obj) {
-                obj.ConceptualScheme = {};
-                this.readChildNodes(node, obj.ConceptualScheme);
-            },
-            "Name": function(node, obj) {
-                obj.Name = this.getChildValue(node);
-            },
-            "Document": function(node, obj) {
-                obj.Document = this.getChildValue(node);
-            },
-            "Authority": function(node, obj) {
-                obj.Authority = this.getChildValue(node);
-            },
-            "RangeOfValues": function(node, obj) {
-                obj.RangeOfValues = {};
-                this.readChildNodes(node, obj.RangeOfValues);
-            },
-            "MinValue": function(node, obj) {
-                var attrs = node.attributes;
-                var value = {}
-                for(var i=0, len=attrs.length; i<len; ++i) {
-                    value[attrs[i].name] = attrs[i].nodeValue;
-                }
-                value.value = this.getChildValue(node);
-                obj.MinValue = value;
-            },
-            "MaxValue": function(node, obj) {
-                var attrs = node.attributes;
-                var value = {}
-                for(var i=0, len=attrs.length; i<len; ++i) {
-                    value[attrs[i].name] = attrs[i].nodeValue;
-                }
-                value.value = this.getChildValue(node);
-                obj.MaxValue = value;
-            }
-        }
-    },
-    
-    /**
-     * APIMethod: write
-     * Given an configuration js object, write a CSWGetDomain request. 
-     *
-     * Parameters:
-     * options - {Object} A object mapping the request.
-     *
-     * Returns:
-     * {String} A serialized CSWGetDomain request.
-     */
-    write: function(options) {
-        var node = this.writeNode("csw:GetDomain", options);
-        return OpenLayers.Format.XML.prototype.write.apply(this, [node]);
-    },
-
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "csw": {
-            "GetDomain": function(options) {
-                var node = this.createElementNSPlus("csw:GetDomain", {
-                    attributes: {
-                        service: "CSW",
-                        version: this.version
-                    }
-                });
-                if (options.PropertyName || this.PropertyName) {
-                    this.writeNode(
-                        "csw:PropertyName",
-                        options.PropertyName || this.PropertyName,
-                        node
-                    );
-                } else if (options.ParameterName || this.ParameterName) {
-                    this.writeNode(
-                        "csw:ParameterName",
-                        options.ParameterName || this.ParameterName,
-                        node
-                    );
-                }
-                this.readChildNodes(node, options);
-                return node;
-            },
-            "PropertyName": function(value) {
-                var node = this.createElementNSPlus("csw:PropertyName", {
-                    value: value
-                });
-                return node;
-            },
-            "ParameterName": function(value) {
-                var node = this.createElementNSPlus("csw:ParameterName", {
-                    value: value
-                });
-                return node;
-            }
-        }
-    },
-   
-    CLASS_NAME: "OpenLayers.Format.CSWGetDomain.v2_0_2" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/CSWGetRecords.js
+++ /dev/null
@@ -1,35 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format.js
- */
-
-/**
- * Function: OpenLayers.Format.CSWGetRecords.
- *     Default version is 2.0.2.
- *
- * Returns:
- * {<OpenLayers.Format>} A CSWGetRecords format of the given version.
- */
-OpenLayers.Format.CSWGetRecords = function(options) {
-    options = OpenLayers.Util.applyDefaults(
-        options, OpenLayers.Format.CSWGetRecords.DEFAULTS
-    );
-    var cls = OpenLayers.Format.CSWGetRecords["v"+options.version.replace(/\./g, "_")];
-    if(!cls) {
-        throw "Unsupported CSWGetRecords version: " + options.version;
-    }
-    return new cls(options);
-};
-
-/**
- * Constant: OpenLayers.Format.CSWGetRecords.DEFAULTS
- * {Object} Default properties for the CSWGetRecords format.
- */
-OpenLayers.Format.CSWGetRecords.DEFAULTS = {
-    "version": "2.0.2"
-};
-

--- a/labs/openlayers/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js
+++ /dev/null
@@ -1,441 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Format/CSWGetRecords.js
- * @requires OpenLayers/Format/Filter/v1_0_0.js
- * @requires OpenLayers/Format/Filter/v1_1_0.js
- * @requires OpenLayers/Format/OWSCommon/v1_0_0.js
- */
-
-/**
- * Class: OpenLayers.Format.CSWGetRecords.v2_0_2
- *     A format for creating CSWGetRecords v2.0.2 transactions. 
- *     Create a new instance with the
- *     <OpenLayers.Format.CSWGetRecords.v2_0_2> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.CSWGetRecords.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        xlink: "http://www.w3.org/1999/xlink",
-        xsi: "http://www.w3.org/2001/XMLSchema-instance",
-        csw: "http://www.opengis.net/cat/csw/2.0.2",
-        dc: "http://purl.org/dc/elements/1.1/",
-        dct: "http://purl.org/dc/terms/",
-        ows: "http://www.opengis.net/ows"
-    },
-    
-    /**
-     * Property: defaultPrefix
-     * {String} The default prefix (used by Format.XML).
-     */
-    defaultPrefix: "csw",
-    
-    /**
-     * Property: version
-     * {String} CSW version number.
-     */
-    version: "2.0.2",
-    
-    /**
-     * Property: schemaLocation
-     * {String} http://www.opengis.net/cat/csw/2.0.2
-     *   http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd
-     */
-    schemaLocation: "http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd",
-
-    /**
-     * APIProperty: requestId
-     * {String} Value of the requestId attribute of the GetRecords element.
-     */
-    requestId: null,
-
-    /**
-     * APIProperty: resultType
-     * {String} Value of the resultType attribute of the GetRecords element,
-     *     specifies the result type in the GetRecords response, "hits" is
-     *     the default.
-     */
-    resultType: null,
-
-    /**
-     * APIProperty: outputFormat
-     * {String} Value of the outputFormat attribute of the GetRecords element,
-     *     specifies the format of the GetRecords response,
-     *     "application/xml" is the default.
-     */
-    outputFormat: null,
-
-    /**
-     * APIProperty: outputSchema
-     * {String} Value of the outputSchema attribute of the GetRecords element,
-     *     specifies the schema of the GetRecords response.
-     */
-    outputSchema: null,
-
-    /**
-     * APIProperty: startPosition
-     * {String} Value of the startPosition attribute of the GetRecords element,
-     *     specifies the start position (offset+1) for the GetRecords response,
-     *     1 is the default.
-     */
-    startPosition: null,
-
-    /**
-     * APIProperty: maxRecords
-     * {String} Value of the maxRecords attribute of the GetRecords element,
-     *     specifies the maximum number of records in the GetRecords response,
-     *     10 is the default.
-     */
-    maxRecords: null,
-
-    /**
-     * APIProperty: DistributedSearch
-     * {String} Value of the csw:DistributedSearch element, used when writing
-     *     a csw:GetRecords document.
-     */
-    DistributedSearch: null,
-
-    /**
-     * APIProperty: ResponseHandler
-     * {Array({String})} Values of the csw:ResponseHandler elements, used when
-     *     writting a csw:GetRecords document.
-     */
-    ResponseHandler: null,
-
-    /**
-     * APIProperty: Query
-     * {String} Value of the csw:Query element, used when writing a csw:GetRecords
-     *     document.
-     */
-    Query: null,
-
-    /**
-     * Property: regExes
-     * Compiled regular expressions for manipulating strings.
-     */
-    regExes: {
-        trimSpace: (/^\s*|\s*$/g),
-        removeSpace: (/\s*/g),
-        splitSpace: (/\s+/),
-        trimComma: (/\s*,\s*/g)
-    },
-
-    /**
-     * Constructor: OpenLayers.Format.CSWGetRecords.v2_0_2
-     * A class for parsing and generating CSWGetRecords v2.0.2 transactions.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     *
-     * Valid options properties (documented as class properties):
-     * - requestId
-     * - resultType
-     * - outputFormat
-     * - outputSchema
-     * - startPosition
-     * - maxRecords
-     * - DistributedSearch
-     * - ResponseHandler
-     * - Query
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * APIMethod: read
-     * Parse the response from a GetRecords request.
-     */
-    read: function(data) {
-        if(typeof data == "string") { 
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        if(data && data.nodeType == 9) {
-            data = data.documentElement;
-        }
-        var obj = {};
-        this.readNode(data, obj);
-        return obj;
-    },
-    
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "csw": {
-            "GetRecordsResponse": function(node, obj) {
-                obj.records = [];
-                this.readChildNodes(node, obj);
-                var version = this.getAttributeNS(node, "", 'version');
-                if (version != "") {
-                    obj.version = version;
-                }
-            },
-            "RequestId": function(node, obj) {
-                obj.RequestId = this.getChildValue(node);
-            },
-            "SearchStatus": function(node, obj) {
-                obj.SearchStatus = {};
-                var timestamp = this.getAttributeNS(node, "", 'timestamp');
-                if (timestamp != "") {
-                    obj.SearchStatus.timestamp = timestamp;
-                }
-            },
-            "SearchResults": function(node, obj) {
-                this.readChildNodes(node, obj);
-                var attrs = node.attributes;
-                var SearchResults = {};
-                for(var i=0, len=attrs.length; i<len; ++i) {
-                    if ((attrs[i].name == "numberOfRecordsMatched") ||
-                        (attrs[i].name == "numberOfRecordsReturned") ||
-                        (attrs[i].name == "nextRecord")) {
-                        SearchResults[attrs[i].name] = parseInt(attrs[i].nodeValue);
-                    } else {
-                        SearchResults[attrs[i].name] = attrs[i].nodeValue;
-                    }
-                }
-                obj.SearchResults = SearchResults;
-            },
-            "SummaryRecord": function(node, obj) {
-                var record = {type: "SummaryRecord"};
-                this.readChildNodes(node, record);
-                obj.records.push(record);
-            },
-            "BriefRecord": function(node, obj) {
-                var record = {type: "BriefRecord"};
-                this.readChildNodes(node, record);
-                obj.records.push(record);
-            },
-            "DCMIRecord": function(node, obj) {
-                var record = {type: "DCMIRecord"};
-                this.readChildNodes(node, record);
-                obj.records.push(record);
-            },
-            "Record": function(node, obj) {
-                var record = {type: "Record"};
-                this.readChildNodes(node, record);
-                obj.records.push(record);
-            }
-        },
-        "dc": {
-            // audience, contributor, coverage, creator, date, description, format,
-            // identifier, language, provenance, publisher, relation, rights,
-            // rightsHolder, source, subject, title, type, URI
-            "*": function(node, obj) {
-                var name = node.localName || node.nodeName.split(":").pop();
-                if (!(obj[name] instanceof Array)) {
-                    obj[name] = new Array();
-                }
-                var dc_element = {};
-                var attrs = node.attributes;
-                for(var i=0, len=attrs.length; i<len; ++i) {
-                    dc_element[attrs[i].name] = attrs[i].nodeValue;
-                }
-                dc_element.value = this.getChildValue(node);
-                obj[name].push(dc_element);
-            }
-        },
-        "dct": {
-            // abstract, modified, spatial
-            "*": function(node, obj) {
-                var name = node.localName || node.nodeName.split(":").pop();
-                if (!(obj[name] instanceof Array)) {
-                    obj[name] = new Array();
-                }
-                obj[name].push(this.getChildValue(node));
-            }
-        },
-        "ows": OpenLayers.Util.applyDefaults({
-            "BoundingBox": function(node, obj) {
-                if (obj.bounds) {
-                    obj.BoundingBox = [{crs: obj.projection, value: 
-                        [
-                            obj.bounds.left, 
-                            obj.bounds.bottom, 
-                            obj.bounds.right, 
-                            obj.bounds.top
-                    ]
-                    }];
-                    delete obj.projection;
-                    delete obj.bounds;
-                }
-                OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers["ows"]["BoundingBox"].apply(
-                    this, arguments);
-            }
-        }, OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers["ows"])
-    },
-    
-    /**
-     * Method: write
-     * Given an configuration js object, write a CSWGetRecords request. 
-     *
-     * Parameters:
-     * options - {Object} A object mapping the request.
-     *
-     * Returns:
-     * {String} A serialized CSWGetRecords request.
-     */
-    write: function(options) {
-        var node = this.writeNode("csw:GetRecords", options);
-        return OpenLayers.Format.XML.prototype.write.apply(this, [node]);
-    },
-
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "csw": {
-            "GetRecords": function(options) {
-                if (!options) {
-                    options = {};
-                }
-                var node = this.createElementNSPlus("csw:GetRecords", {
-                    attributes: {
-                        service: "CSW",
-                        version: this.version,
-                        requestId: options.requestId || this.requestId,
-                        resultType: options.resultType || this.resultType,
-                        outputFormat: options.outputFormat || this.outputFormat,
-                        outputSchema: options.outputSchema || this.outputSchema,
-                        startPosition: options.startPosition || this.startPosition,
-                        maxRecords: options.maxRecords || this.maxRecords
-                    }
-                });
-                if (options.DistributedSearch || this.DistributedSearch) {
-                    this.writeNode(
-                        "csw:DistributedSearch",
-                        options.DistributedSearch || this.DistributedSearch,
-                        node
-                    );
-                }
-                var ResponseHandler = options.ResponseHandler || this.ResponseHandler;
-                if (ResponseHandler instanceof Array && ResponseHandler.length > 0) {
-                    // ResponseHandler must be a non-empty array
-                    for(var i=0, len=ResponseHandler.length; i<len; i++) {
-                        this.writeNode(
-                            "csw:ResponseHandler",
-                            ResponseHandler[i],
-                            node
-                        );
-                    }
-                }
-                this.writeNode("Query", options.Query || this.Query, node);
-                return node;
-            },
-            "DistributedSearch": function(options) {
-                var node = this.createElementNSPlus("csw:DistributedSearch", {
-                    attributes: {
-                        hopCount: options.hopCount
-                    }
-                });
-                return node;
-            },
-            "ResponseHandler": function(options) {
-                var node = this.createElementNSPlus("csw:ResponseHandler", {
-                    value: options.value
-                });
-                return node;
-            },
-            "Query": function(options) {
-                if (!options) {
-                    options = {};
-                }
-                var node = this.createElementNSPlus("csw:Query", {
-                    attributes: {
-                        typeNames: options.typeNames || "csw:Record"
-                    }
-                });
-                var ElementName = options.ElementName;
-                if (ElementName instanceof Array && ElementName.length > 0) {
-                    // ElementName must be a non-empty array
-                    for(var i=0, len=ElementName.length; i<len; i++) {
-                        this.writeNode(
-                            "csw:ElementName",
-                            ElementName[i],
-                            node
-                        );
-                    }
-                } else {
-                    this.writeNode(
-                        "csw:ElementSetName",
-                        options.ElementSetName || {value: 'summary'},
-                        node
-                    );
-                }
-                if (options.Constraint) {
-                    this.writeNode(
-                        "csw:Constraint",
-                        options.Constraint,
-                        node
-                    );
-                }
-                //TODO: not implemented in ogc filters?
-                //if (options.SortBy) {
-                    //this.writeNode(
-                        //"ogc:SortBy",
-                        //options.SortBy,
-                        //node
-                    //);
-                //}
-                return node;
-            },
-            "ElementName": function(options) {
-                var node = this.createElementNSPlus("csw:ElementName", {
-                    value: options.value
-                });
-                return node;
-            },
-            "ElementSetName": function(options) {
-                var node = this.createElementNSPlus("csw:ElementSetName", {
-                    attributes: {
-                        typeNames: options.typeNames
-                    },
-                    value: options.value
-                });
-                return node;
-            },
-            "Constraint": function(options) {
-                var node = this.createElementNSPlus("csw:Constraint", {
-                    attributes: {
-                        version: options.version
-                    }
-                });
-                if (options.Filter) {
-                    var format = new OpenLayers.Format.Filter({
-                        version: options.version
-                    });
-                    node.appendChild(format.write(options.Filter));
-                } else if (options.CqlText) {
-                    var child = this.createElementNSPlus("CqlText", {
-                        value: options.CqlText.value
-                    });
-                    node.appendChild(child);
-                }
-                return node;
-            }
-        }
-    },
-   
-    CLASS_NAME: "OpenLayers.Format.CSWGetRecords.v2_0_2" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/Context.js
+++ /dev/null
@@ -1,335 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- */
-
-/**
- * Class: OpenLayers.Format.Context
- * Base class for both Format.WMC and Format.OWSContext
- */
-OpenLayers.Format.Context = OpenLayers.Class({
-
-    /**
-     * APIProperty: version
-     * {String} Specify a version string if one is known.
-     */
-    version: null,
-
-    /**
-     * Property: layerOptions
-     * {Object} Default options for layers created by the parser. These
-     *     options are overridden by the options which are read from the
-     *     capabilities document.
-     */
-    layerOptions: null,
-
-    /**
-     * Property: layerParams
-     * {Object} Default parameters for layers created by the parser. This
-     *     can be used e.g. to override DEFAULT_PARAMS for 
-     *     OpenLayers.Layer.WMS.
-     */
-    layerParams: null,
-
-    /**
-     * Property: parser
-     * {Object} Instance of the versioned parser.  Cached for multiple read and
-     *     write calls of the same version.
-     */
-    parser: null,
-
-    /**
-     * Constructor: OpenLayers.Format.Context
-     * Create a new parser for Context documents.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Util.extend(this, options);
-        this.options = options;
-    },
-
-    /**
-     * APIMethod: read
-     * Read Context data from a string, and return an object with map
-     *     properties and a list of layers.
-     *
-     * Parameters:
-     * data - {String} or {DOMElement} data to read/parse.
-     * options - {Object} The options object must contain a map property.  If
-     *     the map property is a string, it must be the id of a dom element
-     *     where the new map will be placed.  If the map property is an
-     *     <OpenLayers.Map>, the layers from the context document will be added
-     *     to the map.
-     *
-     * Returns:
-     * {<OpenLayers.Map>} A map based on the context.
-     */
-    read: function(data, options) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        var root = data.documentElement;
-        var version = this.version;
-        if(!version) {
-            version = root.getAttribute("version");
-        }
-        var parser = this.getParser(version);
-        var context = parser.read(data, options);
-        var map;
-        if(options && options.map) {
-            this.context = context;
-            if(options.map instanceof OpenLayers.Map) {
-                map = this.mergeContextToMap(context, options.map);
-            } else {
-                var mapOptions = options.map;
-                if(OpenLayers.Util.isElement(mapOptions) ||
-                   typeof mapOptions == "string") {
-                    // we assume mapOptions references a div
-                    // element
-                    mapOptions = {div: mapOptions};
-                }
-                map = this.contextToMap(context, mapOptions);
-            }
-        } else {
-            // not documented as part of the API, provided as a non-API option
-            map = context;
-        }
-        return map;
-    },
-
-    /**
-     * Method: getLayerFromContext
-     * Create a WMS layer from a layerContext object.
-     *
-     * Parameters:
-     * layerContext - {Object} An object representing a WMS layer.
-     *
-     * Returns:
-     * {<OpenLayers.Layer.WMS>} A WMS layer.
-     */
-    getLayerFromContext: function(layerContext) {
-        var i, len;
-        // fill initial options object from layerContext
-        var options = {
-            queryable: layerContext.queryable, //keep queryable for api compatibility
-            visibility: layerContext.visibility,
-            maxExtent: layerContext.maxExtent,
-            metadata: OpenLayers.Util.applyDefaults(layerContext.metadata, 
-                {styles: layerContext.styles}),
-            numZoomLevels: layerContext.numZoomLevels,
-            units: layerContext.units,
-            isBaseLayer: layerContext.isBaseLayer,
-            opacity: layerContext.opacity,
-            displayInLayerSwitcher: layerContext.displayInLayerSwitcher,
-            singleTile: layerContext.singleTile,
-            tileSize: (layerContext.tileSize) ? 
-                new OpenLayers.Size(
-                    layerContext.tileSize.width, 
-                    layerContext.tileSize.height
-                ) : undefined,
-            minScale: layerContext.minScale || layerContext.maxScaleDenominator,
-            maxScale: layerContext.maxScale || layerContext.minScaleDenominator
-        };
-        if (this.layerOptions) {
-            OpenLayers.Util.applyDefaults(options, this.layerOptions);
-        }
-
-        var params = {
-            layers: layerContext.name,
-            transparent: layerContext.transparent,
-            version: layerContext.version
-        };
-        if (layerContext.formats && layerContext.formats.length>0) {
-            // set default value for params if current attribute is not positionned
-            params.format = layerContext.formats[0].value;
-            for (i=0, len=layerContext.formats.length; i<len; i++) {
-                var format = layerContext.formats[i];
-                if (format.current == true) {
-                    params.format = format.value;
-                    break;
-                }
-            }
-        }
-        if (layerContext.styles && layerContext.styles.length>0) {
-            for (i=0, len=layerContext.styles.length; i<len; i++) {
-                var style = layerContext.styles[i];
-                if (style.current == true) {
-                    // three style types to consider
-                    // 1) linked SLD
-                    // 2) inline SLD
-                    // 3) named style
-                    if(style.href) {
-                        params.sld = style.href;
-                    } else if(style.body) {
-                        params.sld_body = style.body;
-                    } else {
-                        params.styles = style.name;
-                    }
-                    break;
-                }
-            }
-        }
-        if (this.layerParams) {
-            OpenLayers.Util.applyDefaults(params, this.layerParams);
-        }
-
-        var layer = null;
-        var service = layerContext.service;
-        if (service == OpenLayers.Format.Context.serviceTypes.WFS) {
-            options.strategies = [new OpenLayers.Strategy.BBOX()];
-            options.protocol = new OpenLayers.Protocol.WFS({
-                url: layerContext.url,
-                // since we do not know featureNS, let the protocol
-                // determine it automagically using featurePrefix
-                featurePrefix: layerContext.name.split(":")[0],
-                featureType: layerContext.name.split(":").pop()
-            });
-            layer = new OpenLayers.Layer.Vector(
-                layerContext.title || layerContext.name,
-                options
-            );
-        } else if (service == OpenLayers.Format.Context.serviceTypes.KML) {
-            // use a vector layer with an HTTP Protcol and a Fixed strategy
-            options.strategies = [new OpenLayers.Strategy.Fixed()];
-            options.protocol = new OpenLayers.Protocol.HTTP({
-                url: layerContext.url, 
-                format: new OpenLayers.Format.KML()
-            });
-            layer = new OpenLayers.Layer.Vector(
-                layerContext.title || layerContext.name,
-                options
-            );
-        } else if (service == OpenLayers.Format.Context.serviceTypes.GML) {
-            // use a vector layer with a HTTP Protocol and a Fixed strategy
-            options.strategies = [new OpenLayers.Strategy.Fixed()];
-            options.protocol = new OpenLayers.Protocol.HTTP({
-                url: layerContext.url, 
-                format: new OpenLayers.Format.GML()
-            });
-            layer = new OpenLayers.Layer.Vector(
-                layerContext.title || layerContext.name,
-                options
-            );
-        } else if (layerContext.features) {
-            // inline GML or KML features
-            layer = new OpenLayers.Layer.Vector(
-                layerContext.title || layerContext.name,
-                options
-            );
-            layer.addFeatures(layerContext.features);
-        } else if (layerContext.categoryLayer !== true) {
-            layer = new OpenLayers.Layer.WMS(
-                layerContext.title || layerContext.name,
-                layerContext.url,
-                params,
-                options
-            );
-        }
-        return layer;
-    },
-
-    /**
-     * Method: getLayersFromContext
-     * Create an array of layers from an array of layerContext objects.
-     *
-     * Parameters:
-     * layersContext - {Array(Object)} An array of objects representing layers.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Layer>)} An array of layers.
-     */
-    getLayersFromContext: function(layersContext) {
-        var layers = [];
-        for (var i=0, len=layersContext.length; i<len; i++) {
-            var layer = this.getLayerFromContext(layersContext[i]);
-            if (layer !== null) {
-                layers.push(layer);
-            }
-        }
-        return layers;
-    },
-
-    /**
-     * Method: contextToMap
-     * Create a map given a context object.
-     *
-     * Parameters:
-     * context - {Object} The context object.
-     * options - {Object} Default map options.
-     *
-     * Returns:
-     * {<OpenLayers.Map>} A map based on the context object.
-     */
-    contextToMap: function(context, options) {
-        options = OpenLayers.Util.applyDefaults({
-            maxExtent: context.maxExtent,
-            projection: context.projection
-        }, options);
-        var map = new OpenLayers.Map(options);
-        map.addLayers(this.getLayersFromContext(context.layersContext));
-        map.setCenter(
-            context.bounds.getCenterLonLat(),
-            map.getZoomForExtent(context.bounds, true)
-        );
-        return map;
-    },
-
-    /**
-     * Method: mergeContextToMap
-     * Add layers from a context object to a map.
-     *
-     * Parameters:
-     * context - {Object} The context object.
-     * map - {<OpenLayers.Map>} The map.
-     *
-     * Returns:
-     * {<OpenLayers.Map>} The same map with layers added.
-     */
-    mergeContextToMap: function(context, map) {
-        map.addLayers(this.getLayersFromContext(context.layersContext));
-        return map;
-    },
-
-    /**
-     * APIMethod: write
-     * Write a context document given a map.
-     *
-     * Parameters:
-     * obj - {<OpenLayers.Map> | Object} A map or context object.
-     * options - {Object} Optional configuration object.
-     *
-     * Returns:
-     * {String} A context document string.
-     */
-    write: function(obj, options) {
-        obj = this.toContext(obj);
-        var version = options && options.version;
-        var parser = this.getParser(version);
-        var context = parser.write(obj, options);
-        return context;
-    },
-
-    CLASS_NAME: "OpenLayers.Format.Context"
-});
-
-/**
- * Constant: OpenLayers.Format.Context.serviceTypes
- * Enumeration for service types
- */
-OpenLayers.Format.Context.serviceTypes = {
-    "WMS": "urn:ogc:serviceType:WMS",
-    "WFS": "urn:ogc:serviceType:WFS",
-    "WCS": "urn:ogc:serviceType:WCS",
-    "GML": "urn:ogc:serviceType:GML",
-    "SLD": "urn:ogc:serviceType:SLD",
-    "FES": "urn:ogc:serviceType:FES",
-    "KML": "urn:ogc:serviceType:KML"
-};
-

--- a/labs/openlayers/lib/OpenLayers/Format/Filter.js
+++ /dev/null
@@ -1,116 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Filter/FeatureId.js
- * @requires OpenLayers/Filter/Logical.js
- * @requires OpenLayers/Filter/Comparison.js
- */
-
-/**
- * Class: OpenLayers.Format.Filter
- * Read/Wite ogc:Filter. Create a new instance with the <OpenLayers.Format.Filter>
- *     constructor.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.Filter = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * APIProperty: defaultVersion
-     * {String} Version number to assume if none found.  Default is "1.0.0".
-     */
-    defaultVersion: "1.0.0",
-    
-    /**
-     * APIProperty: version
-     * {String} Specify a version string if one is known.
-     */
-    version: null,
-    
-    /**
-     * Property: parser
-     * {Object} Instance of the versioned parser.  Cached for multiple read and
-     *     write calls of the same version.
-     */
-    parser: null,
-
-    /**
-     * Constructor: OpenLayers.Format.Filter
-     * Create a new parser for Filter.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * APIMethod: write
-     * Write an ogc:Filter given a filter object.
-     *
-     * Parameters:
-     * filter - {<OpenLayers.Filter>} An filter.
-     * options - {Object} Optional configuration object.
-     *
-     * Returns:
-     * {Elment} An ogc:Filter element node.
-     */
-    write: function(filter, options) {
-        var version = (options && options.version) ||
-                      this.version || this.defaultVersion;
-        if(!this.parser || this.parser.VERSION != version) {
-            var format = OpenLayers.Format.Filter[
-                "v" + version.replace(/\./g, "_")
-            ];
-            if(!format) {
-                throw "Can't find a Filter parser for version " +
-                      version;
-            }
-            this.parser = new format(this.options);
-        }
-        return this.parser.write(filter);
-        //return OpenLayers.Format.XML.prototype.write.apply(this, [root]);
-    },
-    
-    /**
-     * APIMethod: read
-     * Read and Filter doc and return an object representing the Filter.
-     *
-     * Parameters:
-     * data - {String | DOMElement} Data to read.
-     *
-     * Returns:
-     * {<OpenLayers.Filter>} A filter object.
-     */
-    read: function(data) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        var version = this.version;
-        if(!version) {
-            version = this.defaultVersion;
-        }
-        if(!this.parser || this.parser.VERSION != version) {
-            var format = OpenLayers.Format.Filter[
-                "v" + version.replace(/\./g, "_")
-            ];
-            if(!format) {
-                throw "Can't find a Filter parser for version " +
-                      version;
-            }
-            this.parser = new format(this.options);
-        }
-        var filter = this.parser.read(data);
-        return filter;
-    },
-
-    CLASS_NAME: "OpenLayers.Format.Filter" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/Filter/v1.js
+++ /dev/null
@@ -1,427 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
-/**
- * @requires OpenLayers/Format/Filter.js
- * @requires OpenLayers/Format/XML.js
- */
 
-/**
- * Class: OpenLayers.Format.Filter.v1
- * Superclass for Filter version 1 parsers.
- *
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        ogc: "http://www.opengis.net/ogc",
-        gml: "http://www.opengis.net/gml",
-        xlink: "http://www.w3.org/1999/xlink",
-        xsi: "http://www.w3.org/2001/XMLSchema-instance"
-    },
-    
-    /**
-     * Property: defaultPrefix
-     */
-    defaultPrefix: "ogc",
-
-    /**
-     * Property: schemaLocation
-     * {String} Schema location for a particular minor version.
-     */
-    schemaLocation: null,
-    
-    /**
-     * Constructor: OpenLayers.Format.Filter.v1
-     * Instances of this class are not created directly.  Use the
-     *     <OpenLayers.Format.Filter> constructor instead.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * Method: read
-     *
-     * Parameters:
-     * data - {DOMElement} A Filter document element.
-     *
-     * Returns:
-     * {<OpenLayers.Filter>} A filter object.
-     */
-    read: function(data) {
-        var obj = {};
-        this.readers.ogc["Filter"].apply(this, [data, obj]);
-        return obj.filter;
-    },
-    
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "ogc": {
-            "Filter": function(node, parent) {
-                // Filters correspond to subclasses of OpenLayers.Filter.
-                // Since they contain information we don't persist, we
-                // create a temporary object and then pass on the filter
-                // (ogc:Filter) to the parent obj.
-                var obj = {
-                    fids: [],
-                    filters: []
-                };
-                this.readChildNodes(node, obj);
-                if(obj.fids.length > 0) {
-                    parent.filter = new OpenLayers.Filter.FeatureId({
-                        fids: obj.fids
-                    });
-                } else if(obj.filters.length > 0) {
-                    parent.filter = obj.filters[0];
-                }
-            },
-            "FeatureId": function(node, obj) {
-                var fid = node.getAttribute("fid");
-                if(fid) {
-                    obj.fids.push(fid);
-                }
-            },
-            "And": function(node, obj) {
-                var filter = new OpenLayers.Filter.Logical({
-                    type: OpenLayers.Filter.Logical.AND
-                });
-                this.readChildNodes(node, filter);
-                obj.filters.push(filter);
-            },
-            "Or": function(node, obj) {
-                var filter = new OpenLayers.Filter.Logical({
-                    type: OpenLayers.Filter.Logical.OR
-                });
-                this.readChildNodes(node, filter);
-                obj.filters.push(filter);
-            },
-            "Not": function(node, obj) {
-                var filter = new OpenLayers.Filter.Logical({
-                    type: OpenLayers.Filter.Logical.NOT
-                });
-                this.readChildNodes(node, filter);
-                obj.filters.push(filter);
-            },
-            "PropertyIsLessThan": function(node, obj) {
-                var filter = new OpenLayers.Filter.Comparison({
-                    type: OpenLayers.Filter.Comparison.LESS_THAN
-                });
-                this.readChildNodes(node, filter);
-                obj.filters.push(filter);
-            },
-            "PropertyIsGreaterThan": function(node, obj) {
-                var filter = new OpenLayers.Filter.Comparison({
-                    type: OpenLayers.Filter.Comparison.GREATER_THAN
-                });
-                this.readChildNodes(node, filter);
-                obj.filters.push(filter);
-            },
-            "PropertyIsLessThanOrEqualTo": function(node, obj) {
-                var filter = new OpenLayers.Filter.Comparison({
-                    type: OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO
-                });
-                this.readChildNodes(node, filter);
-                obj.filters.push(filter);
-            },
-            "PropertyIsGreaterThanOrEqualTo": function(node, obj) {
-                var filter = new OpenLayers.Filter.Comparison({
-                    type: OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO
-                });
-                this.readChildNodes(node, filter);
-                obj.filters.push(filter);
-            },
-            "PropertyIsBetween": function(node, obj) {
-                var filter = new OpenLayers.Filter.Comparison({
-                    type: OpenLayers.Filter.Comparison.BETWEEN
-                });
-                this.readChildNodes(node, filter);
-                obj.filters.push(filter);
-            },
-            "Literal": function(node, obj) {
-                obj.value = OpenLayers.String.numericIf(
-                    this.getChildValue(node));
-            },
-            "PropertyName": function(node, filter) {
-                filter.property = this.getChildValue(node);
-            },
-            "LowerBoundary": function(node, filter) {
-                filter.lowerBoundary = OpenLayers.String.numericIf(
-                    this.readOgcExpression(node));
-            },
-            "UpperBoundary": function(node, filter) {
-                filter.upperBoundary = OpenLayers.String.numericIf(
-                    this.readOgcExpression(node));
-            },
-            "Intersects": function(node, obj) {
-                this.readSpatial(node, obj, OpenLayers.Filter.Spatial.INTERSECTS);
-            },
-            "Within": function(node, obj) {
-                this.readSpatial(node, obj, OpenLayers.Filter.Spatial.WITHIN);
-            },
-            "Contains": function(node, obj) {
-                this.readSpatial(node, obj, OpenLayers.Filter.Spatial.CONTAINS);
-            },
-            "DWithin": function(node, obj) {
-                this.readSpatial(node, obj, OpenLayers.Filter.Spatial.DWITHIN);
-            },
-            "Distance": function(node, obj) {
-                obj.distance = parseInt(this.getChildValue(node));
-                obj.distanceUnits = node.getAttribute("units");
-            }
-        }
-    },
-    
-    /**
-     * Method: readSpatial
-     *
-     * Read a {<OpenLayers.Filter.Spatial>} filter.
-     * 
-     * Parameters:
-     * node - {DOMElement} A DOM element that contains an ogc:expression.
-     * obj - {Object} The target object.
-     * type - {String} One of the OpenLayers.Filter.Spatial.* constants.
-     *
-     * Returns:
-     * {<OpenLayers.Filter.Spatial>} The created filter.
-     */
-    readSpatial: function(node, obj, type) {
-        var filter = new OpenLayers.Filter.Spatial({
-            type: type
-        });
-        this.readChildNodes(node, filter);
-        filter.value = filter.components[0];
-        delete filter.components;
-        obj.filters.push(filter);
-    },
-
-    /**
-     * Method: readOgcExpression
-     * Limited support for OGC expressions.
-     *
-     * Parameters:
-     * node - {DOMElement} A DOM element that contains an ogc:expression.
-     *
-     * Returns:
-     * {String} A value to be used in a symbolizer.
-     */
-    readOgcExpression: function(node) {
-        var obj = {};
-        this.readChildNodes(node, obj);
-        var value = obj.value;
-        if(value === undefined) {
-            value = this.getChildValue(node);
-        }
-        return value;
-    },
-
-    /**
-     * Method: write
-     *
-     * Parameters:
-     * filter - {<OpenLayers.Filter>} A filter object.
-     *
-     * Returns:
-     * {DOMElement} An ogc:Filter element.
-     */
-    write: function(filter) {
-        return this.writers.ogc["Filter"].apply(this, [filter]);
-    },
-    
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "ogc": {
-            "Filter": function(filter) {
-                var node = this.createElementNSPlus("ogc:Filter");
-                var sub = filter.CLASS_NAME.split(".").pop();
-                if(sub == "FeatureId") {
-                    for(var i=0; i<filter.fids.length; ++i) {
-                        this.writeNode("FeatureId", filter.fids[i], node);
-                    }
-                } else {
-                    this.writeNode(this.getFilterType(filter), filter, node);
-                }
-                return node;
-            },
-            "FeatureId": function(fid) {
-                return this.createElementNSPlus("ogc:FeatureId", {
-                    attributes: {fid: fid}
-                });
-            },
-            "And": function(filter) {
-                var node = this.createElementNSPlus("ogc:And");
-                var childFilter;
-                for(var i=0; i<filter.filters.length; ++i) {
-                    childFilter = filter.filters[i];
-                    this.writeNode(
-                        this.getFilterType(childFilter), childFilter, node
-                    );
-                }
-                return node;
-            },
-            "Or": function(filter) {
-                var node = this.createElementNSPlus("ogc:Or");
-                var childFilter;
-                for(var i=0; i<filter.filters.length; ++i) {
-                    childFilter = filter.filters[i];
-                    this.writeNode(
-                        this.getFilterType(childFilter), childFilter, node
-                    );
-                }
-                return node;
-            },
-            "Not": function(filter) {
-                var node = this.createElementNSPlus("ogc:Not");
-                var childFilter = filter.filters[0];
-                this.writeNode(
-                    this.getFilterType(childFilter), childFilter, node
-                );
-                return node;
-            },
-            "PropertyIsLessThan": function(filter) {
-                var node = this.createElementNSPlus("ogc:PropertyIsLessThan");
-                // no ogc:expression handling for now
-                this.writeNode("PropertyName", filter, node);
-                this.writeNode("Literal", filter.value, node);                
-                return node;
-            },
-            "PropertyIsGreaterThan": function(filter) {
-                var node = this.createElementNSPlus("ogc:PropertyIsGreaterThan");
-                // no ogc:expression handling for now
-                this.writeNode("PropertyName", filter, node);
-                this.writeNode("Literal", filter.value, node);
-                return node;
-            },
-            "PropertyIsLessThanOrEqualTo": function(filter) {
-                var node = this.createElementNSPlus("ogc:PropertyIsLessThanOrEqualTo");
-                // no ogc:expression handling for now
-                this.writeNode("PropertyName", filter, node);
-                this.writeNode("Literal", filter.value, node);
-                return node;
-            },
-            "PropertyIsGreaterThanOrEqualTo": function(filter) {
-                var node = this.createElementNSPlus("ogc:PropertyIsGreaterThanOrEqualTo");
-                // no ogc:expression handling for now
-                this.writeNode("PropertyName", filter, node);
-                this.writeNode("Literal", filter.value, node);
-                return node;
-            },
-            "PropertyIsBetween": function(filter) {
-                var node = this.createElementNSPlus("ogc:PropertyIsBetween");
-                // no ogc:expression handling for now
-                this.writeNode("PropertyName", filter, node);
-                this.writeNode("LowerBoundary", filter, node);
-                this.writeNode("UpperBoundary", filter, node);
-                return node;
-            },
-            "PropertyName": function(filter) {
-                // no ogc:expression handling for now
-                return this.createElementNSPlus("ogc:PropertyName", {
-                    value: filter.property
-                });
-            },
-            "Literal": function(value) {
-                // no ogc:expression handling for now
-                return this.createElementNSPlus("ogc:Literal", {
-                    value: value
-                });
-            },
-            "LowerBoundary": function(filter) {
-                // no ogc:expression handling for now
-                var node = this.createElementNSPlus("ogc:LowerBoundary");
-                this.writeNode("Literal", filter.lowerBoundary, node);
-                return node;
-            },
-            "UpperBoundary": function(filter) {
-                // no ogc:expression handling for now
-                var node = this.createElementNSPlus("ogc:UpperBoundary");
-                this.writeNode("Literal", filter.upperBoundary, node);
-                return node;
-            },
-            "INTERSECTS": function(filter) {
-                return this.writeSpatial(filter, "Intersects");
-            },
-            "WITHIN": function(filter) {
-                return this.writeSpatial(filter, "Within");
-            },
-            "CONTAINS": function(filter) {
-                return this.writeSpatial(filter, "Contains");
-            },
-            "DWITHIN": function(filter) {
-                var node = this.writeSpatial(filter, "DWithin");
-                this.writeNode("Distance", filter, node);
-                return node;
-            },
-            "Distance": function(filter) {
-                return this.createElementNSPlus("ogc:Distance", {
-                    attributes: {
-                        units: filter.distanceUnits
-                    },
-                    value: filter.distance
-                });
-            }
-        }
-    },
-
-    /**
-     * Method: getFilterType
-     */
-    getFilterType: function(filter) {
-        var filterType = this.filterMap[filter.type];
-        if(!filterType) {
-            throw "Filter writing not supported for rule type: " + filter.type;
-        }
-        return filterType;
-    },
-    
-    /**
-     * Property: filterMap
-     * {Object} Contains a member for each filter type.  Values are node names
-     *     for corresponding OGC Filter child elements.
-     */
-    filterMap: {
-        "&&": "And",
-        "||": "Or",
-        "!": "Not",
-        "==": "PropertyIsEqualTo",
-        "!=": "PropertyIsNotEqualTo",
-        "<": "PropertyIsLessThan",
-        ">": "PropertyIsGreaterThan",
-        "<=": "PropertyIsLessThanOrEqualTo",
-        ">=": "PropertyIsGreaterThanOrEqualTo",
-        "..": "PropertyIsBetween",
-        "~": "PropertyIsLike",
-        "BBOX": "BBOX",
-        "DWITHIN": "DWITHIN",
-        "WITHIN": "WITHIN",
-        "CONTAINS": "CONTAINS",
-        "INTERSECTS": "INTERSECTS"
-    },
-
-    CLASS_NAME: "OpenLayers.Format.Filter.v1" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/Filter/v1_0_0.js
+++ /dev/null
@@ -1,169 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/GML/v2.js
- * @requires OpenLayers/Format/Filter/v1.js
- */
-
-/**
- * Class: OpenLayers.Format.Filter.v1_0_0
- * Write ogc:Filter version 1.0.0.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.GML.v2>
- *  - <OpenLayers.Format.Filter.v1>
- */
-OpenLayers.Format.Filter.v1_0_0 = OpenLayers.Class(
-    OpenLayers.Format.GML.v2, OpenLayers.Format.Filter.v1, {
-    
-    /**
-     * Constant: VERSION
-     * {String} 1.0.0
-     */
-    VERSION: "1.0.0",
-    
-    /**
-     * Property: schemaLocation
-     * {String} http://www.opengis.net/ogc/filter/1.0.0/filter.xsd
-     */
-    schemaLocation: "http://www.opengis.net/ogc/filter/1.0.0/filter.xsd",
-
-    /**
-     * Constructor: OpenLayers.Format.Filter.v1_0_0
-     * Instances of this class are not created directly.  Use the
-     *     <OpenLayers.Format.Filter> constructor instead.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.GML.v2.prototype.initialize.apply(
-            this, [options]
-        );
-    },
-
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "ogc": OpenLayers.Util.applyDefaults({
-            "PropertyIsEqualTo": function(node, obj) {
-                var filter = new OpenLayers.Filter.Comparison({
-                    type: OpenLayers.Filter.Comparison.EQUAL_TO
-                });
-                this.readChildNodes(node, filter);
-                obj.filters.push(filter);
-            },
-            "PropertyIsNotEqualTo": function(node, obj) {
-                var filter = new OpenLayers.Filter.Comparison({
-                    type: OpenLayers.Filter.Comparison.NOT_EQUAL_TO
-                });
-                this.readChildNodes(node, filter);
-                obj.filters.push(filter);
-            },
-            "PropertyIsLike": function(node, obj) {
-                var filter = new OpenLayers.Filter.Comparison({
-                    type: OpenLayers.Filter.Comparison.LIKE
-                });
-                this.readChildNodes(node, filter);
-                var wildCard = node.getAttribute("wildCard");
-                var singleChar = node.getAttribute("singleChar");
-                var esc = node.getAttribute("escape");
-                filter.value2regex(wildCard, singleChar, esc);
-                obj.filters.push(filter);
-            }
-        }, OpenLayers.Format.Filter.v1.prototype.readers["ogc"]),
-        "gml": OpenLayers.Format.GML.v2.prototype.readers["gml"],
-        "feature": OpenLayers.Format.GML.v2.prototype.readers["feature"]        
-    },
-
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "ogc": OpenLayers.Util.applyDefaults({
-            "PropertyIsEqualTo": function(filter) {
-                var node = this.createElementNSPlus("ogc:PropertyIsEqualTo");
-                // no ogc:expression handling for now
-                this.writeNode("PropertyName", filter, node);
-                this.writeNode("Literal", filter.value, node);
-                return node;
-            },
-            "PropertyIsNotEqualTo": function(filter) {
-                var node = this.createElementNSPlus("ogc:PropertyIsNotEqualTo");
-                // no ogc:expression handling for now
-                this.writeNode("PropertyName", filter, node);
-                this.writeNode("Literal", filter.value, node);
-                return node;
-            },
-            "PropertyIsLike": function(filter) {
-                var node = this.createElementNSPlus("ogc:PropertyIsLike", {
-                    attributes: {
-                        wildCard: "*", singleChar: ".", escape: "!"
-                    }
-                });
-                // no ogc:expression handling for now
-                this.writeNode("PropertyName", filter, node);
-                // convert regex string to ogc string
-                this.writeNode("Literal", filter.regex2value(), node);
-                return node;
-            },
-            "BBOX": function(filter) {
-                var node = this.createElementNSPlus("ogc:BBOX");
-                this.writeNode("PropertyName", filter, node);
-                var box = this.writeNode("gml:Box", filter.value, node);
-                if(filter.projection) {
-                    box.setAttribute("srsName", filter.projection);
-                }
-                return node;
-            }}, OpenLayers.Format.Filter.v1.prototype.writers["ogc"]),
-            
-        "gml": OpenLayers.Format.GML.v2.prototype.writers["gml"],
-        "feature": OpenLayers.Format.GML.v2.prototype.writers["feature"]
-        
-    },
-
-    /**
-     * Method: writeSpatial
-     *
-     * Read a {<OpenLayers.Filter.Spatial>} filter and converts it into XML.
-     *
-     * Parameters:
-     * filter - {<OpenLayers.Filter.Spatial>} The filter.
-     * name - {String} Name of the generated XML element.
-     *
-     * Returns:
-     * {DOMElement} The created XML element.
-     */
-    writeSpatial: function(filter, name) {
-        var node = this.createElementNSPlus("ogc:"+name);
-        this.writeNode("PropertyName", filter, node);
-        var child;
-        if(filter.value instanceof OpenLayers.Geometry) {
-            child = this.writeNode("feature:_geometry", filter.value).firstChild;
-        } else {
-            child = this.writeNode("gml:Box", filter.value);
-        }
-        if(filter.projection) {
-            child.setAttribute("srsName", filter.projection);
-        }
-        node.appendChild(child);
-        return node;
-    },
-
-
-    CLASS_NAME: "OpenLayers.Format.Filter.v1_0_0" 
-
-});

--- a/labs/openlayers/lib/OpenLayers/Format/Filter/v1_1_0.js
+++ /dev/null
@@ -1,182 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/Filter/v1.js
- * @requires OpenLayers/Format/GML/v3.js
- */
-
-/**
- * Class: OpenLayers.Format.Filter.v1_1_0
- * Write ogc:Filter version 1.1.0.
- *
- * Differences from the v1.0.0 parser:
- *  - uses GML v3 instead of GML v2
- *  - reads matchCase attribute on ogc:PropertyIsEqual and
- *        ogc:PropertyIsNotEqualelements.
- *  - writes matchCase attribute from comparison filters of type EQUAL_TO and
- *        type NOT_EQUAL_TO.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.Filter.v1>
- */
-OpenLayers.Format.Filter.v1_1_0 = OpenLayers.Class(
-    OpenLayers.Format.GML.v3, OpenLayers.Format.Filter.v1, {
-    
-    /**
-     * Constant: VERSION
-     * {String} 1.1.0
-     */
-    VERSION: "1.1.0",
-    
-    /**
-     * Property: schemaLocation
-     * {String} http://www.opengis.net/ogc/filter/1.1.0/filter.xsd
-     */
-    schemaLocation: "http://www.opengis.net/ogc/filter/1.1.0/filter.xsd",
-
-    /**
-     * Constructor: OpenLayers.Format.Filter.v1_1_0
-     * Instances of this class are not created directly.  Use the
-     *     <OpenLayers.Format.Filter> constructor instead.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.GML.v3.prototype.initialize.apply(
-            this, [options]
-        );
-    },
-
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "ogc": OpenLayers.Util.applyDefaults({
-            "PropertyIsEqualTo": function(node, obj) {
-                var matchCase = node.getAttribute("matchCase");
-                var filter = new OpenLayers.Filter.Comparison({
-                    type: OpenLayers.Filter.Comparison.EQUAL_TO,
-                    matchCase: !(matchCase === "false" || matchCase === "0")
-                });
-                this.readChildNodes(node, filter);
-                obj.filters.push(filter);
-            },
-            "PropertyIsNotEqualTo": function(node, obj) {
-                var matchCase = node.getAttribute("matchCase");
-                var filter = new OpenLayers.Filter.Comparison({
-                    type: OpenLayers.Filter.Comparison.NOT_EQUAL_TO,
-                    matchCase: !(matchCase === "false" || matchCase === "0")
-                });
-                this.readChildNodes(node, filter);
-                obj.filters.push(filter);
-            },
-            "PropertyIsLike": function(node, obj) {
-                var filter = new OpenLayers.Filter.Comparison({
-                    type: OpenLayers.Filter.Comparison.LIKE
-                });
-                this.readChildNodes(node, filter);
-                var wildCard = node.getAttribute("wildCard");
-                var singleChar = node.getAttribute("singleChar");
-                var esc = node.getAttribute("escapeChar");
-                filter.value2regex(wildCard, singleChar, esc);
-                obj.filters.push(filter);
-            }
-        }, OpenLayers.Format.Filter.v1.prototype.readers["ogc"]),
-        "gml": OpenLayers.Format.GML.v3.prototype.readers["gml"],
-        "feature": OpenLayers.Format.GML.v3.prototype.readers["feature"]        
-    },
-
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "ogc": OpenLayers.Util.applyDefaults({
-            "PropertyIsEqualTo": function(filter) {
-                var node = this.createElementNSPlus("ogc:PropertyIsEqualTo", {
-                    attributes: {matchCase: filter.matchCase}
-                });
-                // no ogc:expression handling for now
-                this.writeNode("PropertyName", filter, node);
-                this.writeNode("Literal", filter.value, node);
-                return node;
-            },
-            "PropertyIsNotEqualTo": function(filter) {
-                var node = this.createElementNSPlus("ogc:PropertyIsNotEqualTo", {
-                    attributes: {matchCase: filter.matchCase}
-                });
-                // no ogc:expression handling for now
-                this.writeNode("PropertyName", filter, node);
-                this.writeNode("Literal", filter.value, node);
-                return node;
-            },
-            "PropertyIsLike": function(filter) {
-                var node = this.createElementNSPlus("ogc:PropertyIsLike", {
-                    attributes: {
-                        wildCard: "*", singleChar: ".", escapeChar: "!"
-                    }
-                });
-                // no ogc:expression handling for now
-                this.writeNode("PropertyName", filter, node);
-                // convert regex string to ogc string
-                this.writeNode("Literal", filter.regex2value(), node);
-                return node;
-            },
-            "BBOX": function(filter) {
-                var node = this.createElementNSPlus("ogc:BBOX");
-                this.writeNode("PropertyName", filter, node);
-                var box = this.writeNode("gml:Envelope", filter.value);
-                if(filter.projection) {
-                    box.setAttribute("srsName", filter.projection);
-                }
-                node.appendChild(box); 
-                return node;
-            }}, OpenLayers.Format.Filter.v1.prototype.writers["ogc"]),
-            
-        "gml": OpenLayers.Format.GML.v3.prototype.writers["gml"],
-        "feature": OpenLayers.Format.GML.v3.prototype.writers["feature"]
-    },
-
-    /**
-     * Method: writeSpatial
-     *
-     * Read a {<OpenLayers.Filter.Spatial>} filter and converts it into XML.
-     *
-     * Parameters:
-     * filter - {<OpenLayers.Filter.Spatial>} The filter.
-     * name - {String} Name of the generated XML element.
-     *
-     * Returns:
-     * {DOMElement} The created XML element.
-     */
-    writeSpatial: function(filter, name) {
-        var node = this.createElementNSPlus("ogc:"+name);
-        this.writeNode("PropertyName", filter, node);
-        var child;
-        if(filter.value instanceof OpenLayers.Geometry) {
-            child = this.writeNode("feature:_geometry", filter.value).firstChild;
-        } else {
-            child = this.writeNode("gml:Envelope", filter.value);
-        }
-        if(filter.projection) {
-            child.setAttribute("srsName", filter.projection);
-        }
-        node.appendChild(child);
-        return node;
-    },
-
-    CLASS_NAME: "OpenLayers.Format.Filter.v1_1_0" 
-
-});

--- a/labs/openlayers/lib/OpenLayers/Format/GML.js
+++ /dev/null
@@ -1,925 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Feature/Vector.js
- * @requires OpenLayers/Geometry/Point.js
- * @requires OpenLayers/Geometry/MultiPoint.js
- * @requires OpenLayers/Geometry/LineString.js
- * @requires OpenLayers/Geometry/MultiLineString.js
- * @requires OpenLayers/Geometry/Polygon.js
- * @requires OpenLayers/Geometry/MultiPolygon.js
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Format.GML
- * Read/Wite GML. Create a new instance with the <OpenLayers.Format.GML>
- *     constructor.  Supports the GML simple features profile.
- * 
- * Inherits from:
- *  - <OpenLayers.Format>
- */
-OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /*
-     * APIProperty: featureNS
-     * {String} Namespace used for feature attributes.  Default is
-     *     "http://mapserver.gis.umn.edu/mapserver".
-     */
-    featureNS: "http://mapserver.gis.umn.edu/mapserver",
-    
-    /**
-     * APIProperty: featurePrefix
-     * {String} Namespace alias (or prefix) for feature nodes.  Default is
-     *     "feature".
-     */
-    featurePrefix: "feature",
-    
-    /*
-     * APIProperty: featureName
-     * {String} Element name for features. Default is "featureMember".
-     */
-    featureName: "featureMember", 
-    
-    /*
-     * APIProperty: layerName
-     * {String} Name of data layer. Default is "features".
-     */
-    layerName: "features",
-    
-    /**
-     * APIProperty: geometryName
-     * {String} Name of geometry element.  Defaults to "geometry".
-     */
-    geometryName: "geometry",
-    
-    /** 
-     * APIProperty: collectionName
-     * {String} Name of featureCollection element.
-     */
-    collectionName: "FeatureCollection",
-    
-    /**
-     * APIProperty: gmlns
-     * {String} GML Namespace.
-     */
-    gmlns: "http://www.opengis.net/gml",
-
-    /**
-     * APIProperty: extractAttributes
-     * {Boolean} Extract attributes from GML.
-     */
-    extractAttributes: true,
-    
-    /**
-     * APIProperty: xy
-     * {Boolean} Order of the GML coordinate true:(x,y) or false:(y,x)
-     * Changing is not recommended, a new Format should be instantiated.
-     */ 
-    xy: true,
-    
-    /**
-     * Constructor: OpenLayers.Format.GML
-     * Create a new parser for GML.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        // compile regular expressions once instead of every time they are used
-        this.regExes = {
-            trimSpace: (/^\s*|\s*$/g),
-            removeSpace: (/\s*/g),
-            splitSpace: (/\s+/),
-            trimComma: (/\s*,\s*/g)
-        };
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * APIMethod: read
-     * Read data from a string, and return a list of features. 
-     * 
-     * Parameters:
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Feature.Vector>)} An array of features.
-     */
-    read: function(data) {
-        if(typeof data == "string") { 
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        var featureNodes = this.getElementsByTagNameNS(data.documentElement,
-                                                       this.gmlns,
-                                                       this.featureName);
-        var features = [];
-        for(var i=0; i<featureNodes.length; i++) {
-            var feature = this.parseFeature(featureNodes[i]);
-            if(feature) {
-                features.push(feature);
-            }
-        }
-        return features;
-    },
-    
-    /**
-     * Method: parseFeature
-     * This function is the core of the GML parsing code in OpenLayers.
-     *    It creates the geometries that are then attached to the returned
-     *    feature, and calls parseAttributes() to get attribute data out.
-     *    
-     * Parameters:
-     * node - {DOMElement} A GML feature node. 
-     */
-    parseFeature: function(node) {
-        // only accept one geometry per feature - look for highest "order"
-        var order = ["MultiPolygon", "Polygon",
-                     "MultiLineString", "LineString",
-                     "MultiPoint", "Point", "Envelope"];
-        // FIXME: In case we parse a feature with no geometry, but boundedBy an Envelope,
-        // this code creates a geometry derived from the Envelope. This is not correct.
-        var type, nodeList, geometry, parser;
-        for(var i=0; i<order.length; ++i) {
-            type = order[i];
-            nodeList = this.getElementsByTagNameNS(node, this.gmlns, type);
-            if(nodeList.length > 0) {
-                // only deal with first geometry of this type
-                parser = this.parseGeometry[type.toLowerCase()];
-                if(parser) {
-                    geometry = parser.apply(this, [nodeList[0]]);
-                    if (this.internalProjection && this.externalProjection) {
-                        geometry.transform(this.externalProjection, 
-                                           this.internalProjection); 
-                    }                       
-                } else {
-                    OpenLayers.Console.error(OpenLayers.i18n(
-                                "unsupportedGeometryType", {'geomType':type}));
-                }
-                // stop looking for different geometry types
-                break;
-            }
-        }
-
-        var bounds;
-        var boxNodes = this.getElementsByTagNameNS(node, this.gmlns, "Box");
-        for(i=0; i<boxNodes.length; ++i) {
-            var boxNode = boxNodes[i];
-            var box = this.parseGeometry["box"].apply(this, [boxNode]);
-            var parentNode = boxNode.parentNode;
-            var parentName = parentNode.localName ||
-                             parentNode.nodeName.split(":").pop();
-            if(parentName === "boundedBy") {
-                bounds = box;
-            } else {
-                geometry = box.toGeometry();
-            }
-        }
-        
-        // construct feature (optionally with attributes)
-        var attributes;
-        if(this.extractAttributes) {
-            attributes = this.parseAttributes(node);
-        }
-        var feature = new OpenLayers.Feature.Vector(geometry, attributes);
-        feature.bounds = bounds;
-        
-        feature.gml = {
-            featureType: node.firstChild.nodeName.split(":")[1],
-            featureNS: node.firstChild.namespaceURI,
-            featureNSPrefix: node.firstChild.prefix
-        };
-                
-        // assign fid - this can come from a "fid" or "id" attribute
-        var childNode = node.firstChild;
-        var fid;
-        while(childNode) {
-            if(childNode.nodeType == 1) {
-                fid = childNode.getAttribute("fid") ||
-                      childNode.getAttribute("id");
-                if(fid) {
-                    break;
-                }
-            }
-            childNode = childNode.nextSibling;
-        }
-        feature.fid = fid;
-        return feature;
-    },
-    
-    /**
-     * Property: parseGeometry
-     * Properties of this object are the functions that parse geometries based
-     *     on their type.
-     */
-    parseGeometry: {
-        
-        /**
-         * Method: parseGeometry.point
-         * Given a GML node representing a point geometry, create an OpenLayers
-         *     point geometry.
-         *
-         * Parameters:
-         * node - {DOMElement} A GML node.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry.Point>} A point geometry.
-         */
-        point: function(node) {
-            /**
-             * Three coordinate variations to consider:
-             * 1) <gml:pos>x y z</gml:pos>
-             * 2) <gml:coordinates>x, y, z</gml:coordinates>
-             * 3) <gml:coord><gml:X>x</gml:X><gml:Y>y</gml:Y></gml:coord>
-             */
-            var nodeList, coordString;
-            var coords = [];
-
-            // look for <gml:pos>
-            var nodeList = this.getElementsByTagNameNS(node, this.gmlns, "pos");
-            if(nodeList.length > 0) {
-                coordString = nodeList[0].firstChild.nodeValue;
-                coordString = coordString.replace(this.regExes.trimSpace, "");
-                coords = coordString.split(this.regExes.splitSpace);
-            }
-
-            // look for <gml:coordinates>
-            if(coords.length == 0) {
-                nodeList = this.getElementsByTagNameNS(node, this.gmlns,
-                                                       "coordinates");
-                if(nodeList.length > 0) {
-                    coordString = nodeList[0].firstChild.nodeValue;
-                    coordString = coordString.replace(this.regExes.removeSpace,
-                                                      "");
-                    coords = coordString.split(",");
-                }
-            }
-
-            // look for <gml:coord>
-            if(coords.length == 0) {
-                nodeList = this.getElementsByTagNameNS(node, this.gmlns,
-                                                       "coord");
-                if(nodeList.length > 0) {
-                    var xList = this.getElementsByTagNameNS(nodeList[0],
-                                                            this.gmlns, "X");
-                    var yList = this.getElementsByTagNameNS(nodeList[0],
-                                                            this.gmlns, "Y");
-                    if(xList.length > 0 && yList.length > 0) {
-                        coords = [xList[0].firstChild.nodeValue,
-                                  yList[0].firstChild.nodeValue];
-                    }
-                }
-            }
-                
-            // preserve third dimension
-            if(coords.length == 2) {
-                coords[2] = null;
-            }
-            
-            if (this.xy) {
-                return new OpenLayers.Geometry.Point(coords[0], coords[1],
-                                                 coords[2]);
-            }
-            else{
-                return new OpenLayers.Geometry.Point(coords[1], coords[0],
-                                                 coords[2]);
-            }
-        },
-        
-        /**
-         * Method: parseGeometry.multipoint
-         * Given a GML node representing a multipoint geometry, create an
-         *     OpenLayers multipoint geometry.
-         *
-         * Parameters:
-         * node - {DOMElement} A GML node.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry.MultiPoint>} A multipoint geometry.
-         */
-        multipoint: function(node) {
-            var nodeList = this.getElementsByTagNameNS(node, this.gmlns,
-                                                       "Point");
-            var components = [];
-            if(nodeList.length > 0) {
-                var point;
-                for(var i=0; i<nodeList.length; ++i) {
-                    point = this.parseGeometry.point.apply(this, [nodeList[i]]);
-                    if(point) {
-                        components.push(point);
-                    }
-                }
-            }
-            return new OpenLayers.Geometry.MultiPoint(components);
-        },
-        
-        /**
-         * Method: parseGeometry.linestring
-         * Given a GML node representing a linestring geometry, create an
-         *     OpenLayers linestring geometry.
-         *
-         * Parameters:
-         * node - {DOMElement} A GML node.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry.LineString>} A linestring geometry.
-         */
-        linestring: function(node, ring) {
-            /**
-             * Two coordinate variations to consider:
-             * 1) <gml:posList dimension="d">x0 y0 z0 x1 y1 z1</gml:posList>
-             * 2) <gml:coordinates>x0, y0, z0 x1, y1, z1</gml:coordinates>
-             */
-            var nodeList, coordString;
-            var coords = [];
-            var points = [];
-
-            // look for <gml:posList>
-            nodeList = this.getElementsByTagNameNS(node, this.gmlns, "posList");
-            if(nodeList.length > 0) {
-                coordString = this.getChildValue(nodeList[0]);
-                coordString = coordString.replace(this.regExes.trimSpace, "");
-                coords = coordString.split(this.regExes.splitSpace);
-                var dim = parseInt(nodeList[0].getAttribute("dimension"));
-                var j, x, y, z;
-                for(var i=0; i<coords.length/dim; ++i) {
-                    j = i * dim;
-                    x = coords[j];
-                    y = coords[j+1];
-                    z = (dim == 2) ? null : coords[j+2];
-                    if (this.xy) {
-                        points.push(new OpenLayers.Geometry.Point(x, y, z));
-                    } else {
-                        points.push(new OpenLayers.Geometry.Point(y, x, z));
-                    }
-                }
-            }
-
-            // look for <gml:coordinates>
-            if(coords.length == 0) {
-                nodeList = this.getElementsByTagNameNS(node, this.gmlns,
-                                                       "coordinates");
-                if(nodeList.length > 0) {
-                    coordString = this.getChildValue(nodeList[0]);
-                    coordString = coordString.replace(this.regExes.trimSpace,
-                                                      "");
-                    coordString = coordString.replace(this.regExes.trimComma,
-                                                      ",");
-                    var pointList = coordString.split(this.regExes.splitSpace);
-                    for(var i=0; i<pointList.length; ++i) {
-                        coords = pointList[i].split(",");
-                        if(coords.length == 2) {
-                            coords[2] = null;
-                        }
-                        if (this.xy) {
-                            points.push(new OpenLayers.Geometry.Point(coords[0],
-                                                                  coords[1],
-                                                                  coords[2]));
-                        } else {
-                            points.push(new OpenLayers.Geometry.Point(coords[1],
-                                                                  coords[0],
-                                                                  coords[2]));
-                        }
-                    }
-                }
-            }
-
-            var line = null;
-            if(points.length != 0) {
-                if(ring) {
-                    line = new OpenLayers.Geometry.LinearRing(points);
-                } else {
-                    line = new OpenLayers.Geometry.LineString(points);
-                }
-            }
-            return line;
-        },
-        
-        /**
-         * Method: parseGeometry.multilinestring
-         * Given a GML node representing a multilinestring geometry, create an
-         *     OpenLayers multilinestring geometry.
-         *
-         * Parameters:
-         * node - {DOMElement} A GML node.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry.MultiLineString>} A multilinestring geometry.
-         */
-        multilinestring: function(node) {
-            var nodeList = this.getElementsByTagNameNS(node, this.gmlns,
-                                                       "LineString");
-            var components = [];
-            if(nodeList.length > 0) {
-                var line;
-                for(var i=0; i<nodeList.length; ++i) {
-                    line = this.parseGeometry.linestring.apply(this,
-                                                               [nodeList[i]]);
-                    if(line) {
-                        components.push(line);
-                    }
-                }
-            }
-            return new OpenLayers.Geometry.MultiLineString(components);
-        },
-        
-        /**
-         * Method: parseGeometry.polygon
-         * Given a GML node representing a polygon geometry, create an
-         *     OpenLayers polygon geometry.
-         *
-         * Parameters:
-         * node - {DOMElement} A GML node.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry.Polygon>} A polygon geometry.
-         */
-        polygon: function(node) {
-            var nodeList = this.getElementsByTagNameNS(node, this.gmlns,
-                                                       "LinearRing");
-            var components = [];
-            if(nodeList.length > 0) {
-                // this assumes exterior ring first, inner rings after
-                var ring;
-                for(var i=0; i<nodeList.length; ++i) {
-                    ring = this.parseGeometry.linestring.apply(this,
-                                                        [nodeList[i], true]);
-                    if(ring) {
-                        components.push(ring);
-                    }
-                }
-            }
-            return new OpenLayers.Geometry.Polygon(components);
-        },
-        
-        /**
-         * Method: parseGeometry.multipolygon
-         * Given a GML node representing a multipolygon geometry, create an
-         *     OpenLayers multipolygon geometry.
-         *
-         * Parameters:
-         * node - {DOMElement} A GML node.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry.MultiPolygon>} A multipolygon geometry.
-         */
-        multipolygon: function(node) {
-            var nodeList = this.getElementsByTagNameNS(node, this.gmlns,
-                                                       "Polygon");
-            var components = [];
-            if(nodeList.length > 0) {
-                var polygon;
-                for(var i=0; i<nodeList.length; ++i) {
-                    polygon = this.parseGeometry.polygon.apply(this,
-                                                               [nodeList[i]]);
-                    if(polygon) {
-                        components.push(polygon);
-                    }
-                }
-            }
-            return new OpenLayers.Geometry.MultiPolygon(components);
-        },
-        
-        envelope: function(node) {
-            var components = [];
-            var coordString;
-            var envelope;
-            
-            var lpoint = this.getElementsByTagNameNS(node, this.gmlns, "lowerCorner");
-            if (lpoint.length > 0) {
-                var coords = [];
-                
-                if(lpoint.length > 0) {
-                    coordString = lpoint[0].firstChild.nodeValue;
-                    coordString = coordString.replace(this.regExes.trimSpace, "");
-                    coords = coordString.split(this.regExes.splitSpace);
-                }
-                
-                if(coords.length == 2) {
-                    coords[2] = null;
-                }
-                if (this.xy) {
-                    var lowerPoint = new OpenLayers.Geometry.Point(coords[0], coords[1],coords[2]);
-                } else {
-                    var lowerPoint = new OpenLayers.Geometry.Point(coords[1], coords[0],coords[2]);
-                }
-            }
-            
-            var upoint = this.getElementsByTagNameNS(node, this.gmlns, "upperCorner");
-            if (upoint.length > 0) {
-                var coords = [];
-                
-                if(upoint.length > 0) {
-                    coordString = upoint[0].firstChild.nodeValue;
-                    coordString = coordString.replace(this.regExes.trimSpace, "");
-                    coords = coordString.split(this.regExes.splitSpace);
-                }
-                
-                if(coords.length == 2) {
-                    coords[2] = null;
-                }
-                if (this.xy) {
-                    var upperPoint = new OpenLayers.Geometry.Point(coords[0], coords[1],coords[2]);
-                } else {
-                    var upperPoint = new OpenLayers.Geometry.Point(coords[1], coords[0],coords[2]);
-                }
-            }
-            
-            if (lowerPoint && upperPoint) {
-                components.push(new OpenLayers.Geometry.Point(lowerPoint.x, lowerPoint.y));
-                components.push(new OpenLayers.Geometry.Point(upperPoint.x, lowerPoint.y));
-                components.push(new OpenLayers.Geometry.Point(upperPoint.x, upperPoint.y));
-                components.push(new OpenLayers.Geometry.Point(lowerPoint.x, upperPoint.y));
-                components.push(new OpenLayers.Geometry.Point(lowerPoint.x, lowerPoint.y));
-                
-                var ring = new OpenLayers.Geometry.LinearRing(components);
-                envelope = new OpenLayers.Geometry.Polygon([ring]);
-            }
-            return envelope; 
-        },
-
-        /**
-         * Method: parseGeometry.box
-         * Given a GML node representing a box geometry, create an
-         *     OpenLayers.Bounds.
-         *
-         * Parameters:
-         * node - {DOMElement} A GML node.
-         *
-         * Returns:
-         * {<OpenLayers.Bounds>} A bounds representing the box.
-         */
-        box: function(node) {
-            var nodeList = this.getElementsByTagNameNS(node, this.gmlns,
-                                                   "coordinates");
-            var coordString;
-            var coords, beginPoint = null, endPoint = null;
-            if (nodeList.length > 0) {
-                coordString = nodeList[0].firstChild.nodeValue;
-                coords = coordString.split(" ");
-                if (coords.length == 2) {
-                    beginPoint = coords[0].split(",");
-                    endPoint = coords[1].split(",");
-                }
-            }
-            if (beginPoint !== null && endPoint !== null) {
-                return new OpenLayers.Bounds(parseFloat(beginPoint[0]),
-                    parseFloat(beginPoint[1]),
-                    parseFloat(endPoint[0]),
-                    parseFloat(endPoint[1]) );
-            }
-        }
-        
-    },
-    
-    /**
-     * Method: parseAttributes
-     *
-     * Parameters:
-     * node - {<DOMElement>}
-     *
-     * Returns:
-     * {Object} An attributes object.
-     */
-    parseAttributes: function(node) {
-        var attributes = {};
-        // assume attributes are children of the first type 1 child
-        var childNode = node.firstChild;
-        var children, i, child, grandchildren, grandchild, name, value;
-        while(childNode) {
-            if(childNode.nodeType == 1) {
-                // attributes are type 1 children with one type 3 child
-                children = childNode.childNodes;
-                for(i=0; i<children.length; ++i) {
-                    child = children[i];
-                    if(child.nodeType == 1) {
-                        grandchildren = child.childNodes;
-                        if(grandchildren.length == 1) {
-                            grandchild = grandchildren[0];
-                            if(grandchild.nodeType == 3 ||
-                               grandchild.nodeType == 4) {
-                                name = (child.prefix) ?
-                                        child.nodeName.split(":")[1] :
-                                        child.nodeName;
-                                value = grandchild.nodeValue.replace(
-                                                this.regExes.trimSpace, "");
-                                attributes[name] = value;
-                            }
-                        } else {
-                            // If child has no childNodes (grandchildren),
-                            // set an attribute with null value.
-                            // e.g. <prefix:fieldname/> becomes
-                            // {fieldname: null}
-                            attributes[child.nodeName.split(":").pop()] = null;
-                        }
-                    }
-                }
-                break;
-            }
-            childNode = childNode.nextSibling;
-        }
-        return attributes;
-    },
-    
-    /**
-     * APIMethod: write
-     * Generate a GML document string given a list of features. 
-     * 
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>)} List of features to
-     *     serialize into a string.
-     *
-     * Returns:
-     * {String} A string representing the GML document.
-     */
-    write: function(features) {
-        if(!(features instanceof Array)) {
-            features = [features];
-        }
-        var gml = this.createElementNS("http://www.opengis.net/wfs",
-                                       "wfs:" + this.collectionName);
-        for(var i=0; i<features.length; i++) {
-            gml.appendChild(this.createFeatureXML(features[i]));
-        }
-        return OpenLayers.Format.XML.prototype.write.apply(this, [gml]);
-    },
-
-    /** 
-     * Method: createFeatureXML
-     * Accept an OpenLayers.Feature.Vector, and build a GML node for it.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} The feature to be built as GML.
-     *
-     * Returns:
-     * {DOMElement} A node reprensting the feature in GML.
-     */
-    createFeatureXML: function(feature) {
-        var geometry = feature.geometry;
-        var geometryNode = this.buildGeometryNode(geometry);
-        var geomContainer = this.createElementNS(this.featureNS,
-                                                 this.featurePrefix + ":" +
-                                                 this.geometryName);
-        geomContainer.appendChild(geometryNode);
-        var featureNode = this.createElementNS(this.gmlns,
-                                               "gml:" + this.featureName);
-        var featureContainer = this.createElementNS(this.featureNS,
-                                                    this.featurePrefix + ":" +
-                                                    this.layerName);
-        var fid = feature.fid || feature.id;
-        featureContainer.setAttribute("fid", fid);
-        featureContainer.appendChild(geomContainer);
-        for(var attr in feature.attributes) {
-            var attrText = this.createTextNode(feature.attributes[attr]); 
-            var nodename = attr.substring(attr.lastIndexOf(":") + 1);
-            var attrContainer = this.createElementNS(this.featureNS,
-                                                     this.featurePrefix + ":" +
-                                                     nodename);
-            attrContainer.appendChild(attrText);
-            featureContainer.appendChild(attrContainer);
-        }    
-        featureNode.appendChild(featureContainer);
-        return featureNode;
-    },
-    
-    /**
-     * APIMethod: buildGeometryNode
-     */
-    buildGeometryNode: function(geometry) {
-        if (this.externalProjection && this.internalProjection) {
-            geometry = geometry.clone();
-            geometry.transform(this.internalProjection, 
-                               this.externalProjection);
-        }    
-        var className = geometry.CLASS_NAME;
-        var type = className.substring(className.lastIndexOf(".") + 1);
-        var builder = this.buildGeometry[type.toLowerCase()];
-        return builder.apply(this, [geometry]);
-    },
-
-    /**
-     * Property: buildGeometry
-     * Object containing methods to do the actual geometry node building
-     *     based on geometry type.
-     */
-    buildGeometry: {
-        // TBD retrieve the srs from layer
-        // srsName is non-standard, so not including it until it's right.
-        // gml.setAttribute("srsName",
-        //                  "http://www.opengis.net/gml/srs/epsg.xml#4326");
-
-        /**
-         * Method: buildGeometry.point
-         * Given an OpenLayers point geometry, create a GML point.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry.Point>} A point geometry.
-         *
-         * Returns:
-         * {DOMElement} A GML point node.
-         */
-        point: function(geometry) {
-            var gml = this.createElementNS(this.gmlns, "gml:Point");
-            gml.appendChild(this.buildCoordinatesNode(geometry));
-            return gml;
-        },
-        
-        /**
-         * Method: buildGeometry.multipoint
-         * Given an OpenLayers multipoint geometry, create a GML multipoint.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry.MultiPoint>} A multipoint geometry.
-         *
-         * Returns:
-         * {DOMElement} A GML multipoint node.
-         */
-        multipoint: function(geometry) {
-            var gml = this.createElementNS(this.gmlns, "gml:MultiPoint");
-            var points = geometry.components;
-            var pointMember, pointGeom;
-            for(var i=0; i<points.length; i++) { 
-                pointMember = this.createElementNS(this.gmlns,
-                                                   "gml:pointMember");
-                pointGeom = this.buildGeometry.point.apply(this,
-                                                               [points[i]]);
-                pointMember.appendChild(pointGeom);
-                gml.appendChild(pointMember);
-            }
-            return gml;            
-        },
-        
-        /**
-         * Method: buildGeometry.linestring
-         * Given an OpenLayers linestring geometry, create a GML linestring.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry.LineString>} A linestring geometry.
-         *
-         * Returns:
-         * {DOMElement} A GML linestring node.
-         */
-        linestring: function(geometry) {
-            var gml = this.createElementNS(this.gmlns, "gml:LineString");
-            gml.appendChild(this.buildCoordinatesNode(geometry));
-            return gml;
-        },
-        
-        /**
-         * Method: buildGeometry.multilinestring
-         * Given an OpenLayers multilinestring geometry, create a GML
-         *     multilinestring.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry.MultiLineString>} A multilinestring
-         *     geometry.
-         *
-         * Returns:
-         * {DOMElement} A GML multilinestring node.
-         */
-        multilinestring: function(geometry) {
-            var gml = this.createElementNS(this.gmlns, "gml:MultiLineString");
-            var lines = geometry.components;
-            var lineMember, lineGeom;
-            for(var i=0; i<lines.length; ++i) {
-                lineMember = this.createElementNS(this.gmlns,
-                                                  "gml:lineStringMember");
-                lineGeom = this.buildGeometry.linestring.apply(this,
-                                                                   [lines[i]]);
-                lineMember.appendChild(lineGeom);
-                gml.appendChild(lineMember);
-            }
-            return gml;
-        },
-        
-        /**
-         * Method: buildGeometry.linearring
-         * Given an OpenLayers linearring geometry, create a GML linearring.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry.LinearRing>} A linearring geometry.
-         *
-         * Returns:
-         * {DOMElement} A GML linearring node.
-         */
-        linearring: function(geometry) {
-            var gml = this.createElementNS(this.gmlns, "gml:LinearRing");
-            gml.appendChild(this.buildCoordinatesNode(geometry));
-            return gml;
-        },
-        
-        /**
-         * Method: buildGeometry.polygon
-         * Given an OpenLayers polygon geometry, create a GML polygon.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry.Polygon>} A polygon geometry.
-         *
-         * Returns:
-         * {DOMElement} A GML polygon node.
-         */
-        polygon: function(geometry) {
-            var gml = this.createElementNS(this.gmlns, "gml:Polygon");
-            var rings = geometry.components;
-            var ringMember, ringGeom, type;
-            for(var i=0; i<rings.length; ++i) {
-                type = (i==0) ? "outerBoundaryIs" : "innerBoundaryIs";
-                ringMember = this.createElementNS(this.gmlns,
-                                                  "gml:" + type);
-                ringGeom = this.buildGeometry.linearring.apply(this,
-                                                                   [rings[i]]);
-                ringMember.appendChild(ringGeom);
-                gml.appendChild(ringMember);
-            }
-            return gml;
-        },
-        
-        /**
-         * Method: buildGeometry.multipolygon
-         * Given an OpenLayers multipolygon geometry, create a GML multipolygon.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry.MultiPolygon>} A multipolygon
-         *     geometry.
-         *
-         * Returns:
-         * {DOMElement} A GML multipolygon node.
-         */
-        multipolygon: function(geometry) {
-            var gml = this.createElementNS(this.gmlns, "gml:MultiPolygon");
-            var polys = geometry.components;
-            var polyMember, polyGeom;
-            for(var i=0; i<polys.length; ++i) {
-                polyMember = this.createElementNS(this.gmlns,
-                                                  "gml:polygonMember");
-                polyGeom = this.buildGeometry.polygon.apply(this,
-                                                                [polys[i]]);
-                polyMember.appendChild(polyGeom);
-                gml.appendChild(polyMember);
-            }
-            return gml;
-
-        },
- 
-        /**
-         * Method: buildGeometry.bounds
-         * Given an OpenLayers bounds, create a GML box.
-         *
-         * Parameters:
-         * bounds - {<OpenLayers.Geometry.Bounds>} A bounds object.
-         *
-         * Returns:
-         * {DOMElement} A GML box node.
-         */
-        bounds: function(bounds) {
-            var gml = this.createElementNS(this.gmlns, "gml:Box");
-            gml.appendChild(this.buildCoordinatesNode(bounds));
-            return gml;
-        }
-    },
-
-    /**
-     * Method: buildCoordinates
-     * builds the coordinates XmlNode
-     * (code)
-     * <gml:coordinates decimal="." cs="," ts=" ">...</gml:coordinates>
-     * (end)
-     * Parameters: 
-     * geometry - {<OpenLayers.Geometry>} 
-     *
-     * Returns:
-     * {XmlNode} created xmlNode
-     */
-    buildCoordinatesNode: function(geometry) {
-        var coordinatesNode = this.createElementNS(this.gmlns,
-                                                   "gml:coordinates");
-        coordinatesNode.setAttribute("decimal", ".");
-        coordinatesNode.setAttribute("cs", ",");
-        coordinatesNode.setAttribute("ts", " ");
-
-        var parts = [];
-
-        if(geometry instanceof OpenLayers.Bounds){
-            parts.push(geometry.left + "," + geometry.bottom);
-            parts.push(geometry.right + "," + geometry.top);
-        } else {
-            var points = (geometry.components) ? geometry.components : [geometry];
-            for(var i=0; i<points.length; i++) {
-                parts.push(points[i].x + "," + points[i].y);                
-            }            
-        }
-
-        var txtNode = this.createTextNode(parts.join(" "));
-        coordinatesNode.appendChild(txtNode);
-        
-        return coordinatesNode;
-    },
-
-    CLASS_NAME: "OpenLayers.Format.GML" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/GML/Base.js
+++ /dev/null
@@ -1,579 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Format/GML.js
- */
-
-/**
- * Though required in the full build, if the GML format is excluded, we set
- * the namespace here.
- */
-if(!OpenLayers.Format.GML) {
-    OpenLayers.Format.GML = {};
-}
-
-/**
- * Class: OpenLayers.Format.GML.Base
- * Superclass for GML parsers.
- *
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        gml: "http://www.opengis.net/gml",
-        xlink: "http://www.w3.org/1999/xlink",
-        xsi: "http://www.w3.org/2001/XMLSchema-instance",
-        wfs: "http://www.opengis.net/wfs" // this is a convenience for reading wfs:FeatureCollection
-    },
-    
-    /**
-     * Property: defaultPrefix
-     */
-    defaultPrefix: "gml",
-
-    /**
-     * Property: schemaLocation
-     * {String} Schema location for a particular minor version.
-     */
-    schemaLocation: null,
-    
-    /**
-     * APIProperty: featureType
-     * {Array(String) or String} The local (without prefix) feature typeName(s).
-     */
-    featureType: null,
-    
-    /**
-     * APIProperty: featureNS
-     * {String} The feature namespace.  Must be set in the options at
-     *     construction.
-     */
-    featureNS: null,
-
-    /**
-     * APIProperty: geometry
-     * {String} Name of geometry element.  Defaults to "geometry".
-     */
-    geometryName: "geometry",
-
-    /**
-     * APIProperty: extractAttributes
-     * {Boolean} Extract attributes from GML.  Default is true.
-     */
-    extractAttributes: true,
-    
-    /**
-     * APIProperty: srsName
-     * {String} URI for spatial reference system.  This is optional for
-     *     single part geometries and mandatory for collections and multis.
-     *     If set, the srsName attribute will be written for all geometries.
-     *     Default is null.
-     */
-    srsName: null,
-
-    /**
-     * APIProperty: xy
-     * {Boolean} Order of the GML coordinate true:(x,y) or false:(y,x)
-     * Changing is not recommended, a new Format should be instantiated.
-     */ 
-    xy: true,
-
-    /**
-     * Property: geometryTypes
-     * {Object} Maps OpenLayers geometry class names to GML element names.
-     *     Use <setGeometryTypes> before accessing this property.
-     */
-    geometryTypes: null,
-
-    /**
-     * Property: singleFeatureType
-     * {Boolean} True if there is only 1 featureType, and not an array
-     *     of featuretypes.
-     */
-    singleFeatureType: null,
-
-    /**
-     * Property: regExes
-     * Compiled regular expressions for manipulating strings.
-     */
-    regExes: {
-        trimSpace: (/^\s*|\s*$/g),
-        removeSpace: (/\s*/g),
-        splitSpace: (/\s+/),
-        trimComma: (/\s*,\s*/g)
-    },
-
-    /**
-     * Constructor: OpenLayers.Format.GML.Base
-     * Instances of this class are not created directly.  Use the
-     *     <OpenLayers.Format.GML.v2> or <OpenLayers.Format.GML.v3> constructor
-     *     instead.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     *
-     * Valid options properties:
-     * featureType - {Array(String) or String} Local (without prefix) feature 
-     *     typeName(s) (required).
-     * featureNS - {String} Feature namespace (required).
-     * geometryName - {String} Geometry element name.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-        this.setGeometryTypes();
-        if(options && options.featureNS) {
-            this.setNamespace("feature", options.featureNS);
-        }
-        this.singleFeatureType = !options || (typeof options.featureType === "string");
-    },
-    
-    /**
-     * Method: read
-     *
-     * Parameters:
-     * data - {DOMElement} A gml:featureMember element, a gml:featureMembers
-     *     element, or an element containing either of the above at any level.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Feature.Vector>)} An array of features.
-     */
-    read: function(data) {
-        if(typeof data == "string") { 
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        if(data && data.nodeType == 9) {
-            data = data.documentElement;
-        }
-        var features = [];
-        this.readNode(data, {features: features});
-        if(features.length == 0) {
-            // look for gml:featureMember elements
-            var elements = this.getElementsByTagNameNS(
-                data, this.namespaces.gml, "featureMember"
-            );
-            if(elements.length) {
-                for(var i=0, len=elements.length; i<len; ++i) {
-                    this.readNode(elements[i], {features: features});
-                }
-            } else {
-                // look for gml:featureMembers elements (this is v3, but does no harm here)
-                var elements = this.getElementsByTagNameNS(
-                    data, this.namespaces.gml, "featureMembers"
-                );
-                if(elements.length) {
-                    // there can be only one
-                    this.readNode(elements[0], {features: features});
-                }
-            }
-        }
-        return features;
-    },
-    
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "gml": {
-            "featureMember": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "featureMembers": function(node, obj) {
-                this.readChildNodes(node, obj);                
-            },
-            "name": function(node, obj) {
-                obj.name = this.getChildValue(node);
-            },
-            "boundedBy": function(node, obj) {
-                var container = {};
-                this.readChildNodes(node, container);
-                if(container.components && container.components.length > 0) {
-                    obj.bounds = container.components[0];
-                }
-            },
-            "Point": function(node, container) {
-                var obj = {points: []};
-                this.readChildNodes(node, obj);
-                if(!container.components) {
-                    container.components = [];
-                }
-                container.components.push(obj.points[0]);
-            },
-            "coordinates": function(node, obj) {
-                var str = this.getChildValue(node).replace(
-                    this.regExes.trimSpace, ""
-                );
-                str = str.replace(this.regExes.trimComma, ",");
-                var pointList = str.split(this.regExes.splitSpace);
-                var coords;
-                var numPoints = pointList.length;
-                var points = new Array(numPoints);
-                for(var i=0; i<numPoints; ++i) {
-                    coords = pointList[i].split(",");
-                    if (this.xy) {
-                        points[i] = new OpenLayers.Geometry.Point(
-                            coords[0], coords[1], coords[2]
-                        );
-                    } else {
-                        points[i] = new OpenLayers.Geometry.Point(
-                            coords[1], coords[0], coords[2]
-                        );
-                    }
-                }
-                obj.points = points;
-            },
-            "coord": function(node, obj) {
-                var coord = {};
-                this.readChildNodes(node, coord);
-                if(!obj.points) {
-                    obj.points = [];
-                }
-                obj.points.push(new OpenLayers.Geometry.Point(
-                    coord.x, coord.y, coord.z
-                ));
-            },
-            "X": function(node, coord) {
-                coord.x = this.getChildValue(node);
-            },
-            "Y": function(node, coord) {
-                coord.y = this.getChildValue(node);
-            },
-            "Z": function(node, coord) {
-                coord.z = this.getChildValue(node);
-            },
-            "MultiPoint": function(node, container) {
-                var obj = {components: []};
-                this.readChildNodes(node, obj);
-                container.components = [
-                    new OpenLayers.Geometry.MultiPoint(obj.components)
-                ];
-            },
-            "pointMember": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "LineString": function(node, container) {
-                var obj = {};
-                this.readChildNodes(node, obj);
-                if(!container.components) {
-                    container.components = [];
-                }
-                container.components.push(
-                    new OpenLayers.Geometry.LineString(obj.points)
-                );
-            },
-            "MultiLineString": function(node, container) {
-                var obj = {components: []};
-                this.readChildNodes(node, obj);
-                container.components = [
-                    new OpenLayers.Geometry.MultiLineString(obj.components)
-                ];
-            },
-            "lineStringMember": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "Polygon": function(node, container) {
-                var obj = {outer: null, inner: []};
-                this.readChildNodes(node, obj);
-                obj.inner.unshift(obj.outer);
-                if(!container.components) {
-                    container.components = [];
-                }
-                container.components.push(
-                    new OpenLayers.Geometry.Polygon(obj.inner)
-                );
-            },
-            "LinearRing": function(node, obj) {
-                var container = {};
-                this.readChildNodes(node, container);
-                obj.components = [new OpenLayers.Geometry.LinearRing(
-                    container.points
-                )];
-            },
-            "MultiPolygon": function(node, container) {
-                var obj = {components: []};
-                this.readChildNodes(node, obj);
-                container.components = [
-                    new OpenLayers.Geometry.MultiPolygon(obj.components)
-                ];
-            },
-            "polygonMember": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "GeometryCollection": function(node, container) {
-                var obj = {components: []};
-                this.readChildNodes(node, obj);
-                container.components = [
-                    new OpenLayers.Geometry.Collection(obj.components)
-                ];
-            },
-            "geometryMember": function(node, obj) {
-                this.readChildNodes(node, obj);
-            }
-        },
-        "feature": {
-            "*": function(node, obj) {
-                // The node can either be named like the featureType, or it
-                // can be a child of the feature:featureType.  Children can be
-                // geometry or attributes.
-                var name;
-                var local = node.localName || node.nodeName.split(":").pop();
-                // Since an attribute can have the same name as the feature type
-                // we only want to read the node as a feature if the parent
-                // node can have feature nodes as children.  In this case, the
-                // obj.features property is set.
-                if (obj.features) {
-                    if (!this.singleFeatureType &&
-                        (OpenLayers.Util.indexOf(this.featureType, local) !== -1)) {
-                        name = "_typeName";
-                    } else if(local === this.featureType) {
-                        name = "_typeName";
-                    }
-                } else {
-                    // Assume attribute elements have one child node and that the child
-                    // is a text node.  Otherwise assume it is a geometry node.
-                    if(node.childNodes.length == 0 ||
-                       (node.childNodes.length == 1 && node.firstChild.nodeType == 3)) {
-                        if(this.extractAttributes) {
-                            name = "_attribute";
-                        }
-                    } else {
-                        name = "_geometry";
-                    }
-                }
-                if(name) {
-                    this.readers.feature[name].apply(this, [node, obj]);
-                }
-            },
-            "_typeName": function(node, obj) {
-                var container = {components: [], attributes: {}};
-                this.readChildNodes(node, container);
-                // look for common gml namespaced elements
-                if(container.name) {
-                    container.attributes.name = container.name;
-                }
-                var feature = new OpenLayers.Feature.Vector(
-                    container.components[0], container.attributes
-                );
-                if (!this.singleFeatureType) {
-                    feature.type = node.nodeName.split(":").pop();
-                    feature.namespace = node.namespaceURI;
-                }
-                var fid = node.getAttribute("fid") ||
-                    this.getAttributeNS(node, this.namespaces["gml"], "id");
-                if(fid) {
-                    feature.fid = fid;
-                }
-                if(this.internalProjection && this.externalProjection &&
-                   feature.geometry) {
-                    feature.geometry.transform(
-                        this.externalProjection, this.internalProjection
-                    );
-                }
-                if(container.bounds) {
-                    feature.bounds = container.bounds;
-                }
-                obj.features.push(feature);
-            },
-            "_geometry": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "_attribute": function(node, obj) {
-                var local = node.localName || node.nodeName.split(":").pop();
-                var value = this.getChildValue(node);
-                obj.attributes[local] = value;
-            }
-        },
-        "wfs": {
-            "FeatureCollection": function(node, obj) {
-                this.readChildNodes(node, obj);
-            }
-        }
-    },
-    
-    /**
-     * Method: write
-     *
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>) | OpenLayers.Feature.Vector}
-     *     An array of features or a single feature.
-     *
-     * Returns:
-     * {String} Given an array of features, a doc with a gml:featureMembers
-     *     element will be returned.  Given a single feature, a doc with a
-     *     gml:featureMember element will be returned.
-     */
-    write: function(features) {
-        var name;
-        if(features instanceof Array) {
-            name = "featureMembers";
-        } else {
-            name = "featureMember";
-        }
-        var root = this.writeNode("gml:" + name, features);
-        this.setAttributeNS(
-            root, this.namespaces["xsi"],
-            "xsi:schemaLocation", this.schemaLocation
-        );
-
-        return OpenLayers.Format.XML.prototype.write.apply(this, [root]);
-    },
-    
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "gml": {
-            "featureMember": function(feature) {
-                var node = this.createElementNSPlus("gml:featureMember");
-                this.writeNode("feature:_typeName", feature, node);
-                return node;
-            },
-            "MultiPoint": function(geometry) {
-                var node = this.createElementNSPlus("gml:MultiPoint");
-                for(var i=0; i<geometry.components.length; ++i) {
-                    this.writeNode("pointMember", geometry.components[i], node);
-                }
-                return node;
-            },
-            "pointMember": function(geometry) {
-                var node = this.createElementNSPlus("gml:pointMember");
-                this.writeNode("Point", geometry, node);
-                return node;
-            },
-            "MultiLineString": function(geometry) {
-                var node = this.createElementNSPlus("gml:MultiLineString");
-                for(var i=0; i<geometry.components.length; ++i) {
-                    this.writeNode("lineStringMember", geometry.components[i], node);
-                }
-                return node;
-            },
-            "lineStringMember": function(geometry) {
-                var node = this.createElementNSPlus("gml:lineStringMember");
-                this.writeNode("LineString", geometry, node);
-                return node;
-            },
-            "MultiPolygon": function(geometry) {
-                var node = this.createElementNSPlus("gml:MultiPolygon");
-                for(var i=0; i<geometry.components.length; ++i) {
-                    this.writeNode(
-                        "polygonMember", geometry.components[i], node
-                    );
-                }
-                return node;
-            },
-            "polygonMember": function(geometry) {
-                var node = this.createElementNSPlus("gml:polygonMember");
-                this.writeNode("Polygon", geometry, node);
-                return node;
-            },
-            "GeometryCollection": function(geometry) {
-                var node = this.createElementNSPlus("gml:GeometryCollection");
-                for(var i=0, len=geometry.components.length; i<len; ++i) {
-                    this.writeNode("geometryMember", geometry.components[i], node);
-                }
-                return node;
-            },
-            "geometryMember": function(geometry) {
-                var node = this.createElementNSPlus("gml:geometryMember");
-                var child = this.writeNode("feature:_geometry", geometry);
-                node.appendChild(child.firstChild);
-                return node;
-            }
-        },
-        "feature": {
-            "_typeName": function(feature) {
-                var node = this.createElementNSPlus("feature:" + this.featureType, {
-                    attributes: {fid: feature.fid}
-                });
-                if(feature.geometry) {
-                    this.writeNode("feature:_geometry", feature.geometry, node);
-                }
-                for(var name in feature.attributes) {
-                    var value = feature.attributes[name];
-                    if(value != null) {
-                        this.writeNode(
-                            "feature:_attribute",
-                            {name: name, value: value}, node
-                        );
-                    }
-                }
-                return node;
-            },
-            "_geometry": function(geometry) {
-                if(this.externalProjection && this.internalProjection) {
-                    geometry = geometry.clone().transform(
-                        this.internalProjection, this.externalProjection
-                    );
-                }    
-                var node = this.createElementNSPlus(
-                    "feature:" + this.geometryName
-                );
-                var type = this.geometryTypes[geometry.CLASS_NAME];
-                var child = this.writeNode("gml:" + type, geometry, node);
-                if(this.srsName) {
-                    child.setAttribute("srsName", this.srsName);
-                }
-                return node;
-            },
-            "_attribute": function(obj) {
-                return this.createElementNSPlus("feature:" + obj.name, {
-                    value: obj.value
-                });
-            }
-        },
-        "wfs": {
-            "FeatureCollection": function(features) {
-                /**
-                 * This is only here because GML2 only describes abstract
-                 * feature collections.  Typically, you would not be using
-                 * the GML format to write wfs elements.  This just provides
-                 * some way to write out lists of features.  GML3 defines the
-                 * featureMembers element, so that is used by default instead.
-                 */
-                var node = this.createElementNSPlus("wfs:FeatureCollection");
-                for(var i=0, len=features.length; i<len; ++i) {
-                    this.writeNode("gml:featureMember", features[i], node);
-                }
-                return node;
-            }
-        }
-    },
-    
-    /**
-     * Function: setGeometryTypes
-     * Sets the <geometryTypes> mapping.
-     */
-    setGeometryTypes: function() {
-        this.geometryTypes = {
-            "OpenLayers.Geometry.Point": "Point",
-            "OpenLayers.Geometry.MultiPoint": "MultiPoint",
-            "OpenLayers.Geometry.LineString": "LineString",
-            "OpenLayers.Geometry.MultiLineString": "MultiLineString",
-            "OpenLayers.Geometry.Polygon": "Polygon",
-            "OpenLayers.Geometry.MultiPolygon": "MultiPolygon",
-            "OpenLayers.Geometry.Collection": "GeometryCollection"
-        };
-    },
-
-    CLASS_NAME: "OpenLayers.Format.GML.Base" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/GML/v2.js
+++ /dev/null
@@ -1,194 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/GML/Base.js
- */
-
-/**
- * Class: OpenLayers.Format.GML.v2
- * Parses GML version 2.
- *
- * Inherits from:
- *  - <OpenLayers.Format.GML.Base>
- */
-OpenLayers.Format.GML.v2 = OpenLayers.Class(OpenLayers.Format.GML.Base, {
-    
-    /**
-     * Property: schemaLocation
-     * {String} Schema location for a particular minor version.
-     */
-    schemaLocation: "http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",
-
-    /**
-     * Constructor: OpenLayers.Format.GML.v2
-     * Create a parser for GML v2.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     *
-     * Valid options properties:
-     * featureType - {String} Local (without prefix) feature typeName (required).
-     * featureNS - {String} Feature namespace (required).
-     * geometryName - {String} Geometry element name.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.GML.Base.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "gml": OpenLayers.Util.applyDefaults({
-            "outerBoundaryIs": function(node, container) {
-                var obj = {};
-                this.readChildNodes(node, obj);
-                container.outer = obj.components[0];
-            },
-            "innerBoundaryIs": function(node, container) {
-                var obj = {};
-                this.readChildNodes(node, obj);
-                container.inner.push(obj.components[0]);
-            },
-            "Box": function(node, container) {
-                var obj = {};
-                this.readChildNodes(node, obj);
-                if(!container.components) {
-                    container.components = [];
-                }
-                var min = obj.points[0];
-                var max = obj.points[1];
-                container.components.push(
-                    new OpenLayers.Bounds(min.x, min.y, max.x, max.y)
-                );
-            }
-        }, OpenLayers.Format.GML.Base.prototype.readers["gml"]),
-        "feature": OpenLayers.Format.GML.Base.prototype.readers["feature"],
-        "wfs": OpenLayers.Format.GML.Base.prototype.readers["wfs"]
-    },
-
-    /**
-     * Method: write
-     *
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>) | OpenLayers.Feature.Vector}
-     *     An array of features or a single feature.
-     *
-     * Returns:
-     * {String} Given an array of features, a doc with a gml:featureMembers
-     *     element will be returned.  Given a single feature, a doc with a
-     *     gml:featureMember element will be returned.
-     */
-    write: function(features) {
-        var name;
-        if(features instanceof Array) {
-            // GML2 only has abstract feature collections
-            // wfs provides a feature collection from a well-known schema
-            name = "wfs:FeatureCollection";
-        } else {
-            name = "gml:featureMember";
-        }
-        var root = this.writeNode(name, features);
-        this.setAttributeNS(
-            root, this.namespaces["xsi"],
-            "xsi:schemaLocation", this.schemaLocation
-        );
-
-        return OpenLayers.Format.XML.prototype.write.apply(this, [root]);
-    },
-
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "gml": OpenLayers.Util.applyDefaults({
-            "Point": function(geometry) {
-                var node = this.createElementNSPlus("gml:Point");
-                this.writeNode("coordinates", [geometry], node);
-                return node;
-            },
-            "coordinates": function(points) {
-                var numPoints = points.length;
-                var parts = new Array(numPoints);
-                var point;
-                for(var i=0; i<numPoints; ++i) {
-                    point = points[i];
-                    if(this.xy) {
-                        parts[i] = point.x + "," + point.y;
-                    } else {
-                        parts[i] = point.y + "," + point.x;
-                    }
-                    if(point.z != undefined) { // allow null or undefined
-                        parts[i] += "," + point.z;
-                    }
-                }
-                return this.createElementNSPlus("gml:coordinates", {
-                    attributes: {
-                        decimal: ".", cs: ",", ts: " "
-                    },
-                    value: (numPoints == 1) ? parts[0] : parts.join(" ")
-                });
-            },
-            "LineString": function(geometry) {
-                var node = this.createElementNSPlus("gml:LineString");
-                this.writeNode("coordinates", geometry.components, node);
-                return node;
-            },
-            "Polygon": function(geometry) {
-                var node = this.createElementNSPlus("gml:Polygon");
-                this.writeNode("outerBoundaryIs", geometry.components[0], node);
-                for(var i=1; i<geometry.components.length; ++i) {
-                    this.writeNode(
-                        "innerBoundaryIs", geometry.components[i], node
-                    );
-                }
-                return node;
-            },
-            "outerBoundaryIs": function(ring) {
-                var node = this.createElementNSPlus("gml:outerBoundaryIs");
-                this.writeNode("LinearRing", ring, node);
-                return node;
-            },
-            "innerBoundaryIs": function(ring) {
-                var node = this.createElementNSPlus("gml:innerBoundaryIs");
-                this.writeNode("LinearRing", ring, node);
-                return node;
-            },
-            "LinearRing": function(ring) {
-                var node = this.createElementNSPlus("gml:LinearRing");
-                this.writeNode("coordinates", ring.components, node);
-                return node;
-            },
-            "Box": function(bounds) {
-                var node = this.createElementNSPlus("gml:Box");
-                this.writeNode("coordinates", [
-                    {x: bounds.left, y: bounds.bottom},
-                    {x: bounds.right, y: bounds.top}
-                ], node);
-                // srsName attribute is optional for gml:Box
-                if(this.srsName) {
-                    node.setAttribute("srsName", this.srsName);
-                }
-                return node;
-            }
-        }, OpenLayers.Format.GML.Base.prototype.writers["gml"]),
-        "feature": OpenLayers.Format.GML.Base.prototype.writers["feature"],
-        "wfs": OpenLayers.Format.GML.Base.prototype.writers["wfs"]
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.GML.v2" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/GML/v3.js
+++ /dev/null
@@ -1,463 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/GML/Base.js
- */
-
-/**
- * Class: OpenLayers.Format.GML.v3
- * Parses GML version 3.
- *
- * Inherits from:
- *  - <OpenLayers.Format.GML.Base>
- */
-OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, {
-    
-    /**
-     * Property: schemaLocation
-     * {String} Schema location for a particular minor version.  The writers
-     *     conform with the Simple Features Profile for GML.
-     */
-    schemaLocation: "http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",
-
-    /**
-     * Property: curve
-     * {Boolean} Write gml:Curve instead of gml:LineString elements.  This also
-     *     affects the elements in multi-part geometries.  Default is false.
-     *     To write gml:Curve elements instead of gml:LineString, set curve
-     *     to true in the options to the contstructor (cannot be changed after
-     *     instantiation).
-     */
-    curve: false,
-    
-    /**
-     * Property: multiCurve
-     * {Boolean} Write gml:MultiCurve instead of gml:MultiLineString.  Since
-     *     the latter is deprecated in GML 3, the default is true.  To write
-     *     gml:MultiLineString instead of gml:MultiCurve, set multiCurve to
-     *     false in the options to the constructor (cannot be changed after
-     *     instantiation).
-     */
-    multiCurve: true,
-    
-    /**
-     * Property: surface
-     * {Boolean} Write gml:Surface instead of gml:Polygon elements.  This also
-     *     affects the elements in multi-part geometries.  Default is false.
-     *     To write gml:Surface elements instead of gml:Polygon, set surface
-     *     to true in the options to the contstructor (cannot be changed after
-     *     instantiation).
-     */
-    surface: false,
-
-    /**
-     * Property: multiSurface
-     * {Boolean} Write gml:multiSurface instead of gml:MultiPolygon.  Since
-     *     the latter is deprecated in GML 3, the default is true.  To write
-     *     gml:MultiPolygon instead of gml:multiSurface, set multiSurface to
-     *     false in the options to the constructor (cannot be changed after
-     *     instantiation).
-     */
-    multiSurface: true,
-
-    /**
-     * Constructor: OpenLayers.Format.GML.v3
-     * Create a parser for GML v3.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     *
-     * Valid options properties:
-     * featureType - {String} Local (without prefix) feature typeName (required).
-     * featureNS - {String} Feature namespace (required).
-     * geometryName - {String} Geometry element name.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.GML.Base.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "gml": OpenLayers.Util.applyDefaults({
-            "featureMembers": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "Curve": function(node, container) {
-                var obj = {points: []};
-                this.readChildNodes(node, obj);
-                if(!container.components) {
-                    container.components = [];
-                }
-                container.components.push(
-                    new OpenLayers.Geometry.LineString(obj.points)
-                );
-            },
-            "segments": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "LineStringSegment": function(node, container) {
-                var obj = {};
-                this.readChildNodes(node, obj);
-                if(obj.points) {
-                    Array.prototype.push.apply(container.points, obj.points);
-                }
-            },
-            "pos": function(node, obj) {
-                var str = this.getChildValue(node).replace(
-                    this.regExes.trimSpace, ""
-                );
-                var coords = str.split(this.regExes.splitSpace);
-                var point;
-                if(this.xy) {
-                    point = new OpenLayers.Geometry.Point(
-                        coords[0], coords[1], coords[2]
-                    );
-                } else {
-                    point = new OpenLayers.Geometry.Point(
-                        coords[1], coords[0], coords[2]
-                    );
-                }
-                obj.points = [point];
-            },
-            "posList": function(node, obj) {
-                var str = this.getChildValue(node).replace(
-                    this.regExes.trimSpace, ""
-                );
-                var coords = str.split(this.regExes.splitSpace);
-                var dim = parseInt(node.getAttribute("dimension")) || 2;
-                var j, x, y, z;
-                var numPoints = coords.length / dim;
-                var points = new Array(numPoints);
-                for(var i=0, len=coords.length; i<len; i += dim) {
-                    x = coords[i];
-                    y = coords[i+1];
-                    z = (dim == 2) ? undefined : coords[i+2];
-                    if (this.xy) {
-                        points[i/dim] = new OpenLayers.Geometry.Point(x, y, z);
-                    } else {
-                        points[i/dim] = new OpenLayers.Geometry.Point(y, x, z);
-                    }
-                }
-                obj.points = points;
-            },
-            "Surface": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "patches": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "PolygonPatch": function(node, obj) {
-                this.readers.gml.Polygon.apply(this, [node, obj]);
-            },
-            "exterior": function(node, container) {
-                var obj = {};
-                this.readChildNodes(node, obj);
-                container.outer = obj.components[0];
-            },
-            "interior": function(node, container) {
-                var obj = {};
-                this.readChildNodes(node, obj);
-                container.inner.push(obj.components[0]);
-            },
-            "MultiCurve": function(node, container) {
-                var obj = {components: []};
-                this.readChildNodes(node, obj);
-                if(obj.components.length > 0) {
-                    container.components = [
-                        new OpenLayers.Geometry.MultiLineString(obj.components)
-                    ];
-                }
-            },
-            "curveMember": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "MultiSurface": function(node, container) {
-                var obj = {components: []};
-                this.readChildNodes(node, obj);
-                if(obj.components.length > 0) {
-                    container.components = [
-                        new OpenLayers.Geometry.MultiPolygon(obj.components)
-                    ];
-                }
-            },
-            "surfaceMember": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "surfaceMembers": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "pointMembers": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "lineStringMembers": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "polygonMembers": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "geometryMembers": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "Envelope": function(node, container) {
-                var obj = {points: new Array(2)};
-                this.readChildNodes(node, obj);
-                if(!container.components) {
-                    container.components = [];
-                }
-                var min = obj.points[0];
-                var max = obj.points[1];
-                container.components.push(
-                    new OpenLayers.Bounds(min.x, min.y, max.x, max.y)
-                );
-            },
-            "lowerCorner": function(node, container) {
-                var obj = {};
-                this.readers.gml.pos.apply(this, [node, obj]);
-                container.points[0] = obj.points[0];
-            },
-            "upperCorner": function(node, container) {
-                var obj = {};
-                this.readers.gml.pos.apply(this, [node, obj]);
-                container.points[1] = obj.points[0];
-            }
-        }, OpenLayers.Format.GML.Base.prototype.readers["gml"]),            
-        "feature": OpenLayers.Format.GML.Base.prototype.readers["feature"],
-        "wfs": OpenLayers.Format.GML.Base.prototype.readers["wfs"]
-    },
-    
-    /**
-     * Method: write
-     *
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>) | OpenLayers.Feature.Vector}
-     *     An array of features or a single feature.
-     *
-     * Returns:
-     * {String} Given an array of features, a doc with a gml:featureMembers
-     *     element will be returned.  Given a single feature, a doc with a
-     *     gml:featureMember element will be returned.
-     */
-    write: function(features) {
-        var name;
-        if(features instanceof Array) {
-            name = "featureMembers";
-        } else {
-            name = "featureMember";
-        }
-        var root = this.writeNode("gml:" + name, features);
-        this.setAttributeNS(
-            root, this.namespaces["xsi"],
-            "xsi:schemaLocation", this.schemaLocation
-        );
-
-        return OpenLayers.Format.XML.prototype.write.apply(this, [root]);
-    },
-
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "gml": OpenLayers.Util.applyDefaults({
-            "featureMembers": function(features) {
-                var node = this.createElementNSPlus("gml:featureMembers");
-                for(var i=0, len=features.length; i<len; ++i) {
-                    this.writeNode("feature:_typeName", features[i], node);
-                }
-                return node;
-            },
-            "Point": function(geometry) {
-                var node = this.createElementNSPlus("gml:Point");
-                this.writeNode("pos", geometry, node);
-                return node;
-            },
-            "pos": function(point) {
-                // only 2d for simple features profile
-                var pos = (this.xy) ?
-                    (point.x + " " + point.y) : (point.y + " " + point.x);
-                return this.createElementNSPlus("gml:pos", {
-                    value: pos
-                });
-            },
-            "LineString": function(geometry) {
-                var node = this.createElementNSPlus("gml:LineString");
-                this.writeNode("posList", geometry.components, node);
-                return node;
-            },
-            "Curve": function(geometry) {
-                var node = this.createElementNSPlus("gml:Curve");
-                this.writeNode("segments", geometry, node);
-                return node;
-            },
-            "segments": function(geometry) {
-                var node = this.createElementNSPlus("gml:segments");
-                this.writeNode("LineStringSegment", geometry, node);
-                return node;
-            },
-            "LineStringSegment": function(geometry) {
-                var node = this.createElementNSPlus("gml:LineStringSegment");
-                this.writeNode("posList", geometry.components, node);
-                return node;
-            },
-            "posList": function(points) {
-                // only 2d for simple features profile
-                var len = points.length;
-                var parts = new Array(len);
-                var point;
-                for(var i=0; i<len; ++i) {
-                    point = points[i];
-                    if(this.xy) {
-                        parts[i] = point.x + " " + point.y;
-                    } else {
-                        parts[i] = point.y + " " + point.x;
-                    }
-                }
-                return this.createElementNSPlus("gml:posList", {
-                    value: parts.join(" ")
-                }); 
-            },
-            "Surface": function(geometry) {
-                var node = this.createElementNSPlus("gml:Surface");
-                this.writeNode("patches", geometry, node);
-                return node;
-            },
-            "patches": function(geometry) {
-                var node = this.createElementNSPlus("gml:patches");
-                this.writeNode("PolygonPatch", geometry, node);
-                return node;
-            },
-            "PolygonPatch": function(geometry) {
-                var node = this.createElementNSPlus("gml:PolygonPatch", {
-                    attributes: {interpolation: "planar"}
-                });
-                this.writeNode("exterior", geometry.components[0], node);
-                for(var i=1, len=geometry.components.length; i<len; ++i) {
-                    this.writeNode(
-                        "interior", geometry.components[i], node
-                    );
-                }
-                return node;
-            },
-            "Polygon": function(geometry) {
-                var node = this.createElementNSPlus("gml:Polygon");
-                this.writeNode("exterior", geometry.components[0], node);
-                for(var i=1, len=geometry.components.length; i<len; ++i) {
-                    this.writeNode(
-                        "interior", geometry.components[i], node
-                    );
-                }
-                return node;
-            },
-            "exterior": function(ring) {
-                var node = this.createElementNSPlus("gml:exterior");
-                this.writeNode("LinearRing", ring, node);
-                return node;
-            },
-            "interior": function(ring) {
-                var node = this.createElementNSPlus("gml:interior");
-                this.writeNode("LinearRing", ring, node);
-                return node;
-            },
-            "LinearRing": function(ring) {
-                var node = this.createElementNSPlus("gml:LinearRing");
-                this.writeNode("posList", ring.components, node);
-                return node;
-            },
-            "MultiCurve": function(geometry) {
-                var node = this.createElementNSPlus("gml:MultiCurve");
-                for(var i=0, len=geometry.components.length; i<len; ++i) {
-                    this.writeNode("curveMember", geometry.components[i], node);
-                }
-                return node;
-            },
-            "curveMember": function(geometry) {
-                var node = this.createElementNSPlus("gml:curveMember");
-                if(this.curve) {
-                    this.writeNode("Curve", geometry, node);
-                } else {
-                    this.writeNode("LineString", geometry, node);
-                }
-                return node;
-            },
-            "MultiSurface": function(geometry) {
-                var node = this.createElementNSPlus("gml:MultiSurface");
-                for(var i=0, len=geometry.components.length; i<len; ++i) {
-                    this.writeNode("surfaceMember", geometry.components[i], node);
-                }
-                return node;
-            },
-            "surfaceMember": function(polygon) {
-                var node = this.createElementNSPlus("gml:surfaceMember");
-                if(this.surface) {
-                    this.writeNode("Surface", polygon, node);
-                } else {
-                    this.writeNode("Polygon", polygon, node);
-                }
-                return node;
-            },
-            "Envelope": function(bounds) {
-                var node = this.createElementNSPlus("gml:Envelope");
-                this.writeNode("lowerCorner", bounds, node);
-                this.writeNode("upperCorner", bounds, node);
-                // srsName attribute is required for gml:Envelope
-                if(this.srsName) {
-                    node.setAttribute("srsName", this.srsName);
-                }
-                return node;
-            },
-            "lowerCorner": function(bounds) {
-                // only 2d for simple features profile
-                var pos = (this.xy) ?
-                    (bounds.left + " " + bounds.bottom) :
-                    (bounds.bottom + " " + bounds.left);
-                return this.createElementNSPlus("gml:lowerCorner", {
-                    value: pos
-                });
-            },
-            "upperCorner": function(bounds) {
-                // only 2d for simple features profile
-                var pos = (this.xy) ?
-                    (bounds.right + " " + bounds.top) :
-                    (bounds.top + " " + bounds.right);
-                return this.createElementNSPlus("gml:upperCorner", {
-                    value: pos
-                });
-            }
-        }, OpenLayers.Format.GML.Base.prototype.writers["gml"]),
-        "feature": OpenLayers.Format.GML.Base.prototype.writers["feature"],
-        "wfs": OpenLayers.Format.GML.Base.prototype.writers["wfs"]
-    },
-
-    /**
-     * Function: setGeometryTypes
-     * Sets the <geometryTypes> mapping.
-     */
-    setGeometryTypes: function() {
-        this.geometryTypes = {
-            "OpenLayers.Geometry.Point": "Point",
-            "OpenLayers.Geometry.MultiPoint": "MultiPoint",
-            "OpenLayers.Geometry.LineString": (this.curve === true) ? "Curve": "LineString",
-            "OpenLayers.Geometry.MultiLineString": (this.multiCurve === false) ? "MultiLineString" : "MultiCurve",
-            "OpenLayers.Geometry.Polygon": (this.surface === true) ? "Surface" : "Polygon",
-            "OpenLayers.Geometry.MultiPolygon": (this.multiSurface === false) ? "MultiPolygon" : "MultiSurface",
-            "OpenLayers.Geometry.Collection": "GeometryCollection"
-        };
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.GML.v3" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/GPX.js
+++ /dev/null
@@ -1,185 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Feature/Vector.js
- * @requires OpenLayers/Geometry/Point.js
- * @requires OpenLayers/Geometry/LineString.js
- * @requires OpenLayers/Projection.js
- */
-
-/**
- * Class: OpenLayers.Format.GPX
- * Read/write GPX parser. Create a new instance with the 
- *     <OpenLayers.Format.GPX> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, {
-   /**
-    * APIProperty: extractWaypoints
-    * {Boolean} Extract waypoints from GPX. (default: true)
-    */
-    extractWaypoints: true,
-    
-   /**
-    * APIProperty: extractTracks
-    * {Boolean} Extract tracks from GPX. (default: true)
-    */
-    extractTracks: true,
-    
-   /**
-    * APIProperty: extractRoutes
-    * {Boolean} Extract routes from GPX. (default: true)
-    */
-    extractRoutes: true,
-    
-    /**
-     * APIProperty: extractAttributes
-     * {Boolean} Extract feature attributes from GPX. (default: true)
-     *     NOTE: Attributes as part of extensions to the GPX standard may not
-     *     be extracted.
-     */
-    extractAttributes: true,
-    
-    /**
-     * Constructor: OpenLayers.Format.GPX
-     * Create a new parser for GPX.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        // GPX coordinates are always in longlat WGS84
-        this.externalProjection = new OpenLayers.Projection("EPSG:4326");
-
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * APIMethod: read
-     * Return a list of features from a GPX doc
-     *
-     * Parameters:
-     * doc - {Element} 
-     *
-     * Returns:
-     * An Array of <OpenLayers.Feature.Vector>s
-     */
-    read: function(doc) {
-        if (typeof doc == "string") { 
-            doc = OpenLayers.Format.XML.prototype.read.apply(this, [doc]);
-        }
-        var features = [];
-        
-        if(this.extractTracks) {
-            var tracks = doc.getElementsByTagName("trk");
-            for (var i=0, len=tracks.length; i<len; i++) {
-                // Attributes are only in trk nodes, not trkseg nodes
-                var attrs = {};
-                if(this.extractAttributes) {
-                    attrs = this.parseAttributes(tracks[i]);
-                }
-                
-                var segs = this.getElementsByTagNameNS(tracks[i], tracks[i].namespaceURI, "trkseg");
-                for (var j = 0, seglen = segs.length; j < seglen; j++) {
-                    // We don't yet support extraction of trkpt attributes
-                    // All trksegs of a trk get that trk's attributes
-                    var track = this.extractSegment(segs[j], "trkpt");
-                    features.push(new OpenLayers.Feature.Vector(track, attrs));
-                }
-            }
-        }
-        
-        if(this.extractRoutes) {
-            var routes = doc.getElementsByTagName("rte");
-            for (var k=0, klen=routes.length; k<klen; k++) {
-                var attrs = {};
-                if(this.extractAttributes) {
-                    attrs = this.parseAttributes(routes[k]);
-                }
-                var route = this.extractSegment(routes[k], "rtept");
-                features.push(new OpenLayers.Feature.Vector(route, attrs));
-            }
-        }
-        
-        if(this.extractWaypoints) {
-            var waypoints = doc.getElementsByTagName("wpt");
-            for (var l = 0, len = waypoints.length; l < len; l++) {
-                var attrs = {};
-                if(this.extractAttributes) {
-                    attrs = this.parseAttributes(waypoints[l]);
-                }
-                var wpt = new OpenLayers.Geometry.Point(waypoints[l].getAttribute("lon"), waypoints[l].getAttribute("lat"));
-                features.push(new OpenLayers.Feature.Vector(wpt, attrs));
-            }
-        }
-        
-        if (this.internalProjection && this.externalProjection) {
-            for (var g = 0, featLength = features.length; g < featLength; g++) {
-                features[g].geometry.transform(this.externalProjection,
-                                    this.internalProjection);
-            }
-        }
-        
-        return features;
-    },
-    
-   /**
-    * Method: extractSegment
-    *
-    * Parameters:
-    * segment - {<DOMElement>} a trkseg or rte node to parse
-    * segmentType - {String} nodeName of waypoints that form the line
-    *
-    * Returns:
-    * {<OpenLayers.Geometry.LineString>} A linestring geometry
-    */
-    extractSegment: function(segment, segmentType) {
-        var points = this.getElementsByTagNameNS(segment, segment.namespaceURI, segmentType);
-        var point_features = [];
-        for (var i = 0, len = points.length; i < len; i++) {
-            point_features.push(new OpenLayers.Geometry.Point(points[i].getAttribute("lon"), points[i].getAttribute("lat")));
-        }
-        return new OpenLayers.Geometry.LineString(point_features);
-    },
-    
-    /**
-     * Method: parseAttributes
-     *
-     * Parameters:
-     * node - {<DOMElement>}
-     *
-     * Returns:
-     * {Object} An attributes object.
-     */
-    parseAttributes: function(node) {
-        // node is either a wpt, trk or rte
-        // attributes are children of the form <attr>value</attr>
-        var attributes = {};
-        var attrNode = node.firstChild;
-        while(attrNode) {
-            if(attrNode.nodeType == 1) {
-                var value = attrNode.firstChild;
-                if(value.nodeType == 3 || value.nodeType == 4) {
-                    name = (attrNode.prefix) ?
-                        attrNode.nodeName.split(":")[1] :
-                        attrNode.nodeName;
-                    if(name != "trkseg" && name != "rtept") {
-                        attributes[name] = value.nodeValue;
-                    }
-                }
-            }
-            attrNode = attrNode.nextSibling;
-        }
-        return attributes;
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.GPX"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/GeoJSON.js
+++ /dev/null
@@ -1,717 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/JSON.js
- * @requires OpenLayers/Feature/Vector.js
- * @requires OpenLayers/Geometry/Point.js
- * @requires OpenLayers/Geometry/MultiPoint.js
- * @requires OpenLayers/Geometry/LineString.js
- * @requires OpenLayers/Geometry/MultiLineString.js
- * @requires OpenLayers/Geometry/Polygon.js
- * @requires OpenLayers/Geometry/MultiPolygon.js
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Format.GeoJSON
- * Read and write GeoJSON. Create a new parser with the
- *     <OpenLayers.Format.GeoJSON> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Format.JSON>
- */
-OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, {
-
-    /**
-     * APIProperty: ignoreExtraDims
-     * {Boolean} Ignore dimensions higher than 2 when reading geometry
-     * coordinates.
-     */ 
-    ignoreExtraDims: false,
-    
-    /**
-     * Constructor: OpenLayers.Format.GeoJSON
-     * Create a new parser for GeoJSON.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.JSON.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * APIMethod: read
-     * Deserialize a GeoJSON string.
-     *
-     * Parameters:
-     * json - {String} A GeoJSON string
-     * type - {String} Optional string that determines the structure of
-     *     the output.  Supported values are "Geometry", "Feature", and
-     *     "FeatureCollection".  If absent or null, a default of
-     *     "FeatureCollection" is assumed.
-     * filter - {Function} A function which will be called for every key and
-     *     value at every level of the final result. Each value will be
-     *     replaced by the result of the filter function. This can be used to
-     *     reform generic objects into instances of classes, or to transform
-     *     date strings into Date objects.
-     *
-     * Returns: 
-     * {Object} The return depends on the value of the type argument. If type
-     *     is "FeatureCollection" (the default), the return will be an array
-     *     of <OpenLayers.Feature.Vector>. If type is "Geometry", the input json
-     *     must represent a single geometry, and the return will be an
-     *     <OpenLayers.Geometry>.  If type is "Feature", the input json must
-     *     represent a single feature, and the return will be an
-     *     <OpenLayers.Feature.Vector>.
-     */
-    read: function(json, type, filter) {
-        type = (type) ? type : "FeatureCollection";
-        var results = null;
-        var obj = null;
-        if (typeof json == "string") {
-            obj = OpenLayers.Format.JSON.prototype.read.apply(this,
-                                                              [json, filter]);
-        } else { 
-            obj = json;
-        }    
-        if(!obj) {
-            OpenLayers.Console.error("Bad JSON: " + json);
-        } else if(typeof(obj.type) != "string") {
-            OpenLayers.Console.error("Bad GeoJSON - no type: " + json);
-        } else if(this.isValidType(obj, type)) {
-            switch(type) {
-                case "Geometry":
-                    try {
-                        results = this.parseGeometry(obj);
-                    } catch(err) {
-                        OpenLayers.Console.error(err);
-                    }
-                    break;
-                case "Feature":
-                    try {
-                        results = this.parseFeature(obj);
-                        results.type = "Feature";
-                    } catch(err) {
-                        OpenLayers.Console.error(err);
-                    }
-                    break;
-                case "FeatureCollection":
-                    // for type FeatureCollection, we allow input to be any type
-                    results = [];
-                    switch(obj.type) {
-                        case "Feature":
-                            try {
-                                results.push(this.parseFeature(obj));
-                            } catch(err) {
-                                results = null;
-                                OpenLayers.Console.error(err);
-                            }
-                            break;
-                        case "FeatureCollection":
-                            for(var i=0, len=obj.features.length; i<len; ++i) {
-                                try {
-                                    results.push(this.parseFeature(obj.features[i]));
-                                } catch(err) {
-                                    results = null;
-                                    OpenLayers.Console.error(err);
-                                }
-                            }
-                            break;
-                        default:
-                            try {
-                                var geom = this.parseGeometry(obj);
-                                results.push(new OpenLayers.Feature.Vector(geom));
-                            } catch(err) {
-                                results = null;
-                                OpenLayers.Console.error(err);
-                            }
-                    }
-                break;
-            }
-        }
-        return results;
-    },
-    
-    /**
-     * Method: isValidType
-     * Check if a GeoJSON object is a valid representative of the given type.
-     *
-     * Returns:
-     * {Boolean} The object is valid GeoJSON object of the given type.
-     */
-    isValidType: function(obj, type) {
-        var valid = false;
-        switch(type) {
-            case "Geometry":
-                if(OpenLayers.Util.indexOf(
-                    ["Point", "MultiPoint", "LineString", "MultiLineString",
-                     "Polygon", "MultiPolygon", "Box", "GeometryCollection"],
-                    obj.type) == -1) {
-                    // unsupported geometry type
-                    OpenLayers.Console.error("Unsupported geometry type: " +
-                                              obj.type);
-                } else {
-                    valid = true;
-                }
-                break;
-            case "FeatureCollection":
-                // allow for any type to be converted to a feature collection
-                valid = true;
-                break;
-            default:
-                // for Feature types must match
-                if(obj.type == type) {
-                    valid = true;
-                } else {
-                    OpenLayers.Console.error("Cannot convert types from " +
-                                              obj.type + " to " + type);
-                }
-        }
-        return valid;
-    },
-    
-    /**
-     * Method: parseFeature
-     * Convert a feature object from GeoJSON into an
-     *     <OpenLayers.Feature.Vector>.
-     *
-     * Parameters:
-     * obj - {Object} An object created from a GeoJSON object
-     *
-     * Returns:
-     * {<OpenLayers.Feature.Vector>} A feature.
-     */
-    parseFeature: function(obj) {
-        var feature, geometry, attributes, bbox;
-        attributes = (obj.properties) ? obj.properties : {};
-        bbox = (obj.geometry && obj.geometry.bbox) || obj.bbox;
-        try {
-            geometry = this.parseGeometry(obj.geometry);
-        } catch(err) {
-            // deal with bad geometries
-            throw err;
-        }
-        feature = new OpenLayers.Feature.Vector(geometry, attributes);
-        if(bbox) {
-            feature.bounds = OpenLayers.Bounds.fromArray(bbox);
-        }
-        if(obj.id) {
-            feature.fid = obj.id;
-        }
-        return feature;
-    },
-    
-    /**
-     * Method: parseGeometry
-     * Convert a geometry object from GeoJSON into an <OpenLayers.Geometry>.
-     *
-     * Parameters:
-     * obj - {Object} An object created from a GeoJSON object
-     *
-     * Returns: 
-     * {<OpenLayers.Geometry>} A geometry.
-     */
-    parseGeometry: function(obj) {
-        if (obj == null) {
-            return null;
-        }
-        var geometry, collection = false;
-        if(obj.type == "GeometryCollection") {
-            if(!(obj.geometries instanceof Array)) {
-                throw "GeometryCollection must have geometries array: " + obj;
-            }
-            var numGeom = obj.geometries.length;
-            var components = new Array(numGeom);
-            for(var i=0; i<numGeom; ++i) {
-                components[i] = this.parseGeometry.apply(
-                    this, [obj.geometries[i]]
-                );
-            }
-            geometry = new OpenLayers.Geometry.Collection(components);
-            collection = true;
-        } else {
-            if(!(obj.coordinates instanceof Array)) {
-                throw "Geometry must have coordinates array: " + obj;
-            }
-            if(!this.parseCoords[obj.type.toLowerCase()]) {
-                throw "Unsupported geometry type: " + obj.type;
-            }
-            try {
-                geometry = this.parseCoords[obj.type.toLowerCase()].apply(
-                    this, [obj.coordinates]
-                );
-            } catch(err) {
-                // deal with bad coordinates
-                throw err;
-            }
-        }
-        // We don't reproject collections because the children are reprojected
-        // for us when they are created.
-        if (this.internalProjection && this.externalProjection && !collection) {
-            geometry.transform(this.externalProjection, 
-                               this.internalProjection); 
-        }                       
-        return geometry;
-    },
-    
-    /**
-     * Property: parseCoords
-     * Object with properties corresponding to the GeoJSON geometry types.
-     *     Property values are functions that do the actual parsing.
-     */
-    parseCoords: {
-        /**
-         * Method: parseCoords.point
-         * Convert a coordinate array from GeoJSON into an
-         *     <OpenLayers.Geometry>.
-         *
-         * Parameters:
-         * array - {Object} The coordinates array from the GeoJSON fragment.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry>} A geometry.
-         */
-        "point": function(array) {
-            if (this.ignoreExtraDims == false && 
-                  array.length != 2) {
-                    throw "Only 2D points are supported: " + array;
-            }
-            return new OpenLayers.Geometry.Point(array[0], array[1]);
-        },
-        
-        /**
-         * Method: parseCoords.multipoint
-         * Convert a coordinate array from GeoJSON into an
-         *     <OpenLayers.Geometry>.
-         *
-         * Parameters:
-         * array {Object} The coordinates array from the GeoJSON fragment.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry>} A geometry.
-         */
-        "multipoint": function(array) {
-            var points = [];
-            var p = null;
-            for(var i=0, len=array.length; i<len; ++i) {
-                try {
-                    p = this.parseCoords["point"].apply(this, [array[i]]);
-                } catch(err) {
-                    throw err;
-                }
-                points.push(p);
-            }
-            return new OpenLayers.Geometry.MultiPoint(points);
-        },
-
-        /**
-         * Method: parseCoords.linestring
-         * Convert a coordinate array from GeoJSON into an
-         *     <OpenLayers.Geometry>.
-         *
-         * Parameters:
-         * array - {Object} The coordinates array from the GeoJSON fragment.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry>} A geometry.
-         */
-        "linestring": function(array) {
-            var points = [];
-            var p = null;
-            for(var i=0, len=array.length; i<len; ++i) {
-                try {
-                    p = this.parseCoords["point"].apply(this, [array[i]]);
-                } catch(err) {
-                    throw err;
-                }
-                points.push(p);
-            }
-            return new OpenLayers.Geometry.LineString(points);
-        },
-        
-        /**
-         * Method: parseCoords.multilinestring
-         * Convert a coordinate array from GeoJSON into an
-         *     <OpenLayers.Geometry>.
-         *
-         * Parameters:
-         * array - {Object} The coordinates array from the GeoJSON fragment.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry>} A geometry.
-         */
-        "multilinestring": function(array) {
-            var lines = [];
-            var l = null;
-            for(var i=0, len=array.length; i<len; ++i) {
-                try {
-                    l = this.parseCoords["linestring"].apply(this, [array[i]]);
-                } catch(err) {
-                    throw err;
-                }
-                lines.push(l);
-            }
-            return new OpenLayers.Geometry.MultiLineString(lines);
-        },
-        
-        /**
-         * Method: parseCoords.polygon
-         * Convert a coordinate array from GeoJSON into an
-         *     <OpenLayers.Geometry>.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry>} A geometry.
-         */
-        "polygon": function(array) {
-            var rings = [];
-            var r, l;
-            for(var i=0, len=array.length; i<len; ++i) {
-                try {
-                    l = this.parseCoords["linestring"].apply(this, [array[i]]);
-                } catch(err) {
-                    throw err;
-                }
-                r = new OpenLayers.Geometry.LinearRing(l.components);
-                rings.push(r);
-            }
-            return new OpenLayers.Geometry.Polygon(rings);
-        },
-
-        /**
-         * Method: parseCoords.multipolygon
-         * Convert a coordinate array from GeoJSON into an
-         *     <OpenLayers.Geometry>.
-         *
-         * Parameters:
-         * array - {Object} The coordinates array from the GeoJSON fragment.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry>} A geometry.
-         */
-        "multipolygon": function(array) {
-            var polys = [];
-            var p = null;
-            for(var i=0, len=array.length; i<len; ++i) {
-                try {
-                    p = this.parseCoords["polygon"].apply(this, [array[i]]);
-                } catch(err) {
-                    throw err;
-                }
-                polys.push(p);
-            }
-            return new OpenLayers.Geometry.MultiPolygon(polys);
-        },
-
-        /**
-         * Method: parseCoords.box
-         * Convert a coordinate array from GeoJSON into an
-         *     <OpenLayers.Geometry>.
-         *
-         * Parameters:
-         * array - {Object} The coordinates array from the GeoJSON fragment.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry>} A geometry.
-         */
-        "box": function(array) {
-            if(array.length != 2) {
-                throw "GeoJSON box coordinates must have 2 elements";
-            }
-            return new OpenLayers.Geometry.Polygon([
-                new OpenLayers.Geometry.LinearRing([
-                    new OpenLayers.Geometry.Point(array[0][0], array[0][1]),
-                    new OpenLayers.Geometry.Point(array[1][0], array[0][1]),
-                    new OpenLayers.Geometry.Point(array[1][0], array[1][1]),
-                    new OpenLayers.Geometry.Point(array[0][0], array[1][1]),
-                    new OpenLayers.Geometry.Point(array[0][0], array[0][1])
-                ])
-            ]);
-        }
-
-    },
-
-    /**
-     * APIMethod: write
-     * Serialize a feature, geometry, array of features into a GeoJSON string.
-     *
-     * Parameters:
-     * obj - {Object} An <OpenLayers.Feature.Vector>, <OpenLayers.Geometry>,
-     *     or an array of features.
-     * pretty - {Boolean} Structure the output with newlines and indentation.
-     *     Default is false.
-     *
-     * Returns:
-     * {String} The GeoJSON string representation of the input geometry,
-     *     features, or array of features.
-     */
-    write: function(obj, pretty) {
-        var geojson = {
-            "type": null
-        };
-        if(obj instanceof Array) {
-            geojson.type = "FeatureCollection";
-            var numFeatures = obj.length;
-            geojson.features = new Array(numFeatures);
-            for(var i=0; i<numFeatures; ++i) {
-                var element = obj[i];
-                if(!element instanceof OpenLayers.Feature.Vector) {
-                    var msg = "FeatureCollection only supports collections " +
-                              "of features: " + element;
-                    throw msg;
-                }
-                geojson.features[i] = this.extract.feature.apply(
-                    this, [element]
-                );
-            }
-        } else if (obj.CLASS_NAME.indexOf("OpenLayers.Geometry") == 0) {
-            geojson = this.extract.geometry.apply(this, [obj]);
-        } else if (obj instanceof OpenLayers.Feature.Vector) {
-            geojson = this.extract.feature.apply(this, [obj]);
-            if(obj.layer && obj.layer.projection) {
-                geojson.crs = this.createCRSObject(obj);
-            }
-        }
-        return OpenLayers.Format.JSON.prototype.write.apply(this,
-                                                            [geojson, pretty]);
-    },
-
-    /**
-     * Method: createCRSObject
-     * Create the CRS object for an object.
-     *
-     * Parameters:
-     * object - {<OpenLayers.Feature.Vector>} 
-     *
-     * Returns:
-     * {Object} An object which can be assigned to the crs property
-     * of a GeoJSON object.
-     */
-    createCRSObject: function(object) {
-       var proj = object.layer.projection.toString();
-       var crs = {};
-       if (proj.match(/epsg:/i)) {
-           var code = parseInt(proj.substring(proj.indexOf(":") + 1));
-           if (code == 4326) {
-               crs = {
-                   "type": "OGC",
-                   "properties": {
-                       "urn": "urn:ogc:def:crs:OGC:1.3:CRS84"
-                   }
-               };
-           } else {    
-               crs = {
-                   "type": "EPSG",
-                   "properties": {
-                       "code": code 
-                   }
-               };
-           }    
-       }
-       return crs;
-    },
-    
-    /**
-     * Property: extract
-     * Object with properties corresponding to the GeoJSON types.
-     *     Property values are functions that do the actual value extraction.
-     */
-    extract: {
-        /**
-         * Method: extract.feature
-         * Return a partial GeoJSON object representing a single feature.
-         *
-         * Parameters:
-         * feature - {<OpenLayers.Feature.Vector>}
-         *
-         * Returns:
-         * {Object} An object representing the point.
-         */
-        'feature': function(feature) {
-            var geom = this.extract.geometry.apply(this, [feature.geometry]);
-            return {
-                "type": "Feature",
-                "id": feature.fid == null ? feature.id : feature.fid,
-                "properties": feature.attributes,
-                "geometry": geom
-            };
-        },
-        
-        /**
-         * Method: extract.geometry
-         * Return a GeoJSON object representing a single geometry.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry>}
-         *
-         * Returns:
-         * {Object} An object representing the geometry.
-         */
-        'geometry': function(geometry) {
-            if (geometry == null) {
-                return null;
-            }
-            if (this.internalProjection && this.externalProjection) {
-                geometry = geometry.clone();
-                geometry.transform(this.internalProjection, 
-                                   this.externalProjection);
-            }                       
-            var geometryType = geometry.CLASS_NAME.split('.')[2];
-            var data = this.extract[geometryType.toLowerCase()].apply(this, [geometry]);
-            var json;
-            if(geometryType == "Collection") {
-                json = {
-                    "type": "GeometryCollection",
-                    "geometries": data
-                };
-            } else {
-                json = {
-                    "type": geometryType,
-                    "coordinates": data
-                };
-            }
-            
-            return json;
-        },
-
-        /**
-         * Method: extract.point
-         * Return an array of coordinates from a point.
-         *
-         * Parameters:
-         * point - {<OpenLayers.Geometry.Point>}
-         *
-         * Returns: 
-         * {Array} An array of coordinates representing the point.
-         */
-        'point': function(point) {
-            return [point.x, point.y];
-        },
-
-        /**
-         * Method: extract.multipoint
-         * Return an array of point coordinates from a multipoint.
-         *
-         * Parameters:
-         * multipoint - {<OpenLayers.Geometry.MultiPoint>}
-         *
-         * Returns:
-         * {Array} An array of point coordinate arrays representing
-         *     the multipoint.
-         */
-        'multipoint': function(multipoint) {
-            var array = [];
-            for(var i=0, len=multipoint.components.length; i<len; ++i) {
-                array.push(this.extract.point.apply(this, [multipoint.components[i]]));
-            }
-            return array;
-        },
-        
-        /**
-         * Method: extract.linestring
-         * Return an array of coordinate arrays from a linestring.
-         *
-         * Parameters:
-         * linestring - {<OpenLayers.Geometry.LineString>}
-         *
-         * Returns:
-         * {Array} An array of coordinate arrays representing
-         *     the linestring.
-         */
-        'linestring': function(linestring) {
-            var array = [];
-            for(var i=0, len=linestring.components.length; i<len; ++i) {
-                array.push(this.extract.point.apply(this, [linestring.components[i]]));
-            }
-            return array;
-        },
-
-        /**
-         * Method: extract.multilinestring
-         * Return an array of linestring arrays from a linestring.
-         * 
-         * Parameters:
-         * linestring - {<OpenLayers.Geometry.MultiLineString>}
-         * 
-         * Returns:
-         * {Array} An array of linestring arrays representing
-         *     the multilinestring.
-         */
-        'multilinestring': function(multilinestring) {
-            var array = [];
-            for(var i=0, len=multilinestring.components.length; i<len; ++i) {
-                array.push(this.extract.linestring.apply(this, [multilinestring.components[i]]));
-            }
-            return array;
-        },
-        
-        /**
-         * Method: extract.polygon
-         * Return an array of linear ring arrays from a polygon.
-         *
-         * Parameters:
-         * polygon - {<OpenLayers.Geometry.Polygon>}
-         * 
-         * Returns:
-         * {Array} An array of linear ring arrays representing the polygon.
-         */
-        'polygon': function(polygon) {
-            var array = [];
-            for(var i=0, len=polygon.components.length; i<len; ++i) {
-                array.push(this.extract.linestring.apply(this, [polygon.components[i]]));
-            }
-            return array;
-        },
-
-        /**
-         * Method: extract.multipolygon
-         * Return an array of polygon arrays from a multipolygon.
-         * 
-         * Parameters:
-         * multipolygon - {<OpenLayers.Geometry.MultiPolygon>}
-         * 
-         * Returns:
-         * {Array} An array of polygon arrays representing
-         *     the multipolygon
-         */
-        'multipolygon': function(multipolygon) {
-            var array = [];
-            for(var i=0, len=multipolygon.components.length; i<len; ++i) {
-                array.push(this.extract.polygon.apply(this, [multipolygon.components[i]]));
-            }
-            return array;
-        },
-        
-        /**
-         * Method: extract.collection
-         * Return an array of geometries from a geometry collection.
-         * 
-         * Parameters:
-         * collection - {<OpenLayers.Geometry.Collection>}
-         * 
-         * Returns:
-         * {Array} An array of geometry objects representing the geometry
-         *     collection.
-         */
-        'collection': function(collection) {
-            var len = collection.components.length;
-            var array = new Array(len);
-            for(var i=0; i<len; ++i) {
-                array[i] = this.extract.geometry.apply(
-                    this, [collection.components[i]]
-                );
-            }
-            return array;
-        }
-        
-
-    },
-
-    CLASS_NAME: "OpenLayers.Format.GeoJSON" 
-
-});     
-

--- a/labs/openlayers/lib/OpenLayers/Format/GeoRSS.js
+++ /dev/null
@@ -1,421 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Feature/Vector.js
- * @requires OpenLayers/Geometry/Point.js
- * @requires OpenLayers/Geometry/LineString.js
- * @requires OpenLayers/Geometry/Polygon.js
- */
-
-/**
- * Class: OpenLayers.Format.GeoRSS
- * Read/write GeoRSS parser. Create a new instance with the 
- *     <OpenLayers.Format.GeoRSS> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.GeoRSS = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * APIProperty: rssns
-     * {String} RSS namespace to use. Defaults to
-     *   "http://backend.userland.com/rss2"
-     */
-    rssns: "http://backend.userland.com/rss2",
-    
-    /**
-     * APIProperty: featurens
-     * {String} Feature Attributes namespace.  Defaults to
-     *    "http://mapserver.gis.umn.edu/mapserver"
-     */
-    featureNS: "http://mapserver.gis.umn.edu/mapserver",
-    
-    /**
-     * APIProperty: georssns
-     * {String} GeoRSS namespace to use.  Defaults to
-     *     "http://www.georss.org/georss"
-     */
-    georssns: "http://www.georss.org/georss",
-
-    /**
-     * APIProperty: geons
-     * {String} W3C Geo namespace to use.  Defaults to
-     *     "http://www.w3.org/2003/01/geo/wgs84_pos#"
-     */
-    geons: "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    
-    /**
-     * APIProperty: featureTitle
-     * {String} Default title for features.  Defaults to "Untitled"
-     */
-    featureTitle: "Untitled",
-    
-    /**
-     * APIProperty: featureDescription
-     * {String} Default description for features.  Defaults to "No Description"
-     */
-    featureDescription: "No Description",
-    
-    /**
-     * Property: gmlParse
-     * {Object} GML Format object for parsing features
-     * Non-API and only created if necessary
-     */
-    gmlParser: null,
-
-    /**
-     * APIProperty: xy
-     * {Boolean} Order of the GML coordinate: true:(x,y) or false:(y,x)
-     * For GeoRSS the default is (y,x), therefore: false
-     */ 
-    xy: false,
-    
-    /**
-     * Constructor: OpenLayers.Format.GeoRSS
-     * Create a new parser for GeoRSS.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * Method: createGeometryFromItem
-     * Return a geometry from a GeoRSS Item.
-     *
-     * Parameters:
-     * item - {DOMElement} A GeoRSS item node.
-     *
-     * Returns:
-     * {<OpenLayers.Geometry>} A geometry representing the node.
-     */
-    createGeometryFromItem: function(item) {
-        var point = this.getElementsByTagNameNS(item, this.georssns, "point");
-        var lat = this.getElementsByTagNameNS(item, this.geons, 'lat');
-        var lon = this.getElementsByTagNameNS(item, this.geons, 'long');
-        
-        var line = this.getElementsByTagNameNS(item,
-                                                this.georssns,
-                                                "line");
-        var polygon = this.getElementsByTagNameNS(item,
-                                                this.georssns,
-                                                "polygon");
-        var where = this.getElementsByTagNameNS(item, 
-                                                this.georssns, 
-                                                "where");
-        var box = this.getElementsByTagNameNS(item, 
-                                              this.georssns, 
-                                              "box");
-												
-        if (point.length > 0 || (lat.length > 0 && lon.length > 0)) {
-            var location;
-            if (point.length > 0) {
-                location = OpenLayers.String.trim(
-                                point[0].firstChild.nodeValue).split(/\s+/);
-                if (location.length !=2) {
-                    location = OpenLayers.String.trim(
-                                point[0].firstChild.nodeValue).split(/\s*,\s*/);
-                }
-            } else {
-                location = [parseFloat(lat[0].firstChild.nodeValue),
-                                parseFloat(lon[0].firstChild.nodeValue)];
-            }    
-
-            var geometry = new OpenLayers.Geometry.Point(parseFloat(location[1]),
-                                                         parseFloat(location[0]));
-              
-        } else if (line.length > 0) {
-            var coords = OpenLayers.String.trim(this.concatChildValues(line[0])).split(/\s+/);
-            var components = []; 
-            var point;
-            for (var i=0, len=coords.length; i<len; i+=2) {
-                point = new OpenLayers.Geometry.Point(parseFloat(coords[i+1]), 
-                                                     parseFloat(coords[i]));
-                components.push(point);
-            }
-            geometry = new OpenLayers.Geometry.LineString(components);
-        } else if (polygon.length > 0) { 
-            var coords = OpenLayers.String.trim(this.concatChildValues(polygon[0])).split(/\s+/);
-            var components = []; 
-            var point;
-            for (var i=0, len=coords.length; i<len; i+=2) {
-                point = new OpenLayers.Geometry.Point(parseFloat(coords[i+1]), 
-                                                     parseFloat(coords[i]));
-                components.push(point);
-            }
-            geometry = new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]);
-        } else if (where.length > 0) { 
-            if (!this.gmlParser) {
-              this.gmlParser = new OpenLayers.Format.GML({'xy': this.xy});
-            }
-            var feature = this.gmlParser.parseFeature(where[0]);
-            geometry = feature.geometry;
-        } else if (box.length  > 0) {
-            var coords = OpenLayers.String.trim(box[0].firstChild.nodeValue).split(/\s+/);
-            var components = [];
-            var point;
-            if (coords.length > 3) {
-                point = new OpenLayers.Geometry.Point(parseFloat(coords[1]), 
-                                                     parseFloat(coords[0]));
-                components.push(point);
-                point = new OpenLayers.Geometry.Point(parseFloat(coords[1]), 
-                                                     parseFloat(coords[2]));
-                components.push(point);
-                point = new OpenLayers.Geometry.Point(parseFloat(coords[3]), 
-                                                     parseFloat(coords[2]));
-                components.push(point);
-                point = new OpenLayers.Geometry.Point(parseFloat(coords[3]), 
-                                                     parseFloat(coords[0]));
-                components.push(point);
-                point = new OpenLayers.Geometry.Point(parseFloat(coords[1]), 
-                                                     parseFloat(coords[0]));
-                components.push(point);
-            }
-            geometry = new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]);									 
-        }
-        
-        if (geometry && this.internalProjection && this.externalProjection) {
-            geometry.transform(this.externalProjection, 
-                               this.internalProjection);
-        }
-
-        return geometry;
-    },        
-
-    /**
-     * Method: createFeatureFromItem
-     * Return a feature from a GeoRSS Item.
-     *
-     * Parameters:
-     * item - {DOMElement} A GeoRSS item node.
-     *
-     * Returns:
-     * {<OpenLayers.Feature.Vector>} A feature representing the item.
-     */
-    createFeatureFromItem: function(item) {
-        var geometry = this.createGeometryFromItem(item);
-     
-        /* Provide defaults for title and description */
-        var title = this.getChildValue(item, "*", "title", this.featureTitle);
-       
-        /* First try RSS descriptions, then Atom summaries */
-        var description = this.getChildValue(
-            item, "*", "description",
-            this.getChildValue(item, "*", "content",
-                this.getChildValue(item, "*", "summary", this.featureDescription)));
-
-        /* If no link URL is found in the first child node, try the
-           href attribute */
-        var link = this.getChildValue(item, "*", "link");
-        if(!link) {
-            try {
-                link = this.getElementsByTagNameNS(item, "*", "link")[0].getAttribute("href");
-            } catch(e) {
-                link = null;
-            }
-        }
-
-        var id = this.getChildValue(item, "*", "id", null);
-        
-        var data = {
-            "title": title,
-            "description": description,
-            "link": link
-        };
-        var feature = new OpenLayers.Feature.Vector(geometry, data);
-        feature.fid = id;
-        return feature;
-    },        
-    
-    /**
-     * Method: getChildValue
-     *
-     * Parameters:
-     * node - {DOMElement}
-     * nsuri - {String} Child node namespace uri ("*" for any).
-     * name - {String} Child node name.
-     * def - {String} Optional string default to return if no child found.
-     *
-     * Returns:
-     * {String} The value of the first child with the given tag name.  Returns
-     *     default value or empty string if none found.
-     */
-    getChildValue: function(node, nsuri, name, def) {
-        var value;
-        var eles = this.getElementsByTagNameNS(node, nsuri, name);
-        if(eles && eles[0] && eles[0].firstChild
-            && eles[0].firstChild.nodeValue) {
-            value = eles[0].firstChild.nodeValue;
-        } else {
-            value = (def == undefined) ? "" : def;
-        }
-        return value;
-    },
-    
-    /**
-     * APIMethod: read
-     * Return a list of features from a GeoRSS doc
-     
-     * Parameters:
-     * data - {Element} 
-     *
-     * Returns:
-     * An Array of <OpenLayers.Feature.Vector>s
-     */
-    read: function(doc) {
-        if (typeof doc == "string") { 
-            doc = OpenLayers.Format.XML.prototype.read.apply(this, [doc]);
-        }
-
-        /* Try RSS items first, then Atom entries */
-        var itemlist = null;
-        itemlist = this.getElementsByTagNameNS(doc, '*', 'item');
-        if (itemlist.length == 0) {
-            itemlist = this.getElementsByTagNameNS(doc, '*', 'entry');
-        }
-        
-        var numItems = itemlist.length;
-        var features = new Array(numItems);
-        for(var i=0; i<numItems; i++) {
-            features[i] = this.createFeatureFromItem(itemlist[i]);
-        }
-        return features;
-    },
-    
-
-    /**
-     * APIMethod: write
-     * Accept Feature Collection, and return a string. 
-     * 
-     * Parameters: 
-     * features - {Array(<OpenLayers.Feature.Vector>)} List of features to serialize into a string.
-     */
-    write: function(features) {
-        var georss;
-        if(features instanceof Array) {
-            georss = this.createElementNS(this.rssns, "rss");
-            for(var i=0, len=features.length; i<len; i++) {
-                georss.appendChild(this.createFeatureXML(features[i]));
-            }
-        } else {
-            georss = this.createFeatureXML(features);
-        }
-        return OpenLayers.Format.XML.prototype.write.apply(this, [georss]);
-    },
-
-    /**
-     * Method: createFeatureXML
-     * Accept an <OpenLayers.Feature.Vector>, and build a geometry for it.
-     * 
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} 
-     *
-     * Returns:
-     * {DOMElement}
-     */
-    createFeatureXML: function(feature) {
-        var geometryNode = this.buildGeometryNode(feature.geometry);
-        var featureNode = this.createElementNS(this.rssns, "item");
-        var titleNode = this.createElementNS(this.rssns, "title");
-        titleNode.appendChild(this.createTextNode(feature.attributes.title ? feature.attributes.title : ""));
-        var descNode = this.createElementNS(this.rssns, "description");
-        descNode.appendChild(this.createTextNode(feature.attributes.description ? feature.attributes.description : ""));
-        featureNode.appendChild(titleNode);
-        featureNode.appendChild(descNode);
-        if (feature.attributes.link) {
-            var linkNode = this.createElementNS(this.rssns, "link");
-            linkNode.appendChild(this.createTextNode(feature.attributes.link));
-            featureNode.appendChild(linkNode);
-        }    
-        for(var attr in feature.attributes) {
-            if (attr == "link" || attr == "title" || attr == "description") { continue; } 
-            var attrText = this.createTextNode(feature.attributes[attr]); 
-            var nodename = attr;
-            if (attr.search(":") != -1) {
-                nodename = attr.split(":")[1];
-            }    
-            var attrContainer = this.createElementNS(this.featureNS, "feature:"+nodename);
-            attrContainer.appendChild(attrText);
-            featureNode.appendChild(attrContainer);
-        }    
-        featureNode.appendChild(geometryNode);
-        return featureNode;
-    },    
-    
-    /** 
-     * Method: buildGeometryNode
-     * builds a GeoRSS node with a given geometry
-     * 
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     *
-     * Returns:
-     * {DOMElement} A gml node.
-     */
-    buildGeometryNode: function(geometry) {
-        if (this.internalProjection && this.externalProjection) {
-            geometry = geometry.clone();
-            geometry.transform(this.internalProjection, 
-                               this.externalProjection);
-        }
-        var node;
-        // match Polygon
-        if (geometry.CLASS_NAME == "OpenLayers.Geometry.Polygon") {
-            node = this.createElementNS(this.georssns, 'georss:polygon');
-            
-            node.appendChild(this.buildCoordinatesNode(geometry.components[0]));
-        }
-        // match LineString
-        else if (geometry.CLASS_NAME == "OpenLayers.Geometry.LineString") {
-            node = this.createElementNS(this.georssns, 'georss:line');
-            
-            node.appendChild(this.buildCoordinatesNode(geometry));
-        }
-        // match Point
-        else if (geometry.CLASS_NAME == "OpenLayers.Geometry.Point") {
-            node = this.createElementNS(this.georssns, 'georss:point');
-            node.appendChild(this.buildCoordinatesNode(geometry));
-        } else {
-            throw "Couldn't parse " + geometry.CLASS_NAME;
-        }  
-        return node;         
-    },
-    
-    /** 
-     * Method: buildCoordinatesNode
-     * 
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     */
-    buildCoordinatesNode: function(geometry) {
-        var points = null;
-        
-        if (geometry.components) {
-            points = geometry.components;
-        }
-
-        var path;
-        if (points) {
-            var numPoints = points.length;
-            var parts = new Array(numPoints);
-            for (var i = 0; i < numPoints; i++) {
-                parts[i] = points[i].y + " " + points[i].x;
-            }
-            path = parts.join(" ");
-        } else {
-            path = geometry.y + " " + geometry.x;
-        }
-        return this.createTextNode(path);
-    },
-
-    CLASS_NAME: "OpenLayers.Format.GeoRSS" 
-});     
-

--- a/labs/openlayers/lib/OpenLayers/Format/JSON.js
+++ /dev/null
@@ -1,390 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * Note:
- * This work draws heavily from the public domain JSON serializer/deserializer
- *     at http://www.json.org/json.js. Rewritten so that it doesn't modify
- *     basic data prototypes.
- */
-
-/**
- * @requires OpenLayers/Format.js
- */
-
-/**
- * Class: OpenLayers.Format.JSON
- * A parser to read/write JSON safely.  Create a new instance with the
- *     <OpenLayers.Format.JSON> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Format>
- */
-OpenLayers.Format.JSON = OpenLayers.Class(OpenLayers.Format, {
-    
-    /**
-     * APIProperty: indent
-     * {String} For "pretty" printing, the indent string will be used once for
-     *     each indentation level.
-     */
-    indent: "    ",
-    
-    /**
-     * APIProperty: space
-     * {String} For "pretty" printing, the space string will be used after
-     *     the ":" separating a name/value pair.
-     */
-    space: " ",
-    
-    /**
-     * APIProperty: newline
-     * {String} For "pretty" printing, the newline string will be used at the
-     *     end of each name/value pair or array item.
-     */
-    newline: "\n",
-    
-    /**
-     * Property: level
-     * {Integer} For "pretty" printing, this is incremented/decremented during
-     *     serialization.
-     */
-    level: 0,
-
-    /**
-     * Property: pretty
-     * {Boolean} Serialize with extra whitespace for structure.  This is set
-     *     by the <write> method.
-     */
-    pretty: false,
-
-    /**
-     * Constructor: OpenLayers.Format.JSON
-     * Create a new parser for JSON.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * APIMethod: read
-     * Deserialize a json string.
-     *
-     * Parameters:
-     * json - {String} A JSON string
-     * filter - {Function} A function which will be called for every key and
-     *     value at every level of the final result. Each value will be
-     *     replaced by the result of the filter function. This can be used to
-     *     reform generic objects into instances of classes, or to transform
-     *     date strings into Date objects.
-     *     
-     * Returns:
-     * {Object} An object, array, string, or number .
-     */
-    read: function(json, filter) {
-        /**
-         * Parsing happens in three stages. In the first stage, we run the text
-         *     against a regular expression which looks for non-JSON
-         *     characters. We are especially concerned with '()' and 'new'
-         *     because they can cause invocation, and '=' because it can cause
-         *     mutation. But just to be safe, we will reject all unexpected
-         *     characters.
-         */
-        try {
-            if (/^[\],:{}\s]*$/.test(json.replace(/\\["\\\/bfnrtu]/g, '@').
-                                replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
-                                replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
-
-                /**
-                 * In the second stage we use the eval function to compile the
-                 *     text into a JavaScript structure. The '{' operator is
-                 *     subject to a syntactic ambiguity in JavaScript - it can
-                 *     begin a block or an object literal. We wrap the text in
-                 *     parens to eliminate the ambiguity.
-                 */
-                var object = eval('(' + json + ')');
-
-                /**
-                 * In the optional third stage, we recursively walk the new
-                 *     structure, passing each name/value pair to a filter
-                 *     function for possible transformation.
-                 */
-                if(typeof filter === 'function') {
-                    function walk(k, v) {
-                        if(v && typeof v === 'object') {
-                            for(var i in v) {
-                                if(v.hasOwnProperty(i)) {
-                                    v[i] = walk(i, v[i]);
-                                }
-                            }
-                        }
-                        return filter(k, v);
-                    }
-                    object = walk('', object);
-                }
-
-                if(this.keepData) {
-                    this.data = object;
-                }
-
-                return object;
-            }
-        } catch(e) {
-            // Fall through if the regexp test fails.
-        }
-        return null;
-    },
-
-    /**
-     * APIMethod: write
-     * Serialize an object into a JSON string.
-     *
-     * Parameters:
-     * value - {String} The object, array, string, number, boolean or date
-     *     to be serialized.
-     * pretty - {Boolean} Structure the output with newlines and indentation.
-     *     Default is false.
-     *
-     * Returns:
-     * {String} The JSON string representation of the input value.
-     */
-    write: function(value, pretty) {
-        this.pretty = !!pretty;
-        var json = null;
-        var type = typeof value;
-        if(this.serialize[type]) {
-            try {
-                json = this.serialize[type].apply(this, [value]);
-            } catch(err) {
-                OpenLayers.Console.error("Trouble serializing: " + err);
-            }
-        }
-        return json;
-    },
-    
-    /**
-     * Method: writeIndent
-     * Output an indentation string depending on the indentation level.
-     *
-     * Returns:
-     * {String} An appropriate indentation string.
-     */
-    writeIndent: function() {
-        var pieces = [];
-        if(this.pretty) {
-            for(var i=0; i<this.level; ++i) {
-                pieces.push(this.indent);
-            }
-        }
-        return pieces.join('');
-    },
-    
-    /**
-     * Method: writeNewline
-     * Output a string representing a newline if in pretty printing mode.
-     *
-     * Returns:
-     * {String} A string representing a new line.
-     */
-    writeNewline: function() {
-        return (this.pretty) ? this.newline : '';
-    },
-    
-    /**
-     * Method: writeSpace
-     * Output a string representing a space if in pretty printing mode.
-     *
-     * Returns:
-     * {String} A space.
-     */
-    writeSpace: function() {
-        return (this.pretty) ? this.space : '';
-    },
-
-    /**
-     * Property: serialize
-     * Object with properties corresponding to the serializable data types.
-     *     Property values are functions that do the actual serializing.
-     */
-    serialize: {
-        /**
-         * Method: serialize.object
-         * Transform an object into a JSON string.
-         *
-         * Parameters:
-         * object - {Object} The object to be serialized.
-         * 
-         * Returns:
-         * {String} A JSON string representing the object.
-         */
-        'object': function(object) {
-            // three special objects that we want to treat differently
-            if(object == null) {
-                return "null";
-            }
-            if(object.constructor == Date) {
-                return this.serialize.date.apply(this, [object]);
-            }
-            if(object.constructor == Array) {
-                return this.serialize.array.apply(this, [object]);
-            }
-            var pieces = ['{'];
-            this.level += 1;
-            var key, keyJSON, valueJSON;
-            
-            var addComma = false;
-            for(key in object) {
-                if(object.hasOwnProperty(key)) {
-                    // recursive calls need to allow for sub-classing
-                    keyJSON = OpenLayers.Format.JSON.prototype.write.apply(this,
-                                                    [key, this.pretty]);
-                    valueJSON = OpenLayers.Format.JSON.prototype.write.apply(this,
-                                                    [object[key], this.pretty]);
-                    if(keyJSON != null && valueJSON != null) {
-                        if(addComma) {
-                            pieces.push(',');
-                        }
-                        pieces.push(this.writeNewline(), this.writeIndent(),
-                                    keyJSON, ':', this.writeSpace(), valueJSON);
-                        addComma = true;
-                    }
-                }
-            }
-            
-            this.level -= 1;
-            pieces.push(this.writeNewline(), this.writeIndent(), '}');
-            return pieces.join('');
-        },
-        
-        /**
-         * Method: serialize.array
-         * Transform an array into a JSON string.
-         *
-         * Parameters:
-         * array - {Array} The array to be serialized
-         * 
-         * Returns:
-         * {String} A JSON string representing the array.
-         */
-        'array': function(array) {
-            var json;
-            var pieces = ['['];
-            this.level += 1;
-    
-            for(var i=0, len=array.length; i<len; ++i) {
-                // recursive calls need to allow for sub-classing
-                json = OpenLayers.Format.JSON.prototype.write.apply(this,
-                                                    [array[i], this.pretty]);
-                if(json != null) {
-                    if(i > 0) {
-                        pieces.push(',');
-                    }
-                    pieces.push(this.writeNewline(), this.writeIndent(), json);
-                }
-            }
-
-            this.level -= 1;    
-            pieces.push(this.writeNewline(), this.writeIndent(), ']');
-            return pieces.join('');
-        },
-        
-        /**
-         * Method: serialize.string
-         * Transform a string into a JSON string.
-         *
-         * Parameters:
-         * string - {String} The string to be serialized
-         * 
-         * Returns:
-         * {String} A JSON string representing the string.
-         */
-        'string': function(string) {
-            // If the string contains no control characters, no quote characters, and no
-            // backslash characters, then we can simply slap some quotes around it.
-            // Otherwise we must also replace the offending characters with safe
-            // sequences.    
-            var m = {
-                '\b': '\\b',
-                '\t': '\\t',
-                '\n': '\\n',
-                '\f': '\\f',
-                '\r': '\\r',
-                '"' : '\\"',
-                '\\': '\\\\'
-            };
-            if(/["\\\x00-\x1f]/.test(string)) {
-                return '"' + string.replace(/([\x00-\x1f\\"])/g, function(a, b) {
-                    var c = m[b];
-                    if(c) {
-                        return c;
-                    }
-                    c = b.charCodeAt();
-                    return '\\u00' +
-                        Math.floor(c / 16).toString(16) +
-                        (c % 16).toString(16);
-                }) + '"';
-            }
-            return '"' + string + '"';
-        },
-
-        /**
-         * Method: serialize.number
-         * Transform a number into a JSON string.
-         *
-         * Parameters:
-         * number - {Number} The number to be serialized.
-         *
-         * Returns:
-         * {String} A JSON string representing the number.
-         */
-        'number': function(number) {
-            return isFinite(number) ? String(number) : "null";
-        },
-        
-        /**
-         * Method: serialize.boolean
-         * Transform a boolean into a JSON string.
-         *
-         * Parameters:
-         * bool - {Boolean} The boolean to be serialized.
-         * 
-         * Returns:
-         * {String} A JSON string representing the boolean.
-         */
-        'boolean': function(bool) {
-            return String(bool);
-        },
-        
-        /**
-         * Method: serialize.object
-         * Transform a date into a JSON string.
-         *
-         * Parameters:
-         * date - {Date} The date to be serialized.
-         * 
-         * Returns:
-         * {String} A JSON string representing the date.
-         */
-        'date': function(date) {    
-            function format(number) {
-                // Format integers to have at least two digits.
-                return (number < 10) ? '0' + number : number;
-            }
-            return '"' + date.getFullYear() + '-' +
-                    format(date.getMonth() + 1) + '-' +
-                    format(date.getDate()) + 'T' +
-                    format(date.getHours()) + ':' +
-                    format(date.getMinutes()) + ':' +
-                    format(date.getSeconds()) + '"';
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Format.JSON" 
-
-});     
-

--- a/labs/openlayers/lib/OpenLayers/Format/KML.js
+++ /dev/null
@@ -1,1430 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Feature/Vector.js
- * @requires OpenLayers/Geometry/Point.js
- * @requires OpenLayers/Geometry/LineString.js
- * @requires OpenLayers/Geometry/Polygon.js
- * @requires OpenLayers/Geometry/Collection.js
- * @requires OpenLayers/Request/XMLHttpRequest.js
- * @requires OpenLayers/Console.js
- * @requires OpenLayers/Projection.js
- */
-
-/**
- * Class: OpenLayers.Format.KML
- * Read/Write KML. Create a new instance with the <OpenLayers.Format.KML>
- *     constructor. 
- * 
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        kml: "http://www.opengis.net/kml/2.2",
-        gx: "http://www.google.com/kml/ext/2.2"
-    },
-
-    /**
-     * APIProperty: kmlns
-     * {String} KML Namespace to use. Defaults to 2.0 namespace.
-     */
-    kmlns: "http://earth.google.com/kml/2.0",
-    
-    /** 
-     * APIProperty: placemarksDesc
-     * {String} Name of the placemarks.  Default is "No description available".
-     */
-    placemarksDesc: "No description available",
-    
-    /** 
-     * APIProperty: foldersName
-     * {String} Name of the folders.  Default is "OpenLayers export".
-     *          If set to null, no name element will be created.
-     */
-    foldersName: "OpenLayers export",
-    
-    /** 
-     * APIProperty: foldersDesc
-     * {String} Description of the folders. Default is "Exported on [date]."
-     *          If set to null, no description element will be created.
-     */
-    foldersDesc: "Exported on " + new Date(),
-    
-    /**
-     * APIProperty: extractAttributes
-     * {Boolean} Extract attributes from KML.  Default is true.
-     *           Extracting styleUrls requires this to be set to true
-     */
-    extractAttributes: true,
-    
-    /**
-     * Property: extractStyles
-     * {Boolean} Extract styles from KML.  Default is false.
-     *           Extracting styleUrls also requires extractAttributes to be
-     *           set to true
-     */
-    extractStyles: false,
-    
-    /**
-     * APIProperty: extractTracks
-     * {Boolean} Extract gx:Track elements from Placemark elements.  Default
-     *     is false.  If true, features will be generated for all points in
-     *     all gx:Track elements.  Features will have a when (Date) attribute
-     *     based on when elements in the track.  If tracks include angle
-     *     elements, features will have heading, tilt, and roll attributes.
-     *     If track point coordinates have three values, features will have
-     *     an altitude attribute with the third coordinate value.
-     */
-    extractTracks: false,
-    
-    /**
-     * APIProperty: trackAttributes
-     * {Array} If <extractTracks> is true, points within gx:Track elements will 
-     *     be parsed as features with when, heading, tilt, and roll attributes.
-     *     Any additional attribute names can be provided in <trackAttributes>.
-     */
-    trackAttributes: null,
-    
-    /**
-     * Property: internalns
-     * {String} KML Namespace to use -- defaults to the namespace of the
-     *     Placemark node being parsed, but falls back to kmlns. 
-     */
-    internalns: null,
-
-    /**
-     * Property: features
-     * {Array} Array of features
-     *     
-     */
-    features: null,
-
-    /**
-     * Property: styles
-     * {Object} Storage of style objects
-     *     
-     */
-    styles: null,
-    
-    /**
-     * Property: styleBaseUrl
-     * {String}
-     */
-    styleBaseUrl: "",
-
-    /**
-     * Property: fetched
-     * {Object} Storage of KML URLs that have been fetched before
-     *     in order to prevent reloading them.
-     */
-    fetched: null,
-
-    /**
-     * APIProperty: maxDepth
-     * {Integer} Maximum depth for recursive loading external KML URLs 
-     *           Defaults to 0: do no external fetching
-     */
-    maxDepth: 0,
-
-    /**
-     * Constructor: OpenLayers.Format.KML
-     * Create a new parser for KML.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        // compile regular expressions once instead of every time they are used
-        this.regExes = {
-            trimSpace: (/^\s*|\s*$/g),
-            removeSpace: (/\s*/g),
-            splitSpace: (/\s+/),
-            trimComma: (/\s*,\s*/g),
-            kmlColor: (/(\w{2})(\w{2})(\w{2})(\w{2})/),
-            kmlIconPalette: (/root:\/\/icons\/palette-(\d+)(\.\w+)/),
-            straightBracket: (/\$\[(.*?)\]/g)
-        };
-        // KML coordinates are always in longlat WGS84
-        this.externalProjection = new OpenLayers.Projection("EPSG:4326");
-
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * APIMethod: read
-     * Read data from a string, and return a list of features. 
-     * 
-     * Parameters: 
-     * data    - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Feature.Vector>)} List of features.
-     */
-    read: function(data) {
-        this.features = [];
-        this.styles   = {};
-        this.fetched  = {};
-
-        // Set default options 
-        var options = {
-            depth: 0,
-            styleBaseUrl: this.styleBaseUrl
-        };
-
-        return this.parseData(data, options);
-    },
-
-    /**
-     * Method: parseData
-     * Read data from a string, and return a list of features. 
-     * 
-     * Parameters: 
-     * data    - {String} or {DOMElement} data to read/parse.
-     * options - {Object} Hash of options
-     *
-     * Returns:
-     * {Array(<OpenLayers.Feature.Vector>)} List of features.
-     */
-    parseData: function(data, options) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-
-        // Loop throught the following node types in this order and
-        // process the nodes found 
-        var types = ["Link", "NetworkLink", "Style", "StyleMap", "Placemark"];
-        for(var i=0, len=types.length; i<len; ++i) {
-            var type = types[i];
-
-            var nodes = this.getElementsByTagNameNS(data, "*", type);
-
-            // skip to next type if no nodes are found
-            if(nodes.length == 0) { 
-                continue;
-            }
-
-            switch (type.toLowerCase()) {
-
-                // Fetch external links 
-                case "link":
-                case "networklink":
-                    this.parseLinks(nodes, options);
-                    break;
-
-                // parse style information
-                case "style":
-                    if (this.extractStyles) {
-                        this.parseStyles(nodes, options);
-                    }
-                    break;
-                case "stylemap":
-                    if (this.extractStyles) {
-                        this.parseStyleMaps(nodes, options);
-                    }
-                    break;
-
-                // parse features
-                case "placemark":
-                    this.parseFeatures(nodes, options);
-                    break;
-            }
-        }
-        
-        return this.features;
-    },
-
-    /**
-     * Method: parseLinks
-     * Finds URLs of linked KML documents and fetches them
-     * 
-     * Parameters: 
-     * nodes   - {Array} of {DOMElement} data to read/parse.
-     * options - {Object} Hash of options
-     * 
-     */
-    parseLinks: function(nodes, options) {
-        
-        // Fetch external links <NetworkLink> and <Link>
-        // Don't do anything if we have reached our maximum depth for recursion
-        if (options.depth >= this.maxDepth) {
-            return false;
-        }
-
-        // increase depth
-        var newOptions = OpenLayers.Util.extend({}, options);
-        newOptions.depth++;
-
-        for(var i=0, len=nodes.length; i<len; i++) {
-            var href = this.parseProperty(nodes[i], "*", "href");
-            if(href && !this.fetched[href]) {
-                this.fetched[href] = true; // prevent reloading the same urls
-                var data = this.fetchLink(href);
-                if (data) {
-                    this.parseData(data, newOptions);
-                }
-            } 
-        }
-
-    },
-
-    /**
-     * Method: fetchLink
-     * Fetches a URL and returns the result
-     * 
-     * Parameters: 
-     * href  - {String} url to be fetched
-     * 
-     */
-    fetchLink: function(href) {
-        var request = OpenLayers.Request.GET({url: href, async: false});
-        if (request) {
-            return request.responseText;
-        }
-    },
-
-    /**
-     * Method: parseStyles
-     * Looks for <Style> nodes in the data and parses them
-     * Also parses <StyleMap> nodes, but only uses the 'normal' key
-     * 
-     * Parameters: 
-     * nodes    - {Array} of {DOMElement} data to read/parse.
-     * options  - {Object} Hash of options
-     * 
-     */
-    parseStyles: function(nodes, options) {
-        for(var i=0, len=nodes.length; i<len; i++) {
-            var style = this.parseStyle(nodes[i]);
-            if(style) {
-                var styleName = (options.styleBaseUrl || "") + "#" + style.id;
-                
-                this.styles[styleName] = style;
-            }
-        }
-    },
-
-    /**
-     * Method: parseKmlColor
-     * Parses a kml color (in 'aabbggrr' format) and returns the corresponding 
-     * color and opacity or null if the color is invalid.
-     *
-     * Parameters: 
-     * kmlColor - {String} a kml formated color
-     *
-     * Returns:
-     * {Object}
-     */
-    parseKmlColor: function(kmlColor) {
-        var color = null;
-        if (kmlColor) {
-            var matches = kmlColor.match(this.regExes.kmlColor);
-            if (matches) {
-                color = {
-                    color: '#' + matches[4] + matches[3] + matches[2],
-                    opacity: parseInt(matches[1], 16) / 255
-                };
-            }
-        }
-        return color;
-    },
-
-    /**
-     * Method: parseStyle
-     * Parses the children of a <Style> node and builds the style hash
-     * accordingly
-     * 
-     * Parameters: 
-     * node - {DOMElement} <Style> node
-     * 
-     */
-    parseStyle: function(node) {
-        var style = {};
-        
-        var types = ["LineStyle", "PolyStyle", "IconStyle", "BalloonStyle", 
-                     "LabelStyle"];
-        var type, nodeList, geometry, parser;
-        for(var i=0, len=types.length; i<len; ++i) {
-            type = types[i];
-            styleTypeNode = this.getElementsByTagNameNS(node, 
-                                                   "*", type)[0];
-            if(!styleTypeNode) { 
-                continue;
-            }
-
-            // only deal with first geometry of this type
-            switch (type.toLowerCase()) {
-                case "linestyle":
-                    var kmlColor = this.parseProperty(styleTypeNode, "*", "color");
-                    var color = this.parseKmlColor(kmlColor);
-                    if (color) {
-                        style["strokeColor"] = color.color;
-                        style["strokeOpacity"] = color.opacity;
-                    }
-                    
-                    var width = this.parseProperty(styleTypeNode, "*", "width");
-                    if (width) {
-                        style["strokeWidth"] = width;
-                    }
-                    break;
-
-                case "polystyle":
-                    var kmlColor = this.parseProperty(styleTypeNode, "*", "color");
-                    var color = this.parseKmlColor(kmlColor);
-                    if (color) {
-                        style["fillOpacity"] = color.opacity;
-                        style["fillColor"] = color.color;
-                    }
-                    // Check if fill is disabled
-                    var fill = this.parseProperty(styleTypeNode, "*", "fill");
-                    if (fill == "0") {
-                        style["fillColor"] = "none";
-                    }
-                    // Check if outline is disabled
-                    var outline = this.parseProperty(styleTypeNode, "*", "outline");
-                    if (outline == "0") {
-                        style["strokeWidth"] = "0";
-                    }
-                   
-                    break;
-
-                case "iconstyle":
-                    // set scale
-                    var scale = parseFloat(this.parseProperty(styleTypeNode, 
-                                                          "*", "scale") || 1);
-  
-                    // set default width and height of icon
-                    var width = 32 * scale;
-                    var height = 32 * scale;
-
-                    var iconNode = this.getElementsByTagNameNS(styleTypeNode, 
-                                               "*", 
-                                               "Icon")[0];
-                    if (iconNode) {
-                        var href = this.parseProperty(iconNode, "*", "href");
-                        if (href) {                                                   
-
-                            var w = this.parseProperty(iconNode, "*", "w");
-                            var h = this.parseProperty(iconNode, "*", "h");
-
-                            // Settings for Google specific icons that are 64x64
-                            // We set the width and height to 64 and halve the
-                            // scale to prevent icons from being too big
-                            var google = "http://maps.google.com/mapfiles/kml";
-                            if (OpenLayers.String.startsWith(
-                                                 href, google) && !w && !h) {
-                                w = 64;
-                                h = 64;
-                                scale = scale / 2;
-                            }
-                                
-                            // if only dimension is defined, make sure the
-                            // other one has the same value
-                            w = w || h;
-                            h = h || w;
-
-                            if (w) {
-                                width = parseInt(w) * scale;
-                            }
-
-                            if (h) {
-                                height = parseInt(h) * scale;
-                            }
-
-                            // support for internal icons 
-                            //    (/root://icons/palette-x.png)
-                            // x and y tell the position on the palette:
-                            // - in pixels
-                            // - starting from the left bottom
-                            // We translate that to a position in the list 
-                            // and request the appropriate icon from the 
-                            // google maps website
-                            var matches = href.match(this.regExes.kmlIconPalette);
-                            if (matches)  {
-                                var palette = matches[1];
-                                var file_extension = matches[2];
-
-                                var x = this.parseProperty(iconNode, "*", "x");
-                                var y = this.parseProperty(iconNode, "*", "y");
-
-                                var posX = x ? x/32 : 0;
-                                var posY = y ? (7 - y/32) : 7;
-
-                                var pos = posY * 8 + posX;
-                                href = "http://maps.google.com/mapfiles/kml/pal" 
-                                     + palette + "/icon" + pos + file_extension;
-                            }
-
-                            style["graphicOpacity"] = 1; // fully opaque
-                            style["externalGraphic"] = href;
-                        }
-
-                    }
-
-
-                    // hotSpots define the offset for an Icon
-                    var hotSpotNode = this.getElementsByTagNameNS(styleTypeNode, 
-                                               "*", 
-                                               "hotSpot")[0];
-                    if (hotSpotNode) {
-                        var x = parseFloat(hotSpotNode.getAttribute("x"));
-                        var y = parseFloat(hotSpotNode.getAttribute("y"));
-
-                        var xUnits = hotSpotNode.getAttribute("xunits");
-                        if (xUnits == "pixels") {
-                            style["graphicXOffset"] = -x * scale;
-                        }
-                        else if (xUnits == "insetPixels") {
-                            style["graphicXOffset"] = -width + (x * scale);
-                        }
-                        else if (xUnits == "fraction") {
-                            style["graphicXOffset"] = -width * x;
-                        }
-
-                        var yUnits = hotSpotNode.getAttribute("yunits");
-                        if (yUnits == "pixels") {
-                            style["graphicYOffset"] = -height + (y * scale) + 1;
-                        }
-                        else if (yUnits == "insetPixels") {
-                            style["graphicYOffset"] = -(y * scale) + 1;
-                        }
-                        else if (yUnits == "fraction") {
-                            style["graphicYOffset"] =  -height * (1 - y) + 1;
-                        }
-                    }
-
-                    style["graphicWidth"] = width;
-                    style["graphicHeight"] = height;
-                    break;
-
-                case "balloonstyle":
-                    var balloonStyle = OpenLayers.Util.getXmlNodeValue(
-                                            styleTypeNode);
-                    if (balloonStyle) {
-                        style["balloonStyle"] = balloonStyle.replace(
-                                       this.regExes.straightBracket, "${$1}");
-                    }
-                    break;
-                case "labelstyle":
-                    var kmlColor = this.parseProperty(styleTypeNode, "*", "color");
-                    var color = this.parseKmlColor(kmlColor);
-                    if (color) {
-                        style["fontColor"] = color.color;
-                        style["fontOpacity"] = color.opacity;
-                    }
-                    break;
-
-                default:
-            }
-        }
-
-        // Some polygons have no line color, so we use the fillColor for that
-        if (!style["strokeColor"] && style["fillColor"]) {
-            style["strokeColor"] = style["fillColor"];
-        }
-
-        var id = node.getAttribute("id");
-        if (id && style) {
-            style.id = id;
-        }
-
-        return style;
-    },
-
-    /**
-     * Method: parseStyleMaps
-     * Looks for <Style> nodes in the data and parses them
-     * Also parses <StyleMap> nodes, but only uses the 'normal' key
-     * 
-     * Parameters: 
-     * nodes    - {Array} of {DOMElement} data to read/parse.
-     * options  - {Object} Hash of options
-     * 
-     */
-    parseStyleMaps: function(nodes, options) {
-        // Only the default or "normal" part of the StyleMap is processed now
-        // To do the select or "highlight" bit, we'd need to change lots more
-
-        for(var i=0, len=nodes.length; i<len; i++) {
-            var node = nodes[i];
-            var pairs = this.getElementsByTagNameNS(node, "*", 
-                            "Pair");
-
-            var id = node.getAttribute("id");
-            for (var j=0, jlen=pairs.length; j<jlen; j++) {
-                var pair = pairs[j];
-                // Use the shortcut in the SLD format to quickly retrieve the 
-                // value of a node. Maybe it's good to have a method in 
-                // Format.XML to do this
-                var key = this.parseProperty(pair, "*", "key");
-                var styleUrl = this.parseProperty(pair, "*", "styleUrl");
-
-                if (styleUrl && key == "normal") {
-                    this.styles[(options.styleBaseUrl || "") + "#" + id] =
-                        this.styles[(options.styleBaseUrl || "") + styleUrl];
-                }
-
-                if (styleUrl && key == "highlight") {
-                    // TODO: implement the "select" part
-                }
-
-            }
-        }
-
-    },
-
-
-    /**
-     * Method: parseFeatures
-     * Loop through all Placemark nodes and parse them.
-     * Will create a list of features
-     * 
-     * Parameters: 
-     * nodes    - {Array} of {DOMElement} data to read/parse.
-     * options  - {Object} Hash of options
-     * 
-     */
-    parseFeatures: function(nodes, options) {
-        var features = [];
-        for(var i=0, len=nodes.length; i<len; i++) {
-            var featureNode = nodes[i];
-            var feature = this.parseFeature.apply(this,[featureNode]) ;
-            if(feature) {
-
-                // Create reference to styleUrl 
-                if (this.extractStyles && feature.attributes &&
-                    feature.attributes.styleUrl) {
-                    feature.style = this.getStyle(feature.attributes.styleUrl, options);
-                }
-
-                if (this.extractStyles) {
-                    // Make sure that <Style> nodes within a placemark are 
-                    // processed as well
-                    var inlineStyleNode = this.getElementsByTagNameNS(featureNode,
-                                                        "*",
-                                                        "Style")[0];
-                    if (inlineStyleNode) {
-                        var inlineStyle= this.parseStyle(inlineStyleNode);
-                        if (inlineStyle) {
-                            feature.style = OpenLayers.Util.extend(
-                                feature.style, inlineStyle
-                            );
-                        }
-                    }
-                }
-
-                // check if gx:Track elements should be parsed
-                if (this.extractTracks) {
-                    var tracks = this.getElementsByTagNameNS(
-                        featureNode, this.namespaces.gx, "Track"
-                    );
-                    if (tracks && tracks.length > 0) {
-                        var track = tracks[0];
-                        var container = {
-                            features: [],
-                            feature: feature
-                        };
-                        this.readNode(track, container);
-                        if (container.features.length > 0) {
-                            features.push.apply(features, container.features);
-                        }
-                    }
-                } else {
-                    // add feature to list of features
-                    features.push(feature);                    
-                }
-            } else {
-                throw "Bad Placemark: " + i;
-            }
-        }
-
-        // add new features to existing feature list
-        this.features = this.features.concat(features);
-    },
-    
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "kml": {
-            "when": function(node, container) {
-                container.whens.push(OpenLayers.Date.parse(
-                    this.getChildValue(node)
-                ));
-            },
-            "_trackPointAttribute": function(node, container) {
-                var name = node.nodeName.split(":").pop();
-                container.attributes[name].push(this.getChildValue(node));
-            }
-        },
-        "gx": {
-            "Track": function(node, container) {
-                var obj = {
-                    whens: [],
-                    points: [],
-                    angles: []
-                };
-                if (this.trackAttributes) {
-                    var name;
-                    obj.attributes = {};
-                    for (var i=0, ii=this.trackAttributes.length; i<ii; ++i) {
-                        name = this.trackAttributes[i];
-                        obj.attributes[name] = [];
-                        if (!(name in this.readers.kml)) {
-                            this.readers.kml[name] = this.readers.kml._trackPointAttribute;
-                        }
-                    }
-                }
-                this.readChildNodes(node, obj);
-                if (obj.whens.length !== obj.points.length) {
-                    throw new Error("gx:Track with unequal number of when (" + obj.whens.length + ") and gx:coord (" + obj.points.length + ") elements.");
-                }
-                var hasAngles = obj.angles.length > 0;
-                if (hasAngles && obj.whens.length !== obj.angles.length) {
-                    throw new Error("gx:Track with unequal number of when (" + obj.whens.length + ") and gx:angles (" + obj.angles.length + ") elements.");
-                }
-                var feature, point, angles;
-                for (var i=0, ii=obj.whens.length; i<ii; ++i) {
-                    feature = container.feature.clone();
-                    feature.fid = container.feature.fid || container.feature.id;
-                    point = obj.points[i];
-                    feature.geometry = point;
-                    if ("z" in point) {
-                        feature.attributes.altitude = point.z;
-                    }
-                    if (this.internalProjection && this.externalProjection) {
-                        feature.geometry.transform(
-                            this.externalProjection, this.internalProjection
-                        ); 
-                    }
-                    if (this.trackAttributes) {
-                        for (var j=0, jj=this.trackAttributes.length; j<jj; ++j) {
-                            feature.attributes[name] = obj.attributes[this.trackAttributes[j]][i];
-                        }
-                    }
-                    feature.attributes.when = obj.whens[i];
-                    feature.attributes.trackId = container.feature.id;
-                    if (hasAngles) {
-                        angles = obj.angles[i];
-                        feature.attributes.heading = parseFloat(angles[0]);
-                        feature.attributes.tilt = parseFloat(angles[1]);
-                        feature.attributes.roll = parseFloat(angles[2]);
-                    }
-                    container.features.push(feature);
-                }
-            },
-            "coord": function(node, container) {
-                var str = this.getChildValue(node);
-                var coords = str.replace(this.regExes.trimSpace, "").split(/\s+/);
-                var point = new OpenLayers.Geometry.Point(coords[0], coords[1]);
-                if (coords.length > 2) {
-                    point.z = parseFloat(coords[2]);
-                }
-                container.points.push(point);
-            },
-            "angles": function(node, container) {
-                var str = this.getChildValue(node);
-                var parts = str.replace(this.regExes.trimSpace, "").split(/\s+/);
-                container.angles.push(parts);
-            }
-        }
-    },
-    
-    /**
-     * Method: parseFeature
-     * This function is the core of the KML parsing code in OpenLayers.
-     *     It creates the geometries that are then attached to the returned
-     *     feature, and calls parseAttributes() to get attribute data out.
-     *
-     * Parameters:
-     * node - {DOMElement}
-     *
-     * Returns:
-     * {<OpenLayers.Feature.Vector>} A vector feature.
-     */
-    parseFeature: function(node) {
-        // only accept one geometry per feature - look for highest "order"
-        var order = ["MultiGeometry", "Polygon", "LineString", "Point"];
-        var type, nodeList, geometry, parser;
-        for(var i=0, len=order.length; i<len; ++i) {
-            type = order[i];
-            this.internalns = node.namespaceURI ? 
-                    node.namespaceURI : this.kmlns;
-            nodeList = this.getElementsByTagNameNS(node, 
-                                                   this.internalns, type);
-            if(nodeList.length > 0) {
-                // only deal with first geometry of this type
-                var parser = this.parseGeometry[type.toLowerCase()];
-                if(parser) {
-                    geometry = parser.apply(this, [nodeList[0]]);
-                    if (this.internalProjection && this.externalProjection) {
-                        geometry.transform(this.externalProjection, 
-                                           this.internalProjection); 
-                    }                       
-                } else {
-                    OpenLayers.Console.error(OpenLayers.i18n(
-                                "unsupportedGeometryType", {'geomType':type}));
-                }
-                // stop looking for different geometry types
-                break;
-            }
-        }
-
-        // construct feature (optionally with attributes)
-        var attributes;
-        if(this.extractAttributes) {
-            attributes = this.parseAttributes(node);
-        }
-        var feature = new OpenLayers.Feature.Vector(geometry, attributes);
-
-        var fid = node.getAttribute("id") || node.getAttribute("name");
-        if(fid != null) {
-            feature.fid = fid;
-        }
-
-        return feature;
-    },        
-    
-    /**
-     * Method: getStyle
-     * Retrieves a style from a style hash using styleUrl as the key
-     * If the styleUrl doesn't exist yet, we try to fetch it 
-     * Internet
-     * 
-     * Parameters: 
-     * styleUrl  - {String} URL of style
-     * options   - {Object} Hash of options 
-     *
-     * Returns:
-     * {Object}  - (reference to) Style hash
-     */
-    getStyle: function(styleUrl, options) {
-
-        var styleBaseUrl = OpenLayers.Util.removeTail(styleUrl);
-
-        var newOptions = OpenLayers.Util.extend({}, options);
-        newOptions.depth++;
-        newOptions.styleBaseUrl = styleBaseUrl;
-
-        // Fetch remote Style URLs (if not fetched before) 
-        if (!this.styles[styleUrl] 
-                && !OpenLayers.String.startsWith(styleUrl, "#") 
-                && newOptions.depth <= this.maxDepth
-                && !this.fetched[styleBaseUrl] ) {
-
-            var data = this.fetchLink(styleBaseUrl);
-            if (data) {
-                this.parseData(data, newOptions);
-            }
-
-        }
-
-        // return requested style
-        var style = OpenLayers.Util.extend({}, this.styles[styleUrl]);
-        return style;
-    },
-    
-    /**
-     * Property: parseGeometry
-     * Properties of this object are the functions that parse geometries based
-     *     on their type.
-     */
-    parseGeometry: {
-        
-        /**
-         * Method: parseGeometry.point
-         * Given a KML node representing a point geometry, create an OpenLayers
-         *     point geometry.
-         *
-         * Parameters:
-         * node - {DOMElement} A KML Point node.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry.Point>} A point geometry.
-         */
-        point: function(node) {
-            var nodeList = this.getElementsByTagNameNS(node, this.internalns,
-                                                       "coordinates");
-            var coords = [];
-            if(nodeList.length > 0) {
-                var coordString = nodeList[0].firstChild.nodeValue;
-                coordString = coordString.replace(this.regExes.removeSpace, "");
-                coords = coordString.split(",");
-            }
-
-            var point = null;
-            if(coords.length > 1) {
-                // preserve third dimension
-                if(coords.length == 2) {
-                    coords[2] = null;
-                }
-                point = new OpenLayers.Geometry.Point(coords[0], coords[1],
-                                                      coords[2]);
-            } else {
-                throw "Bad coordinate string: " + coordString;
-            }
-            return point;
-        },
-        
-        /**
-         * Method: parseGeometry.linestring
-         * Given a KML node representing a linestring geometry, create an
-         *     OpenLayers linestring geometry.
-         *
-         * Parameters:
-         * node - {DOMElement} A KML LineString node.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry.LineString>} A linestring geometry.
-         */
-        linestring: function(node, ring) {
-            var nodeList = this.getElementsByTagNameNS(node, this.internalns,
-                                                       "coordinates");
-            var line = null;
-            if(nodeList.length > 0) {
-                var coordString = this.getChildValue(nodeList[0]);
-
-                coordString = coordString.replace(this.regExes.trimSpace,
-                                                  "");
-                coordString = coordString.replace(this.regExes.trimComma,
-                                                  ",");
-                var pointList = coordString.split(this.regExes.splitSpace);
-                var numPoints = pointList.length;
-                var points = new Array(numPoints);
-                var coords, numCoords;
-                for(var i=0; i<numPoints; ++i) {
-                    coords = pointList[i].split(",");
-                    numCoords = coords.length;
-                    if(numCoords > 1) {
-                        if(coords.length == 2) {
-                            coords[2] = null;
-                        }
-                        points[i] = new OpenLayers.Geometry.Point(coords[0],
-                                                                  coords[1],
-                                                                  coords[2]);
-                    } else {
-                        throw "Bad LineString point coordinates: " +
-                              pointList[i];
-                    }
-                }
-                if(numPoints) {
-                    if(ring) {
-                        line = new OpenLayers.Geometry.LinearRing(points);
-                    } else {
-                        line = new OpenLayers.Geometry.LineString(points);
-                    }
-                } else {
-                    throw "Bad LineString coordinates: " + coordString;
-                }
-            }
-
-            return line;
-        },
-        
-        /**
-         * Method: parseGeometry.polygon
-         * Given a KML node representing a polygon geometry, create an
-         *     OpenLayers polygon geometry.
-         *
-         * Parameters:
-         * node - {DOMElement} A KML Polygon node.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry.Polygon>} A polygon geometry.
-         */
-        polygon: function(node) {
-            var nodeList = this.getElementsByTagNameNS(node, this.internalns,
-                                                       "LinearRing");
-            var numRings = nodeList.length;
-            var components = new Array(numRings);
-            if(numRings > 0) {
-                // this assumes exterior ring first, inner rings after
-                var ring;
-                for(var i=0, len=nodeList.length; i<len; ++i) {
-                    ring = this.parseGeometry.linestring.apply(this,
-                                                        [nodeList[i], true]);
-                    if(ring) {
-                        components[i] = ring;
-                    } else {
-                        throw "Bad LinearRing geometry: " + i;
-                    }
-                }
-            }
-            return new OpenLayers.Geometry.Polygon(components);
-        },
-        
-        /**
-         * Method: parseGeometry.multigeometry
-         * Given a KML node representing a multigeometry, create an
-         *     OpenLayers geometry collection.
-         *
-         * Parameters:
-         * node - {DOMElement} A KML MultiGeometry node.
-         *
-         * Returns:
-         * {<OpenLayers.Geometry.Collection>} A geometry collection.
-         */
-        multigeometry: function(node) {
-            var child, parser;
-            var parts = [];
-            var children = node.childNodes;
-            for(var i=0, len=children.length; i<len; ++i ) {
-                child = children[i];
-                if(child.nodeType == 1) {
-                    var type = (child.prefix) ?
-                            child.nodeName.split(":")[1] :
-                            child.nodeName;
-                    var parser = this.parseGeometry[type.toLowerCase()];
-                    if(parser) {
-                        parts.push(parser.apply(this, [child]));
-                    }
-                }
-            }
-            return new OpenLayers.Geometry.Collection(parts);
-        }
-        
-    },
-
-    /**
-     * Method: parseAttributes
-     *
-     * Parameters:
-     * node - {DOMElement}
-     *
-     * Returns:
-     * {Object} An attributes object.
-     */
-    parseAttributes: function(node) {
-        var attributes = {};
-       
-        // Extended Data is parsed first.
-        var edNodes = node.getElementsByTagName("ExtendedData");
-        if (edNodes.length) {
-            attributes = this.parseExtendedData(edNodes[0]);
-        }
-        
-        // assume attribute nodes are type 1 children with a type 3 or 4 child
-        var child, grandchildren, grandchild;
-        var children = node.childNodes;
-
-        for(var i=0, len=children.length; i<len; ++i) {
-            child = children[i];
-            if(child.nodeType == 1) {
-                grandchildren = child.childNodes;
-                if(grandchildren.length >= 1 && grandchildren.length <= 3) {
-                    var grandchild;
-                    switch (grandchildren.length) {
-                        case 1:
-                            grandchild = grandchildren[0];
-                            break;
-                        case 2:
-                            var c1 = grandchildren[0];
-                            var c2 = grandchildren[1];
-                            grandchild = (c1.nodeType == 3 || c1.nodeType == 4) ?
-                                c1 : c2;
-                            break;
-                        case 3:
-                        default:
-                            grandchild = grandchildren[1];
-                            break;
-                    }
-                    if(grandchild.nodeType == 3 || grandchild.nodeType == 4) {
-                        var name = (child.prefix) ?
-                                child.nodeName.split(":")[1] :
-                                child.nodeName;
-                        var value = OpenLayers.Util.getXmlNodeValue(grandchild);
-                        if (value) {
-                            value = value.replace(this.regExes.trimSpace, "");
-                            attributes[name] = value;
-                        }
-                    }
-                } 
-            }
-        }
-        return attributes;
-    },
-
-    /**
-     * Method: parseExtendedData
-     * Parse ExtendedData from KML. Limited support for schemas/datatypes.
-     *     See http://code.google.com/apis/kml/documentation/kmlreference.html#extendeddata
-     *     for more information on extendeddata.
-     */
-    parseExtendedData: function(node) {
-        var attributes = {};
-        var i, len, data, key;
-        var dataNodes = node.getElementsByTagName("Data");
-        for (i = 0, len = dataNodes.length; i < len; i++) {
-            data = dataNodes[i];
-            key = data.getAttribute("name");
-            var ed = {};
-            var valueNode = data.getElementsByTagName("value");
-            if (valueNode.length) {
-                ed['value'] = this.getChildValue(valueNode[0]);
-            }    
-            var nameNode = data.getElementsByTagName("displayName");
-            if (nameNode.length) {
-                ed['displayName'] = this.getChildValue(nameNode[0]);
-            }
-            attributes[key] = ed;
-        }
-        var simpleDataNodes = node.getElementsByTagName("SimpleData");
-        for (i = 0, len = simpleDataNodes.length; i < len; i++) {
-            var ed = {};
-            data = simpleDataNodes[i];
-            key = data.getAttribute("name");
-            ed['value'] = this.getChildValue(data);
-            ed['displayName'] = key;
-            attributes[key] = ed;
-        }
-        
-        return attributes;    
-    },
-    
-    /**
-     * Method: parseProperty
-     * Convenience method to find a node and return its value
-     *
-     * Parameters:
-     * xmlNode    - {<DOMElement>}
-     * namespace  - {String} namespace of the node to find
-     * tagName    - {String} name of the property to parse
-     * 
-     * Returns:
-     * {String} The value for the requested property (defaults to null)
-     */    
-    parseProperty: function(xmlNode, namespace, tagName) {
-        var value;
-        var nodeList = this.getElementsByTagNameNS(xmlNode, namespace, tagName);
-        try {
-            value = OpenLayers.Util.getXmlNodeValue(nodeList[0]);
-        } catch(e) {
-            value = null;
-        }
-     
-        return value;
-    },                                                              
-
-    /**
-     * APIMethod: write
-     * Accept Feature Collection, and return a string. 
-     * 
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>} An array of features.
-     *
-     * Returns:
-     * {String} A KML string.
-     */
-    write: function(features) {
-        if(!(features instanceof Array)) {
-            features = [features];
-        }
-        var kml = this.createElementNS(this.kmlns, "kml");
-        var folder = this.createFolderXML();
-        for(var i=0, len=features.length; i<len; ++i) {
-            folder.appendChild(this.createPlacemarkXML(features[i]));
-        }
-        kml.appendChild(folder);
-        return OpenLayers.Format.XML.prototype.write.apply(this, [kml]);
-    },
-
-    /**
-     * Method: createFolderXML
-     * Creates and returns a KML folder node
-     * 
-     * Returns:
-     * {DOMElement}
-     */
-    createFolderXML: function() {
-        // Folder
-        var folder = this.createElementNS(this.kmlns, "Folder");
-
-        // Folder name
-        if (this.foldersName) {
-            var folderName = this.createElementNS(this.kmlns, "name");
-            var folderNameText = this.createTextNode(this.foldersName); 
-            folderName.appendChild(folderNameText);
-            folder.appendChild(folderName);
-        }
-
-        // Folder description
-        if (this.foldersDesc) {
-            var folderDesc = this.createElementNS(this.kmlns, "description");        
-            var folderDescText = this.createTextNode(this.foldersDesc); 
-            folderDesc.appendChild(folderDescText);
-            folder.appendChild(folderDesc);
-        }
-
-        return folder;
-    },
-
-    /**
-     * Method: createPlacemarkXML
-     * Creates and returns a KML placemark node representing the given feature. 
-     * 
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>}
-     * 
-     * Returns:
-     * {DOMElement}
-     */
-    createPlacemarkXML: function(feature) {        
-        // Placemark name
-        var placemarkName = this.createElementNS(this.kmlns, "name");
-        var name = feature.style && feature.style.label ? feature.style.label :
-                   feature.attributes.name || feature.id;
-        placemarkName.appendChild(this.createTextNode(name));
-
-        // Placemark description
-        var placemarkDesc = this.createElementNS(this.kmlns, "description");
-        var desc = feature.attributes.description || this.placemarksDesc;
-        placemarkDesc.appendChild(this.createTextNode(desc));
-        
-        // Placemark
-        var placemarkNode = this.createElementNS(this.kmlns, "Placemark");
-        if(feature.fid != null) {
-            placemarkNode.setAttribute("id", feature.fid);
-        }
-        placemarkNode.appendChild(placemarkName);
-        placemarkNode.appendChild(placemarkDesc);
-
-        // Geometry node (Point, LineString, etc. nodes)
-        var geometryNode = this.buildGeometryNode(feature.geometry);
-        placemarkNode.appendChild(geometryNode);        
-        
-        // TBD - deal with remaining (non name/description) attributes.
-        return placemarkNode;
-    },    
-
-    /**
-     * Method: buildGeometryNode
-     * Builds and returns a KML geometry node with the given geometry.
-     * 
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement}
-     */
-    buildGeometryNode: function(geometry) {
-        if (this.internalProjection && this.externalProjection) {
-            geometry = geometry.clone();
-            geometry.transform(this.internalProjection, 
-                               this.externalProjection);
-        }                       
-        var className = geometry.CLASS_NAME;
-        var type = className.substring(className.lastIndexOf(".") + 1);
-        var builder = this.buildGeometry[type.toLowerCase()];
-        var node = null;
-        if(builder) {
-            node = builder.apply(this, [geometry]);
-        }
-        return node;
-    },
-
-    /**
-     * Property: buildGeometry
-     * Object containing methods to do the actual geometry node building
-     *     based on geometry type.
-     */
-    buildGeometry: {
-        // TBD: Anybody care about namespace aliases here (these nodes have
-        //    no prefixes)?
-
-        /**
-         * Method: buildGeometry.point
-         * Given an OpenLayers point geometry, create a KML point.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry.Point>} A point geometry.
-         *
-         * Returns:
-         * {DOMElement} A KML point node.
-         */
-        point: function(geometry) {
-            var kml = this.createElementNS(this.kmlns, "Point");
-            kml.appendChild(this.buildCoordinatesNode(geometry));
-            return kml;
-        },
-        
-        /**
-         * Method: buildGeometry.multipoint
-         * Given an OpenLayers multipoint geometry, create a KML
-         *     GeometryCollection.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry.Point>} A multipoint geometry.
-         *
-         * Returns:
-         * {DOMElement} A KML GeometryCollection node.
-         */
-        multipoint: function(geometry) {
-            return this.buildGeometry.collection.apply(this, [geometry]);
-        },
-
-        /**
-         * Method: buildGeometry.linestring
-         * Given an OpenLayers linestring geometry, create a KML linestring.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry.LineString>} A linestring geometry.
-         *
-         * Returns:
-         * {DOMElement} A KML linestring node.
-         */
-        linestring: function(geometry) {
-            var kml = this.createElementNS(this.kmlns, "LineString");
-            kml.appendChild(this.buildCoordinatesNode(geometry));
-            return kml;
-        },
-        
-        /**
-         * Method: buildGeometry.multilinestring
-         * Given an OpenLayers multilinestring geometry, create a KML
-         *     GeometryCollection.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry.Point>} A multilinestring geometry.
-         *
-         * Returns:
-         * {DOMElement} A KML GeometryCollection node.
-         */
-        multilinestring: function(geometry) {
-            return this.buildGeometry.collection.apply(this, [geometry]);
-        },
-
-        /**
-         * Method: buildGeometry.linearring
-         * Given an OpenLayers linearring geometry, create a KML linearring.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry.LinearRing>} A linearring geometry.
-         *
-         * Returns:
-         * {DOMElement} A KML linearring node.
-         */
-        linearring: function(geometry) {
-            var kml = this.createElementNS(this.kmlns, "LinearRing");
-            kml.appendChild(this.buildCoordinatesNode(geometry));
-            return kml;
-        },
-        
-        /**
-         * Method: buildGeometry.polygon
-         * Given an OpenLayers polygon geometry, create a KML polygon.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry.Polygon>} A polygon geometry.
-         *
-         * Returns:
-         * {DOMElement} A KML polygon node.
-         */
-        polygon: function(geometry) {
-            var kml = this.createElementNS(this.kmlns, "Polygon");
-            var rings = geometry.components;
-            var ringMember, ringGeom, type;
-            for(var i=0, len=rings.length; i<len; ++i) {
-                type = (i==0) ? "outerBoundaryIs" : "innerBoundaryIs";
-                ringMember = this.createElementNS(this.kmlns, type);
-                ringGeom = this.buildGeometry.linearring.apply(this,
-                                                               [rings[i]]);
-                ringMember.appendChild(ringGeom);
-                kml.appendChild(ringMember);
-            }
-            return kml;
-        },
-        
-        /**
-         * Method: buildGeometry.multipolygon
-         * Given an OpenLayers multipolygon geometry, create a KML
-         *     GeometryCollection.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry.Point>} A multipolygon geometry.
-         *
-         * Returns:
-         * {DOMElement} A KML GeometryCollection node.
-         */
-        multipolygon: function(geometry) {
-            return this.buildGeometry.collection.apply(this, [geometry]);
-        },
-
-        /**
-         * Method: buildGeometry.collection
-         * Given an OpenLayers geometry collection, create a KML MultiGeometry.
-         *
-         * Parameters:
-         * geometry - {<OpenLayers.Geometry.Collection>} A geometry collection.
-         *
-         * Returns:
-         * {DOMElement} A KML MultiGeometry node.
-         */
-        collection: function(geometry) {
-            var kml = this.createElementNS(this.kmlns, "MultiGeometry");
-            var child;
-            for(var i=0, len=geometry.components.length; i<len; ++i) {
-                child = this.buildGeometryNode.apply(this,
-                                                     [geometry.components[i]]);
-                if(child) {
-                    kml.appendChild(child);
-                }
-            }
-            return kml;
-        }
-    },
-
-    /**
-     * Method: buildCoordinatesNode
-     * Builds and returns the KML coordinates node with the given geometry
-     * <coordinates>...</coordinates>
-     * 
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Return:
-     * {DOMElement}
-     */     
-    buildCoordinatesNode: function(geometry) {
-        var coordinatesNode = this.createElementNS(this.kmlns, "coordinates");
-        
-        var path;
-        var points = geometry.components;
-        if(points) {
-            // LineString or LinearRing
-            var point;
-            var numPoints = points.length;
-            var parts = new Array(numPoints);
-            for(var i=0; i<numPoints; ++i) {
-                point = points[i];
-                parts[i] = point.x + "," + point.y;
-            }
-            path = parts.join(" ");
-        } else {
-            // Point
-            path = geometry.x + "," + geometry.y;
-        }
-        
-        var txtNode = this.createTextNode(path);
-        coordinatesNode.appendChild(txtNode);
-        
-        return coordinatesNode;
-    },    
-
-    CLASS_NAME: "OpenLayers.Format.KML" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/OSM.js
+++ /dev/null
@@ -1,458 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Feature/Vector.js
- * @requires OpenLayers/Geometry/Point.js
- * @requires OpenLayers/Geometry/LineString.js
- * @requires OpenLayers/Geometry/Polygon.js
- * @requires OpenLayers/Projection.js
- */
-
-/**  
- * Class: OpenLayers.Format.OSM
- * OSM parser. Create a new instance with the 
- *     <OpenLayers.Format.OSM> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * APIProperty: checkTags
-     * {Boolean} Should tags be checked to determine whether something
-     * should be treated as a seperate node. Will slow down parsing.
-     * Default is false.
-     */
-    checkTags: false,
-
-    /**
-     * Property: interestingTagsExclude
-     * {Array} List of tags to exclude from 'interesting' checks on nodes.
-     * Must be set when creating the format. Will only be used if checkTags
-     * is set.
-     */
-    interestingTagsExclude: null, 
-    
-    /**
-     * APIProperty: areaTags
-     * {Array} List of tags indicating that something is an area.  
-     * Must be set when creating the format. Will only be used if 
-     * checkTags is true.
-     */
-    areaTags: null, 
-    
-    /**
-     * Constructor: OpenLayers.Format.OSM
-     * Create a new parser for OSM.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        var layer_defaults = {
-          'interestingTagsExclude': ['source', 'source_ref', 
-              'source:ref', 'history', 'attribution', 'created_by'],
-          'areaTags': ['area', 'building', 'leisure', 'tourism', 'ruins',
-              'historic', 'landuse', 'military', 'natural', 'sport'] 
-        };
-          
-        layer_defaults = OpenLayers.Util.extend(layer_defaults, options);
-        
-        var interesting = {};
-        for (var i = 0; i < layer_defaults.interestingTagsExclude.length; i++) {
-            interesting[layer_defaults.interestingTagsExclude[i]] = true;
-        }
-        layer_defaults.interestingTagsExclude = interesting;
-        
-        var area = {};
-        for (var i = 0; i < layer_defaults.areaTags.length; i++) {
-            area[layer_defaults.areaTags[i]] = true;
-        }
-        layer_defaults.areaTags = area;
-
-        // OSM coordinates are always in longlat WGS84
-        this.externalProjection = new OpenLayers.Projection("EPSG:4326");
-        
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [layer_defaults]);
-    },
-    
-    /**
-     * APIMethod: read
-     * Return a list of features from a OSM doc
-     
-     * Parameters:
-     * data - {Element} 
-     *
-     * Returns:
-     * An Array of <OpenLayers.Feature.Vector>s
-     */
-    read: function(doc) {
-        if (typeof doc == "string") { 
-            doc = OpenLayers.Format.XML.prototype.read.apply(this, [doc]);
-        }
-
-        var nodes = this.getNodes(doc);
-        var ways = this.getWays(doc);
-        
-        // Geoms will contain at least ways.length entries.
-        var feat_list = new Array(ways.length);
-        
-        for (var i = 0; i < ways.length; i++) {
-            // We know the minimal of this one ahead of time. (Could be -1
-            // due to areas/polygons)
-            var point_list = new Array(ways[i].nodes.length);
-            
-            var poly = this.isWayArea(ways[i]) ? 1 : 0; 
-            for (var j = 0; j < ways[i].nodes.length; j++) {
-               var node = nodes[ways[i].nodes[j]];
-               
-               var point = new OpenLayers.Geometry.Point(node.lon, node.lat);
-               
-               // Since OSM is topological, we stash the node ID internally. 
-               point.osm_id = parseInt(ways[i].nodes[j]);
-               point_list[j] = point;
-               
-               // We don't display nodes if they're used inside other 
-               // elements.
-               node.used = true; 
-            }
-            var geometry = null;
-            if (poly) { 
-                geometry = new OpenLayers.Geometry.Polygon(
-                    new OpenLayers.Geometry.LinearRing(point_list));
-            } else {    
-                geometry = new OpenLayers.Geometry.LineString(point_list);
-            }
-            if (this.internalProjection && this.externalProjection) {
-                geometry.transform(this.externalProjection, 
-                    this.internalProjection);
-            }        
-            var feat = new OpenLayers.Feature.Vector(geometry,
-                ways[i].tags);
-            feat.osm_id = parseInt(ways[i].id);
-            feat.fid = "way." + feat.osm_id;
-            feat_list[i] = feat;
-        } 
-        for (var node_id in nodes) {
-            var node = nodes[node_id];
-            if (!node.used || this.checkTags) {
-                var tags = null;
-                
-                if (this.checkTags) {
-                    var result = this.getTags(node.node, true);
-                    if (node.used && !result[1]) {
-                        continue;
-                    }
-                    tags = result[0];
-                } else { 
-                    tags = this.getTags(node.node);
-                }    
-                
-                var feat = new OpenLayers.Feature.Vector(
-                    new OpenLayers.Geometry.Point(node['lon'], node['lat']),
-                    tags);
-                if (this.internalProjection && this.externalProjection) {
-                    feat.geometry.transform(this.externalProjection, 
-                        this.internalProjection);
-                }        
-                feat.osm_id = parseInt(node_id); 
-                feat.fid = "node." + feat.osm_id;
-                feat_list.push(feat);
-            }   
-            // Memory cleanup
-            node.node = null;
-        }        
-        return feat_list;
-    },
-
-    /**
-     * Method: getNodes
-     * Return the node items from a doc.  
-     *
-     * Parameters:
-     * node - {DOMElement} node to parse tags from
-     */
-    getNodes: function(doc) {
-        var node_list = doc.getElementsByTagName("node");
-        var nodes = {};
-        for (var i = 0; i < node_list.length; i++) {
-            var node = node_list[i];
-            var id = node.getAttribute("id");
-            nodes[id] = {
-                'lat': node.getAttribute("lat"),
-                'lon': node.getAttribute("lon"),
-                'node': node
-            };
-        }
-        return nodes;
-    },
-
-    /**
-     * Method: getWays
-     * Return the way items from a doc.  
-     *
-     * Parameters:
-     * node - {DOMElement} node to parse tags from
-     */
-    getWays: function(doc) {
-        var way_list = doc.getElementsByTagName("way");
-        var return_ways = [];
-        for (var i = 0; i < way_list.length; i++) {
-            var way = way_list[i];
-            var way_object = {
-              id: way.getAttribute("id")
-            };
-            
-            way_object.tags = this.getTags(way);
-            
-            var node_list = way.getElementsByTagName("nd");
-            
-            way_object.nodes = new Array(node_list.length);
-            
-            for (var j = 0; j < node_list.length; j++) {
-                way_object.nodes[j] = node_list[j].getAttribute("ref");
-            }  
-            return_ways.push(way_object);
-        }
-        return return_ways; 
-        
-    },  
-    
-    /**
-     * Method: getTags
-     * Return the tags list attached to a specific DOM element.
-     *
-     * Parameters:
-     * node - {DOMElement} node to parse tags from
-     * interesting_tags - {Boolean} whether the return from this function should
-     *    return a boolean indicating that it has 'interesting tags' -- 
-     *    tags like attribution and source are ignored. (To change the list
-     *    of tags, see interestingTagsExclude)
-     * 
-     * Returns:
-     * tags - {Object} hash of tags
-     * interesting - {Boolean} if interesting_tags is passed, returns
-     *     whether there are any interesting tags on this element.
-     */
-    getTags: function(dom_node, interesting_tags) {
-        var tag_list = dom_node.getElementsByTagName("tag");
-        var tags = {};
-        var interesting = false;
-        for (var j = 0; j < tag_list.length; j++) {
-            var key = tag_list[j].getAttribute("k");
-            tags[key] = tag_list[j].getAttribute("v");
-            if (interesting_tags) {
-                if (!this.interestingTagsExclude[key]) {
-                    interesting = true;
-                }
-            }    
-        }  
-        return interesting_tags ? [tags, interesting] : tags;     
-    },
-
-    /** 
-     * Method: isWayArea
-     * Given a way object from getWays, check whether the tags and geometry
-     * indicate something is an area.
-     *
-     * Returns:
-     * {Boolean}
-     */
-    isWayArea: function(way) { 
-        var poly_shaped = false;
-        var poly_tags = false;
-        
-        if (way.nodes[0] == way.nodes[way.nodes.length - 1]) {
-            poly_shaped = true;
-        }
-        if (this.checkTags) {
-            for(var key in way.tags) {
-                if (this.areaTags[key]) {
-                    poly_tags = true;
-                    break;
-                }
-            }
-        }    
-        return poly_shaped && (this.checkTags ? poly_tags : true);            
-    }, 
-
-    /**
-     * APIMethod: write 
-     * Takes a list of features, returns a serialized OSM format file for use
-     * in tools like JOSM.
-     *
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>)}
-     */
-    write: function(features) { 
-        if (!(features instanceof Array)) {
-            features = [features];
-        }
-        
-        this.osm_id = 1;
-        this.created_nodes = {};
-        var root_node = this.createElementNS(null, "osm");
-        root_node.setAttribute("version", "0.5");
-        root_node.setAttribute("generator", "OpenLayers "+ OpenLayers.VERSION_NUMBER);
-
-        // Loop backwards, because the deserializer puts nodes last, and 
-        // we want them first if possible
-        for(var i = features.length - 1; i >= 0; i--) {
-            var nodes = this.createFeatureNodes(features[i]);
-            for (var j = 0; j < nodes.length; j++) {
-                root_node.appendChild(nodes[j]);
-            }    
-        }
-        return OpenLayers.Format.XML.prototype.write.apply(this, [root_node]);
-    },
-
-    /**
-     * Method: createFeatureNodes
-     * Takes a feature, returns a list of nodes from size 0->n.
-     * Will include all pieces of the serialization that are required which
-     * have not already been created. Calls out to createXML based on geometry
-     * type.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>}
-     */
-    createFeatureNodes: function(feature) {
-        var nodes = [];
-        var className = feature.geometry.CLASS_NAME;
-        var type = className.substring(className.lastIndexOf(".") + 1);
-        type = type.toLowerCase();
-        var builder = this.createXML[type];
-        if (builder) {
-            nodes = builder.apply(this, [feature]);
-        }
-        return nodes;
-    },
-    
-    /**
-     * Method: createXML
-     * Takes a feature, returns a list of nodes from size 0->n.
-     * Will include all pieces of the serialization that are required which
-     * have not already been created.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>}
-     */
-    createXML: {
-        'point': function(point) {
-            var id = null;
-            var geometry = point.geometry ? point.geometry : point;
-            var already_exists = false; // We don't return anything if the node
-                                        // has already been created
-            if (point.osm_id) {
-                id = point.osm_id;
-                if (this.created_nodes[id]) {
-                    already_exists = true;
-                }    
-            } else {
-               id = -this.osm_id;
-               this.osm_id++; 
-            }
-            if (already_exists) {
-                node = this.created_nodes[id];
-            } else {    
-                var node = this.createElementNS(null, "node");
-            }
-            this.created_nodes[id] = node;
-            node.setAttribute("id", id);
-            node.setAttribute("lon", geometry.x); 
-            node.setAttribute("lat", geometry.y);
-            if (point.attributes) {
-                this.serializeTags(point, node);
-            }
-            this.setState(point, node);
-            return already_exists ? [] : [node];
-        }, 
-        linestring: function(feature) {
-            var nodes = [];
-            var geometry = feature.geometry;
-            if (feature.osm_id) {
-                id = feature.osm_id;
-            } else {
-               id = -this.osm_id;
-               this.osm_id++; 
-            }
-            var way = this.createElementNS(null, "way");
-            way.setAttribute("id", id);
-            for (var i = 0; i < geometry.components.length; i++) {
-                var node = this.createXML['point'].apply(this, [geometry.components[i]]);
-                if (node.length) {
-                    node = node[0];
-                    var node_ref = node.getAttribute("id");
-                    nodes.push(node);
-                } else {
-                    node_ref = geometry.components[i].osm_id;
-                    node = this.created_nodes[node_ref];
-                }
-                this.setState(feature, node);
-                var nd_dom = this.createElementNS(null, "nd");
-                nd_dom.setAttribute("ref", node_ref);
-                way.appendChild(nd_dom);
-            }
-            this.serializeTags(feature, way);
-            nodes.push(way);
-            
-            return nodes;
-        },
-        polygon: function(feature) {
-            var attrs = OpenLayers.Util.extend({'area':'yes'}, feature.attributes);
-            var feat = new OpenLayers.Feature.Vector(feature.geometry.components[0], attrs); 
-            feat.osm_id = feature.osm_id;
-            return this.createXML['linestring'].apply(this, [feat]);
-        }
-    },
-
-    /**
-     * Method: serializeTags
-     * Given a feature, serialize the attributes onto the given node.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>}
-     * node - {DOMNode}
-     */
-    serializeTags: function(feature, node) {
-        for (var key in feature.attributes) {
-            var tag = this.createElementNS(null, "tag");
-            tag.setAttribute("k", key);
-            tag.setAttribute("v", feature.attributes[key]);
-            node.appendChild(tag);
-        }
-    },
-
-    /**
-     * Method: setState 
-     * OpenStreetMap has a convention that 'state' is stored for modification or deletion.
-     * This allows the file to be uploaded via JOSM or the bulk uploader tool.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>}
-     * node - {DOMNode}
-     */
-    setState: function(feature, node) {
-        if (feature.state) {
-            var state = null;
-            switch(feature.state) {
-                case OpenLayers.State.UPDATE:
-                    state = "modify";
-                case OpenLayers.State.DELETE:
-                    state = "delete";
-            }
-            if (state) {
-                node.setAttribute("action", state);
-            }
-        }    
-    },
-
-    CLASS_NAME: "OpenLayers.Format.OSM" 
-});     
-

--- a/labs/openlayers/lib/OpenLayers/Format/OWSCommon/v1.js
+++ /dev/null
@@ -1,257 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- */
-
-if (!OpenLayers.Format.OWSCommon) {
-    OpenLayers.Format.OWSCommon = {};
-}
-
-/**
- * Class: OpenLayers.Format.OWSCommon.v1
- * Common readers and writers for OWSCommon v1.X formats
- */
-OpenLayers.Format.OWSCommon.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
-   
-    /**
-     * Property: regExes
-     * Compiled regular expressions for manipulating strings.
-     */
-    regExes: {
-        trimSpace: (/^\s*|\s*$/g),
-        removeSpace: (/\s*/g),
-        splitSpace: (/\s+/),
-        trimComma: (/\s*,\s*/g)
-    },
-
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "ows": {
-            "ServiceIdentification": function(node, obj) {
-                obj.serviceIdentification = {};
-                this.readChildNodes(node, obj.serviceIdentification);
-            },
-            "Title": function(node, obj) {
-                obj.title = this.getChildValue(node);
-            },
-            "Abstract": function(node, serviceIdentification) {
-                serviceIdentification["abstract"] = this.getChildValue(node);
-            },
-            "Keywords": function(node, serviceIdentification) {
-                serviceIdentification.keywords = {};
-                this.readChildNodes(node, serviceIdentification.keywords);
-            },
-            "Keyword": function(node, keywords) {
-                keywords[this.getChildValue(node)] = true;
-            },
-            "ServiceType": function(node, serviceIdentification) {
-                serviceIdentification.serviceType = {
-                    codeSpace: node.getAttribute('codeSpace'), 
-                    value: this.getChildValue(node)};
-            },
-            "ServiceTypeVersion": function(node, serviceIdentification) {
-                serviceIdentification.serviceTypeVersion = this.getChildValue(node);
-            },
-            "Fees": function(node, serviceIdentification) {
-                serviceIdentification.fees = this.getChildValue(node);
-            },
-            "AccessConstraints": function(node, serviceIdentification) {
-                serviceIdentification.accessConstraints = 
-                    this.getChildValue(node);
-            },
-            "ServiceProvider": function(node, obj) {
-                obj.serviceProvider = {};
-                this.readChildNodes(node, obj.serviceProvider);
-            },
-            "ProviderName": function(node, serviceProvider) {
-                serviceProvider.providerName = this.getChildValue(node);
-            },
-            "ProviderSite": function(node, serviceProvider) {
-                serviceProvider.providerSite = this.getAttributeNS(node, 
-                    this.namespaces.xlink, "href");
-            },
-            "ServiceContact": function(node, serviceProvider) {
-                serviceProvider.serviceContact = {};
-                this.readChildNodes(node, serviceProvider.serviceContact);
-            },
-            "IndividualName": function(node, serviceContact) {
-                serviceContact.individualName = this.getChildValue(node);
-            },
-            "PositionName": function(node, serviceContact) {
-                serviceContact.positionName = this.getChildValue(node);
-            },
-            "ContactInfo": function(node, serviceContact) {
-                serviceContact.contactInfo = {};
-                this.readChildNodes(node, serviceContact.contactInfo);
-            },
-            "Phone": function(node, contactInfo) {
-                contactInfo.phone = {};
-                this.readChildNodes(node, contactInfo.phone);
-            },
-            "Voice": function(node, phone) {
-                phone.voice = this.getChildValue(node);
-            },
-            "Address": function(node, contactInfo) {
-                contactInfo.address = {};
-                this.readChildNodes(node, contactInfo.address);
-            },
-            "DeliveryPoint": function(node, address) {
-                address.deliveryPoint = this.getChildValue(node);
-            },
-            "City": function(node, address) {
-                address.city = this.getChildValue(node);
-            },
-            "AdministrativeArea": function(node, address) {
-                address.administrativeArea = this.getChildValue(node);
-            },
-            "PostalCode": function(node, address) {
-                address.postalCode = this.getChildValue(node);
-            },
-            "Country": function(node, address) {
-                address.country = this.getChildValue(node);
-            },
-            "ElectronicMailAddress": function(node, address) {
-                address.electronicMailAddress = this.getChildValue(node);
-            },
-            "Role": function(node, serviceContact) {
-                serviceContact.role = this.getChildValue(node);
-            },
-            "OperationsMetadata": function(node, obj) {
-                obj.operationsMetadata = {};
-                this.readChildNodes(node, obj.operationsMetadata);
-            },
-            "Operation": function(node, operationsMetadata) {
-                var name = node.getAttribute("name");
-                operationsMetadata[name] = {};
-                this.readChildNodes(node, operationsMetadata[name]);
-            },
-            "DCP": function(node, operation) {
-                operation.dcp = {};
-                this.readChildNodes(node, operation.dcp);
-            },
-            "HTTP": function(node, dcp) {
-                dcp.http = {};
-                this.readChildNodes(node, dcp.http);
-            },
-            "Get": function(node, http) {
-                http.get = this.getAttributeNS(node, 
-                    this.namespaces.xlink, "href");
-            },
-            "Post": function(node, http) {
-                http.post = this.getAttributeNS(node, 
-                    this.namespaces.xlink, "href");
-            },
-            "Parameter": function(node, operation) {
-                if (!operation.parameters) {
-                    operation.parameters = {};
-                }
-                var name = node.getAttribute("name");
-                operation.parameters[name] = {};
-                this.readChildNodes(node, operation.parameters[name]);
-            },
-            "Value": function(node, allowedValues) {
-                allowedValues[this.getChildValue(node)] = true;
-            },
-            "OutputFormat": function(node, obj) {
-                obj.formats.push({value: this.getChildValue(node)});
-                this.readChildNodes(node, obj);
-            },
-            "WGS84BoundingBox": function(node, obj) {
-                var boundingBox = {};
-                boundingBox.crs = node.getAttribute("crs");
-                if (obj.BoundingBox) {
-                    obj.BoundingBox.push(boundingBox);
-                } else {
-                    obj.projection = boundingBox.crs;
-                    boundingBox = obj;
-               }
-               this.readChildNodes(node, boundingBox);
-            },
-            "BoundingBox": function(node, obj) {
-                // FIXME: We consider that BoundingBox is the same as WGS84BoundingBox
-                // LowerCorner = "min_x min_y"
-                // UpperCorner = "max_x max_y"
-                // It should normally depend on the projection
-                this.readers['ows']['WGS84BoundingBox'].apply(this, [node, obj]);
-            },
-            "LowerCorner": function(node, obj) {
-                var str = this.getChildValue(node).replace(
-                    this.regExes.trimSpace, "");
-                str = str.replace(this.regExes.trimComma, ",");
-                var pointList = str.split(this.regExes.splitSpace);
-                obj.left = pointList[0];
-                obj.bottom = pointList[1];
-            },
-            "UpperCorner": function(node, obj) {
-                var str = this.getChildValue(node).replace(
-                    this.regExes.trimSpace, "");
-                str = str.replace(this.regExes.trimComma, ",");
-                var pointList = str.split(this.regExes.splitSpace);
-                obj.right = pointList[0];
-                obj.top = pointList[1];
-                obj.bounds = new OpenLayers.Bounds(obj.left, obj.bottom,
-                    obj.right, obj.top);
-                delete obj.left;
-                delete obj.bottom;
-                delete obj.right;
-                delete obj.top;
-            }
-        }
-    },
-
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "ows": {
-            "BoundingBox": function(options) {
-                var node = this.createElementNSPlus("ows:BoundingBox", {
-                    attributes: {
-                        crs: options.projection
-                    }
-                });
-                this.writeNode("ows:LowerCorner", options, node);
-                this.writeNode("ows:UpperCorner", options, node);
-                return node;
-            },
-            "LowerCorner": function(options) {
-                var node = this.createElementNSPlus("ows:LowerCorner", {
-                    value: options.bounds.left + " " + options.bounds.bottom });
-                return node;
-            },
-            "UpperCorner": function(options) {
-                var node = this.createElementNSPlus("ows:UpperCorner", {
-                    value: options.bounds.right + " " + options.bounds.top });
-                return node;
-            },
-            "Title": function(title) {
-                var node = this.createElementNSPlus("ows:Title", {
-                    value: title });
-                return node;
-            },
-            "OutputFormat": function(format) {
-                var node = this.createElementNSPlus("ows:OutputFormat", {
-                    value: format });
-                return node;
-            }
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Format.OWSCommon.v1"
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/OWSCommon/v1_0_0.js
+++ /dev/null
@@ -1,51 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/OWSCommon/v1.js
- */
-
-/**
- * Class: OpenLayers.Format.OWSCommon.v1_0_0
- * Parser for OWS Common version 1.0.0 which can be used by other parsers.
- * It is not intended to be used on its own.
- */
-OpenLayers.Format.OWSCommon.v1_0_0 = OpenLayers.Class(OpenLayers.Format.OWSCommon.v1, {
-    
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        ows: "http://www.opengis.net/ows/1.0",
-        xlink: "http://www.w3.org/1999/xlink"
-    },    
-    
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "ows": OpenLayers.Format.OWSCommon.v1.prototype.readers["ows"]
-    },
-
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "ows": OpenLayers.Format.OWSCommon.v1.prototype.writers["ows"]
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.OWSCommon.v1_1_0"
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/OWSCommon/v1_1_0.js
+++ /dev/null
@@ -1,65 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/OWSCommon/v1.js
- */
-
-/**
- * Class: OpenLayers.Format.OWSCommon.v1_1_0
- * Parser for OWS Common version 1.1.0 which can be used by other parsers.
- * It is not intended to be used on its own.
- */
-OpenLayers.Format.OWSCommon.v1_1_0 = OpenLayers.Class(OpenLayers.Format.OWSCommon.v1, {
-
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        ows: "http://www.opengis.net/ows/1.1",
-        xlink: "http://www.w3.org/1999/xlink"
-    },    
-    
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "ows": OpenLayers.Util.applyDefaults({
-            "AllowedValues": function(node, parameter) {
-                parameter.allowedValues = {};
-                this.readChildNodes(node, parameter.allowedValues);
-            },
-            "AnyValue": function(node, parameter) {
-                parameter.anyValue = true;
-            },
-            "Range": function(node, allowedValues) {
-                allowedValues.range = {};
-                this.readChildNodes(node, allowedValues.range);
-            },
-            "MinimumValue": function(node, range) {
-                range.minValue = this.getChildValue(node);
-            },
-            "MaximumValue": function(node, range) {
-                range.maxValue = this.getChildValue(node);
-            },
-            "Identifier": function(node, obj) {
-            	obj.identifier = this.getChildValue(node);
-            },
-            "SupportedCRS": function(node, obj) {
-                obj.supportedCRS = this.getChildValue(node);
-            }
-        }, OpenLayers.Format.OWSCommon.v1.prototype.readers["ows"])
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.OWSCommon.v1_1_0"
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/OWSContext.js
+++ /dev/null
@@ -1,82 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/Context.js
- */
-
-/**
- * Class: OpenLayers.Format.OWSContext
- * Read and write OWS Context documents. OWS Context documents are a 
- * preliminary OGC (Open Geospatial Consortium) standard for storing the 
- * state of a web mapping application. In a way it is the successor to
- * Web Map Context (WMC), since it is more generic and more types of layers
- * can be stored. Also, nesting of layers is supported since version 0.3.1.
- * For more information see: http://www.ogcnetwork.net/context
- */
-OpenLayers.Format.OWSContext = OpenLayers.Class(OpenLayers.Format.Context,{
-    
-    /**
-     * APIProperty: defaultVersion
-     * {String} Version number to assume if none found.  Default is "0.3.1".
-     */
-    defaultVersion: "0.3.1",
-    
-    /**
-     * Method: getParser
-     * Get the OWSContext parser given a version. Create a new parser if it does not
-     * already exist.
-     *
-     * Parameters:
-     * version - {String} The version of the parser.
-     *
-     * Returns:
-     * {<OpenLayers.Format.OWSContext>} An OWSContext parser.
-     */
-    getParser: function(version) {
-        var v = version || this.version || this.defaultVersion;
-        // 0.3.1 is backwards compatible with 0.3.0
-        if (v === "0.3.0") {
-            v = this.defaultVersion;
-        }
-        if(!this.parser || this.parser.VERSION != v) {
-            var format = OpenLayers.Format.OWSContext[
-                "v" + v.replace(/\./g, "_")
-            ];
-            if(!format) {
-                throw "Can't find a OWSContext parser for version " + v;
-            }
-            this.parser = new format(this.options);
-        }
-        return this.parser;
-    },
-
-    /**
-     * Method: toContext
-     * Create a context object free from layer given a map or a
-     * context object.
-     *
-     * Parameters:
-     * obj - {<OpenLayers.Map> | Object} The map or context.
-     *
-     * Returns:
-     * {Object} A context object.
-     */
-    toContext: function(obj) {
-        var context = {};
-        if(obj.CLASS_NAME == "OpenLayers.Map") {
-            context.bounds = obj.getExtent();
-            context.maxExtent = obj.maxExtent;
-            context.projection = obj.projection;
-            context.size = obj.getSize();
-            context.layers = obj.layers;
-        }
-        return context;
-    },
-
-    CLASS_NAME: "OpenLayers.Format.OWSContext" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/OWSContext/v0_3_1.js
+++ /dev/null
@@ -1,590 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Format/KML.js
- * @requires OpenLayers/Format/GML.js
- * @requires OpenLayers/Format/GML/v2.js
- * @requires OpenLayers/Format/SLD/v1_0_0.js
- * @requires OpenLayers/Format/OWSContext.js
- * @requires OpenLayers/Format/OWSCommon/v1_0_0.js
- */
-
-/**
- * Class: OpenLayers.Format.OWSContext.v0_3_1
- * Read and write OWSContext version 0.3.1.
- *
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.OWSContext.v0_3_1 = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        owc: "http://www.opengis.net/ows-context",
-        gml: "http://www.opengis.net/gml",
-        kml: "http://www.opengis.net/kml/2.2",
-        ogc: "http://www.opengis.net/ogc",
-        ows: "http://www.opengis.net/ows",
-        sld: "http://www.opengis.net/sld",
-        xlink: "http://www.w3.org/1999/xlink",
-        xsi: "http://www.w3.org/2001/XMLSchema-instance"
-    },
-
-    /**
-     * Constant: VERSION
-     * {String} 0.3.1
-     */
-    VERSION: "0.3.1", 
-
-    /**
-     * Property: schemaLocation
-     * {String} Schema location
-     */
-    schemaLocation: "http://www.opengis.net/ows-context http://www.ogcnetwork.net/schemas/owc/0.3.1/owsContext.xsd",
-
-    /**
-     * Property: defaultPrefix
-     * {String} Default namespace prefix to use.
-     */
-    defaultPrefix: "owc",
-
-    /**
-     * APIProperty: extractAttributes
-     * {Boolean} Extract attributes from GML.  Default is true.
-     */
-    extractAttributes: true,
-    
-    /**
-     * APIProperty: xy
-     * {Boolean} Order of the GML coordinate true:(x,y) or false:(y,x)
-     * Changing is not recommended, a new Format should be instantiated.
-     */ 
-    xy: true, 
-
-    /**
-     * Property: regExes
-     * Compiled regular expressions for manipulating strings.
-     */
-    regExes: {
-        trimSpace: (/^\s*|\s*$/g),
-        removeSpace: (/\s*/g),
-        splitSpace: (/\s+/),
-        trimComma: (/\s*,\s*/g)
-    },
-
-    /**
-     * Property: featureNS
-     * {String} The namespace uri to use for writing InlineGeometry
-     */
-    featureNS: "http://mapserver.gis.umn.edu/mapserver",
-
-    /**
-     * Property: featureType
-     * {String} The name to use as the feature type when writing out
-     *     InlineGeometry
-     */
-    featureType: 'vector',
-              
-    /**
-     * Property: geometryName
-     * {String} The name to use for the geometry attribute when writing out
-     *     InlineGeometry
-     */
-    geometryName: 'geometry',
-
-    /**
-     * Property: nestingLayerLookup
-     * {Object} Hashtable lookup for nesting layer nodes. Used while writing 
-     *     the OWS context document. It is necessary to keep track of the 
-     *     nestingPaths for which nesting layer nodes have already been 
-     *     created, so (nesting) layer nodes are added to those nodes.
-     *
-     * For example:
-     *
-     *     If there are three layers with nestingPaths:
-     *         layer1.metadata.nestingPath = "a/b/"
-     *         layer2.metadata.nestingPath = "a/b/"
-     *         layer2.metadata.nestingPath = "a/c"
-     *
-     *     then a nesting layer node "a" should be created once and added 
-     *     to the resource list, a nesting layer node "b" should be created 
-     *     once and added under "a", and a nesting layer node "c" should be 
-     *     created and added under "a". The lookup paths for these nodes 
-     *     will be "a", "a/b", and "a/c" respectively.
-     */
-    nestingLayerLookup: null,
-
-    /**
-     * Constructor: OpenLayers.Format.OWSContext.v0_3_1
-     * Instances of this class are not created directly.  Use the
-     *     <OpenLayers.Format.OWSContext> constructor instead.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-        OpenLayers.Format.GML.v2.prototype.setGeometryTypes.call(this);
-    },
-
-    /**
-     * Method: setNestingPath
-     * Set the nestingPath property of the layer depending on the position
-     *     of the layer in hierarchy of layers.
-     *
-     * Parameters:
-     * l - {Object} An object that may have a layersContext array property.
-     * 
-     */
-    setNestingPath : function(l){
-        if(l.layersContext){
-            for (var i = 0, len = l.layersContext.length; i < len; i++) {
-                var layerContext = l.layersContext[i];
-                var nPath = [];
-                var nTitle = l.title || "";
-                if(l.metadata && l.metadata.nestingPath){
-                    nPath = l.metadata.nestingPath.slice();
-                }
-                if (nTitle != "") {
-                    nPath.push(nTitle);
-                }
-                layerContext.metadata.nestingPath = nPath;
-                if(layerContext.layersContext){
-                    this.setNestingPath(layerContext);
-                }
-            }
-        }
-    },
-
-    /**
-     * Function: decomposeNestingPath
-     * Takes a nestingPath like "a/b/c" and decomposes it into subpaths:
-     * "a", "a/b", "a/b/c"
-     *
-     * Parameters:
-     * nPath  - {Array} the nesting path
-     *
-     * Returns:
-     * Array({String}) Array with subpaths, or empty array if there is nothing
-     *     to decompose
-     */
-    decomposeNestingPath: function(nPath){
-        var a = [];
-        if (nPath instanceof Array) {
-            while (nPath.length > 0) {
-                a.push(nPath.slice());
-                nPath.pop();
-            }
-            a.reverse();
-        }
-        return a;
-    },
-
-    /**
-     * APIMethod: read
-     * Read OWS context data from a string or DOMElement, and return a list 
-     *     of layers. 
-     * 
-     * Parameters: 
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Object} The context object with a flat layer list as a property named
-     *     layersContext.
-     */
-    read: function(data) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        if(data && data.nodeType == 9) {
-            data = data.documentElement;
-        }
-        var context = {};
-        this.readNode(data, context);
-        // since an OWSContext can be nested we need to go through this
-        // structure recursively      
-        this.setNestingPath({layersContext : context.layersContext});
-        // after nesting path has been set, create a flat list of layers
-        var layers = [];
-        this.processLayer(layers, context);
-        delete context.layersContext;
-        context.layersContext = layers;
-        return context;
-    },
-
-    /**
-     * Method: processLayer
-     * Recursive function to get back a flat list of layers from the hierarchic
-     *     layer structure.
-     *
-     * Parameters:
-     * layerArray - {Array({Object})} Array of layerContext objects
-     * layerContext - {Object} layerContext object
-     */
-    processLayer: function(layerArray, layer) {
-        if (layer.layersContext) {
-            for (var i=0, len = layer.layersContext.length; i<len; i++) {
-                var l = layer.layersContext[i];
-                layerArray.push(l);
-                if (l.layersContext) {
-                    this.processLayer(layerArray, l);
-                }
-            }
-        }
-    },
-
-    /**
-     * APIMethod: write
-     *
-     * Parameters:
-     * context - {Object} An object representing the map context.
-     * options - {Object} Optional object.
-     *
-     * Returns:
-     * {String} An OWS Context document string.
-     */
-    write: function(context, options) {
-        var name = "OWSContext";
-        this.nestingLayerLookup = {}; //start with empty lookup
-        options = options || {};
-        OpenLayers.Util.applyDefaults(options, context);
-        var root = this.writeNode(name, options);
-        this.nestingLayerLookup = null; //clear lookup
-        this.setAttributeNS(
-            root, this.namespaces["xsi"],
-            "xsi:schemaLocation", this.schemaLocation
-        );
-        return OpenLayers.Format.XML.prototype.write.apply(this, [root]);
-    }, 
-
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "kml": {
-            "Document": function(node, obj) {
-                obj.features = new OpenLayers.Format.KML(
-                    {kmlns: this.namespaces.kml, 
-                        extractStyles: true}).read(node);
-            }
-        },
-        "owc": { 
-            "OWSContext": function(node, obj) {
-                this.readChildNodes(node, obj);
-            }, 
-            "General": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "ResourceList": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "Layer": function(node, obj) {
-                var layerContext = {
-                    metadata: {},
-                    visibility: (node.getAttribute("hidden") != "1"),
-                    queryable: (node.getAttribute("queryable") == "1"),
-                    opacity: ((node.getAttribute("opacity") != null) ? 
-                        parseFloat(node.getAttribute("opacity")) : null),
-                    name: node.getAttribute("name"),
-                    /* A category layer is a dummy layer meant for creating
-                       hierarchies. It is not a physical layer in the 
-                       OpenLayers sense. The assumption we make here is that
-                       category layers do not have a name attribute */
-                    categoryLayer: (node.getAttribute("name") == null),
-                    formats: [],
-                    styles: []
-                };
-                if (!obj.layersContext) {
-                    obj.layersContext = [];
-                }
-                obj.layersContext.push(layerContext);
-                this.readChildNodes(node, layerContext);
-            },
-            "InlineGeometry": function(node, obj) {
-                obj.features = [];
-                var elements = this.getElementsByTagNameNS(node, 
-                    this.namespaces.gml, "featureMember");
-                var el;
-                if (elements.length >= 1) {
-                    el = elements[0];
-                }
-                if (el && el.firstChild) {
-                    var featurenode = (el.firstChild.nextSibling) ? 
-                        el.firstChild.nextSibling : el.firstChild;
-                    this.setNamespace("feature", featurenode.namespaceURI);
-                    this.featureType = featurenode.localName || 
-                        featurenode.nodeName.split(":").pop();
-                    this.readChildNodes(node, obj);
-                }
-            },
-            "Server": function(node, obj) {
-                // when having multiple Server types, we prefer WMS
-                if ((!obj.service && !obj.version) || 
-                    (obj.service != 
-                        OpenLayers.Format.Context.serviceTypes.WMS)) {
-                            obj.service = node.getAttribute("service");
-                            obj.version = node.getAttribute("version");
-                            this.readChildNodes(node, obj);
-                }
-            },
-            "Name": function(node, obj) {
-                obj.name = this.getChildValue(node);
-                this.readChildNodes(node, obj);
-            },
-            "Title": function(node, obj) {
-                obj.title = this.getChildValue(node);
-                this.readChildNodes(node, obj);
-            },
-            "StyleList": function(node, obj) {
-                this.readChildNodes(node, obj.styles);
-            },
-            "Style": function(node, obj) {
-                var style = {};
-                obj.push(style);
-                this.readChildNodes(node, style);
-            },
-            "LegendURL": function(node, obj) {
-                var legend = {};
-                obj.legend = legend;
-                this.readChildNodes(node, legend);
-            },
-            "OnlineResource": function(node, obj) {
-                obj.url = this.getAttributeNS(node, this.namespaces.xlink, 
-                    "href");
-                this.readChildNodes(node, obj);
-            }
-        },
-        "ows": OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers.ows,
-        "gml": OpenLayers.Format.GML.v2.prototype.readers.gml,
-        "sld": OpenLayers.Format.SLD.v1_0_0.prototype.readers.sld,
-        "feature": OpenLayers.Format.GML.v2.prototype.readers.feature
-    },
-
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "owc": {
-            "OWSContext": function(options) {
-                var node = this.createElementNSPlus("OWSContext", {
-                    attributes: {
-                        version: this.VERSION,
-                        id: options.id || OpenLayers.Util.createUniqueID("OpenLayers_OWSContext_")
-                    } 
-                }); 
-                this.writeNode("General", options, node);
-                this.writeNode("ResourceList", options, node);
-                return node; 
-            },
-            "General": function(options) {
-                var node = this.createElementNSPlus("General");
-                this.writeNode("ows:BoundingBox", options, node);
-                this.writeNode("ows:Title", options.title || 'OpenLayers OWSContext', node);
-                return node;
-            },
-            "ResourceList": function(options) {
-                var node = this.createElementNSPlus("ResourceList");
-                for (var i=0, len=options.layers.length; i<len; i++) {
-                    var layer = options.layers[i];
-                    var decomposedPath = this.decomposeNestingPath(layer.metadata.nestingPath);
-                    this.writeNode("_Layer", {layer: layer, subPaths: decomposedPath}, node);
-                }
-                return node;
-            },
-            "Server": function(options) {
-                var node = this.createElementNSPlus("Server", {attributes: {
-                    version: options.version,
-                    service: options.service }
-                });
-                this.writeNode("OnlineResource", options, node);
-                return node;
-            },
-            "OnlineResource": function(options) {
-                var node = this.createElementNSPlus("OnlineResource", {attributes: {
-                    "xlink:href": options.url }
-                });
-                return node;
-            },
-            "InlineGeometry": function(layer) {
-                var node = this.createElementNSPlus("InlineGeometry");
-                this.writeNode("gml:boundedBy", layer.getDataExtent(), node);
-                for (var i=0, len=layer.features.length; i<len; i++) {
-                    this.writeNode("gml:featureMember", layer.features[i], node);
-                }
-                return node;
-            },
-            "StyleList": function(styles) {
-                var node = this.createElementNSPlus("StyleList");
-                for (var i=0, len=styles.length; i<len; i++) {
-                    this.writeNode("Style", styles[i], node);
-                }
-                return node;
-            },
-            "Style": function(style) {
-                var node = this.createElementNSPlus("Style");
-                this.writeNode("Name", style, node);
-                this.writeNode("Title", style, node);
-                this.writeNode("LegendURL", style, node);
-                return node;
-            },
-            "Name": function(obj) {
-                var node = this.createElementNSPlus("Name", {
-                    value: obj.name });
-                return node;
-            },
-            "Title": function(obj) {
-                var node = this.createElementNSPlus("Title", {
-                    value: obj.title });
-                return node;
-            },
-            "LegendURL": function(style) {
-                var node = this.createElementNSPlus("LegendURL");
-                this.writeNode("OnlineResource", style.legend, node);
-                return node;
-            },
-            "_WMS": function(layer) {
-                var node = this.createElementNSPlus("Layer", {attributes: {
-                    name: layer.params.LAYERS,
-                    queryable: layer.queryable ? "1" : "0",
-                    hidden: layer.visibility ? "0" : "1",
-                    opacity: layer.opacity ? layer.opacity: null}
-                });
-                this.writeNode("ows:Title", layer.name, node);
-                this.writeNode("ows:OutputFormat", layer.params.FORMAT, node);
-                this.writeNode("Server", {service: 
-                    OpenLayers.Format.Context.serviceTypes.WMS,
-                    version: layer.params.VERSION, url: layer.url}, node);
-                if (layer.metadata.styles && layer.metadata.styles.length > 0) {
-                    this.writeNode("StyleList", layer.metadata.styles, node);
-                }
-                return node;
-            },
-            "_Layer": function(options) {
-                var layer, subPaths, node, title;
-                layer = options.layer;
-                subPaths = options.subPaths;
-                node = null;
-                title = null;
-                // subPaths is an array of an array
-                // recursively calling _Layer writer eats up subPaths, until a 
-                // real writer is called and nodes are returned.
-                if(subPaths.length > 0){
-                    var path = subPaths[0].join("/");
-                    var index = path.lastIndexOf("/");
-                    node = this.nestingLayerLookup[path];
-                    title = (index > 0)?path.substring(index + 1, path.length):path;
-                    if(!node){
-                        // category layer
-                        node = this.createElementNSPlus("Layer");
-                        this.writeNode("ows:Title", title, node);
-                        this.nestingLayerLookup[path] = node;
-                    }
-                    options.subPaths.shift();//remove a path after each call
-                    this.writeNode("_Layer", options, node);
-                    return node;
-                } else {
-                    // write out the actual layer
-                    if (layer instanceof OpenLayers.Layer.WMS) {
-                        node = this.writeNode("_WMS", layer);
-                    } else if (layer instanceof OpenLayers.Layer.Vector) {
-                        if (layer.protocol instanceof OpenLayers.Protocol.WFS.v1) {
-                            node = this.writeNode("_WFS", layer);
-                        } else if (layer.protocol instanceof OpenLayers.Protocol.HTTP) {
-                            if (layer.protocol.format instanceof OpenLayers.Format.GML) {
-                                layer.protocol.format.version = "2.1.2";
-                                node = this.writeNode("_GML", layer);
-                            } else if (layer.protocol.format instanceof OpenLayers.Format.KML) {
-                                layer.protocol.format.version = "2.2";
-                                node = this.writeNode("_KML", layer);
-                            }
-                        } else {
-                            // write out as inline GML since we have no idea
-                            // about the original Format
-                            this.setNamespace("feature", this.featureNS);
-                            node = this.writeNode("_InlineGeometry", layer);
-                        }
-                    }
-                    if (layer.options.maxScale) {
-                        this.writeNode("sld:MinScaleDenominator", 
-                            layer.options.maxScale, node);
-                    }
-                    if (layer.options.minScale) {
-                        this.writeNode("sld:MaxScaleDenominator", 
-                            layer.options.minScale, node);
-                    }
-                    this.nestingLayerLookup[layer.name] = node;
-                    return node;
-                }
-            },
-            "_WFS": function(layer) {
-                var node = this.createElementNSPlus("Layer", {attributes: {
-                    name: layer.protocol.featurePrefix + ":" + layer.protocol.featureType,
-                    hidden: layer.visibility ? "0" : "1" }
-                });
-                this.writeNode("ows:Title", layer.name, node);
-                this.writeNode("Server", {service: 
-                    OpenLayers.Format.Context.serviceTypes.WFS, 
-                    version: layer.protocol.version, 
-                    url: layer.protocol.url}, node);
-                return node;
-            },
-            "_InlineGeometry": function(layer) {
-                var node = this.createElementNSPlus("Layer", {attributes: {
-                    name: this.featureType,
-                    hidden: layer.visibility ? "0" : "1" }
-                });
-                this.writeNode("ows:Title", layer.name, node);
-                this.writeNode("InlineGeometry", layer, node);
-                return node;
-            },
-            "_GML": function(layer) {
-                var node = this.createElementNSPlus("Layer");
-                this.writeNode("ows:Title", layer.name, node);
-                this.writeNode("Server", {service: 
-                    OpenLayers.Format.Context.serviceTypes.GML, 
-                    url: layer.protocol.url, version: 
-                    layer.protocol.format.version}, node);
-                return node;
-            },
-            "_KML": function(layer) {
-                var node = this.createElementNSPlus("Layer");
-                this.writeNode("ows:Title", layer.name, node);
-                this.writeNode("Server", {service: 
-                    OpenLayers.Format.Context.serviceTypes.KML,
-                    version: layer.protocol.format.version, url: 
-                    layer.protocol.url}, node);
-                return node;
-            }
-        },
-        "gml": OpenLayers.Util.applyDefaults({
-            "boundedBy": function(bounds) {
-                var node = this.createElementNSPlus("gml:boundedBy");
-                this.writeNode("gml:Box", bounds, node);
-                return node;
-            }
-        }, OpenLayers.Format.GML.v2.prototype.writers.gml),
-        "ows": OpenLayers.Format.OWSCommon.v1_0_0.prototype.writers.ows,
-        "sld": OpenLayers.Format.SLD.v1_0_0.prototype.writers.sld,
-        "feature": OpenLayers.Format.GML.v2.prototype.writers.feature
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.OWSContext.v0_3_1" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/SLD.js
+++ /dev/null
@@ -1,132 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Style.js
- * @requires OpenLayers/Rule.js
- * @requires OpenLayers/Filter/FeatureId.js
- * @requires OpenLayers/Filter/Logical.js
- * @requires OpenLayers/Filter/Comparison.js
- * @requires OpenLayers/Filter/Spatial.js
- */
-
-/**
- * Class: OpenLayers.Format.SLD
- * Read/Wite SLD. Create a new instance with the <OpenLayers.Format.SLD>
- *     constructor.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.SLD = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * APIProperty: defaultVersion
-     * {String} Version number to assume if none found.  Default is "1.0.0".
-     */
-    defaultVersion: "1.0.0",
-    
-    /**
-     * APIProperty: version
-     * {String} Specify a version string if one is known.
-     */
-    version: null,
-    
-    /**
-     * APIProperty: namedLayersAsArray
-     * {Boolean} Generate a namedLayers array.  If false, the namedLayers
-     *     property value will be an object keyed by layer name. Default is
-     *     false.
-     */
-    namedLayersAsArray: false,
-    
-    /**
-     * Property: parser
-     * {Object} Instance of the versioned parser.  Cached for multiple read and
-     *     write calls of the same version.
-     */
-    parser: null,
-
-    /**
-     * Constructor: OpenLayers.Format.SLD
-     * Create a new parser for SLD.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * APIMethod: write
-     * Write a SLD document given a list of styles.
-     *
-     * Parameters:
-     * sld - {Object} An object representing the SLD.
-     * options - {Object} Optional configuration object.
-     *
-     * Returns:
-     * {String} An SLD document string.
-     */
-    write: function(sld, options) {
-        var version = (options && options.version) ||
-                      this.version || this.defaultVersion;
-        if(!this.parser || this.parser.VERSION != version) {
-            var format = OpenLayers.Format.SLD[
-                "v" + version.replace(/\./g, "_")
-            ];
-            if(!format) {
-                throw "Can't find a SLD parser for version " +
-                      version;
-            }
-            this.parser = new format(this.options);
-        }
-        var root = this.parser.write(sld);
-        return OpenLayers.Format.XML.prototype.write.apply(this, [root]);
-    },
-    
-    /**
-     * APIMethod: read
-     * Read and SLD doc and return an object representing the SLD.
-     *
-     * Parameters:
-     * data - {String | DOMElement} Data to read.
-     * options - {Object} Options for the reader.
-     *
-     * Returns:
-     * {Object} An object representing the SLD.
-     */
-    read: function(data, options) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        var root = data.documentElement;
-        var version = this.version;
-        if(!version) {
-            version = root.getAttribute("version");
-            if(!version) {
-                version = this.defaultVersion;
-            }
-        }
-        if(!this.parser || this.parser.VERSION != version) {
-            var format = OpenLayers.Format.SLD[
-                "v" + version.replace(/\./g, "_")
-            ];
-            if(!format) {
-                throw "Can't find a SLD parser for version " +
-                      version;
-            }
-            this.parser = new format(this.options);
-        }
-        var sld = this.parser.read(data, options);
-        return sld;
-    },
-
-    CLASS_NAME: "OpenLayers.Format.SLD" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/SLD/v1.js
+++ /dev/null
@@ -1,1100 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Rule.js
- * @requires OpenLayers/Format/SLD.js
- * @requires OpenLayers/Format/Filter/v1_0_0.js
- */
-
-/**
- * Class: OpenLayers.Format.SLD.v1
- * Superclass for SLD version 1 parsers.
- *
- * Inherits from:
- *  - <OpenLayers.Format.Filter.v1_0_0>
- */
-OpenLayers.Format.SLD.v1 = OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0, {
-    
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        sld: "http://www.opengis.net/sld",
-        ogc: "http://www.opengis.net/ogc",
-        gml: "http://www.opengis.net/gml",
-        xlink: "http://www.w3.org/1999/xlink",
-        xsi: "http://www.w3.org/2001/XMLSchema-instance"
-    },
-    
-    /**
-     * Property: defaultPrefix
-     */
-    defaultPrefix: "sld",
-
-    /**
-     * Property: schemaLocation
-     * {String} Schema location for a particular minor version.
-     */
-    schemaLocation: null,
-    
-    /** 
-     * APIProperty: multipleSymbolizers
-     * {Boolean} Support multiple symbolizers per rule.  Default is false.  if
-     *     true, an OpenLayers.Style2 instance will be created to represent 
-     *     user styles instead of an OpenLayers.Style instace.  The 
-     *     OpenLayers.Style2 class allows collections of rules with multiple
-     *     symbolizers, but is not currently useful for client side rendering.
-     *     If multiple symbolizers is true, multiple FeatureTypeStyle elements
-     *     are preserved in reading/writing by setting symbolizer zIndex values.
-     *     In addition, the <defaultSymbolizer> property is ignored if 
-     *     multiple symbolizers are supported (defaults should be applied
-     *     when rendering).
-     */
-    multipleSymbolizers: false,
-
-    /**
-     * Property: featureTypeCounter
-     * {Number} Private counter for multiple feature type styles.
-     */
-    featureTypeCounter: null,
-
-    /**
-     * APIProperty: defaultSymbolizer.
-     * {Object} A symbolizer with the SLD defaults.
-     */
-    defaultSymbolizer: {
-        fillColor: "#808080",
-        fillOpacity: 1,
-        strokeColor: "#000000",
-        strokeOpacity: 1,
-        strokeWidth: 1,
-        strokeDashstyle: "solid",
-        pointRadius: 3,
-        graphicName: "square"
-    },
-    
-    /**
-     * Constructor: OpenLayers.Format.SLD.v1
-     * Instances of this class are not created directly.  Use the
-     *     <OpenLayers.Format.SLD> constructor instead.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.Filter.v1_0_0.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * Method: read
-     *
-     * Parameters:
-     * data - {DOMElement} An SLD document element.
-     * options - {Object} Options for the reader.
-     *
-     * Valid options:
-     * namedLayersAsArray - {Boolean}  Generate a namedLayers array.  If false,
-     *     the namedLayers property value will be an object keyed by layer name.
-     *     Default is false.
-     *
-     * Returns:
-     * {Object} An object representing the SLD.
-     */
-    read: function(data, options) {
-        options = OpenLayers.Util.applyDefaults(options, this.options);
-        var sld = {
-            namedLayers: options.namedLayersAsArray === true ? [] : {}
-        };
-        this.readChildNodes(data, sld);
-        return sld;
-    },
-    
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: OpenLayers.Util.applyDefaults({
-        "sld": {
-            "StyledLayerDescriptor": function(node, sld) {
-                sld.version = node.getAttribute("version");
-                this.readChildNodes(node, sld);
-            },
-            "Name": function(node, obj) {
-                obj.name = this.getChildValue(node);
-            },
-            "Title": function(node, obj) {
-                obj.title = this.getChildValue(node);
-            },
-            "Abstract": function(node, obj) {
-                obj.description = this.getChildValue(node);
-            },
-            "NamedLayer": function(node, sld) {
-                var layer = {
-                    userStyles: [],
-                    namedStyles: []
-                };
-                this.readChildNodes(node, layer);
-                // give each of the user styles this layer name
-                for(var i=0, len=layer.userStyles.length; i<len; ++i) {
-                    layer.userStyles[i].layerName = layer.name;
-                }
-                if(sld.namedLayers instanceof Array) {
-                    sld.namedLayers.push(layer);                
-                } else {
-                    sld.namedLayers[layer.name] = layer;
-                }
-            },
-            "NamedStyle": function(node, layer) {
-                layer.namedStyles.push(
-                    this.getChildName(node.firstChild)
-                );
-            },
-            "UserStyle": function(node, layer) {
-                var obj = {defaultsPerSymbolizer: true, rules: []};
-                this.featureTypeCounter = -1;
-                this.readChildNodes(node, obj);
-                var style;
-                if (this.multipleSymbolizers) {
-                    delete obj.defaultsPerSymbolizer;
-                    style = new OpenLayers.Style2(obj);
-                } else {
-                    style = new OpenLayers.Style(this.defaultSymbolizer, obj);
-                }
-                layer.userStyles.push(style);
-            },
-            "IsDefault": function(node, style) {
-                if(this.getChildValue(node) == "1") {
-                    style.isDefault = true;
-                }
-            },
-            "FeatureTypeStyle": function(node, style) {
-                ++this.featureTypeCounter;
-                var obj = {
-                    rules: this.multipleSymbolizers ? style.rules : []
-                };
-                this.readChildNodes(node, obj);
-                if (!this.multipleSymbolizers) {
-                    style.rules = obj.rules;
-                }
-            },
-            "Rule": function(node, obj) {
-                var config;
-                if (this.multipleSymbolizers) {
-                    config = {symbolizers: []};
-                }
-                var rule = new OpenLayers.Rule(config);
-                this.readChildNodes(node, rule);
-                obj.rules.push(rule);
-            },
-            "ElseFilter": function(node, rule) {
-                rule.elseFilter = true;
-            },
-            "MinScaleDenominator": function(node, rule) {
-                rule.minScaleDenominator = parseFloat(this.getChildValue(node));
-            },
-            "MaxScaleDenominator": function(node, rule) {
-                rule.maxScaleDenominator = parseFloat(this.getChildValue(node));
-            },
-            "TextSymbolizer": function(node, rule) {
-                var config = {};
-                this.readChildNodes(node, config);
-                if (this.multipleSymbolizers) {
-                    config.zIndex = this.featureTypeCounter;
-                    rule.symbolizers.push(
-                        new OpenLayers.Symbolizer.Text(config)
-                    );
-                } else {
-                    rule.symbolizer["Text"] = OpenLayers.Util.applyDefaults(
-                        config, rule.symbolizer["Text"]
-                    );
-                }
-            },
-            "Label": function(node, symbolizer) {
-                // only supporting literal or property name
-                var obj = {};
-                this.readChildNodes(node, obj);
-                if(obj.property) {
-                    symbolizer.label = "${" + obj.property + "}";
-                } else {
-                    var value = this.readOgcExpression(node);
-                    if(value) {
-                        symbolizer.label = value;
-                    }
-                }
-            },
-            "Font": function(node, symbolizer) {
-                this.readChildNodes(node, symbolizer);
-            },
-            "Halo": function(node, symbolizer) {
-                // halo has a fill, so send fresh object
-                var obj = {};
-                this.readChildNodes(node, obj);
-                symbolizer.haloRadius = obj.haloRadius;
-                symbolizer.haloColor = obj.fillColor;
-                symbolizer.haloOpacity = obj.fillOpacity;
-            },
-            "Radius": function(node, symbolizer) {
-                var radius = this.readOgcExpression(node);
-                if(radius != null) {
-                    // radius is only used for halo
-                    symbolizer.haloRadius = radius;
-                }
-            },
-            "RasterSymbolizer": function(node, rule) {
-                var config = {};
-                this.readChildNodes(node, config);
-                if (this.multipleSymbolizers) {
-                    config.zIndex = this.featureTypeCounter;
-                    rule.symbolizers.push(
-                        new OpenLayers.Symbolizer.Raster(config)
-                    );
-                } else {
-                    rule.symbolizer["Raster"] = OpenLayers.Util.applyDefaults(
-                        config, rule.symbolizer["Raster"]
-                    );
-                }
-            },
-            "Geometry": function(node, obj) {
-                obj.geometry = {};
-                this.readChildNodes(node, obj.geometry);
-            },
-            "ColorMap": function(node, symbolizer) {
-                symbolizer.colorMap = [];
-                this.readChildNodes(node, symbolizer.colorMap);
-            },
-            "ColorMapEntry": function(node, colorMap) {
-                var q = node.getAttribute("quantity");
-                var o = node.getAttribute("opacity");
-                colorMap.push({
-                    color: node.getAttribute("color"),
-                    quantity: q !== null ? parseFloat(q) : undefined,
-                    label: node.getAttribute("label") || undefined,
-                    opacity: o !== null ? parseFloat(o) : undefined
-                });
-            },
-            "LineSymbolizer": function(node, rule) {
-                var config = {};
-                this.readChildNodes(node, config);
-                if (this.multipleSymbolizers) {
-                    config.zIndex = this.featureTypeCounter;
-                    rule.symbolizers.push(
-                        new OpenLayers.Symbolizer.Line(config)
-                    );
-                } else {
-                    rule.symbolizer["Line"] = OpenLayers.Util.applyDefaults(
-                        config, rule.symbolizer["Line"]
-                    );
-                }
-            },
-            "PolygonSymbolizer": function(node, rule) {
-                var config = {
-                    fill: false,
-                    stroke: false
-                };
-                if (!this.multipleSymbolizers) {
-                    config = rule.symbolizer["Polygon"] || config;
-                }
-                this.readChildNodes(node, config);
-                if (this.multipleSymbolizers) {
-                    config.zIndex = this.featureTypeCounter;
-                    rule.symbolizers.push(
-                        new OpenLayers.Symbolizer.Polygon(config)
-                    );
-                } else {
-                    rule.symbolizer["Polygon"] = config;
-                }
-            },
-            "PointSymbolizer": function(node, rule) {
-                var config = {
-                    fill: false,
-                    stroke: false,
-                    graphic: false
-                };
-                if (!this.multipleSymbolizers) {
-                    config = rule.symbolizer["Point"] || config;
-                }
-                this.readChildNodes(node, config);
-                if (this.multipleSymbolizers) {
-                    config.zIndex = this.featureTypeCounter;
-                    rule.symbolizers.push(
-                        new OpenLayers.Symbolizer.Point(config)
-                    );
-                } else {
-                    rule.symbolizer["Point"] = config;
-                }
-            },
-            "Stroke": function(node, symbolizer) {
-                symbolizer.stroke = true;
-                this.readChildNodes(node, symbolizer);
-            },
-            "Fill": function(node, symbolizer) {
-                symbolizer.fill = true;
-                this.readChildNodes(node, symbolizer);
-            },
-            "CssParameter": function(node, symbolizer) {
-                var cssProperty = node.getAttribute("name");
-                var symProperty = this.cssMap[cssProperty];
-                if(symProperty) {
-                    // Limited support for parsing of OGC expressions
-                    var value = this.readOgcExpression(node);
-                    // always string, could be an empty string
-                    if(value) {
-                        symbolizer[symProperty] = value;
-                    }
-                }
-            },
-            "Graphic": function(node, symbolizer) {
-                symbolizer.graphic = true;
-                var graphic = {};
-                // painter's order not respected here, clobber previous with next
-                this.readChildNodes(node, graphic);
-                // directly properties with names that match symbolizer properties
-                var properties = [
-                    "stroke", "strokeColor", "strokeWidth", "strokeOpacity",
-                    "strokeLinecap", "fill", "fillColor", "fillOpacity",
-                    "graphicName", "rotation", "graphicFormat"
-                ];
-                var prop, value;
-                for(var i=0, len=properties.length; i<len; ++i) {
-                    prop = properties[i];
-                    value = graphic[prop];
-                    if(value != undefined) {
-                        symbolizer[prop] = value;
-                    }
-                }
-                // set other generic properties with specific graphic property names
-                if(graphic.opacity != undefined) {
-                    symbolizer.graphicOpacity = graphic.opacity;
-                }
-                if(graphic.size != undefined) {
-                    symbolizer.pointRadius = graphic.size / 2;
-                }
-                if(graphic.href != undefined) {
-                    symbolizer.externalGraphic = graphic.href;
-                }
-                if(graphic.rotation != undefined) {
-                    symbolizer.rotation = graphic.rotation;
-                }
-            },
-            "ExternalGraphic": function(node, graphic) {
-                this.readChildNodes(node, graphic);
-            },
-            "Mark": function(node, graphic) {
-                this.readChildNodes(node, graphic);
-            },
-            "WellKnownName": function(node, graphic) {
-                graphic.graphicName = this.getChildValue(node);
-            },
-            "Opacity": function(node, obj) {
-                var opacity = this.readOgcExpression(node);
-                // always string, could be empty string
-                if(opacity) {
-                    obj.opacity = opacity;
-                }
-            },
-            "Size": function(node, obj) {
-                var size = this.readOgcExpression(node);
-                // always string, could be empty string
-                if(size) {
-                    obj.size = size;
-                }
-            },
-            "Rotation": function(node, obj) {
-                var rotation = this.readOgcExpression(node);
-                // always string, could be empty string
-                if(rotation) {
-                    obj.rotation = rotation;
-                }
-            },
-            "OnlineResource": function(node, obj) {
-                obj.href = this.getAttributeNS(
-                    node, this.namespaces.xlink, "href"
-                );
-            },
-            "Format": function(node, graphic) {
-                graphic.graphicFormat = this.getChildValue(node);
-            }
-        }
-    }, OpenLayers.Format.Filter.v1_0_0.prototype.readers),
-    
-    /**
-     * Property: cssMap
-     * {Object} Object mapping supported css property names to OpenLayers
-     *     symbolizer property names.
-     */
-    cssMap: {
-        "stroke": "strokeColor",
-        "stroke-opacity": "strokeOpacity",
-        "stroke-width": "strokeWidth",
-        "stroke-linecap": "strokeLinecap",
-        "stroke-dasharray": "strokeDashstyle",
-        "fill": "fillColor",
-        "fill-opacity": "fillOpacity",
-        "font-family": "fontFamily",
-        "font-size": "fontSize",
-        "font-weight": "fontWeight",
-        "font-style": "fontStyle"
-    },
-    
-    /**
-     * Method: getCssProperty
-     * Given a symbolizer property, get the corresponding CSS property
-     *     from the <cssMap>.
-     *
-     * Parameters:
-     * sym - {String} A symbolizer property name.
-     *
-     * Returns:
-     * {String} A CSS property name or null if none found.
-     */
-    getCssProperty: function(sym) {
-        var css = null;
-        for(var prop in this.cssMap) {
-            if(this.cssMap[prop] == sym) {
-                css = prop;
-                break;
-            }
-        }
-        return css;
-    },
-    
-    /**
-     * Method: getGraphicFormat
-     * Given a href for an external graphic, try to determine the mime-type.
-     *     This method doesn't try too hard, and will fall back to
-     *     <defautlGraphicFormat> if one of the known <graphicFormats> is not
-     *     the file extension of the provided href.
-     *
-     * Parameters:
-     * href - {String}
-     *
-     * Returns:
-     * {String} The graphic format.
-     */
-    getGraphicFormat: function(href) {
-        var format, regex;
-        for(var key in this.graphicFormats) {
-            if(this.graphicFormats[key].test(href)) {
-                format = key;
-                break;
-            }
-        }
-        return format || this.defautlGraphicFormat;
-    },
-    
-    /**
-     * Property: defaultGraphicFormat
-     * {String} If none other can be determined from <getGraphicFormat>, this
-     *     default will be returned.
-     */
-    defaultGraphicFormat: "image/png",
-    
-    /**
-     * Property: graphicFormats
-     * {Object} Mapping of image mime-types to regular extensions matching 
-     *     well-known file extensions.
-     */
-    graphicFormats: {
-        "image/jpeg": /\.jpe?g$/i,
-        "image/gif": /\.gif$/i,
-        "image/png": /\.png$/i
-    },
-
-    /**
-     * Method: write
-     *
-     * Parameters:
-     * sld - {Object} An object representing the SLD.
-     *
-     * Returns:
-     * {DOMElement} The root of an SLD document.
-     */
-    write: function(sld) {
-        return this.writers.sld.StyledLayerDescriptor.apply(this, [sld]);
-    },
-    
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: OpenLayers.Util.applyDefaults({
-        "sld": {
-            "StyledLayerDescriptor": function(sld) {
-                var root = this.createElementNSPlus(
-                    "sld:StyledLayerDescriptor",
-                    {attributes: {
-                        "version": this.VERSION,
-                        "xsi:schemaLocation": this.schemaLocation
-                    }}
-                );
-
-                // For ArcGIS Server it is necessary to define this
-                // at the root level (see ticket:2166).
-                root.setAttribute("xmlns:ogc", this.namespaces.ogc);
-                root.setAttribute("xmlns:gml", this.namespaces.gml);
-
-                // add in optional name
-                if(sld.name) {
-                    this.writeNode("Name", sld.name, root);
-                }
-                // add in optional title
-                if(sld.title) {
-                    this.writeNode("Title", sld.title, root);
-                }
-                // add in optional description
-                if(sld.description) {
-                    this.writeNode("Abstract", sld.description, root);
-                }
-                // add in named layers
-                // allow namedLayers to be an array
-                if(sld.namedLayers instanceof Array) {
-                    for(var i=0, len=sld.namedLayers.length; i<len; ++i) {
-                        this.writeNode("NamedLayer", sld.namedLayers[i], root);
-                    }
-                } else {
-                    for(var name in sld.namedLayers) {
-                        this.writeNode("NamedLayer", sld.namedLayers[name], root);
-                    }
-                }
-                return root;
-            },
-            "Name": function(name) {
-                return this.createElementNSPlus("sld:Name", {value: name});
-            },
-            "Title": function(title) {
-                return this.createElementNSPlus("sld:Title", {value: title});
-            },
-            "Abstract": function(description) {
-                return this.createElementNSPlus(
-                    "sld:Abstract", {value: description}
-                );
-            },
-            "NamedLayer": function(layer) {
-                var node = this.createElementNSPlus("sld:NamedLayer");
-
-                // add in required name
-                this.writeNode("Name", layer.name, node);
-
-                // optional sld:LayerFeatureConstraints here
-
-                // add in named styles
-                if(layer.namedStyles) {
-                    for(var i=0, len=layer.namedStyles.length; i<len; ++i) {
-                        this.writeNode(
-                            "NamedStyle", layer.namedStyles[i], node
-                        );
-                    }
-                }
-                
-                // add in user styles
-                if(layer.userStyles) {
-                    for(var i=0, len=layer.userStyles.length; i<len; ++i) {
-                        this.writeNode(
-                            "UserStyle", layer.userStyles[i], node
-                        );
-                    }
-                }
-                
-                return node;
-            },
-            "NamedStyle": function(name) {
-                var node = this.createElementNSPlus("sld:NamedStyle");
-                this.writeNode("Name", name, node);
-                return node;
-            },
-            "UserStyle": function(style) {
-                var node = this.createElementNSPlus("sld:UserStyle");
-
-                // add in optional name
-                if(style.name) {
-                    this.writeNode("Name", style.name, node);
-                }
-                // add in optional title
-                if(style.title) {
-                    this.writeNode("Title", style.title, node);
-                }
-                // add in optional description
-                if(style.description) {
-                    this.writeNode("Abstract", style.description, node);
-                }
-                
-                // add isdefault
-                if(style.isDefault) {
-                    this.writeNode("IsDefault", style.isDefault, node);
-                }
-                
-                // add FeatureTypeStyles
-                if (this.multipleSymbolizers && style.rules) {
-                    // group style objects by symbolizer zIndex
-                    var rulesByZ = {
-                        0: []
-                    };
-                    var zValues = [0];
-                    var rule, ruleMap, symbolizer, zIndex, clone;
-                    for (var i=0, ii=style.rules.length; i<ii; ++i) {
-                        rule = style.rules[i];
-                        if (rule.symbolizers) {
-                            ruleMap = {};
-                            for (var j=0, jj=rule.symbolizers.length; j<jj; ++j) {
-                                symbolizer = rule.symbolizers[j];
-                                zIndex = symbolizer.zIndex;
-                                if (!(zIndex in ruleMap)) {
-                                    clone = rule.clone();
-                                    clone.symbolizers = [];
-                                    ruleMap[zIndex] = clone;
-                                }
-                                ruleMap[zIndex].symbolizers.push(symbolizer.clone());
-                            }
-                            for (zIndex in ruleMap) {
-                                if (!(zIndex in rulesByZ)) {
-                                    zValues.push(zIndex);
-                                    rulesByZ[zIndex] = [];
-                                }
-                                rulesByZ[zIndex].push(ruleMap[zIndex]);
-                            }
-                        } else {
-                            // no symbolizers in rule
-                            rulesByZ[0].push(rule.clone());
-                        }
-                    }
-                    // write one FeatureTypeStyle per zIndex
-                    zValues.sort();
-                    var rules;
-                    for (var i=0, ii=zValues.length; i<ii; ++i) {
-                        rules = rulesByZ[zValues[i]];
-                        if (rules.length > 0) {
-                            clone = style.clone();
-                            clone.rules = rulesByZ[zValues[i]];
-                            this.writeNode("FeatureTypeStyle", clone, node);
-                        }
-                    }                    
-                } else {
-                    this.writeNode("FeatureTypeStyle", style, node);
-                }
-                
-                return node;
-            },
-            "IsDefault": function(bool) {
-                return this.createElementNSPlus(
-                    "sld:IsDefault", {value: (bool) ? "1" : "0"}
-                );
-            },
-            "FeatureTypeStyle": function(style) {
-                var node = this.createElementNSPlus("sld:FeatureTypeStyle");
-                
-                // OpenLayers currently stores no Name, Title, Abstract,
-                // FeatureTypeName, or SemanticTypeIdentifier information
-                // related to FeatureTypeStyle
-                
-                // add in rules
-                for(var i=0, len=style.rules.length; i<len; ++i) {
-                    this.writeNode("Rule", style.rules[i], node);
-                }
-                
-                return node;
-            },
-            "Rule": function(rule) {
-                var node = this.createElementNSPlus("sld:Rule");
-
-                // add in optional name
-                if(rule.name) {
-                    this.writeNode("Name", rule.name, node);
-                }
-                // add in optional title
-                if(rule.title) {
-                    this.writeNode("Title", rule.title, node);
-                }
-                // add in optional description
-                if(rule.description) {
-                    this.writeNode("Abstract", rule.description, node);
-                }
-                
-                // add in LegendGraphic here
-                
-                // add in optional filters
-                if(rule.elseFilter) {
-                    this.writeNode("ElseFilter", null, node);
-                } else if(rule.filter) {
-                    this.writeNode("ogc:Filter", rule.filter, node);
-                }
-                
-                // add in scale limits
-                if(rule.minScaleDenominator != undefined) {
-                    this.writeNode(
-                        "MinScaleDenominator", rule.minScaleDenominator, node
-                    );
-                }
-                if(rule.maxScaleDenominator != undefined) {
-                    this.writeNode(
-                        "MaxScaleDenominator", rule.maxScaleDenominator, node
-                    );
-                }
-                
-                var type, symbolizer;
-                if (this.multipleSymbolizers && rule.symbolizers) {
-                    var symbolizer;
-                    for (var i=0, ii=rule.symbolizers.length; i<ii; ++i) {
-                        symbolizer = rule.symbolizers[i];
-                        type = symbolizer.CLASS_NAME.split(".").pop();
-                        this.writeNode(
-                            type + "Symbolizer", symbolizer, node
-                        );
-                    }
-                } else {
-                    // add in symbolizers (relies on geometry type keys)
-                    var types = OpenLayers.Style.SYMBOLIZER_PREFIXES;
-                    for(var i=0, len=types.length; i<len; ++i) {
-                        type = types[i];
-                        symbolizer = rule.symbolizer[type];
-                        if(symbolizer) {
-                            this.writeNode(
-                                type + "Symbolizer", symbolizer, node
-                            );
-                        }
-                    }
-                }
-                return node;
-
-            },
-            "ElseFilter": function() {
-                return this.createElementNSPlus("sld:ElseFilter");
-            },
-            "MinScaleDenominator": function(scale) {
-                return this.createElementNSPlus(
-                    "sld:MinScaleDenominator", {value: scale}
-                );
-            },
-            "MaxScaleDenominator": function(scale) {
-                return this.createElementNSPlus(
-                    "sld:MaxScaleDenominator", {value: scale}
-                );
-            },
-            "LineSymbolizer": function(symbolizer) {
-                var node = this.createElementNSPlus("sld:LineSymbolizer");
-                this.writeNode("Stroke", symbolizer, node);
-                return node;
-            },
-            "Stroke": function(symbolizer) {
-                var node = this.createElementNSPlus("sld:Stroke");
-
-                // GraphicFill here
-                // GraphicStroke here
-
-                // add in CssParameters
-                if(symbolizer.strokeColor != undefined) {
-                    this.writeNode(
-                        "CssParameter",
-                        {symbolizer: symbolizer, key: "strokeColor"},
-                        node
-                    );
-                }
-                if(symbolizer.strokeOpacity != undefined) {
-                    this.writeNode(
-                        "CssParameter",
-                        {symbolizer: symbolizer, key: "strokeOpacity"},
-                        node
-                    );
-                }
-                if(symbolizer.strokeWidth != undefined) {
-                    this.writeNode(
-                        "CssParameter",
-                        {symbolizer: symbolizer, key: "strokeWidth"},
-                        node
-                    );
-                }
-                if(symbolizer.strokeDashstyle != undefined && symbolizer.strokeDashstyle !== "solid") {
-                    // assumes valid stroke-dasharray value
-                    this.writeNode(
-                        "CssParameter", 
-                        {symbolizer: symbolizer, key: "strokeDashstyle"},
-                        node
-                    );
-                }
-                if(symbolizer.strokeLinecap != undefined) {
-                    this.writeNode(
-                        "CssParameter", 
-                        {symbolizer: symbolizer, key: "strokeLinecap"},
-                        node
-                    );
-                }
-                return node;
-            },
-            "CssParameter": function(obj) {
-                // not handling ogc:expressions for now
-                return this.createElementNSPlus("sld:CssParameter", {
-                    attributes: {name: this.getCssProperty(obj.key)},
-                    value: obj.symbolizer[obj.key]
-                });
-            },
-            "TextSymbolizer": function(symbolizer) {
-                var node = this.createElementNSPlus("sld:TextSymbolizer");
-                // add in optional Label
-                if(symbolizer.label != null) {
-                    this.writeNode("Label", symbolizer.label, node);
-                }
-                // add in optional Font
-                if(symbolizer.fontFamily != null ||
-                   symbolizer.fontSize != null ||
-                   symbolizer.fontWeight != null ||
-                   symbolizer.fontStyle != null) {
-                    this.writeNode("Font", symbolizer, node);
-                }
-                // add in optional Halo
-                if(symbolizer.haloRadius != null ||
-                   symbolizer.haloColor != null ||
-                   symbolizer.haloOpacity != null) {
-                    this.writeNode("Halo", symbolizer, node);
-                }
-                // add in optional Fill
-                if(symbolizer.fillColor != null ||
-                   symbolizer.fillOpacity != null) {
-                    this.writeNode("Fill", symbolizer, node);
-                }
-                return node;
-            },
-            "Font": function(symbolizer) {
-                var node = this.createElementNSPlus("sld:Font");
-                // add in CssParameters
-                if(symbolizer.fontFamily) {
-                    this.writeNode(
-                        "CssParameter",
-                        {symbolizer: symbolizer, key: "fontFamily"},
-                        node
-                    );
-                }
-                if(symbolizer.fontSize) {
-                    this.writeNode(
-                        "CssParameter",
-                        {symbolizer: symbolizer, key: "fontSize"},
-                        node
-                    );
-                }
-                if(symbolizer.fontWeight) {
-                    this.writeNode(
-                        "CssParameter",
-                        {symbolizer: symbolizer, key: "fontWeight"},
-                        node
-                    );
-                }
-                if(symbolizer.fontStyle) {
-                    this.writeNode(
-                        "CssParameter",
-                        {symbolizer: symbolizer, key: "fontStyle"},
-                        node
-                    );
-                }
-                return node;
-            },
-            "Label": function(label) {
-                // only the simplest of ogc:expression handled
-                // {label: "some text and a ${propertyName}"}
-                var node = this.createElementNSPlus("sld:Label");
-                var tokens = label.split("${");
-                node.appendChild(this.createTextNode(tokens[0]));
-                var item, last;
-                for(var i=1, len=tokens.length; i<len; i++) {
-                    item = tokens[i];
-                    last = item.indexOf("}"); 
-                    if(last > 0) {
-                        this.writeNode(
-                            "ogc:PropertyName",
-                            {property: item.substring(0, last)},
-                            node
-                        );
-                        node.appendChild(
-                            this.createTextNode(item.substring(++last))
-                        );
-                    } else {
-                        // no ending }, so this is a literal ${
-                        node.appendChild(
-                            this.createTextNode("${" + item)
-                        );
-                    }
-                }
-                return node;
-            },
-            "Halo": function(symbolizer) {
-                var node = this.createElementNSPlus("sld:Halo");
-                if(symbolizer.haloRadius) {
-                    this.writeNode("Radius", symbolizer.haloRadius, node);
-                }
-                if(symbolizer.haloColor || symbolizer.haloOpacity) {
-                    this.writeNode("Fill", {
-                        fillColor: symbolizer.haloColor,
-                        fillOpacity: symbolizer.haloOpacity
-                    }, node);
-                }
-                return node;
-            },
-            "Radius": function(value) {
-                return this.createElementNSPlus("sld:Radius", {
-                    value: value
-                });
-            },
-            "RasterSymbolizer": function(symbolizer) {
-                var node = this.createElementNSPlus("sld:RasterSymbolizer");
-                if (symbolizer.geometry) {
-                    this.writeNode("Geometry", symbolizer.geometry, node);
-                }
-                if (symbolizer.opacity) {
-                    this.writeNode("Opacity", symbolizer.opacity, node);
-                }
-                if (symbolizer.colorMap) {
-                    this.writeNode("ColorMap", symbolizer.colorMap, node);
-                }
-                return node;
-            },
-            "Geometry": function(geometry) {
-                var node = this.createElementNSPlus("sld:Geometry");
-                if (geometry.property) {
-                    this.writeNode("ogc:PropertyName", geometry, node);
-                }
-                return node;
-            },
-            "ColorMap": function(colorMap) {
-                var node = this.createElementNSPlus("sld:ColorMap");
-                for (var i=0, len=colorMap.length; i<len; ++i) {
-                    this.writeNode("ColorMapEntry", colorMap[i], node);
-                }
-                return node;
-            },
-            "ColorMapEntry": function(colorMapEntry) {
-                var node = this.createElementNSPlus("sld:ColorMapEntry");
-                var a = colorMapEntry;
-                node.setAttribute("color", a.color);
-                a.opacity !== undefined && node.setAttribute("opacity",
-                    parseFloat(a.opacity));
-                a.quantity !== undefined && node.setAttribute("quantity",
-                    parseFloat(a.quantity));
-                a.label !== undefined && node.setAttribute("label", a.label);
-                return node;
-            },
-            "PolygonSymbolizer": function(symbolizer) {
-                var node = this.createElementNSPlus("sld:PolygonSymbolizer");
-                if(symbolizer.fill !== false) {
-                    this.writeNode("Fill", symbolizer, node);
-                }
-                if(symbolizer.stroke !== false) {
-                    this.writeNode("Stroke", symbolizer, node);
-                }
-                return node;
-            },
-            "Fill": function(symbolizer) {
-                var node = this.createElementNSPlus("sld:Fill");
-                
-                // GraphicFill here
-                
-                // add in CssParameters
-                if(symbolizer.fillColor) {
-                    this.writeNode(
-                        "CssParameter",
-                        {symbolizer: symbolizer, key: "fillColor"},
-                        node
-                    );
-                }
-                if(symbolizer.fillOpacity != null) {
-                    this.writeNode(
-                        "CssParameter",
-                        {symbolizer: symbolizer, key: "fillOpacity"},
-                        node
-                    );
-                }
-                return node;
-            },
-            "PointSymbolizer": function(symbolizer) {
-                var node = this.createElementNSPlus("sld:PointSymbolizer");
-                this.writeNode("Graphic", symbolizer, node);
-                return node;
-            },
-            "Graphic": function(symbolizer) {
-                var node = this.createElementNSPlus("sld:Graphic");
-                if(symbolizer.externalGraphic != undefined) {
-                    this.writeNode("ExternalGraphic", symbolizer, node);
-                } else {
-                    this.writeNode("Mark", symbolizer, node);
-                }
-                
-                if(symbolizer.graphicOpacity != undefined) {
-                    this.writeNode("Opacity", symbolizer.graphicOpacity, node);
-                }
-                if(symbolizer.pointRadius != undefined) {
-                    this.writeNode("Size", symbolizer.pointRadius * 2, node);
-                }
-                if(symbolizer.rotation != undefined) {
-                    this.writeNode("Rotation", symbolizer.rotation, node);
-                }
-                return node;
-            },
-            "ExternalGraphic": function(symbolizer) {
-                var node = this.createElementNSPlus("sld:ExternalGraphic");
-                this.writeNode(
-                    "OnlineResource", symbolizer.externalGraphic, node
-                );
-                var format = symbolizer.graphicFormat ||
-                             this.getGraphicFormat(symbolizer.externalGraphic);
-                this.writeNode("Format", format, node);
-                return node;
-            },
-            "Mark": function(symbolizer) {
-                var node = this.createElementNSPlus("sld:Mark");
-                if(symbolizer.graphicName) {
-                    this.writeNode("WellKnownName", symbolizer.graphicName, node);
-                }
-                if (symbolizer.fill !== false) {
-                    this.writeNode("Fill", symbolizer, node);
-                }
-                if (symbolizer.stroke !== false) {
-                    this.writeNode("Stroke", symbolizer, node);
-                }
-                return node;
-            },
-            "WellKnownName": function(name) {
-                return this.createElementNSPlus("sld:WellKnownName", {
-                    value: name
-                });
-            },
-            "Opacity": function(value) {
-                return this.createElementNSPlus("sld:Opacity", {
-                    value: value
-                });
-            },
-            "Size": function(value) {
-                return this.createElementNSPlus("sld:Size", {
-                    value: value
-                });
-            },
-            "Rotation": function(value) {
-                return this.createElementNSPlus("sld:Rotation", {
-                    value: value
-                });
-            },
-            "OnlineResource": function(href) {
-                return this.createElementNSPlus("sld:OnlineResource", {
-                    attributes: {
-                        "xlink:type": "simple",
-                        "xlink:href": href
-                    }
-                });
-            },
-            "Format": function(format) {
-                return this.createElementNSPlus("sld:Format", {
-                    value: format
-                });
-            }
-        }
-    }, OpenLayers.Format.Filter.v1_0_0.prototype.writers),
-    
-    CLASS_NAME: "OpenLayers.Format.SLD.v1" 
-
-});

--- a/labs/openlayers/lib/OpenLayers/Format/SLD/v1_0_0.js
+++ /dev/null
@@ -1,52 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/SLD/v1.js
- * @requires OpenLayers/Format/Filter/v1_0_0.js
- */
-
-/**
- * Class: OpenLayers.Format.SLD.v1_0_0
- * Write SLD version 1.0.0.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.SLD.v1>
- */
-OpenLayers.Format.SLD.v1_0_0 = OpenLayers.Class(
-    OpenLayers.Format.SLD.v1, {
-    
-    /**
-     * Constant: VERSION
-     * {String} 1.0.0
-     */
-    VERSION: "1.0.0",
-    
-    /**
-     * Property: schemaLocation
-     * {String} http://www.opengis.net/sld
-     *   http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd
-     */
-    schemaLocation: "http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd",
-
-    /**
-     * Constructor: OpenLayers.Format.SLD.v1_0_0
-     * Instances of this class are not created directly.  Use the
-     *     <OpenLayers.Format.SLD> constructor instead.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.SLD.v1.prototype.initialize.apply(
-            this, [options]
-        );
-    },
-
-    CLASS_NAME: "OpenLayers.Format.SLD.v1_0_0" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/SOSCapabilities.js
+++ /dev/null
@@ -1,84 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- */
- 
-/**
- * Class: OpenLayers.Format.SOSCapabilities
- * Read SOS Capabilities.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.SOSCapabilities = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * APIProperty: defaultVersion
-     * {String} Version number to assume if none found.  Default is "1.0.0".
-     */
-    defaultVersion: "1.0.0",
-    
-    /**
-     * APIProperty: version
-     * {String} Specify a version string if one is known.
-     */
-    version: null,
-
-    /**
-     * Property: parser
-     * {<OpenLayers.Format>} A cached versioned format used for reading.
-     */
-    parser: null,     
-
-    /**
-     * Constructor: OpenLayers.Format.SOSCapabilities
-     * Create a new parser for SOS capabilities.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-        this.options = options;
-    },
-
-    /**
-     * APIMethod: read
-     * Read capabilities data from a string, and return information about
-     * the service (offering and observedProperty mostly).
-     * 
-     * Parameters: 
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Object} Info about the SOS
-     */
-    read: function(data) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        var root = data.documentElement;
-        var version = this.version || root.getAttribute("version") || this.defaultVersion;
-        if(!this.parser || this.parser.version !== version) {
-            var constr = OpenLayers.Format.SOSCapabilities[
-                "v" + version.replace(/\./g, "_")
-            ];
-            if(!constr) {
-                throw "Can't find a SOS capabilities parser for version " + version;
-            }
-            var parser = new constr(this.options);
-        }
-        var capabilities = parser.read(data);
-        capabilities.version = version;
-        return capabilities; 
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.SOSCapabilities" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js
+++ /dev/null
@@ -1,159 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/SOSCapabilities.js
- * @requires OpenLayers/Format/OWSCommon/v1_1_0.js
- * @requires OpenLayers/Format/GML/v3.js
- */
-
-/**
- * Class: OpenLayers.Format.SOSCapabilities.v1_0_0
- * Read SOS Capabilities version 1.0.0.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.SOSCapabilities>
- */
-OpenLayers.Format.SOSCapabilities.v1_0_0 = OpenLayers.Class(
-    OpenLayers.Format.SOSCapabilities, {
-
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        ows: "http://www.opengis.net/ows/1.1",
-        sos: "http://www.opengis.net/sos/1.0",
-        gml: "http://www.opengis.net/gml",
-        xlink: "http://www.w3.org/1999/xlink"
-    },
-
-    /**
-     * Property: regExes
-     * Compiled regular expressions for manipulating strings.
-     */
-    regExes: {
-        trimSpace: (/^\s*|\s*$/g),
-        removeSpace: (/\s*/g),
-        splitSpace: (/\s+/),
-        trimComma: (/\s*,\s*/g)
-    },
-    
-    /**
-     * Constructor: OpenLayers.Format.SOSCapabilities.v1_0_0
-     * Create a new parser for SOS capabilities version 1.0.0. 
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-        this.options = options;
-    },
-
-    /**
-     * APIMethod: read
-     * Read capabilities data from a string, and return info about the SOS.
-     * 
-     * Parameters: 
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Object} Information about the SOS service.
-     */
-    read: function(data) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        if(data && data.nodeType == 9) {
-            data = data.documentElement;
-        }
-        var capabilities = {};
-        this.readNode(data, capabilities);
-        return capabilities;
-    },
-
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "gml": OpenLayers.Util.applyDefaults({
-            "name": function(node, obj) {
-                obj.name = this.getChildValue(node);
-            },
-            "TimePeriod": function(node, obj) {
-                obj.timePeriod = {};
-                this.readChildNodes(node, obj.timePeriod);
-            },
-            "beginPosition": function(node, timePeriod) {
-                timePeriod.beginPosition = this.getChildValue(node);
-            },
-            "endPosition": function(node, timePeriod) {
-                timePeriod.endPosition = this.getChildValue(node);
-            }
-        }, OpenLayers.Format.GML.v3.prototype.readers["gml"]),
-        "sos": {
-            "Capabilities": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "Contents": function(node, obj) {
-                obj.contents = {};
-                this.readChildNodes(node, obj.contents);
-            },
-            "ObservationOfferingList": function(node, contents) {
-                contents.offeringList = {};
-                this.readChildNodes(node, contents.offeringList);
-            },
-            "ObservationOffering": function(node, offeringList) {
-                var id = this.getAttributeNS(node, this.namespaces.gml, "id");
-                offeringList[id] = {
-                    procedures: [],
-                    observedProperties: [],
-                    featureOfInterestIds: [],
-                    responseFormats: [],
-                    resultModels: [],
-                    responseModes: []
-                };
-                this.readChildNodes(node, offeringList[id]);
-            },
-            "time": function(node, offering) {
-                offering.time = {};
-                this.readChildNodes(node, offering.time);
-            },
-            "procedure": function(node, offering) {
-                offering.procedures.push(this.getAttributeNS(node, 
-                    this.namespaces.xlink, "href"));
-            },
-            "observedProperty": function(node, offering) {
-                offering.observedProperties.push(this.getAttributeNS(node, 
-                    this.namespaces.xlink, "href"));
-            },
-            "featureOfInterest": function(node, offering) {
-                offering.featureOfInterestIds.push(this.getAttributeNS(node, 
-                    this.namespaces.xlink, "href"));
-            },
-            "responseFormat": function(node, offering) {
-                offering.responseFormats.push(this.getChildValue(node));
-            },
-            "resultModel": function(node, offering) {
-                offering.resultModels.push(this.getChildValue(node));
-            },
-            "responseMode": function(node, offering) {
-                offering.responseModes.push(this.getChildValue(node));;
-            }
-        },
-        "ows": OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"]
-    },    
-    
-    CLASS_NAME: "OpenLayers.Format.SOSCapabilities.v1_0_0" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js
+++ /dev/null
@@ -1,194 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
- 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Format/GML/v3.js
- */
 
-/**
- * Class: OpenLayers.Format.SOSGetFeatureOfInterest
- * Read and write SOS GetFeatureOfInterest. This is used to get to
- * the location of the features (stations). The stations can have 1 or more
- * sensors.
- *
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.SOSGetFeatureOfInterest = OpenLayers.Class(
-    OpenLayers.Format.XML, {
-    
-    /**
-     * Constant: VERSION
-     * {String} 1.0.0
-     */
-    VERSION: "1.0.0",
-
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        sos: "http://www.opengis.net/sos/1.0",
-        gml: "http://www.opengis.net/gml",
-        sa: "http://www.opengis.net/sampling/1.0",
-        xsi: "http://www.w3.org/2001/XMLSchema-instance"
-    },
-
-    /**
-     * Property: schemaLocation
-     * {String} Schema location
-     */
-    schemaLocation: "http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosAll.xsd",
-
-    /**
-     * Property: defaultPrefix
-     */
-    defaultPrefix: "sos",
-
-    /**
-     * Property: regExes
-     * Compiled regular expressions for manipulating strings.
-     */
-    regExes: {
-        trimSpace: (/^\s*|\s*$/g),
-        removeSpace: (/\s*/g),
-        splitSpace: (/\s+/),
-        trimComma: (/\s*,\s*/g)
-    },
-    
-    /**
-     * Constructor: OpenLayers.Format.SOSGetFeatureOfInterest
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * APIMethod: read
-     * Parse a GetFeatureOfInterest response and return an array of features
-     * 
-     * Parameters: 
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Feature.Vector>)} An array of features. 
-     */
-    read: function(data) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        if(data && data.nodeType == 9) {
-            data = data.documentElement;
-        }
-
-        var info = {features: []};
-        this.readNode(data, info);
-       
-        var features = [];
-        for (var i=0, len=info.features.length; i<len; i++) {
-            var container = info.features[i];
-            // reproject features if needed
-            if(this.internalProjection && this.externalProjection &&
-                container.components[0]) {
-                    container.components[0].transform(
-                        this.externalProjection, this.internalProjection
-                    );
-            }             
-            var feature = new OpenLayers.Feature.Vector(
-                container.components[0], container.attributes);
-            features.push(feature);
-        }
-        return features;
-    },
-
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "sa": {
-            "SamplingPoint": function(node, obj) {
-                // sampling point can also be without a featureMember if 
-                // there is only 1
-                if (!obj.attributes) {
-                    var feature = {attributes: {}};
-                    obj.features.push(feature);
-                    obj = feature;
-                }
-                obj.attributes.id = this.getAttributeNS(node, 
-                    this.namespaces.gml, "id");
-                this.readChildNodes(node, obj);
-            },
-            "position": function (node, obj) {
-                this.readChildNodes(node, obj);
-            }
-        },
-        "gml": OpenLayers.Util.applyDefaults({
-            "FeatureCollection": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "featureMember": function(node, obj) {
-                var feature = {attributes: {}};
-                obj.features.push(feature);
-                this.readChildNodes(node, feature);
-            },
-            "name": function(node, obj) {
-                obj.attributes.name = this.getChildValue(node);
-            },
-            "pos": function(node, obj) {
-                // we need to parse the srsName to get to the 
-                // externalProjection, that's why we cannot use
-                // GML v3 for this
-                if (!this.externalProjection) {
-                    this.externalProjection = new OpenLayers.Projection(
-                        node.getAttribute("srsName"));
-                }
-             OpenLayers.Format.GML.v3.prototype.readers.gml.pos.apply(
-                    this, [node, obj]);
-            }
-        }, OpenLayers.Format.GML.v3.prototype.readers.gml)
-    },
-    
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "sos": {
-            "GetFeatureOfInterest": function(options) {
-                var node = this.createElementNSPlus("GetFeatureOfInterest", {
-                    attributes: {
-                        version: this.VERSION,
-                        service: 'SOS',
-                        "xsi:schemaLocation": this.schemaLocation
-                    } 
-                }); 
-                for (var i=0, len=options.fois.length; i<len; i++) {
-                    this.writeNode("FeatureOfInterestId", {foi: options.fois[i]}, node);
-                }
-                return node; 
-            },
-            "FeatureOfInterestId": function(options) {
-                var node = this.createElementNSPlus("FeatureOfInterestId", {value: options.foi});
-                return node;
-            }
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Format.SOSGetFeatureOfInterest" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/SOSGetObservation.js
+++ /dev/null
@@ -1,263 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
-

-/**

- * @requires OpenLayers/Format/XML.js

- * @requires OpenLayers/Format/GML.js

- * @requires OpenLayers/Format/GML/v3.js

- */

-

-/**

- * Class: OpenLayers.Format.SOSGetObservation

- * Read and write SOS GetObersation (to get the actual values from a sensor) 

- *     version 1.0.0

- *

- * Inherits from:

- *  - <OpenLayers.Format.XML>

- */

-OpenLayers.Format.SOSGetObservation = OpenLayers.Class(OpenLayers.Format.XML, {

-    

-    /**

-     * Property: namespaces

-     * {Object} Mapping of namespace aliases to namespace URIs.

-     */

-    namespaces: {

-        ows: "http://www.opengis.net/ows",

-        gml: "http://www.opengis.net/gml",

-        sos: "http://www.opengis.net/sos/1.0",

-        ogc: "http://www.opengis.net/ogc",

-        om: "http://www.opengis.net/om/1.0",

-        xlink: "http://www.w3.org/1999/xlink",

-        xsi: "http://www.w3.org/2001/XMLSchema-instance"

-    },

-

-    /**

-     * Property: regExes

-     * Compiled regular expressions for manipulating strings.

-     */

-    regExes: {

-        trimSpace: (/^\s*|\s*$/g),

-        removeSpace: (/\s*/g),

-        splitSpace: (/\s+/),

-        trimComma: (/\s*,\s*/g)

-    },

-

-    /**

-     * Constant: VERSION

-     * {String} 1.0.0

-     */

-    VERSION: "1.0.0",

-

-    /**

-     * Property: schemaLocation

-     * {String} Schema location

-     */

-    schemaLocation: "http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosGetObservation.xsd",

-

-    /**

-     * Property: defaultPrefix

-     */

-    defaultPrefix: "sos",

-

-    /**

-     * Constructor: OpenLayers.Format.SOSGetObservation

-     *

-     * Parameters:

-     * options - {Object} An optional object whose properties will be set on

-     *     this instance.

-     */

-    initialize: function(options) {

-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);

-    },

-

-    /**

-     * Method: read

-     * 

-     * Parameters: 

-     * data - {String} or {DOMElement} data to read/parse.

-     *

-     * Returns:

-     * {Object} An object containing the measurements

-     */

-    read: function(data) {

-        if(typeof data == "string") {

-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);

-        }

-        if(data && data.nodeType == 9) {

-            data = data.documentElement;

-        }

-        var info = {measurements: []};

-        this.readNode(data, info);

-        return info;

-    },

-

-    /**

-     * Method: write

-     *

-     * Parameters:

-     * options - {Object} Optional object.

-     *

-     * Returns:

-     * {String} An SOS GetObservation request XML string.

-     */

-    write: function(options) {

-        var node = this.writeNode("sos:GetObservation", options);

-        node.setAttribute("xmlns:om", this.namespaces.om);
-        this.setAttributeNS(

-            node, this.namespaces.xsi,

-            "xsi:schemaLocation", this.schemaLocation

-        );

-        return OpenLayers.Format.XML.prototype.write.apply(this, [node]);

-    }, 

-

-    /**

-     * Property: readers

-     * Contains public functions, grouped by namespace prefix, that will

-     *     be applied when a namespaced node is found matching the function

-     *     name.  The function will be applied in the scope of this parser

-     *     with two arguments: the node being read and a context object passed

-     *     from the parent.

-     */

-    readers: {

-        "om": {

-            "ObservationCollection": function(node, obj) {

-                obj.id = this.getAttributeNS(node, this.namespaces.gml, "id");

-                this.readChildNodes(node, obj);

-            },

-            "member": function(node, observationCollection) {

-                this.readChildNodes(node, observationCollection);

-            },

-            "Measurement": function(node, observationCollection) {

-                var measurement = {};

-                observationCollection.measurements.push(measurement);

-                this.readChildNodes(node, measurement);

-            },

-            "samplingTime": function(node, measurement) {

-                var samplingTime = {};

-                measurement.samplingTime = samplingTime;

-                this.readChildNodes(node, samplingTime);

-            },

-            "observedProperty": function(node, measurement) {

-                measurement.observedProperty = 

-                    this.getAttributeNS(node, this.namespaces.xlink, "href");

-                this.readChildNodes(node, measurement);

-            },

-            "procedure": function(node, measurement) {

-                measurement.procedure = 

-                    this.getAttributeNS(node, this.namespaces.xlink, "href");

-                this.readChildNodes(node, measurement);

-            },

-            "result": function(node, measurement) {

-                var result = {};

-                measurement.result = result;

-                if (this.getChildValue(node) !== '') {

-                    result.value = this.getChildValue(node);

-                    result.uom = node.getAttribute("uom");

-                } else {

-                    this.readChildNodes(node, result);

-                }

-            }

-        },

-        "gml": OpenLayers.Util.applyDefaults({

-            "TimeInstant": function(node, samplingTime) {

-               var timeInstant = {};

-                samplingTime.timeInstant = timeInstant;

-                this.readChildNodes(node, timeInstant);

-            },

-            "timePosition": function(node, timeInstant) {

-                timeInstant.timePosition = this.getChildValue(node);

-            }

-        }, OpenLayers.Format.GML.v3.prototype.readers.gml)

-    },

-

-    /**

-     * Property: writers

-     * As a compliment to the readers property, this structure contains public

-     *     writing functions grouped by namespace alias and named like the

-     *     node names they produce.

-     */

-    writers: {

-        "sos": {

-            "GetObservation": function(options) {

-                var node = this.createElementNSPlus("GetObservation", {

-                    attributes: {

-                        version: this.VERSION,

-                        service: 'SOS'

-                    } 

-                }); 

-                this.writeNode("offering", options, node);

-                this.writeNode("eventTime", options, node);

-                this.writeNode("procedure", options, node);

-                this.writeNode("observedProperty", options, node);

-                this.writeNode("responseFormat", options, node);

-                this.writeNode("resultModel", options, node);                                

-                this.writeNode("responseMode", options, node);

-                return node; 

-            },

-            "responseFormat": function(options) {

-                return this.createElementNSPlus("responseFormat", 

-                    {value: options.responseFormat});

-            },

-            "procedure": function(options) {

-                return this.createElementNSPlus("procedure", 

-                    {value: options.procedure});

-            },

-            "offering": function(options) {

-                return this.createElementNSPlus("offering", {value: 

-                    options.offering});

-            },

-            "observedProperty": function(options) {

-                return this.createElementNSPlus("observedProperty", 

-                    {value: options.observedProperty});

-            },

-            "eventTime": function(options) {

-                var node = this.createElementNSPlus("eventTime");

-                if (options.eventTime === 'latest') {

-                    this.writeNode("ogc:TM_Equals", options, node);

-                }

-                return node;

-            },

-            "resultModel": function(options) {

-                return this.createElementNSPlus("resultModel", {value: 

-                    options.resultModel});

-            },

-            "responseMode": function(options) {

-                return this.createElementNSPlus("responseMode", {value: 

-                    options.responseMode});

-            }

-        },

-        "ogc": {

-            "TM_Equals": function(options) {

-                var node = this.createElementNSPlus("ogc:TM_Equals");

-                this.writeNode("ogc:PropertyName", {property: 

-                    "urn:ogc:data:time:iso8601"}, node);

-                if (options.eventTime === 'latest') {

-                    this.writeNode("gml:TimeInstant", {value: 'latest'}, node);

-                }

-                return node;

-            },

-            "PropertyName": function(options) {

-                return this.createElementNSPlus("ogc:PropertyName", 

-                    {value: options.property});

-            }

-        },

-        "gml": {

-            "TimeInstant": function(options) {

-                var node = this.createElementNSPlus("gml:TimeInstant");

-                this.writeNode("gml:timePosition", options, node);

-                return node;

-            },

-            "timePosition": function(options) {

-                var node = this.createElementNSPlus("gml:timePosition", 

-                    {value: options.value});

-                return node;

-            }

-        }

-    },

-    

-    CLASS_NAME: "OpenLayers.Format.SOSGetObservation" 

-

-});

 

--- a/labs/openlayers/lib/OpenLayers/Format/Text.js
+++ /dev/null
@@ -1,153 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Feature/Vector.js
- * @requires OpenLayers/Geometry/Point.js
- */
-
-/**
- * Class: OpenLayers.Format.Text
- * Read Text format. Create a new instance with the <OpenLayers.Format.Text>
- *     constructor. This reads text which is formatted like CSV text, using
- *     tabs as the seperator by default. It provides parsing of data originally
- *     used in the MapViewerService, described on the wiki. This Format is used
- *     by the <OpenLayers.Layer.Text> class.
- *
- * Inherits from:
- *  - <OpenLayers.Format>
- */
-OpenLayers.Format.Text = OpenLayers.Class(OpenLayers.Format, {
-    
-    /**
-     * APIProperty: defaultStyle
-     * defaultStyle allows one to control the default styling of the features.
-     *    It should be a symbolizer hash. By default, this is set to match the
-     *    Layer.Text behavior, which is to use the default OpenLayers Icon.
-     */
-    defaultStyle: null,
-     
-    /**
-     * APIProperty: extractStyles
-     * set to true to extract styles from the TSV files, using information
-     * from the image or icon, iconSize and iconOffset fields. This will result
-     * in features with a symbolizer (style) property set, using the
-     * default symbolizer specified in <defaultStyle>. Set to false if you
-     * wish to use a styleMap or OpenLayers.Style options to style your
-     * layer instead.
-     */
-    extractStyles: true,
-
-    /**
-     * Constructor: OpenLayers.Format.Text
-     * Create a new parser for TSV Text.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        options = options || {};
-
-        if(options.extractStyles !== false) {
-            options.defaultStyle = {
-                'externalGraphic': OpenLayers.Util.getImagesLocation() +
-                                                                "marker.png",
-                'graphicWidth': 21,
-                'graphicHeight': 25,
-                'graphicXOffset': -10.5,
-                'graphicYOffset': -12.5
-            };
-        }
-        
-        OpenLayers.Format.prototype.initialize.apply(this, [options]);
-    }, 
-
-    /**
-     * APIMethod: read
-     * Return a list of features from a Tab Seperated Values text string.
-     * 
-     * Parameters:
-     * data - {String} 
-     *
-     * Returns:
-     * An Array of <OpenLayers.Feature.Vector>s
-     */
-    read: function(text) {
-        var lines = text.split('\n');
-        var columns;
-        var features = [];
-        // length - 1 to allow for trailing new line
-        for (var lcv = 0; lcv < (lines.length - 1); lcv++) {
-            var currLine = lines[lcv].replace(/^\s*/,'').replace(/\s*$/,'');
-        
-            if (currLine.charAt(0) != '#') { /* not a comment */
-            
-                if (!columns) {
-                    //First line is columns
-                    columns = currLine.split('\t');
-                } else {
-                    var vals = currLine.split('\t');
-                    var geometry = new OpenLayers.Geometry.Point(0,0);
-                    var attributes = {};
-                    var style = this.defaultStyle ? 
-                        OpenLayers.Util.applyDefaults({}, this.defaultStyle) :
-                        null;  
-                    var icon, iconSize, iconOffset, overflow;
-                    var set = false;
-                    for (var valIndex = 0; valIndex < vals.length; valIndex++) {
-                        if (vals[valIndex]) {
-                            if (columns[valIndex] == 'point') {
-                                var coords = vals[valIndex].split(',');
-                                geometry.y = parseFloat(coords[0]);
-                                geometry.x = parseFloat(coords[1]);
-                                set = true;
-                            } else if (columns[valIndex] == 'lat') {
-                                geometry.y = parseFloat(vals[valIndex]);
-                                set = true;
-                            } else if (columns[valIndex] == 'lon') {
-                                geometry.x = parseFloat(vals[valIndex]);
-                                set = true;
-                            } else if (columns[valIndex] == 'title')
-                                attributes['title'] = vals[valIndex];
-                            else if (columns[valIndex] == 'image' ||
-                                     columns[valIndex] == 'icon' && style) {
-                                style['externalGraphic'] = vals[valIndex];
-                            } else if (columns[valIndex] == 'iconSize' && style) {
-                                var size = vals[valIndex].split(',');
-                                style['graphicWidth'] = parseFloat(size[0]);
-                                style['graphicHeight'] = parseFloat(size[1]);
-                            } else if (columns[valIndex] == 'iconOffset' && style) {
-                                var offset = vals[valIndex].split(',');
-                                style['graphicXOffset'] = parseFloat(offset[0]);
-                                style['graphicYOffset'] = parseFloat(offset[1]);
-                            } else if (columns[valIndex] == 'description') {
-                                attributes['description'] = vals[valIndex];
-                            } else if (columns[valIndex] == 'overflow') {
-                                attributes['overflow'] = vals[valIndex];
-                            } else {
-                                // For StyleMap filtering, allow additional
-                                // columns to be stored as attributes.
-                                attributes[columns[valIndex]] = vals[valIndex];
-                            }    
-                        }
-                    }
-                    if (set) {
-                      if (this.internalProjection && this.externalProjection) {
-                          geometry.transform(this.externalProjection, 
-                                             this.internalProjection); 
-                      }
-                      var feature = new OpenLayers.Feature.Vector(geometry, attributes, style);
-                      features.push(feature);
-                    }
-                }
-            }
-        }
-        return features;
-    },   
-
-    CLASS_NAME: "OpenLayers.Format.Text" 
-});    
-

--- a/labs/openlayers/lib/OpenLayers/Format/WFS.js
+++ /dev/null
@@ -1,221 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/GML.js
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Format.WFS
- * Read/Write WFS. 
- *
- * Inherits from:
- *  - <OpenLayers.Format.GML>
- */
-OpenLayers.Format.WFS = OpenLayers.Class(OpenLayers.Format.GML, {
-    
-    /** 
-     * Property: layer
-     */
-    layer: null,
-    
-    /**
-     * APIProperty: wfsns
-     */
-    wfsns: "http://www.opengis.net/wfs",
-    
-    /**
-     * Property: ogcns
-     */
-    ogcns: "http://www.opengis.net/ogc",
-    
-    /*
-     * Constructor: OpenLayers.Format.WFS
-     * Create a WFS-T formatter. This requires a layer: that layer should
-     * have two properties: geometry_column and typename. The parser
-     * for this format is subclassed entirely from GML: There is a writer 
-     * only, which uses most of the code from the GML layer, and wraps
-     * it in transactional elements.
-     * 
-     * Parameters: 
-     * options - {Object} 
-     * layer - {<OpenLayers.Layer>} 
-     */
-    
-    initialize: function(options, layer) {
-        OpenLayers.Format.GML.prototype.initialize.apply(this, [options]);
-        this.layer = layer;
-        if (this.layer.featureNS) {
-            this.featureNS = this.layer.featureNS;
-        }    
-        if (this.layer.options.geometry_column) {
-            this.geometryName = this.layer.options.geometry_column;
-        }
-        if (this.layer.options.typename) {
-            this.featureName = this.layer.options.typename;
-        }
-    },
-    
-    /**
-     * Method: write 
-     * Takes a feature list, and generates a WFS-T Transaction 
-     *
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>)} 
-     */
-    write: function(features) {
-    
-        var transaction = this.createElementNS(this.wfsns, 'wfs:Transaction');
-        transaction.setAttribute("version","1.0.0");
-        transaction.setAttribute("service","WFS");
-        for (var i=0; i < features.length; i++) {
-            switch (features[i].state) {
-                case OpenLayers.State.INSERT:
-                    transaction.appendChild(this.insert(features[i]));
-                    break;
-                case OpenLayers.State.UPDATE:
-                    transaction.appendChild(this.update(features[i]));
-                    break;
-                case OpenLayers.State.DELETE:
-                    transaction.appendChild(this.remove(features[i]));
-                    break;
-            }
-        }
-        
-        return OpenLayers.Format.XML.prototype.write.apply(this,[transaction]);
-    },
-   
-    /**
-     * Method: createFeatureXML
-     *
-     * Parameters: 
-     * feature - {<OpenLayers.Feature.Vector>}
-     */ 
-    createFeatureXML: function(feature) {
-        var geometryNode = this.buildGeometryNode(feature.geometry);
-        var geomContainer = this.createElementNS(this.featureNS, "feature:" + this.geometryName);
-        geomContainer.appendChild(geometryNode);
-        var featureContainer = this.createElementNS(this.featureNS, "feature:" + this.featureName);
-        featureContainer.appendChild(geomContainer);
-        for(var attr in feature.attributes) {
-            var attrText = this.createTextNode(feature.attributes[attr]); 
-            var nodename = attr;
-            if (attr.search(":") != -1) {
-                nodename = attr.split(":")[1];
-            }    
-            var attrContainer = this.createElementNS(this.featureNS, "feature:" + nodename);
-            attrContainer.appendChild(attrText);
-            featureContainer.appendChild(attrContainer);
-        }    
-        return featureContainer;
-    },
-    
-    /**
-     * Method: insert 
-     * Takes a feature, and generates a WFS-T Transaction "Insert" 
-     *
-     * Parameters: 
-     * feature - {<OpenLayers.Feature.Vector>} 
-     */
-    insert: function(feature) {
-        var insertNode = this.createElementNS(this.wfsns, 'wfs:Insert');
-        insertNode.appendChild(this.createFeatureXML(feature));
-        return insertNode;
-    },
-    
-    /**
-     * Method: update
-     * Takes a feature, and generates a WFS-T Transaction "Update" 
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} 
-     */
-    update: function(feature) {
-        if (!feature.fid) { OpenLayers.Console.userError(OpenLayers.i18n("noFID")); }
-        var updateNode = this.createElementNS(this.wfsns, 'wfs:Update');
-        updateNode.setAttribute("typeName", this.featurePrefix + ':' + this.featureName); 
-        updateNode.setAttribute("xmlns:" + this.featurePrefix, this.featureNS); 
-
-        var propertyNode = this.createElementNS(this.wfsns, 'wfs:Property');
-        var nameNode = this.createElementNS(this.wfsns, 'wfs:Name');
-        
-        var txtNode = this.createTextNode(this.geometryName);
-        nameNode.appendChild(txtNode);
-        propertyNode.appendChild(nameNode);
-        
-        var valueNode = this.createElementNS(this.wfsns, 'wfs:Value');
-        
-        var geometryNode = this.buildGeometryNode(feature.geometry);
-        
-        if(feature.layer){
-            geometryNode.setAttribute(
-                "srsName", feature.layer.projection.getCode()
-            );
-        }
-        
-        valueNode.appendChild(geometryNode);
-        
-        propertyNode.appendChild(valueNode);
-        updateNode.appendChild(propertyNode);
-        
-         // add in attributes
-        for(var propName in feature.attributes) {
-            propertyNode = this.createElementNS(this.wfsns, 'wfs:Property');
-            nameNode = this.createElementNS(this.wfsns, 'wfs:Name');
-            nameNode.appendChild(this.createTextNode(propName));
-            propertyNode.appendChild(nameNode);
-            valueNode = this.createElementNS(this.wfsns, 'wfs:Value');
-            valueNode.appendChild(this.createTextNode(feature.attributes[propName]));
-            propertyNode.appendChild(valueNode);
-            updateNode.appendChild(propertyNode);
-        }
-        
-        
-        var filterNode = this.createElementNS(this.ogcns, 'ogc:Filter');
-        var filterIdNode = this.createElementNS(this.ogcns, 'ogc:FeatureId');
-        filterIdNode.setAttribute("fid", feature.fid);
-        filterNode.appendChild(filterIdNode);
-        updateNode.appendChild(filterNode);
-
-        return updateNode;
-    },
-    
-    /**
-     * Method: remove 
-     * Takes a feature, and generates a WFS-T Transaction "Delete" 
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} 
-     */
-    remove: function(feature) {
-        if (!feature.fid) { 
-            OpenLayers.Console.userError(OpenLayers.i18n("noFID")); 
-            return false; 
-        }
-        var deleteNode = this.createElementNS(this.wfsns, 'wfs:Delete');
-        deleteNode.setAttribute("typeName", this.featurePrefix + ':' + this.featureName); 
-        deleteNode.setAttribute("xmlns:" + this.featurePrefix, this.featureNS); 
-
-        var filterNode = this.createElementNS(this.ogcns, 'ogc:Filter');
-        var filterIdNode = this.createElementNS(this.ogcns, 'ogc:FeatureId');
-        filterIdNode.setAttribute("fid", feature.fid);
-        filterNode.appendChild(filterIdNode);
-        deleteNode.appendChild(filterNode);
-
-        return deleteNode;
-    },
-
-    /**
-     * APIMethod: destroy
-     * Remove ciruclar ref to layer 
-     */
-    destroy: function() {
-        this.layer = null;
-    },
-
-    CLASS_NAME: "OpenLayers.Format.WFS" 
-});    
-

--- a/labs/openlayers/lib/OpenLayers/Format/WFSCapabilities.js
+++ /dev/null
@@ -1,80 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- */
-
-/**
- * Class: OpenLayers.Format.WFSCapabilities
- * Read WFS Capabilities.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.WFSCapabilities = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * APIProperty: defaultVersion
-     * {String} Version number to assume if none found.  Default is "1.1.0".
-     */
-    defaultVersion: "1.1.0",
-    
-    /**
-     * APIProperty: version
-     * {String} Specify a version string if one is known.
-     */
-    version: null,
-
-    /**
-     * Constructor: OpenLayers.Format.WFSCapabilities
-     * Create a new parser for WFS capabilities.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-        this.options = options;
-    },
-
-    /**
-     * APIMethod: read
-     * Read capabilities data from a string, and return a list of layers. 
-     * 
-     * Parameters: 
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Array} List of named layers.
-     */
-    read: function(data) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        var root = data.documentElement;
-        var version = this.version;
-        if(!version) {
-            version = root.getAttribute("version");
-            if(!version) {
-                version = this.defaultVersion;
-            }
-        }
-        var constr = OpenLayers.Format.WFSCapabilities[
-            "v" + version.replace(/\./g, "_")
-        ];
-        if(!constr) {
-            throw "Can't find a WFS capabilities parser for version " + version;
-        }
-        var parser = new constr(this.options);
-        var capabilities = parser.read(data);
-        capabilities.version = version;
-        return capabilities;
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.WFSCapabilities" 
-
-});

--- a/labs/openlayers/lib/OpenLayers/Format/WFSCapabilities/v1.js
+++ /dev/null
@@ -1,127 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/WFSCapabilities.js
- */
-
-/**
- * Class: OpenLayers.Format.WFSCapabilities.v1
- * Abstract class not to be instantiated directly.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.WFSCapabilities.v1 = OpenLayers.Class(
-    OpenLayers.Format.WFSCapabilities, {
-    
-    /**
-     * Constructor: OpenLayers.Format.WFSCapabilities.v1_1
-     * Create an instance of one of the subclasses.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-        this.options = options;
-    },
-
-    /**
-     * APIMethod: read
-     * Read capabilities data from a string, and return a list of layers. 
-     * 
-     * Parameters: 
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Array} List of named layers.
-     */
-    read: function(data) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        var capabilities = {};
-        var root = data.documentElement;
-        this.runChildNodes(capabilities, root);
-        return capabilities;
-    },
-    
-    /**
-     * Method: runChildNodes
-     */
-    runChildNodes: function(obj, node) {
-        var children = node.childNodes;
-        var childNode, processor;
-        for(var i=0; i<children.length; ++i) {
-            childNode = children[i];
-            if(childNode.nodeType == 1) {
-                processor = this["read_cap_" + childNode.nodeName];
-                if(processor) {
-                    processor.apply(this, [obj, childNode]);
-                }
-            }
-        }
-    },
-    
-    /**
-     * Method: read_cap_FeatureTypeList
-     */
-    read_cap_FeatureTypeList: function(request, node) {
-        var featureTypeList = {
-            featureTypes: []
-        };
-        this.runChildNodes(featureTypeList, node);
-        request.featureTypeList = featureTypeList;
-    },
-    
-    /**
-     * Method: read_cap_FeatureType
-     */
-    read_cap_FeatureType: function(featureTypeList, node, parentLayer) {
-        var featureType = {};
-        this.runChildNodes(featureType, node);
-        featureTypeList.featureTypes.push(featureType);
-    },
-    
-    /**
-     * Method: read_cap_Name
-     */
-    read_cap_Name: function(obj, node) {
-        var name = this.getChildValue(node);
-        if(name) {
-            var parts = name.split(":");
-            obj.name = parts.pop();
-            if(parts.length > 0) {
-                obj.featureNS = this.lookupNamespaceURI(node, parts[0]);
-            }
-        }
-    },
-
-    /**
-     * Method: read_cap_Title
-     */
-    read_cap_Title: function(obj, node) {
-        var title = this.getChildValue(node);
-        if(title) {
-            obj.title = title;
-        }
-    },
-
-    /**
-     * Method: read_cap_Abstract
-     */
-    read_cap_Abstract: function(obj, node) {
-        var abst = this.getChildValue(node);
-        if(abst) {
-            obj["abstract"] = abst;
-        }
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.WFSCapabilities.v1" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js
+++ /dev/null
@@ -1,157 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/WFSCapabilities/v1.js
- */
-
-/**
- * Class: OpenLayers.Format.WFSCapabilities/v1_0_0
- * Read WMS Capabilities version 1.0.0.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.WFSCapabilities>
- */
-OpenLayers.Format.WFSCapabilities.v1_0_0 = OpenLayers.Class(
-    OpenLayers.Format.WFSCapabilities.v1, {
-    
-    /**
-     * Constructor: OpenLayers.Format.WFSCapabilities.v1_0_0
-     * Create a new parser for WFS capabilities version 1.0.0.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.WFSCapabilities.v1.prototype.initialize.apply(
-            this, [options]
-        );
-    },
-    
-    /**
-     * Method: read_cap_Service
-     */
-    read_cap_Service: function(capabilities, node) {
-        var service = {};
-        this.runChildNodes(service, node);
-        capabilities.service = service;
-    },
-
-    /**
-     * Method: read_cap_Fees
-     */
-    read_cap_Fees: function(service, node) {
-        var fees = this.getChildValue(node);
-        if (fees && fees.toLowerCase() != "none") {
-            service.fees = fees;
-        }
-    },
-
-    /**
-     * Method: read_cap_AccessConstraints
-     */
-    read_cap_AccessConstraints: function(service, node) {
-        var constraints = this.getChildValue(node);
-        if (constraints && constraints.toLowerCase() != "none") {
-            service.accessConstraints = constraints;
-        }
-    },
-    
-    /**
-     * Method: read_cap_OnlineResource
-     */
-    read_cap_OnlineResource: function(service, node) {
-        var onlineResource = this.getChildValue(node);
-        if (onlineResource && onlineResource.toLowerCase() != "none") {
-            service.onlineResource = onlineResource;
-        }
-    },
-    
-    /**
-     * Method: read_cap_Keywords
-     */
-    read_cap_Keywords: function(service, node) {
-        var keywords = this.getChildValue(node);
-        if (keywords && keywords.toLowerCase() != "none") {
-            service.keywords = keywords.split(', ');
-        }
-    },
-    
-    /**
-     * Method: read_cap_Capability
-     */
-    read_cap_Capability: function(capabilities, node) {
-        var capability = {};
-        this.runChildNodes(capability, node);
-        capabilities.capability = capability;
-    },
-    
-    /**
-     * Method: read_cap_Request
-     */
-    read_cap_Request: function(obj, node) {
-        var request = {};
-        this.runChildNodes(request, node);
-        obj.request = request;
-    },
-    
-    /**
-     * Method: read_cap_GetFeature
-     */
-    read_cap_GetFeature: function(request, node) {
-        var getfeature = {
-            href: {}, // DCPType
-            formats: [] // ResultFormat
-        };
-        this.runChildNodes(getfeature, node);
-        request.getfeature = getfeature;
-    },
-    
-    /**
-     * Method: read_cap_ResultFormat
-     */
-    read_cap_ResultFormat: function(obj, node) {
-        var children = node.childNodes;
-        var childNode;
-        for(var i=0; i<children.length; i++) {
-            childNode = children[i];
-            if(childNode.nodeType == 1) {
-                obj.formats.push(childNode.nodeName);
-            }
-        }
-    },
-    
-    /**
-     * Method: read_cap_DCPType
-     */
-    read_cap_DCPType: function(obj, node) {
-        this.runChildNodes(obj, node);
-    },
-    
-    /**
-     * Method: read_cap_HTTP
-     */
-    read_cap_HTTP: function(obj, node) {
-        this.runChildNodes(obj.href, node);
-    },
-    
-    /**
-     * Method: read_cap_Get
-     */
-    read_cap_Get: function(obj, node) {
-        obj.get = node.getAttribute("onlineResource");
-    },
-    
-    /**
-     * Method: read_cap_Post
-     */
-    read_cap_Post: function(obj, node) {
-        obj.post = node.getAttribute("onlineResource");
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.WFSCapabilities.v1_0_0" 
-
-});

--- a/labs/openlayers/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js
+++ /dev/null
@@ -1,36 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/WFSCapabilities/v1.js
- */
-
-/**
- * Class: OpenLayers.Format.WFSCapabilities/v1_1_0
- * Read WFS Capabilities version 1.1.0.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.WFSCapabilities>
- */
-OpenLayers.Format.WFSCapabilities.v1_1_0 = OpenLayers.Class(
-    OpenLayers.Format.WFSCapabilities.v1, {
-    
-    /**
-     * Constructor: OpenLayers.Format.WFSCapabilities.v1_1_0
-     * Create a new parser for WFS capabilities version 1.1.0.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.WFSCapabilities.v1.prototype.initialize.apply(
-            this, [options]
-        );
-    },
-
-    CLASS_NAME: "OpenLayers.Format.WFSCapabilities.v1_1_0" 
-
-});

--- a/labs/openlayers/lib/OpenLayers/Format/WFSDescribeFeatureType.js
+++ /dev/null
@@ -1,198 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- *
- * Class: OpenLayers.Format.WFSDescribeFeatureType
- * Read WFS DescribeFeatureType response
- * 
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
-    OpenLayers.Format.XML, {
-    
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        xsd: "http://www.w3.org/2001/XMLSchema"
-    },
-    
-    /**
-     * Constructor: OpenLayers.Format.WFSDescribeFeatureType
-     * Create a new parser for WFS DescribeFeatureType responses.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "xsd": {
-            "schema": function(node, obj) {
-                var complexTypes = [];
-                var customTypes = {};
-                var schema = {
-                    complexTypes: complexTypes,
-                    customTypes: customTypes
-                };
-                
-                this.readChildNodes(node, schema);
-
-                var attributes = node.attributes;
-                var attr, name;
-                for(var i=0, len=attributes.length; i<len; ++i) {
-                    attr = attributes[i];
-                    name = attr.name;
-                    if(name.indexOf("xmlns") == 0) {
-                        this.setNamespace(name.split(":")[1] || "", attr.value);
-                    } else {
-                        obj[name] = attr.value;
-                    }
-                }
-                obj.featureTypes = complexTypes;                
-                obj.targetPrefix = this.namespaceAlias[obj.targetNamespace];
-                
-                // map complexTypes to names of customTypes
-                var complexType, customType;
-                for(var i=0, len=complexTypes.length; i<len; ++i) {
-                    complexType = complexTypes[i];
-                    customType = customTypes[complexType.typeName];
-                    if(customTypes[complexType.typeName]) {
-                        complexType.typeName = customType.name;
-                    }
-                }
-            },
-            "complexType": function(node, obj) {
-                var complexType = {
-                    // this is a temporary typeName, it will be overwritten by
-                    // the schema reader with the metadata found in the
-                    // customTypes hash
-                    "typeName": node.getAttribute("name")
-                };
-                this.readChildNodes(node, complexType);
-                obj.complexTypes.push(complexType);
-            },
-            "complexContent": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "extension": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "sequence": function(node, obj) {
-                var sequence = {
-                    elements: []
-                };
-                this.readChildNodes(node, sequence);
-                obj.properties = sequence.elements;
-            },
-            "element": function(node, obj) {
-                if(obj.elements) {
-                    var element = {};
-                    var attributes = node.attributes;
-                    var attr;
-                    for(var i=0, len=attributes.length; i<len; ++i) {
-                        attr = attributes[i];
-                        element[attr.name] = attr.value;
-                    }
-                    
-                    var type = element.type;
-                    if(!type) {
-                        type = {};
-                        this.readChildNodes(node, type);
-                        element.restriction = type;
-                        element.type = type.base;
-                    }
-                    var fullType = type.base || type;
-                    element.localType = fullType.split(":").pop();
-                    obj.elements.push(element);
-                }
-                
-                if(obj.complexTypes) {
-                    var type = node.getAttribute("type");
-                    var localType = type.split(":").pop();
-                    obj.customTypes[localType] = {
-                        "name": node.getAttribute("name"),
-                        "type": type
-                    };
-                }
-            },
-            "simpleType": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "restriction": function(node, obj) {
-                obj.base = node.getAttribute("base");
-                this.readRestriction(node, obj);
-            }
-        }
-    },
-    
-    /**
-     * Method: readRestriction
-     * Reads restriction defined in the child nodes of a restriction element
-     * 
-     * Parameters:
-     * node {DOMElement} - the node to parse
-     * obj {Object} - the object that receives the read result
-     */
-    readRestriction: function(node, obj) {
-        var children = node.childNodes;
-        var child, nodeName, value;
-        for(var i=0, len=children.length; i<len; ++i) {
-            child = children[i];
-            if(child.nodeType == 1) {
-                nodeName = child.nodeName.split(":").pop();
-                value = child.getAttribute("value");
-                if(!obj[nodeName]) {
-                    obj[nodeName] = value;
-                } else {
-                    if(typeof obj[nodeName] == "string") {
-                        obj[nodeName] = [obj[nodeName]];
-                    }
-                    obj[nodeName].push(value);
-                }
-            }
-        }
-    },
-    
-    /**
-     * Method: read
-     *
-     * Parameters:
-     * data - {DOMElement|String} A WFS DescribeFeatureType document.
-     *
-     * Returns:
-     * {Object} An object representing the WFS DescribeFeatureType response.
-     */
-    read: function(data) {
-        if(typeof data == "string") { 
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        if(data && data.nodeType == 9) {
-            data = data.documentElement;
-        }
-        var schema = {};
-        this.readNode(data, schema);
-        
-        return schema;
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.WFSDescribeFeatureType" 
-
-});

--- a/labs/openlayers/lib/OpenLayers/Format/WFST.js
+++ /dev/null
@@ -1,35 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format.js
- */
-
-/**
- * Function: OpenLayers.Format.WFST
- * Used to create a versioned WFS protocol.  Default version is 1.0.0.
- *
- * Returns:
- * {<OpenLayers.Format>} A WFST format of the given version.
- */
-OpenLayers.Format.WFST = function(options) {
-    options = OpenLayers.Util.applyDefaults(
-        options, OpenLayers.Format.WFST.DEFAULTS
-    );
-    var cls = OpenLayers.Format.WFST["v"+options.version.replace(/\./g, "_")];
-    if(!cls) {
-        throw "Unsupported WFST version: " + options.version;
-    }
-    return new cls(options);
-};
-
-/**
- * Constant: OpenLayers.Format.WFST.DEFAULTS
- * {Object} Default properties for the WFST format.
- */
-OpenLayers.Format.WFST.DEFAULTS = {
-    "version": "1.0.0"
-};
-

--- a/labs/openlayers/lib/OpenLayers/Format/WFST/v1.js
+++ /dev/null
@@ -1,369 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Format/WFST.js
- */
-
-/**
- * Class: OpenLayers.Format.WFST.v1
- * Superclass for WFST parsers.
- *
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        xlink: "http://www.w3.org/1999/xlink",
-        xsi: "http://www.w3.org/2001/XMLSchema-instance",
-        wfs: "http://www.opengis.net/wfs",
-        gml: "http://www.opengis.net/gml",
-        ogc: "http://www.opengis.net/ogc"
-    },
-    
-    /**
-     * Property: defaultPrefix
-     */
-    defaultPrefix: "wfs",
-
-    /**
-     * Property: version
-     * {String} WFS version number.
-     */
-    version: null,
-
-    /**
-     * Property: schemaLocation
-     * {String} Schema location for a particular minor version.
-     */
-    schemaLocations: null,
-    
-    /**
-     * APIProperty: srsName
-     * {String} URI for spatial reference system.
-     */
-    srsName: null,
-
-    /**
-     * APIProperty: extractAttributes
-     * {Boolean} Extract attributes from GML.  Default is true.
-     */
-    extractAttributes: true,
-    
-    /**
-     * APIProperty: xy
-     * {Boolean} Order of the GML coordinate true:(x,y) or false:(y,x)
-     * Changing is not recommended, a new Format should be instantiated.
-     */ 
-    xy: true,
-
-    /**
-     * Property: stateName
-     * {Object} Maps feature states to node names.
-     */
-    stateName: null,
-
-    /**
-     * Constructor: OpenLayers.Format.WFST.v1
-     * Instances of this class are not created directly.  Use the
-     *     <OpenLayers.Format.WFST.v1_0_0> or <OpenLayers.Format.WFST.v1_1_0>
-     *     constructor instead.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        // set state name mapping
-        this.stateName = {};
-        this.stateName[OpenLayers.State.INSERT] = "wfs:Insert";
-        this.stateName[OpenLayers.State.UPDATE] = "wfs:Update";
-        this.stateName[OpenLayers.State.DELETE] = "wfs:Delete";
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * Method: getSrsName
-     */
-    getSrsName: function(feature, options) {
-        var srsName = options && options.srsName;
-        if(!srsName) {
-            if(feature && feature.layer) {
-                srsName = feature.layer.projection.getCode();
-            } else {
-                srsName = this.srsName;
-            }
-        }
-        return srsName;
-    },
-
-    /**
-     * APIMethod: read
-     * Parse the response from a transaction.  Because WFS is split into
-     *     Transaction requests (create, update, and delete) and GetFeature
-     *     requests (read), this method handles parsing of both types of
-     *     responses.
-     *
-     * Parameters:
-     * data - {String | Document} The WFST document to read
-     * options - {Object} Options for the reader
-     *
-     * Valid options properties:
-     * output - {String} either "features" or "object". The default is
-     *     "features", which means that the method will return an array of
-     *     features. If set to "object", an object with a "features" property
-     *     and other properties read by the parser will be returned.
-     *
-     * Returns:
-     * {Array | Object} Output depending on the output option.
-     */
-    read: function(data, options) {
-        options = options || {};
-        OpenLayers.Util.applyDefaults(options, {
-            output: "features"
-        });
-        
-        if(typeof data == "string") { 
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        if(data && data.nodeType == 9) {
-            data = data.documentElement;
-        }
-        var obj = {};
-        if(data) {
-            this.readNode(data, obj);
-        }
-        if(obj.features && options.output === "features") {
-            obj = obj.features;
-        }
-        return obj;
-    },
-    
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "wfs": {
-            "FeatureCollection": function(node, obj) {
-                obj.features = [];
-                this.readChildNodes(node, obj);
-            }
-        }
-    },
-    
-    /**
-     * Method: write
-     * Given an array of features, write a WFS transaction.  This assumes
-     *     the features have a state property that determines the operation
-     *     type - insert, update, or delete.
-     *
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>)} A list of features.
-     *
-     * Returns:
-     * {String} A serialized WFS transaction.
-     */
-    write: function(features) {
-        var node = this.writeNode("wfs:Transaction", features);
-        var value = this.schemaLocationAttr();
-        if(value) {
-            this.setAttributeNS(
-                node, this.namespaces["xsi"], "xsi:schemaLocation",  value
-            )
-        }
-        return OpenLayers.Format.XML.prototype.write.apply(this, [node]);
-    },
-    
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "wfs": {
-            "GetFeature": function(options) {
-                var node = this.createElementNSPlus("wfs:GetFeature", {
-                    attributes: {
-                        service: "WFS",
-                        version: this.version,
-                        outputFormat: options && options.outputFormat,
-                        maxFeatures: options && options.maxFeatures,
-                        "xsi:schemaLocation": this.schemaLocationAttr(options)
-                    }
-                });
-                if (typeof this.featureType == "string") {
-                    this.writeNode("Query", options, node);
-                } else {
-                    for (var i=0,len = this.featureType.length; i<len; i++) { 
-                        options.featureType = this.featureType[i]; 
-                        this.writeNode("Query", options, node); 
-                    } 
-                }
-                return node;
-            },
-            "Transaction": function(features) {
-                var node = this.createElementNSPlus("wfs:Transaction", {
-                    attributes: {
-                        service: "WFS",
-                        version: this.version
-                    }
-                });
-                if(features) {
-                    var name, feature;
-                    for(var i=0, len=features.length; i<len; ++i) {
-                        feature = features[i];
-                        name = this.stateName[feature.state];
-                        if(name) {
-                            this.writeNode(name, feature, node);
-                        }
-                    }
-                }
-                return node;
-            },
-            "Insert": function(feature) {
-                var node = this.createElementNSPlus("wfs:Insert");
-                this.srsName = this.getSrsName(feature);
-                this.writeNode("feature:_typeName", feature, node);
-                return node;
-            },
-            "Update": function(feature) {
-                var node = this.createElementNSPlus("wfs:Update", {
-                    attributes: {
-                        typeName: (this.featureNS ? this.featurePrefix + ":" : "") +
-                            this.featureType
-                    }
-                });
-                if(this.featureNS) {
-                    node.setAttribute("xmlns:" + this.featurePrefix, this.featureNS);
-                }
-                
-                // add in geometry
-                if (this.geometryName !== null) {
-                    this.writeNode(
-                        "Property", {name: this.geometryName, value: feature}, node
-                    );
-                }
-        
-                // add in attributes
-                for(var key in feature.attributes) {
-                    if(feature.attributes[key] !== undefined) {
-                        this.writeNode(
-                            "Property", {name: key, value: feature.attributes[key]}, node
-                        );
-                    }
-                }
-                
-                // add feature id filter
-                this.writeNode("ogc:Filter", new OpenLayers.Filter.FeatureId({
-                    fids: [feature.fid]
-                }), node);
-        
-                return node;
-            },
-            "Property": function(obj) {
-                var node = this.createElementNSPlus("wfs:Property");
-                this.writeNode("Name", obj.name, node);
-                if(obj.value !== null) {
-                    this.writeNode("Value", obj.value, node);
-                }
-                return node;
-            },
-            "Name": function(name) {
-                return this.createElementNSPlus("wfs:Name", {value: name});
-            },
-            "Value": function(obj) {
-                var node;
-                if(obj instanceof OpenLayers.Feature.Vector) {
-                    node = this.createElementNSPlus("wfs:Value");
-                    this.srsName = this.getSrsName(obj);
-                    var geom = this.writeNode("feature:_geometry", obj.geometry).firstChild;
-                    node.appendChild(geom);
-                } else {
-                    node = this.createElementNSPlus("wfs:Value", {value: obj});                
-                }
-                return node;
-            },
-            "Delete": function(feature) {
-                var node = this.createElementNSPlus("wfs:Delete", {
-                    attributes: {
-                        typeName: (this.featureNS ? this.featurePrefix + ":" : "") +
-                            this.featureType
-                    }
-                });
-                if(this.featureNS) {
-                    node.setAttribute("xmlns:" + this.featurePrefix, this.featureNS);
-                }
-                this.writeNode("ogc:Filter", new OpenLayers.Filter.FeatureId({
-                    fids: [feature.fid]
-                }), node);
-                return node;
-            }
-        }
-    },
-
-    /**
-     * Method: schemaLocationAttr
-     * Generate the xsi:schemaLocation attribute value.
-     *
-     * Returns:
-     * {String} The xsi:schemaLocation attribute or undefined if none.
-     */
-    schemaLocationAttr: function(options) {
-        options = OpenLayers.Util.extend({
-            featurePrefix: this.featurePrefix,
-            schema: this.schema
-        }, options);
-        var schemaLocations = OpenLayers.Util.extend({}, this.schemaLocations);
-        if(options.schema) {
-            schemaLocations[options.featurePrefix] = options.schema;
-        }
-        var parts = [];
-        var uri;
-        for(var key in schemaLocations) {
-            uri = this.namespaces[key];
-            if(uri) {
-                parts.push(uri + " " + schemaLocations[key]);
-            }
-        }
-        var value = parts.join(" ") || undefined;
-        return value;
-    },
-    
-    /**
-     * Method: setFilterProperty
-     * Set the property of each spatial filter.
-     *
-     * Parameters:
-     * filter - {<OpenLayers.Filter>}
-     */
-    setFilterProperty: function(filter) {
-        if(filter.filters) {
-            for(var i=0, len=filter.filters.length; i<len; ++i) {
-                this.setFilterProperty(filter.filters[i]);
-            }
-        } else {
-            if(filter instanceof OpenLayers.Filter.Spatial) {
-                // got a spatial filter, set its property
-                filter.property = this.geometryName;
-            }
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Format.WFST.v1" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WFST/v1_0_0.js
+++ /dev/null
@@ -1,151 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/WFST/v1.js
- * @requires OpenLayers/Format/Filter/v1_0_0.js
- */
-
-/**
- * Class: OpenLayers.Format.WFST.v1_0_0
- * A format for creating WFS v1.0.0 transactions.  Create a new instance with the
- *     <OpenLayers.Format.WFST.v1_0_0> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Format.Filter.v1_0_0>
- *  - <OpenLayers.Format.WFST.v1>
- */
-OpenLayers.Format.WFST.v1_0_0 = OpenLayers.Class(
-    OpenLayers.Format.Filter.v1_0_0, OpenLayers.Format.WFST.v1, {
-    
-    /**
-     * Property: version
-     * {String} WFS version number.
-     */
-    version: "1.0.0",
-
-    /**
-     * APIProperty: srsNameInQuery
-     * {Boolean} If true the reference system is passed in Query requests
-     *     via the "srsName" attribute to the "wfs:Query" element, this
-     *     property defaults to false as it isn't WFS 1.0.0 compliant.
-     */
-    srsNameInQuery: false,
-    
-    /**
-     * Property: schemaLocations
-     * {Object} Properties are namespace aliases, values are schema locations.
-     */
-    schemaLocations: {
-        "wfs": "http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd"
-    },
-
-    /**
-     * Constructor: OpenLayers.Format.WFST.v1_0_0
-     * A class for parsing and generating WFS v1.0.0 transactions.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     *
-     * Valid options properties:
-     * featureType - {String} Local (without prefix) feature typeName (required).
-     * featureNS - {String} Feature namespace (optional).
-     * featurePrefix - {String} Feature namespace alias (optional - only used
-     *     if featureNS is provided).  Default is 'feature'.
-     * geometryName - {String} Name of geometry attribute.  Default is 'the_geom'.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.Filter.v1_0_0.prototype.initialize.apply(this, [options]);
-        OpenLayers.Format.WFST.v1.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "wfs": OpenLayers.Util.applyDefaults({
-            "WFS_TransactionResponse": function(node, obj) {
-                obj.insertIds = [];
-                obj.success = false;
-                this.readChildNodes(node, obj);
-            },
-            "InsertResult": function(node, container) {
-                var obj = {fids: []};
-                this.readChildNodes(node, obj);
-                container.insertIds.push(obj.fids[0]);
-            },
-            "TransactionResult": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "Status": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "SUCCESS": function(node, obj) {
-                obj.success = true;
-            }
-        }, OpenLayers.Format.WFST.v1.prototype.readers["wfs"]),
-        "gml": OpenLayers.Format.GML.v2.prototype.readers["gml"],
-        "feature": OpenLayers.Format.GML.v2.prototype.readers["feature"],
-        "ogc": OpenLayers.Format.Filter.v1_0_0.prototype.readers["ogc"]
-    },
-
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "wfs": OpenLayers.Util.applyDefaults({
-            "Query": function(options) {
-                options = OpenLayers.Util.extend({
-                    featureNS: this.featureNS,
-                    featurePrefix: this.featurePrefix,
-                    featureType: this.featureType,
-                    srsName: this.srsName,
-                    srsNameInQuery: this.srsNameInQuery
-                }, options);
-                var node = this.createElementNSPlus("wfs:Query", {
-                    attributes: {
-                        typeName: (options.featureNS ? options.featurePrefix + ":" : "") +
-                            options.featureType
-                    }
-                });
-                if(options.srsNameInQuery && options.srsName) {
-                    node.setAttribute("srsName", options.srsName);
-                }
-                if(options.featureNS) {
-                    node.setAttribute("xmlns:" + options.featurePrefix, options.featureNS);
-                }
-                if(options.propertyNames) {
-                    for(var i=0,len = options.propertyNames.length; i<len; i++) {
-                        this.writeNode(
-                            "ogc:PropertyName", 
-                            {property: options.propertyNames[i]},
-                            node
-                        );
-                    }
-                }
-                if(options.filter) {
-                    this.setFilterProperty(options.filter);
-                    this.writeNode("ogc:Filter", options.filter, node);
-                }
-                return node;
-            }
-        }, OpenLayers.Format.WFST.v1.prototype.writers["wfs"]),
-        "gml": OpenLayers.Format.GML.v2.prototype.writers["gml"],
-        "feature": OpenLayers.Format.GML.v2.prototype.writers["feature"],
-        "ogc": OpenLayers.Format.Filter.v1_0_0.prototype.writers["ogc"]
-    },
-   
-    CLASS_NAME: "OpenLayers.Format.WFST.v1_0_0" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WFST/v1_1_0.js
+++ /dev/null
@@ -1,162 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/WFST/v1.js
- * @requires OpenLayers/Format/Filter/v1_1_0.js
- */
-
-/**
- * Class: OpenLayers.Format.WFST.v1_1_0
- * A format for creating WFS v1.1.0 transactions.  Create a new instance with the
- *     <OpenLayers.Format.WFST.v1_1_0> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Format.Filter.v1_1_0>
- *  - <OpenLayers.Format.WFST.v1>
- */
-OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class(
-    OpenLayers.Format.Filter.v1_1_0, OpenLayers.Format.WFST.v1, {
-    
-    /**
-     * Property: version
-     * {String} WFS version number.
-     */
-    version: "1.1.0",
-    
-    /**
-     * Property: schemaLocations
-     * {Object} Properties are namespace aliases, values are schema locations.
-     */
-    schemaLocations: {
-        "wfs": "http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
-    },
-    
-    /**
-     * Constructor: OpenLayers.Format.WFST.v1_1_0
-     * A class for parsing and generating WFS v1.1.0 transactions.
-     *
-     * To read additional information like hit count (numberOfFeatures) from
-     * the  FeatureCollection, call the <OpenLayers.Format.WFST.v1.read> method
-     * with {output: "object"} as 2nd argument. Note that it is possible to
-     * just request the hit count from a WFS 1.1.0 server with the
-     * resultType="hits" request parameter.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     *
-     * Valid options properties:
-     * featureType - {String} Local (without prefix) feature typeName (required).
-     * featureNS - {String} Feature namespace (optional).
-     * featurePrefix - {String} Feature namespace alias (optional - only used
-     *     if featureNS is provided).  Default is 'feature'.
-     * geometryName - {String} Name of geometry attribute.  Default is 'the_geom'.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.Filter.v1_1_0.prototype.initialize.apply(this, [options]);
-        OpenLayers.Format.WFST.v1.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "wfs": OpenLayers.Util.applyDefaults({
-            "FeatureCollection": function(node, obj) {
-                obj.numberOfFeatures = parseInt(node.getAttribute(
-                    "numberOfFeatures"));
-                OpenLayers.Format.WFST.v1.prototype.readers["wfs"]["FeatureCollection"].apply(
-                    this, arguments);
-            },
-            "TransactionResponse": function(node, obj) {
-                obj.insertIds = [];
-                obj.success = false;
-                this.readChildNodes(node, obj);
-            },
-            "TransactionSummary": function(node, obj) {
-                // this is a limited test of success
-                obj.success = true;
-            },
-            "InsertResults": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "Feature": function(node, container) {
-                var obj = {fids: []};
-                this.readChildNodes(node, obj);
-                container.insertIds.push(obj.fids[0]);
-            }
-        }, OpenLayers.Format.WFST.v1.prototype.readers["wfs"]),
-        "gml": OpenLayers.Format.GML.v3.prototype.readers["gml"],
-        "feature": OpenLayers.Format.GML.v3.prototype.readers["feature"],
-        "ogc": OpenLayers.Format.Filter.v1_1_0.prototype.readers["ogc"]
-    },
-
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "wfs": OpenLayers.Util.applyDefaults({
-            "GetFeature": function(options) {
-                var node = OpenLayers.Format.WFST.v1.prototype.writers["wfs"]["GetFeature"].apply(this, arguments);
-                options && options.resultType && this.setAttributes(node, {
-                    resultType: options.resultType
-                });
-                return node;
-            },
-            "Query": function(options) {
-                options = OpenLayers.Util.extend({
-                    featureNS: this.featureNS,
-                    featurePrefix: this.featurePrefix,
-                    featureType: this.featureType,
-                    srsName: this.srsName
-                }, options);
-                var node = this.createElementNSPlus("wfs:Query", {
-                    attributes: {
-                        typeName: (options.featureNS ? options.featurePrefix + ":" : "") +
-                            options.featureType,
-                        srsName: options.srsName
-                    }
-                });
-                if(options.featureNS) {
-                    node.setAttribute("xmlns:" + options.featurePrefix, options.featureNS);
-                }
-                if(options.propertyNames) {
-                    for(var i=0,len = options.propertyNames.length; i<len; i++) {
-                        this.writeNode(
-                            "wfs:PropertyName", 
-                            {property: options.propertyNames[i]},
-                            node
-                        );
-                    }
-                }
-                if(options.filter) {
-                    this.setFilterProperty(options.filter);
-                    this.writeNode("ogc:Filter", options.filter, node);
-                }
-                return node;
-            },
-            "PropertyName": function(obj) {
-                return this.createElementNSPlus("wfs:PropertyName", {
-                    value: obj.property
-                });
-            }            
-        }, OpenLayers.Format.WFST.v1.prototype.writers["wfs"]),
-        "gml": OpenLayers.Format.GML.v3.prototype.writers["gml"],
-        "feature": OpenLayers.Format.GML.v3.prototype.writers["feature"],
-        "ogc": OpenLayers.Format.Filter.v1_1_0.prototype.writers["ogc"]
-    },
-
-    CLASS_NAME: "OpenLayers.Format.WFST.v1_1_0" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WKT.js
+++ /dev/null
@@ -1,359 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format.js
- * @requires OpenLayers/Feature/Vector.js
- */
-
-/**
- * Class: OpenLayers.Format.WKT
- * Class for reading and writing Well-Known Text.  Create a new instance
- * with the <OpenLayers.Format.WKT> constructor.
- * 
- * Inherits from:
- *  - <OpenLayers.Format>
- */
-OpenLayers.Format.WKT = OpenLayers.Class(OpenLayers.Format, {
-    
-    /**
-     * Constructor: OpenLayers.Format.WKT
-     * Create a new parser for WKT
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *           this instance
-     *
-     * Returns:
-     * {<OpenLayers.Format.WKT>} A new WKT parser.
-     */
-    initialize: function(options) {
-        this.regExes = {
-            'typeStr': /^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,
-            'spaces': /\s+/,
-            'parenComma': /\)\s*,\s*\(/,
-            'doubleParenComma': /\)\s*\)\s*,\s*\(\s*\(/,  // can't use {2} here
-            'trimParens': /^\s*\(?(.*?)\)?\s*$/
-        };
-        OpenLayers.Format.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * Method: read
-     * Deserialize a WKT string and return a vector feature or an
-     * array of vector features.  Supports WKT for POINT, MULTIPOINT,
-     * LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON, and
-     * GEOMETRYCOLLECTION.
-     *
-     * Parameters:
-     * wkt - {String} A WKT string
-     *
-     * Returns:
-     * {<OpenLayers.Feature.Vector>|Array} A feature or array of features for
-     * GEOMETRYCOLLECTION WKT.
-     */
-    read: function(wkt) {
-        var features, type, str;
-        var matches = this.regExes.typeStr.exec(wkt);
-        if(matches) {
-            type = matches[1].toLowerCase();
-            str = matches[2];
-            if(this.parse[type]) {
-                features = this.parse[type].apply(this, [str]);
-            }
-            if (this.internalProjection && this.externalProjection) {
-                if (features && 
-                    features.CLASS_NAME == "OpenLayers.Feature.Vector") {
-                    features.geometry.transform(this.externalProjection,
-                                                this.internalProjection);
-                } else if (features &&
-                           type != "geometrycollection" &&
-                           typeof features == "object") {
-                    for (var i=0, len=features.length; i<len; i++) {
-                        var component = features[i];
-                        component.geometry.transform(this.externalProjection,
-                                                     this.internalProjection);
-                    }
-                }
-            }
-        }    
-        return features;
-    },
-
-    /**
-     * Method: write
-     * Serialize a feature or array of features into a WKT string.
-     *
-     * Parameters:
-     * features - {<OpenLayers.Feature.Vector>|Array} A feature or array of
-     *            features
-     *
-     * Returns:
-     * {String} The WKT string representation of the input geometries
-     */
-    write: function(features) {
-        var collection, geometry, type, data, isCollection;
-        if(features.constructor == Array) {
-            collection = features;
-            isCollection = true;
-        } else {
-            collection = [features];
-            isCollection = false;
-        }
-        var pieces = [];
-        if(isCollection) {
-            pieces.push('GEOMETRYCOLLECTION(');
-        }
-        for(var i=0, len=collection.length; i<len; ++i) {
-            if(isCollection && i>0) {
-                pieces.push(',');
-            }
-            geometry = collection[i].geometry;
-            type = geometry.CLASS_NAME.split('.')[2].toLowerCase();
-            if(!this.extract[type]) {
-                return null;
-            }
-            if (this.internalProjection && this.externalProjection) {
-                geometry = geometry.clone();
-                geometry.transform(this.internalProjection, 
-                                   this.externalProjection);
-            }                       
-            data = this.extract[type].apply(this, [geometry]);
-            pieces.push(type.toUpperCase() + '(' + data + ')');
-        }
-        if(isCollection) {
-            pieces.push(')');
-        }
-        return pieces.join('');
-    },
-    
-    /**
-     * Object with properties corresponding to the geometry types.
-     * Property values are functions that do the actual data extraction.
-     */
-    extract: {
-        /**
-         * Return a space delimited string of point coordinates.
-         * @param {<OpenLayers.Geometry.Point>} point
-         * @returns {String} A string of coordinates representing the point
-         */
-        'point': function(point) {
-            return point.x + ' ' + point.y;
-        },
-
-        /**
-         * Return a comma delimited string of point coordinates from a multipoint.
-         * @param {<OpenLayers.Geometry.MultiPoint>} multipoint
-         * @returns {String} A string of point coordinate strings representing
-         *                  the multipoint
-         */
-        'multipoint': function(multipoint) {
-            var array = [];
-            for(var i=0, len=multipoint.components.length; i<len; ++i) {
-                array.push('(' +
-                           this.extract.point.apply(this, [multipoint.components[i]]) +
-                           ')');
-            }
-            return array.join(',');
-        },
-        
-        /**
-         * Return a comma delimited string of point coordinates from a line.
-         * @param {<OpenLayers.Geometry.LineString>} linestring
-         * @returns {String} A string of point coordinate strings representing
-         *                  the linestring
-         */
-        'linestring': function(linestring) {
-            var array = [];
-            for(var i=0, len=linestring.components.length; i<len; ++i) {
-                array.push(this.extract.point.apply(this, [linestring.components[i]]));
-            }
-            return array.join(',');
-        },
-
-        /**
-         * Return a comma delimited string of linestring strings from a multilinestring.
-         * @param {<OpenLayers.Geometry.MultiLineString>} multilinestring
-         * @returns {String} A string of of linestring strings representing
-         *                  the multilinestring
-         */
-        'multilinestring': function(multilinestring) {
-            var array = [];
-            for(var i=0, len=multilinestring.components.length; i<len; ++i) {
-                array.push('(' +
-                           this.extract.linestring.apply(this, [multilinestring.components[i]]) +
-                           ')');
-            }
-            return array.join(',');
-        },
-        
-        /**
-         * Return a comma delimited string of linear ring arrays from a polygon.
-         * @param {<OpenLayers.Geometry.Polygon>} polygon
-         * @returns {String} An array of linear ring arrays representing the polygon
-         */
-        'polygon': function(polygon) {
-            var array = [];
-            for(var i=0, len=polygon.components.length; i<len; ++i) {
-                array.push('(' +
-                           this.extract.linestring.apply(this, [polygon.components[i]]) +
-                           ')');
-            }
-            return array.join(',');
-        },
-
-        /**
-         * Return an array of polygon arrays from a multipolygon.
-         * @param {<OpenLayers.Geometry.MultiPolygon>} multipolygon
-         * @returns {Array} An array of polygon arrays representing
-         *                  the multipolygon
-         */
-        'multipolygon': function(multipolygon) {
-            var array = [];
-            for(var i=0, len=multipolygon.components.length; i<len; ++i) {
-                array.push('(' +
-                           this.extract.polygon.apply(this, [multipolygon.components[i]]) +
-                           ')');
-            }
-            return array.join(',');
-        }
-
-    },
-
-    /**
-     * Object with properties corresponding to the geometry types.
-     * Property values are functions that do the actual parsing.
-     */
-    parse: {
-        /**
-         * Return point feature given a point WKT fragment.
-         * @param {String} str A WKT fragment representing the point
-         * @returns {<OpenLayers.Feature.Vector>} A point feature
-         * @private
-         */
-        'point': function(str) {
-            var coords = OpenLayers.String.trim(str).split(this.regExes.spaces);
-            return new OpenLayers.Feature.Vector(
-                new OpenLayers.Geometry.Point(coords[0], coords[1])
-            );
-        },
-
-        /**
-         * Return a multipoint feature given a multipoint WKT fragment.
-         * @param {String} A WKT fragment representing the multipoint
-         * @returns {<OpenLayers.Feature.Vector>} A multipoint feature
-         * @private
-         */
-        'multipoint': function(str) {
-            var point;
-            var points = OpenLayers.String.trim(str).split(this.regExes.parenComma);
-            var components = [];
-            for(var i=0, len=points.length; i<len; ++i) {
-                point = points[i].replace(this.regExes.trimParens, '$1');
-                components.push(this.parse.point.apply(this, [point]).geometry);
-            }
-            return new OpenLayers.Feature.Vector(
-                new OpenLayers.Geometry.MultiPoint(components)
-            );
-        },
-        
-        /**
-         * Return a linestring feature given a linestring WKT fragment.
-         * @param {String} A WKT fragment representing the linestring
-         * @returns {<OpenLayers.Feature.Vector>} A linestring feature
-         * @private
-         */
-        'linestring': function(str) {
-            var points = OpenLayers.String.trim(str).split(',');
-            var components = [];
-            for(var i=0, len=points.length; i<len; ++i) {
-                components.push(this.parse.point.apply(this, [points[i]]).geometry);
-            }
-            return new OpenLayers.Feature.Vector(
-                new OpenLayers.Geometry.LineString(components)
-            );
-        },
-
-        /**
-         * Return a multilinestring feature given a multilinestring WKT fragment.
-         * @param {String} A WKT fragment representing the multilinestring
-         * @returns {<OpenLayers.Feature.Vector>} A multilinestring feature
-         * @private
-         */
-        'multilinestring': function(str) {
-            var line;
-            var lines = OpenLayers.String.trim(str).split(this.regExes.parenComma);
-            var components = [];
-            for(var i=0, len=lines.length; i<len; ++i) {
-                line = lines[i].replace(this.regExes.trimParens, '$1');
-                components.push(this.parse.linestring.apply(this, [line]).geometry);
-            }
-            return new OpenLayers.Feature.Vector(
-                new OpenLayers.Geometry.MultiLineString(components)
-            );
-        },
-        
-        /**
-         * Return a polygon feature given a polygon WKT fragment.
-         * @param {String} A WKT fragment representing the polygon
-         * @returns {<OpenLayers.Feature.Vector>} A polygon feature
-         * @private
-         */
-        'polygon': function(str) {
-            var ring, linestring, linearring;
-            var rings = OpenLayers.String.trim(str).split(this.regExes.parenComma);
-            var components = [];
-            for(var i=0, len=rings.length; i<len; ++i) {
-                ring = rings[i].replace(this.regExes.trimParens, '$1');
-                linestring = this.parse.linestring.apply(this, [ring]).geometry;
-                linearring = new OpenLayers.Geometry.LinearRing(linestring.components);
-                components.push(linearring);
-            }
-            return new OpenLayers.Feature.Vector(
-                new OpenLayers.Geometry.Polygon(components)
-            );
-        },
-
-        /**
-         * Return a multipolygon feature given a multipolygon WKT fragment.
-         * @param {String} A WKT fragment representing the multipolygon
-         * @returns {<OpenLayers.Feature.Vector>} A multipolygon feature
-         * @private
-         */
-        'multipolygon': function(str) {
-            var polygon;
-            var polygons = OpenLayers.String.trim(str).split(this.regExes.doubleParenComma);
-            var components = [];
-            for(var i=0, len=polygons.length; i<len; ++i) {
-                polygon = polygons[i].replace(this.regExes.trimParens, '$1');
-                components.push(this.parse.polygon.apply(this, [polygon]).geometry);
-            }
-            return new OpenLayers.Feature.Vector(
-                new OpenLayers.Geometry.MultiPolygon(components)
-            );
-        },
-
-        /**
-         * Return an array of features given a geometrycollection WKT fragment.
-         * @param {String} A WKT fragment representing the geometrycollection
-         * @returns {Array} An array of OpenLayers.Feature.Vector
-         * @private
-         */
-        'geometrycollection': function(str) {
-            // separate components of the collection with |
-            str = str.replace(/,\s*([A-Za-z])/g, '|$1');
-            var wktArray = OpenLayers.String.trim(str).split('|');
-            var components = [];
-            for(var i=0, len=wktArray.length; i<len; ++i) {
-                components.push(OpenLayers.Format.WKT.prototype.read.apply(this,[wktArray[i]]));
-            }
-            return components;
-        }
-
-    },
-
-    CLASS_NAME: "OpenLayers.Format.WKT" 
-});     
-

--- a/labs/openlayers/lib/OpenLayers/Format/WMC.js
+++ /dev/null
@@ -1,153 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- * @requires OpenLayers/Format/Context.js
- */
-
-/**
- * Class: OpenLayers.Format.WMC
- * Read and write Web Map Context documents.
- *
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.WMC = OpenLayers.Class(OpenLayers.Format.Context, {
-    
-    /**
-     * APIProperty: defaultVersion
-     * {String} Version number to assume if none found.  Default is "1.1.0".
-     */
-    defaultVersion: "1.1.0",
-    
-    /**
-     * Method: getParser
-     * Get the WMC parser given a version. Create a new parser if it does not
-     * already exist.
-     *
-     * Parameters:
-     * version - {String} The version of the parser.
-     *
-     * Returns:
-     * {<OpenLayers.Format.WMC.v1>} A WMC parser.
-     */
-    getParser: function(version) {
-        var v = version || this.version || this.defaultVersion;
-        if(!this.parser || this.parser.VERSION != v) {
-            var format = OpenLayers.Format.WMC[
-                "v" + v.replace(/\./g, "_")
-            ];
-            if(!format) {
-                throw "Can't find a WMC parser for version " + v;
-            }
-            this.parser = new format(this.options);
-        }
-        return this.parser;
-    },
-
-    /**
-     * Method: layerToContext
-     * Create a layer context object given a wms layer object.
-     *
-     * Parameters:
-     * obj - {<OpenLayers.Layer.WMS>} The layer.
-     *
-     * Returns:
-     * {Object} A layer context object.
-     */
-    layerToContext: function(layer) {
-        var parser = this.getParser();
-        var layerContext = {
-            queryable: layer.queryable,
-            visibility: layer.visibility,
-            name: layer.params["LAYERS"],
-            title: layer.name,
-            metadataURL: layer.metadataURL,
-            version: layer.params["VERSION"],
-            url: layer.url,
-            maxExtent: layer.maxExtent,
-            transparent: layer.params["TRANSPARENT"],
-            numZoomLevels: layer.numZoomLevels,
-            units: layer.units,
-            isBaseLayer: layer.isBaseLayer,
-            opacity: layer.opacity,
-            displayInLayerSwitcher: layer.displayInLayerSwitcher,
-            singleTile: layer.singleTile,
-            tileSize: (layer.singleTile || !layer.tileSize) ? 
-                undefined : {width: layer.tileSize.w, height: layer.tileSize.h},
-            minScale : (layer.options.resolutions ||
-                        layer.options.scales || 
-                        layer.options.maxResolution || 
-                        layer.options.minScale) ? 
-                        layer.minScale : undefined,
-            maxScale : (layer.options.resolutions ||
-                        layer.options.scales || 
-                        layer.options.minResolution || 
-                        layer.options.maxScale) ? 
-                        layer.maxScale : undefined,
-            formats: [{
-                value: layer.params["FORMAT"],
-                current: true
-            }],
-            styles: [{
-                href: layer.params["SLD"],
-                body: layer.params["SLD_BODY"],
-                name: layer.params["STYLES"] || parser.defaultStyleName,
-                title: parser.defaultStyleTitle,
-                current: true
-            }]
-        };
-        return layerContext;
-    },
-    
-    /**
-     * Method: toContext
-     * Create a context object free from layer given a map or a
-     * context object.
-     *
-     * Parameters:
-     * obj - {<OpenLayers.Map> | Object} The map or context.
-     *
-     * Returns:
-     * {Object} A context object.
-     */
-    toContext: function(obj) {
-        var context = {};
-        var layers = obj.layers;
-        if(obj.CLASS_NAME == "OpenLayers.Map") {
-            context.bounds = obj.getExtent();
-            context.maxExtent = obj.maxExtent;
-            context.projection = obj.projection;
-            context.size = obj.getSize();
-        }
-        else {
-            // copy all obj properties except the "layers" property
-            OpenLayers.Util.applyDefaults(context, obj);
-            if(context.layers != undefined) {
-                delete(context.layers);
-            }
-        }
-
-        if (context.layersContext == undefined) {
-            context.layersContext = [];
-        }
-
-        // let's convert layers into layersContext object (if any)
-        if (layers != undefined && layers instanceof Array) {
-            for (var i=0, len=layers.length; i<len; i++) {
-                var layer = layers[i];
-                if(layer instanceof OpenLayers.Layer.WMS) {
-                    context.layersContext.push(this.layerToContext(layer));
-                }
-            }
-        }
-        return context;
-    },
-
-    CLASS_NAME: "OpenLayers.Format.WMC" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WMC/v1.js
+++ /dev/null
@@ -1,836 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/WMC.js
- * @requires OpenLayers/Format/XML.js
- */
-
-/**
- * Class: OpenLayers.Format.WMC.v1
- * Superclass for WMC version 1 parsers.
- *
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.WMC.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        ol: "http://openlayers.org/context",
-        wmc: "http://www.opengis.net/context",
-        sld: "http://www.opengis.net/sld",
-        xlink: "http://www.w3.org/1999/xlink",
-        xsi: "http://www.w3.org/2001/XMLSchema-instance"
-    },
-    
-    /**
-     * Property: schemaLocation
-     * {String} Schema location for a particular minor version.
-     */
-    schemaLocation: "",
-
-    /**
-     * Method: getNamespacePrefix
-     * Get the namespace prefix for a given uri from the <namespaces> object.
-     *
-     * Returns:
-     * {String} A namespace prefix or null if none found.
-     */
-    getNamespacePrefix: function(uri) {
-        var prefix = null;
-        if(uri == null) {
-            prefix = this.namespaces[this.defaultPrefix];
-        } else {
-            for(prefix in this.namespaces) {
-                if(this.namespaces[prefix] == uri) {
-                    break;
-                }
-            }
-        }
-        return prefix;
-    },
-    
-    /**
-     * Property: defaultPrefix
-     */
-    defaultPrefix: "wmc",
-
-    /**
-     * Property: rootPrefix
-     * {String} Prefix on the root node that maps to the context namespace URI.
-     */
-    rootPrefix: null,
-    
-    /**
-     * Property: defaultStyleName
-     * {String} Style name used if layer has no style param.  Default is "".
-     */
-    defaultStyleName: "",
-    
-    /**
-     * Property: defaultStyleTitle
-     * {String} Default style title.  Default is "Default".
-     */
-    defaultStyleTitle: "Default",
-    
-    /**
-     * Constructor: OpenLayers.Format.WMC.v1
-     * Instances of this class are not created directly.  Use the
-     *     <OpenLayers.Format.WMC> constructor instead.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * Method: read
-     * Read capabilities data from a string, and return a list of layers. 
-     * 
-     * Parameters: 
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Array} List of named layers.
-     */
-    read: function(data) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        var root = data.documentElement;
-        this.rootPrefix = root.prefix;
-        var context = {
-            version: root.getAttribute("version")
-        };
-        this.runChildNodes(context, root);
-        return context;
-    },
-    
-    /**
-     * Method: runChildNodes
-     */
-    runChildNodes: function(obj, node) {
-        var children = node.childNodes;
-        var childNode, processor, prefix, local;
-        for(var i=0, len=children.length; i<len; ++i) {
-            childNode = children[i];
-            if(childNode.nodeType == 1) {
-                prefix = this.getNamespacePrefix(childNode.namespaceURI);
-                local = childNode.nodeName.split(":").pop();
-                processor = this["read_" + prefix + "_" + local];
-                if(processor) {
-                    processor.apply(this, [obj, childNode]);
-                }
-            }
-        }
-    },
-    
-    /**
-     * Method: read_wmc_General
-     */
-    read_wmc_General: function(context, node) {
-        this.runChildNodes(context, node);
-    },
-    
-    /**
-     * Method: read_wmc_BoundingBox
-     */
-    read_wmc_BoundingBox: function(context, node) {
-        context.projection = node.getAttribute("SRS");
-        context.bounds = new OpenLayers.Bounds(
-            parseFloat(node.getAttribute("minx")),
-            parseFloat(node.getAttribute("miny")),
-            parseFloat(node.getAttribute("maxx")),
-            parseFloat(node.getAttribute("maxy"))
-        );
-    },
-    
-    /**
-     * Method: read_wmc_LayerList
-     */
-    read_wmc_LayerList: function(context, node) {
-        // layersContext is an array containing info for each layer
-        context.layersContext = [];
-        this.runChildNodes(context, node);
-    },
-    
-    /**
-     * Method: read_wmc_Layer
-     */
-    read_wmc_Layer: function(context, node) {
-        var layerContext = {
-            visibility: (node.getAttribute("hidden") != "1"),
-            queryable: (node.getAttribute("queryable") == "1"),
-            formats: [],
-            styles: []
-        };
-
-        this.runChildNodes(layerContext, node);
-        // set properties common to multiple objects on layer options/params
-        context.layersContext.push(layerContext);
-    },
-    
-    /**
-     * Method: read_wmc_Extension
-     */
-    read_wmc_Extension: function(obj, node) {
-        this.runChildNodes(obj, node);
-    },
-
-    /**
-     * Method: read_ol_units
-     */
-    read_ol_units: function(layerContext, node) {
-        layerContext.units = this.getChildValue(node);
-    },
-    
-    /**
-     * Method: read_ol_maxExtent
-     */
-    read_ol_maxExtent: function(obj, node) {
-        var bounds = new OpenLayers.Bounds(
-            node.getAttribute("minx"), node.getAttribute("miny"),
-            node.getAttribute("maxx"), node.getAttribute("maxy")
-        );
-        obj.maxExtent = bounds;
-    },
-    
-    /**
-     * Method: read_ol_transparent
-     */
-    read_ol_transparent: function(layerContext, node) {
-        layerContext.transparent = this.getChildValue(node);
-    },
-
-    /**
-     * Method: read_ol_numZoomLevels
-     */
-    read_ol_numZoomLevels: function(layerContext, node) {
-        layerContext.numZoomLevels = parseInt(this.getChildValue(node));
-    },
-
-    /**
-     * Method: read_ol_opacity
-     */
-    read_ol_opacity: function(layerContext, node) {
-        layerContext.opacity = parseFloat(this.getChildValue(node));
-    },
-
-    /**
-     * Method: read_ol_singleTile
-     */
-    read_ol_singleTile: function(layerContext, node) {
-        layerContext.singleTile = (this.getChildValue(node) == "true");
-    },
-
-    /**
-     * Method: read_ol_tileSize
-     */
-    read_ol_tileSize: function(layerContext, node) {
-        var obj = {"width": node.getAttribute("width"), "height": node.getAttribute("height")};
-        layerContext.tileSize = obj;
-    },
-    
-    /**
-     * Method: read_ol_isBaseLayer
-     */
-    read_ol_isBaseLayer: function(layerContext, node) {
-        layerContext.isBaseLayer = (this.getChildValue(node) == "true");
-    },
-
-    /**
-     * Method: read_ol_displayInLayerSwitcher
-     */
-    read_ol_displayInLayerSwitcher: function(layerContext, node) {
-        layerContext.displayInLayerSwitcher = (this.getChildValue(node) == "true");
-    },
-
-    /**
-     * Method: read_wmc_Server
-     */
-    read_wmc_Server: function(layerContext, node) {
-        layerContext.version = node.getAttribute("version");
-        var server = {};
-        var links = node.getElementsByTagName("OnlineResource");
-        if(links.length > 0) {
-            this.read_wmc_OnlineResource(server, links[0]);
-        }
-        layerContext.url = server.href;
-    },
-
-    /**
-     * Method: read_wmc_FormatList
-     */
-    read_wmc_FormatList: function(layerContext, node) {
-        this.runChildNodes(layerContext, node);
-    },
-
-    /**
-     * Method: read_wmc_Format
-     */
-    read_wmc_Format: function(layerContext, node) {
-        var format = {
-            value: this.getChildValue(node)
-        };
-        if(node.getAttribute("current") == "1") {
-            format.current = true;
-        }
-        layerContext.formats.push(format);
-    },
-    
-    /**
-     * Method: read_wmc_StyleList
-     */
-    read_wmc_StyleList: function(layerContext, node) {
-        this.runChildNodes(layerContext, node);
-    },
-
-    /**
-     * Method: read_wmc_Style
-     */
-    read_wmc_Style: function(layerContext, node) {
-        var style = {};
-        this.runChildNodes(style, node);
-        if(node.getAttribute("current") == "1") {
-            style.current = true;
-        }
-        layerContext.styles.push(style);
-    },
-    
-    /**
-     * Method: read_wmc_SLD
-     */
-    read_wmc_SLD: function(style, node) {
-        this.runChildNodes(style, node);
-        // style either comes back with an href or a body property
-    },
-    
-    /**
-     * Method: read_sld_StyledLayerDescriptor
-     */
-    read_sld_StyledLayerDescriptor: function(sld, node) {
-        var xml = OpenLayers.Format.XML.prototype.write.apply(this, [node]);
-        sld.body = xml;
-    },
-
-    /**
-     * Method: read_wmc_OnlineResource
-     */
-    read_wmc_OnlineResource: function(obj, node) {
-        obj.href = this.getAttributeNS(
-            node, this.namespaces.xlink, "href"
-        );
-    },
-    
-    /**
-     * Method: read_wmc_Name
-     */
-    read_wmc_Name: function(obj, node) {
-        var name = this.getChildValue(node);
-        if(name) {
-            obj.name = name;
-        }
-    },
-
-    /**
-     * Method: read_wmc_Title
-     */
-    read_wmc_Title: function(obj, node) {
-        var title = this.getChildValue(node);
-        if(title) {
-            obj.title = title;
-        }
-    },
-
-    /**
-     * Method: read_wmc_MetadataURL
-     */
-    read_wmc_MetadataURL: function(layerContext, node) {
-        var metadataURL = {};
-        var links = node.getElementsByTagName("OnlineResource");
-        if(links.length > 0) {
-            this.read_wmc_OnlineResource(metadataURL, links[0]);
-        }
-        layerContext.metadataURL = metadataURL.href;
-
-    },
-
-    /**
-     * Method: read_wmc_Abstract
-     */
-    read_wmc_Abstract: function(obj, node) {
-        var abst = this.getChildValue(node);
-        if(abst) {
-            obj["abstract"] = abst;
-        }
-    },
-    
-    /**
-     * Method: read_wmc_LegendURL
-     */
-    read_wmc_LegendURL: function(style, node) {
-        var legend = {
-            width: node.getAttribute('width'),
-            height: node.getAttribute('height')
-        };
-        var links = node.getElementsByTagName("OnlineResource");
-        if(links.length > 0) {
-            this.read_wmc_OnlineResource(legend, links[0]);
-        }
-        style.legend = legend;
-    },
-    
-    /**
-     * Method: write
-     *
-     * Parameters:
-     * context - {Object} An object representing the map context.
-     * options - {Object} Optional object.
-     *
-     * Returns:
-     * {String} A WMC document string.
-     */
-    write: function(context, options) {
-        var root = this.createElementDefaultNS("ViewContext");
-        this.setAttributes(root, {
-            version: this.VERSION,
-            id: (options && typeof options.id == "string") ?
-                    options.id :
-                    OpenLayers.Util.createUniqueID("OpenLayers_Context_")
-        });
-        
-        // add schemaLocation attribute
-        this.setAttributeNS(
-            root, this.namespaces.xsi,
-            "xsi:schemaLocation", this.schemaLocation
-        );
-        
-        // required General element
-        root.appendChild(this.write_wmc_General(context));
-
-        // required LayerList element
-        root.appendChild(this.write_wmc_LayerList(context));
-
-        return OpenLayers.Format.XML.prototype.write.apply(this, [root]);
-    },
-    
-    /**
-     * Method: createElementDefaultNS
-     * Shorthand for createElementNS with namespace from <defaultPrefix>.
-     *     Can optionally be used to set attributes and a text child value.
-     *
-     * Parameters:
-     * name - {String} The qualified node name.
-     * childValue - {String} Optional value for text child node.
-     * attributes - {Object} Optional object representing attributes.
-     *
-     * Returns:
-     * {Element} An element node.
-     */
-    createElementDefaultNS: function(name, childValue, attributes) {
-        var node = this.createElementNS(
-            this.namespaces[this.defaultPrefix],
-            name
-        );
-        if(childValue) {
-            node.appendChild(this.createTextNode(childValue));
-        }
-        if(attributes) {
-            this.setAttributes(node, attributes);
-        }
-        return node;
-    },
-    
-    /**
-     * Method: setAttributes
-     * Set multiple attributes given key value pairs from an object.
-     *
-     * Parameters:
-     * node - {Element} An element node.
-     * obj - {Object} An object whose properties represent attribute names and
-     *     values represent attribute values.
-     */
-    setAttributes: function(node, obj) {
-        var value;
-        for(var name in obj) {
-            value = obj[name].toString();
-            if(value.match(/[A-Z]/)) {
-                // safari lowercases attributes with setAttribute
-                this.setAttributeNS(node, null, name, value);
-            } else {
-                node.setAttribute(name, value);
-            }
-        }
-    },
-
-    /**
-     * Method: write_wmc_General
-     * Create a General node given an context object.
-     *
-     * Parameters:
-     * context - {Object} Context object.
-     *
-     * Returns:
-     * {Element} A WMC General element node.
-     */
-    write_wmc_General: function(context) {
-        var node = this.createElementDefaultNS("General");
-
-        // optional Window element
-        if(context.size) {
-            node.appendChild(this.createElementDefaultNS(
-                "Window", null,
-                {
-                    width: context.size.w,
-                    height: context.size.h
-                }
-            ));
-        }
-        
-        // required BoundingBox element
-        var bounds = context.bounds;
-        node.appendChild(this.createElementDefaultNS(
-            "BoundingBox", null,
-            {
-                minx: bounds.left.toPrecision(18),
-                miny: bounds.bottom.toPrecision(18),
-                maxx: bounds.right.toPrecision(18),
-                maxy: bounds.top.toPrecision(18),
-                SRS: context.projection
-            }
-        ));
-
-        // required Title element
-        node.appendChild(this.createElementDefaultNS(
-            "Title", context.title
-        ));
-        
-        // OpenLayers specific map properties
-        node.appendChild(this.write_ol_MapExtension(context));
-        
-        return node;
-    },
-    
-    /**
-     * Method: write_ol_MapExtension
-     */
-    write_ol_MapExtension: function(context) {
-        var node = this.createElementDefaultNS("Extension");
-        
-        var bounds = context.maxExtent;
-        if(bounds) {
-            var maxExtent = this.createElementNS(
-                this.namespaces.ol, "ol:maxExtent"
-            );
-            this.setAttributes(maxExtent, {
-                minx: bounds.left.toPrecision(18),
-                miny: bounds.bottom.toPrecision(18),
-                maxx: bounds.right.toPrecision(18),
-                maxy: bounds.top.toPrecision(18)
-            });
-            node.appendChild(maxExtent);
-        }
-        
-        return node;
-    },
-    
-    /**
-     * Method: write_wmc_LayerList
-     * Create a LayerList node given an context object.
-     *
-     * Parameters:
-     * context - {Object} Context object.
-     *
-     * Returns:
-     * {Element} A WMC LayerList element node.
-     */
-    write_wmc_LayerList: function(context) {
-        var list = this.createElementDefaultNS("LayerList");
-        
-        for(var i=0, len=context.layersContext.length; i<len; ++i) {
-            list.appendChild(this.write_wmc_Layer(context.layersContext[i]));
-        }
-        
-        return list;
-    },
-
-    /**
-     * Method: write_wmc_Layer
-     * Create a Layer node given a layer context object.
-     *
-     * Parameters:
-     * context - {Object} A layer context object.}
-     *
-     * Returns:
-     * {Element} A WMC Layer element node.
-     */
-    write_wmc_Layer: function(context) {
-        var node = this.createElementDefaultNS(
-            "Layer", null, {
-                queryable: context.queryable ? "1" : "0",
-                hidden: context.visibility ? "0" : "1"
-            }
-        );
-        
-        // required Server element
-        node.appendChild(this.write_wmc_Server(context));
-
-        // required Name element
-        node.appendChild(this.createElementDefaultNS(
-            "Name", context.name
-        ));
-        
-        // required Title element
-        node.appendChild(this.createElementDefaultNS(
-            "Title", context.title
-        ));
-
-        // optional MetadataURL element
-        if (context.metadataURL) {
-            node.appendChild(this.write_wmc_MetadataURL(context.metadataURL));
-        }
-        
-        return node;
-    },
-    
-    /**
-     * Method: write_wmc_LayerExtension
-     * Add OpenLayers specific layer parameters to an Extension element.
-     *
-     * Parameters:
-     * context - {Object} A layer context object.
-     *
-     * Returns:
-     * {Element} A WMC Extension element (for a layer).
-     */
-    write_wmc_LayerExtension: function(context) {
-        var node = this.createElementDefaultNS("Extension");
-        
-        var bounds = context.maxExtent;
-        var maxExtent = this.createElementNS(
-            this.namespaces.ol, "ol:maxExtent"
-        );
-        this.setAttributes(maxExtent, {
-            minx: bounds.left.toPrecision(18),
-            miny: bounds.bottom.toPrecision(18),
-            maxx: bounds.right.toPrecision(18),
-            maxy: bounds.top.toPrecision(18)
-        });
-        node.appendChild(maxExtent);
-        
-        if (context.tileSize && !context.singleTile) {
-            var size = this.createElementNS(
-                this.namespaces.ol, "ol:tileSize"
-            );
-            this.setAttributes(size, context.tileSize);
-            node.appendChild(size);
-        }
-        
-        var properties = [
-            "transparent", "numZoomLevels", "units", "isBaseLayer",
-            "opacity", "displayInLayerSwitcher", "singleTile"
-        ];
-        var child;
-        for(var i=0, len=properties.length; i<len; ++i) {
-            child = this.createOLPropertyNode(context, properties[i]);
-            if(child) {
-                node.appendChild(child);
-            }
-        }
-
-        return node;
-    },
-    
-    /**
-     * Method: createOLPropertyNode
-     * Create a node representing an OpenLayers property.  If the property is
-     *     null or undefined, null will be returned.
-     *
-     * Parameters:
-     * object - {Object} An object.
-     * prop - {String} A property.
-     *
-     * Returns:
-     * {Element} A property node.
-     */
-    createOLPropertyNode: function(obj, prop) {
-        var node = null;
-        if(obj[prop] != null) {
-            node = this.createElementNS(this.namespaces.ol, "ol:" + prop);
-            node.appendChild(this.createTextNode(obj[prop].toString()));
-        }
-        return node;
-    },
-
-    /**
-     * Method: write_wmc_Server
-     * Create a Server node given a layer context object.
-     *
-     * Parameters:
-     * context - {Object} Layer context object.
-     *
-     * Returns:
-     * {Element} A WMC Server element node.
-     */
-    write_wmc_Server: function(context) {
-        var node = this.createElementDefaultNS("Server");
-        this.setAttributes(node, {
-            service: "OGC:WMS",
-            version: context.version
-        });
-        
-        // required OnlineResource element
-        node.appendChild(this.write_wmc_OnlineResource(context.url));
-        
-        return node;
-    },
-
-    /**
-     * Method: write_wmc_MetadataURL
-     * Create a MetadataURL node given a metadataURL string.
-     *
-     * Parameters:
-     * metadataURL - {String} MetadataURL string value.
-     *
-     * Returns:
-     * {Element} A WMC metadataURL element node.
-     */
-    write_wmc_MetadataURL: function(metadataURL) {
-        var node = this.createElementDefaultNS("MetadataURL");
-
-        // required OnlineResource element
-        node.appendChild(this.write_wmc_OnlineResource(metadataURL));
-
-        return node;
-    },
-
-    /**
-     * Method: write_wmc_FormatList
-     * Create a FormatList node given a layer context.
-     *
-     * Parameters:
-     * context - {Object} Layer context object.
-     *
-     * Returns:
-     * {Element} A WMC FormatList element node.
-     */
-    write_wmc_FormatList: function(context) {
-        var node = this.createElementDefaultNS("FormatList");
-        for (var i=0, len=context.formats.length; i<len; i++) {
-            var format = context.formats[i];
-            node.appendChild(this.createElementDefaultNS(
-                "Format",
-                format.value,
-                (format.current && format.current == true) ?
-                    {current: "1"} : null
-            ));
-        }
-
-        return node;
-    },
-
-    /**
-     * Method: write_wmc_StyleList
-     * Create a StyleList node given a layer context.
-     *
-     * Parameters:
-     * context - {Object} Layer context object.
-     *
-     * Returns:
-     * {Element} A WMC StyleList element node.
-     */
-    write_wmc_StyleList: function(layer) {
-        var node = this.createElementDefaultNS("StyleList");
-
-        var styles = layer.styles;
-        if (styles && styles instanceof Array) {
-            var sld;
-            for (var i=0, len=styles.length; i<len; i++) {
-                var s = styles[i];
-                // three style types to consider
-                // [1] linked SLD
-                // [2] inline SLD
-                // [3] named style
-                // running child nodes always gets name, optionally gets href or body
-                var style = this.createElementDefaultNS(
-                    "Style",
-                    null,
-                    (s.current && s.current == true) ?
-                    {current: "1"} : null
-                );
-                if(s.href) { // [1]
-                    sld = this.createElementDefaultNS("SLD");
-                    var link = this.write_wmc_OnlineResource(s.href);
-                    sld.appendChild(link);
-                    // Name is required.
-                    sld.appendChild(this.createElementDefaultNS("Name", s.name));
-                    // Title is optional.
-                    if (s.title) {
-                        sld.appendChild(this.createElementDefaultNS("Title", s.title));
-                    }
-                    style.appendChild(sld);
-                } else if(s.body) { // [2]
-                    sld = this.createElementDefaultNS("SLD");
-                    // read in body as xml doc - assume proper namespace declarations
-                    var doc = OpenLayers.Format.XML.prototype.read.apply(this, [s.body]);
-                    // append to StyledLayerDescriptor node
-                    var imported = doc.documentElement;
-                    if(sld.ownerDocument && sld.ownerDocument.importNode) {
-                        imported = sld.ownerDocument.importNode(imported, true);
-                    }
-                    sld.appendChild(imported);
-                    // Name is required.
-                    sld.appendChild(this.createElementDefaultNS("Name", s.name));
-                    // Title is optional.
-                    if (s.title) {
-                        sld.appendChild(this.createElementDefaultNS("Title", s.title));
-                    }
-                    style.appendChild(sld);            
-                } else { // [3]
-                    // both Name and Title are required.
-                    style.appendChild(this.createElementDefaultNS("Name", s.name));
-                    style.appendChild(this.createElementDefaultNS("Title", s.title));
-                    // Abstract is optional
-                    if (s['abstract']) { // abstract is a js keyword
-                        style.appendChild(this.createElementDefaultNS(
-                            "Abstract", s['abstract']
-                        ));
-                    }
-                }
-                node.appendChild(style);
-            }
-        }
-
-        return node;
-    },
-
-    /**
-     * Method: write_wmc_OnlineResource
-     * Create an OnlineResource node given a URL.
-     *
-     * Parameters:
-     * href - {String} URL for the resource.
-     *
-     * Returns:
-     * {Element} A WMC OnlineResource element node.
-     */
-    write_wmc_OnlineResource: function(href) {
-        var node = this.createElementDefaultNS("OnlineResource");
-        this.setAttributeNS(node, this.namespaces.xlink, "xlink:type", "simple");
-        this.setAttributeNS(node, this.namespaces.xlink, "xlink:href", href);
-        return node;
-    },
-
-    CLASS_NAME: "OpenLayers.Format.WMC.v1" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WMC/v1_0_0.js
+++ /dev/null
@@ -1,77 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/WMC/v1.js
- */
-
-/**
- * Class: OpenLayers.Format.WMC.v1_0_0
- * Read and write WMC version 1.0.0.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.WMC.v1>
- */
-OpenLayers.Format.WMC.v1_0_0 = OpenLayers.Class(
-    OpenLayers.Format.WMC.v1, {
-    
-    /**
-     * Constant: VERSION
-     * {String} 1.0.0
-     */
-    VERSION: "1.0.0",
-    
-    /**
-     * Property: schemaLocation
-     * {String} http://www.opengis.net/context
-     *     http://schemas.opengis.net/context/1.0.0/context.xsd
-     */
-    schemaLocation: "http://www.opengis.net/context http://schemas.opengis.net/context/1.0.0/context.xsd",
-
-    /**
-     * Constructor: OpenLayers.Format.WMC.v1_0_0
-     * Instances of this class are not created directly.  Use the
-     *     <OpenLayers.Format.WMC> constructor instead.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.WMC.v1.prototype.initialize.apply(
-            this, [options]
-        );
-    },
-
-    /**
-     * Method: write_wmc_Layer
-     * Create a Layer node given a layer context object. This method adds
-     *     elements specific to version 1.0.0.
-     *
-     * Parameters:
-     * context - {Object} A layer context object.}
-     *
-     * Returns:
-     * {Element} A WMC Layer element node.
-     */
-    write_wmc_Layer: function(context) {
-        var node = OpenLayers.Format.WMC.v1.prototype.write_wmc_Layer.apply(
-            this, [context]
-        );
-    
-        // optional FormatList element
-        node.appendChild(this.write_wmc_FormatList(context));
-
-        // optional StyleList element
-        node.appendChild(this.write_wmc_StyleList(context));
-        
-        // OpenLayers specific properties go in an Extension element
-        node.appendChild(this.write_wmc_LayerExtension(context));
-    },    
-
-    CLASS_NAME: "OpenLayers.Format.WMC.v1_0_0" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WMC/v1_1_0.js
+++ /dev/null
@@ -1,128 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/WMC/v1.js
- */
-
-/**
- * Class: OpenLayers.Format.WMC.v1_1_0
- * Read and write WMC version 1.1.0.
- *
- * Differences between 1.1.0 and 1.0.0:
- *     - 1.1.0 Layers have optional sld:MinScaleDenominator and
- *       sld:MaxScaleDenominator
- * 
- * Inherits from:
- *  - <OpenLayers.Format.WMC.v1>
- */
-OpenLayers.Format.WMC.v1_1_0 = OpenLayers.Class(
-    OpenLayers.Format.WMC.v1, {
-    
-    /**
-     * Constant: VERSION
-     * {String} 1.1.0
-     */
-    VERSION: "1.1.0",
-
-    /**
-     * Property: schemaLocation
-     * {String} http://www.opengis.net/context
-     *     http://schemas.opengis.net/context/1.1.0/context.xsd
-     */
-    schemaLocation: "http://www.opengis.net/context http://schemas.opengis.net/context/1.1.0/context.xsd",
-
-    /**
-     * Constructor: OpenLayers.Format.WMC.v1_1_0
-     * Instances of this class are not created directly.  Use the
-     *     <OpenLayers.Format.WMC> constructor instead.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.WMC.v1.prototype.initialize.apply(
-            this, [options]
-        );
-    },
-
-    /**
-     * Method: read_sld_MinScaleDenominator
-     * Read a sld:MinScaleDenominator node.
-     *
-     * Parameters:
-     * layerContext - {Object} An object representing a layer.
-     * node - {Element} An element node.
-     */
-    read_sld_MinScaleDenominator: function(layerContext, node) {
-        var minScaleDenominator = parseFloat(this.getChildValue(node));
-        if (minScaleDenominator > 0) {
-            layerContext.maxScale = minScaleDenominator;
-        }
-    },
-
-    /**
-     * Method: read_sld_MaxScaleDenominator
-     * Read a sld:MaxScaleDenominator node.
-     *
-     * Parameters:
-     * layerContext - {Object} An object representing a layer.
-     * node - {Element} An element node.
-     */
-    read_sld_MaxScaleDenominator: function(layerContext, node) {
-        layerContext.minScale = parseFloat(this.getChildValue(node));
-    },
-
-    /**
-     * Method: write_wmc_Layer
-     * Create a Layer node given a layer context object. This method adds
-     *     elements specific to version 1.1.0.
-     *
-     * Parameters:
-     * context - {Object} A layer context object.}
-     *
-     * Returns:
-     * {Element} A WMC Layer element node.
-     */
-    write_wmc_Layer: function(context) {
-        var node = OpenLayers.Format.WMC.v1.prototype.write_wmc_Layer.apply(
-            this, [context]
-        );
-        
-        // min/max scale denominator elements go before the 4th element in v1
-        if(context.maxScale) {
-            var minSD = this.createElementNS(
-                this.namespaces.sld, "sld:MinScaleDenominator"
-            );
-            minSD.appendChild(this.createTextNode(context.maxScale.toPrecision(16)));
-            node.appendChild(minSD);
-        }
-        
-        if(context.minScale) {
-            var maxSD = this.createElementNS(
-                this.namespaces.sld, "sld:MaxScaleDenominator"
-            );
-            maxSD.appendChild(this.createTextNode(context.minScale.toPrecision(16)));
-            node.appendChild(maxSD);
-        }
-
-        // optional FormatList element
-        node.appendChild(this.write_wmc_FormatList(context));
-
-        // optional StyleList element
-        node.appendChild(this.write_wmc_StyleList(context));
-        
-        // OpenLayers specific properties go in an Extension element
-        node.appendChild(this.write_wmc_LayerExtension(context));
-        
-        return node;
-        
-    },
-
-    CLASS_NAME: "OpenLayers.Format.WMC.v1_1_0" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WMSCapabilities.js
+++ /dev/null
@@ -1,82 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- */
-
-/**
- * Class: OpenLayers.Format.WMSCapabilities
- * Read WMS Capabilities.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.WMSCapabilities = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * APIProperty: defaultVersion
-     * {String} Version number to assume if none found.  Default is "1.1.1".
-     */
-    defaultVersion: "1.1.1",
-    
-    /**
-     * APIProperty: version
-     * {String} Specify a version string if one is known.
-     */
-    version: null,
-    
-    /**
-     * Property: parser
-     * {<OpenLayers.Format>} A cached versioned format used for reading.
-     */
-    parser: null,
-
-    /**
-     * Constructor: OpenLayers.Format.WMSCapabilities
-     * Create a new parser for WMS capabilities.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-        this.options = options;
-    },
-
-    /**
-     * APIMethod: read
-     * Read capabilities data from a string, and return a list of layers. 
-     * 
-     * Parameters: 
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Array} List of named layers.
-     */
-    read: function(data) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        var root = data.documentElement;
-        var version = this.version || root.getAttribute("version") || this.defaultVersion;
-        if(!this.parser || this.parser.version !== version) {
-            var constr = OpenLayers.Format.WMSCapabilities[
-                "v" + version.replace(/\./g, "_")
-            ];
-            if(!constr) {
-                throw "Can't find a WMS capabilities parser for version " + version;
-            }
-            this.parser = new constr(this.options);
-        }
-        var capabilities = this.parser.read(data);
-        capabilities.version = version;
-        return capabilities;
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.WMSCapabilities" 
-
-});

--- a/labs/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1.js
+++ /dev/null
@@ -1,419 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/WMSCapabilities.js
- * @requires OpenLayers/Format/XML.js
- */
-
-/**
- * Class: OpenLayers.Format.WMSCapabilities.v1
- * Abstract class not to be instantiated directly. Creates
- * the common parts for both WMS 1.1.X and WMS 1.3.X.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.WMSCapabilities.v1 = OpenLayers.Class(
-    OpenLayers.Format.XML, {
-    
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        wms: "http://www.opengis.net/wms",
-        xlink: "http://www.w3.org/1999/xlink",
-        xsi: "http://www.w3.org/2001/XMLSchema-instance"
-    },
-
-    /**
-     * Property: defaultPrefix
-     */
-    defaultPrefix: "wms",
-    
-    /**
-     * Constructor: OpenLayers.Format.WMSCapabilities.v1
-     * Create an instance of one of the subclasses.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * APIMethod: read
-     * Read capabilities data from a string, and return a list of layers. 
-     * 
-     * Parameters: 
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Array} List of named layers.
-     */
-    read: function(data) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        if(data && data.nodeType == 9) {
-            data = data.documentElement;
-        }
-        var capabilities = {};
-        this.readNode(data, capabilities);
-    
-        // postprocess the layer list
-        this.postProcessLayers(capabilities);
-    
-        return capabilities;
-    },
-
-    /**
-     * Method: postProcessLayers
-     * Post process the layers, so that the nested layer structure is converted
-     * to a flat layer list with only named layers.
-     *
-     * Parameters:
-     * capabilities - {Object} The object (structure) returned by the parser with
-     *     all the info from the GetCapabilities response.
-     */
-    postProcessLayers: function(capabilities) {
-        if (capabilities.capability) {
-            capabilities.capability.layers = [];
-            var layers = capabilities.capability.nestedLayers;
-            for (var i=0, len = layers.length; i<len; ++i) {
-                var layer = layers[i];
-                this.processLayer(capabilities.capability, layer);
-            }
-        }
-    },
-
-    /**
-     * Method: processLayer
-     * Recursive submethod of postProcessLayers. This function will among
-     * others deal with property inheritance.
-     *
-     * Parameters:
-     * capability - {Object} The capability part of the capabilities object
-     * layer - {Object} The layer that needs processing
-     * parentLayer - {Object} The parent layer of the respective layer
-    */
-    processLayer: function(capability, layer, parentLayer) {
-        if (layer.formats === undefined) {
-            layer.formats = capability.request.getmap.formats;
-        }
-
-        // deal with property inheritance
-        if(parentLayer) {
-            // add style
-            layer.styles = layer.styles.concat(parentLayer.styles);
-            var attributes = ["queryable",
-                              "cascaded",
-                              "fixedWidth",
-                              "fixedHeight",
-                              "opaque",
-                              "noSubsets",
-                              "llbbox",
-                              "minScale",
-                              "maxScale",
-                              "attribution"];
-
-            var complexAttr = ["srs",
-                               "bbox",
-                               "dimensions",
-                               "authorityURLs"];
-            
-            var key;
-            for (var j=0; j<attributes.length; j++) {
-                key = attributes[j];
-                if (key in parentLayer) {
-                    // only take parent value if not present (null or undefined)
-                    if (layer[key] == null) {
-                        layer[key] = parentLayer[key];
-                    }
-                    // if attribute isn't present, and we haven't
-                    // inherited anything from a parent layer
-                    // set to default value
-                    if (layer[key] == null) {
-                        var intAttr = ["cascaded", "fixedWidth", "fixedHeight"];
-                        var boolAttr = ["queryable", "opaque", "noSubsets"];
-                        if (OpenLayers.Util.indexOf(intAttr, key) != -1) {
-                            layer[key] = 0;
-                        }
-                        if (OpenLayers.Util.indexOf(boolAttr, key) != -1) {
-                            layer[key] = false;
-                        }
-                    }
-                }
-            }
-
-            for (var j=0; j<complexAttr.length; j++) {
-                key = complexAttr[j];
-                layer[key] = OpenLayers.Util.extend(
-                    layer[key], parentLayer[key]);
-            }
-        }
-
-        // process sublayers
-        for (var i=0, len=layer.nestedLayers.length; i<len; i++) {
-            var childLayer = layer.nestedLayers[i];
-            this.processLayer(capability, childLayer, layer);
-        }
-        
-        if (layer.name) {
-            capability.layers.push(layer);
-        }
-    
-    },
-    
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "wms": {
-            "Service": function(node, obj) {
-                obj.service = {};
-                this.readChildNodes(node, obj.service);
-            },
-            "Name": function(node, obj) {
-                obj.name = this.getChildValue(node);
-            },
-            "Title": function(node, obj) {
-                obj.title = this.getChildValue(node);
-            },
-            "Abstract": function(node, obj) {
-                obj["abstract"] = this.getChildValue(node);
-            },
-            "BoundingBox": function(node, obj) {
-                var bbox = {};
-                bbox.bbox = [
-                    parseFloat(node.getAttribute("minx")),
-                    parseFloat(node.getAttribute("miny")),
-                    parseFloat(node.getAttribute("maxx")),
-                    parseFloat(node.getAttribute("maxy"))
-                ];
-                var res = {
-                    x: parseFloat(node.getAttribute("resx")),
-                    y: parseFloat(node.getAttribute("resy"))
-                };
-
-                if (! (isNaN(res.x) && isNaN(res.y))) {
-                    bbox.res = res;
-                }
-                // return the bbox so that descendant classes can set the
-                // CRS and SRS and add it to the obj
-                return bbox;
-            },
-            "OnlineResource": function(node, obj) {
-                obj.href = this.getAttributeNS(node, this.namespaces.xlink, 
-                    "href");
-            },
-            "ContactInformation": function(node, obj) {
-                obj.contactInformation = {};
-                this.readChildNodes(node, obj.contactInformation);
-            },
-            "ContactPersonPrimary": function(node, obj) {
-                obj.personPrimary = {};
-                this.readChildNodes(node, obj.personPrimary);
-            },
-            "ContactPerson": function(node, obj) {
-                obj.person = this.getChildValue(node);
-            },
-            "ContactOrganization": function(node, obj) {
-                obj.organization = this.getChildValue(node);
-            },
-            "ContactPosition": function(node, obj) {
-                obj.position = this.getChildValue(node);
-            },
-            "ContactAddress": function(node, obj) {
-                obj.contactAddress = {};
-                this.readChildNodes(node, obj.contactAddress);
-            },
-            "AddressType": function(node, obj) {
-                obj.type = this.getChildValue(node);
-            },
-            "Address": function(node, obj) {
-                obj.address = this.getChildValue(node);
-            },
-            "City": function(node, obj) {
-                obj.city = this.getChildValue(node);
-            },
-            "StateOrProvince": function(node, obj) {
-                obj.stateOrProvince = this.getChildValue(node);
-            },
-            "PostCode": function(node, obj) {
-                obj.postcode = this.getChildValue(node);
-            },
-            "Country": function(node, obj) {
-                obj.country = this.getChildValue(node);
-            },
-            "ContactVoiceTelephone": function(node, obj) {
-                obj.phone = this.getChildValue(node);
-            },
-            "ContactFacsimileTelephone": function(node, obj) {
-                obj.fax = this.getChildValue(node);
-            },
-            "ContactElectronicMailAddress": function(node, obj) {
-                obj.email = this.getChildValue(node);
-            },
-            "Fees": function(node, obj) {
-                var fees = this.getChildValue(node);
-                if (fees && fees.toLowerCase() != "none") {
-                    obj.fees = fees;
-                }
-            },
-            "AccessConstraints": function(node, obj) {
-                var constraints = this.getChildValue(node);
-                if (constraints && constraints.toLowerCase() != "none") {
-                    obj.accessConstraints = constraints;
-                }
-            },
-            "Capability": function(node, obj) {
-                obj.capability = {nestedLayers: []};
-                this.readChildNodes(node, obj.capability);
-            },
-            "Request": function(node, obj) {
-                obj.request = {};
-                this.readChildNodes(node, obj.request);
-            },
-            "GetCapabilities": function(node, obj) {
-                obj.getcapabilities = {formats: []};
-                this.readChildNodes(node, obj.getcapabilities);
-            },
-            "Format": function(node, obj) {
-                if (obj.formats instanceof Array) {
-                    obj.formats.push(this.getChildValue(node));
-                } else {
-                    obj.format = this.getChildValue(node);
-                }
-            },
-            "DCPType": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "HTTP": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "Get": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "Post": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "GetMap": function(node, obj) {
-                obj.getmap = {formats: []};
-                this.readChildNodes(node, obj.getmap);
-            },
-            "GetFeatureInfo": function(node, obj) {
-                obj.getfeatureinfo = {formats: []};
-                this.readChildNodes(node, obj.getfeatureinfo);
-            },
-            "Exception": function(node, obj) {
-                obj.exception = {formats: []};
-                this.readChildNodes(node, obj.exception);
-            },
-            "Layer": function(node, obj) {
-                var attrNode = node.getAttributeNode("queryable");
-                var queryable = (attrNode && attrNode.specified) ? 
-                    node.getAttribute("queryable") : null;
-                attrNode = node.getAttributeNode("cascaded");
-                var cascaded = (attrNode && attrNode.specified) ?
-                    node.getAttribute("cascaded") : null;
-                attrNode = node.getAttributeNode("opaque");
-                var opaque = (attrNode && attrNode.specified) ?
-                    node.getAttribute('opaque') : null;
-                var noSubsets = node.getAttribute('noSubsets');
-                var fixedWidth = node.getAttribute('fixedWidth');
-                var fixedHeight = node.getAttribute('fixedHeight');
-                var layer = {nestedLayers: [], styles: [], srs: {}, 
-                    metadataURLs: [], bbox: {}, dimensions: {},
-                    authorityURLs: {}, identifiers: {}, keywords: [],
-                    queryable: (queryable && queryable !== "") ? 
-                        ( queryable === "1" || queryable === "true" ) : null,
-                    cascaded: (cascaded !== null) ? parseInt(cascaded) : null,
-                    opaque: opaque ? 
-                        (opaque === "1" || opaque === "true" ) : null,
-                    noSubsets: (noSubsets !== null) ? 
-                        ( noSubsets === "1" || noSubsets === "true" ) : null,
-                    fixedWidth: (fixedWidth != null) ? 
-                        parseInt(fixedWidth) : null,
-                    fixedHeight: (fixedHeight != null) ? 
-                        parseInt(fixedHeight) : null
-                };
-                obj.nestedLayers.push(layer);
-                this.readChildNodes(node, layer);
-                if(layer.name) {
-                    var parts = layer.name.split(":");
-                    if(parts.length > 0) {
-                        layer.prefix = parts[0];
-                    }
-                }
-            },
-            "Attribution": function(node, obj) {
-                obj.attribution = {};
-                this.readChildNodes(node, obj.attribution);
-            },
-            "LogoURL": function(node, obj) {
-                obj.logo = {
-                    width: node.getAttribute("width"),
-                    height: node.getAttribute("height")
-                };
-                this.readChildNodes(node, obj.logo);
-            },
-            "Style": function(node, obj) {
-                var style = {};
-                obj.styles.push(style);
-                this.readChildNodes(node, style);
-            },
-            "LegendURL": function(node, obj) {
-                var legend = {
-                    width: node.getAttribute("width"),
-                    height: node.getAttribute("height")
-                };
-                obj.legend = legend;
-                this.readChildNodes(node, legend);
-            },
-            "MetadataURL": function(node, obj) {
-                var metadataURL = {type: node.getAttribute("type")};
-                obj.metadataURLs.push(metadataURL);
-                this.readChildNodes(node, metadataURL);
-            },
-            "DataURL": function(node, obj) {
-                obj.dataURL = {};
-                this.readChildNodes(node, obj.dataURL);
-            },
-            "FeatureListURL": function(node, obj) {
-                obj.featureListURL = {};
-                this.readChildNodes(node, obj.featureListURL);
-            },
-            "AuthorityURL": function(node, obj) {
-                var name = node.getAttribute("name");
-                var authority = {};
-                this.readChildNodes(node, authority);
-                obj.authorityURLs[name] = authority.href;
-            },
-            "Identifier": function(node, obj) {
-                var authority = node.getAttribute("authority");
-                obj.identifiers[authority] = this.getChildValue(node);
-            },
-            "KeywordList": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "SRS": function(node, obj) {
-                obj.srs[this.getChildValue(node)] = true;
-            }
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Format.WMSCapabilities.v1" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1_1.js
+++ /dev/null
@@ -1,119 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/WMSCapabilities/v1.js
- */
-
-/**
- * Class: OpenLayers.Format.WMSCapabilities.v1_1
- * Abstract class not to be instantiated directly.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.WMSCapabilities.v1>
- */
-OpenLayers.Format.WMSCapabilities.v1_1 = OpenLayers.Class(
-    OpenLayers.Format.WMSCapabilities.v1, {
-    
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "wms": OpenLayers.Util.applyDefaults({
-            "WMT_MS_Capabilities": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "Keyword": function(node, obj) {
-                if (obj.keywords) {
-                    obj.keywords.push(this.getChildValue(node));
-                }
-            },
-            "DescribeLayer": function(node, obj) {
-                obj.describelayer = {formats: []};
-                this.readChildNodes(node, obj.describelayer);
-            },
-            "GetLegendGraphic": function(node, obj) {
-                obj.getlegendgraphic = {formats: []};
-                this.readChildNodes(node, obj.getlegendgraphic);
-            },
-            "GetStyles": function(node, obj) {
-                obj.getstyles = {formats: []};
-                this.readChildNodes(node, obj.getstyles);
-            },
-            "PutStyles": function(node, obj) {
-                obj.putstyles = {formats: []};
-                this.readChildNodes(node, obj.putstyles);
-            },
-            "UserDefinedSymbolization": function(node, obj) {
-                var userSymbols = {
-                    supportSLD: parseInt(node.getAttribute("SupportSLD")) == 1,
-                    userLayer: parseInt(node.getAttribute("UserLayer")) == 1,
-                    userStyle: parseInt(node.getAttribute("UserStyle")) == 1,
-                    remoteWFS: parseInt(node.getAttribute("RemoteWFS")) == 1
-                };
-                obj.userSymbols = userSymbols;
-            },
-            "LatLonBoundingBox": function(node, obj) {
-                obj.llbbox = [
-                    parseFloat(node.getAttribute("minx")),
-                    parseFloat(node.getAttribute("miny")),
-                    parseFloat(node.getAttribute("maxx")),
-                    parseFloat(node.getAttribute("maxy"))
-                ];
-            },
-            "BoundingBox": function(node, obj) {
-                var bbox = OpenLayers.Format.WMSCapabilities.v1.prototype.readers["wms"].BoundingBox.apply(this, [node, obj]);
-                bbox.srs  = node.getAttribute("SRS");
-                obj.bbox[bbox.srs] = bbox;
-            },
-            "ScaleHint": function(node, obj) {
-                var min = node.getAttribute("min");
-                var max = node.getAttribute("max");
-                var rad2 = Math.pow(2, 0.5);
-                var ipm = OpenLayers.INCHES_PER_UNIT["m"];
-                obj.maxScale = parseFloat(
-                    ((min / rad2) * ipm * 
-                        OpenLayers.DOTS_PER_INCH).toPrecision(13)
-                );
-                obj.minScale = parseFloat(
-                    ((max / rad2) * ipm * 
-                        OpenLayers.DOTS_PER_INCH).toPrecision(13)
-                );
-            },
-            "Dimension": function(node, obj) {
-                var name = node.getAttribute("name").toLowerCase();
-                var dim = {
-                    name: name,
-                    units: node.getAttribute("units"),
-                    unitsymbol: node.getAttribute("unitSymbol")
-                };
-                obj.dimensions[dim.name] = dim;
-            },
-            "Extent": function(node, obj) {
-                var name = node.getAttribute("name").toLowerCase();
-                if (name in obj["dimensions"]) {
-                    var extent = obj.dimensions[name];
-                    extent.nearestVal = 
-                        node.getAttribute("nearestValue") === "1";
-                    extent.multipleVal = 
-                        node.getAttribute("multipleValues") === "1";
-                    extent.current = node.getAttribute("current") === "1";
-                    extent["default"] = node.getAttribute("default") || "";
-                    var values = this.getChildValue(node);
-                    extent.values = values.split(",");
-                }
-                }
-        }, OpenLayers.Format.WMSCapabilities.v1.prototype.readers["wms"])
-    },
-
-    CLASS_NAME: "OpenLayers.Format.WMSCapabilities.v1_1" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1_1_0.js
+++ /dev/null
@@ -1,63 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/WMSCapabilities/v1_1.js
- */
-
-/**
- * Class: OpenLayers.Format.WMSCapabilities/v1_1_0
- * Read WMS Capabilities version 1.1.0.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.WMSCapabilities.v1_1>
- */
-OpenLayers.Format.WMSCapabilities.v1_1_0 = OpenLayers.Class(
-    OpenLayers.Format.WMSCapabilities.v1_1, {
-    
-    /**
-     * Property: version
-     * {String} The specific parser version.
-     */
-    version: "1.1.0",
-    
-    /**
-     * Constructor: OpenLayers.Format.WMSCapabilities.v1_1_0
-     * Create a new parser for WMS capabilities version 1.1.0.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.WMSCapabilities.v1_1.prototype.initialize.apply(
-            this, [options]
-        );
-    },
-
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "wms": OpenLayers.Util.applyDefaults({
-            "SRS": function(node, obj) {
-                var srs = this.getChildValue(node);
-                var values = srs.split(/ +/);
-                for (var i=0, len=values.length; i<len; i++) {
-                    obj.srs[values[i]] = true;
-                }
-            }
-        }, OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers["wms"])
-    },
-
-    CLASS_NAME: "OpenLayers.Format.WMSCapabilities.v1_1_0" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1_1_1.js
+++ /dev/null
@@ -1,59 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/WMSCapabilities/v1_1.js
- */
-
-/**
- * Class: OpenLayers.Format.WMSCapabilities/v1_1_1
- * Read WMS Capabilities version 1.1.1.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.WMSCapabilities.v1_1>
- */
-OpenLayers.Format.WMSCapabilities.v1_1_1 = OpenLayers.Class(
-    OpenLayers.Format.WMSCapabilities.v1_1, {
-    
-    /**
-     * Property: version
-     * {String} The specific parser version.
-     */
-    version: "1.1.1",
-    
-    /**
-     * Constructor: OpenLayers.Format.WMSCapabilities.v1_1_1
-     * Create a new parser for WMS capabilities version 1.1.1.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.WMSCapabilities.v1_1.prototype.initialize.apply(
-            this, [options]
-        );
-    },
-
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "wms": OpenLayers.Util.applyDefaults({
-            "SRS": function(node, obj) {
-                obj.srs[this.getChildValue(node)] = true;
-            }
-        }, OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers["wms"])
-    },
-
-    CLASS_NAME: "OpenLayers.Format.WMSCapabilities.v1_1_1" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1_3.js
+++ /dev/null
@@ -1,129 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**

- * @requires OpenLayers/Format/WMSCapabilities/v1.js

- */

-

-/**

- * Class: OpenLayers.Format.WMSCapabilities/v1_3

- * Abstract base class for WMS Capabilities version 1.3.X. 

- * SLD 1.1.0 adds in the extra operations DescribeLayer and GetLegendGraphic, 

- * see: http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd

- * 

- * Inherits from:

- *  - <OpenLayers.Format.WMSCapabilities.v1>

- */

-OpenLayers.Format.WMSCapabilities.v1_3 = OpenLayers.Class(

-    OpenLayers.Format.WMSCapabilities.v1, {

-    

-    /**

-     * Property: readers

-     * Contains public functions, grouped by namespace prefix, that will

-     *     be applied when a namespaced node is found matching the function

-     *     name.  The function will be applied in the scope of this parser

-     *     with two arguments: the node being read and a context object passed

-     *     from the parent.

-     */

-    readers: {

-        "wms": OpenLayers.Util.applyDefaults({

-            "WMS_Capabilities": function(node, obj) {

-                this.readChildNodes(node, obj);

-            },

-            "LayerLimit": function(node, obj) {

-                obj.layerLimit = parseInt(this.getChildValue(node));

-            },

-            "MaxWidth": function(node, obj) {

-                obj.maxWidth = parseInt(this.getChildValue(node));

-            },

-            "MaxHeight": function(node, obj) {

-                obj.maxHeight = parseInt(this.getChildValue(node));

-            },

-            "BoundingBox": function(node, obj) {

-                var bbox = OpenLayers.Format.WMSCapabilities.v1.prototype.readers["wms"].BoundingBox.apply(this, [node, obj]);

-                bbox.srs  = node.getAttribute("CRS");

-                obj.bbox[bbox.srs] = bbox;

-            },

-            "CRS": function(node, obj) {

-                // CRS is the synonym of SRS

-                this.readers.wms.SRS.apply(this, [node, obj]); 

-            },

-            "EX_GeographicBoundingBox": function(node, obj) {

-                // replacement of LatLonBoundingBox

-                obj.llbbox = [];

-                this.readChildNodes(node, obj.llbbox);

-                

-            },

-            "westBoundLongitude": function(node, obj) {

-                obj[0] = this.getChildValue(node);

-            },

-            "eastBoundLongitude": function(node, obj) {

-                obj[2] = this.getChildValue(node);

-            },

-            "southBoundLatitude": function(node, obj) {

-                obj[1] = this.getChildValue(node);

-            },

-            "northBoundLatitude": function(node, obj) {

-                obj[3] = this.getChildValue(node);

-            },

-            "MinScaleDenominator": function(node, obj) {

-                obj.maxScale = parseFloat(this.getChildValue(node)).toPrecision(16);

-            },

-            "MaxScaleDenominator": function(node, obj) {

-                obj.minScale = parseFloat(this.getChildValue(node)).toPrecision(16);

-            },

-            "Dimension": function(node, obj) {

-                // dimension has extra attributes: default, multipleValues, 

-                // nearestValue, current which used to be part of Extent. It now

-                // also contains the values.

-                var name = node.getAttribute("name").toLowerCase();

-                var dim = {

-                    name: name,

-                    units: node.getAttribute("units"),

-                    unitsymbol: node.getAttribute("unitSymbol"),

-                    nearestVal: node.getAttribute("nearestValue") === "1",

-                    multipleVal: node.getAttribute("multipleValues") === "1",

-                    "default": node.getAttribute("default") || "",

-                    current: node.getAttribute("current") === "1",

-                    values: this.getChildValue(node).split(",")

-                    

-                };

-                // Theoretically there can be more dimensions with the same

-                // name, but with a different unit. Until we meet such a case,

-                // let's just keep the same structure as the WMS 1.1 

-                // GetCapabilities parser uses. We will store the last

-                // one encountered.

-                obj.dimensions[dim.name] = dim;

-            },

-            "Keyword": function(node, obj) {

-                // TODO: should we change the structure of keyword in v1.js?

-                // Make it an object with a value instead of a string?

-                var keyword = {value: this.getChildValue(node), 

-                    vocabulary: node.getAttribute("vocabulary")};

-                if (obj.keywords) {

-                    obj.keywords.push(keyword);

-                }

-            }

-        }, OpenLayers.Format.WMSCapabilities.v1.prototype.readers["wms"]),

-        "sld": {

-            "UserDefinedSymbolization": function(node, obj) {

-                this.readers.wms.UserDefinedSymbolization.apply(this, [node, obj]);

-                // add the two extra attributes

-                obj.userSymbols.inlineFeature = parseInt(node.getAttribute("InlineFeature")) == 1;

-                obj.userSymbols.remoteWCS = parseInt(node.getAttribute("RemoteWCS")) == 1;

-            },

-            "DescribeLayer": function(node, obj) {

-                this.readers.wms.DescribeLayer.apply(this, [node, obj]);

-            },

-            "GetLegendGraphic": function(node, obj) {

-                this.readers.wms.GetLegendGraphic.apply(this, [node, obj]);

-            }

-        }

-    },

-    

-    CLASS_NAME: "OpenLayers.Format.WMSCapabilities.v1_3" 

-

-});

-

--- a/labs/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1_3_0.js
+++ /dev/null
@@ -1,31 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**

- * @requires OpenLayers/Format/WMSCapabilities/v1_3.js

- */

-

-/**

- * Class: OpenLayers.Format.WMSCapabilities/v1_3_0

- * Read WMS Capabilities version 1.3.0. 

- * SLD 1.1.0 adds in the extra operations DescribeLayer and GetLegendGraphic, 

- * see: http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd

- * 

- * Inherits from:

- *  - <OpenLayers.Format.WMSCapabilities.v1_3>

- */

-OpenLayers.Format.WMSCapabilities.v1_3_0 = OpenLayers.Class(

-    OpenLayers.Format.WMSCapabilities.v1_3, {

-    

-    /**

-     * Property: version

-     * {String} The specific parser version.

-     */

-    version: "1.3.0",

-    

-    CLASS_NAME: "OpenLayers.Format.WMSCapabilities.v1_3_0" 

-

-});

-

--- a/labs/openlayers/lib/OpenLayers/Format/WMSDescribeLayer.js
+++ /dev/null
@@ -1,92 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- */
-
-/**
- * Class: OpenLayers.Format.WMSDescribeLayer
- * Read SLD WMS DescribeLayer response
- * DescribeLayer is meant to couple WMS to WFS and WCS
- * 
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.WMSDescribeLayer = OpenLayers.Class(OpenLayers.Format.XML, {
-
-    /**
-     * APIProperty: defaultVersion
-     * {String} Version number to assume if none found.  Default is "1.1.1".
-     */
-    defaultVersion: "1.1.1",
-   
-    /**
-     * APIProperty: version
-     * {String} Specify a version string if one is known.
-     */
-    version: null,
-
-    /**
-     * Constructor: OpenLayers.Format.WMSDescribeLayer
-     * Create a new parser for WMS DescribeLayer responses.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-        this.options = options;
-    },
-
-    /**
-     * APIMethod: read
-     * Read DescribeLayer data from a string, and return the response. 
-     * The OGC currently defines 2 formats which are allowed for output,
-     * so we need to parse these 2 types
-     * 
-     * Parameters: 
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Array} Array of {<LayerDescription>} objects which have:
-     * - {String} owsType: WFS/WCS
-     * - {String} owsURL: the online resource
-     * - {String} typeName: the name of the typename on the service
-     */
-    read: function(data) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        var root = data.documentElement;
-        var version = this.version;
-        if(!version) {
-            version = root.getAttribute("version");
-            if(!version) {
-                version = this.defaultVersion;
-            }
-        }
-        // these are identical to us, but some WMS use 1.1.1 and some use 1.1.0
-        if (version == "1.1.1" || version == "1.1.0") {
-            version = "1.1";
-        }
-        var constructor = OpenLayers.Format.WMSDescribeLayer[
-            "v" + version.replace(/\./g, "_")
-        ];
-        if(!constructor) {
-            throw "Can't find a WMS DescribeLayer parser for version " + 
-                version;
-        }
-        var parser = new constructor(this.options);
-        var describelayer = parser.read(data);
-        describelayer.version = version;
-        return describelayer;
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.WMSDescribeLayer" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js
+++ /dev/null
@@ -1,101 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/WMSDescribeLayer.js
- */
-
-/**
- * Class: OpenLayers.Format.WMSDescribeLayer.v1_1
- * Read SLD WMS DescribeLayer response for WMS 1.1.X
- * WMS 1.1.X is tightly coupled to SLD 1.0.0
- *
- * Example DescribeLayer request: 
- * http://demo.opengeo.org/geoserver/wms?request=DescribeLayer&version=1.1.1&layers=topp:states
- *
- * Inherits from:
- *  - <OpenLayers.Format.WMSDescribeLayer>
- */
-OpenLayers.Format.WMSDescribeLayer.v1_1 = OpenLayers.Class(
-    OpenLayers.Format.WMSDescribeLayer, {
-    
-    /**
-     * Constructor: OpenLayers.Format.WMSDescribeLayer
-     * Create a new parser for WMS DescribeLayer responses.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.WMSDescribeLayer.prototype.initialize.apply(this, 
-            [options]);
-    },
-
-    /**
-     * APIMethod: read
-     * Read DescribeLayer data from a string, and return the response. 
-     * The OGC defines 2 formats which are allowed for output,
-     * so we need to parse these 2 types for version 1.1.X
-     * 
-     * Parameters: 
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Array} Array of {<LayerDescription>} objects which have:
-     * - {String} owsType: WFS/WCS
-     * - {String} owsURL: the online resource
-     * - {String} typeName: the name of the typename on the service
-     */
-    read: function(data) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        var root = data.documentElement;
-        var children = root.childNodes; 
-        var describelayer = [];
-        var childNode, nodeName;
-        for(var i=0; i<children.length; ++i) { 
-            childNode = children[i];
-            nodeName = childNode.nodeName; 
-            if (nodeName == 'LayerDescription') {
-                var layerName = childNode.getAttribute('name');
-                var owsType = '';
-                var owsURL = '';
-                var typeName = '';
-                // check for owsType and owsURL attributes
-                if (childNode.getAttribute('owsType')) {
-                  owsType = childNode.getAttribute('owsType');
-                  owsURL = childNode.getAttribute('owsURL');
-                } else {
-                    // look for wfs or wcs attribute
-                    if (childNode.getAttribute('wfs') != '') {
-                        owsType = 'WFS';
-                        owsURL = childNode.getAttribute('wfs');
-                    } else if (childNode.getAttribute('wcs') != '') {
-                        owsType = 'WCS';
-                        owsURL = childNode.getAttribute('wcs');
-                    }
-                }
-                // look for Query child
-                var query = childNode.getElementsByTagName('Query');
-                if(query.length > 0) {
-                    typeName = query[0].getAttribute('typeName');
-                    if (!typeName) {
-                        // because of Ionic bug
-                        typeName = query[0].getAttribute('typename');
-                    }
-                }
-                describelayer.push({layerName: layerName, owsType: owsType, 
-                    owsURL: owsURL, typeName: typeName}); 
-            }
-        }
-        return describelayer;
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.WMSDescribeLayer.v1_1" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WMSGetFeatureInfo.js
+++ /dev/null
@@ -1,285 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- */
-
-/**
- * Class: OpenLayers.Format.WMSGetFeatureInfo
- * Class to read GetFeatureInfo responses from Web Mapping Services
- *
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Format.XML, {
-
-    /**
-     * APIProperty: layerIdentifier
-     * {String} All xml nodes containing this search criteria will populate an
-     *     internal array of layer nodes.
-     */ 
-    layerIdentifier: '_layer',
-
-    /**
-     * APIProperty: featureIdentifier
-     * {String} All xml nodes containing this search criteria will populate an 
-     *     internal array of feature nodes for each layer node found.
-     */
-    featureIdentifier: '_feature',
-
-    /**
-     * Property: regExes
-     * Compiled regular expressions for manipulating strings.
-     */
-    regExes: {
-        trimSpace: (/^\s*|\s*$/g),
-        removeSpace: (/\s*/g),
-        splitSpace: (/\s+/),
-        trimComma: (/\s*,\s*/g)
-    },
-
-    /**
-     * Property: gmlFormat
-     * {<OpenLayers.Format.GML>} internal GML format for parsing geometries
-     *     in msGMLOutput
-     */
-    gmlFormat: null,
-
-    /**
-     * Constructor: OpenLayers.Format.WMSGetFeatureInfo
-     * Create a new parser for WMS GetFeatureInfo responses
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, arguments);
-        OpenLayers.Util.extend(this, options);
-        this.options = options;
-    },
-
-    /**
-     * APIMethod: read
-     * Read WMS GetFeatureInfo data from a string, and return an array of features
-     *
-     * Parameters:
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Feature.Vector>)} An array of features.
-     */
-    read: function(data) {
-        var result;
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        var root = data.documentElement;
-        if(root) {
-            var scope = this;
-            var read = this["read_" + root.nodeName];
-            if(read) {
-                result = read.call(this, root);
-            } else {
-                // fall-back to GML since this is a common output format for WMS
-                // GetFeatureInfo responses
-                result = new OpenLayers.Format.GML((this.options ? this.options : {})).read(data);
-            }
-        } else {
-            result = data;
-        }
-        return result;
-    },
-    
-    
-    /**
-     * Method: read_msGMLOutput
-     * Parse msGMLOutput nodes.
-     *
-     * Parameters:
-     * data - {DOMElement}
-     *
-     * Returns:
-     * {Array}
-     */
-    read_msGMLOutput: function(data) {
-        var response = [];
-        var layerNodes = this.getSiblingNodesByTagCriteria(data,
-            this.layerIdentifier);
-        if (layerNodes) {
-            for (var i=0, len=layerNodes.length; i<len; ++i) {
-                var node = layerNodes[i];
-                var layerName = node.nodeName;
-                if (node.prefix) {
-                    layerName = layerName.split(':')[1];
-                }
-                var layerName = layerName.replace(this.layerIdentifier, '');
-                var featureNodes = this.getSiblingNodesByTagCriteria(node, 
-                    this.featureIdentifier);
-                if (featureNodes) {
-                    for (var j = 0; j < featureNodes.length; j++) {
-                        var featureNode = featureNodes[j];
-                        var geomInfo = this.parseGeometry(featureNode);
-                        var attributes = this.parseAttributes(featureNode);
-                        var feature = new OpenLayers.Feature.Vector(geomInfo.geometry, 
-                            attributes, null);
-                        feature.bounds = geomInfo.bounds;
-                        feature.type = layerName;
-                        response.push(feature);
-                    }
-                }
-            }
-        }
-        return response;
-    },
-    
-    /**
-     * Method: read_FeatureInfoResponse
-     * Parse FeatureInfoResponse nodes.
-     *
-     * Parameters:
-     * data - {DOMElement}
-     *
-     * Returns:
-     * {Array}
-     */
-    read_FeatureInfoResponse: function(data) {
-        var response = [];
-        var featureNodes = this.getElementsByTagNameNS(data, '*',
-            'FIELDS');
-
-        for(var i=0, len=featureNodes.length;i<len;i++) {
-            var featureNode = featureNodes[i];
-            var geom = null;
-
-            var attributes = {};
-            for(var j=0, jlen=featureNode.attributes.length; j<jlen; j++) {
-                var attribute = featureNode.attributes[j];
-                attributes[attribute.nodeName] = attribute.nodeValue;
-            }
-
-            response.push(
-                new OpenLayers.Feature.Vector(geom, attributes, null)
-            );
-        }
-        return response;
-    },
-
-    /**
-     * Method: getSiblingNodesByTagCriteria
-     * Recursively searches passed xml node and all it's descendant levels for 
-     *     nodes whose tagName contains the passed search string. This returns an 
-     *     array of all sibling nodes which match the criteria from the highest 
-     *     hierarchial level from which a match is found.
-     * 
-     * Parameters:
-     * node - {DOMElement} An xml node
-     * criteria - {String} Search string which will match some part of a tagName 
-     *                                       
-     * Returns:
-     * Array({DOMElement)) An array of sibling xml nodes
-     */                
-    getSiblingNodesByTagCriteria: function(node, criteria){
-        var nodes = [];
-        var children, tagName, n, matchNodes, child;
-        if (node && node.hasChildNodes()) {
-            children = node.childNodes;
-            n = children.length;
-
-            for(var k=0; k<n; k++){
-                child = children[k];
-                while (child && child.nodeType != 1) {
-                    child = child.nextSibling;
-                    k++;
-                }
-                tagName = (child ? child.nodeName : '');
-                if (tagName.length > 0 && tagName.indexOf(criteria) > -1) {
-                    nodes.push(child);
-                } else {
-                    matchNodes = this.getSiblingNodesByTagCriteria(
-                        child, criteria);
-
-                    if(matchNodes.length > 0){
-                        (nodes.length == 0) ? 
-                            nodes = matchNodes : nodes.push(matchNodes);
-                    }
-                }
-            }
-
-        }
-        return nodes;
-    },
-
-    /**
-     * Method: parseAttributes
-     *
-     * Parameters:
-     * node - {<DOMElement>}
-     *
-     * Returns:
-     * {Object} An attributes object.
-     * 
-     * Notes:
-     * Assumes that attributes are direct child xml nodes of the passed node
-     * and contain only a single text node. 
-     */    
-    parseAttributes: function(node){
-        var attributes = {};
-        if (node.nodeType == 1) {
-            var children = node.childNodes;
-            var n = children.length;
-            for (var i = 0; i < n; ++i) {
-                var child = children[i];
-                if (child.nodeType == 1) {
-                    var grandchildren = child.childNodes;
-                    if (grandchildren.length == 1) {
-                        var grandchild = grandchildren[0];
-                        if (grandchild.nodeType == 3 ||
-                            grandchild.nodeType == 4) {
-                            var name = (child.prefix) ? 
-                                child.nodeName.split(":")[1] : child.nodeName;
-                            var value = grandchild.nodeValue.replace(
-                                this.regExes.trimSpace, "");
-                            attributes[name] = value;
-                        }
-                    }
-                }
-            }
-        }
-        return attributes;
-    },
-
-    /**
-     * Method: parseGeometry
-     * Parse the geometry and the feature bounds out of the node using 
-     *     Format.GML
-     *
-     * Parameters:
-     * node - {<DOMElement>}
-     *
-     * Returns:
-     * {Object} An object containing the geometry and the feature bounds
-    */
-    parseGeometry: function(node) {
-        // we need to use the old Format.GML parser since we do not know the 
-        // geometry name
-        if (!this.gmlFormat) {
-            this.gmlFormat = new OpenLayers.Format.GML();
-        }
-        var feature = this.gmlFormat.parseFeature(node);
-        var geometry, bounds = null;
-        if (feature) {
-            geometry = feature.geometry && feature.geometry.clone();
-            bounds = feature.bounds && feature.bounds.clone();
-            feature.destroy();
-        }
-        return {geometry: geometry, bounds: bounds};
-    },
-
-    CLASS_NAME: "OpenLayers.Format.WMSGetFeatureInfo"
-    
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WMTSCapabilities.js
+++ /dev/null
@@ -1,163 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/XML.js
- */
- 
-/**
- * Class: OpenLayers.Format.WMTSCapabilities
- * Read WMTS Capabilities.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.WMTSCapabilities = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * APIProperty: defaultVersion
-     * {String} Version number to assume if none found.  Default is "1.0.0".
-     */
-    defaultVersion: "1.0.0",
-    
-    /**
-     * APIProperty: version
-     * {String} Specify a version string if one is known.
-     */
-    version: null,
-
-    /**
-     * Property: parser
-     * {<OpenLayers.Format>} A cached versioned format used for reading.
-     */
-    parser: null,
-    
-    /**
-     * APIProperty: yx
-     * {Object} Members in the yx object are used to determine if a CRS URN
-     *     corresponds to a CRS with y,x axis order.  Member names are CRS URNs
-     *     and values are boolean.  By default, the following CRS URN are 
-     *     assumed to correspond to a CRS with y,x axis order:
-     *
-     * * urn:ogc:def:crs:EPSG::4326
-     */
-    yx: {
-        "urn:ogc:def:crs:EPSG::4326": true
-    },
-
-    /**
-     * Constructor: OpenLayers.Format.WMTSCapabilities
-     * Create a new parser for WMTS capabilities.
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-        this.options = options;
-    },
-
-    /**
-     * APIMethod: read
-     * Read capabilities data from a string, and return information about
-     * the service (offering and observedProperty mostly).
-     * 
-     * Parameters: 
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Object} Info about the WMTS Capabilities
-     */
-    read: function(data) {
-        if (typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        var root = data.documentElement;
-        var version = this.version || root.getAttribute("version") || this.defaultVersion;
-        if (!this.parser || this.parser.version !== version) {
-            var constr = OpenLayers.Format.WMTSCapabilities[
-                "v" + version.replace(/\./g, "_")
-            ];
-            if (!constr) {
-                throw new Error("Can't find a WMTS capabilities parser for version " + version);
-            }
-            this.parser = new constr(this.options);
-        }
-        return this.parser.read(data);
-    },
-
-    /**
-     * APIMethod: createLayer
-     * Create a WMTS layer given a capabilities object.
-     *
-     * Parameters:
-     * capabilities - {Object} The object returned from a <read> call to this 
-     *     format.
-     * config - {Object} Configuration properties for the layer.  Defaults for
-     *     the layer will apply if not provided.
-     *
-     * Required config properties:
-     * layer - {String} The layer identifier.
-     * matrixSet - {String} The matrix set identifier.
-     *
-     * Returns:
-     * {<OpenLayers.Layer.WMTS>} A properly configured WMTS layer.  Throws an
-     *     error if an incomplete config is provided.  Returns undefined if no
-     *     layer could be created with the provided config.
-     */ 
-    createLayer: function(capabilities, config) {
-        var layer;
-
-        // confirm required properties are supplied in config
-        var required = {
-            layer: true,
-            matrixSet: true
-        };
-        for (var prop in required) {
-            if (!(prop in config)) {
-                throw new Error("Missing property '" + prop + "' in layer configuration.");
-            }
-        }
-
-        var contents = capabilities.contents;
-        var matrixSet = contents.tileMatrixSets[config.matrixSet];
-
-        // find the layer definition with the given identifier
-        var layers = contents.layers;
-        var layerDef;
-        for (var i=0, ii=contents.layers.length; i<ii; ++i) {
-            if (contents.layers[i].identifier === config.layer) {
-                layerDef = contents.layers[i];
-                break;
-            }
-        }
-        
-        if (layerDef && matrixSet) {
-            // get the default style for the layer
-            var style;
-            for (var i=0, ii=layerDef.styles.length; i<ii; ++i) {
-                style = layerDef.styles[i];
-                if (style.isDefault) {
-                    break;
-                }
-            }
-            
-            layer = new OpenLayers.Layer.WMTS(
-                OpenLayers.Util.applyDefaults(config, {
-                    url: capabilities.operationsMetadata.GetTile.dcp.http.get,
-                    name: layerDef.title,
-                    style: style,
-                    matrixIds: matrixSet.matrixIds
-                })
-            );
-        }
-        return layer;
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.WMTSCapabilities" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js
+++ /dev/null
@@ -1,222 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format/WMTSCapabilities.js
- * @requires OpenLayers/Format/OWSCommon/v1_1_0.js
- */
-
-/**
- * Class: OpenLayers.Format.WMTSCapabilities.v1_0_0
- * Read WMTS Capabilities version 1.0.0.
- * 
- * Inherits from:
- *  - <OpenLayers.Format.WMTSCapabilities>
- */
-OpenLayers.Format.WMTSCapabilities.v1_0_0 = OpenLayers.Class(
-    OpenLayers.Format.OWSCommon.v1_1_0, {
-        
-    /**
-     * Property: version
-     * {String} The parser version ("1.0.0").
-     */
-    version: "1.0.0",
-
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        ows: "http://www.opengis.net/ows/1.1",
-        wmts: "http://www.opengis.net/wmts/1.0",
-        xlink: "http://www.w3.org/1999/xlink"
-    },    
-    
-    /**
-     * Property: yx
-     * {Object} Members in the yx object are used to determine if a CRS URN
-     *     corresponds to a CRS with y,x axis order.  Member names are CRS URNs
-     *     and values are boolean.  Defaults come from the 
-     *     <OpenLayers.Format.WMTSCapabilities> prototype.
-     */
-    yx: null,
-
-    /**
-     * Property: defaultPrefix
-     * {String} The default namespace alias for creating element nodes.
-     */
-    defaultPrefix: "wmts",
-
-    /**
-     * Constructor: OpenLayers.Format.WMTSCapabilities.v1_0_0
-     * Create a new parser for WMTS capabilities version 1.0.0. 
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-        this.options = options;
-        var yx = OpenLayers.Util.extend(
-            {}, OpenLayers.Format.WMTSCapabilities.prototype.yx
-        );
-        this.yx = OpenLayers.Util.extend(yx, this.yx);
-    },
-
-    /**
-     * APIMethod: read
-     * Read capabilities data from a string, and return info about the WMTS.
-     * 
-     * Parameters: 
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Object} Information about the SOS service.
-     */
-    read: function(data) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        if(data && data.nodeType == 9) {
-            data = data.documentElement;
-        }
-        var capabilities = {};
-        this.readNode(data, capabilities);
-        capabilities.version = this.version;
-        return capabilities;
-    },
-
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {        
-        "wmts": {
-            "Capabilities": function(node, obj) {
-                this.readChildNodes(node, obj);
-            },
-            "Contents": function(node, obj) {
-                obj.contents = {};                
-                obj.contents.layers = [];
-                obj.contents.tileMatrixSets = {};                
-                this.readChildNodes(node, obj.contents);
-            },
-            "Layer": function(node, obj) {
-                var layer = {
-                    styles: [],
-                    formats: [],
-                    tileMatrixSetLinks: []
-                };
-                layer.layers = [];
-                this.readChildNodes(node, layer);
-                obj.layers.push(layer);
-            },
-            "Style": function(node, obj) {
-                var style = {};
-                style.isDefault = (node.getAttribute("isDefault") === "true");
-                this.readChildNodes(node, style);
-                obj.styles.push(style);
-            },
-            "Format": function(node, obj) {
-                obj.formats.push(this.getChildValue(node)); 
-            },
-            "TileMatrixSetLink": function(node, obj) {
-                var tileMatrixSetLink = {};
-                this.readChildNodes(node, tileMatrixSetLink);
-                obj.tileMatrixSetLinks.push(tileMatrixSetLink);
-            },
-            "TileMatrixSet": function(node, obj) {
-                // node could be child of wmts:Contents or wmts:TileMatrixSetLink
-                // duck type wmts:Contents by looking for layers
-                if (obj.layers) {
-                    // TileMatrixSet as object type in schema
-                    var tileMatrixSet = {
-                        matrixIds: []
-                    };
-                    this.readChildNodes(node, tileMatrixSet);
-                    obj.tileMatrixSets[tileMatrixSet.identifier] = tileMatrixSet;
-                } else {
-                    // TileMatrixSet as string type in schema
-                    obj.tileMatrixSet = this.getChildValue(node);
-                }
-            },
-            "TileMatrix": function(node, obj) {
-                var tileMatrix = {
-                    supportedCRS: obj.supportedCRS
-                };
-                this.readChildNodes(node, tileMatrix);
-                obj.matrixIds.push(tileMatrix);
-            },
-            "ScaleDenominator": function(node, obj) {
-                obj.scaleDenominator = parseFloat(this.getChildValue(node)); 
-            },
-            "TopLeftCorner": function(node, obj) {                
-                var topLeftCorner = this.getChildValue(node);
-                var coords = topLeftCorner.split(" ");
-                // decide on axis order for the given CRS
-                var yx;
-                if (obj.supportedCRS) {
-                    // extract out version from URN
-                    var crs = obj.supportedCRS.replace(
-                        /urn:ogc:def:crs:(\w+):.+:(\w+)$/, 
-                        "urn:ogc:def:crs:$1::$2"
-                    );
-                    yx = !!this.yx[crs];
-                }
-                if (yx) {
-                    obj.topLeftCorner = new OpenLayers.LonLat(
-                        coords[1], coords[0]
-                    );
-                } else {
-                    obj.topLeftCorner = new OpenLayers.LonLat(
-                        coords[0], coords[1]
-                    );
-                }
-            },
-            "TileWidth": function(node, obj) {
-                obj.tileWidth = parseInt(this.getChildValue(node)); 
-            },
-            "TileHeight": function(node, obj) {
-                obj.tileHeight = parseInt(this.getChildValue(node)); 
-            },
-            "MatrixWidth": function(node, obj) {
-                obj.matrixWidth = parseInt(this.getChildValue(node)); 
-            },
-            "MatrixHeight": function(node, obj) {
-                obj.matrixHeight = parseInt(this.getChildValue(node)); 
-            },        
-            // not used for now, can be added in the future though
-            /*"Themes": function(node, obj) {
-                obj.themes = [];
-                this.readChildNodes(node, obj.themes);
-            },
-            "Theme": function(node, obj) {
-                var theme = {};                
-                this.readChildNodes(node, theme);
-                obj.push(theme);
-            },*/
-            "WSDL": function(node, obj) {
-                obj.wsdl = {};
-                obj.wsdl.href = node.getAttribute("xlink:href");
-                // TODO: other attributes of <WSDL> element                
-            },
-            "ServiceMetadataURL": function(node, obj) {
-                obj.serviceMetadataUrl = {};
-                obj.serviceMetadataUrl.href = node.getAttribute("xlink:href");
-                // TODO: other attributes of <ServiceMetadataURL> element                
-            }            
-        },
-        "ows": OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"]
-    },    
-    
-    CLASS_NAME: "OpenLayers.Format.WMTSCapabilities.v1_0_0" 
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Format/XML.js
+++ /dev/null
@@ -1,882 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Format.js
- */
-
-/**
- * Class: OpenLayers.Format.XML
- * Read and write XML.  For cross-browser XML generation, use methods on an
- *     instance of the XML format class instead of on <code>document<end>.
- *     The DOM creation and traversing methods exposed here all mimic the
- *     W3C XML DOM methods.  Create a new parser with the
- *     <OpenLayers.Format.XML> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Format>
- */
-OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, {
-    
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.  Properties
-     *     of this object should not be set individually.  Read-only.  All
-     *     XML subclasses should have their own namespaces object.  Use
-     *     <setNamespace> to add or set a namespace alias after construction.
-     */
-    namespaces: null,
-    
-    /**
-     * Property: namespaceAlias
-     * {Object} Mapping of namespace URI to namespace alias.  This object
-     *     is read-only.  Use <setNamespace> to add or set a namespace alias.
-     */
-    namespaceAlias: null,
-    
-    /**
-     * Property: defaultPrefix
-     * {String} The default namespace alias for creating element nodes.
-     */
-    defaultPrefix: null,
-    
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {},
-    
-    /**
-     * Property: writers
-     * As a compliment to the <readers> property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {},
-
-    /**
-     * Property: xmldom
-     * {XMLDom} If this browser uses ActiveX, this will be set to a XMLDOM
-     *     object.  It is not intended to be a browser sniffing property.
-     *     Instead, the xmldom property is used instead of <code>document<end>
-     *     where namespaced node creation methods are not supported. In all
-     *     other browsers, this remains null.
-     */
-    xmldom: null,
-
-    /**
-     * Constructor: OpenLayers.Format.XML
-     * Construct an XML parser.  The parser is used to read and write XML.
-     *     Reading XML from a string returns a DOM element.  Writing XML from
-     *     a DOM element returns a string.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on
-     *     the object.
-     */
-    initialize: function(options) {
-        if(window.ActiveXObject) {
-            this.xmldom = new ActiveXObject("Microsoft.XMLDOM");
-        }
-        OpenLayers.Format.prototype.initialize.apply(this, [options]);
-        // clone the namespace object and set all namespace aliases
-        this.namespaces = OpenLayers.Util.extend({}, this.namespaces);
-        this.namespaceAlias = {};
-        for(var alias in this.namespaces) {
-            this.namespaceAlias[this.namespaces[alias]] = alias;
-        }
-    },
-    
-    /**
-     * APIMethod: destroy
-     * Clean up.
-     */
-    destroy: function() {
-        this.xmldom = null;
-        OpenLayers.Format.prototype.destroy.apply(this, arguments);
-    },
-    
-    /**
-     * Method: setNamespace
-     * Set a namespace alias and URI for the format.
-     *
-     * Parameters:
-     * alias - {String} The namespace alias (prefix).
-     * uri - {String} The namespace URI.
-     */
-    setNamespace: function(alias, uri) {
-        this.namespaces[alias] = uri;
-        this.namespaceAlias[uri] = alias;
-    },
-
-    /**
-     * APIMethod: read
-     * Deserialize a XML string and return a DOM node.
-     *
-     * Parameters:
-     * text - {String} A XML string
-     
-     * Returns:
-     * {DOMElement} A DOM node
-     */
-    read: function(text) {
-        var index = text.indexOf('<');
-        if(index > 0) {
-            text = text.substring(index);
-        }
-        var node = OpenLayers.Util.Try(
-            OpenLayers.Function.bind((
-                function() {
-                    var xmldom;
-                    /**
-                     * Since we want to be able to call this method on the prototype
-                     * itself, this.xmldom may not exist even if in IE.
-                     */
-                    if(window.ActiveXObject && !this.xmldom) {
-                        xmldom = new ActiveXObject("Microsoft.XMLDOM");
-                    } else {
-                        xmldom = this.xmldom;
-                        
-                    }
-                    xmldom.loadXML(text);
-                    return xmldom;
-                }
-            ), this),
-            function() {
-                return new DOMParser().parseFromString(text, 'text/xml');
-            },
-            function() {
-                var req = new XMLHttpRequest();
-                req.open("GET", "data:" + "text/xml" +
-                         ";charset=utf-8," + encodeURIComponent(text), false);
-                if(req.overrideMimeType) {
-                    req.overrideMimeType("text/xml");
-                }
-                req.send(null);
-                return req.responseXML;
-            }
-        );
-
-        if(this.keepData) {
-            this.data = node;
-        }
-
-        return node;
-    },
-
-    /**
-     * APIMethod: write
-     * Serialize a DOM node into a XML string.
-     * 
-     * Parameters:
-     * node - {DOMElement} A DOM node.
-     *
-     * Returns:
-     * {String} The XML string representation of the input node.
-     */
-    write: function(node) {
-        var data;
-        if(this.xmldom) {
-            data = node.xml;
-        } else {
-            var serializer = new XMLSerializer();
-            if (node.nodeType == 1) {
-                // Add nodes to a document before serializing. Everything else
-                // is serialized as is. This may need more work. See #1218 .
-                var doc = document.implementation.createDocument("", "", null);
-                if (doc.importNode) {
-                    node = doc.importNode(node, true);
-                }
-                doc.appendChild(node);
-                data = serializer.serializeToString(doc);
-            } else {
-                data = serializer.serializeToString(node);
-            }
-        }
-        return data;
-    },
-
-    /**
-     * APIMethod: createElementNS
-     * Create a new element with namespace.  This node can be appended to
-     *     another node with the standard node.appendChild method.  For
-     *     cross-browser support, this method must be used instead of
-     *     document.createElementNS.
-     *
-     * Parameters:
-     * uri - {String} Namespace URI for the element.
-     * name - {String} The qualified name of the element (prefix:localname).
-     * 
-     * Returns:
-     * {Element} A DOM element with namespace.
-     */
-    createElementNS: function(uri, name) {
-        var element;
-        if(this.xmldom) {
-            if(typeof uri == "string") {
-                element = this.xmldom.createNode(1, name, uri);
-            } else {
-                element = this.xmldom.createNode(1, name, "");
-            }
-        } else {
-            element = document.createElementNS(uri, name);
-        }
-        return element;
-    },
-
-    /**
-     * APIMethod: createTextNode
-     * Create a text node.  This node can be appended to another node with
-     *     the standard node.appendChild method.  For cross-browser support,
-     *     this method must be used instead of document.createTextNode.
-     * 
-     * Parameters:
-     * text - {String} The text of the node.
-     * 
-     * Returns: 
-     * {DOMElement} A DOM text node.
-     */
-    createTextNode: function(text) {
-        var node;
-        if (typeof text !== "string") {
-            text = String(text);
-        }
-        if(this.xmldom) {
-            node = this.xmldom.createTextNode(text);
-        } else {
-            node = document.createTextNode(text);
-        }
-        return node;
-    },
-
-    /**
-     * APIMethod: getElementsByTagNameNS
-     * Get a list of elements on a node given the namespace URI and local name.
-     *     To return all nodes in a given namespace, use '*' for the name
-     *     argument.  To return all nodes of a given (local) name, regardless
-     *     of namespace, use '*' for the uri argument.
-     * 
-     * Parameters:
-     * node - {Element} Node on which to search for other nodes.
-     * uri - {String} Namespace URI.
-     * name - {String} Local name of the tag (without the prefix).
-     * 
-     * Returns:
-     * {NodeList} A node list or array of elements.
-     */
-    getElementsByTagNameNS: function(node, uri, name) {
-        var elements = [];
-        if(node.getElementsByTagNameNS) {
-            elements = node.getElementsByTagNameNS(uri, name);
-        } else {
-            // brute force method
-            var allNodes = node.getElementsByTagName("*");
-            var potentialNode, fullName;
-            for(var i=0, len=allNodes.length; i<len; ++i) {
-                potentialNode = allNodes[i];
-                fullName = (potentialNode.prefix) ?
-                           (potentialNode.prefix + ":" + name) : name;
-                if((name == "*") || (fullName == potentialNode.nodeName)) {
-                    if((uri == "*") || (uri == potentialNode.namespaceURI)) {
-                        elements.push(potentialNode);
-                    }
-                }
-            }
-        }
-        return elements;
-    },
-
-    /**
-     * APIMethod: getAttributeNodeNS
-     * Get an attribute node given the namespace URI and local name.
-     * 
-     * Parameters:
-     * node - {Element} Node on which to search for attribute nodes.
-     * uri - {String} Namespace URI.
-     * name - {String} Local name of the attribute (without the prefix).
-     * 
-     * Returns:
-     * {DOMElement} An attribute node or null if none found.
-     */
-    getAttributeNodeNS: function(node, uri, name) {
-        var attributeNode = null;
-        if(node.getAttributeNodeNS) {
-            attributeNode = node.getAttributeNodeNS(uri, name);
-        } else {
-            var attributes = node.attributes;
-            var potentialNode, fullName;
-            for(var i=0, len=attributes.length; i<len; ++i) {
-                potentialNode = attributes[i];
-                if(potentialNode.namespaceURI == uri) {
-                    fullName = (potentialNode.prefix) ?
-                               (potentialNode.prefix + ":" + name) : name;
-                    if(fullName == potentialNode.nodeName) {
-                        attributeNode = potentialNode;
-                        break;
-                    }
-                }
-            }
-        }
-        return attributeNode;
-    },
-
-    /**
-     * APIMethod: getAttributeNS
-     * Get an attribute value given the namespace URI and local name.
-     * 
-     * Parameters:
-     * node - {Element} Node on which to search for an attribute.
-     * uri - {String} Namespace URI.
-     * name - {String} Local name of the attribute (without the prefix).
-     * 
-     * Returns:
-     * {String} An attribute value or and empty string if none found.
-     */
-    getAttributeNS: function(node, uri, name) {
-        var attributeValue = "";
-        if(node.getAttributeNS) {
-            attributeValue = node.getAttributeNS(uri, name) || "";
-        } else {
-            var attributeNode = this.getAttributeNodeNS(node, uri, name);
-            if(attributeNode) {
-                attributeValue = attributeNode.nodeValue;
-            }
-        }
-        return attributeValue;
-    },
-    
-    /**
-     * APIMethod: getChildValue
-     * Get the textual value of the node if it exists, or return an
-     *     optional default string.  Returns an empty string if no first child
-     *     exists and no default value is supplied.
-     *
-     * Parameters:
-     * node - {DOMElement} The element used to look for a first child value.
-     * def - {String} Optional string to return in the event that no
-     *     first child value exists.
-     *
-     * Returns:
-     * {String} The value of the first child of the given node.
-     */
-    getChildValue: function(node, def) {
-        var value = def || "";
-        if(node) {
-            for(var child=node.firstChild; child; child=child.nextSibling) {
-                switch(child.nodeType) {
-                    case 3: // text node
-                    case 4: // cdata section
-                        value += child.nodeValue;
-                }
-            }
-        }
-        return value;
-    },
-
-    /**
-     * APIMethod: concatChildValues
-     * *Deprecated*. Use <getChildValue> instead.
-     *
-     * Concatenate the value of all child nodes if any exist, or return an
-     *     optional default string.  Returns an empty string if no children
-     *     exist and no default value is supplied.  Not optimized for large
-     *     numbers of child nodes.
-     *
-     * Parameters:
-     * node - {DOMElement} The element used to look for child values.
-     * def - {String} Optional string to return in the event that no
-     *     child exist.
-     *
-     * Returns:
-     * {String} The concatenated value of all child nodes of the given node.
-     */
-    concatChildValues: function(node, def) {
-        var value = "";
-        var child = node.firstChild;
-        var childValue;
-        while(child) {
-            childValue = child.nodeValue;
-            if(childValue) {
-                value += childValue;
-            }
-            child = child.nextSibling;
-        }
-        if(value == "" && def != undefined) {
-            value = def;
-        }
-        return value;
-    },
-    
-    /**
-     * APIMethod: isSimpleContent
-     * Test if the given node has only simple content (i.e. no child element
-     *     nodes).
-     *
-     * Parameters:
-     * node - {DOMElement} An element node.
-     *
-     * Returns:
-     * {Boolean} The node has no child element nodes (nodes of type 1). 
-     */
-    isSimpleContent: function(node) {
-        var simple = true;
-        for(var child=node.firstChild; child; child=child.nextSibling) {
-            if(child.nodeType === 1) {
-                simple = false;
-                break;
-            }
-        }
-        return simple;
-    },
-    
-    /**
-     * APIMethod: contentType
-     * Determine the content type for a given node.
-     *
-     * Parameters:
-     * node - {DOMElement}
-     *
-     * Returns:
-     * {Integer} One of OpenLayers.Format.XML.CONTENT_TYPE.{EMPTY,SIMPLE,COMPLEX,MIXED}
-     *     if the node has no, simple, complex, or mixed content.
-     */
-    contentType: function(node) {
-        var simple = false,
-            complex = false;
-            
-        var type = OpenLayers.Format.XML.CONTENT_TYPE.EMPTY;
-
-        for(var child=node.firstChild; child; child=child.nextSibling) {
-            switch(child.nodeType) {
-                case 1: // element
-                    complex = true;
-                    break;
-                case 8: // comment
-                    break;
-                default:
-                    simple = true;
-            }
-            if(complex && simple) {
-                break;
-            }
-        }
-        
-        if(complex && simple) {
-            type = OpenLayers.Format.XML.CONTENT_TYPE.MIXED;
-        } else if(complex) {
-            return OpenLayers.Format.XML.CONTENT_TYPE.COMPLEX;
-        } else if(simple) {
-            return OpenLayers.Format.XML.CONTENT_TYPE.SIMPLE;
-        }
-        return type;
-    },
-
-    /**
-     * APIMethod: hasAttributeNS
-     * Determine whether a node has a particular attribute matching the given
-     *     name and namespace.
-     * 
-     * Parameters:
-     * node - {Element} Node on which to search for an attribute.
-     * uri - {String} Namespace URI.
-     * name - {String} Local name of the attribute (without the prefix).
-     * 
-     * Returns:
-     * {Boolean} The node has an attribute matching the name and namespace.
-     */
-    hasAttributeNS: function(node, uri, name) {
-        var found = false;
-        if(node.hasAttributeNS) {
-            found = node.hasAttributeNS(uri, name);
-        } else {
-            found = !!this.getAttributeNodeNS(node, uri, name);
-        }
-        return found;
-    },
-    
-    /**
-     * APIMethod: setAttributeNS
-     * Adds a new attribute or changes the value of an attribute with the given
-     *     namespace and name.
-     *
-     * Parameters:
-     * node - {Element} Element node on which to set the attribute.
-     * uri - {String} Namespace URI for the attribute.
-     * name - {String} Qualified name (prefix:localname) for the attribute.
-     * value - {String} Attribute value.
-     */
-    setAttributeNS: function(node, uri, name, value) {
-        if(node.setAttributeNS) {
-            node.setAttributeNS(uri, name, value);
-        } else {
-            if(this.xmldom) {
-                if(uri) {
-                    var attribute = node.ownerDocument.createNode(
-                        2, name, uri
-                    );
-                    attribute.nodeValue = value;
-                    node.setAttributeNode(attribute);
-                } else {
-                    node.setAttribute(name, value);
-                }
-            } else {
-                throw "setAttributeNS not implemented";
-            }
-        }
-    },
-
-    /**
-     * Method: createElementNSPlus
-     * Shorthand for creating namespaced elements with optional attributes and
-     *     child text nodes.
-     *
-     * Parameters:
-     * name - {String} The qualified node name.
-     * options - {Object} Optional object for node configuration.
-     *
-     * Valid options:
-     * uri - {String} Optional namespace uri for the element - supply a prefix
-     *     instead if the namespace uri is a property of the format's namespace
-     *     object.
-     * attributes - {Object} Optional attributes to be set using the
-     *     <setAttributes> method.
-     * value - {String} Optional text to be appended as a text node.
-     *
-     * Returns:
-     * {Element} An element node.
-     */
-    createElementNSPlus: function(name, options) {
-        options = options || {};
-        // order of prefix preference
-        // 1. in the uri option
-        // 2. in the prefix option
-        // 3. in the qualified name
-        // 4. from the defaultPrefix
-        var uri = options.uri || this.namespaces[options.prefix];
-        if(!uri) {
-            var loc = name.indexOf(":");
-            uri = this.namespaces[name.substring(0, loc)];
-        }
-        if(!uri) {
-            uri = this.namespaces[this.defaultPrefix];
-        }
-        var node = this.createElementNS(uri, name);
-        if(options.attributes) {
-            this.setAttributes(node, options.attributes);
-        }
-        var value = options.value;
-        if(value != null) {
-            node.appendChild(this.createTextNode(value));
-        }
-        return node;
-    },
-    
-    /**
-     * Method: setAttributes
-     * Set multiple attributes given key value pairs from an object.
-     *
-     * Parameters:
-     * node - {Element} An element node.
-     * obj - {Object || Array} An object whose properties represent attribute
-     *     names and values represent attribute values.  If an attribute name
-     *     is a qualified name ("prefix:local"), the prefix will be looked up
-     *     in the parsers {namespaces} object.  If the prefix is found,
-     *     setAttributeNS will be used instead of setAttribute.
-     */
-    setAttributes: function(node, obj) {
-        var value, uri;
-        for(var name in obj) {
-            if(obj[name] != null && obj[name].toString) {
-                value = obj[name].toString();
-                // check for qualified attribute name ("prefix:local")
-                uri = this.namespaces[name.substring(0, name.indexOf(":"))] || null;
-                this.setAttributeNS(node, uri, name, value);
-            }
-        }
-    },
-
-    /**
-     * Method: readNode
-     * Shorthand for applying one of the named readers given the node
-     *     namespace and local name.  Readers take two args (node, obj) and
-     *     generally extend or modify the second.
-     *
-     * Parameters:
-     * node - {DOMElement} The node to be read (required).
-     * obj - {Object} The object to be modified (optional).
-     *
-     * Returns:
-     * {Object} The input object, modified (or a new one if none was provided).
-     */
-    readNode: function(node, obj) {
-        if(!obj) {
-            obj = {};
-        }
-        var group = this.readers[node.namespaceURI ? this.namespaceAlias[node.namespaceURI]: this.defaultPrefix];
-        if(group) {
-            var local = node.localName || node.nodeName.split(":").pop();
-            var reader = group[local] || group["*"];
-            if(reader) {
-                reader.apply(this, [node, obj]);
-            }
-        }
-        return obj;
-    },
-
-    /**
-     * Method: readChildNodes
-     * Shorthand for applying the named readers to all children of a node.
-     *     For each child of type 1 (element), <readSelf> is called.
-     *
-     * Parameters:
-     * node - {DOMElement} The node to be read (required).
-     * obj - {Object} The object to be modified (optional).
-     *
-     * Returns:
-     * {Object} The input object, modified.
-     */
-    readChildNodes: function(node, obj) {
-        if(!obj) {
-            obj = {};
-        }
-        var children = node.childNodes;
-        var child;
-        for(var i=0, len=children.length; i<len; ++i) {
-            child = children[i];
-            if(child.nodeType == 1) {
-                this.readNode(child, obj);
-            }
-        }
-        return obj;
-    },
-
-    /**
-     * Method: writeNode
-     * Shorthand for applying one of the named writers and appending the
-     *     results to a node.  If a qualified name is not provided for the
-     *     second argument (and a local name is used instead), the namespace
-     *     of the parent node will be assumed.
-     *
-     * Parameters:
-     * name - {String} The name of a node to generate.  If a qualified name
-     *     (e.g. "pre:Name") is used, the namespace prefix is assumed to be
-     *     in the <writers> group.  If a local name is used (e.g. "Name") then
-     *     the namespace of the parent is assumed.  If a local name is used
-     *     and no parent is supplied, then the default namespace is assumed.
-     * obj - {Object} Structure containing data for the writer.
-     * parent - {DOMElement} Result will be appended to this node.  If no parent
-     *     is supplied, the node will not be appended to anything.
-     *
-     * Returns:
-     * {DOMElement} The child node.
-     */
-    writeNode: function(name, obj, parent) {
-        var prefix, local;
-        var split = name.indexOf(":");
-        if(split > 0) {
-            prefix = name.substring(0, split);
-            local = name.substring(split + 1);
-        } else {
-            if(parent) {
-                prefix = this.namespaceAlias[parent.namespaceURI];
-            } else {
-                prefix = this.defaultPrefix;
-            }
-            local = name;
-        }
-        var child = this.writers[prefix][local].apply(this, [obj]);
-        if(parent) {
-            parent.appendChild(child);
-        }
-        return child;
-    },
-
-    /**
-     * APIMethod: getChildEl
-     * Get the first child element.  Optionally only return the first child
-     *     if it matches the given name and namespace URI.
-     *
-     * Parameters:
-     * node - {DOMElement} The parent node.
-     * name - {String} Optional node name (local) to search for.
-     * uri - {String} Optional namespace URI to search for.
-     *
-     * Returns:
-     * {DOMElement} The first child.  Returns null if no element is found, if
-     *     something significant besides an element is found, or if the element
-     *     found does not match the optional name and uri.
-     */
-    getChildEl: function(node, name, uri) {
-        return node && this.getThisOrNextEl(node.firstChild, name, uri);
-    },
-    
-    /**
-     * APIMethod: getNextEl
-     * Get the next sibling element.  Optionally get the first sibling only
-     *     if it matches the given local name and namespace URI.
-     *
-     * Parameters:
-     * node - {DOMElement} The node.
-     * name - {String} Optional local name of the sibling to search for.
-     * uri - {String} Optional namespace URI of the sibling to search for.
-     *
-     * Returns:
-     * {DOMElement} The next sibling element.  Returns null if no element is
-     *     found, something significant besides an element is found, or the
-     *     found element does not match the optional name and uri.
-     */
-    getNextEl: function(node, name, uri) {
-        return node && this.getThisOrNextEl(node.nextSibling, name, uri);
-    },
-    
-    /**
-     * Method: getThisOrNextEl
-     * Return this node or the next element node.  Optionally get the first
-     *     sibling with the given local name or namespace URI.
-     *
-     * Parameters:
-     * node - {DOMElement} The node.
-     * name - {String} Optional local name of the sibling to search for.
-     * uri - {String} Optional namespace URI of the sibling to search for.
-     *
-     * Returns:
-     * {DOMElement} The next sibling element.  Returns null if no element is
-     *     found, something significant besides an element is found, or the
-     *     found element does not match the query.
-     */
-    getThisOrNextEl: function(node, name, uri) {
-        outer: for(var sibling=node; sibling; sibling=sibling.nextSibling) {
-            switch(sibling.nodeType) {
-                case 1: // Element
-                    if((!name || name === (sibling.localName || sibling.nodeName.split(":").pop())) &&
-                       (!uri || uri === sibling.namespaceURI)) {
-                        // matches
-                        break outer;
-                    }
-                    sibling = null;
-                    break outer;
-                case 3: // Text
-                    if(/^\s*$/.test(sibling.nodeValue)) {
-                        break;
-                    }
-                case 4: // CDATA
-                case 6: // ENTITY_NODE
-                case 12: // NOTATION_NODE
-                case 10: // DOCUMENT_TYPE_NODE
-                case 11: // DOCUMENT_FRAGMENT_NODE
-                    sibling = null;
-                    break outer;
-            } // ignore comments and processing instructions
-        }
-        return sibling || null;
-    },
-    
-    /**
-     * APIMethod: lookupNamespaceURI
-     * Takes a prefix and returns the namespace URI associated with it on the given
-     *     node if found (and null if not). Supplying null for the prefix will
-     *     return the default namespace.
-     *
-     * For browsers that support it, this calls the native lookupNamesapceURI
-     *     function.  In other browsers, this is an implementation of
-     *     http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespaceURI.
-     *
-     * For browsers that don't support the attribute.ownerElement property, this
-     *     method cannot be called on attribute nodes.
-     *     
-     * Parameters:
-     * node - {DOMElement} The node from which to start looking.
-     * prefix - {String} The prefix to lookup or null to lookup the default namespace.
-     * 
-     * Returns:
-     * {String} The namespace URI for the given prefix.  Returns null if the prefix
-     *     cannot be found or the node is the wrong type.
-     */
-    lookupNamespaceURI: function(node, prefix) {
-        var uri = null;
-        if(node) {
-            if(node.lookupNamespaceURI) {
-                uri = node.lookupNamespaceURI(prefix);
-            } else {
-                outer: switch(node.nodeType) {
-                    case 1: // ELEMENT_NODE
-                        if(node.namespaceURI !== null && node.prefix === prefix) {
-                            uri = node.namespaceURI;
-                            break outer;
-                        }
-                        var len = node.attributes.length;
-                        if(len) {
-                            var attr;
-                            for(var i=0; i<len; ++i) {
-                                attr = node.attributes[i];
-                                if(attr.prefix === "xmlns" && attr.name === "xmlns:" + prefix) {
-                                    uri = attr.value || null;
-                                    break outer;
-                                } else if(attr.name === "xmlns" && prefix === null) {
-                                    uri = attr.value || null;
-                                    break outer;
-                                }
-                            }
-                        }
-                        uri = this.lookupNamespaceURI(node.parentNode, prefix);
-                        break outer;
-                    case 2: // ATTRIBUTE_NODE
-                        uri = this.lookupNamespaceURI(node.ownerElement, prefix);
-                        break outer;
-                    case 9: // DOCUMENT_NODE
-                        uri = this.lookupNamespaceURI(node.documentElement, prefix);
-                        break outer;
-                    case 6: // ENTITY_NODE
-                    case 12: // NOTATION_NODE
-                    case 10: // DOCUMENT_TYPE_NODE
-                    case 11: // DOCUMENT_FRAGMENT_NODE
-                        break outer;
-                    default: 
-                        // TEXT_NODE (3), CDATA_SECTION_NODE (4), ENTITY_REFERENCE_NODE (5),
-                        // PROCESSING_INSTRUCTION_NODE (7), COMMENT_NODE (8)
-                        uri =  this.lookupNamespaceURI(node.parentNode, prefix);
-                        break outer;
-                }
-            }
-        }
-        return uri;
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.XML" 
-
-});     
-
-OpenLayers.Format.XML.CONTENT_TYPE = {EMPTY: 0, SIMPLE: 1, COMPLEX: 2, MIXED: 3};
-
-/**
- * APIFunction: OpenLayers.Format.XML.lookupNamespaceURI
- * Takes a prefix and returns the namespace URI associated with it on the given
- *     node if found (and null if not). Supplying null for the prefix will
- *     return the default namespace.
- *
- * For browsers that support it, this calls the native lookupNamesapceURI
- *     function.  In other browsers, this is an implementation of
- *     http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespaceURI.
- *
- * For browsers that don't support the attribute.ownerElement property, this
- *     method cannot be called on attribute nodes.
- *     
- * Parameters:
- * node - {DOMElement} The node from which to start looking.
- * prefix - {String} The prefix to lookup or null to lookup the default namespace.
- * 
- * Returns:
- * {String} The namespace URI for the given prefix.  Returns null if the prefix
- *     cannot be found or the node is the wrong type.
- */
-OpenLayers.Format.XML.lookupNamespaceURI = OpenLayers.Function.bind(
-    OpenLayers.Format.XML.prototype.lookupNamespaceURI,
-    OpenLayers.Format.XML.prototype
-);
-

--- a/labs/openlayers/lib/OpenLayers/Geometry.js
+++ /dev/null
@@ -1,457 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
- 
-/**
- * @requires OpenLayers/Format/WKT.js
- * @requires OpenLayers/Feature/Vector.js
- */
 
-/**
- * Class: OpenLayers.Geometry
- * A Geometry is a description of a geographic object.  Create an instance of
- * this class with the <OpenLayers.Geometry> constructor.  This is a base class,
- * typical geometry types are described by subclasses of this class.
- */
-OpenLayers.Geometry = OpenLayers.Class({
-
-    /**
-     * Property: id
-     * {String} A unique identifier for this geometry.
-     */
-    id: null,
-
-    /**
-     * Property: parent
-     * {<OpenLayers.Geometry>}This is set when a Geometry is added as component
-     * of another geometry
-     */
-    parent: null,
-
-    /**
-     * Property: bounds 
-     * {<OpenLayers.Bounds>} The bounds of this geometry
-     */
-    bounds: null,
-
-    /**
-     * Constructor: OpenLayers.Geometry
-     * Creates a geometry object.  
-     */
-    initialize: function() {
-        this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME+ "_");
-    },
-    
-    /**
-     * Method: destroy
-     * Destroy this geometry.
-     */
-    destroy: function() {
-        this.id = null;
-        this.bounds = null;
-    },
-    
-    /**
-     * APIMethod: clone
-     * Create a clone of this geometry.  Does not set any non-standard
-     *     properties of the cloned geometry.
-     * 
-     * Returns:
-     * {<OpenLayers.Geometry>} An exact clone of this geometry.
-     */
-    clone: function() {
-        return new OpenLayers.Geometry();
-    },
-    
-    /**
-     * Set the bounds for this Geometry.
-     * 
-     * Parameters:
-     * object - {<OpenLayers.Bounds>} 
-     */
-    setBounds: function(bounds) {
-        if (bounds) {
-            this.bounds = bounds.clone();
-        }
-    },
-    
-    /**
-     * Method: clearBounds
-     * Nullify this components bounds and that of its parent as well.
-     */
-    clearBounds: function() {
-        this.bounds = null;
-        if (this.parent) {
-            this.parent.clearBounds();
-        }    
-    },
-    
-    /**
-     * Method: extendBounds
-     * Extend the existing bounds to include the new bounds. 
-     * If geometry's bounds is not yet set, then set a new Bounds.
-     * 
-     * Parameters:
-     * newBounds - {<OpenLayers.Bounds>} 
-     */
-    extendBounds: function(newBounds){
-        var bounds = this.getBounds();
-        if (!bounds) {
-            this.setBounds(newBounds);
-        } else {
-            this.bounds.extend(newBounds);
-        }
-    },
-    
-    /**
-     * APIMethod: getBounds
-     * Get the bounds for this Geometry. If bounds is not set, it 
-     * is calculated again, this makes queries faster.
-     * 
-     * Returns:
-     * {<OpenLayers.Bounds>}
-     */
-    getBounds: function() {
-        if (this.bounds == null) {
-            this.calculateBounds();
-        }
-        return this.bounds;
-    },
-    
-    /** 
-     * APIMethod: calculateBounds
-     * Recalculate the bounds for the geometry. 
-     */
-    calculateBounds: function() {
-        //
-        // This should be overridden by subclasses.
-        //
-    },
-    
-    /**
-     * APIMethod: distanceTo
-     * Calculate the closest distance between two geometries (on the x-y plane).
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>} The target geometry.
-     * options - {Object} Optional properties for configuring the distance
-     *     calculation.
-     *
-     * Valid options depend on the specific geometry type.
-     * 
-     * Returns:
-     * {Number | Object} The distance between this geometry and the target.
-     *     If details is true, the return will be an object with distance,
-     *     x0, y0, x1, and x2 properties.  The x0 and y0 properties represent
-     *     the coordinates of the closest point on this geometry. The x1 and y1
-     *     properties represent the coordinates of the closest point on the
-     *     target geometry.
-     */
-    distanceTo: function(geometry, options) {
-    },
-    
-    /**
-     * APIMethod: getVertices
-     * Return a list of all points in this geometry.
-     *
-     * Parameters:
-     * nodes - {Boolean} For lines, only return vertices that are
-     *     endpoints.  If false, for lines, only vertices that are not
-     *     endpoints will be returned.  If not provided, all vertices will
-     *     be returned.
-     *
-     * Returns:
-     * {Array} A list of all vertices in the geometry.
-     */
-    getVertices: function(nodes) {
-    },
-
-    /**
-     * Method: atPoint
-     * Note - This is only an approximation based on the bounds of the 
-     * geometry.
-     * 
-     * Parameters:
-     * lonlat - {<OpenLayers.LonLat>} 
-     * toleranceLon - {float} Optional tolerance in Geometric Coords
-     * toleranceLat - {float} Optional tolerance in Geographic Coords
-     * 
-     * Returns:
-     * {Boolean} Whether or not the geometry is at the specified location
-     */
-    atPoint: function(lonlat, toleranceLon, toleranceLat) {
-        var atPoint = false;
-        var bounds = this.getBounds();
-        if ((bounds != null) && (lonlat != null)) {
-
-            var dX = (toleranceLon != null) ? toleranceLon : 0;
-            var dY = (toleranceLat != null) ? toleranceLat : 0;
-    
-            var toleranceBounds = 
-                new OpenLayers.Bounds(this.bounds.left - dX,
-                                      this.bounds.bottom - dY,
-                                      this.bounds.right + dX,
-                                      this.bounds.top + dY);
-
-            atPoint = toleranceBounds.containsLonLat(lonlat);
-        }
-        return atPoint;
-    },
-    
-    /**
-     * Method: getLength
-     * Calculate the length of this geometry. This method is defined in
-     * subclasses.
-     * 
-     * Returns:
-     * {Float} The length of the collection by summing its parts
-     */
-    getLength: function() {
-        //to be overridden by geometries that actually have a length
-        //
-        return 0.0;
-    },
-
-    /**
-     * Method: getArea
-     * Calculate the area of this geometry. This method is defined in subclasses.
-     * 
-     * Returns:
-     * {Float} The area of the collection by summing its parts
-     */
-    getArea: function() {
-        //to be overridden by geometries that actually have an area
-        //
-        return 0.0;
-    },
-    
-    /**
-     * APIMethod: getCentroid
-     * Calculate the centroid of this geometry. This method is defined in subclasses.
-     *
-     * Returns:
-     * {<OpenLayers.Geometry.Point>} The centroid of the collection
-     */
-    getCentroid: function() {
-        return null;
-    },
-
-    /**
-     * Method: toString
-     * Returns the Well-Known Text representation of a geometry
-     *
-     * Returns:
-     * {String} Well-Known Text
-     */
-    toString: function() {
-        return OpenLayers.Format.WKT.prototype.write(
-            new OpenLayers.Feature.Vector(this)
-        );
-    },
-
-    CLASS_NAME: "OpenLayers.Geometry"
-});
-
-/**
- * Function: OpenLayers.Geometry.fromWKT
- * Generate a geometry given a Well-Known Text string.
- *
- * Parameters:
- * wkt - {String} A string representing the geometry in Well-Known Text.
- *
- * Returns:
- * {<OpenLayers.Geometry>} A geometry of the appropriate class.
- */
-OpenLayers.Geometry.fromWKT = function(wkt) {
-    var format = arguments.callee.format;
-    if(!format) {
-        format = new OpenLayers.Format.WKT();
-        arguments.callee.format = format;
-    }
-    var geom;
-    var result = format.read(wkt);
-    if(result instanceof OpenLayers.Feature.Vector) {
-        geom = result.geometry;
-    } else if(result instanceof Array) {
-        var len = result.length;
-        var components = new Array(len);
-        for(var i=0; i<len; ++i) {
-            components[i] = result[i].geometry;
-        }
-        geom = new OpenLayers.Geometry.Collection(components);
-    }
-    return geom;
-};
-    
-/**
- * Method: OpenLayers.Geometry.segmentsIntersect
- * Determine whether two line segments intersect.  Optionally calculates
- *     and returns the intersection point.  This function is optimized for
- *     cases where seg1.x2 >= seg2.x1 || seg2.x2 >= seg1.x1.  In those
- *     obvious cases where there is no intersection, the function should
- *     not be called.
- *
- * Parameters:
- * seg1 - {Object} Object representing a segment with properties x1, y1, x2,
- *     and y2.  The start point is represented by x1 and y1.  The end point
- *     is represented by x2 and y2.  Start and end are ordered so that x1 < x2.
- * seg2 - {Object} Object representing a segment with properties x1, y1, x2,
- *     and y2.  The start point is represented by x1 and y1.  The end point
- *     is represented by x2 and y2.  Start and end are ordered so that x1 < x2.
- * options - {Object} Optional properties for calculating the intersection.
- *
- * Valid options:
- * point - {Boolean} Return the intersection point.  If false, the actual
- *     intersection point will not be calculated.  If true and the segments
- *     intersect, the intersection point will be returned.  If true and
- *     the segments do not intersect, false will be returned.  If true and
- *     the segments are coincident, true will be returned.
- * tolerance - {Number} If a non-null value is provided, if the segments are
- *     within the tolerance distance, this will be considered an intersection.
- *     In addition, if the point option is true and the calculated intersection
- *     is within the tolerance distance of an end point, the endpoint will be
- *     returned instead of the calculated intersection.  Further, if the
- *     intersection is within the tolerance of endpoints on both segments, or
- *     if two segment endpoints are within the tolerance distance of eachother
- *     (but no intersection is otherwise calculated), an endpoint on the
- *     first segment provided will be returned.
- *
- * Returns:
- * {Boolean | <OpenLayers.Geometry.Point>}  The two segments intersect.
- *     If the point argument is true, the return will be the intersection
- *     point or false if none exists.  If point is true and the segments
- *     are coincident, return will be true (and the instersection is equal
- *     to the shorter segment).
- */
-OpenLayers.Geometry.segmentsIntersect = function(seg1, seg2, options) {
-    var point = options && options.point;
-    var tolerance = options && options.tolerance;
-    var intersection = false;
-    var x11_21 = seg1.x1 - seg2.x1;
-    var y11_21 = seg1.y1 - seg2.y1;
-    var x12_11 = seg1.x2 - seg1.x1;
-    var y12_11 = seg1.y2 - seg1.y1;
-    var y22_21 = seg2.y2 - seg2.y1;
-    var x22_21 = seg2.x2 - seg2.x1;
-    var d = (y22_21 * x12_11) - (x22_21 * y12_11);
-    var n1 = (x22_21 * y11_21) - (y22_21 * x11_21);
-    var n2 = (x12_11 * y11_21) - (y12_11 * x11_21);
-    if(d == 0) {
-        // parallel
-        if(n1 == 0 && n2 == 0) {
-            // coincident
-            intersection = true;
-        }
-    } else {
-        var along1 = n1 / d;
-        var along2 = n2 / d;
-        if(along1 >= 0 && along1 <= 1 && along2 >=0 && along2 <= 1) {
-            // intersect
-            if(!point) {
-                intersection = true;
-            } else {
-                // calculate the intersection point
-                var x = seg1.x1 + (along1 * x12_11);
-                var y = seg1.y1 + (along1 * y12_11);
-                intersection = new OpenLayers.Geometry.Point(x, y);
-            }
-        }
-    }
-    if(tolerance) {
-        var dist;
-        if(intersection) {
-            if(point) {
-                var segs = [seg1, seg2];
-                var seg, x, y;
-                // check segment endpoints for proximity to intersection
-                // set intersection to first endpoint within the tolerance
-                outer: for(var i=0; i<2; ++i) {
-                    seg = segs[i];
-                    for(var j=1; j<3; ++j) {
-                        x = seg["x" + j];
-                        y = seg["y" + j];
-                        dist = Math.sqrt(
-                            Math.pow(x - intersection.x, 2) +
-                            Math.pow(y - intersection.y, 2)
-                        );
-                        if(dist < tolerance) {
-                            intersection.x = x;
-                            intersection.y = y;
-                            break outer;
-                        }
-                    }
-                }
-                
-            }
-        } else {
-            // no calculated intersection, but segments could be within
-            // the tolerance of one another
-            var segs = [seg1, seg2];
-            var source, target, x, y, p, result;
-            // check segment endpoints for proximity to intersection
-            // set intersection to first endpoint within the tolerance
-            outer: for(var i=0; i<2; ++i) {
-                source = segs[i];
-                target = segs[(i+1)%2];
-                for(var j=1; j<3; ++j) {
-                    p = {x: source["x"+j], y: source["y"+j]};
-                    result = OpenLayers.Geometry.distanceToSegment(p, target);
-                    if(result.distance < tolerance) {
-                        if(point) {
-                            intersection = new OpenLayers.Geometry.Point(p.x, p.y);
-                        } else {
-                            intersection = true;
-                        }
-                        break outer;
-                    }
-                }
-            }
-        }
-    }
-    return intersection;
-};
-
-/**
- * Function: OpenLayers.Geometry.distanceToSegment
- *
- * Parameters:
- * point - {Object} An object with x and y properties representing the
- *     point coordinates.
- * segment - {Object} An object with x1, y1, x2, and y2 properties
- *     representing endpoint coordinates.
- *
- * Returns:
- * {Object} An object with distance, x, and y properties.  The distance
- *     will be the shortest distance between the input point and segment.
- *     The x and y properties represent the coordinates along the segment
- *     where the shortest distance meets the segment.
- */
-OpenLayers.Geometry.distanceToSegment = function(point, segment) {
-    var x0 = point.x;
-    var y0 = point.y;
-    var x1 = segment.x1;
-    var y1 = segment.y1;
-    var x2 = segment.x2;
-    var y2 = segment.y2;
-    var dx = x2 - x1;
-    var dy = y2 - y1;
-    var along = ((dx * (x0 - x1)) + (dy * (y0 - y1))) /
-                (Math.pow(dx, 2) + Math.pow(dy, 2));
-    var x, y;
-    if(along <= 0.0) {
-        x = x1;
-        y = y1;
-    } else if(along >= 1.0) {
-        x = x2;
-        y = y2;
-    } else {
-        x = x1 + along * dx;
-        y = y1 + along * dy;
-    }
-    return {
-        distance: Math.sqrt(Math.pow(x - x0, 2) + Math.pow(y - y0, 2)),
-        x: x, y: y
-    };
-};
-

--- a/labs/openlayers/lib/OpenLayers/Geometry/Collection.js
+++ /dev/null
@@ -1,547 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Geometry.js
- */
-
-/**
- * Class: OpenLayers.Geometry.Collection
- * A Collection is exactly what it sounds like: A collection of different 
- * Geometries. These are stored in the local parameter <components> (which
- * can be passed as a parameter to the constructor). 
- * 
- * As new geometries are added to the collection, they are NOT cloned. 
- * When removing geometries, they need to be specified by reference (ie you 
- * have to pass in the *exact* geometry to be removed).
- * 
- * The <getArea> and <getLength> functions here merely iterate through
- * the components, summing their respective areas and lengths.
- *
- * Create a new instance with the <OpenLayers.Geometry.Collection> constructor.
- *
- * Inerhits from:
- *  - <OpenLayers.Geometry> 
- */
-OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, {
-
-    /**
-     * APIProperty: components
-     * {Array(<OpenLayers.Geometry>)} The component parts of this geometry
-     */
-    components: null,
-    
-    /**
-     * Property: componentTypes
-     * {Array(String)} An array of class names representing the types of
-     * components that the collection can include.  A null value means the
-     * component types are not restricted.
-     */
-    componentTypes: null,
-
-    /**
-     * Constructor: OpenLayers.Geometry.Collection
-     * Creates a Geometry Collection -- a list of geoms.
-     *
-     * Parameters: 
-     * components - {Array(<OpenLayers.Geometry>)} Optional array of geometries
-     *
-     */
-    initialize: function (components) {
-        OpenLayers.Geometry.prototype.initialize.apply(this, arguments);
-        this.components = [];
-        if (components != null) {
-            this.addComponents(components);
-        }
-    },
-
-    /**
-     * APIMethod: destroy
-     * Destroy this geometry.
-     */
-    destroy: function () {
-        this.components.length = 0;
-        this.components = null;
-        OpenLayers.Geometry.prototype.destroy.apply(this, arguments);
-    },
-
-    /**
-     * APIMethod: clone
-     * Clone this geometry.
-     *
-     * Returns:
-     * {<OpenLayers.Geometry.Collection>} An exact clone of this collection
-     */
-    clone: function() {
-        var geometry = eval("new " + this.CLASS_NAME + "()");
-        for(var i=0, len=this.components.length; i<len; i++) {
-            geometry.addComponent(this.components[i].clone());
-        }
-        
-        // catch any randomly tagged-on properties
-        OpenLayers.Util.applyDefaults(geometry, this);
-        
-        return geometry;
-    },
-
-    /**
-     * Method: getComponentsString
-     * Get a string representing the components for this collection
-     * 
-     * Returns:
-     * {String} A string representation of the components of this geometry
-     */
-    getComponentsString: function(){
-        var strings = [];
-        for(var i=0, len=this.components.length; i<len; i++) {
-            strings.push(this.components[i].toShortString()); 
-        }
-        return strings.join(",");
-    },
-
-    /**
-     * APIMethod: calculateBounds
-     * Recalculate the bounds by iterating through the components and 
-     * calling calling extendBounds() on each item.
-     */
-    calculateBounds: function() {
-        this.bounds = null;
-        if ( this.components && this.components.length > 0) {
-            this.setBounds(this.components[0].getBounds());
-            for (var i=1, len=this.components.length; i<len; i++) {
-                this.extendBounds(this.components[i].getBounds());
-            }
-        }
-    },
-
-    /**
-     * APIMethod: addComponents
-     * Add components to this geometry.
-     *
-     * Parameters:
-     * components - {Array(<OpenLayers.Geometry>)} An array of geometries to add
-     */
-    addComponents: function(components){
-        if(!(components instanceof Array)) {
-            components = [components];
-        }
-        for(var i=0, len=components.length; i<len; i++) {
-            this.addComponent(components[i]);
-        }
-    },
-
-    /**
-     * Method: addComponent
-     * Add a new component (geometry) to the collection.  If this.componentTypes
-     * is set, then the component class name must be in the componentTypes array.
-     *
-     * The bounds cache is reset.
-     * 
-     * Parameters:
-     * component - {<OpenLayers.Geometry>} A geometry to add
-     * index - {int} Optional index into the array to insert the component
-     *
-     * Returns:
-     * {Boolean} The component geometry was successfully added
-     */    
-    addComponent: function(component, index) {
-        var added = false;
-        if(component) {
-            if(this.componentTypes == null ||
-               (OpenLayers.Util.indexOf(this.componentTypes,
-                                        component.CLASS_NAME) > -1)) {
-
-                if(index != null && (index < this.components.length)) {
-                    var components1 = this.components.slice(0, index);
-                    var components2 = this.components.slice(index, 
-                                                           this.components.length);
-                    components1.push(component);
-                    this.components = components1.concat(components2);
-                } else {
-                    this.components.push(component);
-                }
-                component.parent = this;
-                this.clearBounds();
-                added = true;
-            }
-        }
-        return added;
-    },
-    
-    /**
-     * APIMethod: removeComponents
-     * Remove components from this geometry.
-     *
-     * Parameters:
-     * components - {Array(<OpenLayers.Geometry>)} The components to be removed
-     */
-    removeComponents: function(components) {
-        if(!(components instanceof Array)) {
-            components = [components];
-        }
-        for(var i=components.length-1; i>=0; --i) {
-            this.removeComponent(components[i]);
-        }
-    },
-    
-    /**
-     * Method: removeComponent
-     * Remove a component from this geometry.
-     *
-     * Parameters:
-     * component - {<OpenLayers.Geometry>} 
-     */
-    removeComponent: function(component) {
-        
-        OpenLayers.Util.removeItem(this.components, component);
-        
-        // clearBounds() so that it gets recalculated on the next call
-        // to this.getBounds();
-        this.clearBounds();
-    },
-
-    /**
-     * APIMethod: getLength
-     * Calculate the length of this geometry
-     *
-     * Returns:
-     * {Float} The length of the geometry
-     */
-    getLength: function() {
-        var length = 0.0;
-        for (var i=0, len=this.components.length; i<len; i++) {
-            length += this.components[i].getLength();
-        }
-        return length;
-    },
-    
-    /**
-     * APIMethod: getArea
-     * Calculate the area of this geometry. Note how this function is overridden
-     * in <OpenLayers.Geometry.Polygon>.
-     *
-     * Returns:
-     * {Float} The area of the collection by summing its parts
-     */
-    getArea: function() {
-        var area = 0.0;
-        for (var i=0, len=this.components.length; i<len; i++) {
-            area += this.components[i].getArea();
-        }
-        return area;
-    },
-
-    /** 
-     * APIMethod: getGeodesicArea
-     * Calculate the approximate area of the polygon were it projected onto
-     *     the earth.
-     *
-     * Parameters:
-     * projection - {<OpenLayers.Projection>} The spatial reference system
-     *     for the geometry coordinates.  If not provided, Geographic/WGS84 is
-     *     assumed.
-     * 
-     * Reference:
-     * Robert. G. Chamberlain and William H. Duquette, "Some Algorithms for
-     *     Polygons on a Sphere", JPL Publication 07-03, Jet Propulsion
-     *     Laboratory, Pasadena, CA, June 2007 http://trs-new.jpl.nasa.gov/dspace/handle/2014/40409
-     *
-     * Returns:
-     * {float} The approximate geodesic area of the geometry in square meters.
-     */
-    getGeodesicArea: function(projection) {
-        var area = 0.0;
-        for(var i=0, len=this.components.length; i<len; i++) {
-            area += this.components[i].getGeodesicArea(projection);
-        }
-        return area;
-    },
-    
-    /**
-     * APIMethod: getCentroid
-     *
-     * Compute the centroid for this geometry collection.
-     *
-     * Parameters:
-     * weighted - {Boolean} Perform the getCentroid computation recursively,
-     * returning an area weighted average of all geometries in this collection.
-     *
-     * Returns:
-     * {<OpenLayers.Geometry.Point>} The centroid of the collection
-     */
-    getCentroid: function(weighted) {
-        if (!weighted) {
-            return this.components.length && this.components[0].getCentroid();
-        }
-        var len = this.components.length;
-        if (!len) {
-            return false;
-        }
-        
-        var areas = [];
-        var centroids = [];
-        var areaSum = 0;
-        var minArea = Number.MAX_VALUE;
-        var component;
-        for (var i=0; i<len; ++i) {
-            component = this.components[i];
-            var area = component.getArea();
-            var centroid = component.getCentroid(true);
-            if (isNaN(area) || isNaN(centroid.x) || isNaN(centroid.y)) {
-                continue;
-            }
-            areas.push(area);
-            areaSum += area;
-            minArea = (area < minArea && area > 0) ? area : minArea;
-            centroids.push(centroid);
-        }
-        len = areas.length;
-        if (areaSum === 0) {
-            // all the components in this collection have 0 area
-            // probably a collection of points -- weight all the points the same
-            for (var i=0; i<len; ++i) {
-                areas[i] = 1;
-            }
-            areaSum = areas.length;
-        } else {
-            // normalize all the areas where the smallest area will get
-            // a value of 1
-            for (var i=0; i<len; ++i) {
-                areas[i] /= minArea;
-            }
-            areaSum /= minArea;
-        }
-        
-        var xSum = 0, ySum = 0, centroid, area;
-        for (var i=0; i<len; ++i) {
-            centroid = centroids[i];
-            area = areas[i];
-            xSum += centroid.x * area;
-            ySum += centroid.y * area;
-        }
-        
-        return new OpenLayers.Geometry.Point(xSum/areaSum, ySum/areaSum);
-    },
-
-    /**
-     * APIMethod: getGeodesicLength
-     * Calculate the approximate length of the geometry were it projected onto
-     *     the earth.
-     *
-     * projection - {<OpenLayers.Projection>} The spatial reference system
-     *     for the geometry coordinates.  If not provided, Geographic/WGS84 is
-     *     assumed.
-     * 
-     * Returns:
-     * {Float} The appoximate geodesic length of the geometry in meters.
-     */
-    getGeodesicLength: function(projection) {
-        var length = 0.0;
-        for(var i=0, len=this.components.length; i<len; i++) {
-            length += this.components[i].getGeodesicLength(projection);
-        }
-        return length;
-    },
-
-    /**
-     * APIMethod: move
-     * Moves a geometry by the given displacement along positive x and y axes.
-     *     This modifies the position of the geometry and clears the cached
-     *     bounds.
-     *
-     * Parameters:
-     * x - {Float} Distance to move geometry in positive x direction. 
-     * y - {Float} Distance to move geometry in positive y direction.
-     */
-    move: function(x, y) {
-        for(var i=0, len=this.components.length; i<len; i++) {
-            this.components[i].move(x, y);
-        }
-    },
-
-    /**
-     * APIMethod: rotate
-     * Rotate a geometry around some origin
-     *
-     * Parameters:
-     * angle - {Float} Rotation angle in degrees (measured counterclockwise
-     *                 from the positive x-axis)
-     * origin - {<OpenLayers.Geometry.Point>} Center point for the rotation
-     */
-    rotate: function(angle, origin) {
-        for(var i=0, len=this.components.length; i<len; ++i) {
-            this.components[i].rotate(angle, origin);
-        }
-    },
-
-    /**
-     * APIMethod: resize
-     * Resize a geometry relative to some origin.  Use this method to apply
-     *     a uniform scaling to a geometry.
-     *
-     * Parameters:
-     * scale - {Float} Factor by which to scale the geometry.  A scale of 2
-     *                 doubles the size of the geometry in each dimension
-     *                 (lines, for example, will be twice as long, and polygons
-     *                 will have four times the area).
-     * origin - {<OpenLayers.Geometry.Point>} Point of origin for resizing
-     * ratio - {Float} Optional x:y ratio for resizing.  Default ratio is 1.
-     * 
-     * Returns:
-     * {OpenLayers.Geometry} - The current geometry. 
-     */
-    resize: function(scale, origin, ratio) {
-        for(var i=0; i<this.components.length; ++i) {
-            this.components[i].resize(scale, origin, ratio);
-        }
-        return this;
-    },
-
-    /**
-     * APIMethod: distanceTo
-     * Calculate the closest distance between two geometries (on the x-y plane).
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>} The target geometry.
-     * options - {Object} Optional properties for configuring the distance
-     *     calculation.
-     *
-     * Valid options:
-     * details - {Boolean} Return details from the distance calculation.
-     *     Default is false.
-     * edge - {Boolean} Calculate the distance from this geometry to the
-     *     nearest edge of the target geometry.  Default is true.  If true,
-     *     calling distanceTo from a geometry that is wholly contained within
-     *     the target will result in a non-zero distance.  If false, whenever
-     *     geometries intersect, calling distanceTo will return 0.  If false,
-     *     details cannot be returned.
-     *
-     * Returns:
-     * {Number | Object} The distance between this geometry and the target.
-     *     If details is true, the return will be an object with distance,
-     *     x0, y0, x1, and y1 properties.  The x0 and y0 properties represent
-     *     the coordinates of the closest point on this geometry. The x1 and y1
-     *     properties represent the coordinates of the closest point on the
-     *     target geometry.
-     */
-    distanceTo: function(geometry, options) {
-        var edge = !(options && options.edge === false);
-        var details = edge && options && options.details;
-        var result, best, distance;
-        var min = Number.POSITIVE_INFINITY;
-        for(var i=0, len=this.components.length; i<len; ++i) {
-            result = this.components[i].distanceTo(geometry, options);
-            distance = details ? result.distance : result;
-            if(distance < min) {
-                min = distance;
-                best = result;
-                if(min == 0) {
-                    break;
-                }
-            }
-        }
-        return best;
-    },
-
-    /** 
-     * APIMethod: equals
-     * Determine whether another geometry is equivalent to this one.  Geometries
-     *     are considered equivalent if all components have the same coordinates.
-     * 
-     * Parameters:
-     * geom - {<OpenLayers.Geometry>} The geometry to test. 
-     *
-     * Returns:
-     * {Boolean} The supplied geometry is equivalent to this geometry.
-     */
-    equals: function(geometry) {
-        var equivalent = true;
-        if(!geometry || !geometry.CLASS_NAME ||
-           (this.CLASS_NAME != geometry.CLASS_NAME)) {
-            equivalent = false;
-        } else if(!(geometry.components instanceof Array) ||
-                  (geometry.components.length != this.components.length)) {
-            equivalent = false;
-        } else {
-            for(var i=0, len=this.components.length; i<len; ++i) {
-                if(!this.components[i].equals(geometry.components[i])) {
-                    equivalent = false;
-                    break;
-                }
-            }
-        }
-        return equivalent;
-    },
-
-    /**
-     * APIMethod: transform
-     * Reproject the components geometry from source to dest.
-     * 
-     * Parameters:
-     * source - {<OpenLayers.Projection>} 
-     * dest - {<OpenLayers.Projection>}
-     * 
-     * Returns:
-     * {<OpenLayers.Geometry>} 
-     */
-    transform: function(source, dest) {
-        if (source && dest) {
-            for (var i=0, len=this.components.length; i<len; i++) {  
-                var component = this.components[i];
-                component.transform(source, dest);
-            }
-            this.bounds = null;
-        }
-        return this;
-    },
-
-    /**
-     * APIMethod: intersects
-     * Determine if the input geometry intersects this one.
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>} Any type of geometry.
-     *
-     * Returns:
-     * {Boolean} The input geometry intersects this one.
-     */
-    intersects: function(geometry) {
-        var intersect = false;
-        for(var i=0, len=this.components.length; i<len; ++ i) {
-            intersect = geometry.intersects(this.components[i]);
-            if(intersect) {
-                break;
-            }
-        }
-        return intersect;
-    },
-
-    /**
-     * APIMethod: getVertices
-     * Return a list of all points in this geometry.
-     *
-     * Parameters:
-     * nodes - {Boolean} For lines, only return vertices that are
-     *     endpoints.  If false, for lines, only vertices that are not
-     *     endpoints will be returned.  If not provided, all vertices will
-     *     be returned.
-     *
-     * Returns:
-     * {Array} A list of all vertices in the geometry.
-     */
-    getVertices: function(nodes) {
-        var vertices = [];
-        for(var i=0, len=this.components.length; i<len; ++i) {
-            Array.prototype.push.apply(
-                vertices, this.components[i].getVertices(nodes)
-            );
-        }
-        return vertices;
-    },
-
-
-    CLASS_NAME: "OpenLayers.Geometry.Collection"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Geometry/Curve.js
+++ /dev/null
@@ -1,94 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Geometry/MultiPoint.js
- */
-
-/**
- * Class: OpenLayers.Geometry.Curve
- * A Curve is a MultiPoint, whose points are assumed to be connected. To 
- * this end, we provide a "getLength()" function, which iterates through 
- * the points, summing the distances between them. 
- * 
- * Inherits: 
- *  - <OpenLayers.Geometry.MultiPoint>
- */
-OpenLayers.Geometry.Curve = OpenLayers.Class(OpenLayers.Geometry.MultiPoint, {
-
-    /**
-     * Property: componentTypes
-     * {Array(String)} An array of class names representing the types of 
-     *                 components that the collection can include.  A null 
-     *                 value means the component types are not restricted.
-     */
-    componentTypes: ["OpenLayers.Geometry.Point"],
-
-    /**
-     * Constructor: OpenLayers.Geometry.Curve
-     * 
-     * Parameters:
-     * point - {Array(<OpenLayers.Geometry.Point>)}
-     */
-    initialize: function(points) {
-        OpenLayers.Geometry.MultiPoint.prototype.initialize.apply(this, 
-                                                                  arguments);
-    },
-    
-    /**
-     * APIMethod: getLength
-     * 
-     * Returns:
-     * {Float} The length of the curve
-     */
-    getLength: function() {
-        var length = 0.0;
-        if ( this.components && (this.components.length > 1)) {
-            for(var i=1, len=this.components.length; i<len; i++) {
-                length += this.components[i-1].distanceTo(this.components[i]);
-            }
-        }
-        return length;
-    },
-
-    /**
-     * APIMethod: getGeodesicLength
-     * Calculate the approximate length of the geometry were it projected onto
-     *     the earth.
-     *
-     * projection - {<OpenLayers.Projection>} The spatial reference system
-     *     for the geometry coordinates.  If not provided, Geographic/WGS84 is
-     *     assumed.
-     * 
-     * Returns:
-     * {Float} The appoximate geodesic length of the geometry in meters.
-     */
-    getGeodesicLength: function(projection) {
-        var geom = this;  // so we can work with a clone if needed
-        if(projection) {
-            var gg = new OpenLayers.Projection("EPSG:4326");
-            if(!gg.equals(projection)) {
-                geom = this.clone().transform(projection, gg);
-            }
-        }
-        var length = 0.0;
-        if(geom.components && (geom.components.length > 1)) {
-            var p1, p2;
-            for(var i=1, len=geom.components.length; i<len; i++) {
-                p1 = geom.components[i-1];
-                p2 = geom.components[i];
-                // this returns km and requires lon/lat properties
-                length += OpenLayers.Util.distVincenty(
-                    {lon: p1.x, lat: p1.y}, {lon: p2.x, lat: p2.y}
-                );
-            }
-        }
-        // convert to m
-        return length * 1000;
-    },
-
-    CLASS_NAME: "OpenLayers.Geometry.Curve"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Geometry/LineString.js
+++ /dev/null
@@ -1,553 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Geometry/Curve.js
- */
-
-/**
- * Class: OpenLayers.Geometry.LineString
- * A LineString is a Curve which, once two points have been added to it, can 
- * never be less than two points long.
- * 
- * Inherits from:
- *  - <OpenLayers.Geometry.Curve>
- */
-OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, {
-
-    /**
-     * Constructor: OpenLayers.Geometry.LineString
-     * Create a new LineString geometry
-     *
-     * Parameters:
-     * points - {Array(<OpenLayers.Geometry.Point>)} An array of points used to
-     *          generate the linestring
-     *
-     */
-    initialize: function(points) {
-        OpenLayers.Geometry.Curve.prototype.initialize.apply(this, arguments);        
-    },
-
-    /**
-     * APIMethod: removeComponent
-     * Only allows removal of a point if there are three or more points in 
-     * the linestring. (otherwise the result would be just a single point)
-     *
-     * Parameters: 
-     * point - {<OpenLayers.Geometry.Point>} The point to be removed
-     */
-    removeComponent: function(point) {
-        if ( this.components && (this.components.length > 2)) {
-            OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this, 
-                                                                  arguments);
-        }
-    },
-    
-    /**
-     * APIMethod: intersects
-     * Test for instersection between two geometries.  This is a cheapo
-     *     implementation of the Bently-Ottmann algorigithm.  It doesn't
-     *     really keep track of a sweep line data structure.  It is closer
-     *     to the brute force method, except that segments are sorted and
-     *     potential intersections are only calculated when bounding boxes
-     *     intersect.
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     *
-     * Returns:
-     * {Boolean} The input geometry intersects this geometry.
-     */
-    intersects: function(geometry) {
-        var intersect = false;
-        var type = geometry.CLASS_NAME;
-        if(type == "OpenLayers.Geometry.LineString" ||
-           type == "OpenLayers.Geometry.LinearRing" ||
-           type == "OpenLayers.Geometry.Point") {
-            var segs1 = this.getSortedSegments();
-            var segs2;
-            if(type == "OpenLayers.Geometry.Point") {
-                segs2 = [{
-                    x1: geometry.x, y1: geometry.y,
-                    x2: geometry.x, y2: geometry.y
-                }];
-            } else {
-                segs2 = geometry.getSortedSegments();
-            }
-            var seg1, seg1x1, seg1x2, seg1y1, seg1y2,
-                seg2, seg2y1, seg2y2;
-            // sweep right
-            outer: for(var i=0, len=segs1.length; i<len; ++i) {
-                seg1 = segs1[i];
-                seg1x1 = seg1.x1;
-                seg1x2 = seg1.x2;
-                seg1y1 = seg1.y1;
-                seg1y2 = seg1.y2;
-                inner: for(var j=0, jlen=segs2.length; j<jlen; ++j) {
-                    seg2 = segs2[j];
-                    if(seg2.x1 > seg1x2) {
-                        // seg1 still left of seg2
-                        break;
-                    }
-                    if(seg2.x2 < seg1x1) {
-                        // seg2 still left of seg1
-                        continue;
-                    }
-                    seg2y1 = seg2.y1;
-                    seg2y2 = seg2.y2;
-                    if(Math.min(seg2y1, seg2y2) > Math.max(seg1y1, seg1y2)) {
-                        // seg2 above seg1
-                        continue;
-                    }
-                    if(Math.max(seg2y1, seg2y2) < Math.min(seg1y1, seg1y2)) {
-                        // seg2 below seg1
-                        continue;
-                    }
-                    if(OpenLayers.Geometry.segmentsIntersect(seg1, seg2)) {
-                        intersect = true;
-                        break outer;
-                    }
-                }
-            }
-        } else {
-            intersect = geometry.intersects(this);
-        }
-        return intersect;
-    },
-    
-    /**
-     * Method: getSortedSegments
-     *
-     * Returns:
-     * {Array} An array of segment objects.  Segment objects have properties
-     *     x1, y1, x2, and y2.  The start point is represented by x1 and y1.
-     *     The end point is represented by x2 and y2.  Start and end are
-     *     ordered so that x1 < x2.
-     */
-    getSortedSegments: function() {
-        var numSeg = this.components.length - 1;
-        var segments = new Array(numSeg), point1, point2;
-        for(var i=0; i<numSeg; ++i) {
-            point1 = this.components[i];
-            point2 = this.components[i + 1];
-            if(point1.x < point2.x) {
-                segments[i] = {
-                    x1: point1.x,
-                    y1: point1.y,
-                    x2: point2.x,
-                    y2: point2.y
-                };
-            } else {
-                segments[i] = {
-                    x1: point2.x,
-                    y1: point2.y,
-                    x2: point1.x,
-                    y2: point1.y
-                };
-            }
-        }
-        // more efficient to define this somewhere static
-        function byX1(seg1, seg2) {
-            return seg1.x1 - seg2.x1;
-        }
-        return segments.sort(byX1);
-    },
-    
-    /**
-     * Method: splitWithSegment
-     * Split this geometry with the given segment.
-     *
-     * Parameters:
-     * seg - {Object} An object with x1, y1, x2, and y2 properties referencing
-     *     segment endpoint coordinates.
-     * options - {Object} Properties of this object will be used to determine
-     *     how the split is conducted.
-     *
-     * Valid options:
-     * edge - {Boolean} Allow splitting when only edges intersect.  Default is
-     *     true.  If false, a vertex on the source segment must be within the
-     *     tolerance distance of the intersection to be considered a split.
-     * tolerance - {Number} If a non-null value is provided, intersections
-     *     within the tolerance distance of one of the source segment's
-     *     endpoints will be assumed to occur at the endpoint.
-     *
-     * Returns:
-     * {Object} An object with *lines* and *points* properties.  If the given
-     *     segment intersects this linestring, the lines array will reference
-     *     geometries that result from the split.  The points array will contain
-     *     all intersection points.  Intersection points are sorted along the
-     *     segment (in order from x1,y1 to x2,y2).
-     */
-    splitWithSegment: function(seg, options) {
-        var edge = !(options && options.edge === false);
-        var tolerance = options && options.tolerance;
-        var lines = [];
-        var verts = this.getVertices();
-        var points = [];
-        var intersections = [];
-        var split = false;
-        var vert1, vert2, point;
-        var node, vertex, target;
-        var interOptions = {point: true, tolerance: tolerance};
-        var result = null;
-        for(var i=0, stop=verts.length-2; i<=stop; ++i) {
-            vert1 = verts[i];
-            points.push(vert1.clone());
-            vert2 = verts[i+1];
-            target = {x1: vert1.x, y1: vert1.y, x2: vert2.x, y2: vert2.y};
-            point = OpenLayers.Geometry.segmentsIntersect(
-                seg, target, interOptions
-            );
-            if(point instanceof OpenLayers.Geometry.Point) {
-                if((point.x === seg.x1 && point.y === seg.y1) ||
-                   (point.x === seg.x2 && point.y === seg.y2) ||
-                   point.equals(vert1) || point.equals(vert2)) {
-                    vertex = true;
-                } else {
-                    vertex = false;
-                }
-                if(vertex || edge) {
-                    // push intersections different than the previous
-                    if(!point.equals(intersections[intersections.length-1])) {
-                        intersections.push(point.clone());
-                    }
-                    if(i === 0) {
-                        if(point.equals(vert1)) {
-                            continue;
-                        }
-                    }
-                    if(point.equals(vert2)) {
-                        continue;
-                    }
-                    split = true;
-                    if(!point.equals(vert1)) {
-                        points.push(point);
-                    }
-                    lines.push(new OpenLayers.Geometry.LineString(points));
-                    points = [point.clone()];
-                }
-            }
-        }
-        if(split) {
-            points.push(vert2.clone());
-            lines.push(new OpenLayers.Geometry.LineString(points));
-        }
-        if(intersections.length > 0) {
-            // sort intersections along segment
-            var xDir = seg.x1 < seg.x2 ? 1 : -1;
-            var yDir = seg.y1 < seg.y2 ? 1 : -1;
-            result = {
-                lines: lines,
-                points: intersections.sort(function(p1, p2) {
-                    return (xDir * p1.x - xDir * p2.x) || (yDir * p1.y - yDir * p2.y);
-                })
-            };
-        }
-        return result;
-    },
-
-    /**
-     * Method: split
-     * Use this geometry (the source) to attempt to split a target geometry.
-     * 
-     * Parameters:
-     * target - {<OpenLayers.Geometry>} The target geometry.
-     * options - {Object} Properties of this object will be used to determine
-     *     how the split is conducted.
-     *
-     * Valid options:
-     * mutual - {Boolean} Split the source geometry in addition to the target
-     *     geometry.  Default is false.
-     * edge - {Boolean} Allow splitting when only edges intersect.  Default is
-     *     true.  If false, a vertex on the source must be within the tolerance
-     *     distance of the intersection to be considered a split.
-     * tolerance - {Number} If a non-null value is provided, intersections
-     *     within the tolerance distance of an existing vertex on the source
-     *     will be assumed to occur at the vertex.
-     * 
-     * Returns:
-     * {Array} A list of geometries (of this same type as the target) that
-     *     result from splitting the target with the source geometry.  The
-     *     source and target geometry will remain unmodified.  If no split
-     *     results, null will be returned.  If mutual is true and a split
-     *     results, return will be an array of two arrays - the first will be
-     *     all geometries that result from splitting the source geometry and
-     *     the second will be all geometries that result from splitting the
-     *     target geometry.
-     */
-    split: function(target, options) {
-        var results = null;
-        var mutual = options && options.mutual;
-        var sourceSplit, targetSplit, sourceParts, targetParts;
-        if(target instanceof OpenLayers.Geometry.LineString) {
-            var verts = this.getVertices();
-            var vert1, vert2, seg, splits, lines, point;
-            var points = [];
-            sourceParts = [];
-            for(var i=0, stop=verts.length-2; i<=stop; ++i) {
-                vert1 = verts[i];
-                vert2 = verts[i+1];
-                seg = {
-                    x1: vert1.x, y1: vert1.y,
-                    x2: vert2.x, y2: vert2.y
-                };
-                targetParts = targetParts || [target];
-                if(mutual) {
-                    points.push(vert1.clone());
-                }
-                for(var j=0; j<targetParts.length; ++j) {
-                    splits = targetParts[j].splitWithSegment(seg, options);
-                    if(splits) {
-                        // splice in new features
-                        lines = splits.lines;
-                        if(lines.length > 0) {
-                            lines.unshift(j, 1);
-                            Array.prototype.splice.apply(targetParts, lines);
-                            j += lines.length - 2;
-                        }
-                        if(mutual) {
-                            for(var k=0, len=splits.points.length; k<len; ++k) {
-                                point = splits.points[k];
-                                if(!point.equals(vert1)) {
-                                    points.push(point);
-                                    sourceParts.push(new OpenLayers.Geometry.LineString(points));
-                                    if(point.equals(vert2)) {
-                                        points = [];
-                                    } else {
-                                        points = [point.clone()];
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-            if(mutual && sourceParts.length > 0 && points.length > 0) {
-                points.push(vert2.clone());
-                sourceParts.push(new OpenLayers.Geometry.LineString(points));
-            }
-        } else {
-            results = target.splitWith(this, options);
-        }
-        if(targetParts && targetParts.length > 1) {
-            targetSplit = true;
-        } else {
-            targetParts = [];
-        }
-        if(sourceParts && sourceParts.length > 1) {
-            sourceSplit = true;
-        } else {
-            sourceParts = [];
-        }
-        if(targetSplit || sourceSplit) {
-            if(mutual) {
-                results = [sourceParts, targetParts];
-            } else {
-                results = targetParts;
-            }
-        }
-        return results;
-    },
-
-    /**
-     * Method: splitWith
-     * Split this geometry (the target) with the given geometry (the source).
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>} A geometry used to split this
-     *     geometry (the source).
-     * options - {Object} Properties of this object will be used to determine
-     *     how the split is conducted.
-     *
-     * Valid options:
-     * mutual - {Boolean} Split the source geometry in addition to the target
-     *     geometry.  Default is false.
-     * edge - {Boolean} Allow splitting when only edges intersect.  Default is
-     *     true.  If false, a vertex on the source must be within the tolerance
-     *     distance of the intersection to be considered a split.
-     * tolerance - {Number} If a non-null value is provided, intersections
-     *     within the tolerance distance of an existing vertex on the source
-     *     will be assumed to occur at the vertex.
-     * 
-     * Returns:
-     * {Array} A list of geometries (of this same type as the target) that
-     *     result from splitting the target with the source geometry.  The
-     *     source and target geometry will remain unmodified.  If no split
-     *     results, null will be returned.  If mutual is true and a split
-     *     results, return will be an array of two arrays - the first will be
-     *     all geometries that result from splitting the source geometry and
-     *     the second will be all geometries that result from splitting the
-     *     target geometry.
-     */
-    splitWith: function(geometry, options) {
-        return geometry.split(this, options);
-
-    },
-
-    /**
-     * APIMethod: getVertices
-     * Return a list of all points in this geometry.
-     *
-     * Parameters:
-     * nodes - {Boolean} For lines, only return vertices that are
-     *     endpoints.  If false, for lines, only vertices that are not
-     *     endpoints will be returned.  If not provided, all vertices will
-     *     be returned.
-     *
-     * Returns:
-     * {Array} A list of all vertices in the geometry.
-     */
-    getVertices: function(nodes) {
-        var vertices;
-        if(nodes === true) {
-            vertices = [
-                this.components[0],
-                this.components[this.components.length-1]
-            ];
-        } else if (nodes === false) {
-            vertices = this.components.slice(1, this.components.length-1);
-        } else {
-            vertices = this.components.slice();
-        }
-        return vertices;
-    },
-
-    /**
-     * APIMethod: distanceTo
-     * Calculate the closest distance between two geometries (on the x-y plane).
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>} The target geometry.
-     * options - {Object} Optional properties for configuring the distance
-     *     calculation.
-     *
-     * Valid options:
-     * details - {Boolean} Return details from the distance calculation.
-     *     Default is false.
-     * edge - {Boolean} Calculate the distance from this geometry to the
-     *     nearest edge of the target geometry.  Default is true.  If true,
-     *     calling distanceTo from a geometry that is wholly contained within
-     *     the target will result in a non-zero distance.  If false, whenever
-     *     geometries intersect, calling distanceTo will return 0.  If false,
-     *     details cannot be returned.
-     *
-     * Returns:
-     * {Number | Object} The distance between this geometry and the target.
-     *     If details is true, the return will be an object with distance,
-     *     x0, y0, x1, and x2 properties.  The x0 and y0 properties represent
-     *     the coordinates of the closest point on this geometry. The x1 and y1
-     *     properties represent the coordinates of the closest point on the
-     *     target geometry.
-     */
-    distanceTo: function(geometry, options) {
-        var edge = !(options && options.edge === false);
-        var details = edge && options && options.details;
-        var result, best = {};
-        var min = Number.POSITIVE_INFINITY;
-        if(geometry instanceof OpenLayers.Geometry.Point) {
-            var segs = this.getSortedSegments();
-            var x = geometry.x;
-            var y = geometry.y;
-            var seg;
-            for(var i=0, len=segs.length; i<len; ++i) {
-                seg = segs[i];
-                result = OpenLayers.Geometry.distanceToSegment(geometry, seg);
-                if(result.distance < min) {
-                    min = result.distance;
-                    best = result;
-                    if(min === 0) {
-                        break;
-                    }
-                } else {
-                    // if distance increases and we cross y0 to the right of x0, no need to keep looking.
-                    if(seg.x2 > x && ((y > seg.y1 && y < seg.y2) || (y < seg.y1 && y > seg.y2))) {
-                        break;
-                    }
-                }
-            }
-            if(details) {
-                best = {
-                    distance: best.distance,
-                    x0: best.x, y0: best.y,
-                    x1: x, y1: y
-                };
-            } else {
-                best = best.distance;
-            }
-        } else if(geometry instanceof OpenLayers.Geometry.LineString) { 
-            var segs0 = this.getSortedSegments();
-            var segs1 = geometry.getSortedSegments();
-            var seg0, seg1, intersection, x0, y0;
-            var len1 = segs1.length;
-            var interOptions = {point: true};
-            outer: for(var i=0, len=segs0.length; i<len; ++i) {
-                seg0 = segs0[i];
-                x0 = seg0.x1;
-                y0 = seg0.y1;
-                for(var j=0; j<len1; ++j) {
-                    seg1 = segs1[j];
-                    intersection = OpenLayers.Geometry.segmentsIntersect(seg0, seg1, interOptions);
-                    if(intersection) {
-                        min = 0;
-                        best = {
-                            distance: 0,
-                            x0: intersection.x, y0: intersection.y,
-                            x1: intersection.x, y1: intersection.y
-                        };
-                        break outer;
-                    } else {
-                        result = OpenLayers.Geometry.distanceToSegment({x: x0, y: y0}, seg1);
-                        if(result.distance < min) {
-                            min = result.distance;
-                            best = {
-                                distance: min,
-                                x0: x0, y0: y0,
-                                x1: result.x, y1: result.y
-                            };
-                        }
-                    }
-                }
-            }
-            if(!details) {
-                best = best.distance;
-            }
-            if(min !== 0) {
-                // check the final vertex in this line's sorted segments
-                if(seg0) {
-                    result = geometry.distanceTo(
-                        new OpenLayers.Geometry.Point(seg0.x2, seg0.y2),
-                        options
-                    );
-                    var dist = details ? result.distance : result;
-                    if(dist < min) {
-                        if(details) {
-                            best = {
-                                distance: min,
-                                x0: result.x1, y0: result.y1,
-                                x1: result.x0, y1: result.y0
-                            };
-                        } else {
-                            best = dist;
-                        }
-                    }
-                }
-            }
-        } else {
-            best = geometry.distanceTo(this, options);
-            // swap since target comes from this line
-            if(details) {
-                best = {
-                    distance: best.distance,
-                    x0: best.x1, y0: best.y1,
-                    x1: best.x0, y1: best.y0
-                };
-            }
-        }
-        return best;
-    },
-
-    CLASS_NAME: "OpenLayers.Geometry.LineString"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Geometry/LinearRing.js
+++ /dev/null
@@ -1,418 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Geometry/LineString.js
- */
-
-/**
- * Class: OpenLayers.Geometry.LinearRing
- * 
- * A Linear Ring is a special LineString which is closed. It closes itself 
- * automatically on every addPoint/removePoint by adding a copy of the first
- * point as the last point. 
- * 
- * Also, as it is the first in the line family to close itself, a getArea()
- * function is defined to calculate the enclosed area of the linearRing
- * 
- * Inherits:
- *  - <OpenLayers.Geometry.LineString>
- */
-OpenLayers.Geometry.LinearRing = OpenLayers.Class(
-  OpenLayers.Geometry.LineString, {
-
-    /**
-     * Property: componentTypes
-     * {Array(String)} An array of class names representing the types of 
-     *                 components that the collection can include.  A null 
-     *                 value means the component types are not restricted.
-     */
-    componentTypes: ["OpenLayers.Geometry.Point"],
-
-    /**
-     * Constructor: OpenLayers.Geometry.LinearRing
-     * Linear rings are constructed with an array of points.  This array
-     *     can represent a closed or open ring.  If the ring is open (the last
-     *     point does not equal the first point), the constructor will close
-     *     the ring.  If the ring is already closed (the last point does equal
-     *     the first point), it will be left closed.
-     * 
-     * Parameters:
-     * points - {Array(<OpenLayers.Geometry.Point>)} points
-     */
-    initialize: function(points) {
-        OpenLayers.Geometry.LineString.prototype.initialize.apply(this, 
-                                                                  arguments);
-    },
-
-    /**
-     * APIMethod: addComponent
-     * Adds a point to geometry components.  If the point is to be added to
-     *     the end of the components array and it is the same as the last point
-     *     already in that array, the duplicate point is not added.  This has 
-     *     the effect of closing the ring if it is not already closed, and 
-     *     doing the right thing if it is already closed.  This behavior can 
-     *     be overridden by calling the method with a non-null index as the 
-     *     second argument.
-     *
-     * Parameter:
-     * point - {<OpenLayers.Geometry.Point>}
-     * index - {Integer} Index into the array to insert the component
-     * 
-     * Returns:
-     * {Boolean} Was the Point successfully added?
-     */
-    addComponent: function(point, index) {
-        var added = false;
-
-        //remove last point
-        var lastPoint = this.components.pop();
-
-        // given an index, add the point
-        // without an index only add non-duplicate points
-        if(index != null || !point.equals(lastPoint)) {
-            added = OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, 
-                                                                    arguments);
-        }
-
-        //append copy of first point
-        var firstPoint = this.components[0];
-        OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, 
-                                                                [firstPoint]);
-        
-        return added;
-    },
-    
-    /**
-     * APIMethod: removeComponent
-     * Removes a point from geometry components.
-     *
-     * Parameters:
-     * point - {<OpenLayers.Geometry.Point>}
-     */
-    removeComponent: function(point) {
-        if (this.components.length > 4) {
-
-            //remove last point
-            this.components.pop();
-            
-            //remove our point
-            OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this, 
-                                                                    arguments);
-            //append copy of first point
-            var firstPoint = this.components[0];
-            OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, 
-                                                                [firstPoint]);
-        }
-    },
-    
-    /**
-     * APIMethod: move
-     * Moves a geometry by the given displacement along positive x and y axes.
-     *     This modifies the position of the geometry and clears the cached
-     *     bounds.
-     *
-     * Parameters:
-     * x - {Float} Distance to move geometry in positive x direction. 
-     * y - {Float} Distance to move geometry in positive y direction.
-     */
-    move: function(x, y) {
-        for(var i = 0, len=this.components.length; i<len - 1; i++) {
-            this.components[i].move(x, y);
-        }
-    },
-
-    /**
-     * APIMethod: rotate
-     * Rotate a geometry around some origin
-     *
-     * Parameters:
-     * angle - {Float} Rotation angle in degrees (measured counterclockwise
-     *                 from the positive x-axis)
-     * origin - {<OpenLayers.Geometry.Point>} Center point for the rotation
-     */
-    rotate: function(angle, origin) {
-        for(var i=0, len=this.components.length; i<len - 1; ++i) {
-            this.components[i].rotate(angle, origin);
-        }
-    },
-
-    /**
-     * APIMethod: resize
-     * Resize a geometry relative to some origin.  Use this method to apply
-     *     a uniform scaling to a geometry.
-     *
-     * Parameters:
-     * scale - {Float} Factor by which to scale the geometry.  A scale of 2
-     *                 doubles the size of the geometry in each dimension
-     *                 (lines, for example, will be twice as long, and polygons
-     *                 will have four times the area).
-     * origin - {<OpenLayers.Geometry.Point>} Point of origin for resizing
-     * ratio - {Float} Optional x:y ratio for resizing.  Default ratio is 1.
-     * 
-     * Returns:
-     * {OpenLayers.Geometry} - The current geometry. 
-     */
-    resize: function(scale, origin, ratio) {
-        for(var i=0, len=this.components.length; i<len - 1; ++i) {
-            this.components[i].resize(scale, origin, ratio);
-        }
-        return this;
-    },
-    
-    /**
-     * APIMethod: transform
-     * Reproject the components geometry from source to dest.
-     *
-     * Parameters:
-     * source - {<OpenLayers.Projection>}
-     * dest - {<OpenLayers.Projection>}
-     * 
-     * Returns:
-     * {<OpenLayers.Geometry>} 
-     */
-    transform: function(source, dest) {
-        if (source && dest) {
-            for (var i=0, len=this.components.length; i<len - 1; i++) {
-                var component = this.components[i];
-                component.transform(source, dest);
-            }
-            this.bounds = null;
-        }
-        return this;
-    },
-    
-    /**
-     * APIMethod: getCentroid
-     *
-     * Returns:
-     * {<OpenLayers.Geometry.Point>} The centroid of the collection
-     */
-    getCentroid: function() {
-        if (this.components && (this.components.length > 2)) {
-            var sumX = 0.0;
-            var sumY = 0.0;
-            for (var i = 0; i < this.components.length - 1; i++) {
-                var b = this.components[i];
-                var c = this.components[i+1];
-                sumX += (b.x + c.x) * (b.x * c.y - c.x * b.y);
-                sumY += (b.y + c.y) * (b.x * c.y - c.x * b.y);
-            }
-            var area = -1 * this.getArea();
-            var x = sumX / (6 * area);
-            var y = sumY / (6 * area);
-            return new OpenLayers.Geometry.Point(x, y);
-        } else {
-            return null;
-        }
-    },
-
-    /**
-     * APIMethod: getArea
-     * Note - The area is positive if the ring is oriented CW, otherwise
-     *         it will be negative.
-     * 
-     * Returns:
-     * {Float} The signed area for a ring.
-     */
-    getArea: function() {
-        var area = 0.0;
-        if ( this.components && (this.components.length > 2)) {
-            var sum = 0.0;
-            for (var i=0, len=this.components.length; i<len - 1; i++) {
-                var b = this.components[i];
-                var c = this.components[i+1];
-                sum += (b.x + c.x) * (c.y - b.y);
-            }
-            area = - sum / 2.0;
-        }
-        return area;
-    },
-    
-    /**
-     * APIMethod: getGeodesicArea
-     * Calculate the approximate area of the polygon were it projected onto
-     *     the earth.  Note that this area will be positive if ring is oriented
-     *     clockwise, otherwise it will be negative.
-     *
-     * Parameters:
-     * projection - {<OpenLayers.Projection>} The spatial reference system
-     *     for the geometry coordinates.  If not provided, Geographic/WGS84 is
-     *     assumed.
-     * 
-     * Reference:
-     * Robert. G. Chamberlain and William H. Duquette, "Some Algorithms for
-     *     Polygons on a Sphere", JPL Publication 07-03, Jet Propulsion
-     *     Laboratory, Pasadena, CA, June 2007 http://trs-new.jpl.nasa.gov/dspace/handle/2014/40409
-     *
-     * Returns:
-     * {float} The approximate signed geodesic area of the polygon in square
-     *     meters.
-     */
-    getGeodesicArea: function(projection) {
-        var ring = this;  // so we can work with a clone if needed
-        if(projection) {
-            var gg = new OpenLayers.Projection("EPSG:4326");
-            if(!gg.equals(projection)) {
-                ring = this.clone().transform(projection, gg);
-            }
-        }
-        var area = 0.0;
-        var len = ring.components && ring.components.length;
-        if(len > 2) {
-            var p1, p2;
-            for(var i=0; i<len-1; i++) {
-                p1 = ring.components[i];
-                p2 = ring.components[i+1];
-                area += OpenLayers.Util.rad(p2.x - p1.x) *
-                        (2 + Math.sin(OpenLayers.Util.rad(p1.y)) +
-                        Math.sin(OpenLayers.Util.rad(p2.y)));
-            }
-            area = area * 6378137.0 * 6378137.0 / 2.0;
-        }
-        return area;
-    },
-    
-    /**
-     * Method: containsPoint
-     * Test if a point is inside a linear ring.  For the case where a point
-     *     is coincident with a linear ring edge, returns 1.  Otherwise,
-     *     returns boolean.
-     *
-     * Parameters:
-     * point - {<OpenLayers.Geometry.Point>}
-     *
-     * Returns:
-     * {Boolean | Number} The point is inside the linear ring.  Returns 1 if
-     *     the point is coincident with an edge.  Returns boolean otherwise.
-     */
-    containsPoint: function(point) {
-        var approx = OpenLayers.Number.limitSigDigs;
-        var digs = 14;
-        var px = approx(point.x, digs);
-        var py = approx(point.y, digs);
-        function getX(y, x1, y1, x2, y2) {
-            return (((x1 - x2) * y) + ((x2 * y1) - (x1 * y2))) / (y1 - y2);
-        }
-        var numSeg = this.components.length - 1;
-        var start, end, x1, y1, x2, y2, cx, cy;
-        var crosses = 0;
-        for(var i=0; i<numSeg; ++i) {
-            start = this.components[i];
-            x1 = approx(start.x, digs);
-            y1 = approx(start.y, digs);
-            end = this.components[i + 1];
-            x2 = approx(end.x, digs);
-            y2 = approx(end.y, digs);
-            
-            /**
-             * The following conditions enforce five edge-crossing rules:
-             *    1. points coincident with edges are considered contained;
-             *    2. an upward edge includes its starting endpoint, and
-             *    excludes its final endpoint;
-             *    3. a downward edge excludes its starting endpoint, and
-             *    includes its final endpoint;
-             *    4. horizontal edges are excluded; and
-             *    5. the edge-ray intersection point must be strictly right
-             *    of the point P.
-             */
-            if(y1 == y2) {
-                // horizontal edge
-                if(py == y1) {
-                    // point on horizontal line
-                    if(x1 <= x2 && (px >= x1 && px <= x2) || // right or vert
-                       x1 >= x2 && (px <= x1 && px >= x2)) { // left or vert
-                        // point on edge
-                        crosses = -1;
-                        break;
-                    }
-                }
-                // ignore other horizontal edges
-                continue;
-            }
-            cx = approx(getX(py, x1, y1, x2, y2), digs);
-            if(cx == px) {
-                // point on line
-                if(y1 < y2 && (py >= y1 && py <= y2) || // upward
-                   y1 > y2 && (py <= y1 && py >= y2)) { // downward
-                    // point on edge
-                    crosses = -1;
-                    break;
-                }
-            }
-            if(cx <= px) {
-                // no crossing to the right
-                continue;
-            }
-            if(x1 != x2 && (cx < Math.min(x1, x2) || cx > Math.max(x1, x2))) {
-                // no crossing
-                continue;
-            }
-            if(y1 < y2 && (py >= y1 && py < y2) || // upward
-               y1 > y2 && (py < y1 && py >= y2)) { // downward
-                ++crosses;
-            }
-        }
-        var contained = (crosses == -1) ?
-            // on edge
-            1 :
-            // even (out) or odd (in)
-            !!(crosses & 1);
-
-        return contained;
-    },
-
-    /**
-     * APIMethod: intersects
-     * Determine if the input geometry intersects this one.
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>} Any type of geometry.
-     *
-     * Returns:
-     * {Boolean} The input geometry intersects this one.
-     */
-    intersects: function(geometry) {
-        var intersect = false;
-        if(geometry.CLASS_NAME == "OpenLayers.Geometry.Point") {
-            intersect = this.containsPoint(geometry);
-        } else if(geometry.CLASS_NAME == "OpenLayers.Geometry.LineString") {
-            intersect = geometry.intersects(this);
-        } else if(geometry.CLASS_NAME == "OpenLayers.Geometry.LinearRing") {
-            intersect = OpenLayers.Geometry.LineString.prototype.intersects.apply(
-                this, [geometry]
-            );
-        } else {
-            // check for component intersections
-            for(var i=0, len=geometry.components.length; i<len; ++ i) {
-                intersect = geometry.components[i].intersects(this);
-                if(intersect) {
-                    break;
-                }
-            }
-        }
-        return intersect;
-    },
-
-    /**
-     * APIMethod: getVertices
-     * Return a list of all points in this geometry.
-     *
-     * Parameters:
-     * nodes - {Boolean} For lines, only return vertices that are
-     *     endpoints.  If false, for lines, only vertices that are not
-     *     endpoints will be returned.  If not provided, all vertices will
-     *     be returned.
-     *
-     * Returns:
-     * {Array} A list of all vertices in the geometry.
-     */
-    getVertices: function(nodes) {
-        return (nodes === true) ? [] : this.components.slice(0, this.components.length-1);
-    },
-
-    CLASS_NAME: "OpenLayers.Geometry.LinearRing"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Geometry/MultiLineString.js
+++ /dev/null
@@ -1,263 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Geometry/Collection.js
- * @requires OpenLayers/Geometry/LineString.js
- */
-
-/**
- * Class: OpenLayers.Geometry.MultiLineString
- * A MultiLineString is a geometry with multiple <OpenLayers.Geometry.LineString>
- * components.
- * 
- * Inherits from:
- *  - <OpenLayers.Geometry.Collection>
- *  - <OpenLayers.Geometry> 
- */
-OpenLayers.Geometry.MultiLineString = OpenLayers.Class(
-  OpenLayers.Geometry.Collection, {
-
-    /**
-     * Property: componentTypes
-     * {Array(String)} An array of class names representing the types of
-     * components that the collection can include.  A null value means the
-     * component types are not restricted.
-     */
-    componentTypes: ["OpenLayers.Geometry.LineString"],
-
-    /**
-     * Constructor: OpenLayers.Geometry.MultiLineString
-     * Constructor for a MultiLineString Geometry.
-     *
-     * Parameters: 
-     * components - {Array(<OpenLayers.Geometry.LineString>)} 
-     *
-     */
-    initialize: function(components) {
-        OpenLayers.Geometry.Collection.prototype.initialize.apply(this, 
-                                                                  arguments);        
-    },
-    
-    /**
-     * Method: split
-     * Use this geometry (the source) to attempt to split a target geometry.
-     * 
-     * Parameters:
-     * target - {<OpenLayers.Geometry>} The target geometry.
-     * options - {Object} Properties of this object will be used to determine
-     *     how the split is conducted.
-     *
-     * Valid options:
-     * mutual - {Boolean} Split the source geometry in addition to the target
-     *     geometry.  Default is false.
-     * edge - {Boolean} Allow splitting when only edges intersect.  Default is
-     *     true.  If false, a vertex on the source must be within the tolerance
-     *     distance of the intersection to be considered a split.
-     * tolerance - {Number} If a non-null value is provided, intersections
-     *     within the tolerance distance of an existing vertex on the source
-     *     will be assumed to occur at the vertex.
-     * 
-     * Returns:
-     * {Array} A list of geometries (of this same type as the target) that
-     *     result from splitting the target with the source geometry.  The
-     *     source and target geometry will remain unmodified.  If no split
-     *     results, null will be returned.  If mutual is true and a split
-     *     results, return will be an array of two arrays - the first will be
-     *     all geometries that result from splitting the source geometry and
-     *     the second will be all geometries that result from splitting the
-     *     target geometry.
-     */
-    split: function(geometry, options) {
-        var results = null;
-        var mutual = options && options.mutual;
-        var splits, sourceLine, sourceLines, sourceSplit, targetSplit;
-        var sourceParts = [];
-        var targetParts = [geometry];
-        for(var i=0, len=this.components.length; i<len; ++i) {
-            sourceLine = this.components[i];
-            sourceSplit = false;
-            for(var j=0; j < targetParts.length; ++j) { 
-                splits = sourceLine.split(targetParts[j], options);
-                if(splits) {
-                    if(mutual) {
-                        sourceLines = splits[0];
-                        for(var k=0, klen=sourceLines.length; k<klen; ++k) {
-                            if(k===0 && sourceParts.length) {
-                                sourceParts[sourceParts.length-1].addComponent(
-                                    sourceLines[k]
-                                );
-                            } else {
-                                sourceParts.push(
-                                    new OpenLayers.Geometry.MultiLineString([
-                                        sourceLines[k]
-                                    ])
-                                );
-                            }
-                        }
-                        sourceSplit = true;
-                        splits = splits[1];
-                    }
-                    if(splits.length) {
-                        // splice in new target parts
-                        splits.unshift(j, 1);
-                        Array.prototype.splice.apply(targetParts, splits);
-                        break;
-                    }
-                }
-            }
-            if(!sourceSplit) {
-                // source line was not hit
-                if(sourceParts.length) {
-                    // add line to existing multi
-                    sourceParts[sourceParts.length-1].addComponent(
-                        sourceLine.clone()
-                    );
-                } else {
-                    // create a fresh multi
-                    sourceParts = [
-                        new OpenLayers.Geometry.MultiLineString(
-                            sourceLine.clone()
-                        )
-                    ];
-                }
-            }
-        }
-        if(sourceParts && sourceParts.length > 1) {
-            sourceSplit = true;
-        } else {
-            sourceParts = [];
-        }
-        if(targetParts && targetParts.length > 1) {
-            targetSplit = true;
-        } else {
-            targetParts = [];
-        }
-        if(sourceSplit || targetSplit) {
-            if(mutual) {
-                results = [sourceParts, targetParts];
-            } else {
-                results = targetParts;
-            }
-        }
-        return results;
-    },
-    
-    /**
-     * Method: splitWith
-     * Split this geometry (the target) with the given geometry (the source).
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>} A geometry used to split this
-     *     geometry (the source).
-     * options - {Object} Properties of this object will be used to determine
-     *     how the split is conducted.
-     *
-     * Valid options:
-     * mutual - {Boolean} Split the source geometry in addition to the target
-     *     geometry.  Default is false.
-     * edge - {Boolean} Allow splitting when only edges intersect.  Default is
-     *     true.  If false, a vertex on the source must be within the tolerance
-     *     distance of the intersection to be considered a split.
-     * tolerance - {Number} If a non-null value is provided, intersections
-     *     within the tolerance distance of an existing vertex on the source
-     *     will be assumed to occur at the vertex.
-     * 
-     * Returns:
-     * {Array} A list of geometries (of this same type as the target) that
-     *     result from splitting the target with the source geometry.  The
-     *     source and target geometry will remain unmodified.  If no split
-     *     results, null will be returned.  If mutual is true and a split
-     *     results, return will be an array of two arrays - the first will be
-     *     all geometries that result from splitting the source geometry and
-     *     the second will be all geometries that result from splitting the
-     *     target geometry.
-     */
-    splitWith: function(geometry, options) {
-        var results = null;
-        var mutual = options && options.mutual;
-        var splits, targetLine, sourceLines, sourceSplit, targetSplit, sourceParts, targetParts;
-        if(geometry instanceof OpenLayers.Geometry.LineString) {
-            targetParts = [];
-            sourceParts = [geometry];
-            for(var i=0, len=this.components.length; i<len; ++i) {
-                targetSplit = false;
-                targetLine = this.components[i];
-                for(var j=0; j<sourceParts.length; ++j) {
-                    splits = sourceParts[j].split(targetLine, options);
-                    if(splits) {
-                        if(mutual) {
-                            sourceLines = splits[0];
-                            if(sourceLines.length) {
-                                // splice in new source parts
-                                sourceLines.unshift(j, 1);
-                                Array.prototype.splice.apply(sourceParts, sourceLines);
-                                j += sourceLines.length - 2;
-                            }
-                            splits = splits[1];
-                            if(splits.length === 0) {
-                                splits = [targetLine.clone()];
-                            }
-                        }
-                        for(var k=0, klen=splits.length; k<klen; ++k) {
-                            if(k===0 && targetParts.length) {
-                                targetParts[targetParts.length-1].addComponent(
-                                    splits[k]
-                                );
-                            } else {
-                                targetParts.push(
-                                    new OpenLayers.Geometry.MultiLineString([
-                                        splits[k]
-                                    ])
-                                );
-                            }
-                        }
-                        targetSplit = true;                    
-                    }
-                }
-                if(!targetSplit) {
-                    // target component was not hit
-                    if(targetParts.length) {
-                        // add it to any existing multi-line
-                        targetParts[targetParts.length-1].addComponent(
-                            targetLine.clone()
-                        );
-                    } else {
-                        // or start with a fresh multi-line
-                        targetParts = [
-                            new OpenLayers.Geometry.MultiLineString([
-                                targetLine.clone()
-                            ])
-                        ];
-                    }
-                    
-                }
-            }
-        } else {
-            results = geometry.split(this);
-        }
-        if(sourceParts && sourceParts.length > 1) {
-            sourceSplit = true;
-        } else {
-            sourceParts = [];
-        }
-        if(targetParts && targetParts.length > 1) {
-            targetSplit = true;
-        } else {
-            targetParts = [];
-        }
-        if(sourceSplit || targetSplit) {
-            if(mutual) {
-                results = [sourceParts, targetParts];
-            } else {
-                results = targetParts;
-            }
-        }
-        return results;
-    },
-
-    CLASS_NAME: "OpenLayers.Geometry.MultiLineString"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Geometry/MultiPoint.js
+++ /dev/null
@@ -1,71 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Geometry/Collection.js
- * @requires OpenLayers/Geometry/Point.js
- */
-
-/**
- * Class: OpenLayers.Geometry.MultiPoint
- * MultiPoint is a collection of Points.  Create a new instance with the
- * <OpenLayers.Geometry.MultiPoint> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Geometry.Collection>
- *  - <OpenLayers.Geometry>
- */
-OpenLayers.Geometry.MultiPoint = OpenLayers.Class(
-  OpenLayers.Geometry.Collection, {
-
-    /**
-     * Property: componentTypes
-     * {Array(String)} An array of class names representing the types of
-     * components that the collection can include.  A null value means the
-     * component types are not restricted.
-     */
-    componentTypes: ["OpenLayers.Geometry.Point"],
-
-    /**
-     * Constructor: OpenLayers.Geometry.MultiPoint
-     * Create a new MultiPoint Geometry
-     *
-     * Parameters:
-     * components - {Array(<OpenLayers.Geometry.Point>)} 
-     *
-     * Returns:
-     * {<OpenLayers.Geometry.MultiPoint>}
-     */
-    initialize: function(components) {
-        OpenLayers.Geometry.Collection.prototype.initialize.apply(this, 
-                                                                  arguments);
-    },
-
-    /**
-     * APIMethod: addPoint
-     * Wrapper for <OpenLayers.Geometry.Collection.addComponent>
-     *
-     * Parameters:
-     * point - {<OpenLayers.Geometry.Point>} Point to be added
-     * index - {Integer} Optional index
-     */
-    addPoint: function(point, index) {
-        this.addComponent(point, index);
-    },
-    
-    /**
-     * APIMethod: removePoint
-     * Wrapper for <OpenLayers.Geometry.Collection.removeComponent>
-     *
-     * Parameters:
-     * point - {<OpenLayers.Geometry.Point>} Point to be removed
-     */
-    removePoint: function(point){
-        this.removeComponent(point);
-    },
-
-    CLASS_NAME: "OpenLayers.Geometry.MultiPoint"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Geometry/MultiPolygon.js
+++ /dev/null
@@ -1,47 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Geometry/Collection.js
- * @requires OpenLayers/Geometry/Polygon.js
- */
-
-/**
- * Class: OpenLayers.Geometry.MultiPolygon
- * MultiPolygon is a geometry with multiple <OpenLayers.Geometry.Polygon>
- * components.  Create a new instance with the <OpenLayers.Geometry.MultiPolygon>
- * constructor.
- * 
- * Inherits from:
- *  - <OpenLayers.Geometry.Collection>
- */
-OpenLayers.Geometry.MultiPolygon = OpenLayers.Class(
-  OpenLayers.Geometry.Collection, {
-
-    /**
-     * Property: componentTypes
-     * {Array(String)} An array of class names representing the types of
-     * components that the collection can include.  A null value means the
-     * component types are not restricted.
-     */
-    componentTypes: ["OpenLayers.Geometry.Polygon"],
-
-    /**
-     * Constructor: OpenLayers.Geometry.MultiPolygon
-     * Create a new MultiPolygon geometry
-     *
-     * Parameters:
-     * components - {Array(<OpenLayers.Geometry.Polygon>)} An array of polygons
-     *              used to generate the MultiPolygon
-     *
-     */
-    initialize: function(components) {
-        OpenLayers.Geometry.Collection.prototype.initialize.apply(this, 
-                                                                  arguments);
-    },
-
-    CLASS_NAME: "OpenLayers.Geometry.MultiPolygon"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Geometry/Point.js
+++ /dev/null
@@ -1,284 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Geometry.js
- */
-
-/**
- * Class: OpenLayers.Geometry.Point
- * Point geometry class. 
- * 
- * Inherits from:
- *  - <OpenLayers.Geometry> 
- */
-OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, {
-
-    /** 
-     * APIProperty: x 
-     * {float} 
-     */
-    x: null,
-
-    /** 
-     * APIProperty: y 
-     * {float} 
-     */
-    y: null,
-
-    /**
-     * Constructor: OpenLayers.Geometry.Point
-     * Construct a point geometry.
-     *
-     * Parameters:
-     * x - {float} 
-     * y - {float}
-     * 
-     */
-    initialize: function(x, y) {
-        OpenLayers.Geometry.prototype.initialize.apply(this, arguments);
-        
-        this.x = parseFloat(x);
-        this.y = parseFloat(y);
-    },
-
-    /**
-     * APIMethod: clone
-     * 
-     * Returns:
-     * {<OpenLayers.Geometry.Point>} An exact clone of this OpenLayers.Geometry.Point
-     */
-    clone: function(obj) {
-        if (obj == null) {
-            obj = new OpenLayers.Geometry.Point(this.x, this.y);
-        }
-
-        // catch any randomly tagged-on properties
-        OpenLayers.Util.applyDefaults(obj, this);
-
-        return obj;
-    },
-
-    /** 
-     * Method: calculateBounds
-     * Create a new Bounds based on the lon/lat
-     */
-    calculateBounds: function () {
-        this.bounds = new OpenLayers.Bounds(this.x, this.y,
-                                            this.x, this.y);
-    },
-
-    /**
-     * APIMethod: distanceTo
-     * Calculate the closest distance between two geometries (on the x-y plane).
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>} The target geometry.
-     * options - {Object} Optional properties for configuring the distance
-     *     calculation.
-     *
-     * Valid options:
-     * details - {Boolean} Return details from the distance calculation.
-     *     Default is false.
-     * edge - {Boolean} Calculate the distance from this geometry to the
-     *     nearest edge of the target geometry.  Default is true.  If true,
-     *     calling distanceTo from a geometry that is wholly contained within
-     *     the target will result in a non-zero distance.  If false, whenever
-     *     geometries intersect, calling distanceTo will return 0.  If false,
-     *     details cannot be returned.
-     *
-     * Returns:
-     * {Number | Object} The distance between this geometry and the target.
-     *     If details is true, the return will be an object with distance,
-     *     x0, y0, x1, and x2 properties.  The x0 and y0 properties represent
-     *     the coordinates of the closest point on this geometry. The x1 and y1
-     *     properties represent the coordinates of the closest point on the
-     *     target geometry.
-     */
-    distanceTo: function(geometry, options) {
-        var edge = !(options && options.edge === false);
-        var details = edge && options && options.details;
-        var distance, x0, y0, x1, y1, result;
-        if(geometry instanceof OpenLayers.Geometry.Point) {
-            x0 = this.x;
-            y0 = this.y;
-            x1 = geometry.x;
-            y1 = geometry.y;
-            distance = Math.sqrt(Math.pow(x0 - x1, 2) + Math.pow(y0 - y1, 2));
-            result = !details ?
-                distance : {x0: x0, y0: y0, x1: x1, y1: y1, distance: distance};
-        } else {
-            result = geometry.distanceTo(this, options);
-            if(details) {
-                // switch coord order since this geom is target
-                result = {
-                    x0: result.x1, y0: result.y1,
-                    x1: result.x0, y1: result.y0,
-                    distance: result.distance
-                };
-            }
-        }
-        return result;
-    },
-    
-    /** 
-     * APIMethod: equals
-     * Determine whether another geometry is equivalent to this one.  Geometries
-     *     are considered equivalent if all components have the same coordinates.
-     * 
-     * Parameters:
-     * geom - {<OpenLayers.Geometry.Point>} The geometry to test. 
-     *
-     * Returns:
-     * {Boolean} The supplied geometry is equivalent to this geometry.
-     */
-    equals: function(geom) {
-        var equals = false;
-        if (geom != null) {
-            equals = ((this.x == geom.x && this.y == geom.y) ||
-                      (isNaN(this.x) && isNaN(this.y) && isNaN(geom.x) && isNaN(geom.y)));
-        }
-        return equals;
-    },
-    
-    /**
-     * Method: toShortString
-     *
-     * Returns:
-     * {String} Shortened String representation of Point object. 
-     *         (ex. <i>"5, 42"</i>)
-     */
-    toShortString: function() {
-        return (this.x + ", " + this.y);
-    },
-    
-    /**
-     * APIMethod: move
-     * Moves a geometry by the given displacement along positive x and y axes.
-     *     This modifies the position of the geometry and clears the cached
-     *     bounds.
-     *
-     * Parameters:
-     * x - {Float} Distance to move geometry in positive x direction. 
-     * y - {Float} Distance to move geometry in positive y direction.
-     */
-    move: function(x, y) {
-        this.x = this.x + x;
-        this.y = this.y + y;
-        this.clearBounds();
-    },
-
-    /**
-     * APIMethod: rotate
-     * Rotate a point around another.
-     *
-     * Parameters:
-     * angle - {Float} Rotation angle in degrees (measured counterclockwise
-     *                 from the positive x-axis)
-     * origin - {<OpenLayers.Geometry.Point>} Center point for the rotation
-     */
-    rotate: function(angle, origin) {
-        angle *= Math.PI / 180;
-        var radius = this.distanceTo(origin);
-        var theta = angle + Math.atan2(this.y - origin.y, this.x - origin.x);
-        this.x = origin.x + (radius * Math.cos(theta));
-        this.y = origin.y + (radius * Math.sin(theta));
-        this.clearBounds();
-    },
-    
-    /**
-     * APIMethod: getCentroid
-     *
-     * Returns:
-     * {<OpenLayers.Geometry.Point>} The centroid of the collection
-     */
-    getCentroid: function() {
-        return new OpenLayers.Geometry.Point(this.x, this.y);
-    },
-
-    /**
-     * APIMethod: resize
-     * Resize a point relative to some origin.  For points, this has the effect
-     *     of scaling a vector (from the origin to the point).  This method is
-     *     more useful on geometry collection subclasses.
-     *
-     * Parameters:
-     * scale - {Float} Ratio of the new distance from the origin to the old
-     *                 distance from the origin.  A scale of 2 doubles the
-     *                 distance between the point and origin.
-     * origin - {<OpenLayers.Geometry.Point>} Point of origin for resizing
-     * ratio - {Float} Optional x:y ratio for resizing.  Default ratio is 1.
-     * 
-     * Returns:
-     * {OpenLayers.Geometry} - The current geometry. 
-     */
-    resize: function(scale, origin, ratio) {
-        ratio = (ratio == undefined) ? 1 : ratio;
-        this.x = origin.x + (scale * ratio * (this.x - origin.x));
-        this.y = origin.y + (scale * (this.y - origin.y));
-        this.clearBounds();
-        return this;
-    },
-    
-    /**
-     * APIMethod: intersects
-     * Determine if the input geometry intersects this one.
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>} Any type of geometry.
-     *
-     * Returns:
-     * {Boolean} The input geometry intersects this one.
-     */
-    intersects: function(geometry) {
-        var intersect = false;
-        if(geometry.CLASS_NAME == "OpenLayers.Geometry.Point") {
-            intersect = this.equals(geometry);
-        } else {
-            intersect = geometry.intersects(this);
-        }
-        return intersect;
-    },
-    
-    /**
-     * APIMethod: transform
-     * Translate the x,y properties of the point from source to dest.
-     * 
-     * Parameters:
-     * source - {<OpenLayers.Projection>} 
-     * dest - {<OpenLayers.Projection>}
-     * 
-     * Returns:
-     * {<OpenLayers.Geometry>} 
-     */
-    transform: function(source, dest) {
-        if ((source && dest)) {
-            OpenLayers.Projection.transform(
-                this, source, dest); 
-            this.bounds = null;
-        }       
-        return this;
-    },
-
-    /**
-     * APIMethod: getVertices
-     * Return a list of all points in this geometry.
-     *
-     * Parameters:
-     * nodes - {Boolean} For lines, only return vertices that are
-     *     endpoints.  If false, for lines, only vertices that are not
-     *     endpoints will be returned.  If not provided, all vertices will
-     *     be returned.
-     *
-     * Returns:
-     * {Array} A list of all vertices in the geometry.
-     */
-    getVertices: function(nodes) {
-        return [this];
-    },
-
-    CLASS_NAME: "OpenLayers.Geometry.Point"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Geometry/Polygon.js
+++ /dev/null
@@ -1,260 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Geometry/Collection.js
- * @requires OpenLayers/Geometry/LinearRing.js
- */
-
-/**
- * Class: OpenLayers.Geometry.Polygon 
- * Polygon is a collection of Geometry.LinearRings. 
- * 
- * Inherits from:
- *  - <OpenLayers.Geometry.Collection> 
- *  - <OpenLayers.Geometry> 
- */
-OpenLayers.Geometry.Polygon = OpenLayers.Class(
-  OpenLayers.Geometry.Collection, {
-
-    /**
-     * Property: componentTypes
-     * {Array(String)} An array of class names representing the types of
-     * components that the collection can include.  A null value means the
-     * component types are not restricted.
-     */
-    componentTypes: ["OpenLayers.Geometry.LinearRing"],
-
-    /**
-     * Constructor: OpenLayers.Geometry.Polygon
-     * Constructor for a Polygon geometry. 
-     * The first ring (this.component[0])is the outer bounds of the polygon and 
-     * all subsequent rings (this.component[1-n]) are internal holes.
-     *
-     *
-     * Parameters:
-     * components - {Array(<OpenLayers.Geometry.LinearRing>)} 
-     */
-    initialize: function(components) {
-        OpenLayers.Geometry.Collection.prototype.initialize.apply(this, 
-                                                                  arguments);
-    },
-    
-    /** 
-     * APIMethod: getArea
-     * Calculated by subtracting the areas of the internal holes from the 
-     *   area of the outer hole.
-     * 
-     * Returns:
-     * {float} The area of the geometry
-     */
-    getArea: function() {
-        var area = 0.0;
-        if ( this.components && (this.components.length > 0)) {
-            area += Math.abs(this.components[0].getArea());
-            for (var i=1, len=this.components.length; i<len; i++) {
-                area -= Math.abs(this.components[i].getArea());
-            }
-        }
-        return area;
-    },
-
-    /** 
-     * APIMethod: getGeodesicArea
-     * Calculate the approximate area of the polygon were it projected onto
-     *     the earth.
-     *
-     * Parameters:
-     * projection - {<OpenLayers.Projection>} The spatial reference system
-     *     for the geometry coordinates.  If not provided, Geographic/WGS84 is
-     *     assumed.
-     * 
-     * Reference:
-     * Robert. G. Chamberlain and William H. Duquette, "Some Algorithms for
-     *     Polygons on a Sphere", JPL Publication 07-03, Jet Propulsion
-     *     Laboratory, Pasadena, CA, June 2007 http://trs-new.jpl.nasa.gov/dspace/handle/2014/40409
-     *
-     * Returns:
-     * {float} The approximate geodesic area of the polygon in square meters.
-     */
-    getGeodesicArea: function(projection) {
-        var area = 0.0;
-        if(this.components && (this.components.length > 0)) {
-            area += Math.abs(this.components[0].getGeodesicArea(projection));
-            for(var i=1, len=this.components.length; i<len; i++) {
-                area -= Math.abs(this.components[i].getGeodesicArea(projection));
-            }
-        }
-        return area;
-    },
-
-    /**
-     * Method: containsPoint
-     * Test if a point is inside a polygon.  Points on a polygon edge are
-     *     considered inside.
-     *
-     * Parameters:
-     * point - {<OpenLayers.Geometry.Point>}
-     *
-     * Returns:
-     * {Boolean | Number} The point is inside the polygon.  Returns 1 if the
-     *     point is on an edge.  Returns boolean otherwise.
-     */
-    containsPoint: function(point) {
-        var numRings = this.components.length;
-        var contained = false;
-        if(numRings > 0) {
-            // check exterior ring - 1 means on edge, boolean otherwise
-            contained = this.components[0].containsPoint(point);
-            if(contained !== 1) {
-                if(contained && numRings > 1) {
-                    // check interior rings
-                    var hole;
-                    for(var i=1; i<numRings; ++i) {
-                        hole = this.components[i].containsPoint(point);
-                        if(hole) {
-                            if(hole === 1) {
-                                // on edge
-                                contained = 1;
-                            } else {
-                                // in hole
-                                contained = false;
-                            }                            
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-        return contained;
-    },
-
-    /**
-     * APIMethod: intersects
-     * Determine if the input geometry intersects this one.
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>} Any type of geometry.
-     *
-     * Returns:
-     * {Boolean} The input geometry intersects this one.
-     */
-    intersects: function(geometry) {
-        var intersect = false;
-        var i, len;
-        if(geometry.CLASS_NAME == "OpenLayers.Geometry.Point") {
-            intersect = this.containsPoint(geometry);
-        } else if(geometry.CLASS_NAME == "OpenLayers.Geometry.LineString" ||
-                  geometry.CLASS_NAME == "OpenLayers.Geometry.LinearRing") {
-            // check if rings/linestrings intersect
-            for(i=0, len=this.components.length; i<len; ++i) {
-                intersect = geometry.intersects(this.components[i]);
-                if(intersect) {
-                    break;
-                }
-            }
-            if(!intersect) {
-                // check if this poly contains points of the ring/linestring
-                for(i=0, len=geometry.components.length; i<len; ++i) {
-                    intersect = this.containsPoint(geometry.components[i]);
-                    if(intersect) {
-                        break;
-                    }
-                }
-            }
-        } else {
-            for(i=0, len=geometry.components.length; i<len; ++ i) {
-                intersect = this.intersects(geometry.components[i]);
-                if(intersect) {
-                    break;
-                }
-            }
-        }
-        // check case where this poly is wholly contained by another
-        if(!intersect && geometry.CLASS_NAME == "OpenLayers.Geometry.Polygon") {
-            // exterior ring points will be contained in the other geometry
-            var ring = this.components[0];
-            for(i=0, len=ring.components.length; i<len; ++i) {
-                intersect = geometry.containsPoint(ring.components[i]);
-                if(intersect) {
-                    break;
-                }
-            }
-        }
-        return intersect;
-    },
-
-    /**
-     * APIMethod: distanceTo
-     * Calculate the closest distance between two geometries (on the x-y plane).
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>} The target geometry.
-     * options - {Object} Optional properties for configuring the distance
-     *     calculation.
-     *
-     * Valid options:
-     * details - {Boolean} Return details from the distance calculation.
-     *     Default is false.
-     * edge - {Boolean} Calculate the distance from this geometry to the
-     *     nearest edge of the target geometry.  Default is true.  If true,
-     *     calling distanceTo from a geometry that is wholly contained within
-     *     the target will result in a non-zero distance.  If false, whenever
-     *     geometries intersect, calling distanceTo will return 0.  If false,
-     *     details cannot be returned.
-     *
-     * Returns:
-     * {Number | Object} The distance between this geometry and the target.
-     *     If details is true, the return will be an object with distance,
-     *     x0, y0, x1, and y1 properties.  The x0 and y0 properties represent
-     *     the coordinates of the closest point on this geometry. The x1 and y1
-     *     properties represent the coordinates of the closest point on the
-     *     target geometry.
-     */
-    distanceTo: function(geometry, options) {
-        var edge = !(options && options.edge === false);
-        var result;
-        // this is the case where we might not be looking for distance to edge
-        if(!edge && this.intersects(geometry)) {
-            result = 0;
-        } else {
-            result = OpenLayers.Geometry.Collection.prototype.distanceTo.apply(
-                this, [geometry, options]
-            );
-        }
-        return result;
-    },
-
-    CLASS_NAME: "OpenLayers.Geometry.Polygon"
-});
-
-/**
- * APIMethod: createRegularPolygon
- * Create a regular polygon around a radius. Useful for creating circles 
- * and the like.
- *
- * Parameters:
- * origin - {<OpenLayers.Geometry.Point>} center of polygon.
- * radius - {Float} distance to vertex, in map units.
- * sides - {Integer} Number of sides. 20 approximates a circle.
- * rotation - {Float} original angle of rotation, in degrees.
- */
-OpenLayers.Geometry.Polygon.createRegularPolygon = function(origin, radius, sides, rotation) {  
-    var angle = Math.PI * ((1/sides) - (1/2));
-    if(rotation) {
-        angle += (rotation / 180) * Math.PI;
-    }
-    var rotatedAngle, x, y;
-    var points = [];
-    for(var i=0; i<sides; ++i) {
-        rotatedAngle = angle + (i * 2 * Math.PI / sides);
-        x = origin.x + (radius * Math.cos(rotatedAngle));
-        y = origin.y + (radius * Math.sin(rotatedAngle));
-        points.push(new OpenLayers.Geometry.Point(x, y));
-    }
-    var ring = new OpenLayers.Geometry.LinearRing(points);
-    return new OpenLayers.Geometry.Polygon([ring]);
-};
-

--- a/labs/openlayers/lib/OpenLayers/Geometry/Rectangle.js
+++ /dev/null
@@ -1,100 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Geometry.js
- */
-
-/**
- * Class: OpenLayers.Geometry.Rectangle
- * This class is *not supported*, and probably isn't what you're looking for.
- *     Instead, most users probably want something like:
- *     (code)
- *     var poly = new OpenLayers.Bounds(0,0,10,10).toGeometry();
- *     (end)
- *     This will create a rectangular Polygon geometry. 
- * 
- * Inherits:
- *  - <OpenLayers.Geometry>
- */
-
-OpenLayers.Geometry.Rectangle = OpenLayers.Class(OpenLayers.Geometry, {
-
-    /** 
-     * Property: x
-     * {Float}
-     */
-    x: null,
-
-    /** 
-     * Property: y
-     * {Float}
-     */
-    y: null,
-
-    /** 
-     * Property: width
-     * {Float}
-     */
-    width: null,
-
-    /** 
-     * Property: height
-     * {Float}
-     */
-    height: null,
-
-    /**
-     * Constructor: OpenLayers.Geometry.Rectangle
-     * 
-     * Parameters:
-     * points - {Array(<OpenLayers.Geometry.Point>}
-     */
-    initialize: function(x, y, width, height) {
-        OpenLayers.Geometry.prototype.initialize.apply(this, arguments);
-        
-        this.x = x;
-        this.y = y;
-
-        this.width = width;
-        this.height = height;
-    },
-    
-    /**
-     * Method: calculateBounds
-     * Recalculate the bounds for the geometry.
-     */
-    calculateBounds: function() {
-        this.bounds = new OpenLayers.Bounds(this.x, this.y,
-                                            this.x + this.width, 
-                                            this.y + this.height);
-    },
-    
-    
-    /**
-     * APIMethod: getLength
-     * 
-     * Returns:
-     * {Float} The length of the geometry
-     */
-    getLength: function() {
-        var length = (2 * this.width) + (2 * this.height);
-        return length;
-    },
-
-    /**
-     * APIMethod: getArea
-     * 
-     * Returns:
-     * {Float} The area of the geometry
-     */
-    getArea: function() {
-        var area = this.width * this.height;
-        return area;
-    },    
-
-    CLASS_NAME: "OpenLayers.Geometry.Rectangle"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Geometry/Surface.js
+++ /dev/null
@@ -1,18 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Geometry.js
- */
-
-OpenLayers.Geometry.Surface = OpenLayers.Class(OpenLayers.Geometry, {
-
-    initialize: function() {
-        OpenLayers.Geometry.prototype.initialize.apply(this, arguments);
-    },
-
-    CLASS_NAME: "OpenLayers.Geometry.Surface"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Handler.js
+++ /dev/null
@@ -1,288 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Events.js
- */
-
-/**
- * Class: OpenLayers.Handler
- * Base class to construct a higher-level handler for event sequences.  All
- *     handlers have activate and deactivate methods.  In addition, they have
- *     methods named like browser events.  When a handler is activated, any
- *     additional methods named like a browser event is registered as a
- *     listener for the corresponding event.  When a handler is deactivated,
- *     those same methods are unregistered as event listeners.
- *
- * Handlers also typically have a callbacks object with keys named like
- *     the abstracted events or event sequences that they are in charge of
- *     handling.  The controls that wrap handlers define the methods that
- *     correspond to these abstract events - so instead of listening for
- *     individual browser events, they only listen for the abstract events
- *     defined by the handler.
- *     
- * Handlers are created by controls, which ultimately have the responsibility
- *     of making changes to the the state of the application.  Handlers
- *     themselves may make temporary changes, but in general are expected to
- *     return the application in the same state that they found it.
- */
-OpenLayers.Handler = OpenLayers.Class({
-
-    /**
-     * Property: id
-     * {String}
-     */
-    id: null,
-        
-    /**
-     * APIProperty: control
-     * {<OpenLayers.Control>}. The control that initialized this handler.  The
-     *     control is assumed to have a valid map property - that map is used
-     *     in the handler's own setMap method.
-     */
-    control: null,
-
-    /**
-     * Property: map
-     * {<OpenLayers.Map>}
-     */
-    map: null,
-
-    /**
-     * APIProperty: keyMask
-     * {Integer} Use bitwise operators and one or more of the OpenLayers.Handler
-     *     constants to construct a keyMask.  The keyMask is used by
-     *     <checkModifiers>.  If the keyMask matches the combination of keys
-     *     down on an event, checkModifiers returns true.
-     *
-     * Example:
-     * (code)
-     *     // handler only responds if the Shift key is down
-     *     handler.keyMask = OpenLayers.Handler.MOD_SHIFT;
-     *
-     *     // handler only responds if Ctrl-Shift is down
-     *     handler.keyMask = OpenLayers.Handler.MOD_SHIFT |
-     *                       OpenLayers.Handler.MOD_CTRL;
-     * (end)
-     */
-    keyMask: null,
-
-    /**
-     * Property: active
-     * {Boolean}
-     */
-    active: false,
-    
-    /**
-     * Property: evt
-     * {Event} This property references the last event handled by the handler.
-     *     Note that this property is not part of the stable API.  Use of the
-     *     evt property should be restricted to controls in the library
-     *     or other applications that are willing to update with changes to
-     *     the OpenLayers code.
-     */
-    evt: null,
-
-    /**
-     * Constructor: OpenLayers.Handler
-     * Construct a handler.
-     *
-     * Parameters:
-     * control - {<OpenLayers.Control>} The control that initialized this
-     *     handler.  The control is assumed to have a valid map property; that
-     *     map is used in the handler's own setMap method.  If a map property
-     *     is present in the options argument it will be used instead.
-     * callbacks - {Object} An object whose properties correspond to abstracted
-     *     events or sequences of browser events.  The values for these
-     *     properties are functions defined by the control that get called by
-     *     the handler.
-     * options - {Object} An optional object whose properties will be set on
-     *     the handler.
-     */
-    initialize: function(control, callbacks, options) {
-        OpenLayers.Util.extend(this, options);
-        this.control = control;
-        this.callbacks = callbacks;
-
-        var map = this.map || control.map;
-        if (map) {
-            this.setMap(map); 
-        }
-        
-        this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
-    },
-    
-    /**
-     * Method: setMap
-     */
-    setMap: function (map) {
-        this.map = map;
-    },
-
-    /**
-     * Method: checkModifiers
-     * Check the keyMask on the handler.  If no <keyMask> is set, this always
-     *     returns true.  If a <keyMask> is set and it matches the combination
-     *     of keys down on an event, this returns true.
-     *
-     * Returns:
-     * {Boolean} The keyMask matches the keys down on an event.
-     */
-    checkModifiers: function (evt) {
-        if(this.keyMask == null) {
-            return true;
-        }
-        /* calculate the keyboard modifier mask for this event */
-        var keyModifiers =
-            (evt.shiftKey ? OpenLayers.Handler.MOD_SHIFT : 0) |
-            (evt.ctrlKey  ? OpenLayers.Handler.MOD_CTRL  : 0) |
-            (evt.altKey   ? OpenLayers.Handler.MOD_ALT   : 0);
-    
-        /* if it differs from the handler object's key mask,
-           bail out of the event handler */
-        return (keyModifiers == this.keyMask);
-    },
-
-    /**
-     * APIMethod: activate
-     * Turn on the handler.  Returns false if the handler was already active.
-     * 
-     * Returns: 
-     * {Boolean} The handler was activated.
-     */
-    activate: function() {
-        if(this.active) {
-            return false;
-        }
-        // register for event handlers defined on this class.
-        var events = OpenLayers.Events.prototype.BROWSER_EVENTS;
-        for (var i=0, len=events.length; i<len; i++) {
-            if (this[events[i]]) {
-                this.register(events[i], this[events[i]]); 
-            }
-        } 
-        this.active = true;
-        return true;
-    },
-    
-    /**
-     * APIMethod: deactivate
-     * Turn off the handler.  Returns false if the handler was already inactive.
-     * 
-     * Returns:
-     * {Boolean} The handler was deactivated.
-     */
-    deactivate: function() {
-        if(!this.active) {
-            return false;
-        }
-        // unregister event handlers defined on this class.
-        var events = OpenLayers.Events.prototype.BROWSER_EVENTS;
-        for (var i=0, len=events.length; i<len; i++) {
-            if (this[events[i]]) {
-                this.unregister(events[i], this[events[i]]); 
-            }
-        } 
-        this.active = false;
-        return true;
-    },
-
-    /**
-    * Method: callback
-    * Trigger the control's named callback with the given arguments
-    *
-    * Parameters:
-    * name - {String} The key for the callback that is one of the properties
-    *     of the handler's callbacks object.
-    * args - {Array(*)} An array of arguments (any type) with which to call 
-    *     the callback (defined by the control).
-    */
-    callback: function (name, args) {
-        if (name && this.callbacks[name]) {
-            this.callbacks[name].apply(this.control, args);
-        }
-    },
-
-    /**
-    * Method: register
-    * register an event on the map
-    */
-    register: function (name, method) {
-        // TODO: deal with registerPriority in 3.0
-        this.map.events.registerPriority(name, this, method);
-        this.map.events.registerPriority(name, this, this.setEvent);
-    },
-
-    /**
-    * Method: unregister
-    * unregister an event from the map
-    */
-    unregister: function (name, method) {
-        this.map.events.unregister(name, this, method);   
-        this.map.events.unregister(name, this, this.setEvent);
-    },
-    
-    /**
-     * Method: setEvent
-     * With each registered browser event, the handler sets its own evt
-     *     property.  This property can be accessed by controls if needed
-     *     to get more information about the event that the handler is
-     *     processing.
-     *
-     * This allows modifier keys on the event to be checked (alt, shift,
-     *     and ctrl cannot be checked with the keyboard handler).  For a
-     *     control to determine which modifier keys are associated with the
-     *     event that a handler is currently processing, it should access
-     *     (code)handler.evt.altKey || handler.evt.shiftKey ||
-     *     handler.evt.ctrlKey(end).
-     *
-     * Parameters:
-     * evt - {Event} The browser event.
-     */
-    setEvent: function(evt) {
-        this.evt = evt;
-        return true;
-    },
-
-    /**
-     * Method: destroy
-     * Deconstruct the handler.
-     */
-    destroy: function () {
-        // unregister event listeners
-        this.deactivate();
-        // eliminate circular references
-        this.control = this.map = null;        
-    },
-
-    CLASS_NAME: "OpenLayers.Handler"
-});
-
-/**
- * Constant: OpenLayers.Handler.MOD_NONE
- * If set as the <keyMask>, <checkModifiers> returns false if any key is down.
- */
-OpenLayers.Handler.MOD_NONE  = 0;
-
-/**
- * Constant: OpenLayers.Handler.MOD_SHIFT
- * If set as the <keyMask>, <checkModifiers> returns false if Shift is down.
- */
-OpenLayers.Handler.MOD_SHIFT = 1;
-
-/**
- * Constant: OpenLayers.Handler.MOD_CTRL
- * If set as the <keyMask>, <checkModifiers> returns false if Ctrl is down.
- */
-OpenLayers.Handler.MOD_CTRL  = 2;
-
-/**
- * Constant: OpenLayers.Handler.MOD_ALT
- * If set as the <keyMask>, <checkModifiers> returns false if Alt is down.
- */
-OpenLayers.Handler.MOD_ALT   = 4;
-
-
-

--- a/labs/openlayers/lib/OpenLayers/Handler/Box.js
+++ /dev/null
@@ -1,222 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Handler.js
- * @requires OpenLayers/Handler/Drag.js
- */
-
-/**
- * Class: OpenLayers.Handler.Box
- * Handler for dragging a rectangle across the map.  Box is displayed 
- * on mouse down, moves on mouse move, and is finished on mouse up.
- *
- * Inherits from:
- *  - <OpenLayers.Handler> 
- */
-OpenLayers.Handler.Box = OpenLayers.Class(OpenLayers.Handler, {
-
-    /** 
-     * Property: dragHandler 
-     * {<OpenLayers.Handler.Drag>} 
-     */
-    dragHandler: null,
-
-    /**
-     * APIProperty: boxDivClassName
-     * {String} The CSS class to use for drawing the box. Default is
-     *     olHandlerBoxZoomBox
-     */
-    boxDivClassName: 'olHandlerBoxZoomBox',
-    
-    /**
-     * Property: boxCharacteristics
-     * {Object} Caches some box characteristics from css. This is used
-     *     by the getBoxCharacteristics method.
-     */
-    boxCharacteristics: null,
-
-    /**
-     * Constructor: OpenLayers.Handler.Box
-     *
-     * Parameters:
-     * control - {<OpenLayers.Control>} 
-     * callbacks - {Object} An object containing a single function to be
-     *                          called when the drag operation is finished.
-     *                          The callback should expect to recieve a single
-     *                          argument, the point geometry.
-     * options - {Object} 
-     */
-    initialize: function(control, callbacks, options) {
-        OpenLayers.Handler.prototype.initialize.apply(this, arguments);
-        var callbacks = {
-            "down": this.startBox, 
-            "move": this.moveBox, 
-            "out":  this.removeBox,
-            "up":   this.endBox
-        };
-        this.dragHandler = new OpenLayers.Handler.Drag(
-                                this, callbacks, {keyMask: this.keyMask});
-    },
-
-    /**
-     * Method: destroy
-     */
-    destroy: function() {
-        if (this.dragHandler) {
-            this.dragHandler.destroy();
-            this.dragHandler = null;
-        }            
-        OpenLayers.Handler.prototype.destroy.apply(this, arguments);
-    },
-
-    /**
-     * Method: setMap
-     */
-    setMap: function (map) {
-        OpenLayers.Handler.prototype.setMap.apply(this, arguments);
-        if (this.dragHandler) {
-            this.dragHandler.setMap(map);
-        }
-    },
-
-    /**
-    * Method: startBox
-    *
-    * Parameters:
-    * evt - {Event} 
-    */
-    startBox: function (xy) {
-        this.zoomBox = OpenLayers.Util.createDiv('zoomBox',
-                                                 this.dragHandler.start);
-        this.zoomBox.className = this.boxDivClassName;                                         
-        this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
-        this.map.viewPortDiv.appendChild(this.zoomBox);
-
-        OpenLayers.Element.addClass(
-            this.map.viewPortDiv, "olDrawBox"
-        );
-    },
-
-    /**
-    * Method: moveBox
-    */
-    moveBox: function (xy) {
-        var startX = this.dragHandler.start.x;
-        var startY = this.dragHandler.start.y;
-        var deltaX = Math.abs(startX - xy.x);
-        var deltaY = Math.abs(startY - xy.y);
-        this.zoomBox.style.width = Math.max(1, deltaX) + "px";
-        this.zoomBox.style.height = Math.max(1, deltaY) + "px";
-        this.zoomBox.style.left = xy.x < startX ? xy.x+"px" : startX+"px";
-        this.zoomBox.style.top = xy.y < startY ? xy.y+"px" : startY+"px";
-
-        // depending on the box model, modify width and height to take borders
-        // of the box into account
-        var box = this.getBoxCharacteristics();
-        if (box.newBoxModel) {
-            if (xy.x > startX) {
-                this.zoomBox.style.width =
-                    Math.max(1, deltaX - box.xOffset) + "px";
-            }
-            if (xy.y > startY) {
-                this.zoomBox.style.height =
-                    Math.max(1, deltaY - box.yOffset) + "px";
-            }
-        }
-    },
-
-    /**
-    * Method: endBox
-    */
-    endBox: function(end) {
-        var result;
-        if (Math.abs(this.dragHandler.start.x - end.x) > 5 ||    
-            Math.abs(this.dragHandler.start.y - end.y) > 5) {   
-            var start = this.dragHandler.start;
-            var top = Math.min(start.y, end.y);
-            var bottom = Math.max(start.y, end.y);
-            var left = Math.min(start.x, end.x);
-            var right = Math.max(start.x, end.x);
-            result = new OpenLayers.Bounds(left, bottom, right, top);
-        } else {
-            result = this.dragHandler.start.clone(); // i.e. OL.Pixel
-        } 
-        this.removeBox();
-
-        this.callback("done", [result]);
-    },
-
-    /**
-     * Method: removeBox
-     * Remove the zoombox from the screen and nullify our reference to it.
-     */
-    removeBox: function() {
-        this.map.viewPortDiv.removeChild(this.zoomBox);
-        this.zoomBox = null;
-        this.boxCharacteristics = null;
-        OpenLayers.Element.removeClass(
-            this.map.viewPortDiv, "olDrawBox"
-        );
-
-    },
-
-    /**
-     * Method: activate
-     */
-    activate: function () {
-        if (OpenLayers.Handler.prototype.activate.apply(this, arguments)) {
-            this.dragHandler.activate();
-            return true;
-        } else {
-            return false;
-        }
-    },
-
-    /**
-     * Method: deactivate
-     */
-    deactivate: function () {
-        if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
-            this.dragHandler.deactivate();
-            return true;
-        } else {
-            return false;
-        }
-    },
-    
-    /**
-     * Method: getCharacteristics
-     * Determines offset and box model for a box.
-     * 
-     * Returns:
-     * {Object} a hash with the following properties:
-     *     - xOffset - Corner offset in x-direction
-     *     - yOffset - Corner offset in y-direction
-     *     - newBoxModel - true for all browsers except IE in quirks mode
-     */
-    getBoxCharacteristics: function() {
-        if (!this.boxCharacteristics) {
-            var xOffset = parseInt(OpenLayers.Element.getStyle(this.zoomBox,
-                "border-left-width")) + parseInt(OpenLayers.Element.getStyle(
-                this.zoomBox, "border-right-width")) + 1;
-            var yOffset = parseInt(OpenLayers.Element.getStyle(this.zoomBox,
-                "border-top-width")) + parseInt(OpenLayers.Element.getStyle(
-                this.zoomBox, "border-bottom-width")) + 1;
-            // all browsers use the new box model, except IE in quirks mode
-            var newBoxModel = OpenLayers.Util.getBrowserName() == "msie" ?
-                document.compatMode != "BackCompat" : true;
-            this.boxCharacteristics = {
-                xOffset: xOffset,
-                yOffset: yOffset,
-                newBoxModel: newBoxModel
-            };
-        }
-        return this.boxCharacteristics;
-    },
-
-    CLASS_NAME: "OpenLayers.Handler.Box"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Handler/Click.js
+++ /dev/null
@@ -1,326 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Handler.js
- */
-
-/**
- * Class: OpenLayers.Handler.Click
- * A handler for mouse clicks.  The intention of this handler is to give
- *     controls more flexibility with handling clicks.  Browsers trigger
- *     click events twice for a double-click.  In addition, the mousedown,
- *     mousemove, mouseup sequence fires a click event.  With this handler,
- *     controls can decide whether to ignore clicks associated with a double
- *     click.  By setting a <pixelTolerance>, controls can also ignore clicks
- *     that include a drag.  Create a new instance with the
- *     <OpenLayers.Handler.Click> constructor.
- * 
- * Inherits from:
- *  - <OpenLayers.Handler> 
- */
-OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
-
-    /**
-     * APIProperty: delay
-     * {Number} Number of milliseconds between clicks before the event is
-     *     considered a double-click.
-     */
-    delay: 300,
-    
-    /**
-     * APIProperty: single
-     * {Boolean} Handle single clicks.  Default is true.  If false, clicks
-     * will not be reported.  If true, single-clicks will be reported.
-     */
-    single: true,
-    
-    /**
-     * APIProperty: double
-     * {Boolean} Handle double-clicks.  Default is false.
-     */
-    'double': false,
-    
-    /**
-     * APIProperty: pixelTolerance
-     * {Number} Maximum number of pixels between mouseup and mousedown for an
-     *     event to be considered a click.  Default is 0.  If set to an
-     *     integer value, clicks with a drag greater than the value will be
-     *     ignored.  This property can only be set when the handler is
-     *     constructed.
-     */
-    pixelTolerance: 0,
-    
-    /**
-     * APIProperty: stopSingle
-     * {Boolean} Stop other listeners from being notified of clicks.  Default
-     *     is false.  If true, any click listeners registered before this one
-     *     will not be notified of *any* click event (associated with double
-     *     or single clicks).
-     */
-    stopSingle: false,
-    
-    /**
-     * APIProperty: stopDouble
-     * {Boolean} Stop other listeners from being notified of double-clicks.
-     *     Default is false.  If true, any click listeners registered before
-     *     this one will not be notified of *any* double-click events.
-     * 
-     * The one caveat with stopDouble is that given a map with two click
-     *     handlers, one with stopDouble true and the other with stopSingle
-     *     true, the stopSingle handler should be activated last to get
-     *     uniform cross-browser performance.  Since IE triggers one click
-     *     with a dblclick and FF triggers two, if a stopSingle handler is
-     *     activated first, all it gets in IE is a single click when the
-     *     second handler stops propagation on the dblclick.
-     */
-    stopDouble: false,
-
-    /**
-     * Property: timerId
-     * {Number} The id of the timeout waiting to clear the <delayedCall>.
-     */
-    timerId: null,
-    
-    /**
-     * Property: down
-     * {<OpenLayers.Pixel>} The pixel location of the last mousedown.
-     */
-    down: null,
-    
-    /**
-     * Property: rightclickTimerId
-     * {Number} The id of the right mouse timeout waiting to clear the 
-     *     <delayedEvent>.
-     */
-    rightclickTimerId: null,
-    
-    /**
-     * Constructor: OpenLayers.Handler.Click
-     * Create a new click handler.
-     * 
-     * Parameters:
-     * control - {<OpenLayers.Control>} The control that is making use of
-     *     this handler.  If a handler is being used without a control, the
-     *     handler's setMap method must be overridden to deal properly with
-     *     the map.
-     * callbacks - {Object} An object with keys corresponding to callbacks
-     *     that will be called by the handler. The callbacks should
-     *     expect to recieve a single argument, the click event.
-     *     Callbacks for 'click' and 'dblclick' are supported.
-     * options - {Object} Optional object whose properties will be set on the
-     *     handler.
-     */
-    initialize: function(control, callbacks, options) {
-        OpenLayers.Handler.prototype.initialize.apply(this, arguments);
-        // optionally register for mouseup and mousedown
-        if(this.pixelTolerance != null) {
-            this.mousedown = function(evt) {
-                this.down = evt.xy;
-                return true;
-            };
-        }
-    },
-    
-    /**
-     * Method: mousedown
-     * Handle mousedown.  Only registered as a listener if pixelTolerance is
-     *     a non-zero value at construction.
-     *
-     * Returns:
-     * {Boolean} Continue propagating this event.
-     */
-    mousedown: null,
-
-    /**
-     * Method: mouseup
-     * Handle mouseup.  Installed to support collection of right mouse events.
-     * 
-     * Returns:
-     * {Boolean} Continue propagating this event.
-     */
-    mouseup:  function (evt) {
-        var propagate = true;
-
-        // Collect right mouse clicks from the mouseup
-        //  IE - ignores the second right click in mousedown so using
-        //  mouseup instead
-        if (this.checkModifiers(evt) && 
-            this.control.handleRightClicks && 
-            OpenLayers.Event.isRightClick(evt)) {
-          propagate = this.rightclick(evt);
-        }
-
-        return propagate;
-    },
-    
-    /**
-     * Method: rightclick
-     * Handle rightclick.  For a dblrightclick, we get two clicks so we need 
-     *     to always register for dblrightclick to properly handle single 
-     *     clicks.
-     *     
-     * Returns:
-     * {Boolean} Continue propagating this event.
-     */
-    rightclick: function(evt) {
-        if(this.passesTolerance(evt)) {
-           if(this.rightclickTimerId != null) {
-                //Second click received before timeout this must be 
-                // a double click
-                this.clearTimer();      
-                this.callback('dblrightclick', [evt]);
-                return !this.stopDouble;
-            } else { 
-                //Set the rightclickTimerId, send evt only if double is 
-                // true else trigger single
-                var clickEvent = this['double'] ?
-                    OpenLayers.Util.extend({}, evt) : 
-                    this.callback('rightclick', [evt]);
-
-                var delayedRightCall = OpenLayers.Function.bind(
-                    this.delayedRightCall, 
-                    this, 
-                    clickEvent
-                );
-                this.rightclickTimerId = window.setTimeout(
-                    delayedRightCall, this.delay
-                );
-            } 
-        }
-        return !this.stopSingle;
-    },
-    
-    /**
-     * Method: delayedRightCall
-     * Sets <rightclickTimerId> to null.  And optionally triggers the 
-     *     rightclick callback if evt is set.
-     */
-    delayedRightCall: function(evt) {
-        this.rightclickTimerId = null;
-        if (evt) {
-           this.callback('rightclick', [evt]);
-        }
-        return !this.stopSingle;
-    },
-    
-    /**
-     * Method: dblclick
-     * Handle dblclick.  For a dblclick, we get two clicks in some browsers
-     *     (FF) and one in others (IE).  So we need to always register for
-     *     dblclick to properly handle single clicks.
-     *     
-     * Returns:
-     * {Boolean} Continue propagating this event.
-     */
-    dblclick: function(evt) {
-        if(this.passesTolerance(evt)) {
-            if(this["double"]) {
-                this.callback('dblclick', [evt]);
-            }
-            this.clearTimer();
-        }
-        return !this.stopDouble;
-    },
-    
-    /**
-     * Method: click
-     * Handle click.
-     *
-     * Returns:
-     * {Boolean} Continue propagating this event.
-     */
-    click: function(evt) {
-        if(this.passesTolerance(evt)) {
-            if(this.timerId != null) {
-                // already received a click
-                this.clearTimer();
-            } else {
-                // set the timer, send evt only if single is true
-                //use a clone of the event object because it will no longer 
-                //be a valid event object in IE in the timer callback
-                var clickEvent = this.single ?
-                    OpenLayers.Util.extend({}, evt) : null;
-                this.timerId = window.setTimeout(
-                    OpenLayers.Function.bind(this.delayedCall, this, clickEvent),
-                    this.delay
-                );
-            }
-        }
-        return !this.stopSingle;
-    },
-    
-    /**
-     * Method: passesTolerance
-     * Determine whether the event is within the optional pixel tolerance.  Note
-     *     that the pixel tolerance check only works if mousedown events get to
-     *     the listeners registered here.  If they are stopped by other elements,
-     *     the <pixelTolerance> will have no effect here (this method will always
-     *     return true).
-     *
-     * Returns:
-     * {Boolean} The click is within the pixel tolerance (if specified).
-     */
-    passesTolerance: function(evt) {
-        var passes = true;
-        if(this.pixelTolerance != null && this.down) {
-            var dpx = Math.sqrt(
-                Math.pow(this.down.x - evt.xy.x, 2) +
-                Math.pow(this.down.y - evt.xy.y, 2)
-            );
-            if(dpx > this.pixelTolerance) {
-                passes = false;
-            }
-        }
-        return passes;
-    },
-
-    /**
-     * Method: clearTimer
-     * Clear the timer and set <timerId> to null.
-     */
-    clearTimer: function() {
-        if(this.timerId != null) {
-            window.clearTimeout(this.timerId);
-            this.timerId = null;
-        }
-        if(this.rightclickTimerId != null) {
-            window.clearTimeout(this.rightclickTimerId);
-            this.rightclickTimerId = null;
-        }
-    },
-    
-    /**
-     * Method: delayedCall
-     * Sets <timerId> to null.  And optionally triggers the click callback if
-     *     evt is set.
-     */
-    delayedCall: function(evt) {
-        this.timerId = null;
-        if(evt) {
-            this.callback('click', [evt]);
-        }
-    },
-
-    /**
-     * APIMethod: deactivate
-     * Deactivate the handler.
-     *
-     * Returns:
-     * {Boolean} The handler was successfully deactivated.
-     */
-    deactivate: function() {
-        var deactivated = false;
-        if(OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
-            this.clearTimer();
-            this.down = null;
-            deactivated = true;
-        }
-        return deactivated;
-    },
-
-    CLASS_NAME: "OpenLayers.Handler.Click"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Handler/Drag.js
+++ /dev/null
@@ -1,421 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Handler.js
- */
-
-/**
- * Class: OpenLayers.Handler.Drag
- * The drag handler is used to deal with sequences of browser events related
- *     to dragging.  The handler is used by controls that want to know when
- *     a drag sequence begins, when a drag is happening, and when it has
- *     finished.
- *
- * Controls that use the drag handler typically construct it with callbacks
- *     for 'down', 'move', and 'done'.  Callbacks for these keys are called
- *     when the drag begins, with each move, and when the drag is done.  In
- *     addition, controls can have callbacks keyed to 'up' and 'out' if they
- *     care to differentiate between the types of events that correspond with
- *     the end of a drag sequence.  If no drag actually occurs (no mouse move)
- *     the 'down' and 'up' callbacks will be called, but not the 'done'
- *     callback.
- *
- * Create a new drag handler with the <OpenLayers.Handler.Drag> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Handler>
- */
-OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
-  
-    /** 
-     * Property: started
-     * {Boolean} When a mousedown event is received, we want to record it, but
-     *     not set 'dragging' until the mouse moves after starting. 
-     */
-    started: false,
-    
-    /**
-     * Property: stopDown
-     * {Boolean} Stop propagation of mousedown events from getting to listeners
-     *     on the same element.  Default is true.
-     */
-    stopDown: true,
-
-    /** 
-     * Property: dragging 
-     * {Boolean} 
-     */
-    dragging: false,
-
-    /** 
-     * Property: last
-     * {<OpenLayers.Pixel>} The last pixel location of the drag.
-     */
-    last: null,
-
-    /** 
-     * Property: start
-     * {<OpenLayers.Pixel>} The first pixel location of the drag.
-     */
-    start: null,
-
-    /**
-     * Property: oldOnselectstart
-     * {Function}
-     */
-    oldOnselectstart: null,
-    
-    /**
-     * Property: interval
-     * {Integer} In order to increase performance, an interval (in 
-     *     milliseconds) can be set to reduce the number of drag events 
-     *     called. If set, a new drag event will not be set until the 
-     *     interval has passed. 
-     *     Defaults to 0, meaning no interval. 
-     */
-    interval: 0,
-    
-    /**
-     * Property: timeoutId
-     * {String} The id of the timeout used for the mousedown interval.
-     *     This is "private", and should be left alone.
-     */
-    timeoutId: null,
-    
-    /**
-     * APIProperty: documentDrag
-     * {Boolean} If set to true, the handler will also handle mouse moves when
-     *     the cursor has moved out of the map viewport. Default is false.
-     */
-    documentDrag: false,
-    
-    /**
-     * Property: documentEvents
-     * {<OpenLayers.Events>} Event instance for observing document events. Will
-     *     be set on mouseout if documentDrag is set to true.
-     */
-    documentEvents: null,
-
-    /**
-     * Constructor: OpenLayers.Handler.Drag
-     * Returns OpenLayers.Handler.Drag
-     * 
-     * Parameters:
-     * control - {<OpenLayers.Control>} The control that is making use of
-     *     this handler.  If a handler is being used without a control, the
-     *     handlers setMap method must be overridden to deal properly with
-     *     the map.
-     * callbacks - {Object} An object containing a single function to be
-     *     called when the drag operation is finished. The callback should
-     *     expect to recieve a single argument, the pixel location of the event.
-     *     Callbacks for 'move' and 'done' are supported. You can also speficy
-     *     callbacks for 'down', 'up', and 'out' to respond to those events.
-     * options - {Object} 
-     */
-    initialize: function(control, callbacks, options) {
-        OpenLayers.Handler.prototype.initialize.apply(this, arguments);
-    },
-    
-    /**
-     * The four methods below (down, move, up, and out) are used by subclasses
-     *     to do their own processing related to these mouse events.
-     */
-    
-    /**
-     * Method: down
-     * This method is called during the handling of the mouse down event.
-     *     Subclasses can do their own processing here.
-     *
-     * Parameters:
-     * evt - {Event} The mouse down event
-     */
-    down: function(evt) {
-    },
-    
-    /**
-     * Method: move
-     * This method is called during the handling of the mouse move event.
-     *     Subclasses can do their own processing here.
-     *
-     * Parameters:
-     * evt - {Event} The mouse move event
-     *
-     */
-    move: function(evt) {
-    },
-
-    /**
-     * Method: up
-     * This method is called during the handling of the mouse up event.
-     *     Subclasses can do their own processing here.
-     *
-     * Parameters:
-     * evt - {Event} The mouse up event
-     */
-    up: function(evt) {
-    },
-
-    /**
-     * Method: out
-     * This method is called during the handling of the mouse out event.
-     *     Subclasses can do their own processing here.
-     *
-     * Parameters:
-     * evt - {Event} The mouse out event
-     */
-    out: function(evt) {
-    },
-
-    /**
-     * The methods below are part of the magic of event handling.  Because
-     *     they are named like browser events, they are registered as listeners
-     *     for the events they represent.
-     */
-
-    /**
-     * Method: mousedown
-     * Handle mousedown events
-     *
-     * Parameters:
-     * evt - {Event} 
-     *
-     * Returns:
-     * {Boolean} Let the event propagate.
-     */
-    mousedown: function (evt) {
-        var propagate = true;
-        this.dragging = false;
-        if (this.checkModifiers(evt) && OpenLayers.Event.isLeftClick(evt)) {
-            this.started = true;
-            this.start = evt.xy;
-            this.last = evt.xy;
-            OpenLayers.Element.addClass(
-                this.map.viewPortDiv, "olDragDown"
-            );
-            this.down(evt);
-            this.callback("down", [evt.xy]);
-            OpenLayers.Event.stop(evt);
-            
-            if(!this.oldOnselectstart) {
-                this.oldOnselectstart = (document.onselectstart) ? document.onselectstart : OpenLayers.Function.True;
-            }
-            document.onselectstart = OpenLayers.Function.False;
-            
-            propagate = !this.stopDown;
-        } else {
-            this.started = false;
-            this.start = null;
-            this.last = null;
-        }
-        return propagate;
-    },
-
-    /**
-     * Method: mousemove
-     * Handle mousemove events
-     *
-     * Parameters:
-     * evt - {Event} 
-     *
-     * Returns:
-     * {Boolean} Let the event propagate.
-     */
-    mousemove: function (evt) {
-        if (this.started && !this.timeoutId && (evt.xy.x != this.last.x || evt.xy.y != this.last.y)) {
-            if(this.documentDrag === true && this.documentEvents) {
-                if(evt.element === document) {
-                    this.adjustXY(evt);
-                    // do setEvent manually because the documentEvents are not
-                    // registered with the map
-                    this.setEvent(evt);
-                } else {
-                    this.destroyDocumentEvents();
-                }
-            }
-            if (this.interval > 0) {
-                this.timeoutId = setTimeout(OpenLayers.Function.bind(this.removeTimeout, this), this.interval);
-            }
-            this.dragging = true;
-            this.move(evt);
-            this.callback("move", [evt.xy]);
-            if(!this.oldOnselectstart) {
-                this.oldOnselectstart = document.onselectstart;
-                document.onselectstart = OpenLayers.Function.False;
-            }
-            this.last = this.evt.xy;
-        }
-        return true;
-    },
-    
-    /**
-     * Method: removeTimeout
-     * Private. Called by mousemove() to remove the drag timeout.
-     */
-    removeTimeout: function() {
-        this.timeoutId = null;
-    },
-
-    /**
-     * Method: mouseup
-     * Handle mouseup events
-     *
-     * Parameters:
-     * evt - {Event} 
-     *
-     * Returns:
-     * {Boolean} Let the event propagate.
-     */
-    mouseup: function (evt) {
-        if (this.started) {
-            if(this.documentDrag === true && this.documentEvents) {
-                this.adjustXY(evt);
-                this.destroyDocumentEvents();
-            }
-            var dragged = (this.start != this.last);
-            this.started = false;
-            this.dragging = false;
-            OpenLayers.Element.removeClass(
-                this.map.viewPortDiv, "olDragDown"
-            );
-            this.up(evt);
-            this.callback("up", [evt.xy]);
-            if(dragged) {
-                this.callback("done", [evt.xy]);
-            }
-            document.onselectstart = this.oldOnselectstart;
-        }
-        return true;
-    },
-
-    /**
-     * Method: mouseout
-     * Handle mouseout events
-     *
-     * Parameters:
-     * evt - {Event} 
-     *
-     * Returns:
-     * {Boolean} Let the event propagate.
-     */
-    mouseout: function (evt) {
-        if (this.started && OpenLayers.Util.mouseLeft(evt, this.map.div)) {
-            if(this.documentDrag === true) {
-                this.documentEvents = new OpenLayers.Events(this, document,
-                                            null, null, {includeXY: true});
-                this.documentEvents.on({
-                    mousemove: this.mousemove,
-                    mouseup: this.mouseup
-                });
-                OpenLayers.Element.addClass(
-                    document.body, "olDragDown"
-                );
-            } else {
-                var dragged = (this.start != this.last);
-                this.started = false; 
-                this.dragging = false;
-                OpenLayers.Element.removeClass(
-                    this.map.viewPortDiv, "olDragDown"
-                );
-                this.out(evt);
-                this.callback("out", []);
-                if(dragged) {
-                    this.callback("done", [evt.xy]);
-                }
-                if(document.onselectstart) {
-                    document.onselectstart = this.oldOnselectstart;
-                }
-            }
-        }
-        return true;
-    },
-
-    /**
-     * Method: click
-     * The drag handler captures the click event.  If something else registers
-     *     for clicks on the same element, its listener will not be called 
-     *     after a drag.
-     * 
-     * Parameters: 
-     * evt - {Event} 
-     * 
-     * Returns:
-     * {Boolean} Let the event propagate.
-     */
-    click: function (evt) {
-        // let the click event propagate only if the mouse moved
-        return (this.start == this.last);
-    },
-
-    /**
-     * Method: activate
-     * Activate the handler.
-     * 
-     * Returns:
-     * {Boolean} The handler was successfully activated.
-     */
-    activate: function() {
-        var activated = false;
-        if(OpenLayers.Handler.prototype.activate.apply(this, arguments)) {
-            this.dragging = false;
-            activated = true;
-        }
-        return activated;
-    },
-
-    /**
-     * Method: deactivate 
-     * Deactivate the handler.
-     * 
-     * Returns:
-     * {Boolean} The handler was successfully deactivated.
-     */
-    deactivate: function() {
-        var deactivated = false;
-        if(OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
-            this.started = false;
-            this.dragging = false;
-            this.start = null;
-            this.last = null;
-            deactivated = true;
-            OpenLayers.Element.removeClass(
-                this.map.viewPortDiv, "olDragDown"
-            );
-        }
-        return deactivated;
-    },
-    
-    /**
-     * Method: adjustXY
-     * Converts event coordinates that are relative to the document body to
-     * ones that are relative to the map viewport. The latter is the default in
-     * OpenLayers.
-     * 
-     * Parameters:
-     * evt - {Object}
-     */
-    adjustXY: function(evt) {
-        var pos = OpenLayers.Util.pagePosition(this.map.div);
-        evt.xy.x -= pos[0];
-        evt.xy.y -= pos[1];
-    },
-    
-    /**
-     * Method: destroyDocumentEvents
-     * Destroys the events instance that gets added to the document body when
-     * documentDrag is true and the mouse cursor leaves the map viewport while
-     * dragging.
-     */
-    destroyDocumentEvents: function() {
-        OpenLayers.Element.removeClass(
-            document.body, "olDragDown"
-        );
-        this.documentEvents.destroy();
-        this.documentEvents = null;
-    },
-
-    CLASS_NAME: "OpenLayers.Handler.Drag"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Handler/Feature.js
+++ /dev/null
@@ -1,389 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Handler.js
- */
-
-/**
- * Class: OpenLayers.Handler.Feature 
- * Handler to respond to mouse events related to a drawn feature.  Callbacks
- *     with the following keys will be notified of the following events
- *     associated with features: click, clickout, over, out, and dblclick.
- *
- * This handler stops event propagation for mousedown and mouseup if those
- *     browser events target features that can be selected.
- */
-OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, {
-
-    /**
-     * Property: EVENTMAP
-     * {Object} A object mapping the browser events to objects with callback
-     *     keys for in and out.
-     */
-    EVENTMAP: {
-        'click': {'in': 'click', 'out': 'clickout'},
-        'mousemove': {'in': 'over', 'out': 'out'},
-        'dblclick': {'in': 'dblclick', 'out': null},
-        'mousedown': {'in': null, 'out': null},
-        'mouseup': {'in': null, 'out': null}
-    },
-
-    /**
-     * Property: feature
-     * {<OpenLayers.Feature.Vector>} The last feature that was hovered.
-     */
-    feature: null,
-
-    /**
-     * Property: lastFeature
-     * {<OpenLayers.Feature.Vector>} The last feature that was handled.
-     */
-    lastFeature: null,
-
-    /**
-     * Property: down
-     * {<OpenLayers.Pixel>} The location of the last mousedown.
-     */
-    down: null,
-
-    /**
-     * Property: up
-     * {<OpenLayers.Pixel>} The location of the last mouseup.
-     */
-    up: null,
-    
-    /**
-     * Property: clickTolerance
-     * {Number} The number of pixels the mouse can move between mousedown
-     *     and mouseup for the event to still be considered a click.
-     *     Dragging the map should not trigger the click and clickout callbacks
-     *     unless the map is moved by less than this tolerance. Defaults to 4.
-     */
-    clickTolerance: 4,
-
-    /**
-     * Property: geometryTypes
-     * To restrict dragging to a limited set of geometry types, send a list
-     * of strings corresponding to the geometry class names.
-     * 
-     * @type Array(String)
-     */
-    geometryTypes: null,
-
-    /**
-     * Property: stopClick
-     * {Boolean} If stopClick is set to true, handled clicks do not
-     *      propagate to other click listeners. Otherwise, handled clicks
-     *      do propagate. Unhandled clicks always propagate, whatever the
-     *      value of stopClick. Defaults to true.
-     */
-    stopClick: true,
-
-    /**
-     * Property: stopDown
-     * {Boolean} If stopDown is set to true, handled mousedowns do not
-     *      propagate to other mousedown listeners. Otherwise, handled
-     *      mousedowns do propagate. Unhandled mousedowns always propagate,
-     *      whatever the value of stopDown. Defaults to true.
-     */
-    stopDown: true,
-
-    /**
-     * Property: stopUp
-     * {Boolean} If stopUp is set to true, handled mouseups do not
-     *      propagate to other mouseup listeners. Otherwise, handled mouseups
-     *      do propagate. Unhandled mouseups always propagate, whatever the
-     *      value of stopUp. Defaults to false.
-     */
-    stopUp: false,
-    
-    /**
-     * Constructor: OpenLayers.Handler.Feature
-     *
-     * Parameters:
-     * control - {<OpenLayers.Control>} 
-     * layer - {<OpenLayers.Layer.Vector>}
-     * callbacks - {Object} An object with a 'over' property whos value is
-     *     a function to be called when the mouse is over a feature. The 
-     *     callback should expect to recieve a single argument, the feature.
-     * options - {Object} 
-     */
-    initialize: function(control, layer, callbacks, options) {
-        OpenLayers.Handler.prototype.initialize.apply(this, [control, callbacks, options]);
-        this.layer = layer;
-    },
-
-
-    /**
-     * Method: mousedown
-     * Handle mouse down.  Stop propagation if a feature is targeted by this
-     *     event (stops map dragging during feature selection).
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    mousedown: function(evt) {
-        this.down = evt.xy;
-        return this.handle(evt) ? !this.stopDown : true;
-    },
-    
-    /**
-     * Method: mouseup
-     * Handle mouse up.  Stop propagation if a feature is targeted by this
-     *     event.
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    mouseup: function(evt) {
-        this.up = evt.xy;
-        return this.handle(evt) ? !this.stopUp : true;
-    },
-
-    /**
-     * Method: click
-     * Handle click.  Call the "click" callback if click on a feature,
-     *     or the "clickout" callback if click outside any feature.
-     * 
-     * Parameters:
-     * evt - {Event} 
-     *
-     * Returns:
-     * {Boolean}
-     */
-    click: function(evt) {
-        return this.handle(evt) ? !this.stopClick : true;
-    },
-        
-    /**
-     * Method: mousemove
-     * Handle mouse moves.  Call the "over" callback if moving in to a feature,
-     *     or the "out" callback if moving out of a feature.
-     * 
-     * Parameters:
-     * evt - {Event} 
-     *
-     * Returns:
-     * {Boolean}
-     */
-    mousemove: function(evt) {
-        if (!this.callbacks['over'] && !this.callbacks['out']) {
-            return true;
-        }     
-        this.handle(evt);
-        return true;
-    },
-    
-    /**
-     * Method: dblclick
-     * Handle dblclick.  Call the "dblclick" callback if dblclick on a feature.
-     *
-     * Parameters:
-     * evt - {Event} 
-     *
-     * Returns:
-     * {Boolean}
-     */
-    dblclick: function(evt) {
-        return !this.handle(evt);
-    },
-
-    /**
-     * Method: geometryTypeMatches
-     * Return true if the geometry type of the passed feature matches
-     *     one of the geometry types in the geometryTypes array.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Vector.Feature>}
-     *
-     * Returns:
-     * {Boolean}
-     */
-    geometryTypeMatches: function(feature) {
-        return this.geometryTypes == null ||
-            OpenLayers.Util.indexOf(this.geometryTypes,
-                                    feature.geometry.CLASS_NAME) > -1;
-    },
-
-    /**
-     * Method: handle
-     *
-     * Parameters:
-     * evt - {Event}
-     *
-     * Returns:
-     * {Boolean} The event occurred over a relevant feature.
-     */
-    handle: function(evt) {
-        if(this.feature && !this.feature.layer) {
-            // feature has been destroyed
-            this.feature = null;
-        }
-        var type = evt.type;
-        var handled = false;
-        var previouslyIn = !!(this.feature); // previously in a feature
-        var click = (type == "click" || type == "dblclick");
-        this.feature = this.layer.getFeatureFromEvent(evt);
-        if(this.feature && !this.feature.layer) {
-            // feature has been destroyed
-            this.feature = null;
-        }
-        if(this.lastFeature && !this.lastFeature.layer) {
-            // last feature has been destroyed
-            this.lastFeature = null;
-        }
-        if(this.feature) {
-            var inNew = (this.feature != this.lastFeature);
-            if(this.geometryTypeMatches(this.feature)) {
-                // in to a feature
-                if(previouslyIn && inNew) {
-                    // out of last feature and in to another
-                    if(this.lastFeature) {
-                        this.triggerCallback(type, 'out', [this.lastFeature]);
-                    }
-                    this.triggerCallback(type, 'in', [this.feature]);
-                } else if(!previouslyIn || click) {
-                    // in feature for the first time
-                    this.triggerCallback(type, 'in', [this.feature]);
-                }
-                this.lastFeature = this.feature;
-                handled = true;
-            } else {
-                // not in to a feature
-                if(this.lastFeature && (previouslyIn && inNew || click)) {
-                    // out of last feature for the first time
-                    this.triggerCallback(type, 'out', [this.lastFeature]);
-                }
-                // next time the mouse goes in a feature whose geometry type
-                // doesn't match we don't want to call the 'out' callback
-                // again, so let's set this.feature to null so that
-                // previouslyIn will evaluate to false the next time
-                // we enter handle. Yes, a bit hackish...
-                this.feature = null;
-            }
-        } else {
-            if(this.lastFeature && (previouslyIn || click)) {
-                this.triggerCallback(type, 'out', [this.lastFeature]);
-            }
-        }
-        return handled;
-    },
-    
-    /**
-     * Method: triggerCallback
-     * Call the callback keyed in the event map with the supplied arguments.
-     *     For click and clickout, the <clickTolerance> is checked first.
-     *
-     * Parameters:
-     * type - {String}
-     */
-    triggerCallback: function(type, mode, args) {
-        var key = this.EVENTMAP[type][mode];
-        if(key) {
-            if(type == 'click' && this.up && this.down) {
-                // for click/clickout, only trigger callback if tolerance is met
-                var dpx = Math.sqrt(
-                    Math.pow(this.up.x - this.down.x, 2) +
-                    Math.pow(this.up.y - this.down.y, 2)
-                );
-                if(dpx <= this.clickTolerance) {
-                    this.callback(key, args);
-                }
-            } else {
-                this.callback(key, args);
-            }
-        }
-    },
-
-    /**
-     * Method: activate 
-     * Turn on the handler.  Returns false if the handler was already active.
-     *
-     * Returns:
-     * {Boolean}
-     */
-    activate: function() {
-        var activated = false;
-        if(OpenLayers.Handler.prototype.activate.apply(this, arguments)) {
-            this.moveLayerToTop();
-            this.map.events.on({
-                "removelayer": this.handleMapEvents,
-                "changelayer": this.handleMapEvents,
-                scope: this
-            });
-            activated = true;
-        }
-        return activated;
-    },
-    
-    /**
-     * Method: deactivate 
-     * Turn off the handler.  Returns false if the handler was already active.
-     *
-     * Returns: 
-     * {Boolean}
-     */
-    deactivate: function() {
-        var deactivated = false;
-        if(OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
-            this.moveLayerBack();
-            this.feature = null;
-            this.lastFeature = null;
-            this.down = null;
-            this.up = null;
-            this.map.events.un({
-                "removelayer": this.handleMapEvents,
-                "changelayer": this.handleMapEvents,
-                scope: this
-            });
-            deactivated = true;
-        }
-        return deactivated;
-    },
-    
-    /**
-     * Method handleMapEvents
-     * 
-     * Parameters:
-     * evt - {Object}
-     */
-    handleMapEvents: function(evt) {
-        if (!evt.property || evt.property == "order") {
-            this.moveLayerToTop();
-        }
-    },
-    
-    /**
-     * Method: moveLayerToTop
-     * Moves the layer for this handler to the top, so mouse events can reach
-     * it.
-     */
-    moveLayerToTop: function() {
-        var index = Math.max(this.map.Z_INDEX_BASE['Feature'] - 1,
-            this.layer.getZIndex()) + 1;
-        this.layer.setZIndex(index);
-        
-    },
-    
-    /**
-     * Method: moveLayerBack
-     * Moves the layer back to the position determined by the map's layers
-     * array.
-     */
-    moveLayerBack: function() {
-        var index = this.layer.getZIndex() - 1;
-        if (index >= this.map.Z_INDEX_BASE['Feature']) {
-            this.layer.setZIndex(index);
-        } else {
-            this.map.setLayerZIndex(this.layer,
-                this.map.getLayerIndex(this.layer));
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Handler.Feature"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Handler/Hover.js
+++ /dev/null
@@ -1,184 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Handler.js
- */
-
-/**
- * Class: OpenLayers.Handler.Hover
- * The hover handler is to be used to emulate mouseovers on objects
- *      on the map that aren't DOM elements. For example one can use
- *      this handler to send WMS/GetFeatureInfo requests as the user
- *      moves the mouve over the map.
- * 
- * Inherits from:
- *  - <OpenLayers.Handler> 
- */
-OpenLayers.Handler.Hover = OpenLayers.Class(OpenLayers.Handler, {
-
-    /**
-     * APIProperty: delay
-     * {Integer} - Number of milliseconds between mousemoves before
-     *      the event is considered a hover. Default is 500.
-     */
-    delay: 500,
-    
-    /**
-     * APIProperty: pixelTolerance
-     * {Integer} - Maximum number of pixels between mousemoves for
-     *      an event to be considered a hover. Default is null.
-     */
-    pixelTolerance: null,
-
-    /**
-     * APIProperty: stopMove
-     * {Boolean} - Stop other listeners from being notified on mousemoves.
-     *      Default is false.
-     */
-    stopMove: false,
-
-    /**
-     * Property: px
-     * {<OpenLayers.Pixel>} - The location of the last mousemove, expressed
-     *      in pixels.
-     */
-    px: null,
-
-    /**
-     * Property: timerId
-     * {Number} - The id of the timer.
-     */
-    timerId: null,
- 
-    /**
-     * Constructor: OpenLayers.Handler.Hover
-     * Construct a hover handler.
-     *
-     * Parameters:
-     * control - {<OpenLayers.Control>} The control that initialized this
-     *     handler.  The control is assumed to have a valid map property; that
-     *     map is used in the handler's own setMap method.
-     * callbacks - {Object} An object with keys corresponding to callbacks
-     *     that will be called by the handler. The callbacks should
-     *     expect to receive a single argument, the event. Callbacks for
-     *     'move', the mouse is moving, and 'pause', the mouse is pausing,
-     *     are supported.
-     * options - {Object} An optional object whose properties will be set on
-     *     the handler.
-     */
-    initialize: function(control, callbacks, options) {
-        OpenLayers.Handler.prototype.initialize.apply(this, arguments);
-    },
-
-    /**
-     * Method: mousemove
-     * Called when the mouse moves on the map.
-     *
-     * Parameters:
-     * evt - {<OpenLayers.Event>}
-     *
-     * Returns:
-     * {Boolean} Continue propagating this event.
-     */
-    mousemove: function(evt) {
-        if(this.passesTolerance(evt.xy)) {
-            this.clearTimer();
-            this.callback('move', [evt]);
-            this.px = evt.xy;
-            // clone the evt so original properties can be accessed even
-            // if the browser deletes them during the delay
-            evt = OpenLayers.Util.extend({}, evt);
-            this.timerId = window.setTimeout(
-                OpenLayers.Function.bind(this.delayedCall, this, evt),
-                this.delay
-            );
-        }
-        return !this.stopMove;
-    },
-
-    /**
-     * Method: mouseout
-     * Called when the mouse goes out of the map.
-     *
-     * Parameters:
-     * evt - {<OpenLayers.Event>}
-     *
-     * Returns:
-     * {Boolean} Continue propagating this event.
-     */
-    mouseout: function(evt) {
-        if (OpenLayers.Util.mouseLeft(evt, this.map.div)) {
-            this.clearTimer();
-            this.callback('move', [evt]);
-        }
-        return true;
-    },
-
-    /**
-     * Method: passesTolerance
-     * Determine whether the mouse move is within the optional pixel tolerance.
-     *
-     * Parameters:
-     * px - {<OpenLayers.Pixel>}
-     *
-     * Returns:
-     * {Boolean} The mouse move is within the pixel tolerance.
-     */
-    passesTolerance: function(px) {
-        var passes = true;
-        if(this.pixelTolerance && this.px) {
-            var dpx = Math.sqrt(
-                Math.pow(this.px.x - px.x, 2) +
-                Math.pow(this.px.y - px.y, 2)
-            );
-            if(dpx < this.pixelTolerance) {
-                passes = false;
-            }
-        }
-        return passes;
-    },
-
-    /**
-     * Method: clearTimer
-     * Clear the timer and set <timerId> to null.
-     */
-    clearTimer: function() {
-        if(this.timerId != null) {
-            window.clearTimeout(this.timerId);
-            this.timerId = null;
-        }
-    },
-
-    /**
-     * Method: delayedCall
-     * Triggers pause callback.
-     *
-     * Parameters:
-     * evt - {<OpenLayers.Event>}
-     */
-    delayedCall: function(evt) {
-        this.callback('pause', [evt]);
-    },
-
-    /**
-     * APIMethod: deactivate
-     * Deactivate the handler.
-     *
-     * Returns:
-     * {Boolean} The handler was successfully deactivated.
-     */
-    deactivate: function() {
-        var deactivated = false;
-        if(OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
-            this.clearTimer();
-            deactivated = true;
-        }
-        return deactivated;
-    },
-
-    CLASS_NAME: "OpenLayers.Handler.Hover"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Handler/Keyboard.js
+++ /dev/null
@@ -1,110 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Handler.js
- * @requires OpenLayers/Events.js
- */
-
-/**
- * Class: OpenLayers.handler.Keyboard
- * A handler for keyboard events.  Create a new instance with the
- *     <OpenLayers.Handler.Keyboard> constructor.
- * 
- * Inherits from:
- *  - <OpenLayers.Handler> 
- */
-OpenLayers.Handler.Keyboard = OpenLayers.Class(OpenLayers.Handler, {
-
-    /* http://www.quirksmode.org/js/keys.html explains key x-browser
-        key handling quirks in pretty nice detail */
-
-    /** 
-     * Constant: KEY_EVENTS
-     * keydown, keypress, keyup
-     */
-    KEY_EVENTS: ["keydown", "keyup"],
-
-    /** 
-    * Property: eventListener
-    * {Function}
-    */
-    eventListener: null,
-
-    /**
-     * Constructor: OpenLayers.Handler.Keyboard
-     * Returns a new keyboard handler.
-     * 
-     * Parameters:
-     * control - {<OpenLayers.Control>} The control that is making use of
-     *     this handler.  If a handler is being used without a control, the
-     *     handlers setMap method must be overridden to deal properly with
-     *     the map.
-     * callbacks - {Object} An object containing a single function to be
-     *     called when the drag operation is finished. The callback should
-     *     expect to recieve a single argument, the pixel location of the event.
-     *     Callbacks for 'keydown', 'keypress', and 'keyup' are supported.
-     * options - {Object} Optional object whose properties will be set on the
-     *     handler.
-     */
-    initialize: function(control, callbacks, options) {
-        OpenLayers.Handler.prototype.initialize.apply(this, arguments);
-        // cache the bound event listener method so it can be unobserved later
-        this.eventListener = OpenLayers.Function.bindAsEventListener(
-            this.handleKeyEvent, this
-        );
-    },
-    
-    /**
-     * Method: destroy
-     */
-    destroy: function() {
-        this.deactivate();
-        this.eventListener = null;
-        OpenLayers.Handler.prototype.destroy.apply(this, arguments);
-    },
-
-    /**
-     * Method: activate
-     */
-    activate: function() {
-        if (OpenLayers.Handler.prototype.activate.apply(this, arguments)) {
-            for (var i=0, len=this.KEY_EVENTS.length; i<len; i++) {
-                OpenLayers.Event.observe(
-                    document, this.KEY_EVENTS[i], this.eventListener);
-            }
-            return true;
-        } else {
-            return false;
-        }
-    },
-
-    /**
-     * Method: deactivate
-     */
-    deactivate: function() {
-        var deactivated = false;
-        if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
-            for (var i=0, len=this.KEY_EVENTS.length; i<len; i++) {
-                OpenLayers.Event.stopObserving(
-                    document, this.KEY_EVENTS[i], this.eventListener);
-            }
-            deactivated = true;
-        }
-        return deactivated;
-    },
-
-    /**
-     * Method: handleKeyEvent 
-     */
-    handleKeyEvent: function (evt) {
-        if (this.checkModifiers(evt)) {
-            this.callback(evt.type, [evt]);
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Handler.Keyboard"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Handler/MouseWheel.js
+++ /dev/null
@@ -1,284 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Handler.js
- */
-
-/**
- * Class: OpenLayers.Handler.MouseWheel
- * Handler for wheel up/down events.
- * 
- * Inherits from:
- *  - <OpenLayers.Handler>
- */
-OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, {
-    /** 
-     * Property: wheelListener 
-     * {function} 
-     */
-    wheelListener: null,
-
-    /** 
-     * Property: mousePosition
-     * {<OpenLayers.Pixel>} mousePosition is necessary because
-     * evt.clientX/Y is buggy in Moz on wheel events, so we cache and use the
-     * value from the last mousemove.
-     */
-    mousePosition: null,
-
-    /**
-     * Property: interval
-     * {Integer} In order to increase server performance, an interval (in 
-     *     milliseconds) can be set to reduce the number of up/down events 
-     *     called. If set, a new up/down event will not be set until the 
-     *     interval has passed. 
-     *     Defaults to 0, meaning no interval. 
-     */
-    interval: 0,
-    
-    /**
-     * Property: delta
-     * {Integer} When interval is set, delta collects the mousewheel z-deltas
-     *     of the events that occur within the interval.
-     *      See also the cumulative option
-     */
-    delta: 0,
-    
-    /**
-     * Property: cumulative
-     * {Boolean} When interval is set: true to collect all the mousewheel 
-     *     z-deltas, false to only record the delta direction (positive or
-     *     negative)
-     */
-    cumulative: true,
-
-    /**
-     * Constructor: OpenLayers.Handler.MouseWheel
-     *
-     * Parameters:
-     * control - {<OpenLayers.Control>} 
-     * callbacks - {Object} An object containing a single function to be
-     *                          called when the drag operation is finished.
-     *                          The callback should expect to recieve a single
-     *                          argument, the point geometry.
-     * options - {Object} 
-     */
-    initialize: function(control, callbacks, options) {
-        OpenLayers.Handler.prototype.initialize.apply(this, arguments);
-        this.wheelListener = OpenLayers.Function.bindAsEventListener(
-            this.onWheelEvent, this
-        );
-    },
-
-    /**
-     * Method: destroy
-     */    
-    destroy: function() {
-        OpenLayers.Handler.prototype.destroy.apply(this, arguments);
-        this.wheelListener = null;
-    },
-
-    /**
-     *  Mouse ScrollWheel code thanks to http://adomas.org/javascript-mouse-wheel/
-     */
-
-    /** 
-     * Method: onWheelEvent
-     * Catch the wheel event and handle it xbrowserly
-     * 
-     * Parameters:
-     * e - {Event} 
-     */
-    onWheelEvent: function(e){
-        
-        // make sure we have a map and check keyboard modifiers
-        if (!this.map || !this.checkModifiers(e)) {
-            return;
-        }
-        
-        // Ride up the element's DOM hierarchy to determine if it or any of 
-        //  its ancestors was: 
-        //   * specifically marked as scrollable
-        //   * one of our layer divs
-        //   * the map div
-        //
-        var overScrollableDiv = false;
-        var overLayerDiv = false;
-        var overMapDiv = false;
-        
-        var elem = OpenLayers.Event.element(e);
-        while((elem != null) && !overMapDiv && !overScrollableDiv) {
-
-            if (!overScrollableDiv) {
-                try {
-                    if (elem.currentStyle) {
-                        overflow = elem.currentStyle["overflow"];
-                    } else {
-                        var style = 
-                            document.defaultView.getComputedStyle(elem, null);
-                        var overflow = style.getPropertyValue("overflow");
-                    }
-                    overScrollableDiv = ( overflow && 
-                        (overflow == "auto") || (overflow == "scroll") );
-                } catch(err) {
-                    //sometimes when scrolling in a popup, this causes 
-                    // obscure browser error
-                }
-            }
-
-            if (!overLayerDiv) {
-                for(var i=0, len=this.map.layers.length; i<len; i++) {
-                    // Are we in the layer div? Note that we have two cases
-                    // here: one is to catch EventPane layers, which have a 
-                    // pane above the layer (layer.pane)
-                    if (elem == this.map.layers[i].div 
-                        || elem == this.map.layers[i].pane) { 
-                        overLayerDiv = true;
-                        break;
-                    }
-                }
-            }
-            overMapDiv = (elem == this.map.div);
-
-            elem = elem.parentNode;
-        }
-        
-        // Logic below is the following:
-        //
-        // If we are over a scrollable div or not over the map div:
-        //  * do nothing (let the browser handle scrolling)
-        //
-        //    otherwise 
-        // 
-        //    If we are over the layer div: 
-        //     * zoom/in out
-        //     then
-        //     * kill event (so as not to also scroll the page after zooming)
-        //
-        //       otherwise
-        //
-        //       Kill the event (dont scroll the page if we wheel over the 
-        //        layerswitcher or the pan/zoom control)
-        //
-        if (!overScrollableDiv && overMapDiv) {
-            if (overLayerDiv) {
-                var delta = 0;
-                if (!e) {
-                    e = window.event;
-                }
-                if (e.wheelDelta) {
-                    delta = e.wheelDelta/120; 
-                    if (window.opera && window.opera.version() < 9.2) {
-                        delta = -delta;
-                    }
-                } else if (e.detail) {
-                    delta = -e.detail / 3;
-                }
-                this.delta = this.delta + delta;
-
-                if(this.interval) {
-                    window.clearTimeout(this._timeoutId);
-                    this._timeoutId = window.setTimeout(
-                        OpenLayers.Function.bind(function(){
-                            this.wheelZoom(e);
-                        }, this),
-                        this.interval
-                    );
-                } else {
-                    this.wheelZoom(e);
-                }
-            }
-            OpenLayers.Event.stop(e);
-        }
-    },
-
-    /**
-     * Method: wheelZoom
-     * Given the wheel event, we carry out the appropriate zooming in or out,
-     *     based on the 'wheelDelta' or 'detail' property of the event.
-     * 
-     * Parameters:
-     * e - {Event}
-     */
-    wheelZoom: function(e) {
-        var delta = this.delta;
-        this.delta = 0;
-        
-        if (delta) {
-            // add the mouse position to the event because mozilla has 
-            // a bug with clientX and clientY (see 
-            // https://bugzilla.mozilla.org/show_bug.cgi?id=352179)
-            // getLonLatFromViewPortPx(e) returns wrong values
-            if (this.mousePosition) {
-                e.xy = this.mousePosition;
-            } 
-            if (!e.xy) {
-                // If the mouse hasn't moved over the map yet, then
-                // we don't have a mouse position (in FF), so we just
-                // act as if the mouse was at the center of the map.
-                // Note that we can tell we are in the map -- and 
-                // this.map is ensured to be true above.
-                e.xy = this.map.getPixelFromLonLat(
-                    this.map.getCenter()
-                );
-            }
-            if (delta < 0) {
-                this.callback("down", [e, this.cumulative ? delta : -1]);
-            } else {
-                this.callback("up", [e, this.cumulative ? delta : 1]);
-            }
-        }
-    },
-    
-    /**
-     * Method: mousemove
-     * Update the stored mousePosition on every move.
-     * 
-     * Parameters:
-     * evt - {Event} The browser event
-     *
-     * Returns: 
-     * {Boolean} Allow event propagation
-     */
-    mousemove: function (evt) {
-        this.mousePosition = evt.xy;
-    },
-
-    /**
-     * Method: activate 
-     */
-    activate: function (evt) {
-        if (OpenLayers.Handler.prototype.activate.apply(this, arguments)) {
-            //register mousewheel events specifically on the window and document
-            var wheelListener = this.wheelListener;
-            OpenLayers.Event.observe(window, "DOMMouseScroll", wheelListener);
-            OpenLayers.Event.observe(window, "mousewheel", wheelListener);
-            OpenLayers.Event.observe(document, "mousewheel", wheelListener);
-            return true;
-        } else {
-            return false;
-        }
-    },
-
-    /**
-     * Method: deactivate 
-     */
-    deactivate: function (evt) {
-        if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
-            // unregister mousewheel events specifically on the window and document
-            var wheelListener = this.wheelListener;
-            OpenLayers.Event.stopObserving(window, "DOMMouseScroll", wheelListener);
-            OpenLayers.Event.stopObserving(window, "mousewheel", wheelListener);
-            OpenLayers.Event.stopObserving(document, "mousewheel", wheelListener);
-            return true;
-        } else {
-            return false;
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Handler.MouseWheel"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Handler/Path.js
+++ /dev/null
@@ -1,303 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Handler/Point.js
- * @requires OpenLayers/Geometry/Point.js
- * @requires OpenLayers/Geometry/LineString.js
- */
-
-/**
- * Class: OpenLayers.Handler.Path
- * Handler to draw a path on the map.  Path is displayed on mouse down,
- * moves on mouse move, and is finished on mouse up.
- *
- * Inherits from:
- *  - <OpenLayers.Handler.Point>
- */
-OpenLayers.Handler.Path = OpenLayers.Class(OpenLayers.Handler.Point, {
-    
-    /**
-     * Property: line
-     * {<OpenLayers.Feature.Vector>}
-     */
-    line: null,
-    
-    /**
-     * Property: freehand
-     * {Boolean} In freehand mode, the handler starts the path on mouse down,
-     * adds a point for every mouse move, and finishes the path on mouse up.
-     * Outside of freehand mode, a point is added to the path on every mouse
-     * click and double-click finishes the path.
-     */
-    freehand: false,
-    
-    /**
-     * Property: freehandToggle
-     * {String} If set, freehandToggle is checked on mouse events and will set
-     * the freehand mode to the opposite of this.freehand.  To disallow
-     * toggling between freehand and non-freehand mode, set freehandToggle to
-     * null.  Acceptable toggle values are 'shiftKey', 'ctrlKey', and 'altKey'.
-     */
-    freehandToggle: 'shiftKey',
-
-    /**
-     * Constructor: OpenLayers.Handler.Path
-     * Create a new path hander
-     *
-     * Parameters:
-     * control - {<OpenLayers.Control>} The control that owns this handler
-     * callbacks - {Object} An object with a properties whose values are
-     *     functions.  Various callbacks described below.
-     * options - {Object} An optional object with properties to be set on the
-     *           handler
-     *
-     * Named callbacks:
-     * create - Called when a sketch is first created.  Callback called with
-     *     the creation point geometry and sketch feature.
-     * modify - Called with each move of a vertex with the vertex (point)
-     *     geometry and the sketch feature.
-     * point - Called as each point is added.  Receives the new point geometry.
-     * done - Called when the point drawing is finished.  The callback will
-     *     recieve a single argument, the linestring geometry.
-     * cancel - Called when the handler is deactivated while drawing.  The
-     *     cancel callback will receive a geometry.
-     */
-    initialize: function(control, callbacks, options) {
-        OpenLayers.Handler.Point.prototype.initialize.apply(this, arguments);
-    },
-        
-    /**
-     * Method: createFeature
-     * Add temporary geometries
-     *
-     * Parameters:
-     * pixel - {<OpenLayers.Pixel>} The initial pixel location for the new
-     *     feature.
-     */
-    createFeature: function(pixel) {
-        var lonlat = this.control.map.getLonLatFromPixel(pixel);
-        this.point = new OpenLayers.Feature.Vector(
-            new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat)
-        );
-        this.line = new OpenLayers.Feature.Vector(
-            new OpenLayers.Geometry.LineString([this.point.geometry])
-        );
-        this.callback("create", [this.point.geometry, this.getSketch()]);
-        this.point.geometry.clearBounds();
-        this.layer.addFeatures([this.line, this.point], {silent: true});
-    },
-        
-    /**
-     * Method: destroyFeature
-     * Destroy temporary geometries
-     */
-    destroyFeature: function() {
-        OpenLayers.Handler.Point.prototype.destroyFeature.apply(this);
-        this.line = null;
-    },
-
-    /**
-     * Method: removePoint
-     * Destroy the temporary point.
-     */
-    removePoint: function() {
-        if(this.point) {
-            this.layer.removeFeatures([this.point]);
-        }
-    },
-    
-    /**
-     * Method: addPoint
-     * Add point to geometry.  Send the point index to override
-     * the behavior of LinearRing that disregards adding duplicate points.
-     *
-     * Parameters:
-     * pixel - {<OpenLayers.Pixel>} The pixel location for the new point.
-     */
-    addPoint: function(pixel) {
-        this.layer.removeFeatures([this.point]);
-        var lonlat = this.control.map.getLonLatFromPixel(pixel);
-        this.point = new OpenLayers.Feature.Vector(
-            new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat)
-        );
-        this.line.geometry.addComponent(
-            this.point.geometry, this.line.geometry.components.length
-        );
-        this.callback("point", [this.point.geometry, this.getGeometry()]);
-        this.callback("modify", [this.point.geometry, this.getSketch()]);
-        this.drawFeature();
-    },
-    
-    /**
-     * Method: freehandMode
-     * Determine whether to behave in freehand mode or not.
-     *
-     * Returns:
-     * {Boolean}
-     */
-    freehandMode: function(evt) {
-        return (this.freehandToggle && evt[this.freehandToggle]) ?
-                    !this.freehand : this.freehand;
-    },
-
-    /**
-     * Method: modifyFeature
-     * Modify the existing geometry given the new point
-     *
-     * Parameters:
-     * pixel - {<OpenLayers.Pixel>} The updated pixel location for the latest
-     *     point.
-     */
-    modifyFeature: function(pixel) {
-        var lonlat = this.control.map.getLonLatFromPixel(pixel);
-        this.point.geometry.x = lonlat.lon;
-        this.point.geometry.y = lonlat.lat;
-        this.callback("modify", [this.point.geometry, this.getSketch()]);
-        this.point.geometry.clearBounds();
-        this.drawFeature();
-    },
-
-    /**
-     * Method: drawFeature
-     * Render geometries on the temporary layer.
-     */
-    drawFeature: function() {
-        this.layer.drawFeature(this.line, this.style);
-        this.layer.drawFeature(this.point, this.style);
-    },
-
-    /**
-     * Method: getSketch
-     * Return the sketch feature.
-     *
-     * Returns:
-     * {<OpenLayers.Feature.Vector>}
-     */
-    getSketch: function() {
-        return this.line;
-    },
-
-    /**
-     * Method: getGeometry
-     * Return the sketch geometry.  If <multi> is true, this will return
-     *     a multi-part geometry.
-     *
-     * Returns:
-     * {<OpenLayers.Geometry.LineString>}
-     */
-    getGeometry: function() {
-        var geometry = this.line && this.line.geometry;
-        if(geometry && this.multi) {
-            geometry = new OpenLayers.Geometry.MultiLineString([geometry]);
-        }
-        return geometry;
-    },
-
-    /**
-     * Method: mousedown
-     * Handle mouse down.  Add a new point to the geometry and
-     * render it. Return determines whether to propagate the event on the map.
-     * 
-     * Parameters:
-     * evt - {Event} The browser event
-     *
-     * Returns: 
-     * {Boolean} Allow event propagation
-     */
-    mousedown: function(evt) {
-        // ignore double-clicks
-        if (this.lastDown && this.lastDown.equals(evt.xy)) {
-            return false;
-        }
-        if(this.lastDown == null) {
-            if(this.persist) {
-                this.destroyFeature();
-            }
-            this.createFeature(evt.xy);
-        } else if((this.lastUp == null) || !this.lastUp.equals(evt.xy)) {
-            this.addPoint(evt.xy);
-        }
-        this.mouseDown = true;
-        this.lastDown = evt.xy;
-        this.drawing = true;
-        return false;
-    },
-
-    /**
-     * Method: mousemove
-     * Handle mouse move.  Adjust the geometry and redraw.
-     * Return determines whether to propagate the event on the map.
-     * 
-     * Parameters:
-     * evt - {Event} The browser event
-     *
-     * Returns: 
-     * {Boolean} Allow event propagation
-     */
-    mousemove: function (evt) {
-        if(this.drawing) { 
-            if(this.mouseDown && this.freehandMode(evt)) {
-                this.addPoint(evt.xy);
-            } else {
-                this.modifyFeature(evt.xy);
-            }
-        }
-        return true;
-    },
-    
-    /**
-     * Method: mouseup
-     * Handle mouse up.  Send the latest point in the geometry to
-     * the control. Return determines whether to propagate the event on the map.
-     * 
-     * Parameters:
-     * evt - {Event} The browser event
-     *
-     * Returns: 
-     * {Boolean} Allow event propagation
-     */
-    mouseup: function (evt) {
-        this.mouseDown = false;
-        if(this.drawing) {
-            if(this.freehandMode(evt)) {
-                this.removePoint();
-                this.finalize();
-            } else {
-                if(this.lastUp == null) {
-                   this.addPoint(evt.xy);
-                }
-                this.lastUp = evt.xy;
-            }
-            return false;
-        }
-        return true;
-    },
-  
-    /**
-     * Method: dblclick 
-     * Handle double-clicks.  Finish the geometry and send it back
-     * to the control.
-     * 
-     * Parameters:
-     * evt - {Event} The browser event
-     *
-     * Returns: 
-     * {Boolean} Allow event propagation
-     */
-    dblclick: function(evt) {
-        if(!this.freehandMode(evt)) {
-            var index = this.line.geometry.components.length - 1;
-            this.line.geometry.removeComponent(this.line.geometry.components[index]);
-            this.removePoint();
-            this.finalize();
-        }
-        return false;
-    },
-
-    CLASS_NAME: "OpenLayers.Handler.Path"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Handler/Point.js
+++ /dev/null
@@ -1,374 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Handler.js
- * @requires OpenLayers/Geometry/Point.js
- */
-
-/**
- * Class: OpenLayers.Handler.Point
- * Handler to draw a point on the map.  Point is displayed on mouse down,
- *     moves on mouse move, and is finished on mouse up.  The handler triggers
- *     callbacks for 'done', 'cancel', and 'modify'.  The modify callback is
- *     called with each change in the sketch and will receive the latest point
- *     drawn.  Create a new instance with the <OpenLayers.Handler.Point>
- *     constructor.
- * 
- * Inherits from:
- *  - <OpenLayers.Handler>
- */
-OpenLayers.Handler.Point = OpenLayers.Class(OpenLayers.Handler, {
-    
-    /**
-     * Property: point
-     * {<OpenLayers.Feature.Vector>} The currently drawn point
-     */
-    point: null,
-
-    /**
-     * Property: layer
-     * {<OpenLayers.Layer.Vector>} The temporary drawing layer
-     */
-    layer: null,
-    
-    /**
-     * APIProperty: multi
-     * {Boolean} Cast features to multi-part geometries before passing to the
-     *     layer.  Default is false.
-     */
-    multi: false,
-    
-    /**
-     * Property: drawing 
-     * {Boolean} A point is being drawn
-     */
-    drawing: false,
-    
-    /**
-     * Property: mouseDown
-     * {Boolean} The mouse is down
-     */
-    mouseDown: false,
-
-    /**
-     * Property: lastDown
-     * {<OpenLayers.Pixel>} Location of the last mouse down
-     */
-    lastDown: null,
-
-    /**
-     * Property: lastUp
-     * {<OpenLayers.Pixel>}
-     */
-    lastUp: null,
-
-    /**
-     * APIProperty: persist
-     * {Boolean} Leave the feature rendered until destroyFeature is called.
-     *     Default is false.  If set to true, the feature remains rendered until
-     *     destroyFeature is called, typically by deactivating the handler or
-     *     starting another drawing.
-     */
-    persist: false,
-
-    /**
-     * Property: layerOptions
-     * {Object} Any optional properties to be set on the sketch layer.
-     */
-    layerOptions: null,
-
-    /**
-     * Constructor: OpenLayers.Handler.Point
-     * Create a new point handler.
-     *
-     * Parameters:
-     * control - {<OpenLayers.Control>} The control that owns this handler
-     * callbacks - {Object} An object with a properties whose values are
-     *     functions.  Various callbacks described below.
-     * options - {Object} An optional object with properties to be set on the
-     *           handler
-     *
-     * Named callbacks:
-     * create - Called when a sketch is first created.  Callback called with
-     *     the creation point geometry and sketch feature.
-     * modify - Called with each move of a vertex with the vertex (point)
-     *     geometry and the sketch feature.
-     * done - Called when the point drawing is finished.  The callback will
-     *     recieve a single argument, the point geometry.
-     * cancel - Called when the handler is deactivated while drawing.  The
-     *     cancel callback will receive a geometry.
-     */
-    initialize: function(control, callbacks, options) {
-        if(!(options && options.layerOptions && options.layerOptions.styleMap)) {
-            this.style = OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'], {});
-        }
-
-        OpenLayers.Handler.prototype.initialize.apply(this, arguments);
-    },
-    
-    /**
-     * APIMethod: activate
-     * turn on the handler
-     */
-    activate: function() {
-        if(!OpenLayers.Handler.prototype.activate.apply(this, arguments)) {
-            return false;
-        }
-        // create temporary vector layer for rendering geometry sketch
-        // TBD: this could be moved to initialize/destroy - setting visibility here
-        var options = OpenLayers.Util.extend({
-            displayInLayerSwitcher: false,
-            // indicate that the temp vector layer will never be out of range
-            // without this, resolution properties must be specified at the
-            // map-level for this temporary layer to init its resolutions
-            // correctly
-            calculateInRange: OpenLayers.Function.True
-        }, this.layerOptions);
-        this.layer = new OpenLayers.Layer.Vector(this.CLASS_NAME, options);
-        this.map.addLayer(this.layer);
-        return true;
-    },
-    
-    /**
-     * Method: createFeature
-     * Add temporary features
-     *
-     * Parameters:
-     * pixel - {<OpenLayers.Pixel>} A pixel location on the map.
-     */
-    createFeature: function(pixel) {
-        var lonlat = this.map.getLonLatFromPixel(pixel);
-        this.point = new OpenLayers.Feature.Vector(
-            new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat)
-        );
-        this.callback("create", [this.point.geometry, this.point]);
-        this.point.geometry.clearBounds();
-        this.layer.addFeatures([this.point], {silent: true});
-    },
-
-    /**
-     * APIMethod: deactivate
-     * turn off the handler
-     */
-    deactivate: function() {
-        if(!OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
-            return false;
-        }
-        // call the cancel callback if mid-drawing
-        if(this.drawing) {
-            this.cancel();
-        }
-        this.destroyFeature();
-        // If a layer's map property is set to null, it means that that layer
-        // isn't added to the map. Since we ourself added the layer to the map
-        // in activate(), we can assume that if this.layer.map is null it means
-        // that the layer has been destroyed (as a result of map.destroy() for
-        // example.
-        if (this.layer.map != null) {
-            this.layer.destroy(false);
-        }
-        this.layer = null;
-        return true;
-    },
-    
-    /**
-     * Method: destroyFeature
-     * Destroy the temporary geometries
-     */
-    destroyFeature: function() {
-        if(this.layer) {
-            this.layer.destroyFeatures();
-        }
-        this.point = null;
-    },
-
-    /**
-     * Method: finalize
-     * Finish the geometry and call the "done" callback.
-     *
-     * Parameters:
-     * cancel - {Boolean} Call cancel instead of done callback.  Default is
-     *     false.
-     */
-    finalize: function(cancel) {
-        var key = cancel ? "cancel" : "done";
-        this.drawing = false;
-        this.mouseDown = false;
-        this.lastDown = null;
-        this.lastUp = null;
-        this.callback(key, [this.geometryClone()]);
-        if(cancel || !this.persist) {
-            this.destroyFeature();
-        }
-    },
-
-    /**
-     * APIMethod: cancel
-     * Finish the geometry and call the "cancel" callback.
-     */
-    cancel: function() {
-        this.finalize(true);
-    },
-
-    /**
-     * Method: click
-     * Handle clicks.  Clicks are stopped from propagating to other listeners
-     *     on map.events or other dom elements.
-     * 
-     * Parameters:
-     * evt - {Event} The browser event
-     *
-     * Returns: 
-     * {Boolean} Allow event propagation
-     */
-    click: function(evt) {
-        OpenLayers.Event.stop(evt);
-        return false;
-    },
-
-    /**
-     * Method: dblclick
-     * Handle double-clicks.  Double-clicks are stopped from propagating to other
-     *     listeners on map.events or other dom elements.
-     * 
-     * Parameters:
-     * evt - {Event} The browser event
-     *
-     * Returns: 
-     * {Boolean} Allow event propagation
-     */
-    dblclick: function(evt) {
-        OpenLayers.Event.stop(evt);
-        return false;
-    },
-    
-    /**
-     * Method: modifyFeature
-     * Modify the existing geometry given a pixel location.
-     *
-     * Parameters:
-     * pixel - {<OpenLayers.Pixel>} A pixel location on the map.
-     */
-    modifyFeature: function(pixel) {
-        var lonlat = this.map.getLonLatFromPixel(pixel);
-        this.point.geometry.x = lonlat.lon;
-        this.point.geometry.y = lonlat.lat;
-        this.callback("modify", [this.point.geometry, this.point]);
-        this.point.geometry.clearBounds();
-        this.drawFeature();
-    },
-
-    /**
-     * Method: drawFeature
-     * Render features on the temporary layer.
-     */
-    drawFeature: function() {
-        this.layer.drawFeature(this.point, this.style);
-    },
-    
-    /**
-     * Method: getGeometry
-     * Return the sketch geometry.  If <multi> is true, this will return
-     *     a multi-part geometry.
-     *
-     * Returns:
-     * {<OpenLayers.Geometry.Point>}
-     */
-    getGeometry: function() {
-        var geometry = this.point && this.point.geometry;
-        if(geometry && this.multi) {
-            geometry = new OpenLayers.Geometry.MultiPoint([geometry]);
-        }
-        return geometry;
-    },
-
-    /**
-     * Method: geometryClone
-     * Return a clone of the relevant geometry.
-     *
-     * Returns:
-     * {<OpenLayers.Geometry>}
-     */
-    geometryClone: function() {
-        var geom = this.getGeometry();
-        return geom && geom.clone();
-    },
-  
-    /**
-     * Method: mousedown
-     * Handle mouse down.  Adjust the geometry and redraw.
-     * Return determines whether to propagate the event on the map.
-     * 
-     * Parameters:
-     * evt - {Event} The browser event
-     *
-     * Returns: 
-     * {Boolean} Allow event propagation
-     */
-    mousedown: function(evt) {
-        // check keyboard modifiers
-        if(!this.checkModifiers(evt)) {
-            return true;
-        }
-        // ignore double-clicks
-        if(this.lastDown && this.lastDown.equals(evt.xy)) {
-            return true;
-        }
-        this.drawing = true;
-        if(this.lastDown == null) {
-            if(this.persist) {
-                this.destroyFeature();
-            }
-            this.createFeature(evt.xy);
-        } else {
-            this.modifyFeature(evt.xy);
-        }
-        this.lastDown = evt.xy;
-        return false;
-    },
-
-    /**
-     * Method: mousemove
-     * Handle mouse move.  Adjust the geometry and redraw.
-     * Return determines whether to propagate the event on the map.
-     * 
-     * Parameters:
-     * evt - {Event} The browser event
-     *
-     * Returns: 
-     * {Boolean} Allow event propagation
-     */
-    mousemove: function (evt) {
-        if(this.drawing) {
-            this.modifyFeature(evt.xy);
-        }
-        return true;
-    },
-
-    /**
-     * Method: mouseup
-     * Handle mouse up.  Send the latest point in the geometry to the control.
-     * Return determines whether to propagate the event on the map.
-     *
-     * Parameters:
-     * evt - {Event} The browser event
-     *
-     * Returns: 
-     * {Boolean} Allow event propagation
-     */
-    mouseup: function (evt) {
-        if(this.drawing) {
-            this.finalize();
-            return false;
-        } else {
-            return true;
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Handler.Point"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Handler/Polygon.js
+++ /dev/null
@@ -1,145 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Handler/Path.js
- * @requires OpenLayers/Geometry/Polygon.js
- */
-
-/**
- * Class: OpenLayers.Handler.Polygon
- * Handler to draw a polygon on the map.  Polygon is displayed on mouse down,
- * moves on mouse move, and is finished on mouse up.
- *
- * Inherits from:
- *  - <OpenLayers.Handler.Path>
- *  - <OpenLayers.Handler>
- */
-OpenLayers.Handler.Polygon = OpenLayers.Class(OpenLayers.Handler.Path, {
-    
-    /**
-     * Parameter: polygon
-     * {<OpenLayers.Feature.Vector>}
-     */
-    polygon: null,
-
-    /**
-     * Constructor: OpenLayers.Handler.Polygon
-     * Create a Polygon Handler.
-     *
-     * Parameters:
-     * control - {<OpenLayers.Control>} The control that owns this handler
-     * callbacks - {Object} An object with a properties whose values are
-     *     functions.  Various callbacks described below.
-     * options - {Object} An optional object with properties to be set on the
-     *           handler
-     *
-     * Named callbacks:
-     * create - Called when a sketch is first created.  Callback called with
-     *     the creation point geometry and sketch feature.
-     * modify - Called with each move of a vertex with the vertex (point)
-     *     geometry and the sketch feature.
-     * point - Called as each point is added.  Receives the new point geometry.
-     * done - Called when the point drawing is finished.  The callback will
-     *     recieve a single argument, the polygon geometry.
-     * cancel - Called when the handler is deactivated while drawing.  The
-     *     cancel callback will receive a geometry.
-     */
-    initialize: function(control, callbacks, options) {
-        OpenLayers.Handler.Path.prototype.initialize.apply(this, arguments);
-    },
-    
-    /**
-     * Method: createFeature
-     * Add temporary geometries
-     *
-     * Parameters:
-     * pixel - {<OpenLayers.Pixel>} The initial pixel location for the new
-     *     feature.
-     */
-    createFeature: function(pixel) {
-        var lonlat = this.control.map.getLonLatFromPixel(pixel);
-        this.point = new OpenLayers.Feature.Vector(
-            new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat)
-        );
-        this.line = new OpenLayers.Feature.Vector(
-            new OpenLayers.Geometry.LinearRing([this.point.geometry])
-        );
-        this.polygon = new OpenLayers.Feature.Vector(
-            new OpenLayers.Geometry.Polygon([this.line.geometry])
-        );
-        this.callback("create", [this.point.geometry, this.getSketch()]);
-        this.point.geometry.clearBounds();
-        this.layer.addFeatures([this.polygon, this.point], {silent: true});
-    },
-
-    /**
-     * Method: destroyFeature
-     * Destroy temporary geometries
-     */
-    destroyFeature: function() {
-        OpenLayers.Handler.Path.prototype.destroyFeature.apply(this);
-        this.polygon = null;
-    },
-
-    /**
-     * Method: drawFeature
-     * Render geometries on the temporary layer.
-     */
-    drawFeature: function() {
-        this.layer.drawFeature(this.polygon, this.style);
-        this.layer.drawFeature(this.point, this.style);
-    },
-    
-    /**
-     * Method: getSketch
-     * Return the sketch feature.
-     *
-     * Returns:
-     * {<OpenLayers.Feature.Vector>}
-     */
-    getSketch: function() {
-        return this.polygon;
-    },
-
-    /**
-     * Method: getGeometry
-     * Return the sketch geometry.  If <multi> is true, this will return
-     *     a multi-part geometry.
-     *
-     * Returns:
-     * {<OpenLayers.Geometry.Polygon>}
-     */
-    getGeometry: function() {
-        var geometry = this.polygon && this.polygon.geometry;
-        if(geometry && this.multi) {
-            geometry = new OpenLayers.Geometry.MultiPolygon([geometry]);
-        }
-        return geometry;
-    },
-
-    /**
-     * Method: dblclick
-     * Handle double-clicks.  Finish the geometry and send it back
-     * to the control.
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    dblclick: function(evt) {
-        if(!this.freehandMode(evt)) {
-            // remove the penultimate point
-            var index = this.line.geometry.components.length - 2;
-            this.line.geometry.removeComponent(this.line.geometry.components[index]);
-            this.removePoint();
-            this.finalize();
-        }
-        return false;
-    },
-
-    CLASS_NAME: "OpenLayers.Handler.Polygon"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Handler/RegularPolygon.js
+++ /dev/null
@@ -1,422 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Handler/Drag.js
- */
-
-/**
- * Class: OpenLayers.Handler.RegularPolygon
- * Handler to draw a regular polygon on the map.  Polygon is displayed on mouse
- *     down, moves or is modified on mouse move, and is finished on mouse up.
- *     The handler triggers callbacks for 'done' and 'cancel'.  Create a new
- *     instance with the <OpenLayers.Handler.RegularPolygon> constructor.
- * 
- * Inherits from:
- *  - <OpenLayers.Handler>
- */
-OpenLayers.Handler.RegularPolygon = OpenLayers.Class(OpenLayers.Handler.Drag, {
-    
-    /**
-     * APIProperty: sides
-     * {Integer} Number of sides for the regular polygon.  Needs to be greater
-     *     than 2.  Defaults to 4.
-     */
-    sides: 4,
-
-    /**
-     * APIProperty: radius
-     * {Float} Optional radius in map units of the regular polygon.  If this is
-     *     set to some non-zero value, a polygon with a fixed radius will be
-     *     drawn and dragged with mose movements.  If this property is not
-     *     set, dragging changes the radius of the polygon.  Set to null by
-     *     default.
-     */
-    radius: null,
-    
-    /**
-     * APIProperty: snapAngle
-     * {Float} If set to a non-zero value, the handler will snap the polygon
-     *     rotation to multiples of the snapAngle.  Value is an angle measured
-     *     in degrees counterclockwise from the positive x-axis.  
-     */
-    snapAngle: null,
-    
-    /**
-     * APIProperty: snapToggle
-     * {String} If set, snapToggle is checked on mouse events and will set
-     *     the snap mode to the opposite of what it currently is.  To disallow
-     *     toggling between snap and non-snap mode, set freehandToggle to
-     *     null.  Acceptable toggle values are 'shiftKey', 'ctrlKey', and
-     *     'altKey'. Snap mode is only possible if this.snapAngle is set to a
-     *     non-zero value.
-     */
-    snapToggle: 'shiftKey',
-    
-    /**
-     * Property: layerOptions
-     * {Object} Any optional properties to be set on the sketch layer.
-     */
-    layerOptions: null,
-
-    /**
-     * APIProperty: persist
-     * {Boolean} Leave the feature rendered until clear is called.  Default
-     *     is false.  If set to true, the feature remains rendered until
-     *     clear is called, typically by deactivating the handler or starting
-     *     another drawing.
-     */
-    persist: false,
-
-    /**
-     * APIProperty: irregular
-     * {Boolean} Draw an irregular polygon instead of a regular polygon.
-     *     Default is false.  If true, the initial mouse down will represent
-     *     one corner of the polygon bounds and with each mouse movement, the
-     *     polygon will be stretched so the opposite corner of its bounds
-     *     follows the mouse position.  This property takes precedence over
-     *     the radius property.  If set to true, the radius property will
-     *     be ignored.
-     */
-    irregular: false,
-
-    /**
-     * Property: angle
-     * {Float} The angle from the origin (mouse down) to the current mouse
-     *     position, in radians.  This is measured counterclockwise from the
-     *     positive x-axis.
-     */
-    angle: null,
-
-    /**
-     * Property: fixedRadius
-     * {Boolean} The polygon has a fixed radius.  True if a radius is set before
-     *     drawing begins.  False otherwise.
-     */
-    fixedRadius: false,
-
-    /**
-     * Property: feature
-     * {<OpenLayers.Feature.Vector>} The currently drawn polygon feature
-     */
-    feature: null,
-
-    /**
-     * Property: layer
-     * {<OpenLayers.Layer.Vector>} The temporary drawing layer
-     */
-    layer: null,
-
-    /**
-     * Property: origin
-     * {<OpenLayers.Geometry.Point>} Location of the first mouse down
-     */
-    origin: null,
-
-    /**
-     * Constructor: OpenLayers.Handler.RegularPolygon
-     * Create a new regular polygon handler.
-     *
-     * Parameters:
-     * control - {<OpenLayers.Control>} The control that owns this handler
-     * callbacks - {Object} An object with a properties whose values are
-     *     functions.  Various callbacks described below.
-     * options - {Object} An object with properties to be set on the handler.
-     *     If the options.sides property is not specified, the number of sides
-     *     will default to 4.
-     *
-     * Named callbacks:
-     * create - Called when a sketch is first created.  Callback called with
-     *     the creation point geometry and sketch feature.
-     * done - Called when the sketch drawing is finished.  The callback will
-     *     recieve a single argument, the sketch geometry.
-     * cancel - Called when the handler is deactivated while drawing.  The
-     *     cancel callback will receive a geometry.
-     */
-    initialize: function(control, callbacks, options) {
-        if(!(options && options.layerOptions && options.layerOptions.styleMap)) {
-            this.style = OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'], {});
-        }
-
-        OpenLayers.Handler.prototype.initialize.apply(this,
-                                                [control, callbacks, options]);
-        this.options = (options) ? options : {};
-    },
-    
-    /**
-     * APIMethod: setOptions
-     * 
-     * Parameters:
-     * newOptions - {Object} 
-     */
-    setOptions: function (newOptions) {
-        OpenLayers.Util.extend(this.options, newOptions);
-        OpenLayers.Util.extend(this, newOptions);
-    },
-    
-    /**
-     * APIMethod: activate
-     * Turn on the handler.
-     *
-     * Return:
-     * {Boolean} The handler was successfully activated
-     */
-    activate: function() {
-        var activated = false;
-        if(OpenLayers.Handler.prototype.activate.apply(this, arguments)) {
-            // create temporary vector layer for rendering geometry sketch
-            var options = OpenLayers.Util.extend({
-                displayInLayerSwitcher: false,
-                // indicate that the temp vector layer will never be out of range
-                // without this, resolution properties must be specified at the
-                // map-level for this temporary layer to init its resolutions
-                // correctly
-                calculateInRange: OpenLayers.Function.True
-            }, this.layerOptions);
-            this.layer = new OpenLayers.Layer.Vector(this.CLASS_NAME, options);
-            this.map.addLayer(this.layer);
-            activated = true;
-        }
-        return activated;
-    },
-
-    /**
-     * APIMethod: deactivate
-     * Turn off the handler.
-     *
-     * Return:
-     * {Boolean} The handler was successfully deactivated
-     */
-    deactivate: function() {
-        var deactivated = false;
-        if(OpenLayers.Handler.Drag.prototype.deactivate.apply(this, arguments)) {
-            // call the cancel callback if mid-drawing
-            if(this.dragging) {
-                this.cancel();
-            }
-            // If a layer's map property is set to null, it means that that
-            // layer isn't added to the map. Since we ourself added the layer
-            // to the map in activate(), we can assume that if this.layer.map
-            // is null it means that the layer has been destroyed (as a result
-            // of map.destroy() for example.
-            if (this.layer.map != null) {
-                this.layer.destroy(false);
-                if (this.feature) {
-                    this.feature.destroy();
-                }
-            }
-            this.layer = null;
-            this.feature = null;
-            deactivated = true;
-        }
-        return deactivated;
-    },
-    
-    /**
-     * Method: down
-     * Start drawing a new feature
-     *
-     * Parameters:
-     * evt - {Event} The drag start event
-     */
-    down: function(evt) {
-        this.fixedRadius = !!(this.radius);
-        var maploc = this.map.getLonLatFromPixel(evt.xy);
-        this.origin = new OpenLayers.Geometry.Point(maploc.lon, maploc.lat);
-        // create the new polygon
-        if(!this.fixedRadius || this.irregular) {
-            // smallest radius should not be less one pixel in map units
-            // VML doesn't behave well with smaller
-            this.radius = this.map.getResolution();
-        }
-        if(this.persist) {
-            this.clear();
-        }
-        this.feature = new OpenLayers.Feature.Vector();
-        this.createGeometry();
-        this.callback("create", [this.origin, this.feature]);
-        this.layer.addFeatures([this.feature], {silent: true});
-        this.layer.drawFeature(this.feature, this.style);
-    },
-    
-    /**
-     * Method: move
-     * Respond to drag move events
-     *
-     * Parameters:
-     * evt - {Evt} The move event
-     */
-    move: function(evt) {
-        var maploc = this.map.getLonLatFromPixel(evt.xy);
-        var point = new OpenLayers.Geometry.Point(maploc.lon, maploc.lat);
-        if(this.irregular) {
-            var ry = Math.sqrt(2) * Math.abs(point.y - this.origin.y) / 2;
-            this.radius = Math.max(this.map.getResolution() / 2, ry);
-        } else if(this.fixedRadius) {
-            this.origin = point;
-        } else {
-            this.calculateAngle(point, evt);
-            this.radius = Math.max(this.map.getResolution() / 2,
-                                   point.distanceTo(this.origin));
-        }
-        this.modifyGeometry();
-        if(this.irregular) {
-            var dx = point.x - this.origin.x;
-            var dy = point.y - this.origin.y;
-            var ratio;
-            if(dy == 0) {
-                ratio = dx / (this.radius * Math.sqrt(2));
-            } else {
-                ratio = dx / dy;
-            }
-            this.feature.geometry.resize(1, this.origin, ratio);
-            this.feature.geometry.move(dx / 2, dy / 2);
-        }
-        this.layer.drawFeature(this.feature, this.style);
-    },
-
-    /**
-     * Method: up
-     * Finish drawing the feature
-     *
-     * Parameters:
-     * evt - {Event} The mouse up event
-     */
-    up: function(evt) {
-        this.finalize();
-        // the mouseup method of superclass doesn't call the
-        // "done" callback if there's been no move between
-        // down and up
-        if (this.start == this.last) {
-            this.callback("done", [evt.xy]);
-        }
-    },
-
-    /**
-     * Method: out
-     * Finish drawing the feature.
-     *
-     * Parameters:
-     * evt - {Event} The mouse out event
-     */
-    out: function(evt) {
-        this.finalize();
-    },
-
-    /**
-     * Method: createGeometry
-     * Create the new polygon geometry.  This is called at the start of the
-     *     drag and at any point during the drag if the number of sides
-     *     changes.
-     */
-    createGeometry: function() {
-        this.angle = Math.PI * ((1/this.sides) - (1/2));
-        if(this.snapAngle) {
-            this.angle += this.snapAngle * (Math.PI / 180);
-        }
-        this.feature.geometry = OpenLayers.Geometry.Polygon.createRegularPolygon(
-            this.origin, this.radius, this.sides, this.snapAngle
-        );
-    },
-    
-    /**
-     * Method: modifyGeometry
-     * Modify the polygon geometry in place.
-     */
-    modifyGeometry: function() {
-        var angle, point;
-        var ring = this.feature.geometry.components[0];
-        // if the number of sides ever changes, create a new geometry
-        if(ring.components.length != (this.sides + 1)) {
-            this.createGeometry();
-            ring = this.feature.geometry.components[0];
-        }
-        for(var i=0; i<this.sides; ++i) {
-            point = ring.components[i];
-            angle = this.angle + (i * 2 * Math.PI / this.sides);
-            point.x = this.origin.x + (this.radius * Math.cos(angle));
-            point.y = this.origin.y + (this.radius * Math.sin(angle));
-            point.clearBounds();
-        }
-    },
-    
-    /**
-     * Method: calculateAngle
-     * Calculate the angle based on settings.
-     *
-     * Parameters:
-     * point - {<OpenLayers.Geometry.Point>}
-     * evt - {Event}
-     */
-    calculateAngle: function(point, evt) {
-        var alpha = Math.atan2(point.y - this.origin.y,
-                               point.x - this.origin.x);
-        if(this.snapAngle && (this.snapToggle && !evt[this.snapToggle])) {
-            var snapAngleRad = (Math.PI / 180) * this.snapAngle;
-            this.angle = Math.round(alpha / snapAngleRad) * snapAngleRad;
-        } else {
-            this.angle = alpha;
-        }
-    },
-
-    /**
-     * APIMethod: cancel
-     * Finish the geometry and call the "cancel" callback.
-     */
-    cancel: function() {
-        // the polygon geometry gets cloned in the callback method
-        this.callback("cancel", null);
-        this.finalize();
-    },
-
-    /**
-     * Method: finalize
-     * Finish the geometry and call the "done" callback.
-     */
-    finalize: function() {
-        this.origin = null;
-        this.radius = this.options.radius;
-    },
-
-    /**
-     * APIMethod: clear
-     * Clear any rendered features on the temporary layer.  This is called
-     *     when the handler is deactivated, canceled, or done (unless persist
-     *     is true).
-     */
-    clear: function() {
-        if (this.layer) {
-            this.layer.renderer.clear();
-            this.layer.destroyFeatures();
-        }
-    },
-    
-    /**
-     * Method: callback
-     * Trigger the control's named callback with the given arguments
-     *
-     * Parameters:
-     * name - {String} The key for the callback that is one of the properties
-     *     of the handler's callbacks object.
-     * args - {Array} An array of arguments with which to call the callback
-     *     (defined by the control).
-     */
-    callback: function (name, args) {
-        // override the callback method to always send the polygon geometry
-        if (this.callbacks[name]) {
-            this.callbacks[name].apply(this.control,
-                                       [this.feature.geometry.clone()]);
-        }
-        // since sketch features are added to the temporary layer
-        // they must be cleared here if done or cancel
-        if(!this.persist && (name == "done" || name == "cancel")) {
-            this.clear();
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Handler.RegularPolygon"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Icon.js
+++ /dev/null
@@ -1,228 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * Class: OpenLayers.Icon
- * 
- * The icon represents a graphical icon on the screen.  Typically used in
- * conjunction with a <OpenLayers.Marker> to represent markers on a screen.
- *
- * An icon has a url, size and position.  It also contains an offset which 
- * allows the center point to be represented correctly.  This can be
- * provided either as a fixed offset or a function provided to calculate
- * the desired offset. 
- * 
- */
-OpenLayers.Icon = OpenLayers.Class({
-    
-    /** 
-     * Property: url 
-     * {String}  image url
-     */
-    url: null,
-    
-    /** 
-     * Property: size 
-     * {<OpenLayers.Size>} 
-     */
-    size: null,
-
-    /** 
-     * Property: offset 
-     * {<OpenLayers.Pixel>} distance in pixels to offset the image when being rendered
-     */
-    offset: null,    
-    
-    /** 
-     * Property: calculateOffset 
-     * {<OpenLayers.Pixel>} Function to calculate the offset (based on the size) 
-     */
-    calculateOffset: null,    
-    
-    /** 
-     * Property: imageDiv 
-     * {DOMElement} 
-     */
-    imageDiv: null,
-
-    /** 
-     * Property: px 
-     * {<OpenLayers.Pixel>} 
-     */
-    px: null,
-    
-    /** 
-     * Constructor: OpenLayers.Icon
-     * Creates an icon, which is an image tag in a div.  
-     *
-     * url - {String} 
-     * size - {<OpenLayers.Size>} 
-     * offset - {<OpenLayers.Pixel>}
-     * calculateOffset - {Function} 
-     */
-    initialize: function(url, size, offset, calculateOffset) {
-        this.url = url;
-        this.size = (size) ? size : new OpenLayers.Size(20,20);
-        this.offset = offset ? offset : new OpenLayers.Pixel(-(this.size.w/2), -(this.size.h/2));
-        this.calculateOffset = calculateOffset;
-
-        var id = OpenLayers.Util.createUniqueID("OL_Icon_");
-        this.imageDiv = OpenLayers.Util.createAlphaImageDiv(id);
-    },
-    
-    /** 
-     * Method: destroy
-     * Nullify references and remove event listeners to prevent circular 
-     * references and memory leaks
-     */
-    destroy: function() {
-        // erase any drawn elements
-        this.erase();
-
-        OpenLayers.Event.stopObservingElement(this.imageDiv.firstChild); 
-        this.imageDiv.innerHTML = "";
-        this.imageDiv = null;
-    },
-
-    /** 
-     * Method: clone
-     * 
-     * Returns:
-     * {<OpenLayers.Icon>} A fresh copy of the icon.
-     */
-    clone: function() {
-        return new OpenLayers.Icon(this.url, 
-                                   this.size, 
-                                   this.offset, 
-                                   this.calculateOffset);
-    },
-    
-    /**
-     * Method: setSize
-     * 
-     * Parameters:
-     * size - {<OpenLayers.Size>} 
-     */
-    setSize: function(size) {
-        if (size != null) {
-            this.size = size;
-        }
-        this.draw();
-    },
-    
-    /**
-     * Method: setUrl
-     * 
-     * Parameters:
-     * url - {String} 
-     */
-    setUrl: function(url) {
-        if (url != null) {
-            this.url = url;
-        }
-        this.draw();
-    },
-
-    /** 
-     * Method: draw
-     * Move the div to the given pixel.
-     * 
-     * Parameters:
-     * px - {<OpenLayers.Pixel>} 
-     * 
-     * Returns:
-     * {DOMElement} A new DOM Image of this icon set at the location passed-in
-     */
-    draw: function(px) {
-        OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv, 
-                                            null, 
-                                            null, 
-                                            this.size, 
-                                            this.url, 
-                                            "absolute");
-        this.moveTo(px);
-        return this.imageDiv;
-    }, 
-
-    /** 
-     * Method: erase
-     * Erase the underlying image element.
-     *
-     */
-    erase: function() {
-        if (this.imageDiv != null && this.imageDiv.parentNode != null) {
-            OpenLayers.Element.remove(this.imageDiv);
-        }
-    }, 
-    
-    /** 
-     * Method: setOpacity
-     * Change the icon's opacity
-     *
-     * Parameters:
-     * opacity - {float} 
-     */
-    setOpacity: function(opacity) {
-        OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv, null, null, null, 
-                                            null, null, null, null, opacity);
-
-    },
-    
-    /**
-     * Method: moveTo
-     * move icon to passed in px.
-     *
-     * Parameters:
-     * px - {<OpenLayers.Pixel>} 
-     */
-    moveTo: function (px) {
-        //if no px passed in, use stored location
-        if (px != null) {
-            this.px = px;
-        }
-
-        if (this.imageDiv != null) {
-            if (this.px == null) {
-                this.display(false);
-            } else {
-                if (this.calculateOffset) {
-                    this.offset = this.calculateOffset(this.size);  
-                }
-                var offsetPx = this.px.offset(this.offset);
-                OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv, null, offsetPx);
-            }
-        }
-    },
-    
-    /** 
-     * Method: display
-     * Hide or show the icon
-     *
-     * Parameters:
-     * display - {Boolean} 
-     */
-    display: function(display) {
-        this.imageDiv.style.display = (display) ? "" : "none"; 
-    },
-    
-
-    /**
-     * APIMethod: isDrawn
-     * 
-     * Returns:
-     * {Boolean} Whether or not the icon is drawn.
-     */
-    isDrawn: function() {
-        // nodeType 11 for ie, whose nodes *always* have a parentNode
-        // (of type document fragment)
-        var isDrawn = (this.imageDiv && this.imageDiv.parentNode && 
-                       (this.imageDiv.parentNode.nodeType != 11));    
-
-        return isDrawn;   
-    },
-
-    CLASS_NAME: "OpenLayers.Icon"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang.js
+++ /dev/null
@@ -1,134 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Namespace: OpenLayers.Lang
- * Internationalization namespace.  Contains dictionaries in various languages
- *     and methods to set and get the current language.
- */
-OpenLayers.Lang = {
-    
-    /** 
-     * Property: code
-     * {String}  Current language code to use in OpenLayers.  Use the
-     *     <setCode> method to set this value and the <getCode> method to
-     *     retrieve it.
-     */
-    code: null,
-
-    /** 
-     * APIProperty: defaultCode
-     * {String} Default language to use when a specific language can't be
-     *     found.  Default is "en".
-     */
-    defaultCode: "en",
-        
-    /**
-     * APIFunction: getCode
-     * Get the current language code.
-     *
-     * Returns:
-     * The current language code.
-     */
-    getCode: function() {
-        if(!OpenLayers.Lang.code) {
-            OpenLayers.Lang.setCode();
-        }
-        return OpenLayers.Lang.code;
-    },
-    
-    /**
-     * APIFunction: setCode
-     * Set the language code for string translation.  This code is used by
-     *     the <OpenLayers.Lang.translate> method.
-     *
-     * Parameters-
-     * code - {String} These codes follow the IETF recommendations at
-     *     http://www.ietf.org/rfc/rfc3066.txt.  If no value is set, the
-     *     browser's language setting will be tested.  If no <OpenLayers.Lang>
-     *     dictionary exists for the code, the <OpenLayers.String.defaultLang>
-     *     will be used.
-     */
-    setCode: function(code) {
-        var lang;
-        if(!code) {
-            code = (OpenLayers.Util.getBrowserName() == "msie") ?
-                navigator.userLanguage : navigator.language;
-        }
-        var parts = code.split('-');
-        parts[0] = parts[0].toLowerCase();
-        if(typeof OpenLayers.Lang[parts[0]] == "object") {
-            lang = parts[0];
-        }
-
-        // check for regional extensions
-        if(parts[1]) {
-            var testLang = parts[0] + '-' + parts[1].toUpperCase();
-            if(typeof OpenLayers.Lang[testLang] == "object") {
-                lang = testLang;
-            }
-        }
-        if(!lang) {
-            OpenLayers.Console.warn(
-                'Failed to find OpenLayers.Lang.' + parts.join("-") +
-                ' dictionary, falling back to default language'
-            );
-            lang = OpenLayers.Lang.defaultCode;
-        }
-        
-        OpenLayers.Lang.code = lang;
-    },
-
-    /**
-     * APIMethod: translate
-     * Looks up a key from a dictionary based on the current language string.
-     *     The value of <getCode> will be used to determine the appropriate
-     *     dictionary.  Dictionaries are stored in <OpenLayers.Lang>.
-     *
-     * Parameters:
-     * key - {String} The key for an i18n string value in the dictionary.
-     * context - {Object} Optional context to be used with
-     *     <OpenLayers.String.format>.
-     * 
-     * Returns:
-     * {String} A internationalized string.
-     */
-    translate: function(key, context) {
-        var dictionary = OpenLayers.Lang[OpenLayers.Lang.getCode()];
-        var message = dictionary[key];
-        if(!message) {
-            // Message not found, fall back to message key
-            message = key;
-        }
-        if(context) {
-            message = OpenLayers.String.format(message, context);
-        }
-        return message;
-    }
-    
-};
-
-
-/**
- * APIMethod: OpenLayers.i18n
- * Alias for <OpenLayers.Lang.translate>.  Looks up a key from a dictionary
- *     based on the current language string. The value of
- *     <OpenLayers.Lang.getCode> will be used to determine the appropriate
- *     dictionary.  Dictionaries are stored in <OpenLayers.Lang>.
- *
- * Parameters:
- * key - {String} The key for an i18n string value in the dictionary.
- * context - {Object} Optional context to be used with
- *     <OpenLayers.String.format>.
- * 
- * Returns:
- * {String} A internationalized string.
- */
-OpenLayers.i18n = OpenLayers.Lang.translate;
-

--- a/labs/openlayers/lib/OpenLayers/Lang/ar.js
+++ /dev/null
@@ -1,39 +1,1 @@
-/* Translators (2009 onwards):
- *  - Meno25
- *  - Mutarjem horr
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["ar"]
- * Dictionary for العربية.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["ar"] = OpenLayers.Util.applyDefaults({
-
-    'permalink': "وصلة دائمة",
-
-    'baseLayer': "الطبقة الاساسية",
-
-    'readNotImplemented': "القراءة غير محققة.",
-
-    'writeNotImplemented': "الكتابة غير محققة",
-
-    'errorLoadingGML': "خطأ عند تحميل الملف جي ام ال ${url}",
-
-    'scale': "النسبة = 1 : ${scaleDenom}",
-
-    'W': "غ",
-
-    'E': "شر",
-
-    'N': "شم",
-
-    'S': "ج"
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/be-tarask.js
+++ /dev/null
@@ -1,81 +1,1 @@
-/* Translators (2009 onwards):
- *  - EugeneZelenko
- *  - Jim-by
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["be-tarask"]
- * Dictionary for Беларуская (тарашкевіца).  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["be-tarask"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Неапрацаваны вынік запыту ${statusText}",
-
-    'permalink': "Сталая спасылка",
-
-    'overlays': "Слаі",
-
-    'baseLayer': "Базавы слой",
-
-    'sameProjection': "Аглядная мапа працуе толькі калі яна мае тую ж праекцыю, што і асноўная мапа",
-
-    'readNotImplemented': "Функцыянальнасьць чытаньня ня створаная.",
-
-    'writeNotImplemented': "Функцыянальнасьць запісу ня створаная.",
-
-    'noFID': "Немагчыма абнавіць магчымасьць, для якога не існуе FID.",
-
-    'errorLoadingGML': "Памылка загрузкі файла GML ${url}",
-
-    'browserNotSupported': "Ваш браўзэр не падтрымлівае вэктарную графіку. У цяперашні момант падтрымліваюцца: ${renderers}",
-
-    'componentShouldBe': "addFeatures : кампанэнт павінен быць ${geomType}",
-
-    'getFeatureError': "getFeatureFromEvent выкліканы для слоя бяз рэндэру. Звычайна гэта азначае, што Вы зьнішчылі слой, але пакінулі зьвязаны зь ім апрацоўшчык.",
-
-    'minZoomLevelError': "Уласьцівасьць minZoomLevel прызначана толькі для выкарыстаньня са слаямі вытворнымі ад FixedZoomLevels. Тое, што  гэты wfs-слой правяраецца на minZoomLevel — рэха прошлага. Але мы ня можам выдаліць гэтую магчымасьць, таму што ад яе залежаць некаторыя заснаваныя на OL дастасаваньні. Тым ня менш, праверка minZoomLevel будзе выдаленая ў вэрсіі 3.0. Калі ласка, выкарыстоўваеце замест яе ўстаноўкі мінімальнага/максымальнага памераў, як апісана тут: http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "WFS-транзакцыя: ПОСЬПЕХ ${response}",
-
-    'commitFailed': "WFS-транзакцыя: ПАМЫЛКА ${response}",
-
-    'googleWarning': "Не атрымалася загрузіць слой Google. \x3cbr\x3e\x3cbr\x3eКаб пазбавіцца гэтага паведамленьня, выберыце новы базавы слой у сьпісе ў верхнім правым куце.\x3cbr\x3e\x3cbr\x3e Хутчэй за ўсё, прычына ў тым, што скрыпт бібліятэкі Google Maps ня быў уключаныя альбо не ўтрымлівае слушны API-ключ для Вашага сайта.\x3cbr\x3e\x3cbr\x3eРаспрацоўшчыкам: Для таго, каб даведацца як зрабіць так, каб усё працавала, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eнацісьніце тут\x3c/a\x3e",
-
-    'getLayerWarning': "Немагчыма загрузіць слой ${layerType}.\x3cbr\x3e\x3cbr\x3eКаб пазбавіцца гэтага паведамленьня, выберыце новы базавы слой у сьпісе ў верхнім правым куце.\x3cbr\x3e\x3cbr\x3eХутчэй за ўсё, прычына ў тым, што скрыпт бібліятэкі ${layerLib} ня быў слушна ўключаны.\x3cbr\x3e\x3cbr\x3eРаспрацоўшчыкам: Для таго, каб даведацца як зрабіць так, каб усё працавала, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eнацісьніце тут\x3c/a\x3e",
-
-    'scale': "Маштаб = 1 : ${scaleDenom}",
-
-    'W': "З",
-
-    'E': "У",
-
-    'N': "Пн",
-
-    'S': "Пд",
-
-    'layerAlreadyAdded': "Вы паспрабавалі дадаць слой ${layerName} на мапу, але ён ужо дададзены",
-
-    'reprojectDeprecated': "Вы выкарыстоўваеце ўстаноўку \'reproject\' для слоя ${layerName}. Гэтая ўстаноўка зьяўляецца састарэлай: яна выкарыстоўвалася для падтрымкі паказу зьвестак на камэрцыйных базавых мапах, але гэта функцыя цяпер рэалізаваная ў убудаванай падтрымцы сфэрычнай праекцыі Мэркатара. Дадатковая інфармацыя ёсьць на http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Гэты мэтад састарэлы і будзе выдалены ў вэрсіі 3.0. Калі ласка, замест яго выкарыстоўвайце ${newMethod}.",
-
-    'boundsAddError': "Вам неабходна падаць абодва значэньні x і y для функцыі складаньня.",
-
-    'lonlatAddError': "Вам неабходна падаць абодва значэньні lon і lat для функцыі складаньня.",
-
-    'pixelAddError': "Вам неабходна падаць абодва значэньні x і y для функцыі складаньня.",
-
-    'unsupportedGeometryType': "Тып геамэтрыі не падтрымліваецца: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition failed: верагодна элемэнт з ідэнтыфікатарам ${elemId} займае няслушнае месца.",
-
-    'filterEvaluateNotImplemented': "evaluate не рэалізаваны для гэтага тыпу фільтру."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/bg.js
+++ /dev/null
@@ -1,30 +1,1 @@
-/* Translators (2009 onwards):
- *  - DCLXVI
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["bg"]
- * Dictionary for Български.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["bg"] = OpenLayers.Util.applyDefaults({
-
-    'permalink': "Постоянна препратка",
-
-    'baseLayer': "Основен слой",
-
-    'errorLoadingGML': "Грешка при зареждане на GML файл ${url}",
-
-    'scale': "Мащаб = 1 : ${scaleDenom}",
-
-    'layerAlreadyAdded': "Опитахте да добавите слой ${layerName} в картата, но той вече е добавен",
-
-    'methodDeprecated': "Този метод е остарял и ще бъде премахват в 3.0. Вместо него използвайте ${newMethod}."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/br.js
+++ /dev/null
@@ -1,80 +1,1 @@
-/* Translators (2009 onwards):
- *  - Fulup
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["br"]
- * Dictionary for Brezhoneg.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["br"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Distro evel reked anveret ${statusText}",
-
-    'permalink': "Peurliamm",
-
-    'overlays': "Gwiskadoù",
-
-    'baseLayer': "Gwiskad diazez",
-
-    'sameProjection': "Ne\'z ar gartenn lec\'hiañ en-dro nemet pa vez heñvel ar banndres anezhi ha hini ar gartenn bennañ",
-
-    'readNotImplemented': "N\'eo ket emplementet al lenn.",
-
-    'writeNotImplemented': "N\'eo ket emplementet ar skrivañ.",
-
-    'noFID': "N\'haller ket hizivaat un elfenn ma n\'eus ket a niverenn-anaout (FID) eviti.",
-
-    'errorLoadingGML': "Fazi e-ser kargañ ar restr GML ${url}",
-
-    'browserNotSupported': "N\'eo ket skoret an daskor vektorel gant ho merdeer. Setu aze an daskorerioù skoret evit ar poent :\n${renderers}",
-
-    'componentShouldBe': "addFeatures : bez\' e tlefe ar parzh besañ eus ar seurt ${geomType}",
-
-    'getFeatureError': "Galvet eo bet getFeatureFromEvent called war ur gwiskad hep daskorer. Kement-se a dalvez ez eus bet freuzet ur gwiskad hag hoc\'h eus miret un embreger bennak stag outañ.",
-
-    'minZoomLevelError': "Ne zleer implijout ar perzh minZoomLevel nemet evit gwiskadoù FixedZoomLevels-descendent. Ar fed ma wiria ar gwiskad WHS-se hag-eñ ez eus eus minZoomLevel zo un aspadenn gozh. Koulskoude n\'omp ket evit e ziverkañ kuit da derriñ arloadoù diazezet war OL a c\'hallfe bezañ stag outañ. Setu perak eo dispredet -- Lamet kuit e vo ar gwiriañ minZoomLevel a-is er stumm 3.0. Ober gant an arventennoù bihanañ/brasañ evel deskrivet amañ e plas : http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "Treuzgread WFS : MAT EO ${response}",
-
-    'commitFailed': "Treuzgread WFS Transaction: C\'HWITET ${response}",
-
-    'googleWarning': "N\'eus ket bet gallet kargañ ar gwiskad Google ent reizh.\x3cbr\x3e\x3cbr\x3eEvit en em zizober eus ar c\'hemenn-mañ, dibabit ur BaseLayer nevez en diuzer gwiskadoù er c\'horn dehoù el laez.\x3cbr\x3e\x3cbr\x3eSur a-walc\'h eo peogwir n\'eo ket bet ensoc\'het levraoueg Google Maps pe neuze ne glot ket an alc\'hwez API gant ho lec\'hienn.\x3cbr\x3e\x3cbr\x3eDiorroerien : Evit reizhañ an dra-se, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eclick here\x3c/a\x3e",
-
-    'getLayerWarning': "N\'haller ket kargañ ar gwiskad ${layerType} ent reizh.\x3cbr\x3e\x3cbr\x3eEvit en em zizober eus ar c\'hemenn-mañ, dibabit ur BaseLayer nevez en diuzer gwiskadoù er c\'horn dehoù el laez.\x3cbr\x3e\x3cbr\x3eSur a-walc\'h eo peogwir n\'eo ket bet ensoc\'het mat al levraoueg ${layerLib}.\x3cbr\x3e\x3cbr\x3eDiorroerien : Evit gouzout penaos reizhañ an dra-se, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eclick here\x3c/a\x3e",
-
-    'scale': "Skeul = 1 : ${scaleDenom}",
-
-    'W': "K",
-
-    'E': "R",
-
-    'N': "N",
-
-    'S': "S",
-
-    'layerAlreadyAdded': "Klasket hoc\'h eus ouzhpennañ ar gwiskad : ${layerName} d\'ar gartenn, met ouzhpennet e oa bet c\'hoazh",
-
-    'reprojectDeprecated': "Emaoc\'h oc\'h implijout an dibarzh \'reproject\' war ar gwiskad ${layerName}. Dispredet eo an dibarzh-mañ : bet eo hag e talveze da ziskwel roadennoù war-c\'horre kartennoù diazez kenwerzhel, un dra hag a c\'haller ober bremañ gant an arc\'hwel dre skor banndres boullek Mercator. Muioc\'h a ditouroù a c\'haller da gaout war http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Dispredet eo an daore-se ha tennet e vo kuit eus ar stumm 3.0. Grit gant ${newMethod} e plas.",
-
-    'boundsAddError': "Rekis eo tremen an div dalvoudenn x ha y d\'an arc\'hwel add.",
-
-    'lonlatAddError': "Rekis eo tremen an div dalvoudenn hedred ha ledred d\'an arc\'hwel add.",
-
-    'pixelAddError': "Rekis eo tremen an div dalvoudenn x ha y d\'an arc\'hwel add.",
-
-    'unsupportedGeometryType': "Seurt mentoniezh anskoret : ${geomType}",
-
-    'pagePositionFailed': "C\'hwitet eo OpenLayers.Util.pagePosition : marteze emañ lec\'hiet fall an elfenn id ${elemId}.",
-
-    'filterEvaluateNotImplemented': "N\'eo ket bet emplementet ar priziañ evit seurt siloù c\'hoazh."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/ca.js
+++ /dev/null
@@ -1,129 +1,1 @@
-/**
- * @requires OpenLayers/Lang.js
- */
 
-/**
- * Namespace: OpenLayers.Lang["ca"]
- * Dictionary for Catalan, UTF8 encoding. Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang.ca = {
-
-    'unhandledRequest': "Resposta a petició no gestionada ${statusText}",
-
-    'permalink': "Enllaç permanent",
-
-    'overlays': "Capes addicionals",
-
-    'baseLayer': "Capa Base",
-
-    'sameProjection':
-        "El mapa de referència només funciona si té la mateixa projecció que el mapa principal",
-
-    'readNotImplemented': "Lectura no implementada.",
-
-    'writeNotImplemented': "Escriptura no implementada.",
-
-    'noFID': "No es pot actualitzar un element per al que no existeix FID.",
-
-    'errorLoadingGML': "Error carregant el fitxer GML ${url}",
-
-    'browserNotSupported':
-        "El seu navegador no suporta renderització vectorial. Els renderitzadors suportats actualment són:\n${renderers}",
-
-    'componentShouldBe': "addFeatures : el component ha de ser de tipus ${geomType}",
-
-    // console message
-    'getFeatureError':
-        "getFeatureFromEvent ha estat cridat des d'una capa sense renderizador. Això normalment vol dir que " +
-        "s'ha eliminat una capa, però no el handler associat a ella.",
-
-    // console message
-    'minZoomLevelError':
-        "La propietat minZoomLevel s'ha d'utilitzar només " +
-        "amb les capes que tenen FixedZoomLevels. El fet que " +
-        "una capa wfs comprovi minZoomLevel és una relíquia del " +
-        "passat. No podem, però, eliminar-la sense trencar " +
-        "les aplicacions d'OpenLayers que en puguin dependre. " +
-        "Així doncs estem fent-la obsoleta -- la comprovació " +
-        "minZoomLevel s'eliminarà a la versió 3.0. Feu servir " +
-        "els paràmetres min/max resolution en substitució, tal com es descriu aquí: " +
-        "http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "Transacció WFS: CORRECTA ${response}",
-
-    'commitFailed': "Transacció WFS: HA FALLAT ${response}",
-
-    'googleWarning':
-        "La capa Google no s'ha pogut carregar correctament.<br><br>" +
-        "Per evitar aquest missatge, seleccioneu una nova Capa Base " +
-        "al gestor de capes de la cantonada superior dreta.<br><br>" +
-        "Probablement això és degut a que l'script de la biblioteca de " +
-    "Google Maps no ha estat inclòs a la vostra pàgina, o no " +
-    "conté la clau de l'API correcta per a la vostra adreça.<br><br>" +
-        "Desenvolupadors: Per obtenir consells sobre com fer anar això, " +
-        "<a href='http://trac.openlayers.org/wiki/Google' " +
-        "target='_blank'>féu clic aquí</a>",
-
-    'getLayerWarning':
-        "Per evitar aquest missatge, seleccioneu una nova Capa Base " +
-        "al gestor de capes de la cantonada superior dreta.<br><br>" +
-        "Probablement això és degut a que l'script de la biblioteca " +
-        "${layerLib} " +
-        "no ha estat inclòs a la vostra pàgina.<br><br>" +
-        "Desenvolupadors: Per obtenir consells sobre com fer anar això, " +
-        "<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
-        "target='_blank'>féu clic aquí</a>",
-
-    'scale': "Escala = 1 : ${scaleDenom}",
-
-    //labels for the graticule control
-    'W': 'O',
-    'E': 'E',
-    'N': 'N',
-    'S': 'S',
-    'graticule': 'Retícula',    
-        
-    // console message
-    'layerAlreadyAdded':
-        "Heu intentat afegir la capa: ${layerName} al mapa, però ja ha estat afegida anteriorment",
-
-    // console message
-    'reprojectDeprecated':
-        "Esteu fent servir l'opció 'reproject' a la capa " +
-        "${layerName}. Aquesta opció és obsoleta: el seu ús fou concebut " +
-        "per suportar la visualització de dades sobre mapes base comercials, " + 
-        "però ara aquesta funcionalitat s'hauria d'assolir mitjançant el suport " +
-        "de la projecció Spherical Mercator. Més informació disponible a " +
-        "http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    // console message
-    'methodDeprecated':
-        "Aquest mètode és obsolet i s'eliminarà a la versió 3.0. " +
-        "Si us plau feu servir em mètode alternatiu ${newMethod}.",
-
-    // console message
-    'boundsAddError': "Ha de proporcionar els valors x i y a la funció add.",
-
-    // console message
-    'lonlatAddError': "Ha de proporcionar els valors lon i lat a la funció add.",
-
-    // console message
-    'pixelAddError': "Ha de proporcionar els valors x i y a la funció add.",
-
-    // console message
-    'unsupportedGeometryType': "Tipus de geometria no suportada: ${geomType}",
-
-    // console message
-    'pagePositionFailed':
-        "OpenLayers.Util.pagePosition ha fallat: l'element amb id ${elemId} pot estar fora de lloc.",
-                    
-    // console message
-    'filterEvaluateNotImplemented': "evaluate no està implementat per aquest tipus de filtre.",
-
-    // **** end ****
-    'end': ''
-
-};
-

--- a/labs/openlayers/lib/OpenLayers/Lang/cs-CZ.js
+++ /dev/null
@@ -1,70 +1,1 @@
-/* Translators (2009 onwards):
- *  - Mormegil
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["cs-CZ"]
- * Dictionary for Česky.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["cs-CZ"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Nezpracovaná návratová hodnota ${statusText}",
-
-    'permalink': "Trvalý odkaz",
-
-    'overlays': "Překryvné vrstvy",
-
-    'baseLayer': "Podkladové vrstvy",
-
-    'sameProjection': "Přehledka pracuje správně pouze tehdy, pokud je ve stejné projekci jako hlavní mapa",
-
-    'readNotImplemented': "Read není implementováno.",
-
-    'writeNotImplemented': "Write není implementováno.",
-
-    'noFID': "Nelze aktualizovat prvek, pro který neexistuje FID.",
-
-    'errorLoadingGML': "Chyba při načítání souboru GML ${url}",
-
-    'browserNotSupported': "Váš prohlížeč nepodporuje vykreslování vektorů. Momentálně podporované nástroje jsou::\n${renderers}",
-
-    'componentShouldBe': "addFeatures : komponenta by měla být ${geomType}",
-
-    'getFeatureError': "getFeatureFromEvent bylo zavoláno na vrstvě, která nemá vykreslovač. To obyčejně znamená, že jste odstranil vrstvu, ale ne rutinu s ní asociovanou.",
-
-    'minZoomLevelError': "Vlastnost minZoomLevel by se měla používat pouze s potomky FixedZoomLevels vrstvami. To znamená, že vrstva wfs kontroluje, zda-li minZoomLevel není zbytek z minulosti.Nelze to ovšem vyjmout bez možnosti, že bychom rozbili aplikace postavené na OL, které by na tom mohly záviset. Proto tuto vlastnost nedoporučujeme používat --  kontrola minZoomLevel bude odstraněna ve verzi 3.0. Použijte prosím raději nastavení min/max podle příkaldu popsaného na: http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "WFS Transaction: ÚSPĚCH ${response}",
-
-    'commitFailed': "WFS Transaction: CHYBA ${response}",
-
-    'googleWarning': "Nepodařilo se správně načíst vrstvu Google.\x3cbr\x3e\x3cbr\x3eAbyste se zbavili této zprávy, zvolte jinou základní vrstvu v přepínači vrstev.\x3cbr\x3e\x3cbr\x3eTo se většinou stává, pokud nebyl načten skript, nebo neobsahuje správný klíč pro API pro tuto stránku.\x3cbr\x3e\x3cbr\x3eVývojáři: Pro pomoc, aby tohle fungovalo , \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eklikněte sem\x3c/a\x3e",
-
-    'getLayerWarning': "The ${layerType} Layer was unable to load correctly.\x3cbr\x3e\x3cbr\x3eTo get rid of this message, select a new BaseLayer in the layer switcher in the upper-right corner.\x3cbr\x3e\x3cbr\x3eMost likely, this is because the ${layerLib} library script was either not correctly included.\x3cbr\x3e\x3cbr\x3eDevelopers: For help getting this working correctly, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eclick here\x3c/a\x3e",
-
-    'scale': "Měřítko = 1 : ${scaleDenom}",
-
-    'layerAlreadyAdded': "Pokusili jste se přidat vrstvu: ${layerName} do mapy, ale tato vrstva je již v mapě přítomna.",
-
-    'reprojectDeprecated': "Použil jste volbu \'reproject\' ve vrstvě ${layerName}. Tato volba není doporučená: byla zde proto, aby bylo možno zobrazovat data z okomerčních serverů, ale tato funkce je nyní zajištěna pomocí podpory Spherical Mercator. Více informací naleznete na http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Tato metoda je zavržená a bude ve verzi 3.0 odstraněna. Prosím, použijte raději ${newMethod}.",
-
-    'boundsAddError': "Pro přídavnou funkci musíte zadat obě souřadnice x a y.",
-
-    'lonlatAddError': "Pro přídavnou funkci musíte zadat obě souřadnice lon a lat.",
-
-    'pixelAddError': "Pro přídavnou funkci musíte zadat obě souřadnice x a y.",
-
-    'unsupportedGeometryType': "Nepodporovaný typ geometrie: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition selhalo: element s  id ${elemId} je asi umístěn chybně."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/da-DK.js
+++ /dev/null
@@ -1,120 +1,1 @@
-/**
- * @requires OpenLayers/Lang.js
- */
 
-/**
- * Namespace: OpenLayers.Lang["da-DK"]
- * Dictionary for Danish.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang['da-DK'] = {
-
-    'unhandledRequest': "En ikke håndteret forespørgsel returnerede ${statusText}",
-
-    'permalink': "Permalink",
-
-    'overlays': "Kortlag",
-
-    'baseLayer': "Baggrundslag",
-
-    'sameProjection':
-        "Oversigtskortet fungerer kun når det har samme projektion som hovedkortet",
-
-    'readNotImplemented': "Læsning er ikke implementeret.",
-
-    'writeNotImplemented': "Skrivning er ikke implementeret.",
-
-    'noFID': "Kan ikke opdateret en feature (et objekt) der ikke har et FID.",
-
-    'errorLoadingGML': "Fejlede under indlæsning af GML fil ${url}",
-
-    'browserNotSupported':
-        "Din browser understøtter ikke vektor visning. Følgende vektor visninger understøttes:\n${renderers}",
-
-    'componentShouldBe': "addFeatures : komponenten skal være en ${geomType}",
-
-    // console message
-    'getFeatureError':
-        "getFeatureFromEvent blev kaldt på et lag uden en visning. Dette betyder som regel at du " +
-        "har destrueret et lag, men ikke de håndteringer der var tilknyttet.",
-
-    // console message
-    'minZoomLevelError':
-        "Egenskaben minZoomLevel er kun beregnet til brug " +
-        "med FixedZoomLevels. At dette WFS lag kontrollerer " +
-        "minZoomLevel egenskaben, er et levn fra en tidligere " +
-        "version. Vi kan desværre ikke fjerne dette uden at risikere " +
-        "at ødelægge eksisterende OL baserede programmer der " +
-        " benytter denne funktionalitet. " +
-        "Egenskaben bør derfor ikke anvendes, og minZoomLevel " +
-        "kontrollen herunder vil blive fjernet i version 3.0. " +
-        "Benyt istedet min/max opløsnings indstillingerne, som " +
-        "er beskrevet her: " +
-        "http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "WFS transaktion: LYKKEDES ${response}",
-
-    'commitFailed': "WFS transaktion: MISLYKKEDES ${response}",
-
-    'googleWarning':
-        "Google laget kunne ikke indlæses.<br><br>" +
-        "For at fjerne denne besked, vælg et nyt bagrundskort i " +
-        "lagskifteren i øverste højre hjørne.<br><br>" +
-        "Fejlen skyldes formentlig at Google Maps bibliotekts " +
-        "scriptet ikke er inkluderet, eller ikke indeholder den " +
-        "korrkte API nøgle for dit site.<br><br>" +
-        "Udviklere: For hjælp til at få dette til at fungere, " +
-        "<a href='http://trac.openlayers.org/wiki/Google' " +
-        "target='_blank'>klik her</a>",
-
-    'getLayerWarning':
-        "${layerType}-laget kunne ikke indlæses.<br><br>" +
-        "For at fjerne denne besked, vælg et nyt bagrundskort i " +
-        "lagskifteren i øverste højre hjørne.<br><br>" +
-        "Fejlen skyldes formentlig at ${layerLib} bibliotekts " +
-        "scriptet ikke er inkluderet.<br><br>" +
-        "Udviklere: For hjælp til at få dette til at fungere, " +
-        "<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
-        "target='_blank'>klik her</a>",
-
-    'scale': "Målforhold = 1 : ${scaleDenom}",
-
-    // console message
-    'layerAlreadyAdded':
-        "Du har forsøgt at tilføje laget: ${layerName} til kortet, men det er allerede tilføjet",
-
-    // console message
-    'reprojectDeprecated':
-        "Du anvender indstillingen 'reproject' på laget ${layerName}." + 
-        "Denne indstilling bør ikke længere anvendes. Den var beregnet " +
-        "til at vise data ovenpå kommercielle grundkort, men den funktionalitet " +
-        "bør nu opnås ved at anvende Spherical Mercator understøttelsen. " +
-        "Mere information er tilgængelig her: " +
-        "http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    // console message
-    'methodDeprecated':
-        "Denne funktion bør ikke længere anvendes, og vil blive fjernet i version 3.0. " +
-        "Anvend venligst funktionen ${newMethod} istedet.",
-
-    // console message
-    'boundsAddError': "Du skal angive både x og y værdier i kaldet til add funktionen.",
-
-    // console message
-    'lonlatAddError': "Du skal angive både lon og lat værdier i kaldet til add funktionen.",
-
-    // console message
-    'pixelAddError': "Du skal angive både x og y værdier i kaldet til add funktionen.",
-
-    // console message
-    'unsupportedGeometryType': "Geometri typen: ${geomType} er ikke understøttet.",
-
-    // console message
-    'pagePositionFailed':
-        "OpenLayers.Util.pagePosition fejlede: elementet med id ${elemId} er måske placeret forkert.",
-
-    // console message
-    'filterEvaluateNotImplemented': "evaluering er ikke implementeret for denne filter type."
-};
-

--- a/labs/openlayers/lib/OpenLayers/Lang/de.js
+++ /dev/null
@@ -1,82 +1,1 @@
-/* Translators (2009 onwards):
- *  - Grille chompa
- *  - Nikiwaibel
- *  - Umherirrender
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["de"]
- * Dictionary for Deutsch.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["de"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Unbehandelte Anfragerückmeldung ${statusText}",
-
-    'permalink': "Permalink",
-
-    'overlays': "Overlays",
-
-    'baseLayer': "Grundkarte",
-
-    'sameProjection': "Die Übersichtskarte funktioniert nur, wenn sie dieselbe Projektion wie die Hauptkarte verwendet",
-
-    'readNotImplemented': "Lesen nicht implementiert.",
-
-    'writeNotImplemented': "Schreiben nicht implementiert.",
-
-    'noFID': "Ein Feature, für das keine FID existiert, kann nicht aktualisiert werden.",
-
-    'errorLoadingGML': "Fehler beim Laden der GML-Datei ${url}",
-
-    'browserNotSupported': "Ihr Browser unterstützt keine Vektordarstellung. Aktuell unterstützte Renderer:\n${renderers}",
-
-    'componentShouldBe': "addFeatures: Komponente muss vom Typ ${geomType} sein",
-
-    'getFeatureError': "getFeatureFromEvent wurde vom einem Layer ohne Renderer aufgerufen. Dies bedeutet normalerweise, dass ein Layer entfernt wurde, aber nicht Handler, die auf ihn verweisen.",
-
-    'minZoomLevelError': "Die \x3ccode\x3eminZoomLevel\x3c/code\x3e-Eigenschaft ist nur für die Verwendung mit \x3ccode\x3eFixedZoomLevels\x3c/code\x3e-untergeordneten Layers vorgesehen. Das dieser \x3ctt\x3ewfs\x3c/tt\x3e-Layer die \x3ccode\x3eminZoomLevel\x3c/code\x3e-Eigenschaft überprüft ist ein Relikt der Vergangenheit. Wir können diese Überprüfung nicht entfernen, ohne das OL basierende Applikationen nicht mehr funktionieren. Daher markieren wir es als veraltet - die \x3ccode\x3eminZoomLevel\x3c/code\x3e-Überprüfung wird in Version 3.0 entfernt werden. Bitte verwenden Sie stattdessen die Min-/Max-Lösung, wie sie unter http://trac.openlayers.org/wiki/SettingZoomLevels beschrieben ist.",
-
-    'commitSuccess': "WFS-Transaktion: Erfolgreich ${response}",
-
-    'commitFailed': "WFS-Transaktion: Fehlgeschlagen ${response}",
-
-    'googleWarning': "Der Google-Layer konnte nicht korrekt geladen werden.\x3cbr\x3e\x3cbr\x3eUm diese Meldung nicht mehr zu erhalten, wählen Sie einen anderen Hintergrundlayer aus dem LayerSwitcher in der rechten oberen Ecke.\x3cbr\x3e\x3cbr\x3eSehr wahrscheinlich tritt dieser Fehler auf, weil das Skript der Google-Maps-Bibliothek nicht eingebunden wurde oder keinen gültigen API-Schlüssel für Ihre URL enthält.\x3cbr\x3e\x3cbr\x3eEntwickler: Besuche \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3edas Wiki\x3c/a\x3e für Hilfe zum korrekten Einbinden des Google-Layers",
-
-    'getLayerWarning': "Der ${layerType}-Layer konnte nicht korrekt geladen werden.\x3cbr\x3e\x3cbr\x3eUm diese Meldung nicht mehr zu erhalten, wählen Sie einen anderen Hintergrundlayer aus dem LayerSwitcher in der rechten oberen Ecke.\x3cbr\x3e\x3cbr\x3eSehr wahrscheinlich tritt dieser Fehler auf, weil das Skript der \'${layerLib}\'-Bibliothek nicht eingebunden wurde.\x3cbr\x3e\x3cbr\x3eEntwickler: Besuche \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3edas Wiki\x3c/a\x3e für Hilfe zum korrekten Einbinden von Layern",
-
-    'scale': "Maßstab = 1 : ${scaleDenom}",
-
-    'W': "W",
-
-    'E': "O",
-
-    'N': "N",
-
-    'S': "S",
-
-    'layerAlreadyAdded': "Sie versuchen den Layer „${layerName}“ zur Karte hinzuzufügen, er wurde aber bereits hinzugefügt",
-
-    'reprojectDeprecated': "Sie verwenden die „Reproject“-Option des Layers ${layerName}. Diese Option ist veraltet: Sie wurde entwickelt um die Anzeige von Daten auf kommerziellen Basiskarten zu unterstützen, aber diese Funktion sollte jetzt durch Unterstützung der „Spherical Mercator“ erreicht werden. Weitere Informationen sind unter http://trac.openlayers.org/wiki/SphericalMercator verfügbar.",
-
-    'methodDeprecated': "Die Methode ist veraltet und wird in 3.0 entfernt. Bitte verwende stattdessen ${newMethod}.",
-
-    'boundsAddError': "Beide Werte (x und y) müssen der add-Funktion übergeben werden.",
-
-    'lonlatAddError': "Beide Werte (lon und lat) müssen der add-Funktion übergeben werden.",
-
-    'pixelAddError': "Beide Werte (x und y) müssen der add-Funktion übergeben werden.",
-
-    'unsupportedGeometryType': "Nicht unterstützter Geometrie-Typ: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition fehlgeschlagen: Element mit Id ${elemId} möglicherweise falsch platziert.",
-
-    'filterEvaluateNotImplemented': "„evaluate“ ist für diesen Filter-Typ nicht implementiert."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/el.js
+++ /dev/null
@@ -1,20 +1,1 @@
-/* Translators (2009 onwards):
- *  - Omnipaedista
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["el"]
- * Dictionary for Ελληνικά.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["el"] = OpenLayers.Util.applyDefaults({
-
-    'scale': "Κλίμακα ~ 1 : ${scaleDenom}"
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/en-CA.js
+++ /dev/null
@@ -1,22 +1,1 @@
-/**
- * @requires OpenLayers/Lang/en.js
- */
 
-/**
- * Namespace: OpenLayers.Lang["en-CA"]
- * Dictionary for English-CA.  This dictionary inherits from the standard
- *     English dictionary.  Override only those entries with language specific
- *     to the CA region.
- *     
- * Keys for entries are used in calls to <OpenLayers.Lang.translate>.  Entry
- *     bodies are normal strings or strings formatted for use with
- *     <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang['en-CA'] = OpenLayers.Util.applyDefaults({
-
-    // add any entries specific for this region here
-    // e.g.
-    // "someKey": "Some regionally specific value"
-    
-}, OpenLayers.Lang["en"]);
-

--- a/labs/openlayers/lib/OpenLayers/Lang/en.js
+++ /dev/null
@@ -1,129 +1,1 @@
-/**
- * @requires OpenLayers/Lang.js
- */
 
-/**
- * Namespace: OpenLayers.Lang["en"]
- * Dictionary for English.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang.en = {
-
-    'unhandledRequest': "Unhandled request return ${statusText}",
-
-    'permalink': "Permalink",
-
-    'overlays': "Overlays",
-
-    'baseLayer': "Base Layer",
-
-    'sameProjection':
-        "The overview map only works when it is in the same projection as the main map",
-
-    'readNotImplemented': "Read not implemented.",
-
-    'writeNotImplemented': "Write not implemented.",
-
-    'noFID': "Can't update a feature for which there is no FID.",
-
-    'errorLoadingGML': "Error in loading GML file ${url}",
-
-    'browserNotSupported':
-        "Your browser does not support vector rendering. Currently supported renderers are:\n${renderers}",
-
-    'componentShouldBe': "addFeatures : component should be an ${geomType}",
-
-    // console message
-    'getFeatureError':
-        "getFeatureFromEvent called on layer with no renderer. This usually means you " +
-        "destroyed a layer, but not some handler which is associated with it.",
-
-    // console message
-    'minZoomLevelError':
-        "The minZoomLevel property is only intended for use " +
-        "with the FixedZoomLevels-descendent layers. That this " +
-        "wfs layer checks for minZoomLevel is a relic of the" +
-        "past. We cannot, however, remove it without possibly " +
-        "breaking OL based applications that may depend on it." +
-        " Therefore we are deprecating it -- the minZoomLevel " +
-        "check below will be removed at 3.0. Please instead " +
-        "use min/max resolution setting as described here: " +
-        "http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "WFS Transaction: SUCCESS ${response}",
-
-    'commitFailed': "WFS Transaction: FAILED ${response}",
-
-    'googleWarning':
-        "The Google Layer was unable to load correctly.<br><br>" +
-        "To get rid of this message, select a new BaseLayer " +
-        "in the layer switcher in the upper-right corner.<br><br>" +
-        "Most likely, this is because the Google Maps library " +
-        "script was either not included, or does not contain the " +
-        "correct API key for your site.<br><br>" +
-        "Developers: For help getting this working correctly, " +
-        "<a href='http://trac.openlayers.org/wiki/Google' " +
-        "target='_blank'>click here</a>",
-
-    'getLayerWarning':
-        "The ${layerType} Layer was unable to load correctly.<br><br>" +
-        "To get rid of this message, select a new BaseLayer " +
-        "in the layer switcher in the upper-right corner.<br><br>" +
-        "Most likely, this is because the ${layerLib} library " +
-        "script was not correctly included.<br><br>" +
-        "Developers: For help getting this working correctly, " +
-        "<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
-        "target='_blank'>click here</a>",
-
-    'scale': "Scale = 1 : ${scaleDenom}",
-    
-    //labels for the graticule control
-    'W': 'W',
-    'E': 'E',
-    'N': 'N',
-    'S': 'S',
-    'graticule': 'Graticule',
-
-    // console message
-    'layerAlreadyAdded':
-        "You tried to add the layer: ${layerName} to the map, but it has already been added",
-
-    // console message
-    'reprojectDeprecated':
-        "You are using the 'reproject' option " +
-        "on the ${layerName} layer. This option is deprecated: " +
-        "its use was designed to support displaying data over commercial " + 
-        "basemaps, but that functionality should now be achieved by using " +
-        "Spherical Mercator support. More information is available from " +
-        "http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    // console message
-    'methodDeprecated':
-        "This method has been deprecated and will be removed in 3.0. " +
-        "Please use ${newMethod} instead.",
-
-    // console message
-    'boundsAddError': "You must pass both x and y values to the add function.",
-
-    // console message
-    'lonlatAddError': "You must pass both lon and lat values to the add function.",
-
-    // console message
-    'pixelAddError': "You must pass both x and y values to the add function.",
-
-    // console message
-    'unsupportedGeometryType': "Unsupported geometry type: ${geomType}",
-
-    // console message
-    'pagePositionFailed':
-        "OpenLayers.Util.pagePosition failed: element with id ${elemId} may be misplaced.",
-
-    // console message
-    'filterEvaluateNotImplemented': "evaluate is not implemented for this filter type.",
-
-    // **** end ****
-    'end': ''
-    
-};
-

--- a/labs/openlayers/lib/OpenLayers/Lang/es.js
+++ /dev/null
@@ -1,130 +1,1 @@
-/**
- * @requires OpenLayers/Lang.js
- */
 
-/**
- * Namespace: OpenLayers.Lang["es"]
- * Dictionary for Spanish, UTF8 encoding. Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang.es = {
-
-    'unhandledRequest': "Respuesta a petición no gestionada ${statusText}",
-
-    'permalink': "Enlace permanente",
-
-    'overlays': "Capas superpuestas",
-
-    'baseLayer': "Capa Base",
-
-    'sameProjection':
-        "El mapa de vista general sólo funciona si está en la misma proyección que el mapa principal",
-
-    'readNotImplemented': "Lectura no implementada.",
-
-    'writeNotImplemented': "Escritura no implementada.",
-
-    'noFID': "No se puede actualizar un elemento para el que no existe FID.",
-
-    'errorLoadingGML': "Error cargando el fichero GML ${url}",
-
-    'browserNotSupported':
-        "Su navegador no soporta renderización vectorial. Los renderizadores soportados actualmente son:\n${renderers}",
-
-    'componentShouldBe': "addFeatures : el componente debe ser del tipo ${geomType}",
-
-    // console message
-    'getFeatureError':
-        "getFeatureFromEvent se ha llamado desde una capa sin renderizador. Esto normalmente quiere decir que " +
-        "se ha destruido una capa, pero no el manejador asociado a ella.",
-
-    // console message
-    'minZoomLevelError':
-        "La propiedad minZoomLevel debe sólo utilizarse " +
-        "con las capas que tienen FixedZoomLevels. El hecho de que " +
-        "una capa wfs compruebe minZoomLevel es una reliquia del " +
-        "pasado. Sin embargo, no podemos eliminarla sin discontinuar " +
-        "probablemente las aplicaciones OL que puedan depender de ello. " +
-        "Así pues estamos haciéndolo obsoleto --la comprobación " +
-        "minZoomLevel se eliminará en la versión 3.0. Utilice el ajuste " +
-        "de resolution min/max en su lugar, tal como se describe aquí: " +
-        "http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "Transacción WFS: ÉXITO ${response}",
-
-    'commitFailed': "Transacción WFS: FALLÓ ${response}",
-
-    'googleWarning':
-        "La capa Google no pudo ser cargada correctamente.<br><br>" +
-        "Para evitar este mensaje, seleccione una nueva Capa Base " +
-        "en el selector de capas en la esquina superior derecha.<br><br>" +
-        "Probablemente, esto se debe a que el script de la biblioteca de " +
-	"Google Maps no fue correctamente incluido en su página, o no " +
-	"contiene la clave del API correcta para su sitio.<br><br>" +
-        "Desarrolladores: Para ayudar a hacer funcionar esto correctamente, " +
-        "<a href='http://trac.openlayers.org/wiki/Google' " +
-        "target='_blank'>haga clic aquí</a>",
-
-    'getLayerWarning':
-        "La capa ${layerType} no pudo ser cargada correctamente.<br><br>" +
-        "Para evitar este mensaje, seleccione una nueva Capa Base " +
-        "en el selector de capas en la esquina superior derecha.<br><br>" +
-        "Probablemente, esto se debe a que el script de " +
-	"la biblioteca ${layerLib} " +
-        "no fue correctamente incluido en su página.<br><br>" +
-        "Desarrolladores: Para ayudar a hacer funcionar esto correctamente, " +
-        "<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
-        "target='_blank'>haga clic aquí</a>",
-
-    'scale': "Escala = 1 : ${scaleDenom}",
-
-    //labels for the graticule control
-    'W': 'O',
-    'E': 'E',
-    'N': 'N',
-    'S': 'S',
-    'graticule': 'Retícula',
-    
-    // console message
-    'layerAlreadyAdded':
-        "Intentó añadir la capa: ${layerName} al mapa, pero ya había sido añadida previamente",
-
-    // console message
-    'reprojectDeprecated':
-        "Está usando la opción 'reproject' en la capa " +
-        "${layerName}. Esta opción es obsoleta: su uso fue diseñado " +
-        "para soportar la visualización de datos sobre mapas base comerciales, " + 
-        "pero ahora esa funcionalidad debería conseguirse mediante el soporte " +
-        "de la proyección Spherical Mercator. Más información disponible en " +
-        "http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    // console message
-    'methodDeprecated':
-        "Este método es obsoleto y se eliminará en la versión 3.0. " +
-        "Por favor utilice el método ${newMethod} en su lugar.",
-
-    // console message
-    'boundsAddError': "Debe proporcionar los valores x e y a la función add.",
-
-    // console message
-    'lonlatAddError': "Debe proporcionar los valores lon y lat a la función add.",
-
-    // console message
-    'pixelAddError': "Debe proporcionar los valores x e y a la función add.",
-
-    // console message
-    'unsupportedGeometryType': "Tipo de geometría no soportada: ${geomType}",
-
-    // console message
-    'pagePositionFailed':
-        "OpenLayers.Util.pagePosition falló: el elemento con id ${elemId} puede haberse colocado de manera errónea.",
-                    
-    // console message
-    'filterEvaluateNotImplemented': "evaluate no está implementado para este tipo de filtro.",
-
-    // **** end ****
-    'end': ''
-
-};
-

--- a/labs/openlayers/lib/OpenLayers/Lang/fi.js
+++ /dev/null
@@ -1,35 +1,1 @@
-/* Translators (2009 onwards):
- *  - Nike
- *  - Str4nd
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["fi"]
- * Dictionary for Suomi.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["fi"] = OpenLayers.Util.applyDefaults({
-
-    'permalink': "Ikilinkki",
-
-    'overlays': "Kerrokset",
-
-    'baseLayer': "Peruskerros",
-
-    'sameProjection': "Yleiskuvakarttaa voi käyttää vain, kun sillä on sama projektio kuin pääkartalla.",
-
-    'W': "L",
-
-    'E': "I",
-
-    'N': "P",
-
-    'S': "E"
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/fr.js
+++ /dev/null
@@ -1,81 +1,1 @@
-/* Translators (2009 onwards):
- *  - Damouns
- *  - IAlex
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["fr"]
- * Dictionary for Français.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["fr"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Requête non gérée, retournant ${statusText}",
-
-    'permalink': "Permalien",
-
-    'overlays': "Calques",
-
-    'baseLayer': "Calque de base",
-
-    'sameProjection': "La carte de situation ne fonctionne que lorsque sa projection est la même que celle de la carte principale",
-
-    'readNotImplemented': "Lecture non implémentée.",
-
-    'writeNotImplemented': "Ecriture non implémentée.",
-
-    'noFID': "Impossible de mettre à jour un objet sans identifiant (fid).",
-
-    'errorLoadingGML': "Erreur au chargement du fichier GML ${url}",
-
-    'browserNotSupported': "Votre navigateur ne supporte pas le rendu vectoriel. Les renderers actuellement supportés sont : \n${renderers}",
-
-    'componentShouldBe': "addFeatures : le composant devrait être de type ${geomType}",
-
-    'getFeatureError': "getFeatureFromEvent a été appelé sur un calque sans renderer. Cela signifie généralement que vous avez détruit cette couche, mais que vous avez conservé un handler qui lui était associé.",
-
-    'minZoomLevelError': "La propriété minZoomLevel doit seulement être utilisée pour des couches FixedZoomLevels-descendent. Le fait que cette couche WFS vérifie la présence de minZoomLevel est une relique du passé. Nous ne pouvons toutefois la supprimer sans casser des applications qui pourraient en dépendre. C\'est pourquoi nous la déprécions -- la vérification du minZoomLevel sera supprimée en version 3.0. A la place, merci d\'utiliser les paramètres de résolutions min/max tel que décrit sur : http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "Transaction WFS : SUCCES ${response}",
-
-    'commitFailed': "Transaction WFS : ECHEC ${response}",
-
-    'googleWarning': "La couche Google n\'a pas été en mesure de se charger correctement.\x3cbr\x3e\x3cbr\x3ePour supprimer ce message, choisissez une nouvelle BaseLayer dans le sélecteur de couche en haut à droite.\x3cbr\x3e\x3cbr\x3eCela est possiblement causé par la non-inclusion de la librairie Google Maps, ou alors parce que la clé de l\'API ne correspond pas à votre site.\x3cbr\x3e\x3cbr\x3eDéveloppeurs : pour savoir comment corriger ceci, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3ecliquez ici\x3c/a\x3e",
-
-    'getLayerWarning': "La couche ${layerType} n\'est pas en mesure de se charger correctement.\x3cbr\x3e\x3cbr\x3ePour supprimer ce message, choisissez une nouvelle BaseLayer dans le sélecteur de couche en haut à droite.\x3cbr\x3e\x3cbr\x3eCela est possiblement causé par la non-inclusion de la librairie ${layerLib}.\x3cbr\x3e\x3cbr\x3eDéveloppeurs : pour savoir comment corriger ceci, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3ecliquez ici\x3c/a\x3e",
-
-    'scale': "Echelle ~ 1 : ${scaleDenom}",
-
-    'W': "O",
-
-    'E': "E",
-
-    'N': "N",
-
-    'S': "S",
-
-    'layerAlreadyAdded': "Vous avez essayé d\'ajouter à la carte le calque : ${layerName}, mais il est déjà présent",
-
-    'reprojectDeprecated': "Vous utilisez l\'option \'reproject\' sur la couche ${layerName}. Cette option est dépréciée : Son usage permettait d\'afficher des données au dessus de couches raster commerciales.Cette fonctionalité est maintenant supportée en utilisant le support de la projection Mercator Sphérique. Plus d\'information est disponible sur http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Cette méthode est dépréciée, et sera supprimée à la version 3.0. Merci d\'utiliser ${newMethod} à la place.",
-
-    'boundsAddError': "Vous devez passer les deux valeurs x et y à la fonction add.",
-
-    'lonlatAddError': "Vous devez passer les deux valeurs lon et lat à la fonction add.",
-
-    'pixelAddError': "Vous devez passer les deux valeurs x et y à la fonction add.",
-
-    'unsupportedGeometryType': "Type de géométrie non supporté : ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition a échoué: l\'élément d\'id ${elemId} pourrait être mal positionné.",
-
-    'filterEvaluateNotImplemented': "évaluer n\'a pas encore été implémenté pour ce type de filtre."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/fur.js
+++ /dev/null
@@ -1,36 +1,1 @@
-/* Translators (2009 onwards):
- *  - Klenje
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["fur"]
- * Dictionary for Furlan.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["fur"] = OpenLayers.Util.applyDefaults({
-
-    'permalink': "Leam Permanent",
-
-    'overlays': "Livei parsore",
-
-    'baseLayer': "Livel di base",
-
-    'browserNotSupported': "Il to sgarfadôr nol supuarte la renderizazion vetoriâl. Al moment a son supuartâts:\n${renderers}",
-
-    'scale': "Scjale = 1 : ${scaleDenom}",
-
-    'W': "O",
-
-    'E': "E",
-
-    'N': "N",
-
-    'S': "S"
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/gl.js
+++ /dev/null
@@ -1,80 +1,1 @@
-/* Translators (2009 onwards):
- *  - Toliño
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["gl"]
- * Dictionary for Galego.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["gl"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Solicitude non xerada; a resposta foi: ${statusText}",
-
-    'permalink': "Ligazón permanente",
-
-    'overlays': "Capas superpostas",
-
-    'baseLayer': "Capa base",
-
-    'sameProjection': "A vista xeral do mapa só funciona cando está na mesma proxección có mapa principal",
-
-    'readNotImplemented': "Lectura non implementada.",
-
-    'writeNotImplemented': "Escritura non implementada.",
-
-    'noFID': "Non se pode actualizar a funcionalidade para a que non hai FID.",
-
-    'errorLoadingGML': "Erro ao cargar o ficheiro GML ${url}",
-
-    'browserNotSupported': "O seu navegador non soporta a renderización de vectores. Os renderizadores soportados actualmente son:\n${renderers}",
-
-    'componentShouldBe': "addFeatures: o compoñente debera ser de tipo ${geomType}",
-
-    'getFeatureError': "getFeatureFromEvent ten sido chamado a unha capa sen renderizador. Isto normalmente significa que destruíu unha capa, mais non o executador que está asociado con ela.",
-
-    'minZoomLevelError': "A propiedade minZoomLevel é só para uso conxuntamente coas capas FixedZoomLevels-descendent. O feito de que esa capa wfs verifique o minZoomLevel é unha reliquia do pasado. Non podemos, con todo, eliminala sen a posibilidade de non romper as aplicacións baseadas en OL que poidan depender dela. Por iso a estamos deixando obsoleta (a comprobación minZoomLevel de embaixo será eliminada na versión 3.0). Por favor, no canto diso use o axuste de resolución mín/máx tal e como está descrito aquí: http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "Transacción WFS: ÉXITO ${response}",
-
-    'commitFailed': "Transacción WFS: FALLIDA ${response}",
-
-    'googleWarning': "A capa do Google non puido cargarse correctamente.\x3cbr\x3e\x3cbr\x3ePara evitar esta mensaxe, escolla unha nova capa base no seleccionador de capas na marxe superior dereita.\x3cbr\x3e\x3cbr\x3eProbablemente, isto acontece porque a escritura da libraría do Google Maps ou ben non foi incluída ou ben non contén a clave API correcta para o seu sitio.\x3cbr\x3e\x3cbr\x3eDesenvolvedores: para axudar a facer funcionar isto correctamente, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3epremede aquí\x3c/a\x3e",
-
-    'getLayerWarning': "A capa ${layerType} foi incapaz de cargarse correctamente.\x3cbr\x3e\x3cbr\x3ePara evitar esta mensaxe, escolla unha nova capa base no seleccionador de capas na marxe superior dereita.\x3cbr\x3e\x3cbr\x3eProbablemente, isto acontece porque a escritura da libraría ${layerLib} non foi ben incluída.\x3cbr\x3e\x3cbr\x3eDesenvolvedores: para axudar a facer funcionar isto correctamente, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3epremede aquí\x3c/a\x3e",
-
-    'scale': "Escala = 1 : ${scaleDenom}",
-
-    'W': "O",
-
-    'E': "L",
-
-    'N': "N",
-
-    'S': "S",
-
-    'layerAlreadyAdded': "Intentou engadir a capa: ${layerName} ao mapa, pero xa fora engadida",
-
-    'reprojectDeprecated': "Está usando a opción \"reproject\" na capa ${layerName}. Esta opción está obsoleta: o seu uso foi deseñado para a visualización de datos sobre mapas base comerciais, pero esta funcionalidade debera agora ser obtida utilizando a proxección Spherical Mercator. Hai dispoñible máis información en http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Este método está obsoleto e será eliminado na versión 3.0. Por favor, no canto deste use ${newMethod}.",
-
-    'boundsAddError': "Debe achegar os valores x e y á función add.",
-
-    'lonlatAddError': "Debe achegar tanto o valor lon coma o lat á función add.",
-
-    'pixelAddError': "Debe achegar os valores x e y á función add.",
-
-    'unsupportedGeometryType': "Tipo xeométrico non soportado: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition fallou: o elemento con id ${elemId} pode non estar na súa posición.",
-
-    'filterEvaluateNotImplemented': "avaliar non está implementado para este tipo de filtro."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/gsw.js
+++ /dev/null
@@ -1,80 +1,1 @@
-/* Translators (2009 onwards):
- *  - Als-Holder
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["gsw"]
- * Dictionary for Alemannisch.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["gsw"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Nit behandleti Aafrogsruckmäldig ${statusText}",
-
-    'permalink': "Permalink",
-
-    'overlays': "Iberlagerige",
-
-    'baseLayer': "Grundcharte",
-
-    'sameProjection': "D Ibersichts-Charte funktioniert nume, wänn si di glych Projäktion brucht wie d Hauptcharte",
-
-    'readNotImplemented': "Läse nit implementiert.",
-
-    'writeNotImplemented': "Schrybe nit implementiert.",
-
-    'noFID': "E Feature, wu s kei FID derfir git, cha nit aktualisiert wäre.",
-
-    'errorLoadingGML': "Fähler bim Lade vu dr GML-Datei ${url}",
-
-    'browserNotSupported': "Dyy Browser unterstitzt kei Vektordarstellig. Aktuäll unterstitzti Renderer:\n${renderers}",
-
-    'componentShouldBe': "addFeatures : Komponänt sott dr Typ ${geomType} syy",
-
-    'getFeatureError': "getFeatureFromEvent isch uf eme Layer ohni Renderer ufgruefe wore. Des heisst normalerwys, ass Du e Layer kaputt gmacht hesch, aber nit dr Handler, wu derzue ghert.",
-
-    'minZoomLevelError': "D minZoomLevel-Eigeschaft isch nume dänk fir d Layer, wu vu dr FixedZoomLevels abstamme. Ass dää wfs-Layer minZoomLevel prieft, scih e Relikt us dr Vergangeheit. Mir chenne s aber nit ändere ohni OL_basierti Aawändige villicht kaputt gehn, wu dervu abhänge.  Us däm Grund het die Funktion d Eigeschaft \'deprecated\' iberchuu. D minZoomLevel-Priefig unte wird in dr Version 3.0 usegnuu. Bitte verwänd statt däm e min/max-Uflesig wie s do bschriben isch: http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "WFS-Transaktion: ERFOLGRYCH ${response}",
-
-    'commitFailed': "WFS-Transaktion: FÄHLGSCHLAA ${response}",
-
-    'googleWarning': "Dr Google-Layer het nit korräkt chenne glade wäre.\x3cbr\x3e\x3cbr\x3eGo die Mäldig nimi z kriege, wehl e andere Hintergrundlayer us em LayerSwitcher im rächte obere Ecke.\x3cbr\x3e\x3cbr\x3eDää Fähler git s seli hyfig, wel s Skript vu dr Google-Maps-Bibliothek nit yybunde woren isch oder wel s kei giltige API-Schlissel fir Dyy URL din het.\x3cbr\x3e\x3cbr\x3eEntwickler: Fir Hilf zum korräkte Yybinde vum Google-Layer \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3edoo drucke\x3c/a\x3e",
-
-    'getLayerWarning': "Dr ${layerType}-Layer het nit korräkt chenne glade wäre.\x3cbr\x3e\x3cbr\x3eGo die Mäldig nimi z kriege, wehl e andere Hintergrundlayer us em LayerSwitcher im rächte obere Ecke.\x3cbr\x3e\x3cbr\x3eDää Fähler git s seli hyfig, wel s Skript vu dr \'${layerLib}\'-Bibliothek nit yybunde woren isch oder wel s kei giltige API-Schlissel fir Dyy URL din het.\x3cbr\x3e\x3cbr\x3eEntwickler: Fir Hilf zum korräkte Yybinde vu Layer \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3edoo drucke\x3c/a\x3e",
-
-    'scale': "Maßstab = 1 : ${scaleDenom}",
-
-    'W': "W",
-
-    'E': "O",
-
-    'N': "N",
-
-    'S': "S",
-
-    'layerAlreadyAdded': "Du hesch versuecht dää Layer in d Charte yyzfiege: ${layerName}, aber är isch schoi yygfiegt",
-
-    'reprojectDeprecated': "Du bruchsch d \'reproject\'-Option bim ${layerName}-Layer. Die Option isch nimi giltig: si isch aagleit wore go   Date iber kommerziälli Grundcharte lege, aber des sott mer jetz mache mit dr Unterstitzig vu Spherical Mercator. Meh Informatione git s uf http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Die Methode isch veraltet un wird us dr Version 3.0 usegnuu. Bitte verwäbnd statt däm ${newMethod}.",
-
-    'boundsAddError': "Du muesch e x-Wärt un e y-Wärt yygee bi dr Zuefieg-Funktion",
-
-    'lonlatAddError': "Du meusch e Lengi- un e Breiti-Grad yygee bi dr Zuefieg-Funktion.",
-
-    'pixelAddError': "Du muesch x- un y-Wärt aagee bi dr Zuefieg-Funktion.",
-
-    'unsupportedGeometryType': "Nit unterstitze Geometrii-Typ: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition fählgschlaa: Elemänt mit ID ${elemId} isch villicht falsch gsetzt.",
-
-    'filterEvaluateNotImplemented': "evaluiere isch nit implemäntiert in däm Filtertyp."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/hr.js
+++ /dev/null
@@ -1,62 +1,1 @@
-/* Translators (2009 onwards):
- *  - Mvrban
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["hr"]
- * Dictionary for Hrvatski.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["hr"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Nepodržani zahtjev ${statusText}",
-
-    'permalink': "Permalink",
-
-    'overlays': "Overlays",
-
-    'baseLayer': "Osnovna karta",
-
-    'sameProjection': "Pregledna karta radi jedino kao je u istoj projekciji kao i glava karta",
-
-    'readNotImplemented': "Čitanje nije implementirano.",
-
-    'writeNotImplemented': "Pisanje nije implementirano.",
-
-    'noFID': "Ne mogu ažurirati značajku za koju ne postoji FID.",
-
-    'errorLoadingGML': "Greška u učitavanju GML datoteke ${url}",
-
-    'browserNotSupported': "Vaš preglednik ne podržava vektorsko renderiranje. Trenutno podržani rendereri su: ${renderers}",
-
-    'componentShouldBe': "addFeatures : komponenta bi trebala biti ${geomType}",
-
-    'getFeatureError': "getFeatureFromEvent je pozvao Layer bez renderera. Ovo obično znači da ste uništiili Layer, a ne neki Handler koji je povezan s njim.",
-
-    'commitSuccess': "WFS Transakcija: USPJEŠNA ${response}",
-
-    'commitFailed': "WFS Transakcija: NEUSPJEŠNA ${response}",
-
-    'scale': "Mjerilo = 1 : ${scaleDenom}",
-
-    'layerAlreadyAdded': "Pokušali ste dodati layer:  ${layerName} na kartu, ali je već dodan",
-
-    'methodDeprecated': "Ova metoda nije odobrena i biti će maknuta u 3.0. Koristite ${newMethod}.",
-
-    'boundsAddError': "Morate dati obje vrijednosti ,  x i y  da bi dodali funkciju.",
-
-    'lonlatAddError': "Morate dati obje vrijednosti , (lon i lat) da bi dodali funkciju.",
-
-    'pixelAddError': "Morate dati obje vrijednosti ,  x i y  da bi dodali funkciju.",
-
-    'unsupportedGeometryType': "Nepodržani tip geometrije: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition nije uspjelo: element sa id ${elemId} može biti krivo smješten."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/hsb.js
+++ /dev/null
@@ -1,80 +1,1 @@
-/* Translators (2009 onwards):
- *  - Michawiki
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["hsb"]
- * Dictionary for Hornjoserbsce.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["hsb"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Wotmołwa njewobdźěłaneho naprašowanja ${statusText}",
-
-    'permalink': "Trajny wotkaz",
-
-    'overlays': "Naworštowanja",
-
-    'baseLayer': "Zakładna runina",
-
-    'sameProjection': "Přehladowa karta jenož funguje, hdyž je w samsnej projekciji kaž hłowna karta",
-
-    'readNotImplemented': "Čitanje njeimplementowane.",
-
-    'writeNotImplemented': "Pisanje njeimplementowane.",
-
-    'noFID': "Funkcija, za kotruž FID njeje, njeda so aktualizować.",
-
-    'errorLoadingGML': "Zmylk při začitowanju dataje ${url}",
-
-    'browserNotSupported': "Twój wobhladowak wektorowe rysowanje njepodpěruje. Tuchwilu podpěrowane rysowaki su:\n${renderers}",
-
-    'componentShouldBe': "addFeatures: komponenta měła ${geomType} być",
-
-    'getFeatureError': "getFeatureFromEvent bu na woršće bjez rysowak zawołany. To zwjetša woznamjenja, zo sy worštu zničił, ale nic wobdźěłak, kotryž je z njej zwjazany.",
-
-    'minZoomLevelError': "Kajkosć minZoomLevel je jenož za wužiwanje z worštami myslena, kotrež wot FixedZoomLevels pochadźeja. Zo tuta woršta wfs za minZoomLevel přepruwuje, je relikt zańdźenosće. Njemóžemy wšak ju wotstronić, bjeztoho zo aplikacije, kotrež na OpenLayers bazěruja a snano tutu kajkosć wužiwaja, hižo njefunguja. Tohodla smy ju jako zestarjenu woznamjenili -- přepruwowanje za minZoomLevel budu so we wersiji 3.0 wotstronjeć. Prošu wužij město toho nastajenje min/max, kaž je tu wopisane: http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "WFS-Transakcija: WUSPĚŠNA ${response}",
-
-    'commitFailed': "WFS-Transakcija: NJEPORADŹENA ${response}",
-
-    'googleWarning': "Woršta Google njemóžeše so korektnje začitać.\x3cbr\x3e\x3cbr\x3eZo by tutu zdźělenku wotbył, wubjer nowy BaseLayer z wuběra worštow horjeka naprawo.\x3cbr\x3e\x3cbr\x3eNajskerje so to stawa, dokelž skript biblioteki Google Maps pak njebu zapřijaty pak njewobsahuje korektny kluč API za twoje sydło.\x3cbr\x3e\x3cbr\x3eWuwiwarjo: Za pomoc ke korektnemu fungowanju worštow\n\x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3etu kliknyć\x3c/a\x3e",
-
-    'getLayerWarning': "Woršta ${layerType} njemóžeše so korektnje začitać.\x3cbr\x3e\x3cbr\x3eZo by tutu zdźělenku wotbył, wubjer nowy BaseLayer z wuběra worštow horjeka naprawo.\x3cbr\x3e\x3cbr\x3eNajskerje so to stawa, dokelž skript biblioteki ${layerLib} njebu korektnje zapřijaty.\x3cbr\x3e\x3cbr\x3eWuwiwarjo: Za pomoc ke korektnemu fungowanju worštow\n\x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3etu kliknyć\x3c/a\x3e",
-
-    'scale': "Měritko = 1 : ${scaleDenom}",
-
-    'W': "Z",
-
-    'E': "W",
-
-    'N': "S",
-
-    'S': "J",
-
-    'layerAlreadyAdded': "Sy spytał runinu ${layerName} karće dodać, ale je so hižo dodała",
-
-    'reprojectDeprecated': "Wužiwaš opciju \"reproject\" wořšty ${layerName}. Tuta opcija je zestarjena: jeje wužiwanje bě myslene, zo by zwobraznjenje datow nad komercielnymi bazowymi kartami podpěrało, ale funkcionalnosć měła so nětko z pomocu Sperical Mercator docpěć. Dalše informacije steja na http://trac.openlayers.org/wiki/SphericalMercator k dispoziciji.",
-
-    'methodDeprecated': "Tuta metoda je so njeschwaliła a budźe so w 3.0 wotstronjeć. Prošu wužij ${newMethod} město toho.",
-
-    'boundsAddError': "Dyrbiš hódnotu x kaž tež y funkciji \"add\" přepodać.",
-
-    'lonlatAddError': "Dyrbiš hódnotu lon kaž tež lat funkciji \"add\" přepodać.",
-
-    'pixelAddError': "Dyrbiš hódnotu x kaž tež y funkciji \"add\" přepodać.",
-
-    'unsupportedGeometryType': "Njepodpěrowany geometrijowy typ: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition je so njeporadźił: element z id ${elemId} bu snano wopak zaměstnjeny.",
-
-    'filterEvaluateNotImplemented': "wuhódnoćenje njeje za tutón filtrowy typ implementowany."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/hu.js
+++ /dev/null
@@ -1,81 +1,1 @@
-/* Translators (2009 onwards):
- *  - City-busz
- *  - Glanthor Reviol
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["hu"]
- * Dictionary for Magyar.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["hu"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Nem kezelt kérés visszatérése ${statusText}",
-
-    'permalink': "Permalink",
-
-    'overlays': "Rávetítések",
-
-    'baseLayer': "Alapréteg",
-
-    'sameProjection': "Az áttekintő térkép csak abban az esetben működik, ha ugyanazon a vetületen van, mint a fő térkép.",
-
-    'readNotImplemented': "Olvasás nincs végrehajtva.",
-
-    'writeNotImplemented': "Írás nincs végrehajtva.",
-
-    'noFID': "Nem frissíthető olyan jellemző, amely nem rendelkezik FID-del.",
-
-    'errorLoadingGML': "Hiba GML-fájl betöltésekor ${url}",
-
-    'browserNotSupported': "A böngészője nem támogatja a vektoros renderelést. A jelenleg támogatott renderelők:\n${renderers}",
-
-    'componentShouldBe': "addFeatures : az összetevőnek ilyen típusúnak kell lennie: ${geomType}",
-
-    'getFeatureError': "getFeatureFromEvent réteget hívott meg renderelő nélkül. Ez rendszerint azt jelenti, hogy megsemmisített egy fóliát, de néhány ahhoz társított kezelőt nem.",
-
-    'minZoomLevelError': "A minZoomLevel tulajdonságot csak a következővel való használatra szánták: FixedZoomLevels-leszármazott fóliák. Ez azt jelenti, hogy a minZoomLevel wfs fólia jelölőnégyzetei már a múlté. Mi azonban nem távolíthatjuk el annak a veszélye nélkül, hogy az esetlegesen ettől függő OL alapú alkalmazásokat tönkretennénk. Ezért ezt érvénytelenítjük -- a minZoomLevel az alul levő jelölőnégyzet a 3.0-s verzióból el lesz távolítva. Kérjük, helyette használja a  min/max felbontás beállítást, amelyről az alábbi helyen talál leírást: http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "WFS tranzakció: SIKERES ${response}",
-
-    'commitFailed': "WFS tranzakció: SIKERTELEN ${response}",
-
-    'googleWarning': "A Google fólia betöltése sikertelen.\x3cbr\x3e\x3cbr\x3eAhhoz, hogy ez az üzenet eltűnjön, válasszon egy új BaseLayer fóliát a jobb felső sarokban található fóliakapcsoló segítségével.\x3cbr\x3e\x3cbr\x3eNagy valószínűséggel ez azért van, mert a Google Maps könyvtár parancsfájlja nem található, vagy nem tartalmazza az Ön oldalához tartozó megfelelő API-kulcsot.\x3cbr\x3e\x3cbr\x3eFejlesztőknek: A helyes működtetésre vonatkozó segítség az alábbi helyen érhető el, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3ekattintson ide\x3c/a\x3e",
-
-    'getLayerWarning': "A(z) ${layerType} fólia nem töltődött be helyesen.\x3cbr\x3e\x3cbr\x3eAhhoz, hogy ez az üzenet eltűnjön, válasszon egy új BaseLayer fóliát a jobb felső sarokban található fóliakapcsoló segítségével.\x3cbr\x3e\x3cbr\x3eNagy valószínűséggel ez azért van, mert a(z) ${layerLib} könyvtár parancsfájlja helytelen.\x3cbr\x3e\x3cbr\x3eFejlesztőknek: A helyes működtetésre vonatkozó segítség az alábbi helyen érhető el, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3ekattintson ide\x3c/a\x3e",
-
-    'scale': "Lépték = 1 : ${scaleDenom}",
-
-    'W': "Ny",
-
-    'E': "K",
-
-    'N': "É",
-
-    'S': "D",
-
-    'layerAlreadyAdded': "Megpróbálta hozzáadni a(z) ${layerName} fóliát a térképhez, de az már hozzá van adva",
-
-    'reprojectDeprecated': "Ön a \'reproject\' beállítást használja a(z) ${layerName} fólián. Ez a beállítás érvénytelen: használata az üzleti alaptérképek fölötti adatok megjelenítésének támogatására szolgált, de ezt a funkció ezentúl a Gömbi Mercator használatával érhető el. További információ az alábbi helyen érhető el: http://trac.openlayers.org/wiki/SphericalMercator",
-
-    'methodDeprecated': "Ez a módszer érvénytelenítve lett és a 3.0-s verzióból el lesz távolítva. Használja a(z) ${newMethod} módszert helyette.",
-
-    'boundsAddError': "Az x és y értékeknek egyaránt meg kell felelnie, hogy a funkciót hozzáadhassa.",
-
-    'lonlatAddError': "A hossz. és szél. értékeknek egyaránt meg kell felelnie, hogy a funkciót hozzáadhassa.",
-
-    'pixelAddError': "Az x és y értékeknek egyaránt meg kell felelnie, hogy a funkciót hozzáadhassa.",
-
-    'unsupportedGeometryType': "Nem támogatott geometriatípus: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition sikertelen: lehetséges, hogy a(z) ${elemId} azonosítójú elem téves helyre került.",
-
-    'filterEvaluateNotImplemented': "ennél a szűrőtípusnál kiértékelés nem hajtódik végre."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/ia.js
+++ /dev/null
@@ -1,80 +1,1 @@
-/* Translators (2009 onwards):
- *  - McDutchie
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["ia"]
- * Dictionary for Interlingua.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["ia"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Le responsa a un requesta non esseva maneate: ${statusText}",
-
-    'permalink': "Permaligamine",
-
-    'overlays': "Superpositiones",
-
-    'baseLayer': "Strato de base",
-
-    'sameProjection': "Le mini-carta functiona solmente si illo es in le mesme projection que le carta principal",
-
-    'readNotImplemented': "Lectura non implementate.",
-
-    'writeNotImplemented': "Scriptura non implementate.",
-
-    'noFID': "Non pote actualisar un elemento sin FID.",
-
-    'errorLoadingGML': "Error al cargamento del file GML ${url}",
-
-    'browserNotSupported': "Tu navigator non supporta le rendition de vectores. Le renditores actualmente supportate es:\n${renderers}",
-
-    'componentShouldBe': "addFeatures: le componente debe esser del typo ${geomType}",
-
-    'getFeatureError': "getFeatureFromEvent ha essite appellate in un strato sin renditor. Isto significa generalmente que tu ha destruite un strato, ma lassava un gestor associate con illo.",
-
-    'minZoomLevelError': "Le proprietate minZoomLevel es solmente pro uso con le stratos descendente de FixedZoomLevels. Le facto que iste strato WFS verifica minZoomLevel es un reliquia del passato. Nonobstante, si nos lo remove immediatemente, nos pote rumper applicationes a base de OL que depende de illo. Ergo nos lo declara obsolete; le verification de minZoomLevel in basso essera removite in version 3.0. Per favor usa in su loco le configuration de resolutiones min/max como describite a: http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "Transaction WFS: SUCCESSO ${response}",
-
-    'commitFailed': "Transaction WFS: FALLEVA ${response}",
-
-    'googleWarning': "Le strato Google non poteva esser cargate correctemente.\x3cbr\x3e\x3cbr\x3ePro disfacer te de iste message, selige un nove BaseLayer in le selector de strato in alto a dextra.\x3cbr\x3e\x3cbr\x3eMulto probabilemente, isto es proque le script del libreria de Google Maps non esseva includite o non contine le clave API correcte pro tu sito.\x3cbr\x3e\x3cbr\x3eDisveloppatores: Pro adjuta de corriger isto, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eclicca hic\x3c/a",
-
-    'getLayerWarning': "Le strato ${layerType} non poteva esser cargate correctemente.\x3cbr\x3e\x3cbr\x3ePro disfacer te de iste message, selige un nove BaseLayer in le selector de strato in alto a dextra.\x3cbr\x3e\x3cbr\x3eMulto probabilemente, isto es proque le script del libreria de ${layerLib} non esseva correctemente includite.\x3cbr\x3e\x3cbr\x3eDisveloppatores: Pro adjuta de corriger isto, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eclicca hic\x3c/a\x3e",
-
-    'scale': "Scala = 1 : ${scaleDenom}",
-
-    'W': "W",
-
-    'E': "E",
-
-    'N': "N",
-
-    'S': "S",
-
-    'layerAlreadyAdded': "Tu tentava adder le strato: ${layerName} al carta, ma illo es ja presente",
-
-    'reprojectDeprecated': "Tu usa le option \'reproject\' in le strato ${layerName} layer. Iste option es obsolescente: illo esseva pro poter monstrar datos super cartas de base commercial, ma iste functionalitate pote ora esser attingite con le uso de Spherical Mercator. Ulterior information es disponibile a http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Iste methodo ha essite declarate obsolescente e essera removite in version 3.0. Per favor usa ${newMethod} in su loco.",
-
-    'boundsAddError': "Tu debe passar le duo valores x e y al function add.",
-
-    'lonlatAddError': "Tu debe passar le duo valores lon e lat al function add.",
-
-    'pixelAddError': "Tu debe passar le duo valores x e y al function add.",
-
-    'unsupportedGeometryType': "Typo de geometria non supportate: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition falleva: le elemento con id ${elemId} pote esser mal placiate.",
-
-    'filterEvaluateNotImplemented': "\"evaluate\" non es implementate pro iste typo de filtro."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/id.js
+++ /dev/null
@@ -1,81 +1,1 @@
-/* Translators (2009 onwards):
- *  - Irwangatot
- *  - IvanLanin
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["id"]
- * Dictionary for Bahasa Indonesia.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["id"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Permintaan yang tak tertangani menghasilkan ${statusText}",
-
-    'permalink': "Pranala permanen",
-
-    'overlays': "Hamparan",
-
-    'baseLayer': "Lapisan Dasar",
-
-    'sameProjection': "Peta tinjauan hanya bekerja bila dalam proyeksi yang sama dengan peta utama",
-
-    'readNotImplemented': "Membaca tidak diterapkan.",
-
-    'writeNotImplemented': "Menyimpan tidak diterapkan.",
-
-    'noFID': "Tidak dapat memperbarui fitur yang tidak memiliki FID.",
-
-    'errorLoadingGML': "Kesalahan dalam memuat berkas GML ${url}",
-
-    'browserNotSupported': "Peramban Anda tidak mendukung penggambaran vektor. Penggambar yang didukung saat ini adalah:\n${renderers}",
-
-    'componentShouldBe': "addFeatures : komponen harus berupa ${geomType}",
-
-    'getFeatureError': "getFeatureFromEvent diterapkan pada lapisan tanpa penggambar. Ini biasanya berarti Anda menghapus sebuah lapisan, tetapi tidak menghapus penangan yang terkait dengannya.",
-
-    'minZoomLevelError': "Properti minZoomLevel hanya ditujukan bekerja dengan lapisan FixedZoomLevels-descendent. Pengecekan minZoomLevel oleh lapisan wfs adalah peninggalan masa lalu. Kami tidak dapat menghapusnya tanpa kemungkinan merusak aplikasi berbasis OL yang mungkin bergantung padanya. Karenanya, kami menganggapnya tidak berlaku -- Cek minZoomLevel di bawah ini akan dihapus pada 3.0. Silakan gunakan penyetelan resolusi min/maks seperti dijabarkan di sini: http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "WFS Transaksi: BERHASIL ${respon}",
-
-    'commitFailed': "WFS Transaksi: GAGAL ${respon}",
-
-    'googleWarning': "Lapisan Google tidak dapat dimuat dengan benar.\x3cbr\x3e\x3cbr\x3eUntuk menghilangkan pesan ini, pilih suatu BaseLayer baru melalui penukar lapisan (layer switcher) di ujung kanan atas.\x3cbr\x3e\x3cbr\x3eKemungkinan besar ini karena pustaka skrip Google Maps tidak disertakan atau tidak mengandung kunci API yang tepat untuk situs Anda.\x3cbr\x3e\x3cbr\x3ePengembang: Untuk bantuan mengatasi masalah ini, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eklik di sini\x3c/a\x3e",
-
-    'getLayerWarning': "Lapisan ${layerType} tidak dapat dimuat dengan benar.\x3cbr\x3e\x3cbr\x3eUntuk menghilangkan pesan ini, pilih suatu BaseLayer baru melalui penukar lapisan (layer switcher) di ujung kanan atas.\x3cbr\x3e\x3cbr\x3eKemungkinan besar ini karena pustaka skrip Google Maps tidak disertakan dengan benar.\x3cbr\x3e\x3cbr\x3ePengembang: Untuk bantuan mengatasi masalah ini, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eklik di sini\x3c/a\x3e",
-
-    'scale': "Sekala = 1 : ${scaleDenom}",
-
-    'W': "B",
-
-    'E': "T",
-
-    'N': "U",
-
-    'S': "S",
-
-    'layerAlreadyAdded': "Anda mencoba menambahkan lapisan: ${layerName} ke dalam peta, tapi lapisan itu telah ditambahkan",
-
-    'reprojectDeprecated': "Anda menggunakan opsi \'reproject\' pada lapisan ${layerName}. Opsi ini telah ditinggalkan: penggunaannya dirancang untuk mendukung tampilan data melalui peta dasar komersial, tapi fungsionalitas tersebut saat ini harus dilakukan dengan menggunakan dukungan Spherical Mercator. Informasi lebih lanjut tersedia di http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Metode ini telah usang dan akan dihapus di 3.0. Sebaliknya, harap gunakan ${newMethod}.",
-
-    'boundsAddError': "Anda harus memberikan kedua nilai x dan y ke fungsi penambah.",
-
-    'lonlatAddError': "Anda harus memberikan kedua nilai lon dan lat ke fungsi penambah.",
-
-    'pixelAddError': "Anda harus memberikan kedua nilai x dan y ke fungsi penambah.",
-
-    'unsupportedGeometryType': "Tipe geometri tak didukung: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition gagal: elemen dengan id ${elemId} mungkin salah tempat.",
-
-    'filterEvaluateNotImplemented': "evaluasi tidak tersedia untuk tipe filter ini."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/io.js
+++ /dev/null
@@ -1,20 +1,1 @@
-/* Translators (2009 onwards):
- *  - Malafaya
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["io"]
- * Dictionary for Ido.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["io"] = OpenLayers.Util.applyDefaults({
-
-    'scale': "Skalo = 1 : ${scaleDenom}"
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/is.js
+++ /dev/null
@@ -1,38 +1,1 @@
-/* Translators (2009 onwards):
- *  - Ævar Arnfjörð Bjarmason
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["is"]
- * Dictionary for Íslenska.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["is"] = OpenLayers.Util.applyDefaults({
-
-    'permalink': "Varanlegur tengill",
-
-    'overlays': "Þekjur",
-
-    'baseLayer': "Grunnlag",
-
-    'sameProjection': "Yfirlitskortið virkar aðeins ef það er í sömu vörpun og aðalkortið",
-
-    'readNotImplemented': "Skrifun er óútfærð.",
-
-    'writeNotImplemented': "Lestur er óútfærður.",
-
-    'errorLoadingGML': "Villa kom upp við að hlaða inn GML skránni ${url}",
-
-    'scale': "Skali = 1 : ${scaleDenom}",
-
-    'layerAlreadyAdded': "Þú reyndir að bæta laginu ${layerName} á kortið en það er þegar búið að bæta því við",
-
-    'methodDeprecated': "Þetta fall hefur verið úrelt og verður fjarlægt í 3.0. Notaðu ${newMethod} í staðin."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/it.js
+++ /dev/null
@@ -1,117 +1,1 @@
-/**
- * @requires OpenLayers/Lang.js
- */
 
-/**
- * Namespace: OpenLayers.Lang["it"]
- * Dictionary for Italian.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang.it = {
-
-    'unhandledRequest': "Codice di ritorno della richiesta ${statusText}",
-
-    'permalink': "Permalink",
-
-    'overlays': "Overlays",
-
-    'baseLayer': "Livello base",
-
-    'sameProjection':
-        "La mini mappa funziona solamente se ha la stessa proiezione della mappa principale",
-
-    'readNotImplemented': "Lettura non implementata.",
-
-    'writeNotImplemented': "Scrittura non implementata.",
-
-    'noFID': "Impossibile aggiornare un elemento grafico che non abbia il FID.",
-
-    'errorLoadingGML': "Errore nel caricamento del file GML ${url}",
-
-    'browserNotSupported':
-        "Il tuo browser non supporta il rendering vettoriale. I renderizzatore attualemnte supportati sono:\n${renderers}",
-
-    'componentShouldBe': "addFeatures : il componente dovrebbe essere di tipo ${geomType}",
-
-    // console message
-    'getFeatureError':
-        "getFeatureFromEvent chiamata su di un livello senza renderizzatore. Ciò significa che " +
-        "il livello è stato cancellato, ma non i gestori associati ad esso.",
-
-    // console message
-    'minZoomLevelError':
-        "La proprietà minZoomLevel è da utilizzare solamente " +
-        "con livelli che abbiano FixedZoomLevels. Il fatto che " +
-        "questo livello wfs controlli la proprietà minZoomLevel è " +
-        "un retaggio del passato. Non possiamo comunque rimuoverla " +
-        "senza rompere le vecchie applicazioni che dipendono su di essa." +
-        "Quindi siamo costretti a deprecarla -- minZoomLevel " +
-        "e sarà rimossa dalla vesione 3.0. Si prega di utilizzare i " +
-        "settaggi di risoluzione min/max come descritto qui: " +
-        "http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "Transazione WFS: SUCCESS ${response}",
-
-    'commitFailed': "Transazione WFS: FAILED ${response}",
-
-    'googleWarning':
-        "Il livello Google non è riuscito a caricare correttamente.<br><br>" +
-        "Per evitare questo messaggio, seleziona un nuovo BaseLayer " +
-        "nel selettore di livelli nell'angolo in alto a destra.<br><br>" +
-        "Più precisamente, ciò accade perchè la libreria Google Maps " +
-        "non è stata inclusa nella pagina, oppure non contiene la " +
-        "corretta API key per il tuo sito.<br><br>" +
-        "Sviluppatori: Per aiuto su come farlo funzionare correttamente, " +
-        "<a href='http://trac.openlayers.org/wiki/Google' " +
-        "target='_blank'>clicca qui</a>",
-
-    'getLayerWarning':
-        "Il livello ${layerType} non è riuscito a caricare correttamente.<br><br>" +
-        "Per evitare questo messaggio, seleziona un nuovo BaseLayer " +
-        "nel selettore di livelli nell'angolo in alto a destra.<br><br>" +
-        "Più precisamente, ciò accade perchè la libreria ${layerLib} " +
-        "non è stata inclusa nella pagina.<br><br>" +
-        "Sviluppatori: Per aiuto su come farlo funzionare correttamente, " +
-        "<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
-        "target='_blank'>clicca qui</a>",
-
-    'scale': "Scala = 1 : ${scaleDenom}",
-
-    // console message
-    'layerAlreadyAdded':
-        "Stai cercando di aggiungere il livello: ${layerName} alla mappa, ma tale livello è già stato aggiunto.",
-
-    // console message
-    'reprojectDeprecated':
-        "Stai utilizzando l'opzione 'reproject' sul livello ${layerName}. " +
-        "Questa opzione è deprecata: il suo utilizzo è stato introdotto per" +
-        "supportare il disegno dei dati sopra mappe commerciali, ma tale " + 
-        "funzionalità dovrebbe essere ottenuta tramite l'utilizzo della proiezione " +
-        "Spherical Mercator. Per maggiori informazioni consultare qui " +
-        "http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    // console message
-    'methodDeprecated':
-        "Questo metodo è stato deprecato e sarà rimosso dalla versione 3.0. " +
-        "Si prega di utilizzare il metodo ${newMethod} in alternativa.",
-
-    // console message
-    'boundsAddError': "Devi specificare i valori di x e y alla funzione add.",
-
-    // console message
-    'lonlatAddError': "Devi specificare i valori di lon e lat alla funzione add.",
-
-    // console message
-    'pixelAddError': "Devi specificare i valori di x e y alla funzione add.",
-
-    // console message
-    'unsupportedGeometryType': "Tipo di geometria non supportata: ${geomType}",
-
-    // console message
-    'pagePositionFailed':
-        "OpenLayers.Util.pagePosition fallita: l'elemento con id ${elemId} è posizionato in modo errato.",
-                    
-    'end': ''
-};
-

--- a/labs/openlayers/lib/OpenLayers/Lang/ja.js
+++ /dev/null
@@ -1,81 +1,1 @@
-/* Translators (2009 onwards):
- *  - Fryed-peach
- *  - Mage Whopper
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["ja"]
- * Dictionary for 日本語.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["ja"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "未処理の要求は ${statusText} を返します",
-
-    'permalink': "パーマリンク",
-
-    'overlays': "オーバーレイ",
-
-    'baseLayer': "基底レイヤー",
-
-    'sameProjection': "概観地図はメインの地図と同じ投影法をとる場合のみ機能します",
-
-    'readNotImplemented': "読み込みは実装されていません。",
-
-    'writeNotImplemented': "書き込みは実装されていません。",
-
-    'noFID': "FID のない地物は更新できません。",
-
-    'errorLoadingGML': "GML ファイル ${url} の読み込みエラー",
-
-    'browserNotSupported': "あなたのブラウザはベクターグラフィックスの描写に対応していません。現時点で対応しているソフトウェアは以下のものです。\n${renderers}",
-
-    'componentShouldBe': "addFeatures: 要素は ${geomType} であるべきです",
-
-    'getFeatureError': "getFeatureFromEvent がレンダラーのないレイヤーから呼ばれました。通常、これはあなたがレイヤーを、それに関連づけられたいくつかのハンドラを除いて、破壊してしまったことを意味します。",
-
-    'minZoomLevelError': "minZoomLevel プロパティは FixedZoomLevels を継承するレイヤーでの使用のみを想定しています。この minZoomLevel に対する WFS レイヤーの検査は歴史的なものです。しかしながら、この検査を除去するとそれに依存する OpenLayers ベースのアプリケーションを破壊してしまう可能性があります。よって廃止が予定されており、この minZoomLevel 検査はバージョン3.0で除去されます。代わりに、http://trac.openlayers.org/wiki/SettingZoomLevels で解説されている、最小および最大解像度設定を使用してください。",
-
-    'commitSuccess': "WFS トランザクション: 成功 ${response}",
-
-    'commitFailed': "WFS トランザクション: 失敗 ${response}",
-
-    'googleWarning': "Google レイヤーが正しく読み込みを行えませんでした。\x3cbr\x3e\x3cbr\x3eこのメッセージを消すには、右上の隅にあるレイヤー切り替え部分で新しい基底レイヤーを選んでください。\x3cbr\x3e\x3cbr\x3eおそらく、これは Google マップ用ライブラリのスクリプトが組み込まれていないか、あなたのサイトに対応する正しい API キーが設定されていないためです。\x3cbr\x3e\x3cbr\x3e開発者の方へ: 正しい動作をさせるために\x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eこちらのウィキ\x3c/a\x3eを参照してください。",
-
-    'getLayerWarning': "${layerType} レイヤーが正しく読み込みを行えませんでした。\x3cbr\x3e\x3cbr\x3eこのメッセージを消すには、右上の隅にあるレイヤー切り替え部分で新しい基底レイヤーを選んでください。\x3cbr\x3e\x3cbr\x3eおそらく、これは ${layerLib} ライブラリのスクリプトが正しく組み込まれていないためです。\x3cbr\x3e\x3cbr\x3e開発者の方へ: 正しい動作をさせるために\x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eこちらのウィキ\x3c/a\x3eを参照してください。",
-
-    'scale': "縮尺 = 1 : ${scaleDenom}",
-
-    'W': "西",
-
-    'E': "東",
-
-    'N': "北",
-
-    'S': "南",
-
-    'layerAlreadyAdded': "あなたは「${layerName}」を地図に追加しようと試みましたが、そのレイヤーは既に追加されています",
-
-    'reprojectDeprecated': "あなたは「${layerName}」レイヤーで reproject オプションを使っています。このオプションは商用の基底地図上に情報を表示する目的で設計されましたが、現在ではその機能は Spherical Mercator サポートを利用して実現されており、このオプションの使用は非推奨です。追加の情報は http://trac.openlayers.org/wiki/SphericalMercator で入手できます。",
-
-    'methodDeprecated': "このメソッドは廃止が予定されており、バージョン3.0で除去されます。代わりに ${newMethod} を使用してください。",
-
-    'boundsAddError': "x と y 両方の値を add 関数に渡さなければなりません。",
-
-    'lonlatAddError': "lon と lat 両方の値を add 関数に渡さなければなりません。",
-
-    'pixelAddError': "x と y の値両方を add 関数に渡さなければなりません。",
-
-    'unsupportedGeometryType': "未対応の形状型: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition が失敗しました: id ${elemId} をもつ要素が誤った位置にある可能性があります。",
-
-    'filterEvaluateNotImplemented': "このフィルター型について evaluate は実装されていません。"
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/km.js
+++ /dev/null
@@ -1,26 +1,1 @@
-/* Translators (2009 onwards):
- *  - វ័ណថារិទ្ធ
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["km"]
- * Dictionary for ភាសាខ្មែរ.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["km"] = OpenLayers.Util.applyDefaults({
-
-    'permalink': "តំណភ្ជាប់អចិន្ត្រៃយ៍",
-
-    'baseLayer': "ស្រទាប់បាត​",
-
-    'errorLoadingGML': "កំហុសកំឡុងពេលផ្ទុកឯកសារ GML ${url}",
-
-    'scale': "មាត្រដ្ឋាន = ១ ៖ ${scaleDenom}"
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/ksh.js
+++ /dev/null
@@ -1,80 +1,1 @@
-/* Translators (2009 onwards):
- *  - Purodha
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["ksh"]
- * Dictionary for Ripoarisch.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["ksh"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Met dä Antwoot op en Aanfrooch ham_mer nix aanjefange: ${statusText}",
-
-    'permalink': "Lengk op Duuer",
-
-    'overlays': "Drövver jelaat",
-
-    'baseLayer': "Jrund-Nivoh",
-
-    'sameProjection': "De Övverseeschs_Kaat deiht et bloß, wann se de sälve Projäxjuhn bruche deiht, wi de Houp_Kaat",
-
-    'readNotImplemented': "„\x3ccode lang=\"en\"\x3eread\x3c/code\x3e“ is em Projramm nit fürjesinn.",
-
-    'writeNotImplemented': "„\x3ccode lang=\"en\"\x3ewrite\x3c/code\x3e“ is em Projramm nit fürjesinn.",
-
-    'noFID': "En Saach, woh kein \x3ci lang=\"en\"\x3eFID\x3c/i\x3e för doh es, löht sesch nit ändere.",
-
-    'errorLoadingGML': "Fähler beim \x3ci lang=\"en\"\x3eGML\x3c/i\x3e-Datei-Laade vun \x3ccode\x3e${url}\x3c/code\x3e",
-
-    'browserNotSupported': "Dinge Brauser kann kein Väktore ußjävve. De Zoote Ußjaabe, di em Momang jon, sen:\n${renderers}",
-
-    'componentShouldBe': "\x3ccode lang=\"en\"\x3eaddFeatures\x3c/code\x3e: dä Aandeil sullt vun dä Zoot „\x3ccode lang=\"en\"\x3e${geomType}\x3c/code\x3e“ sin.",
-
-    'getFeatureError': "\x3ccode lang=\"en\"\x3egetFeatureFromEvent\x3c/code\x3e es vun enem Nivoh opjeroofe woode, woh et kei Projramm zom Ußjävve jit. Dat bedügg för jewöhnlesch, dat De e Nivoh kapott jemaat häs, ävver nit e Projramm för domet ömzejonn, wat domet verbonge es.",
-
-    'minZoomLevelError': "De Eijeschaff „\x3ccode lang=\"en\"\x3eminZoomLevel\x3c/code\x3e“ es bloß doför jedaach, dat mer se met dä Nivvohß bruch, di vun \x3ccode lang=\"en\"\x3eFixedZoomLevels\x3c/code\x3e affhange don. Dat dat \x3ci lang=\"en\"\x3eWFS\x3c/i\x3e-Nivvoh övverhoup de Eijeschaff „\x3ccode lang=\"en\"\x3eminZoomLevel\x3c/code\x3e“ pröhfe deiht, es noch övveresch vun fröhjer. Mer künne dat ävver jez nit fott lohße, oohne dat mer Jevaa loufe, dat Aanwendunge vun OpenLayers nit mieh loufe, di sesch doh velleijsch noch drop am verlohße sin. Dröm sare mer, dat mer et nit mieh han welle, un de „\x3ccode lang=\"en\"\x3eminZoomLevel\x3c/code\x3e“-Eijeschaff weed hee vun de Version 3.0 af nit mieh jeprööf wäde. Nemm doför de Enstellung för de hühßte un de kleinßte Oplöhsung, esu wi et en http://trac.openlayers.org/wiki/SettingZoomLevels opjeschrevve es.",
-
-    'commitSuccess': "Dä \x3ci lang=\"en\"\x3eWFS\x3c/i\x3e-Vörjang es joot jeloufe: ${response}",
-
-    'commitFailed': "Dä \x3ci lang=\"en\"\x3eWFS\x3c/i\x3e-Vörjang es scheif jejange: ${response}",
-
-    'googleWarning': "Dat Nivvoh \x3ccode lang=\"en\"\x3eGoogle\x3c/code\x3e kunnt nit reschtesch jelaade wääde.\x3cbr /\x3e\x3cbr /\x3eÖm hee di Nohreesch loß ze krijje, donn en ander Jrund-Nivvoh ußsöhke, rähß bovve en de Äk.\x3cbr /\x3e\x3cbr /\x3eWascheinlesch es dat wiel dat \x3ci lang=\"en\"\x3eGoogle-Maps\x3c/i\x3e-Skrepp entweeder nit reschtesch enjebonge wood, udder nit dä reschtejje \x3ci lang=\"en\"\x3eAPI\x3c/i\x3e-Schlößel för Ding Web-ßait scheke deiht.\x3cbr /\x3e\x3cbr /\x3eFör Projrammierer jidd_et Hölp do_drövver, \x3ca href=\"http://trac.openlayers.org/wiki/Google\" target=\"_blank\"\x3ewi mer dat aan et Loufe brengk\x3c/a\x3e.",
-
-    'getLayerWarning': "Dat Nivvoh \x3ccode\x3e${layerType}\x3c/code\x3e kunnt nit reschtesch jelaade wääde.\x3cbr /\x3e\x3cbr /\x3eÖm hee di Nohreesch loß ze krijje, donn en ander Jrund-Nivvoh ußsöhkre, rähß bovve en de Äk.\x3cbr /\x3e\x3cbr /\x3eWascheinlesch es dat, wiel dat Skrepp \x3ccode\x3e${layerLib}\x3c/code\x3e nit reschtesch enjebonge wood.\x3cbr /\x3e\x3cbr /\x3eFör Projrammierer jidd_Et Hölp do_drövver, \x3ca href=\"http://trac.openlayers.org/wiki/${layerLib}\" target=\"_blank\"\x3ewi mer dat aan et Loufe brengk\x3c/a\x3e.",
-
-    'scale': "Mohßshtaab = 1 : ${scaleDenom}",
-
-    'W': "W",
-
-    'E': "O",
-
-    'N': "N",
-
-    'S': "S",
-
-    'layerAlreadyAdded': "Do häß versöhk, dat Nivvoh \x3ccode\x3e${layerName}\x3c/code\x3e en di Kaat eren ze bränge, et wohr ävver ald do dren.",
-
-    'reprojectDeprecated': "Do bruchs de Ußwahl \x3ccode\x3ereproject\x3c/code\x3e op däm Nivvoh \x3ccode\x3e${layerName}\x3c/code\x3e. Di Ußwahl es nit mieh jähn jesinn. Se wohr doför jedaach, öm Date op jeschääfsmäßesch eruß jejovve Kaate bovve drop ze moole, wat ävver enzwesche besser met dä Öngershtözung för de ßfääresche Mäkaator Beldscher jeiht. Doh kanns De mieh drövver fenge op dä Sigg: http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Hee di Metood es nim_mih aktoäll un et weed se en dä Version 3.0 nit mieh jävve. Nemm \x3ccode\x3e${newMethod}\x3c/code\x3e doföör.",
-
-    'boundsAddError': "Do moß beeds vun de \x3ccode\x3ex\x3c/code\x3e un \x3ccode\x3ey\x3c/code\x3e Wääte aan de Fungkßjohn \x3ccode\x3eadd\x3c/code\x3e jävve.",
-
-    'lonlatAddError': "Do moß beeds \x3ccode\x3elon\x3c/code\x3e un \x3ccode\x3elat\x3c/code\x3e aan de Fungkßjohn \x3ccode\x3eadd\x3c/code\x3e jävve.",
-
-    'pixelAddError': "Do moß beeds \x3ccode\x3ex\x3c/code\x3e un \x3ccode\x3ey\x3c/code\x3e aan de Fungkßjohn \x3ccode\x3eadd\x3c/code\x3e jävve.",
-
-    'unsupportedGeometryType': "De Zoot Jommetrii dom_mer nit ongershtöze: \x3ccode\x3e${geomType}\x3c/code\x3e",
-
-    'pagePositionFailed': "\x3ccode lang=\"en\"\x3eOpenLayers.Util.pagePosition\x3c/code\x3e es donevve jejange: dat Denge met dä Kännong \x3ccode\x3e${elemId}\x3c/code\x3e künnt am verkeehte Plaz sin.",
-
-    'filterEvaluateNotImplemented': "„\x3ccode lang=\"en\"\x3eevaluate\x3c/code\x3e“ es för di Zoot Fellter nit enjereschdt."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/nb.js
+++ /dev/null
@@ -1,119 +1,1 @@
-/**
- * @requires OpenLayers/Lang.js
- */
 
-/**
- * Namespace: OpenLayers.Lang["nb"]
- * Dictionary for norwegian bokmål (Norway). Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["nb"] = {
-
-    'unhandledRequest': "Ubehandlet forespørsel returnerte ${statusText}",
-
-    'permalink': "Kobling til denne siden",
-
-    'overlays': "Kartlag",
-
-    'baseLayer': "Bakgrunnskart",
-
-    'sameProjection':
-        "Oversiktskartet fungerer bare når det har samme projeksjon som hovedkartet",
-
-    'readNotImplemented': "Lesing er ikke implementert.",
-
-    'writeNotImplemented': "Skriving er ikke implementert.",
-
-    'noFID': "Kan ikke oppdatere et feature (et objekt) som ikke har FID.",
-
-    'errorLoadingGML': "Feil under lasting av GML-fil ${url}",
-
-    'browserNotSupported':
-        "Din nettleser støtter ikke vektortegning. Tegnemetodene som støttes er:\n${renderers}",
-
-    'componentShouldBe': "addFeatures : komponenten må være en ${geomType}",
-
-    // console message
-    'getFeatureError':
-        "getFeatureFromEvent har blitt kjørt mot et lag uten noen tegnemetode. Dette betyr som regel at du " +
-        "fjernet et lag uten å fjerne alle håndterere tilknyttet laget.",
-
-    // console message
-    'minZoomLevelError':
-        "Egenskapen minZoomLevel er kun ment til bruk på lag " +
-        "basert på FixedZoomLevels. At dette wfs-laget sjekker " +
-        "minZoomLevel er en etterlevning fra tidligere versjoner. Det kan dog ikke " +
-        "tas bort uten å risikere at OL-baserte applikasjoner " +
-        "slutter å virke, så det er merket som foreldet: " +
-        "minZoomLevel i sjekken nedenfor vil fjernes i 3.0. " +
-        "Vennligst bruk innstillingene for min/maks oppløsning " +
-        "som er beskrevet her: "+
-        "http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "WFS-transaksjon: LYKTES ${response}",
-
-    'commitFailed': "WFS-transaksjon: MISLYKTES ${response}",
-
-    'googleWarning':
-        "Google-laget kunne ikke lastes.<br><br>" +
-        "Bytt til et annet bakgrunnslag i lagvelgeren i " +
-        "øvre høyre hjørne for å slippe denne meldingen.<br><br>" +
-        "Sannsynligvis forårsakes feilen av at Google Maps-biblioteket " +
-        "ikke er riktig inkludert på nettsiden, eller at det ikke er " +
-        "angitt riktig API-nøkkel for nettstedet.<br><br>" +
-        "Utviklere: For hjelp til å få dette til å virke se "+
-        "<a href='http://trac.openlayers.org/wiki/Google' " +
-        "target='_blank'>her</a>.",
-
-    'getLayerWarning':
-        "${layerType}-laget kunne ikke lastes.<br><br>" +
-        "Bytt til et annet bakgrunnslag i lagvelgeren i " +
-        "øvre høyre hjørne for å slippe denne meldingen.<br><br>" +
-        "Sannsynligvis forårsakes feilen av at " +
-        "${layerLib}-biblioteket ikke var riktig inkludert " +
-        "på nettsiden.<br><br>" +
-        "Utviklere: For hjelp til å få dette til å virke se " +
-        "<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
-        "target='_blank'>her</a>.",
-
-    'scale': "<strong>Skala</strong> 1 : ${scaleDenom}",
-
-    // console message
-    'layerAlreadyAdded':
-        "Du forsøkte å legge til laget ${layerName} på kartet, men det er allerede lagt til",
-
-    // console message
-    'reprojectDeprecated':
-        "Du bruker innstillingen 'reproject' på laget ${layerName}. " +
-        "Denne innstillingen er foreldet, den var ment for å støtte " +
-        "visning av kartdata over kommersielle bakgrunnskart, men det " +
-        "bør nå gjøres med støtten for Spherical Mercator. Mer informasjon " +
-        "finnes på http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    // console message
-    'methodDeprecated':
-        "Denne metoden er markert som foreldet og vil bli fjernet i 3.0. " +
-        "Vennligst bruk ${newMethod} i stedet.",
-
-    // console message
-    'boundsAddError': "Du må gi både x- og y-verdier til funksjonen add.",
-
-    // console message
-    'lonlatAddError': "Du må gi både lon- og lat-verdier til funksjonen add.",
-
-    // console message
-    'pixelAddError': "Du må gi både x- og y-verdier til funksjonen add.",
-
-    // console message
-    'unsupportedGeometryType': "Geometritypen ${geomType} er ikke støttet",
-
-    // console message
-    'pagePositionFailed':
-        "OpenLayers.Util.pagePosition feilet: elementet med id ${elemId} kan være feilplassert.",
-                    
-    'end': ''
-};
-
-OpenLayers.Lang["no"] = OpenLayers.Lang["nb"];
-

--- a/labs/openlayers/lib/OpenLayers/Lang/nds.js
+++ /dev/null
@@ -1,62 +1,1 @@
-/* Translators (2009 onwards):
- *  - Slomox
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["nds"]
- * Dictionary for Plattdüütsch.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["nds"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Unbehannelt Trüchmellels för de Anfraag ${statusText}",
-
-    'permalink': "Permalink",
-
-    'overlays': "Overlays",
-
-    'baseLayer': "Achtergrundkoort",
-
-    'sameProjection': "De Översichtskoort geiht blot, wenn de sülve Projekschoon as bi de Hööftkoort bruukt warrt",
-
-    'readNotImplemented': "Lesen is nich inricht.",
-
-    'writeNotImplemented': "Schrieven is nich inricht.",
-
-    'noFID': "En Feature, dat keen FID hett, kann nich aktuell maakt warrn.",
-
-    'errorLoadingGML': "Fehler bi’t Laden vun de GML-Datei ${url}",
-
-    'browserNotSupported': "Dien Browser ünnerstütt keen Vektorbiller. Ünnerstütt Renderers:\n${renderers}",
-
-    'componentShouldBe': "addFeatures : Kumponent schull man den Typ ${geomType} hebben",
-
-    'getFeatureError': "getFeatureFromEvent is von en Laag ahn Render opropen worrn. Dat bedüüdt normalerwies, dat en Laag wegmaakt worrn is, aver nich de Handler, de dor op verwiest.",
-
-    'commitSuccess': "WFS-Transakschoon: hett klappt ${response}",
-
-    'commitFailed': "WFS-Transakschoon: hett nich klappt ${response}",
-
-    'scale': "Skaal = 1 : ${scaleDenom}",
-
-    'layerAlreadyAdded': "Du versöchst de Laag „${layerName}“ to de Koort totofögen, man de is al toföögt",
-
-    'methodDeprecated': "Disse Methood is oold un schall dat in 3.0 nich mehr geven. Bruuk dor man beter ${newMethod} för.",
-
-    'boundsAddError': "De Weert x un y, de mööt all beid an de add-Funkschoon övergeven warrn.",
-
-    'lonlatAddError': "De Weert lon un lat, de mööt all beid an de add-Funkschoon övergeven warrn.",
-
-    'pixelAddError': "De Weert x un y, de mööt all beid an de add-Funkschoon övergeven warrn.",
-
-    'unsupportedGeometryType': "Nich ünnerstütt Geometrie-Typ: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition güng nich: Element mit de Id ${elemId} is villicht an’n verkehrten Platz."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/nl.js
+++ /dev/null
@@ -1,80 +1,1 @@
-/* Translators (2009 onwards):
- *  - Siebrand
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["nl"]
- * Dictionary for Nederlands.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["nl"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Het verzoek is niet afgehandeld met de volgende melding: ${statusText}",
-
-    'permalink': "Permanente verwijzing",
-
-    'overlays': "Overlays",
-
-    'baseLayer': "Achtergrondkaart",
-
-    'sameProjection': "De overzichtskaart werkt alleen als de projectie gelijk is aan de projectie van de hoofdkaart",
-
-    'readNotImplemented': "Lezen is niet geïmplementeerd.",
-
-    'writeNotImplemented': "Schrijven is niet geïmplementeerd.",
-
-    'noFID': "Een optie die geen FID heeft kan niet bijgewerkt worden.",
-
-    'errorLoadingGML': "Er is een fout opgetreden bij het laden van het GML bestand van ${url}",
-
-    'browserNotSupported': "Uw browser ondersteunt het weergeven van vectoren niet.\nMomenteel ondersteunde weergavemogelijkheden:\n${renderers}",
-
-    'componentShouldBe': "addFeatures : component moet van het type ${geomType} zijn",
-
-    'getFeatureError': "getFeatureFromEvent is aangeroepen op een laag zonder rederer.\nDit betekent meestal dat u een laag hebt verwijderd, maar niet een handler die ermee geassocieerd was.",
-
-    'minZoomLevelError': "De eigenschap minZoomLevel is alleen bedoeld voor gebruik lagen met die afstammen van FixedZoomLevels-lagen.\nDat deze WFS-laag minZoomLevel controleert, is een overblijfsel uit het verleden.\nWe kunnen deze controle echter niet verwijderen zonder op OL gebaseerde applicaties die hervan afhankelijk zijn stuk te maken.\nDaarom heeft deze functionaliteit de eigenschap \'deprecated\' gekregen - de minZoomLevel wordt verwijderd in versie 3.0.\nGebruik in plaats van deze functie de mogelijkheid om min/max voor resolutie in te stellen zoals op de volgende pagina wordt beschreven:\nhttp://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "WFS-transactie: succesvol ${response}",
-
-    'commitFailed': "WFS-transactie: mislukt ${response}",
-
-    'googleWarning': "De Google-Layer kon niet correct geladen worden.\x3cbr /\x3e\x3cbr /\x3e\nOm deze melding niet meer te krijgen, moet u een andere achtergrondkaart kiezen in de laagwisselaar in de rechterbovenhoek.\x3cbr /\x3e\x3cbr /\x3e\nDit komt waarschijnlijk doordat de bibliotheek ${layerLib} niet correct ingevoegd is.\x3cbr /\x3e\x3cbr /\x3e\nOntwikkelaars: \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eklik hier\x3c/a\x3e om dit werkend te krijgen.",
-
-    'getLayerWarning': "De laag ${layerType} kon niet goed geladen worden.\x3cbr /\x3e\x3cbr /\x3e\nOm deze melding niet meer te krijgen, moet u een andere achtergrondkaart kiezen in de laagwisselaar in de rechterbovenhoek.\x3cbr /\x3e\x3cbr /\x3e\nDit komt waarschijnlijk doordat de bibliotheek ${layerLib} niet correct is ingevoegd.\x3cbr /\x3e\x3cbr /\x3e\nOntwikkelaars: \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eklik hier\x3c/a\x3e om dit werkend te krijgen.",
-
-    'scale': "Schaal = 1 : ${scaleDenom}",
-
-    'W': "W",
-
-    'E': "O",
-
-    'N': "N",
-
-    'S': "Z",
-
-    'layerAlreadyAdded': "U hebt geprobeerd om de laag  ${layerName} aan de kaart toe te voegen, maar deze is al toegevoegd",
-
-    'reprojectDeprecated': "U gebruikt de optie \'reproject\' op de laag ${layerName}.\nDeze optie is vervallen: deze optie was ontwikkeld om gegevens over commerciële basiskaarten weer te geven, maar deze functionaliteit wordt nu bereikt door ondersteuning van Spherical Mercator.\nMeer informatie is beschikbaar op http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Deze methode is verouderd en wordt verwijderd in versie 3.0.\nGebruik ${newMethod}.",
-
-    'boundsAddError': "U moet zowel de x- als de y-waarde doorgeven aan de toevoegfunctie.",
-
-    'lonlatAddError': "U moet zowel de lengte- als de breedtewaarde doorgeven aan de toevoegfunctie.",
-
-    'pixelAddError': "U moet zowel de x- als de y-waarde doorgeven aan de toevoegfunctie.",
-
-    'unsupportedGeometryType': "Dit geometrietype wordt niet ondersteund: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition is mislukt: het element met id ${elemId} is wellicht onjuist geplaatst.",
-
-    'filterEvaluateNotImplemented': "evalueren is niet geïmplementeerd voor dit filtertype."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/nn.js
+++ /dev/null
@@ -1,28 +1,1 @@
-/* Translators (2009 onwards):
- *  - Harald Khan
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["nn"]
- * Dictionary for ‪Norsk (nynorsk)‬.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["nn"] = OpenLayers.Util.applyDefaults({
-
-    'scale': "Skala = 1 : ${scaleDenom}",
-
-    'layerAlreadyAdded': "Du freista å leggja til laget «${layerName}» på kartet, men det har alt vorte lagt til.",
-
-    'boundsAddError': "Du er nøydd til å gje både ein x- og ein y-verdi til «add»-funksjonen.",
-
-    'lonlatAddError': "Du er nøydd til å gje både lon- og lat-verdiar til «add»-funksjonen.",
-
-    'pixelAddError': "Du er nøydd til å gje både ein x- og ein y-verdi til «add»-funksjonen."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/oc.js
+++ /dev/null
@@ -1,80 +1,1 @@
-/* Translators (2009 onwards):
- *  - Cedric31
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["oc"]
- * Dictionary for Occitan.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["oc"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Requèsta pas gerida, retorna ${statusText}",
-
-    'permalink': "Permaligam",
-
-    'overlays': "Calques",
-
-    'baseLayer': "Calc de basa",
-
-    'sameProjection': "La carta de situacion fonciona pas que quora sa projeccion es la meteissa que la de la carta principala",
-
-    'readNotImplemented': "Lectura pas implementada.",
-
-    'writeNotImplemented': "Escritura pas implementada.",
-
-    'noFID': "Impossible de metre a jorn un objècte sens identificant (fid).",
-
-    'errorLoadingGML': "Error al cargament del fichièr GML ${url}",
-
-    'browserNotSupported': "Vòstre navegidor supòrta pas lo rendut vectorial. Los renderers actualament suportats son : \n${renderers}",
-
-    'componentShouldBe': "addFeatures : lo compausant deuriá èsser de tipe ${geomType}",
-
-    'getFeatureError': "getFeatureFromEvent es estat apelat sus un calc sens renderer. Aquò significa generalament qu\'avètz destruch aqueste jaç, mas qu\'avètz conservat un handler que li èra associat.",
-
-    'minZoomLevelError': "La proprietat minZoomLevel deu èsser utilizada solament per de jaces FixedZoomLevels-descendent. Lo fach qu\'aqueste jaç WFS verifique la preséncia de minZoomLevel es una relica del passat. Çaquelà, la podèm suprimir sens copar d\'aplicacions que ne poirián dependre. Es per aquò que la depreciam -- la verificacion del minZoomLevel serà suprimida en version 3.0. A la plaça, mercés d\'utilizar los paramètres de resolucions min/max tal coma descrich sus : http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "Transaccion WFS : SUCCES ${response}",
-
-    'commitFailed': "Transaccion WFS : FRACAS ${response}",
-
-    'googleWarning': "Lo jaç Google es pas estat en mesura de se cargar corrèctament.\x3cbr\x3e\x3cbr\x3ePer suprimir aqueste messatge, causissètz una BaseLayer novèla dins lo selector de jaç en naut a drecha.\x3cbr\x3e\x3cbr\x3eAquò es possiblament causat par la non-inclusion de la librariá Google Maps, o alara perque que la clau de l\'API correspond pas a vòstre site.\x3cbr\x3e\x3cbr\x3eDesvolopaires : per saber cossí corregir aquò, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eclicatz aicí\x3c/a\x3e",
-
-    'getLayerWarning': "Lo jaç ${layerType} es pas en mesura de se cargar corrèctament.\x3cbr\x3e\x3cbr\x3ePer suprimir aqueste messatge, causissètz una  BaseLayer novèla dins lo selector de jaç en naut a drecha.\x3cbr\x3e\x3cbr\x3eAquò es possiblament causat per la non-inclusion de la librariá ${layerLib}.\x3cbr\x3e\x3cbr\x3eDesvolopaires : per saber cossí corregir aquí, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eclicatz aicí\x3c/a\x3e",
-
-    'scale': "Escala ~ 1 : ${scaleDenom}",
-
-    'W': "O",
-
-    'E': "È",
-
-    'N': "N",
-
-    'S': "S",
-
-    'layerAlreadyAdded': "Avètz ensajat d\'apondre a la carta lo calc : ${layerName}, mas ja es present",
-
-    'reprojectDeprecated': "Utilizatz l\'opcion \'reproject\' sul jaç ${layerName}. Aquesta opcion es despreciada : Son usatge permetiá d\'afichar de donadas al dessús de jaces raster comercials. Aquesta foncionalitat ara es suportada en utilizant lo supòrt de la projeccion Mercator Esferica. Mai d\'informacion es disponibla sus http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Aqueste metòde es despreciada, e serà suprimida a la version 3.0. Mercés d\'utilizar ${newMethod} a la plaça.",
-
-    'boundsAddError': "Vos cal passar las doas valors x e y a la foncion add.",
-
-    'lonlatAddError': "Vos cal passar las doas valors lon e lat a la foncion add.",
-
-    'pixelAddError': "Vos cal passar las doas valors x e y a la foncion add.",
-
-    'unsupportedGeometryType': "Tipe de geometria pas suportat : ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition a fracassat : l\'element d\'id ${elemId} poiriá èsser mal posicionat.",
-
-    'filterEvaluateNotImplemented': "evaluar es pas encara estat implementat per aqueste tipe de filtre."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/pt-BR.js
+++ /dev/null
@@ -1,81 +1,1 @@
-/* Translators (2009 onwards):
- *  - Luckas Blade
- *  - Rodrigo Avila
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["pt-br"]
- * Dictionary for Português do Brasil.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["pt-br"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "A requisição retornou um erro não tratado: ${statusText}",
-
-    'permalink': "Link para essa página",
-
-    'overlays': "Camadas de Sobreposição",
-
-    'baseLayer': "Camada Base",
-
-    'sameProjection': "O mapa de referência só funciona quando ele está na mesma projeção do mapa principal",
-
-    'readNotImplemented': "Leitura não implementada.",
-
-    'writeNotImplemented': "Escrita não implementada.",
-
-    'noFID': "Não é possível atualizar uma feição que não tenha um FID.",
-
-    'errorLoadingGML': "Erro ao carregar o arquivo GML ${url}",
-
-    'browserNotSupported': "Seu navegador não suporta renderização de vetores. Os renderizadores suportados atualmente são:\n${renderers}",
-
-    'componentShouldBe': "addFeatures: o componente deve ser do tipo ${geomType}",
-
-    'getFeatureError': "getFeatureFromEvent foi executado mas nenhum renderizador foi encontrado. Isso pode indicar que você destruiu uma camana, mas não o handler associado a ela.",
-
-    'minZoomLevelError': "A propriedade minZoomLevel é de uso restrito das camadas descendentes de FixedZoomLevels. A verificação dessa propriedade pelas camadas wfs é um resíduo do passado. Não podemos, entretanto não é possível removê-la sem possívelmente quebrar o funcionamento de aplicações OL que possuem depência com ela. Portanto estamos tornando seu uso obsoleto -- a verificação desse atributo será removida na versão 3.0. Ao invés, use as opções de resolução min/max como descrito em: http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "Transação WFS : SUCESSO ${response}",
-
-    'commitFailed': "Transação WFS : ERRO ${response}",
-
-    'googleWarning': "Não foi possível carregar a camada Google corretamente.\x3cbr\x3e\x3cbr\x3ePara se livrar dessa mensagem, selecione uma nova Camada Base, na ferramenta de alternação de camadas localização do canto superior direito.\x3cbr\x3e\x3cbr\x3eMuito provavelmente, isso foi causado porque o script da biblioteca do Google Maps não foi incluído, ou porque ele não contém a chave correta da API para o seu site.\x3cbr\x3e\x3cbr\x3eDesenvolvedores: Para obter ajuda em solucionar esse problema \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3ecliquem aqui\x3c/a\x3e",
-
-    'getLayerWarning': "Não foi possível carregar a camada ${layerType} corretamente.\x3cbr\x3e\x3cbr\x3ePara se livrar dessa mensagem, selecione uma nova Camada Base, na ferramenta de alternação de camadas localização do canto superior direito.\x3cbr\x3e\x3cbr\x3eMuito provavelmente, isso foi causado porque o script da biblioteca ${layerLib} não foi incluído corretamente.\x3cbr\x3e\x3cbr\x3eDesenvolvedores: Para obter ajuda em solucionar esse problema \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3ecliquem aqui\x3c/a\x3e",
-
-    'scale': "Escala = 1 : ${scaleDenom}",
-
-    'W': "O",
-
-    'E': "L",
-
-    'N': "N",
-
-    'S': "S",
-
-    'layerAlreadyAdded': "Você tentou adicionar a camada: ${layerName} ao mapa, mas ela já foi adicionada",
-
-    'reprojectDeprecated': "Você está usando a opção \'reproject\' na camada ${layerName}. Essa opção está obsoleta: seu uso foi projetado para suportar a visualização de dados sobre bases de mapas comerciais, entretanto essa funcionalidade deve agora ser alcançada usando o suporte à projeção Mercator. Mais informação está disponível em: http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Esse método está obsoleto e será removido na versão 3.0. Ao invés, por favor use ${newMethod}.",
-
-    'boundsAddError': "Você deve informar ambos os valores x e y para a função add.",
-
-    'lonlatAddError': "Você deve informar ambos os valores lon e lat para a função add.",
-
-    'pixelAddError': "Você deve informar ambos os valores x e y para a função add.",
-
-    'unsupportedGeometryType': "Tipo geométrico não suportado: ${geomType}.",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition falhou: o elemento de id ${elemId} deve estar fora do lugar.",
-
-    'filterEvaluateNotImplemented': "evaluete não está implementado para este tipo de filtro."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/pt.js
+++ /dev/null
@@ -1,82 +1,1 @@
-/* Translators (2009 onwards):
- *  - Hamilton Abreu
- *  - Malafaya
- *  - Waldir
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["pt"]
- * Dictionary for Português.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["pt"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Servidor devolveu erro não contemplado ${statusText}",
-
-    'permalink': "Ligação permanente",
-
-    'overlays': "Sobreposições",
-
-    'baseLayer': "Camada Base",
-
-    'sameProjection': "O mapa panorâmico só funciona quando está na mesma projeção que o mapa principal",
-
-    'readNotImplemented': "Leitura não implementada.",
-
-    'writeNotImplemented': "Escrita não implementada.",
-
-    'noFID': "Não é possível atualizar um elemento para a qual não há FID.",
-
-    'errorLoadingGML': "Erro ao carregar ficheiro GML ${url}",
-
-    'browserNotSupported': "O seu navegador não suporta renderização vetorial. Actualmente os renderizadores suportados são:\n${renderers}",
-
-    'componentShouldBe': "addFeatures: componente deve ser um(a) ${geomType}",
-
-    'getFeatureError': "getFeatureFromEvent foi chamado numa camada sem renderizador. Isto normalmente significa que destruiu uma camada, mas não um manipulador \'\'(handler)\'\' que lhe está associado.",
-
-    'minZoomLevelError': "A propriedade minZoomLevel só deve ser usada com as camadas descendentes da FixedZoomLevels. A verificação da propriedade por esta camada wfs é uma relíquia do passado. No entanto, não podemos removê-la sem correr o risco de afectar aplicações OL que dependam dela. Portanto, estamos a torná-la obsoleta -- a verificação minZoomLevel será removida na versão 3.0. Em vez dela, por favor, use as opções de resolução min/max descritas aqui: http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "Transacção WFS: SUCESSO ${response}",
-
-    'commitFailed': "Transacção WFS: FALHOU ${response}",
-
-    'googleWarning': "A Camada Google não foi correctamente carregada.\x3cbr\x3e\x3cbr\x3ePara deixar de receber esta mensagem, seleccione uma nova Camada-Base no \'\'switcher\'\' de camadas no canto superior direito.\x3cbr\x3e\x3cbr\x3eProvavelmente, isto acontece porque o \'\'script\'\' da biblioteca do Google Maps não foi incluído ou não contém a chave API correcta para o seu sítio.\x3cbr\x3e\x3cbr\x3eProgramadores: Para ajuda sobre como solucionar o problema \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eclique aqui\x3c/a\x3e .",
-
-    'getLayerWarning': "A camada ${layerType} não foi correctamente carregada.\x3cbr\x3e\x3cbr\x3ePara desactivar esta mensagem, seleccione uma nova Camada-Base no \'\'switcher\'\' de camadas no canto superior direito.\x3cbr\x3e\x3cbr\x3eProvavelmente, isto acontece porque o \'\'script\'\' da biblioteca ${layerLib} não foi incluído correctamente.\x3cbr\x3e\x3cbr\x3eProgramadores: Para ajuda sobre como solucionar o problema \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eclique aqui\x3c/a\x3e .",
-
-    'scale': "Escala = 1 : ${scaleDenom}",
-
-    'W': "O",
-
-    'E': "E",
-
-    'N': "N",
-
-    'S': "S",
-
-    'layerAlreadyAdded': "Você tentou adicionar a camada: ${layerName} ao mapa, mas ela já tinha sido adicionada antes",
-
-    'reprojectDeprecated': "Está usando a opção \'reproject\' na camada ${layerName}. Esta opção é obsoleta: foi concebida para permitir a apresentação de dados sobre mapas-base comerciais, mas esta funcionalidade é agora suportada pelo Mercator Esférico. Mais informação está disponível em http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Este método foi declarado obsoleto e será removido na versão 3.0. Por favor, use ${newMethod} em vez disso.",
-
-    'boundsAddError': "Você deve passar tanto o valor x como o y à função de adição.",
-
-    'lonlatAddError': "Você deve passar tanto o valor lon como o lat à função de adição.",
-
-    'pixelAddError': "Você deve passar tanto o valor x como o y à função de adição.",
-
-    'unsupportedGeometryType': "Tipo de geometria não suportado: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition falhou: o elemento com o id ${elemId} poderá estar mal-posicionado.",
-
-    'filterEvaluateNotImplemented': "avaliar não está implementado para este tipo de filtro."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/ru.js
+++ /dev/null
@@ -1,83 +1,1 @@
-/* Translators (2009 onwards):
- *  - Ferrer
- *  - Komzpa
- *  - Lockal
- *  - Александр Сигачёв
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["ru"]
- * Dictionary for Русский.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["ru"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Необработанный запрос вернул ${statusText}",
-
-    'permalink': "Постоянная ссылка",
-
-    'overlays': "Слои",
-
-    'baseLayer': "Основной слой",
-
-    'sameProjection': "Обзорная карта работает только тогда, когда имеет ту же проекцию, что и основная",
-
-    'readNotImplemented': "Чтение не реализовано.",
-
-    'writeNotImplemented': "Запись не реализована.",
-
-    'noFID': "Невозможно обновить объект, для которого нет FID.",
-
-    'errorLoadingGML': "Ошибка при загрузке файла GML ${url}",
-
-    'browserNotSupported': "Ваш браузер не поддерживает векторную графику. На данный момент поддерживаются:\n${renderers}",
-
-    'componentShouldBe': "addFeatures: компонент должен быть ${geomType}",
-
-    'getFeatureError': "getFeatureFromEvent вызван для слоя без рендерера. Обычно это говорит о том, что вы уничтожили слой, но оставили связанный с ним обработчик.",
-
-    'minZoomLevelError': "Свойство minZoomLevel предназначено только для использования со слоями, являющимися потомками FixedZoomLevels. То, что этот WFS-слой проверяется на minZoomLevel — реликт прошлого. Однако мы не можем удалить эту функцию, так как, возможно, от неё зависят некоторые основанные на OpenLayers приложения. Функция объявлена устаревшей — проверка minZoomLevel будет удалена в 3.0. Пожалуйста, используйте вместо неё настройку мин/макс разрешения, описанную здесь: http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "Транзакция WFS: УСПЕШНО ${response}",
-
-    'commitFailed': "Транзакция WFS: ОШИБКА ${response}",
-
-    'googleWarning': "Слой Google не удалось нормально загрузить.\x3cbr\x3e\x3cbr\x3eЧтобы избавиться от этого сообщения, выбите другой основной слой в переключателе в правом верхнем углу.\x3cbr\x3e\x3cbr\x3eСкорее всего, причина в том, что библиотека Google Maps не была включена или не содержит корректного API-ключа для вашего сайта.\x3cbr\x3e\x3cbr\x3eРазработчикам: чтобы узнать, как сделать, чтобы всё заработало, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eщёлкните тут\x3c/a\x3e",
-
-    'getLayerWarning': "Слой ${layerType} не удалось нормально загрузить. \x3cbr\x3e\x3cbr\x3eЧтобы избавиться от этого сообщения, выбите другой основной слой в переключателе в правом верхнем углу.\x3cbr\x3e\x3cbr\x3eСкорее всего, причина в том, что библиотека ${layerLib} не была включена или была включена некорректно.\x3cbr\x3e\x3cbr\x3eРазработчикам: чтобы узнать, как сделать, чтобы всё заработало, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eщёлкните тут\x3c/a\x3e",
-
-    'scale': "Масштаб = 1 : ${scaleDenom}",
-
-    'W': "З",
-
-    'E': "В",
-
-    'N': "С",
-
-    'S': "Ю",
-
-    'layerAlreadyAdded': "Вы попытались добавить слой «${layerName}» на карту, но он уже был добавлен",
-
-    'reprojectDeprecated': "Вы используете опцию \'reproject\' для слоя ${layerName}. Эта опция является устаревшей: ее использование предполагалось для поддержки показа данных поверх коммерческих базовых карт, но теперь этот функционал несёт встроенная поддержка сферической проекции Меркатора. Больше сведений доступно на http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Этот метод считается устаревшим и будет удалён в версии 3.0. Пожалуйста, пользуйтесь ${newMethod}.",
-
-    'boundsAddError': "Функции add надо передавать оба значения, x и y.",
-
-    'lonlatAddError': "Функции add надо передавать оба значения, lon и lat.",
-
-    'pixelAddError': "Функции add надо передавать оба значения, x и y.",
-
-    'unsupportedGeometryType': "Неподдерживаемый тип геометрии: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition failed: элемент с id ${elemId} может находиться не в нужном месте.",
-
-    'filterEvaluateNotImplemented': "evaluate не реализовано для фильтра данного типа."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/sk.js
+++ /dev/null
@@ -1,72 +1,1 @@
-/* Translators (2009 onwards):
- *  - Helix84
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["sk"]
- * Dictionary for Slovenčina.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["sk"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Neobslúžené požiadavky vracajú ${statusText}",
-
-    'permalink': "Trvalý odkaz",
-
-    'overlays': "Prekrytia",
-
-    'baseLayer': "Základná vrstva",
-
-    'sameProjection': "Prehľadová mapka funguje iba vtedy, keď je v rovnakej projekcii ako hlavná mapa",
-
-    'readNotImplemented': "Čítanie nie je implementované.",
-
-    'writeNotImplemented': "Zápis nie je implementovaný.",
-
-    'noFID': "Nie je možné aktualizovať vlastnosť, pre ktorú neexistuje FID.",
-
-    'errorLoadingGML': "Chyba pri načítaní súboru GML ${url}",
-
-    'browserNotSupported': "Váš prehliadač nepodporuje vykresľovanie vektorov. Momentálne podporované vykresľovače sú:\n${renderers}",
-
-    'componentShouldBe': "addFeatures: komponent by mal byť ${geomType}",
-
-    'getFeatureError': "getFeatureFromEvent bola zavolaná na vrstve bez vykresľovača. To zvyčajne znamená, že ste odstránili vrstvu, ale nie niektorú z obslúh, ktorá je s ňou asociovaná.",
-
-    'minZoomLevelError': "Vlastnosť minZoomLevel je určený iba na použitie s vrstvami odvodenými od FixedZoomLevels. To, že táto wfs vrstva kontroluje minZoomLevel je pozostatok z minulosti. Nemôžeme ho však odstrániť, aby sme sa vyhli možnému porušeniu aplikácií založených na Open Layers, ktoré na tomto môže závisieť. Preto ho označujeme ako zavrhovaný - dolu uvedená kontrola minZoomLevel bude odstránená vo verzii 3.0. Použite prosím namiesto toho kontrolu min./max. rozlíšenia podľa tu uvedeného popisu: http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "Transakcia WFS: ÚSPEŠNÁ ${response}",
-
-    'commitFailed': "Transakcia WFS: ZLYHALA ${response}",
-
-    'googleWarning': "Vrstvu Google nebolo možné správne načítať.\x3cbr\x3e\x3cbr\x3eAby ste sa tejto správy zbavili vyberte novú BaseLayer v prepínači vrstiev v pravom hornom rohu.\x3cbr\x3e\x3cbr\x3eToto sa stalo pravdepodobne preto, že skript knižnice Google Maps buď nebol načítaný alebo neobsahuje správny kľúč API pre vašu lokalitu.\x3cbr\x3e\x3cbr\x3eVývojári: Tu môžete získať \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3epomoc so sfunkčnením\x3c/a\x3e",
-
-    'getLayerWarning': "Vrstvu ${layerType} nebolo možné správne načítať.\x3cbr\x3e\x3cbr\x3eAby ste sa tejto správy zbavili vyberte novú BaseLayer v prepínači vrstiev v pravom hornom rohu.\x3cbr\x3e\x3cbr\x3eToto sa stalo pravdepodobne preto, že skript knižnice ${layerType} buď nebol načítaný alebo neobsahuje správny kľúč API pre vašu lokalitu.\x3cbr\x3e\x3cbr\x3eVývojári: Tu môžete získať \x3ca href=\'http://trac.openlayers.org/wiki/${layerType}\' target=\'_blank\'\x3epomoc so sfunkčnením\x3c/a\x3e",
-
-    'scale': "Mierka = 1 : ${scaleDenom}",
-
-    'layerAlreadyAdded': "Pokúsili ste sa do mapy pridať vrstvu ${layerName}, ale tá už bola pridaná",
-
-    'reprojectDeprecated': "Používate voľby „reproject“ vrstvy ${layerType}. Táto voľba je zzavrhovaná: jej použitie bolo navrhnuté na podporu zobrazovania údajov nad komerčnými základovými mapami, ale túto funkcionalitu je teraz možné dosiahnuť pomocou Spherical Mercator. Ďalšie informácie získate na stránke http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Táto metóda je zavrhovaná a bude odstránená vo verzii 3.0. Použite prosím namiesto nej metódu ${newMethod}.",
-
-    'boundsAddError': "Sčítacej funkcii musíte dať hodnoty x aj y.",
-
-    'lonlatAddError': "Sčítacej funkcii musíte dať hodnoty lon (zem. dĺžka) aj lat (zem. šírka).",
-
-    'pixelAddError': "Sčítacej funkcii musíte dať hodnoty x aj y.",
-
-    'unsupportedGeometryType': "Nepodporovaný typ geometrie: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition zlyhalo: prvok s id ${elemId} môže byť zle umiestnený.",
-
-    'filterEvaluateNotImplemented': "evaluate nie je implementovaný pre tento typ filtra"
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/sv-SE.js
+++ /dev/null
@@ -1,72 +1,1 @@
-/* Translators (2009 onwards):
- *  - Sannab
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["sv"]
- * Dictionary for Svenska.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["sv"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Ej hanterad fråga retur ${statusText}",
-
-    'permalink': "Permalänk",
-
-    'overlays': "Kartlager",
-
-    'baseLayer': "Bakgrundskarta",
-
-    'sameProjection': "Översiktskartan fungerar endast när den har samma projektion som huvudkartan",
-
-    'readNotImplemented': "Läsning ej implementerad.",
-
-    'writeNotImplemented': "Skrivning ej implementerad.",
-
-    'noFID': "Kan ej uppdatera feature (objekt) för vilket FID saknas.",
-
-    'errorLoadingGML': "Fel i laddning av GML-fil ${url}",
-
-    'browserNotSupported': "Din webbläsare stöder inte vektorvisning. För närvarande stöds följande visning:\n${renderers}",
-
-    'componentShouldBe': "addFeatures : komponenten skall vara en ${geomType}",
-
-    'getFeatureError': "getFeatureFromEvent anropad för lager utan utritning. Detta betyder oftast att man raderat ett lager, men inte en hanterare som är knuten till lagret.",
-
-    'minZoomLevelError': "Egenskapen minZoomLevel är endast avsedd att användas med lager med FixedZoomLevels. Att detta WFS-lager kontrollerar minZoomLevel är en relik från äldre versioner. Vi kan dock inte ta bort det utan att riskera att OL-baserade tillämpningar som använder detta slutar fungera. Därför är det satt som deprecated, minZoomLevel kommer att tas bort i version 3.0. Använd i stället inställning av min/max resolution som beskrivs här: http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "WFS-transaktion: LYCKADES ${response}",
-
-    'commitFailed': "WFS-transaktion: MISSLYCKADES ${response}",
-
-    'googleWarning': "Google-lagret kunde inte laddas korrekt.\x3cbr\x3e\x3cbr\x3eFör att slippa detta meddelande, välj en annan bakgrundskarta i lagerväljaren i övre högra hörnet.\x3cbr\x3e\x3cbr\x3eSannolikt beror felet på att Google Maps-biblioteket inte är inkluderat på webbsidan eller på att sidan inte anger korrekt API-nyckel för webbplatsen.\x3cbr\x3e\x3cbr\x3eUtvecklare: hjälp för att åtgärda detta, \x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eklicka här\x3c/a\x3e.",
-
-    'getLayerWarning': "${layerType}-lagret kunde inte laddas korrekt.\x3cbr\x3e\x3cbr\x3eFör att slippa detta meddelande, välj en annan bakgrundskarta i lagerväljaren i övre högra hörnet.\x3cbr\x3e\x3cbr\x3eSannolikt beror felet på att ${layerLib}-biblioteket inte är inkluderat på webbsidan.\x3cbr\x3e\x3cbr\x3eUtvecklare: hjälp för att åtgärda detta, \x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eklicka här\x3c/a\x3e.",
-
-    'scale': "\x3cstrong\x3eSkala\x3c/strong\x3e 1 : ${scaleDenom}",
-
-    'layerAlreadyAdded': "Du försökte lägga till lagret: ${layerName} på kartan, men det har lagts till tidigare",
-
-    'reprojectDeprecated': "Du använder inställningen \'reproject\' på lagret ${layerName}. Denna inställning markerad som deprecated: den var avsedd att användas för att stödja visning av kartdata på kommersiella bakgrundskartor, men nu bör man i stället använda Spherical Mercator-stöd för den funktionaliteten. Mer information finns på http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    'methodDeprecated': "Denna metod är markerad som deprecated och kommer att tas bort i 3.0. Använd ${newMethod} i stället.",
-
-    'boundsAddError': "Du måste skicka både x- och y-värde till funktionen add.",
-
-    'lonlatAddError': "Du måste skicka både lon- och lat-värde till funktionen add.",
-
-    'pixelAddError': "Du måste skicka både x- och y-värde till funktionen add.",
-
-    'unsupportedGeometryType': "Stöd saknas för geometritypen: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition misslyckades: elementet med id ${elemId} kan placeras fel.",
-
-    'filterEvaluateNotImplemented': "evaluering har ej implementerats för denna typ av filter."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/te.js
+++ /dev/null
@@ -1,28 +1,1 @@
-/* Translators (2009 onwards):
- *  - Veeven
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["te"]
- * Dictionary for తెలుగు.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["te"] = OpenLayers.Util.applyDefaults({
-
-    'permalink': "స్థిరలింకు",
-
-    'W': "ప",
-
-    'E': "తూ",
-
-    'N': "ఉ",
-
-    'S': "ద"
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/vi.js
+++ /dev/null
@@ -1,80 +1,1 @@
-/* Translators (2009 onwards):
- *  - Minh Nguyen
- */
 
-/**
- * @requires OpenLayers/Lang.js
- */
-
-/**
- * Namespace: OpenLayers.Lang["vi"]
- * Dictionary for Tiếng Việt.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["vi"] = OpenLayers.Util.applyDefaults({
-
-    'unhandledRequest': "Không xử lý được phản hồi ${statusText} cho yêu cầu",
-
-    'permalink': "Liên kết thường trực",
-
-    'overlays': "Lấp bản đồ",
-
-    'baseLayer': "Lớp nền",
-
-    'sameProjection': "Bản đồ toàn cảnh chỉ hoạt động khi cùng phép chiếu với bản đồ chính",
-
-    'readNotImplemented': "Chưa hỗ trợ chức năng đọc.",
-
-    'writeNotImplemented': "Chưa hỗ trợ chức năng viết.",
-
-    'noFID': "Không thể cập nhật tính năng thiếu FID.",
-
-    'errorLoadingGML': "Lỗi tải tập tin GML tại ${url}",
-
-    'browserNotSupported': "Trình duyệt của bạn không hỗ trợ chức năng vẽ bằng vectơ. Hiện hỗ trợ các bộ kết xuất:\n${renderers}",
-
-    'componentShouldBe': "addFeatures: bộ phận cần phải là ${geomType}",
-
-    'getFeatureError': "getFeatureFromEvent được gọi từ lớp không có bộ kết xuất. Thường thì có lẽ lớp bị xóa nhưng một phần xử lý của nó vẫn còn.",
-
-    'minZoomLevelError': "Chỉ nên sử dụng thuộc tính minZoomLevel với các lớp FixedZoomLevels-descendent. Việc lớp wfs này tìm cho minZoomLevel là di tích còn lại từ xưa. Tuy nhiên, nếu chúng tôi dời nó thì sẽ vỡ các chương trình OpenLayers mà dựa trên nó. Bởi vậy chúng tôi phản đối sử dụng nó\x26nbsp;– bước tìm cho minZoomLevel sẽ được dời vào phiên bản 3.0. Xin sử dụng thiết lập độ phân tích tối thiểu / tối đa thay thế, theo hướng dẫn này: http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "Giao dịch WFS: THÀNH CÔNG ${response}",
-
-    'commitFailed': "Giao dịch WFS: THẤT BẠI ${response}",
-
-    'googleWarning': "Không thể tải lớp Google đúng đắn.\x3cbr\x3e\x3cbr\x3eĐể tránh thông báo này lần sau, hãy chọn BaseLayer mới dùng điều khiển chọn lớp ở góc trên phải.\x3cbr\x3e\x3cbr\x3eChắc script thư viện Google Maps hoặc không được bao gồm hoặc không chứa khóa API hợp với website của bạn.\x3cbr\x3e\x3cbr\x3e\x3ca href=\'http://trac.openlayers.org/wiki/Google\' target=\'_blank\'\x3eTrợ giúp về tính năng này\x3c/a\x3e cho người phát triển.",
-
-    'getLayerWarning': "Không thể tải lớp ${layerType} đúng đắn.\x3cbr\x3e\x3cbr\x3eĐể tránh thông báo này lần sau, hãy chọn BaseLayer mới dùng điều khiển chọn lớp ở góc trên phải.\x3cbr\x3e\x3cbr\x3eChắc script thư viện ${layerLib} không được bao gồm đúng kiểu.\x3cbr\x3e\x3cbr\x3e\x3ca href=\'http://trac.openlayers.org/wiki/${layerLib}\' target=\'_blank\'\x3eTrợ giúp về tính năng này\x3c/a\x3e cho người phát triển.",
-
-    'scale': "Tỷ lệ = 1 : ${scaleDenom}",
-
-    'W': "T",
-
-    'E': "Đ",
-
-    'N': "B",
-
-    'S': "N",
-
-    'layerAlreadyAdded': "Bạn muốn thêm lớp ${layerName} vào bản đồ, nhưng lớp này đã được thêm",
-
-    'reprojectDeprecated': "Bạn đang áp dụng chế độ “reproject” vào lớp ${layerName}. Chế độ này đã bị phản đối: nó có mục đích hỗ trợ lấp dữ liệu trên các nền bản đồ thương mại; nên thực hiện hiệu ứng đó dùng tính năng Mercator Hình cầu. Có sẵn thêm chi tiết tại http://trac.openlayers.org/wiki/SphericalMercator .",
-
-    'methodDeprecated': "Phương thức này đã bị phản đối và sẽ bị dời vào phiên bản 3.0. Xin hãy sử dụng ${newMethod} thay thế.",
-
-    'boundsAddError': "Cần phải cho cả giá trị x và y vào hàm add.",
-
-    'lonlatAddError': "Cần phải cho cả giá trị lon và lat vào hàm add.",
-
-    'pixelAddError': "Cần phải cho cả giá trị x và y vào hàm add.",
-
-    'unsupportedGeometryType': "Không hỗ trợ kiểu địa lý: ${geomType}",
-
-    'pagePositionFailed': "OpenLayers.Util.pagePosition bị thất bại: nguyên tố với ID ${elemId} có thể ở chỗ sai.",
-
-    'filterEvaluateNotImplemented': "chưa hỗ trợ evaluate cho loại bộ lọc này."
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Lang/zh-CN.js
+++ /dev/null
@@ -1,117 +1,1 @@
-/**
- * @requires OpenLayers/Lang.js
- */
 
-/**
- * Namespace: OpenLayers.Lang["zh-CN"]
- * Dictionary for Simplified Chinese.  Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["zh-CN"] = {
-
-    'unhandledRequest': "未处理的请求,返回值为 ${statusText}",
-
-    'permalink': "永久链接",
-
-    'overlays': "叠加层",
-
-    'baseLayer': "基础图层",
-
-    'sameProjection':
-        "鹰眼地图只有在和主地图使用相同的投影的时候才能正常共工作",
-
-    'readNotImplemented': "读取功能没有实现。",
-
-    'writeNotImplemented': "写入功能没有实现。",
-
-    'noFID': "无法更新feature,缺少FID。",
-
-    'errorLoadingGML': "加载GML文件 ${url} 出现错误。",
-
-    'browserNotSupported':
-        "你使用的浏览器不支持矢量渲染。当前支持的渲染方式包括:\n${renderers}",
-
-    'componentShouldBe': "addFeatures : 组件类型应该是 ${geomType}",
-
-    // console message
-    'getFeatureError':
-        "getFeatureFromEvent方法在一个没有渲染器的图层上被调用。 这通常意味着您" +
-        "销毁了一个图层,但并未销毁其关联的handler。",
-
-    // console message
-    'minZoomLevelError':
-        "minZoomLevel属性仅适合用于" +
-        "使用了固定缩放级别的图层。这个 " +
-        "wfs 图层检查 minZoomLevel 是过去遗留下来的。" +
-        "然而,我们不能移除它," +
-        "而破坏依赖于它的基于OL的应用程序。" +
-        "因此,我们废除了它 -- minZoomLevel " +
-        "将会在3.0中被移除。请改用 " +
-        "min/max resolution 设置,参考:" +
-        "http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "WFS Transaction: 成功。 ${response}",
-
-    'commitFailed': "WFS Transaction: 失败。 ${response}",
-
-    'googleWarning':
-        "Google图层不能正确加载。<br><br>" +
-        "要消除这个信息,请在右上角的" +
-        "图层控制面板中选择其他的基础图层。<br><br>" +
-        "这种情况很可能是没有正确的包含Google地图脚本库," +
-        "或者是没有包含在你的站点上" +
-        "使用的正确的Google Maps API密匙。<br><br>" +
-        "开发者:获取使其正确工作的帮助信息," +
-        "<a href='http://trac.openlayers.org/wiki/Google' " +
-        "target='_blank'>点击这里</a>",
-
-    'getLayerWarning':
-        "${layerType} 图层不能正确加载。<br><br>" +
-        "要消除这个信息,请在右上角的" +
-        "图层控制面板中选择其他的基础图层。<br><br>" +
-        "这种情况很可能是没有正确的包含" +
-        "${layerLib} 脚本库。<br><br>" +
-        "开发者:获取使其正确工作的帮助信息," +
-        "<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
-        "target='_blank'>点击这里</a>",
-
-    'scale': "比例尺 = 1 : ${scaleDenom}",
-
-    // console message
-    'layerAlreadyAdded':
-        "你尝试添加图层: ${layerName} 到地图中,但是它之前就已经被添加。",
-
-    // console message
-    'reprojectDeprecated':
-        "你正在使用 ${layerName} 图层上的'reproject'选项。" +
-        "这个选项已经不再使用:" +
-        "它是被设计用来支持显示商业的地图数据," + 
-        "不过现在该功能可以通过使用Spherical Mercator来实现。" +
-        "更多信息可以参阅" +
-        "http://trac.openlayers.org/wiki/SphericalMercator.",
-
-    // console message
-    'methodDeprecated':
-        "该方法已经不再被支持,并且将在3.0中被移除。" +
-        "请使用 ${newMethod} 方法来替代。",
-
-    // console message
-    'boundsAddError': "您必须传递 x 和 y 两个参数值到 add 方法。",
-
-    // console message
-    'lonlatAddError': "您必须传递 lon 和 lat 两个参数值到 add 方法。",
-
-    // console message
-    'pixelAddError': "您必须传递 x and y 两个参数值到 add 方法。",
-
-    // console message
-    'unsupportedGeometryType': "不支持的几何体类型: ${geomType}",
-
-    // console message
-    'pagePositionFailed':
-        "OpenLayers.Util.pagePosition 失败:id 为 ${elemId} 的元素可能被错置。",
-                    
-    'end': ''
-};
-

--- a/labs/openlayers/lib/OpenLayers/Lang/zh-TW.js
+++ /dev/null
@@ -1,118 +1,1 @@
-/**
- * @requires OpenLayers/Lang.js
- */
 
-/**
- * Namespace: OpenLayers.Lang["zh-TW"]
- * Dictionary for Traditional Chinese. (Used Mainly in Taiwan) 
- * Keys for entries are used in calls to
- *     <OpenLayers.Lang.translate>.  Entry bodies are normal strings or
- *     strings formatted for use with <OpenLayers.String.format> calls.
- */
-OpenLayers.Lang["zh-TW"] = {
-
-    'unhandledRequest': "未處理的請求,傳回值為 ${statusText}。",
-
-    'permalink': "永久連結",
-
-    'overlays': "額外圖層",
-
-    'baseLayer': "基礎圖層",
-
-    'sameProjection':
-        "地圖縮覽(OverviewMap)只能在跟主地圖相同投影時起作用。",
-
-    'readNotImplemented': "沒有實作讀取的功能。",
-
-    'writeNotImplemented': "沒有實作寫入的功能。",
-
-    'noFID': "因為沒有 FID 所以無法更新 feature。",
-
-    'errorLoadingGML': "讀取GML檔案 ${url} 錯誤。",
-
-    'browserNotSupported':
-        "您的瀏覽器未支援向量渲染. 目前支援的渲染方式是:\n${renderers}",
-
-    'componentShouldBe': "addFeatures : 元件應該為 ${geomType}",
-
-    // console message
-    'getFeatureError':
-        "getFeatureFromEvent 在一個沒有被渲染的圖層裡被呼叫。這通常意味著您 " +
-        "摧毀了一個圖層,但並未摧毀相關的handler。",
-
-    // console message
-    'minZoomLevelError':
-        "minZoomLevel 屬性僅適合用在 " +
-        "FixedZoomLevels-descendent 類型的圖層. 這個" +
-        "wfs layer 的 minZoomLevel 是過去所遺留下來的," +
-        "然而我們不能移除它而不讓它將" +
-        "過去的程式相容性給破壞掉。" +
-        "因此我們將會迴避使用它 -- minZoomLevel " +
-        "會在3.0被移除,請改" +
-        "用在這邊描述的 min/max resolution 設定: " +
-        "http://trac.openlayers.org/wiki/SettingZoomLevels",
-
-    'commitSuccess': "WFS Transaction: 成功 ${response}",
-
-    'commitFailed': "WFS Transaction: 失敗 ${response}",
-
-    'googleWarning':
-        "The Google Layer 圖層無法被正確的載入。<br><br>" +
-        "要迴避這個訊息, 請在右上角的圖層改變器裡," +
-        "選一個新的基礎圖層。<br><br>" +
-        "很有可能是因為 Google Maps 的函式庫" +
-        "腳本沒有被正確的置入,或沒有包含 " +
-        "您網站上正確的 API key <br><br>" +
-        "開發者: 要幫助這個行為正確完成," +
-        "<a href='http://trac.openlayers.org/wiki/Google' " +
-        "target='_blank'>請按這裡</a>",
-
-    'getLayerWarning':
-        "${layerType} 圖層無法被正確的載入。<br><br>" +
-        "要迴避這個訊息, 請在右上角的圖層改變器裡," +
-        "選一個新的基礎圖層。<br><br>" +
-        "很有可能是因為 ${layerLib} 的函式庫" +
-        "腳本沒有被正確的置入。<br><br>" +
-        "開發者: 要幫助這個行為正確完成," +
-        "<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
-        "target='_blank'>請按這裡</a>",
-
-    'scale': "Scale = 1 : ${scaleDenom}",
-
-    // console message
-    'layerAlreadyAdded':
-        "你試著新增圖層: ${layerName} 到地圖上,但圖層之前就已經被新增了。",
-
-    // console message
-    'reprojectDeprecated':
-        "你正使用 'reproject' 這個選項 " +
-        "在 ${layerName} 層。這個選項已經不再使用:" +
-        "它的使用原本是設計用來支援在商業地圖上秀出資料," + 
-        "但這個功能已經被" +
-        "Spherical Mercator所取代。更多的資訊可以在 " +
-        "http://trac.openlayers.org/wiki/SphericalMercator 找到。",
-
-    // console message
-    'methodDeprecated':
-        "這個方法已經不再使用且在3.0將會被移除," +
-        "請使用 ${newMethod} 來代替。",
-
-    // console message
-    'boundsAddError': "您必須傳入 x 跟 y 兩者的值進 add 函數。",
-
-    // console message
-    'lonlatAddError': "您必須傳入 lon 跟 lat 兩者的值進 add 函數。",
-
-    // console message
-    'pixelAddError': "您必須傳入 x 跟 y 兩者的值進 add 函數。",
-
-    // console message
-    'unsupportedGeometryType': "未支援的幾何型別: ${geomType}。",
-
-    // console message
-    'pagePositionFailed':
-        "OpenLayers.Util.pagePosition 失敗: id ${elemId} 的 element 可能被錯置。",
-                    
-    'end': ''
-};
-

--- a/labs/openlayers/lib/OpenLayers/Layer.js
+++ /dev/null
@@ -1,1305 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Map.js
- * @requires OpenLayers/Projection.js
- */
-
-/**
- * Class: OpenLayers.Layer
- */
-OpenLayers.Layer = OpenLayers.Class({
-
-    /**
-     * APIProperty: id
-     * {String}
-     */
-    id: null,
-
-    /** 
-     * APIProperty: name
-     * {String}
-     */
-    name: null,
-
-    /** 
-     * APIProperty: div
-     * {DOMElement}
-     */
-    div: null,
-
-    /**
-     * Property: opacity
-     * {Float} The layer's opacity. Float number between 0.0 and 1.0.
-     */
-    opacity: null,
-
-    /**
-     * APIProperty: alwaysInRange
-     * {Boolean} If a layer's display should not be scale-based, this should 
-     *     be set to true. This will cause the layer, as an overlay, to always 
-     *     be 'active', by always returning true from the calculateInRange() 
-     *     function. 
-     * 
-     *     If not explicitly specified for a layer, its value will be 
-     *     determined on startup in initResolutions() based on whether or not 
-     *     any scale-specific properties have been set as options on the 
-     *     layer. If no scale-specific options have been set on the layer, we 
-     *     assume that it should always be in range.
-     * 
-     *     See #987 for more info.
-     */
-    alwaysInRange: null,   
-
-    /**
-     * Constant: EVENT_TYPES
-     * {Array(String)} Supported application event types.  Register a listener
-     *     for a particular event with the following syntax:
-     * (code)
-     * layer.events.register(type, obj, listener);
-     * (end)
-     *
-     * Listeners will be called with a reference to an event object.  The
-     *     properties of this event depends on exactly what happened.
-     *
-     * All event objects have at least the following properties:
-     * object - {Object} A reference to layer.events.object.
-     * element - {DOMElement} A reference to layer.events.element.
-     *
-     * Supported map event types:
-     * loadstart - Triggered when layer loading starts.
-     * loadend - Triggered when layer loading ends.
-     * loadcancel - Triggered when layer loading is canceled.
-     * visibilitychanged - Triggered when layer visibility is changed.
-     * move - Triggered when layer moves (triggered with every mousemove
-     *     during a drag).
-     * moveend - Triggered when layer is done moving, object passed as
-     *     argument has a zoomChanged boolean property which tells that the
-     *     zoom has changed.
-     */
-    EVENT_TYPES: ["loadstart", "loadend", "loadcancel", "visibilitychanged",
-                  "move", "moveend"],
-
-    /**
-     * Constant: RESOLUTION_PROPERTIES
-     * {Array} The properties that are used for calculating resolutions
-     *     information.
-     */
-    RESOLUTION_PROPERTIES: [
-        'scales', 'resolutions',
-        'maxScale', 'minScale',
-        'maxResolution', 'minResolution',
-        'numZoomLevels', 'maxZoomLevel'
-    ],
-
-    /**
-     * APIProperty: events
-     * {<OpenLayers.Events>}
-     */
-    events: null,
-
-    /**
-     * APIProperty: map
-     * {<OpenLayers.Map>} This variable is set when the layer is added to 
-     *     the map, via the accessor function setMap().
-     */
-    map: null,
-    
-    /**
-     * APIProperty: isBaseLayer
-     * {Boolean} Whether or not the layer is a base layer. This should be set 
-     *     individually by all subclasses. Default is false
-     */
-    isBaseLayer: false,
- 
-    /**
-     * Property: alpha
-     * {Boolean} The layer's images have an alpha channel.  Default is false. 
-     */
-    alpha: false,
-
-    /** 
-     * APIProperty: displayInLayerSwitcher
-     * {Boolean} Display the layer's name in the layer switcher.  Default is
-     *     true.
-     */
-    displayInLayerSwitcher: true,
-
-    /**
-     * APIProperty: visibility
-     * {Boolean} The layer should be displayed in the map.  Default is true.
-     */
-    visibility: true,
-
-    /**
-     * APIProperty: attribution
-     * {String} Attribution string, displayed when an 
-     *     <OpenLayers.Control.Attribution> has been added to the map.
-     */
-    attribution: null, 
-
-    /** 
-     * Property: inRange
-     * {Boolean} The current map resolution is within the layer's min/max 
-     *     range. This is set in <OpenLayers.Map.setCenter> whenever the zoom 
-     *     changes.
-     */
-    inRange: false,
-    
-    /**
-     * Propery: imageSize
-     * {<OpenLayers.Size>} For layers with a gutter, the image is larger than 
-     *     the tile by twice the gutter in each dimension.
-     */
-    imageSize: null,
-    
-    /**
-     * Property: imageOffset
-     * {<OpenLayers.Pixel>} For layers with a gutter, the image offset 
-     *     represents displacement due to the gutter.
-     */
-    imageOffset: null,
-
-  // OPTIONS
-
-    /** 
-     * Property: options
-     * {Object} An optional object whose properties will be set on the layer.
-     *     Any of the layer properties can be set as a property of the options
-     *     object and sent to the constructor when the layer is created.
-     */
-    options: null,
-
-    /**
-     * APIProperty: eventListeners
-     * {Object} If set as an option at construction, the eventListeners
-     *     object will be registered with <OpenLayers.Events.on>.  Object
-     *     structure must be a listeners object as shown in the example for
-     *     the events.on method.
-     */
-    eventListeners: null,
-
-    /**
-     * APIProperty: gutter
-     * {Integer} Determines the width (in pixels) of the gutter around image
-     *     tiles to ignore.  By setting this property to a non-zero value,
-     *     images will be requested that are wider and taller than the tile
-     *     size by a value of 2 x gutter.  This allows artifacts of rendering
-     *     at tile edges to be ignored.  Set a gutter value that is equal to
-     *     half the size of the widest symbol that needs to be displayed.
-     *     Defaults to zero.  Non-tiled layers always have zero gutter.
-     */ 
-    gutter: 0, 
-
-    /**
-     * APIProperty: projection
-     * {<OpenLayers.Projection>} or {<String>} Set in the layer options to
-     *     override the default projection string this layer - also set maxExtent,
-     *     maxResolution, and units if appropriate. Can be either a string or
-     *     an <OpenLayers.Projection> object when created -- will be converted
-     *     to an object when setMap is called if a string is passed.  
-     */
-    projection: null,    
-    
-    /**
-     * APIProperty: units
-     * {String} The layer map units.  Defaults to 'degrees'.  Possible values
-     *     are 'degrees' (or 'dd'), 'm', 'ft', 'km', 'mi', 'inches'.
-     */
-    units: null,
-
-    /**
-     * APIProperty: scales
-     * {Array}  An array of map scales in descending order.  The values in the
-     *     array correspond to the map scale denominator.  Note that these
-     *     values only make sense if the display (monitor) resolution of the
-     *     client is correctly guessed by whomever is configuring the
-     *     application.  In addition, the units property must also be set.
-     *     Use <resolutions> instead wherever possible.
-     */
-    scales: null,
-
-    /**
-     * APIProperty: resolutions
-     * {Array} A list of map resolutions (map units per pixel) in descending
-     *     order.  If this is not set in the layer constructor, it will be set
-     *     based on other resolution related properties (maxExtent,
-     *     maxResolution, maxScale, etc.).
-     */
-    resolutions: null,
-    
-    /**
-     * APIProperty: maxExtent
-     * {<OpenLayers.Bounds>}  The center of these bounds will not stray outside
-     *     of the viewport extent during panning.  In addition, if
-     *     <displayOutsideMaxExtent> is set to false, data will not be
-     *     requested that falls completely outside of these bounds.
-     */
-    maxExtent: null,
-    
-    /**
-     * APIProperty: minExtent
-     * {<OpenLayers.Bounds>}
-     */
-    minExtent: null,
-    
-    /**
-     * APIProperty: maxResolution
-     * {Float} Default max is 360 deg / 256 px, which corresponds to
-     *     zoom level 0 on gmaps.  Specify a different value in the layer 
-     *     options if you are not using a geographic projection and 
-     *     displaying the whole world.
-     */
-    maxResolution: null,
-
-    /**
-     * APIProperty: minResolution
-     * {Float}
-     */
-    minResolution: null,
-
-    /**
-     * APIProperty: numZoomLevels
-     * {Integer}
-     */
-    numZoomLevels: null,
-   
-    /**
-     * APIProperty: minScale
-     * {Float}
-     */
-    minScale: null,
-    
-    /**
-     * APIProperty: maxScale
-     * {Float}
-     */
-    maxScale: null,
-
-    /**
-     * APIProperty: displayOutsideMaxExtent
-     * {Boolean} Request map tiles that are completely outside of the max 
-     *     extent for this layer. Defaults to false.
-     */
-    displayOutsideMaxExtent: false,
-
-    /**
-     * APIProperty: wrapDateLine
-     * {Boolean} #487 for more info.   
-     */
-    wrapDateLine: false,
-    
-    /**
-     * APIProperty: transitionEffect
-     * {String} The transition effect to use when the map is panned or
-     *     zoomed.  
-     *
-     * There are currently two supported values:
-     *  - *null* No transition effect (the default).
-     *  - *resize*  Existing tiles are resized on zoom to provide a visual
-     *    effect of the zoom having taken place immediately.  As the
-     *    new tiles become available, they are drawn over top of the
-     *    resized tiles.
-     */
-    transitionEffect: null,
-    
-    /**
-     * Property: SUPPORTED_TRANSITIONS
-     * {Array} An immutable (that means don't change it!) list of supported 
-     *     transitionEffect values.
-     */
-    SUPPORTED_TRANSITIONS: ['resize'],
-
-    /**
-     * Property: metadata
-     * {Object} This object can be used to store additional information on a
-     *     layer object.
-     */
-    metadata: {},
-    
-    /**
-     * Constructor: OpenLayers.Layer
-     *
-     * Parameters:
-     * name - {String} The layer name
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, options) {
-
-        this.addOptions(options);
-
-        this.name = name;
-        
-        if (this.id == null) {
-
-            this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
-
-            this.div = OpenLayers.Util.createDiv(this.id);
-            this.div.style.width = "100%";
-            this.div.style.height = "100%";
-            this.div.dir = "ltr";
-
-            this.events = new OpenLayers.Events(this, this.div, 
-                                                this.EVENT_TYPES);
-            if(this.eventListeners instanceof Object) {
-                this.events.on(this.eventListeners);
-            }
-
-        }
-
-        if (this.wrapDateLine) {
-            this.displayOutsideMaxExtent = true;
-        }
-    },
-    
-    /**
-     * Method: destroy
-     * Destroy is a destructor: this is to alleviate cyclic references which
-     *     the Javascript garbage cleaner can not take care of on its own.
-     *
-     * Parameters:
-     * setNewBaseLayer - {Boolean} Set a new base layer when this layer has
-     *     been destroyed.  Default is true.
-     */
-    destroy: function(setNewBaseLayer) {
-        if (setNewBaseLayer == null) {
-            setNewBaseLayer = true;
-        }
-        if (this.map != null) {
-            this.map.removeLayer(this, setNewBaseLayer);
-        }
-        this.projection = null;
-        this.map = null;
-        this.name = null;
-        this.div = null;
-        this.options = null;
-
-        if (this.events) {
-            if(this.eventListeners) {
-                this.events.un(this.eventListeners);
-            }
-            this.events.destroy();
-        }
-        this.eventListeners = null;
-        this.events = null;
-    },
-    
-   /**
-    * Method: clone
-    *
-    * Parameters:
-    * obj - {<OpenLayers.Layer>} The layer to be cloned
-    *
-    * Returns:
-    * {<OpenLayers.Layer>} An exact clone of this <OpenLayers.Layer>
-    */
-    clone: function (obj) {
-        
-        if (obj == null) {
-            obj = new OpenLayers.Layer(this.name, this.getOptions());
-        }
-        
-        // catch any randomly tagged-on properties
-        OpenLayers.Util.applyDefaults(obj, this);
-        
-        // a cloned layer should never have its map property set
-        //  because it has not been added to a map yet. 
-        obj.map = null;
-        
-        return obj;
-    },
-    
-    /**
-     * Method: getOptions
-     * Extracts an object from the layer with the properties that were set as
-     *     options, but updates them with the values currently set on the
-     *     instance.
-     * 
-     * Returns:
-     * {Object} the <options> of the layer, representing the current state.
-     */
-    getOptions: function() {
-        var options = {};
-        for(var o in this.options) {
-            options[o] = this[o];
-        }
-        return options;
-    },
-    
-    /** 
-     * APIMethod: setName
-     * Sets the new layer name for this layer.  Can trigger a changelayer event
-     *     on the map.
-     *
-     * Parameters:
-     * newName - {String} The new name.
-     */
-    setName: function(newName) {
-        if (newName != this.name) {
-            this.name = newName;
-            if (this.map != null) {
-                this.map.events.triggerEvent("changelayer", {
-                    layer: this,
-                    property: "name"
-                });
-            }
-        }
-    },    
-    
-   /**
-    * APIMethod: addOptions
-    * 
-    * Parameters:
-    * newOptions - {Object}
-    */
-    addOptions: function (newOptions) {
-
-        if (this.options == null) {
-            this.options = {};
-        }
-
-        // update our copy for clone
-        OpenLayers.Util.extend(this.options, newOptions);
-
-        // add new options to this
-        OpenLayers.Util.extend(this, newOptions);
-
-        // make sure this.projection references a projection object
-        if(typeof this.projection == "string") {
-            this.projection = new OpenLayers.Projection(this.projection);
-        }
-
-        // get the units from the projection, if we have a projection
-        // and it it has units
-        if(this.projection && this.projection.getUnits()) {
-            this.units = this.projection.getUnits();
-        }
-
-        // re-initialize resolutions if necessary, i.e. if any of the
-        // properties of the "properties" array defined below is set
-        // in the new options
-        if(this.map) {
-            var properties = this.RESOLUTION_PROPERTIES.concat(
-                ["projection", "units", "minExtent", "maxExtent"]
-            );
-            for(var o in newOptions) {
-                if(newOptions.hasOwnProperty(o) &&
-                   OpenLayers.Util.indexOf(properties, o) >= 0) {
-
-                    this.initResolutions();
-                    break;
-                }
-            }
-        }
-    },
-
-    /**
-     * APIMethod: onMapResize
-     * This function can be implemented by subclasses
-     */
-    onMapResize: function() {
-        //this function can be implemented by subclasses  
-    },
-
-    /**
-     * APIMethod: redraw
-     * Redraws the layer.  Returns true if the layer was redrawn, false if not.
-     *
-     * Returns:
-     * {Boolean} The layer was redrawn.
-     */
-    redraw: function() {
-        var redrawn = false;
-        if (this.map) {
-
-            // min/max Range may have changed
-            this.inRange = this.calculateInRange();
-
-            // map's center might not yet be set
-            var extent = this.getExtent();
-
-            if (extent && this.inRange && this.visibility) {
-                var zoomChanged = true;
-                this.moveTo(extent, zoomChanged, false);
-                this.events.triggerEvent("moveend",
-                    {"zoomChanged": zoomChanged});
-                redrawn = true;
-            }
-        }
-        return redrawn;
-    },
-
-    /**
-     * Method: moveTo
-     * 
-     * Parameters:
-     * bound - {<OpenLayers.Bounds>}
-     * zoomChanged - {Boolean} Tells when zoom has changed, as layers have to
-     *     do some init work in that case.
-     * dragging - {Boolean}
-     */
-    moveTo:function(bounds, zoomChanged, dragging) {
-        var display = this.visibility;
-        if (!this.isBaseLayer) {
-            display = display && this.inRange;
-        }
-        this.display(display);
-    },
-
-    /**
-     * Method: setMap
-     * Set the map property for the layer. This is done through an accessor
-     *     so that subclasses can override this and take special action once 
-     *     they have their map variable set. 
-     * 
-     *     Here we take care to bring over any of the necessary default 
-     *     properties from the map. 
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>}
-     */
-    setMap: function(map) {
-        if (this.map == null) {
-        
-            this.map = map;
-            
-            // grab some essential layer data from the map if it hasn't already
-            //  been set
-            this.maxExtent = this.maxExtent || this.map.maxExtent;
-            this.minExtent = this.minExtent || this.map.minExtent;
-
-            this.projection = this.projection || this.map.projection;
-            if (typeof this.projection == "string") {
-                this.projection = new OpenLayers.Projection(this.projection);
-            }
-
-            // Check the projection to see if we can get units -- if not, refer
-            // to properties.
-            this.units = this.projection.getUnits() ||
-                         this.units || this.map.units;
-            
-            this.initResolutions();
-            
-            if (!this.isBaseLayer) {
-                this.inRange = this.calculateInRange();
-                var show = ((this.visibility) && (this.inRange));
-                this.div.style.display = show ? "" : "none";
-            }
-            
-            // deal with gutters
-            this.setTileSize();
-        }
-    },
-    
-    /**
-     * Method: afterAdd
-     * Called at the end of the map.addLayer sequence.  At this point, the map
-     *     will have a base layer.  To be overridden by subclasses.
-     */
-    afterAdd: function() {
-    },
-    
-    /**
-     * APIMethod: removeMap
-     * Just as setMap() allows each layer the possibility to take a 
-     *     personalized action on being added to the map, removeMap() allows
-     *     each layer to take a personalized action on being removed from it. 
-     *     For now, this will be mostly unused, except for the EventPane layer,
-     *     which needs this hook so that it can remove the special invisible
-     *     pane. 
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>}
-     */
-    removeMap: function(map) {
-        //to be overridden by subclasses
-    },
-    
-    /**
-     * APIMethod: getImageSize
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} optional tile bounds, can be used
-     *     by subclasses that have to deal with different tile sizes at the
-     *     layer extent edges (e.g. Zoomify)
-     * 
-     * Returns:
-     * {<OpenLayers.Size>} The size that the image should be, taking into 
-     *     account gutters.
-     */ 
-    getImageSize: function(bounds) { 
-        return (this.imageSize || this.tileSize); 
-    },    
-  
-    /**
-     * APIMethod: setTileSize
-     * Set the tile size based on the map size.  This also sets layer.imageSize
-     *     and layer.imageOffset for use by Tile.Image.
-     * 
-     * Parameters:
-     * size - {<OpenLayers.Size>}
-     */
-    setTileSize: function(size) {
-        var tileSize = (size) ? size :
-                                ((this.tileSize) ? this.tileSize :
-                                                   this.map.getTileSize());
-        this.tileSize = tileSize;
-        if(this.gutter) {
-          // layers with gutters need non-null tile sizes
-          //if(tileSize == null) {
-          //    OpenLayers.console.error("Error in layer.setMap() for " +
-          //                              this.name + ": layers with " +
-          //                              "gutters need non-null tile sizes");
-          //}
-            this.imageOffset = new OpenLayers.Pixel(-this.gutter, 
-                                                    -this.gutter); 
-            this.imageSize = new OpenLayers.Size(tileSize.w + (2*this.gutter), 
-                                                 tileSize.h + (2*this.gutter)); 
-        }
-    },
-
-    /**
-     * APIMethod: getVisibility
-     * 
-     * Returns:
-     * {Boolean} The layer should be displayed (if in range).
-     */
-    getVisibility: function() {
-        return this.visibility;
-    },
-
-    /** 
-     * APIMethod: setVisibility
-     * Set the visibility flag for the layer and hide/show & redraw 
-     *     accordingly. Fire event unless otherwise specified
-     * 
-     * Note that visibility is no longer simply whether or not the layer's
-     *     style.display is set to "block". Now we store a 'visibility' state 
-     *     property on the layer class, this allows us to remember whether or 
-     *     not we *desire* for a layer to be visible. In the case where the 
-     *     map's resolution is out of the layer's range, this desire may be 
-     *     subverted.
-     * 
-     * Parameters:
-     * visible - {Boolean} Whether or not to display the layer (if in range)
-     */
-    setVisibility: function(visibility) {
-        if (visibility != this.visibility) {
-            this.visibility = visibility;
-            this.display(visibility);
-            this.redraw();
-            if (this.map != null) {
-                this.map.events.triggerEvent("changelayer", {
-                    layer: this,
-                    property: "visibility"
-                });
-            }
-            this.events.triggerEvent("visibilitychanged");
-        }
-    },
-
-    /** 
-     * APIMethod: display
-     * Hide or show the Layer
-     * 
-     * Parameters:
-     * display - {Boolean}
-     */
-    display: function(display) {
-        if (display != (this.div.style.display != "none")) {
-            this.div.style.display = (display && this.calculateInRange()) ? "block" : "none";
-        }
-    },
-
-    /**
-     * APIMethod: calculateInRange
-     * 
-     * Returns:
-     * {Boolean} The layer is displayable at the current map's current
-     *     resolution. Note that if 'alwaysInRange' is true for the layer, 
-     *     this function will always return true.
-     */
-    calculateInRange: function() {
-        var inRange = false;
-
-        if (this.alwaysInRange) {
-            inRange = true;
-        } else {
-            if (this.map) {
-                var resolution = this.map.getResolution();
-                inRange = ( (resolution >= this.minResolution) &&
-                            (resolution <= this.maxResolution) );
-            }
-        }
-        return inRange;
-    },
-
-    /** 
-     * APIMethod: setIsBaseLayer
-     * 
-     * Parameters:
-     * isBaseLayer - {Boolean}
-     */
-    setIsBaseLayer: function(isBaseLayer) {
-        if (isBaseLayer != this.isBaseLayer) {
-            this.isBaseLayer = isBaseLayer;
-            if (this.map != null) {
-                this.map.events.triggerEvent("changebaselayer", {
-                    layer: this
-                });
-            }
-        }
-    },
-
-  /********************************************************/
-  /*                                                      */
-  /*                 Baselayer Functions                  */
-  /*                                                      */
-  /********************************************************/
-  
-    /** 
-     * Method: initResolutions
-     * This method's responsibility is to set up the 'resolutions' array 
-     *     for the layer -- this array is what the layer will use to interface
-     *     between the zoom levels of the map and the resolution display 
-     *     of the layer.
-     * 
-     * The user has several options that determine how the array is set up.
-     *  
-     * For a detailed explanation, see the following wiki from the 
-     *     openlayers.org homepage:
-     *     http://trac.openlayers.org/wiki/SettingZoomLevels
-     */
-    initResolutions: function() {
-
-        // ok we want resolutions, here's our strategy:
-        //
-        // 1. if resolutions are defined in the layer config, use them
-        // 2. else, if scales are defined in the layer config then derive
-        //    resolutions from these scales
-        // 3. else, attempt to calculate resolutions from maxResolution,
-        //    minResolution, numZoomLevels, maxZoomLevel set in the
-        //    layer config
-        // 4. if we still don't have resolutions, and if resolutions
-        //    are defined in the same, use them
-        // 5. else, if scales are defined in the map then derive
-        //    resolutions from these scales
-        // 6. else, attempt to calculate resolutions from maxResolution,
-        //    minResolution, numZoomLevels, maxZoomLevel set in the
-        //    map
-        // 7. hope for the best!
-
-        var i, len;
-        var props = {}, alwaysInRange = true;
-
-        // get resolution data from layer config
-        // (we also set alwaysInRange in the layer as appropriate)
-        for(i=0, len=this.RESOLUTION_PROPERTIES.length; i<len; i++) {
-            var p = this.RESOLUTION_PROPERTIES[i];
-            props[p] = this.options[p];
-            if(alwaysInRange && this.options[p]) {
-                alwaysInRange = false;
-            }
-        }
-        if(this.alwaysInRange == null) {
-            this.alwaysInRange = alwaysInRange;
-        }
-
-        // if we don't have resolutions then attempt to derive them from scales
-        if(props.resolutions == null) {
-            props.resolutions = this.resolutionsFromScales(props.scales);
-        }
-
-        // if we still don't have resolutions then attempt to calculate them
-        if(props.resolutions == null) {
-            props.resolutions = this.calculateResolutions(props);
-        }
-
-        // if we couldn't calculate resolutions then we look at we have
-        // in the map
-        if(props.resolutions == null) {
-            for(i=0, len=this.RESOLUTION_PROPERTIES.length; i<len; i++) {
-                var p = this.RESOLUTION_PROPERTIES[i];
-                props[p] = this.options[p] != null ?
-                    this.options[p] : this.map[p];
-            }
-            if(props.resolutions == null) {
-                props.resolutions = this.resolutionsFromScales(props.scales);
-            }
-            if(props.resolutions == null) {
-                props.resolutions = this.calculateResolutions(props);
-            }
-        }
-
-        // ok, we new need to set properties in the instance
-
-        // get maxResolution from the config if it's defined there
-        var maxResolution;
-        if(this.options.maxResolution &&
-           this.options.maxResolution !== "auto") {
-            maxResolution = this.options.maxResolution;
-        }
-        if(this.options.minScale) {
-            maxResolution = OpenLayers.Util.getResolutionFromScale(
-                this.options.minScale, this.units);
-        }
-
-        // get minResolution from the config if it's defined there
-        var minResolution;
-        if(this.options.minResolution &&
-           this.options.minResolution !== "auto") {
-            minResolution = this.options.minResolution;
-        }
-        if(this.options.maxScale) {
-            minResolution = OpenLayers.Util.getResolutionFromScale(
-                this.options.maxScale, this.units);
-        }
-
-        if(props.resolutions) {
-
-            //sort resolutions array descendingly
-            props.resolutions.sort(function(a, b) {
-                return (b - a);
-            });
-
-            // if we still don't have a maxResolution get it from the
-            // resolutions array
-            if(!maxResolution) {
-                maxResolution = props.resolutions[0];
-            }
-
-            // if we still don't have a minResolution get it from the
-            // resolutions array
-            if(!minResolution) {
-                var lastIdx = props.resolutions.length - 1;
-                minResolution = props.resolutions[lastIdx];
-            }
-        }
-
-        this.resolutions = props.resolutions;
-        if(this.resolutions) {
-            len = this.resolutions.length;
-            this.scales = new Array(len);
-            for(i=0; i<len; i++) {
-                this.scales[i] = OpenLayers.Util.getScaleFromResolution(
-                    this.resolutions[i], this.units);
-            }
-            this.numZoomLevels = len;
-        }
-        this.minResolution = minResolution;
-        if(minResolution) {
-            this.maxScale = OpenLayers.Util.getScaleFromResolution(
-                minResolution, this.units);
-        }
-        this.maxResolution = maxResolution;
-        if(maxResolution) {
-            this.minScale = OpenLayers.Util.getScaleFromResolution(
-                maxResolution, this.units);
-        }
-    },
-
-    /**
-     * Method: resolutionsFromScales
-     * Derive resolutions from scales.
-     *
-     * Parameters:
-     * scales - {Array(Number)} Scales
-     *
-     * Returns
-     * {Array(Number)} Resolutions
-     */
-    resolutionsFromScales: function(scales) {
-        if(scales == null) {
-            return;
-        }
-        var resolutions, i, len;
-        len = scales.length;
-        resolutions = new Array(len);
-        for(i=0; i<len; i++) {
-            resolutions[i] = OpenLayers.Util.getResolutionFromScale(
-                scales[i], this.units);
-        }
-        return resolutions;
-    },
-
-    /**
-     * Method: calculateResolutions
-     * Calculate resolutions based on the provided properties.
-     *
-     * Parameters:
-     * props - {Object} Properties
-     *
-     * Return:
-     * {Array({Number})} Array of resolutions.
-     */
-    calculateResolutions: function(props) {
-
-        // determine maxResolution
-        var maxResolution = props.maxResolution;
-        if(props.minScale != null) {
-            maxResolution =
-                OpenLayers.Util.getResolutionFromScale(props.minScale,
-                                                       this.units);
-        } else if(maxResolution == "auto" && this.maxExtent != null) {
-            var viewSize = this.map.getSize();
-            var wRes = this.maxExtent.getWidth() / viewSize.w;
-            var hRes = this.maxExtent.getHeight() / viewSize.h;
-            maxResolution = Math.max(wRes, hRes);
-        }
-
-        // determine minResolution
-        var minResolution = props.minResolution;
-        if(props.maxScale != null) {
-            minResolution =
-                OpenLayers.Util.getResolutionFromScale(props.maxScale,
-                                                       this.units);
-        } else if(props.minResolution == "auto" && this.minExtent != null) {
-            var viewSize = this.map.getSize();
-            var wRes = this.minExtent.getWidth() / viewSize.w;
-            var hRes = this.minExtent.getHeight()/ viewSize.h;
-            minResolution = Math.max(wRes, hRes);
-        }
-
-        // determine numZoomLevels
-        var maxZoomLevel = props.maxZoomLevel;
-        var numZoomLevels = props.numZoomLevels;
-        if(typeof minResolution === "number" &&
-           typeof maxResolution === "number" && numZoomLevels === undefined) {
-            var ratio = maxResolution / minResolution;
-            numZoomLevels = Math.floor(Math.log(ratio) / Math.log(2)) + 1;
-        } else if(numZoomLevels === undefined && maxZoomLevel != null) {
-            numZoomLevels = maxZoomLevel + 1;
-        }
-
-        // are we able to calculate resolutions?
-        if(typeof numZoomLevels !== "number" || numZoomLevels <= 0 ||
-           (typeof maxResolution !== "number" &&
-                typeof minResolution !== "number")) {
-            return;
-        }
-
-        // now we have numZoomLevels and at least one of maxResolution
-        // or minResolution, we can populate the resolutions array
-
-        var resolutions = new Array(numZoomLevels);
-        var base = 2;
-        if(typeof minResolution == "number" &&
-           typeof maxResolution == "number") {
-            // if maxResolution and minResolution are set, we calculate
-            // the base for exponential scaling that starts at
-            // maxResolution and ends at minResolution in numZoomLevels
-            // steps.
-            base = Math.pow(
-                    (maxResolution / minResolution),
-                (1 / (numZoomLevels - 1))
-            );
-        }
-
-        var i;
-        if(typeof maxResolution === "number") {
-            for(i=0; i<numZoomLevels; i++) {
-                resolutions[i] = maxResolution / Math.pow(base, i);
-            }
-        } else {
-            for(i=0; i<numZoomLevels; i++) {
-                resolutions[numZoomLevels - 1 - i] =
-                    minResolution * Math.pow(base, i);
-            }
-        }
-
-        return resolutions;
-    },
-
-    /**
-     * APIMethod: getResolution
-     * 
-     * Returns:
-     * {Float} The currently selected resolution of the map, taken from the
-     *     resolutions array, indexed by current zoom level.
-     */
-    getResolution: function() {
-        var zoom = this.map.getZoom();
-        return this.getResolutionForZoom(zoom);
-    },
-
-    /** 
-     * APIMethod: getExtent
-     * 
-     * Returns:
-     * {<OpenLayers.Bounds>} A Bounds object which represents the lon/lat 
-     *     bounds of the current viewPort.
-     */
-    getExtent: function() {
-        // just use stock map calculateBounds function -- passing no arguments
-        //  means it will user map's current center & resolution
-        //
-        return this.map.calculateBounds();
-    },
-
-    /**
-     * APIMethod: getZoomForExtent
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * closest - {Boolean} Find the zoom level that most closely fits the 
-     *     specified bounds. Note that this may result in a zoom that does 
-     *     not exactly contain the entire extent.
-     *     Default is false.
-     *
-     * Returns:
-     * {Integer} The index of the zoomLevel (entry in the resolutions array) 
-     *     for the passed-in extent. We do this by calculating the ideal 
-     *     resolution for the given extent (based on the map size) and then 
-     *     calling getZoomForResolution(), passing along the 'closest'
-     *     parameter.
-     */
-    getZoomForExtent: function(extent, closest) {
-        var viewSize = this.map.getSize();
-        var idealResolution = Math.max( extent.getWidth()  / viewSize.w,
-                                        extent.getHeight() / viewSize.h );
-
-        return this.getZoomForResolution(idealResolution, closest);
-    },
-    
-    /** 
-     * Method: getDataExtent
-     * Calculates the max extent which includes all of the data for the layer.
-     *     This function is to be implemented by subclasses.
-     * 
-     * Returns:
-     * {<OpenLayers.Bounds>}
-     */
-    getDataExtent: function () {
-        //to be implemented by subclasses
-    },
-
-    /**
-     * APIMethod: getResolutionForZoom
-     * 
-     * Parameter:
-     * zoom - {Float}
-     * 
-     * Returns:
-     * {Float} A suitable resolution for the specified zoom.
-     */
-    getResolutionForZoom: function(zoom) {
-        zoom = Math.max(0, Math.min(zoom, this.resolutions.length - 1));
-        var resolution;
-        if(this.map.fractionalZoom) {
-            var low = Math.floor(zoom);
-            var high = Math.ceil(zoom);
-            resolution = this.resolutions[low] -
-                ((zoom-low) * (this.resolutions[low]-this.resolutions[high]));
-        } else {
-            resolution = this.resolutions[Math.round(zoom)];
-        }
-        return resolution;
-    },
-
-    /**
-     * APIMethod: getZoomForResolution
-     * 
-     * Parameters:
-     * resolution - {Float}
-     * closest - {Boolean} Find the zoom level that corresponds to the absolute 
-     *     closest resolution, which may result in a zoom whose corresponding
-     *     resolution is actually smaller than we would have desired (if this
-     *     is being called from a getZoomForExtent() call, then this means that
-     *     the returned zoom index might not actually contain the entire 
-     *     extent specified... but it'll be close).
-     *     Default is false.
-     * 
-     * Returns:
-     * {Integer} The index of the zoomLevel (entry in the resolutions array) 
-     *     that corresponds to the best fit resolution given the passed in 
-     *     value and the 'closest' specification.
-     */
-    getZoomForResolution: function(resolution, closest) {
-        var zoom;
-        if(this.map.fractionalZoom) {
-            var lowZoom = 0;
-            var highZoom = this.resolutions.length - 1;
-            var highRes = this.resolutions[lowZoom];
-            var lowRes = this.resolutions[highZoom];
-            var res;
-            for(var i=0, len=this.resolutions.length; i<len; ++i) {
-                res = this.resolutions[i];
-                if(res >= resolution) {
-                    highRes = res;
-                    lowZoom = i;
-                }
-                if(res <= resolution) {
-                    lowRes = res;
-                    highZoom = i;
-                    break;
-                }
-            }
-            var dRes = highRes - lowRes;
-            if(dRes > 0) {
-                zoom = lowZoom + ((highRes - resolution) / dRes);
-            } else {
-                zoom = lowZoom;
-            }
-        } else {
-            var diff;
-            var minDiff = Number.POSITIVE_INFINITY;
-            for(var i=0, len=this.resolutions.length; i<len; i++) {            
-                if (closest) {
-                    diff = Math.abs(this.resolutions[i] - resolution);
-                    if (diff > minDiff) {
-                        break;
-                    }
-                    minDiff = diff;
-                } else {
-                    if (this.resolutions[i] < resolution) {
-                        break;
-                    }
-                }
-            }
-            zoom = Math.max(0, i-1);
-        }
-        return zoom;
-    },
-    
-    /**
-     * APIMethod: getLonLatFromViewPortPx
-     * 
-     * Parameters:
-     * viewPortPx - {<OpenLayers.Pixel>}
-     *
-     * Returns:
-     * {<OpenLayers.LonLat>} An OpenLayers.LonLat which is the passed-in 
-     *     view port <OpenLayers.Pixel>, translated into lon/lat by the layer.
-     */
-    getLonLatFromViewPortPx: function (viewPortPx) {
-        var lonlat = null;
-        if (viewPortPx != null) {
-            var size = this.map.getSize();
-            var center = this.map.getCenter();
-            if (center) {
-                var res  = this.map.getResolution();
-        
-                var delta_x = viewPortPx.x - (size.w / 2);
-                var delta_y = viewPortPx.y - (size.h / 2);
-            
-                lonlat = new OpenLayers.LonLat(center.lon + delta_x * res ,
-                                             center.lat - delta_y * res); 
-
-                if (this.wrapDateLine) {
-                    lonlat = lonlat.wrapDateLine(this.maxExtent);
-                }
-            } // else { DEBUG STATEMENT }
-        }
-        return lonlat;
-    },
-
-    /**
-     * APIMethod: getViewPortPxFromLonLat
-     * Returns a pixel location given a map location.  This method will return
-     *     fractional pixel values.
-     * 
-     * Parameters:
-     * lonlat - {<OpenLayers.LonLat>}
-     *
-     * Returns: 
-     * {<OpenLayers.Pixel>} An <OpenLayers.Pixel> which is the passed-in 
-     *     <OpenLayers.LonLat>,translated into view port pixels.
-     */
-    getViewPortPxFromLonLat: function (lonlat) {
-        var px = null; 
-        if (lonlat != null) {
-            var resolution = this.map.getResolution();
-            var extent = this.map.getExtent();
-            px = new OpenLayers.Pixel(
-                (1/resolution * (lonlat.lon - extent.left)),
-                (1/resolution * (extent.top - lonlat.lat))
-            );    
-        }
-        return px;
-    },
-    
-    /**
-     * APIMethod: setOpacity
-     * Sets the opacity for the entire layer (all images)
-     * 
-     * Parameter:
-     * opacity - {Float}
-     */
-    setOpacity: function(opacity) {
-        if (opacity != this.opacity) {
-            this.opacity = opacity;
-            for(var i=0, len=this.div.childNodes.length; i<len; ++i) {
-                var element = this.div.childNodes[i].firstChild;
-                OpenLayers.Util.modifyDOMElement(element, null, null, null, 
-                                                 null, null, null, opacity);
-            }
-            if (this.map != null) {
-                this.map.events.triggerEvent("changelayer", {
-                    layer: this,
-                    property: "opacity"
-                });
-            }
-        }
-    },
-
-    /**
-     * Method: getZIndex
-     * 
-     * Returns: 
-     * {Integer} the z-index of this layer
-     */    
-    getZIndex: function () {
-        return this.div.style.zIndex;
-    },
-
-    /**
-     * Method: setZIndex
-     * 
-     * Parameters: 
-     * zIndex - {Integer}
-     */    
-    setZIndex: function (zIndex) {
-        this.div.style.zIndex = zIndex;
-    },
-
-    /**
-     * Method: adjustBounds
-     * This function will take a bounds, and if wrapDateLine option is set
-     *     on the layer, it will return a bounds which is wrapped around the 
-     *     world. We do not wrap for bounds which *cross* the 
-     *     maxExtent.left/right, only bounds which are entirely to the left 
-     *     or entirely to the right.
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     */
-    adjustBounds: function (bounds) {
-
-        if (this.gutter) {
-            // Adjust the extent of a bounds in map units by the 
-            // layer's gutter in pixels.
-            var mapGutter = this.gutter * this.map.getResolution();
-            bounds = new OpenLayers.Bounds(bounds.left - mapGutter,
-                                           bounds.bottom - mapGutter,
-                                           bounds.right + mapGutter,
-                                           bounds.top + mapGutter);
-        }
-
-        if (this.wrapDateLine) {
-            // wrap around the date line, within the limits of rounding error
-            var wrappingOptions = { 
-                'rightTolerance':this.getResolution()
-            };    
-            bounds = bounds.wrapDateLine(this.maxExtent, wrappingOptions);
-                              
-        }
-        return bounds;
-    },
-
-    CLASS_NAME: "OpenLayers.Layer"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/ArcGIS93Rest.js
+++ /dev/null
@@ -1,254 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer/Grid.js
- * @requires OpenLayers/Tile/Image.js
- */
-
-/**
- * Class: OpenLayers.Layer.ArcGIS93Rest
- * Instances of OpenLayers.Layer.ArcGIS93Rest are used to display data from
- *     ESRI ArcGIS Server 9.3 (and up?) Mapping Services using the REST API.
- *     Create a new ArcGIS93Rest layer with the <OpenLayers.Layer.ArcGIS93Rest>
- *     constructor.  More detail on the REST API is available at
- *     http://sampleserver1.arcgisonline.com/ArcGIS/SDK/REST/index.html ;
- *     specifically, the URL provided to this layer should be an export service
- *     URL: http://sampleserver1.arcgisonline.com/ArcGIS/SDK/REST/export.html 
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.Grid>
- */
-OpenLayers.Layer.ArcGIS93Rest = OpenLayers.Class(OpenLayers.Layer.Grid, {
-
-    /**
-     * Constant: DEFAULT_PARAMS
-     * {Object} Hashtable of default parameter key/value pairs 
-     */
-    DEFAULT_PARAMS: { 
-      format: "png"
-    },
-        
-    /**
-     * APIProperty: isBaseLayer
-     * {Boolean} Default is true for ArcGIS93Rest layer
-     */
-    isBaseLayer: true,
- 
- 
-    /**
-     * Constructor: OpenLayers.Layer.ArcGIS93Rest
-     * Create a new ArcGIS93Rest layer object.
-     *
-     * Example:
-     * (code)
-     * var arcims = new OpenLayers.Layer.ArcGIS93Rest("MyName",
-     *                                    "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/export", 
-     *                                    {
-     *                                      layers: "0,1,2"
-     *                                    });
-     * (end)
-     *
-     * Parameters:
-     * name - {String} A name for the layer
-     * url - {String} Base url for the ArcGIS server REST service
-     * options - {Object} An object with key/value pairs representing the
-     *                    options and option values.
-     * Valid Options:
-     *        format: {String} MIME type of desired image type.
-     *        layers: {String} Comma-separated list of layers to display.
-     *        srs: {String} Projection ID.
-     */
-    initialize: function(name, url, params, options) {
-        var newArguments = [];
-        //uppercase params
-        params = OpenLayers.Util.upperCaseObject(params);
-        newArguments.push(name, url, params, options);
-        OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
-        OpenLayers.Util.applyDefaults(
-                       this.params, 
-                       OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS)
-                       );
-                       
-        //layer is transparent        
-        if (this.params.TRANSPARENT && 
-            this.params.TRANSPARENT.toString().toLowerCase() == "true") {
-            
-            // unless explicitly set in options, make layer an overlay
-            if ( (options == null) || (!options.isBaseLayer) ) {
-                this.isBaseLayer = false;
-            } 
-            
-            // jpegs can never be transparent, so intelligently switch the 
-            //  format, depending on the browser's capabilities
-            if (this.params.FORMAT == "jpg") {
-                this.params.FORMAT = OpenLayers.Util.alphaHack() ? "gif"
-                                                                 : "png";
-            }
-        }
-    },    
-
-    
-    /**
-     * Method: destroy
-     * Destroy this layer
-     */
-    destroy: function() {
-        // for now, nothing special to do here. 
-        OpenLayers.Layer.Grid.prototype.destroy.apply(this, arguments);  
-    },   
-    
-    /**
-         * Method: clone
-         * Create a clone of this layer
-         *
-         * Returns:
-         * {<OpenLayers.Layer.ArcGIS93Rest>} An exact clone of this layer
-         */
-    clone: function (obj) {
-        
-        if (obj == null) {
-            obj = new OpenLayers.Layer.ArcGIS93Rest(this.name,
-                                           this.url,
-                                           this.params,
-                                           this.getOptions());
-        }
-
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);
-
-        // copy/set any non-init, non-simple values here
-
-        return obj;
-    },
-    
-    
-    /**
-     * Method: getURL
-     * Return an image url this layer.
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} A bounds representing the bbox for the
-     *                                request.
-     *
-     * Returns:
-     * {String} A string with the map image's url.
-     */
-    getURL: function (bounds) {
-        bounds = this.adjustBounds(bounds);
-
-        // ArcGIS Server only wants the numeric portion of the projection ID.
-        var projWords = this.projection.getCode().split(":");
-        var srid = projWords[projWords.length - 1];
-
-        var imageSize = this.getImageSize(); 
-        var newParams = {
-            'BBOX': bounds.toBBOX(),
-            'SIZE': imageSize.w + "," + imageSize.h,
-            // We always want image, the other options were json, image with a whole lotta html around it, etc.
-            'F': "image",
-            'BBOXSR': srid,
-            'IMAGESR': srid
-        };
-
-        // Now add the filter parameters.
-        if (this.layerDefs) {
-            var layerDefStrList = [];
-            var layerID;
-            for(layerID in this.layerDefs) {
-                if (this.layerDefs.hasOwnProperty(layerID)) {
-                    if (this.layerDefs[layerID]) {
-                        layerDefStrList.push(layerID);
-                        layerDefStrList.push(":");
-                        layerDefStrList.push(this.layerDefs[layerID]);
-                        layerDefStrList.push(";");
-                    }
-                }
-            }
-            if (layerDefStrList.length > 0) {
-                newParams['LAYERDEFS'] = layerDefStrList.join("");
-            }
-        }
-        var requestString = this.getFullRequestString(newParams);
-        return requestString;
-    },
-    
-    /**
-     * Method: setLayerFilter
-     * addTile creates a tile, initializes it, and adds it to the layer div. 
-     *
-     * Parameters:
-     * id - {String} The id of the layer to which the filter applies.
-     * queryDef - {String} A sql-ish query filter, for more detail see the ESRI
-     *                     documentation at http://sampleserver1.arcgisonline.com/ArcGIS/SDK/REST/export.html
-     */
-    setLayerFilter: function ( id, queryDef ) {
-        if (!this.layerDefs) {
-            this.layerDefs = {};
-        }
-        if (queryDef) {
-            this.layerDefs[id] = queryDef;
-        } else {
-            delete this.layerDefs[id];
-        }
-    },
-    
-    /**
-     * Method: clearLayerFilter
-     * Clears layer filters, either from a specific layer,
-     * or all of them.
-     *
-     * Parameters:
-     * id - {String} The id of the layer from which to remove any
-     *               filter.  If unspecified/blank, all filters
-     *               will be removed.
-     */
-    clearLayerFilter: function ( id ) {
-        if (id) {
-            delete this.layerDefs[id];
-        } else {
-            delete this.layerDefs;
-        }
-    },
-    
-    /**
-     * APIMethod: mergeNewParams
-     * Catch changeParams and uppercase the new params to be merged in
-     *     before calling changeParams on the super class.
-     * 
-     *     Once params have been changed, the tiles will be reloaded with
-     *     the new parameters.
-     * 
-     * Parameters:
-     * newParams - {Object} Hashtable of new params to use
-     */
-    mergeNewParams:function(newParams) {
-        var upperParams = OpenLayers.Util.upperCaseObject(newParams);
-        var newArguments = [upperParams];
-        return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this, 
-                                                             newArguments);
-    },
-
-    /**
-     * Method: addTile
-     * addTile creates a tile, initializes it, and adds it to the layer div. 
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                         null, this.tileSize);
-    },
-
-    
-    CLASS_NAME: "OpenLayers.Layer.ArcGIS93Rest"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/ArcIMS.js
+++ /dev/null
@@ -1,467 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Layer/Grid.js
- * @requires OpenLayers/Tile/Image.js
- * @requires OpenLayers/Format/ArcXML.js
- * @requires OpenLayers/Request.js
- */
-
-/**
- * Class: OpenLayers.Layer.ArcIMS
- * Instances of OpenLayers.Layer.ArcIMS are used to display data from ESRI ArcIMS
- *     Mapping Services. Create a new ArcIMS layer with the <OpenLayers.Layer.ArcIMS>
- *     constructor.
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.Grid>
- */
-OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
-
-    /**
-     * Constant: DEFAULT_PARAMS
-     * {Object} Default query string parameters.
-     */
-    DEFAULT_PARAMS: { 
-        ClientVersion: "9.2",
-        ServiceName: ''
-    },
-    
-    /**
-     * APIProperty: tileSize
-     * {<OpenLayers.Size>} Size for tiles.  Default is 512x512.
-     */
-    tileSize: null,
-    
-    /**
-     * APIProperty: featureCoordSys
-     * {String} Code for feature coordinate system.  Default is "4326".
-     */
-    featureCoordSys: "4326",
-    
-    /**
-     * APIProperty: filterCoordSys
-     * {String} Code for filter coordinate system.  Default is "4326".
-     */
-    filterCoordSys: "4326",
-    
-    /**
-     * APIProperty: layers
-     * {Array} An array of objects with layer properties.
-     */
-    layers: null,
-    
-    /**
-     * APIProperty: async
-     * {Boolean} Request images asynchronously.  Default is true.
-     */
-    async: true,
-    
-    /**
-     * APIProperty: name
-     * {String} Layer name.  Default is "ArcIMS".
-     */
-    name: "ArcIMS",
-
-    /**
-     * APIProperty: isBaseLayer
-     * {Boolean} The layer is a base layer.  Default is true.
-     */
-    isBaseLayer: true,
-
-    /**
-     * Constant: DEFAULT_OPTIONS
-     * {Object} Default layers properties.
-     */
-    DEFAULT_OPTIONS: {
-        tileSize: new OpenLayers.Size(512, 512),
-        featureCoordSys: "4326",
-        filterCoordSys: "4326",
-        layers: null,
-        isBaseLayer: true,
-        async: true,
-        name: "ArcIMS"
-    }, 
- 
-    /**
-     * Constructor: OpenLayers.Layer.ArcIMS
-     * Create a new ArcIMS layer object.
-     *
-     * Example:
-     * (code)
-     * var arcims = new OpenLayers.Layer.ArcIMS(
-     *     "Global Sample",
-     *     "http://sample.avencia.com/servlet/com.esri.esrimap.Esrimap", 
-     *     {
-     *         service: "OpenLayers_Sample", 
-     *         layers: [
-     *             // layers to manipulate
-     *             {id: "1", visible: true}
-     *         ]
-     *     }
-     * );
-     * (end)
-     *
-     * Parameters:
-     * name - {String} A name for the layer
-     * url - {String} Base url for the ArcIMS server
-     * options - {Object} Optional object with properties to be set on the
-     *     layer.
-     */
-    initialize: function(name, url, options) {
-        
-        this.tileSize = new OpenLayers.Size(512, 512);
-
-        // parameters
-        this.params = OpenLayers.Util.applyDefaults(
-            {ServiceName: options.serviceName},
-            this.DEFAULT_PARAMS
-        );
-        this.options = OpenLayers.Util.applyDefaults(
-            options, this.DEFAULT_OPTIONS
-        );
-          
-        OpenLayers.Layer.Grid.prototype.initialize.apply(
-            this, [name, url, this.params, options]
-        );
-
-        //layer is transparent        
-        if (this.transparent) {
-            
-            // unless explicitly set in options, make layer an overlay
-            if (!this.isBaseLayer) {
-                this.isBaseLayer = false;
-            } 
-            
-            // jpegs can never be transparent, so intelligently switch the 
-            //  format, depending on the browser's capabilities
-            if (this.format == "image/jpeg") {
-                this.format = OpenLayers.Util.alphaHack() ? "image/gif" : "image/png";
-            }
-        }
-
-        // create an empty layer list if no layers specified in the options
-        if (this.options.layers === null) {
-            this.options.layers = [];
-        }
-    },    
-
-    
-    /**
-     * Method: destroy
-     * Destroy this layer
-     */
-    destroy: function() {
-        // for now, nothing special to do here. 
-        OpenLayers.Layer.Grid.prototype.destroy.apply(this, arguments);  
-    },   
-    
-    
-    /**
-     * Method: getURL
-     * Return an image url this layer.
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} A bounds representing the bbox for the
-     *     request.
-     *
-     * Returns:
-     * {String} A string with the map image's url.
-     */
-    getURL: function(bounds) {
-        var url = "";
-        bounds = this.adjustBounds(bounds);
-        
-        // create an arcxml request to generate the image
-        var axlReq = new OpenLayers.Format.ArcXML( 
-            OpenLayers.Util.extend(this.options, {
-                requesttype: "image",
-                envelope: bounds.toArray(),
-                tileSize: this.tileSize
-            })
-        );
-        
-        // create a synchronous ajax request to get an arcims image
-        var req = new OpenLayers.Request.POST({
-            url: this.getFullRequestString(),
-            data: axlReq.write(),
-            async: false
-        });
-        
-        // if the response exists
-        if (req != null) {
-            var doc = req.responseXML;
-
-            if (!doc || !doc.documentElement) {            
-                doc = req.responseText;
-            }
-
-            // create a new arcxml format to read the response
-            var axlResp = new OpenLayers.Format.ArcXML();
-            var arcxml = axlResp.read(doc);
-            url = this.getUrlOrImage(arcxml.image.output);
-        }
-        
-        return url;
-    },
-    
-    
-    /**
-     * Method: getURLasync
-     * Get an image url this layer asynchronously, and execute a callback
-     *     when the image url is generated.
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} A bounds representing the bbox for the
-     *     request.
-     * scope - {Object} The scope of the callback method.
-     * prop - {String} The name of the property in the scoped object to 
-     *     recieve the image url.
-     * callback - {Function} Function to call when image url is retrieved.
-     */
-    getURLasync: function(bounds, scope, prop, callback) {
-        bounds = this.adjustBounds(bounds);
-        
-        // create an arcxml request to generate the image
-        var axlReq = new OpenLayers.Format.ArcXML(  
-            OpenLayers.Util.extend(this.options, { 
-                requesttype: "image",
-                envelope: bounds.toArray(),
-                tileSize: this.tileSize
-            })
-        );
-        
-        // create an asynchronous ajax request to get an arcims image
-        OpenLayers.Request.POST({
-            url: this.getFullRequestString(),
-            async: true,
-            data: axlReq.write(),
-            callback: function(req) {
-                // process the response from ArcIMS, and call the callback function
-                // to set the image URL
-                var doc = req.responseXML;
-                if (!doc || !doc.documentElement) {            
-                    doc = req.responseText;
-                }
-
-                // create a new arcxml format to read the response
-                var axlResp = new OpenLayers.Format.ArcXML();
-                var arcxml = axlResp.read(doc);
-                
-                scope[prop] = this.getUrlOrImage(arcxml.image.output);
-
-                // call the callback function to recieve the updated property on the
-                // scoped object
-                callback.apply(scope);
-            },
-            scope: this
-        });
-    },
-    
-    /**
-     * Method: getUrlOrImage
-     * Extract a url or image from the ArcXML image output.
-     *
-     * Parameters:
-     * output - {Object} The image.output property of the object returned from
-     *     the ArcXML format read method.
-     *
-     * Returns:
-     * {String} A URL for an image (potentially with the data protocol).
-     */
-    getUrlOrImage: function(output) {
-        var ret = "";
-        if(output.url) {
-            // If the image response output url is a string, then the image
-            // data is not inline.
-            ret = output.url;
-        } else if(output.data) {
-            // The image data is inline and base64 encoded, create a data
-            // url for the image.  This will only work for small images,
-            // due to browser url length limits.
-            ret = "data:image/" + output.type + 
-                  ";base64," + output.data;
-        }
-        return ret;
-    },
-    
-    /**
-     * Method: setLayerQuery
-     * Set the query definition on this layer. Query definitions are used to
-     *     render parts of the spatial data in an image, and can be used to
-     *     filter features or layers in the ArcIMS service.
-     *
-     * Parameters:
-     * id - {String} The ArcIMS layer ID.
-     * queryDef - {Object} The query definition to apply to this layer.
-     */
-    setLayerQuery: function(id, querydef) {
-        // find the matching layer, if it exists
-        for (var lyr = 0; lyr < this.options.layers.length; lyr++) {
-            if (id == this.options.layers[lyr].id) {
-                // replace this layer definition
-                this.options.layers[lyr].query = querydef;
-                return;
-            }
-        }
-      
-        // no layer found, create a new definition
-        this.options.layers.push({id: id, visible: true, query: querydef});
-    },
-    
-    /**
-     * Method: getFeatureInfo
-     * Get feature information from ArcIMS.  Using the applied geometry, apply
-     *     the options to the query (buffer, area/envelope intersection), and
-     *     query the ArcIMS service.
-     *
-     * A note about accuracy:
-     * ArcIMS interprets the accuracy attribute in feature requests to be
-     *     something like the 'modulus' operator on feature coordinates,
-     *     applied to the database geometry of the feature.  It doesn't round,
-     *     so your feature coordinates may be up to (1 x accuracy) offset from
-     *     the actual feature coordinates.  If the accuracy of the layer is not
-     *     specified, the accuracy will be computed to be approximately 1
-     *     feature coordinate per screen  pixel.
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.LonLat>} or {<OpenLayers.Geometry.Polygon>} The
-     *     geometry to use when making the query. This should be a closed
-     *     polygon for behavior approximating a free selection.
-     * layer - {Object} The ArcIMS layer definition. This is an anonymous object
-     *     that looks like:
-     * (code)
-     * {
-     *     id: "ArcXML layer ID",  // the ArcXML layer ID
-     *     query: {
-     *         where: "STATE = 'PA'",  // the where clause of the query
-     *         accuracy: 100           // the accuracy of the returned feature
-     *     }
-     * }
-     * (end)
-     * options - {Object} Object with non-default properties to set on the layer.
-     *     Supported properties are buffer, callback, scope, and any other
-     *     properties applicable to the ArcXML format.  Set the 'callback' and
-     *     'scope' for an object and function to recieve the parsed features
-     *     from ArcIMS.
-     */
-    getFeatureInfo: function(geometry, layer, options) {
-        // set the buffer to 1 unit (dd/m/ft?) by default
-        var buffer = options.buffer || 1;
-        // empty callback by default
-        var callback = options.callback || function() {};
-        // default scope is window (global)
-        var scope = options.scope || window;
-
-        // apply these option to the request options
-        var requestOptions = {};
-        OpenLayers.Util.extend(requestOptions, this.options);
-
-        // this is a feature request
-        requestOptions.requesttype = "feature";
-
-        if (geometry instanceof OpenLayers.LonLat) {
-            // create an envelope if the geometry is really a lon/lat
-            requestOptions.polygon = null;
-            requestOptions.envelope = [ 
-                geometry.lon - buffer, 
-                geometry.lat - buffer,
-                geometry.lon + buffer,
-                geometry.lat + buffer
-            ];
-        } else if (geometry instanceof OpenLayers.Geometry.Polygon) {
-            // use the polygon assigned, and empty the envelope
-            requestOptions.envelope = null;
-            requestOptions.polygon = geometry;
-        }
-      
-        // create an arcxml request to get feature requests
-        var arcxml = new OpenLayers.Format.ArcXML(requestOptions);
-
-        // apply any get feature options to the arcxml request
-        OpenLayers.Util.extend(arcxml.request.get_feature, options);
-
-        arcxml.request.get_feature.layer = layer.id;
-        if (typeof layer.query.accuracy == "number") {
-            // set the accuracy if it was specified
-            arcxml.request.get_feature.query.accuracy = layer.query.accuracy;
-        } else {
-            // guess that the accuracy is 1 per screen pixel
-            var mapCenter = this.map.getCenter();
-            var viewPx = this.map.getViewPortPxFromLonLat(mapCenter);
-            viewPx.x++;
-            var mapOffCenter = this.map.getLonLatFromPixel(viewPx);
-            arcxml.request.get_feature.query.accuracy = mapOffCenter.lon - mapCenter.lon;
-        }
-        
-        // set the get_feature query to be the same as the layer passed in
-        arcxml.request.get_feature.query.where = layer.query.where;
-        
-        // use area_intersection
-        arcxml.request.get_feature.query.spatialfilter.relation = "area_intersection";
-      
-        // create a new asynchronous request to get the feature info
-        OpenLayers.Request.POST({
-            url: this.getFullRequestString({'CustomService': 'Query'}),
-            data: arcxml.write(),
-            callback: function(request) {
-                // parse the arcxml response
-                var response = arcxml.parseResponse(request.responseText);
-                
-                if (!arcxml.iserror()) {
-                    // if the arcxml is not an error, call the callback with the features parsed
-                    callback.call(scope, response.features);
-                } else {
-                    // if the arcxml is an error, return null features selected
-                    callback.call(scope, null);
-                }
-            }
-        });
-    },
-
-    /**
-     * Method: clone
-     * Create a clone of this layer
-     *
-     * Returns:
-     * {<OpenLayers.Layer.ArcIMS>} An exact clone of this layer
-     */
-    clone: function (obj) {
-
-        if (obj == null) {
-            obj = new OpenLayers.Layer.ArcIMS(this.name,
-                                           this.url,
-                                           this.getOptions());
-        }
-
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);
-
-        // copy/set any non-init, non-simple values here
-
-        return obj;
-    },
-    
-    /**
-     * Method: addTile
-     * addTile creates a tile, initializes it, and adds it to the layer div. 
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added image tile.
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(
-            this, position, bounds, null, this.tileSize
-        );
-    },
-    
-    CLASS_NAME: "OpenLayers.Layer.ArcIMS"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/Boxes.js
+++ /dev/null
@@ -1,77 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer.js
- * @requires OpenLayers/Layer/Markers.js
- */
-
-/**
- * Class: OpenLayers.Layer.Boxes
- * Draw divs as 'boxes' on the layer. 
- *
- * Inherits from:
- *  - <OpenLayers.Layer.Markers>
- */
-OpenLayers.Layer.Boxes = OpenLayers.Class(OpenLayers.Layer.Markers, {
-
-    /**
-     * Constructor: OpenLayers.Layer.Boxes
-     *
-     * Parameters:
-     * name - {String} 
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function (name, options) {
-        OpenLayers.Layer.Markers.prototype.initialize.apply(this, arguments);
-    },
-    
-    /**
-     * Method: drawMarker 
-     * Calculate the pixel location for the marker, create it, and
-     *    add it to the layer's div
-     *
-     * Parameters: 
-     * marker - {<OpenLayers.Marker.Box>} 
-     */
-    drawMarker: function(marker) {
-        var bounds   = marker.bounds;
-        var topleft  = this.map.getLayerPxFromLonLat(
-                            new OpenLayers.LonLat(bounds.left,  bounds.top));
-        var botright = this.map.getLayerPxFromLonLat(
-                             new OpenLayers.LonLat(bounds.right, bounds.bottom));
-        if (botright == null || topleft == null) {
-            marker.display(false);
-        } else {
-            var sz = new OpenLayers.Size(
-                Math.max(1, botright.x - topleft.x),
-                Math.max(1, botright.y - topleft.y));
-            var markerDiv = marker.draw(topleft, sz);
-            if (!marker.drawn) {
-                this.div.appendChild(markerDiv);
-                marker.drawn = true;
-            }
-        }
-    },
-
-
-    /**
-     * APIMethod: removeMarker 
-     * 
-     * Parameters:
-     * marker - {<OpenLayers.Marker.Box>} 
-     */
-    removeMarker: function(marker) {
-        OpenLayers.Util.removeItem(this.markers, marker);
-        if ((marker.div != null) &&
-            (marker.div.parentNode == this.div) ) {
-            this.div.removeChild(marker.div);    
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.Boxes"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/EventPane.js
+++ /dev/null
@@ -1,419 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer.js
- * @requires OpenLayers/Util.js
- */
-
-/**
- * Class: OpenLayers.Layer.EventPane
- * Base class for 3rd party layers.  Create a new event pane layer with the
- * <OpenLayers.Layer.EventPane> constructor.
- * 
- * Inherits from:
- *  - <OpenLayers.Layer>
- */
-OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, {
-    
-    /**
-     * APIProperty: smoothDragPan
-     * {Boolean} smoothDragPan determines whether non-public/internal API
-     *     methods are used for better performance while dragging EventPane 
-     *     layers. When not in sphericalMercator mode, the smoother dragging 
-     *     doesn't actually move north/south directly with the number of 
-     *     pixels moved, resulting in a slight offset when you drag your mouse 
-     *     north south with this option on. If this visual disparity bothers 
-     *     you, you should turn this option off, or use spherical mercator. 
-     *     Default is on.
-     */
-    smoothDragPan: true,
-
-    /**
-     * Property: isBaseLayer
-     * {Boolean} EventPaned layers are always base layers, by necessity.
-     */ 
-    isBaseLayer: true,
-
-    /**
-     * APIProperty: isFixed
-     * {Boolean} EventPaned layers are fixed by default.
-     */ 
-    isFixed: true,
-
-    /**
-     * Property: pane
-     * {DOMElement} A reference to the element that controls the events.
-     */
-    pane: null,
-
-
-    /**
-     * Property: mapObject
-     * {Object} This is the object which will be used to load the 3rd party library
-     * in the case of the google layer, this will be of type GMap, 
-     * in the case of the ve layer, this will be of type VEMap
-     */ 
-    mapObject: null,
-
-
-    /**
-     * Constructor: OpenLayers.Layer.EventPane
-     * Create a new event pane layer
-     *
-     * Parameters:
-     * name - {String}
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, options) {
-        OpenLayers.Layer.prototype.initialize.apply(this, arguments);
-        if (this.pane == null) {
-            this.pane = OpenLayers.Util.createDiv(this.div.id + "_EventPane");
-        }
-    },
-    
-    /**
-     * APIMethod: destroy
-     * Deconstruct this layer.
-     */
-    destroy: function() {
-        this.mapObject = null;
-        this.pane = null;
-        OpenLayers.Layer.prototype.destroy.apply(this, arguments); 
-    },
-
-    
-    /**
-     * Method: setMap
-     * Set the map property for the layer. This is done through an accessor
-     * so that subclasses can override this and take special action once 
-     * they have their map variable set. 
-     *
-     * Parameters:
-     * map - {<OpenLayers.Map>}
-     */
-    setMap: function(map) {
-        OpenLayers.Layer.prototype.setMap.apply(this, arguments);
-        
-        this.pane.style.zIndex = parseInt(this.div.style.zIndex) + 1;
-        this.pane.style.display = this.div.style.display;
-        this.pane.style.width="100%";
-        this.pane.style.height="100%";
-        if (OpenLayers.Util.getBrowserName() == "msie") {
-            this.pane.style.background = 
-                "url(" + OpenLayers.Util.getImagesLocation() + "blank.gif)";
-        }
-
-        if (this.isFixed) {
-            this.map.viewPortDiv.appendChild(this.pane);
-        } else {
-            this.map.layerContainerDiv.appendChild(this.pane);
-        }
-
-        // once our layer has been added to the map, we can load it
-        this.loadMapObject();
-    
-        // if map didn't load, display warning
-        if (this.mapObject == null) {
-            this.loadWarningMessage();
-        }
-    },
-
-    /**
-     * APIMethod: removeMap
-     * On being removed from the map, we'll like to remove the invisible 'pane'
-     *     div that we added to it on creation. 
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>}
-     */
-    removeMap: function(map) {
-        if (this.pane && this.pane.parentNode) {
-            this.pane.parentNode.removeChild(this.pane);
-        }
-        OpenLayers.Layer.prototype.removeMap.apply(this, arguments);
-    },
-  
-    /**
-     * Method: loadWarningMessage
-     * If we can't load the map lib, then display an error message to the 
-     *     user and tell them where to go for help.
-     * 
-     *     This function sets up the layout for the warning message. Each 3rd
-     *     party layer must implement its own getWarningHTML() function to 
-     *     provide the actual warning message.
-     */
-    loadWarningMessage:function() {
-
-        this.div.style.backgroundColor = "darkblue";
-
-        var viewSize = this.map.getSize();
-        
-        var msgW = Math.min(viewSize.w, 300);
-        var msgH = Math.min(viewSize.h, 200);
-        var size = new OpenLayers.Size(msgW, msgH);
-
-        var centerPx = new OpenLayers.Pixel(viewSize.w/2, viewSize.h/2);
-
-        var topLeft = centerPx.add(-size.w/2, -size.h/2);            
-
-        var div = OpenLayers.Util.createDiv(this.name + "_warning", 
-                                            topLeft, 
-                                            size,
-                                            null,
-                                            null,
-                                            null,
-                                            "auto");
-
-        div.style.padding = "7px";
-        div.style.backgroundColor = "yellow";
-
-        div.innerHTML = this.getWarningHTML();
-        this.div.appendChild(div);
-    },
-  
-    /** 
-     * Method: getWarningHTML
-     * To be implemented by subclasses.
-     * 
-     * Returns:
-     * {String} String with information on why layer is broken, how to get
-     *          it working.
-     */
-    getWarningHTML:function() {
-        //should be implemented by subclasses
-        return "";
-    },
-  
-    /**
-     * Method: display
-     * Set the display on the pane
-     *
-     * Parameters:
-     * display - {Boolean}
-     */
-    display: function(display) {
-        OpenLayers.Layer.prototype.display.apply(this, arguments);
-        this.pane.style.display = this.div.style.display;
-    },
-  
-    /**
-     * Method: setZIndex
-     * Set the z-index order for the pane.
-     * 
-     * Parameters:
-     * zIndex - {int}
-     */
-    setZIndex: function (zIndex) {
-        OpenLayers.Layer.prototype.setZIndex.apply(this, arguments);
-        this.pane.style.zIndex = parseInt(this.div.style.zIndex) + 1;
-    },
-
-    /**
-     * Method: moveTo
-     * Handle calls to move the layer.
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * zoomChanged - {Boolean}
-     * dragging - {Boolean}
-     */
-    moveTo:function(bounds, zoomChanged, dragging) {
-        OpenLayers.Layer.prototype.moveTo.apply(this, arguments);
-
-        if (this.mapObject != null) {
-
-            var newCenter = this.map.getCenter();
-            var newZoom = this.map.getZoom();
-
-            if (newCenter != null) {
-
-                var moOldCenter = this.getMapObjectCenter();
-                var oldCenter = this.getOLLonLatFromMapObjectLonLat(moOldCenter);
-
-                var moOldZoom = this.getMapObjectZoom();
-                var oldZoom= this.getOLZoomFromMapObjectZoom(moOldZoom);
-
-                if ( !(newCenter.equals(oldCenter)) || 
-                     !(newZoom == oldZoom) ) {
-
-                    if (dragging && this.dragPanMapObject && 
-                        this.smoothDragPan) {
-                        var oldPx = this.map.getViewPortPxFromLonLat(oldCenter);
-                        var newPx = this.map.getViewPortPxFromLonLat(newCenter);
-                        this.dragPanMapObject(newPx.x-oldPx.x, oldPx.y-newPx.y);
-                    } else {
-                        var center = this.getMapObjectLonLatFromOLLonLat(newCenter);
-                        var zoom = this.getMapObjectZoomFromOLZoom(newZoom);
-                        this.setMapObjectCenter(center, zoom, dragging);
-                    }
-                }
-            }
-        }
-    },
-
-
-  /********************************************************/
-  /*                                                      */
-  /*                 Baselayer Functions                  */
-  /*                                                      */
-  /********************************************************/
-
-    /**
-     * Method: getLonLatFromViewPortPx
-     * Get a map location from a pixel location
-     * 
-     * Parameters:
-     * viewPortPx - {<OpenLayers.Pixel>}
-     *
-     * Returns:
-     *  {<OpenLayers.LonLat>} An OpenLayers.LonLat which is the passed-in view
-     *  port OpenLayers.Pixel, translated into lon/lat by map lib
-     *  If the map lib is not loaded or not centered, returns null
-     */
-    getLonLatFromViewPortPx: function (viewPortPx) {
-        var lonlat = null;
-        if ( (this.mapObject != null) && 
-             (this.getMapObjectCenter() != null) ) {
-            var moPixel = this.getMapObjectPixelFromOLPixel(viewPortPx);
-            var moLonLat = this.getMapObjectLonLatFromMapObjectPixel(moPixel);
-            lonlat = this.getOLLonLatFromMapObjectLonLat(moLonLat);
-        }
-        return lonlat;
-    },
-
- 
-    /**
-     * Method: getViewPortPxFromLonLat
-     * Get a pixel location from a map location
-     *
-     * Parameters:
-     * lonlat - {<OpenLayers.LonLat>}
-     *
-     * Returns:
-     * {<OpenLayers.Pixel>} An OpenLayers.Pixel which is the passed-in
-     * OpenLayers.LonLat, translated into view port pixels by map lib
-     * If map lib is not loaded or not centered, returns null
-     */
-    getViewPortPxFromLonLat: function (lonlat) {
-        var viewPortPx = null;
-        if ( (this.mapObject != null) && 
-             (this.getMapObjectCenter() != null) ) {
-
-            var moLonLat = this.getMapObjectLonLatFromOLLonLat(lonlat);
-            var moPixel = this.getMapObjectPixelFromMapObjectLonLat(moLonLat);
-        
-            viewPortPx = this.getOLPixelFromMapObjectPixel(moPixel);
-        }
-        return viewPortPx;
-    },
-
-  /********************************************************/
-  /*                                                      */
-  /*               Translation Functions                  */
-  /*                                                      */
-  /*   The following functions translate Map Object and   */
-  /*            OL formats for Pixel, LonLat              */
-  /*                                                      */
-  /********************************************************/
-
-  //
-  // TRANSLATION: MapObject LatLng <-> OpenLayers.LonLat
-  //
-
-    /**
-     * Method: getOLLonLatFromMapObjectLonLat
-     * Get an OL style map location from a 3rd party style map location
-     *
-     * Parameters
-     * moLonLat - {Object}
-     * 
-     * Returns:
-     * {<OpenLayers.LonLat>} An OpenLayers.LonLat, translated from the passed in 
-     *          MapObject LonLat
-     *          Returns null if null value is passed in
-     */
-    getOLLonLatFromMapObjectLonLat: function(moLonLat) {
-        var olLonLat = null;
-        if (moLonLat != null) {
-            var lon = this.getLongitudeFromMapObjectLonLat(moLonLat);
-            var lat = this.getLatitudeFromMapObjectLonLat(moLonLat);
-            olLonLat = new OpenLayers.LonLat(lon, lat);
-        }
-        return olLonLat;
-    },
-
-    /**
-     * Method: getMapObjectLonLatFromOLLonLat
-     * Get a 3rd party map location from an OL map location.
-     *
-     * Parameters:
-     * olLonLat - {<OpenLayers.LonLat>}
-     * 
-     * Returns:
-     * {Object} A MapObject LonLat, translated from the passed in 
-     *          OpenLayers.LonLat
-     *          Returns null if null value is passed in
-     */
-    getMapObjectLonLatFromOLLonLat: function(olLonLat) {
-        var moLatLng = null;
-        if (olLonLat != null) {
-            moLatLng = this.getMapObjectLonLatFromLonLat(olLonLat.lon,
-                                                         olLonLat.lat);
-        }
-        return moLatLng;
-    },
-
-
-  //
-  // TRANSLATION: MapObject Pixel <-> OpenLayers.Pixel
-  //
-
-    /**
-     * Method: getOLPixelFromMapObjectPixel
-     * Get an OL pixel location from a 3rd party pixel location.
-     *
-     * Parameters:
-     * moPixel - {Object}
-     * 
-     * Returns:
-     * {<OpenLayers.Pixel>} An OpenLayers.Pixel, translated from the passed in 
-     *          MapObject Pixel
-     *          Returns null if null value is passed in
-     */
-    getOLPixelFromMapObjectPixel: function(moPixel) {
-        var olPixel = null;
-        if (moPixel != null) {
-            var x = this.getXFromMapObjectPixel(moPixel);
-            var y = this.getYFromMapObjectPixel(moPixel);
-            olPixel = new OpenLayers.Pixel(x, y);
-        }
-        return olPixel;
-    },
-
-    /**
-     * Method: getMapObjectPixelFromOLPixel
-     * Get a 3rd party pixel location from an OL pixel location
-     *
-     * Parameters:
-     * olPixel - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {Object} A MapObject Pixel, translated from the passed in 
-     *          OpenLayers.Pixel
-     *          Returns null if null value is passed in
-     */
-    getMapObjectPixelFromOLPixel: function(olPixel) {
-        var moPixel = null;
-        if (olPixel != null) {
-            moPixel = this.getMapObjectPixelFromXY(olPixel.x, olPixel.y);
-        }
-        return moPixel;
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.EventPane"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/FixedZoomLevels.js
+++ /dev/null
@@ -1,316 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Layer.js
- */
-
-/**
- * Class: OpenLayers.Layer.FixedZoomLevels
- *   Some Layers will already have established zoom levels (like google 
- *    or ve). Instead of trying to determine them and populate a resolutions[]
- *    Array with those values, we will hijack the resolution functionality
- *    here.
- * 
- *   When you subclass FixedZoomLevels: 
- * 
- *   The initResolutions() call gets nullified, meaning no resolutions[] array 
- *    is set up. Which would be a big problem getResolution() in Layer, since 
- *    it merely takes map.zoom and indexes into resolutions[]... but....
- * 
- *   The getResolution() call is also overridden. Instead of using the 
- *    resolutions[] array, we simply calculate the current resolution based
- *    on the current extent and the current map size. But how will we be able
- *    to calculate the current extent without knowing the resolution...?
- *  
- *   The getExtent() function is also overridden. Instead of calculating extent
- *    based on the center point and the current resolution, we instead 
- *    calculate the extent by getting the lonlats at the top-left and 
- *    bottom-right by using the getLonLatFromViewPortPx() translation function,
- *    taken from the pixel locations (0,0) and the size of the map. But how 
- *    will we be able to do lonlat-px translation without resolution....?
- * 
- *   The getZoomForResolution() method is overridden. Instead of indexing into
- *    the resolutions[] array, we call OpenLayers.Layer.getExent(), passing in
- *    the desired resolution. With this extent, we then call getZoomForExtent() 
- * 
- * 
- *   Whenever you implement a layer using OpenLayers.Layer.FixedZoomLevels, 
- *    it is your responsibility to provide the following three functions:
- * 
- *   - getLonLatFromViewPortPx
- *   - getViewPortPxFromLonLat
- *   - getZoomForExtent
- * 
- *  ...those three functions should generally be provided by any reasonable 
- *  API that you might be working from.
- *
- */
-OpenLayers.Layer.FixedZoomLevels = OpenLayers.Class({
-      
-  /********************************************************/
-  /*                                                      */
-  /*                 Baselayer Functions                  */
-  /*                                                      */
-  /*    The following functions must all be implemented   */
-  /*                  by all base layers                  */
-  /*                                                      */
-  /********************************************************/
-    
-    /**
-     * Constructor: OpenLayers.Layer.FixedZoomLevels
-     * Create a new fixed zoom levels layer.
-     */
-    initialize: function() {
-        //this class is only just to add the following functions... 
-        // nothing to actually do here... but it is probably a good
-        // idea to have layers that use these functions call this 
-        // inititalize() anyways, in case at some point we decide we 
-        // do want to put some functionality or state in here. 
-    },
-    
-    /**
-     * Method: initResolutions
-     * Populate the resolutions array
-     */
-    initResolutions: function() {
-
-        var props = new Array('minZoomLevel', 'maxZoomLevel', 'numZoomLevels');
-          
-        for(var i=0, len=props.length; i<len; i++) {
-            var property = props[i];
-            this[property] = (this.options[property] != null)  
-                                     ? this.options[property] 
-                                     : this.map[property];
-        }
-
-        if ( (this.minZoomLevel == null) ||
-             (this.minZoomLevel < this.MIN_ZOOM_LEVEL) ){
-            this.minZoomLevel = this.MIN_ZOOM_LEVEL;
-        }        
-
-        //
-        // At this point, we know what the minimum desired zoom level is, and
-        //  we must calculate the total number of zoom levels. 
-        //  
-        //  Because we allow for the setting of either the 'numZoomLevels'
-        //   or the 'maxZoomLevel' properties... on either the layer or the  
-        //   map, we have to define some rules to see which we take into
-        //   account first in this calculation. 
-        //
-        // The following is the precedence list for these properties:
-        // 
-        // (1) numZoomLevels set on layer
-        // (2) maxZoomLevel set on layer
-        // (3) numZoomLevels set on map
-        // (4) maxZoomLevel set on map*
-        // (5) none of the above*
-        //
-        // *Note that options (4) and (5) are only possible if the user 
-        //  _explicitly_ sets the 'numZoomLevels' property on the map to 
-        //  null, since it is set by default to 16. 
-        //
-
-        //
-        // Note to future: In 3.0, I think we should remove the default 
-        // value of 16 for map.numZoomLevels. Rather, I think that value 
-        // should be set as a default on the Layer.WMS class. If someone
-        // creates a 3rd party layer and does not specify any 'minZoomLevel', 
-        // 'maxZoomLevel', or 'numZoomLevels', and has not explicitly 
-        // specified any of those on the map object either.. then I think
-        // it is fair to say that s/he wants all the zoom levels available.
-        // 
-        // By making map.numZoomLevels *null* by default, that will be the 
-        // case. As it is, I don't feel comfortable changing that right now
-        // as it would be a glaring API change and actually would probably
-        // break many peoples' codes. 
-        //
-
-        //the number of zoom levels we'd like to have.
-        var desiredZoomLevels;
-
-        //this is the maximum number of zoom levels the layer will allow, 
-        // given the specified starting minimum zoom level.
-        var limitZoomLevels = this.MAX_ZOOM_LEVEL - this.minZoomLevel + 1;
-
-        if ( ((this.options.numZoomLevels == null) && 
-              (this.options.maxZoomLevel != null)) // (2)
-              ||
-             ((this.numZoomLevels == null) &&
-              (this.maxZoomLevel != null)) // (4)
-           ) {
-            //calculate based on specified maxZoomLevel (on layer or map)
-            desiredZoomLevels = this.maxZoomLevel - this.minZoomLevel + 1;
-        } else {
-            //calculate based on specified numZoomLevels (on layer or map)
-            // this covers cases (1) and (3)
-            desiredZoomLevels = this.numZoomLevels;
-        }
-
-        if (desiredZoomLevels != null) {
-            //Now that we know what we would *like* the number of zoom levels
-            // to be, based on layer or map options, we have to make sure that
-            // it does not conflict with the actual limit, as specified by 
-            // the constants on the layer itself (and calculated into the
-            // 'limitZoomLevels' variable). 
-            this.numZoomLevels = Math.min(desiredZoomLevels, limitZoomLevels);
-        } else {
-            // case (5) -- neither 'numZoomLevels' not 'maxZoomLevel' was 
-            // set on either the layer or the map. So we just use the 
-            // maximum limit as calculated by the layer's constants.
-            this.numZoomLevels = limitZoomLevels;
-        }
-
-        //now that the 'numZoomLevels' is appropriately, safely set, 
-        // we go back and re-calculate the 'maxZoomLevel'.
-        this.maxZoomLevel = this.minZoomLevel + this.numZoomLevels - 1;
-
-        if (this.RESOLUTIONS != null) {
-            var resolutionsIndex = 0;
-            this.resolutions = [];
-            for(var i= this.minZoomLevel; i <= this.maxZoomLevel; i++) {
-                this.resolutions[resolutionsIndex++] = this.RESOLUTIONS[i];            
-            }
-            this.maxResolution = this.resolutions[0];
-            this.minResolution = this.resolutions[this.resolutions.length - 1];
-        }       
-    },
-    
-    /**
-     * APIMethod: getResolution
-     * Get the current map resolution
-     * 
-     * Returns:
-     * {Float} Map units per Pixel
-     */
-    getResolution: function() {
-
-        if (this.resolutions != null) {
-            return OpenLayers.Layer.prototype.getResolution.apply(this, arguments);
-        } else {
-            var resolution = null;
-            
-            var viewSize = this.map.getSize();
-            var extent = this.getExtent();
-            
-            if ((viewSize != null) && (extent != null)) {
-                resolution = Math.max( extent.getWidth()  / viewSize.w,
-                                       extent.getHeight() / viewSize.h );
-            }
-            return resolution;
-        }
-     },
-
-    /**
-     * APIMethod: getExtent
-     * Calculates using px-> lonlat translation functions on tl and br 
-     *     corners of viewport
-     * 
-     * Returns:
-     * {<OpenLayers.Bounds>} A Bounds object which represents the lon/lat 
-     *                       bounds of the current viewPort.
-     */
-    getExtent: function () {
-        var extent = null;
-        
-        
-        var size = this.map.getSize();
-        
-        var tlPx = new OpenLayers.Pixel(0,0);
-        var tlLL = this.getLonLatFromViewPortPx(tlPx);
-
-        var brPx = new OpenLayers.Pixel(size.w, size.h);
-        var brLL = this.getLonLatFromViewPortPx(brPx);
-        
-        if ((tlLL != null) && (brLL != null)) {
-            extent = new OpenLayers.Bounds(tlLL.lon, 
-                                       brLL.lat, 
-                                       brLL.lon, 
-                                       tlLL.lat);
-        }
-
-        return extent;
-    },
-
-    /**
-     * Method: getZoomForResolution
-     * Get the zoom level for a given resolution
-     *
-     * Parameters:
-     * resolution - {Float}
-     *
-     * Returns:
-     * {Integer} A suitable zoom level for the specified resolution.
-     *           If no baselayer is set, returns null.
-     */
-    getZoomForResolution: function(resolution) {
-      
-        if (this.resolutions != null) {
-            return OpenLayers.Layer.prototype.getZoomForResolution.apply(this, arguments);
-        } else {
-            var extent = OpenLayers.Layer.prototype.getExtent.apply(this, []);
-            return this.getZoomForExtent(extent);
-        }
-    },
-
-
-
-    
-    /********************************************************/
-    /*                                                      */
-    /*             Translation Functions                    */
-    /*                                                      */
-    /*    The following functions translate GMaps and OL    */ 
-    /*     formats for Pixel, LonLat, Bounds, and Zoom      */
-    /*                                                      */
-    /********************************************************/
-    
-    
-    //
-    // TRANSLATION: MapObject Zoom <-> OpenLayers Zoom
-    //
-  
-    /**
-     * Method: getOLZoomFromMapObjectZoom
-     * Get the OL zoom index from the map object zoom level
-     *
-     * Parameters:
-     * moZoom - {Integer}
-     * 
-     * Returns:
-     * {Integer} An OpenLayers Zoom level, translated from the passed in zoom
-     *           Returns null if null value is passed in
-     */
-    getOLZoomFromMapObjectZoom: function(moZoom) {
-        var zoom = null;
-        if (moZoom != null) {
-            zoom = moZoom - this.minZoomLevel;
-        }
-        return zoom;
-    },
-    
-    /**
-     * Method: getMapObjectZoomFromOLZoom
-     * Get the map object zoom level from the OL zoom level
-     *
-     * Parameters:
-     * olZoom - {Integer}
-     * 
-     * Returns:
-     * {Integer} A MapObject level, translated from the passed in olZoom
-     *           Returns null if null value is passed in
-     */
-    getMapObjectZoomFromOLZoom: function(olZoom) {
-        var zoom = null; 
-        if (olZoom != null) {
-            zoom = olZoom + this.minZoomLevel;
-        }
-        return zoom;
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.FixedZoomLevels"
-});
-
-

--- a/labs/openlayers/lib/OpenLayers/Layer/GML.js
+++ /dev/null
@@ -1,175 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Layer/Vector.js
- * @requires OpenLayers/Request/XMLHttpRequest.js
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Layer.GML
- * Create a vector layer by parsing a GML file. The GML file is
- *     passed in as a parameter.
- * *Deprecated*.  To be removed in 3.0.  Instead use OpenLayers.Layer.Vector
- *     with Protocol.HTTP and Strategy.Fixed. Provide the protocol with a 
- *     format parameter to get the parser you want for your data.
- *
- * Inherits from:
- *  - <OpenLayers.Layer.Vector>
- */
-OpenLayers.Layer.GML = OpenLayers.Class(OpenLayers.Layer.Vector, {
-    
-    /**
-      * Property: loaded
-      * {Boolean} Flag for whether the GML data has been loaded yet.
-      */
-    loaded: false,
-
-    /**
-      * APIProperty: format
-      * {<OpenLayers.Format>} The format you want the data to be parsed with.
-      */
-    format: null,
-
-    /**
-     * APIProperty: formatOptions
-     * {Object} Hash of options which should be passed to the format when it is
-     * created. Must be passed in the constructor.
-     */
-    formatOptions: null, 
-    
-    /**
-     * Constructor: OpenLayers.Layer.GML
-     * Load and parse a single file on the web, according to the format
-     * provided via the 'format' option, defaulting to GML. 
-     *
-     * Parameters:
-     * name - {String} 
-     * url - {String} URL of a GML file.
-     * options - {Object} Hashtable of extra options to tag onto the layer.
-     */
-     initialize: function(name, url, options) {
-        var newArguments = [];
-        newArguments.push(name, options);
-        OpenLayers.Layer.Vector.prototype.initialize.apply(this, newArguments);
-        this.url = url;
-    },
-
-    /**
-     * APIMethod: setVisibility
-     * Set the visibility flag for the layer and hide/show&redraw accordingly. 
-     * Fire event unless otherwise specified
-     * GML will be loaded if the layer is being made visible for the first
-     * time.
-     *  
-     * Parameters:
-     * visible - {Boolean} Whether or not to display the layer 
-     *                          (if in range)
-     * noEvent - {Boolean} 
-     */
-    setVisibility: function(visibility, noEvent) {
-        OpenLayers.Layer.Vector.prototype.setVisibility.apply(this, arguments);
-        if(this.visibility && !this.loaded){
-            // Load the GML
-            this.loadGML();
-        }
-    },
-
-    /**
-     * Method: moveTo
-     * If layer is visible and GML has not been loaded, load GML, then load GML
-     * and call OpenLayers.Layer.Vector.moveTo() to redraw at the new location.
-     * 
-     * Parameters:
-     * bounds - {Object} 
-     * zoomChanged - {Object} 
-     * minor - {Object} 
-     */
-    moveTo:function(bounds, zoomChanged, minor) {
-        OpenLayers.Layer.Vector.prototype.moveTo.apply(this, arguments);
-        // Wait until initialisation is complete before loading GML
-        // otherwise we can get a race condition where the root HTML DOM is
-        // loaded after the GML is paited.
-        // See http://trac.openlayers.org/ticket/404
-        if(this.visibility && !this.loaded){
-            this.loadGML();
-        }
-    },
-
-    /**
-     * Method: loadGML
-     */
-    loadGML: function() {
-        if (!this.loaded) {
-            this.events.triggerEvent("loadstart");
-            OpenLayers.Request.GET({
-                url: this.url,
-                success: this.requestSuccess,
-                failure: this.requestFailure,
-                scope: this
-            });
-            this.loaded = true;
-        }    
-    },    
-    
-    /**
-     * Method: setUrl
-     * Change the URL and reload the GML
-     *
-     * Parameters:
-     * url - {String} URL of a GML file.
-     */
-    setUrl:function(url) {
-        this.url = url;
-        this.destroyFeatures();
-        this.loaded = false;
-        this.loadGML();
-    },
-    
-    /**
-     * Method: requestSuccess
-     * Process GML after it has been loaded.
-     * Called by initialize() and loadUrl() after the GML has been loaded.
-     *
-     * Parameters:
-     * request - {String} 
-     */
-    requestSuccess:function(request) {
-        var doc = request.responseXML;
-        
-        if (!doc || !doc.documentElement) {
-            doc = request.responseText;
-        }
-        
-        var options = {};
-        
-        OpenLayers.Util.extend(options, this.formatOptions);
-        if (this.map && !this.projection.equals(this.map.getProjectionObject())) {
-            options.externalProjection = this.projection;
-            options.internalProjection = this.map.getProjectionObject();
-        }    
-        
-        var gml = this.format ? new this.format(options) : new OpenLayers.Format.GML(options);
-        this.addFeatures(gml.read(doc));
-        this.events.triggerEvent("loadend");
-    },
-    
-    /**
-     * Method: requestFailure
-     * Process a failed loading of GML.
-     * Called by initialize() and loadUrl() if there was a problem loading GML.
-     *
-     * Parameters:
-     * request - {String} 
-     */
-    requestFailure: function(request) {
-        OpenLayers.Console.userError(OpenLayers.i18n("errorLoadingGML", {'url':this.url}));
-        this.events.triggerEvent("loadend");
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.GML"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/GeoRSS.js
+++ /dev/null
@@ -1,267 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer/Markers.js
- * @requires OpenLayers/Request/XMLHttpRequest.js
- */
-
-/**
- * Class: OpenLayers.Layer.GeoRSS
- * Add GeoRSS Point features to your map. 
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.Markers>
- *  - <OpenLayers.Layer>
- */
-OpenLayers.Layer.GeoRSS = OpenLayers.Class(OpenLayers.Layer.Markers, {
-
-    /** 
-     * Property: location 
-     * {String} store url of text file 
-     */
-    location: null,
-
-    /** 
-     * Property: features 
-     * {Array(<OpenLayers.Feature>)} 
-     */
-    features: null,
-    
-    /**
-     * APIProperty: formatOptions
-     * {Object} Hash of options which should be passed to the format when it is
-     * created. Must be passed in the constructor.
-     */
-    formatOptions: null, 
-
-    /** 
-     * Property: selectedFeature 
-     * {<OpenLayers.Feature>} 
-     */
-    selectedFeature: null,
-
-    /** 
-     * APIProperty: icon 
-     * {<OpenLayers.Icon>}. This determines the Icon to be used on the map
-     * for this GeoRSS layer.
-     */
-    icon: null,
-
-    /**
-     * APIProperty: popupSize
-     * {<OpenLayers.Size>} This determines the size of GeoRSS popups. If 
-     * not provided, defaults to 250px by 120px. 
-     */
-    popupSize: null, 
-    
-    /** 
-     * APIProperty: useFeedTitle 
-     * {Boolean} Set layer.name to the first <title> element in the feed. Default is true. 
-     */
-    useFeedTitle: true,
-    
-    /**
-    * Constructor: OpenLayers.Layer.GeoRSS
-    * Create a GeoRSS Layer.
-    *
-    * Parameters:
-    * name - {String} 
-    * location - {String} 
-    * options - {Object}
-    */
-    initialize: function(name, location, options) {
-        OpenLayers.Layer.Markers.prototype.initialize.apply(this, [name, options]);
-        this.location = location;
-        this.features = [];
-    },
-
-    /**
-     * Method: destroy 
-     */
-    destroy: function() {
-        // Warning: Layer.Markers.destroy() must be called prior to calling
-        // clearFeatures() here, otherwise we leak memory. Indeed, if
-        // Layer.Markers.destroy() is called after clearFeatures(), it won't be
-        // able to remove the marker image elements from the layer's div since
-        // the markers will have been destroyed by clearFeatures().
-        OpenLayers.Layer.Markers.prototype.destroy.apply(this, arguments);
-        this.clearFeatures();
-        this.features = null;
-    },
-
-    /**
-     * Method: loadRSS
-     * Start the load of the RSS data. Don't do this when we first add the layer,
-     * since we may not be visible at any point, and it would therefore be a waste.
-     */
-    loadRSS: function() {
-        if (!this.loaded) {
-            this.events.triggerEvent("loadstart");
-            OpenLayers.Request.GET({
-                url: this.location,
-                success: this.parseData,
-                scope: this
-            });
-            this.loaded = true;
-        }    
-    },    
-    
-    /**
-     * Method: moveTo
-     * If layer is visible and RSS has not been loaded, load RSS. 
-     * 
-     * Parameters:
-     * bounds - {Object} 
-     * zoomChanged - {Object} 
-     * minor - {Object} 
-     */
-    moveTo:function(bounds, zoomChanged, minor) {
-        OpenLayers.Layer.Markers.prototype.moveTo.apply(this, arguments);
-        if(this.visibility && !this.loaded){
-            this.loadRSS();
-        }
-    },
-        
-    /**
-     * Method: parseData
-     * Parse the data returned from the Events call.
-     *
-     * Parameters:
-     * ajaxRequest - {<OpenLayers.Request.XMLHttpRequest>} 
-     */
-    parseData: function(ajaxRequest) {
-        var doc = ajaxRequest.responseXML;
-        if (!doc || !doc.documentElement) {
-            doc = OpenLayers.Format.XML.prototype.read(ajaxRequest.responseText);
-        }
-        
-        if (this.useFeedTitle) {
-            var name = null;
-            try {
-                name = doc.getElementsByTagNameNS('*', 'title')[0].firstChild.nodeValue;
-            }
-            catch (e) {
-                name = doc.getElementsByTagName('title')[0].firstChild.nodeValue;
-            }
-            if (name) {
-                this.setName(name);
-            }    
-        }
-       
-        var options = {};
-        
-        OpenLayers.Util.extend(options, this.formatOptions);
-        
-        if (this.map && !this.projection.equals(this.map.getProjectionObject())) {
-            options.externalProjection = this.projection;
-            options.internalProjection = this.map.getProjectionObject();
-        }    
-        
-        var format = new OpenLayers.Format.GeoRSS(options);
-        var features = format.read(doc);
-        
-        for (var i=0, len=features.length; i<len; i++) {
-            var data = {};
-            var feature = features[i];
-            
-            // we don't support features with no geometry in the GeoRSS
-            // layer at this time. 
-            if (!feature.geometry) {
-                continue;
-            }    
-            
-            var title = feature.attributes.title ? 
-                         feature.attributes.title : "Untitled";
-            
-            var description = feature.attributes.description ? 
-                         feature.attributes.description : "No description.";
-            
-            var link = feature.attributes.link ? feature.attributes.link : "";
-
-            var location = feature.geometry.getBounds().getCenterLonLat();
-            
-            
-            data.icon = this.icon == null ? 
-                                     OpenLayers.Marker.defaultIcon() : 
-                                     this.icon.clone();
-            
-            data.popupSize = this.popupSize ? 
-                             this.popupSize.clone() :
-                             new OpenLayers.Size(250, 120);
-            
-            if (title || description) {
-                // we have supplemental data, store them.
-                data.title = title;
-                data.description = description;
-            
-                var contentHTML = '<div class="olLayerGeoRSSClose">[x]</div>'; 
-                contentHTML += '<div class="olLayerGeoRSSTitle">';
-                if (link) {
-                    contentHTML += '<a class="link" href="'+link+'" target="_blank">';
-                }
-                contentHTML += title;
-                if (link) {
-                    contentHTML += '</a>';
-                }
-                contentHTML += '</div>';
-                contentHTML += '<div style="" class="olLayerGeoRSSDescription">';
-                contentHTML += description;
-                contentHTML += '</div>';
-                data['popupContentHTML'] = contentHTML;                
-            }
-            var feature = new OpenLayers.Feature(this, location, data);
-            this.features.push(feature);
-            var marker = feature.createMarker();
-            marker.events.register('click', feature, this.markerClick);
-            this.addMarker(marker);
-        }
-        this.events.triggerEvent("loadend");
-    },
-    
-    /**
-     * Method: markerClick
-     *
-     * Parameters:
-     * evt - {Event} 
-     */
-    markerClick: function(evt) {
-        var sameMarkerClicked = (this == this.layer.selectedFeature);
-        this.layer.selectedFeature = (!sameMarkerClicked) ? this : null;
-        for(var i=0, len=this.layer.map.popups.length; i<len; i++) {
-            this.layer.map.removePopup(this.layer.map.popups[i]);
-        }
-        if (!sameMarkerClicked) {
-            var popup = this.createPopup();
-            OpenLayers.Event.observe(popup.div, "click",
-                OpenLayers.Function.bind(function() { 
-                    for(var i=0, len=this.layer.map.popups.length; i<len; i++) { 
-                        this.layer.map.removePopup(this.layer.map.popups[i]); 
-                    }
-                }, this)
-            );
-            this.layer.map.addPopup(popup); 
-        }
-        OpenLayers.Event.stop(evt);
-    },
-
-    /**
-     * Method: clearFeatures
-     * Destroy all features in this layer.
-     */
-    clearFeatures: function() {
-        if (this.features != null) {
-            while(this.features.length > 0) {
-                var feature = this.features[0];
-                OpenLayers.Util.removeItem(this.features, feature);
-                feature.destroy();
-            }
-        }        
-    },
-    
-    CLASS_NAME: "OpenLayers.Layer.GeoRSS"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/Google.js
+++ /dev/null
@@ -1,796 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer/SphericalMercator.js
- * @requires OpenLayers/Layer/EventPane.js
- * @requires OpenLayers/Layer/FixedZoomLevels.js
- */
-
-/**
- * Class: OpenLayers.Layer.Google
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.SphericalMercator>
- *  - <OpenLayers.Layer.EventPane>
- *  - <OpenLayers.Layer.FixedZoomLevels>
- */
-OpenLayers.Layer.Google = OpenLayers.Class(
-    OpenLayers.Layer.EventPane, 
-    OpenLayers.Layer.FixedZoomLevels, {
-    
-    /** 
-     * Constant: MIN_ZOOM_LEVEL
-     * {Integer} 0 
-     */
-    MIN_ZOOM_LEVEL: 0,
-    
-    /** 
-     * Constant: MAX_ZOOM_LEVEL
-     * {Integer} 21
-     */
-    MAX_ZOOM_LEVEL: 21,
-
-    /** 
-     * Constant: RESOLUTIONS
-     * {Array(Float)} Hardcode these resolutions so that they are more closely
-     *                tied with the standard wms projection
-     */
-    RESOLUTIONS: [
-        1.40625, 
-        0.703125, 
-        0.3515625, 
-        0.17578125, 
-        0.087890625, 
-        0.0439453125,
-        0.02197265625, 
-        0.010986328125, 
-        0.0054931640625, 
-        0.00274658203125,
-        0.001373291015625, 
-        0.0006866455078125, 
-        0.00034332275390625,
-        0.000171661376953125, 
-        0.0000858306884765625, 
-        0.00004291534423828125,
-        0.00002145767211914062, 
-        0.00001072883605957031,
-        0.00000536441802978515, 
-        0.00000268220901489257,
-        0.0000013411045074462891,
-        0.00000067055225372314453
-    ],
-
-    /**
-     * APIProperty: type
-     * {GMapType}
-     */
-    type: null,
-
-    /**
-     * APIProperty: wrapDateLine
-     * {Boolean} Allow user to pan forever east/west.  Default is true.  
-     *     Setting this to false only restricts panning if 
-     *     <sphericalMercator> is true. 
-     */
-    wrapDateLine: true,
-
-    /**
-     * APIProperty: sphericalMercator
-     * {Boolean} Should the map act as a mercator-projected map? This will
-     *     cause all interactions with the map to be in the actual map 
-     *     projection, which allows support for vector drawing, overlaying 
-     *     other maps, etc. 
-     */
-    sphericalMercator: false, 
-    
-    /**
-     * Property: version
-     * {Number} The version of the Google Maps API
-     */
-    version: null,
-
-    /** 
-     * Constructor: OpenLayers.Layer.Google
-     * 
-     * Parameters:
-     * name - {String} A name for the layer.
-     * options - {Object} An optional object whose properties will be set
-     *     on the layer.
-     */
-    initialize: function(name, options) {
-        options = options || {};
-        if(!options.version) {
-            options.version = typeof GMap2 === "function" ? "2" : "3";
-        }
-        var mixin = OpenLayers.Layer.Google["v" +
-            options.version.replace(/\./g, "_")];
-        if (mixin) {
-            OpenLayers.Util.applyDefaults(options, mixin);
-        } else {
-            throw "Unsupported Google Maps API version: " + options.version;
-        }
-
-        OpenLayers.Util.applyDefaults(options, mixin.DEFAULTS);
-        if (options.maxExtent) {
-            options.maxExtent = options.maxExtent.clone();
-        }
-
-        OpenLayers.Layer.EventPane.prototype.initialize.apply(this,
-            [name, options]);
-        OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this, 
-            [name, options]);
-
-        if (this.sphericalMercator) {
-            OpenLayers.Util.extend(this, OpenLayers.Layer.SphericalMercator);
-            this.initMercatorParameters();
-        }    
-    },
-
-    /**
-     * Method: clone
-     * Create a clone of this layer
-     *
-     * Returns:
-     * {<OpenLayers.Layer.Google>} An exact clone of this layer
-     */
-    clone: function() {
-        /**
-         * This method isn't intended to be called by a subclass and it
-         * doesn't call the same method on the superclass.  We don't call
-         * the super's clone because we don't want properties that are set
-         * on this layer after initialize (i.e. this.mapObject etc.).
-         */
-        return new OpenLayers.Layer.Google(
-            this.name, this.getOptions()
-        );
-    },
-
-    /**
-     * APIMethod: setVisibility
-     * Set the visibility flag for the layer and hide/show & redraw 
-     *     accordingly. Fire event unless otherwise specified
-     * 
-     * Note that visibility is no longer simply whether or not the layer's
-     *     style.display is set to "block". Now we store a 'visibility' state 
-     *     property on the layer class, this allows us to remember whether or 
-     *     not we *desire* for a layer to be visible. In the case where the 
-     *     map's resolution is out of the layer's range, this desire may be 
-     *     subverted.
-     * 
-     * Parameters:
-     * visible - {Boolean} Display the layer (if in range)
-     */
-    setVisibility: function(visible) {
-        // sharing a map container, opacity has to be set per layer
-        var opacity = this.opacity == null ? 1 : this.opacity;
-        OpenLayers.Layer.EventPane.prototype.setVisibility.apply(this, arguments);
-        this.setOpacity(opacity);
-    },
-    
-    /** 
-     * APIMethod: display
-     * Hide or show the Layer
-     * 
-     * Parameters:
-     * display - {Boolean}
-     */
-    display: function(visible) {
-        if (!this._dragging) {
-            this.setGMapVisibility(visible);
-        }
-        OpenLayers.Layer.EventPane.prototype.display.apply(this, arguments);
-    },
-    
-    /**
-     * Method: moveTo
-     * 
-     * Parameters:
-     * bound - {<OpenLayers.Bounds>}
-     * zoomChanged - {Boolean} Tells when zoom has changed, as layers have to
-     *     do some init work in that case.
-     * dragging - {Boolean}
-     */
-    moveTo: function(bounds, zoomChanged, dragging) {
-        this._dragging = dragging;
-        OpenLayers.Layer.EventPane.prototype.moveTo.apply(this, arguments);
-        delete this._dragging;
-    },
-    
-    /**
-     * APIMethod: setOpacity
-     * Sets the opacity for the entire layer (all images)
-     * 
-     * Parameter:
-     * opacity - {Float}
-     */
-    setOpacity: function(opacity) {
-        if (opacity !== this.opacity) {
-            if (this.map != null) {
-                this.map.events.triggerEvent("changelayer", {
-                    layer: this,
-                    property: "opacity"
-                });
-            }
-            this.opacity = opacity;
-        }
-        // Though this layer's opacity may not change, we're sharing a container
-        // and need to update the opacity for the entire container.
-        if (this.getVisibility()) {
-            var container = this.getMapContainer();
-            OpenLayers.Util.modifyDOMElement(
-                container, null, null, null, null, null, null, opacity
-            );
-        }
-    },
-
-    /**
-     * APIMethod: destroy
-     * Clean up this layer.
-     */
-    destroy: function() {
-        /**
-         * We have to override this method because the event pane destroy
-         * deletes the mapObject reference before removing this layer from
-         * the map.
-         */
-        if (this.map) {
-            this.setGMapVisibility(false);
-            var cache = OpenLayers.Layer.Google.cache[this.map.id];
-            if (cache && cache.count <= 1) {
-                this.removeGMapElements();
-            }            
-        }
-        OpenLayers.Layer.EventPane.prototype.destroy.apply(this, arguments);
-    },
-    
-    /**
-     * Method: removeGMapElements
-     * Remove all elements added to the dom.  This should only be called if
-     * this is the last of the Google layers for the given map.
-     */
-    removeGMapElements: function() {
-        var cache = OpenLayers.Layer.Google.cache[this.map.id];
-        if (cache) {
-            // remove shared elements from dom
-            var container = this.mapObject && this.getMapContainer();                
-            if (container && container.parentNode) {
-                container.parentNode.removeChild(container);
-            }
-            var termsOfUse = cache.termsOfUse;
-            if (termsOfUse && termsOfUse.parentNode) {
-                termsOfUse.parentNode.removeChild(termsOfUse);
-            }
-            var poweredBy = cache.poweredBy;
-            if (poweredBy && poweredBy.parentNode) {
-                poweredBy.parentNode.removeChild(poweredBy);
-            }
-        }
-    },
-
-    /**
-     * APIMethod: removeMap
-     * On being removed from the map, also remove termsOfUse and poweredBy divs
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>}
-     */
-    removeMap: function(map) {
-        // hide layer before removing
-        if (this.visibility && this.mapObject) {
-            this.setGMapVisibility(false);
-        }
-        // check to see if last Google layer in this map
-        var cache = OpenLayers.Layer.Google.cache[map.id];
-        if (cache) {
-            if (cache.count <= 1) {
-                this.removeGMapElements();
-                delete OpenLayers.Layer.Google.cache[map.id];
-            } else {
-                // decrement the layer count
-                --cache.count;
-            }
-        }
-        // remove references to gmap elements
-        delete this.termsOfUse;
-        delete this.poweredBy;
-        delete this.mapObject;
-        delete this.dragObject;
-        OpenLayers.Layer.EventPane.prototype.removeMap.apply(this, arguments);
-    },
-    
-  //
-  // TRANSLATION: MapObject Bounds <-> OpenLayers.Bounds
-  //
-
-    /**
-     * APIMethod: getOLBoundsFromMapObjectBounds
-     * 
-     * Parameters:
-     * moBounds - {Object}
-     * 
-     * Returns:
-     * {<OpenLayers.Bounds>} An <OpenLayers.Bounds>, translated from the 
-     *                       passed-in MapObject Bounds.
-     *                       Returns null if null value is passed in.
-     */
-    getOLBoundsFromMapObjectBounds: function(moBounds) {
-        var olBounds = null;
-        if (moBounds != null) {
-            var sw = moBounds.getSouthWest();
-            var ne = moBounds.getNorthEast();
-            if (this.sphericalMercator) {
-                sw = this.forwardMercator(sw.lng(), sw.lat());
-                ne = this.forwardMercator(ne.lng(), ne.lat());
-            } else {
-                sw = new OpenLayers.LonLat(sw.lng(), sw.lat()); 
-                ne = new OpenLayers.LonLat(ne.lng(), ne.lat()); 
-            }    
-            olBounds = new OpenLayers.Bounds(sw.lon, 
-                                             sw.lat, 
-                                             ne.lon, 
-                                             ne.lat );
-        }
-        return olBounds;
-    },
-
-    /** 
-     * APIMethod: getWarningHTML
-     * 
-     * Returns: 
-     * {String} String with information on why layer is broken, how to get
-     *          it working.
-     */
-    getWarningHTML:function() {
-        return OpenLayers.i18n("googleWarning");
-    },
-
-
-    /************************************
-     *                                  *
-     *   MapObject Interface Controls   *
-     *                                  *
-     ************************************/
-
-
-  // Get&Set Center, Zoom
-
-    /**
-     * APIMethod: getMapObjectCenter
-     * 
-     * Returns: 
-     * {Object} The mapObject's current center in Map Object format
-     */
-    getMapObjectCenter: function() {
-        return this.mapObject.getCenter();
-    },
-
-    /** 
-     * APIMethod: getMapObjectZoom
-     * 
-     * Returns:
-     * {Integer} The mapObject's current zoom, in Map Object format
-     */
-    getMapObjectZoom: function() {
-        return this.mapObject.getZoom();
-    },
-
-  
-    /************************************
-     *                                  *
-     *       MapObject Primitives       *
-     *                                  *
-     ************************************/
-
-
-  // LonLat
-    
-    /**
-     * APIMethod: getLongitudeFromMapObjectLonLat
-     * 
-     * Parameters:
-     * moLonLat - {Object} MapObject LonLat format
-     * 
-     * Returns:
-     * {Float} Longitude of the given MapObject LonLat
-     */
-    getLongitudeFromMapObjectLonLat: function(moLonLat) {
-        return this.sphericalMercator ? 
-          this.forwardMercator(moLonLat.lng(), moLonLat.lat()).lon :
-          moLonLat.lng();  
-    },
-
-    /**
-     * APIMethod: getLatitudeFromMapObjectLonLat
-     * 
-     * Parameters:
-     * moLonLat - {Object} MapObject LonLat format
-     * 
-     * Returns:
-     * {Float} Latitude of the given MapObject LonLat
-     */
-    getLatitudeFromMapObjectLonLat: function(moLonLat) {
-        var lat = this.sphericalMercator ? 
-          this.forwardMercator(moLonLat.lng(), moLonLat.lat()).lat :
-          moLonLat.lat(); 
-        return lat;  
-    },
-    
-  // Pixel
-    
-    /**
-     * APIMethod: getXFromMapObjectPixel
-     * 
-     * Parameters:
-     * moPixel - {Object} MapObject Pixel format
-     * 
-     * Returns:
-     * {Integer} X value of the MapObject Pixel
-     */
-    getXFromMapObjectPixel: function(moPixel) {
-        return moPixel.x;
-    },
-
-    /**
-     * APIMethod: getYFromMapObjectPixel
-     * 
-     * Parameters:
-     * moPixel - {Object} MapObject Pixel format
-     * 
-     * Returns:
-     * {Integer} Y value of the MapObject Pixel
-     */
-    getYFromMapObjectPixel: function(moPixel) {
-        return moPixel.y;
-    },
-    
-    CLASS_NAME: "OpenLayers.Layer.Google"
-});
-
-/**
- * Property: OpenLayers.Layer.Google.cache
- * {Object} Cache for elements that should only be created once per map.
- */
-OpenLayers.Layer.Google.cache = {};
-
-
-/**
- * Constant: OpenLayers.Layer.Google.v2
- * 
- * Mixin providing functionality specific to the Google Maps API v2.
- */
-OpenLayers.Layer.Google.v2 = {
-    
-    /**
-     * Property: termsOfUse
-     * {DOMElement} Div for Google's copyright and terms of use link
-     */
-    termsOfUse: null, 
-
-    /**
-     * Property: poweredBy
-     * {DOMElement} Div for Google's powered by logo and link
-     */
-    poweredBy: null, 
-
-    /**
-     * Property: dragObject
-     * {GDraggableObject} Since 2.93, Google has exposed the ability to get
-     *     the maps GDraggableObject. We can now use this for smooth panning
-     */
-    dragObject: null, 
-    
-    /** 
-     * Method: loadMapObject
-     * Load the GMap and register appropriate event listeners. If we can't 
-     *     load GMap2, then display a warning message.
-     */
-    loadMapObject:function() {
-        if (!this.type) {
-            this.type = G_NORMAL_MAP;
-        }
-        var mapObject, termsOfUse, poweredBy;
-        var cache = OpenLayers.Layer.Google.cache[this.map.id];
-        if (cache) {
-            // there are already Google layers added to this map
-            mapObject = cache.mapObject;
-            termsOfUse = cache.termsOfUse;
-            poweredBy = cache.poweredBy;
-            // increment the layer count
-            ++cache.count;
-        } else {
-            // this is the first Google layer for this map
-
-            var container = this.map.viewPortDiv;
-            var div = document.createElement("div");
-            div.id = this.map.id + "_GMap2Container";
-            div.style.position = "absolute";
-            div.style.width = "100%";
-            div.style.height = "100%";
-            container.appendChild(div);
-
-            // create GMap and shuffle elements
-            try {
-                mapObject = new GMap2(div);
-                
-                // move the ToS and branding stuff up to the container div
-                termsOfUse = div.lastChild;
-                container.appendChild(termsOfUse);
-                termsOfUse.style.zIndex = "1100";
-                termsOfUse.style.right = "";
-                termsOfUse.style.bottom = "";
-                termsOfUse.className = "olLayerGoogleCopyright";
-
-                poweredBy = div.lastChild;
-                container.appendChild(poweredBy);
-                poweredBy.style.zIndex = "1100";
-                poweredBy.style.right = "";
-                poweredBy.style.bottom = "";
-                poweredBy.className = "olLayerGooglePoweredBy gmnoprint";
-                
-            } catch (e) {
-                throw(e);
-            }
-            // cache elements for use by any other google layers added to
-            // this same map
-            OpenLayers.Layer.Google.cache[this.map.id] = {
-                mapObject: mapObject,
-                termsOfUse: termsOfUse,
-                poweredBy: poweredBy,
-                count: 1
-            };
-        }
-
-        this.mapObject = mapObject;
-        this.termsOfUse = termsOfUse;
-        this.poweredBy = poweredBy;
-        
-        // ensure this layer type is one of the mapObject types
-        if (OpenLayers.Util.indexOf(this.mapObject.getMapTypes(),
-                                    this.type) === -1) {
-            this.mapObject.addMapType(this.type);
-        }
-
-        //since v 2.93 getDragObject is now available.
-        if(typeof mapObject.getDragObject == "function") {
-            this.dragObject = mapObject.getDragObject();
-        } else {
-            this.dragPanMapObject = null;
-        }
-        
-        if(this.isBaseLayer === false) {
-            this.setGMapVisibility(this.div.style.display !== "none");
-        }
-
-    },
-
-    /**
-     * APIMethod: onMapResize
-     */
-    onMapResize: function() {
-        // workaround for resizing of invisible or not yet fully loaded layers
-        // where GMap2.checkResize() does not work. We need to load the GMap
-        // for the old div size, then checkResize(), and then call
-        // layer.moveTo() to trigger GMap.setCenter() (which will finish
-        // the GMap initialization).
-        if(this.visibility && this.mapObject.isLoaded()) {
-            this.mapObject.checkResize();
-        } else {
-            if(!this._resized) {
-                var layer = this;
-                var handle = GEvent.addListener(this.mapObject, "load", function() {
-                    GEvent.removeListener(handle);
-                    delete layer._resized;
-                    layer.mapObject.checkResize();
-                    layer.moveTo(layer.map.getCenter(), layer.map.getZoom());
-                });
-            }
-            this._resized = true;
-        }
-    },
-
-    /**
-     * Method: setGMapVisibility
-     * Display the GMap container and associated elements.
-     * 
-     * Parameters:
-     * visible - {Boolean} Display the GMap elements.
-     */
-    setGMapVisibility: function(visible) {
-        var cache = OpenLayers.Layer.Google.cache[this.map.id];
-        if (cache) {
-            var container = this.mapObject.getContainer();
-            if (visible === true) {
-                this.mapObject.setMapType(this.type);
-                container.style.display = "";
-                this.termsOfUse.style.left = "";
-                this.termsOfUse.style.display = "";
-                this.poweredBy.style.display = "";            
-                cache.displayed = this.id;
-            } else {
-                if (cache.displayed === this.id) {
-                    delete cache.displayed;
-                }
-                if (!cache.displayed) {
-                    container.style.display = "none";
-                    this.termsOfUse.style.display = "none";
-                    // move ToU far to the left in addition to setting display
-                    // to "none", because at the end of the GMap2 load
-                    // sequence, display: none will be unset and ToU would be
-                    // visible after loading a map with a google layer that is
-                    // initially hidden. 
-                    this.termsOfUse.style.left = "-9999px";
-                    this.poweredBy.style.display = "none";
-                }
-            }
-        }
-    },
-    
-    /**
-     * Method: getMapContainer
-     * 
-     * Returns:
-     * {DOMElement} the GMap container's div
-     */
-    getMapContainer: function() {
-        return this.mapObject.getContainer();
-    },
-
-  //
-  // TRANSLATION: MapObject Bounds <-> OpenLayers.Bounds
-  //
-
-    /**
-     * APIMethod: getMapObjectBoundsFromOLBounds
-     * 
-     * Parameters:
-     * olBounds - {<OpenLayers.Bounds>}
-     * 
-     * Returns:
-     * {Object} A MapObject Bounds, translated from olBounds
-     *          Returns null if null value is passed in
-     */
-    getMapObjectBoundsFromOLBounds: function(olBounds) {
-        var moBounds = null;
-        if (olBounds != null) {
-            var sw = this.sphericalMercator ? 
-              this.inverseMercator(olBounds.bottom, olBounds.left) : 
-              new OpenLayers.LonLat(olBounds.bottom, olBounds.left);
-            var ne = this.sphericalMercator ? 
-              this.inverseMercator(olBounds.top, olBounds.right) : 
-              new OpenLayers.LonLat(olBounds.top, olBounds.right);
-            moBounds = new GLatLngBounds(new GLatLng(sw.lat, sw.lon),
-                                         new GLatLng(ne.lat, ne.lon));
-        }
-        return moBounds;
-    },
-
-
-    /************************************
-     *                                  *
-     *   MapObject Interface Controls   *
-     *                                  *
-     ************************************/
-
-
-  // Get&Set Center, Zoom
-
-    /** 
-     * APIMethod: setMapObjectCenter
-     * Set the mapObject to the specified center and zoom
-     * 
-     * Parameters:
-     * center - {Object} MapObject LonLat format
-     * zoom - {int} MapObject zoom format
-     */
-    setMapObjectCenter: function(center, zoom) {
-        this.mapObject.setCenter(center, zoom); 
-    },
-   
-    /**
-     * APIMethod: dragPanMapObject
-     * 
-     * Parameters:
-     * dX - {Integer}
-     * dY - {Integer}
-     */
-    dragPanMapObject: function(dX, dY) {
-        this.dragObject.moveBy(new GSize(-dX, dY));
-    },
-
-
-  // LonLat - Pixel Translation
-  
-    /**
-     * APIMethod: getMapObjectLonLatFromMapObjectPixel
-     * 
-     * Parameters:
-     * moPixel - {Object} MapObject Pixel format
-     * 
-     * Returns:
-     * {Object} MapObject LonLat translated from MapObject Pixel
-     */
-    getMapObjectLonLatFromMapObjectPixel: function(moPixel) {
-        return this.mapObject.fromContainerPixelToLatLng(moPixel);
-    },
-
-    /**
-     * APIMethod: getMapObjectPixelFromMapObjectLonLat
-     * 
-     * Parameters:
-     * moLonLat - {Object} MapObject LonLat format
-     * 
-     * Returns:
-     * {Object} MapObject Pixel transtlated from MapObject LonLat
-     */
-    getMapObjectPixelFromMapObjectLonLat: function(moLonLat) {
-        return this.mapObject.fromLatLngToContainerPixel(moLonLat);
-    },
-
-  
-  // Bounds
-  
-    /** 
-     * APIMethod: getMapObjectZoomFromMapObjectBounds
-     * 
-     * Parameters:
-     * moBounds - {Object} MapObject Bounds format
-     * 
-     * Returns:
-     * {Object} MapObject Zoom for specified MapObject Bounds
-     */
-    getMapObjectZoomFromMapObjectBounds: function(moBounds) {
-        return this.mapObject.getBoundsZoomLevel(moBounds);
-    },
-
-    /************************************
-     *                                  *
-     *       MapObject Primitives       *
-     *                                  *
-     ************************************/
-
-
-  // LonLat
-    
-    /**
-     * APIMethod: getMapObjectLonLatFromLonLat
-     * 
-     * Parameters:
-     * lon - {Float}
-     * lat - {Float}
-     * 
-     * Returns:
-     * {Object} MapObject LonLat built from lon and lat params
-     */
-    getMapObjectLonLatFromLonLat: function(lon, lat) {
-        var gLatLng;
-        if(this.sphericalMercator) {
-            var lonlat = this.inverseMercator(lon, lat);
-            gLatLng = new GLatLng(lonlat.lat, lonlat.lon);
-        } else {
-            gLatLng = new GLatLng(lat, lon);
-        }
-        return gLatLng;
-    },
-
-  // Pixel
-    
-    /**
-     * APIMethod: getMapObjectPixelFromXY
-     * 
-     * Parameters:
-     * x - {Integer}
-     * y - {Integer}
-     * 
-     * Returns:
-     * {Object} MapObject Pixel from x and y parameters
-     */
-    getMapObjectPixelFromXY: function(x, y) {
-        return new GPoint(x, y);
-    }
-    
-};
-

--- a/labs/openlayers/lib/OpenLayers/Layer/Google/v3.js
+++ /dev/null
@@ -1,420 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer/Google.js
- */
-
-/**
- * Constant: OpenLayers.Layer.Google.v3
- * 
- * Mixin providing functionality specific to the Google Maps API v3. Note that
- * this layer configures the google.maps.map object with the "disableDefaultUI"
- * option set to true. Using UI controls that the Google Maps API provides is
- * not supported by the OpenLayers API.
- */
-OpenLayers.Layer.Google.v3 = {
-    
-    /**
-     * Constant: DEFAULTS
-     * {Object} It is not recommended to change the properties set here. Note
-     * that Google.v3 layers only work when sphericalMercator is set to true.
-     * 
-     * (code)
-     * {
-     *     maxExtent: new OpenLayers.Bounds(
-     *         -128 * 156543.0339,
-     *         -128 * 156543.0339,
-     *         128 * 156543.0339,
-     *         128 * 156543.0339
-     *     ),
-     *     sphericalMercator: true,
-     *     maxResolution: 156543.0339,
-     *     units: "m",
-     *     projection: "EPSG:900913"
-     * }
-     * (end)
-     */
-    DEFAULTS: {
-        maxExtent: new OpenLayers.Bounds(
-            -128 * 156543.0339,
-            -128 * 156543.0339,
-            128 * 156543.0339,
-            128 * 156543.0339
-        ),
-        sphericalMercator: true,
-        maxResolution: 156543.0339,
-        units: "m",
-        projection: "EPSG:900913"
-    },
-
-    /** 
-     * Method: loadMapObject
-     * Load the GMap and register appropriate event listeners. If we can't 
-     *     load GMap2, then display a warning message.
-     */
-    loadMapObject:function() {
-        if (!this.type) {
-            this.type = google.maps.MapTypeId.ROADMAP;
-        }
-        var mapObject;
-        var cache = OpenLayers.Layer.Google.cache[this.map.id];
-        if (cache) {
-            // there are already Google layers added to this map
-            mapObject = cache.mapObject;
-            // increment the layer count
-            ++cache.count;
-        } else {
-            // this is the first Google layer for this map
-
-            var container = this.map.viewPortDiv;
-            var div = document.createElement("div");
-            div.id = this.map.id + "_GMapContainer";
-            div.style.position = "absolute";
-            div.style.width = "100%";
-            div.style.height = "100%";
-            container.appendChild(div);
-
-            // create GMap and shuffle elements
-            var center = this.map.getCenter();
-            mapObject = new google.maps.Map(div, {
-                center: center ?
-                    new google.maps.LatLng(center.lat, center.lon) :
-                    new google.maps.LatLng(0, 0),
-                zoom: this.map.getZoom() || 0,
-                mapTypeId: this.type,
-                disableDefaultUI: true,
-                keyboardShortcuts: false,
-                draggable: false,
-                disableDoubleClickZoom: true,
-                scrollwheel: false
-            });
-            
-            // cache elements for use by any other google layers added to
-            // this same map
-            cache = {
-                mapObject: mapObject,
-                count: 1
-            };
-            OpenLayers.Layer.Google.cache[this.map.id] = cache;
-            this.repositionListener = google.maps.event.addListenerOnce(
-                mapObject, 
-                "center_changed", 
-                OpenLayers.Function.bind(this.repositionMapElements, this)
-            );
-        }
-        this.mapObject = mapObject;
-        this.setGMapVisibility(this.visibility);
-    },
-    
-    /**
-     * Method: repositionMapElements
-     *
-     * Waits until powered by and terms of use elements are available and then
-     * moves them so they are clickable.
-     */
-    repositionMapElements: function() {
-
-        // This is the first time any Google layer in this mapObject has been
-        // made visible.  The mapObject needs to know the container size.
-        google.maps.event.trigger(this.mapObject, "resize");
-        
-        var div = this.mapObject.getDiv().firstChild;
-        if (!div || div.childNodes.length < 3) {
-            this.repositionTimer = window.setTimeout(
-                OpenLayers.Function.bind(this.repositionMapElements, this),
-                250
-            );
-            return false;
-        }
-
-        var cache = OpenLayers.Layer.Google.cache[this.map.id];
-        var container = this.map.viewPortDiv;
-
-        // move the ToS and branding stuff up to the container div
-        var termsOfUse = div.lastChild;
-        container.appendChild(termsOfUse);
-        termsOfUse.style.zIndex = "1100";
-        termsOfUse.style.bottom = "";
-        termsOfUse.className = "olLayerGoogleCopyright olLayerGoogleV3";
-        termsOfUse.style.display = "";
-        cache.termsOfUse = termsOfUse;
-
-        var poweredBy = div.lastChild;
-        container.appendChild(poweredBy);
-        poweredBy.style.zIndex = "1100";
-        poweredBy.style.bottom = "";
-        poweredBy.className = "olLayerGooglePoweredBy olLayerGoogleV3 gmnoprint";
-        poweredBy.style.display = "";
-        cache.poweredBy = poweredBy;
-
-        this.setGMapVisibility(this.visibility);
-
-    },
-
-    /**
-     * APIMethod: onMapResize
-     */
-    onMapResize: function() {
-        if (this.visibility) {
-            google.maps.event.trigger(this.mapObject, "resize");
-        } else {
-            if (!this._resized) {
-                var layer = this;
-                google.maps.event.addListenerOnce(this.mapObject, "tilesloaded", function() {
-                    delete layer._resized;
-                    google.maps.event.trigger(layer.mapObject, "resize");
-                    layer.moveTo(layer.map.getCenter(), layer.map.getZoom());
-                });
-            }
-            this._resized = true;
-        }
-    },
-
-    /**
-     * Method: setGMapVisibility
-     * Display the GMap container and associated elements.
-     * 
-     * Parameters:
-     * visible - {Boolean} Display the GMap elements.
-     */
-    setGMapVisibility: function(visible) {
-        var cache = OpenLayers.Layer.Google.cache[this.map.id];
-        if (cache) {
-            var type = this.type;
-            var layers = this.map.layers;
-            var layer;
-            for (var i=layers.length-1; i>=0; --i) {
-                layer = layers[i];
-                if (layer instanceof OpenLayers.Layer.Google &&
-                            layer.visibility === true && layer.inRange === true) {
-                    type = layer.type;
-                    visible = true;
-                    break;
-                }
-            }
-            var container = this.mapObject.getDiv();
-            if (visible === true) {
-                this.mapObject.setMapTypeId(type);                
-                container.style.left = "";
-                if (cache.termsOfUse && cache.termsOfUse.style) {
-                    cache.termsOfUse.style.left = "";
-                    cache.termsOfUse.style.display = "";
-                    cache.poweredBy.style.display = "";            
-                }
-                cache.displayed = this.id;
-            } else {
-                delete cache.displayed;
-                container.style.left = "-9999px";
-                if (cache.termsOfUse && cache.termsOfUse.style) {
-                    cache.termsOfUse.style.display = "none";
-                    // move ToU far to the left in addition to setting
-                    // display to "none", because at the end of the GMap
-                    // load sequence, display: none will be unset and ToU
-                    // would be visible after loading a map with a google
-                    // layer that is initially hidden. 
-                    cache.termsOfUse.style.left = "-9999px";
-                    cache.poweredBy.style.display = "none";
-                }
-            }
-        }
-    },
-    
-    /**
-     * Method: getMapContainer
-     * 
-     * Returns:
-     * {DOMElement} the GMap container's div
-     */
-    getMapContainer: function() {
-        return this.mapObject.getDiv();
-    },
-    
-  //
-  // TRANSLATION: MapObject Bounds <-> OpenLayers.Bounds
-  //
-
-    /**
-     * APIMethod: getMapObjectBoundsFromOLBounds
-     * 
-     * Parameters:
-     * olBounds - {<OpenLayers.Bounds>}
-     * 
-     * Returns:
-     * {Object} A MapObject Bounds, translated from olBounds
-     *          Returns null if null value is passed in
-     */
-    getMapObjectBoundsFromOLBounds: function(olBounds) {
-        var moBounds = null;
-        if (olBounds != null) {
-            var sw = this.sphericalMercator ? 
-              this.inverseMercator(olBounds.bottom, olBounds.left) : 
-              new OpenLayers.LonLat(olBounds.bottom, olBounds.left);
-            var ne = this.sphericalMercator ? 
-              this.inverseMercator(olBounds.top, olBounds.right) : 
-              new OpenLayers.LonLat(olBounds.top, olBounds.right);
-            moBounds = new google.maps.LatLngBounds(
-                new google.maps.LatLng(sw.lat, sw.lon),
-                new google.maps.LatLng(ne.lat, ne.lon)
-            );
-        }
-        return moBounds;
-    },
-
-
-    /************************************
-     *                                  *
-     *   MapObject Interface Controls   *
-     *                                  *
-     ************************************/
-
-
-  // LonLat - Pixel Translation
-  
-    /**
-     * APIMethod: getMapObjectLonLatFromMapObjectPixel
-     * 
-     * Parameters:
-     * moPixel - {Object} MapObject Pixel format
-     * 
-     * Returns:
-     * {Object} MapObject LonLat translated from MapObject Pixel
-     */
-    getMapObjectLonLatFromMapObjectPixel: function(moPixel) {
-        var size = this.map.getSize();
-        var lon = this.getLongitudeFromMapObjectLonLat(this.mapObject.center);
-        var lat = this.getLatitudeFromMapObjectLonLat(this.mapObject.center);
-        var res = this.map.getResolution();
-
-        var delta_x = moPixel.x - (size.w / 2);
-        var delta_y = moPixel.y - (size.h / 2);
-    
-        var lonlat = new OpenLayers.LonLat(
-            lon + delta_x * res,
-            lat - delta_y * res
-        ); 
-
-        if (this.wrapDateLine) {
-            lonlat = lonlat.wrapDateLine(this.maxExtent);
-        }
-        return this.getMapObjectLonLatFromLonLat(lonlat.lon, lonlat.lat);
-    },
-
-    /**
-     * APIMethod: getMapObjectPixelFromMapObjectLonLat
-     * 
-     * Parameters:
-     * moLonLat - {Object} MapObject LonLat format
-     * 
-     * Returns:
-     * {Object} MapObject Pixel transtlated from MapObject LonLat
-     */
-    getMapObjectPixelFromMapObjectLonLat: function(moLonLat) {
-        var lon = this.getLongitudeFromMapObjectLonLat(moLonLat);
-        var lat = this.getLatitudeFromMapObjectLonLat(moLonLat);
-        var res = this.map.getResolution();
-        var extent = this.map.getExtent();
-        var px = new OpenLayers.Pixel(
-            (1/res * (lon - extent.left)),
-            (1/res * (extent.top - lat))
-        );    
-        return this.getMapObjectPixelFromXY(px.x, px.y);
-    },
-
-  
-    /** 
-     * APIMethod: setMapObjectCenter
-     * Set the mapObject to the specified center and zoom
-     * 
-     * Parameters:
-     * center - {Object} MapObject LonLat format
-     * zoom - {int} MapObject zoom format
-     */
-    setMapObjectCenter: function(center, zoom) {
-        this.mapObject.setOptions({
-            center: center,
-            zoom: zoom
-        });
-    },
-   
-    
-  // Bounds
-  
-    /** 
-     * APIMethod: getMapObjectZoomFromMapObjectBounds
-     * 
-     * Parameters:
-     * moBounds - {Object} MapObject Bounds format
-     * 
-     * Returns:
-     * {Object} MapObject Zoom for specified MapObject Bounds
-     */
-    getMapObjectZoomFromMapObjectBounds: function(moBounds) {
-        return this.mapObject.getBoundsZoomLevel(moBounds);
-    },
-
-    /************************************
-     *                                  *
-     *       MapObject Primitives       *
-     *                                  *
-     ************************************/
-
-
-  // LonLat
-    
-    /**
-     * APIMethod: getMapObjectLonLatFromLonLat
-     * 
-     * Parameters:
-     * lon - {Float}
-     * lat - {Float}
-     * 
-     * Returns:
-     * {Object} MapObject LonLat built from lon and lat params
-     */
-    getMapObjectLonLatFromLonLat: function(lon, lat) {
-        var gLatLng;
-        if(this.sphericalMercator) {
-            var lonlat = this.inverseMercator(lon, lat);
-            gLatLng = new google.maps.LatLng(lonlat.lat, lonlat.lon);
-        } else {
-            gLatLng = new google.maps.LatLng(lat, lon);
-        }
-        return gLatLng;
-    },
-    
-  // Pixel
-    
-    /**
-     * APIMethod: getMapObjectPixelFromXY
-     * 
-     * Parameters:
-     * x - {Integer}
-     * y - {Integer}
-     * 
-     * Returns:
-     * {Object} MapObject Pixel from x and y parameters
-     */
-    getMapObjectPixelFromXY: function(x, y) {
-        return new google.maps.Point(x, y);
-    },
-        
-    /**
-     * APIMethod: destroy
-     * Clean up this layer.
-     */
-    destroy: function() {
-        if (this.repositionListener) {
-            google.maps.event.removeListener(this.repositionListener);
-        }
-        if (this.repositionTimer) {
-            window.clearTimeout(this.repositionTimer);
-        }
-        OpenLayers.Layer.Google.prototype.destroy.apply(this, arguments);
-    }
-    
-};
-

--- a/labs/openlayers/lib/OpenLayers/Layer/Grid.js
+++ /dev/null
@@ -1,756 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer/HTTPRequest.js
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Layer.Grid
- * Base class for layers that use a lattice of tiles.  Create a new grid
- * layer with the <OpenLayers.Layer.Grid> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Layer.HTTPRequest>
- */
-OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
-    
-    /**
-     * APIProperty: tileSize
-     * {<OpenLayers.Size>}
-     */
-    tileSize: null,
-    
-    /**
-     * Property: grid
-     * {Array(Array(<OpenLayers.Tile>))} This is an array of rows, each row is 
-     *     an array of tiles.
-     */
-    grid: null,
-
-    /**
-     * APIProperty: singleTile
-     * {Boolean} Moves the layer into single-tile mode, meaning that one tile 
-     *     will be loaded. The tile's size will be determined by the 'ratio'
-     *     property. When the tile is dragged such that it does not cover the 
-     *     entire viewport, it is reloaded.
-     */
-    singleTile: false,
-
-    /** APIProperty: ratio
-     *  {Float} Used only when in single-tile mode, this specifies the 
-     *          ratio of the size of the single tile to the size of the map.
-     */
-    ratio: 1.5,
-
-    /**
-     * APIProperty: buffer
-     * {Integer} Used only when in gridded mode, this specifies the number of 
-     *           extra rows and colums of tiles on each side which will
-     *           surround the minimum grid tiles to cover the map.
-     */
-    buffer: 2,
-
-    /**
-     * APIProperty: numLoadingTiles
-     * {Integer} How many tiles are still loading?
-     */
-    numLoadingTiles: 0,
-
-    /**
-     * Constructor: OpenLayers.Layer.Grid
-     * Create a new grid layer
-     *
-     * Parameters:
-     * name - {String}
-     * url - {String}
-     * params - {Object}
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, url, params, options) {
-        OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this, 
-                                                                arguments);
-        
-        //grid layers will trigger 'tileloaded' when each new tile is 
-        // loaded, as a means of progress update to listeners.
-        // listeners can access 'numLoadingTiles' if they wish to keep track
-        // of the loading progress
-        //
-        this.events.addEventType("tileloaded");
-
-        this.grid = [];
-    },
-
-    /**
-     * APIMethod: destroy
-     * Deconstruct the layer and clear the grid.
-     */
-    destroy: function() {
-        this.clearGrid();
-        this.grid = null;
-        this.tileSize = null;
-        OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this, arguments); 
-    },
-
-    /**
-     * Method: clearGrid
-     * Go through and remove all tiles from the grid, calling
-     *    destroy() on each of them to kill circular references
-     */
-    clearGrid:function() {
-        if (this.grid) {
-            for(var iRow=0, len=this.grid.length; iRow<len; iRow++) {
-                var row = this.grid[iRow];
-                for(var iCol=0, clen=row.length; iCol<clen; iCol++) {
-                    var tile = row[iCol];
-                    this.removeTileMonitoringHooks(tile);
-                    tile.destroy();
-                }
-            }
-            this.grid = [];
-        }
-    },
-
-    /**
-     * APIMethod: clone
-     * Create a clone of this layer
-     *
-     * Parameters:
-     * obj - {Object} Is this ever used?
-     * 
-     * Returns:
-     * {<OpenLayers.Layer.Grid>} An exact clone of this OpenLayers.Layer.Grid
-     */
-    clone: function (obj) {
-        
-        if (obj == null) {
-            obj = new OpenLayers.Layer.Grid(this.name,
-                                            this.url,
-                                            this.params,
-                                            this.getOptions());
-        }
-
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this, [obj]);
-
-        // copy/set any non-init, non-simple values here
-        if (this.tileSize != null) {
-            obj.tileSize = this.tileSize.clone();
-        }
-        
-        // we do not want to copy reference to grid, so we make a new array
-        obj.grid = [];
-
-        return obj;
-    },    
-
-    /**
-     * Method: moveTo
-     * This function is called whenever the map is moved. All the moving
-     * of actual 'tiles' is done by the map, but moveTo's role is to accept
-     * a bounds and make sure the data that that bounds requires is pre-loaded.
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * zoomChanged - {Boolean}
-     * dragging - {Boolean}
-     */
-    moveTo:function(bounds, zoomChanged, dragging) {
-        OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this, arguments);
-        
-        bounds = bounds || this.map.getExtent();
-
-        if (bounds != null) {
-             
-            // if grid is empty or zoom has changed, we *must* re-tile
-            var forceReTile = !this.grid.length || zoomChanged;
-
-            // total bounds of the tiles
-            var tilesBounds = this.getTilesBounds();            
-      
-            if (this.singleTile) {
-                
-                // We want to redraw whenever even the slightest part of the 
-                //  current bounds is not contained by our tile.
-                //  (thus, we do not specify partial -- its default is false)
-                if ( forceReTile || 
-                     (!dragging && !tilesBounds.containsBounds(bounds))) {
-                    this.initSingleTile(bounds);
-                }
-            } else {
-             
-                // if the bounds have changed such that they are not even 
-                //  *partially* contained by our tiles (IE user has 
-                //  programmatically panned to the other side of the earth) 
-                //  then we want to reTile (thus, partial true).  
-                //
-                if (forceReTile || !tilesBounds.containsBounds(bounds, true)) {
-                    this.initGriddedTiles(bounds);
-                } else {
-                    //we might have to shift our buffer tiles
-                    this.moveGriddedTiles(bounds);
-                }
-            }
-        }
-    },
-    
-    /**
-     * APIMethod: setTileSize
-     * Check if we are in singleTile mode and if so, set the size as a ratio
-     *     of the map size (as specified by the layer's 'ratio' property).
-     * 
-     * Parameters:
-     * size - {<OpenLayers.Size>}
-     */
-    setTileSize: function(size) { 
-        if (this.singleTile) {
-            size = this.map.getSize();
-            size.h = parseInt(size.h * this.ratio);
-            size.w = parseInt(size.w * this.ratio);
-        } 
-        OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this, [size]);
-    },
-        
-    /**
-     * Method: getGridBounds
-     * Deprecated. This function will be removed in 3.0. Please use 
-     *     getTilesBounds() instead.
-     * 
-     * Returns:
-     * {<OpenLayers.Bounds>} A Bounds object representing the bounds of all the
-     * currently loaded tiles (including those partially or not at all seen 
-     * onscreen)
-     */
-    getGridBounds: function() {
-        var msg = "The getGridBounds() function is deprecated. It will be " +
-                  "removed in 3.0. Please use getTilesBounds() instead.";
-        OpenLayers.Console.warn(msg);
-        return this.getTilesBounds();
-    },
-
-    /**
-     * APIMethod: getTilesBounds
-     * Return the bounds of the tile grid.
-     *
-     * Returns:
-     * {<OpenLayers.Bounds>} A Bounds object representing the bounds of all the
-     *     currently loaded tiles (including those partially or not at all seen 
-     *     onscreen).
-     */
-    getTilesBounds: function() {    
-        var bounds = null; 
-        
-        if (this.grid.length) {
-            var bottom = this.grid.length - 1;
-            var bottomLeftTile = this.grid[bottom][0];
-    
-            var right = this.grid[0].length - 1; 
-            var topRightTile = this.grid[0][right];
-    
-            bounds = new OpenLayers.Bounds(bottomLeftTile.bounds.left, 
-                                           bottomLeftTile.bounds.bottom,
-                                           topRightTile.bounds.right, 
-                                           topRightTile.bounds.top);
-            
-        }   
-        return bounds;
-    },
-
-    /**
-     * Method: initSingleTile
-     * 
-     * Parameters: 
-     * bounds - {<OpenLayers.Bounds>}
-     */
-    initSingleTile: function(bounds) {
-
-        //determine new tile bounds
-        var center = bounds.getCenterLonLat();
-        var tileWidth = bounds.getWidth() * this.ratio;
-        var tileHeight = bounds.getHeight() * this.ratio;
-                                       
-        var tileBounds = 
-            new OpenLayers.Bounds(center.lon - (tileWidth/2),
-                                  center.lat - (tileHeight/2),
-                                  center.lon + (tileWidth/2),
-                                  center.lat + (tileHeight/2));
-  
-        var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top);
-        var px = this.map.getLayerPxFromLonLat(ul);
-
-        if (!this.grid.length) {
-            this.grid[0] = [];
-        }
-
-        var tile = this.grid[0][0];
-        if (!tile) {
-            tile = this.addTile(tileBounds, px);
-            
-            this.addTileMonitoringHooks(tile);
-            tile.draw();
-            this.grid[0][0] = tile;
-        } else {
-            tile.moveTo(tileBounds, px);
-        }           
-        
-        //remove all but our single tile
-        this.removeExcessTiles(1,1);
-    },
-
-    /** 
-     * Method: calculateGridLayout
-     * Generate parameters for the grid layout. This  
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bound>}
-     * extent - {<OpenLayers.Bounds>}
-     * resolution - {Number}
-     *
-     * Returns:
-     * Object containing properties tilelon, tilelat, tileoffsetlat,
-     * tileoffsetlat, tileoffsetx, tileoffsety
-     */
-    calculateGridLayout: function(bounds, extent, resolution) {
-        var tilelon = resolution * this.tileSize.w;
-        var tilelat = resolution * this.tileSize.h;
-        
-        var offsetlon = bounds.left - extent.left;
-        var tilecol = Math.floor(offsetlon/tilelon) - this.buffer;
-        var tilecolremain = offsetlon/tilelon - tilecol;
-        var tileoffsetx = -tilecolremain * this.tileSize.w;
-        var tileoffsetlon = extent.left + tilecol * tilelon;
-        
-        var offsetlat = bounds.top - (extent.bottom + tilelat);  
-        var tilerow = Math.ceil(offsetlat/tilelat) + this.buffer;
-        var tilerowremain = tilerow - offsetlat/tilelat;
-        var tileoffsety = -tilerowremain * this.tileSize.h;
-        var tileoffsetlat = extent.bottom + tilerow * tilelat;
-        
-        return { 
-          tilelon: tilelon, tilelat: tilelat,
-          tileoffsetlon: tileoffsetlon, tileoffsetlat: tileoffsetlat,
-          tileoffsetx: tileoffsetx, tileoffsety: tileoffsety
-        };
-
-    },
-
-    /**
-     * Method: initGriddedTiles
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     */
-    initGriddedTiles:function(bounds) {
-        
-        // work out mininum number of rows and columns; this is the number of
-        // tiles required to cover the viewport plus at least one for panning
-
-        var viewSize = this.map.getSize();
-        var minRows = Math.ceil(viewSize.h/this.tileSize.h) + 
-                      Math.max(1, 2 * this.buffer);
-        var minCols = Math.ceil(viewSize.w/this.tileSize.w) +
-                      Math.max(1, 2 * this.buffer);
-        
-        var extent = this.getMaxExtent();
-        var resolution = this.map.getResolution();
-        
-        var tileLayout = this.calculateGridLayout(bounds, extent, resolution);
-
-        var tileoffsetx = Math.round(tileLayout.tileoffsetx); // heaven help us
-        var tileoffsety = Math.round(tileLayout.tileoffsety);
-
-        var tileoffsetlon = tileLayout.tileoffsetlon;
-        var tileoffsetlat = tileLayout.tileoffsetlat;
-        
-        var tilelon = tileLayout.tilelon;
-        var tilelat = tileLayout.tilelat;
-
-        this.origin = new OpenLayers.Pixel(tileoffsetx, tileoffsety);
-
-        var startX = tileoffsetx; 
-        var startLon = tileoffsetlon;
-
-        var rowidx = 0;
-        
-        var layerContainerDivLeft = parseInt(this.map.layerContainerDiv.style.left);
-        var layerContainerDivTop = parseInt(this.map.layerContainerDiv.style.top);
-        
-    
-        do {
-            var row = this.grid[rowidx++];
-            if (!row) {
-                row = [];
-                this.grid.push(row);
-            }
-
-            tileoffsetlon = startLon;
-            tileoffsetx = startX;
-            var colidx = 0;
- 
-            do {
-                var tileBounds = 
-                    new OpenLayers.Bounds(tileoffsetlon, 
-                                          tileoffsetlat, 
-                                          tileoffsetlon + tilelon,
-                                          tileoffsetlat + tilelat);
-
-                var x = tileoffsetx;
-                x -= layerContainerDivLeft;
-
-                var y = tileoffsety;
-                y -= layerContainerDivTop;
-
-                var px = new OpenLayers.Pixel(x, y);
-                var tile = row[colidx++];
-                if (!tile) {
-                    tile = this.addTile(tileBounds, px);
-                    this.addTileMonitoringHooks(tile);
-                    row.push(tile);
-                } else {
-                    tile.moveTo(tileBounds, px, false);
-                }
-     
-                tileoffsetlon += tilelon;       
-                tileoffsetx += this.tileSize.w;
-            } while ((tileoffsetlon <= bounds.right + tilelon * this.buffer)
-                     || colidx < minCols);
-             
-            tileoffsetlat -= tilelat;
-            tileoffsety += this.tileSize.h;
-        } while((tileoffsetlat >= bounds.bottom - tilelat * this.buffer)
-                || rowidx < minRows);
-        
-        //shave off exceess rows and colums
-        this.removeExcessTiles(rowidx, colidx);
-
-        //now actually draw the tiles
-        this.spiralTileLoad();
-    },
-
-    /**
-     * Method: getMaxExtent
-     * Get this layer's maximum extent. (Implemented as a getter for
-     *     potential specific implementations in sub-classes.)
-     *
-     * Returns:
-     * {OpenLayers.Bounds}
-     */
-    getMaxExtent: function() {
-        return this.maxExtent;
-    },
-    
-    /**
-     * Method: spiralTileLoad
-     *   Starts at the top right corner of the grid and proceeds in a spiral 
-     *    towards the center, adding tiles one at a time to the beginning of a 
-     *    queue. 
-     * 
-     *   Once all the grid's tiles have been added to the queue, we go back 
-     *    and iterate through the queue (thus reversing the spiral order from 
-     *    outside-in to inside-out), calling draw() on each tile. 
-     */
-    spiralTileLoad: function() {
-        var tileQueue = [];
- 
-        var directions = ["right", "down", "left", "up"];
-
-        var iRow = 0;
-        var iCell = -1;
-        var direction = OpenLayers.Util.indexOf(directions, "right");
-        var directionsTried = 0;
-        
-        while( directionsTried < directions.length) {
-
-            var testRow = iRow;
-            var testCell = iCell;
-
-            switch (directions[direction]) {
-                case "right":
-                    testCell++;
-                    break;
-                case "down":
-                    testRow++;
-                    break;
-                case "left":
-                    testCell--;
-                    break;
-                case "up":
-                    testRow--;
-                    break;
-            } 
-    
-            // if the test grid coordinates are within the bounds of the 
-            //  grid, get a reference to the tile.
-            var tile = null;
-            if ((testRow < this.grid.length) && (testRow >= 0) &&
-                (testCell < this.grid[0].length) && (testCell >= 0)) {
-                tile = this.grid[testRow][testCell];
-            }
-            
-            if ((tile != null) && (!tile.queued)) {
-                //add tile to beginning of queue, mark it as queued.
-                tileQueue.unshift(tile);
-                tile.queued = true;
-                
-                //restart the directions counter and take on the new coords
-                directionsTried = 0;
-                iRow = testRow;
-                iCell = testCell;
-            } else {
-                //need to try to load a tile in a different direction
-                direction = (direction + 1) % 4;
-                directionsTried++;
-            }
-        } 
-        
-        // now we go through and draw the tiles in forward order
-        for(var i=0, len=tileQueue.length; i<len; i++) {
-            var tile = tileQueue[i];
-            tile.draw();
-            //mark tile as unqueued for the next time (since tiles are reused)
-            tile.queued = false;       
-        }
-    },
-
-    /**
-     * APIMethod: addTile
-     * Gives subclasses of Grid the opportunity to create an 
-     * OpenLayer.Tile of their choosing. The implementer should initialize 
-     * the new tile and take whatever steps necessary to display it.
-     *
-     * Parameters
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     *
-     * Returns:
-     * {<OpenLayers.Tile>} The added OpenLayers.Tile
-     */
-    addTile:function(bounds, position) {
-        // Should be implemented by subclasses
-    },
-    
-    /** 
-     * Method: addTileMonitoringHooks
-     * This function takes a tile as input and adds the appropriate hooks to 
-     *     the tile so that the layer can keep track of the loading tiles.
-     * 
-     * Parameters: 
-     * tile - {<OpenLayers.Tile>}
-     */
-    addTileMonitoringHooks: function(tile) {
-        
-        tile.onLoadStart = function() {
-            //if that was first tile then trigger a 'loadstart' on the layer
-            if (this.numLoadingTiles == 0) {
-                this.events.triggerEvent("loadstart");
-            }
-            this.numLoadingTiles++;
-        };
-        tile.events.register("loadstart", this, tile.onLoadStart);
-      
-        tile.onLoadEnd = function() {
-            this.numLoadingTiles--;
-            this.events.triggerEvent("tileloaded");
-            //if that was the last tile, then trigger a 'loadend' on the layer
-            if (this.numLoadingTiles == 0) {
-                this.events.triggerEvent("loadend");
-            }
-        };
-        tile.events.register("loadend", this, tile.onLoadEnd);
-        tile.events.register("unload", this, tile.onLoadEnd);
-    },
-
-    /** 
-     * Method: removeTileMonitoringHooks
-     * This function takes a tile as input and removes the tile hooks 
-     *     that were added in addTileMonitoringHooks()
-     * 
-     * Parameters: 
-     * tile - {<OpenLayers.Tile>}
-     */
-    removeTileMonitoringHooks: function(tile) {
-        tile.unload();
-        tile.events.un({
-            "loadstart": tile.onLoadStart,
-            "loadend": tile.onLoadEnd,
-            "unload": tile.onLoadEnd,
-            scope: this
-        });
-    },
-    
-    /**
-     * Method: moveGriddedTiles
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     */
-    moveGriddedTiles: function(bounds) {
-        var buffer = this.buffer || 1;
-        while (true) {
-            var tlLayer = this.grid[0][0].position;
-            var tlViewPort = 
-                this.map.getViewPortPxFromLayerPx(tlLayer);
-            if (tlViewPort.x > -this.tileSize.w * (buffer - 1)) {
-                this.shiftColumn(true);
-            } else if (tlViewPort.x < -this.tileSize.w * buffer) {
-                this.shiftColumn(false);
-            } else if (tlViewPort.y > -this.tileSize.h * (buffer - 1)) {
-                this.shiftRow(true);
-            } else if (tlViewPort.y < -this.tileSize.h * buffer) {
-                this.shiftRow(false);
-            } else {
-                break;
-            }
-        };
-    },
-
-    /**
-     * Method: shiftRow
-     * Shifty grid work
-     *
-     * Parameters:
-     * prepend - {Boolean} if true, prepend to beginning.
-     *                          if false, then append to end
-     */
-    shiftRow:function(prepend) {
-        var modelRowIndex = (prepend) ? 0 : (this.grid.length - 1);
-        var grid = this.grid;
-        var modelRow = grid[modelRowIndex];
-
-        var resolution = this.map.getResolution();
-        var deltaY = (prepend) ? -this.tileSize.h : this.tileSize.h;
-        var deltaLat = resolution * -deltaY;
-
-        var row = (prepend) ? grid.pop() : grid.shift();
-
-        for (var i=0, len=modelRow.length; i<len; i++) {
-            var modelTile = modelRow[i];
-            var bounds = modelTile.bounds.clone();
-            var position = modelTile.position.clone();
-            bounds.bottom = bounds.bottom + deltaLat;
-            bounds.top = bounds.top + deltaLat;
-            position.y = position.y + deltaY;
-            row[i].moveTo(bounds, position);
-        }
-
-        if (prepend) {
-            grid.unshift(row);
-        } else {
-            grid.push(row);
-        }
-    },
-
-    /**
-     * Method: shiftColumn
-     * Shift grid work in the other dimension
-     *
-     * Parameters:
-     * prepend - {Boolean} if true, prepend to beginning.
-     *                          if false, then append to end
-     */
-    shiftColumn: function(prepend) {
-        var deltaX = (prepend) ? -this.tileSize.w : this.tileSize.w;
-        var resolution = this.map.getResolution();
-        var deltaLon = resolution * deltaX;
-
-        for (var i=0, len=this.grid.length; i<len; i++) {
-            var row = this.grid[i];
-            var modelTileIndex = (prepend) ? 0 : (row.length - 1);
-            var modelTile = row[modelTileIndex];
-            
-            var bounds = modelTile.bounds.clone();
-            var position = modelTile.position.clone();
-            bounds.left = bounds.left + deltaLon;
-            bounds.right = bounds.right + deltaLon;
-            position.x = position.x + deltaX;
-
-            var tile = prepend ? this.grid[i].pop() : this.grid[i].shift();
-            tile.moveTo(bounds, position);
-            if (prepend) {
-                row.unshift(tile);
-            } else {
-                row.push(tile);
-            }
-        }
-    },
-    
-    /**
-     * Method: removeExcessTiles
-     * When the size of the map or the buffer changes, we may need to
-     *     remove some excess rows and columns.
-     * 
-     * Parameters:
-     * rows - {Integer} Maximum number of rows we want our grid to have.
-     * colums - {Integer} Maximum number of columns we want our grid to have.
-     */
-    removeExcessTiles: function(rows, columns) {
-        
-        // remove extra rows
-        while (this.grid.length > rows) {
-            var row = this.grid.pop();
-            for (var i=0, l=row.length; i<l; i++) {
-                var tile = row[i];
-                this.removeTileMonitoringHooks(tile);
-                tile.destroy();
-            }
-        }
-        
-        // remove extra columns
-        while (this.grid[0].length > columns) {
-            for (var i=0, l=this.grid.length; i<l; i++) {
-                var row = this.grid[i];
-                var tile = row.pop();
-                this.removeTileMonitoringHooks(tile);
-                tile.destroy();
-            }
-        }
-    },
-
-    /**
-     * Method: onMapResize
-     * For singleTile layers, this will set a new tile size according to the
-     * dimensions of the map pane.
-     */
-    onMapResize: function() {
-        if (this.singleTile) {
-            this.clearGrid();
-            this.setTileSize();
-        }
-    },
-    
-    /**
-     * APIMethod: getTileBounds
-     * Returns The tile bounds for a layer given a pixel location.
-     *
-     * Parameters:
-     * viewPortPx - {<OpenLayers.Pixel>} The location in the viewport.
-     *
-     * Returns:
-     * {<OpenLayers.Bounds>} Bounds of the tile at the given pixel location.
-     */
-    getTileBounds: function(viewPortPx) {
-        var maxExtent = this.maxExtent;
-        var resolution = this.getResolution();
-        var tileMapWidth = resolution * this.tileSize.w;
-        var tileMapHeight = resolution * this.tileSize.h;
-        var mapPoint = this.getLonLatFromViewPortPx(viewPortPx);
-        var tileLeft = maxExtent.left + (tileMapWidth *
-                                         Math.floor((mapPoint.lon -
-                                                     maxExtent.left) /
-                                                    tileMapWidth));
-        var tileBottom = maxExtent.bottom + (tileMapHeight *
-                                             Math.floor((mapPoint.lat -
-                                                         maxExtent.bottom) /
-                                                        tileMapHeight));
-        return new OpenLayers.Bounds(tileLeft, tileBottom,
-                                     tileLeft + tileMapWidth,
-                                     tileBottom + tileMapHeight);
-    },
-    
-    CLASS_NAME: "OpenLayers.Layer.Grid"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/HTTPRequest.js
+++ /dev/null
@@ -1,231 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer.js
- */
-
-/**
- * Class: OpenLayers.Layer.HTTPRequest
- * 
- * Inherits from: 
- *  - <OpenLayers.Layer>
- */
-OpenLayers.Layer.HTTPRequest = OpenLayers.Class(OpenLayers.Layer, {
-
-    /** 
-     * Constant: URL_HASH_FACTOR
-     * {Float} Used to hash URL param strings for multi-WMS server selection.
-     *         Set to the Golden Ratio per Knuth's recommendation.
-     */
-    URL_HASH_FACTOR: (Math.sqrt(5) - 1) / 2,
-
-    /** 
-     * Property: url
-     * {Array(String) or String} This is either an array of url strings or 
-     *                           a single url string. 
-     */
-    url: null,
-
-    /** 
-     * Property: params
-     * {Object} Hashtable of key/value parameters
-     */
-    params: null,
-    
-    /** 
-     * APIProperty: reproject
-     * *Deprecated*. See http://trac.openlayers.org/wiki/SpatialMercator
-     * for information on the replacement for this functionality. 
-     * {Boolean} Whether layer should reproject itself based on base layer 
-     *           locations. This allows reprojection onto commercial layers. 
-     *           Default is false: Most layers can't reproject, but layers 
-     *           which can create non-square geographic pixels can, like WMS.
-     *           
-     */
-    reproject: false,
-
-    /**
-     * Constructor: OpenLayers.Layer.HTTPRequest
-     * 
-     * Parameters:
-     * name - {String}
-     * url - {Array(String) or String}
-     * params - {Object}
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, url, params, options) {
-        var newArguments = arguments;
-        newArguments = [name, options];
-        OpenLayers.Layer.prototype.initialize.apply(this, newArguments);
-        this.url = url;
-        this.params = OpenLayers.Util.extend( {}, params);
-    },
-
-    /**
-     * APIMethod: destroy
-     */
-    destroy: function() {
-        this.url = null;
-        this.params = null;
-        OpenLayers.Layer.prototype.destroy.apply(this, arguments); 
-    },
-    
-    /**
-     * APIMethod: clone
-     * 
-     * Parameters:
-     * obj - {Object}
-     * 
-     * Returns:
-     * {<OpenLayers.Layer.HTTPRequest>} An exact clone of this 
-     *                                  <OpenLayers.Layer.HTTPRequest>
-     */
-    clone: function (obj) {
-        
-        if (obj == null) {
-            obj = new OpenLayers.Layer.HTTPRequest(this.name,
-                                                   this.url,
-                                                   this.params,
-                                                   this.getOptions());
-        }
-        
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.prototype.clone.apply(this, [obj]);
-
-        // copy/set any non-init, non-simple values here
-        
-        return obj;
-    },
-
-    /** 
-     * APIMethod: setUrl
-     * 
-     * Parameters:
-     * newUrl - {String}
-     */
-    setUrl: function(newUrl) {
-        this.url = newUrl;
-    },
-
-    /**
-     * APIMethod: mergeNewParams
-     * 
-     * Parameters:
-     * newParams - {Object}
-     *
-     * Returns:
-     * redrawn: {Boolean} whether the layer was actually redrawn.
-     */
-    mergeNewParams:function(newParams) {
-        this.params = OpenLayers.Util.extend(this.params, newParams);
-        var ret = this.redraw();
-        if(this.map != null) {
-            this.map.events.triggerEvent("changelayer", {
-                layer: this,
-                property: "params"
-            });
-        }
-        return ret;
-    },
-
-    /**
-     * APIMethod: redraw
-     * Redraws the layer.  Returns true if the layer was redrawn, false if not.
-     *
-     * Parameters:
-     * force - {Boolean} Force redraw by adding random parameter.
-     *
-     * Returns:
-     * {Boolean} The layer was redrawn.
-     */
-    redraw: function(force) { 
-        if (force) {
-            return this.mergeNewParams({"_olSalt": Math.random()});
-        } else {
-            return OpenLayers.Layer.prototype.redraw.apply(this, []);
-        }
-    },
-    
-    /**
-     * Method: selectUrl
-     * selectUrl() implements the standard floating-point multiplicative
-     *     hash function described by Knuth, and hashes the contents of the 
-     *     given param string into a float between 0 and 1. This float is then
-     *     scaled to the size of the provided urls array, and used to select
-     *     a URL.
-     *
-     * Parameters:
-     * paramString - {String}
-     * urls - {Array(String)}
-     * 
-     * Returns:
-     * {String} An entry from the urls array, deterministically selected based
-     *          on the paramString.
-     */
-    selectUrl: function(paramString, urls) {
-        var product = 1;
-        for (var i=0, len=paramString.length; i<len; i++) { 
-            product *= paramString.charCodeAt(i) * this.URL_HASH_FACTOR; 
-            product -= Math.floor(product); 
-        }
-        return urls[Math.floor(product * urls.length)];
-    },
-
-    /** 
-     * Method: getFullRequestString
-     * Combine url with layer's params and these newParams. 
-     *   
-     *    does checking on the serverPath variable, allowing for cases when it 
-     *     is supplied with trailing ? or &, as well as cases where not. 
-     *
-     *    return in formatted string like this:
-     *        "server?key1=value1&key2=value2&key3=value3"
-     * 
-     * WARNING: The altUrl parameter is deprecated and will be removed in 3.0.
-     *
-     * Parameters:
-     * newParams - {Object}
-     * altUrl - {String} Use this as the url instead of the layer's url
-     *   
-     * Returns: 
-     * {String}
-     */
-    getFullRequestString:function(newParams, altUrl) {
-
-        // if not altUrl passed in, use layer's url
-        var url = altUrl || this.url;
-        
-        // create a new params hashtable with all the layer params and the 
-        // new params together. then convert to string
-        var allParams = OpenLayers.Util.extend({}, this.params);
-        allParams = OpenLayers.Util.extend(allParams, newParams);
-        var paramsString = OpenLayers.Util.getParameterString(allParams);
-        
-        // if url is not a string, it should be an array of strings, 
-        // in which case we will deterministically select one of them in 
-        // order to evenly distribute requests to different urls.
-        //
-        if (url instanceof Array) {
-            url = this.selectUrl(paramsString, url);
-        }   
- 
-        // ignore parameters that are already in the url search string
-        var urlParams = 
-            OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(url));
-        for(var key in allParams) {
-            if(key.toUpperCase() in urlParams) {
-                delete allParams[key];
-            }
-        }
-        paramsString = OpenLayers.Util.getParameterString(allParams);
-        
-        return OpenLayers.Util.urlAppend(url, paramsString);
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.HTTPRequest"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/Image.js
+++ /dev/null
@@ -1,255 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
- 
-/**
- * @requires OpenLayers/Layer.js
- * @requires OpenLayers/Tile/Image.js
- */
 
-/**
- * Class: OpenLayers.Layer.Image
- * Instances of OpenLayers.Layer.Image are used to display data from a web
- * accessible image as a map layer.  Create a new image layer with the
- * <OpenLayers.Layer.Image> constructor.  Inherits from <OpenLayers.Layer>.
- */
-OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, {
-
-    /**
-     * Property: isBaseLayer
-     * {Boolean} The layer is a base layer.  Default is true.  Set this property
-     * in the layer options
-     */
-    isBaseLayer: true,
-    
-    /**
-     * Property: url
-     * {String} URL of the image to use
-     */
-    url: null,
-
-    /**
-     * Property: extent
-     * {<OpenLayers.Bounds>} The image bounds in map units.  This extent will
-     *     also be used as the default maxExtent for the layer.  If you wish
-     *     to have a maxExtent that is different than the image extent, set the
-     *     maxExtent property of the options argument (as with any other layer).
-     */
-    extent: null,
-    
-    /**
-     * Property: size
-     * {<OpenLayers.Size>} The image size in pixels
-     */
-    size: null,
-
-    /**
-     * Property: tile
-     * {<OpenLayers.Tile.Image>}
-     */
-    tile: null,
-
-    /**
-     * Property: aspectRatio
-     * {Float} The ratio of height/width represented by a single pixel in the
-     * graphic
-     */
-    aspectRatio: null,
-
-    /**
-     * Constructor: OpenLayers.Layer.Image
-     * Create a new image layer
-     *
-     * Parameters:
-     * name - {String} A name for the layer.
-     * url - {String} Relative or absolute path to the image
-     * extent - {<OpenLayers.Bounds>} The extent represented by the image
-     * size - {<OpenLayers.Size>} The size (in pixels) of the image
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, url, extent, size, options) {
-        this.url = url;
-        this.extent = extent;
-        this.maxExtent = extent;
-        this.size = size;
-        OpenLayers.Layer.prototype.initialize.apply(this, [name, options]);
-
-        this.aspectRatio = (this.extent.getHeight() / this.size.h) /
-                           (this.extent.getWidth() / this.size.w);
-    },    
-
-    /**
-     * Method: destroy
-     * Destroy this layer
-     */
-    destroy: function() {
-        if (this.tile) {
-            this.removeTileMonitoringHooks(this.tile);
-            this.tile.destroy();
-            this.tile = null;
-        }
-        OpenLayers.Layer.prototype.destroy.apply(this, arguments);
-    },
-    
-    /**
-     * Method: clone
-     * Create a clone of this layer
-     *
-     * Paramters:
-     * obj - {Object} An optional layer (is this ever used?)
-     *
-     * Returns:
-     * {<OpenLayers.Layer.Image>} An exact copy of this layer
-     */
-    clone: function(obj) {
-        
-        if(obj == null) {
-            obj = new OpenLayers.Layer.Image(this.name,
-                                               this.url,
-                                               this.extent,
-                                               this.size,
-                                               this.getOptions());
-        }
-
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.prototype.clone.apply(this, [obj]);
-
-        // copy/set any non-init, non-simple values here
-
-        return obj;
-    },    
-    
-    /**
-     * APIMethod: setMap
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>}
-     */
-    setMap: function(map) {
-        /**
-         * If nothing to do with resolutions has been set, assume a single
-         * resolution determined by ratio*extent/size - if an image has a
-         * pixel aspect ratio different than one (as calculated above), the
-         * image will be stretched in one dimension only.
-         */
-        if( this.options.maxResolution == null ) {
-            this.options.maxResolution = this.aspectRatio *
-                                         this.extent.getWidth() /
-                                         this.size.w;
-        }
-        OpenLayers.Layer.prototype.setMap.apply(this, arguments);
-    },
-
-    /** 
-     * Method: moveTo
-     * Create the tile for the image or resize it for the new resolution
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * zoomChanged - {Boolean}
-     * dragging - {Boolean}
-     */
-    moveTo:function(bounds, zoomChanged, dragging) {
-        OpenLayers.Layer.prototype.moveTo.apply(this, arguments);
-
-        var firstRendering = (this.tile == null);
-
-        if(zoomChanged || firstRendering) {
-
-            //determine new tile size
-            this.setTileSize();
-
-            //determine new position (upper left corner of new bounds)
-            var ul = new OpenLayers.LonLat(this.extent.left, this.extent.top);
-            var ulPx = this.map.getLayerPxFromLonLat(ul);
-
-            if(firstRendering) {
-                //create the new tile
-                this.tile = new OpenLayers.Tile.Image(this, ulPx, this.extent, 
-                                                      null, this.tileSize);
-                this.addTileMonitoringHooks(this.tile);
-            } else {
-                //just resize the tile and set it's new position
-                this.tile.size = this.tileSize.clone();
-                this.tile.position = ulPx.clone();
-            }
-            this.tile.draw();
-        }
-    }, 
-
-    /**
-     * Set the tile size based on the map size.
-     */
-    setTileSize: function() {
-        var tileWidth = this.extent.getWidth() / this.map.getResolution();
-        var tileHeight = this.extent.getHeight() / this.map.getResolution();
-        this.tileSize = new OpenLayers.Size(tileWidth, tileHeight);
-    },
-
-    /** 
-     * Method: addTileMonitoringHooks
-     * This function takes a tile as input and adds the appropriate hooks to 
-     *     the tile so that the layer can keep track of the loading tiles.
-     * 
-     * Parameters: 
-     * tile - {<OpenLayers.Tile>}
-     */
-    addTileMonitoringHooks: function(tile) {
-        tile.onLoadStart = function() {
-            this.events.triggerEvent("loadstart");
-        };
-        tile.events.register("loadstart", this, tile.onLoadStart);
-      
-        tile.onLoadEnd = function() {
-            this.events.triggerEvent("loadend");
-        };
-        tile.events.register("loadend", this, tile.onLoadEnd);
-        tile.events.register("unload", this, tile.onLoadEnd);
-    },
-
-    /** 
-     * Method: removeTileMonitoringHooks
-     * This function takes a tile as input and removes the tile hooks 
-     *     that were added in <addTileMonitoringHooks>.
-     * 
-     * Parameters: 
-     * tile - {<OpenLayers.Tile>}
-     */
-    removeTileMonitoringHooks: function(tile) {
-        tile.unload();
-        tile.events.un({
-            "loadstart": tile.onLoadStart,
-            "loadend": tile.onLoadEnd,
-            "unload": tile.onLoadEnd,
-            scope: this
-        });
-    },
-    
-    /**
-     * APIMethod: setUrl
-     * 
-     * Parameters:
-     * newUrl - {String}
-     */
-    setUrl: function(newUrl) {
-        this.url = newUrl;
-        this.tile.draw();
-    },
-
-    /** 
-     * APIMethod: getURL
-     * The url we return is always the same (the image itself never changes)
-     *     so we can ignore the bounds parameter (it will always be the same, 
-     *     anyways) 
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     */
-    getURL: function(bounds) {
-        return this.url;
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.Image"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/KaMap.js
+++ /dev/null
@@ -1,207 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer/Grid.js
- */
-
-/**
- * Class: OpenLayers.Layer.KaMap
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.Grid>
- */
-OpenLayers.Layer.KaMap = OpenLayers.Class(OpenLayers.Layer.Grid, {
-
-    /** 
-     * APIProperty: isBaseLayer
-     * {Boolean} KaMap Layer is always a base layer 
-     */    
-    isBaseLayer: true,
-
-    /**
-     * APIProperty: units
-     * {?}
-     */    
-    units: null,
-
-    /**
-     * APIProperty: resolution
-     * {Float}
-     */
-    resolution: OpenLayers.DOTS_PER_INCH,
-    
-    /**
-     * Constant: DEFAULT_PARAMS
-     * {Object} parameters set by default. The default parameters set 
-     * the format via the 'i' parameter to 'jpeg'.    
-     */
-    DEFAULT_PARAMS: {
-        i: 'jpeg',
-        map: ''
-    },
-        
-    /**
-     * Constructor: OpenLayers.Layer.KaMap
-     * 
-     * Parameters:
-     * name - {String}
-     * url - {String}
-     * params - {Object} Parameters to be sent to the HTTP server in the
-     *    query string for the tile. The format can be set via the 'i'
-     *    parameter (defaults to jpg) , and the map should be set via 
-     *    the 'map' parameter. It has been reported that ka-Map may behave
-     *    inconsistently if your format parameter does not match the format
-     *    parameter configured in your config.php. (See ticket #327 for more
-     *    information.)
-     * options - {Object} Additional options for the layer. Any of the 
-     *     APIProperties listed on this layer, and any layer types it
-     *     extends, can be overridden through the options parameter. 
-     */
-    initialize: function(name, url, params, options) {
-        var newArguments = [];
-        newArguments.push(name, url, params, options);
-        OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
-        this.params = OpenLayers.Util.applyDefaults(
-            this.params, this.DEFAULT_PARAMS
-        );
-    },
-
-    /**
-     * Method: getURL
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} 
-     * 
-     * Returns:
-     * {String} A string with the layer's url and parameters and also the 
-     *          passed-in bounds and appropriate tile size specified as 
-     *          parameters
-     */
-    getURL: function (bounds) {
-        bounds = this.adjustBounds(bounds);
-        var mapRes = this.map.getResolution();
-        var scale = Math.round((this.map.getScale() * 10000)) / 10000;
-        var pX = Math.round(bounds.left / mapRes);
-        var pY = -Math.round(bounds.top / mapRes);
-        return this.getFullRequestString(
-                      { t: pY, 
-                        l: pX,
-                        s: scale
-                      });
-    },
-
-    /**
-     * Method: addTile
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>}
-     */    
-    addTile:function(bounds,position) {
-        var url = this.getURL(bounds);
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                             url, this.tileSize);
-    },
-
-    /** 
-     * Method: calculateGridLayout
-     * ka-Map uses the center point of the map as an origin for 
-     * its tiles. Override calculateGridLayout to center tiles 
-     * correctly for this case.
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bound>}
-     * extent - {<OpenLayers.Bounds>}
-     * resolution - {Number}
-     *
-     * Returns:
-     * Object containing properties tilelon, tilelat, tileoffsetlat,
-     * tileoffsetlat, tileoffsetx, tileoffsety
-     */
-    calculateGridLayout: function(bounds, extent, resolution) {
-        var tilelon = resolution*this.tileSize.w;
-        var tilelat = resolution*this.tileSize.h;
-        
-        var offsetlon = bounds.left;
-        var tilecol = Math.floor(offsetlon/tilelon) - this.buffer;
-        var tilecolremain = offsetlon/tilelon - tilecol;
-        var tileoffsetx = -tilecolremain * this.tileSize.w;
-        var tileoffsetlon = tilecol * tilelon;
-        
-        var offsetlat = bounds.top;  
-        var tilerow = Math.ceil(offsetlat/tilelat) + this.buffer;
-        var tilerowremain = tilerow - offsetlat/tilelat;
-        var tileoffsety = -(tilerowremain+1) * this.tileSize.h;
-        var tileoffsetlat = tilerow * tilelat;
-        
-        return { 
-          tilelon: tilelon, tilelat: tilelat,
-          tileoffsetlon: tileoffsetlon, tileoffsetlat: tileoffsetlat,
-          tileoffsetx: tileoffsetx, tileoffsety: tileoffsety
-        };
-    },    
-
-    /**
-     * APIMethod: clone
-     * 
-     * Parameters: 
-     * obj - {Object}
-     * 
-     * Returns:
-     * {<OpenLayers.Layer.Kamap>} An exact clone of this OpenLayers.Layer.KaMap
-     */
-    clone: function (obj) {
-        
-        if (obj == null) {
-            obj = new OpenLayers.Layer.KaMap(this.name,
-                                            this.url,
-                                            this.params,
-                                            this.getOptions());
-        }
-
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);
-
-        // copy/set any non-init, non-simple values here
-        if (this.tileSize != null) {
-            obj.tileSize = this.tileSize.clone();
-        }
-        
-        // we do not want to copy reference to grid, so we make a new array
-        obj.grid = [];
-
-        return obj;
-    },    
-    
-    /**
-     * APIMethod: getTileBounds
-     * Returns The tile bounds for a layer given a pixel location.
-     *
-     * Parameters:
-     * viewPortPx - {<OpenLayers.Pixel>} The location in the viewport.
-     *
-     * Returns:
-     * {<OpenLayers.Bounds>} Bounds of the tile at the given pixel location.
-     */
-    getTileBounds: function(viewPortPx) {
-        var resolution = this.getResolution();
-        var tileMapWidth = resolution * this.tileSize.w;
-        var tileMapHeight = resolution * this.tileSize.h;
-        var mapPoint = this.getLonLatFromViewPortPx(viewPortPx);
-        var tileLeft = tileMapWidth * Math.floor(mapPoint.lon / tileMapWidth);
-        var tileBottom = tileMapHeight * Math.floor(mapPoint.lat / tileMapHeight);
-        return new OpenLayers.Bounds(tileLeft, tileBottom,
-                                     tileLeft + tileMapWidth,
-                                     tileBottom + tileMapHeight);
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.KaMap"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/KaMapCache.js
+++ /dev/null
@@ -1,149 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer/Grid.js
- * @requires OpenLayers/Layer/KaMap.js
- */
-
-/**
- * Class: OpenLayers.Layer.KaMapCache
- * 
- * This class is designed to talk directly to a web-accessible ka-Map
- * cache generated by the precache2.php script.
- * 
- * To create a a new KaMapCache layer, you must indicate also the "i" parameter
- * (that will be used to calculate the file extension), and another special
- * parameter, object names "metaTileSize", with "h" (height) and "w" (width)
- * properties.
- * 
- *     // Create a new kaMapCache layer. 
- *     var kamap_base = new OpenLayers.Layer.KaMapCache(
- *         "Satellite",
- *         "http://www.example.org/web/acessible/cache",
- *         {g: "satellite", map: "world", i: 'png24', metaTileSize: {w: 5, h: 5} }
- *       );
- *    
- *     // Create an kaMapCache overlay layer (using "isBaseLayer: false"). 
- *     // Forces the output to be a "gif", using the "i" parameter.
- *     var kamap_overlay = new OpenLayers.Layer.KaMapCache(
- *         "Streets",
- *         "http://www.example.org/web/acessible/cache",
- *         {g: "streets", map: "world", i: "gif", metaTileSize: {w: 5, h: 5} },
- *         {isBaseLayer: false}
- *       );
- *
- * The cache URLs must look like: 
- *   var/cache/World/50000/Group_Name/def/t-440320/l20480
- * 
- * This means that the cache generated via tile.php will *not* work with
- *     this class, and should instead use the KaMap layer.
- *
- * More information is available in Ticket #1518.
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.KaMap>
- *  - <OpenLayers.Layer.Grid>
- */
-OpenLayers.Layer.KaMapCache = OpenLayers.Class(OpenLayers.Layer.KaMap, {
-
-    /**
-     * Constant: IMAGE_EXTENSIONS
-     * {Object} Simple hash map to convert format to extension.
-     */
-    IMAGE_EXTENSIONS: {
-        'jpeg': 'jpg',
-        'gif' : 'gif',
-        'png' : 'png',
-        'png8' : 'png',
-        'png24' : 'png',
-        'dithered' : 'png'
-    },
-    
-    /**
-     * Constant: DEFAULT_FORMAT
-     * {Object} Simple hash map to convert format to extension.
-     */
-    DEFAULT_FORMAT: 'jpeg',
-    
-    /**
-     * Constructor: OpenLayers.Layer.KaMapCache
-     * 
-     * Parameters:
-     * name - {String}
-     * url - {String}
-     * params - {Object} Parameters to be sent to the HTTP server in the
-     *    query string for the tile. The format can be set via the 'i'
-     *    parameter (defaults to jpg) , and the map should be set via 
-     *    the 'map' parameter. It has been reported that ka-Map may behave
-     *    inconsistently if your format parameter does not match the format
-     *    parameter configured in your config.php. (See ticket #327 for more
-     *    information.)
-     * options - {Object} Additional options for the layer. Any of the 
-     *     APIProperties listed on this layer, and any layer types it
-     *     extends, can be overridden through the options parameter. 
-     */
-    initialize: function(name, url, params, options) {
-        OpenLayers.Layer.KaMap.prototype.initialize.apply(this, arguments);
-        this.extension = this.IMAGE_EXTENSIONS[this.params.i.toLowerCase() || DEFAULT_FORMAT];
-    },
-
-    /**
-     * Method: getURL
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} 
-     * 
-     * Returns:
-     * {String} A string with the layer's url and parameters and also the 
-     *          passed-in bounds and appropriate tile size specified as 
-     *          parameters
-     */
-    getURL: function (bounds) {
-        bounds = this.adjustBounds(bounds);
-        var mapRes = this.map.getResolution();
-        var scale = Math.round((this.map.getScale() * 10000)) / 10000;
-        var pX = Math.round(bounds.left / mapRes);
-        var pY = -Math.round(bounds.top / mapRes);
-
-        var metaX = Math.floor(pX / this.tileSize.w / this.params.metaTileSize.w) * this.tileSize.w * this.params.metaTileSize.w;
-        var metaY = Math.floor(pY / this.tileSize.h / this.params.metaTileSize.h) * this.tileSize.h * this.params.metaTileSize.h;
-
-        // if url is not a string, it should be an array of strings,
-        // in which case we will deterministically select one of them in
-        // order to evenly distribute requests to different urls.
-        //
-        var url = this.url;
-        if (url instanceof Array) {
-            url = this.selectUrl(paramsString, url);
-        }  
-    
-        var components = [
-            url,
-            "/",
-            this.params.map,
-            "/",
-            scale,
-            "/",
-            this.params.g.replace(/\s/g, '_'),
-            "/def/t", 
-            metaY,
-            "/l",
-            metaX,
-            "/t",
-            pY,
-            "l",
-            pX,
-            ".",
-            this.extension
-          ];
-          
-        return components.join("");
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.KaMapCache"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/MapGuide.js
+++ /dev/null
@@ -1,490 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Request/XMLHttpRequest.js
- * @requires OpenLayers/Layer/Grid.js
- */
-
-/**
- * Class: OpenLayers.Layer.MapGuide
- * Instances of OpenLayers.Layer.MapGuide are used to display
- * data from a MapGuide OS instance.
- *
- * Inherits from:
- *  - <OpenLayers.Layer.Grid>
- */
-OpenLayers.Layer.MapGuide = OpenLayers.Class(OpenLayers.Layer.Grid, {
-
-    /** 
-     * APIProperty: isBaseLayer
-     * {Boolean} Treat this layer as a base layer.  Default is true.
-     **/
-    isBaseLayer: true,
-    
-    /**
-     * APIProperty: useHttpTile
-     * {Boolean} use a tile cache exposed directly via a webserver rather than the 
-	   *    via mapguide server. This does require extra configuration on the Mapguide Server,
-	   *    and will only work when singleTile is false. The url for the layer must be set to the
-	   *    webserver path rather than the Mapguide mapagent.	  
-	   *    See http://trac.osgeo.org/mapguide/wiki/CodeSamples/Tiles/ServingTilesViaHttp 
-     **/
-    useHttpTile: false,
-    
-    /** 
-     * APIProperty: singleTile
-     * {Boolean} use tile server or request single tile image. 
-     **/
-    singleTile: false,
-    
-    /** 
-     * APIProperty: useOverlay
-     * {Boolean} flag to indicate if the layer should be retrieved using
-     * GETMAPIMAGE (default) or using GETDYNAMICOVERLAY requests.
-     **/
-    useOverlay: false,
-    
-    /** 
-     * APIProperty: useAsyncOverlay
-     * {Boolean} indicates if the MapGuide site supports the asynchronous 
-     * GETDYNAMICOVERLAY requests which is available in MapGuide Enterprise 2010
-     * and MapGuide Open Source v2.0.3 or higher. The newer versions of MG 
-     * is called asynchronously, allows selections to be drawn separately from 
-     * the map and offers styling options.
-     * 
-     * With older versions of MapGuide, set useAsyncOverlay=false.  Note that in
-     * this case a synchronous AJAX call is issued and the mapname and session
-     * parameters must be used to initialize the layer, not the mapdefinition
-     * parameter. Also note that this will issue a synchronous AJAX request 
-     * before the image request can be issued so the users browser may lock
-     * up if the MG Web tier does not respond in a timely fashion.
-     **/
-    useAsyncOverlay: true,
-    
-    /**
-     * Constant: TILE_PARAMS
-     * {Object} Hashtable of default parameter key/value pairs for tiled layer
-     */
-    TILE_PARAMS: {
-         operation: 'GETTILEIMAGE',
-         version: '1.2.0'
-    },
-
-    /**
-     * Constant: SINGLE_TILE_PARAMS
-     * {Object} Hashtable of default parameter key/value pairs for untiled layer
-     */
-    SINGLE_TILE_PARAMS: {
-        operation: 'GETMAPIMAGE',
-        format: 'PNG',
-        locale: 'en',
-        clip: '1',
-        version: '1.0.0'
-    },
-    
-    /**
-     * Constant: OVERLAY_PARAMS
-     * {Object} Hashtable of default parameter key/value pairs for untiled layer
-     */
-    OVERLAY_PARAMS: {
-        operation: 'GETDYNAMICMAPOVERLAYIMAGE',
-        format: 'PNG',
-        locale: 'en',
-        clip: '1',
-        version: '2.0.0'
-    },
-    
-    /** 
-     * Constant: FOLDER_PARAMS
-     * {Object} Hashtable of parameter key/value pairs which describe 
-     * the folder structure for tiles as configured in the mapguide 
-     * serverconfig.ini section [TileServiceProperties]
-     */
-    FOLDER_PARAMS: {
-        tileColumnsPerFolder: 30,
-        tileRowsPerFolder: 30,
-        format: 'png',
-        querystring: null
-    },	
-
-    /** 
-     * Property: defaultSize
-     * {<OpenLayers.Size>} Tile size as produced by MapGuide server
-     **/
-    defaultSize: new OpenLayers.Size(300,300),
-
-    /**
-     * Constructor: OpenLayers.Layer.MapGuide
-     * Create a new Mapguide layer, either tiled or untiled.  
-     *
-     * For tiled layers, the 'groupName' and 'mapDefinition' values 
-     * must be specified as parameters in the constructor.
-     *
-     * For untiled base layers, specify either combination of 'mapName' and
-     * 'session', or 'mapDefinition' and 'locale'.  
-     *
-     * For older versions of MapGuide and overlay layers, set useAsyncOverlay 
-     * to false and in this case mapName and session are required parameters 
-     * for the constructor.
-     *
-     * NOTE: MapGuide OS uses a DPI value and degrees to meters conversion 
-     * factor that are different than the defaults used in OpenLayers, 
-     * so these must be adjusted accordingly in your application.  
-     * See the MapGuide example for how to set these values for MGOS.
-     *
-     * Parameters:
-     * name - {String} Name of the layer displayed in the interface
-     * url - {String} Location of the MapGuide mapagent executable
-     *            (e.g. http://localhost:8008/mapguide/mapagent/mapagent.fcgi)
-     * params - {Object} hashtable of additional parameters to use. Some
-     *     parameters may require additional code on the server. The ones that
-     *     you may want to use are: 
-     *   - mapDefinition - {String} The MapGuide resource definition
-     *            (e.g. Library://Samples/Gmap/Maps/gmapTiled.MapDefinition)
-     *   - locale - Locale setting 
-     *            (for untiled overlays layers only)
-     *   - mapName - {String} Name of the map as stored in the MapGuide session.
-     *          (for untiled layers with a session parameter only)
-     *   - session - { String} MapGuide session ID 
-     *            (for untiled overlays layers only)
-     *   - basemaplayergroupname - {String} GroupName for tiled MapGuide layers only
-     *   - format - Image format to be returned (for untiled overlay layers only)
-     *   - showLayers - {String} A comma separated list of GUID's for the
-     *       layers to display eg: 'cvc-xcv34,453-345-345sdf'.
-     *   - hideLayers - {String} A comma separated list of GUID's for the
-     *       layers to hide eg: 'cvc-xcv34,453-345-345sdf'.
-     *   - showGroups - {String} A comma separated list of GUID's for the
-     *       groups to display eg: 'cvc-xcv34,453-345-345sdf'.
-     *   - hideGroups - {String} A comma separated list of GUID's for the
-     *       groups to hide eg: 'cvc-xcv34,453-345-345sdf'
-     *   - selectionXml - {String} A selection xml string Some server plumbing
-     *       is required to read such a value.
-     * options - {Ojbect} Hashtable of extra options to tag onto the layer; 
-     *          will vary depending if tiled or untiled maps are being requested
-     */
-    initialize: function(name, url, params, options) {
-        
-        OpenLayers.Layer.Grid.prototype.initialize.apply(this, arguments);
-        
-        // unless explicitly set in options, if the layer is transparent, 
-        // it will be an overlay
-        if (options == null || options.isBaseLayer == null) {
-            this.isBaseLayer = ((this.transparent != "true") && 
-                                (this.transparent != true));
-        }
-
-        if (options && options.useOverlay!=null) {
-          this.useOverlay = options.useOverlay;
-        }
-        
-        //initialize for untiled layers
-        if (this.singleTile) {
-          if (this.useOverlay) {
-            OpenLayers.Util.applyDefaults(
-                           this.params,
-                           this.OVERLAY_PARAMS
-                           );
-            if (!this.useAsyncOverlay) {
-              this.params.version = "1.0.0";
-            }
-          } else {
-            OpenLayers.Util.applyDefaults(
-                           this.params,
-                           this.SINGLE_TILE_PARAMS
-                           );
-          }         
-        } else {
-            //initialize for tiled layers
-            if (this.useHttpTile) {
-                OpenLayers.Util.applyDefaults(
-                               this.params,
-                               this.FOLDER_PARAMS
-                               );
-            } else {
-                OpenLayers.Util.applyDefaults(
-                               this.params,
-                               this.TILE_PARAMS
-                               );
-            }
-            this.setTileSize(this.defaultSize); 
-        }
-    },
-
-    /**
-     * Method: clone
-     * Create a clone of this layer
-     *
-     * Returns:
-     * {<OpenLayers.Layer.MapGuide>} An exact clone of this layer
-     */
-    clone: function (obj) {
-      if (obj == null) {
-            obj = new OpenLayers.Layer.MapGuide(this.name,
-                                           this.url,
-                                           this.params,
-                                           this.getOptions());
-      }
-      //get all additions from superclasses
-      obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);
-
-      return obj;
-    },
-
-    /**
-     * Method: addTile
-     * Creates a tile, initializes it, and adds it to the layer div. 
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                         null, this.tileSize);
-    },
-
-    /**
-     * Method: getURL
-     * Return a query string for this layer
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} A bounds representing the bbox 
-     *                                for the request
-     *
-     * Returns:
-     * {String} A string with the layer's url and parameters and also 
-     *          the passed-in bounds and appropriate tile size specified 
-     *          as parameters.
-     */
-    getURL: function (bounds) {
-        var url;
-        var center = bounds.getCenterLonLat();
-        var mapSize = this.map.getSize();
-
-        if (this.singleTile) {
-          //set up the call for GETMAPIMAGE or GETDYNAMICMAPOVERLAY with
-          //dynamic map parameters
-          var params = {
-            setdisplaydpi: OpenLayers.DOTS_PER_INCH,
-            setdisplayheight: mapSize.h*this.ratio,
-            setdisplaywidth: mapSize.w*this.ratio,
-            setviewcenterx: center.lon,
-            setviewcentery: center.lat,
-            setviewscale: this.map.getScale()
-          };
-          
-          if (this.useOverlay && !this.useAsyncOverlay) {
-            //first we need to call GETVISIBLEMAPEXTENT to set the extent
-            var getVisParams = {};
-            getVisParams = OpenLayers.Util.extend(getVisParams, params);
-            getVisParams.operation = "GETVISIBLEMAPEXTENT";
-            getVisParams.version = "1.0.0";
-            getVisParams.session = this.params.session;
-            getVisParams.mapName = this.params.mapName;
-            getVisParams.format = 'text/xml';
-            url = this.getFullRequestString( getVisParams );
-            
-            OpenLayers.Request.GET({url: url, async: false});
-          }
-          //construct the full URL
-          url = this.getFullRequestString( params );
-        } else {
-
-          //tiled version
-          var currentRes = this.map.getResolution();
-          var colidx = Math.floor((bounds.left-this.maxExtent.left)/currentRes);
-          colidx = Math.round(colidx/this.tileSize.w);
-          var rowidx = Math.floor((this.maxExtent.top-bounds.top)/currentRes);
-          rowidx = Math.round(rowidx/this.tileSize.h);
-
-          if (this.useHttpTile){
-	          url = this.getImageFilePath(
-                   {
-                       tilecol: colidx,
-                       tilerow: rowidx,
-                       scaleindex: this.resolutions.length - this.map.zoom - 1
-                    });
-		  
-          } else {
-            url = this.getFullRequestString(
-                   {
-                       tilecol: colidx,
-                       tilerow: rowidx,
-                       scaleindex: this.resolutions.length - this.map.zoom - 1
-                    });
-          }
-       }
-       return url;
-    },
-
-    /**
-     * Method: getFullRequestString
-     * getFullRequestString on MapGuide layers is special, because we 
-     * do a regular expression replace on ',' in parameters to '+'.
-     * This is why it is subclassed here.
-     *
-     * Parameters:
-     * altUrl - {String} Alternative base URL to use.
-     *
-     * Returns:
-     * {String} A string with the layer's url appropriately encoded for MapGuide
-     */
-    getFullRequestString:function(newParams, altUrl) {
-        // use layer's url unless altUrl passed in
-        var url = (altUrl == null) ? this.url : altUrl;
-        
-        // if url is not a string, it should be an array of strings, 
-        //  in which case we will randomly select one of them in order
-        //  to evenly distribute requests to different urls.
-        if (typeof url == "object") {
-            url = url[Math.floor(Math.random()*url.length)];
-        }   
-        // requestString always starts with url
-        var requestString = url;        
-
-        // create a new params hashtable with all the layer params and the 
-        // new params together. then convert to string
-        var allParams = OpenLayers.Util.extend({}, this.params);
-        allParams = OpenLayers.Util.extend(allParams, newParams);
-        // ignore parameters that are already in the url search string
-        var urlParams = OpenLayers.Util.upperCaseObject(
-                            OpenLayers.Util.getParameters(url));
-        for(var key in allParams) {
-            if(key.toUpperCase() in urlParams) {
-                delete allParams[key];
-            }
-        }
-        var paramsString = OpenLayers.Util.getParameterString(allParams);
-        
-        /* MapGuide needs '+' seperating things like bounds/height/width.
-           Since typically this is URL encoded, we use a slight hack: we
-           depend on the list-like functionality of getParameterString to
-           leave ',' only in the case of list items (since otherwise it is
-           encoded) then do a regular expression replace on the , characters
-           to '+' */
-        paramsString = paramsString.replace(/,/g, "+");
-        
-        if (paramsString != "") {
-            var lastServerChar = url.charAt(url.length - 1);
-            if ((lastServerChar == "&") || (lastServerChar == "?")) {
-                requestString += paramsString;
-            } else {
-                if (url.indexOf('?') == -1) {
-                    //serverPath has no ? -- add one
-                    requestString += '?' + paramsString;
-                } else {
-                    //serverPath contains ?, so must already have paramsString at the end
-                    requestString += '&' + paramsString;
-                }
-            }
-        }
-        return requestString;
-    },
-
-     /** 
-     * Method: getImageFilePath
-     * special handler to request mapguide tiles from an http exposed tilecache 
-     *
-     * Parameters:
-     * altUrl - {String} Alternative base URL to use.
-     *
-     * Returns:
-     * {String} A string with the url for the tile image
-     */
-    getImageFilePath:function(newParams, altUrl) {
-        // use layer's url unless altUrl passed in
-        var url = (altUrl == null) ? this.url : altUrl;
-        
-        // if url is not a string, it should be an array of strings, 
-        //  in which case we will randomly select one of them in order
-        //  to evenly distribute requests to different urls.
-        if (typeof url == "object") {
-            url = url[Math.floor(Math.random()*url.length)];
-        }   
-        // requestString always starts with url
-        var requestString = url;        
-
-        var tileRowGroup = "";
-        var tileColGroup = "";
-        
-        if (newParams.tilerow < 0) {
-          tileRowGroup =  '-';
-        }
-          
-        if (newParams.tilerow == 0 ) {
-          tileRowGroup += '0';
-        } else {
-          tileRowGroup += Math.floor(Math.abs(newParams.tilerow/this.params.tileRowsPerFolder)) * this.params.tileRowsPerFolder;
-        }
-          
-        if (newParams.tilecol < 0) {
-          tileColGroup =  '-';
-        }
-        
-        if (newParams.tilecol == 0) {
-          tileColGroup += '0';
-        } else {
-          tileColGroup += Math.floor(Math.abs(newParams.tilecol/this.params.tileColumnsPerFolder)) * this.params.tileColumnsPerFolder;
-        }					
-        
-        var tilePath = '/S' + Math.floor(newParams.scaleindex)
-                + '/' + this.params.basemaplayergroupname
-                + '/R' + tileRowGroup
-                + '/C' + tileColGroup
-                + '/' + (newParams.tilerow % this.params.tileRowsPerFolder) 
-                + '_' + (newParams.tilecol % this.params.tileColumnsPerFolder) 
-                + '.' + this.params.format;
-    
-        if (this.params.querystring) {
-               tilePath += "?" + this.params.querystring;
-        }
-        
-        requestString += tilePath;
-        return requestString;
-    },
-    
-    /** 
-     * Method: calculateGridLayout
-     * Generate parameters for the grid layout. This  
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bound>}
-     * extent - {<OpenLayers.Bounds>}
-     * resolution - {Number}
-     *
-     * Returns:
-     * Object containing properties tilelon, tilelat, tileoffsetlat,
-     * tileoffsetlat, tileoffsetx, tileoffsety
-     */
-    calculateGridLayout: function(bounds, extent, resolution) {
-        var tilelon = resolution * this.tileSize.w;
-        var tilelat = resolution * this.tileSize.h;
-        
-        var offsetlon = bounds.left - extent.left;
-        var tilecol = Math.floor(offsetlon/tilelon) - this.buffer;
-        var tilecolremain = offsetlon/tilelon - tilecol;
-        var tileoffsetx = -tilecolremain * this.tileSize.w;
-        var tileoffsetlon = extent.left + tilecol * tilelon;
-        
-        var offsetlat = extent.top - bounds.top + tilelat; 
-        var tilerow = Math.floor(offsetlat/tilelat) - this.buffer;
-        var tilerowremain = tilerow - offsetlat/tilelat;
-        var tileoffsety = tilerowremain * this.tileSize.h;
-        var tileoffsetlat = extent.top - tilelat*tilerow;
-        
-        return { 
-          tilelon: tilelon, tilelat: tilelat,
-          tileoffsetlon: tileoffsetlon, tileoffsetlat: tileoffsetlat,
-          tileoffsetx: tileoffsetx, tileoffsety: tileoffsety
-        };
-    },
-    
-    CLASS_NAME: "OpenLayers.Layer.MapGuide"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/MapServer.js
+++ /dev/null
@@ -1,200 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Layer/Grid.js
- */
-
-/**
- * Class: OpenLayers.Layer.MapServer
- * Instances of OpenLayers.Layer.MapServer are used to display
- * data from a MapServer CGI instance.
- *
- * Inherits from:
- *  - <OpenLayers.Layer.Grid>
- */
-OpenLayers.Layer.MapServer = OpenLayers.Class(OpenLayers.Layer.Grid, {
-
-    /**
-     * Constant: DEFAULT_PARAMS
-     * {Object} Hashtable of default parameter key/value pairs 
-     */
-    DEFAULT_PARAMS: {
-        mode: "map",
-        map_imagetype: "png"
-    },
-
-    /**
-     * Constructor: OpenLayers.Layer.MapServer
-     * Create a new MapServer layer object
-     *
-     * Parameters:
-     * name - {String} A name for the layer
-     * url - {String} Base url for the MapServer CGI
-     *       (e.g. http://www2.dmsolutions.ca/cgi-bin/mapserv)
-     * params - {Object} An object with key/value pairs representing the
-     *          GetMap query string parameters and parameter values.
-     * options - {Ojbect} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, url, params, options) {
-        var newArguments = [];
-        newArguments.push(name, url, params, options);
-        OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
-
-        this.params = OpenLayers.Util.applyDefaults(
-            this.params, this.DEFAULT_PARAMS
-        );
-
-        // unless explicitly set in options, if the layer is transparent, 
-        // it will be an overlay
-        if (options == null || options.isBaseLayer == null) {
-            this.isBaseLayer = ((this.params.transparent != "true") && 
-                                (this.params.transparent != true));
-        }
-    },
-
-    /**
-     * Method: clone
-     * Create a clone of this layer
-     *
-     * Returns:
-     * {<OpenLayers.Layer.MapServer>} An exact clone of this layer
-     */
-    clone: function (obj) {
-        if (obj == null) {
-            obj = new OpenLayers.Layer.MapServer(this.name,
-                                           this.url,
-                                           this.params,
-                                           this.getOptions());
-        }
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);
-
-        // copy/set any non-init, non-simple values here
-
-        return obj;
-    },
-
-    /**
-     * Method: addTile
-     * Creates a tile, initializes it, and adds it to the layer div. 
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                         null, this.tileSize);
-    },
-    
-    /**
-     * Method: getURL
-     * Return a query string for this layer
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} A bounds representing the bbox 
-     *                                for the request
-     *
-     * Returns:
-     * {String} A string with the layer's url and parameters and also 
-     *          the passed-in bounds and appropriate tile size specified 
-     *          as parameters.
-     */
-    getURL: function (bounds) {
-        bounds = this.adjustBounds(bounds);
-        // Make a list, so that getFullRequestString uses literal "," 
-        var extent = [bounds.left, bounds. bottom, bounds.right, bounds.top];
-
-        var imageSize = this.getImageSize(); 
-        
-        // make lists, so that literal ','s are used 
-        var url = this.getFullRequestString(
-                     {mapext:   extent,
-                      imgext:   extent,
-                      map_size: [imageSize.w, imageSize.h],
-                      imgx:     imageSize.w / 2,
-                      imgy:     imageSize.h / 2,
-                      imgxy:    [imageSize.w, imageSize.h]
-                      });
-        
-        return url;
-    },
-    
-    /** 
-     * Method: getFullRequestString
-     * combine the layer's url with its params and these newParams. 
-     *   
-     * Parameter:
-     * newParams - {Object} New parameters that should be added to the 
-     *                      request string.
-     * altUrl - {String} (optional) Replace the URL in the full request  
-     *                              string with the provided URL.
-     * 
-     * Returns: 
-     * {String} A string with the layer's url and parameters embedded in it.
-     */
-    getFullRequestString:function(newParams, altUrl) {
-        // use layer's url unless altUrl passed in
-        var url = (altUrl == null) ? this.url : altUrl;
-        
-        // create a new params hashtable with all the layer params and the 
-        // new params together. then convert to string
-        var allParams = OpenLayers.Util.extend({}, this.params);
-        allParams = OpenLayers.Util.extend(allParams, newParams);
-        var paramsString = OpenLayers.Util.getParameterString(allParams);
-        
-        // if url is not a string, it should be an array of strings, 
-        // in which case we will deterministically select one of them in 
-        // order to evenly distribute requests to different urls.
-        if (url instanceof Array) {
-            url = this.selectUrl(paramsString, url);
-        }   
-        
-        // ignore parameters that are already in the url search string
-        var urlParams = OpenLayers.Util.upperCaseObject(
-                            OpenLayers.Util.getParameters(url));
-        for(var key in allParams) {
-            if(key.toUpperCase() in urlParams) {
-                delete allParams[key];
-            }
-        }
-        paramsString = OpenLayers.Util.getParameterString(allParams);
-        
-        // requestString always starts with url
-        var requestString = url;        
-
-        // MapServer needs '+' seperating things like bounds/height/width.
-        //   Since typically this is URL encoded, we use a slight hack: we
-        //  depend on the list-like functionality of getParameterString to
-        //  leave ',' only in the case of list items (since otherwise it is
-        //  encoded) then do a regular expression replace on the , characters
-        //  to '+'
-        //
-        paramsString = paramsString.replace(/,/g, "+");
-        
-        if (paramsString != "") {
-            var lastServerChar = url.charAt(url.length - 1);
-            if ((lastServerChar == "&") || (lastServerChar == "?")) {
-                requestString += paramsString;
-            } else {
-                if (url.indexOf('?') == -1) {
-                    //serverPath has no ? -- add one
-                    requestString += '?' + paramsString;
-                } else {
-                    //serverPath contains ?, so must already have paramsString at the end
-                    requestString += '&' + paramsString;
-                }
-            }
-        }
-        return requestString;
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.MapServer"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/MapServer/Untiled.js
+++ /dev/null
@@ -1,73 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
- 
-/**
- * @requires OpenLayers/Layer/MapServer.js
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Layer.MapServer.Untiled
- * *Deprecated*.  To be removed in 3.0.  Instead use OpenLayers.Layer.MapServer
- *     and pass the option 'singleTile' as true.
- * 
- * Inherits from: 
- *  - <OpenLayers.Layer.MapServer>
- */
-OpenLayers.Layer.MapServer.Untiled = OpenLayers.Class(OpenLayers.Layer.MapServer, {
-
-    /**
-     * APIProperty: singleTile
-     * {singleTile} Always true for untiled.
-     */
-    singleTile: true,
-
-    /**
-     * Constructor: OpenLayers.Layer.MapServer.Untiled
-     *
-     * Parameters:
-     * name - {String} 
-     * url - {String} 
-     * params - {Object} 
-     * options - {Object} 
-     */
-    initialize: function(name, url, params, options) {
-        OpenLayers.Layer.MapServer.prototype.initialize.apply(this, arguments);
-        
-        var msg = "The OpenLayers.Layer.MapServer.Untiled class is deprecated and " +
-                  "will be removed in 3.0. Instead, you should use the " +
-                  "normal OpenLayers.Layer.MapServer class, passing it the option " +
-                  "'singleTile' as true.";
-        OpenLayers.Console.warn(msg);
-    },    
-
-    /**
-     * Method: clone
-     * Create a clone of this layer
-     *
-     * Returns:
-     * {<OpenLayers.Layer.MapServer.Untiled>} An exact clone of this layer
-     */
-    clone: function (obj) {
-        
-        if (obj == null) {
-            obj = new OpenLayers.Layer.MapServer.Untiled(this.name,
-                                                         this.url,
-                                                         this.params,
-                                                         this.getOptions());
-        }
-
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.MapServer.prototype.clone.apply(this, [obj]);
-
-        // copy/set any non-init, non-simple values here
-        
-        return obj;
-    }, 
-
-    CLASS_NAME: "OpenLayers.Layer.MapServer.Untiled"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/Markers.js
+++ /dev/null
@@ -1,188 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer.js
- */
-
-/**
- * Class: OpenLayers.Layer.Markers
- * 
- * Inherits from:
- *  - <OpenLayers.Layer> 
- */
-OpenLayers.Layer.Markers = OpenLayers.Class(OpenLayers.Layer, {
-    
-    /** 
-     * APIProperty: isBaseLayer 
-     * {Boolean} Markers layer is never a base layer.  
-     */
-    isBaseLayer: false,
-    
-    /** 
-     * APIProperty: markers 
-     * {Array(<OpenLayers.Marker>)} internal marker list 
-     */
-    markers: null,
-
-
-    /** 
-     * Property: drawn 
-     * {Boolean} internal state of drawing. This is a workaround for the fact
-     * that the map does not call moveTo with a zoomChanged when the map is
-     * first starting up. This lets us catch the case where we have *never*
-     * drawn the layer, and draw it even if the zoom hasn't changed.
-     */
-    drawn: false,
-    
-    /**
-     * Constructor: OpenLayers.Layer.Markers 
-     * Create a Markers layer.
-     *
-     * Parameters:
-     * name - {String} 
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, options) {
-        OpenLayers.Layer.prototype.initialize.apply(this, arguments);
-        this.markers = [];
-    },
-    
-    /**
-     * APIMethod: destroy 
-     */
-    destroy: function() {
-        this.clearMarkers();
-        this.markers = null;
-        OpenLayers.Layer.prototype.destroy.apply(this, arguments);
-    },
-
-    /**
-     * APIMethod: setOpacity
-     * Sets the opacity for all the markers.
-     * 
-     * Parameter:
-     * opacity - {Float}
-     */
-    setOpacity: function(opacity) {
-        if (opacity != this.opacity) {
-            this.opacity = opacity;
-            for (var i=0, len=this.markers.length; i<len; i++) {
-                this.markers[i].setOpacity(this.opacity);
-            }
-        }
-    },
-
-    /** 
-     * Method: moveTo
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} 
-     * zoomChanged - {Boolean} 
-     * dragging - {Boolean} 
-     */
-    moveTo:function(bounds, zoomChanged, dragging) {
-        OpenLayers.Layer.prototype.moveTo.apply(this, arguments);
-
-        if (zoomChanged || !this.drawn) {
-            for(var i=0, len=this.markers.length; i<len; i++) {
-                this.drawMarker(this.markers[i]);
-            }
-            this.drawn = true;
-        }
-    },
-
-    /**
-     * APIMethod: addMarker
-     *
-     * Parameters:
-     * marker - {<OpenLayers.Marker>} 
-     */
-    addMarker: function(marker) {
-        this.markers.push(marker);
-
-        if (this.opacity != null) {
-            marker.setOpacity(this.opacity);
-        }
-
-        if (this.map && this.map.getExtent()) {
-            marker.map = this.map;
-            this.drawMarker(marker);
-        }
-    },
-
-    /**
-     * APIMethod: removeMarker
-     *
-     * Parameters:
-     * marker - {<OpenLayers.Marker>} 
-     */
-    removeMarker: function(marker) {
-        if (this.markers && this.markers.length) {
-            OpenLayers.Util.removeItem(this.markers, marker);
-            marker.erase();
-        }
-    },
-
-    /**
-     * Method: clearMarkers
-     * This method removes all markers from a layer. The markers are not
-     * destroyed by this function, but are removed from the list of markers.
-     */
-    clearMarkers: function() {
-        if (this.markers != null) {
-            while(this.markers.length > 0) {
-                this.removeMarker(this.markers[0]);
-            }
-        }
-    },
-
-    /** 
-     * Method: drawMarker
-     * Calculate the pixel location for the marker, create it, and 
-     *    add it to the layer's div
-     *
-     * Parameters:
-     * marker - {<OpenLayers.Marker>} 
-     */
-    drawMarker: function(marker) {
-        var px = this.map.getLayerPxFromLonLat(marker.lonlat);
-        if (px == null) {
-            marker.display(false);
-        } else {
-            if (!marker.isDrawn()) {
-                var markerImg = marker.draw(px);
-                this.div.appendChild(markerImg);
-            } else if(marker.icon) {
-                marker.icon.moveTo(px);
-            }
-        }
-    },
-    
-    /** 
-     * APIMethod: getDataExtent
-     * Calculates the max extent which includes all of the markers.
-     * 
-     * Returns:
-     * {<OpenLayers.Bounds>}
-     */
-    getDataExtent: function () {
-        var maxExtent = null;
-        
-        if ( this.markers && (this.markers.length > 0)) {
-            var maxExtent = new OpenLayers.Bounds();
-            for(var i=0, len=this.markers.length; i<len; i++) {
-                var marker = this.markers[i];
-                maxExtent.extend(marker.lonlat);
-            }
-        }
-
-        return maxExtent;
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.Markers"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/MultiMap.js
+++ /dev/null
@@ -1,285 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Layer/EventPane.js
- * @requires OpenLayers/Layer/FixedZoomLevels.js
- */
-
-/**
- * Class: OpenLayers.Layer.MultiMap
- * Note that MultiMap does not fully support the sphericalMercator
- * option. See Ticket #953 for more details.
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.EventPane>
- *  - <OpenLayers.Layer.FixedZoomLevels>
- */
-OpenLayers.Layer.MultiMap = OpenLayers.Class(
-  OpenLayers.Layer.EventPane, OpenLayers.Layer.FixedZoomLevels, {
-    
-    /** 
-     * Constant: MIN_ZOOM_LEVEL
-     * {Integer} 1 
-     */
-    MIN_ZOOM_LEVEL: 1,
-    
-    /** 
-     * Constant: MAX_ZOOM_LEVEL
-     * {Integer} 17
-     */
-    MAX_ZOOM_LEVEL: 17,
-
-    /** 
-     * Constant: RESOLUTIONS
-     * {Array(Float)} Hardcode these resolutions so that they are more closely
-     *                tied with the standard wms projection
-     */
-    RESOLUTIONS: [
-        9, 
-        1.40625,
-        0.703125,
-        0.3515625,
-        0.17578125,
-        0.087890625,
-        0.0439453125,
-        0.02197265625,
-        0.010986328125,
-        0.0054931640625,
-        0.00274658203125,
-        0.001373291015625,
-        0.0006866455078125,
-        0.00034332275390625,
-        0.000171661376953125,
-        0.0000858306884765625,
-        0.00004291534423828125
-    ],
-
-    /**
-     * APIProperty: type
-     * {?}
-     */
-    type: null,
-
-    /** 
-     * Constructor: OpenLayers.Layer.MultiMap
-     * 
-     * Parameters:
-     * name - {String}
-     * options - {Object}
-     */
-    initialize: function(name, options) {
-        OpenLayers.Layer.EventPane.prototype.initialize.apply(this, arguments);
-        OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this, 
-                                                                    arguments);
-        if (this.sphericalMercator) {
-            OpenLayers.Util.extend(this, OpenLayers.Layer.SphericalMercator);
-            this.initMercatorParameters();
-            this.RESOLUTIONS.unshift(10); 
-        }    
-    },
-    
-    /**
-     * Method: loadMapObject
-     */
-    loadMapObject:function() {
-        try { //crash proofing
-            this.mapObject = new MultimapViewer(this.div);
-        } catch (e) { }
-    },
-
-    /** 
-     * APIMethod: getWarningHTML
-     * 
-     * Returns: 
-     * {String} String with information on why layer is broken, how to get
-     *          it working.
-     */
-    getWarningHTML:function() {
-        return OpenLayers.i18n(
-            "getLayerWarning", {'layerType':"MM", 'layerLib':"MultiMap"}
-        );
-    },
-
-
-
-    /************************************
-     *                                  *
-     *   MapObject Interface Controls   *
-     *                                  *
-     ************************************/
-
-
-  // Get&Set Center, Zoom
-
-    /** 
-     * APIMethod: setMapObjectCenter
-     * Set the mapObject to the specified center and zoom
-     * 
-     * Parameters:
-     * center - {Object} MapObject LonLat format
-     * zoom - {int} MapObject zoom format
-     */
-    setMapObjectCenter: function(center, zoom) {
-        this.mapObject.goToPosition(center, zoom); 
-    },
-   
-    /**
-     * APIMethod: getMapObjectCenter
-     * 
-     * Returns: 
-     * {Object} The mapObject's current center in Map Object format
-     */
-    getMapObjectCenter: function() {
-        return this.mapObject.getCurrentPosition();
-    },
-
-    /** 
-     * APIMethod: getMapObjectZoom
-     * 
-     * Returns:
-     * {Integer} The mapObject's current zoom, in Map Object format
-     */
-    getMapObjectZoom: function() {
-        return this.mapObject.getZoomFactor();
-    },
-
-
-  // LonLat - Pixel Translation
-  
-    /**
-     * APIMethod: getMapObjectLonLatFromMapObjectPixel
-     * 
-     * Parameters:
-     * moPixel - {Object} MapObject Pixel format
-     * 
-     * Returns:
-     * {Object} MapObject LonLat translated from MapObject Pixel
-     */
-    getMapObjectLonLatFromMapObjectPixel: function(moPixel) {
-        moPixel.x = moPixel.x - (this.map.getSize().w/2);
-        moPixel.y = moPixel.y - (this.map.getSize().h/2);
-        return this.mapObject.getMapPositionAt(moPixel);
-    },
-
-    /**
-     * APIMethod: getMapObjectPixelFromMapObjectLonLat
-     * 
-     * Parameters:
-     * moLonLat - {Object} MapObject LonLat format
-     * 
-     * Returns:
-     * {Object} MapObject Pixel transtlated from MapObject LonLat
-     */
-    getMapObjectPixelFromMapObjectLonLat: function(moLonLat) {
-        return this.mapObject.geoPosToContainerPixels(moLonLat);
-    },
-
-
-    /************************************
-     *                                  *
-     *       MapObject Primitives       *
-     *                                  *
-     ************************************/
-
-
-  // LonLat
-    
-    /**
-     * APIMethod: getLongitudeFromMapObjectLonLat
-     * 
-     * Parameters:
-     * moLonLat - {Object} MapObject LonLat format
-     * 
-     * Returns:
-     * {Float} Longitude of the given MapObject LonLat
-     */
-    getLongitudeFromMapObjectLonLat: function(moLonLat) {
-        return this.sphericalMercator ? 
-            this.forwardMercator(moLonLat.lon, moLonLat.lat).lon :
-            moLonLat.lon;
-    },
-
-    /**
-     * APIMethod: getLatitudeFromMapObjectLonLat
-     * 
-     * Parameters:
-     * moLonLat - {Object} MapObject LonLat format
-     * 
-     * Returns:
-     * {Float} Latitude of the given MapObject LonLat
-     */
-    getLatitudeFromMapObjectLonLat: function(moLonLat) {
-        return this.sphericalMercator ? 
-            this.forwardMercator(moLonLat.lon, moLonLat.lat).lat :
-            moLonLat.lat;
-    },
-
-    /**
-     * APIMethod: getMapObjectLonLatFromLonLat
-     * 
-     * Parameters:
-     * lon - {Float}
-     * lat - {Float}
-     * 
-     * Returns:
-     * {Object} MapObject LonLat built from lon and lat params
-     */
-    getMapObjectLonLatFromLonLat: function(lon, lat) {
-        var mmLatLon;
-        if(this.sphericalMercator) {
-            var lonlat = this.inverseMercator(lon, lat);
-            mmLatLon = new MMLatLon(lonlat.lat, lonlat.lon);
-        } else {
-            mmLatLon = new MMLatLon(lat, lon);
-        }
-        return mmLatLon;
-    },
-
-  // Pixel
-    
-    /**
-     * APIMethod: getXFromMapObjectPixel
-     * 
-     * Parameters:
-     * moPixel - {Object} MapObject Pixel format
-     * 
-     * Returns:
-     * {Integer} X value of the MapObject Pixel
-     */
-    getXFromMapObjectPixel: function(moPixel) {
-        return moPixel.x;
-    },
-
-    /**
-     * APIMethod: getYFromMapObjectPixel
-     * 
-     * Parameters:
-     * moPixel - {Object} MapObject Pixel format
-     * 
-     * Returns:
-     * {Integer} Y value of the MapObject Pixel
-     */
-    getYFromMapObjectPixel: function(moPixel) {
-        return moPixel.y;
-    },
-
-    /**
-     * APIMethod: getMapObjectPixelFromXY
-     * 
-     * Parameters:
-     * x - {Integer}
-     * y - {Integer}
-     * 
-     * Returns:
-     * {Object} MapObject Pixel from x and y parameters
-     */
-    getMapObjectPixelFromXY: function(x, y) {
-        return new MMPoint(x, y);
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.MultiMap"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/PointTrack.js
+++ /dev/null
@@ -1,104 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Layer/Vector.js
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Layer.PointTrack
- * Vector layer to display ordered point features as a line, creating one
- * LineString feature for each pair of two points.
- *
- * Inherits from:
- *  - <OpenLayers.Layer.Vector> 
- */
-OpenLayers.Layer.PointTrack = OpenLayers.Class(OpenLayers.Layer.Vector, {
-  
-    /**
-     * APIProperty:
-     * dataFrom  - {<OpenLayers.Layer.PointTrack.dataFrom>} optional. If the
-     *             lines should get the data/attributes from one of the two
-     *             points, creating it, which one should it be?
-     */
-    dataFrom: null,
-    
-    /**
-     * Constructor: OpenLayers.PointTrack
-     * Constructor for a new OpenLayers.PointTrack instance.
-     *
-     * Parameters:
-     * name     - {String} name of the layer
-     * options  - {Object} Optional object with properties to tag onto the
-     *            instance.
-     */    
-    initialize: function(name, options) {
-        OpenLayers.Layer.Vector.prototype.initialize.apply(this, arguments);
-    },
-        
-    /**
-     * APIMethod: addNodes
-     * Adds point features that will be used to create lines from, using point
-     * pairs. The first point of a pair will be the source node, the second
-     * will be the target node.
-     * 
-     * Parameters:
-     * pointFeatures - {Array(<OpenLayers.Feature>)}
-     * 
-     */
-    addNodes: function(pointFeatures) {
-        if (pointFeatures.length < 2) {
-            OpenLayers.Console.error(
-                    "At least two point features have to be added to create" +
-                    "a line from");
-            return;
-        }
-        
-        var lines = new Array(pointFeatures.length-1);
-        
-        var pointFeature, startPoint, endPoint;
-        for(var i=0, len=pointFeatures.length; i<len; i++) {
-            pointFeature = pointFeatures[i];
-            endPoint = pointFeature.geometry;
-            
-            if (!endPoint) {
-              var lonlat = pointFeature.lonlat;
-              endPoint = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
-            } else if(endPoint.CLASS_NAME != "OpenLayers.Geometry.Point") {
-                OpenLayers.Console.error(
-                        "Only features with point geometries are supported.");
-                return;
-            }
-            
-            if(i > 0) {
-                var attributes = (this.dataFrom != null) ?
-                        (pointFeatures[i+this.dataFrom].data ||
-                                pointFeatures[i+this.dataFrom].attributes) :
-                        null;
-                var line = new OpenLayers.Geometry.LineString([startPoint,
-                        endPoint]);
-                        
-                lines[i-1] = new OpenLayers.Feature.Vector(line, attributes);
-            }
-            
-            startPoint = endPoint;
-        }
-
-        this.addFeatures(lines);
-    },
-    
-    CLASS_NAME: "OpenLayers.Layer.PointTrack"
-});
-
-/**
- * Constant: OpenLayers.Layer.PointTrack.dataFrom
- * {Object} with the following keys
- * - SOURCE_NODE: take data/attributes from the source node of the line
- * - TARGET_NODE: take data/attributes from the target node of the line
- */
-OpenLayers.Layer.PointTrack.dataFrom = {'SOURCE_NODE': -1, 'TARGET_NODE': 0};
-
-

--- a/labs/openlayers/lib/OpenLayers/Layer/SphericalMercator.js
+++ /dev/null
@@ -1,197 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Layer.js
- * @requires OpenLayers/Projection.js
- */
-
-/**
- * Class: OpenLayers.Layer.SphericalMercator
- * A mixin for layers that wraps up the pieces neccesary to have a coordinate
- *     conversion for working with commercial APIs which use a spherical
- *     mercator projection.  Using this layer as a base layer, additional
- *     layers can be used as overlays if they are in the same projection.
- *
- * A layer is given properties of this object by setting the sphericalMercator
- *     property to true.
- *
- * More projection information:
- *  - http://spatialreference.org/ref/user/google-projection/
- *
- * Proj4 Text:
- *     +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0
- *     +k=1.0 +units=m +nadgrids=@null +no_defs
- *
- * WKT:
- *     900913=PROJCS["WGS84 / Simple Mercator", GEOGCS["WGS 84",
- *     DATUM["WGS_1984", SPHEROID["WGS_1984", 6378137.0, 298.257223563]], 
- *     PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], 
- *     AXIS["Longitude", EAST], AXIS["Latitude", NORTH]],
- *     PROJECTION["Mercator_1SP_Google"], 
- *     PARAMETER["latitude_of_origin", 0.0], PARAMETER["central_meridian", 0.0], 
- *     PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], 
- *     PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["x", EAST],
- *     AXIS["y", NORTH], AUTHORITY["EPSG","900913"]]
- */
-OpenLayers.Layer.SphericalMercator = {
-
-    /**
-     * Method: getExtent
-     * Get the map's extent.
-     *
-     * Returns:
-     * {<OpenLayers.Bounds>} The map extent.
-     */
-    getExtent: function() {
-        var extent = null;
-        if (this.sphericalMercator) {
-            extent = this.map.calculateBounds();
-        } else {
-            extent = OpenLayers.Layer.FixedZoomLevels.prototype.getExtent.apply(this);
-        }
-        return extent;
-    },
-
-    /**
-     * Method: getLonLatFromViewPortPx
-     * Get a map location from a pixel location
-     * 
-     * Parameters:
-     * viewPortPx - {<OpenLayers.Pixel>}
-     *
-     * Returns:
-     *  {<OpenLayers.LonLat>} An OpenLayers.LonLat which is the passed-in view
-     *  port OpenLayers.Pixel, translated into lon/lat by map lib
-     *  If the map lib is not loaded or not centered, returns null
-     */
-    getLonLatFromViewPortPx: function (viewPortPx) {
-        return OpenLayers.Layer.prototype.getLonLatFromViewPortPx.apply(this, arguments);
-    },
-    
-    /**
-     * Method: getViewPortPxFromLonLat
-     * Get a pixel location from a map location
-     *
-     * Parameters:
-     * lonlat - {<OpenLayers.LonLat>}
-     *
-     * Returns:
-     * {<OpenLayers.Pixel>} An OpenLayers.Pixel which is the passed-in
-     * OpenLayers.LonLat, translated into view port pixels by map lib
-     * If map lib is not loaded or not centered, returns null
-     */
-    getViewPortPxFromLonLat: function (lonlat) {
-        return OpenLayers.Layer.prototype.getViewPortPxFromLonLat.apply(this, arguments);
-    },
-
-    /** 
-     * Method: initMercatorParameters 
-     * Set up the mercator parameters on the layer: resolutions,
-     *     projection, units.
-     */
-    initMercatorParameters: function() {
-        // set up properties for Mercator - assume EPSG:900913
-        this.RESOLUTIONS = [];
-        var maxResolution = 156543.0339;
-        for(var zoom=0; zoom<=this.MAX_ZOOM_LEVEL; ++zoom) {
-            this.RESOLUTIONS[zoom] = maxResolution / Math.pow(2, zoom);
-        }
-        this.units = "m";
-        this.projection = this.projection || "EPSG:900913";
-    },
-
-    /**
-     * APIMethod: forwardMercator
-     * Given a lon,lat in EPSG:4326, return a point in Spherical Mercator.
-     *
-     * Parameters:
-     * lon - {float} 
-     * lat - {float}
-     * 
-     * Returns:
-     * {<OpenLayers.LonLat>} The coordinates transformed to Mercator.
-     */
-    forwardMercator: function(lon, lat) {
-        var x = lon * 20037508.34 / 180;
-        var y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180);
-
-        y = y * 20037508.34 / 180;
-        
-        return new OpenLayers.LonLat(x, y);
-    },
-
-    /**
-     * APIMethod: inverseMercator
-     * Given a x,y in Spherical Mercator, return a point in EPSG:4326.
-     *
-     * Parameters:
-     * x - {float} A map x in Spherical Mercator.
-     * y - {float} A map y in Spherical Mercator.
-     * 
-     * Returns:
-     * {<OpenLayers.LonLat>} The coordinates transformed to EPSG:4326.
-     */
-    inverseMercator: function(x, y) {
-
-        var lon = (x / 20037508.34) * 180;
-        var lat = (y / 20037508.34) * 180;
-
-        lat = 180/Math.PI * (2 * Math.atan(Math.exp(lat * Math.PI / 180)) - Math.PI / 2);
-        
-        return new OpenLayers.LonLat(lon, lat);
-    },
-
-    /**
-     * Method: projectForward 
-     * Given an object with x and y properties in EPSG:4326, modify the x,y
-     * properties on the object to be the Spherical Mercator projected
-     * coordinates.
-     *
-     * Parameters:
-     * point - {Object} An object with x and y properties. 
-     * 
-     * Returns:
-     * {Object} The point, with the x and y properties transformed to spherical
-     * mercator.
-     */
-    projectForward: function(point) {
-        var lonlat = OpenLayers.Layer.SphericalMercator.forwardMercator(point.x, point.y);
-        point.x = lonlat.lon;
-        point.y = lonlat.lat;
-        return point;
-    },
-    
-    /**
-     * Method: projectInverse
-     * Given an object with x and y properties in Spherical Mercator, modify
-     * the x,y properties on the object to be the unprojected coordinates.
-     *
-     * Parameters:
-     * point - {Object} An object with x and y properties. 
-     * 
-     * Returns:
-     * {Object} The point, with the x and y properties transformed from
-     * spherical mercator to unprojected coordinates..
-     */
-    projectInverse: function(point) {
-        var lonlat = OpenLayers.Layer.SphericalMercator.inverseMercator(point.x, point.y);
-        point.x = lonlat.lon;
-        point.y = lonlat.lat;
-        return point;
-    }
-
-};
-
-/**
- * Note: Two transforms declared
- * Transforms from EPSG:4326 to EPSG:900913 and from EPSG:900913 to EPSG:4326
- *     are set by this class.
- */
-OpenLayers.Projection.addTransform("EPSG:4326", "EPSG:900913",
-    OpenLayers.Layer.SphericalMercator.projectForward);
-OpenLayers.Projection.addTransform("EPSG:900913", "EPSG:4326",
-    OpenLayers.Layer.SphericalMercator.projectInverse);
-

--- a/labs/openlayers/lib/OpenLayers/Layer/TMS.js
+++ /dev/null
@@ -1,168 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer/Grid.js
- * @requires OpenLayers/Tile/Image.js
- */
-
-/**
- * Class: OpenLayers.Layer.TMS
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.Grid>
- */
-OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
-
-    /**
-     * APIProperty: serviceVersion
-     * {String}
-     */
-    serviceVersion: "1.0.0",
-
-    /**
-     * APIProperty: isBaseLayer
-     * {Boolean}
-     */
-    isBaseLayer: true,
-
-    /**
-     * APIProperty: tileOrigin
-     * {<OpenLayers.Pixel>}
-     */
-    tileOrigin: null,
-
-    /**
-     * APIProperty: serverResolutions
-     * {Array} A list of all resolutions available on the server.  Only set this 
-     *     property if the map resolutions differs from the server.
-     */
-    serverResolutions: null,
-
-    /**
-     * APIProperty: zoomOffset
-     * {Number} If your cache has more zoom levels than you want to provide
-     *     access to with this layer, supply a zoomOffset.  This zoom offset
-     *     is added to the current map zoom level to determine the level
-     *     for a requested tile.  For example, if you supply a zoomOffset
-     *     of 3, when the map is at the zoom 0, tiles will be requested from
-     *     level 3 of your cache.  Default is 0 (assumes cache level and map
-     *     zoom are equivalent).  Using <zoomOffset> is an alternative to
-     *     setting <serverResolutions> if you only want to expose a subset
-     *     of the server resolutions.
-     */
-    zoomOffset: 0,
-    
-    /**
-     * Constructor: OpenLayers.Layer.TMS
-     * 
-     * Parameters:
-     * name - {String}
-     * url - {String}
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, url, options) {
-        var newArguments = [];
-        newArguments.push(name, url, {}, options);
-        OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
-    },    
-
-    /**
-     * APIMethod:destroy
-     */
-    destroy: function() {
-        // for now, nothing special to do here. 
-        OpenLayers.Layer.Grid.prototype.destroy.apply(this, arguments);  
-    },
-
-    
-    /**
-     * APIMethod: clone
-     * 
-     * Parameters:
-     * obj - {Object}
-     * 
-     * Returns:
-     * {<OpenLayers.Layer.TMS>} An exact clone of this <OpenLayers.Layer.TMS>
-     */
-    clone: function (obj) {
-        
-        if (obj == null) {
-            obj = new OpenLayers.Layer.TMS(this.name,
-                                           this.url,
-                                           this.getOptions());
-        }
-
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);
-
-        // copy/set any non-init, non-simple values here
-
-        return obj;
-    },    
-    
-    /**
-     * Method: getURL
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * 
-     * Returns:
-     * {String} A string with the layer's url and parameters and also the 
-     *          passed-in bounds and appropriate tile size specified as 
-     *          parameters
-     */
-    getURL: function (bounds) {
-        bounds = this.adjustBounds(bounds);
-        var res = this.map.getResolution();
-        var x = Math.round((bounds.left - this.tileOrigin.lon) / (res * this.tileSize.w));
-        var y = Math.round((bounds.bottom - this.tileOrigin.lat) / (res * this.tileSize.h));
-        var z = this.serverResolutions != null ?
-            OpenLayers.Util.indexOf(this.serverResolutions, res) :
-            this.map.getZoom() + this.zoomOffset;
-        var path = this.serviceVersion + "/" + this.layername + "/" + z + "/" + x + "/" + y + "." + this.type; 
-        var url = this.url;
-        if (url instanceof Array) {
-            url = this.selectUrl(path, url);
-        }
-        return url + path;
-    },
-
-    /**
-     * Method: addTile
-     * addTile creates a tile, initializes it, and adds it to the layer div. 
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                         null, this.tileSize);
-    },
-
-    /** 
-     * APIMethod: setMap
-     * When the layer is added to a map, then we can fetch our origin 
-     *    (if we don't have one.) 
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>}
-     */
-    setMap: function(map) {
-        OpenLayers.Layer.Grid.prototype.setMap.apply(this, arguments);
-        if (!this.tileOrigin) { 
-            this.tileOrigin = new OpenLayers.LonLat(this.map.maxExtent.left,
-                                                this.map.maxExtent.bottom);
-        }                                       
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.TMS"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/Text.js
+++ /dev/null
@@ -1,265 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer/Markers.js
- * @requires OpenLayers/Format/Text.js
- * @requires OpenLayers/Request/XMLHttpRequest.js
- */
-
-/**
- * Class: OpenLayers.Layer.Text
- * This layer creates markers given data in a text file.  The <location>
- *     property of the layer (specified as a property of the options argument
- *     in the <OpenLayers.Layer.Text> constructor) points to a tab delimited
- *     file with data used to create markers.
- *
- * The first row of the data file should be a header line with the column names
- *     of the data. Each column should be delimited by a tab space. The
- *     possible columns are:
- *      - *point* lat,lon of the point where a marker is to be placed
- *      - *lat*  Latitude of the point where a marker is to be placed
- *      - *lon*  Longitude of the point where a marker is to be placed
- *      - *icon* or *image* URL of marker icon to use.
- *      - *iconSize* Size of Icon to use.
- *      - *iconOffset* Where the top-left corner of the icon is to be placed
- *            relative to the latitude and longitude of the point.
- *      - *title* The text of the 'title' is placed inside an 'h2' marker
- *            inside a popup, which opens when the marker is clicked.
- *      - *description* The text of the 'description' is placed below the h2
- *            in the popup. this can be plain text or HTML.
- *
- * Example text file:
- * (code)
- * lat	lon	title	description	iconSize	iconOffset	icon
- * 10	20	title	description	21,25		-10,-25		http://www.openlayers.org/dev/img/marker.png
- * (end)
- *
- * Inherits from:
- *  - <OpenLayers.Layer.Markers>
- */
-OpenLayers.Layer.Text = OpenLayers.Class(OpenLayers.Layer.Markers, {
-
-    /**
-     * APIProperty: location 
-     * {String} URL of text file.  Must be specified in the "options" argument
-     *   of the constructor. Can not be changed once passed in. 
-     */
-    location:null,
-
-    /** 
-     * Property: features
-     * {Array(<OpenLayers.Feature>)} 
-     */
-    features: null,
-    
-    /**
-     * APIProperty: formatOptions
-     * {Object} Hash of options which should be passed to the format when it is
-     * created. Must be passed in the constructor.
-     */
-    formatOptions: null, 
-
-    /** 
-     * Property: selectedFeature
-     * {<OpenLayers.Feature>}
-     */
-    selectedFeature: null,
-
-    /**
-     * Constructor: OpenLayers.Layer.Text
-     * Create a text layer.
-     * 
-     * Parameters:
-     * name - {String} 
-     * options - {Object} Object with properties to be set on the layer.
-     *     Must include <location> property.
-     */
-    initialize: function(name, options) {
-        OpenLayers.Layer.Markers.prototype.initialize.apply(this, arguments);
-        this.features = new Array();
-    },
-
-    /**
-     * APIMethod: destroy 
-     */
-    destroy: function() {
-        // Warning: Layer.Markers.destroy() must be called prior to calling
-        // clearFeatures() here, otherwise we leak memory. Indeed, if
-        // Layer.Markers.destroy() is called after clearFeatures(), it won't be
-        // able to remove the marker image elements from the layer's div since
-        // the markers will have been destroyed by clearFeatures().
-        OpenLayers.Layer.Markers.prototype.destroy.apply(this, arguments);
-        this.clearFeatures();
-        this.features = null;
-    },
-    
-    /**
-     * Method: loadText
-     * Start the load of the Text data. Don't do this when we first add the layer,
-     * since we may not be visible at any point, and it would therefore be a waste.
-     */
-    loadText: function() {
-        if (!this.loaded) {
-            if (this.location != null) {
-
-                var onFail = function(e) {
-                    this.events.triggerEvent("loadend");
-                };
-
-                this.events.triggerEvent("loadstart");
-                OpenLayers.Request.GET({
-                    url: this.location,
-                    success: this.parseData,
-                    failure: onFail,
-                    scope: this
-                });
-                this.loaded = true;
-            }
-        }    
-    },    
-    
-    /**
-     * Method: moveTo
-     * If layer is visible and Text has not been loaded, load Text. 
-     * 
-     * Parameters:
-     * bounds - {Object} 
-     * zoomChanged - {Object} 
-     * minor - {Object} 
-     */
-    moveTo:function(bounds, zoomChanged, minor) {
-        OpenLayers.Layer.Markers.prototype.moveTo.apply(this, arguments);
-        if(this.visibility && !this.loaded){
-            this.loadText();
-        }
-    },
-    
-    /**
-     * Method: parseData
-     *
-     * Parameters:
-     * ajaxRequest - {<OpenLayers.Request.XMLHttpRequest>} 
-     */
-    parseData: function(ajaxRequest) {
-        var text = ajaxRequest.responseText;
-        
-        var options = {};
-        
-        OpenLayers.Util.extend(options, this.formatOptions);
-        
-        if (this.map && !this.projection.equals(this.map.getProjectionObject())) {
-            options.externalProjection = this.projection;
-            options.internalProjection = this.map.getProjectionObject();
-        }    
-        
-        var parser = new OpenLayers.Format.Text(options);
-        var features = parser.read(text);
-        for (var i=0, len=features.length; i<len; i++) {
-            var data = {};
-            var feature = features[i];
-            var location;
-            var iconSize, iconOffset;
-            
-            location = new OpenLayers.LonLat(feature.geometry.x, 
-                                             feature.geometry.y);
-            
-            if (feature.style.graphicWidth 
-                && feature.style.graphicHeight) {
-                iconSize = new OpenLayers.Size(
-                    feature.style.graphicWidth,
-                    feature.style.graphicHeight);
-            }        
-            
-            // FIXME: At the moment, we only use this if we have an 
-            // externalGraphic, because icon has no setOffset API Method.
-            /**
-             * FIXME FIRST!!
-             * The Text format does all sorts of parseFloating
-             * The result of a parseFloat for a bogus string is NaN.  That
-             * means the three possible values here are undefined, NaN, or a
-             * number.  The previous check was an identity check for null.  This
-             * means it was failing for all undefined or NaN.  A slightly better
-             * check is for undefined.  An even better check is to see if the
-             * value is a number (see #1441).
-             */
-            if (feature.style.graphicXOffset !== undefined
-                && feature.style.graphicYOffset !== undefined) {
-                iconOffset = new OpenLayers.Pixel(
-                    feature.style.graphicXOffset, 
-                    feature.style.graphicYOffset);
-            }
-            
-            if (feature.style.externalGraphic != null) {
-                data.icon = new OpenLayers.Icon(feature.style.externalGraphic, 
-                                                iconSize, 
-                                                iconOffset);
-            } else {
-                data.icon = OpenLayers.Marker.defaultIcon();
-
-                //allows for the case where the image url is not 
-                // specified but the size is. use a default icon
-                // but change the size
-                if (iconSize != null) {
-                    data.icon.setSize(iconSize);
-                }
-            }
-            
-            if ((feature.attributes.title != null) 
-                && (feature.attributes.description != null)) {
-                data['popupContentHTML'] = 
-                    '<h2>'+feature.attributes.title+'</h2>' + 
-                    '<p>'+feature.attributes.description+'</p>';
-            }
-            
-            data['overflow'] = feature.attributes.overflow || "auto"; 
-            
-            var markerFeature = new OpenLayers.Feature(this, location, data);
-            this.features.push(markerFeature);
-            var marker = markerFeature.createMarker();
-            if ((feature.attributes.title != null) 
-                && (feature.attributes.description != null)) {
-              marker.events.register('click', markerFeature, this.markerClick);
-            }
-            this.addMarker(marker);
-        }
-        this.events.triggerEvent("loadend");
-    },
-    
-    /**
-     * Property: markerClick
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    markerClick: function(evt) {
-        var sameMarkerClicked = (this == this.layer.selectedFeature);
-        this.layer.selectedFeature = (!sameMarkerClicked) ? this : null;
-        for(var i=0, len=this.layer.map.popups.length; i<len; i++) {
-            this.layer.map.removePopup(this.layer.map.popups[i]);
-        }
-        if (!sameMarkerClicked) {
-            this.layer.map.addPopup(this.createPopup()); 
-        }
-        OpenLayers.Event.stop(evt);
-    },
-
-    /**
-     * Method: clearFeatures
-     */
-    clearFeatures: function() {
-        if (this.features != null) {
-            while(this.features.length > 0) {
-                var feature = this.features[0];
-                OpenLayers.Util.removeItem(this.features, feature);
-                feature.destroy();
-            }
-        }        
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.Text"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/TileCache.js
+++ /dev/null
@@ -1,166 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer/Grid.js
- */
-
-/**
- * Class: OpenLayers.Layer.TileCache
- * A read only TileCache layer.  Used to requests tiles cached by TileCache in
- *     a web accessible cache.  This means that you have to pre-populate your
- *     cache before this layer can be used.  It is meant only to read tiles
- *     created by TileCache, and not to make calls to TileCache for tile
- *     creation.  Create a new instance with the
- *     <OpenLayers.Layer.TileCache> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Layer.Grid>
- */
-OpenLayers.Layer.TileCache = OpenLayers.Class(OpenLayers.Layer.Grid, {
-
-    /** 
-     * APIProperty: isBaseLayer
-     * {Boolean} Treat this layer as a base layer.  Default is true.
-     */
-    isBaseLayer: true,
-    
-    /** 
-     * APIProperty: format
-     * {String} Mime type of the images returned.  Default is image/png.
-     */
-    format: 'image/png',
-
-    /**
-     * APIProperty: serverResolutions
-     * {Array} A list of all resolutions available on the server.  Only set this 
-     *     property if the map resolutions differs from the server.
-     */
-    serverResolutions: null,
-
-    /**
-     * Constructor: OpenLayers.Layer.TileCache
-     * Create a new read only TileCache layer.
-     *
-     * Parameters:
-     * name - {String} Name of the layer displayed in the interface
-     * url - {String} Location of the web accessible cache (not the location of
-     *     your tilecache script!)
-     * layername - {String} Layer name as defined in the TileCache 
-     *     configuration
-     * options - {Object} Optional object with properties to be set on the
-     *     layer.  Note that you should speficy your resolutions to match
-     *     your TileCache configuration.  This can be done by setting
-     *     the resolutions array directly (here or on the map), by setting
-     *     maxResolution and numZoomLevels, or by using scale based properties.
-     */
-    initialize: function(name, url, layername, options) {
-        this.layername = layername;
-        OpenLayers.Layer.Grid.prototype.initialize.apply(this,
-                                                         [name, url, {}, options]);
-        this.extension = this.format.split('/')[1].toLowerCase();
-        this.extension = (this.extension == 'jpg') ? 'jpeg' : this.extension;
-    },    
-
-    /**
-     * APIMethod: clone
-     * obj - {Object} 
-     * 
-     * Returns:
-     * {<OpenLayers.Layer.TileCache>} An exact clone of this 
-     *     <OpenLayers.Layer.TileCache>
-     */
-    clone: function (obj) {
-        
-        if (obj == null) {
-            obj = new OpenLayers.Layer.TileCache(this.name,
-                                                 this.url,
-                                                 this.layername,
-                                                 this.getOptions());
-        }
-
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);
-
-        // copy/set any non-init, non-simple values here
-
-        return obj;
-    },    
-    
-    /**
-     * Method: getURL
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} 
-     * 
-     * Returns:
-     * {String} A string with the layer's url and parameters and also the 
-     *     passed-in bounds and appropriate tile size specified as parameters.
-     */
-    getURL: function(bounds) {
-        var res = this.map.getResolution();
-        var bbox = this.maxExtent;
-        var size = this.tileSize;
-        var tileX = Math.round((bounds.left - bbox.left) / (res * size.w));
-        var tileY = Math.round((bounds.bottom - bbox.bottom) / (res * size.h));
-        var tileZ = this.serverResolutions != null ?
-            OpenLayers.Util.indexOf(this.serverResolutions, res) :
-            this.map.getZoom();
-        /**
-         * Zero-pad a positive integer.
-         * number - {Int} 
-         * length - {Int} 
-         *
-         * Returns:
-         * {String} A zero-padded string
-         */
-        function zeroPad(number, length) {
-            number = String(number);
-            var zeros = [];
-            for(var i=0; i<length; ++i) {
-                zeros.push('0');
-            }
-            return zeros.join('').substring(0, length - number.length) + number;
-        }
-        var components = [
-            this.layername,
-            zeroPad(tileZ, 2),
-            zeroPad(parseInt(tileX / 1000000), 3),
-            zeroPad((parseInt(tileX / 1000) % 1000), 3),
-            zeroPad((parseInt(tileX) % 1000), 3),
-            zeroPad(parseInt(tileY / 1000000), 3),
-            zeroPad((parseInt(tileY / 1000) % 1000), 3),
-            zeroPad((parseInt(tileY) % 1000), 3) + '.' + this.extension
-        ];
-        var path = components.join('/'); 
-        var url = this.url;
-        if (url instanceof Array) {
-            url = this.selectUrl(path, url);
-        }
-        url = (url.charAt(url.length - 1) == '/') ? url : url + '/';
-        return url + path;
-    },
-
-    /**
-     * Method: addTile
-     * Create a tile, initialize it, and add it to the layer div. 
-     *
-     * Parameters: 
-     * bounds - {<OpenLayers.Bounds>} 
-     * position - {<OpenLayers.Pixel>}
-     *
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added <OpenLayers.Tile.Image>
-     */
-    addTile:function(bounds, position) {
-        var url = this.getURL(bounds);
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                             url, this.tileSize);
-    },
-    
-    CLASS_NAME: "OpenLayers.Layer.TileCache"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/Vector.js
+++ /dev/null
@@ -1,948 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Layer.js
- * @requires OpenLayers/Renderer.js
- * @requires OpenLayers/StyleMap.js
- * @requires OpenLayers/Feature/Vector.js
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Layer.Vector
- * Instances of OpenLayers.Layer.Vector are used to render vector data from
- *     a variety of sources. Create a new vector layer with the
- *     <OpenLayers.Layer.Vector> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Layer>
- */
-OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
-
-    /**
-     * Constant: EVENT_TYPES
-     * {Array(String)} Supported application event types.  Register a listener
-     *     for a particular event with the following syntax:
-     * (code)
-     * layer.events.register(type, obj, listener);
-     * (end)
-     *
-     * Listeners will be called with a reference to an event object.  The
-     *     properties of this event depends on exactly what happened.
-     *
-     * All event objects have at least the following properties:
-     * object - {Object} A reference to layer.events.object.
-     * element - {DOMElement} A reference to layer.events.element.
-     *
-     * Supported map event types (in addition to those from <OpenLayers.Layer>):
-     * beforefeatureadded - Triggered before a feature is added.  Listeners
-     *      will receive an object with a *feature* property referencing the
-     *      feature to be added.  To stop the feature from being added, a
-     *      listener should return false.
-     * beforefeaturesadded - Triggered before an array of features is added.
-     *      Listeners will receive an object with a *features* property
-     *      referencing the feature to be added. To stop the features from
-     *      being added, a listener should return false.
-     * featureadded - Triggered after a feature is added.  The event
-     *      object passed to listeners will have a *feature* property with a
-     *      reference to the added feature.
-     * featuresadded - Triggered after features are added.  The event
-     *      object passed to listeners will have a *features* property with a
-     *      reference to an array of added features.
-     * beforefeatureremoved - Triggered before a feature is removed. Listeners
-     *      will receive an object with a *feature* property referencing the
-     *      feature to be removed.
-     * beforefeaturesremoved - Triggered before multiple features are removed. 
-     *      Listeners will receive an object with a *features* property
-     *      referencing the features to be removed.
-     * featureremoved - Triggerd after a feature is removed. The event
-     *      object passed to listeners will have a *feature* property with a
-     *      reference to the removed feature.
-     * featuresremoved - Triggered after features are removed. The event
-     *      object passed to listeners will have a *features* property with a
-     *      reference to an array of removed features.
-     * featureselected - Triggered after a feature is selected.  Listeners
-     *      will receive an object with a *feature* property referencing the
-     *      selected feature.
-     * featureunselected - Triggered after a feature is unselected.
-     *      Listeners will receive an object with a *feature* property
-     *      referencing the unselected feature.
-     * beforefeaturemodified - Triggered when a feature is selected to 
-     *      be modified.  Listeners will receive an object with a *feature* 
-     *      property referencing the selected feature.
-     * featuremodified - Triggered when a feature has been modified.
-     *      Listeners will receive an object with a *feature* property referencing 
-     *      the modified feature.
-     * afterfeaturemodified - Triggered when a feature is finished being modified.
-     *      Listeners will receive an object with a *feature* property referencing 
-     *      the modified feature.
-     * vertexmodified - Triggered when a vertex within any feature geometry
-     *      has been modified.  Listeners will receive an object with a
-     *      *feature* property referencing the modified feature, a *vertex*
-     *      property referencing the vertex modified (always a point geometry),
-     *      and a *pixel* property referencing the pixel location of the
-     *      modification.
-     * sketchstarted - Triggered when a feature sketch bound for this layer
-     *      is started.  Listeners will receive an object with a *feature*
-     *      property referencing the new sketch feature and a *vertex* property
-     *      referencing the creation point.
-     * sketchmodified - Triggered when a feature sketch bound for this layer
-     *      is modified.  Listeners will receive an object with a *vertex*
-     *      property referencing the modified vertex and a *feature* property
-     *      referencing the sketch feature.
-     * sketchcomplete - Triggered when a feature sketch bound for this layer
-     *      is complete.  Listeners will receive an object with a *feature*
-     *      property referencing the sketch feature.  By returning false, a
-     *      listener can stop the sketch feature from being added to the layer.
-     * refresh - Triggered when something wants a strategy to ask the protocol
-     *      for a new set of features.
-     */
-    EVENT_TYPES: ["beforefeatureadded", "beforefeaturesadded",
-                  "featureadded", "featuresadded", "beforefeatureremoved",
-                  "beforefeaturesremoved", "featureremoved", "featuresremoved",
-                  "beforefeatureselected", "featureselected", "featureunselected", 
-                  "beforefeaturemodified", "featuremodified", "afterfeaturemodified",
-                  "vertexmodified", "sketchstarted", "sketchmodified",
-                  "sketchcomplete", "refresh"],
-
-    /**
-     * APIProperty: isBaseLayer
-     * {Boolean} The layer is a base layer.  Default is false.  Set this property
-     * in the layer options.
-     */
-    isBaseLayer: false,
-
-    /** 
-     * APIProperty: isFixed
-     * {Boolean} Whether the layer remains in one place while dragging the
-     * map.
-     */
-    isFixed: false,
-
-    /** 
-     * APIProperty: isVector
-     * {Boolean} Whether the layer is a vector layer.
-     */
-    isVector: true,
-    
-    /** 
-     * APIProperty: features
-     * {Array(<OpenLayers.Feature.Vector>)} 
-     */
-    features: null,
-    
-    /** 
-     * Property: filter
-     * {<OpenLayers.Filter>} The filter set in this layer,
-     *     a strategy launching read requests can combined
-     *     this filter with its own filter.
-     */
-    filter: null,
-    
-    /** 
-     * Property: selectedFeatures
-     * {Array(<OpenLayers.Feature.Vector>)} 
-     */
-    selectedFeatures: null,
-    
-    /**
-     * Property: unrenderedFeatures
-     * {Object} hash of features, keyed by feature.id, that the renderer
-     *     failed to draw
-     */
-    unrenderedFeatures: null,
-
-    /**
-     * APIProperty: reportError
-     * {Boolean} report friendly error message when loading of renderer
-     * fails.
-     */
-    reportError: true, 
-
-    /** 
-     * APIProperty: style
-     * {Object} Default style for the layer
-     */
-    style: null,
-    
-    /**
-     * Property: styleMap
-     * {<OpenLayers.StyleMap>}
-     */
-    styleMap: null,
-    
-    /**
-     * Property: strategies
-     * {Array(<OpenLayers.Strategy>})} Optional list of strategies for the layer.
-     */
-    strategies: null,
-    
-    /**
-     * Property: protocol
-     * {<OpenLayers.Protocol>} Optional protocol for the layer.
-     */
-    protocol: null,
-    
-    /**
-     * Property: renderers
-     * {Array(String)} List of supported Renderer classes. Add to this list to
-     * add support for additional renderers. This list is ordered:
-     * the first renderer which returns true for the  'supported()'
-     * method will be used, if not defined in the 'renderer' option.
-     */
-    renderers: ['SVG', 'VML', 'Canvas'],
-    
-    /** 
-     * Property: renderer
-     * {<OpenLayers.Renderer>}
-     */
-    renderer: null,
-    
-    /**
-     * APIProperty: rendererOptions
-     * {Object} Options for the renderer. See {<OpenLayers.Renderer>} for
-     *     supported options.
-     */
-    rendererOptions: null,
-    
-    /** 
-     * APIProperty: geometryType
-     * {String} geometryType allows you to limit the types of geometries this
-     * layer supports. This should be set to something like
-     * "OpenLayers.Geometry.Point" to limit types.
-     */
-    geometryType: null,
-
-    /** 
-     * Property: drawn
-     * {Boolean} Whether the Vector Layer features have been drawn yet.
-     */
-    drawn: false,
-
-    /**
-     * Constructor: OpenLayers.Layer.Vector
-     * Create a new vector layer
-     *
-     * Parameters:
-     * name - {String} A name for the layer
-     * options - {Object} Optional object with non-default properties to set on
-     *           the layer.
-     *
-     * Returns:
-     * {<OpenLayers.Layer.Vector>} A new vector layer
-     */
-    initialize: function(name, options) {
-        
-        // concatenate events specific to vector with those from the base
-        this.EVENT_TYPES =
-            OpenLayers.Layer.Vector.prototype.EVENT_TYPES.concat(
-            OpenLayers.Layer.prototype.EVENT_TYPES
-        );
-
-        OpenLayers.Layer.prototype.initialize.apply(this, arguments);
-
-        // allow user-set renderer, otherwise assign one
-        if (!this.renderer || !this.renderer.supported()) {  
-            this.assignRenderer();
-        }
-
-        // if no valid renderer found, display error
-        if (!this.renderer || !this.renderer.supported()) {
-            this.renderer = null;
-            this.displayError();
-        } 
-
-        if (!this.styleMap) {
-            this.styleMap = new OpenLayers.StyleMap();
-        }
-
-        this.features = [];
-        this.selectedFeatures = [];
-        this.unrenderedFeatures = {};
-        
-        // Allow for custom layer behavior
-        if(this.strategies){
-            for(var i=0, len=this.strategies.length; i<len; i++) {
-                this.strategies[i].setLayer(this);
-            }
-        }
-
-    },
-
-    /**
-     * APIMethod: destroy
-     * Destroy this layer
-     */
-    destroy: function() {
-        if (this.strategies) {
-            var strategy, i, len;
-            for(i=0, len=this.strategies.length; i<len; i++) {
-                strategy = this.strategies[i];
-                if(strategy.autoDestroy) {
-                    strategy.destroy();
-                }
-            }
-            this.strategies = null;
-        }
-        if (this.protocol) {
-            if(this.protocol.autoDestroy) {
-                this.protocol.destroy();
-            }
-            this.protocol = null;
-        }
-        this.destroyFeatures();
-        this.features = null;
-        this.selectedFeatures = null;
-        this.unrenderedFeatures = null;
-        if (this.renderer) {
-            this.renderer.destroy();
-        }
-        this.renderer = null;
-        this.geometryType = null;
-        this.drawn = null;
-        OpenLayers.Layer.prototype.destroy.apply(this, arguments);  
-    },
-
-    /**
-     * Method: clone
-     * Create a clone of this layer.
-     * 
-     * Note: Features of the layer are also cloned.
-     *
-     * Returns:
-     * {<OpenLayers.Layer.Vector>} An exact clone of this layer
-     */
-    clone: function (obj) {
-        
-        if (obj == null) {
-            obj = new OpenLayers.Layer.Vector(this.name, this.getOptions());
-        }
-
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.prototype.clone.apply(this, [obj]);
-
-        // copy/set any non-init, non-simple values here
-        var features = this.features;
-        var len = features.length;
-        var clonedFeatures = new Array(len);
-        for(var i=0; i<len; ++i) {
-            clonedFeatures[i] = features[i].clone();
-        }
-        obj.features = clonedFeatures;
-
-        return obj;
-    },    
-    
-    /**
-     * Method: refresh
-     * Ask the layer to request features again and redraw them.  Triggers
-     *     the refresh event if the layer is in range and visible.
-     *
-     * Parameters:
-     * obj - {Object} Optional object with properties for any listener of
-     *     the refresh event.
-     */
-    refresh: function(obj) {
-        if(this.calculateInRange() && this.visibility) {
-            this.events.triggerEvent("refresh", obj);
-        }
-    },
-
-    /** 
-     * Method: assignRenderer
-     * Iterates through the available renderer implementations and selects 
-     * and assigns the first one whose "supported()" function returns true.
-     */    
-    assignRenderer: function()  {
-        for (var i=0, len=this.renderers.length; i<len; i++) {
-            var rendererClass = this.renderers[i];
-            var renderer = (typeof rendererClass == "function") ?
-                rendererClass :
-                OpenLayers.Renderer[rendererClass];
-            if (renderer && renderer.prototype.supported()) {
-                this.renderer = new renderer(this.div, this.rendererOptions);
-                break;
-            }  
-        }  
-    },
-
-    /** 
-     * Method: displayError 
-     * Let the user know their browser isn't supported.
-     */
-    displayError: function() {
-        if (this.reportError) {
-            OpenLayers.Console.userError(OpenLayers.i18n("browserNotSupported", 
-                                     {'renderers':this.renderers.join("\n")}));
-        }    
-    },
-
-    /** 
-     * Method: setMap
-     * The layer has been added to the map. 
-     * 
-     * If there is no renderer set, the layer can't be used. Remove it.
-     * Otherwise, give the renderer a reference to the map and set its size.
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>} 
-     */
-    setMap: function(map) {        
-        OpenLayers.Layer.prototype.setMap.apply(this, arguments);
-
-        if (!this.renderer) {
-            this.map.removeLayer(this);
-        } else {
-            this.renderer.map = this.map;
-            this.renderer.setSize(this.map.getSize());
-        }
-    },
-
-    /**
-     * Method: afterAdd
-     * Called at the end of the map.addLayer sequence.  At this point, the map
-     *     will have a base layer.  Any autoActivate strategies will be
-     *     activated here.
-     */
-    afterAdd: function() {
-        if(this.strategies) {
-            var strategy, i, len;
-            for(i=0, len=this.strategies.length; i<len; i++) {
-                strategy = this.strategies[i];
-                if(strategy.autoActivate) {
-                    strategy.activate();
-                }
-            }
-        }
-    },
-
-    /**
-     * Method: removeMap
-     * The layer has been removed from the map.
-     *
-     * Parameters:
-     * map - {<OpenLayers.Map>}
-     */
-    removeMap: function(map) {
-        this.drawn = false;
-        if(this.strategies) {
-            var strategy, i, len;
-            for(i=0, len=this.strategies.length; i<len; i++) {
-                strategy = this.strategies[i];
-                if(strategy.autoActivate) {
-                    strategy.deactivate();
-                }
-            }
-        }
-    },
-    
-    /**
-     * Method: onMapResize
-     * Notify the renderer of the change in size. 
-     * 
-     */
-    onMapResize: function() {
-        OpenLayers.Layer.prototype.onMapResize.apply(this, arguments);
-        this.renderer.setSize(this.map.getSize());
-    },
-
-    /**
-     * Method: moveTo
-     *  Reset the vector layer's div so that it once again is lined up with 
-     *   the map. Notify the renderer of the change of extent, and in the
-     *   case of a change of zoom level (resolution), have the 
-     *   renderer redraw features.
-     * 
-     *  If the layer has not yet been drawn, cycle through the layer's 
-     *   features and draw each one.
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} 
-     * zoomChanged - {Boolean} 
-     * dragging - {Boolean} 
-     */
-    moveTo: function(bounds, zoomChanged, dragging) {
-        OpenLayers.Layer.prototype.moveTo.apply(this, arguments);
-        
-        var coordSysUnchanged = true;
-
-        if (!dragging) {
-            this.renderer.root.style.visibility = "hidden";
-            
-            this.div.style.left = -parseInt(this.map.layerContainerDiv.style.left) + "px";
-            this.div.style.top = -parseInt(this.map.layerContainerDiv.style.top) + "px";
-            var extent = this.map.getExtent();
-            coordSysUnchanged = this.renderer.setExtent(extent, zoomChanged);
-            
-            this.renderer.root.style.visibility = "visible";
-
-            // Force a reflow on gecko based browsers to prevent jump/flicker.
-            // This seems to happen on only certain configurations; it was originally
-            // noticed in FF 2.0 and Linux.
-            if (navigator.userAgent.toLowerCase().indexOf("gecko") != -1) {
-                this.div.scrollLeft = this.div.scrollLeft;
-            }
-            
-            if(!zoomChanged && coordSysUnchanged) {
-                for(var i in this.unrenderedFeatures) {
-                    var feature = this.unrenderedFeatures[i];
-                    this.drawFeature(feature);
-                }
-            }
-        }
-        
-        if (!this.drawn || zoomChanged || !coordSysUnchanged) {
-            this.drawn = true;
-            var feature;
-            for(var i=0, len=this.features.length; i<len; i++) {
-                this.renderer.locked = (i !== (len - 1));
-                feature = this.features[i];
-                this.drawFeature(feature);
-            }
-        }    
-    },
-    
-    /** 
-     * APIMethod: display
-     * Hide or show the Layer
-     * 
-     * Parameters:
-     * display - {Boolean}
-     */
-    display: function(display) {
-        OpenLayers.Layer.prototype.display.apply(this, arguments);
-        // we need to set the display style of the root in case it is attached
-        // to a foreign layer
-        var currentDisplay = this.div.style.display;
-        if(currentDisplay != this.renderer.root.style.display) {
-            this.renderer.root.style.display = currentDisplay;
-        }
-    },
-
-    /**
-     * APIMethod: addFeatures
-     * Add Features to the layer.
-     *
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>)} 
-     * options - {Object}
-     */
-    addFeatures: function(features, options) {
-        if (!(features instanceof Array)) {
-            features = [features];
-        }
-        
-        var notify = !options || !options.silent;
-        if(notify) {
-            var event = {features: features};
-            var ret = this.events.triggerEvent("beforefeaturesadded", event);
-            if(ret === false) {
-                return;
-            }
-            features = event.features;
-        }
-        
-        // Track successfully added features for featuresadded event, since
-        // beforefeatureadded can veto single features.
-        var featuresAdded = [];
-        for (var i=0, len=features.length; i<len; i++) {
-            if (i != (features.length - 1)) {
-                this.renderer.locked = true;
-            } else {
-                this.renderer.locked = false;
-            }    
-            var feature = features[i];
-            
-            if (this.geometryType &&
-              !(feature.geometry instanceof this.geometryType)) {
-                var throwStr = OpenLayers.i18n('componentShouldBe',
-                          {'geomType':this.geometryType.prototype.CLASS_NAME});
-                throw throwStr;
-              }
-
-            //give feature reference to its layer
-            feature.layer = this;
-
-            if (!feature.style && this.style) {
-                feature.style = OpenLayers.Util.extend({}, this.style);
-            }
-
-            if (notify) {
-                if(this.events.triggerEvent("beforefeatureadded",
-                                            {feature: feature}) === false) {
-                    continue;
-                };
-                this.preFeatureInsert(feature);
-            }
-
-            featuresAdded.push(feature);
-            this.features.push(feature);
-            this.drawFeature(feature);
-            
-            if (notify) {
-                this.events.triggerEvent("featureadded", {
-                    feature: feature
-                });
-                this.onFeatureInsert(feature);
-            }
-        }
-        
-        if(notify) {
-            this.events.triggerEvent("featuresadded", {features: featuresAdded});
-        }
-    },
-
-
-    /**
-     * APIMethod: removeFeatures
-     * Remove features from the layer.  This erases any drawn features and
-     *     removes them from the layer's control.  The beforefeatureremoved
-     *     and featureremoved events will be triggered for each feature.  The
-     *     featuresremoved event will be triggered after all features have
-     *     been removed.  To supress event triggering, use the silent option.
-     * 
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>)} List of features to be
-     *     removed.
-     * options - {Object} Optional properties for changing behavior of the
-     *     removal.
-     *
-     * Valid options:
-     * silent - {Boolean} Supress event triggering.  Default is false.
-     */
-    removeFeatures: function(features, options) {
-        if(!features || features.length === 0) {
-            return;
-        }
-        if (features === this.features) {
-            return this.removeAllFeatures(options);
-        }
-        if (!(features instanceof Array)) {
-            features = [features];
-        }
-        if (features === this.selectedFeatures) {
-            features = features.slice();
-        }
-
-        var notify = !options || !options.silent;
-        
-        if (notify) {
-            this.events.triggerEvent(
-                "beforefeaturesremoved", {features: features}
-            );
-        }
-
-        for (var i = features.length - 1; i >= 0; i--) {
-            // We remain locked so long as we're not at 0
-            // and the 'next' feature has a geometry. We do the geometry check
-            // because if all the features after the current one are 'null', we
-            // won't call eraseGeometry, so we break the 'renderer functions
-            // will always be called with locked=false *last*' rule. The end result
-            // is a possible gratiutious unlocking to save a loop through the rest 
-            // of the list checking the remaining features every time. So long as
-            // null geoms are rare, this is probably okay.    
-            if (i != 0 && features[i-1].geometry) {
-                this.renderer.locked = true;
-            } else {
-                this.renderer.locked = false;
-            }
-    
-            var feature = features[i];
-            delete this.unrenderedFeatures[feature.id];
-
-            if (notify) {
-                this.events.triggerEvent("beforefeatureremoved", {
-                    feature: feature
-                });
-            }
-
-            this.features = OpenLayers.Util.removeItem(this.features, feature);
-            // feature has no layer at this point
-            feature.layer = null;
-
-            if (feature.geometry) {
-                this.renderer.eraseFeatures(feature);
-            }
-                    
-            //in the case that this feature is one of the selected features, 
-            // remove it from that array as well.
-            if (OpenLayers.Util.indexOf(this.selectedFeatures, feature) != -1){
-                OpenLayers.Util.removeItem(this.selectedFeatures, feature);
-            }
-
-            if (notify) {
-                this.events.triggerEvent("featureremoved", {
-                    feature: feature
-                });
-            }
-        }
-
-        if (notify) {
-            this.events.triggerEvent("featuresremoved", {features: features});
-        }
-    },
-    
-    /** 
-     * APIMethod: removeAllFeatures
-     * Remove all features from the layer.
-     *
-     * Parameters:
-     * options - {Object} Optional properties for changing behavior of the
-     *     removal.
-     *
-     * Valid options:
-     * silent - {Boolean} Supress event triggering.  Default is false.
-     */
-    removeAllFeatures: function(options) {
-        var notify = !options || !options.silent;
-        var features = this.features;
-        if (notify) {
-            this.events.triggerEvent(
-                "beforefeaturesremoved", {features: features}
-            );
-        }
-        var feature;
-        for (var i = features.length-1; i >= 0; i--) {
-            feature = features[i];
-            if (notify) {
-                this.events.triggerEvent("beforefeatureremoved", {
-                    feature: feature
-                });
-            }
-            feature.layer = null;
-            if (notify) {
-                this.events.triggerEvent("featureremoved", {
-                    feature: feature
-                });
-            }
-        }
-        this.renderer.clear();
-        this.features = [];
-        this.unrenderedFeatures = {};
-        this.selectedFeatures = [];
-        if (notify) {
-            this.events.triggerEvent("featuresremoved", {features: features});
-        }
-    },
-
-    /**
-     * APIMethod: destroyFeatures
-     * Erase and destroy features on the layer.
-     *
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>)} An optional array of
-     *     features to destroy.  If not supplied, all features on the layer
-     *     will be destroyed.
-     * options - {Object}
-     */
-    destroyFeatures: function(features, options) {
-        var all = (features == undefined); // evaluates to true if
-                                           // features is null
-        if(all) {
-            features = this.features;
-        }
-        if(features) {
-            this.removeFeatures(features, options);
-            for(var i=features.length-1; i>=0; i--) {
-                features[i].destroy();
-            }
-        }
-    },
-
-    /**
-     * APIMethod: drawFeature
-     * Draw (or redraw) a feature on the layer.  If the optional style argument
-     * is included, this style will be used.  If no style is included, the
-     * feature's style will be used.  If the feature doesn't have a style,
-     * the layer's style will be used.
-     * 
-     * This function is not designed to be used when adding features to 
-     * the layer (use addFeatures instead). It is meant to be used when
-     * the style of a feature has changed, or in some other way needs to 
-     * visually updated *after* it has already been added to a layer. You
-     * must add the feature to the layer for most layer-related events to 
-     * happen.
-     *
-     * Parameters: 
-     * feature - {<OpenLayers.Feature.Vector>} 
-     * style - {String | Object} Named render intent or full symbolizer object.
-     */
-    drawFeature: function(feature, style) {
-        // don't try to draw the feature with the renderer if the layer is not 
-        // drawn itself
-        if (!this.drawn) {
-            return
-        }
-        if (typeof style != "object") {
-            if(!style && feature.state === OpenLayers.State.DELETE) {
-                style = "delete";
-            }
-            var renderIntent = style || feature.renderIntent;
-            style = feature.style || this.style;
-            if (!style) {
-                style = this.styleMap.createSymbolizer(feature, renderIntent);
-            }
-        }
-        
-        if (!this.renderer.drawFeature(feature, style)) {
-            this.unrenderedFeatures[feature.id] = feature;
-        } else {
-            delete this.unrenderedFeatures[feature.id];
-        };
-    },
-    
-    /**
-     * Method: eraseFeatures
-     * Erase features from the layer.
-     *
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>)} 
-     */
-    eraseFeatures: function(features) {
-        this.renderer.eraseFeatures(features);
-    },
-
-    /**
-     * Method: getFeatureFromEvent
-     * Given an event, return a feature if the event occurred over one.
-     * Otherwise, return null.
-     *
-     * Parameters:
-     * evt - {Event} 
-     *
-     * Returns:
-     * {<OpenLayers.Feature.Vector>} A feature if one was under the event.
-     */
-    getFeatureFromEvent: function(evt) {
-        if (!this.renderer) {
-            OpenLayers.Console.error(OpenLayers.i18n("getFeatureError")); 
-            return null;
-        }    
-        var featureId = this.renderer.getFeatureIdFromEvent(evt);
-        return this.getFeatureById(featureId);
-    },
-
-    /**
-     * APIMethod: getFeatureBy
-     * Given a property value, return the feature if it exists in the features array
-     *
-     * Parameters:
-     * property - {String}
-     * value - {String}
-     *
-     * Returns:
-     * {<OpenLayers.Feature.Vector>} A feature corresponding to the given
-     * property value or null if there is no such feature.
-     */
-    getFeatureBy: function(property, value) {
-        //TBD - would it be more efficient to use a hash for this.features?
-        var feature = null;
-        for(var i=0, len=this.features.length; i<len; ++i) {
-            if(this.features[i][property] == value) {
-                feature = this.features[i];
-                break;
-            }
-        }
-        return feature;
-    },
-
-    /**
-     * APIMethod: getFeatureById
-     * Given a feature id, return the feature if it exists in the features array
-     *
-     * Parameters:
-     * featureId - {String}
-     *
-     * Returns:
-     * {<OpenLayers.Feature.Vector>} A feature corresponding to the given
-     * featureId or null if there is no such feature.
-     */
-    getFeatureById: function(featureId) {
-        return this.getFeatureBy('id', featureId);
-    },
-
-    /**
-     * APIMethod: getFeatureByFid
-     * Given a feature fid, return the feature if it exists in the features array
-     *
-     * Parameters:
-     * featureFid - {String}
-     *
-     * Returns:
-     * {<OpenLayers.Feature.Vector>} A feature corresponding to the given
-     * featureFid or null if there is no such feature.
-     */
-    getFeatureByFid: function(featureFid) {
-        return this.getFeatureBy('fid', featureFid);
-    },
-
-    /**
-     * Unselect the selected features
-     * i.e. clears the featureSelection array
-     * change the style back
-    clearSelection: function() {
-
-       var vectorLayer = this.map.vectorLayer;
-        for (var i = 0; i < this.map.featureSelection.length; i++) {
-            var featureSelection = this.map.featureSelection[i];
-            vectorLayer.drawFeature(featureSelection, vectorLayer.style);
-        }
-        this.map.featureSelection = [];
-    },
-     */
-
-
-    /**
-     * APIMethod: onFeatureInsert
-     * method called after a feature is inserted.
-     * Does nothing by default. Override this if you
-     * need to do something on feature updates.
-     *
-     * Paarameters: 
-     * feature - {<OpenLayers.Feature.Vector>} 
-     */
-    onFeatureInsert: function(feature) {
-    },
-    
-    /**
-     * APIMethod: preFeatureInsert
-     * method called before a feature is inserted.
-     * Does nothing by default. Override this if you
-     * need to do something when features are first added to the
-     * layer, but before they are drawn, such as adjust the style.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} 
-     */
-    preFeatureInsert: function(feature) {
-    },
-
-    /** 
-     * APIMethod: getDataExtent
-     * Calculates the max extent which includes all of the features.
-     * 
-     * Returns:
-     * {<OpenLayers.Bounds>}
-     */
-    getDataExtent: function () {
-        var maxExtent = null;
-        var features = this.features;
-        if(features && (features.length > 0)) {
-            maxExtent = new OpenLayers.Bounds();
-            var geometry = null;
-            for(var i=0, len=features.length; i<len; i++) {
-                geometry = features[i].geometry;
-                if (geometry) {
-                    maxExtent.extend(geometry.getBounds());
-                }
-            }
-        }
-        return maxExtent;
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.Vector"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/Vector/RootContainer.js
+++ /dev/null
@@ -1,158 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Layer/Vector.js
- */
-
-/**
- * Class: OpenLayers.Layer.Vector.RootContainer
- * A special layer type to combine multiple vector layers inside a single
- *     renderer root container. This class is not supposed to be instantiated
- *     from user space, it is a helper class for controls that require event
- *     processing for multiple vector layers.
- *
- * Inherits from:
- *  - <OpenLayers.Layer.Vector>
- */
-OpenLayers.Layer.Vector.RootContainer = OpenLayers.Class(OpenLayers.Layer.Vector, {
-    
-    /**
-     * Property: displayInLayerSwitcher
-     * Set to false for this layer type
-     */
-    displayInLayerSwitcher: false,
-    
-    /**
-     * APIProperty: layers
-     * Layers that are attached to this container. Required config option.
-     */
-    layers: null,
-    
-    /**
-     * Constructor: OpenLayers.Layer.Vector.RootContainer
-     * Create a new root container for multiple vector layer. This constructor
-     * is not supposed to be used from user space, it is only to be used by
-     * controls that need feature selection across multiple vector layers.
-     *
-     * Parameters:
-     * name - {String} A name for the layer
-     * options - {Object} Optional object with non-default properties to set on
-     *           the layer.
-     * 
-     * Required options properties:
-     * layers - {Array(<OpenLayers.Layer.Vector>)} The layers managed by this
-     *     container
-     *
-     * Returns:
-     * {<OpenLayers.Layer.Vector.RootContainer>} A new vector layer root
-     *     container
-     */
-    initialize: function(name, options) {
-        OpenLayers.Layer.Vector.prototype.initialize.apply(this, arguments);
-    },
-    
-    /**
-     * Method: display
-     */
-    display: function() {},
-    
-    /**
-     * Method: getFeatureFromEvent
-     * walk through the layers to find the feature returned by the event
-     * 
-     * Parameters:
-     * evt - {Object} event object with a feature property
-     * 
-     * Returns:
-     * {<OpenLayers.Feature.Vector>}
-     */
-    getFeatureFromEvent: function(evt) {
-        var layers = this.layers;
-        var feature;
-        for(var i=0; i<layers.length; i++) {
-            feature = layers[i].getFeatureFromEvent(evt);
-            if(feature) {
-                return feature;
-            }
-        }
-    },
-    
-    /**
-     * Method: setMap
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>}
-     */
-    setMap: function(map) {
-        OpenLayers.Layer.Vector.prototype.setMap.apply(this, arguments);
-        this.collectRoots();
-        map.events.register("changelayer", this, this.handleChangeLayer);
-    },
-    
-    /**
-     * Method: removeMap
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>}
-     */
-    removeMap: function(map) {
-        map.events.unregister("changelayer", this, this.handleChangeLayer);
-        this.resetRoots();
-        OpenLayers.Layer.Vector.prototype.removeMap.apply(this, arguments);
-    },
-    
-    /**
-     * Method: collectRoots
-     * Collects the root nodes of all layers this control is configured with
-     * and moveswien the nodes to this control's layer
-     */
-    collectRoots: function() {
-        var layer;
-        // walk through all map layers, because we want to keep the order
-        for(var i=0; i<this.map.layers.length; ++i) {
-            layer = this.map.layers[i];
-            if(OpenLayers.Util.indexOf(this.layers, layer) != -1) {
-                layer.renderer.moveRoot(this.renderer);
-            }
-        }
-    },
-    
-    /**
-     * Method: resetRoots
-     * Resets the root nodes back into the layers they belong to.
-     */
-    resetRoots: function() {
-        var layer;
-        for(var i=0; i<this.layers.length; ++i) {
-            layer = this.layers[i];
-            if(this.renderer && layer.renderer.getRenderLayerId() == this.id) {
-                this.renderer.moveRoot(layer.renderer);
-            }
-        }
-    },
-    
-    /**
-     * Method: handleChangeLayer
-     * Event handler for the map's changelayer event. We need to rebuild
-     * this container's layer dom if order of one of its layers changes.
-     * This handler is added with the setMap method, and removed with the
-     * removeMap method.
-     * 
-     * Parameters:
-     * evt - {Object}
-     */
-    handleChangeLayer: function(evt) {
-        var layer = evt.layer;
-        if(evt.property == "order" &&
-                        OpenLayers.Util.indexOf(this.layers, layer) != -1) {
-            this.resetRoots();
-            this.collectRoots();
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.Vector.RootContainer"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/VirtualEarth.js
+++ /dev/null
@@ -1,369 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer/SphericalMercator.js
- * @requires OpenLayers/Layer/EventPane.js
- * @requires OpenLayers/Layer/FixedZoomLevels.js
- */
-
-/**
- * Class: OpenLayers.Layer.VirtualEarth
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.EventPane>
- *  - <OpenLayers.Layer.FixedZoomLevels>
- */
-OpenLayers.Layer.VirtualEarth = OpenLayers.Class(
-    OpenLayers.Layer.EventPane,
-    OpenLayers.Layer.FixedZoomLevels, {
-    
-    /** 
-     * Constant: MIN_ZOOM_LEVEL
-     * {Integer} 1 
-     */
-    MIN_ZOOM_LEVEL: 1,
-    
-    /** 
-     * Constant: MAX_ZOOM_LEVEL
-     * {Integer} 19
-     */
-    MAX_ZOOM_LEVEL: 19,
-
-    /** 
-     * Constant: RESOLUTIONS
-     * {Array(Float)} Hardcode these resolutions so that they are more closely
-     *                tied with the standard wms projection
-     */
-    RESOLUTIONS: [
-        1.40625, 
-        0.703125, 
-        0.3515625, 
-        0.17578125, 
-        0.087890625, 
-        0.0439453125,
-        0.02197265625, 
-        0.010986328125, 
-        0.0054931640625, 
-        0.00274658203125,
-        0.001373291015625, 
-        0.0006866455078125, 
-        0.00034332275390625, 
-        0.000171661376953125, 
-        0.0000858306884765625, 
-        0.00004291534423828125,
-        0.00002145767211914062, 
-        0.00001072883605957031,
-        0.00000536441802978515
-    ],
-
-    /**
-     * APIProperty: type
-     * {VEMapType}
-     */
-    type: null,
-
-    /**
-     * APIProperty: wrapDateLine
-     * {Boolean} Allow user to pan forever east/west.  Default is true.  
-     *     Setting this to false only restricts panning if 
-     *     <sphericalMercator> is true. 
-     */
-    wrapDateLine: true,
-
-    /**
-     * APIProperty: sphericalMercator
-     * {Boolean} Should the map act as a mercator-projected map? This will
-     *     cause all interactions with the map to be in the actual map
-     *     projection, which allows support for vector drawing, overlaying
-     *     other maps, etc. 
-     */
-    sphericalMercator: false,
-    
-    /**
-     * APIProperty: animationEnabled
-     * {Boolean} If set to true, the transition between zoom levels will be
-     *     animated. Set to false to match the zooming experience of other
-     *     layer types. Default is true.
-     */
-    animationEnabled: true, 
-
-    /** 
-     * Constructor: OpenLayers.Layer.VirtualEarth
-     * 
-     * Parameters:
-     * name - {String}
-     * options - {Object}
-     */
-    initialize: function(name, options) {
-        OpenLayers.Layer.EventPane.prototype.initialize.apply(this, arguments);
-        OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this, 
-                                                                    arguments);
-        if(this.sphericalMercator) {
-            OpenLayers.Util.extend(this, OpenLayers.Layer.SphericalMercator);
-            this.initMercatorParameters();
-        }
-    },
-    
-    /**
-     * Method: loadMapObject
-     */
-    loadMapObject:function() {
-
-        // create div and set to same size as map
-        var veDiv = OpenLayers.Util.createDiv(this.name);
-        var sz = this.map.getSize();
-        veDiv.style.width = sz.w + "px";
-        veDiv.style.height = sz.h + "px";
-        this.div.appendChild(veDiv);
-
-        try { // crash prevention
-            this.mapObject = new VEMap(this.name);
-        } catch (e) { }
-
-        if (this.mapObject != null) {
-            try { // this is to catch a Mozilla bug without falling apart
-
-                // The fourth argument is whether the map is 'fixed' -- not 
-                // draggable. See: 
-                // http://blogs.msdn.com/virtualearth/archive/2007/09/28/locking-a-virtual-earth-map.aspx
-                //
-                this.mapObject.LoadMap(null, null, this.type, true);
-                this.mapObject.AttachEvent("onmousedown", OpenLayers.Function.True);
-
-            } catch (e) { }
-            this.mapObject.HideDashboard();
-            if(typeof this.mapObject.SetAnimationEnabled == "function") {
-                this.mapObject.SetAnimationEnabled(this.animationEnabled);
-            }
-        }
-
-        //can we do smooth panning? this is an unpublished method, so we need 
-        // to be careful
-        if ( !this.mapObject ||
-             !this.mapObject.vemapcontrol ||
-             !this.mapObject.vemapcontrol.PanMap ||
-             (typeof this.mapObject.vemapcontrol.PanMap != "function")) {
-
-            this.dragPanMapObject = null;
-        }
-
-    },
-
-    /**
-     * Method: onMapResize
-     */
-    onMapResize: function() {
-        this.mapObject.Resize(this.map.size.w, this.map.size.h);
-    },
-
-    /** 
-     * APIMethod: getWarningHTML
-     * 
-     * Returns: 
-     * {String} String with information on why layer is broken, how to get
-     *          it working.
-     */
-    getWarningHTML:function() {
-        return OpenLayers.i18n(
-            "getLayerWarning", {'layerType':'VE', 'layerLib':'VirtualEarth'}
-        );
-    },
-
-
-
-    /************************************
-     *                                  *
-     *   MapObject Interface Controls   *
-     *                                  *
-     ************************************/
-
-
-  // Get&Set Center, Zoom
-
-    /** 
-     * APIMethod: setMapObjectCenter
-     * Set the mapObject to the specified center and zoom
-     * 
-     * Parameters:
-     * center - {Object} MapObject LonLat format
-     * zoom - {int} MapObject zoom format
-     */
-    setMapObjectCenter: function(center, zoom) {
-        this.mapObject.SetCenterAndZoom(center, zoom); 
-    },
-   
-    /**
-     * APIMethod: getMapObjectCenter
-     * 
-     * Returns: 
-     * {Object} The mapObject's current center in Map Object format
-     */
-    getMapObjectCenter: function() {
-        return this.mapObject.GetCenter();
-    },
-
-    /**
-     * APIMethod: dragPanMapObject
-     * 
-     * Parameters:
-     * dX - {Integer}
-     * dY - {Integer}
-     */
-    dragPanMapObject: function(dX, dY) {
-        this.mapObject.vemapcontrol.PanMap(dX, -dY);
-    },
-
-    /** 
-     * APIMethod: getMapObjectZoom
-     * 
-     * Returns:
-     * {Integer} The mapObject's current zoom, in Map Object format
-     */
-    getMapObjectZoom: function() {
-        return this.mapObject.GetZoomLevel();
-    },
-
-
-  // LonLat - Pixel Translation
-  
-    /**
-     * APIMethod: getMapObjectLonLatFromMapObjectPixel
-     * 
-     * Parameters:
-     * moPixel - {Object} MapObject Pixel format
-     * 
-     * Returns:
-     * {Object} MapObject LonLat translated from MapObject Pixel
-     */
-    getMapObjectLonLatFromMapObjectPixel: function(moPixel) {
-        //the conditional here is to test if we are running the v6 of VE
-        return (typeof VEPixel != 'undefined') 
-            ? this.mapObject.PixelToLatLong(moPixel)
-            : this.mapObject.PixelToLatLong(moPixel.x, moPixel.y);
-    },
-
-    /**
-     * APIMethod: getMapObjectPixelFromMapObjectLonLat
-     * 
-     * Parameters:
-     * moLonLat - {Object} MapObject LonLat format
-     * 
-     * Returns:
-     * {Object} MapObject Pixel transtlated from MapObject LonLat
-     */
-    getMapObjectPixelFromMapObjectLonLat: function(moLonLat) {
-        return this.mapObject.LatLongToPixel(moLonLat);
-    },
-
-
-    /************************************
-     *                                  *
-     *       MapObject Primitives       *
-     *                                  *
-     ************************************/
-
-
-  // LonLat
-    
-    /**
-     * APIMethod: getLongitudeFromMapObjectLonLat
-     * 
-     * Parameters:
-     * moLonLat - {Object} MapObject LonLat format
-     * 
-     * Returns:
-     * {Float} Longitude of the given MapObject LonLat
-     */
-    getLongitudeFromMapObjectLonLat: function(moLonLat) {
-        return this.sphericalMercator ? 
-            this.forwardMercator(moLonLat.Longitude, moLonLat.Latitude).lon :
-            moLonLat.Longitude;
-    },
-
-    /**
-     * APIMethod: getLatitudeFromMapObjectLonLat
-     * 
-     * Parameters:
-     * moLonLat - {Object} MapObject LonLat format
-     * 
-     * Returns:
-     * {Float} Latitude of the given MapObject LonLat
-     */
-    getLatitudeFromMapObjectLonLat: function(moLonLat) {
-        return this.sphericalMercator ? 
-            this.forwardMercator(moLonLat.Longitude, moLonLat.Latitude).lat :
-            moLonLat.Latitude;
-    },
-
-    /**
-     * APIMethod: getMapObjectLonLatFromLonLat
-     * 
-     * Parameters:
-     * lon - {Float}
-     * lat - {Float}
-     * 
-     * Returns:
-     * {Object} MapObject LonLat built from lon and lat params
-     */
-    getMapObjectLonLatFromLonLat: function(lon, lat) {
-        var veLatLong;
-        if(this.sphericalMercator) {
-            var lonlat = this.inverseMercator(lon, lat);
-            veLatLong = new VELatLong(lonlat.lat, lonlat.lon);
-        } else {
-            veLatLong = new VELatLong(lat, lon);
-        }
-        return veLatLong;
-    },
-
-  // Pixel
-    
-    /**
-     * APIMethod: getXFromMapObjectPixel
-     * 
-     * Parameters:
-     * moPixel - {Object} MapObject Pixel format
-     * 
-     * Returns:
-     * {Integer} X value of the MapObject Pixel
-     */
-    getXFromMapObjectPixel: function(moPixel) {
-        return moPixel.x;
-    },
-
-    /**
-     * APIMethod: getYFromMapObjectPixel
-     * 
-     * Parameters:
-     * moPixel - {Object} MapObject Pixel format
-     * 
-     * Returns:
-     * {Integer} Y value of the MapObject Pixel
-     */
-    getYFromMapObjectPixel: function(moPixel) {
-        return moPixel.y;
-    },
-
-    /**
-     * APIMethod: getMapObjectPixelFromXY
-     * 
-     * Parameters:
-     * x - {Integer}
-     * y - {Integer}
-     * 
-     * Returns:
-     * {Object} MapObject Pixel from x and y parameters
-     */
-    getMapObjectPixelFromXY: function(x, y) {
-        //the conditional here is to test if we are running the v6 of VE
-        return (typeof VEPixel != 'undefined') ? new VEPixel(x, y)
-                         : new Msn.VE.Pixel(x, y);
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.VirtualEarth"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/WFS.js
+++ /dev/null
@@ -1,610 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Tile/WFS.js
- * @requires OpenLayers/Layer/Vector.js
- * @requires OpenLayers/Layer/Markers.js
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Layer.WFS
- * *Deprecated*.  To be removed in 3.0.  Instead use OpenLayers.Layer.Vector
- *     with a Protocol.WFS and one or more Strategies.
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.Vector>
- *  - <OpenLayers.Layer.Markers>
- */
-OpenLayers.Layer.WFS = OpenLayers.Class(
-  OpenLayers.Layer.Vector, OpenLayers.Layer.Markers, {
-
-    /**
-     * APIProperty: isBaseLayer
-     * {Boolean} WFS layer is not a base layer by default. 
-     */
-    isBaseLayer: false,
-    
-    /**
-     * Property: tile
-     * {<OpenLayers.Tile.WFS>}
-     */
-    tile: null,    
-    
-    /**
-     * APIProperty: ratio
-     * {Float} The ratio property determines the size of the serverside query
-     *    relative to the map viewport size. By default, we load an area twice
-     *    as big as the map, to allow for panning without immediately reload.
-     *    Setting this to 1 will cause the area of the WFS request to match
-     *    the map area exactly. It is recommended to set this to some number
-     *    at least slightly larger than 1, otherwise accidental clicks can
-     *    cause a data reload, by moving the map only 1 pixel.
-     */
-    ratio: 2,
-
-    /**  
-     * Property: DEFAULT_PARAMS
-     * {Object} Hashtable of default key/value parameters
-     */
-    DEFAULT_PARAMS: { service: "WFS",
-                      version: "1.0.0",
-                      request: "GetFeature"
-                    },
-    
-    /** 
-     * APIProperty: featureClass
-     * {<OpenLayers.Feature>} If featureClass is defined, an old-style markers
-     *     based WFS layer is created instead of a new-style vector layer. If
-     *     sent, this should be a subclass of OpenLayers.Feature
-     */
-    featureClass: null,
-    
-    /**
-      * APIProperty: format
-      * {<OpenLayers.Format>} The format you want the data to be parsed with.
-      * Must be passed in the constructor. Should be a class, not an instance.
-      * This option can only be used if no featureClass is passed / vectorMode
-      * is false: if a featureClass is passed, then this parameter is ignored.
-      */
-    format: null,
-
-    /** 
-     * Property: formatObject
-     * {<OpenLayers.Format>} Internally created/managed format object, used by
-     * the Tile to parse data.
-     */
-    formatObject: null,
-
-    /**
-     * APIProperty: formatOptions
-     * {Object} Hash of options which should be passed to the format when it is
-     * created. Must be passed in the constructor.
-     */
-    formatOptions: null, 
-
-    /**
-     * Property: vectorMode
-     * {Boolean} Should be calculated automatically. Determines whether the
-     *     layer is in vector mode or marker mode.
-     */
-    vectorMode: true, 
-    
-    /**
-     * APIProperty: encodeBBOX
-     * {Boolean} Should the BBOX commas be encoded? The WMS spec says 'no', 
-     *     but some services want it that way. Default false.
-     */
-    encodeBBOX: false,
-    
-    /**
-     * APIProperty: extractAttributes 
-     * {Boolean} Should the WFS layer parse attributes from the retrieved
-     *     GML? Defaults to false. If enabled, parsing is slower, but 
-     *     attributes are available in the attributes property of 
-     *     layer features.
-     */
-    extractAttributes: false,
-
-    /**
-     * Constructor: OpenLayers.Layer.WFS
-     *
-     * Parameters:
-     * name - {String} 
-     * url - {String} 
-     * params - {Object} 
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, url, params, options) {
-        if (options == undefined) { options = {}; } 
-        
-        if (options.featureClass || 
-            !OpenLayers.Layer.Vector || 
-            !OpenLayers.Feature.Vector) {
-            this.vectorMode = false;
-        }    
-
-        // Uppercase params
-        params = OpenLayers.Util.upperCaseObject(params);
-        
-        // Turn off error reporting, browsers like Safari may work
-        // depending on the setup, and we don't want an unneccesary alert.
-        OpenLayers.Util.extend(options, {'reportError': false});
-        var newArguments = [];
-        newArguments.push(name, options);
-        OpenLayers.Layer.Vector.prototype.initialize.apply(this, newArguments);
-        if (!this.renderer || !this.vectorMode) {
-            this.vectorMode = false; 
-            if (!options.featureClass) {
-                options.featureClass = OpenLayers.Feature.WFS;
-            }   
-            OpenLayers.Layer.Markers.prototype.initialize.apply(this, 
-                                                                newArguments);
-        }
-        
-        if (this.params && this.params.typename && !this.options.typename) {
-            this.options.typename = this.params.typename;
-        }
-        
-        if (!this.options.geometry_column) {
-            this.options.geometry_column = "the_geom";
-        }    
-        
-        this.params = OpenLayers.Util.applyDefaults(
-            params, 
-            OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS)
-        );
-        this.url = url;
-    },    
-    
-
-    /**
-     * APIMethod: destroy
-     */
-    destroy: function() {
-        if (this.vectorMode) {
-            OpenLayers.Layer.Vector.prototype.destroy.apply(this, arguments);
-        } else {    
-            OpenLayers.Layer.Markers.prototype.destroy.apply(this, arguments);
-        }    
-        if (this.tile) {
-            this.tile.destroy();
-        }
-        this.tile = null;
-
-        this.ratio = null;
-        this.featureClass = null;
-        this.format = null;
-
-        if (this.formatObject && this.formatObject.destroy) {
-            this.formatObject.destroy();
-        }
-        this.formatObject = null;
-        
-        this.formatOptions = null;
-        this.vectorMode = null;
-        this.encodeBBOX = null;
-        this.extractAttributes = null;
-    },
-    
-    /**
-     * Method: setMap
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>} 
-     */
-    setMap: function(map) {
-        if (this.vectorMode) {
-            OpenLayers.Layer.Vector.prototype.setMap.apply(this, arguments);
-            
-            var options = {
-              'extractAttributes': this.extractAttributes
-            };
-            
-            OpenLayers.Util.extend(options, this.formatOptions);
-            if (this.map && !this.projection.equals(this.map.getProjectionObject())) {
-                options.externalProjection = this.projection;
-                options.internalProjection = this.map.getProjectionObject();
-            }    
-            
-            this.formatObject = this.format ? new this.format(options) : new OpenLayers.Format.GML(options);
-        } else {    
-            OpenLayers.Layer.Markers.prototype.setMap.apply(this, arguments);
-        }    
-    },
-    
-    /** 
-     * Method: moveTo
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} 
-     * zoomChanged - {Boolean} 
-     * dragging - {Boolean} 
-     */
-    moveTo:function(bounds, zoomChanged, dragging) {
-        if (this.vectorMode) {
-            OpenLayers.Layer.Vector.prototype.moveTo.apply(this, arguments);
-        } else {
-            OpenLayers.Layer.Markers.prototype.moveTo.apply(this, arguments);
-        }    
-
-        // don't load wfs features while dragging, wait for drag end
-        if (dragging) {
-            // TBD try to hide the vector layer while dragging
-            // this.setVisibility(false);
-            // this will probably help for panning performances
-            return false;
-        }
-        
-        if ( zoomChanged ) {
-            if (this.vectorMode) {
-                this.renderer.clear();
-            }
-        }
-        
-    //DEPRECATED - REMOVE IN 3.0
-        // don't load data if current zoom level doesn't match
-        if (this.options.minZoomLevel) {
-            OpenLayers.Console.warn(OpenLayers.i18n('minZoomLevelError'));
-            
-            if (this.map.getZoom() < this.options.minZoomLevel) {
-                return null;
-            }
-        }
-        
-        if (bounds == null) {
-            bounds = this.map.getExtent();
-        }
-
-        var firstRendering = (this.tile == null);
-
-        //does the new bounds to which we need to move fall outside of the 
-        // current tile's bounds?
-        var outOfBounds = (!firstRendering &&
-                           !this.tile.bounds.containsBounds(bounds));
-
-        if (zoomChanged || firstRendering || (!dragging && outOfBounds)) {
-            //determine new tile bounds
-            var center = bounds.getCenterLonLat();
-            var tileWidth = bounds.getWidth() * this.ratio;
-            var tileHeight = bounds.getHeight() * this.ratio;
-            var tileBounds = 
-                new OpenLayers.Bounds(center.lon - (tileWidth / 2),
-                                      center.lat - (tileHeight / 2),
-                                      center.lon + (tileWidth / 2),
-                                      center.lat + (tileHeight / 2));
-
-            //determine new tile size
-            var tileSize = this.map.getSize();
-            tileSize.w = tileSize.w * this.ratio;
-            tileSize.h = tileSize.h * this.ratio;
-
-            //determine new position (upper left corner of new bounds)
-            var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top);
-            var pos = this.map.getLayerPxFromLonLat(ul);
-
-            //formulate request url string
-            var url = this.getFullRequestString();
-        
-            var params = null;
-
-            // Cant combine "filter" and "BBOX". This is a cheap hack to help
-            // people out who can't migrate to the WFS protocol immediately.
-            var filter = this.params.filter || this.params.FILTER;
-            if (filter) {
-                params = {FILTER: filter};
-            }
-            else {
-                params = {BBOX: this.encodeBBOX ? tileBounds.toBBOX() 
-                                                    : tileBounds.toArray()};
-            }
-            
-            if (this.map && !this.projection.equals(this.map.getProjectionObject())) {
-                var projectedBounds = tileBounds.clone();
-                projectedBounds.transform(this.map.getProjectionObject(), 
-                                          this.projection);
-                if (!filter){
-                    params.BBOX = this.encodeBBOX ? projectedBounds.toBBOX() 
-                                                : projectedBounds.toArray();
-                }
-            }                                  
-
-            url += "&" + OpenLayers.Util.getParameterString(params);
-
-            if (!this.tile) {
-                this.tile = new OpenLayers.Tile.WFS(this, pos, tileBounds, 
-                                                     url, tileSize);
-                this.addTileMonitoringHooks(this.tile);
-                this.tile.draw();
-            } else {
-                if (this.vectorMode) {
-                    this.destroyFeatures();
-                    this.renderer.clear();
-                } else {
-                    this.clearMarkers();
-                }    
-                this.removeTileMonitoringHooks(this.tile);
-                this.tile.destroy();
-                
-                this.tile = null;
-                this.tile = new OpenLayers.Tile.WFS(this, pos, tileBounds, 
-                                                     url, tileSize);
-                this.addTileMonitoringHooks(this.tile);
-                this.tile.draw();
-            } 
-        }
-    },
-
-    /** 
-     * Method: addTileMonitoringHooks
-     * This function takes a tile as input and adds the appropriate hooks to 
-     *     the tile so that the layer can keep track of the loading tile
-     *     (making sure to check that the tile is always the layer's current
-     *     tile before taking any action).
-     * 
-     * Parameters: 
-     * tile - {<OpenLayers.Tile>}
-     */
-    addTileMonitoringHooks: function(tile) {
-        tile.onLoadStart = function() {
-            //if this is the the layer's current tile, then trigger 
-            // a 'loadstart'
-            if (this == this.layer.tile) {
-                this.layer.events.triggerEvent("loadstart");
-            }
-        };
-        tile.events.register("loadstart", tile, tile.onLoadStart);
-      
-        tile.onLoadEnd = function() {
-            //if this is the the layer's current tile, then trigger 
-            // a 'tileloaded' and 'loadend'
-            if (this == this.layer.tile) {
-                this.layer.events.triggerEvent("tileloaded");
-                this.layer.events.triggerEvent("loadend");
-            }
-        };
-        tile.events.register("loadend", tile, tile.onLoadEnd);
-        tile.events.register("unload", tile, tile.onLoadEnd);
-    },
-    
-    /** 
-     * Method: removeTileMonitoringHooks
-     * This function takes a tile as input and removes the tile hooks 
-     *     that were added in addTileMonitoringHooks()
-     * 
-     * Parameters: 
-     * tile - {<OpenLayers.Tile>}
-     */
-    removeTileMonitoringHooks: function(tile) {
-        tile.unload();
-        tile.events.un({
-            "loadstart": tile.onLoadStart,
-            "loadend": tile.onLoadEnd,
-            "unload": tile.onLoadEnd,
-            scope: tile
-        });
-    },
-
-    /**
-     * Method: onMapResize
-     * Call the onMapResize method of the appropriate parent class. 
-     */
-    onMapResize: function() {
-        if(this.vectorMode) {
-            OpenLayers.Layer.Vector.prototype.onMapResize.apply(this, 
-                                                                arguments);
-        } else {
-            OpenLayers.Layer.Markers.prototype.onMapResize.apply(this, 
-                                                                 arguments);
-        }
-    },
-    
-    /**
-     * Method: display
-     * Call the display method of the appropriate parent class. 
-     */
-    display: function() {
-        if(this.vectorMode) {
-            OpenLayers.Layer.Vector.prototype.display.apply(this, 
-                                                                arguments);
-        } else {
-            OpenLayers.Layer.Markers.prototype.display.apply(this, 
-                                                                 arguments);
-        }
-    },
-    
-    /**
-     * APIMethod: mergeNewParams
-     * Modify parameters for the layer and redraw.
-     * 
-     * Parameters:
-     * newParams - {Object}
-     */
-    mergeNewParams:function(newParams) {
-        var upperParams = OpenLayers.Util.upperCaseObject(newParams);
-        var newArguments = [upperParams];
-        return OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this, 
-                                                                 newArguments);
-    },
-
-    /**
-     * APIMethod: clone
-     *
-     * Parameters:
-     * obj - {Object} 
-     * 
-     * Returns:
-     * {<OpenLayers.Layer.WFS>} An exact clone of this OpenLayers.Layer.WFS
-     */
-    clone: function (obj) {
-        
-        if (obj == null) {
-            obj = new OpenLayers.Layer.WFS(this.name,
-                                           this.url,
-                                           this.params,
-                                           this.getOptions());
-        }
-
-        //get all additions from superclasses
-        if (this.vectorMode) {
-            obj = OpenLayers.Layer.Vector.prototype.clone.apply(this, [obj]);
-        } else {
-            obj = OpenLayers.Layer.Markers.prototype.clone.apply(this, [obj]);
-        }    
-
-        // copy/set any non-init, non-simple values here
-
-        return obj;
-    },
-
-    /** 
-     * APIMethod: getFullRequestString
-     * combine the layer's url with its params and these newParams. 
-     *   
-     *    Add the SRS parameter from 'projection' -- this is probably
-     *     more eloquently done via a setProjection() method, but this 
-     *     works for now and always.
-     *
-     * Parameters:
-     * newParams - {Object} 
-     * altUrl - {String} Use this as the url instead of the layer's url
-     */
-    getFullRequestString:function(newParams, altUrl) {
-        var projectionCode = this.projection.getCode() || this.map.getProjection();
-        this.params.SRS = (projectionCode == "none") ? null : projectionCode;
-
-        return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(
-                                                    this, arguments);
-    },
-   
-    /**
-     * APIMethod: commit
-     * Write out the data to a WFS server.
-     */
-    commit: function() {
-        if (!this.writer) {
-            var options = {};
-            if (this.map && !this.projection.equals(this.map.getProjectionObject())) {
-                options.externalProjection = this.projection;
-                options.internalProjection = this.map.getProjectionObject();
-            }    
-            
-            this.writer = new OpenLayers.Format.WFS(options,this);
-        }
-
-        var data = this.writer.write(this.features);
-
-        OpenLayers.Request.POST({
-            url: this.url,
-            data: data,
-            success: this.commitSuccess,
-            failure: this.commitFailure,
-            scope: this
-        });
-    },
-
-    /**
-     * Method: commitSuccess
-     * Called when the Ajax request returns a response
-     *
-     * Parameters:
-     * response - {XmlNode} from server
-     */
-    commitSuccess: function(request) {
-        var response = request.responseText;
-        if (response.indexOf('SUCCESS') != -1) {
-            this.commitReport(OpenLayers.i18n("commitSuccess", {'response':response}));
-            
-            for(var i = 0; i < this.features.length; i++) {
-                this.features[i].state = null;
-            }    
-            // TBD redraw the layer or reset the state of features
-            // foreach features: set state to null
-        } else if (response.indexOf('FAILED') != -1 ||
-            response.indexOf('Exception') != -1) {
-            this.commitReport(OpenLayers.i18n("commitFailed", {'response':response}));
-        }
-    },
-    
-    /**
-     * Method: commitFailure
-     * Called when the Ajax request fails
-     *
-     * Parameters:
-     * response - {XmlNode} from server
-     */
-    commitFailure: function(request) {},
-    
-    /**
-     * APIMethod: commitReport 
-     * Called with a 'success' message if the commit succeeded, otherwise
-     *     a failure message, and the full request text as a second parameter.
-     *     Override this function to provide custom transaction reporting.
-     *
-     * string - {String} reporting string
-     * response - {String} full XML response
-     */
-    commitReport: function(string, response) {
-        OpenLayers.Console.userError(string);
-    },
-
-    
-    /**
-     * APIMethod: refresh
-     * Refreshes all the features of the layer
-     */
-    refresh: function() {
-        if (this.tile) {
-            if (this.vectorMode) {
-                this.renderer.clear();
-                this.features.length = 0;
-            } else {   
-                this.clearMarkers();
-                this.markers.length = 0;
-            }    
-            this.tile.draw();
-        }
-    },
-    
-    /** 
-     * APIMethod: getDataExtent
-     * Calculates the max extent which includes all of the layer data.
-     * 
-     * Returns:
-     * {<OpenLayers.Bounds>}
-     */
-    getDataExtent: function () {
-        var extent; 
-        //get all additions from superclasses
-        if (this.vectorMode) {
-            extent = OpenLayers.Layer.Vector.prototype.getDataExtent.apply(this);
-        } else {
-            extent = OpenLayers.Layer.Markers.prototype.getDataExtent.apply(this);
-        }    
-
-        return extent;
-    },
-    
-    /** 
-     * APIMethod: setOpacity 
-     * Call the setOpacity method of the appropriate parent class to set the
-     *     opacity.  
-     * 
-     * Parameter: 
-     * opacity - {Float} 
-     */
-    setOpacity: function (opacity) {
-        if (this.vectorMode) {
-            OpenLayers.Layer.Vector.prototype.setOpacity.apply(this, [opacity]);
-        } else {
-            OpenLayers.Layer.Markers.prototype.setOpacity.apply(this, [opacity]);
-        }    
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.WFS"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/WMS.js
+++ /dev/null
@@ -1,269 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer/Grid.js
- * @requires OpenLayers/Tile/Image.js
- */
-
-/**
- * Class: OpenLayers.Layer.WMS
- * Instances of OpenLayers.Layer.WMS are used to display data from OGC Web
- *     Mapping Services. Create a new WMS layer with the <OpenLayers.Layer.WMS>
- *     constructor.
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.Grid>
- */
-OpenLayers.Layer.WMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
-
-    /**
-     * Constant: DEFAULT_PARAMS
-     * {Object} Hashtable of default parameter key/value pairs 
-     */
-    DEFAULT_PARAMS: { service: "WMS",
-                      version: "1.1.1",
-                      request: "GetMap",
-                      styles: "",
-                      exceptions: "application/vnd.ogc.se_inimage",
-                      format: "image/jpeg"
-                     },
-    
-    /**
-     * Property: reproject
-     * *Deprecated*. See http://trac.openlayers.org/wiki/SphericalMercator
-     * for information on the replacement for this functionality. 
-     * {Boolean} Try to reproject this layer if its coordinate reference system
-     *           is different than that of the base layer.  Default is true.  
-     *           Set this in the layer options.  Should be set to false in 
-     *           most cases.
-     */
-    reproject: false,
- 
-    /**
-     * APIProperty: isBaseLayer
-     * {Boolean} Default is true for WMS layer
-     */
-    isBaseLayer: true,
-    
-    /**
-     * APIProperty: encodeBBOX
-     * {Boolean} Should the BBOX commas be encoded? The WMS spec says 'no', 
-     * but some services want it that way. Default false.
-     */
-    encodeBBOX: false,
-    
-    /** 
-     * APIProperty: noMagic 
-     * {Boolean} If true, the image format will not be automagicaly switched 
-     *     from image/jpeg to image/png or image/gif when using 
-     *     TRANSPARENT=TRUE. Also isBaseLayer will not changed by the  
-     *     constructor. Default false. 
-     */ 
-    noMagic: false,
-    
-    /**
-     * Property: yx
-     * {Object} Keys in this object are EPSG codes for which the axis order
-     *     is to be reversed (yx instead of xy, LatLon instead of LonLat), with
-     *     true as value. This is only relevant for WMS versions >= 1.3.0.
-     */
-    yx: {'EPSG:4326': true},
-    
-    /**
-     * Constructor: OpenLayers.Layer.WMS
-     * Create a new WMS layer object
-     *
-     * Example:
-     * (code)
-     * var wms = new OpenLayers.Layer.WMS("NASA Global Mosaic",
-     *                                    "http://wms.jpl.nasa.gov/wms.cgi", 
-     *                                    {layers: "modis,global_mosaic"});
-     * (end)
-     *
-     * Parameters:
-     * name - {String} A name for the layer
-     * url - {String} Base url for the WMS
-     *                (e.g. http://wms.jpl.nasa.gov/wms.cgi)
-     * params - {Object} An object with key/value pairs representing the
-     *                   GetMap query string parameters and parameter values.
-     * options - {Ojbect} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, url, params, options) {
-        var newArguments = [];
-        //uppercase params
-        params = OpenLayers.Util.upperCaseObject(params);
-        if (parseFloat(params.VERSION) >= 1.3 && !params.EXCEPTIONS) {
-            params.EXCEPTIONS = "INIMAGE";
-        } 
-        newArguments.push(name, url, params, options);
-        OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
-        OpenLayers.Util.applyDefaults(
-                       this.params, 
-                       OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS)
-                       );
-
-
-        //layer is transparent        
-        if (!this.noMagic && this.params.TRANSPARENT && 
-            this.params.TRANSPARENT.toString().toLowerCase() == "true") {
-            
-            // unless explicitly set in options, make layer an overlay
-            if ( (options == null) || (!options.isBaseLayer) ) {
-                this.isBaseLayer = false;
-            } 
-            
-            // jpegs can never be transparent, so intelligently switch the 
-            //  format, depending on teh browser's capabilities
-            if (this.params.FORMAT == "image/jpeg") {
-                this.params.FORMAT = OpenLayers.Util.alphaHack() ? "image/gif"
-                                                                 : "image/png";
-            }
-        }
-
-    },    
-
-    /**
-     * Method: destroy
-     * Destroy this layer
-     */
-    destroy: function() {
-        // for now, nothing special to do here. 
-        OpenLayers.Layer.Grid.prototype.destroy.apply(this, arguments);  
-    },
-
-    
-    /**
-     * Method: clone
-     * Create a clone of this layer
-     *
-     * Returns:
-     * {<OpenLayers.Layer.WMS>} An exact clone of this layer
-     */
-    clone: function (obj) {
-        
-        if (obj == null) {
-            obj = new OpenLayers.Layer.WMS(this.name,
-                                           this.url,
-                                           this.params,
-                                           this.getOptions());
-        }
-
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);
-
-        // copy/set any non-init, non-simple values here
-
-        return obj;
-    },    
-    
-    /**
-     * APIMethod: reverseAxisOrder
-     * Returns true if the axis order is reversed for the WMS version and
-     * projection of the layer.
-     * 
-     * Returns:
-     * {Boolean} true if the axis order is reversed, false otherwise.
-     */
-    reverseAxisOrder: function() {
-        return (parseFloat(this.params.VERSION) >= 1.3 && 
-            !!this.yx[this.map.getProjectionObject().getCode()]);
-    },
-    
-    /**
-     * Method: getURL
-     * Return a GetMap query string for this layer
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} A bounds representing the bbox for the
-     *                                request.
-     *
-     * Returns:
-     * {String} A string with the layer's url and parameters and also the
-     *          passed-in bounds and appropriate tile size specified as 
-     *          parameters.
-     */
-    getURL: function (bounds) {
-        bounds = this.adjustBounds(bounds);
-        
-        var imageSize = this.getImageSize();
-        var newParams = {};
-        // WMS 1.3 introduced axis order
-        var reverseAxisOrder = this.reverseAxisOrder();
-        newParams.BBOX = this.encodeBBOX ?
-            bounds.toBBOX(null, reverseAxisOrder) :
-            bounds.toArray(reverseAxisOrder);
-        newParams.WIDTH = imageSize.w;
-        newParams.HEIGHT = imageSize.h;
-        var requestString = this.getFullRequestString(newParams);
-        return requestString;
-    },
-
-    /**
-     * Method: addTile
-     * addTile creates a tile, initializes it, and adds it to the layer div. 
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                         null, this.tileSize);
-    },
-
-    /**
-     * APIMethod: mergeNewParams
-     * Catch changeParams and uppercase the new params to be merged in
-     *     before calling changeParams on the super class.
-     * 
-     *     Once params have been changed, the tiles will be reloaded with
-     *     the new parameters.
-     * 
-     * Parameters:
-     * newParams - {Object} Hashtable of new params to use
-     */
-    mergeNewParams:function(newParams) {
-        var upperParams = OpenLayers.Util.upperCaseObject(newParams);
-        var newArguments = [upperParams];
-        return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this, 
-                                                             newArguments);
-    },
-
-    /** 
-     * APIMethod: getFullRequestString
-     * Combine the layer's url with its params and these newParams. 
-     *   
-     *     Add the SRS parameter from projection -- this is probably
-     *     more eloquently done via a setProjection() method, but this 
-     *     works for now and always.
-     *
-     * Parameters:
-     * newParams - {Object}
-     * altUrl - {String} Use this as the url instead of the layer's url
-     * 
-     * Returns:
-     * {String} 
-     */
-    getFullRequestString:function(newParams, altUrl) {
-        var projectionCode = this.map.getProjection();
-        var value = (projectionCode == "none") ? null : projectionCode
-        if (parseFloat(this.params.VERSION) >= 1.3) {
-            this.params.CRS = value;
-        } else {
-            this.params.SRS = value;
-        }
-
-        return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(
-                                                    this, arguments);
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.WMS"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/WMS/Post.js
+++ /dev/null
@@ -1,100 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
- 
-/**
- * @requires OpenLayers/Layer/WMS.js
- * @requires OpenLayers/Tile/Image/IFrame.js
- */
-
-/**
- * Class: OpenLayers.Layer.WMS.Post
- * Instances of OpenLayers.Layer.WMS.Post are used to retrieve data from OGC
- * Web Mapping Services via HTTP-POST (application/x-www-form-urlencoded). 
- * Create a new WMS layer with the <OpenLayers.Layer.WMS.Post> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Layer.WMS>
- */
-OpenLayers.Layer.WMS.Post = OpenLayers.Class(OpenLayers.Layer.WMS, {
-
-    /**
-     * Property: tileClass
-     * {Object} Class, used to create tiles.
-     */
-    tileClass: null,
-
-    /**
-     * APIProperty: unsupportedBrowsers
-     * {Array} Array with browsers, which should use the HTTP-GET protocol 
-     * instead of HTTP-POST for fetching tiles from a WMS .
-     * Defaults to ["mozilla", "firefox", "opera"], because Opera is not able 
-     * to show transparent images in IFrames and Firefox/Mozilla has some ugly 
-     * effects of viewport-shaking when panning the map. Both browsers, Opera
-     * and Firefox/Mozilla, have no problem with long urls, which is the reason
-     * for using POST instead of GET. The strings to pass to this array are
-     * the ones returned by <OpenLayers.Util.getBrowserName()>.
-     */
-    unsupportedBrowsers: ["mozilla", "firefox", "opera"],
-
-    /**
-     * Property: SUPPORTED_TRANSITIONS
-     * {Array} 
-     * no supported transitions for this type of layer, because it is not
-     * possible to modify the initialized tiles (iframes)
-     */
-    SUPPORTED_TRANSITIONS: [],
-
-    /**
-     * Constructor: OpenLayers.Layer.WMS.Post
-     * Creates a new WMS layer object.
-     *
-     * Example:
-     * (code)
-     * var wms = new OpenLayers.Layer.WMS.Post(
-     *  "NASA Global Mosaic",
-     *  "http://wms.jpl.nasa.gov/wms.cgi",
-     *  {layers: "modis, global_mosaic"});
-     * (end)
-     *
-     * Parameters:
-     * name - {String} A name for the layer
-     * url - {String} Base url for the WMS
-     *                (e.g. http://wms.jpl.nasa.gov/wms.cgi)
-     * params - {Object} An object with key/value pairs representing the
-     *                   GetMap query string parameters and parameter values.
-     * options - {Object} Hashtable of extra options to tag onto the layer.
-     */
-    initialize: function(name, url, params, options) {
-        var newArguments = [];
-        newArguments.push(name, url, params, options);
-        OpenLayers.Layer.WMS.prototype.initialize.apply(this, newArguments);
-
-        this.tileClass = OpenLayers.Util.indexOf(
-            this.unsupportedBrowsers, OpenLayers.Util.getBrowserName()) != -1
-                ? OpenLayers.Tile.Image
-                : OpenLayers.Tile.Image.IFrame;
-    },
-    
-    /**
-     * Method: addTile
-     * addTile creates a tile, initializes it and adds it as iframe to the
-     * layer div.
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     *
-     * Returns:
-     * {<OpenLayers.Tile.Image.IFrame>} The added OpenLayers.Tile.Image.IFrame
-     */
-    addTile: function(bounds,position) {
-        return new this.tileClass(
-            this, position, bounds, null, this.tileSize);
-    },
-
-    CLASS_NAME: 'OpenLayers.Layer.WMS.Post'
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/WMS/Untiled.js
+++ /dev/null
@@ -1,73 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
- 
-/**
- * @requires OpenLayers/Layer/WMS.js
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Layer.WMS.Untiled
- * *Deprecated*.  To be removed in 3.0.  Instead use OpenLayers.Layer.WMS and 
- *     pass the option 'singleTile' as true.
- * 
- * Inherits from: 
- *  - <OpenLayers.Layer.WMS>
- */
-OpenLayers.Layer.WMS.Untiled = OpenLayers.Class(OpenLayers.Layer.WMS, {
-
-    /**
-     * APIProperty: singleTile
-     * {singleTile} Always true for untiled.
-     */
-    singleTile: true,
-
-    /**
-     * Constructor: OpenLayers.Layer.WMS.Untiled
-     *
-     * Parameters:
-     * name - {String} 
-     * url - {String} 
-     * params - {Object} 
-     * options - {Object} 
-     */
-    initialize: function(name, url, params, options) {
-        OpenLayers.Layer.WMS.prototype.initialize.apply(this, arguments);
-        
-        var msg = "The OpenLayers.Layer.WMS.Untiled class is deprecated and " +
-                  "will be removed in 3.0. Instead, you should use the " +
-                  "normal OpenLayers.Layer.WMS class, passing it the option " +
-                  "'singleTile' as true.";
-        OpenLayers.Console.warn(msg);
-    },    
-
-    /**
-     * Method: clone
-     * Create a clone of this layer
-     *
-     * Returns:
-     * {<OpenLayers.Layer.WMS.Untiled>} An exact clone of this layer
-     */
-    clone: function (obj) {
-        
-        if (obj == null) {
-            obj = new OpenLayers.Layer.WMS.Untiled(this.name,
-                                                   this.url,
-                                                   this.params,
-                                                   this.getOptions());
-        }
-
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.WMS.prototype.clone.apply(this, [obj]);
-
-        // copy/set any non-init, non-simple values here
-
-        return obj;
-    }, 
-
-    CLASS_NAME: "OpenLayers.Layer.WMS.Untiled"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/WMTS.js
+++ /dev/null
@@ -1,477 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Layer/Grid.js
- * @requires OpenLayers/Tile/Image.js
- */
-
-/**
- * Class: OpenLayers.Layer.WMTS
- * Instances of the WMTS class allow viewing of tiles from a service that 
- *     implements the OGC WMTS specification version 1.0.0.
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.Grid>
- */
-OpenLayers.Layer.WMTS = OpenLayers.Class(OpenLayers.Layer.Grid, {
-    
-    /**
-     * APIProperty: isBaseLayer
-     * {Boolean} The layer will be considered a base layer.  Default is true.
-     */
-    isBaseLayer: true,
-
-    /**
-     * Property: version
-     * {String} WMTS version.  Default is "1.0.0".
-     */
-    version: "1.0.0",
-    
-    /**
-     * APIProperty: requestEncoding
-     * {String} Request encoding.  Can be "REST" or "KVP".  Default is "KVP".
-     */
-    requestEncoding: "KVP",
-    
-    /**
-     * APIProperty: url
-     * {String} The base URL for the WMTS service.  Must be provided.
-     */
-    url: null,
-
-    /**
-     * APIProperty: layer
-     * {String} The layer identifier advertised by the WMTS service.  Must be 
-     *     provided.
-     */
-    layer: null,
-    
-    /** 
-     * APIProperty: matrixSet
-     * {String} One of the advertised matrix set identifiers.  Must be provided.
-     */
-    matrixSet: null,
-
-    /** 
-     * APIProperty: style
-     * {String} One of the advertised layer styles.  Must be provided.
-     */
-    style: null,
-    
-    /** 
-     * APIProperty: format
-     * {String} The image MIME type.  Default is "image/jpeg".
-     */
-    format: "image/jpeg",
-    
-    /**
-     * APIProperty: tileOrigin
-     * {<OpenLayers.LonLat>} The top-left corner of the tile matrix in map 
-     *     units.  If the tile origin for each matrix in a set is different,
-     *     the <matrixIds> should include a topLeftCorner property.  If
-     *     not provided, the tile origin will default to the top left corner
-     *     of the layer <maxExtent>.
-     */
-    tileOrigin: null,
-    
-    /**
-     * APIProperty: tileFullExtent
-     * {<OpenLayers.Bounds>}  The full extent of the tile set.  If not supplied,
-     *     the layer's <maxExtent> property will be used.
-     */
-    tileFullExtent: null,
-
-    /**
-     * APIProperty: formatSuffix
-     * {String} For REST request encoding, an image format suffix must be 
-     *     included in the request.  If not provided, the suffix will be derived
-     *     from the <format> property.
-     */
-    formatSuffix: null,    
-
-    /**
-     * APIProperty: matrixIds
-     * {Array} A list of tile matrix identifiers.  If not provided, the matrix
-     *     identifiers will be assumed to be integers corresponding to the 
-     *     map zoom level.  If a list of strings is provided, each item should
-     *     be the matrix identifier that corresponds to the map zoom level.
-     *     Additionally, a list of objects can be provided.  Each object should
-     *     describe the matrix as presented in the WMTS capabilities.  These
-     *     objects should have the propertes shown below.
-     * 
-     * Matrix properties:
-     * identifier - {String} The matrix identifier (required).
-     * topLeftCorner - {<OpenLayers.LonLat>} The top left corner of the 
-     *     matrix.  Must be provided if different than the layer <tileOrigin>.
-     * tileWidth - {Number} The tile width for the matrix.  Must be provided 
-     *     if different than the width given in the layer <tileSize>.
-     * tileHeight - {Number} The tile height for the matrix.  Must be provided 
-     *     if different than the height given in the layer <tileSize>.
-     */
-    matrixIds: null,
-    
-    /**
-     * APIProperty: dimensions
-     * {Array} For RESTful request encoding, extra dimensions may be specified.
-     *     Items in this list should be property names in the <params> object.
-     *     Values of extra dimensions will be determined from the corresponding
-     *     values in the <params> object.
-     */
-    dimensions: null,
-    
-    /**
-     * APIProperty: params
-     * {Object} Extra parameters to include in tile requests.  For KVP 
-     *     <requestEncoding>, these properties will be encoded in the request 
-     *     query string.  For REST <requestEncoding>, these properties will
-     *     become part of the request path, with order determined by the 
-     *     <dimensions> list.
-     */
-    params: null,
-    
-    /**
-     * APIProperty: zoomOffset
-     * {Number} If your cache has more levels than you want to provide
-     *     access to with this layer, supply a zoomOffset.  This zoom offset
-     *     is added to the current map zoom level to determine the level
-     *     for a requested tile.  For example, if you supply a zoomOffset
-     *     of 3, when the map is at the zoom 0, tiles will be requested from
-     *     level 3 of your cache.  Default is 0 (assumes cache level and map
-     *     zoom are equivalent).  Additionally, if this layer is to be used
-     *     as an overlay and the cache has fewer zoom levels than the base
-     *     layer, you can supply a negative zoomOffset.  For example, if a
-     *     map zoom level of 1 corresponds to your cache level zero, you would
-     *     supply a -1 zoomOffset (and set the maxResolution of the layer
-     *     appropriately).  The zoomOffset value has no effect if complete
-     *     matrix definitions (including scaleDenominator) are supplied in
-     *     the <matrixIds> property.  Defaults to 0 (no zoom offset).
-     */
-    zoomOffset: 0,
-    
-    /**
-     * Property: formatSuffixMap
-     * {Object} a map between WMTS 'format' request parameter and tile image file suffix
-     */
-    formatSuffixMap: {
-        "image/png": "png",
-        "image/png8": "png",
-        "image/png24": "png",
-        "image/png32": "png",
-        "png": "png",
-        "image/jpeg": "jpg",
-        "image/jpg": "jpg",
-        "jpeg": "jpg",
-        "jpg": "jpg"
-    },
-    
-    /**
-     * Property: matrix
-     * {Object} Matrix definition for the current map resolution.  Updated by
-     *     the <updateMatrixProperties> method.
-     */
-    matrix: null,
-    
-    /**
-     * Constructor: OpenLayers.Layer.WMTS
-     * Create a new WMTS layer.
-     *
-     * Example:
-     * (code)
-     * var wmts = new OpenLayers.Layer.WMTS({
-     *     name: "My WMTS Layer",
-     *     url: "http://example.com/wmts", 
-     *     layer: "layer_id",
-     *     style: "default",
-     *     matrixSet: "matrix_id"
-     * });
-     * (end)
-     *
-     * Parameters:
-     * config - {Object} Configuration properties for the layer.
-     *
-     * Required configuration properties:
-     * url - {String} The base url for the service.  See the <url> property.
-     * layer - {String} The layer identifier.  See the <layer> property.
-     * style - {String} The layer style identifier.  See the <style> property.
-     * matrixSet - {String} The tile matrix set identifier.  See the <matrixSet>
-     *     property.
-     *
-     * Any other documented layer properties can be provided in the config object.
-     */
-    initialize: function(config) {
-
-        // confirm required properties are supplied
-        var required = {
-            url: true,
-            layer: true,
-            style: true,
-            matrixSet: true
-        };
-        for (var prop in required) {
-            if (!(prop in config)) {
-                throw new Error("Missing property '" + prop + "' in layer configuration.");
-            }
-        }
-
-        config.params = OpenLayers.Util.upperCaseObject(config.params);
-        var args = [config.name, config.url, config.params, config];
-        OpenLayers.Layer.Grid.prototype.initialize.apply(this, args);
-        
-
-        // determine format suffix (for REST)
-        if (!this.formatSuffix) {
-            this.formatSuffix = this.formatSuffixMap[this.format] || this.format.split("/").pop();            
-        }
-
-        // expand matrixIds (may be array of string or array of object)
-        if (this.matrixIds) {
-            var len = this.matrixIds.length;
-            if (len && typeof this.matrixIds[0] === "string") {
-                var ids = this.matrixIds;
-                this.matrixIds = new Array(len);
-                for (var i=0; i<len; ++i) {
-                    this.matrixIds[i] = {identifier: ids[i]};
-                }
-            }
-        }
-
-    },
-    
-    /**
-     * Method: setMap
-     */
-    setMap: function() {
-        OpenLayers.Layer.Grid.prototype.setMap.apply(this, arguments);
-        this.updateMatrixProperties();
-    },
-    
-    /**
-     * Method: updateMatrixProperties
-     * Called when map resolution changes to update matrix related properties.
-     */
-    updateMatrixProperties: function() {
-        this.matrix = this.getMatrix();
-        if (this.matrix) {
-            if (this.matrix.topLeftCorner) {
-                this.tileOrigin = this.matrix.topLeftCorner;
-            }
-            if (this.matrix.tileWidth && this.matrix.tileHeight) {
-                this.tileSize = new OpenLayers.Size(
-                    this.matrix.tileWidth, this.matrix.tileHeight
-                );
-            }
-            if (!this.tileOrigin) { 
-                this.tileOrigin = new OpenLayers.LonLat(
-                    this.maxExtent.left, this.maxExtent.top
-                );
-            }   
-            if (!this.tileFullExtent) { 
-                this.tileFullExtent = this.maxExtent;
-            }
-        }
-    },
-    
-    /**
-     * Method: moveTo
-     * 
-     * Parameters:
-     * bound - {<OpenLayers.Bounds>}
-     * zoomChanged - {Boolean} Tells when zoom has changed, as layers have to
-     *     do some init work in that case.
-     * dragging - {Boolean}
-     */
-    moveTo:function(bounds, zoomChanged, dragging) {
-        if (zoomChanged || !this.matrix) {
-            this.updateMatrixProperties();
-        }
-        return OpenLayers.Layer.Grid.prototype.moveTo.apply(this, arguments);
-    },
-
-    /**
-     * APIMethod: clone
-     * 
-     * Parameters:
-     * obj - {Object}
-     * 
-     * Returns:
-     * {<OpenLayers.Layer.WMTS>} An exact clone of this <OpenLayers.Layer.WMTS>
-     */
-    clone: function(obj) {
-        if (obj == null) {
-            obj = new OpenLayers.Layer.WMTS(this.options);
-        }
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);
-        // copy/set any non-init, non-simple values here
-        return obj;
-    },
-    
-    /**
-     * Method: getMatrix
-     * Get the appropriate matrix definition for the current map resolution.
-     */
-    getMatrix: function() {
-        var matrix;
-        if (!this.matrixIds || this.matrixIds.length === 0) {
-            matrix = {identifier: this.map.getZoom() + this.zoomOffset};
-        } else {
-            // get appropriate matrix given the map scale if possible
-            if ("scaleDenominator" in this.matrixIds[0]) {
-                // scale denominator calculation based on WMTS spec
-                var denom = 
-                    OpenLayers.METERS_PER_INCH * 
-                    OpenLayers.INCHES_PER_UNIT[this.units] * 
-                    this.map.getResolution() / 0.28E-3;
-                var diff = Number.POSITIVE_INFINITY;
-                var delta;
-                for (var i=0, ii=this.matrixIds.length; i<ii; ++i) {
-                    delta = Math.abs(1 - (this.matrixIds[i].scaleDenominator / denom));
-                    if (delta < diff) {
-                        diff = delta;
-                        matrix = this.matrixIds[i];
-                    }
-                }
-            } else {
-                // fall back on zoom as index
-                matrix = this.matrixIds[this.map.getZoom() + this.zoomOffset];
-            }
-        }
-        return matrix;
-    },
-    
-    /** 
-     * Method: getTileInfo
-     * Get tile information for a given location at the current map resolution.
-     *
-     * Parameters:
-     * loc - {<OpenLayers.LonLat} A location in map coordinates.
-     *
-     * Returns:
-     * {Object} An object with "col", "row", "i", and "j" properties.  The col
-     *     and row values are zero based tile indexes from the top left.  The
-     *     i and j values are the number of pixels to the left and top 
-     *     (respectively) of the given location within the target tile.
-     */
-    getTileInfo: function(loc) {
-        var res = this.map.getResolution();
-        
-        var fx = (loc.lon - this.tileOrigin.lon) / (res * this.tileSize.w);
-        var fy = (this.tileOrigin.lat - loc.lat) / (res * this.tileSize.h);
-
-        var col = Math.floor(fx);
-        var row = Math.floor(fy);
-        
-        return {
-            col: col, 
-            row: row,
-            i: Math.floor((fx - col) * this.tileSize.w),
-            j: Math.floor((fy - row) * this.tileSize.h)
-        };
-    },
-    
-    /**
-     * Method: getURL
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * 
-     * Returns:
-     * {String} A URL for the tile corresponding to the given bounds.
-     */
-    getURL: function(bounds) {
-        bounds = this.adjustBounds(bounds);
-        var url = "";
-        if (!this.tileFullExtent || this.tileFullExtent.intersectsBounds(bounds)) {            
-
-            var center = bounds.getCenterLonLat();            
-            var info = this.getTileInfo(center);
-            var matrixId = this.matrix.identifier;
-
-            if (this.requestEncoding.toUpperCase() === "REST") {
-
-                // include 'version', 'layer' and 'style' in tile resource url
-                var path = this.version + "/" + this.layer + "/" + this.style + "/";
-
-                // append optional dimension path elements
-                if (this.dimensions) {
-                    for (var i=0; i<this.dimensions.length; i++) {
-                        if (this.params[this.dimensions[i]]) {
-                            path = path + this.params[this.dimensions[i]] + "/";
-                        }
-                    }
-                }
-
-                // append other required path elements
-                path = path + this.matrixSet + "/" + this.matrix.identifier + 
-                    "/" + info.row + "/" + info.col + "." + this.formatSuffix;
-                
-                if (this.url instanceof Array) {
-                    url = this.selectUrl(path, this.url);
-                } else {
-                    url = this.url;
-                }
-                if (!url.match(/\/$/)) {
-                    url = url + "/";
-                }
-                url = url + path;
-
-            } else if (this.requestEncoding.toUpperCase() === "KVP") {
-
-                // assemble all required parameters
-                var params = {
-                    SERVICE: "WMTS",
-                    REQUEST: "GetTile",
-                    VERSION: this.version,
-                    LAYER: this.layer,
-                    STYLE: this.style,
-                    TILEMATRIXSET: this.matrixSet,
-                    TILEMATRIX: this.matrix.identifier,
-                    TILEROW: info.row,
-                    TILECOL: info.col,
-                    FORMAT: this.format
-                };
-                url = OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this, [params]);
-
-            }
-        }
-        return url;    
-    },
-    
-    /**
-     * APIMethod: mergeNewParams
-     * Extend the existing layer <params> with new properties.  Tiles will be
-     *     reloaded with updated params in the request.
-     * 
-     * Parameters:
-     * newParams - {Object} Properties to extend to existing <params>.
-     */
-    mergeNewParams: function(newParams) {
-        if (this.requestEncoding.toUpperCase() === "KVP") {
-            return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(
-                this, [OpenLayers.Util.upperCaseObject(newParams)]
-            );
-        }
-    },
-
-    /**
-     * Method: addTile
-     * Create a tile, initialize it, and add it to the layer div. 
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile: function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                         null, this.tileSize);
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.WMTS"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/WorldWind.js
+++ /dev/null
@@ -1,121 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer/Grid.js
- */
-
-/**
- * Class: OpenLayers.Layer.WorldWind
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.Grid>
- */
-OpenLayers.Layer.WorldWind = OpenLayers.Class(OpenLayers.Layer.Grid, {
-    
-    DEFAULT_PARAMS: {
-    },
-
-    /**
-     * APIProperty: isBaseLayer
-     * WorldWind layer is a base layer by default.
-     */
-    isBaseLayer: true,    
-
-    
-    /** 
-     * APIProperty: lzd
-     * LevelZeroTileSizeDegrees
-     */
-    lzd: null,
-
-    /**
-     * APIProperty: zoomLevels
-     * Number of zoom levels.
-     */
-    zoomLevels: null,
-    
-    /**
-     * Constructor: OpenLayers.Layer.WorldWind
-     * 
-     * Parameters:
-     * name - {String} Name of Layer
-     * url - {String} Base URL  
-     * lzd - {Float} Level zero tile size degrees 
-     * zoomLevels - {Int} number of zoom levels
-     * params - {Object} additional parameters
-     * options - {Object} additional options
-     */
-    initialize: function(name, url, lzd, zoomLevels, params, options) {
-        this.lzd = lzd;
-        this.zoomLevels = zoomLevels;
-        var newArguments = [];
-        newArguments.push(name, url, params, options);
-        OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
-        this.params = OpenLayers.Util.applyDefaults(
-            this.params, this.DEFAULT_PARAMS
-        );
-    },
-    /**
-     * Method: addTile
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                             null, this.tileSize);
-    },
-
-    /**
-     * Method: getZoom
-     * Convert map zoom to WW zoom.
-     */
-    getZoom: function () {
-        var zoom = this.map.getZoom();
-        var extent = this.map.getMaxExtent();
-        zoom = zoom - Math.log(this.maxResolution / (this.lzd/512))/Math.log(2);
-        return zoom;
-    },
-
-    /**
-     * Method: getURL
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} 
-     *
-     * Returns:
-     * {String} A string with the layer's url and parameters and also the 
-     *           passed-in bounds and appropriate tile size specified as 
-     *           parameters
-     */
-    getURL: function (bounds) {
-        bounds = this.adjustBounds(bounds);
-        var zoom = this.getZoom();
-        var extent = this.map.getMaxExtent();
-        var deg = this.lzd/Math.pow(2,this.getZoom());
-        var x = Math.floor((bounds.left - extent.left)/deg);
-        var y = Math.floor((bounds.bottom - extent.bottom)/deg);
-        if (this.map.getResolution() <= (this.lzd/512)
-            && this.getZoom() <= this.zoomLevels) {
-            return this.getFullRequestString(
-              { L: zoom, 
-                X: x,
-                Y: y
-              });
-        } else {
-            return OpenLayers.Util.getImagesLocation() + "blank.gif";
-        }
-
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.WorldWind"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/XYZ.js
+++ /dev/null
@@ -1,197 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Layer/Grid.js
- * @requires OpenLayers/Tile/Image.js
- */
-
-/** 
- * Class: OpenLayers.Layer.XYZ
- * The XYZ class is designed to make it easier for people who have tiles
- * arranged by a standard XYZ grid. 
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.Grid>
- */
-OpenLayers.Layer.XYZ = OpenLayers.Class(OpenLayers.Layer.Grid, {
-    
-    /**
-     * APIProperty: isBaseLayer
-     * Default is true, as this is designed to be a base tile source. 
-     */
-    isBaseLayer: true,
-    
-    /**
-     * APIProperty: sphericalMecator
-     * Whether the tile extents should be set to the defaults for 
-     *    spherical mercator. Useful for things like OpenStreetMap.
-     *    Default is false, except for the OSM subclass.
-     */
-    sphericalMercator: false,
-
-    /**
-     * APIProperty: zoomOffset
-     * {Number} If your cache has more zoom levels than you want to provide
-     *     access to with this layer, supply a zoomOffset.  This zoom offset
-     *     is added to the current map zoom level to determine the level
-     *     for a requested tile.  For example, if you supply a zoomOffset
-     *     of 3, when the map is at the zoom 0, tiles will be requested from
-     *     level 3 of your cache.  Default is 0 (assumes cache level and map
-     *     zoom are equivalent).
-     */
-    zoomOffset: 0,
-    
-    /**
-     * Constructor: OpenLayers.Layer.XYZ
-     *
-     * Parameters:
-     * name - {String}
-     * url - {String}
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, url, options) {
-        if (options && options.sphericalMercator || this.sphericalMercator) {
-            options = OpenLayers.Util.extend({
-                maxExtent: new OpenLayers.Bounds(
-                    -128 * 156543.0339,
-                    -128 * 156543.0339,
-                    128 * 156543.0339,
-                    128 * 156543.0339
-                ),
-                maxResolution: 156543.0339,
-                numZoomLevels: 19,
-                units: "m",
-                projection: "EPSG:900913"
-            }, options);
-        }
-        url = url || this.url;
-        name = name || this.name;
-        var newArguments = [name, url, {}, options];
-        OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
-    },
-    
-    /**
-     * APIMethod: clone
-     * Create a clone of this layer
-     *
-     * Parameters:
-     * obj - {Object} Is this ever used?
-     * 
-     * Returns:
-     * {<OpenLayers.Layer.XYZ>} An exact clone of this OpenLayers.Layer.XYZ
-     */
-    clone: function (obj) {
-        
-        if (obj == null) {
-            obj = new OpenLayers.Layer.XYZ(this.name,
-                                            this.url,
-                                            this.getOptions());
-        }
-
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);
-
-        return obj;
-    },    
-
-    /**
-     * Method: getUrl
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     *
-     * Returns:
-     * {String} A string with the layer's url and parameters and also the
-     *          passed-in bounds and appropriate tile size specified as
-     *          parameters
-     */
-    getURL: function (bounds) {
-        var res = this.map.getResolution();
-        var x = Math.round((bounds.left - this.maxExtent.left) 
-            / (res * this.tileSize.w));
-        var y = Math.round((this.maxExtent.top - bounds.top) 
-            / (res * this.tileSize.h));
-        var z = this.map.getZoom() + this.zoomOffset;
-
-        var url = this.url;
-        var s = '' + x + y + z;
-        if (url instanceof Array)
-        {
-            url = this.selectUrl(s, url);
-        }
-        
-        var path = OpenLayers.String.format(url, {'x': x, 'y': y, 'z': z});
-
-        return path;
-    },
-    
-    /**
-     * Method: addTile
-     * addTile creates a tile, initializes it, and adds it to the layer div. 
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                         null, this.tileSize);
-    },
-     
-    /* APIMethod: setMap
-     * When the layer is added to a map, then we can fetch our origin 
-     *    (if we don't have one.) 
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>}
-     */
-    setMap: function(map) {
-        OpenLayers.Layer.Grid.prototype.setMap.apply(this, arguments);
-        if (!this.tileOrigin) { 
-            this.tileOrigin = new OpenLayers.LonLat(this.maxExtent.left,
-                                                this.maxExtent.bottom);
-        }                                       
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.XYZ"
-});
-
-
-/**
- * Class: OpenLayers.Layer.OSM
- * A class to access OpenStreetMap tiles. By default, uses the OpenStreetMap
- *    hosted tile.openstreetmap.org 'Mapnik' tileset. If you wish to use
- *    tiles@home / osmarender layer instead, you can pass a layer like:
- * 
- * (code)
- *     new OpenLayers.Layer.OSM("t@h", 
- *       "http://tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png"); 
- * (end)
- *
- * This layer defaults to Spherical Mercator.
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.XYZ>
- */
-OpenLayers.Layer.OSM = OpenLayers.Class(OpenLayers.Layer.XYZ, {
-     name: "OpenStreetMap",
-     attribution: "Data CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>",
-     sphericalMercator: true,
-     url: 'http://tile.openstreetmap.org/${z}/${x}/${y}.png',
-     clone: function(obj) {
-         if (obj == null) {
-             obj = new OpenLayers.Layer.OSM(
-                 this.name, this.url, this.getOptions());
-         }
-         obj = OpenLayers.Layer.XYZ.prototype.clone.apply(this, [obj]);
-         return obj;
-     },
-     CLASS_NAME: "OpenLayers.Layer.OSM"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/Yahoo.js
+++ /dev/null
@@ -1,431 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Layer/SphericalMercator.js
- * @requires OpenLayers/Layer/EventPane.js
- * @requires OpenLayers/Layer/FixedZoomLevels.js
- */
-
-/**
- * Class: OpenLayers.Layer.Yahoo
- * 
- * Inherits from:
- *  - <OpenLayers.Layer.EventPane>
- *  - <OpenLayers.Layer.FixedZoomLevels>
- */
-OpenLayers.Layer.Yahoo = OpenLayers.Class(
-  OpenLayers.Layer.EventPane, OpenLayers.Layer.FixedZoomLevels, {
-    
-    /** 
-     * Constant: MIN_ZOOM_LEVEL
-     * {Integer} 0 
-     */
-    MIN_ZOOM_LEVEL: 0,
-    
-    /** 
-     * Constant: MAX_ZOOM_LEVEL
-     * {Integer} 17
-     */
-    MAX_ZOOM_LEVEL: 17,
-
-    /** 
-     * Constant: RESOLUTIONS
-     * {Array(Float)} Hardcode these resolutions so that they are more closely
-     *                tied with the standard wms projection
-     */
-    RESOLUTIONS: [
-        1.40625, 
-        0.703125, 
-        0.3515625, 
-        0.17578125, 
-        0.087890625, 
-        0.0439453125,
-        0.02197265625, 
-        0.010986328125, 
-        0.0054931640625, 
-        0.00274658203125, 
-        0.001373291015625, 
-        0.0006866455078125, 
-        0.00034332275390625, 
-        0.000171661376953125, 
-        0.0000858306884765625, 
-        0.00004291534423828125,
-        0.00002145767211914062,
-        0.00001072883605957031
-    ],
-
-    /**
-     * APIProperty: type
-     * {YahooMapType}
-     */
-    type: null,
-    
-    /**
-     * APIProperty: wrapDateLine
-     * {Boolean} Allow user to pan forever east/west.  Default is true.  
-     *     Setting this to false only restricts panning if 
-     *     <sphericalMercator> is true. 
-     */
-    wrapDateLine: true,
-
-    /**
-     * APIProperty: sphericalMercator
-     * {Boolean} Should the map act as a mercator-projected map? This will
-     * cause all interactions with the map to be in the actual map projection,
-     * which allows support for vector drawing, overlaying other maps, etc. 
-     */
-    sphericalMercator: false, 
-
-    /** 
-     * Constructor: OpenLayers.Layer.Yahoo
-     * 
-     * Parameters:
-     * name - {String}
-     * options - {Object}
-     */
-    initialize: function(name, options) {
-        OpenLayers.Layer.EventPane.prototype.initialize.apply(this, arguments);
-        OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this, 
-                                                                    arguments);
-        if(this.sphericalMercator) {
-            OpenLayers.Util.extend(this, OpenLayers.Layer.SphericalMercator);
-            this.initMercatorParameters();
-        }
-    },
-    
-    /**
-     * Method: loadMapObject
-     */
-    loadMapObject:function() {
-        try { //do not crash! 
-            var size = this.getMapObjectSizeFromOLSize(this.map.getSize());
-            this.mapObject = new YMap(this.div, this.type, size);
-            this.mapObject.disableKeyControls();
-            this.mapObject.disableDragMap();
-
-            //can we do smooth panning? (moveByXY is not an API function)
-            if ( !this.mapObject.moveByXY || 
-                 (typeof this.mapObject.moveByXY != "function" ) ) {
-
-                this.dragPanMapObject = null;
-            }                
-        } catch(e) {}
-    },
-
-    /**
-     * Method: onMapResize
-     * 
-     */
-    onMapResize: function() {
-        try {
-            var size = this.getMapObjectSizeFromOLSize(this.map.getSize());
-            this.mapObject.resizeTo(size);
-        } catch(e) {}     
-    },    
-    
-    
-    /** 
-     * APIMethod: setMap
-     * Overridden from EventPane because we need to remove this yahoo event
-     *     pane which prohibits our drag and drop, and we can only do this 
-     *     once the map has been loaded and centered.
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>}
-     */
-    setMap: function(map) {
-        OpenLayers.Layer.EventPane.prototype.setMap.apply(this, arguments);
-
-        this.map.events.register("moveend", this, this.fixYahooEventPane);
-    },
-
-    /** 
-     * Method: fixYahooEventPane
-     * The map has been centered, so the mysterious yahoo eventpane has been
-     *     added. we remove it so that it doesnt mess with *our* event pane.
-     */
-    fixYahooEventPane: function() {
-        var yahooEventPane = OpenLayers.Util.getElement("ygddfdiv");
-        if (yahooEventPane != null) {
-            if (yahooEventPane.parentNode != null) {
-                yahooEventPane.parentNode.removeChild(yahooEventPane);
-            }
-            this.map.events.unregister("moveend", this, 
-                                       this.fixYahooEventPane);
-        }
-    },
-
-    /** 
-     * APIMethod: getWarningHTML
-     * 
-     * Returns: 
-     * {String} String with information on why layer is broken, how to get
-     *          it working.
-     */
-    getWarningHTML:function() {
-        return OpenLayers.i18n(
-            "getLayerWarning", {'layerType':'Yahoo', 'layerLib':'Yahoo'}
-        );
-    },
-
-  /********************************************************/
-  /*                                                      */
-  /*             Translation Functions                    */
-  /*                                                      */
-  /*    The following functions translate GMaps and OL    */ 
-  /*     formats for Pixel, LonLat, Bounds, and Zoom      */
-  /*                                                      */
-  /********************************************************/
-
-
-  //
-  // TRANSLATION: MapObject Zoom <-> OpenLayers Zoom
-  //
-  
-    /**
-     * APIMethod: getOLZoomFromMapObjectZoom
-     * 
-     * Parameters:
-     * gZoom - {Integer}
-     * 
-     * Returns:
-     * {Integer} An OpenLayers Zoom level, translated from the passed in gZoom
-     *           Returns null if null value is passed in.
-     */
-    getOLZoomFromMapObjectZoom: function(moZoom) {
-        var zoom = null;
-        if (moZoom != null) {
-            zoom = OpenLayers.Layer.FixedZoomLevels.prototype.getOLZoomFromMapObjectZoom.apply(this, [moZoom]);
-            zoom = 18 - zoom;
-        }
-        return zoom;
-    },
-    
-    /**
-     * APIMethod: getMapObjectZoomFromOLZoom
-     * 
-     * Parameters:
-     * olZoom - {Integer}
-     * 
-     * Returns:
-     * {Integer} A MapObject level, translated from the passed in olZoom
-     *           Returns null if null value is passed in
-     */
-    getMapObjectZoomFromOLZoom: function(olZoom) {
-        var zoom = null; 
-        if (olZoom != null) {
-            zoom = OpenLayers.Layer.FixedZoomLevels.prototype.getMapObjectZoomFromOLZoom.apply(this, [olZoom]);
-            zoom = 18 - zoom;
-        }
-        return zoom;
-    },
-
-    /************************************
-     *                                  *
-     *   MapObject Interface Controls   *
-     *                                  *
-     ************************************/
-
-
-  // Get&Set Center, Zoom
-
-    /** 
-     * APIMethod: setMapObjectCenter
-     * Set the mapObject to the specified center and zoom
-     * 
-     * Parameters:
-     * center - {Object} MapObject LonLat format
-     * zoom - {int} MapObject zoom format
-     */
-    setMapObjectCenter: function(center, zoom) {
-        this.mapObject.drawZoomAndCenter(center, zoom); 
-    },
-   
-    /**
-     * APIMethod: getMapObjectCenter
-     * 
-     * Returns: 
-     * {Object} The mapObject's current center in Map Object format
-     */
-    getMapObjectCenter: function() {
-        return this.mapObject.getCenterLatLon();
-    },
-
-    /**
-     * APIMethod: dragPanMapObject
-     * 
-     * Parameters:
-     * dX - {Integer}
-     * dY - {Integer}
-     */
-    dragPanMapObject: function(dX, dY) {
-        this.mapObject.moveByXY({
-            'x': -dX,
-            'y': dY
-        });
-    },
-    
-    /** 
-     * APIMethod: getMapObjectZoom
-     * 
-     * Returns:
-     * {Integer} The mapObject's current zoom, in Map Object format
-     */
-    getMapObjectZoom: function() {
-        return this.mapObject.getZoomLevel();
-    },
-
-
-  // LonLat - Pixel Translation
-  
-    /**
-     * APIMethod: getMapObjectLonLatFromMapObjectPixel
-     * 
-     * Parameters:
-     * moPixel - {Object} MapObject Pixel format
-     * 
-     * Returns:
-     * {Object} MapObject LonLat translated from MapObject Pixel
-     */
-    getMapObjectLonLatFromMapObjectPixel: function(moPixel) {
-        return this.mapObject.convertXYLatLon(moPixel);
-    },
-
-    /**
-     * APIMethod: getMapObjectPixelFromMapObjectLonLat
-     * 
-     * Parameters:
-     * moLonLat - {Object} MapObject LonLat format
-     * 
-     * Returns:
-     * {Object} MapObject Pixel transtlated from MapObject LonLat
-     */
-    getMapObjectPixelFromMapObjectLonLat: function(moLonLat) {
-        return this.mapObject.convertLatLonXY(moLonLat);
-    },
-
-
-    /************************************
-     *                                  *
-     *       MapObject Primitives       *
-     *                                  *
-     ************************************/
-
-
-  // LonLat
-    
-    /**
-     * APIMethod: getLongitudeFromMapObjectLonLat
-     * 
-     * Parameters:
-     * moLonLat - {Object} MapObject LonLat format
-     * 
-     * Returns:
-     * {Float} Longitude of the given MapObject LonLat
-     */
-    getLongitudeFromMapObjectLonLat: function(moLonLat) {
-        return this.sphericalMercator ? 
-            this.forwardMercator(moLonLat.Lon, moLonLat.Lat).lon :
-            moLonLat.Lon;
-    },
-
-    /**
-     * APIMethod: getLatitudeFromMapObjectLonLat
-     * 
-     * Parameters:
-     * moLonLat - {Object} MapObject LonLat format
-     * 
-     * Returns:
-     * {Float} Latitude of the given MapObject LonLat
-     */
-    getLatitudeFromMapObjectLonLat: function(moLonLat) {
-        return this.sphericalMercator ? 
-            this.forwardMercator(moLonLat.Lon, moLonLat.Lat).lat :
-            moLonLat.Lat;
-    },
-
-    /**
-     * APIMethod: getMapObjectLonLatFromLonLat
-     * 
-     * Parameters:
-     * lon - {Float}
-     * lat - {Float}
-     * 
-     * Returns:
-     * {Object} MapObject LonLat built from lon and lat params
-     */
-    getMapObjectLonLatFromLonLat: function(lon, lat) {
-        var yLatLong;
-        if(this.sphericalMercator) {
-            var lonlat = this.inverseMercator(lon, lat);
-            yLatLong = new YGeoPoint(lonlat.lat, lonlat.lon);
-        } else {
-            yLatLong = new YGeoPoint(lat, lon);
-        }
-        return yLatLong;
-    },
-
-  // Pixel
-    
-    /**
-     * APIMethod: getXFromMapObjectPixel
-     * 
-     * Parameters:
-     * moPixel - {Object} MapObject Pixel format
-     * 
-     * Returns:
-     * {Integer} X value of the MapObject Pixel
-     */
-    getXFromMapObjectPixel: function(moPixel) {
-        return moPixel.x;
-    },
-
-    /**
-     * APIMethod: getYFromMapObjectPixel
-     * 
-     * Parameters:
-     * moPixel - {Object} MapObject Pixel format
-     * 
-     * Returns:
-     * {Integer} Y value of the MapObject Pixel
-     */
-    getYFromMapObjectPixel: function(moPixel) {
-        return moPixel.y;
-    },
-
-    /**
-     * APIMethod: getMapObjectPixelFromXY
-     * 
-     * Parameters:
-     * x - {Integer}
-     * y - {Integer}
-     * 
-     * Returns:
-     * {Object} MapObject Pixel from x and y parameters
-     */
-    getMapObjectPixelFromXY: function(x, y) {
-        return new YCoordPoint(x, y);
-    },
-    
-  // Size
-  
-    /**
-     * APIMethod: getMapObjectSizeFromOLSize
-     * 
-     * Parameters:
-     * olSize - {<OpenLayers.Size>}
-     * 
-     * Returns:
-     * {Object} MapObject Size from olSize parameter
-     */
-    getMapObjectSizeFromOLSize: function(olSize) {
-        return new YSize(olSize.w, olSize.h);
-    },
-    
-    CLASS_NAME: "OpenLayers.Layer.Yahoo"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Layer/Zoomify.js
+++ /dev/null
@@ -1,309 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/*
- * Development supported by a R&D grant DC08P02OUK006 - Old Maps Online
- * (www.oldmapsonline.org) from Ministry of Culture of the Czech Republic.
- */
-
-
-/**
- * @requires OpenLayers/Layer/Grid.js
- */
-
-/**
- * Class: OpenLayers.Layer.Zoomify
- *
- * Inherits from:
- *  - <OpenLayers.Layer.Grid>
- */
-OpenLayers.Layer.Zoomify = OpenLayers.Class(OpenLayers.Layer.Grid, {
-
-    /**
-     * Property: url
-     * {String} URL for root directory with TileGroupX subdirectories.
-     */
-    url: null,
-
-    /**
-     * Property: size
-     * {<OpenLayers.Size>} The Zoomify image size in pixels.
-     */
-    size: null,
-
-    /**
-     * APIProperty: isBaseLayer
-     * {Boolean}
-     */
-    isBaseLayer: true,
-
-    /**
-     * Property: standardTileSize
-     * {Integer} The size of a standard (non-border) square tile in pixels.
-     */
-    standardTileSize: 256,
-
-    /**
-     * Property: numberOfTiers
-     * {Integer} Depth of the Zoomify pyramid, number of tiers (zoom levels)
-     *                          - filled during Zoomify pyramid initialization.
-     */
-    numberOfTiers: 0,
-
-    /**
-     * Property: tileCountUpToTier
-     * {Array(Integer)} Number of tiles up to the given tier of pyramid.
-     *                          - filled during Zoomify pyramid initialization.
-     */
-    tileCountUpToTier: new Array(),
-
-    /**
-     * Property: tierSizeInTiles
-     * {Array(<OpenLayers.Size>)} Size (in tiles) for each tier of pyramid.
-     *                          - filled during Zoomify pyramid initialization.
-     */
-    tierSizeInTiles: new Array(),
-
-    /**
-     * Property: tierImageSize
-     * {Array(<OpenLayers.Size>)} Image size in pixels for each pyramid tier.
-     *                          - filled during Zoomify pyramid initialization.
-     */
-    tierImageSize: new Array(),
-
-    /**
-     * Constructor: OpenLayers.Layer.Zoomify
-     *
-     * Parameters:
-     * name - {String} A name for the layer.
-     * url - {String} - Relative or absolute path to the image or more
-     *        precisly to the TileGroup[X] directories root.
-     *        Flash plugin use the variable name "zoomifyImagePath" for this.
-     * size - {<OpenLayers.Size>} The size (in pixels) of the image.
-     * options - {Object} Hashtable of extra options to tag onto the layer
-     */
-    initialize: function(name, url, size, options) {
-
-        // initilize the Zoomify pyramid for given size
-        this.initializeZoomify( size );
-
-        var newArguments = [];
-        newArguments.push(name, url, size, {}, options);
-
-        OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
-    },
-
-    /**
-     * Method: initializeZoomify
-     * It generates constants for all tiers of the Zoomify pyramid
-     *
-     * Parameters:
-     * size - {<OpenLayers.Size>} The size of the image in pixels
-     *
-     */
-    initializeZoomify: function( size ) {
-
-        var imageSize = size.clone()
-        var tiles = new OpenLayers.Size(
-            Math.ceil( imageSize.w / this.standardTileSize ),
-            Math.ceil( imageSize.h / this.standardTileSize )
-            );
-
-        this.tierSizeInTiles.push( tiles );
-        this.tierImageSize.push( imageSize );
-
-        while (imageSize.w > this.standardTileSize ||
-               imageSize.h > this.standardTileSize ) {
-
-            imageSize = new OpenLayers.Size(
-                Math.floor( imageSize.w / 2 ),
-                Math.floor( imageSize.h / 2 )
-                );
-            tiles = new OpenLayers.Size(
-                Math.ceil( imageSize.w / this.standardTileSize ),
-                Math.ceil( imageSize.h / this.standardTileSize )
-                );
-            this.tierSizeInTiles.push( tiles );
-            this.tierImageSize.push( imageSize );
-        }
-
-        this.tierSizeInTiles.reverse();
-        this.tierImageSize.reverse();
-
-        this.numberOfTiers = this.tierSizeInTiles.length;
-
-        this.tileCountUpToTier[0] = 0;
-        for (var i = 1; i < this.numberOfTiers; i++) {
-            this.tileCountUpToTier.push(
-                this.tierSizeInTiles[i-1].w * this.tierSizeInTiles[i-1].h +
-                this.tileCountUpToTier[i-1]
-                );
-        }
-    },
-
-    /**
-     * APIMethod:destroy
-     */
-    destroy: function() {
-        // for now, nothing special to do here.
-        OpenLayers.Layer.Grid.prototype.destroy.apply(this, arguments);
-
-        // Remove from memory the Zoomify pyramid - is that enough?
-        this.tileCountUpToTier.length = 0
-        this.tierSizeInTiles.length = 0
-        this.tierImageSize.length = 0
-
-    },
-
-    /**
-     * APIMethod: clone
-     *
-     * Parameters:
-     * obj - {Object}
-     *
-     * Returns:
-     * {<OpenLayers.Layer.Zoomify>} An exact clone of this <OpenLayers.Layer.Zoomify>
-     */
-    clone: function (obj) {
-
-        if (obj == null) {
-            obj = new OpenLayers.Layer.Zoomify(this.name,
-                                           this.url,
-                                           this.size,
-                                           this.options);
-        }
-
-        //get all additions from superclasses
-        obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);
-
-        // copy/set any non-init, non-simple values here
-
-        return obj;
-    },
-
-    /**
-     * Method: getURL
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     *
-     * Returns:
-     * {String} A string with the layer's url and parameters and also the
-     *          passed-in bounds and appropriate tile size specified as
-     *          parameters
-     */
-    getURL: function (bounds) {
-        bounds = this.adjustBounds(bounds);
-        var res = this.map.getResolution();
-        var x = Math.round((bounds.left - this.tileOrigin.lon) / (res * this.tileSize.w));
-        var y = Math.round((this.tileOrigin.lat - bounds.top) / (res * this.tileSize.h));
-        var z = this.map.getZoom();
-
-        var tileIndex = x + y * this.tierSizeInTiles[z].w + this.tileCountUpToTier[z];
-        var path = "TileGroup" + Math.floor( (tileIndex) / 256 ) +
-            "/" + z + "-" + x + "-" + y + ".jpg";
-        var url = this.url;
-        if (url instanceof Array) {
-            url = this.selectUrl(path, url);
-        }
-        return url + path;
-    },
-
-    /**
-     * Method: getImageSize
-     * getImageSize returns size for a particular tile. If bounds are given as
-     * first argument, size is calculated (bottom-right tiles are non square).
-     *
-     */
-    getImageSize: function() {
-        if (arguments.length > 0) {
-            bounds = this.adjustBounds(arguments[0]);
-            var res = this.map.getResolution();
-            var x = Math.round((bounds.left - this.tileOrigin.lon) / (res * this.tileSize.w));
-            var y = Math.round((this.tileOrigin.lat - bounds.top) / (res * this.tileSize.h));
-            var z = this.map.getZoom();
-            var w = this.standardTileSize;
-            var h = this.standardTileSize;
-            if (x == this.tierSizeInTiles[z].w -1 ) {
-                var w = this.tierImageSize[z].w % this.standardTileSize;
-            };
-            if (y == this.tierSizeInTiles[z].h -1 ) {
-                var h = this.tierImageSize[z].h % this.standardTileSize;
-            };
-            return (new OpenLayers.Size(w, h));
-        } else {
-            return this.tileSize;
-        }
-    },
-
-    /**
-     * Method: addTile
-     * addTile creates a tile, initializes it, and adds it to the layer div.
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     *
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds,
-                                         null, this.tileSize);
-    },
-
-    /**
-     * APIMethod: setMap
-     * When the layer is added to a map, then we can fetch our origin
-     *    (if we don't have one.)
-     *
-     * Parameters:
-     * map - {<OpenLayers.Map>}
-     */
-    setMap: function(map) {
-        OpenLayers.Layer.Grid.prototype.setMap.apply(this, arguments);
-        this.tileOrigin = new OpenLayers.LonLat(this.map.maxExtent.left,
-                                                this.map.maxExtent.top);
-    },
-
-    /**
-     * Method: calculateGridLayout
-     * Generate parameters for the grid layout. This
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bound>}
-     * extent - {<OpenLayers.Bounds>}
-     * resolution - {Number}
-     *
-     * Returns:
-     * Object containing properties tilelon, tilelat, tileoffsetlat,
-     * tileoffsetlat, tileoffsetx, tileoffsety
-     */
-    calculateGridLayout: function(bounds, extent, resolution) {
-        var tilelon = resolution * this.tileSize.w;
-        var tilelat = resolution * this.tileSize.h;
-
-        var offsetlon = bounds.left - extent.left;
-        var tilecol = Math.floor(offsetlon/tilelon) - this.buffer;
-        var tilecolremain = offsetlon/tilelon - tilecol;
-        var tileoffsetx = -tilecolremain * this.tileSize.w;
-        var tileoffsetlon = extent.left + tilecol * tilelon;
-
-        var offsetlat = extent.top - bounds.top + tilelat;
-        var tilerow = Math.floor(offsetlat/tilelat) - this.buffer;
-        var tilerowremain = tilerow - offsetlat/tilelat;
-        var tileoffsety = tilerowremain * this.tileSize.h;
-        var tileoffsetlat = extent.top - tilelat*tilerow;
-
-        return {
-          tilelon: tilelon, tilelat: tilelat,
-          tileoffsetlon: tileoffsetlon, tileoffsetlat: tileoffsetlat,
-          tileoffsetx: tileoffsetx, tileoffsety: tileoffsety
-        };
-    },
-
-    CLASS_NAME: "OpenLayers.Layer.Zoomify"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Map.js
+++ /dev/null
@@ -1,2418 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Util.js
- * @requires OpenLayers/Events.js
- * @requires OpenLayers/Tween.js
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Class: OpenLayers.Map
- * Instances of OpenLayers.Map are interactive maps embedded in a web page.
- * Create a new map with the <OpenLayers.Map> constructor.
- * 
- * On their own maps do not provide much functionality.  To extend a map
- * it's necessary to add controls (<OpenLayers.Control>) and 
- * layers (<OpenLayers.Layer>) to the map. 
- */
-OpenLayers.Map = OpenLayers.Class({
-    
-    /**
-     * Constant: Z_INDEX_BASE
-     * {Object} Base z-indexes for different classes of thing 
-     */
-    Z_INDEX_BASE: {
-        BaseLayer: 100,
-        Overlay: 325,
-        Feature: 725,
-        Popup: 750,
-        Control: 1000
-    },
-
-    /**
-     * Constant: EVENT_TYPES
-     * {Array(String)} Supported application event types.  Register a listener
-     *     for a particular event with the following syntax:
-     * (code)
-     * map.events.register(type, obj, listener);
-     * (end)
-     *
-     * Listeners will be called with a reference to an event object.  The
-     *     properties of this event depends on exactly what happened.
-     *
-     * All event objects have at least the following properties:
-     *  - *object* {Object} A reference to map.events.object.
-     *  - *element* {DOMElement} A reference to map.events.element.
-     *
-     * Browser events have the following additional properties:
-     *  - *xy* {<OpenLayers.Pixel>} The pixel location of the event (relative
-     *      to the the map viewport).
-     *  - other properties that come with browser events
-     *
-     * Supported map event types:
-     *  - *preaddlayer* triggered before a layer has been added.  The event
-     *      object will include a *layer* property that references the layer  
-     *      to be added.
-     *  - *addlayer* triggered after a layer has been added.  The event object
-     *      will include a *layer* property that references the added layer.
-     *  - *removelayer* triggered after a layer has been removed.  The event
-     *      object will include a *layer* property that references the removed
-     *      layer.
-     *  - *changelayer* triggered after a layer name change, order change,
-     *      opacity change, params change or visibility change
-     *      (due to resolution thresholds). Listeners will receive an event
-     *      object with *layer* and *property* properties. The *layer*
-     *      property will be a reference to the changed layer. 
-     *      The *property* property will be a key to the
-     *      changed property (name, order, opacity, params or visibility).
-     *  - *movestart* triggered after the start of a drag, pan, or zoom
-     *  - *move* triggered after each drag, pan, or zoom
-     *  - *moveend* triggered after a drag, pan, or zoom completes
-     *  - *zoomend* triggered after a zoom completes
-     *  - *mouseover* triggered after mouseover the map
-     *  - *mouseout* triggered after mouseout the map
-     *  - *mousemove* triggered after mousemove the map
-     *  - *changebaselayer* triggered after the base layer changes
-     */
-    EVENT_TYPES: [ 
-        "preaddlayer", "addlayer", "removelayer", "changelayer", "movestart",
-        "move", "moveend", "zoomend", "popupopen", "popupclose",
-        "addmarker", "removemarker", "clearmarkers", "mouseover",
-        "mouseout", "mousemove", "dragstart", "drag", "dragend",
-        "changebaselayer"],
-
-    /**
-     * Property: id
-     * {String} Unique identifier for the map
-     */
-    id: null,
-    
-    /**
-     * Property: fractionalZoom
-     * {Boolean} For a base layer that supports it, allow the map resolution
-     *     to be set to a value between one of the values in the resolutions
-     *     array.  Default is false.
-     *
-     * When fractionalZoom is set to true, it is possible to zoom to
-     *     an arbitrary extent.  This requires a base layer from a source
-     *     that supports requests for arbitrary extents (i.e. not cached
-     *     tiles on a regular lattice).  This means that fractionalZoom
-     *     will not work with commercial layers (Google, Yahoo, VE), layers
-     *     using TileCache, or any other pre-cached data sources.
-     *
-     * If you are using fractionalZoom, then you should also use
-     *     <getResolutionForZoom> instead of layer.resolutions[zoom] as the
-     *     former works for non-integer zoom levels.
-     */
-    fractionalZoom: false,
-    
-    /**
-     * APIProperty: events
-     * {<OpenLayers.Events>} An events object that handles all 
-     *                       events on the map
-     */
-    events: null,
-    
-    /**
-     * APIProperty: allOverlays
-     * {Boolean} Allow the map to function with "overlays" only.  Defaults to
-     *     false.  If true, the lowest layer in the draw order will act as
-     *     the base layer.  In addition, if set to true, all layers will
-     *     have isBaseLayer set to false when they are added to the map.
-     *
-     * Note:
-     * If you set map.allOverlays to true, then you *cannot* use
-     *     map.setBaseLayer or layer.setIsBaseLayer.  With allOverlays true,
-     *     the lowest layer in the draw layer is the base layer.  So, to change
-     *     the base layer, use <setLayerIndex> or <raiseLayer> to set the layer
-     *     index to 0.
-     */
-    allOverlays: false,
-
-    /**
-     * APIProperty: div
-     * {DOMElement|String} The element that contains the map (or an id for
-     *     that element).  If the <OpenLayers.Map> constructor is called
-     *     with two arguments, this should be provided as the first argument.
-     *     Alternatively, the map constructor can be called with the options
-     *     object as the only argument.  In this case (one argument), a
-     *     div property may or may not be provided.  If the div property
-     *     is not provided, the map can be rendered to a container later
-     *     using the <render> method.
-     *     
-     * Note:
-     * If you are calling <render> after map construction, do not use
-     *     <maxResolution>  auto.  Instead, divide your <maxExtent> by your
-     *     maximum expected dimension.
-     */
-    div: null,
-    
-    /**
-     * Property: dragging
-     * {Boolean} The map is currently being dragged.
-     */
-    dragging: false,
-
-    /**
-     * Property: size
-     * {<OpenLayers.Size>} Size of the main div (this.div)
-     */
-    size: null,
-    
-    /**
-     * Property: viewPortDiv
-     * {HTMLDivElement} The element that represents the map viewport
-     */
-    viewPortDiv: null,
-
-    /**
-     * Property: layerContainerOrigin
-     * {<OpenLayers.LonLat>} The lonlat at which the later container was
-     *                       re-initialized (on-zoom)
-     */
-    layerContainerOrigin: null,
-
-    /**
-     * Property: layerContainerDiv
-     * {HTMLDivElement} The element that contains the layers.
-     */
-    layerContainerDiv: null,
-
-    /**
-     * APIProperty: layers
-     * {Array(<OpenLayers.Layer>)} Ordered list of layers in the map
-     */
-    layers: null,
-
-    /**
-     * Property: controls
-     * {Array(<OpenLayers.Control>)} List of controls associated with the map.
-     *
-     * If not provided in the map options at construction, the map will
-     *     be given the following controls by default:
-     *  - <OpenLayers.Control.Navigation>
-     *  - <OpenLayers.Control.PanZoom>
-     *  - <OpenLayers.Control.ArgParser>
-     *  - <OpenLayers.Control.Attribution>
-     */
-    controls: null,
-
-    /**
-     * Property: popups
-     * {Array(<OpenLayers.Popup>)} List of popups associated with the map
-     */
-    popups: null,
-
-    /**
-     * APIProperty: baseLayer
-     * {<OpenLayers.Layer>} The currently selected base layer.  This determines
-     * min/max zoom level, projection, etc.
-     */
-    baseLayer: null,
-    
-    /**
-     * Property: center
-     * {<OpenLayers.LonLat>} The current center of the map
-     */
-    center: null,
-
-    /**
-     * Property: resolution
-     * {Float} The resolution of the map.
-     */
-    resolution: null,
-
-    /**
-     * Property: zoom
-     * {Integer} The current zoom level of the map
-     */
-    zoom: 0,    
-
-    /**
-     * Property: panRatio
-     * {Float} The ratio of the current extent within
-     *         which panning will tween.
-     */
-    panRatio: 1.5,    
-
-    /**
-     * Property: viewRequestID
-     * {String} Used to store a unique identifier that changes when the map 
-     *          view changes. viewRequestID should be used when adding data 
-     *          asynchronously to the map: viewRequestID is incremented when 
-     *          you initiate your request (right now during changing of 
-     *          baselayers and changing of zooms). It is stored here in the 
-     *          map and also in the data that will be coming back 
-     *          asynchronously. Before displaying this data on request 
-     *          completion, we check that the viewRequestID of the data is 
-     *          still the same as that of the map. Fix for #480
-     */
-    viewRequestID: 0,
-
-  // Options
-
-    /**
-     * APIProperty: tileSize
-     * {<OpenLayers.Size>} Set in the map options to override the default tile
-     *                     size for this map.
-     */
-    tileSize: null,
-
-    /**
-     * APIProperty: projection
-     * {String} Set in the map options to override the default projection 
-     *          string this map - also set maxExtent, maxResolution, and 
-     *          units if appropriate.  Default is "EPSG:4326".
-     */
-    projection: "EPSG:4326",    
-        
-    /**
-     * APIProperty: units
-     * {String} The map units.  Defaults to 'degrees'.  Possible values are
-     *          'degrees' (or 'dd'), 'm', 'ft', 'km', 'mi', 'inches'.
-     */
-    units: 'degrees',
-
-    /**
-     * APIProperty: resolutions
-     * {Array(Float)} A list of map resolutions (map units per pixel) in 
-     *     descending order.  If this is not set in the layer constructor, it 
-     *     will be set based on other resolution related properties 
-     *     (maxExtent, maxResolution, maxScale, etc.).
-     */
-    resolutions: null,
-
-    /**
-     * APIProperty: maxResolution
-     * {Float} Default max is 360 deg / 256 px, which corresponds to
-     *          zoom level 0 on gmaps.  Specify a different value in the map 
-     *          options if you are not using a geographic projection and 
-     *          displaying the whole world.
-     */
-    maxResolution: 1.40625,
-
-    /**
-     * APIProperty: minResolution
-     * {Float}
-     */
-    minResolution: null,
-
-    /**
-     * APIProperty: maxScale
-     * {Float}
-     */
-    maxScale: null,
-
-    /**
-     * APIProperty: minScale
-     * {Float}
-     */
-    minScale: null,
-
-    /**
-     * APIProperty: maxExtent
-     * {<OpenLayers.Bounds>} The maximum extent for the map.  Defaults to the
-     *                       whole world in decimal degrees 
-     *                       (-180, -90, 180, 90).  Specify a different
-     *                        extent in the map options if you are not using a 
-     *                        geographic projection and displaying the whole 
-     *                        world.
-     */
-    maxExtent: null,
-    
-    /**
-     * APIProperty: minExtent
-     * {<OpenLayers.Bounds>}
-     */
-    minExtent: null,
-    
-    /**
-     * APIProperty: restrictedExtent
-     * {<OpenLayers.Bounds>} Limit map navigation to this extent where possible.
-     *     If a non-null restrictedExtent is set, panning will be restricted
-     *     to the given bounds.  In addition, zooming to a resolution that
-     *     displays more than the restricted extent will center the map
-     *     on the restricted extent.  If you wish to limit the zoom level
-     *     or resolution, use maxResolution.
-     */
-    restrictedExtent: null,
-
-    /**
-     * APIProperty: numZoomLevels
-     * {Integer} Number of zoom levels for the map.  Defaults to 16.  Set a
-     *           different value in the map options if needed.
-     */
-    numZoomLevels: 16,
-
-    /**
-     * APIProperty: theme
-     * {String} Relative path to a CSS file from which to load theme styles.
-     *          Specify null in the map options (e.g. {theme: null}) if you 
-     *          want to get cascading style declarations - by putting links to 
-     *          stylesheets or style declarations directly in your page.
-     */
-    theme: null,
-    
-    /** 
-     * APIProperty: displayProjection
-     * {<OpenLayers.Projection>} Requires proj4js support.Projection used by
-     *     several controls to display data to user. If this property is set,
-     *     it will be set on any control which has a null displayProjection
-     *     property at the time the control is added to the map. 
-     */
-    displayProjection: null,
-
-    /**
-     * APIProperty: fallThrough
-     * {Boolean} Should OpenLayers allow events on the map to fall through to
-     *           other elements on the page, or should it swallow them? (#457)
-     *           Default is to fall through.
-     */
-    fallThrough: true,
-    
-    /**
-     * Property: panTween
-     * {OpenLayers.Tween} Animated panning tween object, see panTo()
-     */
-    panTween: null,
-
-    /**
-     * APIProperty: eventListeners
-     * {Object} If set as an option at construction, the eventListeners
-     *     object will be registered with <OpenLayers.Events.on>.  Object
-     *     structure must be a listeners object as shown in the example for
-     *     the events.on method.
-     */
-    eventListeners: null,
-
-    /**
-     * APIProperty: panMethod
-     * {Function} The Easing function to be used for tweening.  Default is
-     * OpenLayers.Easing.Expo.easeOut. Setting this to 'null' turns off
-     * animated panning.
-     */
-    panMethod: OpenLayers.Easing.Expo.easeOut,
-    
-    /**
-     * Property: panDuration
-     * {Integer} The number of steps to be passed to the
-     * OpenLayers.Tween.start() method when the map is
-     * panned.
-     * Default is 50.
-     */
-    panDuration: 50,
-    
-    /**
-     * Property: paddingForPopups
-     * {<OpenLayers.Bounds>} Outside margin of the popup. Used to prevent 
-     *     the popup from getting too close to the map border.
-     */
-    paddingForPopups : null,
-    
-    /**
-     * Constructor: OpenLayers.Map
-     * Constructor for a new OpenLayers.Map instance.  There are two possible
-     *     ways to call the map constructor.  See the examples below.
-     *
-     * Parameters:
-     * div - {DOMElement|String}  The element or id of an element in your page
-     *     that will contain the map.  May be omitted if the <div> option is
-     *     provided or if you intend to call the <render> method later.
-     * options - {Object} Optional object with properties to tag onto the map.
-     *
-     * Examples (method one):
-     * (code)
-     * // create a map with default options in an element with the id "map1"
-     * var map = new OpenLayers.Map("map1");
-     *
-     * // create a map with non-default options in an element with id "map2"
-     * var options = {
-     *     maxExtent: new OpenLayers.Bounds(-200000, -200000, 200000, 200000),
-     *     maxResolution: 156543,
-     *     units: 'm',
-     *     projection: "EPSG:41001"
-     * };
-     * var map = new OpenLayers.Map("map2", options);
-     * (end)
-     *
-     * Examples (method two - single argument):
-     * (code)
-     * // create a map with non-default options
-     * var map = new OpenLayers.Map({
-     *     div: "map_id",
-     *     maxExtent: new OpenLayers.Bounds(-200000, -200000, 200000, 200000),
-     *     maxResolution: 156543,
-     *     units: 'm',
-     *     projection: "EPSG:41001"
-     * });
-     *
-     * // create a map without a reference to a container - call render later
-     * var map = new OpenLayers.Map({
-     *     maxExtent: new OpenLayers.Bounds(-200000, -200000, 200000, 200000),
-     *     maxResolution: 156543,
-     *     units: 'm',
-     *     projection: "EPSG:41001"
-     * });
-     */    
-    initialize: function (div, options) {
-        
-        // If only one argument is provided, check if it is an object.
-        if(arguments.length === 1 && typeof div === "object") {
-            options = div;
-            div = options && options.div;
-        }
-
-        // Simple-type defaults are set in class definition. 
-        //  Now set complex-type defaults 
-        this.tileSize = new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,
-                                            OpenLayers.Map.TILE_HEIGHT);
-        
-        this.maxExtent = new OpenLayers.Bounds(-180, -90, 180, 90);
-        
-        this.paddingForPopups = new OpenLayers.Bounds(15, 15, 15, 15);
-
-        this.theme = OpenLayers._getScriptLocation() + 
-                             'theme/default/style.css'; 
-
-        // now override default options 
-        OpenLayers.Util.extend(this, options);
-
-        // initialize layers array
-        this.layers = [];
-
-        this.id = OpenLayers.Util.createUniqueID("OpenLayers.Map_");
-
-        this.div = OpenLayers.Util.getElement(div);
-        if(!this.div) {
-            this.div = document.createElement("div");
-            this.div.style.height = "1px";
-            this.div.style.width = "1px";
-        }
-        
-        OpenLayers.Element.addClass(this.div, 'olMap');
-
-        // the viewPortDiv is the outermost div we modify
-        var id = this.id + "_OpenLayers_ViewPort";
-        this.viewPortDiv = OpenLayers.Util.createDiv(id, null, null, null,
-                                                     "relative", null,
-                                                     "hidden");
-        this.viewPortDiv.style.width = "100%";
-        this.viewPortDiv.style.height = "100%";
-        this.viewPortDiv.className = "olMapViewport";
-        this.div.appendChild(this.viewPortDiv);
-
-        // the layerContainerDiv is the one that holds all the layers
-        id = this.id + "_OpenLayers_Container";
-        this.layerContainerDiv = OpenLayers.Util.createDiv(id);
-        this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE['Popup']-1;
-        
-        this.viewPortDiv.appendChild(this.layerContainerDiv);
-
-        this.events = new OpenLayers.Events(this, 
-                                            this.div, 
-                                            this.EVENT_TYPES, 
-                                            this.fallThrough, 
-                                            {includeXY: true});
-        this.updateSize();
-        if(this.eventListeners instanceof Object) {
-            this.events.on(this.eventListeners);
-        }
- 
-        // update the map size and location before the map moves
-        this.events.register("movestart", this, this.updateSize);
-
-        // Because Mozilla does not support the "resize" event for elements 
-        // other than "window", we need to put a hack here. 
-        if (OpenLayers.String.contains(navigator.appName, "Microsoft")) {
-            // If IE, register the resize on the div
-            this.events.register("resize", this, this.updateSize);
-        } else {
-            // Else updateSize on catching the window's resize
-            //  Note that this is ok, as updateSize() does nothing if the 
-            //  map's size has not actually changed.
-            this.updateSizeDestroy = OpenLayers.Function.bind(this.updateSize, 
-                this);
-            OpenLayers.Event.observe(window, 'resize',
-                            this.updateSizeDestroy);
-        }
-        
-        // only append link stylesheet if the theme property is set
-        if(this.theme) {
-            // check existing links for equivalent url
-            var addNode = true;
-            var nodes = document.getElementsByTagName('link');
-            for(var i=0, len=nodes.length; i<len; ++i) {
-                if(OpenLayers.Util.isEquivalentUrl(nodes.item(i).href,
-                                                   this.theme)) {
-                    addNode = false;
-                    break;
-                }
-            }
-            // only add a new node if one with an equivalent url hasn't already
-            // been added
-            if(addNode) {
-                var cssNode = document.createElement('link');
-                cssNode.setAttribute('rel', 'stylesheet');
-                cssNode.setAttribute('type', 'text/css');
-                cssNode.setAttribute('href', this.theme);
-                document.getElementsByTagName('head')[0].appendChild(cssNode);
-            }
-        }
-        
-        if (this.controls == null) {
-            if (OpenLayers.Control != null) { // running full or lite?
-                this.controls = [ new OpenLayers.Control.Navigation(),
-                                  new OpenLayers.Control.PanZoom(),
-                                  new OpenLayers.Control.ArgParser(),
-                                  new OpenLayers.Control.Attribution()
-                                ];
-            } else {
-                this.controls = [];
-            }
-        }
-
-        for(var i=0, len=this.controls.length; i<len; i++) {
-            this.addControlToMap(this.controls[i]);
-        }
-
-        this.popups = [];
-
-        this.unloadDestroy = OpenLayers.Function.bind(this.destroy, this);
-        
-
-        // always call map.destroy()
-        OpenLayers.Event.observe(window, 'unload', this.unloadDestroy);
-        
-        // add any initial layers
-        if (options && options.layers) {
-            this.addLayers(options.layers);        
-            // set center (and optionally zoom)
-            if (options.center) {
-                // zoom can be undefined here
-                this.setCenter(options.center, options.zoom);
-            }
-        }
-    },
-    
-    /**
-     * APIMethod: render
-     * Render the map to a specified container.
-     * 
-     * Parameters:
-     * div - {String|DOMElement} The container that the map should be rendered
-     *     to. If different than the current container, the map viewport
-     *     will be moved from the current to the new container.
-     */
-    render: function(div) {
-        this.div = OpenLayers.Util.getElement(div);
-        OpenLayers.Element.addClass(this.div, 'olMap');
-        this.events.attachToElement(this.div);
-        this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);
-        this.div.appendChild(this.viewPortDiv);
-        this.updateSize();
-    },
-
-    /**
-     * Method: unloadDestroy
-     * Function that is called to destroy the map on page unload. stored here
-     *     so that if map is manually destroyed, we can unregister this.
-     */
-    unloadDestroy: null,
-    
-    /**
-     * Method: updateSizeDestroy
-     * When the map is destroyed, we need to stop listening to updateSize
-     *    events: this method stores the function we need to unregister in 
-     *    non-IE browsers.
-     */
-    updateSizeDestroy: null,
-
-    /**
-     * APIMethod: destroy
-     * Destroy this map
-     */
-    destroy:function() {
-        // if unloadDestroy is null, we've already been destroyed
-        if (!this.unloadDestroy) {
-            return false;
-        }
-        
-        // make sure panning doesn't continue after destruction
-        if(this.panTween) {
-            this.panTween.stop();
-            this.panTween = null;
-        }
-
-        // map has been destroyed. dont do it again!
-        OpenLayers.Event.stopObserving(window, 'unload', this.unloadDestroy);
-        this.unloadDestroy = null;
-
-        if (this.updateSizeDestroy) {
-            OpenLayers.Event.stopObserving(window, 'resize', 
-                                           this.updateSizeDestroy);
-        } else {
-            this.events.unregister("resize", this, this.updateSize);
-        }    
-        
-        this.paddingForPopups = null;    
-
-        if (this.controls != null) {
-            for (var i = this.controls.length - 1; i>=0; --i) {
-                this.controls[i].destroy();
-            } 
-            this.controls = null;
-        }
-        if (this.layers != null) {
-            for (var i = this.layers.length - 1; i>=0; --i) {
-                //pass 'false' to destroy so that map wont try to set a new 
-                // baselayer after each baselayer is removed
-                this.layers[i].destroy(false);
-            } 
-            this.layers = null;
-        }
-        if (this.viewPortDiv) {
-            this.div.removeChild(this.viewPortDiv);
-        }
-        this.viewPortDiv = null;
-
-        if(this.eventListeners) {
-            this.events.un(this.eventListeners);
-            this.eventListeners = null;
-        }
-        this.events.destroy();
-        this.events = null;
-
-    },
-
-    /**
-     * APIMethod: setOptions
-     * Change the map options
-     *
-     * Parameters:
-     * options - {Object} Hashtable of options to tag to the map
-     */
-    setOptions: function(options) {
-        OpenLayers.Util.extend(this, options);
-    },
-
-    /**
-     * APIMethod: getTileSize
-     * Get the tile size for the map
-     *
-     * Returns:
-     * {<OpenLayers.Size>}
-     */
-     getTileSize: function() {
-         return this.tileSize;
-     },
-
-
-    /**
-     * APIMethod: getBy
-     * Get a list of objects given a property and a match item.
-     *
-     * Parameters:
-     * array - {String} A property on the map whose value is an array.
-     * property - {String} A property on each item of the given array.
-     * match - {String | Object} A string to match.  Can also be a regular
-     *     expression literal or object.  In addition, it can be any object
-     *     with a method named test.  For reqular expressions or other, if
-     *     match.test(map[array][i][property]) evaluates to true, the item will
-     *     be included in the array returned.  If no items are found, an empty
-     *     array is returned.
-     *
-     * Returns:
-     * {Array} An array of items where the given property matches the given
-     *     criteria.
-     */
-    getBy: function(array, property, match) {
-        var test = (typeof match.test == "function");
-        var found = OpenLayers.Array.filter(this[array], function(item) {
-            return item[property] == match || (test && match.test(item[property]));
-        });
-        return found;
-    },
-
-    /**
-     * APIMethod: getLayersBy
-     * Get a list of layers with properties matching the given criteria.
-     *
-     * Parameter:
-     * property - {String} A layer property to be matched.
-     * match - {String | Object} A string to match.  Can also be a regular
-     *     expression literal or object.  In addition, it can be any object
-     *     with a method named test.  For reqular expressions or other, if
-     *     match.test(layer[property]) evaluates to true, the layer will be
-     *     included in the array returned.  If no layers are found, an empty
-     *     array is returned.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Layer>)} A list of layers matching the given criteria.
-     *     An empty array is returned if no matches are found.
-     */
-    getLayersBy: function(property, match) {
-        return this.getBy("layers", property, match);
-    },
-
-    /**
-     * APIMethod: getLayersByName
-     * Get a list of layers with names matching the given name.
-     *
-     * Parameter:
-     * match - {String | Object} A layer name.  The name can also be a regular
-     *     expression literal or object.  In addition, it can be any object
-     *     with a method named test.  For reqular expressions or other, if
-     *     name.test(layer.name) evaluates to true, the layer will be included
-     *     in the list of layers returned.  If no layers are found, an empty
-     *     array is returned.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Layer>)} A list of layers matching the given name.
-     *     An empty array is returned if no matches are found.
-     */
-    getLayersByName: function(match) {
-        return this.getLayersBy("name", match);
-    },
-
-    /**
-     * APIMethod: getLayersByClass
-     * Get a list of layers of a given class (CLASS_NAME).
-     *
-     * Parameter:
-     * match - {String | Object} A layer class name.  The match can also be a
-     *     regular expression literal or object.  In addition, it can be any
-     *     object with a method named test.  For reqular expressions or other,
-     *     if type.test(layer.CLASS_NAME) evaluates to true, the layer will
-     *     be included in the list of layers returned.  If no layers are
-     *     found, an empty array is returned.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Layer>)} A list of layers matching the given class.
-     *     An empty array is returned if no matches are found.
-     */
-    getLayersByClass: function(match) {
-        return this.getLayersBy("CLASS_NAME", match);
-    },
-
-    /**
-     * APIMethod: getControlsBy
-     * Get a list of controls with properties matching the given criteria.
-     *
-     * Parameter:
-     * property - {String} A control property to be matched.
-     * match - {String | Object} A string to match.  Can also be a regular
-     *     expression literal or object.  In addition, it can be any object
-     *     with a method named test.  For reqular expressions or other, if
-     *     match.test(layer[property]) evaluates to true, the layer will be
-     *     included in the array returned.  If no layers are found, an empty
-     *     array is returned.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Control>)} A list of controls matching the given
-     *     criteria.  An empty array is returned if no matches are found.
-     */
-    getControlsBy: function(property, match) {
-        return this.getBy("controls", property, match);
-    },
-
-    /**
-     * APIMethod: getControlsByClass
-     * Get a list of controls of a given class (CLASS_NAME).
-     *
-     * Parameter:
-     * match - {String | Object} A control class name.  The match can also be a
-     *     regular expression literal or object.  In addition, it can be any
-     *     object with a method named test.  For reqular expressions or other,
-     *     if type.test(control.CLASS_NAME) evaluates to true, the control will
-     *     be included in the list of controls returned.  If no controls are
-     *     found, an empty array is returned.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Control>)} A list of controls matching the given class.
-     *     An empty array is returned if no matches are found.
-     */
-    getControlsByClass: function(match) {
-        return this.getControlsBy("CLASS_NAME", match);
-    },
-
-  /********************************************************/
-  /*                                                      */
-  /*                  Layer Functions                     */
-  /*                                                      */
-  /*     The following functions deal with adding and     */
-  /*        removing Layers to and from the Map           */
-  /*                                                      */
-  /********************************************************/         
-
-    /**
-     * APIMethod: getLayer
-     * Get a layer based on its id
-     *
-     * Parameter:
-     * id - {String} A layer id
-     *
-     * Returns:
-     * {<OpenLayers.Layer>} The Layer with the corresponding id from the map's 
-     *                      layer collection, or null if not found.
-     */
-    getLayer: function(id) {
-        var foundLayer = null;
-        for (var i=0, len=this.layers.length; i<len; i++) {
-            var layer = this.layers[i];
-            if (layer.id == id) {
-                foundLayer = layer;
-                break;
-            }
-        }
-        return foundLayer;
-    },
-
-    /**
-    * Method: setLayerZIndex
-    * 
-    * Parameters:
-    * layer - {<OpenLayers.Layer>} 
-    * zIdx - {int} 
-    */    
-    setLayerZIndex: function (layer, zIdx) {
-        layer.setZIndex(
-            this.Z_INDEX_BASE[layer.isBaseLayer ? 'BaseLayer' : 'Overlay']
-            + zIdx * 5 );
-    },
-
-    /**
-     * Method: resetLayersZIndex
-     * Reset each layer's z-index based on layer's array index
-     */
-    resetLayersZIndex: function() {
-        for (var i=0, len=this.layers.length; i<len; i++) {
-            var layer = this.layers[i];
-            this.setLayerZIndex(layer, i);
-        }
-    },
-
-    /**
-    * APIMethod: addLayer
-    *
-    * Parameters:
-    * layer - {<OpenLayers.Layer>} 
-    */    
-    addLayer: function (layer) {
-        for(var i=0, len=this.layers.length; i <len; i++) {
-            if (this.layers[i] == layer) {
-                var msg = OpenLayers.i18n('layerAlreadyAdded', 
-                                                      {'layerName':layer.name});
-                OpenLayers.Console.warn(msg);
-                return false;
-            }
-        }
-        if(this.allOverlays) {
-            layer.isBaseLayer = false;
-        }
-
-        if (this.events.triggerEvent("preaddlayer", {layer: layer}) === false) {
-            return;
-        }
-        
-        layer.div.className = "olLayerDiv";
-        layer.div.style.overflow = "";
-        this.setLayerZIndex(layer, this.layers.length);
-
-        if (layer.isFixed) {
-            this.viewPortDiv.appendChild(layer.div);
-        } else {
-            this.layerContainerDiv.appendChild(layer.div);
-        }
-        this.layers.push(layer);
-        layer.setMap(this);
-
-        if (layer.isBaseLayer || (this.allOverlays && !this.baseLayer))  {
-            if (this.baseLayer == null) {
-                // set the first baselaye we add as the baselayer
-                this.setBaseLayer(layer);
-            } else {
-                layer.setVisibility(false);
-            }
-        } else {
-            layer.redraw();
-        }
-
-        this.events.triggerEvent("addlayer", {layer: layer});
-        layer.afterAdd();
-    },
-
-    /**
-    * APIMethod: addLayers 
-    *
-    * Parameters:
-    * layers - {Array(<OpenLayers.Layer>)} 
-    */    
-    addLayers: function (layers) {
-        for (var i=0, len=layers.length; i<len; i++) {
-            this.addLayer(layers[i]);
-        }
-    },
-
-    /** 
-     * APIMethod: removeLayer
-     * Removes a layer from the map by removing its visual element (the 
-     *   layer.div property), then removing it from the map's internal list 
-     *   of layers, setting the layer's map property to null. 
-     * 
-     *   a "removelayer" event is triggered.
-     * 
-     *   very worthy of mention is that simply removing a layer from a map
-     *   will not cause the removal of any popups which may have been created
-     *   by the layer. this is due to the fact that it was decided at some
-     *   point that popups would not belong to layers. thus there is no way 
-     *   for us to know here to which layer the popup belongs.
-     *    
-     *     A simple solution to this is simply to call destroy() on the layer.
-     *     the default OpenLayers.Layer class's destroy() function
-     *     automatically takes care to remove itself from whatever map it has
-     *     been attached to. 
-     * 
-     *     The correct solution is for the layer itself to register an 
-     *     event-handler on "removelayer" and when it is called, if it 
-     *     recognizes itself as the layer being removed, then it cycles through
-     *     its own personal list of popups, removing them from the map.
-     * 
-     * Parameters:
-     * layer - {<OpenLayers.Layer>} 
-     * setNewBaseLayer - {Boolean} Default is true
-     */
-    removeLayer: function(layer, setNewBaseLayer) {
-        if (setNewBaseLayer == null) {
-            setNewBaseLayer = true;
-        }
-
-        if (layer.isFixed) {
-            this.viewPortDiv.removeChild(layer.div);
-        } else {
-            this.layerContainerDiv.removeChild(layer.div);
-        }
-        OpenLayers.Util.removeItem(this.layers, layer);
-        layer.removeMap(this);
-        layer.map = null;
-
-        // if we removed the base layer, need to set a new one
-        if(this.baseLayer == layer) {
-            this.baseLayer = null;
-            if(setNewBaseLayer) {
-                for(var i=0, len=this.layers.length; i<len; i++) {
-                    var iLayer = this.layers[i];
-                    if (iLayer.isBaseLayer || this.allOverlays) {
-                        this.setBaseLayer(iLayer);
-                        break;
-                    }
-                }
-            }
-        }
-
-        this.resetLayersZIndex();
-
-        this.events.triggerEvent("removelayer", {layer: layer});
-    },
-
-    /**
-     * APIMethod: getNumLayers
-     * 
-     * Returns:
-     * {Int} The number of layers attached to the map.
-     */
-    getNumLayers: function () {
-        return this.layers.length;
-    },
-
-    /** 
-     * APIMethod: getLayerIndex
-     *
-     * Parameters:
-     * layer - {<OpenLayers.Layer>}
-     *
-     * Returns:
-     * {Integer} The current (zero-based) index of the given layer in the map's
-     *           layer stack. Returns -1 if the layer isn't on the map.
-     */
-    getLayerIndex: function (layer) {
-        return OpenLayers.Util.indexOf(this.layers, layer);
-    },
-    
-    /** 
-     * APIMethod: setLayerIndex
-     * Move the given layer to the specified (zero-based) index in the layer
-     *     list, changing its z-index in the map display. Use
-     *     map.getLayerIndex() to find out the current index of a layer. Note
-     *     that this cannot (or at least should not) be effectively used to
-     *     raise base layers above overlays.
-     *
-     * Parameters:
-     * layer - {<OpenLayers.Layer>} 
-     * idx - {int} 
-     */
-    setLayerIndex: function (layer, idx) {
-        var base = this.getLayerIndex(layer);
-        if (idx < 0) {
-            idx = 0;
-        } else if (idx > this.layers.length) {
-            idx = this.layers.length;
-        }
-        if (base != idx) {
-            this.layers.splice(base, 1);
-            this.layers.splice(idx, 0, layer);
-            for (var i=0, len=this.layers.length; i<len; i++) {
-                this.setLayerZIndex(this.layers[i], i);
-            }
-            this.events.triggerEvent("changelayer", {
-                layer: layer, property: "order"
-            });
-            if(this.allOverlays) {
-                if(idx === 0) {
-                    this.setBaseLayer(layer);
-                } else if(this.baseLayer !== this.layers[0]) {
-                    this.setBaseLayer(this.layers[0]);
-                }
-            }
-        }
-    },
-
-    /** 
-     * APIMethod: raiseLayer
-     * Change the index of the given layer by delta. If delta is positive, 
-     *     the layer is moved up the map's layer stack; if delta is negative,
-     *     the layer is moved down.  Again, note that this cannot (or at least
-     *     should not) be effectively used to raise base layers above overlays.
-     *
-     * Paremeters:
-     * layer - {<OpenLayers.Layer>} 
-     * delta - {int} 
-     */
-    raiseLayer: function (layer, delta) {
-        var idx = this.getLayerIndex(layer) + delta;
-        this.setLayerIndex(layer, idx);
-    },
-    
-    /** 
-     * APIMethod: setBaseLayer
-     * Allows user to specify one of the currently-loaded layers as the Map's
-     *     new base layer.
-     * 
-     * Parameters:
-     * newBaseLayer - {<OpenLayers.Layer>}
-     */
-    setBaseLayer: function(newBaseLayer) {
-        
-        if (newBaseLayer != this.baseLayer) {
-          
-            // ensure newBaseLayer is already loaded
-            if (OpenLayers.Util.indexOf(this.layers, newBaseLayer) != -1) {
-
-                // preserve center and scale when changing base layers
-                var center = this.getCenter();
-                var newResolution = OpenLayers.Util.getResolutionFromScale(
-                    this.getScale(), newBaseLayer.units
-                );
-
-                // make the old base layer invisible 
-                if (this.baseLayer != null && !this.allOverlays) {
-                    this.baseLayer.setVisibility(false);
-                }
-
-                // set new baselayer
-                this.baseLayer = newBaseLayer;
-                
-                // Increment viewRequestID since the baseLayer is 
-                // changing. This is used by tiles to check if they should 
-                // draw themselves.
-                this.viewRequestID++;
-                if(!this.allOverlays || this.baseLayer.visibility) {
-                    this.baseLayer.setVisibility(true);
-                }
-
-                // recenter the map
-                if (center != null) {
-                    // new zoom level derived from old scale
-                    var newZoom = this.getZoomForResolution(
-                        newResolution || this.resolution, true
-                    );
-                    // zoom and force zoom change
-                    this.setCenter(center, newZoom, false, true);
-                }
-
-                this.events.triggerEvent("changebaselayer", {
-                    layer: this.baseLayer
-                });
-            }        
-        }
-    },
-
-
-  /********************************************************/
-  /*                                                      */
-  /*                 Control Functions                    */
-  /*                                                      */
-  /*     The following functions deal with adding and     */
-  /*        removing Controls to and from the Map         */
-  /*                                                      */
-  /********************************************************/         
-
-    /**
-     * APIMethod: addControl
-     * Add the passed over control to the map. Optionally 
-     *     position the control at the given pixel.
-     * 
-     * Parameters:
-     * control - {<OpenLayers.Control>}
-     * px - {<OpenLayers.Pixel>}
-     */    
-    addControl: function (control, px) {
-        this.controls.push(control);
-        this.addControlToMap(control, px);
-    },
-    
-    /**
-     * APIMethod: addControls
-     * Add all of the passed over controls to the map. 
-     *     You can pass over an optional second array
-     *     with pixel-objects to position the controls.
-     *     The indices of the two arrays should match and
-     *     you can add null as pixel for those controls 
-     *     you want to be autopositioned.   
-     *     
-     * Parameters:
-     * controls - {Array(<OpenLayers.Control>)}
-     * pixels - {Array(<OpenLayers.Pixel>)}
-     */    
-    addControls: function (controls, pixels) {
-        var pxs = (arguments.length === 1) ? [] : pixels;
-        for (var i=0, len=controls.length; i<len; i++) {
-            var ctrl = controls[i];
-            var px = (pxs[i]) ? pxs[i] : null;
-            this.addControl( ctrl, px );
-        }
-    },
-
-    /**
-     * Method: addControlToMap
-     * 
-     * Parameters:
-     * 
-     * control - {<OpenLayers.Control>}
-     * px - {<OpenLayers.Pixel>}
-     */    
-    addControlToMap: function (control, px) {
-        // If a control doesn't have a div at this point, it belongs in the
-        // viewport.
-        control.outsideViewport = (control.div != null);
-        
-        // If the map has a displayProjection, and the control doesn't, set 
-        // the display projection.
-        if (this.displayProjection && !control.displayProjection) {
-            control.displayProjection = this.displayProjection;
-        }    
-        
-        control.setMap(this);
-        var div = control.draw(px);
-        if (div) {
-            if(!control.outsideViewport) {
-                div.style.zIndex = this.Z_INDEX_BASE['Control'] +
-                                    this.controls.length;
-                this.viewPortDiv.appendChild( div );
-            }
-        }
-        if(control.autoActivate) {
-            control.activate();
-        }
-    },
-    
-    /**
-     * APIMethod: getControl
-     * 
-     * Parameters:
-     * id - {String} ID of the control to return.
-     * 
-     * Returns:
-     * {<OpenLayers.Control>} The control from the map's list of controls 
-     *                        which has a matching 'id'. If none found, 
-     *                        returns null.
-     */    
-    getControl: function (id) {
-        var returnControl = null;
-        for(var i=0, len=this.controls.length; i<len; i++) {
-            var control = this.controls[i];
-            if (control.id == id) {
-                returnControl = control;
-                break;
-            }
-        }
-        return returnControl;
-    },
-    
-    /** 
-     * APIMethod: removeControl
-     * Remove a control from the map. Removes the control both from the map 
-     *     object's internal array of controls, as well as from the map's 
-     *     viewPort (assuming the control was not added outsideViewport)
-     * 
-     * Parameters:
-     * control - {<OpenLayers.Control>} The control to remove.
-     */    
-    removeControl: function (control) {
-        //make sure control is non-null and actually part of our map
-        if ( (control) && (control == this.getControl(control.id)) ) {
-            if (control.div && (control.div.parentNode == this.viewPortDiv)) {
-                this.viewPortDiv.removeChild(control.div);
-            }
-            OpenLayers.Util.removeItem(this.controls, control);
-        }
-    },
-
-  /********************************************************/
-  /*                                                      */
-  /*                  Popup Functions                     */
-  /*                                                      */
-  /*     The following functions deal with adding and     */
-  /*        removing Popups to and from the Map           */
-  /*                                                      */
-  /********************************************************/         
-
-    /** 
-     * APIMethod: addPopup
-     * 
-     * Parameters:
-     * popup - {<OpenLayers.Popup>}
-     * exclusive - {Boolean} If true, closes all other popups first
-     */
-    addPopup: function(popup, exclusive) {
-
-        if (exclusive) {
-            //remove all other popups from screen
-            for (var i = this.popups.length - 1; i >= 0; --i) {
-                this.removePopup(this.popups[i]);
-            }
-        }
-
-        popup.map = this;
-        this.popups.push(popup);
-        var popupDiv = popup.draw();
-        if (popupDiv) {
-            popupDiv.style.zIndex = this.Z_INDEX_BASE['Popup'] +
-                                    this.popups.length;
-            this.layerContainerDiv.appendChild(popupDiv);
-        }
-    },
-    
-    /** 
-    * APIMethod: removePopup
-    * 
-    * Parameters:
-    * popup - {<OpenLayers.Popup>}
-    */
-    removePopup: function(popup) {
-        OpenLayers.Util.removeItem(this.popups, popup);
-        if (popup.div) {
-            try { this.layerContainerDiv.removeChild(popup.div); }
-            catch (e) { } // Popups sometimes apparently get disconnected
-                      // from the layerContainerDiv, and cause complaints.
-        }
-        popup.map = null;
-    },
-
-  /********************************************************/
-  /*                                                      */
-  /*              Container Div Functions                 */
-  /*                                                      */
-  /*   The following functions deal with the access to    */
-  /*    and maintenance of the size of the container div  */
-  /*                                                      */
-  /********************************************************/     
-
-    /**
-     * APIMethod: getSize
-     * 
-     * Returns:
-     * {<OpenLayers.Size>} An <OpenLayers.Size> object that represents the 
-     *                     size, in pixels, of the div into which OpenLayers 
-     *                     has been loaded. 
-     *                     Note - A clone() of this locally cached variable is
-     *                     returned, so as not to allow users to modify it.
-     */
-    getSize: function () {
-        var size = null;
-        if (this.size != null) {
-            size = this.size.clone();
-        }
-        return size;
-    },
-
-    /**
-     * APIMethod: updateSize
-     * This function should be called by any external code which dynamically
-     *     changes the size of the map div (because mozilla wont let us catch 
-     *     the "onresize" for an element)
-     */
-    updateSize: function() {
-        // the div might have moved on the page, also
-        var newSize = this.getCurrentSize();
-        if (newSize && !isNaN(newSize.h) && !isNaN(newSize.w)) {
-            this.events.clearMouseCache();
-            var oldSize = this.getSize();
-            if (oldSize == null) {
-                this.size = oldSize = newSize;
-            }
-            if (!newSize.equals(oldSize)) {
-                
-                // store the new size
-                this.size = newSize;
-    
-                //notify layers of mapresize
-                for(var i=0, len=this.layers.length; i<len; i++) {
-                    this.layers[i].onMapResize();                
-                }
-    
-                var center = this.getCenter();
-    
-                if (this.baseLayer != null && center != null) {
-                    var zoom = this.getZoom();
-                    this.zoom = null;
-                    this.setCenter(center, zoom);
-                }
-    
-            }
-        }
-    },
-    
-    /**
-     * Method: getCurrentSize
-     * 
-     * Returns:
-     * {<OpenLayers.Size>} A new <OpenLayers.Size> object with the dimensions 
-     *                     of the map div
-     */
-    getCurrentSize: function() {
-
-        var size = new OpenLayers.Size(this.div.clientWidth, 
-                                       this.div.clientHeight);
-
-        if (size.w == 0 && size.h == 0 || isNaN(size.w) && isNaN(size.h)) {
-            size.w = this.div.offsetWidth;
-            size.h = this.div.offsetHeight;
-        }
-        if (size.w == 0 && size.h == 0 || isNaN(size.w) && isNaN(size.h)) {
-            size.w = parseInt(this.div.style.width);
-            size.h = parseInt(this.div.style.height);
-        }
-        return size;
-    },
-
-    /** 
-     * Method: calculateBounds
-     * 
-     * Parameters:
-     * center - {<OpenLayers.LonLat>} Default is this.getCenter()
-     * resolution - {float} Default is this.getResolution() 
-     * 
-     * Returns:
-     * {<OpenLayers.Bounds>} A bounds based on resolution, center, and 
-     *                       current mapsize.
-     */
-    calculateBounds: function(center, resolution) {
-
-        var extent = null;
-        
-        if (center == null) {
-            center = this.getCenter();
-        }                
-        if (resolution == null) {
-            resolution = this.getResolution();
-        }
-    
-        if ((center != null) && (resolution != null)) {
-
-            var size = this.getSize();
-            var w_deg = size.w * resolution;
-            var h_deg = size.h * resolution;
-        
-            extent = new OpenLayers.Bounds(center.lon - w_deg / 2,
-                                           center.lat - h_deg / 2,
-                                           center.lon + w_deg / 2,
-                                           center.lat + h_deg / 2);
-        
-        }
-
-        return extent;
-    },
-
-
-  /********************************************************/
-  /*                                                      */
-  /*            Zoom, Center, Pan Functions               */
-  /*                                                      */
-  /*    The following functions handle the validation,    */
-  /*   getting and setting of the Zoom Level and Center   */
-  /*       as well as the panning of the Map              */
-  /*                                                      */
-  /********************************************************/
-    /**
-     * APIMethod: getCenter
-     * 
-     * Returns:
-     * {<OpenLayers.LonLat>}
-     */
-    getCenter: function () {
-        var center = null;
-        if (this.center) {
-            center = this.center.clone();
-        }
-        return center;
-    },
-
-
-    /**
-     * APIMethod: getZoom
-     * 
-     * Returns:
-     * {Integer}
-     */
-    getZoom: function () {
-        return this.zoom;
-    },
-    
-    /** 
-     * APIMethod: pan
-     * Allows user to pan by a value of screen pixels
-     * 
-     * Parameters:
-     * dx - {Integer}
-     * dy - {Integer}
-     * options - {Object} Options to configure panning:
-     *  - *animate* {Boolean} Use panTo instead of setCenter. Default is true.
-     *  - *dragging* {Boolean} Call setCenter with dragging true.  Default is
-     *    false.
-     */
-    pan: function(dx, dy, options) {
-        options = OpenLayers.Util.applyDefaults(options, {
-            animate: true,
-            dragging: false
-        });
-        // getCenter
-        var centerPx = this.getViewPortPxFromLonLat(this.getCenter());
-
-        // adjust
-        var newCenterPx = centerPx.add(dx, dy);
-        
-        // only call setCenter if not dragging or there has been a change
-        if (!options.dragging || !newCenterPx.equals(centerPx)) {
-            var newCenterLonLat = this.getLonLatFromViewPortPx(newCenterPx);
-            if (options.animate) {
-                this.panTo(newCenterLonLat);
-            } else {
-                this.setCenter(newCenterLonLat, null, options.dragging);
-            }    
-        }
-
-   },
-   
-   /** 
-     * APIMethod: panTo
-     * Allows user to pan to a new lonlat
-     * If the new lonlat is in the current extent the map will slide smoothly
-     * 
-     * Parameters:
-     * lonlat - {<OpenLayers.Lonlat>}
-     */
-    panTo: function(lonlat) {
-        if (this.panMethod && this.getExtent().scale(this.panRatio).containsLonLat(lonlat)) {
-            if (!this.panTween) {
-                this.panTween = new OpenLayers.Tween(this.panMethod);
-            }
-            var center = this.getCenter();
-
-            // center will not change, don't do nothing
-            if (lonlat.lon == center.lon &&
-                lonlat.lat == center.lat) {
-                return;
-            }
-
-            var from = {
-                lon: center.lon,
-                lat: center.lat
-            };
-            var to = {
-                lon: lonlat.lon,
-                lat: lonlat.lat
-            };
-            this.panTween.start(from, to, this.panDuration, {
-                callbacks: {
-                    start: OpenLayers.Function.bind(function(lonlat) {
-                        this.events.triggerEvent("movestart");
-                    }, this),
-                    eachStep: OpenLayers.Function.bind(function(lonlat) {
-                        lonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat);
-                        this.moveTo(lonlat, this.zoom, {
-                            'dragging': true,
-                            'noEvent': true
-                        });
-                    }, this),
-                    done: OpenLayers.Function.bind(function(lonlat) {
-                        lonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat);
-                        this.moveTo(lonlat, this.zoom, {
-                            'noEvent': true
-                        });
-                        this.events.triggerEvent("moveend");
-                    }, this)
-                }
-            });
-        } else {
-            this.setCenter(lonlat);
-        }
-    },
-
-    /**
-     * APIMethod: setCenter
-     * Set the map center (and optionally, the zoom level).
-     * 
-     * Parameters:
-     * lonlat - {<OpenLayers.LonLat>} The new center location.
-     * zoom - {Integer} Optional zoom level.
-     * dragging - {Boolean} Specifies whether or not to trigger 
-     *                      movestart/end events
-     * forceZoomChange - {Boolean} Specifies whether or not to trigger zoom 
-     *                             change events (needed on baseLayer change)
-     *
-     * TBD: reconsider forceZoomChange in 3.0
-     */
-    setCenter: function(lonlat, zoom, dragging, forceZoomChange) {
-        this.moveTo(lonlat, zoom, {
-            'dragging': dragging,
-            'forceZoomChange': forceZoomChange,
-            'caller': 'setCenter'
-        });
-    },
-
-    /**
-     * Method: moveTo
-     *
-     * Parameters:
-     * lonlat - {<OpenLayers.LonLat>}
-     * zoom - {Integer}
-     * options - {Object}
-     */
-    moveTo: function(lonlat, zoom, options) {
-        if (!options) { 
-            options = {};
-        }
-        if (zoom != null) {
-            zoom = parseFloat(zoom);
-            if (!this.fractionalZoom) {
-                zoom = Math.round(zoom);
-            }
-        }
-        // dragging is false by default
-        var dragging = options.dragging;
-        // forceZoomChange is false by default
-        var forceZoomChange = options.forceZoomChange;
-        // noEvent is false by default
-        var noEvent = options.noEvent;
-
-        if (this.panTween && options.caller == "setCenter") {
-            this.panTween.stop();
-        }    
-             
-        if (!this.center && !this.isValidLonLat(lonlat)) {
-            lonlat = this.maxExtent.getCenterLonLat();
-        }
-
-        if(this.restrictedExtent != null) {
-            // In 3.0, decide if we want to change interpretation of maxExtent.
-            if(lonlat == null) { 
-                lonlat = this.getCenter(); 
-            }
-            if(zoom == null) { 
-                zoom = this.getZoom(); 
-            }
-            var resolution = this.getResolutionForZoom(zoom);
-            var extent = this.calculateBounds(lonlat, resolution); 
-            if(!this.restrictedExtent.containsBounds(extent)) {
-                var maxCenter = this.restrictedExtent.getCenterLonLat(); 
-                if(extent.getWidth() > this.restrictedExtent.getWidth()) { 
-                    lonlat = new OpenLayers.LonLat(maxCenter.lon, lonlat.lat); 
-                } else if(extent.left < this.restrictedExtent.left) {
-                    lonlat = lonlat.add(this.restrictedExtent.left -
-                                        extent.left, 0); 
-                } else if(extent.right > this.restrictedExtent.right) { 
-                    lonlat = lonlat.add(this.restrictedExtent.right -
-                                        extent.right, 0); 
-                } 
-                if(extent.getHeight() > this.restrictedExtent.getHeight()) { 
-                    lonlat = new OpenLayers.LonLat(lonlat.lon, maxCenter.lat); 
-                } else if(extent.bottom < this.restrictedExtent.bottom) { 
-                    lonlat = lonlat.add(0, this.restrictedExtent.bottom -
-                                        extent.bottom); 
-                } 
-                else if(extent.top > this.restrictedExtent.top) { 
-                    lonlat = lonlat.add(0, this.restrictedExtent.top -
-                                        extent.top); 
-                } 
-            }
-        }
-        
-        var zoomChanged = forceZoomChange || (
-                            (this.isValidZoomLevel(zoom)) && 
-                            (zoom != this.getZoom()) );
-
-        var centerChanged = (this.isValidLonLat(lonlat)) && 
-                            (!lonlat.equals(this.center));
-
-
-        // if neither center nor zoom will change, no need to do anything
-        if (zoomChanged || centerChanged || !dragging) {
-
-            if (!this.dragging && !noEvent) {
-                this.events.triggerEvent("movestart");
-            }
-
-            if (centerChanged) {
-                if ((!zoomChanged) && (this.center)) { 
-                    // if zoom hasnt changed, just slide layerContainer
-                    //  (must be done before setting this.center to new value)
-                    this.centerLayerContainer(lonlat);
-                }
-                this.center = lonlat.clone();
-            }
-
-            // (re)set the layerContainerDiv's location
-            if ((zoomChanged) || (this.layerContainerOrigin == null)) {
-                this.layerContainerOrigin = this.center.clone();
-                this.layerContainerDiv.style.left = "0px";
-                this.layerContainerDiv.style.top  = "0px";
-            }
-
-            if (zoomChanged) {
-                this.zoom = zoom;
-                this.resolution = this.getResolutionForZoom(zoom);
-                // zoom level has changed, increment viewRequestID.
-                this.viewRequestID++;
-            }    
-            
-            var bounds = this.getExtent();
-            
-            //send the move call to the baselayer and all the overlays    
-
-            if(this.baseLayer.visibility) {
-                this.baseLayer.moveTo(bounds, zoomChanged, dragging);
-                if(dragging) {
-                    this.baseLayer.events.triggerEvent("move");
-                } else {
-                    this.baseLayer.events.triggerEvent("moveend",
-                        {"zoomChanged": zoomChanged}
-                    );
-                }
-            }
-            
-            bounds = this.baseLayer.getExtent();
-            
-            for (var i=0, len=this.layers.length; i<len; i++) {
-                var layer = this.layers[i];
-                if (layer !== this.baseLayer && !layer.isBaseLayer) {
-                    var inRange = layer.calculateInRange();
-                    if (layer.inRange != inRange) {
-                        // the inRange property has changed. If the layer is
-                        // no longer in range, we turn it off right away. If
-                        // the layer is no longer out of range, the moveTo
-                        // call below will turn on the layer.
-                        layer.inRange = inRange;
-                        if (!inRange) {
-                            layer.display(false);
-                        }
-                        this.events.triggerEvent("changelayer", {
-                            layer: layer, property: "visibility"
-                        });
-                    }
-                    if (inRange && layer.visibility) {
-                        layer.moveTo(bounds, zoomChanged, dragging);
-                        if(dragging) {
-                            layer.events.triggerEvent("move");
-                        } else {
-                            layer.events.triggerEvent("moveend",
-                                {"zoomChanged": zoomChanged}
-                            );
-                        }
-                    }
-                }                
-            }
-            
-            if (zoomChanged) {
-                //redraw popups
-                for (var i=0, len=this.popups.length; i<len; i++) {
-                    this.popups[i].updatePosition();
-                }
-            }    
-            
-            this.events.triggerEvent("move");
-    
-            if (zoomChanged) { this.events.triggerEvent("zoomend"); }
-        }
-
-        // even if nothing was done, we want to notify of this
-        if (!dragging && !noEvent) {
-            this.events.triggerEvent("moveend");
-        }
-        
-        // Store the map dragging state for later use
-        this.dragging = !!dragging; 
-
-    },
-
-    /** 
-     * Method: centerLayerContainer
-     * This function takes care to recenter the layerContainerDiv.
-     * 
-     * Parameters:
-     * lonlat - {<OpenLayers.LonLat>}
-     */
-    centerLayerContainer: function (lonlat) {
-
-        var originPx = this.getViewPortPxFromLonLat(this.layerContainerOrigin);
-        var newPx = this.getViewPortPxFromLonLat(lonlat);
-
-        if ((originPx != null) && (newPx != null)) {
-            this.layerContainerDiv.style.left = Math.round(originPx.x - newPx.x) + "px";
-            this.layerContainerDiv.style.top  = Math.round(originPx.y - newPx.y) + "px";
-        }
-    },
-
-    /**
-     * Method: isValidZoomLevel
-     * 
-     * Parameters:
-     * zoomLevel - {Integer}
-     * 
-     * Returns:
-     * {Boolean} Whether or not the zoom level passed in is non-null and 
-     *           within the min/max range of zoom levels.
-     */
-    isValidZoomLevel: function(zoomLevel) {
-       return ( (zoomLevel != null) &&
-                (zoomLevel >= 0) && 
-                (zoomLevel < this.getNumZoomLevels()) );
-    },
-    
-    /**
-     * Method: isValidLonLat
-     * 
-     * Parameters:
-     * lonlat - {<OpenLayers.LonLat>}
-     * 
-     * Returns:
-     * {Boolean} Whether or not the lonlat passed in is non-null and within
-     *           the maxExtent bounds
-     */
-    isValidLonLat: function(lonlat) {
-        var valid = false;
-        if (lonlat != null) {
-            var maxExtent = this.getMaxExtent();
-            valid = maxExtent.containsLonLat(lonlat);        
-        }
-        return valid;
-    },
-
-  /********************************************************/
-  /*                                                      */
-  /*                 Layer Options                        */
-  /*                                                      */
-  /*    Accessor functions to Layer Options parameters    */
-  /*                                                      */
-  /********************************************************/
-    
-    /**
-     * APIMethod: getProjection
-     * This method returns a string representing the projection. In 
-     *     the case of projection support, this will be the srsCode which
-     *     is loaded -- otherwise it will simply be the string value that
-     *     was passed to the projection at startup.
-     *
-     * FIXME: In 3.0, we will remove getProjectionObject, and instead
-     *     return a Projection object from this function. 
-     * 
-     * Returns:
-     * {String} The Projection string from the base layer or null. 
-     */
-    getProjection: function() {
-        var projection = this.getProjectionObject();
-        return projection ? projection.getCode() : null;
-    },
-    
-    /**
-     * APIMethod: getProjectionObject
-     * Returns the projection obect from the baselayer.
-     *
-     * Returns:
-     * {<OpenLayers.Projection>} The Projection of the base layer.
-     */
-    getProjectionObject: function() {
-        var projection = null;
-        if (this.baseLayer != null) {
-            projection = this.baseLayer.projection;
-        }
-        return projection;
-    },
-    
-    /**
-     * APIMethod: getMaxResolution
-     * 
-     * Returns:
-     * {String} The Map's Maximum Resolution
-     */
-    getMaxResolution: function() {
-        var maxResolution = null;
-        if (this.baseLayer != null) {
-            maxResolution = this.baseLayer.maxResolution;
-        }
-        return maxResolution;
-    },
-        
-    /**
-     * APIMethod: getMaxExtent
-     *
-     * Parameters:
-     * options - {Object} 
-     * 
-     * Allowed Options:
-     * restricted - {Boolean} If true, returns restricted extent (if it is 
-     *     available.)
-     *
-     * Returns:
-     * {<OpenLayers.Bounds>} The maxExtent property as set on the current 
-     *     baselayer, unless the 'restricted' option is set, in which case
-     *     the 'restrictedExtent' option from the map is returned (if it
-     *     is set).
-     */
-    getMaxExtent: function (options) {
-        var maxExtent = null;
-        if(options && options.restricted && this.restrictedExtent){
-            maxExtent = this.restrictedExtent;
-        } else if (this.baseLayer != null) {
-            maxExtent = this.baseLayer.maxExtent;
-        }        
-        return maxExtent;
-    },
-    
-    /**
-     * APIMethod: getNumZoomLevels
-     * 
-     * Returns:
-     * {Integer} The total number of zoom levels that can be displayed by the 
-     *           current baseLayer.
-     */
-    getNumZoomLevels: function() {
-        var numZoomLevels = null;
-        if (this.baseLayer != null) {
-            numZoomLevels = this.baseLayer.numZoomLevels;
-        }
-        return numZoomLevels;
-    },
-
-  /********************************************************/
-  /*                                                      */
-  /*                 Baselayer Functions                  */
-  /*                                                      */
-  /*    The following functions, all publicly exposed     */
-  /*       in the API?, are all merely wrappers to the    */
-  /*       the same calls on whatever layer is set as     */
-  /*                the current base layer                */
-  /*                                                      */
-  /********************************************************/
-
-    /**
-     * APIMethod: getExtent
-     * 
-     * Returns:
-     * {<OpenLayers.Bounds>} A Bounds object which represents the lon/lat 
-     *                       bounds of the current viewPort. 
-     *                       If no baselayer is set, returns null.
-     */
-    getExtent: function () {
-        var extent = null;
-        if (this.baseLayer != null) {
-            extent = this.baseLayer.getExtent();
-        }
-        return extent;
-    },
-
-    /**
-     * APIMethod: getResolution
-     * 
-     * Returns:
-     * {Float} The current resolution of the map. 
-     *         If no baselayer is set, returns null.
-     */
-    getResolution: function () {
-        var resolution = null;
-        if (this.baseLayer != null) {
-            resolution = this.baseLayer.getResolution();
-        } else if(this.allOverlays === true && this.layers.length > 0) {
-            // while adding the 1st layer to the map in allOverlays mode,
-            // this.baseLayer is not set yet when we need the resolution
-            // for calculateInRange.
-            resolution = this.layers[0].getResolution();
-        }
-        return resolution;
-    },
-
-    /**
-     * APIMethod: getUnits
-     * 
-     * Returns:
-     * {Float} The current units of the map. 
-     *         If no baselayer is set, returns null.
-     */
-    getUnits: function () {
-        var units = null;
-        if (this.baseLayer != null) {
-            units = this.baseLayer.units;
-        }
-        return units;
-    },
-
-     /**
-      * APIMethod: getScale
-      * 
-      * Returns:
-      * {Float} The current scale denominator of the map. 
-      *         If no baselayer is set, returns null.
-      */
-    getScale: function () {
-        var scale = null;
-        if (this.baseLayer != null) {
-            var res = this.getResolution();
-            var units = this.baseLayer.units;
-            scale = OpenLayers.Util.getScaleFromResolution(res, units);
-        }
-        return scale;
-    },
-
-
-    /**
-     * APIMethod: getZoomForExtent
-     * 
-     * Parameters: 
-     * bounds - {<OpenLayers.Bounds>}
-     * closest - {Boolean} Find the zoom level that most closely fits the 
-     *     specified bounds. Note that this may result in a zoom that does 
-     *     not exactly contain the entire extent.
-     *     Default is false.
-     * 
-     * Returns:
-     * {Integer} A suitable zoom level for the specified bounds.
-     *           If no baselayer is set, returns null.
-     */
-    getZoomForExtent: function (bounds, closest) {
-        var zoom = null;
-        if (this.baseLayer != null) {
-            zoom = this.baseLayer.getZoomForExtent(bounds, closest);
-        }
-        return zoom;
-    },
-
-    /**
-     * APIMethod: getResolutionForZoom
-     * 
-     * Parameter:
-     * zoom - {Float}
-     * 
-     * Returns:
-     * {Float} A suitable resolution for the specified zoom.  If no baselayer
-     *     is set, returns null.
-     */
-    getResolutionForZoom: function(zoom) {
-        var resolution = null;
-        if(this.baseLayer) {
-            resolution = this.baseLayer.getResolutionForZoom(zoom);
-        }
-        return resolution;
-    },
-
-    /**
-     * APIMethod: getZoomForResolution
-     * 
-     * Parameter:
-     * resolution - {Float}
-     * closest - {Boolean} Find the zoom level that corresponds to the absolute 
-     *     closest resolution, which may result in a zoom whose corresponding
-     *     resolution is actually smaller than we would have desired (if this
-     *     is being called from a getZoomForExtent() call, then this means that
-     *     the returned zoom index might not actually contain the entire 
-     *     extent specified... but it'll be close).
-     *     Default is false.
-     * 
-     * Returns:
-     * {Integer} A suitable zoom level for the specified resolution.
-     *           If no baselayer is set, returns null.
-     */
-    getZoomForResolution: function(resolution, closest) {
-        var zoom = null;
-        if (this.baseLayer != null) {
-            zoom = this.baseLayer.getZoomForResolution(resolution, closest);
-        }
-        return zoom;
-    },
-
-  /********************************************************/
-  /*                                                      */
-  /*                  Zooming Functions                   */
-  /*                                                      */
-  /*    The following functions, all publicly exposed     */
-  /*       in the API, are all merely wrappers to the     */
-  /*               the setCenter() function               */
-  /*                                                      */
-  /********************************************************/
-  
-    /** 
-     * APIMethod: zoomTo
-     * Zoom to a specific zoom level
-     * 
-     * Parameters:
-     * zoom - {Integer}
-     */
-    zoomTo: function(zoom) {
-        if (this.isValidZoomLevel(zoom)) {
-            this.setCenter(null, zoom);
-        }
-    },
-    
-    /**
-     * APIMethod: zoomIn
-     * 
-     * Parameters:
-     * zoom - {int}
-     */
-    zoomIn: function() {
-        this.zoomTo(this.getZoom() + 1);
-    },
-    
-    /**
-     * APIMethod: zoomOut
-     * 
-     * Parameters:
-     * zoom - {int}
-     */
-    zoomOut: function() {
-        this.zoomTo(this.getZoom() - 1);
-    },
-
-    /**
-     * APIMethod: zoomToExtent
-     * Zoom to the passed in bounds, recenter
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * closest - {Boolean} Find the zoom level that most closely fits the 
-     *     specified bounds. Note that this may result in a zoom that does 
-     *     not exactly contain the entire extent.
-     *     Default is false.
-     * 
-     */
-    zoomToExtent: function(bounds, closest) {
-        var center = bounds.getCenterLonLat();
-        if (this.baseLayer.wrapDateLine) {
-            var maxExtent = this.getMaxExtent();
-
-            //fix straddling bounds (in the case of a bbox that straddles the 
-            // dateline, it's left and right boundaries will appear backwards. 
-            // we fix this by allowing a right value that is greater than the
-            // max value at the dateline -- this allows us to pass a valid 
-            // bounds to calculate zoom)
-            //
-            bounds = bounds.clone();
-            while (bounds.right < bounds.left) {
-                bounds.right += maxExtent.getWidth();
-            }
-            //if the bounds was straddling (see above), then the center point 
-            // we got from it was wrong. So we take our new bounds and ask it
-            // for the center. Because our new bounds is at least partially 
-            // outside the bounds of maxExtent, the new calculated center 
-            // might also be. We don't want to pass a bad center value to 
-            // setCenter, so we have it wrap itself across the date line.
-            //
-            center = bounds.getCenterLonLat().wrapDateLine(maxExtent);
-        }
-        this.setCenter(center, this.getZoomForExtent(bounds, closest));
-    },
-
-    /** 
-     * APIMethod: zoomToMaxExtent
-     * Zoom to the full extent and recenter.
-     *
-     * Parameters:
-     * options - 
-     * 
-     * Allowed Options:
-     * restricted - {Boolean} True to zoom to restricted extent if it is 
-     *     set. Defaults to true.
-     */
-    zoomToMaxExtent: function(options) {
-        //restricted is true by default
-        var restricted = (options) ? options.restricted : true;
-
-        var maxExtent = this.getMaxExtent({
-            'restricted': restricted 
-        });
-        this.zoomToExtent(maxExtent);
-    },
-
-    /** 
-     * APIMethod: zoomToScale
-     * Zoom to a specified scale 
-     * 
-     * Parameters:
-     * scale - {float}
-     * closest - {Boolean} Find the zoom level that most closely fits the 
-     *     specified scale. Note that this may result in a zoom that does 
-     *     not exactly contain the entire extent.
-     *     Default is false.
-     * 
-     */
-    zoomToScale: function(scale, closest) {
-        var res = OpenLayers.Util.getResolutionFromScale(scale, 
-                                                         this.baseLayer.units);
-        var size = this.getSize();
-        var w_deg = size.w * res;
-        var h_deg = size.h * res;
-        var center = this.getCenter();
-
-        var extent = new OpenLayers.Bounds(center.lon - w_deg / 2,
-                                           center.lat - h_deg / 2,
-                                           center.lon + w_deg / 2,
-                                           center.lat + h_deg / 2);
-        this.zoomToExtent(extent, closest);
-    },
-    
-  /********************************************************/
-  /*                                                      */
-  /*             Translation Functions                    */
-  /*                                                      */
-  /*      The following functions translate between       */
-  /*           LonLat, LayerPx, and ViewPortPx            */
-  /*                                                      */
-  /********************************************************/
-      
-  //
-  // TRANSLATION: LonLat <-> ViewPortPx
-  //
-
-    /**
-     * Method: getLonLatFromViewPortPx
-     * 
-     * Parameters:
-     * viewPortPx - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.LonLat>} An OpenLayers.LonLat which is the passed-in view 
-     *                       port <OpenLayers.Pixel>, translated into lon/lat
-     *                       by the current base layer.
-     */
-    getLonLatFromViewPortPx: function (viewPortPx) {
-        var lonlat = null; 
-        if (this.baseLayer != null) {
-            lonlat = this.baseLayer.getLonLatFromViewPortPx(viewPortPx);
-        }
-        return lonlat;
-    },
-
-    /**
-     * APIMethod: getViewPortPxFromLonLat
-     * 
-     * Parameters:
-     * lonlat - {<OpenLayers.LonLat>}
-     * 
-     * Returns:
-     * {<OpenLayers.Pixel>} An OpenLayers.Pixel which is the passed-in 
-     *                      <OpenLayers.LonLat>, translated into view port 
-     *                      pixels by the current base layer.
-     */
-    getViewPortPxFromLonLat: function (lonlat) {
-        var px = null; 
-        if (this.baseLayer != null) {
-            px = this.baseLayer.getViewPortPxFromLonLat(lonlat);
-        }
-        return px;
-    },
-
-    
-  //
-  // CONVENIENCE TRANSLATION FUNCTIONS FOR API
-  //
-
-    /**
-     * APIMethod: getLonLatFromPixel
-     * 
-     * Parameters:
-     * px - {<OpenLayers.Pixel>}
-     *
-     * Returns:
-     * {<OpenLayers.LonLat>} An OpenLayers.LonLat corresponding to the given
-     *                       OpenLayers.Pixel, translated into lon/lat by the 
-     *                       current base layer
-     */
-    getLonLatFromPixel: function (px) {
-        return this.getLonLatFromViewPortPx(px);
-    },
-
-    /**
-     * APIMethod: getPixelFromLonLat
-     * Returns a pixel location given a map location.  The map location is
-     *     translated to an integer pixel location (in viewport pixel
-     *     coordinates) by the current base layer.
-     * 
-     * Parameters:
-     * lonlat - {<OpenLayers.LonLat>} A map location.
-     * 
-     * Returns: 
-     * {<OpenLayers.Pixel>} An OpenLayers.Pixel corresponding to the 
-     *     <OpenLayers.LonLat> translated into view port pixels by the current
-     *     base layer.
-     */
-    getPixelFromLonLat: function (lonlat) {
-        var px = this.getViewPortPxFromLonLat(lonlat);
-        px.x = Math.round(px.x);
-        px.y = Math.round(px.y);
-        return px;
-    },
-    
-    /**
-     * Method: getGeodesicPixelSize
-     * 
-     * Parameters:
-     * px - {<OpenLayers.Pixel>} The pixel to get the geodesic length for. If
-     *     not provided, the center pixel of the map viewport will be used.
-     * 
-     * Returns:
-     * {<OpenLayers.Size>} The geodesic size of the pixel in kilometers.
-     */
-    getGeodesicPixelSize: function(px) {
-        var lonlat = px ? this.getLonLatFromPixel(px) : (this.getCenter() ||
-            new OpenLayers.LonLat(0, 0));
-        var res = this.getResolution();
-        var left = lonlat.add(-res / 2, 0);
-        var right = lonlat.add(res / 2, 0);
-        var bottom = lonlat.add(0, -res / 2);
-        var top = lonlat.add(0, res / 2);
-        var dest = new OpenLayers.Projection("EPSG:4326");
-        var source = this.getProjectionObject() || dest;
-        if(!source.equals(dest)) {
-            left.transform(source, dest);
-            right.transform(source, dest);
-            bottom.transform(source, dest);
-            top.transform(source, dest);
-        }
-        
-        return new OpenLayers.Size(
-            OpenLayers.Util.distVincenty(left, right),
-            OpenLayers.Util.distVincenty(bottom, top)
-        );
-    },
-
-
-
-  //
-  // TRANSLATION: ViewPortPx <-> LayerPx
-  //
-
-    /**
-     * APIMethod: getViewPortPxFromLayerPx
-     * 
-     * Parameters:
-     * layerPx - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Pixel>} Layer Pixel translated into ViewPort Pixel 
-     *                      coordinates
-     */
-    getViewPortPxFromLayerPx:function(layerPx) {
-        var viewPortPx = null;
-        if (layerPx != null) {
-            var dX = parseInt(this.layerContainerDiv.style.left);
-            var dY = parseInt(this.layerContainerDiv.style.top);
-            viewPortPx = layerPx.add(dX, dY);            
-        }
-        return viewPortPx;
-    },
-    
-    /**
-     * APIMethod: getLayerPxFromViewPortPx
-     * 
-     * Parameters:
-     * viewPortPx - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Pixel>} ViewPort Pixel translated into Layer Pixel 
-     *                      coordinates
-     */
-    getLayerPxFromViewPortPx:function(viewPortPx) {
-        var layerPx = null;
-        if (viewPortPx != null) {
-            var dX = -parseInt(this.layerContainerDiv.style.left);
-            var dY = -parseInt(this.layerContainerDiv.style.top);
-            layerPx = viewPortPx.add(dX, dY);
-            if (isNaN(layerPx.x) || isNaN(layerPx.y)) {
-                layerPx = null;
-            }
-        }
-        return layerPx;
-    },
-    
-  //
-  // TRANSLATION: LonLat <-> LayerPx
-  //
-
-    /**
-     * Method: getLonLatFromLayerPx
-     * 
-     * Parameters:
-     * px - {<OpenLayers.Pixel>}
-     *
-     * Returns:
-     * {<OpenLayers.LonLat>}
-     */
-    getLonLatFromLayerPx: function (px) {
-       //adjust for displacement of layerContainerDiv
-       px = this.getViewPortPxFromLayerPx(px);
-       return this.getLonLatFromViewPortPx(px);         
-    },
-    
-    /**
-     * APIMethod: getLayerPxFromLonLat
-     * 
-     * Parameters:
-     * lonlat - {<OpenLayers.LonLat>} lonlat
-     *
-     * Returns:
-     * {<OpenLayers.Pixel>} An OpenLayers.Pixel which is the passed-in 
-     *                      <OpenLayers.LonLat>, translated into layer pixels 
-     *                      by the current base layer
-     */
-    getLayerPxFromLonLat: function (lonlat) {
-       //adjust for displacement of layerContainerDiv
-       var px = this.getPixelFromLonLat(lonlat);
-       return this.getLayerPxFromViewPortPx(px);         
-    },
-
-    CLASS_NAME: "OpenLayers.Map"
-});
-
-/**
- * Constant: TILE_WIDTH
- * {Integer} 256 Default tile width (unless otherwise specified)
- */
-OpenLayers.Map.TILE_WIDTH = 256;
-/**
- * Constant: TILE_HEIGHT
- * {Integer} 256 Default tile height (unless otherwise specified)
- */
-OpenLayers.Map.TILE_HEIGHT = 256;
-

--- a/labs/openlayers/lib/OpenLayers/Marker.js
+++ /dev/null
@@ -1,243 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Events.js
- * @requires OpenLayers/Icon.js
- */
-
-/**
- * Class: OpenLayers.Marker
- * Instances of OpenLayers.Marker are a combination of a 
- * <OpenLayers.LonLat> and an <OpenLayers.Icon>.  
- *
- * Markers are generally added to a special layer called
- * <OpenLayers.Layer.Markers>.
- *
- * Example:
- * (code)
- * var markers = new OpenLayers.Layer.Markers( "Markers" );
- * map.addLayer(markers);
- *
- * var size = new OpenLayers.Size(21,25);
- * var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
- * var icon = new OpenLayers.Icon('http://www.openlayers.org/dev/img/marker.png', size, offset);
- * markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(0,0),icon));
- * markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(0,0),icon.clone()));
- *
- * (end)
- *
- * Note that if you pass an icon into the Marker constructor, it will take
- * that icon and use it. This means that you should not share icons between
- * markers -- you use them once, but you should clone() for any additional
- * markers using that same icon.
- */
-OpenLayers.Marker = OpenLayers.Class({
-    
-    /** 
-     * Property: icon 
-     * {<OpenLayers.Icon>} The icon used by this marker.
-     */
-    icon: null,
-
-    /** 
-     * Property: lonlat 
-     * {<OpenLayers.LonLat>} location of object
-     */
-    lonlat: null,
-    
-    /** 
-     * Property: events 
-     * {<OpenLayers.Events>} the event handler.
-     */
-    events: null,
-    
-    /** 
-     * Property: map 
-     * {<OpenLayers.Map>} the map this marker is attached to
-     */
-    map: null,
-    
-    /** 
-     * Constructor: OpenLayers.Marker
-     * Parameters:
-     * lonlat - {<OpenLayers.LonLat>} the position of this marker
-     * icon - {<OpenLayers.Icon>}  the icon for this marker
-     */
-    initialize: function(lonlat, icon) {
-        this.lonlat = lonlat;
-        
-        var newIcon = (icon) ? icon : OpenLayers.Marker.defaultIcon();
-        if (this.icon == null) {
-            this.icon = newIcon;
-        } else {
-            this.icon.url = newIcon.url;
-            this.icon.size = newIcon.size;
-            this.icon.offset = newIcon.offset;
-            this.icon.calculateOffset = newIcon.calculateOffset;
-        }
-        this.events = new OpenLayers.Events(this, this.icon.imageDiv, null);
-    },
-    
-    /**
-     * APIMethod: destroy
-     * Destroy the marker. You must first remove the marker from any 
-     * layer which it has been added to, or you will get buggy behavior.
-     * (This can not be done within the marker since the marker does not
-     * know which layer it is attached to.)
-     */
-    destroy: function() {
-        // erase any drawn features
-        this.erase();
-
-        this.map = null;
-
-        this.events.destroy();
-        this.events = null;
-
-        if (this.icon != null) {
-            this.icon.destroy();
-            this.icon = null;
-        }
-    },
-    
-    /** 
-    * Method: draw
-    * Calls draw on the icon, and returns that output.
-    * 
-    * Parameters:
-    * px - {<OpenLayers.Pixel>}
-    * 
-    * Returns:
-    * {DOMElement} A new DOM Image with this marker's icon set at the 
-    * location passed-in
-    */
-    draw: function(px) {
-        return this.icon.draw(px);
-    }, 
-
-    /** 
-    * Method: erase
-    * Erases any drawn elements for this marker.
-    */
-    erase: function() {
-        if (this.icon != null) {
-            this.icon.erase();
-        }
-    }, 
-
-    /**
-    * Method: moveTo
-    * Move the marker to the new location.
-    *
-    * Parameters:
-    * px - {<OpenLayers.Pixel>} the pixel position to move to
-    */
-    moveTo: function (px) {
-        if ((px != null) && (this.icon != null)) {
-            this.icon.moveTo(px);
-        }           
-        this.lonlat = this.map.getLonLatFromLayerPx(px);
-    },
-
-    /**
-     * APIMethod: isDrawn
-     * 
-     * Returns:
-     * {Boolean} Whether or not the marker is drawn.
-     */
-    isDrawn: function() {
-        var isDrawn = (this.icon && this.icon.isDrawn());
-        return isDrawn;   
-    },
-
-    /**
-     * Method: onScreen
-     *
-     * Returns:
-     * {Boolean} Whether or not the marker is currently visible on screen.
-     */
-    onScreen:function() {
-        
-        var onScreen = false;
-        if (this.map) {
-            var screenBounds = this.map.getExtent();
-            onScreen = screenBounds.containsLonLat(this.lonlat);
-        }    
-        return onScreen;
-    },
-    
-    /**
-     * Method: inflate
-     * Englarges the markers icon by the specified ratio.
-     *
-     * Parameters:
-     * inflate - {float} the ratio to enlarge the marker by (passing 2
-     *                   will double the size).
-     */
-    inflate: function(inflate) {
-        if (this.icon) {
-            var newSize = new OpenLayers.Size(this.icon.size.w * inflate,
-                                              this.icon.size.h * inflate);
-            this.icon.setSize(newSize);
-        }        
-    },
-    
-    /** 
-     * Method: setOpacity
-     * Change the opacity of the marker by changin the opacity of 
-     *   its icon
-     * 
-     * Parameters:
-     * opacity - {float}  Specified as fraction (0.4, etc)
-     */
-    setOpacity: function(opacity) {
-        this.icon.setOpacity(opacity);
-    },
-
-    /**
-     * Method: setUrl
-     * Change URL of the Icon Image.
-     * 
-     * url - {String} 
-     */
-    setUrl: function(url) {
-        this.icon.setUrl(url);
-    },    
-
-    /** 
-     * Method: display
-     * Hide or show the icon
-     * 
-     * display - {Boolean} 
-     */
-    display: function(display) {
-        this.icon.display(display);
-    },
-
-    CLASS_NAME: "OpenLayers.Marker"
-});
-
-
-/**
- * Function: defaultIcon
- * Creates a default <OpenLayers.Icon>.
- * 
- * Returns:
- * {<OpenLayers.Icon>} A default OpenLayers.Icon to use for a marker
- */
-OpenLayers.Marker.defaultIcon = function() {
-    var url = OpenLayers.Util.getImagesLocation() + "marker.png";
-    var size = new OpenLayers.Size(21, 25);
-    var calculateOffset = function(size) {
-                    return new OpenLayers.Pixel(-(size.w/2), -size.h);
-                 };
-
-    return new OpenLayers.Icon(url, size, null, calculateOffset);        
-};
-    
-
-

--- a/labs/openlayers/lib/OpenLayers/Marker/Box.js
+++ /dev/null
@@ -1,121 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Marker.js
- */
-
-/**
- * Class: OpenLayers.Marker.Box
- *
- * Inherits from:
- *  - <OpenLayers.Marker> 
- */
-OpenLayers.Marker.Box = OpenLayers.Class(OpenLayers.Marker, {
-
-    /** 
-     * Property: bounds 
-     * {<OpenLayers.Bounds>} 
-     */
-    bounds: null,
-
-    /** 
-     * Property: div 
-     * {DOMElement} 
-     */
-    div: null,
-    
-    /** 
-     * Constructor: OpenLayers.Marker.Box
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>} 
-     * borderColor - {String} 
-     * borderWidth - {int} 
-     */
-    initialize: function(bounds, borderColor, borderWidth) {
-        this.bounds = bounds;
-        this.div    = OpenLayers.Util.createDiv();
-        this.div.style.overflow = 'hidden';
-        this.events = new OpenLayers.Events(this, this.div, null);
-        this.setBorder(borderColor, borderWidth);
-    },
-
-    /**
-     * Method: destroy 
-     */    
-    destroy: function() {
-
-        this.bounds = null;
-        this.div = null;
-
-        OpenLayers.Marker.prototype.destroy.apply(this, arguments);
-    },
-
-    /** 
-     * Method: setBorder
-     * Allow the user to change the box's color and border width
-     * 
-     * Parameters:
-     * color - {String} Default is "red"
-     * width - {int} Default is 2
-     */
-    setBorder: function (color, width) {
-        if (!color) {
-            color = "red";
-        }
-        if (!width) {
-            width = 2;
-        }
-        this.div.style.border = width + "px solid " + color;
-    },
-    
-    /** 
-    * Method: draw
-    * 
-    * Parameters:
-    * px - {<OpenLayers.Pixel>} 
-    * sz - {<OpenLayers.Size>} 
-    * 
-    * Returns: 

-    *         location passed-in
-    */
-    draw: function(px, sz) {
-        OpenLayers.Util.modifyDOMElement(this.div, null, px, sz);
-        return this.div;
-    }, 
-
-    /**
-     * Method: onScreen
-     * 
-     * Rreturn:
-     * {Boolean} Whether or not the marker is currently visible on screen.
-     */
-    onScreen:function() {
-        var onScreen = false;
-        if (this.map) {
-            var screenBounds = this.map.getExtent();
-            onScreen = screenBounds.containsBounds(this.bounds, true, true);
-        }    
-        return onScreen;
-    },
-    
-    /**
-     * Method: display
-     * Hide or show the icon
-     * 
-     * Parameters:
-     * display - {Boolean} 
-     */
-    display: function(display) {
-        this.div.style.display = (display) ? "" : "none";
-    },
-
-    CLASS_NAME: "OpenLayers.Marker.Box"
-});
-
-

--- a/labs/openlayers/lib/OpenLayers/Popup.js
+++ /dev/null
@@ -1,1053 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * Class: OpenLayers.Popup
- * A popup is a small div that can opened and closed on the map.
- * Typically opened in response to clicking on a marker.  
- * See <OpenLayers.Marker>.  Popup's don't require their own
- * layer and are added the the map using the <OpenLayers.Map.addPopup>
- * method.
- *
- * Example:
- * (code)
- * popup = new OpenLayers.Popup("chicken", 
- *                    new OpenLayers.LonLat(5,40),
- *                    new OpenLayers.Size(200,200),
- *                    "example popup",
- *                    true);
- *       
- * map.addPopup(popup);
- * (end)
- */
-OpenLayers.Popup = OpenLayers.Class({
-
-    /** 
-     * Property: events  
-     * {<OpenLayers.Events>} custom event manager 
-     */
-    events: null,
-    
-    /** Property: id
-     * {String} the unique identifier assigned to this popup.
-     */
-    id: "",
-
-    /** 
-     * Property: lonlat 
-     * {<OpenLayers.LonLat>} the position of this popup on the map
-     */
-    lonlat: null,
-
-    /** 
-     * Property: div 
-     * {DOMElement} the div that contains this popup.
-     */
-    div: null,
-
-    /** 
-     * Property: contentSize 
-     * {<OpenLayers.Size>} the width and height of the content.
-     */
-    contentSize: null,    
-
-    /** 
-     * Property: size 
-     * {<OpenLayers.Size>} the width and height of the popup.
-     */
-    size: null,    
-
-    /** 
-     * Property: contentHTML 
-     * {String} An HTML string for this popup to display.
-     */
-    contentHTML: null,
-    
-    /** 
-     * Property: backgroundColor 
-     * {String} the background color used by the popup.
-     */
-    backgroundColor: "",
-    
-    /** 
-     * Property: opacity 
-     * {float} the opacity of this popup (between 0.0 and 1.0)
-     */
-    opacity: "",
-
-    /** 
-     * Property: border 
-     * {String} the border size of the popup.  (eg 2px)
-     */
-    border: "",
-    
-    /** 
-     * Property: contentDiv 
-     * {DOMElement} a reference to the element that holds the content of
-     *              the div.
-     */
-    contentDiv: null,
-    
-    /** 
-     * Property: groupDiv 
-     * {DOMElement} First and only child of 'div'. The group Div contains the
-     *     'contentDiv' and the 'closeDiv'.
-     */
-    groupDiv: null,
-
-    /** 
-     * Property: closeDiv
-     * {DOMElement} the optional closer image
-     */
-    closeDiv: null,
-
-    /** 
-     * APIProperty: autoSize
-     * {Boolean} Resize the popup to auto-fit the contents.
-     *     Default is false.
-     */
-    autoSize: false,
-
-    /**
-     * APIProperty: minSize
-     * {<OpenLayers.Size>} Minimum size allowed for the popup's contents.
-     */
-    minSize: null,
-
-    /**
-     * APIProperty: maxSize
-     * {<OpenLayers.Size>} Maximum size allowed for the popup's contents.
-     */
-    maxSize: null,
-
-    /** 
-     * Property: displayClass
-     * {String} The CSS class of the popup.
-     */
-    displayClass: "olPopup",
-
-    /** 
-     * Property: contentDisplayClass
-     * {String} The CSS class of the popup content div.
-     */
-    contentDisplayClass: "olPopupContent",
-
-    /** 
-     * Property: padding 
-     * {int or <OpenLayers.Bounds>} An extra opportunity to specify internal 
-     *     padding of the content div inside the popup. This was originally
-     *     confused with the css padding as specified in style.css's 
-     *     'olPopupContent' class. We would like to get rid of this altogether,
-     *     except that it does come in handy for the framed and anchoredbubble
-     *     popups, who need to maintain yet another barrier between their 
-     *     content and the outer border of the popup itself. 
-     * 
-     *     Note that in order to not break API, we must continue to support 
-     *     this property being set as an integer. Really, though, we'd like to 
-     *     have this specified as a Bounds object so that user can specify
-     *     distinct left, top, right, bottom paddings. With the 3.0 release
-     *     we can make this only a bounds.
-     */
-    padding: 0,
-
-    /** 
-     * Property: disableFirefoxOverflowHack
-     * {Boolean} The hack for overflow in Firefox causes all elements 
-     *     to be re-drawn, which causes Flash elements to be 
-     *     re-initialized, which is troublesome.
-     *     With this property the hack can be disabled.
-     */
-    disableFirefoxOverflowHack: false,
-
-    /**
-     * Method: fixPadding
-     * To be removed in 3.0, this function merely helps us to deal with the 
-     *     case where the user may have set an integer value for padding, 
-     *     instead of an <OpenLayers.Bounds> object.
-     */
-    fixPadding: function() {
-        if (typeof this.padding == "number") {
-            this.padding = new OpenLayers.Bounds(
-                this.padding, this.padding, this.padding, this.padding
-            );
-        }
-    },
-
-    /**
-     * APIProperty: panMapIfOutOfView
-     * {Boolean} When drawn, pan map such that the entire popup is visible in
-     *     the current viewport (if necessary).
-     *     Default is false.
-     */
-    panMapIfOutOfView: false,
-    
-    /**
-     * APIProperty: keepInMap 
-     * {Boolean} If panMapIfOutOfView is false, and this property is true, 
-     *     contrain the popup such that it always fits in the available map
-     *     space. By default, this is not set on the base class. If you are
-     *     creating popups that are near map edges and not allowing pannning,
-     *     and especially if you have a popup which has a
-     *     fixedRelativePosition, setting this to false may be a smart thing to
-     *     do. Subclasses may want to override this setting.
-     *   
-     *     Default is false.
-     */
-    keepInMap: false,
-
-    /**
-     * APIProperty: closeOnMove
-     * {Boolean} When map pans, close the popup.
-     *     Default is false.
-     */
-    closeOnMove: false,
-    
-    /** 
-     * Property: map 
-     * {<OpenLayers.Map>} this gets set in Map.js when the popup is added to the map
-     */
-    map: null,
-
-    /** 
-    * Constructor: OpenLayers.Popup
-    * Create a popup.
-    * 
-    * Parameters: 
-    * id - {String} a unqiue identifier for this popup.  If null is passed
-    *               an identifier will be automatically generated. 
-    * lonlat - {<OpenLayers.LonLat>}  The position on the map the popup will
-    *                                 be shown.
-    * contentSize - {<OpenLayers.Size>} The size of the content.
-    * contentHTML - {String}          An HTML string to display inside the   
-    *                                 popup.
-    * closeBox - {Boolean}            Whether to display a close box inside
-    *                                 the popup.
-    * closeBoxCallback - {Function}   Function to be called on closeBox click.
-    */
-    initialize:function(id, lonlat, contentSize, contentHTML, closeBox, closeBoxCallback) {
-        if (id == null) {
-            id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
-        }
-
-        this.id = id;
-        this.lonlat = lonlat;
-
-        this.contentSize = (contentSize != null) ? contentSize 
-                                  : new OpenLayers.Size(
-                                                   OpenLayers.Popup.WIDTH,
-                                                   OpenLayers.Popup.HEIGHT);
-        if (contentHTML != null) { 
-             this.contentHTML = contentHTML;
-        }
-        this.backgroundColor = OpenLayers.Popup.COLOR;
-        this.opacity = OpenLayers.Popup.OPACITY;
-        this.border = OpenLayers.Popup.BORDER;
-
-        this.div = OpenLayers.Util.createDiv(this.id, null, null, 
-                                             null, null, null, "hidden");
-        this.div.className = this.displayClass;
-        
-        var groupDivId = this.id + "_GroupDiv";
-        this.groupDiv = OpenLayers.Util.createDiv(groupDivId, null, null, 
-                                                    null, "relative", null,
-                                                    "hidden");
-
-        var id = this.div.id + "_contentDiv";
-        this.contentDiv = OpenLayers.Util.createDiv(id, null, this.contentSize.clone(), 
-                                                    null, "relative");
-        this.contentDiv.className = this.contentDisplayClass;
-        this.groupDiv.appendChild(this.contentDiv);
-        this.div.appendChild(this.groupDiv);
-
-        if (closeBox) {
-            this.addCloseBox(closeBoxCallback);
-        } 
-
-        this.registerEvents();
-    },
-
-    /** 
-     * Method: destroy
-     * nullify references to prevent circular references and memory leaks
-     */
-    destroy: function() {
-
-        this.id = null;
-        this.lonlat = null;
-        this.size = null;
-        this.contentHTML = null;
-        
-        this.backgroundColor = null;
-        this.opacity = null;
-        this.border = null;
-        
-        if (this.closeOnMove && this.map) {
-            this.map.events.unregister("movestart", this, this.hide);
-        }
-
-        this.events.destroy();
-        this.events = null;
-        
-        if (this.closeDiv) {
-            OpenLayers.Event.stopObservingElement(this.closeDiv); 
-            this.groupDiv.removeChild(this.closeDiv);
-        }
-        this.closeDiv = null;
-        
-        this.div.removeChild(this.groupDiv);
-        this.groupDiv = null;
-
-        if (this.map != null) {
-            this.map.removePopup(this);
-        }
-        this.map = null;
-        this.div = null;
-        
-        this.autoSize = null;
-        this.minSize = null;
-        this.maxSize = null;
-        this.padding = null;
-        this.panMapIfOutOfView = null;
-    },
-
-    /** 
-    * Method: draw
-    * Constructs the elements that make up the popup.
-    *
-    * Parameters:
-    * px - {<OpenLayers.Pixel>} the position the popup in pixels.
-    * 
-    * Returns:
-    * {DOMElement} Reference to a div that contains the drawn popup
-    */
-    draw: function(px) {
-        if (px == null) {
-            if ((this.lonlat != null) && (this.map != null)) {
-                px = this.map.getLayerPxFromLonLat(this.lonlat);
-            }
-        }
-
-        // this assumes that this.map already exists, which is okay because 
-        // this.draw is only called once the popup has been added to the map.
-        if (this.closeOnMove) {
-            this.map.events.register("movestart", this, this.hide);
-        }
-        
-        //listen to movestart, moveend to disable overflow (FF bug)
-        if (!this.disableFirefoxOverflowHack && OpenLayers.Util.getBrowserName() == 'firefox') {
-            this.map.events.register("movestart", this, function() {
-                var style = document.defaultView.getComputedStyle(
-                    this.contentDiv, null
-                );
-                var currentOverflow = style.getPropertyValue("overflow");
-                if (currentOverflow != "hidden") {
-                    this.contentDiv._oldOverflow = currentOverflow;
-                    this.contentDiv.style.overflow = "hidden";
-                }
-            });
-            this.map.events.register("moveend", this, function() {
-                var oldOverflow = this.contentDiv._oldOverflow;
-                if (oldOverflow) {
-                    this.contentDiv.style.overflow = oldOverflow;
-                    this.contentDiv._oldOverflow = null;
-                }
-            });
-        }
-
-        this.moveTo(px);
-        if (!this.autoSize && !this.size) {
-            this.setSize(this.contentSize);
-        }
-        this.setBackgroundColor();
-        this.setOpacity();
-        this.setBorder();
-        this.setContentHTML();
-        
-        if (this.panMapIfOutOfView) {
-            this.panIntoView();
-        }    
-
-        return this.div;
-    },
-
-    /** 
-     * Method: updatePosition
-     * if the popup has a lonlat and its map members set, 
-     * then have it move itself to its proper position
-     */
-    updatePosition: function() {
-        if ((this.lonlat) && (this.map)) {
-            var px = this.map.getLayerPxFromLonLat(this.lonlat);
-            if (px) {
-                this.moveTo(px);           
-            }    
-        }
-    },
-
-    /**
-     * Method: moveTo
-     * 
-     * Parameters:
-     * px - {<OpenLayers.Pixel>} the top and left position of the popup div. 
-     */
-    moveTo: function(px) {
-        if ((px != null) && (this.div != null)) {
-            this.div.style.left = px.x + "px";
-            this.div.style.top = px.y + "px";
-        }
-    },
-
-    /**
-     * Method: visible
-     *
-     * Returns:      
-     * {Boolean} Boolean indicating whether or not the popup is visible
-     */
-    visible: function() {
-        return OpenLayers.Element.visible(this.div);
-    },
-
-    /**
-     * Method: toggle
-     * Toggles visibility of the popup.
-     */
-    toggle: function() {
-        if (this.visible()) {
-            this.hide();
-        } else {
-            this.show();
-        }
-    },
-
-    /**
-     * Method: show
-     * Makes the popup visible.
-     */
-    show: function() {
-        OpenLayers.Element.show(this.div);
-
-        if (this.panMapIfOutOfView) {
-            this.panIntoView();
-        }    
-    },
-
-    /**
-     * Method: hide
-     * Makes the popup invisible.
-     */
-    hide: function() {
-        OpenLayers.Element.hide(this.div);
-    },
-
-    /**
-     * Method: setSize
-     * Used to adjust the size of the popup. 
-     *
-     * Parameters:
-     * contentSize - {<OpenLayers.Size>} the new size for the popup's 
-     *     contents div (in pixels).
-     */
-    setSize:function(contentSize) { 
-        this.size = contentSize.clone(); 
-        
-        // if our contentDiv has a css 'padding' set on it by a stylesheet, we 
-        //  must add that to the desired "size". 
-        var contentDivPadding = this.getContentDivPadding();
-        var wPadding = contentDivPadding.left + contentDivPadding.right;
-        var hPadding = contentDivPadding.top + contentDivPadding.bottom;
-
-        // take into account the popup's 'padding' property
-        this.fixPadding();
-        wPadding += this.padding.left + this.padding.right;
-        hPadding += this.padding.top + this.padding.bottom;
-
-        // make extra space for the close div
-        if (this.closeDiv) {
-            var closeDivWidth = parseInt(this.closeDiv.style.width);
-            wPadding += closeDivWidth + contentDivPadding.right;
-        }
-
-        //increase size of the main popup div to take into account the 
-        // users's desired padding and close div.        
-        this.size.w += wPadding;
-        this.size.h += hPadding;
-
-        //now if our browser is IE, we need to actually make the contents 
-        // div itself bigger to take its own padding into effect. this makes 
-        // me want to shoot someone, but so it goes.
-        if (OpenLayers.Util.getBrowserName() == "msie") {
-            this.contentSize.w += 
-                contentDivPadding.left + contentDivPadding.right;
-            this.contentSize.h += 
-                contentDivPadding.bottom + contentDivPadding.top;
-        }
-
-        if (this.div != null) {
-            this.div.style.width = this.size.w + "px";
-            this.div.style.height = this.size.h + "px";
-        }
-        if (this.contentDiv != null){
-            this.contentDiv.style.width = contentSize.w + "px";
-            this.contentDiv.style.height = contentSize.h + "px";
-        }
-    },  
-
-    /**
-     * APIMethod: updateSize
-     * Auto size the popup so that it precisely fits its contents (as 
-     *     determined by this.contentDiv.innerHTML). Popup size will, of
-     *     course, be limited by the available space on the current map
-     */
-    updateSize: function() {
-        
-        // determine actual render dimensions of the contents by putting its
-        // contents into a fake contentDiv (for the CSS) and then measuring it
-        var preparedHTML = "<div class='" + this.contentDisplayClass+ "'>" + 
-            this.contentDiv.innerHTML + 
-            "</div>";
- 
-        var containerElement = (this.map) ? this.map.layerContainerDiv
-        								  : document.body;
-        var realSize = OpenLayers.Util.getRenderedDimensions(
-            preparedHTML, null,	{
-                displayClass: this.displayClass,
-                containerElement: containerElement
-            }
-        );
-
-        // is the "real" size of the div is safe to display in our map?
-        var safeSize = this.getSafeContentSize(realSize);
-
-        var newSize = null;
-        if (safeSize.equals(realSize)) {
-            //real size of content is small enough to fit on the map, 
-            // so we use real size.
-            newSize = realSize;
-
-        } else {
-
-            //make a new OL.Size object with the clipped dimensions 
-            // set or null if not clipped.
-            var fixedSize = new OpenLayers.Size();
-            fixedSize.w = (safeSize.w < realSize.w) ? safeSize.w : null;
-            fixedSize.h = (safeSize.h < realSize.h) ? safeSize.h : null;
-        
-            if (fixedSize.w && fixedSize.h) {
-                //content is too big in both directions, so we will use 
-                // max popup size (safeSize), knowing well that it will 
-                // overflow both ways.                
-                newSize = safeSize;
-            } else {
-                //content is clipped in only one direction, so we need to 
-                // run getRenderedDimensions() again with a fixed dimension
-                var clippedSize = OpenLayers.Util.getRenderedDimensions(
-                    preparedHTML, fixedSize, {
-                        displayClass: this.contentDisplayClass,
-                        containerElement: containerElement
-                    }
-                );
-                
-                //if the clipped size is still the same as the safeSize, 
-                // that means that our content must be fixed in the 
-                // offending direction. If overflow is 'auto', this means 
-                // we are going to have a scrollbar for sure, so we must 
-                // adjust for that.
-                //
-                var currentOverflow = OpenLayers.Element.getStyle(
-                    this.contentDiv, "overflow"
-                );
-                if ( (currentOverflow != "hidden") && 
-                     (clippedSize.equals(safeSize)) ) {
-                    var scrollBar = OpenLayers.Util.getScrollbarWidth();
-                    if (fixedSize.w) {
-                        clippedSize.h += scrollBar;
-                    } else {
-                        clippedSize.w += scrollBar;
-                    }
-                }
-                
-                newSize = this.getSafeContentSize(clippedSize);
-            }
-        }                        
-        this.setSize(newSize);     
-    },    
-
-    /**
-     * Method: setBackgroundColor
-     * Sets the background color of the popup.
-     *
-     * Parameters:
-     * color - {String} the background color.  eg "#FFBBBB"
-     */
-    setBackgroundColor:function(color) { 
-        if (color != undefined) {
-            this.backgroundColor = color; 
-        }
-        
-        if (this.div != null) {
-            this.div.style.backgroundColor = this.backgroundColor;
-        }
-    },  
-    
-    /**
-     * Method: setOpacity
-     * Sets the opacity of the popup.
-     * 
-     * Parameters:
-     * opacity - {float} A value between 0.0 (transparent) and 1.0 (solid).   
-     */
-    setOpacity:function(opacity) { 
-        if (opacity != undefined) {
-            this.opacity = opacity; 
-        }
-        
-        if (this.div != null) {
-            // for Mozilla and Safari
-            this.div.style.opacity = this.opacity;
-
-            // for IE
-            this.div.style.filter = 'alpha(opacity=' + this.opacity*100 + ')';
-        }
-    },  
-    
-    /**
-     * Method: setBorder
-     * Sets the border style of the popup.
-     *
-     * Parameters:
-     * border - {String} The border style value. eg 2px 
-     */
-    setBorder:function(border) { 
-        if (border != undefined) {
-            this.border = border;
-        }
-        
-        if (this.div != null) {
-            this.div.style.border = this.border;
-        }
-    },      
-    
-    /**
-     * Method: setContentHTML
-     * Allows the user to set the HTML content of the popup.
-     *
-     * Parameters:
-     * contentHTML - {String} HTML for the div.
-     */
-    setContentHTML:function(contentHTML) {
-
-        if (contentHTML != null) {
-            this.contentHTML = contentHTML;
-        }
-       
-        if ((this.contentDiv != null) && 
-            (this.contentHTML != null) &&
-            (this.contentHTML != this.contentDiv.innerHTML)) {
-       
-            this.contentDiv.innerHTML = this.contentHTML;
-       
-            if (this.autoSize) {
-                
-                //if popup has images, listen for when they finish
-                // loading and resize accordingly
-                this.registerImageListeners();
-
-                //auto size the popup to its current contents
-                this.updateSize();
-            }
-        }    
-
-    },
-    
-    /**
-     * Method: registerImageListeners
-     * Called when an image contained by the popup loaded. this function
-     *     updates the popup size, then unregisters the image load listener.
-     */   
-    registerImageListeners: function() { 
-
-        // As the images load, this function will call updateSize() to 
-        // resize the popup to fit the content div (which presumably is now
-        // bigger than when the image was not loaded).
-        // 
-        // If the 'panMapIfOutOfView' property is set, we will pan the newly
-        // resized popup back into view.
-        // 
-        // Note that this function, when called, will have 'popup' and 
-        // 'img' properties in the context.
-        //
-        var onImgLoad = function() {
-            
-            this.popup.updateSize();
-     
-            if ( this.popup.visible() && this.popup.panMapIfOutOfView ) {
-                this.popup.panIntoView();
-            }
-
-            OpenLayers.Event.stopObserving(
-                this.img, "load", this.img._onImageLoad
-            );
-    
-        };
-
-        //cycle through the images and if their size is 0x0, that means that 
-        // they haven't been loaded yet, so we attach the listener, which 
-        // will fire when the images finish loading and will resize the 
-        // popup accordingly to its new size.
-        var images = this.contentDiv.getElementsByTagName("img");
-        for (var i = 0, len = images.length; i < len; i++) {
-            var img = images[i];
-            if (img.width == 0 || img.height == 0) {
-
-                var context = {
-                    'popup': this,
-                    'img': img
-                };
-
-                //expando this function to the image itself before registering
-                // it. This way we can easily and properly unregister it.
-                img._onImgLoad = OpenLayers.Function.bind(onImgLoad, context);
-
-                OpenLayers.Event.observe(img, 'load', img._onImgLoad);
-            }    
-        } 
-    },
-
-    /**
-     * APIMethod: getSafeContentSize
-     * 
-     * Parameters:
-     * size - {<OpenLayers.Size>} Desired size to make the popup.
-     * 
-     * Returns:
-     * {<OpenLayers.Size>} A size to make the popup which is neither smaller
-     *     than the specified minimum size, nor bigger than the maximum 
-     *     size (which is calculated relative to the size of the viewport).
-     */
-    getSafeContentSize: function(size) {
-
-        var safeContentSize = size.clone();
-
-        // if our contentDiv has a css 'padding' set on it by a stylesheet, we 
-        //  must add that to the desired "size". 
-        var contentDivPadding = this.getContentDivPadding();
-        var wPadding = contentDivPadding.left + contentDivPadding.right;
-        var hPadding = contentDivPadding.top + contentDivPadding.bottom;
-
-        // take into account the popup's 'padding' property
-        this.fixPadding();
-        wPadding += this.padding.left + this.padding.right;
-        hPadding += this.padding.top + this.padding.bottom;
-
-        if (this.closeDiv) {
-            var closeDivWidth = parseInt(this.closeDiv.style.width);
-            wPadding += closeDivWidth + contentDivPadding.right;
-        }
-
-        // prevent the popup from being smaller than a specified minimal size
-        if (this.minSize) {
-            safeContentSize.w = Math.max(safeContentSize.w, 
-                (this.minSize.w - wPadding));
-            safeContentSize.h = Math.max(safeContentSize.h, 
-                (this.minSize.h - hPadding));
-        }
-
-        // prevent the popup from being bigger than a specified maximum size
-        if (this.maxSize) {
-            safeContentSize.w = Math.min(safeContentSize.w, 
-                (this.maxSize.w - wPadding));
-            safeContentSize.h = Math.min(safeContentSize.h, 
-                (this.maxSize.h - hPadding));
-        }
-        
-        //make sure the desired size to set doesn't result in a popup that 
-        // is bigger than the map's viewport.
-        //
-        if (this.map && this.map.size) {
-            
-            var extraX = 0, extraY = 0;
-            if (this.keepInMap && !this.panMapIfOutOfView) {
-                var px = this.map.getPixelFromLonLat(this.lonlat);
-                switch (this.relativePosition) {
-                    case "tr":
-                        extraX = px.x;
-                        extraY = this.map.size.h - px.y;
-                        break;
-                    case "tl":
-                        extraX = this.map.size.w - px.x;
-                        extraY = this.map.size.h - px.y;
-                        break;
-                    case "bl":
-                        extraX = this.map.size.w - px.x;
-                        extraY = px.y;
-                        break;
-                    case "br":
-                        extraX = px.x;
-                        extraY = px.y;
-                        break;
-                    default:    
-                        extraX = px.x;
-                        extraY = this.map.size.h - px.y;
-                        break;
-                }
-            }    
-          
-            var maxY = this.map.size.h - 
-                this.map.paddingForPopups.top - 
-                this.map.paddingForPopups.bottom - 
-                hPadding - extraY;
-            
-            var maxX = this.map.size.w - 
-                this.map.paddingForPopups.left - 
-                this.map.paddingForPopups.right - 
-                wPadding - extraX;
-            
-            safeContentSize.w = Math.min(safeContentSize.w, maxX);
-            safeContentSize.h = Math.min(safeContentSize.h, maxY);
-        }
-        
-        return safeContentSize;
-    },
-    
-    /**
-     * Method: getContentDivPadding
-     * Glorious, oh glorious hack in order to determine the css 'padding' of 
-     *     the contentDiv. IE/Opera return null here unless we actually add the 
-     *     popup's main 'div' element (which contains contentDiv) to the DOM. 
-     *     So we make it invisible and then add it to the document temporarily. 
-     *
-     *     Once we've taken the padding readings we need, we then remove it 
-     *     from the DOM (it will actually get added to the DOM in 
-     *     Map.js's addPopup)
-     *
-     * Returns:
-     * {<OpenLayers.Bounds>}
-     */
-    getContentDivPadding: function() {
-
-        //use cached value if we have it
-        var contentDivPadding = this._contentDivPadding;
-        if (!contentDivPadding) {
-
-        	if (this.div.parentNode == null) {
-	        	//make the div invisible and add it to the page        
-	            this.div.style.display = "none";
-	            document.body.appendChild(this.div);
-	    	}
-	            
-            //read the padding settings from css, put them in an OL.Bounds        
-            contentDivPadding = new OpenLayers.Bounds(
-                OpenLayers.Element.getStyle(this.contentDiv, "padding-left"),
-                OpenLayers.Element.getStyle(this.contentDiv, "padding-bottom"),
-                OpenLayers.Element.getStyle(this.contentDiv, "padding-right"),
-                OpenLayers.Element.getStyle(this.contentDiv, "padding-top")
-            );
-    
-            //cache the value
-            this._contentDivPadding = contentDivPadding;
-
-            if (this.div.parentNode == document.body) {
-	            //remove the div from the page and make it visible again
-	            document.body.removeChild(this.div);
-	            this.div.style.display = "";
-            }
-        }
-        return contentDivPadding;
-    },
-
-    /**
-     * Method: addCloseBox
-     * 
-     * Parameters:
-     * callback - {Function} The callback to be called when the close button
-     *     is clicked.
-     */
-    addCloseBox: function(callback) {
-
-        this.closeDiv = OpenLayers.Util.createDiv(
-            this.id + "_close", null, new OpenLayers.Size(17, 17)
-        );
-        this.closeDiv.className = "olPopupCloseBox"; 
-        
-        // use the content div's css padding to determine if we should
-        //  padd the close div
-        var contentDivPadding = this.getContentDivPadding();
-         
-        this.closeDiv.style.right = contentDivPadding.right + "px";
-        this.closeDiv.style.top = contentDivPadding.top + "px";
-        this.groupDiv.appendChild(this.closeDiv);
-
-        var closePopup = callback || function(e) {
-            this.hide();
-            OpenLayers.Event.stop(e);
-        };
-        OpenLayers.Event.observe(this.closeDiv, "click", 
-                OpenLayers.Function.bindAsEventListener(closePopup, this));
-    },
-
-    /**
-     * Method: panIntoView
-     * Pans the map such that the popup is totaly viewable (if necessary)
-     */
-    panIntoView: function() {
-        
-        var mapSize = this.map.getSize();
-    
-        //start with the top left corner of the popup, in px, 
-        // relative to the viewport
-        var origTL = this.map.getViewPortPxFromLayerPx( new OpenLayers.Pixel(
-            parseInt(this.div.style.left),
-            parseInt(this.div.style.top)
-        ));
-        var newTL = origTL.clone();
-    
-        //new left (compare to margins, using this.size to calculate right)
-        if (origTL.x < this.map.paddingForPopups.left) {
-            newTL.x = this.map.paddingForPopups.left;
-        } else 
-        if ( (origTL.x + this.size.w) > (mapSize.w - this.map.paddingForPopups.right)) {
-            newTL.x = mapSize.w - this.map.paddingForPopups.right - this.size.w;
-        }
-        
-        //new top (compare to margins, using this.size to calculate bottom)
-        if (origTL.y < this.map.paddingForPopups.top) {
-            newTL.y = this.map.paddingForPopups.top;
-        } else 
-        if ( (origTL.y + this.size.h) > (mapSize.h - this.map.paddingForPopups.bottom)) {
-            newTL.y = mapSize.h - this.map.paddingForPopups.bottom - this.size.h;
-        }
-        
-        var dx = origTL.x - newTL.x;
-        var dy = origTL.y - newTL.y;
-        
-        this.map.pan(dx, dy);
-    },
-
-    /** 
-     * Method: registerEvents
-     * Registers events on the popup.
-     *
-     * Do this in a separate function so that subclasses can 
-     *   choose to override it if they wish to deal differently
-     *   with mouse events
-     * 
-     *   Note in the following handler functions that some special
-     *    care is needed to deal correctly with mousing and popups. 
-     *   
-     *   Because the user might select the zoom-rectangle option and
-     *    then drag it over a popup, we need a safe way to allow the
-     *    mousemove and mouseup events to pass through the popup when
-     *    they are initiated from outside.
-     * 
-     *   Otherwise, we want to essentially kill the event propagation
-     *    for all other events, though we have to do so carefully, 
-     *    without disabling basic html functionality, like clicking on 
-     *    hyperlinks or drag-selecting text.
-     */
-     registerEvents:function() {
-        this.events = new OpenLayers.Events(this, this.div, null, true);
-
-        this.events.on({
-            "mousedown": this.onmousedown,
-            "mousemove": this.onmousemove,
-            "mouseup": this.onmouseup,
-            "click": this.onclick,
-            "mouseout": this.onmouseout,
-            "dblclick": this.ondblclick,
-            scope: this
-        });
-        
-     },
-
-    /** 
-     * Method: onmousedown 
-     * When mouse goes down within the popup, make a note of
-     *   it locally, and then do not propagate the mousedown 
-     *   (but do so safely so that user can select text inside)
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    onmousedown: function (evt) {
-        this.mousedown = true;
-        OpenLayers.Event.stop(evt, true);
-    },
-
-    /** 
-     * Method: onmousemove
-     * If the drag was started within the popup, then 
-     *   do not propagate the mousemove (but do so safely
-     *   so that user can select text inside)
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    onmousemove: function (evt) {
-        if (this.mousedown) {
-            OpenLayers.Event.stop(evt, true);
-        }
-    },
-
-    /** 
-     * Method: onmouseup
-     * When mouse comes up within the popup, after going down 
-     *   in it, reset the flag, and then (once again) do not 
-     *   propagate the event, but do so safely so that user can 
-     *   select text inside
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    onmouseup: function (evt) {
-        if (this.mousedown) {
-            this.mousedown = false;
-            OpenLayers.Event.stop(evt, true);
-        }
-    },
-
-    /**
-     * Method: onclick
-     * Ignore clicks, but allowing default browser handling
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    onclick: function (evt) {
-        OpenLayers.Event.stop(evt, true);
-    },
-
-    /** 
-     * Method: onmouseout
-     * When mouse goes out of the popup set the flag to false so that
-     *   if they let go and then drag back in, we won't be confused.
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    onmouseout: function (evt) {
-        this.mousedown = false;
-    },
-    
-    /** 
-     * Method: ondblclick
-     * Ignore double-clicks, but allowing default browser handling
-     * 
-     * Parameters:
-     * evt - {Event} 
-     */
-    ondblclick: function (evt) {
-        OpenLayers.Event.stop(evt, true);
-    },
-
-    CLASS_NAME: "OpenLayers.Popup"
-});
-
-OpenLayers.Popup.WIDTH = 200;
-OpenLayers.Popup.HEIGHT = 200;
-OpenLayers.Popup.COLOR = "white";
-OpenLayers.Popup.OPACITY = 1;
-OpenLayers.Popup.BORDER = "0px";
-

--- a/labs/openlayers/lib/OpenLayers/Popup/Anchored.js
+++ /dev/null
@@ -1,199 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Popup.js
- */
-
-/**
- * Class: OpenLayers.Popup.Anchored
- * 
- * Inherits from:
- *  - <OpenLayers.Popup>
- */
-OpenLayers.Popup.Anchored = 
-  OpenLayers.Class(OpenLayers.Popup, {
-
-    /** 
-     * Parameter: relativePosition
-     * {String} Relative position of the popup ("br", "tr", "tl" or "bl").
-     */
-    relativePosition: null,
-    
-    /**
-     * APIProperty: keepInMap 
-     * {Boolean} If panMapIfOutOfView is false, and this property is true, 
-     *     contrain the popup such that it always fits in the available map
-     *     space. By default, this is set. If you are creating popups that are
-     *     near map edges and not allowing pannning, and especially if you have
-     *     a popup which has a fixedRelativePosition, setting this to false may
-     *     be a smart thing to do.
-     *   
-     *     For anchored popups, default is true, since subclasses will
-     *     usually want this functionality.
-     */
-    keepInMap: true,
-
-    /**
-     * Parameter: anchor
-     * {Object} Object to which we'll anchor the popup. Must expose a 
-     *     'size' (<OpenLayers.Size>) and 'offset' (<OpenLayers.Pixel>).
-     */
-    anchor: null,
-
-    /** 
-    * Constructor: OpenLayers.Popup.Anchored
-    * 
-    * Parameters:
-    * id - {String}
-    * lonlat - {<OpenLayers.LonLat>}
-    * contentSize - {<OpenLayers.Size>}
-    * contentHTML - {String}
-    * anchor - {Object} Object which must expose a 'size' <OpenLayers.Size> 
-    *     and 'offset' <OpenLayers.Pixel> (generally an <OpenLayers.Icon>).
-    * closeBox - {Boolean}
-    * closeBoxCallback - {Function} Function to be called on closeBox click.
-    */
-    initialize:function(id, lonlat, contentSize, contentHTML, anchor, closeBox,
-                        closeBoxCallback) {
-        var newArguments = [
-            id, lonlat, contentSize, contentHTML, closeBox, closeBoxCallback
-        ];
-        OpenLayers.Popup.prototype.initialize.apply(this, newArguments);
-
-        this.anchor = (anchor != null) ? anchor 
-                                       : { size: new OpenLayers.Size(0,0),
-                                           offset: new OpenLayers.Pixel(0,0)};
-    },
-
-    /**
-     * APIMethod: destroy
-     */
-    destroy: function() {
-        this.anchor = null;
-        this.relativePosition = null;
-        
-        OpenLayers.Popup.prototype.destroy.apply(this, arguments);        
-    },
-
-    /**
-     * APIMethod: show
-     * Overridden from Popup since user might hide popup and then show() it 
-     *     in a new location (meaning we might want to update the relative
-     *     position on the show)
-     */
-    show: function() {
-        this.updatePosition();
-        OpenLayers.Popup.prototype.show.apply(this, arguments);
-    },
-
-    /**
-     * Method: moveTo
-     * Since the popup is moving to a new px, it might need also to be moved
-     *     relative to where the marker is. We first calculate the new 
-     *     relativePosition, and then we calculate the new px where we will 
-     *     put the popup, based on the new relative position. 
-     * 
-     *     If the relativePosition has changed, we must also call 
-     *     updateRelativePosition() to make any visual changes to the popup 
-     *     which are associated with putting it in a new relativePosition.
-     * 
-     * Parameters:
-     * px - {<OpenLayers.Pixel>}
-     */
-    moveTo: function(px) {
-        var oldRelativePosition = this.relativePosition;
-        this.relativePosition = this.calculateRelativePosition(px);
-        
-        var newPx = this.calculateNewPx(px);
-        
-        var newArguments = new Array(newPx);        
-        OpenLayers.Popup.prototype.moveTo.apply(this, newArguments);
-        
-        //if this move has caused the popup to change its relative position, 
-        // we need to make the appropriate cosmetic changes.
-        if (this.relativePosition != oldRelativePosition) {
-            this.updateRelativePosition();
-        }
-    },
-
-    /**
-     * APIMethod: setSize
-     * 
-     * Parameters:
-     * contentSize - {<OpenLayers.Size>} the new size for the popup's 
-     *     contents div (in pixels).
-     */
-    setSize:function(contentSize) { 
-        OpenLayers.Popup.prototype.setSize.apply(this, arguments);
-
-        if ((this.lonlat) && (this.map)) {
-            var px = this.map.getLayerPxFromLonLat(this.lonlat);
-            this.moveTo(px);
-        }
-    },  
-    
-    /** 
-     * Method: calculateRelativePosition
-     * 
-     * Parameters:
-     * px - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {String} The relative position ("br" "tr" "tl" "bl") at which the popup
-     *     should be placed.
-     */
-    calculateRelativePosition:function(px) {
-        var lonlat = this.map.getLonLatFromLayerPx(px);        
-        
-        var extent = this.map.getExtent();
-        var quadrant = extent.determineQuadrant(lonlat);
-        
-        return OpenLayers.Bounds.oppositeQuadrant(quadrant);
-    }, 
-
-    /**
-     * Method: updateRelativePosition
-     * The popup has been moved to a new relative location, so we may want to 
-     *     make some cosmetic adjustments to it. 
-     * 
-     *     Note that in the classic Anchored popup, there is nothing to do 
-     *     here, since the popup looks exactly the same in all four positions.
-     *     Subclasses such as the AnchoredBubble and Framed, however, will 
-     *     want to do something special here.
-     */
-    updateRelativePosition: function() {
-        //to be overridden by subclasses
-    },
-
-    /** 
-     * Method: calculateNewPx
-     * 
-     * Parameters:
-     * px - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Pixel>} The the new px position of the popup on the screen
-     *     relative to the passed-in px.
-     */
-    calculateNewPx:function(px) {
-        var newPx = px.offset(this.anchor.offset);
-        
-        //use contentSize if size is not already set
-        var size = this.size || this.contentSize;
-
-        var top = (this.relativePosition.charAt(0) == 't');
-        newPx.y += (top) ? -(size.h + this.anchor.size.h) : this.anchor.size.h;
-        
-        var left = (this.relativePosition.charAt(1) == 'l');
-        newPx.x += (left) ? -(size.w + this.anchor.size.w) : this.anchor.size.w;
-
-        return newPx;   
-    },
-
-    CLASS_NAME: "OpenLayers.Popup.Anchored"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Popup/AnchoredBubble.js
+++ /dev/null
@@ -1,191 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Popup/Anchored.js
- */
-
-/**
- * Class: OpenLayers.Popup.AnchoredBubble
- * 
- * Inherits from: 
- *  - <OpenLayers.Popup.Anchored>
- */
-OpenLayers.Popup.AnchoredBubble = 
-  OpenLayers.Class(OpenLayers.Popup.Anchored, {
-
-    /**
-     * Property: rounded
-     * {Boolean} Has the popup been rounded yet?
-     */
-    rounded: false, 
-    
-    /** 
-     * Constructor: OpenLayers.Popup.AnchoredBubble
-     * 
-     * Parameters:
-     * id - {String}
-     * lonlat - {<OpenLayers.LonLat>}
-     * contentSize - {<OpenLayers.Size>}
-     * contentHTML - {String}
-     * anchor - {Object} Object to which we'll anchor the popup. Must expose 
-     *     a 'size' (<OpenLayers.Size>) and 'offset' (<OpenLayers.Pixel>) 
-     *     (Note that this is generally an <OpenLayers.Icon>).
-     * closeBox - {Boolean}
-     * closeBoxCallback - {Function} Function to be called on closeBox click.
-     */
-    initialize:function(id, lonlat, contentSize, contentHTML, anchor, closeBox,
-                        closeBoxCallback) {
-        
-        this.padding = new OpenLayers.Bounds(
-            0, OpenLayers.Popup.AnchoredBubble.CORNER_SIZE,
-            0, OpenLayers.Popup.AnchoredBubble.CORNER_SIZE
-        );
-        OpenLayers.Popup.Anchored.prototype.initialize.apply(this, arguments);
-    },
-
-    /** 
-     * Method: draw
-     * 
-     * Parameters:
-     * px - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {DOMElement} Reference to a div that contains the drawn popup.
-     */
-    draw: function(px) {
-        
-        OpenLayers.Popup.Anchored.prototype.draw.apply(this, arguments);
-
-        this.setContentHTML();
-        
-        //set the popup color and opacity           
-        this.setBackgroundColor(); 
-        this.setOpacity();
-
-        return this.div;
-    },
-
-    /**
-     * Method: updateRelativePosition
-     * The popup has been moved to a new relative location, in which case
-     *     we will want to re-do the rico corners.
-     */
-    updateRelativePosition: function() {
-        this.setRicoCorners();
-    },
-
-    /**
-     * APIMethod: setSize
-     * 
-     * Parameters:
-     * contentSize - {<OpenLayers.Size>} the new size for the popup's 
-     *     contents div (in pixels).
-     */
-    setSize:function(contentSize) { 
-        OpenLayers.Popup.Anchored.prototype.setSize.apply(this, arguments);
-
-        this.setRicoCorners();
-    },  
-
-    /**
-     * APIMethod: setBackgroundColor
-     * 
-     * Parameters:
-     * color - {String}
-     */
-    setBackgroundColor:function(color) { 
-        if (color != undefined) {
-            this.backgroundColor = color; 
-        }
-        
-        if (this.div != null) {
-            if (this.contentDiv != null) {
-                this.div.style.background = "transparent";
-                OpenLayers.Rico.Corner.changeColor(this.groupDiv, 
-                                                   this.backgroundColor);
-            }
-        }
-    },  
-    
-    /**
-     * APIMethod: setOpacity
-     * 
-     * Parameters: 
-     * opacity - {float}
-     */
-    setOpacity:function(opacity) { 
-        OpenLayers.Popup.Anchored.prototype.setOpacity.call(this, opacity);
-        
-        if (this.div != null) {
-            if (this.groupDiv != null) {
-                OpenLayers.Rico.Corner.changeOpacity(this.groupDiv, 
-                                                     this.opacity);
-            }
-        }
-    },  
- 
-    /** 
-     * Method: setBorder
-     * Always sets border to 0. Bubble Popups can not have a border.
-     * 
-     * Parameters:
-     * border - {Integer}
-     */
-    setBorder:function(border) { 
-        this.border = 0;
-    },      
- 
-    /** 
-     * Method: setRicoCorners
-     * Update RICO corners according to the popup's current relative postion.
-     */
-    setRicoCorners:function() {
-    
-        var corners = this.getCornersToRound(this.relativePosition);
-        var options = {corners: corners,
-                         color: this.backgroundColor,
-                       bgColor: "transparent",
-                         blend: false};
-
-        if (!this.rounded) {
-            OpenLayers.Rico.Corner.round(this.div, options);
-            this.rounded = true;
-        } else {
-            OpenLayers.Rico.Corner.reRound(this.groupDiv, options);
-            //set the popup color and opacity
-            this.setBackgroundColor(); 
-            this.setOpacity();
-        }
-    },
-
-    /** 
-     * Method: getCornersToRound
-     *  
-     * Returns:
-     * {String} The proper corners string ("tr tl bl br") for rico to round.
-     */
-    getCornersToRound:function() {
-
-        var corners = ['tl', 'tr', 'bl', 'br'];
-
-        //we want to round all the corners _except_ the opposite one. 
-        var corner = OpenLayers.Bounds.oppositeQuadrant(this.relativePosition);
-        OpenLayers.Util.removeItem(corners, corner);
-
-        return corners.join(" ");
-    },
-
-    CLASS_NAME: "OpenLayers.Popup.AnchoredBubble"
-});
-
-/**
- * Constant: CORNER_SIZE
- * {Integer} 5. Border space for the RICO corners.
- */
-OpenLayers.Popup.AnchoredBubble.CORNER_SIZE = 5;
-
-

--- a/labs/openlayers/lib/OpenLayers/Popup/Framed.js
+++ /dev/null
@@ -1,344 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Popup/Anchored.js
- */
-
-/**
- * Class: OpenLayers.Popup.Framed
- * 
- * Inherits from:
- *  - <OpenLayers.Popup.Anchored>
- */
-OpenLayers.Popup.Framed =
-  OpenLayers.Class(OpenLayers.Popup.Anchored, {
-
-    /**
-     * Property: imageSrc
-     * {String} location of the image to be used as the popup frame
-     */
-    imageSrc: null,
-
-    /**
-     * Property: imageSize
-     * {<OpenLayers.Size>} Size (measured in pixels) of the image located
-     *     by the 'imageSrc' property.
-     */
-    imageSize: null,
-
-    /**
-     * APIProperty: isAlphaImage
-     * {Boolean} The image has some alpha and thus needs to use the alpha 
-     *     image hack. Note that setting this to true will have no noticeable
-     *     effect in FF or IE7 browsers, but will all but crush the ie6 
-     *     browser. 
-     *     Default is false.
-     */
-    isAlphaImage: false,
-
-    /**
-     * Property: positionBlocks
-     * {Object} Hash of different position blocks (Object/Hashs). Each block 
-     *     will be keyed by a two-character 'relativePosition' 
-     *     code string (ie "tl", "tr", "bl", "br"). Block properties are 
-     *     'offset', 'padding' (self-explanatory), and finally the 'blocks'
-     *     parameter, which is an array of the block objects. 
-     * 
-     *     Each block object must have 'size', 'anchor', and 'position' 
-     *     properties.
-     * 
-     *     Note that positionBlocks should never be modified at runtime.
-     */
-    positionBlocks: null,
-
-    /**
-     * Property: blocks
-     * {Array[Object]} Array of objects, each of which is one "block" of the 
-     *     popup. Each block has a 'div' and an 'image' property, both of 
-     *     which are DOMElements, and the latter of which is appended to the 
-     *     former. These are reused as the popup goes changing positions for
-     *     great economy and elegance.
-     */
-    blocks: null,
-
-    /** 
-     * APIProperty: fixedRelativePosition
-     * {Boolean} We want the framed popup to work dynamically placed relative
-     *     to its anchor but also in just one fixed position. A well designed
-     *     framed popup will have the pixels and logic to display itself in 
-     *     any of the four relative positions, but (understandably), this will
-     *     not be the case for all of them. By setting this property to 'true', 
-     *     framed popup will not recalculate for the best placement each time
-     *     it's open, but will always open the same way. 
-     *     Note that if this is set to true, it is generally advisable to also
-     *     set the 'panIntoView' property to true so that the popup can be 
-     *     scrolled into view (since it will often be offscreen on open)
-     *     Default is false.
-     */
-    fixedRelativePosition: false,
-
-    /** 
-     * Constructor: OpenLayers.Popup.Framed
-     * 
-     * Parameters:
-     * id - {String}
-     * lonlat - {<OpenLayers.LonLat>}
-     * contentSize - {<OpenLayers.Size>}
-     * contentHTML - {String}
-     * anchor - {Object} Object to which we'll anchor the popup. Must expose 
-     *     a 'size' (<OpenLayers.Size>) and 'offset' (<OpenLayers.Pixel>) 
-     *     (Note that this is generally an <OpenLayers.Icon>).
-     * closeBox - {Boolean}
-     * closeBoxCallback - {Function} Function to be called on closeBox click.
-     */
-    initialize:function(id, lonlat, contentSize, contentHTML, anchor, closeBox, 
-                        closeBoxCallback) {
-
-        OpenLayers.Popup.Anchored.prototype.initialize.apply(this, arguments);
-
-        if (this.fixedRelativePosition) {
-            //based on our decided relativePostion, set the current padding
-            // this keeps us from getting into trouble 
-            this.updateRelativePosition();
-            
-            //make calculateRelativePosition always return the specified
-            // fixed position.
-            this.calculateRelativePosition = function(px) {
-                return this.relativePosition;
-            };
-        }
-
-        this.contentDiv.style.position = "absolute";
-        this.contentDiv.style.zIndex = 1;
-
-        if (closeBox) {
-            this.closeDiv.style.zIndex = 1;
-        }
-
-        this.groupDiv.style.position = "absolute";
-        this.groupDiv.style.top = "0px";
-        this.groupDiv.style.left = "0px";
-        this.groupDiv.style.height = "100%";
-        this.groupDiv.style.width = "100%";
-    },
-
-    /** 
-     * APIMethod: destroy
-     */
-    destroy: function() {
-        this.imageSrc = null;
-        this.imageSize = null;
-        this.isAlphaImage = null;
-
-        this.fixedRelativePosition = false;
-        this.positionBlocks = null;
-
-        //remove our blocks
-        for(var i = 0; i < this.blocks.length; i++) {
-            var block = this.blocks[i];
-
-            if (block.image) {
-                block.div.removeChild(block.image);
-            }
-            block.image = null;
-
-            if (block.div) {
-                this.groupDiv.removeChild(block.div);
-            }
-            block.div = null;
-        }
-        this.blocks = null;
-
-        OpenLayers.Popup.Anchored.prototype.destroy.apply(this, arguments);
-    },
-
-    /**
-     * APIMethod: setBackgroundColor
-     */
-    setBackgroundColor:function(color) {
-        //does nothing since the framed popup's entire scheme is based on a 
-        // an image -- changing the background color makes no sense. 
-    },
-
-    /**
-     * APIMethod: setBorder
-     */
-    setBorder:function() {
-        //does nothing since the framed popup's entire scheme is based on a 
-        // an image -- changing the popup's border makes no sense. 
-    },
-
-    /**
-     * Method: setOpacity
-     * Sets the opacity of the popup.
-     * 
-     * Parameters:
-     * opacity - {float} A value between 0.0 (transparent) and 1.0 (solid).   
-     */
-    setOpacity:function(opacity) {
-        //does nothing since we suppose that we'll never apply an opacity
-        // to a framed popup
-    },
-
-    /**
-     * APIMethod: setSize
-     * Overridden here, because we need to update the blocks whenever the size
-     *     of the popup has changed.
-     * 
-     * Parameters:
-     * contentSize - {<OpenLayers.Size>} the new size for the popup's 
-     *     contents div (in pixels).
-     */
-    setSize:function(contentSize) { 
-        OpenLayers.Popup.Anchored.prototype.setSize.apply(this, arguments);
-
-        this.updateBlocks();
-    },
-
-    /**
-     * Method: updateRelativePosition
-     * When the relative position changes, we need to set the new padding 
-     *     BBOX on the popup, reposition the close div, and update the blocks.
-     */
-    updateRelativePosition: function() {
-
-        //update the padding
-        this.padding = this.positionBlocks[this.relativePosition].padding;
-
-        //update the position of our close box to new padding
-        if (this.closeDiv) {
-            // use the content div's css padding to determine if we should
-            //  padd the close div
-            var contentDivPadding = this.getContentDivPadding();
-
-            this.closeDiv.style.right = contentDivPadding.right + 
-                                        this.padding.right + "px";
-            this.closeDiv.style.top = contentDivPadding.top + 
-                                      this.padding.top + "px";
-        }
-
-        this.updateBlocks();
-    },
-
-    /** 
-     * Method: calculateNewPx
-     * Besides the standard offset as determined by the Anchored class, our 
-     *     Framed popups have a special 'offset' property for each of their 
-     *     positions, which is used to offset the popup relative to its anchor.
-     * 
-     * Parameters:
-     * px - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Pixel>} The the new px position of the popup on the screen
-     *     relative to the passed-in px.
-     */
-    calculateNewPx:function(px) {
-        var newPx = OpenLayers.Popup.Anchored.prototype.calculateNewPx.apply(
-            this, arguments
-        );
-
-        newPx = newPx.offset(this.positionBlocks[this.relativePosition].offset);
-
-        return newPx;
-    },
-
-    /**
-     * Method: createBlocks
-     */
-    createBlocks: function() {
-        this.blocks = [];
-
-        //since all positions contain the same number of blocks, we can 
-        // just pick the first position and use its blocks array to create
-        // our blocks array
-        var firstPosition = null;
-        for(var key in this.positionBlocks) {
-            firstPosition = key;
-            break;
-        }
-        
-        var position = this.positionBlocks[firstPosition];
-        for (var i = 0; i < position.blocks.length; i++) {
-
-            var block = {};
-            this.blocks.push(block);
-
-            var divId = this.id + '_FrameDecorationDiv_' + i;
-            block.div = OpenLayers.Util.createDiv(divId, 
-                null, null, null, "absolute", null, "hidden", null
-            );
-
-            var imgId = this.id + '_FrameDecorationImg_' + i;
-            var imageCreator = 
-                (this.isAlphaImage) ? OpenLayers.Util.createAlphaImageDiv
-                                    : OpenLayers.Util.createImage;
-
-            block.image = imageCreator(imgId, 
-                null, this.imageSize, this.imageSrc, 
-                "absolute", null, null, null
-            );
-
-            block.div.appendChild(block.image);
-            this.groupDiv.appendChild(block.div);
-        }
-    },
-
-    /**
-     * Method: updateBlocks
-     * Internal method, called on initialize and when the popup's relative
-     *     position has changed. This function takes care of re-positioning
-     *     the popup's blocks in their appropropriate places.
-     */
-    updateBlocks: function() {
-        if (!this.blocks) {
-            this.createBlocks();
-        }
-        
-        if (this.size && this.relativePosition) {
-            var position = this.positionBlocks[this.relativePosition];
-            for (var i = 0; i < position.blocks.length; i++) {
-    
-                var positionBlock = position.blocks[i];
-                var block = this.blocks[i];
-    
-                // adjust sizes
-                var l = positionBlock.anchor.left;
-                var b = positionBlock.anchor.bottom;
-                var r = positionBlock.anchor.right;
-                var t = positionBlock.anchor.top;
-    
-                //note that we use the isNaN() test here because if the 
-                // size object is initialized with a "auto" parameter, the 
-                // size constructor calls parseFloat() on the string, 
-                // which will turn it into NaN
-                //
-                var w = (isNaN(positionBlock.size.w)) ? this.size.w - (r + l) 
-                                                      : positionBlock.size.w;
-    
-                var h = (isNaN(positionBlock.size.h)) ? this.size.h - (b + t) 
-                                                      : positionBlock.size.h;
-    
-                block.div.style.width = (w < 0 ? 0 : w) + 'px';
-                block.div.style.height = (h < 0 ? 0 : h) + 'px';
-    
-                block.div.style.left = (l != null) ? l + 'px' : '';
-                block.div.style.bottom = (b != null) ? b + 'px' : '';
-                block.div.style.right = (r != null) ? r + 'px' : '';            
-                block.div.style.top = (t != null) ? t + 'px' : '';
-    
-                block.image.style.left = positionBlock.position.x + 'px';
-                block.image.style.top = positionBlock.position.y + 'px';
-            }
-    
-            this.contentDiv.style.left = this.padding.left + "px";
-            this.contentDiv.style.top = this.padding.top + "px";
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Popup.Framed"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Popup/FramedCloud.js
+++ /dev/null
@@ -1,232 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Popup/Framed.js
- * @requires OpenLayers/Util.js
- */
-
-/**
- * Class: OpenLayers.Popup.FramedCloud
- * 
- * Inherits from: 
- *  - <OpenLayers.Popup.Framed>
- */
-OpenLayers.Popup.FramedCloud = 
-  OpenLayers.Class(OpenLayers.Popup.Framed, {
-
-    /** 
-     * Property: contentDisplayClass
-     * {String} The CSS class of the popup content div.
-     */
-    contentDisplayClass: "olFramedCloudPopupContent",
-
-    /**
-     * APIProperty: autoSize
-     * {Boolean} Framed Cloud is autosizing by default.
-     */
-    autoSize: true,
-
-    /**
-     * APIProperty: panMapIfOutOfView
-     * {Boolean} Framed Cloud does pan into view by default.
-     */
-    panMapIfOutOfView: true,
-
-    /**
-     * APIProperty: imageSize
-     * {<OpenLayers.Size>}
-     */
-    imageSize: new OpenLayers.Size(1276, 736),
-
-    /**
-     * APIProperty: isAlphaImage
-     * {Boolean} The FramedCloud does not use an alpha image (in honor of the 
-     *     good ie6 folk out there)
-     */
-    isAlphaImage: false,
-
-    /** 
-     * APIProperty: fixedRelativePosition
-     * {Boolean} The Framed Cloud popup works in just one fixed position.
-     */
-    fixedRelativePosition: false,
-
-    /**
-     * Property: positionBlocks
-     * {Object} Hash of differen position blocks, keyed by relativePosition
-     *     two-character code string (ie "tl", "tr", "bl", "br")
-     */
-    positionBlocks: {
-        "tl": {
-            'offset': new OpenLayers.Pixel(44, 0),
-            'padding': new OpenLayers.Bounds(8, 40, 8, 9),
-            'blocks': [
-                { // top-left
-                    size: new OpenLayers.Size('auto', 'auto'),
-                    anchor: new OpenLayers.Bounds(0, 51, 22, 0),
-                    position: new OpenLayers.Pixel(0, 0)
-                },
-                { //top-right
-                    size: new OpenLayers.Size(22, 'auto'),
-                    anchor: new OpenLayers.Bounds(null, 50, 0, 0),
-                    position: new OpenLayers.Pixel(-1238, 0)
-                },
-                { //bottom-left
-                    size: new OpenLayers.Size('auto', 19),
-                    anchor: new OpenLayers.Bounds(0, 32, 22, null),
-                    position: new OpenLayers.Pixel(0, -631)
-                },
-                { //bottom-right
-                    size: new OpenLayers.Size(22, 18),
-                    anchor: new OpenLayers.Bounds(null, 32, 0, null),
-                    position: new OpenLayers.Pixel(-1238, -632)
-                },
-                { // stem
-                    size: new OpenLayers.Size(81, 35),
-                    anchor: new OpenLayers.Bounds(null, 0, 0, null),
-                    position: new OpenLayers.Pixel(0, -688)
-                }
-            ]
-        },
-        "tr": {
-            'offset': new OpenLayers.Pixel(-45, 0),
-            'padding': new OpenLayers.Bounds(8, 40, 8, 9),
-            'blocks': [
-                { // top-left
-                    size: new OpenLayers.Size('auto', 'auto'),
-                    anchor: new OpenLayers.Bounds(0, 51, 22, 0),
-                    position: new OpenLayers.Pixel(0, 0)
-                },
-                { //top-right
-                    size: new OpenLayers.Size(22, 'auto'),
-                    anchor: new OpenLayers.Bounds(null, 50, 0, 0),
-                    position: new OpenLayers.Pixel(-1238, 0)
-                },
-                { //bottom-left
-                    size: new OpenLayers.Size('auto', 19),
-                    anchor: new OpenLayers.Bounds(0, 32, 22, null),
-                    position: new OpenLayers.Pixel(0, -631)
-                },
-                { //bottom-right
-                    size: new OpenLayers.Size(22, 19),
-                    anchor: new OpenLayers.Bounds(null, 32, 0, null),
-                    position: new OpenLayers.Pixel(-1238, -631)
-                },
-                { // stem
-                    size: new OpenLayers.Size(81, 35),
-                    anchor: new OpenLayers.Bounds(0, 0, null, null),
-                    position: new OpenLayers.Pixel(-215, -687)
-                }
-            ]
-        },
-        "bl": {
-            'offset': new OpenLayers.Pixel(45, 0),
-            'padding': new OpenLayers.Bounds(8, 9, 8, 40),
-            'blocks': [
-                { // top-left
-                    size: new OpenLayers.Size('auto', 'auto'),
-                    anchor: new OpenLayers.Bounds(0, 21, 22, 32),
-                    position: new OpenLayers.Pixel(0, 0)
-                },
-                { //top-right
-                    size: new OpenLayers.Size(22, 'auto'),
-                    anchor: new OpenLayers.Bounds(null, 21, 0, 32),
-                    position: new OpenLayers.Pixel(-1238, 0)
-                },
-                { //bottom-left
-                    size: new OpenLayers.Size('auto', 21),
-                    anchor: new OpenLayers.Bounds(0, 0, 22, null),
-                    position: new OpenLayers.Pixel(0, -629)
-                },
-                { //bottom-right
-                    size: new OpenLayers.Size(22, 21),
-                    anchor: new OpenLayers.Bounds(null, 0, 0, null),
-                    position: new OpenLayers.Pixel(-1238, -629)
-                },
-                { // stem
-                    size: new OpenLayers.Size(81, 33),
-                    anchor: new OpenLayers.Bounds(null, null, 0, 0),
-                    position: new OpenLayers.Pixel(-101, -674)
-                }
-            ]
-        },
-        "br": {
-            'offset': new OpenLayers.Pixel(-44, 0),
-            'padding': new OpenLayers.Bounds(8, 9, 8, 40),
-            'blocks': [
-                { // top-left
-                    size: new OpenLayers.Size('auto', 'auto'),
-                    anchor: new OpenLayers.Bounds(0, 21, 22, 32),
-                    position: new OpenLayers.Pixel(0, 0)
-                },
-                { //top-right
-                    size: new OpenLayers.Size(22, 'auto'),
-                    anchor: new OpenLayers.Bounds(null, 21, 0, 32),
-                    position: new OpenLayers.Pixel(-1238, 0)
-                },
-                { //bottom-left
-                    size: new OpenLayers.Size('auto', 21),
-                    anchor: new OpenLayers.Bounds(0, 0, 22, null),
-                    position: new OpenLayers.Pixel(0, -629)
-                },
-                { //bottom-right
-                    size: new OpenLayers.Size(22, 21),
-                    anchor: new OpenLayers.Bounds(null, 0, 0, null),
-                    position: new OpenLayers.Pixel(-1238, -629)
-                },
-                { // stem
-                    size: new OpenLayers.Size(81, 33),
-                    anchor: new OpenLayers.Bounds(0, null, null, 0),
-                    position: new OpenLayers.Pixel(-311, -674)
-                }
-            ]
-        }
-    },
-
-    /**
-     * APIProperty: minSize
-     * {<OpenLayers.Size>}
-     */
-    minSize: new OpenLayers.Size(105, 10),
-
-    /**
-     * APIProperty: maxSize
-     * {<OpenLayers.Size>}
-     */
-    maxSize: new OpenLayers.Size(1200, 660),
-
-    /** 
-     * Constructor: OpenLayers.Popup.FramedCloud
-     * 
-     * Parameters:
-     * id - {String}
-     * lonlat - {<OpenLayers.LonLat>}
-     * contentSize - {<OpenLayers.Size>}
-     * contentHTML - {String}
-     * anchor - {Object} Object to which we'll anchor the popup. Must expose 
-     *     a 'size' (<OpenLayers.Size>) and 'offset' (<OpenLayers.Pixel>) 
-     *     (Note that this is generally an <OpenLayers.Icon>).
-     * closeBox - {Boolean}
-     * closeBoxCallback - {Function} Function to be called on closeBox click.
-     */
-    initialize:function(id, lonlat, contentSize, contentHTML, anchor, closeBox, 
-                        closeBoxCallback) {
-
-        this.imageSrc = OpenLayers.Util.getImagesLocation() + 'cloud-popup-relative.png';
-        OpenLayers.Popup.Framed.prototype.initialize.apply(this, arguments);
-        this.contentDiv.className = this.contentDisplayClass;
-    },
-
-    /** 
-     * APIMethod: destroy
-     */
-    destroy: function() {
-        OpenLayers.Popup.Framed.prototype.destroy.apply(this, arguments);
-    },
-
-    CLASS_NAME: "OpenLayers.Popup.FramedCloud"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Projection.js
+++ /dev/null
@@ -1,179 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Util.js
- */
-
-/**
- * Class: OpenLayers.Projection
- * Class for coordinate transforms between coordinate systems.
- *     Depends on the proj4js library. If proj4js is not available, 
- *     then this is just an empty stub.
- */
-OpenLayers.Projection = OpenLayers.Class({
-
-    /**
-     * Property: proj
-     * {Object} Proj4js.Proj instance.
-     */
-    proj: null,
-    
-    /**
-     * Property: projCode
-     * {String}
-     */
-    projCode: null,
-
-    /**
-     * Constructor: OpenLayers.Projection
-     * This class offers several methods for interacting with a wrapped 
-     *     pro4js projection object. 
-     *
-     * Parameters:
-     * projCode - {String} A string identifying the Well Known Identifier for
-     *    the projection.
-     * options - {Object} An optional object to set additional properties
-     *     on the layer.
-     *
-     * Returns:
-     * {<OpenLayers.Projection>} A projection object.
-     */
-    initialize: function(projCode, options) {
-        OpenLayers.Util.extend(this, options);
-        this.projCode = projCode;
-        if (window.Proj4js) {
-            this.proj = new Proj4js.Proj(projCode);
-        }
-    },
-    
-    /**
-     * APIMethod: getCode
-     * Get the string SRS code.
-     *
-     * Returns:
-     * {String} The SRS code.
-     */
-    getCode: function() {
-        return this.proj ? this.proj.srsCode : this.projCode;
-    },
-   
-    /**
-     * APIMethod: getUnits
-     * Get the units string for the projection -- returns null if 
-     *     proj4js is not available.
-     *
-     * Returns:
-     * {String} The units abbreviation.
-     */
-    getUnits: function() {
-        return this.proj ? this.proj.units : null;
-    },
-
-    /**
-     * Method: toString
-     * Convert projection to string (getCode wrapper).
-     *
-     * Returns:
-     * {String} The projection code.
-     */
-    toString: function() {
-        return this.getCode();
-    },
-
-    /**
-     * Method: equals
-     * Test equality of two projection instances.  Determines equality based
-     *     soley on the projection code.
-     *
-     * Returns:
-     * {Boolean} The two projections are equivalent.
-     */
-    equals: function(projection) {
-        if (projection && projection.getCode) {
-            return this.getCode() == projection.getCode();
-        } else {
-            return false;
-        }    
-    },
-
-    /* Method: destroy
-     * Destroy projection object.
-     */
-    destroy: function() {
-        delete this.proj;
-        delete this.projCode;
-    },
-    
-    CLASS_NAME: "OpenLayers.Projection" 
-});     
-
-/**
- * Property: transforms
- * Transforms is an object, with from properties, each of which may
- * have a to property. This allows you to define projections without 
- * requiring support for proj4js to be included.
- *
- * This object has keys which correspond to a 'source' projection object.  The
- * keys should be strings, corresponding to the projection.getCode() value.
- * Each source projection object should have a set of destination projection
- * keys included in the object. 
- * 
- * Each value in the destination object should be a transformation function,
- * where the function is expected to be passed an object with a .x and a .y
- * property.  The function should return the object, with the .x and .y
- * transformed according to the transformation function.
- *
- * Note - Properties on this object should not be set directly.  To add a
- *     transform method to this object, use the <addTransform> method.  For an
- *     example of usage, see the OpenLayers.Layer.SphericalMercator file.
- */
-OpenLayers.Projection.transforms = {};
-
-/**
- * APIMethod: addTransform
- * Set a custom transform method between two projections.  Use this method in
- *     cases where the proj4js lib is not available or where custom projections
- *     need to be handled.
- *
- * Parameters:
- * from - {String} The code for the source projection
- * to - {String} the code for the destination projection
- * method - {Function} A function that takes a point as an argument and
- *     transforms that point from the source to the destination projection
- *     in place.  The original point should be modified.
- */
-OpenLayers.Projection.addTransform = function(from, to, method) {
-    if(!OpenLayers.Projection.transforms[from]) {
-        OpenLayers.Projection.transforms[from] = {};
-    }
-    OpenLayers.Projection.transforms[from][to] = method;
-};
-
-/**
- * APIMethod: transform
- * Transform a point coordinate from one projection to another.  Note that
- *     the input point is transformed in place.
- * 
- * Parameters:
- * point - {{OpenLayers.Geometry.Point> | Object} An object with x and y
- *     properties representing coordinates in those dimensions.
- * sourceProj - {OpenLayers.Projection} Source map coordinate system
- * destProj - {OpenLayers.Projection} Destination map coordinate system
- *
- * Returns:
- * point - {object} A transformed coordinate.  The original point is modified.
- */
-OpenLayers.Projection.transform = function(point, source, dest) {
-    if (source.proj && dest.proj) {
-        point = Proj4js.transform(source.proj, dest.proj, point);
-    } else if (source && dest && 
-               OpenLayers.Projection.transforms[source.getCode()] && 
-               OpenLayers.Projection.transforms[source.getCode()][dest.getCode()]) {
-        OpenLayers.Projection.transforms[source.getCode()][dest.getCode()](point); 
-    }
-    return point;
-};
-

--- a/labs/openlayers/lib/OpenLayers/Protocol.js
+++ /dev/null
@@ -1,273 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * Class: OpenLayers.Protocol
- * Abstract vector layer protocol class.  Not to be instantiated directly.  Use
- *     one of the protocol subclasses instead.
- */
-OpenLayers.Protocol = OpenLayers.Class({
-    
-    /**
-     * Property: format
-     * {<OpenLayers.Format>} The format used by this protocol.
-     */
-    format: null,
-    
-    /**
-     * Property: options
-     * {Object} Any options sent to the constructor.
-     */
-    options: null,
-
-    /**
-     * Property: autoDestroy
-     * {Boolean} The creator of the protocol can set autoDestroy to false
-     *      to fully control when the protocol is destroyed. Defaults to
-     *      true.
-     */
-    autoDestroy: true,
-   
-    /**
-     * Property: defaultFilter
-     * {OpenLayers.Filter} Optional default filter to read requests
-     */
-    defaultFilter: null,
-    
-    /**
-     * Constructor: OpenLayers.Protocol
-     * Abstract class for vector protocols.  Create instances of a subclass.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     */
-    initialize: function(options) {
-        options = options || {};
-        OpenLayers.Util.extend(this, options);
-        this.options = options;
-    },
-
-    /**
-     * Method: mergeWithDefaultFilter
-     * Merge filter passed to the read method with the default one
-     *
-     * Parameters:
-     * filter - {OpenLayers.Filter}
-     */
-    mergeWithDefaultFilter: function(filter) {
-        var merged;
-        if (filter && this.defaultFilter) {
-            merged = new OpenLayers.Filter.Logical({
-                type: OpenLayers.Filter.Logical.AND,
-                filters: [this.defaultFilter, filter]
-            });
-        } else {
-            merged = filter || this.defaultFilter || undefined;
-        }
-        return merged;
-    },
-
-    /**
-     * APIMethod: destroy
-     * Clean up the protocol.
-     */
-    destroy: function() {
-        this.options = null;
-        this.format = null;
-    },
-    
-    /**
-     * APIMethod: read
-     * Construct a request for reading new features.
-     *
-     * Parameters:
-     * options - {Object} Optional object for configuring the request.
-     *
-     * Returns:
-     * {<OpenLayers.Protocol.Response>} An <OpenLayers.Protocol.Response>
-     * object, the same object will be passed to the callback function passed
-     * if one exists in the options object.
-     */
-    read: function(options) {
-        options = options || {};
-        options.filter = this.mergeWithDefaultFilter(options.filter);
-    },
-    
-    
-    /**
-     * APIMethod: create
-     * Construct a request for writing newly created features.
-     *
-     * Parameters:
-     * features - {Array({<OpenLayers.Feature.Vector>})} or
-     *            {<OpenLayers.Feature.Vector>}
-     * options - {Object} Optional object for configuring the request.
-     *
-     * Returns:
-     * {<OpenLayers.Protocol.Response>} An <OpenLayers.Protocol.Response>
-     * object, the same object will be passed to the callback function passed
-     * if one exists in the options object.
-     */
-    create: function() {
-    },
-    
-    /**
-     * APIMethod: update
-     * Construct a request updating modified features.
-     *
-     * Parameters:
-     * features - {Array({<OpenLayers.Feature.Vector>})} or
-     *            {<OpenLayers.Feature.Vector>}
-     * options - {Object} Optional object for configuring the request.
-     *
-     * Returns:
-     * {<OpenLayers.Protocol.Response>} An <OpenLayers.Protocol.Response>
-     * object, the same object will be passed to the callback function passed
-     * if one exists in the options object.
-     */
-    update: function() {
-    },
-    
-    /**
-     * APIMethod: delete
-     * Construct a request deleting a removed feature.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>}
-     * options - {Object} Optional object for configuring the request.
-     *
-     * Returns:
-     * {<OpenLayers.Protocol.Response>} An <OpenLayers.Protocol.Response>
-     * object, the same object will be passed to the callback function passed
-     * if one exists in the options object.
-     */
-    "delete": function() {
-    },
-
-    /**
-     * APIMethod: commit
-     * Go over the features and for each take action
-     * based on the feature state. Possible actions are create,
-     * update and delete.
-     *
-     * Parameters:
-     * features - {Array({<OpenLayers.Feature.Vector>})}
-     * options - {Object} Object whose possible keys are "create", "update",
-     *      "delete", "callback" and "scope", the values referenced by the
-     *      first three are objects as passed to the "create", "update", and
-     *      "delete" methods, the value referenced by the "callback" key is
-     *      a function which is called when the commit operation is complete
-     *      using the scope referenced by the "scope" key.
-     *
-     * Returns:
-     * {Array({<OpenLayers.Protocol.Response>})} An array of
-     * <OpenLayers.Protocol.Response> objects.
-     */
-    commit: function() {
-    },
-
-    /**
-     * Method: abort
-     * Abort an ongoing request.
-     *
-     * Parameters:
-     * response - {<OpenLayers.Protocol.Response>}
-     */
-    abort: function(response) {
-    },
-   
-    /**
-     * Method: createCallback
-     * Returns a function that applies the given public method with resp and
-     *     options arguments.
-     *
-     * Parameters:
-     * method - {Function} The method to be applied by the callback.
-     * response - {<OpenLayers.Protocol.Response>} The protocol response object.
-     * options - {Object} Options sent to the protocol method
-     */
-    createCallback: function(method, response, options) {
-        return OpenLayers.Function.bind(function() {
-            method.apply(this, [response, options]);
-        }, this);
-    },
-   
-    CLASS_NAME: "OpenLayers.Protocol" 
-});
-
-/**
- * Class: OpenLayers.Protocol.Response
- * Protocols return Response objects to their users.
- */
-OpenLayers.Protocol.Response = OpenLayers.Class({
-    /**
-     * Property: code
-     * {Number} - OpenLayers.Protocol.Response.SUCCESS or
-     *            OpenLayers.Protocol.Response.FAILURE
-     */
-    code: null,
-
-    /**
-     * Property: requestType
-     * {String} The type of request this response corresponds to. Either
-     *      "create", "read", "update" or "delete".
-     */
-    requestType: null,
-
-    /**
-     * Property: last
-     * {Boolean} - true if this is the last response expected in a commit,
-     * false otherwise, defaults to true.
-     */
-    last: true,
-
-    /**
-     * Property: features
-     * {Array({<OpenLayers.Feature.Vector>})} or {<OpenLayers.Feature.Vector>}
-     * The features returned in the response by the server.
-     */
-    features: null,
-
-    /**
-     * Property: reqFeatures
-     * {Array({<OpenLayers.Feature.Vector>})} or {<OpenLayers.Feature.Vector>}
-     * The features provided by the user and placed in the request by the
-     *      protocol.
-     */
-    reqFeatures: null,
-
-    /**
-     * Property: priv
-     */
-    priv: null,
-
-    /**
-     * Constructor: OpenLayers.Protocol.Response
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Util.extend(this, options);
-    },
-
-    /**
-     * Method: success
-     *
-     * Returns:
-     * {Boolean} - true on success, false otherwise
-     */
-    success: function() {
-        return this.code > 0;
-    },
-
-    CLASS_NAME: "OpenLayers.Protocol.Response"
-});
-
-OpenLayers.Protocol.Response.SUCCESS = 1;
-OpenLayers.Protocol.Response.FAILURE = 0;
-

--- a/labs/openlayers/lib/OpenLayers/Protocol/HTTP.js
+++ /dev/null
@@ -1,656 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Protocol.js
- * @requires OpenLayers/Feature/Vector.js
- * @requires OpenLayers/Filter/Spatial.js
- * @requires OpenLayers/Filter/Comparison.js
- * @requires OpenLayers/Filter/Logical.js
- * @requires OpenLayers/Request/XMLHttpRequest.js
- */
-
-/**
- * Class: OpenLayers.Protocol.HTTP
- * A basic HTTP protocol for vector layers.  Create a new instance with the
- *     <OpenLayers.Protocol.HTTP> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Protocol>
- */
-OpenLayers.Protocol.HTTP = OpenLayers.Class(OpenLayers.Protocol, {
-
-    /**
-     * Property: url
-     * {String} Service URL, read-only, set through the options
-     *     passed to constructor.
-     */
-    url: null,
-
-    /**
-     * Property: headers
-     * {Object} HTTP request headers, read-only, set through the options
-     *     passed to the constructor,
-     *     Example: {'Content-Type': 'plain/text'}
-     */
-    headers: null,
-
-    /**
-     * Property: params
-     * {Object} Parameters of GET requests, read-only, set through the options
-     *     passed to the constructor,
-     *     Example: {'bbox': '5,5,5,5'}
-     */
-    params: null,
-    
-    /**
-     * Property: callback
-     * {Object} Function to be called when the <read>, <create>,
-     *     <update>, <delete> or <commit> operation completes, read-only,
-     *     set through the options passed to the constructor.
-     */
-    callback: null,
-
-    /**
-     * Property: scope
-     * {Object} Callback execution scope, read-only, set through the
-     *     options passed to the constructor.
-     */
-    scope: null,
-
-    /**
-     * Property: readWithPOST
-     * {Boolean} true if read operations are done with POST requests
-     *     instead of GET, defaults to false.
-     */
-    readWithPOST: false,
-
-    /**
-     * Property: wildcarded.
-     * {Boolean} If true percent signs are added around values
-     *     read from LIKE filters, for example if the protocol
-     *     read method is passed a LIKE filter whose property
-     *     is "foo" and whose value is "bar" the string
-     *     "foo__ilike=%bar%" will be sent in the query string;
-     *     defaults to false.
-     */
-    wildcarded: false,
-
-    /**
-     * Constructor: OpenLayers.Protocol.HTTP
-     * A class for giving layers generic HTTP protocol.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     *
-     * Valid options include:
-     * url - {String}
-     * headers - {Object} 
-     * params - {Object}
-     * format - {<OpenLayers.Format>}
-     * callback - {Function}
-     * scope - {Object}
-     */
-    initialize: function(options) {
-        options = options || {};
-        this.params = {};
-        this.headers = {};
-        OpenLayers.Protocol.prototype.initialize.apply(this, arguments);
-    },
-    
-    /**
-     * APIMethod: destroy
-     * Clean up the protocol.
-     */
-    destroy: function() {
-        this.params = null;
-        this.headers = null;
-        OpenLayers.Protocol.prototype.destroy.apply(this);
-    },
-   
-    /**
-     * APIMethod: read
-     * Construct a request for reading new features.
-     *
-     * Parameters:
-     * options - {Object} Optional object for configuring the request.
-     *     This object is modified and should not be reused.
-     *
-     * Valid options:
-     * url - {String} Url for the request.
-     * params - {Object} Parameters to get serialized as a query string.
-     * headers - {Object} Headers to be set on the request.
-     * filter - {<OpenLayers.Filter>} Filter to get serialized as a
-     *     query string.
-     * readWithPOST - {Boolean} If the request should be done with POST.
-     *
-     * Returns:
-     * {<OpenLayers.Protocol.Response>} A response object, whose "priv" property
-     *     references the HTTP request, this object is also passed to the
-     *     callback function when the request completes, its "features" property
-     *     is then populated with the the features received from the server.
-     */
-    read: function(options) {
-        OpenLayers.Protocol.prototype.read.apply(this, arguments);
-        options = OpenLayers.Util.applyDefaults(options, this.options);
-        options.params = OpenLayers.Util.applyDefaults(
-            options.params, this.options.params);
-        if(options.filter) {
-            options.params = this.filterToParams(
-                options.filter, options.params);
-        }
-        var readWithPOST = (options.readWithPOST !== undefined) ?
-                           options.readWithPOST : this.readWithPOST;
-        var resp = new OpenLayers.Protocol.Response({requestType: "read"});
-        if(readWithPOST) {
-            resp.priv = OpenLayers.Request.POST({
-                url: options.url,
-                callback: this.createCallback(this.handleRead, resp, options),
-                data: OpenLayers.Util.getParameterString(options.params),
-                headers: {
-                    "Content-Type": "application/x-www-form-urlencoded"
-                }
-            });
-        } else {
-            resp.priv = OpenLayers.Request.GET({
-                url: options.url,
-                callback: this.createCallback(this.handleRead, resp, options),
-                params: options.params,
-                headers: options.headers
-            });
-        }
-        return resp;
-    },
-
-    /**
-     * Method: handleRead
-     * Individual callbacks are created for read, create and update, should
-     *     a subclass need to override each one separately.
-     *
-     * Parameters:
-     * resp - {<OpenLayers.Protocol.Response>} The response object to pass to
-     *     the user callback.
-     * options - {Object} The user options passed to the read call.
-     */
-    handleRead: function(resp, options) {
-        this.handleResponse(resp, options);
-    },
-
-    /**
-     * Method: filterToParams
-     * Convert an <OpenLayers.Filter> object to parameters.
-     *
-     * Parameters:
-     * filter - {OpenLayers.Filter} filter to convert.
-     * params - {Object} The parameters object.
-     *
-     * Returns:
-     * {Object} The resulting parameters object.
-     */
-    filterToParams: function(filter, params) {
-        params = params || {};
-        var className = filter.CLASS_NAME;
-        var filterType = className.substring(className.lastIndexOf(".") + 1);
-        switch(filterType) {
-            case "Spatial":
-                switch(filter.type) {
-                    case OpenLayers.Filter.Spatial.BBOX:
-                        params.bbox = filter.value.toArray();
-                        break;
-                    case OpenLayers.Filter.Spatial.DWITHIN:
-                        params.tolerance = filter.distance;
-                        // no break here
-                    case OpenLayers.Filter.Spatial.WITHIN:
-                        params.lon = filter.value.x;
-                        params.lat = filter.value.y;
-                        break;
-                    default:
-                        OpenLayers.Console.warn(
-                            "Unknown spatial filter type " + filter.type);
-                }
-                break;
-            case "Comparison":
-                var op = OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR[filter.type];
-                if(op !== undefined) {
-                    var value = filter.value;
-                    if(filter.type == OpenLayers.Filter.Comparison.LIKE) {
-                        value = this.regex2value(value);
-                        if(this.wildcarded) {
-                            value = "%" + value + "%";
-                        }
-                    }
-                    params[filter.property + "__" + op] = value;
-                    params.queryable = params.queryable || [];
-                    params.queryable.push(filter.property);
-                } else {
-                    OpenLayers.Console.warn(
-                        "Unknown comparison filter type " + filter.type);
-                }
-                break;
-            case "Logical":
-                if(filter.type === OpenLayers.Filter.Logical.AND) {
-                    for(var i=0,len=filter.filters.length; i<len; i++) {
-                        params = this.filterToParams(filter.filters[i], params);
-                    }
-                } else {
-                    OpenLayers.Console.warn(
-                        "Unsupported logical filter type " + filter.type);
-                }
-                break;
-            default:
-                OpenLayers.Console.warn("Unknown filter type " + filterType);
-        }
-        return params;
-    },
-
-    /**
-     * Method: regex2value
-     * Convert the value from a regular expression string to a LIKE/ILIKE
-     * string known to the web service.
-     *
-     * Parameters:
-     * value - {String} The regex string.
-     *
-     * Returns:
-     * {String} The converted string.
-     */
-    regex2value: function(value) {
-
-        // highly sensitive!! Do not change this without running the
-        // Protocol/HTTP.html unit tests
-
-        // convert % to \%
-        value = value.replace(/%/g, "\\%");
-
-        // convert \\. to \\_ (\\.* occurences converted later)
-        value = value.replace(/\\\\\.(\*)?/g, function($0, $1) {
-            return $1 ? $0 : "\\\\_";
-        });
-
-        // convert \\.* to \\%
-        value = value.replace(/\\\\\.\*/g, "\\\\%");
-
-        // convert . to _ (\. and .* occurences converted later)
-        value = value.replace(/(\\)?\.(\*)?/g, function($0, $1, $2) {
-            return $1 || $2 ? $0 : "_";
-        });
-
-        // convert .* to % (\.* occurnces converted later)
-        value = value.replace(/(\\)?\.\*/g, function($0, $1) {
-            return $1 ? $0 : "%";
-        });
-
-        // convert \. to .
-        value = value.replace(/\\\./g, ".");
-
-        // replace \* with * (watching out for \\*)
-        value = value.replace(/(\\)?\\\*/g, function($0, $1) {
-            return $1 ? $0 : "*";
-        });
-
-        return value;
-    },
-
-    /**
-     * APIMethod: create
-     * Construct a request for writing newly created features.
-     *
-     * Parameters:
-     * features - {Array({<OpenLayers.Feature.Vector>})} or
-     *     {<OpenLayers.Feature.Vector>}
-     * options - {Object} Optional object for configuring the request.
-     *     This object is modified and should not be reused.
-     *
-     * Returns:
-     * {<OpenLayers.Protocol.Response>} An <OpenLayers.Protocol.Response>
-     *     object, whose "priv" property references the HTTP request, this 
-     *     object is also passed to the callback function when the request
-     *     completes, its "features" property is then populated with the
-     *     the features received from the server.
-     */
-    create: function(features, options) {
-        options = OpenLayers.Util.applyDefaults(options, this.options);
-
-        var resp = new OpenLayers.Protocol.Response({
-            reqFeatures: features,
-            requestType: "create"
-        });
-
-        resp.priv = OpenLayers.Request.POST({
-            url: options.url,
-            callback: this.createCallback(this.handleCreate, resp, options),
-            headers: options.headers,
-            data: this.format.write(features)
-        });
-
-        return resp;
-    },
-
-    /**
-     * Method: handleCreate
-     * Called the the request issued by <create> is complete.  May be overridden
-     *     by subclasses.
-     *
-     * Parameters:
-     * resp - {<OpenLayers.Protocol.Response>} The response object to pass to
-     *     any user callback.
-     * options - {Object} The user options passed to the create call.
-     */
-    handleCreate: function(resp, options) {
-        this.handleResponse(resp, options);
-    },
-
-    /**
-     * APIMethod: update
-     * Construct a request updating modified feature.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>}
-     * options - {Object} Optional object for configuring the request.
-     *     This object is modified and should not be reused.
-     *
-     * Returns:
-     * {<OpenLayers.Protocol.Response>} An <OpenLayers.Protocol.Response>
-     *     object, whose "priv" property references the HTTP request, this 
-     *     object is also passed to the callback function when the request
-     *     completes, its "features" property is then populated with the
-     *     the feature received from the server.
-     */
-    update: function(feature, options) {
-        options = options || {};
-        var url = options.url ||
-                  feature.url ||
-                  this.options.url + "/" + feature.fid;
-        options = OpenLayers.Util.applyDefaults(options, this.options);
-
-        var resp = new OpenLayers.Protocol.Response({
-            reqFeatures: feature,
-            requestType: "update"
-        });
-
-        resp.priv = OpenLayers.Request.PUT({
-            url: url,
-            callback: this.createCallback(this.handleUpdate, resp, options),
-            headers: options.headers,
-            data: this.format.write(feature)
-        });
-
-        return resp;
-    },
-
-    /**
-     * Method: handleUpdate
-     * Called the the request issued by <update> is complete.  May be overridden
-     *     by subclasses.
-     *
-     * Parameters:
-     * resp - {<OpenLayers.Protocol.Response>} The response object to pass to
-     *     any user callback.
-     * options - {Object} The user options passed to the update call.
-     */
-    handleUpdate: function(resp, options) {
-        this.handleResponse(resp, options);
-    },
-
-    /**
-     * APIMethod: delete
-     * Construct a request deleting a removed feature.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>}
-     * options - {Object} Optional object for configuring the request.
-     *     This object is modified and should not be reused.
-     *
-     * Returns:
-     * {<OpenLayers.Protocol.Response>} An <OpenLayers.Protocol.Response>
-     *     object, whose "priv" property references the HTTP request, this 
-     *     object is also passed to the callback function when the request
-     *     completes.
-     */
-    "delete": function(feature, options) {
-        options = options || {};
-        var url = options.url ||
-                  feature.url ||
-                  this.options.url + "/" + feature.fid;
-        options = OpenLayers.Util.applyDefaults(options, this.options);
-
-        var resp = new OpenLayers.Protocol.Response({
-            reqFeatures: feature,
-            requestType: "delete"
-        });
-
-        resp.priv = OpenLayers.Request.DELETE({
-            url: url,
-            callback: this.createCallback(this.handleDelete, resp, options),
-            headers: options.headers
-        });
-
-        return resp;
-    },
-
-    /**
-     * Method: handleDelete
-     * Called the the request issued by <delete> is complete.  May be overridden
-     *     by subclasses.
-     *
-     * Parameters:
-     * resp - {<OpenLayers.Protocol.Response>} The response object to pass to
-     *     any user callback.
-     * options - {Object} The user options passed to the delete call.
-     */
-    handleDelete: function(resp, options) {
-        this.handleResponse(resp, options);
-    },
-
-    /**
-     * Method: handleResponse
-     * Called by CRUD specific handlers.
-     *
-     * Parameters:
-     * resp - {<OpenLayers.Protocol.Response>} The response object to pass to
-     *     any user callback.
-     * options - {Object} The user options passed to the create, read, update,
-     *     or delete call.
-     */
-    handleResponse: function(resp, options) {
-        var request = resp.priv;
-        if(options.callback) {
-            if(request.status >= 200 && request.status < 300) {
-                // success
-                if(resp.requestType != "delete") {
-                    resp.features = this.parseFeatures(request);
-                }
-                resp.code = OpenLayers.Protocol.Response.SUCCESS;
-            } else {
-                // failure
-                resp.code = OpenLayers.Protocol.Response.FAILURE;
-            }
-            options.callback.call(options.scope, resp);
-        }
-    },
-
-    /**
-     * Method: parseFeatures
-     * Read HTTP response body and return features.
-     *
-     * Parameters:
-     * request - {XMLHttpRequest} The request object
-     *
-     * Returns:
-     * {Array({<OpenLayers.Feature.Vector>})} or
-     *     {<OpenLayers.Feature.Vector>} Array of features or a single feature.
-     */
-    parseFeatures: function(request) {
-        var doc = request.responseXML;
-        if (!doc || !doc.documentElement) {
-            doc = request.responseText;
-        }
-        if (!doc || doc.length <= 0) {
-            return null;
-        }
-        return this.format.read(doc);
-    },
-
-    /**
-     * APIMethod: commit
-     * Iterate over each feature and take action based on the feature state.
-     *     Possible actions are create, update and delete.
-     *
-     * Parameters:
-     * features - {Array({<OpenLayers.Feature.Vector>})}
-     * options - {Object} Optional object for setting up intermediate commit
-     *     callbacks.
-     *
-     * Valid options:
-     * create - {Object} Optional object to be passed to the <create> method.
-     * update - {Object} Optional object to be passed to the <update> method.
-     * delete - {Object} Optional object to be passed to the <delete> method.
-     * callback - {Function} Optional function to be called when the commit
-     *     is complete.
-     * scope - {Object} Optional object to be set as the scope of the callback.
-     *
-     * Returns:
-     * {Array(<OpenLayers.Protocol.Response>)} An array of response objects,
-     *     one per request made to the server, each object's "priv" property
-     *     references the corresponding HTTP request.
-     */
-    commit: function(features, options) {
-        options = OpenLayers.Util.applyDefaults(options, this.options);
-        var resp = [], nResponses = 0;
-        
-        // Divide up features before issuing any requests.  This properly
-        // counts requests in the event that any responses come in before
-        // all requests have been issued.
-        var types = {};
-        types[OpenLayers.State.INSERT] = [];
-        types[OpenLayers.State.UPDATE] = [];
-        types[OpenLayers.State.DELETE] = [];
-        var feature, list, requestFeatures = [];
-        for(var i=0, len=features.length; i<len; ++i) {
-            feature = features[i];
-            list = types[feature.state];
-            if(list) {
-                list.push(feature);
-                requestFeatures.push(feature); 
-            }
-        }
-        // tally up number of requests
-        var nRequests = (types[OpenLayers.State.INSERT].length > 0 ? 1 : 0) +
-            types[OpenLayers.State.UPDATE].length +
-            types[OpenLayers.State.DELETE].length;
-        
-        // This response will be sent to the final callback after all the others
-        // have been fired.
-        var success = true;
-        var finalResponse = new OpenLayers.Protocol.Response({
-            reqFeatures: requestFeatures        
-        });
-        
-        function insertCallback(response) {
-            var len = response.features ? response.features.length : 0;
-            var fids = new Array(len);
-            for(var i=0; i<len; ++i) {
-                fids[i] = response.features[i].fid;
-            }   
-            finalResponse.insertIds = fids;
-            callback.apply(this, [response]);
-        }
- 
-        function callback(response) {
-            this.callUserCallback(response, options);
-            success = success && response.success();
-            nResponses++;
-            if (nResponses >= nRequests) {
-                if (options.callback) {
-                    finalResponse.code = success ? 
-                        OpenLayers.Protocol.Response.SUCCESS :
-                        OpenLayers.Protocol.Response.FAILURE;
-                    options.callback.apply(options.scope, [finalResponse]);
-                }    
-            }
-        }
-
-        // start issuing requests
-        var queue = types[OpenLayers.State.INSERT];
-        if(queue.length > 0) {
-            resp.push(this.create(
-                queue, OpenLayers.Util.applyDefaults(
-                    {callback: insertCallback, scope: this}, options.create
-                )
-            ));
-        }
-        queue = types[OpenLayers.State.UPDATE];
-        for(var i=queue.length-1; i>=0; --i) {
-            resp.push(this.update(
-                queue[i], OpenLayers.Util.applyDefaults(
-                    {callback: callback, scope: this}, options.update
-                ))
-            );
-        }
-        queue = types[OpenLayers.State.DELETE];
-        for(var i=queue.length-1; i>=0; --i) {
-            resp.push(this["delete"](
-                queue[i], OpenLayers.Util.applyDefaults(
-                    {callback: callback, scope: this}, options["delete"]
-                ))
-            );
-        }
-        return resp;
-    },
-
-    /**
-     * APIMethod: abort
-     * Abort an ongoing request, the response object passed to
-     * this method must come from this HTTP protocol (as a result
-     * of a create, read, update, delete or commit operation).
-     *
-     * Parameters:
-     * response - {<OpenLayers.Protocol.Response>}
-     */
-    abort: function(response) {
-        if (response) {
-            response.priv.abort();
-        }
-    },
-
-    /**
-     * Method: callUserCallback
-     * This method is used from within the commit method each time an
-     *     an HTTP response is received from the server, it is responsible
-     *     for calling the user-supplied callbacks.
-     *
-     * Parameters:
-     * resp - {<OpenLayers.Protocol.Response>}
-     * options - {Object} The map of options passed to the commit call.
-     */
-    callUserCallback: function(resp, options) {
-        var opt = options[resp.requestType];
-        if(opt && opt.callback) {
-            opt.callback.call(opt.scope, resp);
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Protocol.HTTP" 
-});
-
-/**
- * Property: OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR
- * {Object} A private class-level property mapping the
- *     OpenLayers.Filter.Comparison types to the operation
- *     strings of the protocol.
- */
-(function() {
-    var o = OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR = {};
-    o[OpenLayers.Filter.Comparison.EQUAL_TO]                 = "eq";
-    o[OpenLayers.Filter.Comparison.NOT_EQUAL_TO]             = "ne";
-    o[OpenLayers.Filter.Comparison.LESS_THAN]                = "lt";
-    o[OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO]    = "lte";
-    o[OpenLayers.Filter.Comparison.GREATER_THAN]             = "gt";
-    o[OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO] = "gte";
-    o[OpenLayers.Filter.Comparison.LIKE]                     = "ilike";
-})();
-
-

--- a/labs/openlayers/lib/OpenLayers/Protocol/SOS.js
+++ /dev/null
@@ -1,34 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Protocol.js
- */
-
-/**
- * Function: OpenLayers.Protocol.SOS
- * Used to create a versioned SOS protocol.  Default version is 1.0.0.
- *
- * Returns:
- * {<OpenLayers.Protocol>} An SOS protocol for the given version.
- */
-OpenLayers.Protocol.SOS = function(options) {
-    options = OpenLayers.Util.applyDefaults(
-        options, OpenLayers.Protocol.SOS.DEFAULTS
-    );
-    var cls = OpenLayers.Protocol.SOS["v"+options.version.replace(/\./g, "_")];
-    if(!cls) {
-        throw "Unsupported SOS version: " + options.version;
-    }
-    return new cls(options);
-};
-
-/**
- * Constant: OpenLayers.Protocol.SOS.DEFAULTS
- */
-OpenLayers.Protocol.SOS.DEFAULTS = {
-    "version": "1.0.0"
-};
-

--- a/labs/openlayers/lib/OpenLayers/Protocol/SOS/v1_0_0.js
+++ /dev/null
@@ -1,133 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Protocol/SOS.js
- * @requires OpenLayers/Format/SOSGetFeatureOfInterest.js
- */
-
-/**
- * Class: OpenLayers.Protocol.SOS.v1_0_0
- * An SOS v1.0.0 Protocol for vector layers.  Create a new instance with the
- *     <OpenLayers.Protocol.SOS.v1_0_0> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Protocol>
- */
- OpenLayers.Protocol.SOS.v1_0_0 = OpenLayers.Class(OpenLayers.Protocol, {
-
-    /**
-     * APIProperty: fois
-     * {Array(String)} Array of features of interest (foi)
-     */
-    fois: null,
-
-    /**
-     * Property: formatOptions
-     * {Object} Optional options for the format.  If a format is not provided,
-     *     this property can be used to extend the default format options.
-     */
-    formatOptions: null,
-   
-    /**
-     * Constructor: OpenLayers.Protocol.SOS
-     * A class for giving layers an SOS protocol.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     * Valid options properties:
-     * url - {String} URL to send requests to (required).
-     * fois - {Array} The features of interest (required).
-     */
-    initialize: function(options) {
-        OpenLayers.Protocol.prototype.initialize.apply(this, [options]);
-        if(!options.format) {
-            this.format = new OpenLayers.Format.SOSGetFeatureOfInterest(
-                this.formatOptions);
-        }
-    },
-   
-    /**
-     * APIMethod: destroy
-     * Clean up the protocol.
-     */
-    destroy: function() {
-        if(this.options && !this.options.format) {
-            this.format.destroy();
-        }
-        this.format = null;
-        OpenLayers.Protocol.prototype.destroy.apply(this);
-    },
-
-    /**
-     * APIMethod: read
-     * Construct a request for reading new sensor positions. This is done by
-     *     issuing one GetFeatureOfInterest request.
-     */
-    read: function(options) {
-        options = OpenLayers.Util.extend({}, options);
-        OpenLayers.Util.applyDefaults(options, this.options || {});
-        var response = new OpenLayers.Protocol.Response({requestType: "read"});
-        var format = this.format;
-        var data = OpenLayers.Format.XML.prototype.write.apply(format,
-            [format.writeNode("sos:GetFeatureOfInterest", {fois: this.fois})]
-        );
-        response.priv = OpenLayers.Request.POST({
-            url: options.url,
-            callback: this.createCallback(this.handleRead, response, options),
-            data: data
-        });
-        return response;
-    },
-   
-    /**
-     * Method: handleRead
-     * Deal with response from the read request.
-     *
-     * Parameters:
-     * response - {<OpenLayers.Protocol.Response>} The response object to pass
-     *     to the user callback.
-     * options - {Object} The user options passed to the read call.
-     */
-    handleRead: function(response, options) {
-        if(options.callback) {
-            var request = response.priv;
-            if(request.status >= 200 && request.status < 300) {
-                // success
-                response.features = this.parseFeatures(request);
-                response.code = OpenLayers.Protocol.Response.SUCCESS;
-            } else {
-                // failure
-                response.code = OpenLayers.Protocol.Response.FAILURE;
-            }
-            options.callback.call(options.scope, response);
-        }
-    },
-
-    /**
-     * Method: parseFeatures
-     * Read HTTP response body and return features
-     *
-     * Parameters:
-     * request - {XMLHttpRequest} The request object
-     *
-     * Returns:
-     * {Array({<OpenLayers.Feature.Vector>})} Array of features
-     */
-    parseFeatures: function(request) {
-        var doc = request.responseXML;
-        if(!doc || !doc.documentElement) {
-            doc = request.responseText;
-        }
-        if(!doc || doc.length <= 0) {
-            return null;
-        }
-        return this.format.read(doc);
-    },
-
-    CLASS_NAME: "OpenLayers.Protocol.SOS.v1_0_0"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Protocol/SQL.js
+++ /dev/null
@@ -1,89 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Protocol.js
- */
-
-/**
- * Class: OpenLayers.Protocol.SQL
- * Abstract SQL protocol class.  Not to be instantiated directly.  Use
- *     one of the SQL protocol subclasses instead.
- *
- * Inherits from:
- *  - <OpenLayers.Protocol>
- */
-OpenLayers.Protocol.SQL = OpenLayers.Class(OpenLayers.Protocol, {
-
-    /**
-     * APIProperty: databaseName
-     * {String}
-     */
-    databaseName: 'ol',
-
-    /**
-     * APIProperty: tableName
-     * Name of the database table into which Features should be saved.
-     */
-    tableName: "ol_vector_features",
-
-    /**
-     * Property: postReadFiltering
-     * {Boolean} Whether the filter (if there's one) must be applied after
-     *      the features have been read from the database; for example the
-     *      BBOX strategy passes the read method a BBOX spatial filter, if
-     *      postReadFiltering is true every feature read from the database
-     *      will go through the BBOX spatial filter, which can be costly;
-     *      defaults to true.
-     */
-    postReadFiltering: true,
-
-    /**
-     * Constructor: OpenLayers.Protocol.SQL
-     */
-    initialize: function(options) {
-        OpenLayers.Protocol.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * APIMethod: destroy
-     * Clean up the protocol.
-     */
-    destroy: function() {
-        OpenLayers.Protocol.prototype.destroy.apply(this);
-    },
-
-    /**
-     * APIMethod: supported
-     * This should be overridden by specific subclasses
-     *
-     * Returns:
-     * {Boolean} Whether or not the browser supports the SQL backend
-     */
-    supported: function() {
-        return false;
-    },
-
-    /**
-     * Method: evaluateFilter
-     * If postReadFiltering is true evaluate the filter against the feature
-     * and return the result of the evaluation, otherwise return true.
-     *
-     * Parameters:
-     * {<OpenLayers.Feature.Vector>} The feature.
-     * {<OpenLayers.Filter>} The filter.
-     *
-     * Returns:
-     * {Boolean} true if postReadFiltering if false, the result of the
-     * filter evaluation otherwise.
-     */
-    evaluateFilter: function(feature, filter) {
-        return filter && this.postReadFiltering ?
-            filter.evaluate(feature) : true;
-    },
-
-    CLASS_NAME: "OpenLayers.Protocol.SQL"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Protocol/SQL/Gears.js
+++ /dev/null
@@ -1,562 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires Gears/gears_init.js
- * @requires OpenLayers/Protocol/SQL.js
- * @requires OpenLayers/Format/JSON.js
- * @requires OpenLayers/Format/WKT.js
- */
-
-/**
- * Class: OpenLayers.Protocol.SQL.Gears
- * This Protocol stores feature in the browser via the Gears Database module 
- * <http://code.google.com/apis/gears/api_database.html>.
- *
- * The main advantage is that all the read, create, update and delete operations 
- * can be done offline.
- *
- * Inherits from:
- *  - <OpenLayers.Protocol.SQL>
- */
-OpenLayers.Protocol.SQL.Gears = OpenLayers.Class(OpenLayers.Protocol.SQL, {
-
-    /**
-     * Property: FID_PREFIX
-     * {String}
-     */
-    FID_PREFIX: '__gears_fid__',
-
-    /**
-     * Property: NULL_GEOMETRY
-     * {String}
-     */
-    NULL_GEOMETRY: '__gears_null_geometry__',
-
-    /**
-     * Property: NULL_FEATURE_STATE
-     * {String}
-     */
-    NULL_FEATURE_STATE: '__gears_null_feature_state__',
-
-    /**
-     * Property: jsonParser
-     * {<OpenLayers.Format.JSON>}
-     */
-    jsonParser: null,
-
-    /**
-     * Property: wktParser
-     * {<OpenLayers.Format.WKT>}
-     */
-    wktParser: null,
-
-    /**
-     * Property: fidRegExp
-     * {RegExp} Regular expression to know whether a feature was
-     *      created in offline mode.
-     */
-    fidRegExp: null,
-
-    /**
-     * Property: saveFeatureState
-     * {Boolean} Whether to save the feature state (<OpenLayers.State>)
-     *      into the database, defaults to true.
-     */    
-    saveFeatureState: true,
-
-    /**
-     * Property: typeOfFid
-     * {String} The type of the feature identifier, either "number" or
-     *      "string", defaults to "string".
-     */
-    typeOfFid: "string",
-
-    /**
-     * Property: db
-     * {GearsDatabase}
-     */
-    db: null,
-
-    /**
-     * Constructor: OpenLayers.Protocol.SQL.Gears
-     */
-    initialize: function(options) {
-        if (!this.supported()) {
-            return;
-        }
-        OpenLayers.Protocol.SQL.prototype.initialize.apply(this, [options]);
-        this.jsonParser = new OpenLayers.Format.JSON();
-        this.wktParser = new OpenLayers.Format.WKT();
-
-        this.fidRegExp = new RegExp('^' + this.FID_PREFIX);
-        this.initializeDatabase();
-
-        
-    },
-
-    /**
-     * Method: initializeDatabase
-     */
-    initializeDatabase: function() {
-        this.db = google.gears.factory.create('beta.database');
-        this.db.open(this.databaseName);
-        this.db.execute(
-            "CREATE TABLE IF NOT EXISTS " + this.tableName +
-            " (fid TEXT UNIQUE, geometry TEXT, properties TEXT," +
-            "  state TEXT)");
-   },
-
-    /**
-     * APIMethod: destroy
-     * Clean up the protocol.
-     */
-    destroy: function() {
-        this.db.close();
-        this.db = null;
-
-        this.jsonParser = null;
-        this.wktParser = null;
-
-        OpenLayers.Protocol.SQL.prototype.destroy.apply(this);
-    },
-
-    /**
-     * APIMethod: supported
-     * Determine whether a browser supports Gears
-     *
-     * Returns:
-     * {Boolean} The browser supports Gears
-     */
-    supported: function() {
-        return !!(window.google && google.gears);
-    },
-
-    /**
-     * APIMethod: read
-     * Read all features from the database and return a
-     * <OpenLayers.Protocol.Response> instance. If the options parameter
-     * contains a callback attribute, the function is called with the response
-     * as a parameter.
-     *
-     * Parameters:
-     * options - {Object} Optional object for configuring the request; it
-     *      can have the {Boolean} property "noFeatureStateReset" which
-     *      specifies if the state of features read from the Gears
-     *      database must be reset to null, if "noFeatureStateReset"
-     *      is undefined or false then each feature's state is reset
-     *      to null, if "noFeatureStateReset" is true the feature state
-     *      is preserved.
-     *
-     * Returns:
-     * {<OpenLayers.Protocol.Response>} An <OpenLayers.Protocol.Response>
-     *      object.
-     */
-    read: function(options) {
-        OpenLayers.Protocol.prototype.read.apply(this, arguments);
-        options = OpenLayers.Util.applyDefaults(options, this.options);
-
-        var feature, features = [];
-        var rs = this.db.execute("SELECT * FROM " + this.tableName);
-        while (rs.isValidRow()) {
-            feature = this.unfreezeFeature(rs);
-            if (this.evaluateFilter(feature, options.filter)) {
-                if (!options.noFeatureStateReset) {
-                    feature.state = null;
-                }
-                features.push(feature);
-            }
-            rs.next();
-        }
-        rs.close();
-
-        var resp = new OpenLayers.Protocol.Response({
-            code: OpenLayers.Protocol.Response.SUCCESS,
-            requestType: "read",
-            features: features
-        });
-
-        if (options && options.callback) {
-            options.callback.call(options.scope, resp);
-        }
-
-        return resp;
-    },
-
-    /**
-     * Method: unfreezeFeature
-     *
-     * Parameters:
-     * row - {ResultSet}
-     *
-     * Returns:
-     * {<OpenLayers.Feature.Vector>}
-     */
-    unfreezeFeature: function(row) {
-        var feature;
-        var wkt = row.fieldByName('geometry');
-        if (wkt == this.NULL_GEOMETRY) {
-            feature = new OpenLayers.Feature.Vector();
-        } else {
-            feature = this.wktParser.read(wkt);
-        }
-
-        feature.attributes = this.jsonParser.read(
-            row.fieldByName('properties'));
-
-        feature.fid = this.extractFidFromField(row.fieldByName('fid'));
-
-        var state = row.fieldByName('state');
-        if (state == this.NULL_FEATURE_STATE) {
-            state = null;
-        }
-        feature.state = state;
-
-        return feature;
-    },
-
-    /**
-     * Method: extractFidFromField
-     *
-     * Parameters:
-     * field - {String}
-     *
-     * Returns
-     * {String} or {Number} The fid.
-     */
-    extractFidFromField: function(field) {
-        if (!field.match(this.fidRegExp) && this.typeOfFid == "number") {
-            field = parseFloat(field);
-        }
-        return field;
-    },
-
-    /**
-     * APIMethod: create
-     * Create new features into the database.
-     *
-     * Parameters:
-     * features - {Array({<OpenLayers.Feature.Vector>})} or
-     *            {<OpenLayers.Feature.Vector>} The features to create in
-     *            the database.
-     * options - {Object} Optional object for configuring the request.
-     *
-     * Returns:
-     *  {<OpenLayers.Protocol.Response>} An <OpenLayers.Protocol.Response>
-     *          object.
-     */
-    create: function(features, options) {
-        options = OpenLayers.Util.applyDefaults(options, this.options);
-
-        var resp = this.createOrUpdate(features);
-        resp.requestType = "create";
-
-        if (options && options.callback) {
-            options.callback.call(options.scope, resp);
-        }
-
-        return resp;
-    },
-
-    /**
-     * APIMethod: update
-     * Construct a request updating modified feature.
-     *
-     * Parameters:
-     * features - {Array({<OpenLayers.Feature.Vector>})} or
-     *            {<OpenLayers.Feature.Vector>} The features to update in
-     *            the database.
-     * options - {Object} Optional object for configuring the request.
-     *
-     * Returns:
-     *  {<OpenLayers.Protocol.Response>} An <OpenLayers.Protocol.Response>
-     *          object.
-     */
-    update: function(features, options) {
-        options = OpenLayers.Util.applyDefaults(options, this.options);
-
-        var resp = this.createOrUpdate(features);
-        resp.requestType = "update";
-
-        if (options && options.callback) {
-            options.callback.call(options.scope, resp);
-        }
-
-        return resp;
-    },
-
-    /**
-     * Method: createOrUpdate
-     * Construct a request for updating or creating features in the
-     * database.
-     *
-     * Parameters:
-     * features - {Array({<OpenLayers.Feature.Vector>})} or
-     *      {<OpenLayers.Feature.Vector>} The feature to create or update
-     *      in the database.
-     *
-     * Returns:
-     *  {<OpenLayers.Protocol.Response>} An <OpenLayers.Protocol.Response>
-     *          object.
-     */
-    createOrUpdate: function(features) {
-        if (!(features instanceof Array)) {
-            features = [features];
-        }
-
-        var i, len = features.length, feature;
-        var insertedFeatures = new Array(len);
- 
-        for (i = 0; i < len; i++) {
-            feature = features[i];
-            var params = this.freezeFeature(feature);
-            this.db.execute(
-                "REPLACE INTO " + this.tableName + 
-                " (fid, geometry, properties, state)" + 
-                " VALUES (?, ?, ?, ?)",
-                params);
-
-            var clone = feature.clone();
-            clone.fid = this.extractFidFromField(params[0]);
-            insertedFeatures[i] = clone;
-        }
-
-        return new OpenLayers.Protocol.Response({
-            code: OpenLayers.Protocol.Response.SUCCESS,
-            features: insertedFeatures,
-            reqFeatures: features
-        });
-    },
-
-    /**
-     * Method: freezeFeature
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>}
-     * state - {String} The feature state to store in the database.
-     *
-     * Returns:
-     * {Array}
-     */
-    freezeFeature: function(feature) {
-        // 2 notes:
-        // - fid might not be a string
-        // - getFeatureStateForFreeze needs the feature fid to it's stored
-        //   in the feature here
-        feature.fid = feature.fid != null ?
-            "" + feature.fid : OpenLayers.Util.createUniqueID(this.FID_PREFIX);
-
-        var geometry = feature.geometry != null ?
-            feature.geometry.toString() : this.NULL_GEOMETRY;
-
-        var properties = this.jsonParser.write(feature.attributes);
-
-        var state = this.getFeatureStateForFreeze(feature);
-
-        return [feature.fid, geometry, properties, state];
-    },
-
-    /**
-     * Method: getFeatureStateForFreeze
-     * Get the state of the feature to store into the database.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} The feature.
-     *
-     * Returns
-     * {String} The state
-     */
-    getFeatureStateForFreeze: function(feature) {
-        var state;
-        if (!this.saveFeatureState) {
-            state = this.NULL_FEATURE_STATE;
-        } else if (this.createdOffline(feature)) {
-            // if the feature was created in offline mode, its
-            // state must remain INSERT
-            state = OpenLayers.State.INSERT;
-        } else {
-            state = feature.state;
-        }
-        return state;
-    },
-
-    /**
-     * APIMethod: delete
-     * Delete features from the database.
-     *
-     * Parameters:
-     * features - {Array({<OpenLayers.Feature.Vector>})} or
-     *            {<OpenLayers.Feature.Vector>}
-     * options - {Object} Optional object for configuring the request.
-     *       This object is modified and should not be reused.
-     *
-     * Returns:
-     *  {<OpenLayers.Protocol.Response>} An <OpenLayers.Protocol.Response>
-     *          object.
-     */
-    "delete": function(features, options) {
-        if (!(features instanceof Array)) {
-            features = [features];
-        }
-
-        options = OpenLayers.Util.applyDefaults(options, this.options);
-
-        var i, len, feature;
-        for (i = 0, len = features.length; i < len; i++) {
-            feature = features[i];
-
-            // if saveFeatureState is set to true and if the feature wasn't created
-            // in offline mode we don't delete it in the database but just update 
-            // it state column
-            if (this.saveFeatureState && !this.createdOffline(feature)) {
-                var toDelete = feature.clone();
-                toDelete.fid = feature.fid;
-                if (toDelete.geometry) {
-                    toDelete.geometry.destroy();
-                    toDelete.geometry = null;
-                }
-                toDelete.state = feature.state;
-                this.createOrUpdate(toDelete);
-            } else {
-                this.db.execute(
-                    "DELETE FROM " + this.tableName +
-                    " WHERE fid = ?", [feature.fid]);
-            }
-        }
-
-        var resp = new OpenLayers.Protocol.Response({
-            code: OpenLayers.Protocol.Response.SUCCESS,
-            requestType: "delete",
-            reqFeatures: features
-        });
-
-        if (options && options.callback) {
-            options.callback.call(options.scope, resp);
-        }
-
-        return resp;
-    },
-
-    /**
-     * Method: createdOffline
-     * Returns true if the feature had a feature id when it was created in
-     *      the Gears database, false otherwise; this is determined by
-     *      checking the form of the feature's fid value.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>}
-     *
-     * Returns:
-     * {Boolean}
-     */
-    createdOffline: function(feature) {
-        return (typeof feature.fid == "string" &&
-                !!(feature.fid.match(this.fidRegExp)));
-    },
-
-    /**
-     * APIMethod: commit
-     * Go over the features and for each take action
-     * based on the feature state. Possible actions are create,
-     * update and delete.
-     *
-     * Parameters:
-     * features - {Array({<OpenLayers.Feature.Vector>})}
-     * options - {Object} Object whose possible keys are "create", "update",
-     *      "delete", "callback" and "scope", the values referenced by the
-     *      first three are objects as passed to the "create", "update", and
-     *      "delete" methods, the value referenced by the "callback" key is
-     *      a function which is called when the commit operation is complete
-     *      using the scope referenced by the "scope" key.
-     *
-     * Returns:
-     * {Array({<OpenLayers.Protocol.Response>})} An array of
-     *       <OpenLayers.Protocol.Response> objects, one per request made
-     *       to the database.
-     */
-    commit: function(features, options) {
-        var opt, resp = [], nRequests = 0, nResponses = 0;
-
-        function callback(resp) {
-            if (++nResponses < nRequests) {
-                resp.last = false;
-            }
-            this.callUserCallback(options, resp);
-        }
-
-        var feature, toCreate = [], toUpdate = [], toDelete = [];
-        for (var i = features.length - 1; i >= 0; i--) {
-            feature = features[i];
-            switch (feature.state) {
-            case OpenLayers.State.INSERT:
-                toCreate.push(feature);
-                break;
-            case OpenLayers.State.UPDATE:
-                toUpdate.push(feature);
-                break;
-            case OpenLayers.State.DELETE:
-                toDelete.push(feature);
-                break;
-            }
-        }
-        if (toCreate.length > 0) {
-            nRequests++;
-            opt = OpenLayers.Util.applyDefaults(
-                {"callback": callback, "scope": this},
-                options.create
-            );
-            resp.push(this.create(toCreate, opt));
-        }
-        if (toUpdate.length > 0) {
-            nRequests++;
-            opt = OpenLayers.Util.applyDefaults(
-                {"callback": callback, "scope": this},
-                options.update
-            );
-            resp.push(this.update(toUpdate, opt));
-        }
-        if (toDelete.length > 0) {
-            nRequests++;
-            opt = OpenLayers.Util.applyDefaults(
-                {"callback": callback, "scope": this},
-                options["delete"]
-            );
-            resp.push(this["delete"](toDelete, opt));
-        }
-
-        return resp;
-    },
-
-    /**
-     * Method: clear
-     * Removes all rows of the table.
-     */
-    clear: function() {
-        this.db.execute("DELETE FROM " + this.tableName);
-    },
-
-    /**
-     * Method: callUserCallback
-     * This method is called from within commit each time a request is made
-     * to the database, it is responsible for calling the user-supplied
-     * callbacks.
-     *
-     * Parameters:
-     * options - {Object} The map of options passed to the commit call.
-     * resp - {<OpenLayers.Protocol.Response>}
-     */
-    callUserCallback: function(options, resp) {
-        var opt = options[resp.requestType];
-        if (opt && opt.callback) {
-            opt.callback.call(opt.scope, resp);
-        }
-        if (resp.last && options.callback) {
-            options.callback.call(options.scope);
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Protocol.SQL.Gears"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Protocol/WFS.js
+++ /dev/null
@@ -1,72 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Protocol.js
- */
-
-/**
- * Function: OpenLayers.Protocol.WFS
- * Used to create a versioned WFS protocol.  Default version is 1.0.0.
- *
- * Returns:
- * {<OpenLayers.Protocol>} A WFS protocol of the given version.
- */
-OpenLayers.Protocol.WFS = function(options) {
-    options = OpenLayers.Util.applyDefaults(
-        options, OpenLayers.Protocol.WFS.DEFAULTS
-    );
-    var cls = OpenLayers.Protocol.WFS["v"+options.version.replace(/\./g, "_")];
-    if(!cls) {
-        throw "Unsupported WFS version: " + options.version;
-    }
-    return new cls(options);
-};
-
-/**
- * Function: OpenLayers.Protocol.WFS.fromWMSLayer
- * Convenience function to create a WFS protocol from a WMS layer.  This makes
- *     the assumption that a WFS requests can be issued at the same URL as
- *     WMS requests and that a WFS featureType exists with the same name as the
- *     WMS layer.
- *     
- * This function is designed to auto-configure <url>, <featureType>,
- *     <featurePrefix> and <srsName> for WFS <version> 1.1.0. Note that
- *     srsName matching with the WMS layer will not work with WFS 1.0.0..
- * 
- * Parameters:
- * layer - {<OpenLayers.Layer.WMS>} WMS layer that has a matching WFS
- *     FeatureType at the same server url with the same typename.
- * options - {Object} Default properties to be set on the protocol.
- *
- */
-OpenLayers.Protocol.WFS.fromWMSLayer = function(layer, options) {
-    var typeName, featurePrefix;
-    var param = layer.params["LAYERS"];
-    var parts = (param instanceof Array ? param[0] : param).split(":");
-    if(parts.length > 1) {
-        featurePrefix = parts[0];
-    }
-    typeName = parts.pop();
-    var protocolOptions = {
-        url: layer.url,
-        featureType: typeName,
-        featurePrefix: featurePrefix,
-        srsName: layer.projection && layer.projection.getCode() ||
-                 layer.map && layer.map.getProjectionObject().getCode(),
-        version: "1.1.0"
-    };
-    return new OpenLayers.Protocol.WFS(OpenLayers.Util.applyDefaults(
-        options, protocolOptions
-    ));
-};
-
-/**
- * Constant: OpenLayers.Protocol.WFS.DEFAULTS
- */
-OpenLayers.Protocol.WFS.DEFAULTS = {
-    "version": "1.0.0"
-};
-

--- a/labs/openlayers/lib/OpenLayers/Protocol/WFS/v1.js
+++ /dev/null
@@ -1,343 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Protocol/WFS.js
- */
-
-/**
- * Class: OpenLayers.Protocol.WFS.v1
- * Abstract class for for v1.0.0 and v1.1.0 protocol.
- *
- * Inherits from:
- *  - <OpenLayers.Protocol>
- */
-OpenLayers.Protocol.WFS.v1 = OpenLayers.Class(OpenLayers.Protocol, {
-    
-    /**
-     * Property: version
-     * {String} WFS version number.
-     */
-    version: null,
-    
-    /**
-     * Property: srsName
-     * {String} Name of spatial reference system.  Default is "EPSG:4326".
-     */
-    srsName: "EPSG:4326",
-    
-    /**
-     * Property: featureType
-     * {String} Local feature typeName.
-     */
-    featureType: null,
-    
-    /**
-     * Property: featureNS
-     * {String} Feature namespace.
-     */
-    featureNS: null,
-    
-    /**
-     * Property: geometryName
-     * {String} Name of the geometry attribute for features.  Default is
-     *     "the_geom".
-     */
-    geometryName: "the_geom",
-    
-    /**
-     * Property: schema
-     * {String} Optional schema location that will be included in the
-     *     schemaLocation attribute value.  Note that the feature type schema
-     *     is required for a strict XML validator (on transactions with an
-     *     insert for example), but is *not* required by the WFS specification
-     *     (since the server is supposed to know about feature type schemas).
-     */
-    schema: null,
-
-    /**
-     * Property: featurePrefix
-     * {String} Namespace alias for feature type.  Default is "feature".
-     */
-    featurePrefix: "feature",
-    
-    /**
-     * Property: formatOptions
-     * {Object} Optional options for the format.  If a format is not provided,
-     *     this property can be used to extend the default format options.
-     */
-    formatOptions: null,
-
-    /** 
-     * Property: readFormat 
-     * {<OpenLayers.Format>} For WFS requests it is possible to get a  
-     *     different output format than GML. In that case, we cannot parse  
-     *     the response with the default format (WFST) and we need a different 
-     *     format for reading. 
-     */ 
-    readFormat: null,     
-    
-    /**
-     * Constructor: OpenLayers.Protocol.WFS
-     * A class for giving layers WFS protocol.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     *
-     * Valid options properties:
-     * url - {String} URL to send requests to (required).
-     * featureType - {String} Local (without prefix) feature typeName (required).
-     * featureNS - {String} Feature namespace (required, but can be autodetected
-     *     for reading if featurePrefix is provided and identical to the prefix
-     *     in the server response).
-     * featurePrefix - {String} Feature namespace alias (optional - only used
-     *     for writing if featureNS is provided).  Default is 'feature'.
-     * geometryName - {String} Name of geometry attribute.  Default is 'the_geom'.
-     */
-    initialize: function(options) {
-        OpenLayers.Protocol.prototype.initialize.apply(this, [options]);
-        if(!options.format) {
-            this.format = OpenLayers.Format.WFST(OpenLayers.Util.extend({
-                version: this.version,
-                featureType: this.featureType,
-                featureNS: this.featureNS,
-                featurePrefix: this.featurePrefix,
-                geometryName: this.geometryName,
-                srsName: this.srsName,
-                schema: this.schema
-            }, this.formatOptions));
-        }
-        if(!this.featureNS && this.featurePrefix) {
-            // featureNS autodetection
-            var readNode = this.format.readNode;
-            this.format.readNode = function(node, obj) {
-                if(!this.featureNS && node.prefix == this.featurePrefix) {
-                    this.featureNS = node.namespaceURI;
-                    this.setNamespace("feature", this.featureNS);
-                }
-                return readNode.apply(this, arguments);
-            };
-        }
-    },
-    
-    /**
-     * APIMethod: destroy
-     * Clean up the protocol.
-     */
-    destroy: function() {
-        if(this.options && !this.options.format) {
-            this.format.destroy();
-        }
-        this.format = null;
-        OpenLayers.Protocol.prototype.destroy.apply(this);
-    },
-
-    /**
-     * Method: read
-     * Construct a request for reading new features.  Since WFS splits the
-     *     basic CRUD operations into GetFeature requests (for read) and
-     *     Transactions (for all others), this method does not make use of the
-     *     format's read method (that is only about reading transaction
-     *     responses).
-     */
-    read: function(options) {
-        OpenLayers.Protocol.prototype.read.apply(this, arguments);
-        options = OpenLayers.Util.extend({}, options);
-        OpenLayers.Util.applyDefaults(options, this.options || {});
-        var response = new OpenLayers.Protocol.Response({requestType: "read"});
-        
-        var data = OpenLayers.Format.XML.prototype.write.apply(
-            this.format, [this.format.writeNode("wfs:GetFeature", options)]
-        );
-
-        response.priv = OpenLayers.Request.POST({
-            url: options.url,
-            callback: this.createCallback(this.handleRead, response, options),
-            params: options.params,
-            headers: options.headers,
-            data: data
-        });        
-
-        return response;
-    },
-    
-    /**
-     * Method: handleRead
-     * Deal with response from the read request.
-     *
-     * Parameters:
-     * response - {<OpenLayers.Protocol.Response>} The response object to pass
-     *     to the user callback.
-     * options - {Object} The user options passed to the read call.
-     */
-    handleRead: function(response, options) {
-        if(options.callback) {
-            var request = response.priv;
-            if(request.status >= 200 && request.status < 300) {
-                // success
-                response.features = this.parseFeatures(request);
-                response.code = OpenLayers.Protocol.Response.SUCCESS;
-            } else {
-                // failure
-                response.code = OpenLayers.Protocol.Response.FAILURE;
-            }
-            options.callback.call(options.scope, response);
-        }
-    },
-
-    /**
-     * Method: parseFeatures
-     * Read HTTP response body and return features
-     *
-     * Parameters:
-     * request - {XMLHttpRequest} The request object
-     *
-     * Returns:
-     * {Array({<OpenLayers.Feature.Vector>})} or
-     *     {<OpenLayers.Feature.Vector>} Array of features or a single feature.
-     */
-    parseFeatures: function(request) {
-        var doc = request.responseXML;
-        if(!doc || !doc.documentElement) {
-            doc = request.responseText;
-        }
-        if(!doc || doc.length <= 0) {
-            return null;
-        }
-        return (this.readFormat !== null) ? this.readFormat.read(doc) : 
-            this.format.read(doc);
-    },
-
-    /**
-     * Method: commit
-     * Given a list of feature, assemble a batch request for update, create,
-     *     and delete transactions.  A commit call on the prototype amounts
-     *     to writing a WFS transaction - so the write method on the format
-     *     is used.
-     *
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>}
-     *
-     * Returns:
-     * {<OpenLayers.Protocol.Response>} A response object with a features
-     *     property containing any insertIds and a priv property referencing
-     *     the XMLHttpRequest object.
-     */
-    commit: function(features, options) {
-
-        options = OpenLayers.Util.extend({}, options);
-        OpenLayers.Util.applyDefaults(options, this.options);
-        
-        var response = new OpenLayers.Protocol.Response({
-            requestType: "commit",
-            reqFeatures: features
-        });
-        response.priv = OpenLayers.Request.POST({
-            url: options.url,
-            data: this.format.write(features, options),
-            callback: this.createCallback(this.handleCommit, response, options)
-        });
-        
-        return response;
-    },
-    
-    /**
-     * Method: handleCommit
-     * Called when the commit request returns.
-     * 
-     * Parameters:
-     * response - {<OpenLayers.Protocol.Response>} The response object to pass
-     *     to the user callback.
-     * options - {Object} The user options passed to the commit call.
-     */
-    handleCommit: function(response, options) {
-        if(options.callback) {
-            var request = response.priv;
-
-            // ensure that we have an xml doc
-            var data = request.responseXML;
-            if(!data || !data.documentElement) {
-                data = request.responseText;
-            }
-            
-            var obj = this.format.read(data) || {};
-            
-            response.insertIds = obj.insertIds || [];
-            response.code = (obj.success) ?
-                OpenLayers.Protocol.Response.SUCCESS :
-                OpenLayers.Protocol.Response.FAILURE;
-            options.callback.call(options.scope, response);
-        }
-    },
-    
-    /**
-     * Method: filterDelete
-     * Send a request that deletes all features by their filter.
-     * 
-     * Parameters:
-     * filter - {OpenLayers.Filter} filter
-     */
-    filterDelete: function(filter, options) {
-        options = OpenLayers.Util.extend({}, options);
-        OpenLayers.Util.applyDefaults(options, this.options);    
-        
-        var response = new OpenLayers.Protocol.Response({
-            requestType: "commit"
-        });    
-        
-        var root = this.format.createElementNSPlus("wfs:Transaction", {
-            attributes: {
-                service: "WFS",
-                version: this.version
-            }
-        });
-        
-        var deleteNode = this.format.createElementNSPlus("wfs:Delete", {
-            attributes: {
-                typeName: (options.featureNS ? this.featurePrefix + ":" : "") +
-                    options.featureType
-            }
-        });       
-        
-        if(options.featureNS) {
-            deleteNode.setAttribute("xmlns:" + this.featurePrefix, options.featureNS);
-        }
-        var filterNode = this.format.writeNode("ogc:Filter", filter);
-        
-        deleteNode.appendChild(filterNode);
-        
-        root.appendChild(deleteNode);
-        
-        var data = OpenLayers.Format.XML.prototype.write.apply(
-            this.format, [root]
-        );
-        
-        return OpenLayers.Request.POST({
-            url: this.url,
-            callback : options.callback || function(){},
-            data: data
-        });   
-        
-    },
-
-    /**
-     * Method: abort
-     * Abort an ongoing request, the response object passed to
-     * this method must come from this protocol (as a result
-     * of a read, or commit operation).
-     *
-     * Parameters:
-     * response - {<OpenLayers.Protocol.Response>}
-     */
-    abort: function(response) {
-        if (response) {
-            response.priv.abort();
-        }
-    },
-  
-    CLASS_NAME: "OpenLayers.Protocol.WFS.v1" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Protocol/WFS/v1_0_0.js
+++ /dev/null
@@ -1,45 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Protocol/WFS/v1.js
- * @requires OpenLayers/Format/WFST/v1_0_0.js
- */
-
-/**
- * Class: OpenLayers.Protocol.WFS.v1_0_0
- * A WFS v1.0.0 protocol for vector layers.  Create a new instance with the
- *     <OpenLayers.Protocol.WFS.v1_0_0> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Protocol.WFS.v1>
- */
-OpenLayers.Protocol.WFS.v1_0_0 = OpenLayers.Class(OpenLayers.Protocol.WFS.v1, {
-    
-    /**
-     * Property: version
-     * {String} WFS version number.
-     */
-    version: "1.0.0",
-    
-    /**
-     * Constructor: OpenLayers.Protocol.WFS.v1_0_0
-     * A class for giving layers WFS v1.0.0 protocol.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     *
-     * Valid options properties:
-     * featureType - {String} Local (without prefix) feature typeName (required).
-     * featureNS - {String} Feature namespace (optional).
-     * featurePrefix - {String} Feature namespace alias (optional - only used
-     *     if featureNS is provided).  Default is 'feature'.
-     * geometryName - {String} Name of geometry attribute.  Default is 'the_geom'.
-     */
-   
-    CLASS_NAME: "OpenLayers.Protocol.WFS.v1_0_0" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Protocol/WFS/v1_1_0.js
+++ /dev/null
@@ -1,49 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Protocol/WFS/v1.js
- * @requires OpenLayers/Format/WFST/v1_1_0.js
- */
-
-/**
- * Class: OpenLayers.Protocol.WFS.v1_1_0
- * A WFS v1.1.0 protocol for vector layers.  Create a new instance with the
- *     <OpenLayers.Protocol.WFS.v1_1_0> constructor.
- *
- * Differences from the v1.0.0 protocol:
- *  - uses Filter Encoding 1.1.0 instead of 1.0.0
- *  - uses GML 3 instead of 2 if no format is provided
- *  
- * Inherits from:
- *  - <OpenLayers.Protocol.WFS.v1>
- */
-OpenLayers.Protocol.WFS.v1_1_0 = OpenLayers.Class(OpenLayers.Protocol.WFS.v1, {
-    
-    /**
-     * Property: version
-     * {String} WFS version number.
-     */
-    version: "1.1.0",
-    
-    /**
-     * Constructor: OpenLayers.Protocol.WFS.v1_1_0
-     * A class for giving layers WFS v1.1.0 protocol.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     *
-     * Valid options properties:
-     * featureType - {String} Local (without prefix) feature typeName (required).
-     * featureNS - {String} Feature namespace (optional).
-     * featurePrefix - {String} Feature namespace alias (optional - only used
-     *     if featureNS is provided).  Default is 'feature'.
-     * geometryName - {String} Name of geometry attribute.  Default is 'the_geom'.
-     */
-   
-    CLASS_NAME: "OpenLayers.Protocol.WFS.v1_1_0"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Renderer.js
+++ /dev/null
@@ -1,363 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * Class: OpenLayers.Renderer 
- * This is the base class for all renderers.
- *
- * This is based on a merger code written by Paul Spencer and Bertil Chapuis.
- * It is largely composed of virtual functions that are to be implemented
- * in technology-specific subclasses, but there is some generic code too.
- * 
- * The functions that *are* implemented here merely deal with the maintenance
- *  of the size and extent variables, as well as the cached 'resolution' 
- *  value. 
- * 
- * A note to the user that all subclasses should use getResolution() instead
- *  of directly accessing this.resolution in order to correctly use the 
- *  cacheing system.
- *
- */
-OpenLayers.Renderer = OpenLayers.Class({
-
-    /** 
-     * Property: container
-     * {DOMElement} 
-     */
-    container: null,
-    
-    /**
-     * Property: root
-     * {DOMElement}
-     */
-    root: null,
-
-    /** 
-     * Property: extent
-     * {<OpenLayers.Bounds>}
-     */
-    extent: null,
-
-    /**
-     * Property: locked
-     * {Boolean} If the renderer is currently in a state where many things
-     *     are changing, the 'locked' property is set to true. This means 
-     *     that renderers can expect at least one more drawFeature event to be
-     *     called with the 'locked' property set to 'true': In some renderers,
-     *     this might make sense to use as a 'only update local information'
-     *     flag. 
-     */  
-    locked: false,
-    
-    /** 
-     * Property: size
-     * {<OpenLayers.Size>} 
-     */
-    size: null,
-    
-    /**
-     * Property: resolution
-     * {Float} cache of current map resolution
-     */
-    resolution: null,
-    
-    /**
-     * Property: map  
-     * {<OpenLayers.Map>} Reference to the map -- this is set in Vector's setMap()
-     */
-    map: null,
-    
-    /**
-     * Constructor: OpenLayers.Renderer 
-     *
-     * Parameters:
-     * containerID - {<String>} 
-     * options - {Object} options for this renderer. See sublcasses for
-     *     supported options.
-     */
-    initialize: function(containerID, options) {
-        this.container = OpenLayers.Util.getElement(containerID);
-    },
-    
-    /**
-     * APIMethod: destroy
-     */
-    destroy: function() {
-        this.container = null;
-        this.extent = null;
-        this.size =  null;
-        this.resolution = null;
-        this.map = null;
-    },
-
-    /**
-     * APIMethod: supported
-     * This should be overridden by specific subclasses
-     * 
-     * Returns:
-     * {Boolean} Whether or not the browser supports the renderer class
-     */
-    supported: function() {
-        return false;
-    },    
-    
-    /**
-     * Method: setExtent
-     * Set the visible part of the layer.
-     *
-     * Resolution has probably changed, so we nullify the resolution 
-     * cache (this.resolution) -- this way it will be re-computed when 
-     * next it is needed.
-     * We nullify the resolution cache (this.resolution) if resolutionChanged
-     * is set to true - this way it will be re-computed on the next
-     * getResolution() request.
-     *
-     * Parameters:
-     * extent - {<OpenLayers.Bounds>}
-     * resolutionChanged - {Boolean}
-     */
-    setExtent: function(extent, resolutionChanged) {
-        this.extent = extent.clone();
-        if (resolutionChanged) {
-            this.resolution = null;
-        }
-    },
-    
-    /**
-     * Method: setSize
-     * Sets the size of the drawing surface.
-     * 
-     * Resolution has probably changed, so we nullify the resolution 
-     * cache (this.resolution) -- this way it will be re-computed when 
-     * next it is needed.
-     *
-     * Parameters:
-     * size - {<OpenLayers.Size>} 
-     */
-    setSize: function(size) {
-        this.size = size.clone();
-        this.resolution = null;
-    },
-    
-    /** 
-     * Method: getResolution
-     * Uses cached copy of resolution if available to minimize computing
-     * 
-     * Returns:
-     * The current map's resolution
-     */
-    getResolution: function() {
-        this.resolution = this.resolution || this.map.getResolution();
-        return this.resolution;
-    },
-    
-    /**
-     * Method: drawFeature
-     * Draw the feature.  The optional style argument can be used
-     * to override the feature's own style.  This method should only
-     * be called from layer.drawFeature().
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} 
-     * style - {<Object>}
-     * 
-     * Returns:
-     * {Boolean} true if the feature has been drawn completely, false if not,
-     *     undefined if the feature had no geometry
-     */
-    drawFeature: function(feature, style) {
-        if(style == null) {
-            style = feature.style;
-        }
-        if (feature.geometry) {
-            var bounds = feature.geometry.getBounds();
-            if(bounds) {
-                if (!bounds.intersectsBounds(this.extent)) {
-                    style = {display: "none"};
-                }
-                var rendered = this.drawGeometry(feature.geometry, style, feature.id);
-                if(style.display != "none" && style.label && rendered !== false) {
-                    var location = feature.geometry.getCentroid(); 
-                    if(style.labelXOffset || style.labelYOffset) {
-                        xOffset = isNaN(style.labelXOffset) ? 0 : style.labelXOffset;
-                        yOffset = isNaN(style.labelYOffset) ? 0 : style.labelYOffset;
-                        var res = this.getResolution();
-                        location.move(xOffset*res, yOffset*res);
-                    }
-                    this.drawText(feature.id, style, location);
-                } else {
-                    this.removeText(feature.id);
-                }
-                return rendered;
-            }
-        }
-    },
-
-
-    /** 
-     * Method: drawGeometry
-     * 
-     * Draw a geometry.  This should only be called from the renderer itself.
-     * Use layer.drawFeature() from outside the renderer.
-     * virtual function
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>} 
-     * style - {Object} 
-     * featureId - {<String>} 
-     */
-    drawGeometry: function(geometry, style, featureId) {},
-        
-    /**
-     * Method: drawText
-     * Function for drawing text labels.
-     * This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * featureId - {String}
-     * style -
-     * location - {<OpenLayers.Geometry.Point>}
-     */
-    drawText: function(featureId, style, location) {},
-
-    /**
-     * Method: removeText
-     * Function for removing text labels.
-     * This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * featureId - {String}
-     */
-    removeText: function(featureId) {},
-    
-    /**
-     * Method: clear
-     * Clear all vectors from the renderer.
-     * virtual function.
-     */    
-    clear: function() {},
-
-    /**
-     * Method: getFeatureIdFromEvent
-     * Returns a feature id from an event on the renderer.  
-     * How this happens is specific to the renderer.  This should be
-     * called from layer.getFeatureFromEvent().
-     * Virtual function.
-     * 
-     * Parameters:
-     * evt - {<OpenLayers.Event>} 
-     *
-     * Returns:
-     * {String} A feature id or null.
-     */
-    getFeatureIdFromEvent: function(evt) {},
-    
-    /**
-     * Method: eraseFeatures 
-     * This is called by the layer to erase features
-     * 
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>)} 
-     */
-    eraseFeatures: function(features) {
-        if(!(features instanceof Array)) {
-            features = [features];
-        }
-        for(var i=0, len=features.length; i<len; ++i) {
-            var feature = features[i];
-            this.eraseGeometry(feature.geometry, feature.id);
-            this.removeText(feature.id);
-        }
-    },
-    
-    /**
-     * Method: eraseGeometry
-     * Remove a geometry from the renderer (by id).
-     * virtual function.
-     * 
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>} 
-     * featureId - {String}
-     */
-    eraseGeometry: function(geometry, featureId) {},
-    
-    /**
-     * Method: moveRoot
-     * moves this renderer's root to a (different) renderer.
-     * To be implemented by subclasses that require a common renderer root for
-     * feature selection.
-     * 
-     * Parameters:
-     * renderer - {<OpenLayers.Renderer>} target renderer for the moved root
-     */
-    moveRoot: function(renderer) {},
-
-    /**
-     * Method: getRenderLayerId
-     * Gets the layer that this renderer's output appears on. If moveRoot was
-     * used, this will be different from the id of the layer containing the
-     * features rendered by this renderer.
-     * 
-     * Returns:
-     * {String} the id of the output layer.
-     */
-    getRenderLayerId: function() {
-        return this.container.id;
-    },
-    
-    /**
-     * Method: applyDefaultSymbolizer
-     * 
-     * Parameters:
-     * symbolizer - {Object}
-     * 
-     * Returns:
-     * {Object}
-     */
-    applyDefaultSymbolizer: function(symbolizer) {
-        var result = OpenLayers.Util.extend({},
-            OpenLayers.Renderer.defaultSymbolizer);
-        if(symbolizer.stroke === false) {
-            delete result.strokeWidth;
-            delete result.strokeColor;
-        }
-        if(symbolizer.fill === false) {
-            delete result.fillColor;
-        }
-        OpenLayers.Util.extend(result, symbolizer);
-        return result;
-    },
-
-    CLASS_NAME: "OpenLayers.Renderer"
-});
-
-/**
- * Constant: OpenLayers.Renderer.defaultSymbolizer
- * {Object} Properties from this symbolizer will be applied to symbolizers
- *     with missing properties. This can also be used to set a global
- *     symbolizer default in OpenLayers. To be SLD 1.x compliant, add the
- *     following code before rendering any vector features:
- * (code)
- * OpenLayers.Renderer.defaultSymbolizer = {
- *     fillColor: "#808080",
- *     fillOpacity: 1,
- *     strokeColor: "#000000",
- *     strokeOpacity: 1,
- *     strokeWidth: 1,
- *     pointRadius: 3,
- *     graphicName: "square"
- * };
- * (end)
- */
-OpenLayers.Renderer.defaultSymbolizer = {
-    fillColor: "#000000",
-    strokeColor: "#000000",
-    strokeWidth: 2,
-    fillOpacity: 1,
-    strokeOpacity: 1,
-    pointRadius: 0
-};
-    
-

--- a/labs/openlayers/lib/OpenLayers/Renderer/Canvas.js
+++ /dev/null
@@ -1,495 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Renderer.js
- */
-
-/**
- * Class: OpenLayers.Renderer.Canvas 
- * A renderer based on the 2D 'canvas' drawing element.element
- * 
- * Inherits:
- *  - <OpenLayers.Renderer>
- */
-OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, {
-
-    /**
-     * Property: canvas
-     * {Canvas} The canvas context object.
-     */
-    canvas: null, 
-    
-    /**
-     * Property: features
-     * {Object} Internal object of feature/style pairs for use in redrawing the layer.
-     */
-    features: null, 
-   
-    /**
-     * Constructor: OpenLayers.Renderer.Canvas
-     *
-     * Parameters:
-     * containerID - {<String>} 
-     */
-    initialize: function(containerID) {
-        OpenLayers.Renderer.prototype.initialize.apply(this, arguments);
-        this.root = document.createElement("canvas");
-        this.container.appendChild(this.root);
-        this.canvas = this.root.getContext("2d");
-        this.features = {};
-    },
-    
-    /** 
-     * Method: eraseGeometry
-     * Erase a geometry from the renderer. Because the Canvas renderer has
-     *     'memory' of the features that it has drawn, we have to remove the
-     *     feature so it doesn't redraw.   
-     * 
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     * featureId - {String}
-     */
-    eraseGeometry: function(geometry, featureId) {
-        this.eraseFeatures(this.features[featureId][0]);
-    },
-
-    /**
-     * APIMethod: supported
-     * 
-     * Returns:
-     * {Boolean} Whether or not the browser supports the renderer class
-     */
-    supported: function() {
-        var canvas = document.createElement("canvas");
-        return !!canvas.getContext;
-    },    
-    
-    /**
-     * Method: setExtent
-     * Set the visible part of the layer.
-     *
-     * Resolution has probably changed, so we nullify the resolution 
-     * cache (this.resolution), then redraw. 
-     *
-     * Parameters:
-     * extent - {<OpenLayers.Bounds>} 
-     */
-    setExtent: function(extent) {
-        this.extent = extent.clone();
-        this.resolution = null;
-        this.redraw();
-    },
-    
-    /**
-     * Method: setSize
-     * Sets the size of the drawing surface.
-     *
-     * Once the size is updated, redraw the canvas.
-     *
-     * Parameters:
-     * size - {<OpenLayers.Size>} 
-     */
-    setSize: function(size) {
-        this.size = size.clone();
-        this.root.style.width = size.w + "px";
-        this.root.style.height = size.h + "px";
-        this.root.width = size.w;
-        this.root.height = size.h;
-        this.resolution = null;
-    },
-    
-    /**
-     * Method: drawFeature
-     * Draw the feature. Stores the feature in the features list,
-     * then redraws the layer. 
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>} 
-     * style - {<Object>} 
-     */
-    drawFeature: function(feature, style) {
-        style = style || feature.style;
-        style = this.applyDefaultSymbolizer(style);  
-        
-        this.features[feature.id] = [feature, style]; 
-        this.redraw();
-    },
-
-
-    /** 
-     * Method: drawGeometry
-     * Used when looping (in redraw) over the features; draws
-     * the canvas. 
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>} 
-     * style - {Object} 
-     */
-    drawGeometry: function(geometry, style) {
-        var className = geometry.CLASS_NAME;
-        if ((className == "OpenLayers.Geometry.Collection") ||
-            (className == "OpenLayers.Geometry.MultiPoint") ||
-            (className == "OpenLayers.Geometry.MultiLineString") ||
-            (className == "OpenLayers.Geometry.MultiPolygon")) {
-            for (var i = 0; i < geometry.components.length; i++) {
-                this.drawGeometry(geometry.components[i], style);
-            }
-            return;
-        }
-        switch (geometry.CLASS_NAME) {
-            case "OpenLayers.Geometry.Point":
-                this.drawPoint(geometry, style);
-                break;
-            case "OpenLayers.Geometry.LineString":
-                this.drawLineString(geometry, style);
-                break;
-            case "OpenLayers.Geometry.LinearRing":
-                this.drawLinearRing(geometry, style);
-                break;
-            case "OpenLayers.Geometry.Polygon":
-                this.drawPolygon(geometry, style);
-                break;
-            default:
-                break;
-        }
-    },
-
-    /**
-     * Method: drawExternalGraphic
-     * Called to draw External graphics. 
-     * 
-     * Parameters: 
-     * geometry - {<OpenLayers.Geometry>}
-     * style    - {Object}
-     */ 
-    drawExternalGraphic: function(pt, style) {
-       var img = new Image();
-       
-       if(style.graphicTitle) {
-           img.title=style.graphicTitle;           
-       }
-
-       var width = style.graphicWidth || style.graphicHeight;
-       var height = style.graphicHeight || style.graphicWidth;
-       width = width ? width : style.pointRadius*2;
-       height = height ? height : style.pointRadius*2;
-       var xOffset = (style.graphicXOffset != undefined) ?
-           style.graphicXOffset : -(0.5 * width);
-       var yOffset = (style.graphicYOffset != undefined) ?
-           style.graphicYOffset : -(0.5 * height);
-       
-       var context = { img: img, 
-                       x: (pt[0]+xOffset), 
-                       y: (pt[1]+yOffset), 
-                       width: width, 
-                       height: height, 
-                       opacity: style.graphicOpacity || style.fillOpacity,
-                       canvas: this.canvas };
-
-       img.onload = OpenLayers.Function.bind( function() {
-           this.canvas.globalAlpha = this.opacity;
-           this.canvas.drawImage(this.img, this.x, 
-                                 this.y, this.width, this.height);
-       }, context);
-       img.src = style.externalGraphic;
-    },
-
-    /**
-     * Method: setCanvasStyle
-     * Prepare the canvas for drawing by setting various global settings.
-     *
-     * Parameters:
-     * type - {String} one of 'stroke', 'fill', or 'reset'
-     * style - {Object} Symbolizer hash
-     */
-    setCanvasStyle: function(type, style) {
-        if (type == "fill") {     
-            this.canvas.globalAlpha = style['fillOpacity'];
-            this.canvas.fillStyle = style['fillColor'];
-        } else if (type == "stroke") {  
-            this.canvas.globalAlpha = style['strokeOpacity'];
-            this.canvas.strokeStyle = style['strokeColor'];
-            this.canvas.lineWidth = style['strokeWidth'];
-        } else {
-            this.canvas.globalAlpha = 0;
-            this.canvas.lineWidth = 1;
-        }
-    },
-
-    /**
-     * Method: drawPoint
-     * This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * geometry - {<OpenLayers.Geometry>}
-     * style    - {Object}
-     */ 
-    drawPoint: function(geometry, style) {
-        if(style.graphic !== false) {
-            var pt = this.getLocalXY(geometry);
-            
-            if (style.externalGraphic) {
-                this.drawExternalGraphic(pt, style);
-            } else {
-                if(style.fill !== false) {
-                    this.setCanvasStyle("fill", style);
-                    this.canvas.beginPath();
-                    this.canvas.arc(pt[0], pt[1], style.pointRadius, 0, Math.PI*2, true);
-                    this.canvas.fill();
-                }
-                
-                if(style.stroke !== false) {
-                    this.setCanvasStyle("stroke", style);
-                    this.canvas.beginPath();
-                    this.canvas.arc(pt[0], pt[1], style.pointRadius, 0, Math.PI*2, true);
-                    this.canvas.stroke();
-                    this.setCanvasStyle("reset");
-                }
-            }
-        }
-    },
-
-    /**
-     * Method: drawLineString
-     * This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * geometry - {<OpenLayers.Geometry>}
-     * style    - {Object}
-     */ 
-    drawLineString: function(geometry, style) {
-        if(style.stroke !== false) {
-            this.setCanvasStyle("stroke", style);
-            this.canvas.beginPath();
-            var start = this.getLocalXY(geometry.components[0]);
-            this.canvas.moveTo(start[0], start[1]);
-            for(var i = 1; i < geometry.components.length; i++) {
-                var pt = this.getLocalXY(geometry.components[i]);
-                this.canvas.lineTo(pt[0], pt[1]);
-            }
-            this.canvas.stroke();
-        }
-        this.setCanvasStyle("reset");
-    },    
-    
-    /**
-     * Method: drawLinearRing
-     * This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * geometry - {<OpenLayers.Geometry>}
-     * style    - {Object}
-     */ 
-    drawLinearRing: function(geometry, style) {
-        if(style.fill !== false) {
-            this.setCanvasStyle("fill", style);
-            this.canvas.beginPath();
-            var start = this.getLocalXY(geometry.components[0]);
-            this.canvas.moveTo(start[0], start[1]);
-            for(var i = 1; i < geometry.components.length - 1 ; i++) {
-                var pt = this.getLocalXY(geometry.components[i]);
-                this.canvas.lineTo(pt[0], pt[1]);
-            }
-            this.canvas.fill();
-        }
-        
-        if(style.stroke !== false) {
-            this.setCanvasStyle("stroke", style);
-            this.canvas.beginPath();
-            var start = this.getLocalXY(geometry.components[0]);
-            this.canvas.moveTo(start[0], start[1]);
-            for(var i = 1; i < geometry.components.length; i++) {
-                var pt = this.getLocalXY(geometry.components[i]);
-                this.canvas.lineTo(pt[0], pt[1]);
-            }
-            this.canvas.stroke();
-        }
-        this.setCanvasStyle("reset");
-    },    
-    
-    /**
-     * Method: drawPolygon
-     * This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * geometry - {<OpenLayers.Geometry>}
-     * style    - {Object}
-     */ 
-    drawPolygon: function(geometry, style) {
-        this.drawLinearRing(geometry.components[0], style);
-        for (var i = 1; i < geometry.components.length; i++) {
-            this.drawLinearRing(geometry.components[i], {
-                fillOpacity: 0, 
-                strokeWidth: 0, 
-                strokeOpacity: 0, 
-                strokeColor: '#000000', 
-                fillColor: '#000000'}
-            ); // inner rings are 'empty'  
-        }
-    },
-    
-    /**
-     * Method: drawText
-     * This method is only called by the renderer itself.
-     *
-     * Parameters:
-     * location - {<OpenLayers.Point>}
-     * style    - {Object}
-     */
-    drawText: function(location, style) {
-        style = OpenLayers.Util.extend({
-            fontColor: "#000000",
-            labelAlign: "cm"
-        }, style);
-        var pt = this.getLocalXY(location);
-        
-        this.setCanvasStyle("reset");
-        this.canvas.fillStyle = style.fontColor;
-        this.canvas.globalAlpha = style.fontOpacity || 1.0;
-        var fontStyle = style.fontWeight + " " + style.fontSize + " " + style.fontFamily;
-        if (this.canvas.fillText) {
-            // HTML5
-            var labelAlign =
-                OpenLayers.Renderer.Canvas.LABEL_ALIGN[style.labelAlign[0]] ||
-                "center";
-            this.canvas.font = fontStyle;
-            this.canvas.textAlign = labelAlign;
-            this.canvas.fillText(style.label, pt[0], pt[1]);
-        } else if (this.canvas.mozDrawText) {
-            // Mozilla pre-Gecko1.9.1 (<FF3.1)
-            this.canvas.mozTextStyle = fontStyle;
-            // No built-in text alignment, so we measure and adjust the position
-            var len = this.canvas.mozMeasureText(style.label);
-            switch(style.labelAlign[0]) {
-                case "l":
-                    break;
-                case "r":
-                    pt[0] -= len;
-                    break;
-                case "c":
-                default:
-                    pt[0] -= len / 2;
-            }
-            this.canvas.translate(pt[0], pt[1]);
-            
-            this.canvas.mozDrawText(style.label);
-            this.canvas.translate(-1*pt[0], -1*pt[1]);
-        }
-        this.setCanvasStyle("reset");
-    },
-
-    /**
-     * Method: getLocalXY
-     * transform geographic xy into pixel xy
-     *
-     * Parameters: 
-     * point - {<OpenLayers.Geometry.Point>}
-     */
-    getLocalXY: function(point) {
-        var resolution = this.getResolution();
-        var extent = this.extent;
-        var x = (point.x / resolution + (-extent.left / resolution));
-        var y = ((extent.top / resolution) - point.y / resolution);
-        return [x, y];
-    },
-
-    /**
-     * Method: clear
-     * Clear all vectors from the renderer.
-     */    
-    clear: function() {
-        this.canvas.clearRect(0, 0, this.root.width, this.root.height);
-        this.features = {};
-    },
-
-    /**
-     * Method: getFeatureIdFromEvent
-     * Returns a feature id from an event on the renderer.  
-     * 
-     * Parameters:
-     * evt - {<OpenLayers.Event>} 
-     *
-     * Returns:
-     * {String} A feature id or null.
-     */
-    getFeatureIdFromEvent: function(evt) {
-        var loc = this.map.getLonLatFromPixel(evt.xy);
-        var resolution = this.getResolution();
-        var bounds = new OpenLayers.Bounds(loc.lon - resolution * 5, 
-                                           loc.lat - resolution * 5, 
-                                           loc.lon + resolution * 5, 
-                                           loc.lat + resolution * 5);
-        var geom = bounds.toGeometry();
-        for (var feat in this.features) {
-            if (!this.features.hasOwnProperty(feat)) { continue; }
-            if (this.features[feat][0].geometry.intersects(geom)) {
-                return feat;
-            }
-        }   
-        return null;
-    },
-    
-    /**
-     * Method: eraseFeatures 
-     * This is called by the layer to erase features; removes the feature from
-     *     the list, then redraws the layer.
-     * 
-     * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>)} 
-     */
-    eraseFeatures: function(features) {
-        if(!(features instanceof Array)) {
-            features = [features];
-        }
-        for(var i=0; i<features.length; ++i) {
-            delete this.features[features[i].id];
-        }
-        this.redraw();
-    },
-
-    /**
-     * Method: redraw
-     * The real 'meat' of the function: any time things have changed,
-     *     redraw() can be called to loop over all the data and (you guessed
-     *     it) redraw it.  Unlike Elements-based Renderers, we can't interact
-     *     with things once they're drawn, to remove them, for example, so
-     *     instead we have to just clear everything and draw from scratch.
-     */
-    redraw: function() {
-        if (!this.locked) {
-            this.canvas.clearRect(0, 0, this.root.width, this.root.height);
-            var labelMap = [];
-            var feature, style;
-            for (var id in this.features) {
-                if (!this.features.hasOwnProperty(id)) { continue; }
-                feature = this.features[id][0];
-                style = this.features[id][1];
-                if (!feature.geometry) { continue; }
-                this.drawGeometry(feature.geometry, style);
-                if(style.label) {
-                    labelMap.push([feature, style]);
-                }
-            }
-            var item;
-            for (var i=0, len=labelMap.length; i<len; ++i) {
-                item = labelMap[i];
-                this.drawText(item[0].geometry.getCentroid(), item[1]);
-            }
-        }    
-    },
-
-    CLASS_NAME: "OpenLayers.Renderer.Canvas"
-});
-
-/**
- * Constant: OpenLayers.Renderer.Canvas.LABEL_ALIGN
- * {Object}
- */
-OpenLayers.Renderer.Canvas.LABEL_ALIGN = {
-    "l": "left",
-    "r": "right"
-};
-

--- a/labs/openlayers/lib/OpenLayers/Renderer/Elements.js
+++ /dev/null
@@ -1,1011 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Renderer.js
- */
-
-/**
- * Class: OpenLayers.ElementsIndexer
- * This class takes care of figuring out which order elements should be
- *     placed in the DOM based on given indexing methods. 
- */
-OpenLayers.ElementsIndexer = OpenLayers.Class({
-   
-    /**
-     * Property: maxZIndex
-     * {Integer} This is the largest-most z-index value for a node
-     *     contained within the indexer.
-     */
-    maxZIndex: null,
-    
-    /**
-     * Property: order
-     * {Array<String>} This is an array of node id's stored in the
-     *     order that they should show up on screen. Id's higher up in the
-     *     array (higher array index) represent nodes with higher z-indeces.
-     */
-    order: null, 
-    
-    /**
-     * Property: indices
-     * {Object} This is a hash that maps node ids to their z-index value
-     *     stored in the indexer. This is done to make finding a nodes z-index 
-     *     value O(1).
-     */
-    indices: null,
-    
-    /**
-     * Property: compare
-     * {Function} This is the function used to determine placement of
-     *     of a new node within the indexer. If null, this defaults to to
-     *     the Z_ORDER_DRAWING_ORDER comparison method.
-     */
-    compare: null,
-    
-    /**
-     * APIMethod: initialize
-     * Create a new indexer with 
-     * 
-     * Parameters:
-     * yOrdering - {Boolean} Whether to use y-ordering.
-     */
-    initialize: function(yOrdering) {
-
-        this.compare = yOrdering ? 
-            OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_Y_ORDER :
-            OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_DRAWING_ORDER;
-            
-        this.order = [];
-        this.indices = {};
-        this.maxZIndex = 0;
-    },
-    
-    /**
-     * APIMethod: insert
-     * Insert a new node into the indexer. In order to find the correct 
-     *     positioning for the node to be inserted, this method uses a binary 
-     *     search. This makes inserting O(log(n)). 
-     * 
-     * Parameters:
-     * newNode - {DOMElement} The new node to be inserted.
-     * 
-     * Returns
-     * {DOMElement} the node before which we should insert our newNode, or
-     *     null if newNode can just be appended.
-     */
-    insert: function(newNode) {
-        // If the node is known to the indexer, remove it so we can
-        // recalculate where it should go.
-        if (this.exists(newNode)) {
-            this.remove(newNode);
-        }
-        
-        var nodeId = newNode.id;
-        
-        this.determineZIndex(newNode);       
-
-        var leftIndex = -1;
-        var rightIndex = this.order.length;
-        var middle;
-
-        while (rightIndex - leftIndex > 1) {
-            middle = parseInt((leftIndex + rightIndex) / 2);
-            
-            var placement = this.compare(this, newNode,
-                OpenLayers.Util.getElement(this.order[middle]));
-            
-            if (placement > 0) {
-                leftIndex = middle;
-            } else {
-                rightIndex = middle;
-            } 
-        }
-        
-        this.order.splice(rightIndex, 0, nodeId);
-        this.indices[nodeId] = this.getZIndex(newNode);
-        
-        // If the new node should be before another in the index
-        // order, return the node before which we have to insert the new one;
-        // else, return null to indicate that the new node can be appended.
-        return this.getNextElement(rightIndex);
-    },
-    
-    /**
-     * APIMethod: remove
-     * 
-     * Parameters:
-     * node - {DOMElement} The node to be removed.
-     */
-    remove: function(node) {
-        var nodeId = node.id;
-        var arrayIndex = OpenLayers.Util.indexOf(this.order, nodeId);
-        if (arrayIndex >= 0) {
-            // Remove it from the order array, as well as deleting the node
-            // from the indeces hash.
-            this.order.splice(arrayIndex, 1);
-            delete this.indices[nodeId];
-            
-            // Reset the maxium z-index based on the last item in the 
-            // order array.
-            if (this.order.length > 0) {
-                var lastId = this.order[this.order.length - 1];
-                this.maxZIndex = this.indices[lastId];
-            } else {
-                this.maxZIndex = 0;
-            }
-        }
-    },
-    
-    /**
-     * APIMethod: clear
-     */
-    clear: function() {
-        this.order = [];
-        this.indices = {};
-        this.maxZIndex = 0;
-    },
-    
-    /**
-     * APIMethod: exists
-     *
-     * Parameters:
-     * node- {DOMElement} The node to test for existence.
-     *
-     * Returns:
-     * {Boolean} Whether or not the node exists in the indexer?
-     */
-    exists: function(node) {
-        return (this.indices[node.id] != null);
-    },
-
-    /**
-     * APIMethod: getZIndex
-     * Get the z-index value for the current node from the node data itself.
-     * 
-     * Parameters:
-     * node - {DOMElement} The node whose z-index to get.
-     * 
-     * Returns:
-     * {Integer} The z-index value for the specified node (from the node 
-     *     data itself).
-     */
-    getZIndex: function(node) {
-        return node._style.graphicZIndex;  
-    },
-    
-    /**
-     * Method: determineZIndex
-     * Determine the z-index for the current node if there isn't one, 
-     *     and set the maximum value if we've found a new maximum.
-     * 
-     * Parameters:
-     * node - {DOMElement} 
-     */
-    determineZIndex: function(node) {
-        var zIndex = node._style.graphicZIndex;
-        
-        // Everything must have a zIndex. If none is specified,
-        // this means the user *must* (hint: assumption) want this
-        // node to succomb to drawing order. To enforce drawing order
-        // over all indexing methods, we'll create a new z-index that's
-        // greater than any currently in the indexer.
-        if (zIndex == null) {
-            zIndex = this.maxZIndex;
-            node._style.graphicZIndex = zIndex; 
-        } else if (zIndex > this.maxZIndex) {
-            this.maxZIndex = zIndex;
-        }
-    },
-
-    /**
-     * APIMethod: getNextElement
-     * Get the next element in the order stack.
-     * 
-     * Parameters:
-     * index - {Integer} The index of the current node in this.order.
-     * 
-     * Returns:
-     * {DOMElement} the node following the index passed in, or
-     *     null.
-     */
-    getNextElement: function(index) {
-        var nextIndex = index + 1;
-        if (nextIndex < this.order.length) {
-            var nextElement = OpenLayers.Util.getElement(this.order[nextIndex]);
-            if (nextElement == undefined) {
-                nextElement = this.getNextElement(nextIndex);
-            }
-            return nextElement;
-        } else {
-            return null;
-        } 
-    },
-    
-    CLASS_NAME: "OpenLayers.ElementsIndexer"
-});
-
-/**
- * Namespace: OpenLayers.ElementsIndexer.IndexingMethods
- * These are the compare methods for figuring out where a new node should be 
- *     placed within the indexer. These methods are very similar to general 
- *     sorting methods in that they return -1, 0, and 1 to specify the 
- *     direction in which new nodes fall in the ordering.
- */
-OpenLayers.ElementsIndexer.IndexingMethods = {
-    
-    /**
-     * Method: Z_ORDER
-     * This compare method is used by other comparison methods.
-     *     It can be used individually for ordering, but is not recommended,
-     *     because it doesn't subscribe to drawing order.
-     * 
-     * Parameters:
-     * indexer - {<OpenLayers.ElementsIndexer>}
-     * newNode - {DOMElement}
-     * nextNode - {DOMElement}
-     * 
-     * Returns:
-     * {Integer}
-     */
-    Z_ORDER: function(indexer, newNode, nextNode) {
-        var newZIndex = indexer.getZIndex(newNode);
-
-        var returnVal = 0;
-        if (nextNode) {
-            var nextZIndex = indexer.getZIndex(nextNode);
-            returnVal = newZIndex - nextZIndex; 
-        }
-        
-        return returnVal;
-    },
-
-    /**
-     * APIMethod: Z_ORDER_DRAWING_ORDER
-     * This method orders nodes by their z-index, but does so in a way
-     *     that, if there are other nodes with the same z-index, the newest 
-     *     drawn will be the front most within that z-index. This is the 
-     *     default indexing method.
-     * 
-     * Parameters:
-     * indexer - {<OpenLayers.ElementsIndexer>}
-     * newNode - {DOMElement}
-     * nextNode - {DOMElement}
-     * 
-     * Returns:
-     * {Integer}
-     */
-    Z_ORDER_DRAWING_ORDER: function(indexer, newNode, nextNode) {
-        var returnVal = OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(
-            indexer, 
-            newNode, 
-            nextNode
-        );
-        
-        // Make Z_ORDER subscribe to drawing order by pushing it above
-        // all of the other nodes with the same z-index.
-        if (nextNode && returnVal == 0) {
-            returnVal = 1;
-        }
-        
-        return returnVal;
-    },
-
-    /**
-     * APIMethod: Z_ORDER_Y_ORDER
-     * This one should really be called Z_ORDER_Y_ORDER_DRAWING_ORDER, as it
-     *     best describes which ordering methods have precedence (though, the 
-     *     name would be too long). This method orders nodes by their z-index, 
-     *     but does so in a way that, if there are other nodes with the same 
-     *     z-index, the nodes with the lower y position will be "closer" than 
-     *     those with a higher y position. If two nodes have the exact same y 
-     *     position, however, then this method will revert to using drawing  
-     *     order to decide placement.
-     * 
-     * Parameters:
-     * indexer - {<OpenLayers.ElementsIndexer>}
-     * newNode - {DOMElement}
-     * nextNode - {DOMElement}
-     * 
-     * Returns:
-     * {Integer}
-     */
-    Z_ORDER_Y_ORDER: function(indexer, newNode, nextNode) {
-        var returnVal = OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(
-            indexer, 
-            newNode, 
-            nextNode
-        );
-        
-        if (nextNode && returnVal === 0) {            
-            var result = nextNode._boundsBottom - newNode._boundsBottom;
-            returnVal = (result === 0) ? 1 : result;
-        }
-        
-        return returnVal;       
-    }
-};
-
-/**
- * Class: OpenLayers.Renderer.Elements
- * This is another virtual class in that it should never be instantiated by 
- *  itself as a Renderer. It exists because there is *tons* of shared 
- *  functionality between different vector libraries which use nodes/elements
- *  as a base for rendering vectors. 
- * 
- * The highlevel bits of code that are implemented here are the adding and 
- *  removing of geometries, which is essentially the same for any 
- *  element-based renderer. The details of creating each node and drawing the
- *  paths are of course different, but the machinery is the same. 
- * 
- * Inherits:
- *  - <OpenLayers.Renderer>
- */
-OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, {
-
-    /**
-     * Property: rendererRoot
-     * {DOMElement}
-     */
-    rendererRoot: null,
-    
-    /**
-     * Property: root
-     * {DOMElement}
-     */
-    root: null,
-    
-    /**
-     * Property: vectorRoot
-     * {DOMElement}
-     */
-    vectorRoot: null,
-
-    /**
-     * Property: textRoot
-     * {DOMElement}
-     */
-    textRoot: null,
-
-    /**
-     * Property: xmlns
-     * {String}
-     */    
-    xmlns: null,
-    
-    /**
-     * Property: Indexer
-     * {<OpenLayers.ElementIndexer>} An instance of OpenLayers.ElementsIndexer 
-     *     created upon initialization if the zIndexing or yOrdering options
-     *     passed to this renderer's constructor are set to true.
-     */
-    indexer: null, 
-    
-    /**
-     * Constant: BACKGROUND_ID_SUFFIX
-     * {String}
-     */
-    BACKGROUND_ID_SUFFIX: "_background",
-    
-    /**
-     * Constant: BACKGROUND_ID_SUFFIX
-     * {String}
-     */
-    LABEL_ID_SUFFIX: "_label",
-    
-    /**
-     * Constructor: OpenLayers.Renderer.Elements
-     * 
-     * Parameters:
-     * containerID - {String}
-     * options - {Object} options for this renderer. Supported options are:
-     *     * yOrdering - {Boolean} Whether to use y-ordering
-     *     * zIndexing - {Boolean} Whether to use z-indexing. Will be ignored
-     *         if yOrdering is set to true.
-     */
-    initialize: function(containerID, options) {
-        OpenLayers.Renderer.prototype.initialize.apply(this, arguments);
-
-        this.rendererRoot = this.createRenderRoot();
-        this.root = this.createRoot("_root");
-        this.vectorRoot = this.createRoot("_vroot");
-        this.textRoot = this.createRoot("_troot");
-        
-        this.root.appendChild(this.vectorRoot);
-        this.root.appendChild(this.textRoot);
-        
-        this.rendererRoot.appendChild(this.root);
-        this.container.appendChild(this.rendererRoot);
-        
-        if(options && (options.zIndexing || options.yOrdering)) {
-            this.indexer = new OpenLayers.ElementsIndexer(options.yOrdering);
-        }
-    },
-    
-    /**
-     * Method: destroy
-     */
-    destroy: function() {
-
-        this.clear(); 
-
-        this.rendererRoot = null;
-        this.root = null;
-        this.xmlns = null;
-
-        OpenLayers.Renderer.prototype.destroy.apply(this, arguments);
-    },
-    
-    /**
-     * Method: clear
-     * Remove all the elements from the root
-     */    
-    clear: function() {
-        var child;
-        var root = this.vectorRoot;
-        if (root) {
-            while (child = root.firstChild) {
-                root.removeChild(child);
-            }
-        }
-        root = this.textRoot;
-        if (root) {
-            while (child = root.firstChild) {
-                root.removeChild(child);
-            }
-        }
-        if (this.indexer) {
-            this.indexer.clear();
-        }
-    },
-
-    /** 
-     * Method: getNodeType
-     * This function is in charge of asking the specific renderer which type
-     *     of node to create for the given geometry and style. All geometries
-     *     in an Elements-based renderer consist of one node and some
-     *     attributes. We have the nodeFactory() function which creates a node
-     *     for us, but it takes a 'type' as input, and that is precisely what
-     *     this function tells us.  
-     *  
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     * style - {Object}
-     * 
-     * Returns:
-     * {String} The corresponding node type for the specified geometry
-     */
-    getNodeType: function(geometry, style) { },
-
-    /** 
-     * Method: drawGeometry 
-     * Draw the geometry, creating new nodes, setting paths, setting style,
-     *     setting featureId on the node.  This method should only be called
-     *     by the renderer itself.
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     * style - {Object}
-     * featureId - {String}
-     * 
-     * Returns:
-     * {Boolean} true if the geometry has been drawn completely; null if
-     *     incomplete; false otherwise
-     */
-    drawGeometry: function(geometry, style, featureId) {
-        var className = geometry.CLASS_NAME;
-        var rendered = true;
-        if ((className == "OpenLayers.Geometry.Collection") ||
-            (className == "OpenLayers.Geometry.MultiPoint") ||
-            (className == "OpenLayers.Geometry.MultiLineString") ||
-            (className == "OpenLayers.Geometry.MultiPolygon")) {
-            for (var i = 0, len=geometry.components.length; i<len; i++) {
-                rendered = this.drawGeometry(
-                    geometry.components[i], style, featureId) && rendered;
-            }
-            return rendered;
-        };
-
-        rendered = false;
-        if (style.display != "none") {
-            if (style.backgroundGraphic) {
-                this.redrawBackgroundNode(geometry.id, geometry, style,
-                    featureId);
-            }
-            rendered = this.redrawNode(geometry.id, geometry, style,
-                featureId);
-        }
-        if (rendered == false) {
-            var node = document.getElementById(geometry.id);
-            if (node) {
-                if (node._style.backgroundGraphic) {
-                    node.parentNode.removeChild(document.getElementById(
-                        geometry.id + this.BACKGROUND_ID_SUFFIX));
-                }
-                node.parentNode.removeChild(node);
-            }
-        }
-        return rendered;
-    },
-    
-    /**
-     * Method: redrawNode
-     * 
-     * Parameters:
-     * id - {String}
-     * geometry - {<OpenLayers.Geometry>}
-     * style - {Object}
-     * featureId - {String}
-     * 
-     * Returns:
-     * {Boolean} true if the complete geometry could be drawn, null if parts of
-     *     the geometry could not be drawn, false otherwise
-     */
-    redrawNode: function(id, geometry, style, featureId) {
-        style = this.applyDefaultSymbolizer(style);
-        // Get the node if it's already on the map.
-        var node = this.nodeFactory(id, this.getNodeType(geometry, style));
-        
-        // Set the data for the node, then draw it.
-        node._featureId = featureId;
-        node._boundsBottom = geometry.getBounds().bottom;
-        node._geometryClass = geometry.CLASS_NAME;
-        node._style = style;
-
-        var drawResult = this.drawGeometryNode(node, geometry, style);
-        if(drawResult === false) {
-            return false;
-        }
-         
-        node = drawResult.node;
-        
-        // Insert the node into the indexer so it can show us where to
-        // place it. Note that this operation is O(log(n)). If there's a
-        // performance problem (when dragging, for instance) this is
-        // likely where it would be.
-        if (this.indexer) {
-            var insert = this.indexer.insert(node);
-            if (insert) {
-                this.vectorRoot.insertBefore(node, insert);
-            } else {
-                this.vectorRoot.appendChild(node);
-            }
-        } else {
-            // if there's no indexer, simply append the node to root,
-            // but only if the node is a new one
-            if (node.parentNode !== this.vectorRoot){ 
-                this.vectorRoot.appendChild(node);
-            }
-        }
-        
-        this.postDraw(node);
-        
-        return drawResult.complete;
-    },
-    
-    /**
-     * Method: redrawBackgroundNode
-     * Redraws the node using special 'background' style properties. Basically
-     *     just calls redrawNode(), but instead of directly using the 
-     *     'externalGraphic', 'graphicXOffset', 'graphicYOffset', and 
-     *     'graphicZIndex' properties directly from the specified 'style' 
-     *     parameter, we create a new style object and set those properties 
-     *     from the corresponding 'background'-prefixed properties from 
-     *     specified 'style' parameter.
-     * 
-     * Parameters:
-     * id - {String}
-     * geometry - {<OpenLayers.Geometry>}
-     * style - {Object}
-     * featureId - {String}
-     * 
-     * Returns:
-     * {Boolean} true if the complete geometry could be drawn, null if parts of
-     *     the geometry could not be drawn, false otherwise
-     */
-    redrawBackgroundNode: function(id, geometry, style, featureId) {
-        var backgroundStyle = OpenLayers.Util.extend({}, style);
-        
-        // Set regular style attributes to apply to the background styles.
-        backgroundStyle.externalGraphic = backgroundStyle.backgroundGraphic;
-        backgroundStyle.graphicXOffset = backgroundStyle.backgroundXOffset;
-        backgroundStyle.graphicYOffset = backgroundStyle.backgroundYOffset;
-        backgroundStyle.graphicZIndex = backgroundStyle.backgroundGraphicZIndex;
-        backgroundStyle.graphicWidth = backgroundStyle.backgroundWidth || backgroundStyle.graphicWidth;
-        backgroundStyle.graphicHeight = backgroundStyle.backgroundHeight || backgroundStyle.graphicHeight;
-        
-        // Erase background styles.
-        backgroundStyle.backgroundGraphic = null;
-        backgroundStyle.backgroundXOffset = null;
-        backgroundStyle.backgroundYOffset = null;
-        backgroundStyle.backgroundGraphicZIndex = null;
-        
-        return this.redrawNode(
-            id + this.BACKGROUND_ID_SUFFIX, 
-            geometry, 
-            backgroundStyle, 
-            null
-        );
-    },
-
-    /**
-     * Method: drawGeometryNode
-     * Given a node, draw a geometry on the specified layer.
-     *     node and geometry are required arguments, style is optional.
-     *     This method is only called by the render itself.
-     *
-     * Parameters:
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * style - {Object}
-     * 
-     * Returns:
-     * {Object} a hash with properties "node" (the drawn node) and "complete"
-     *     (null if parts of the geometry could not be drawn, false if nothing
-     *     could be drawn)
-     */
-    drawGeometryNode: function(node, geometry, style) {
-        style = style || node._style;
-
-        var options = {
-            'isFilled': style.fill === undefined ?
-                true :
-                style.fill,
-            'isStroked': style.stroke === undefined ?
-                !!style.strokeWidth :
-                style.stroke
-        };
-        var drawn;
-        switch (geometry.CLASS_NAME) {
-            case "OpenLayers.Geometry.Point":
-                if(style.graphic === false) {
-                    options.isFilled = false;
-                    options.isStroked = false;
-                }
-                drawn = this.drawPoint(node, geometry);
-                break;
-            case "OpenLayers.Geometry.LineString":
-                options.isFilled = false;
-                drawn = this.drawLineString(node, geometry);
-                break;
-            case "OpenLayers.Geometry.LinearRing":
-                drawn = this.drawLinearRing(node, geometry);
-                break;
-            case "OpenLayers.Geometry.Polygon":
-                drawn = this.drawPolygon(node, geometry);
-                break;
-            case "OpenLayers.Geometry.Surface":
-                drawn = this.drawSurface(node, geometry);
-                break;
-            case "OpenLayers.Geometry.Rectangle":
-                drawn = this.drawRectangle(node, geometry);
-                break;
-            default:
-                break;
-        }
-
-        node._options = options; 
-
-        //set style
-        //TBD simplify this
-        if (drawn != false) {
-            return {
-                node: this.setStyle(node, style, options, geometry),
-                complete: drawn
-            };
-        } else {
-            return false;
-        }
-    },
-    
-    /**
-     * Method: postDraw
-     * Things that have do be done after the geometry node is appended
-     *     to its parent node. To be overridden by subclasses.
-     * 
-     * Parameters:
-     * node - {DOMElement}
-     */
-    postDraw: function(node) {},
-    
-    /**
-     * Method: drawPoint
-     * Virtual function for drawing Point Geometry. 
-     *     Should be implemented by subclasses.
-     *     This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement} or false if the renderer could not draw the point
-     */ 
-    drawPoint: function(node, geometry) {},
-
-    /**
-     * Method: drawLineString
-     * Virtual function for drawing LineString Geometry. 
-     *     Should be implemented by subclasses.
-     *     This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement} or null if the renderer could not draw all components of
-     *     the linestring, or false if nothing could be drawn
-     */ 
-    drawLineString: function(node, geometry) {},
-
-    /**
-     * Method: drawLinearRing
-     * Virtual function for drawing LinearRing Geometry. 
-     *     Should be implemented by subclasses.
-     *     This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement} or null if the renderer could not draw all components
-     *     of the linear ring, or false if nothing could be drawn
-     */ 
-    drawLinearRing: function(node, geometry) {},
-
-    /**
-     * Method: drawPolygon
-     * Virtual function for drawing Polygon Geometry. 
-     *    Should be implemented by subclasses.
-     *    This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement} or null if the renderer could not draw all components
-     *     of the polygon, or false if nothing could be drawn
-     */ 
-    drawPolygon: function(node, geometry) {},
-
-    /**
-     * Method: drawRectangle
-     * Virtual function for drawing Rectangle Geometry. 
-     *     Should be implemented by subclasses.
-     *     This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement} or false if the renderer could not draw the rectangle
-     */ 
-    drawRectangle: function(node, geometry) {},
-
-    /**
-     * Method: drawCircle
-     * Virtual function for drawing Circle Geometry. 
-     *     Should be implemented by subclasses.
-     *     This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement} or false if the renderer could not draw the circle
-     */ 
-    drawCircle: function(node, geometry) {},
-
-    /**
-     * Method: drawSurface
-     * Virtual function for drawing Surface Geometry. 
-     *     Should be implemented by subclasses.
-     *     This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement} or false if the renderer could not draw the surface
-     */ 
-    drawSurface: function(node, geometry) {},
-
-    /**
-     * Method: removeText
-     * Removes a label
-     * 
-     * Parameters:
-     * featureId - {String}
-     */
-    removeText: function(featureId) {
-        var label = document.getElementById(featureId + this.LABEL_ID_SUFFIX);
-        if (label) {
-            this.textRoot.removeChild(label);
-        }
-    },
-
-    /**
-     * Method: getFeatureIdFromEvent
-     * 
-     * Parameters:
-     * evt - {Object} An <OpenLayers.Event> object
-     *
-     * Returns:
-     * {<OpenLayers.Geometry>} A geometry from an event that 
-     *     happened on a layer.
-     */
-    getFeatureIdFromEvent: function(evt) {
-        var target = evt.target;
-        var useElement = target && target.correspondingUseElement;
-        var node = useElement ? useElement : (target || evt.srcElement);
-        var featureId = node._featureId;
-        return featureId;
-    },
-
-    /** 
-     * Method: eraseGeometry
-     * Erase a geometry from the renderer. In the case of a multi-geometry, 
-     *     we cycle through and recurse on ourselves. Otherwise, we look for a 
-     *     node with the geometry.id, destroy its geometry, and remove it from
-     *     the DOM.
-     * 
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     * featureId - {String}
-     */
-    eraseGeometry: function(geometry, featureId) {
-        if ((geometry.CLASS_NAME == "OpenLayers.Geometry.MultiPoint") ||
-            (geometry.CLASS_NAME == "OpenLayers.Geometry.MultiLineString") ||
-            (geometry.CLASS_NAME == "OpenLayers.Geometry.MultiPolygon") ||
-            (geometry.CLASS_NAME == "OpenLayers.Geometry.Collection")) {
-            for (var i=0, len=geometry.components.length; i<len; i++) {
-                this.eraseGeometry(geometry.components[i], featureId);
-            }
-        } else {    
-            var element = OpenLayers.Util.getElement(geometry.id);
-            if (element && element.parentNode) {
-                if (element.geometry) {
-                    element.geometry.destroy();
-                    element.geometry = null;
-                }
-                element.parentNode.removeChild(element);
-
-                if (this.indexer) {
-                    this.indexer.remove(element);
-                }
-                
-                if (element._style.backgroundGraphic) {
-                    var backgroundId = geometry.id + this.BACKGROUND_ID_SUFFIX;
-                    var bElem = OpenLayers.Util.getElement(backgroundId);
-                    if (bElem && bElem.parentNode) {
-                        // No need to destroy the geometry since the element and the background
-                        // node share the same geometry.
-                        bElem.parentNode.removeChild(bElem);
-                    }
-                }
-            }
-        }
-    },
-
-    /** 
-     * Method: nodeFactory
-     * Create new node of the specified type, with the (optional) specified id.
-     * 
-     * If node already exists with same ID and a different type, we remove it
-     *     and then call ourselves again to recreate it.
-     * 
-     * Parameters:
-     * id - {String}
-     * type - {String} type Kind of node to draw.
-     * 
-     * Returns:
-     * {DOMElement} A new node of the given type and id.
-     */
-    nodeFactory: function(id, type) {
-        var node = OpenLayers.Util.getElement(id);
-        if (node) {
-            if (!this.nodeTypeCompare(node, type)) {
-                node.parentNode.removeChild(node);
-                node = this.nodeFactory(id, type);
-            }
-        } else {
-            node = this.createNode(type, id);
-        }
-        return node;
-    },
-    
-    /** 
-     * Method: nodeTypeCompare
-     * 
-     * Parameters:
-     * node - {DOMElement}
-     * type - {String} Kind of node
-     * 
-     * Returns:
-     * {Boolean} Whether or not the specified node is of the specified type
-     *     This function must be overridden by subclasses.
-     */
-    nodeTypeCompare: function(node, type) {},
-    
-    /** 
-     * Method: createNode
-     * 
-     * Parameters:
-     * type - {String} Kind of node to draw.
-     * id - {String} Id for node.
-     * 
-     * Returns:
-     * {DOMElement} A new node of the given type and id.
-     *     This function must be overridden by subclasses.
-     */
-    createNode: function(type, id) {},
-
-    /**
-     * Method: moveRoot
-     * moves this renderer's root to a different renderer.
-     * 
-     * Parameters:
-     * renderer - {<OpenLayers.Renderer>} target renderer for the moved root
-     */
-    moveRoot: function(renderer) {
-        var root = this.root;
-        if(renderer.root.parentNode == this.rendererRoot) {
-            root = renderer.root;
-        }
-        root.parentNode.removeChild(root);
-        renderer.rendererRoot.appendChild(root);
-    },
-    
-    /**
-     * Method: getRenderLayerId
-     * Gets the layer that this renderer's output appears on. If moveRoot was
-     * used, this will be different from the id of the layer containing the
-     * features rendered by this renderer.
-     * 
-     * Returns:
-     * {String} the id of the output layer.
-     */
-    getRenderLayerId: function() {
-        return this.root.parentNode.parentNode.id;
-    },
-    
-    /**
-     * Method: isComplexSymbol
-     * Determines if a symbol cannot be rendered using drawCircle
-     * 
-     * Parameters:
-     * graphicName - {String}
-     * 
-     * Returns
-     * {Boolean} true if the symbol is complex, false if not
-     */
-    isComplexSymbol: function(graphicName) {
-        return (graphicName != "circle") && !!graphicName;
-    },
-
-    CLASS_NAME: "OpenLayers.Renderer.Elements"
-});
-
-
-/**
- * Constant: OpenLayers.Renderer.symbol
- * Coordinate arrays for well known (named) symbols.
- */
-OpenLayers.Renderer.symbol = {
-    "star": [350,75, 379,161, 469,161, 397,215, 423,301, 350,250, 277,301,
-            303,215, 231,161, 321,161, 350,75],
-    "cross": [4,0, 6,0, 6,4, 10,4, 10,6, 6,6, 6,10, 4,10, 4,6, 0,6, 0,4, 4,4,
-            4,0],
-    "x": [0,0, 25,0, 50,35, 75,0, 100,0, 65,50, 100,100, 75,100, 50,65, 25,100, 0,100, 35,50, 0,0],
-    "square": [0,0, 0,1, 1,1, 1,0, 0,0],
-    "triangle": [0,10, 10,10, 5,0, 0,10]
-};
-

--- a/labs/openlayers/lib/OpenLayers/Renderer/SVG.js
+++ /dev/null
@@ -1,996 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Renderer/Elements.js
- */
-
-/**
- * Class: OpenLayers.Renderer.SVG
- * 
- * Inherits:
- *  - <OpenLayers.Renderer.Elements>
- */
-OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
-
-    /** 
-     * Property: xmlns
-     * {String}
-     */
-    xmlns: "http://www.w3.org/2000/svg",
-    
-    /**
-     * Property: xlinkns
-     * {String}
-     */
-    xlinkns: "http://www.w3.org/1999/xlink",
-
-    /**
-     * Constant: MAX_PIXEL
-     * {Integer} Firefox has a limitation where values larger or smaller than  
-     *           about 15000 in an SVG document lock the browser up. This 
-     *           works around it.
-     */
-    MAX_PIXEL: 15000,
-
-    /**
-     * Property: translationParameters
-     * {Object} Hash with "x" and "y" properties
-     */
-    translationParameters: null,
-    
-    /**
-     * Property: symbolMetrics
-     * {Object} Cache for symbol metrics according to their svg coordinate
-     *     space. This is an object keyed by the symbol's id, and values are
-     *     an array of [width, centerX, centerY].
-     */
-    symbolMetrics: null,
-    
-    /**
-     * Property: isGecko
-     * {Boolean}
-     */
-    isGecko: null,
-
-    /**
-     * Property: supportUse
-     * {Boolean} true if defs/use is supported - known to not work as expected
-     * at least in some applewebkit/5* builds.
-     * See https://bugs.webkit.org/show_bug.cgi?id=33322
-     */
-    supportUse: null,
-
-    /**
-     * Constructor: OpenLayers.Renderer.SVG
-     * 
-     * Parameters:
-     * containerID - {String}
-     */
-    initialize: function(containerID) {
-        if (!this.supported()) { 
-            return; 
-        }
-        OpenLayers.Renderer.Elements.prototype.initialize.apply(this, 
-                                                                arguments);
-        this.translationParameters = {x: 0, y: 0};
-        this.supportUse = (navigator.userAgent.toLowerCase().indexOf("applewebkit/5") == -1);
-        this.isGecko = (navigator.userAgent.toLowerCase().indexOf("gecko/") != -1);
-        
-        this.symbolMetrics = {};
-    },
-
-    /**
-     * APIMethod: destroy
-     */
-    destroy: function() {
-        OpenLayers.Renderer.Elements.prototype.destroy.apply(this, arguments);
-    },
-    
-    /**
-     * APIMethod: supported
-     * 
-     * Returns:
-     * {Boolean} Whether or not the browser supports the SVG renderer
-     */
-    supported: function() {
-        var svgFeature = "http://www.w3.org/TR/SVG11/feature#";
-        return (document.implementation && 
-           (document.implementation.hasFeature("org.w3c.svg", "1.0") || 
-            document.implementation.hasFeature(svgFeature + "SVG", "1.1") || 
-            document.implementation.hasFeature(svgFeature + "BasicStructure", "1.1") ));
-    },    
-
-    /**
-     * Method: inValidRange
-     * See #669 for more information
-     *
-     * Parameters:
-     * x      - {Integer}
-     * y      - {Integer}
-     * xyOnly - {Boolean} whether or not to just check for x and y, which means
-     *     to not take the current translation parameters into account if true.
-     * 
-     * Returns:
-     * {Boolean} Whether or not the 'x' and 'y' coordinates are in the  
-     *           valid range.
-     */ 
-    inValidRange: function(x, y, xyOnly) {
-        var left = x + (xyOnly ? 0 : this.translationParameters.x);
-        var top = y + (xyOnly ? 0 : this.translationParameters.y);
-        return (left >= -this.MAX_PIXEL && left <= this.MAX_PIXEL &&
-                top >= -this.MAX_PIXEL && top <= this.MAX_PIXEL);
-    },
-
-    /**
-     * Method: setExtent
-     * 
-     * Parameters:
-     * extent - {<OpenLayers.Bounds>}
-     * resolutionChanged - {Boolean}
-     * 
-     * Returns:
-     * {Boolean} true to notify the layer that the new extent does not exceed
-     *     the coordinate range, and the features will not need to be redrawn.
-     *     False otherwise.
-     */
-    setExtent: function(extent, resolutionChanged) {
-        OpenLayers.Renderer.Elements.prototype.setExtent.apply(this, 
-                                                               arguments);
-        
-        var resolution = this.getResolution();
-        var left = -extent.left / resolution;
-        var top = extent.top / resolution;
-
-        // If the resolution has changed, start over changing the corner, because
-        // the features will redraw.
-        if (resolutionChanged) {
-            this.left = left;
-            this.top = top;
-            // Set the viewbox
-            var extentString = "0 0 " + this.size.w + " " + this.size.h;
-
-            this.rendererRoot.setAttributeNS(null, "viewBox", extentString);
-            this.translate(0, 0);
-            return true;
-        } else {
-            var inRange = this.translate(left - this.left, top - this.top);
-            if (!inRange) {
-                // recenter the coordinate system
-                this.setExtent(extent, true);
-            }
-            return inRange;
-        }
-    },
-    
-    /**
-     * Method: translate
-     * Transforms the SVG coordinate system
-     * 
-     * Parameters:
-     * x - {Float}
-     * y - {Float}
-     * 
-     * Returns:
-     * {Boolean} true if the translation parameters are in the valid coordinates
-     *     range, false otherwise.
-     */
-    translate: function(x, y) {
-        if (!this.inValidRange(x, y, true)) {
-            return false;
-        } else {
-            var transformString = "";
-            if (x || y) {
-                transformString = "translate(" + x + "," + y + ")";
-            }
-            this.root.setAttributeNS(null, "transform", transformString);
-            this.translationParameters = {x: x, y: y};
-            return true;
-        }
-    },
-
-    /**
-     * Method: setSize
-     * Sets the size of the drawing surface.
-     * 
-     * Parameters:
-     * size - {<OpenLayers.Size>} The size of the drawing surface
-     */
-    setSize: function(size) {
-        OpenLayers.Renderer.prototype.setSize.apply(this, arguments);
-        
-        this.rendererRoot.setAttributeNS(null, "width", this.size.w);
-        this.rendererRoot.setAttributeNS(null, "height", this.size.h);
-    },
-
-    /** 
-     * Method: getNodeType 
-     * 
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     * style - {Object}
-     * 
-     * Returns:
-     * {String} The corresponding node type for the specified geometry
-     */
-    getNodeType: function(geometry, style) {
-        var nodeType = null;
-        switch (geometry.CLASS_NAME) {
-            case "OpenLayers.Geometry.Point":
-                if (style.externalGraphic) {
-                    nodeType = "image";
-                } else if (this.isComplexSymbol(style.graphicName)) {
-                    nodeType = this.supportUse === false ? "svg" : "use";
-                } else {
-                    nodeType = "circle";
-                }
-                break;
-            case "OpenLayers.Geometry.Rectangle":
-                nodeType = "rect";
-                break;
-            case "OpenLayers.Geometry.LineString":
-                nodeType = "polyline";
-                break;
-            case "OpenLayers.Geometry.LinearRing":
-                nodeType = "polygon";
-                break;
-            case "OpenLayers.Geometry.Polygon":
-            case "OpenLayers.Geometry.Curve":
-            case "OpenLayers.Geometry.Surface":
-                nodeType = "path";
-                break;
-            default:
-                break;
-        }
-        return nodeType;
-    },
-
-    /** 
-     * Method: setStyle
-     * Use to set all the style attributes to a SVG node.
-     * 
-     * Takes care to adjust stroke width and point radius to be
-     * resolution-relative
-     *
-     * Parameters:
-     * node - {SVGDomElement} An SVG element to decorate
-     * style - {Object}
-     * options - {Object} Currently supported options include 
-     *                              'isFilled' {Boolean} and
-     *                              'isStroked' {Boolean}
-     */
-    setStyle: function(node, style, options) {
-        style = style  || node._style;
-        options = options || node._options;
-        var r = parseFloat(node.getAttributeNS(null, "r"));
-        var widthFactor = 1;
-        var pos;
-        if (node._geometryClass == "OpenLayers.Geometry.Point" && r) {
-            node.style.visibility = "";
-            if (style.graphic === false) {
-                node.style.visibility = "hidden";
-            } else if (style.externalGraphic) {
-                pos = this.getPosition(node);
-                
-                if (style.graphicTitle) {
-                    node.setAttributeNS(null, "title", style.graphicTitle);
-                }
-                if (style.graphicWidth && style.graphicHeight) {
-                  node.setAttributeNS(null, "preserveAspectRatio", "none");
-                }
-                var width = style.graphicWidth || style.graphicHeight;
-                var height = style.graphicHeight || style.graphicWidth;
-                width = width ? width : style.pointRadius*2;
-                height = height ? height : style.pointRadius*2;
-                var xOffset = (style.graphicXOffset != undefined) ?
-                    style.graphicXOffset : -(0.5 * width);
-                var yOffset = (style.graphicYOffset != undefined) ?
-                    style.graphicYOffset : -(0.5 * height);
-
-                var opacity = style.graphicOpacity || style.fillOpacity;
-                
-                node.setAttributeNS(null, "x", (pos.x + xOffset).toFixed());
-                node.setAttributeNS(null, "y", (pos.y + yOffset).toFixed());
-                node.setAttributeNS(null, "width", width);
-                node.setAttributeNS(null, "height", height);
-                node.setAttributeNS(this.xlinkns, "href", style.externalGraphic);
-                node.setAttributeNS(null, "style", "opacity: "+opacity);
-            } else if (this.isComplexSymbol(style.graphicName)) {
-                // the symbol viewBox is three times as large as the symbol
-                var offset = style.pointRadius * 3;
-                var size = offset * 2;
-                var id = this.importSymbol(style.graphicName);
-                pos = this.getPosition(node);
-                widthFactor = this.symbolMetrics[id][0] * 3 / size;
-                
-                // remove the node from the dom before we modify it. This
-                // prevents various rendering issues in Safari and FF
-                var parent = node.parentNode;
-                var nextSibling = node.nextSibling;
-                if(parent) {
-                    parent.removeChild(node);
-                }
-                
-                if(this.supportUse === false) {
-                    // workaround for webkit versions that cannot do defs/use
-                    // (see https://bugs.webkit.org/show_bug.cgi?id=33322):
-                    // copy the symbol instead of referencing it
-                    var src = document.getElementById(id);
-                    node.firstChild && node.removeChild(node.firstChild);
-                    node.appendChild(src.firstChild.cloneNode(true));
-                    node.setAttributeNS(null, "viewBox", src.getAttributeNS(null, "viewBox"));
-                } else {
-                    node.setAttributeNS(this.xlinkns, "href", "#" + id);
-                }
-                node.setAttributeNS(null, "width", size);
-                node.setAttributeNS(null, "height", size);
-                node.setAttributeNS(null, "x", pos.x - offset);
-                node.setAttributeNS(null, "y", pos.y - offset);
-                
-                // now that the node has all its new properties, insert it
-                // back into the dom where it was
-                if(nextSibling) {
-                    parent.insertBefore(node, nextSibling);
-                } else if(parent) {
-                    parent.appendChild(node);
-                }
-            } else {
-                node.setAttributeNS(null, "r", style.pointRadius);
-            }
-
-            var rotation = style.rotation;
-            if ((rotation !== undefined || node._rotation !== undefined) && pos) {
-                node._rotation = rotation;
-                rotation |= 0;
-                if(node.nodeName !== "svg") {
-                    node.setAttributeNS(null, "transform",
-                        "rotate(" + rotation + " " + pos.x + " " +
-                        pos.y + ")");
-                } else {
-                     var metrics = this.symbolMetrics[id];
-                     node.firstChild.setAttributeNS(null, "transform",
-                     "rotate(" + style.rotation + " " + metrics[1] +
-                         " " +  metrics[2] + ")");
-                }
-            }
-        }
-        
-        if (options.isFilled) {
-            node.setAttributeNS(null, "fill", style.fillColor);
-            node.setAttributeNS(null, "fill-opacity", style.fillOpacity);
-        } else {
-            node.setAttributeNS(null, "fill", "none");
-        }
-
-        if (options.isStroked) {
-            node.setAttributeNS(null, "stroke", style.strokeColor);
-            node.setAttributeNS(null, "stroke-opacity", style.strokeOpacity);
-            node.setAttributeNS(null, "stroke-width", style.strokeWidth * widthFactor);
-            node.setAttributeNS(null, "stroke-linecap", style.strokeLinecap || "round");
-            // Hard-coded linejoin for now, to make it look the same as in VML.
-            // There is no strokeLinejoin property yet for symbolizers.
-            node.setAttributeNS(null, "stroke-linejoin", "round");
-            style.strokeDashstyle && node.setAttributeNS(null,
-                "stroke-dasharray", this.dashStyle(style, widthFactor));
-        } else {
-            node.setAttributeNS(null, "stroke", "none");
-        }
-        
-        if (style.pointerEvents) {
-            node.setAttributeNS(null, "pointer-events", style.pointerEvents);
-        }
-                
-        if (style.cursor != null) {
-            node.setAttributeNS(null, "cursor", style.cursor);
-        }
-        
-        return node;
-    },
-
-    /** 
-     * Method: dashStyle
-     * 
-     * Parameters:
-     * style - {Object}
-     * widthFactor - {Number}
-     * 
-     * Returns:
-     * {String} A SVG compliant 'stroke-dasharray' value
-     */
-    dashStyle: function(style, widthFactor) {
-        var w = style.strokeWidth * widthFactor;
-        var str = style.strokeDashstyle;
-        switch (str) {
-            case 'solid':
-                return 'none';
-            case 'dot':
-                return [1, 4 * w].join();
-            case 'dash':
-                return [4 * w, 4 * w].join();
-            case 'dashdot':
-                return [4 * w, 4 * w, 1, 4 * w].join();
-            case 'longdash':
-                return [8 * w, 4 * w].join();
-            case 'longdashdot':
-                return [8 * w, 4 * w, 1, 4 * w].join();
-            default:
-                return OpenLayers.String.trim(str).replace(/\s+/g, ",");
-        }
-    },
-    
-    /** 
-     * Method: createNode
-     * 
-     * Parameters:
-     * type - {String} Kind of node to draw
-     * id - {String} Id for node
-     * 
-     * Returns:
-     * {DOMElement} A new node of the given type and id
-     */
-    createNode: function(type, id) {
-        var node = document.createElementNS(this.xmlns, type);
-        if (id) {
-            node.setAttributeNS(null, "id", id);
-        }
-        return node;    
-    },
-    
-    /** 
-     * Method: nodeTypeCompare
-     * 
-     * Parameters:
-     * node - {SVGDomElement} An SVG element
-     * type - {String} Kind of node
-     * 
-     * Returns:
-     * {Boolean} Whether or not the specified node is of the specified type
-     */
-    nodeTypeCompare: function(node, type) {
-        return (type == node.nodeName);
-    },
-   
-    /**
-     * Method: createRenderRoot
-     * 
-     * Returns:
-     * {DOMElement} The specific render engine's root element
-     */
-    createRenderRoot: function() {
-        return this.nodeFactory(this.container.id + "_svgRoot", "svg");
-    },
-
-    /**
-     * Method: createRoot
-     * 
-     * Parameter:
-     * suffix - {String} suffix to append to the id
-     * 
-     * Returns:
-     * {DOMElement}
-     */
-    createRoot: function(suffix) {
-        return this.nodeFactory(this.container.id + suffix, "g");
-    },
-
-    /**
-     * Method: createDefs
-     *
-     * Returns:
-     * {DOMElement} The element to which we'll add the symbol definitions
-     */
-    createDefs: function() {
-        var defs = this.nodeFactory(this.container.id + "_defs", "defs");
-        this.rendererRoot.appendChild(defs);
-        return defs;
-    },
-
-    /**************************************
-     *                                    *
-     *     GEOMETRY DRAWING FUNCTIONS     *
-     *                                    *
-     **************************************/
-
-    /**
-     * Method: drawPoint
-     * This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement} or false if the renderer could not draw the point
-     */ 
-    drawPoint: function(node, geometry) {
-        return this.drawCircle(node, geometry, 1);
-    },
-
-    /**
-     * Method: drawCircle
-     * This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * radius - {Float}
-     * 
-     * Returns:
-     * {DOMElement} or false if the renderer could not draw the circle
-     */
-    drawCircle: function(node, geometry, radius) {
-        var resolution = this.getResolution();
-        var x = (geometry.x / resolution + this.left);
-        var y = (this.top - geometry.y / resolution);
-
-        if (this.inValidRange(x, y)) { 
-            node.setAttributeNS(null, "cx", x);
-            node.setAttributeNS(null, "cy", y);
-            node.setAttributeNS(null, "r", radius);
-            return node;
-        } else {
-            return false;
-        }    
-            
-    },
-    
-    /**
-     * Method: drawLineString
-     * This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement} or null if the renderer could not draw all components of
-     *     the linestring, or false if nothing could be drawn
-     */ 
-    drawLineString: function(node, geometry) {
-        var componentsResult = this.getComponentsString(geometry.components);
-        if (componentsResult.path) {
-            node.setAttributeNS(null, "points", componentsResult.path);
-            return (componentsResult.complete ? node : null);  
-        } else {
-            return false;
-        }
-    },
-    
-    /**
-     * Method: drawLinearRing
-     * This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement} or null if the renderer could not draw all components
-     *     of the linear ring, or false if nothing could be drawn
-     */ 
-    drawLinearRing: function(node, geometry) {
-        var componentsResult = this.getComponentsString(geometry.components);
-        if (componentsResult.path) {
-            node.setAttributeNS(null, "points", componentsResult.path);
-            return (componentsResult.complete ? node : null);  
-        } else {
-            return false;
-        }
-    },
-    
-    /**
-     * Method: drawPolygon
-     * This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement} or null if the renderer could not draw all components
-     *     of the polygon, or false if nothing could be drawn
-     */ 
-    drawPolygon: function(node, geometry) {
-        var d = "";
-        var draw = true;
-        var complete = true;
-        var linearRingResult, path;
-        for (var j=0, len=geometry.components.length; j<len; j++) {
-            d += " M";
-            linearRingResult = this.getComponentsString(
-                geometry.components[j].components, " ");
-            path = linearRingResult.path;
-            if (path) {
-                d += " " + path;
-                complete = linearRingResult.complete && complete;
-            } else {
-                draw = false;
-            }
-        }
-        d += " z";
-        if (draw) {
-            node.setAttributeNS(null, "d", d);
-            node.setAttributeNS(null, "fill-rule", "evenodd");
-            return complete ? node : null;
-        } else {
-            return false;
-        }    
-    },
-    
-    /**
-     * Method: drawRectangle
-     * This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement} or false if the renderer could not draw the rectangle
-     */ 
-    drawRectangle: function(node, geometry) {
-        var resolution = this.getResolution();
-        var x = (geometry.x / resolution + this.left);
-        var y = (this.top - geometry.y / resolution);
-
-        if (this.inValidRange(x, y)) { 
-            node.setAttributeNS(null, "x", x);
-            node.setAttributeNS(null, "y", y);
-            node.setAttributeNS(null, "width", geometry.width / resolution);
-            node.setAttributeNS(null, "height", geometry.height / resolution);
-            return node;
-        } else {
-            return false;
-        }
-    },
-    
-    /**
-     * Method: drawSurface
-     * This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement} or false if the renderer could not draw the surface
-     */ 
-    drawSurface: function(node, geometry) {
-
-        // create the svg path string representation
-        var d = null;
-        var draw = true;
-        for (var i=0, len=geometry.components.length; i<len; i++) {
-            if ((i%3) == 0 && (i/3) == 0) {
-                var component = this.getShortString(geometry.components[i]);
-                if (!component) { draw = false; }
-                d = "M " + component;
-            } else if ((i%3) == 1) {
-                var component = this.getShortString(geometry.components[i]);
-                if (!component) { draw = false; }
-                d += " C " + component;
-            } else {
-                var component = this.getShortString(geometry.components[i]);
-                if (!component) { draw = false; }
-                d += " " + component;
-            }
-        }
-        d += " Z";
-        if (draw) {
-            node.setAttributeNS(null, "d", d);
-            return node;
-        } else {
-            return false;
-        }    
-    },
-    
-    /**
-     * Method: drawText
-     * This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * featureId - {String}
-     * style -
-     * location - {<OpenLayers.Geometry.Point>}
-     */
-    drawText: function(featureId, style, location) {
-        var resolution = this.getResolution();
-        
-        var x = (location.x / resolution + this.left);
-        var y = (location.y / resolution - this.top);
-        
-        var label = this.nodeFactory(featureId + this.LABEL_ID_SUFFIX, "text");
-        var tspan = this.nodeFactory(featureId + this.LABEL_ID_SUFFIX + "_tspan", "tspan");
-
-        label.setAttributeNS(null, "x", x);
-        label.setAttributeNS(null, "y", -y);
-        
-        if (style.fontColor) {
-            label.setAttributeNS(null, "fill", style.fontColor);
-        }
-        if (style.fontOpacity) {
-            label.setAttributeNS(null, "opacity", style.fontOpacity);
-        }
-        if (style.fontFamily) {
-            label.setAttributeNS(null, "font-family", style.fontFamily);
-        }
-        if (style.fontSize) {
-            label.setAttributeNS(null, "font-size", style.fontSize);
-        }
-        if (style.fontWeight) {
-            label.setAttributeNS(null, "font-weight", style.fontWeight);
-        }
-        if(style.labelSelect === true) {
-            label.setAttributeNS(null, "pointer-events", "visible");
-            label._featureId = featureId;
-            tspan._featureId = featureId;
-            tspan._geometry = location;
-            tspan._geometryClass = location.CLASS_NAME;
-        } else {
-            label.setAttributeNS(null, "pointer-events", "none");
-        }
-        var align = style.labelAlign || "cm";
-        label.setAttributeNS(null, "text-anchor",
-            OpenLayers.Renderer.SVG.LABEL_ALIGN[align[0]] || "middle");
-
-        if (this.isGecko) {
-            label.setAttributeNS(null, "dominant-baseline",
-                OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]] || "central");
-        } else {
-            tspan.setAttributeNS(null, "baseline-shift",
-                OpenLayers.Renderer.SVG.LABEL_VSHIFT[align[1]] || "-35%");
-        }
-
-        tspan.textContent = style.label;
-        
-        if(!label.parentNode) {
-            label.appendChild(tspan);
-            this.textRoot.appendChild(label);
-        }   
-    },
-    
-    /** 
-     * Method: getComponentString
-     * 
-     * Parameters:
-     * components - {Array(<OpenLayers.Geometry.Point>)} Array of points
-     * separator - {String} character between coordinate pairs. Defaults to ","
-     * 
-     * Returns:
-     * {Object} hash with properties "path" (the string created from the
-     *     components and "complete" (false if the renderer was unable to
-     *     draw all components)
-     */
-    getComponentsString: function(components, separator) {
-        var renderCmp = [];
-        var complete = true;
-        var len = components.length;
-        var strings = [];
-        var str, component;
-        for(var i=0; i<len; i++) {
-            component = components[i];
-            renderCmp.push(component);
-            str = this.getShortString(component);
-            if (str) {
-                strings.push(str);
-            } else {
-                // The current component is outside the valid range. Let's
-                // see if the previous or next component is inside the range.
-                // If so, add the coordinate of the intersection with the
-                // valid range bounds.
-                if (i > 0) {
-                    if (this.getShortString(components[i - 1])) {
-                        strings.push(this.clipLine(components[i],
-                            components[i-1]));
-                    }
-                }
-                if (i < len - 1) {
-                    if (this.getShortString(components[i + 1])) {
-                        strings.push(this.clipLine(components[i],
-                            components[i+1]));
-                    }
-                }
-                complete = false;
-            }
-        }
-
-        return {
-            path: strings.join(separator || ","),
-            complete: complete
-        };
-    },
-    
-    /**
-     * Method: clipLine
-     * Given two points (one inside the valid range, and one outside),
-     * clips the line betweeen the two points so that the new points are both
-     * inside the valid range.
-     * 
-     * Parameters:
-     * badComponent - {<OpenLayers.Geometry.Point>)} original geometry of the
-     *     invalid point
-     * goodComponent - {<OpenLayers.Geometry.Point>)} original geometry of the
-     *     valid point
-     * Returns
-     * {String} the SVG coordinate pair of the clipped point (like
-     *     getShortString), or an empty string if both passed componets are at
-     *     the same point.
-     */
-    clipLine: function(badComponent, goodComponent) {
-        if (goodComponent.equals(badComponent)) {
-            return "";
-        }
-        var resolution = this.getResolution();
-        var maxX = this.MAX_PIXEL - this.translationParameters.x;
-        var maxY = this.MAX_PIXEL - this.translationParameters.y;
-        var x1 = goodComponent.x / resolution + this.left;
-        var y1 = this.top - goodComponent.y / resolution;
-        var x2 = badComponent.x / resolution + this.left;
-        var y2 = this.top - badComponent.y / resolution;
-        var k;
-        if (x2 < -maxX || x2 > maxX) {
-            k = (y2 - y1) / (x2 - x1);
-            x2 = x2 < 0 ? -maxX : maxX;
-            y2 = y1 + (x2 - x1) * k;
-        }
-        if (y2 < -maxY || y2 > maxY) {
-            k = (x2 - x1) / (y2 - y1);
-            y2 = y2 < 0 ? -maxY : maxY;
-            x2 = x1 + (y2 - y1) * k;
-        }
-        return x2 + "," + y2;
-    },
-
-    /** 
-     * Method: getShortString
-     * 
-     * Parameters:
-     * point - {<OpenLayers.Geometry.Point>}
-     * 
-     * Returns:
-     * {String} or false if point is outside the valid range
-     */
-    getShortString: function(point) {
-        var resolution = this.getResolution();
-        var x = (point.x / resolution + this.left);
-        var y = (this.top - point.y / resolution);
-
-        if (this.inValidRange(x, y)) { 
-            return x + "," + y;
-        } else {
-            return false;
-        }
-    },
-    
-    /**
-     * Method: getPosition
-     * Finds the position of an svg node.
-     * 
-     * Parameters:
-     * node - {DOMElement}
-     * 
-     * Returns:
-     * {Object} hash with x and y properties, representing the coordinates
-     *     within the svg coordinate system
-     */
-    getPosition: function(node) {
-        return({
-            x: parseFloat(node.getAttributeNS(null, "cx")),
-            y: parseFloat(node.getAttributeNS(null, "cy"))
-        });
-    },
-
-    /**
-     * Method: importSymbol
-     * add a new symbol definition from the rendererer's symbol hash
-     * 
-     * Parameters:
-     * graphicName - {String} name of the symbol to import
-     * 
-     * Returns:
-     * {String} - id of the imported symbol
-     */      
-    importSymbol: function (graphicName)  {
-        if (!this.defs) {
-            // create svg defs tag
-            this.defs = this.createDefs();
-        }
-        var id = this.container.id + "-" + graphicName;
-        
-        // check if symbol already exists in the defs
-        if (document.getElementById(id) != null) {
-            return id;
-        }
-        
-        var symbol = OpenLayers.Renderer.symbol[graphicName];
-        if (!symbol) {
-            throw new Error(graphicName + ' is not a valid symbol name');
-        }
-
-        var symbolNode = this.nodeFactory(id, "symbol");
-        var node = this.nodeFactory(null, "polygon");
-        symbolNode.appendChild(node);
-        var symbolExtent = new OpenLayers.Bounds(
-                                    Number.MAX_VALUE, Number.MAX_VALUE, 0, 0);
-
-        var points = [];
-        var x,y;
-        for (var i=0; i<symbol.length; i=i+2) {
-            x = symbol[i];
-            y = symbol[i+1];
-            symbolExtent.left = Math.min(symbolExtent.left, x);
-            symbolExtent.bottom = Math.min(symbolExtent.bottom, y);
-            symbolExtent.right = Math.max(symbolExtent.right, x);
-            symbolExtent.top = Math.max(symbolExtent.top, y);
-            points.push(x, ",", y);
-        }
-        
-        node.setAttributeNS(null, "points", points.join(" "));
-        
-        var width = symbolExtent.getWidth();
-        var height = symbolExtent.getHeight();
-        // create a viewBox three times as large as the symbol itself,
-        // to allow for strokeWidth being displayed correctly at the corners.
-        var viewBox = [symbolExtent.left - width,
-                        symbolExtent.bottom - height, width * 3, height * 3];
-        symbolNode.setAttributeNS(null, "viewBox", viewBox.join(" "));
-        this.symbolMetrics[id] = [
-            Math.max(width, height),
-            symbolExtent.getCenterLonLat().lon,
-            symbolExtent.getCenterLonLat().lat
-        ];
-        
-        this.defs.appendChild(symbolNode);
-        return symbolNode.id;
-    },
-    
-    /**
-     * Method: getFeatureIdFromEvent
-     * 
-     * Parameters:
-     * evt - {Object} An <OpenLayers.Event> object
-     *
-     * Returns:
-     * {<OpenLayers.Geometry>} A geometry from an event that 
-     *     happened on a layer.
-     */
-    getFeatureIdFromEvent: function(evt) {
-        var featureId = OpenLayers.Renderer.Elements.prototype.getFeatureIdFromEvent.apply(this, arguments);
-        if(this.supportUse === false && !featureId) {
-            var target = evt.target;
-            featureId = target.parentNode && target != this.rendererRoot &&
-                target.parentNode._featureId;
-        }
-        return featureId;
-    },
-
-    CLASS_NAME: "OpenLayers.Renderer.SVG"
-});
-
-/**
- * Constant: OpenLayers.Renderer.SVG.LABEL_ALIGN
- * {Object}
- */
-OpenLayers.Renderer.SVG.LABEL_ALIGN = {
-    "l": "start",
-    "r": "end",
-    "b": "bottom",
-    "t": "hanging"
-};
-
-/**
- * Constant: OpenLayers.Renderer.SVG.LABEL_VSHIFT
- * {Object}
- */
-OpenLayers.Renderer.SVG.LABEL_VSHIFT = {
-    // according to
-    // http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/full-text-align-02-b.html
-    // a baseline-shift of -70% shifts the text exactly from the
-    // bottom to the top of the baseline, so -35% moves the text to
-    // the center of the baseline.
-    "t": "-70%",
-    "b": "0"    
-};
-

--- a/labs/openlayers/lib/OpenLayers/Renderer/VML.js
+++ /dev/null
@@ -1,1000 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Renderer/Elements.js
- */
-
-/**
- * Class: OpenLayers.Renderer.VML
- * Render vector features in browsers with VML capability.  Construct a new
- * VML renderer with the <OpenLayers.Renderer.VML> constructor.
- * 
- * Note that for all calculations in this class, we use (num | 0) to truncate a 
- * float value to an integer. This is done because it seems that VML doesn't 
- * support float values.
- *
- * Inherits from:
- *  - <OpenLayers.Renderer.Elements>
- */
-OpenLayers.Renderer.VML = OpenLayers.Class(OpenLayers.Renderer.Elements, {
-
-    /**
-     * Property: xmlns
-     * {String} XML Namespace URN
-     */
-    xmlns: "urn:schemas-microsoft-com:vml",
-    
-    /**
-     * Property: symbolCache
-     * {DOMElement} node holding symbols. This hash is keyed by symbol name,
-     *     and each value is a hash with a "path" and an "extent" property.
-     */
-    symbolCache: {},
-
-    /**
-     * Property: offset
-     * {Object} Hash with "x" and "y" properties
-     */
-    offset: null,
-    
-    /**
-     * Constructor: OpenLayers.Renderer.VML
-     * Create a new VML renderer.
-     *
-     * Parameters:
-     * containerID - {String} The id for the element that contains the renderer
-     */
-    initialize: function(containerID) {
-        if (!this.supported()) { 
-            return; 
-        }
-        if (!document.namespaces.olv) {
-            document.namespaces.add("olv", this.xmlns);
-            var style = document.createStyleSheet();
-            var shapes = ['shape','rect', 'oval', 'fill', 'stroke', 'imagedata', 'group','textbox']; 
-            for (var i = 0, len = shapes.length; i < len; i++) {
-
-                style.addRule('olv\\:' + shapes[i], "behavior: url(#default#VML); " +
-                              "position: absolute; display: inline-block;");
-            }                  
-        }
-        
-        OpenLayers.Renderer.Elements.prototype.initialize.apply(this, 
-                                                                arguments);
-    },
-
-    /**
-     * APIMethod: destroy
-     * Deconstruct the renderer.
-     */
-    destroy: function() {
-        OpenLayers.Renderer.Elements.prototype.destroy.apply(this, arguments);
-    },
-
-    /**
-     * APIMethod: supported
-     * Determine whether a browser supports this renderer.
-     *
-     * Returns:
-     * {Boolean} The browser supports the VML renderer
-     */
-    supported: function() {
-        return !!(document.namespaces);
-    },    
-
-    /**
-     * Method: setExtent
-     * Set the renderer's extent
-     *
-     * Parameters:
-     * extent - {<OpenLayers.Bounds>}
-     * resolutionChanged - {Boolean}
-     * 
-     * Returns:
-     * {Boolean} true to notify the layer that the new extent does not exceed
-     *     the coordinate range, and the features will not need to be redrawn.
-     */
-    setExtent: function(extent, resolutionChanged) {
-        OpenLayers.Renderer.Elements.prototype.setExtent.apply(this, 
-                                                               arguments);
-        var resolution = this.getResolution();
-    
-        var left = (extent.left/resolution) | 0;
-        var top = (extent.top/resolution - this.size.h) | 0;
-        if (resolutionChanged || !this.offset) {
-            this.offset = {x: left, y: top};
-            left = 0;
-            top = 0;
-        } else {
-            left = left - this.offset.x;
-            top = top - this.offset.y;
-        }
-
-        
-        var org = left + " " + top;
-        this.root.coordorigin = org;
-        var roots = [this.root, this.vectorRoot, this.textRoot];
-        var root;
-        for(var i=0, len=roots.length; i<len; ++i) {
-            root = roots[i];
-
-            var size = this.size.w + " " + this.size.h;
-            root.coordsize = size;
-            
-        }
-        // flip the VML display Y axis upside down so it 
-        // matches the display Y axis of the map
-        this.root.style.flip = "y";
-        
-        return true;
-    },
-
-
-    /**
-     * Method: setSize
-     * Set the size of the drawing surface
-     *
-     * Parameters:
-     * size - {<OpenLayers.Size>} the size of the drawing surface
-     */
-    setSize: function(size) {
-        OpenLayers.Renderer.prototype.setSize.apply(this, arguments);
-        
-        // setting width and height on all roots to avoid flicker which we
-        // would get with 100% width and height on child roots
-        var roots = [
-            this.rendererRoot,
-            this.root,
-            this.vectorRoot,
-            this.textRoot
-        ];
-        var w = this.size.w + "px";
-        var h = this.size.h + "px";
-        var root;
-        for(var i=0, len=roots.length; i<len; ++i) {
-            root = roots[i];
-            root.style.width = w;
-            root.style.height = h;
-        }
-    },
-
-    /**
-     * Method: getNodeType
-     * Get the node type for a geometry and style
-     *
-     * Parameters:
-     * geometry - {<OpenLayers.Geometry>}
-     * style - {Object}
-     *
-     * Returns:
-     * {String} The corresponding node type for the specified geometry
-     */
-    getNodeType: function(geometry, style) {
-        var nodeType = null;
-        switch (geometry.CLASS_NAME) {
-            case "OpenLayers.Geometry.Point":
-                if (style.externalGraphic) {
-                    nodeType = "olv:rect";
-                } else if (this.isComplexSymbol(style.graphicName)) {
-                    nodeType = "olv:shape";
-                } else {
-                    nodeType = "olv:oval";
-                }
-                break;
-            case "OpenLayers.Geometry.Rectangle":
-                nodeType = "olv:rect";
-                break;
-            case "OpenLayers.Geometry.LineString":
-            case "OpenLayers.Geometry.LinearRing":
-            case "OpenLayers.Geometry.Polygon":
-            case "OpenLayers.Geometry.Curve":
-            case "OpenLayers.Geometry.Surface":
-                nodeType = "olv:shape";
-                break;
-            default:
-                break;
-        }
-        return nodeType;
-    },
-
-    /**
-     * Method: setStyle
-     * Use to set all the style attributes to a VML node.
-     *
-     * Parameters:
-     * node - {DOMElement} An VML element to decorate
-     * style - {Object}
-     * options - {Object} Currently supported options include 
-     *                              'isFilled' {Boolean} and
-     *                              'isStroked' {Boolean}
-     * geometry - {<OpenLayers.Geometry>}
-     */
-    setStyle: function(node, style, options, geometry) {
-        style = style  || node._style;
-        options = options || node._options;
-        var fillColor = style.fillColor;
-
-        if (node._geometryClass === "OpenLayers.Geometry.Point") {
-            if (style.externalGraphic) {
-                if (style.graphicTitle) {
-                    node.title=style.graphicTitle;
-                } 
-                var width = style.graphicWidth || style.graphicHeight;
-                var height = style.graphicHeight || style.graphicWidth;
-                width = width ? width : style.pointRadius*2;
-                height = height ? height : style.pointRadius*2;
-
-                var resolution = this.getResolution();
-                var xOffset = (style.graphicXOffset != undefined) ?
-                    style.graphicXOffset : -(0.5 * width);
-                var yOffset = (style.graphicYOffset != undefined) ?
-                    style.graphicYOffset : -(0.5 * height);
-                
-                node.style.left = (((geometry.x/resolution - this.offset.x)+xOffset) | 0) + "px";
-                node.style.top = (((geometry.y/resolution - this.offset.y)-(yOffset+height)) | 0) + "px";
-                node.style.width = width + "px";
-                node.style.height = height + "px";
-                node.style.flip = "y";
-                
-                // modify fillColor and options for stroke styling below
-                fillColor = "none";
-                options.isStroked = false;
-            } else if (this.isComplexSymbol(style.graphicName)) {
-                var cache = this.importSymbol(style.graphicName);
-                node.path = cache.path;
-                node.coordorigin = cache.left + "," + cache.bottom;
-                var size = cache.size;
-                node.coordsize = size + "," + size;        
-                this.drawCircle(node, geometry, style.pointRadius);
-                node.style.flip = "y";
-            } else {
-                this.drawCircle(node, geometry, style.pointRadius);
-            }
-        }
-
-        // fill 
-        if (options.isFilled) { 
-            node.fillcolor = fillColor; 
-        } else { 
-            node.filled = "false"; 
-        }
-        var fills = node.getElementsByTagName("fill");
-        var fill = (fills.length == 0) ? null : fills[0];
-        if (!options.isFilled) {
-            if (fill) {
-                node.removeChild(fill);
-            }
-        } else {
-            if (!fill) {
-                fill = this.createNode('olv:fill', node.id + "_fill");
-            }
-            fill.opacity = style.fillOpacity;
-
-            if (node._geometryClass === "OpenLayers.Geometry.Point" &&
-                    style.externalGraphic) {
-
-                // override fillOpacity
-                if (style.graphicOpacity) {
-                    fill.opacity = style.graphicOpacity;
-                }
-                
-                fill.src = style.externalGraphic;
-                fill.type = "frame";
-                
-                if (!(style.graphicWidth && style.graphicHeight)) {
-                  fill.aspect = "atmost";
-                }                
-            }
-            if (fill.parentNode != node) {
-                node.appendChild(fill);
-            }
-        }
-
-        // additional rendering for rotated graphics or symbols
-        var rotation = style.rotation;
-        if ((rotation !== undefined || node._rotation !== undefined)) {
-            node._rotation = rotation;
-            if (style.externalGraphic) {
-                this.graphicRotate(node, xOffset, yOffset, style);
-                // make the fill fully transparent, because we now have
-                // the graphic as imagedata element. We cannot just remove
-                // the fill, because this is part of the hack described
-                // in graphicRotate
-                fill.opacity = 0;
-            } else if(node._geometryClass === "OpenLayers.Geometry.Point") {
-                node.style.rotation = rotation || 0;
-            }
-        }
-
-        // stroke 
-        var strokes = node.getElementsByTagName("stroke");
-        var stroke = (strokes.length == 0) ? null : strokes[0];
-        if (!options.isStroked) {
-            node.stroked = false;
-            if (stroke) {
-                stroke.on = false;
-            }
-        } else {
-            if (!stroke) {
-                stroke = this.createNode('olv:stroke', node.id + "_stroke");
-                node.appendChild(stroke);
-            }
-            stroke.on = true;
-            stroke.color = style.strokeColor; 
-            stroke.weight = style.strokeWidth + "px"; 
-            stroke.opacity = style.strokeOpacity;
-            stroke.endcap = style.strokeLinecap == 'butt' ? 'flat' :
-                (style.strokeLinecap || 'round');
-            if (style.strokeDashstyle) {
-                stroke.dashstyle = this.dashStyle(style);
-            }
-        }
-        
-        if (style.cursor != "inherit" && style.cursor != null) {
-            node.style.cursor = style.cursor;
-        }
-        return node;
-    },
-
-    /**
-     * Method: graphicRotate
-     * If a point is to be styled with externalGraphic and rotation, VML fills
-     * cannot be used to display the graphic, because rotation of graphic
-     * fills is not supported by the VML implementation of Internet Explorer.
-     * This method creates a olv:imagedata element inside the VML node,
-     * DXImageTransform.Matrix and BasicImage filters for rotation and
-     * opacity, and a 3-step hack to remove rendering artefacts from the
-     * graphic and preserve the ability of graphics to trigger events.
-     * Finally, OpenLayers methods are used to determine the correct
-     * insertion point of the rotated image, because DXImageTransform.Matrix
-     * does the rotation without the ability to specify a rotation center
-     * point.
-     * 
-     * Parameters:
-     * node    - {DOMElement}
-     * xOffset - {Number} rotation center relative to image, x coordinate
-     * yOffset - {Number} rotation center relative to image, y coordinate
-     * style   - {Object}
-     */
-    graphicRotate: function(node, xOffset, yOffset, style) {
-        var style = style || node._style;
-        var rotation = style.rotation || 0;
-        
-        var aspectRatio, size;
-        if (!(style.graphicWidth && style.graphicHeight)) {
-            // load the image to determine its size
-            var img = new Image();
-            img.onreadystatechange = OpenLayers.Function.bind(function() {
-                if(img.readyState == "complete" ||
-                        img.readyState == "interactive") {
-                    aspectRatio = img.width / img.height;
-                    size = Math.max(style.pointRadius * 2, 
-                        style.graphicWidth || 0,
-                        style.graphicHeight || 0);
-                    xOffset = xOffset * aspectRatio;
-                    style.graphicWidth = size * aspectRatio;
-                    style.graphicHeight = size;
-                    this.graphicRotate(node, xOffset, yOffset, style);
-                }
-            }, this);
-            img.src = style.externalGraphic;
-            
-            // will be called again by the onreadystate handler
-            return;
-        } else {
-            size = Math.max(style.graphicWidth, style.graphicHeight);
-            aspectRatio = style.graphicWidth / style.graphicHeight;
-        }
-        
-        var width = Math.round(style.graphicWidth || size * aspectRatio);
-        var height = Math.round(style.graphicHeight || size);
-        node.style.width = width + "px";
-        node.style.height = height + "px";
-        
-        // Three steps are required to remove artefacts for images with
-        // transparent backgrounds (resulting from using DXImageTransform
-        // filters on svg objects), while preserving awareness for browser
-        // events on images:
-        // - Use the fill as usual (like for unrotated images) to handle
-        //   events
-        // - specify an imagedata element with the same src as the fill
-        // - style the imagedata element with an AlphaImageLoader filter
-        //   with empty src
-        var image = document.getElementById(node.id + "_image");
-        if (!image) {
-            image = this.createNode("olv:imagedata", node.id + "_image");
-            node.appendChild(image);
-        }
-        image.style.width = width + "px";
-        image.style.height = height + "px";
-        image.src = style.externalGraphic;
-        image.style.filter =
-            "progid:DXImageTransform.Microsoft.AlphaImageLoader(" + 
-            "src='', sizingMethod='scale')";
-
-        var rot = rotation * Math.PI / 180;
-        var sintheta = Math.sin(rot);
-        var costheta = Math.cos(rot);
-
-        // do the rotation on the image
-        var filter =
-            "progid:DXImageTransform.Microsoft.Matrix(M11=" + costheta +
-            ",M12=" + (-sintheta) + ",M21=" + sintheta + ",M22=" + costheta +
-            ",SizingMethod='auto expand')\n";
-
-        // set the opacity (needed for the imagedata)
-        var opacity = style.graphicOpacity || style.fillOpacity;
-        if (opacity && opacity != 1) {
-            filter += 
-                "progid:DXImageTransform.Microsoft.BasicImage(opacity=" + 
-                opacity+")\n";
-        }
-        node.style.filter = filter;
-
-        // do the rotation again on a box, so we know the insertion point
-        var centerPoint = new OpenLayers.Geometry.Point(-xOffset, -yOffset);
-        var imgBox = new OpenLayers.Bounds(0, 0, width, height).toGeometry();
-        imgBox.rotate(style.rotation, centerPoint);
-        var imgBounds = imgBox.getBounds();
-
-        node.style.left = Math.round(
-            parseInt(node.style.left) + imgBounds.left) + "px";
-        node.style.top = Math.round(
-            parseInt(node.style.top) - imgBounds.bottom) + "px";
-    },
-
-    /**
-     * Method: postDraw
-     * Does some node postprocessing to work around browser issues:
-     * - Some versions of Internet Explorer seem to be unable to set fillcolor
-     *   and strokecolor to "none" correctly before the fill node is appended
-     *   to a visible vml node. This method takes care of that and sets
-     *   fillcolor and strokecolor again if needed.
-     * - In some cases, a node won't become visible after being drawn. Setting
-     *   style.visibility to "visible" works around that.
-     * 
-     * Parameters:
-     * node - {DOMElement}
-     */
-    postDraw: function(node) {
-        node.style.visibility = "visible";
-        var fillColor = node._style.fillColor;
-        var strokeColor = node._style.strokeColor;
-        if (fillColor == "none" &&
-                node.fillcolor != fillColor) {
-            node.fillcolor = fillColor;
-        }
-        if (strokeColor == "none" &&
-                node.strokecolor != strokeColor) {
-            node.strokecolor = strokeColor;
-        }
-    },
-
-
-    /**
-     * Method: setNodeDimension
-     * Get the geometry's bounds, convert it to our vml coordinate system, 
-     * then set the node's position, size, and local coordinate system.
-     *   
-     * Parameters:
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     */
-    setNodeDimension: function(node, geometry) {
-
-        var bbox = geometry.getBounds();
-        if(bbox) {
-            var resolution = this.getResolution();
-        
-            var scaledBox = 
-                new OpenLayers.Bounds((bbox.left/resolution - this.offset.x) | 0,
-                                      (bbox.bottom/resolution - this.offset.y) | 0,
-                                      (bbox.right/resolution - this.offset.x) | 0,
-                                      (bbox.top/resolution - this.offset.y) | 0);
-            
-            // Set the internal coordinate system to draw the path
-            node.style.left = scaledBox.left + "px";
-            node.style.top = scaledBox.top + "px";
-            node.style.width = scaledBox.getWidth() + "px";
-            node.style.height = scaledBox.getHeight() + "px";
-    
-            node.coordorigin = scaledBox.left + " " + scaledBox.top;
-            node.coordsize = scaledBox.getWidth()+ " " + scaledBox.getHeight();
-        }
-    },
-    
-    /** 
-     * Method: dashStyle
-     * 
-     * Parameters:
-     * style - {Object}
-     * 
-     * Returns:
-     * {String} A VML compliant 'stroke-dasharray' value
-     */
-    dashStyle: function(style) {
-        var dash = style.strokeDashstyle;
-        switch (dash) {
-            case 'solid':
-            case 'dot':
-            case 'dash':
-            case 'dashdot':
-            case 'longdash':
-            case 'longdashdot':
-                return dash;
-            default:
-                // very basic guessing of dash style patterns
-                var parts = dash.split(/[ ,]/);
-                if (parts.length == 2) {
-                    if (1*parts[0] >= 2*parts[1]) {
-                        return "longdash";
-                    }
-                    return (parts[0] == 1 || parts[1] == 1) ? "dot" : "dash";
-                } else if (parts.length == 4) {
-                    return (1*parts[0] >= 2*parts[1]) ? "longdashdot" :
-                        "dashdot";
-                }
-                return "solid";
-        }
-    },
-
-    /**
-     * Method: createNode
-     * Create a new node
-     *
-     * Parameters:
-     * type - {String} Kind of node to draw
-     * id - {String} Id for node
-     *
-     * Returns:
-     * {DOMElement} A new node of the given type and id
-     */
-    createNode: function(type, id) {
-        var node = document.createElement(type);
-        if (id) {
-            node.id = id;
-        }
-        
-        // IE hack to make elements unselectable, to prevent 'blue flash'
-        // while dragging vectors; #1410
-        node.unselectable = 'on';
-        node.onselectstart = OpenLayers.Function.False;
-        
-        return node;    
-    },
-    
-    /**
-     * Method: nodeTypeCompare
-     * Determine whether a node is of a given type
-     *
-     * Parameters:
-     * node - {DOMElement} An VML element
-     * type - {String} Kind of node
-     *
-     * Returns:
-     * {Boolean} Whether or not the specified node is of the specified type
-     */
-    nodeTypeCompare: function(node, type) {
-
-        //split type
-        var subType = type;
-        var splitIndex = subType.indexOf(":");
-        if (splitIndex != -1) {
-            subType = subType.substr(splitIndex+1);
-        }
-
-        //split nodeName
-        var nodeName = node.nodeName;
-        splitIndex = nodeName.indexOf(":");
-        if (splitIndex != -1) {
-            nodeName = nodeName.substr(splitIndex+1);
-        }
-
-        return (subType == nodeName);
-    },
-
-    /**
-     * Method: createRenderRoot
-     * Create the renderer root
-     *
-     * Returns:
-     * {DOMElement} The specific render engine's root element
-     */
-    createRenderRoot: function() {
-        return this.nodeFactory(this.container.id + "_vmlRoot", "div");
-    },
-
-    /**
-     * Method: createRoot
-     * Create the main root element
-     * 
-     * Parameters:
-     * suffix - {String} suffix to append to the id
-     *
-     * Returns:
-     * {DOMElement}
-     */
-    createRoot: function(suffix) {
-        return this.nodeFactory(this.container.id + suffix, "olv:group");
-    },
-    
-    /**************************************
-     *                                    *
-     *     GEOMETRY DRAWING FUNCTIONS     *
-     *                                    *
-     **************************************/
-    
-    /**
-     * Method: drawPoint
-     * Render a point
-     * 
-     * Parameters:
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement} or false if the point could not be drawn
-     */
-    drawPoint: function(node, geometry) {
-        return this.drawCircle(node, geometry, 1);
-    },
-
-    /**
-     * Method: drawCircle
-     * Render a circle.
-     * Size and Center a circle given geometry (x,y center) and radius
-     * 
-     * Parameters:
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * radius - {float}
-     * 
-     * Returns:
-     * {DOMElement} or false if the circle could not ne drawn
-     */
-    drawCircle: function(node, geometry, radius) {
-        if(!isNaN(geometry.x)&& !isNaN(geometry.y)) {
-            var resolution = this.getResolution();
-
-            node.style.left = (((geometry.x /resolution - this.offset.x) | 0) - radius) + "px";
-            node.style.top = (((geometry.y /resolution - this.offset.y) | 0) - radius) + "px";
-    
-            var diameter = radius * 2;
-            
-            node.style.width = diameter + "px";
-            node.style.height = diameter + "px";
-            return node;
-        }
-        return false;
-    },
-
-
-    /**
-     * Method: drawLineString
-     * Render a linestring.
-     * 
-     * Parameters:
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement}
-     */
-    drawLineString: function(node, geometry) {
-        return this.drawLine(node, geometry, false);
-    },
-
-    /**
-     * Method: drawLinearRing
-     * Render a linearring
-     * 
-     * Parameters:
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement}
-     */
-    drawLinearRing: function(node, geometry) {
-        return this.drawLine(node, geometry, true);
-    },
-
-    /**
-     * Method: DrawLine
-     * Render a line.
-     * 
-     * Parameters:
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * closeLine - {Boolean} Close the line? (make it a ring?)
-     * 
-     * Returns:
-     * {DOMElement}
-     */
-    drawLine: function(node, geometry, closeLine) {
-
-        this.setNodeDimension(node, geometry);
-
-        var resolution = this.getResolution();
-        var numComponents = geometry.components.length;
-        var parts = new Array(numComponents);
-
-        var comp, x, y;
-        for (var i = 0; i < numComponents; i++) {
-            comp = geometry.components[i];
-            x = (comp.x/resolution - this.offset.x) | 0;
-            y = (comp.y/resolution - this.offset.y) | 0;
-            parts[i] = " " + x + "," + y + " l ";
-        }
-        var end = (closeLine) ? " x e" : " e";
-        node.path = "m" + parts.join("") + end;
-        return node;
-    },
-
-    /**
-     * Method: drawPolygon
-     * Render a polygon
-     * 
-     * Parameters:
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement}
-     */
-    drawPolygon: function(node, geometry) {
-        this.setNodeDimension(node, geometry);
-
-        var resolution = this.getResolution();
-    
-        var path = [];
-        var linearRing, i, j, len, ilen, comp, x, y;
-        for (j = 0, len=geometry.components.length; j<len; j++) {
-            linearRing = geometry.components[j];
-
-            path.push("m");
-            for (i=0, ilen=linearRing.components.length; i<ilen; i++) {
-                comp = linearRing.components[i];
-                x = (comp.x / resolution - this.offset.x) | 0;
-                y = (comp.y / resolution - this.offset.y) | 0;
-                path.push(" " + x + "," + y);
-                if (i==0) {
-                    path.push(" l");
-                }
-            }
-            path.push(" x ");
-        }
-        path.push("e");
-        node.path = path.join("");
-        return node;
-    },
-
-    /**
-     * Method: drawRectangle
-     * Render a rectangle
-     * 
-     * Parameters:
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement}
-     */
-    drawRectangle: function(node, geometry) {
-        var resolution = this.getResolution();
-    
-        node.style.left = ((geometry.x/resolution - this.offset.x) | 0) + "px";
-        node.style.top = ((geometry.y/resolution - this.offset.y) | 0) + "px";
-        node.style.width = ((geometry.width/resolution) | 0) + "px";
-        node.style.height = ((geometry.height/resolution) | 0) + "px";
-        
-        return node;
-    },
-    
-    /**
-     * Method: drawText
-     * This method is only called by the renderer itself.
-     * 
-     * Parameters: 
-     * featureId - {String}
-     * style -
-     * location - {<OpenLayers.Geometry.Point>}
-     */
-    drawText: function(featureId, style, location) {
-        var label = this.nodeFactory(featureId + this.LABEL_ID_SUFFIX, "olv:rect");
-        var textbox = this.nodeFactory(featureId + this.LABEL_ID_SUFFIX + "_textbox", "olv:textbox");
-        
-        var resolution = this.getResolution();
-        label.style.left = ((location.x/resolution - this.offset.x) | 0) + "px";
-        label.style.top = ((location.y/resolution - this.offset.y) | 0) + "px";
-        label.style.flip = "y";
-
-        textbox.innerText = style.label;
-
-        if (style.fontColor) {
-            textbox.style.color = style.fontColor;
-        }
-        if (style.fontOpacity) {
-            textbox.style.filter = 'alpha(opacity=' + (style.fontOpacity * 100) + ')';
-        }
-        if (style.fontFamily) {
-            textbox.style.fontFamily = style.fontFamily;
-        }
-        if (style.fontSize) {
-            textbox.style.fontSize = style.fontSize;
-        }
-        if (style.fontWeight) {
-            textbox.style.fontWeight = style.fontWeight;
-        }
-        if(style.labelSelect === true) {
-            label._featureId = featureId;
-            textbox._featureId = featureId;
-            textbox._geometry = location;
-            textbox._geometryClass = location.CLASS_NAME;
-        }
-        textbox.style.whiteSpace = "nowrap";
-        // fun with IE: IE7 in standards compliant mode does not display any
-        // text with a left inset of 0. So we set this to 1px and subtract one
-        // pixel later when we set label.style.left
-        textbox.inset = "1px,0px,0px,0px";
-
-        if(!label.parentNode) {
-            label.appendChild(textbox);
-            this.textRoot.appendChild(label);
-        }
-
-        var align = style.labelAlign || "cm";
-        if (align.length == 1) {
-            align += "m";
-        }
-        var xshift = textbox.clientWidth *
-            (OpenLayers.Renderer.VML.LABEL_SHIFT[align.substr(0,1)]);
-        var yshift = textbox.clientHeight *
-            (OpenLayers.Renderer.VML.LABEL_SHIFT[align.substr(1,1)]);
-        label.style.left = parseInt(label.style.left)-xshift-1+"px";
-        label.style.top = parseInt(label.style.top)+yshift+"px";
-        
-    },
-
-    /**
-     * Method: drawSurface
-     * 
-     * Parameters:
-     * node - {DOMElement}
-     * geometry - {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {DOMElement}
-     */
-    drawSurface: function(node, geometry) {
-
-        this.setNodeDimension(node, geometry);
-
-        var resolution = this.getResolution();
-    
-        var path = [];
-        var comp, x, y;
-        for (var i=0, len=geometry.components.length; i<len; i++) {
-            comp = geometry.components[i];
-            x = (comp.x / resolution - this.offset.x) | 0;
-            y = (comp.y / resolution - this.offset.y) | 0;
-            if ((i%3)==0 && (i/3)==0) {
-                path.push("m");
-            } else if ((i%3)==1) {
-                path.push(" c");
-            }
-            path.push(" " + x + "," + y);
-        }
-        path.push(" x e");
-
-        node.path = path.join("");
-        return node;
-    },
-    
-    /**
-     * Method: moveRoot
-     * moves this renderer's root to a different renderer.
-     * 
-     * Parameters:
-     * renderer - {<OpenLayers.Renderer>} target renderer for the moved root
-     * root - {DOMElement} optional root node. To be used when this renderer
-     *     holds roots from multiple layers to tell this method which one to
-     *     detach
-     * 
-     * Returns:
-     * {Boolean} true if successful, false otherwise
-     */
-    moveRoot: function(renderer) {
-        var layer = this.map.getLayer(renderer.container.id);
-        if(layer instanceof OpenLayers.Layer.Vector.RootContainer) {
-            layer = this.map.getLayer(this.container.id);
-        }
-        layer && layer.renderer.clear();
-        OpenLayers.Renderer.Elements.prototype.moveRoot.apply(this, arguments);
-        layer && layer.redraw();
-    },
-    
-    /**
-     * Method: importSymbol
-     * add a new symbol definition from the rendererer's symbol hash
-     * 
-     * Parameters:
-     * graphicName - {String} name of the symbol to import
-     * 
-     * Returns:
-     * {Object} - hash of {DOMElement} "symbol" and {Number} "size"
-     */      
-    importSymbol: function (graphicName)  {
-        var id = this.container.id + "-" + graphicName;
-        
-        // check if symbol already exists in the cache
-        var cache = this.symbolCache[id];
-        if (cache) {
-            return cache;
-        }
-        
-        var symbol = OpenLayers.Renderer.symbol[graphicName];
-        if (!symbol) {
-            throw new Error(graphicName + ' is not a valid symbol name');
-        }
-
-        var symbolExtent = new OpenLayers.Bounds(
-                                    Number.MAX_VALUE, Number.MAX_VALUE, 0, 0);
-        
-        var pathitems = ["m"];
-        for (var i=0; i<symbol.length; i=i+2) {
-            var x = symbol[i];
-            var y = symbol[i+1];
-            symbolExtent.left = Math.min(symbolExtent.left, x);
-            symbolExtent.bottom = Math.min(symbolExtent.bottom, y);
-            symbolExtent.right = Math.max(symbolExtent.right, x);
-            symbolExtent.top = Math.max(symbolExtent.top, y);
-
-            pathitems.push(x);
-            pathitems.push(y);
-            if (i == 0) {
-                pathitems.push("l");
-            }
-        }
-        pathitems.push("x e");
-        var path = pathitems.join(" ");
-
-        var diff = (symbolExtent.getWidth() - symbolExtent.getHeight()) / 2;
-        if(diff > 0) {
-            symbolExtent.bottom = symbolExtent.bottom - diff;
-            symbolExtent.top = symbolExtent.top + diff;
-        } else {
-            symbolExtent.left = symbolExtent.left + diff;
-            symbolExtent.right = symbolExtent.right - diff;
-        }
-        
-        cache = {
-            path: path,
-            size: symbolExtent.getWidth(), // equals getHeight() now
-            left: symbolExtent.left,
-            bottom: symbolExtent.bottom
-        };
-        this.symbolCache[id] = cache;
-        
-        return cache;
-    },
-    
-    CLASS_NAME: "OpenLayers.Renderer.VML"
-});
-
-/**
- * Constant: OpenLayers.Renderer.VML.LABEL_SHIFT
- * {Object}
- */
-OpenLayers.Renderer.VML.LABEL_SHIFT = {
-    "l": 0,
-    "c": .5,
-    "r": 1,
-    "t": 0,
-    "m": .5,
-    "b": 1
-};
-

--- a/labs/openlayers/lib/OpenLayers/Request.js
+++ /dev/null
@@ -1,359 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Events.js
- */
-
-/**
- * Namespace: OpenLayers.Request
- * The OpenLayers.Request namespace contains convenience methods for working
- *     with XMLHttpRequests.  These methods work with a cross-browser
- *     W3C compliant <OpenLayers.Request.XMLHttpRequest> class.
- */
-OpenLayers.Request = {
-    
-    /**
-     * Constant: DEFAULT_CONFIG
-     * {Object} Default configuration for all requests.
-     */
-    DEFAULT_CONFIG: {
-        method: "GET",
-        url: window.location.href,
-        async: true,
-        user: undefined,
-        password: undefined,
-        params: null,
-        proxy: OpenLayers.ProxyHost,
-        headers: {},
-        data: null,
-        callback: function() {},
-        success: null,
-        failure: null,
-        scope: null
-    },
-    
-    /**
-     * APIProperty: events
-     * {<OpenLayers.Events>} An events object that handles all 
-     *     events on the {<OpenLayers.Request>} object.
-     *
-     * All event listeners will receive an event object with three properties:
-     * request - {<OpenLayers.Request.XMLHttpRequest>} The request object.
-     * config - {Object} The config object sent to the specific request method.
-     * requestUrl - {String} The request url.
-     * 
-     * Supported event types:
-     * complete - Triggered when we have a response from the request, if a
-     *     listener returns false, no further response processing will take
-     *     place.
-     * success - Triggered when the HTTP response has a success code (200-299).
-     * failure - Triggered when the HTTP response does not have a success code.
-     */
-    events: new OpenLayers.Events(this, null, ["complete", "success", "failure"]),
-    
-    /**
-     * APIMethod: issue
-     * Create a new XMLHttpRequest object, open it, set any headers, bind
-     *     a callback to done state, and send any data.  It is recommended that
-     *     you use one <GET>, <POST>, <PUT>, <DELETE>, <OPTIONS>, or <HEAD>.
-     *     This method is only documented to provide detail on the configuration
-     *     options available to all request methods.
-     *
-     * Parameters:
-     * config - {Object} Object containing properties for configuring the
-     *     request.  Allowed configuration properties are described below.
-     *     This object is modified and should not be reused.
-     *
-     * Allowed config properties:
-     * method - {String} One of GET, POST, PUT, DELETE, HEAD, or
-     *     OPTIONS.  Default is GET.
-     * url - {String} URL for the request.
-     * async - {Boolean} Open an asynchronous request.  Default is true.
-     * user - {String} User for relevant authentication scheme.  Set
-     *     to null to clear current user.
-     * password - {String} Password for relevant authentication scheme.
-     *     Set to null to clear current password.
-     * proxy - {String} Optional proxy.  Defaults to
-     *     <OpenLayers.ProxyHost>.
-     * params - {Object} Any key:value pairs to be appended to the
-     *     url as a query string.  Assumes url doesn't already include a query
-     *     string or hash.  Typically, this is only appropriate for <GET>
-     *     requests where the query string will be appended to the url.
-     *     Parameter values that are arrays will be
-     *     concatenated with a comma (note that this goes against form-encoding)
-     *     as is done with <OpenLayers.Util.getParameterString>.
-     * headers - {Object} Object with header:value pairs to be set on
-     *     the request.
-     * data - {String | Document} Optional data to send with the request.
-     *     Typically, this is only used with <POST> and <PUT> requests.
-     *     Make sure to provide the appropriate "Content-Type" header for your
-     *     data.  For <POST> and <PUT> requests, the content type defaults to
-     *     "application-xml".  If your data is a different content type, or
-     *     if you are using a different HTTP method, set the "Content-Type"
-     *     header to match your data type.
-     * callback - {Function} Function to call when request is done.
-     *     To determine if the request failed, check request.status (200
-     *     indicates success).
-     * success - {Function} Optional function to call if request status is in
-     *     the 200s.  This will be called in addition to callback above and
-     *     would typically only be used as an alternative.
-     * failure - {Function} Optional function to call if request status is not
-     *     in the 200s.  This will be called in addition to callback above and
-     *     would typically only be used as an alternative.
-     * scope - {Object} If callback is a public method on some object,
-     *     set the scope to that object.
-     *
-     * Returns:
-     * {XMLHttpRequest} Request object.  To abort the request before a response
-     *     is received, call abort() on the request object.
-     */
-    issue: function(config) {        
-        // apply default config - proxy host may have changed
-        var defaultConfig = OpenLayers.Util.extend(
-            this.DEFAULT_CONFIG,
-            {proxy: OpenLayers.ProxyHost}
-        );
-        config = OpenLayers.Util.applyDefaults(config, defaultConfig);
-
-        // create request, open, and set headers
-        var request = new OpenLayers.Request.XMLHttpRequest();
-        var url = config.url;
-        if(config.params) {
-            var paramString = OpenLayers.Util.getParameterString(config.params);
-            if(paramString.length > 0) {
-                var separator = (url.indexOf('?') > -1) ? '&' : '?';
-                url += separator + paramString;
-            }
-        }
-        if(config.proxy && (url.indexOf("http") == 0)) {
-            if(typeof config.proxy == "function") {
-                url = config.proxy(url);
-            } else {
-                url = config.proxy + encodeURIComponent(url);
-            }
-        }
-        request.open(
-            config.method, url, config.async, config.user, config.password
-        );
-        for(var header in config.headers) {
-            request.setRequestHeader(header, config.headers[header]);
-        }
-
-        var events = this.events;
-
-        // we want to execute runCallbacks with "this" as the
-        // execution scope
-        var self = this;
-        
-        request.onreadystatechange = function() {
-            if(request.readyState == OpenLayers.Request.XMLHttpRequest.DONE) {
-                var proceed = events.triggerEvent(
-                    "complete",
-                    {request: request, config: config, requestUrl: url}
-                );
-                if(proceed !== false) {
-                    self.runCallbacks(
-                        {request: request, config: config, requestUrl: url}
-                    );
-                }
-            }
-        };
-        
-        // send request (optionally with data) and return
-        // call in a timeout for asynchronous requests so the return is
-        // available before readyState == 4 for cached docs
-        if(config.async === false) {
-            request.send(config.data);
-        } else {
-            window.setTimeout(function(){
-                if (request._aborted !== true) {
-                    request.send(config.data);
-                }
-            }, 0);
-        }
-        return request;
-    },
-    
-    /**
-     * Method: runCallbacks
-     * Calls the complete, success and failure callbacks. Application
-     *    can listen to the "complete" event, have the listener 
-     *    display a confirm window and always return false, and
-     *    execute OpenLayers.Request.runCallbacks if the user
-     *    hits "yes" in the confirm window.
-     *
-     * Parameters:
-     * options - {Object} Hash containing request, config and requestUrl keys
-     */
-    runCallbacks: function(options) {
-        var request = options.request;
-        var config = options.config;
-        
-        // bind callbacks to readyState 4 (done)
-        var complete = (config.scope) ?
-            OpenLayers.Function.bind(config.callback, config.scope) :
-            config.callback;
-        
-        // optional success callback
-        var success;
-        if(config.success) {
-            success = (config.scope) ?
-                OpenLayers.Function.bind(config.success, config.scope) :
-                config.success;
-        }
-
-        // optional failure callback
-        var failure;
-        if(config.failure) {
-            failure = (config.scope) ?
-                OpenLayers.Function.bind(config.failure, config.scope) :
-                config.failure;
-        }
-
-        complete(request);
-
-        if (!request.status || (request.status >= 200 && request.status < 300)) {
-            this.events.triggerEvent("success", options);
-            if(success) {
-                success(request);
-            }
-        }
-        if(request.status && (request.status < 200 || request.status >= 300)) {                    
-            this.events.triggerEvent("failure", options);
-            if(failure) {
-                failure(request);
-            }
-        }
-    },
-    
-    /**
-     * APIMethod: GET
-     * Send an HTTP GET request.  Additional configuration properties are
-     *     documented in the <issue> method, with the method property set
-     *     to GET.
-     *
-     * Parameters:
-     * config - {Object} Object with properties for configuring the request.
-     *     See the <issue> method for documentation of allowed properties.
-     *     This object is modified and should not be reused.
-     * 
-     * Returns:
-     * {XMLHttpRequest} Request object.
-     */
-    GET: function(config) {
-        config = OpenLayers.Util.extend(config, {method: "GET"});
-        return OpenLayers.Request.issue(config);
-    },
-    
-    /**
-     * APIMethod: POST
-     * Send a POST request.  Additional configuration properties are
-     *     documented in the <issue> method, with the method property set
-     *     to POST and "Content-Type" header set to "application/xml".
-     *
-     * Parameters:
-     * config - {Object} Object with properties for configuring the request.
-     *     See the <issue> method for documentation of allowed properties.  The
-     *     default "Content-Type" header will be set to "application-xml" if
-     *     none is provided.  This object is modified and should not be reused.
-     * 
-     * Returns:
-     * {XMLHttpRequest} Request object.
-     */
-    POST: function(config) {
-        config = OpenLayers.Util.extend(config, {method: "POST"});
-        // set content type to application/xml if it isn't already set
-        config.headers = config.headers ? config.headers : {};
-        if(!("CONTENT-TYPE" in OpenLayers.Util.upperCaseObject(config.headers))) {
-            config.headers["Content-Type"] = "application/xml";
-        }
-        return OpenLayers.Request.issue(config);
-    },
-    
-    /**
-     * APIMethod: PUT
-     * Send an HTTP PUT request.  Additional configuration properties are
-     *     documented in the <issue> method, with the method property set
-     *     to PUT and "Content-Type" header set to "application/xml".
-     *
-     * Parameters:
-     * config - {Object} Object with properties for configuring the request.
-     *     See the <issue> method for documentation of allowed properties.  The
-     *     default "Content-Type" header will be set to "application-xml" if
-     *     none is provided.  This object is modified and should not be reused.
-     * 
-     * Returns:
-     * {XMLHttpRequest} Request object.
-     */
-    PUT: function(config) {
-        config = OpenLayers.Util.extend(config, {method: "PUT"});
-        // set content type to application/xml if it isn't already set
-        config.headers = config.headers ? config.headers : {};
-        if(!("CONTENT-TYPE" in OpenLayers.Util.upperCaseObject(config.headers))) {
-            config.headers["Content-Type"] = "application/xml";
-        }
-        return OpenLayers.Request.issue(config);
-    },
-    
-    /**
-     * APIMethod: DELETE
-     * Send an HTTP DELETE request.  Additional configuration properties are
-     *     documented in the <issue> method, with the method property set
-     *     to DELETE.
-     *
-     * Parameters:
-     * config - {Object} Object with properties for configuring the request.
-     *     See the <issue> method for documentation of allowed properties.
-     *     This object is modified and should not be reused.
-     * 
-     * Returns:
-     * {XMLHttpRequest} Request object.
-     */
-    DELETE: function(config) {
-        config = OpenLayers.Util.extend(config, {method: "DELETE"});
-        return OpenLayers.Request.issue(config);
-    },
-  
-    /**
-     * APIMethod: HEAD
-     * Send an HTTP HEAD request.  Additional configuration properties are
-     *     documented in the <issue> method, with the method property set
-     *     to HEAD.
-     *
-     * Parameters:
-     * config - {Object} Object with properties for configuring the request.
-     *     See the <issue> method for documentation of allowed properties.
-     *     This object is modified and should not be reused.
-     * 
-     * Returns:
-     * {XMLHttpRequest} Request object.
-     */
-    HEAD: function(config) {
-        config = OpenLayers.Util.extend(config, {method: "HEAD"});
-        return OpenLayers.Request.issue(config);
-    },
-    
-    /**
-     * APIMethod: OPTIONS
-     * Send an HTTP OPTIONS request.  Additional configuration properties are
-     *     documented in the <issue> method, with the method property set
-     *     to OPTIONS.
-     *
-     * Parameters:
-     * config - {Object} Object with properties for configuring the request.
-     *     See the <issue> method for documentation of allowed properties.
-     *     This object is modified and should not be reused.
-     * 
-     * Returns:
-     * {XMLHttpRequest} Request object.
-     */
-    OPTIONS: function(config) {
-        config = OpenLayers.Util.extend(config, {method: "OPTIONS"});
-        return OpenLayers.Request.issue(config);
-    }
-
-};
-

--- a/labs/openlayers/lib/OpenLayers/Request/XMLHttpRequest.js
+++ /dev/null
@@ -1,384 +1,1 @@
-// XMLHttpRequest.js Copyright (C) 2010 Sergey Ilinsky (http://www.ilinsky.com)
-//
-// 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.
 
-/**
- * @requires OpenLayers/Request.js
- */
-
-(function () {
-
-    // Save reference to earlier defined object implementation (if any)
-    var oXMLHttpRequest    = window.XMLHttpRequest;
-
-    // Define on browser type
-    var bGecko    = !!window.controllers,
-        bIE        = window.document.all && !window.opera,
-        bIE7    = bIE && window.navigator.userAgent.match(/MSIE ([\.0-9]+)/) && RegExp.$1 == 7;
-
-    // Constructor
-    function cXMLHttpRequest() {
-        this._object    = oXMLHttpRequest && !bIE7 ? new oXMLHttpRequest : new window.ActiveXObject("Microsoft.XMLHTTP");
-        this._listeners    = [];
-    };
-
-    // BUGFIX: Firefox with Firebug installed would break pages if not executed
-    if (bGecko && oXMLHttpRequest.wrapped)
-        cXMLHttpRequest.wrapped    = oXMLHttpRequest.wrapped;
-
-    // Constants
-    cXMLHttpRequest.UNSENT                = 0;
-    cXMLHttpRequest.OPENED                = 1;
-    cXMLHttpRequest.HEADERS_RECEIVED    = 2;
-    cXMLHttpRequest.LOADING                = 3;
-    cXMLHttpRequest.DONE                = 4;
-
-    // Public Properties
-    cXMLHttpRequest.prototype.readyState    = cXMLHttpRequest.UNSENT;
-    cXMLHttpRequest.prototype.responseText    = '';
-    cXMLHttpRequest.prototype.responseXML    = null;
-    cXMLHttpRequest.prototype.status        = 0;
-    cXMLHttpRequest.prototype.statusText    = '';
-
-    // Instance-level Events Handlers
-    cXMLHttpRequest.prototype.onreadystatechange    = null;
-
-    // Class-level Events Handlers
-    cXMLHttpRequest.onreadystatechange    = null;
-    cXMLHttpRequest.onopen                = null;
-    cXMLHttpRequest.onsend                = null;
-    cXMLHttpRequest.onabort                = null;
-
-    // Public Methods
-    cXMLHttpRequest.prototype.open    = function(sMethod, sUrl, bAsync, sUser, sPassword) {
-        // Delete headers, required when object is reused
-        delete this._headers;
-
-        // When bAsync parameter value is omitted, use true as default
-        if (arguments.length < 3)
-            bAsync    = true;
-
-        // Save async parameter for fixing Gecko bug with missing readystatechange in synchronous requests
-        this._async        = bAsync;
-
-        // Set the onreadystatechange handler
-        var oRequest    = this,
-            nState        = this.readyState,
-            fOnUnload;
-
-        // BUGFIX: IE - memory leak on page unload (inter-page leak)
-        if (bIE && bAsync) {
-            fOnUnload = function() {
-                if (nState != cXMLHttpRequest.DONE) {
-                    fCleanTransport(oRequest);
-                    // Safe to abort here since onreadystatechange handler removed
-                    oRequest.abort();
-                }
-            };
-                window.attachEvent("onunload", fOnUnload);
-        }
-
-        // Add method sniffer
-        if (cXMLHttpRequest.onopen)
-            cXMLHttpRequest.onopen.apply(this, arguments);
-
-        if (arguments.length > 4)
-            this._object.open(sMethod, sUrl, bAsync, sUser, sPassword);
-        else
-        if (arguments.length > 3)
-            this._object.open(sMethod, sUrl, bAsync, sUser);
-        else
-            this._object.open(sMethod, sUrl, bAsync);
-
-        if (!bGecko && !bIE) {
-            this.readyState    = cXMLHttpRequest.OPENED;
-            fReadyStateChange(this);
-        }
-
-        this._object.onreadystatechange    = function() {
-            if (bGecko && !bAsync)
-                return;
-
-            // Synchronize state
-            oRequest.readyState        = oRequest._object.readyState;
-
-            //
-            fSynchronizeValues(oRequest);
-
-            // BUGFIX: Firefox fires unnecessary DONE when aborting
-            if (oRequest._aborted) {
-                // Reset readyState to UNSENT
-                oRequest.readyState    = cXMLHttpRequest.UNSENT;
-
-                // Return now
-                return;
-            }
-
-            if (oRequest.readyState == cXMLHttpRequest.DONE) {
-                //
-                fCleanTransport(oRequest);
-// Uncomment this block if you need a fix for IE cache
-/*
-                // BUGFIX: IE - cache issue
-                if (!oRequest._object.getResponseHeader("Date")) {
-                    // Save object to cache
-                    oRequest._cached    = oRequest._object;
-
-                    // Instantiate a new transport object
-                    cXMLHttpRequest.call(oRequest);
-
-                    // Re-send request
-                    if (sUser) {
-                         if (sPassword)
-                    oRequest._object.open(sMethod, sUrl, bAsync, sUser, sPassword);
-                        else
-                            oRequest._object.open(sMethod, sUrl, bAsync, sUser);
-                    }
-                    else
-                        oRequest._object.open(sMethod, sUrl, bAsync);
-                    oRequest._object.setRequestHeader("If-Modified-Since", oRequest._cached.getResponseHeader("Last-Modified") || new window.Date(0));
-                    // Copy headers set
-                    if (oRequest._headers)
-                        for (var sHeader in oRequest._headers)
-                            if (typeof oRequest._headers[sHeader] == "string")    // Some frameworks prototype objects with functions
-                                oRequest._object.setRequestHeader(sHeader, oRequest._headers[sHeader]);
-
-                    oRequest._object.onreadystatechange    = function() {
-                        // Synchronize state
-                        oRequest.readyState        = oRequest._object.readyState;
-
-                        if (oRequest._aborted) {
-                            //
-                            oRequest.readyState    = cXMLHttpRequest.UNSENT;
-
-                            // Return
-                            return;
-                        }
-
-                        if (oRequest.readyState == cXMLHttpRequest.DONE) {
-                            // Clean Object
-                            fCleanTransport(oRequest);
-
-                            // get cached request
-                            if (oRequest.status == 304)
-                                oRequest._object    = oRequest._cached;
-
-                            //
-                            delete oRequest._cached;
-
-                            //
-                            fSynchronizeValues(oRequest);
-
-                            //
-                            fReadyStateChange(oRequest);
-
-                            // BUGFIX: IE - memory leak in interrupted
-                            if (bIE && bAsync)
-                                window.detachEvent("onunload", fOnUnload);
-                        }
-                    };
-                    oRequest._object.send(null);
-
-                    // Return now - wait until re-sent request is finished
-                    return;
-                };
-*/
-                // BUGFIX: IE - memory leak in interrupted
-                if (bIE && bAsync)
-                    window.detachEvent("onunload", fOnUnload);
-            }
-
-            // BUGFIX: Some browsers (Internet Explorer, Gecko) fire OPEN readystate twice
-            if (nState != oRequest.readyState)
-                fReadyStateChange(oRequest);
-
-            nState    = oRequest.readyState;
-        }
-    };
-    cXMLHttpRequest.prototype.send    = function(vData) {
-        // Add method sniffer
-        if (cXMLHttpRequest.onsend)
-            cXMLHttpRequest.onsend.apply(this, arguments);
-
-        // BUGFIX: Safari - fails sending documents created/modified dynamically, so an explicit serialization required
-        // BUGFIX: IE - rewrites any custom mime-type to "text/xml" in case an XMLNode is sent
-        // BUGFIX: Gecko - fails sending Element (this is up to the implementation either to standard)
-        if (vData && vData.nodeType) {
-            vData    = window.XMLSerializer ? new window.XMLSerializer().serializeToString(vData) : vData.xml;
-            if (!this._headers["Content-Type"])
-                this._object.setRequestHeader("Content-Type", "application/xml");
-        }
-
-        this._object.send(vData);
-
-        // BUGFIX: Gecko - missing readystatechange calls in synchronous requests
-        if (bGecko && !this._async) {
-            this.readyState    = cXMLHttpRequest.OPENED;
-
-            // Synchronize state
-            fSynchronizeValues(this);
-
-            // Simulate missing states
-            while (this.readyState < cXMLHttpRequest.DONE) {
-                this.readyState++;
-                fReadyStateChange(this);
-                // Check if we are aborted
-                if (this._aborted)
-                    return;
-            }
-        }
-    };
-    cXMLHttpRequest.prototype.abort    = function() {
-        // Add method sniffer
-        if (cXMLHttpRequest.onabort)
-            cXMLHttpRequest.onabort.apply(this, arguments);
-
-        // BUGFIX: Gecko - unnecessary DONE when aborting
-        if (this.readyState > cXMLHttpRequest.UNSENT)
-            this._aborted    = true;
-
-        this._object.abort();
-
-        // BUGFIX: IE - memory leak
-        fCleanTransport(this);
-    };
-    cXMLHttpRequest.prototype.getAllResponseHeaders    = function() {
-        return this._object.getAllResponseHeaders();
-    };
-    cXMLHttpRequest.prototype.getResponseHeader    = function(sName) {
-        return this._object.getResponseHeader(sName);
-    };
-    cXMLHttpRequest.prototype.setRequestHeader    = function(sName, sValue) {
-        // BUGFIX: IE - cache issue
-        if (!this._headers)
-            this._headers    = {};
-        this._headers[sName]    = sValue;
-
-        return this._object.setRequestHeader(sName, sValue);
-    };
-
-    // EventTarget interface implementation
-    cXMLHttpRequest.prototype.addEventListener    = function(sName, fHandler, bUseCapture) {
-        for (var nIndex = 0, oListener; oListener = this._listeners[nIndex]; nIndex++)
-            if (oListener[0] == sName && oListener[1] == fHandler && oListener[2] == bUseCapture)
-                return;
-        // Add listener
-        this._listeners.push([sName, fHandler, bUseCapture]);
-    };
-
-    cXMLHttpRequest.prototype.removeEventListener    = function(sName, fHandler, bUseCapture) {
-        for (var nIndex = 0, oListener; oListener = this._listeners[nIndex]; nIndex++)
-            if (oListener[0] == sName && oListener[1] == fHandler && oListener[2] == bUseCapture)
-                break;
-        // Remove listener
-        if (oListener)
-            this._listeners.splice(nIndex, 1);
-    };
-
-    cXMLHttpRequest.prototype.dispatchEvent    = function(oEvent) {
-        var oEventPseudo    = {
-            'type':            oEvent.type,
-            'target':        this,
-            'currentTarget':this,
-            'eventPhase':    2,
-            'bubbles':        oEvent.bubbles,
-            'cancelable':    oEvent.cancelable,
-            'timeStamp':    oEvent.timeStamp,
-            'stopPropagation':    function() {},    // There is no flow
-            'preventDefault':    function() {},    // There is no default action
-            'initEvent':        function() {}    // Original event object should be initialized
-        };
-
-        // Execute onreadystatechange
-        if (oEventPseudo.type == "readystatechange" && this.onreadystatechange)
-            (this.onreadystatechange.handleEvent || this.onreadystatechange).apply(this, [oEventPseudo]);
-
-        // Execute listeners
-        for (var nIndex = 0, oListener; oListener = this._listeners[nIndex]; nIndex++)
-            if (oListener[0] == oEventPseudo.type && !oListener[2])
-                (oListener[1].handleEvent || oListener[1]).apply(this, [oEventPseudo]);
-    };
-
-    //
-    cXMLHttpRequest.prototype.toString    = function() {
-        return '[' + "object" + ' ' + "XMLHttpRequest" + ']';
-    };
-
-    cXMLHttpRequest.toString    = function() {
-        return '[' + "XMLHttpRequest" + ']';
-    };
-
-    // Helper function
-    function fReadyStateChange(oRequest) {
-        // Sniffing code
-        if (cXMLHttpRequest.onreadystatechange)
-            cXMLHttpRequest.onreadystatechange.apply(oRequest);
-
-        // Fake event
-        oRequest.dispatchEvent({
-            'type':            "readystatechange",
-            'bubbles':        false,
-            'cancelable':    false,
-            'timeStamp':    new Date + 0
-        });
-    };
-
-    function fGetDocument(oRequest) {
-        var oDocument    = oRequest.responseXML,
-            sResponse    = oRequest.responseText;
-        // Try parsing responseText
-        if (bIE && sResponse && oDocument && !oDocument.documentElement && oRequest.getResponseHeader("Content-Type").match(/[^\/]+\/[^\+]+\+xml/)) {
-            oDocument    = new window.ActiveXObject("Microsoft.XMLDOM");
-            oDocument.async                = false;
-            oDocument.validateOnParse    = false;
-            oDocument.loadXML(sResponse);
-        }
-        // Check if there is no error in document
-        if (oDocument)
-            if ((bIE && oDocument.parseError != 0) || !oDocument.documentElement || (oDocument.documentElement && oDocument.documentElement.tagName == "parsererror"))
-                return null;
-        return oDocument;
-    };
-
-    function fSynchronizeValues(oRequest) {
-        try {    oRequest.responseText    = oRequest._object.responseText;    } catch (e) {}
-        try {    oRequest.responseXML    = fGetDocument(oRequest._object);    } catch (e) {}
-        try {    oRequest.status            = oRequest._object.status;            } catch (e) {}
-        try {    oRequest.statusText        = oRequest._object.statusText;        } catch (e) {}
-    };
-
-    function fCleanTransport(oRequest) {
-        // BUGFIX: IE - memory leak (on-page leak)
-        oRequest._object.onreadystatechange    = new window.Function;
-    };
-
-    // Internet Explorer 5.0 (missing apply)
-    if (!window.Function.prototype.apply) {
-        window.Function.prototype.apply    = function(oRequest, oArguments) {
-            if (!oArguments)
-                oArguments    = [];
-            oRequest.__func    = this;
-            oRequest.__func(oArguments[0], oArguments[1], oArguments[2], oArguments[3], oArguments[4]);
-            delete oRequest.__func;
-        };
-    };
-
-    // Register new object with window
-    /**
-     * Class: OpenLayers.Request.XMLHttpRequest
-     * Standard-compliant (W3C) cross-browser implementation of the
-     *     XMLHttpRequest object.  From
-     *     http://code.google.com/p/xmlhttprequest/.
-     */
-    OpenLayers.Request.XMLHttpRequest = cXMLHttpRequest;
-})();

--- a/labs/openlayers/lib/OpenLayers/Rule.js
+++ /dev/null
@@ -1,240 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Util.js
- * @requires OpenLayers/Style.js
- * @requires OpenLayers/Symbolizer/Point.js
- * @requires OpenLayers/Symbolizer/Line.js
- * @requires OpenLayers/Symbolizer/Polygon.js
- * @requires OpenLayers/Symbolizer/Text.js
- * @requires OpenLayers/Symbolizer/Raster.js
- */
-
-/**
- * Class: OpenLayers.Rule
- * This class represents an SLD Rule, as being used for rule-based SLD styling.
- */
-OpenLayers.Rule = OpenLayers.Class({
-    
-    /**
-     * Property: id
-     * {String} A unique id for this session.
-     */
-    id: null,
-    
-    /**
-     * APIProperty: name
-     * {String} name of this rule
-     */
-    name: null,
-    
-    /**
-     * Property: title
-     * {String} Title of this rule (set if included in SLD)
-     */
-    title: null,
-    
-    /**
-     * Property: description
-     * {String} Description of this rule (set if abstract is included in SLD)
-     */
-    description: null,
-
-    /**
-     * Property: context
-     * {Object} An optional object with properties that the rule should be
-     * evaluated against. If no context is specified, feature.attributes will
-     * be used.
-     */
-    context: null,
-    
-    /**
-     * Property: filter
-     * {<OpenLayers.Filter>} Optional filter for the rule.
-     */
-    filter: null,
-
-    /**
-     * Property: elseFilter
-     * {Boolean} Determines whether this rule is only to be applied only if
-     * no other rules match (ElseFilter according to the SLD specification). 
-     * Default is false.  For instances of OpenLayers.Rule, if elseFilter is
-     * false, the rule will always apply.  For subclasses, the else property is 
-     * ignored.
-     */
-    elseFilter: false,
-    
-    /**
-     * Property: symbolizer
-     * {Object} Symbolizer or hash of symbolizers for this rule. If hash of
-     * symbolizers, keys are one or more of ["Point", "Line", "Polygon"]. The
-     * latter if useful if it is required to style e.g. vertices of a line
-     * with a point symbolizer. Note, however, that this is not implemented
-     * yet in OpenLayers, but it is the way how symbolizers are defined in
-     * SLD.
-     */
-    symbolizer: null,
-    
-    /**
-     * Property: symbolizers
-     * {Array} Collection of symbolizers associated with this rule.  If 
-     *     provided at construction, the symbolizers array has precedence
-     *     over the deprecated symbolizer property.  Note that multiple 
-     *     symbolizers are not currently supported by the vector renderers.
-     *     Rules with multiple symbolizers are currently only useful for
-     *     maintaining elements in an SLD document.
-     */
-    symbolizers: null,
-    
-    /**
-     * APIProperty: minScaleDenominator
-     * {Number} or {String} minimum scale at which to draw the feature.
-     * In the case of a String, this can be a combination of text and
-     * propertyNames in the form "literal ${propertyName}"
-     */
-    minScaleDenominator: null,
-
-    /**
-     * APIProperty: maxScaleDenominator
-     * {Number} or {String} maximum scale at which to draw the feature.
-     * In the case of a String, this can be a combination of text and
-     * propertyNames in the form "literal ${propertyName}"
-     */
-    maxScaleDenominator: null,
-    
-    /** 
-     * Constructor: OpenLayers.Rule
-     * Creates a Rule.
-     *
-     * Parameters:
-     * options - {Object} An optional object with properties to set on the
-     *           rule
-     * 
-     * Returns:
-     * {<OpenLayers.Rule>}
-     */
-    initialize: function(options) {
-        this.symbolizer = {};
-        OpenLayers.Util.extend(this, options);
-        if (this.symbolizers) {
-            delete this.symbolizer;
-        }
-        this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
-    },
-
-    /** 
-     * APIMethod: destroy
-     * nullify references to prevent circular references and memory leaks
-     */
-    destroy: function() {
-        for (var i in this.symbolizer) {
-            this.symbolizer[i] = null;
-        }
-        this.symbolizer = null;
-        delete this.symbolizers;
-    },
-    
-    /**
-     * APIMethod: evaluate
-     * evaluates this rule for a specific feature
-     * 
-     * Parameters:
-     * feature - {<OpenLayers.Feature>} feature to apply the rule to.
-     * 
-     * Returns:
-     * {Boolean} true if the rule applies, false if it does not.
-     * This rule is the default rule and always returns true.
-     */
-    evaluate: function(feature) {
-        var context = this.getContext(feature);
-        var applies = true;
-
-        if (this.minScaleDenominator || this.maxScaleDenominator) {
-            var scale = feature.layer.map.getScale();
-        }
-        
-        // check if within minScale/maxScale bounds
-        if (this.minScaleDenominator) {
-            applies = scale >= OpenLayers.Style.createLiteral(
-                    this.minScaleDenominator, context);
-        }
-        if (applies && this.maxScaleDenominator) {
-            applies = scale < OpenLayers.Style.createLiteral(
-                    this.maxScaleDenominator, context);
-        }
-        
-        // check if optional filter applies
-        if(applies && this.filter) {
-            // feature id filters get the feature, others get the context
-            if(this.filter.CLASS_NAME == "OpenLayers.Filter.FeatureId") {
-                applies = this.filter.evaluate(feature);
-            } else {
-                applies = this.filter.evaluate(context);
-            }
-        }
-
-        return applies;
-    },
-    
-    /**
-     * Method: getContext
-     * Gets the context for evaluating this rule
-     * 
-     * Paramters:
-     * feature - {<OpenLayers.Feature>} feature to take the context from if
-     *           none is specified.
-     */
-    getContext: function(feature) {
-        var context = this.context;
-        if (!context) {
-            context = feature.attributes || feature.data;
-        }
-        if (typeof this.context == "function") {
-            context = this.context(feature);
-        }
-        return context;
-    },
-    
-    /**
-     * APIMethod: clone
-     * Clones this rule.
-     * 
-     * Returns:
-     * {<OpenLayers.Rule>} Clone of this rule.
-     */
-    clone: function() {
-        var options = OpenLayers.Util.extend({}, this);
-        if (this.symbolizers) {
-            // clone symbolizers
-            var len = this.symbolizers.length;
-            options.symbolizers = new Array(len);
-            for (var i=0; i<len; ++i) {
-                options.symbolizers[i] = this.symbolizers[i].clone();
-            }
-        } else {
-            // clone symbolizer
-            options.symbolizer = {};
-            var value, type;
-            for(var key in this.symbolizer) {
-                value = this.symbolizer[key];
-                type = typeof value;
-                if(type === "object") {
-                    options.symbolizer[key] = OpenLayers.Util.extend({}, value);
-                } else if(type === "string") {
-                    options.symbolizer[key] = value;
-                }
-            }
-        }
-        // clone filter
-        options.filter = this.filter && this.filter.clone();
-        // clone context
-        options.context = this.context && OpenLayers.Util.extend({}, this.context);
-        return new OpenLayers.Rule(options);
-    },
-        
-    CLASS_NAME: "OpenLayers.Rule"
-});

--- a/labs/openlayers/lib/OpenLayers/SingleFile.js
+++ /dev/null
@@ -1,11 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-var OpenLayers = {
-    singleFile: true
-};
-
-
-

--- a/labs/openlayers/lib/OpenLayers/Strategy.js
+++ /dev/null
@@ -1,118 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * Class: OpenLayers.Strategy
- * Abstract vector layer strategy class.  Not to be instantiated directly.  Use
- *     one of the strategy subclasses instead.
- */
-OpenLayers.Strategy = OpenLayers.Class({
-    
-    /**
-     * Property: layer
-     * {<OpenLayers.Layer.Vector>} The layer this strategy belongs to.
-     */
-    layer: null,
-    
-    /**
-     * Property: options
-     * {Object} Any options sent to the constructor.
-     */
-    options: null,
-
-    /** 
-     * Property: active 
-     * {Boolean} The control is active.
-     */
-    active: null,
-
-    /**
-     * Property: autoActivate
-     * {Boolean} The creator of the strategy can set autoActivate to false
-     *      to fully control when the protocol is activated and deactivated.
-     *      Defaults to true.
-     */
-    autoActivate: true,
-
-    /**
-     * Property: autoDestroy
-     * {Boolean} The creator of the strategy can set autoDestroy to false
-     *      to fully control when the strategy is destroyed. Defaults to
-     *      true.
-     */
-    autoDestroy: true,
-
-    /**
-     * Constructor: OpenLayers.Strategy
-     * Abstract class for vector strategies.  Create instances of a subclass.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Util.extend(this, options);
-        this.options = options;
-        // set the active property here, so that user cannot override it
-        this.active = false;
-    },
-    
-    /**
-     * APIMethod: destroy
-     * Clean up the strategy.
-     */
-    destroy: function() {
-        this.deactivate();
-        this.layer = null;
-        this.options = null;
-    },
-
-    /**
-     * Method: setLayer
-     * Called to set the <layer> property.
-     *
-     * Parameters:
-     * {<OpenLayers.Layer.Vector>}
-     */
-    setLayer: function(layer) {
-        this.layer = layer;
-    },
-    
-    /**
-     * Method: activate
-     * Activate the strategy.  Register any listeners, do appropriate setup.
-     *
-     * Returns:
-     * {Boolean} True if the strategy was successfully activated or false if
-     *      the strategy was already active.
-     */
-    activate: function() {
-        if (!this.active) {
-            this.active = true;
-            return true;
-        }
-        return false;
-    },
-    
-    /**
-     * Method: deactivate
-     * Deactivate the strategy.  Unregister any listeners, do appropriate
-     *     tear-down.
-     *
-     * Returns:
-     * {Boolean} True if the strategy was successfully deactivated or false if
-     *      the strategy was already inactive.
-     */
-    deactivate: function() {
-        if (this.active) {
-            this.active = false;
-            return true;
-        }
-        return false;
-    },
-   
-    CLASS_NAME: "OpenLayers.Strategy" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Strategy/BBOX.js
+++ /dev/null
@@ -1,279 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Strategy.js
- * @requires OpenLayers/Filter/Spatial.js
- */
-
-/**
- * Class: OpenLayers.Strategy.BBOX
- * A simple strategy that reads new features when the viewport invalidates
- *     some bounds.
- *
- * Inherits from:
- *  - <OpenLayers.Strategy>
- */
-OpenLayers.Strategy.BBOX = OpenLayers.Class(OpenLayers.Strategy, {
-    
-    /**
-     * Property: bounds
-     * {<OpenLayers.Bounds>} The current data bounds (in the same projection
-     *     as the layer - not always the same projection as the map).
-     */
-    bounds: null,
-    
-    /** 
-     * Property: resolution 
-     * {Float} The current data resolution. 
-     */ 
-    resolution: null, 
-           
-    /**
-     * APIProperty: ratio
-     * {Float} The ratio of the data bounds to the viewport bounds (in each
-     *     dimension).  Default is 2.
-     */
-    ratio: 2,
-
-    /** 
-     * Property: resFactor 
-     * {Float} Optional factor used to determine when previously requested 
-     *     features are invalid.  If set, the resFactor will be compared to the
-     *     resolution of the previous request to the current map resolution.
-     *     If resFactor > (old / new) and 1/resFactor < (old / new).  If you
-     *     set a resFactor of 1, data will be requested every time the
-     *     resolution changes.  If you set a resFactor of 3, data will be
-     *     requested if the old resolution is 3 times the new, or if the new is
-     *     3 times the old.  If the old bounds do not contain the new bounds
-     *     new data will always be requested (with or without considering
-     *     resFactor). 
-     */ 
-    resFactor: null, 
-    
-    /**
-     * Property: response
-     * {<OpenLayers.Protocol.Response>} The protocol response object returned
-     *      by the layer protocol.
-     */
-    response: null,
-
-    /**
-     * Constructor: OpenLayers.Strategy.BBOX
-     * Create a new BBOX strategy.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Strategy.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * Method: activate
-     * Set up strategy with regard to reading new batches of remote data.
-     * 
-     * Returns:
-     * {Boolean} The strategy was successfully activated.
-     */
-    activate: function() {
-        var activated = OpenLayers.Strategy.prototype.activate.call(this);
-        if(activated) {
-            this.layer.events.on({
-                "moveend": this.update,
-                scope: this
-            });
-            this.layer.events.on({
-                "refresh": this.update,
-                scope: this
-            });
-        }
-        return activated;
-    },
-    
-    /**
-     * Method: deactivate
-     * Tear down strategy with regard to reading new batches of remote data.
-     * 
-     * Returns:
-     * {Boolean} The strategy was successfully deactivated.
-     */
-    deactivate: function() {
-        var deactivated = OpenLayers.Strategy.prototype.deactivate.call(this);
-        if(deactivated) {
-            this.layer.events.un({
-                "moveend": this.update,
-                scope: this
-            });
-            this.layer.events.un({
-                "refresh": this.update,
-                scope: this
-            });
-        }
-        return deactivated;
-    },
-
-    /**
-     * Method: update
-     * Callback function called on "moveend" or "refresh" layer events.
-     *
-     * Parameters:
-     * options - {Object} An object with a property named "force", this
-     *      property references a boolean value indicating if new data
-     *      must be incondtionally read.
-     */
-    update: function(options) {
-        var mapBounds = this.getMapBounds();
-        if ((options && options.force) || this.invalidBounds(mapBounds)) {
-            this.calculateBounds(mapBounds);
-            this.resolution = this.layer.map.getResolution(); 
-            this.triggerRead();
-        }
-    },
-    
-    /**
-     * Method: getMapBounds
-     * Get the map bounds expressed in the same projection as this layer.
-     *
-     * Returns:
-     * {<OpenLayers.Bounds>} Map bounds in the projection of the layer.
-     */
-    getMapBounds: function() {
-        var bounds = this.layer.map.getExtent();
-        if(!this.layer.projection.equals(this.layer.map.getProjectionObject())) {
-            bounds = bounds.clone().transform(
-                this.layer.map.getProjectionObject(), this.layer.projection
-            );
-        }
-        return bounds;
-    },
-
-    /**
-     * Method: invalidBounds
-     * Determine whether the previously requested set of features is invalid. 
-     *     This occurs when the new map bounds do not contain the previously 
-     *     requested bounds.  In addition, if <resFactor> is set, it will be 
-     *     considered.
-     *
-     * Parameters:
-     * mapBounds - {<OpenLayers.Bounds>} the current map extent, will be
-     *      retrieved from the map object if not provided
-     *
-     * Returns:
-     * {Boolean} 
-     */
-    invalidBounds: function(mapBounds) {
-        if(!mapBounds) {
-            mapBounds = this.getMapBounds();
-        }
-        var invalid = !this.bounds || !this.bounds.containsBounds(mapBounds);
-        if(!invalid && this.resFactor) {
-            var ratio = this.resolution / this.layer.map.getResolution();
-            invalid = (ratio >= this.resFactor || ratio <= (1 / this.resFactor));
-        }
-        return invalid;
-    },
- 
-    /**
-     * Method: calculateBounds
-     *
-     * Parameters:
-     * mapBounds - {<OpenLayers.Bounds>} the current map extent, will be
-     *      retrieved from the map object if not provided
-     */
-    calculateBounds: function(mapBounds) {
-        if(!mapBounds) {
-            mapBounds = this.getMapBounds();
-        }
-        var center = mapBounds.getCenterLonLat();
-        var dataWidth = mapBounds.getWidth() * this.ratio;
-        var dataHeight = mapBounds.getHeight() * this.ratio;
-        this.bounds = new OpenLayers.Bounds(
-            center.lon - (dataWidth / 2),
-            center.lat - (dataHeight / 2),
-            center.lon + (dataWidth / 2),
-            center.lat + (dataHeight / 2)
-        );
-    },
-    
-    /**
-     * Method: triggerRead
-     *
-     * Returns:
-     * {<OpenLayers.Protocol.Response>} The protocol response object
-     *      returned by the layer protocol.
-     */
-    triggerRead: function() {
-        if (this.response) {
-            this.layer.protocol.abort(this.response);
-            this.layer.events.triggerEvent("loadend");
-        }
-        this.layer.events.triggerEvent("loadstart");
-        this.response = this.layer.protocol.read({
-            filter: this.createFilter(),
-            callback: this.merge,
-            scope: this
-        });
-    },
- 
-    /**
-     * Method: createFilter
-     * Creates a spatial BBOX filter. If the layer that this strategy belongs
-     * to has a filter property, this filter will be combined with the BBOX 
-     * filter.
-     * 
-     * Returns
-     * {<OpenLayers.Filter>} The filter object.
-     */
-    createFilter: function() {
-        var filter = new OpenLayers.Filter.Spatial({
-            type: OpenLayers.Filter.Spatial.BBOX,
-            value: this.bounds,
-            projection: this.layer.projection
-        });
-        if (this.layer.filter) {
-            filter = new OpenLayers.Filter.Logical({
-                type: OpenLayers.Filter.Logical.AND,
-                filters: [this.layer.filter, filter]
-            });
-        }
-        return filter;
-    },
-   
-    /**
-     * Method: merge
-     * Given a list of features, determine which ones to add to the layer.
-     *     If the layer projection differs from the map projection, features
-     *     will be transformed from the layer projection to the map projection.
-     *
-     * Parameters:
-     * resp - {<OpenLayers.Protocol.Response>} The response object passed
-     *      by the protocol.
-     */
-    merge: function(resp) {
-        this.layer.destroyFeatures();
-        var features = resp.features;
-        if(features && features.length > 0) {
-            var remote = this.layer.projection;
-            var local = this.layer.map.getProjectionObject();
-            if(!local.equals(remote)) {
-                var geom;
-                for(var i=0, len=features.length; i<len; ++i) {
-                    geom = features[i].geometry;
-                    if(geom) {
-                        geom.transform(remote, local);
-                    }
-                }
-            }
-            this.layer.addFeatures(features);
-        }
-        this.response = null;
-        this.layer.events.triggerEvent("loadend");
-    },
-   
-    CLASS_NAME: "OpenLayers.Strategy.BBOX" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Strategy/Cluster.js
+++ /dev/null
@@ -1,281 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Strategy.js
- */
-
-/**
- * Class: OpenLayers.Strategy.Cluster
- * Strategy for vector feature clustering.
- *
- * Inherits from:
- *  - <OpenLayers.Strategy>
- */
-OpenLayers.Strategy.Cluster = OpenLayers.Class(OpenLayers.Strategy, {
-    
-    /**
-     * APIProperty: distance
-     * {Integer} Pixel distance between features that should be considered a
-     *     single cluster.  Default is 20 pixels.
-     */
-    distance: 20,
-    
-    /**
-     * APIProperty: threshold
-     * {Integer} Optional threshold below which original features will be
-     *     added to the layer instead of clusters.  For example, a threshold
-     *     of 3 would mean that any time there are 2 or fewer features in
-     *     a cluster, those features will be added directly to the layer instead
-     *     of a cluster representing those features.  Default is null (which is
-     *     equivalent to 1 - meaning that clusters may contain just one feature).
-     */
-    threshold: null,
-    
-    /**
-     * Property: features
-     * {Array(<OpenLayers.Feature.Vector>)} Cached features.
-     */
-    features: null,
-    
-    /**
-     * Property: clusters
-     * {Array(<OpenLayers.Feature.Vector>)} Calculated clusters.
-     */
-    clusters: null,
-    
-    /**
-     * Property: clustering
-     * {Boolean} The strategy is currently clustering features.
-     */
-    clustering: false,
-    
-    /**
-     * Property: resolution
-     * {Float} The resolution (map units per pixel) of the current cluster set.
-     */
-    resolution: null,
-
-    /**
-     * Constructor: OpenLayers.Strategy.Cluster
-     * Create a new clustering strategy.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Strategy.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * APIMethod: activate
-     * Activate the strategy.  Register any listeners, do appropriate setup.
-     * 
-     * Returns:
-     * {Boolean} The strategy was successfully activated.
-     */
-    activate: function() {
-        var activated = OpenLayers.Strategy.prototype.activate.call(this);
-        if(activated) {
-            this.layer.events.on({
-                "beforefeaturesadded": this.cacheFeatures,
-                "moveend": this.cluster,
-                scope: this
-            });
-        }
-        return activated;
-    },
-    
-    /**
-     * APIMethod: deactivate
-     * Deactivate the strategy.  Unregister any listeners, do appropriate
-     *     tear-down.
-     * 
-     * Returns:
-     * {Boolean} The strategy was successfully deactivated.
-     */
-    deactivate: function() {
-        var deactivated = OpenLayers.Strategy.prototype.deactivate.call(this);
-        if(deactivated) {
-            this.clearCache();
-            this.layer.events.un({
-                "beforefeaturesadded": this.cacheFeatures,
-                "moveend": this.cluster,
-                scope: this
-            });
-        }
-        return deactivated;
-    },
-    
-    /**
-     * Method: cacheFeatures
-     * Cache features before they are added to the layer.
-     *
-     * Parameters:
-     * event - {Object} The event that this was listening for.  This will come
-     *     with a batch of features to be clustered.
-     *     
-     * Returns:
-     * {Boolean} False to stop features from being added to the layer.
-     */
-    cacheFeatures: function(event) {
-        var propagate = true;
-        if(!this.clustering) {
-            this.clearCache();
-            this.features = event.features;
-            this.cluster();
-            propagate = false;
-        }
-        return propagate;
-    },
-    
-    /**
-     * Method: clearCache
-     * Clear out the cached features.
-     */
-    clearCache: function() {
-        this.features = null;
-    },
-    
-    /**
-     * Method: cluster
-     * Cluster features based on some threshold distance.
-     *
-     * Parameters:
-     * event - {Object} The event received when cluster is called as a
-     *     result of a moveend event.
-     */
-    cluster: function(event) {
-        if((!event || event.zoomChanged) && this.features) {
-            var resolution = this.layer.map.getResolution();
-            if(resolution != this.resolution || !this.clustersExist()) {
-                this.resolution = resolution;
-                var clusters = [];
-                var feature, clustered, cluster;
-                for(var i=0; i<this.features.length; ++i) {
-                    feature = this.features[i];
-                    if(feature.geometry) {
-                        clustered = false;
-                        for(var j=clusters.length-1; j>=0; --j) {
-                            cluster = clusters[j];
-                            if(this.shouldCluster(cluster, feature)) {
-                                this.addToCluster(cluster, feature);
-                                clustered = true;
-                                break;
-                            }
-                        }
-                        if(!clustered) {
-                            clusters.push(this.createCluster(this.features[i]));
-                        }
-                    }
-                }
-                this.layer.removeAllFeatures();
-                if(clusters.length > 0) {
-                    if(this.threshold > 1) {
-                        var clone = clusters.slice();
-                        clusters = [];
-                        var candidate;
-                        for(var i=0, len=clone.length; i<len; ++i) {
-                            candidate = clone[i];
-                            if(candidate.attributes.count < this.threshold) {
-                                Array.prototype.push.apply(clusters, candidate.cluster);
-                            } else {
-                                clusters.push(candidate);
-                            }
-                        }
-                    }
-                    this.clustering = true;
-                    // A legitimate feature addition could occur during this
-                    // addFeatures call.  For clustering to behave well, features
-                    // should be removed from a layer before requesting a new batch.
-                    this.layer.addFeatures(clusters);
-                    this.clustering = false;
-                }
-                this.clusters = clusters;
-            }
-        }
-    },
-    
-    /**
-     * Method: clustersExist
-     * Determine whether calculated clusters are already on the layer.
-     *
-     * Returns:
-     * {Boolean} The calculated clusters are already on the layer.
-     */
-    clustersExist: function() {
-        var exist = false;
-        if(this.clusters && this.clusters.length > 0 &&
-           this.clusters.length == this.layer.features.length) {
-            exist = true;
-            for(var i=0; i<this.clusters.length; ++i) {
-                if(this.clusters[i] != this.layer.features[i]) {
-                    exist = false;
-                    break;
-                }
-            }
-        }
-        return exist;
-    },
-    
-    /**
-     * Method: shouldCluster
-     * Determine whether to include a feature in a given cluster.
-     *
-     * Parameters:
-     * cluster - {<OpenLayers.Feature.Vector>} A cluster.
-     * feature - {<OpenLayers.Feature.Vector>} A feature.
-     *
-     * Returns:
-     * {Boolean} The feature should be included in the cluster.
-     */
-    shouldCluster: function(cluster, feature) {
-        var cc = cluster.geometry.getBounds().getCenterLonLat();
-        var fc = feature.geometry.getBounds().getCenterLonLat();
-        var distance = (
-            Math.sqrt(
-                Math.pow((cc.lon - fc.lon), 2) + Math.pow((cc.lat - fc.lat), 2)
-            ) / this.resolution
-        );
-        return (distance <= this.distance);
-    },
-    
-    /**
-     * Method: addToCluster
-     * Add a feature to a cluster.
-     *
-     * Parameters:
-     * cluster - {<OpenLayers.Feature.Vector>} A cluster.
-     * feature - {<OpenLayers.Feature.Vector>} A feature.
-     */
-    addToCluster: function(cluster, feature) {
-        cluster.cluster.push(feature);
-        cluster.attributes.count += 1;
-    },
-    
-    /**
-     * Method: createCluster
-     * Given a feature, create a cluster.
-     *
-     * Parameters:
-     * feature - {<OpenLayers.Feature.Vector>}
-     *
-     * Returns:
-     * {<OpenLayers.Feature.Vector>} A cluster.
-     */
-    createCluster: function(feature) {
-        var center = feature.geometry.getBounds().getCenterLonLat();
-        var cluster = new OpenLayers.Feature.Vector(
-            new OpenLayers.Geometry.Point(center.lon, center.lat),
-            {count: 1}
-        );
-        cluster.cluster = [feature];
-        return cluster;
-    },
-
-    CLASS_NAME: "OpenLayers.Strategy.Cluster" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Strategy/Filter.js
+++ /dev/null
@@ -1,165 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Strategy.js
- * @requires OpenLayers/Filter.js
- */
-
-/**
- * Class: OpenLayers.Strategy.Filter
- * Strategy for limiting features that get added to a layer by 
- *     evaluating a filter.  The strategy maintains a cache of
- *     all features until removeFeatures is called on the layer.
- *
- * Inherits from:
- *  - <OpenLayers.Strategy>
- */
-OpenLayers.Strategy.Filter = OpenLayers.Class(OpenLayers.Strategy, {
-    
-    /**
-     * APIProperty: filter
-     * {<OpenLayers.Filter>}  Filter for limiting features sent to the layer.
-     *     Use the <setFilter> method to update this filter after construction.
-     */
-    filter: null,
-    
-    /**
-     * Property: cache
-     * {Array(<OpenLayers.Feature.Vector>)} List of currently cached
-     *     features.
-     */
-    cache: null,
-    
-    /**
-     * Property: caching
-     * {Boolean} The filter is currently caching features.
-     */
-    caching: false,
-    
-    /**
-     * Constructor: OpenLayers.Strategy.Filter
-     * Create a new filter strategy.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.  Strategy must be constructed with at least a <filter> 
-     *     property.
-     */
-    initialize: function(options) {
-        OpenLayers.Strategy.prototype.initialize.apply(this, [options]);
-        if (!this.filter || !(this.filter instanceof OpenLayers.Filter)) {
-            throw new Error("Filter strategy must be constructed with a filter");
-        }
-    },
-
-    /**
-     * APIMethod: activate
-     * Activate the strategy.  Register any listeners, do appropriate setup.
-     *     By default, this strategy automatically activates itself when a layer
-     *     is added to a map.
-     *
-     * Returns:
-     * {Boolean} True if the strategy was successfully activated or false if
-     *      the strategy was already active.
-     */
-    activate: function() {
-        var activated = OpenLayers.Strategy.prototype.activate.apply(this, arguments);
-        if (activated) {
-            this.cache = [];
-            this.layer.events.on({
-                "beforefeaturesadded": this.handleAdd,
-                "beforefeaturesremoved": this.handleRemove,
-                scope: this
-            });
-        }
-        return activated;
-    },
-    
-    /**
-     * APIMethod: deactivate
-     * Deactivate the strategy.  Clear the feature cache.
-     *
-     * Returns:
-     * {Boolean} True if the strategy was successfully deactivated or false if
-     *      the strategy was already inactive.
-     */
-    deactivate: function() {
-        this.cache = null;
-        if (this.layer && this.layer.events) {
-            this.layer.events.un({
-                "beforefeaturesadded": this.handleAdd,
-                "beforefeaturesremoved": this.handleRemove,
-                scope: this
-            });            
-        }
-        return OpenLayers.Strategy.prototype.deactivate.apply(this, arguments);
-    },
-    
-    /**
-     * Method: handleAdd
-     */
-    handleAdd: function(event) {
-        if (!this.caching) {
-            var features = event.features;
-            event.features = [];
-            var feature;
-            for (var i=0, ii=features.length; i<ii; ++i) {
-                feature = features[i];
-                if (this.filter.evaluate(feature)) {
-                    event.features.push(feature);
-                } else {
-                    this.cache.push(feature);
-                }
-            }
-        }
-    },
-    
-    /**
-     * Method: handleRemove
-     */
-    handleRemove: function(event) {
-        if (!this.caching) {
-            this.cache = [];
-        }
-    },
-
-    /** 
-     * APIMethod: setFilter
-     * Update the filter for this strategy.  This will re-evaluate
-     *     any features on the layer and in the cache.  Only features
-     *     for which filter.evalute(feature) returns true will be
-     *     added to the layer.  Others will be cached by the strategy.
-     *
-     * Parameters:
-     * filter - <OpenLayers.Filter> A filter for evaluating features.
-     */
-    setFilter: function(filter) {
-        this.filter = filter;
-        var previousCache = this.cache;
-        this.cache = [];
-        // look through layer for features to remove from layer
-        this.handleAdd({features: this.layer.features});
-        // cache now contains features to remove from layer
-        if (this.cache.length > 0) {
-            this.caching = true;
-            this.layer.removeFeatures(this.cache.slice(), {silent: true});
-            this.caching = false;
-        }
-        // now look through previous cache for features to add to layer
-        if (previousCache.length > 0) {
-            var event = {features: previousCache};
-            this.handleAdd(event);
-            // event has features to add to layer
-            this.caching = true;
-            this.layer.addFeatures(event.features, {silent: true});
-            this.caching = false;
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Strategy.Filter"
-
-});
-

--- a/labs/openlayers/lib/OpenLayers/Strategy/Fixed.js
+++ /dev/null
@@ -1,139 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Strategy.js
- */
-
-/**
- * Class: OpenLayers.Strategy.Fixed
- * A simple strategy that requests features once and never requests new data.
- *
- * Inherits from:
- *  - <OpenLayers.Strategy>
- */
-OpenLayers.Strategy.Fixed = OpenLayers.Class(OpenLayers.Strategy, {
-    
-    /**
-     * APIProperty: preload
-     * {Boolean} Load data before layer made visible. Enabling this may result
-     *   in considerable overhead if your application loads many data layers
-     *   that are not visible by default. Default is false.
-     */
-    preload: false,
-
-    /**
-     * Constructor: OpenLayers.Strategy.Fixed
-     * Create a new Fixed strategy.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Strategy.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * APIMethod: destroy
-     * Clean up the strategy.
-     */
-    destroy: function() {
-        OpenLayers.Strategy.prototype.destroy.apply(this, arguments);
-    },
-
-    /**
-     * Method: activate
-     * Activate the strategy: load data or add listener to load when visible
-     *
-     * Returns:
-     * {Boolean} True if the strategy was successfully activated or false if
-     *      the strategy was already active.
-     */
-    activate: function() {
-        if(OpenLayers.Strategy.prototype.activate.apply(this, arguments)) {
-            this.layer.events.on({
-                "refresh": this.load,
-                scope: this
-            });
-            if(this.layer.visibility == true || this.preload) {
-                this.load();
-            } else {
-                this.layer.events.on({
-                    "visibilitychanged": this.load,
-                    scope: this
-                });
-            }
-            return true;
-        }
-        return false;
-    },
-    
-    /**
-     * Method: deactivate
-     * Deactivate the strategy.  Undo what is done in <activate>.
-     * 
-     * Returns:
-     * {Boolean} The strategy was successfully deactivated.
-     */
-    deactivate: function() {
-        var deactivated = OpenLayers.Strategy.prototype.deactivate.call(this);
-        if(deactivated) {
-            this.layer.events.un({
-                "refresh": this.load,
-                "visibilitychanged": this.load,
-                scope: this
-            });
-        }
-        return deactivated;
-    },
-
-    /**
-     * Method: load
-     * Tells protocol to load data and unhooks the visibilitychanged event
-     *
-     * Parameters:
-     * options - {Object} options to pass to protocol read.
-     */
-    load: function(options) {
-        this.layer.events.triggerEvent("loadstart");
-        this.layer.protocol.read(OpenLayers.Util.applyDefaults({
-            callback: this.merge,
-            filter: this.layer.filter,
-            scope: this
-        }, options));
-        this.layer.events.un({
-            "visibilitychanged": this.load,
-            scope: this
-        });
-    },
-
-    /**
-     * Method: merge
-     * Add all features to the layer.
-     */
-    merge: function(resp) {
-        this.layer.destroyFeatures();
-        var features = resp.features;
-        if (features && features.length > 0) {
-            var remote = this.layer.projection;
-            var local = this.layer.map.getProjectionObject();
-            if(!local.equals(remote)) {
-                var geom;
-                for(var i=0, len=features.length; i<len; ++i) {
-                    geom = features[i].geometry;
-                    if(geom) {
-                        geom.transform(remote, local);
-                    }
-                }
-            }
-            this.layer.addFeatures(features);
-        }
-        this.layer.events.triggerEvent("loadend");
-    },
-
-    CLASS_NAME: "OpenLayers.Strategy.Fixed"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Strategy/Paging.js
+++ /dev/null
@@ -1,237 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Strategy.js
- */
-
-/**
- * Class: OpenLayers.Strategy.Paging
- * Strategy for vector feature paging
- *
- * Inherits from:
- *  - <OpenLayers.Strategy>
- */
-OpenLayers.Strategy.Paging = OpenLayers.Class(OpenLayers.Strategy, {
-    
-    /**
-     * Property: features
-     * {Array(<OpenLayers.Feature.Vector>)} Cached features.
-     */
-    features: null,
-    
-    /**
-     * Property: length
-     * {Integer} Number of features per page.  Default is 10.
-     */
-    length: 10,
-    
-    /**
-     * Property: num
-     * {Integer} The currently displayed page number.
-     */
-    num: null,
-    
-    /**
-     * Property: paging
-     * {Boolean} The strategy is currently changing pages.
-     */
-    paging: false,
-
-    /**
-     * Constructor: OpenLayers.Strategy.Paging
-     * Create a new paging strategy.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Strategy.prototype.initialize.apply(this, [options]);
-    },
-    
-    /**
-     * APIMethod: activate
-     * Activate the strategy.  Register any listeners, do appropriate setup.
-     * 
-     * Returns:
-     * {Boolean} The strategy was successfully activated.
-     */
-    activate: function() {
-        var activated = OpenLayers.Strategy.prototype.activate.call(this);
-        if(activated) {
-            this.layer.events.on({
-                "beforefeaturesadded": this.cacheFeatures,
-                scope: this
-            });
-        }
-        return activated;
-    },
-    
-    /**
-     * APIMethod: deactivate
-     * Deactivate the strategy.  Unregister any listeners, do appropriate
-     *     tear-down.
-     * 
-     * Returns:
-     * {Boolean} The strategy was successfully deactivated.
-     */
-    deactivate: function() {
-        var deactivated = OpenLayers.Strategy.prototype.deactivate.call(this);
-        if(deactivated) {
-            this.clearCache();
-            this.layer.events.un({
-                "beforefeaturesadded": this.cacheFeatures,
-                scope: this
-            });
-        }
-        return deactivated;
-    },
-    
-    /**
-     * Method: cacheFeatures
-     * Cache features before they are added to the layer.
-     *
-     * Parameters:
-     * event - {Object} The event that this was listening for.  This will come
-     *     with a batch of features to be paged.
-     */
-    cacheFeatures: function(event) {
-        if(!this.paging) {
-            this.clearCache();
-            this.features = event.features;
-            this.pageNext(event);
-        }
-    },
-    
-    /**
-     * Method: clearCache
-     * Clear out the cached features.  This destroys features, assuming
-     *     nothing else has a reference.
-     */
-    clearCache: function() {
-        if(this.features) {
-            for(var i=0; i<this.features.length; ++i) {
-                this.features[i].destroy();
-            }
-        }
-        this.features = null;
-        this.num = null;
-    },
-    
-    /**
-     * APIMethod: pageCount
-     * Get the total count of pages given the current cache of features.
-     *
-     * Returns:
-     * {Integer} The page count.
-     */
-    pageCount: function() {
-        var numFeatures = this.features ? this.features.length : 0;
-        return Math.ceil(numFeatures / this.length);
-    },
-
-    /**
-     * APIMethod: pageNum
-     * Get the zero based page number.
-     *
-     * Returns:
-     * {Integer} The current page number being displayed.
-     */
-    pageNum: function() {
-        return this.num;
-    },
-
-    /**
-     * APIMethod: pageLength
-     * Gets or sets page length.
-     *
-     * Parameters:
-     * newLength: {Integer} Optional length to be set.
-     *
-     * Returns:
-     * {Integer} The length of a page (number of features per page).
-     */
-    pageLength: function(newLength) {
-        if(newLength && newLength > 0) {
-            this.length = newLength;
-        }
-        return this.length;
-    },
-
-    /**
-     * APIMethod: pageNext
-     * Display the next page of features.
-     *
-     * Returns:
-     * {Boolean} A new page was displayed.
-     */
-    pageNext: function(event) {
-        var changed = false;
-        if(this.features) {
-            if(this.num === null) {
-                this.num = -1;
-            }
-            var start = (this.num + 1) * this.length;
-            changed = this.page(start, event);
-        }
-        return changed;
-    },
-
-    /**
-     * APIMethod: pagePrevious
-     * Display the previous page of features.
-     *
-     * Returns:
-     * {Boolean} A new page was displayed.
-     */
-    pagePrevious: function() {
-        var changed = false;
-        if(this.features) {
-            if(this.num === null) {
-                this.num = this.pageCount();
-            }
-            var start = (this.num - 1) * this.length;
-            changed = this.page(start);
-        }
-        return changed;
-    },
-    
-    /**
-     * Method: page
-     * Display the page starting at the given index from the cache.
-     *
-     * Returns:
-     * {Boolean} A new page was displayed.
-     */
-    page: function(start, event) {
-        var changed = false;
-        if(this.features) {
-            if(start >= 0 && start < this.features.length) {
-                var num = Math.floor(start / this.length);
-                if(num != this.num) {
-                    this.paging = true;
-                    var features = this.features.slice(start, start + this.length);
-                    this.layer.removeFeatures(this.layer.features);
-                    this.num = num;
-                    // modify the event if any
-                    if(event && event.features) {
-                        // this.was called by an event listener
-                        event.features = features;
-                    } else {
-                        // this was called directly on the strategy
-                        this.layer.addFeatures(features);
-                    }
-                    this.paging = false;
-                    changed = true;
-                }
-            }
-        }
-        return changed;
-    },
-    
-    CLASS_NAME: "OpenLayers.Strategy.Paging" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Strategy/Refresh.js
+++ /dev/null
@@ -1,141 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Strategy.js
- */
-
-/**
- * Class: OpenLayers.Strategy.Refresh
- * A strategy that refreshes the layer. By default the strategy waits for a
- *     call to <refresh> before refreshing.  By configuring the strategy with 
- *     the <interval> option, refreshing can take place automatically.
- *
- * Inherits from:
- *  - <OpenLayers.Strategy>
- */
-OpenLayers.Strategy.Refresh = OpenLayers.Class(OpenLayers.Strategy, {
-    
-    /**
-     * Property: force
-     * {Boolean} Force a refresh on the layer. Default is false.
-     */
-    force: false,
-
-    /**
-     * Property: interval
-     * {Number} Auto-refresh. Default is 0.  If > 0, layer will be refreshed 
-     *     every N milliseconds.
-     */
-    interval: 0,
-    
-    /**
-     * Property: timer
-     * {Number} The id of the timer.
-     */
-    timer: null,
-
-    /**
-     * Constructor: OpenLayers.Strategy.Refresh
-     * Create a new Refresh strategy.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Strategy.prototype.initialize.apply(this, [options]);
-    },
-   
-    /**
-     * APIMethod: activate
-     * Activate the strategy. Register any listeners, do appropriate setup.
-     * 
-     * Returns:
-     * {Boolean} True if the strategy was successfully activated.
-     */
-    activate: function() {
-        var activated = OpenLayers.Strategy.prototype.activate.call(this);
-        if(activated) {
-            if(this.layer.visibility === true) {
-                this.start();
-            } 
-            this.layer.events.on({
-                "visibilitychanged": this.reset,
-                scope: this
-            });
-        }
-        return activated;
-    },
-    
-    /**
-     * APIMethod: deactivate
-     * Deactivate the strategy. Unregister any listeners, do appropriate
-     *     tear-down.
-     * 
-     * Returns:
-     * {Boolean} True if the strategy was successfully deactivated.
-     */
-    deactivate: function() {
-        var deactivated = OpenLayers.Strategy.prototype.deactivate.call(this);
-        if(deactivated) {
-            this.stop();
-        }
-        return deactivated;
-    },
-    
-    /**
-     * Method: reset
-     * Start or cancel the refresh interval depending on the visibility of 
-     *     the layer.
-     */
-    reset: function() {
-        if(this.layer.visibility === true) {
-            this.start();
-        } else {
-            this.stop();
-        }
-    },
-    
-    /**
-     * Method: start
-     * Start the refresh interval. 
-     */
-    start: function() {
-        if(this.interval && typeof this.interval === "number" && 
-            this.interval > 0) {
-
-            this.timer = window.setInterval(
-                OpenLayers.Function.bind(this.refresh, this),
-                this.interval);
-        }
-    },
-    
-    /**
-     * APIMethod: refresh
-     * Tell the strategy to refresh which will refresh the layer.
-     */
-    refresh: function() {
-        if (this.layer && this.layer.refresh && 
-            typeof this.layer.refresh == "function") {
-
-            this.layer.refresh({force: this.force});
-        }
-    },
-   
-    /**
-     * Method: stop
-     * Cancels the refresh interval. 
-     */
-    stop: function() {
-        if(this.timer !== null) {
-            window.clearInterval(this.timer);
-            this.timer = null;
-        }
-    },
-    
-    CLASS_NAME: "OpenLayers.Strategy.Refresh" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Strategy/Save.js
+++ /dev/null
@@ -1,230 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Strategy.js
- */
-
-/**
- * Class: OpenLayers.Strategy.Save
- * A strategy that commits newly created or modified features.  By default
- *     the strategy waits for a call to <save> before persisting changes.  By
- *     configuring the strategy with the <auto> option, changes can be saved
- *     automatically.
- *
- * Inherits from:
- *  - <OpenLayers.Strategy>
- */
-OpenLayers.Strategy.Save = OpenLayers.Class(OpenLayers.Strategy, {
-    
-    /**
-     * Constant: EVENT_TYPES
-     * {Array(String)} Supported application event types.  Register a listener
-     *     for a particular event with the following syntax:
-     * (code)
-     * strategy.events.register(type, obj, listener);
-     * (end)
-     *
-     *  - *start* Triggered before saving
-     *  - *success* Triggered after a successful transaction
-     *  - *fail* Triggered after a failed transaction
-     *      
-     */
-    EVENT_TYPES: ["start", "success", "fail"],
- 
-    /** 
-     * Property: events
-     * {<OpenLayers.Events>} Events instance for triggering this protocol
-     *    events.
-     */
-    events: null,
-    
-    /**
-     * APIProperty: auto
-     * {Boolean | Number} Auto-save.  Default is false.  If true, features will be
-     *     saved immediately after being added to the layer and with each
-     *     modification or deletion.  If auto is a number, features will be
-     *     saved on an interval provided by the value (in seconds).
-     */
-    auto: false,
-    
-    /**
-     * Property: timer
-     * {Number} The id of the timer.
-     */
-    timer: null,
-
-    /**
-     * Constructor: OpenLayers.Strategy.Save
-     * Create a new Save strategy.
-     *
-     * Parameters:
-     * options - {Object} Optional object whose properties will be set on the
-     *     instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Strategy.prototype.initialize.apply(this, [options]);
-        this.events = new OpenLayers.Events(this, null, this.EVENT_TYPES);
-    },
-   
-    /**
-     * APIMethod: activate
-     * Activate the strategy.  Register any listeners, do appropriate setup.
-     * 
-     * Returns:
-     * {Boolean} The strategy was successfully activated.
-     */
-    activate: function() {
-        var activated = OpenLayers.Strategy.prototype.activate.call(this);
-        if(activated) {
-            if(this.auto) {
-                if(typeof this.auto === "number") {
-                    this.timer = window.setInterval(
-                        OpenLayers.Function.bind(this.save, this),
-                        this.auto * 1000
-                    );
-                } else {
-                    this.layer.events.on({
-                        "featureadded": this.triggerSave,
-                        "afterfeaturemodified": this.triggerSave,
-                        scope: this
-                    });
-                }
-            }
-        }
-        return activated;
-    },
-    
-    /**
-     * APIMethod: deactivate
-     * Deactivate the strategy.  Unregister any listeners, do appropriate
-     *     tear-down.
-     * 
-     * Returns:
-     * {Boolean} The strategy was successfully deactivated.
-     */
-    deactivate: function() {
-        var deactivated = OpenLayers.Strategy.prototype.deactivate.call(this);
-        if(deactivated) {
-            if(this.auto) {
-                if(typeof this.auto === "number") {
-                    window.clearInterval(this.timer);
-                } else {
-                    this.layer.events.un({
-                        "featureadded": this.triggerSave,
-                        "afterfeaturemodified": this.triggerSave,
-                        scope: this
-                    });
-                }
-            }
-        }
-        return deactivated;
-    },
-    
-    /**
-     * Method: triggerSave
-     * Registered as a listener.  Calls save if a feature has insert, update,
-     *     or delete state.
-     *
-     * Parameters:
-     * event - {Object} The event this function is listening for.
-     */
-    triggerSave: function(event) {
-        var feature = event.feature;
-        if(feature.state === OpenLayers.State.INSERT ||
-           feature.state === OpenLayers.State.UPDATE ||
-           feature.state === OpenLayers.State.DELETE) {
-            this.save([event.feature]);
-        }
-    },
-    
-    /**
-     * APIMethod: save
-     * Tell the layer protocol to commit unsaved features.  If the layer
-     *     projection differs from the map projection, features will be
-     *     transformed into the layer projection before being committed.
-     *
-     * Parameters:
-     * features - {Array} Features to be saved.  If null, then default is all
-     *     features in the layer.  Features are assumed to be in the map
-     *     projection.
-     */
-    save: function(features) {
-        if(!features) {
-            features = this.layer.features;
-        }
-        this.events.triggerEvent("start", {features:features});
-        var remote = this.layer.projection;
-        var local = this.layer.map.getProjectionObject();
-        if(!local.equals(remote)) {
-            var len = features.length;
-            var clones = new Array(len);
-            var orig, clone;
-            for(var i=0; i<len; ++i) {
-                orig = features[i];
-                clone = orig.clone();
-                clone.fid = orig.fid;
-                clone.state = orig.state;
-                if(orig.url) {
-                    clone.url = orig.url;
-                }
-                clone._original = orig;
-                clone.geometry.transform(local, remote);
-                clones[i] = clone;
-            }
-            features = clones;
-        }
-        this.layer.protocol.commit(features, {
-            callback: this.onCommit,
-            scope: this
-        });
-    },
-    
-    /**
-     * Method: onCommit
-     * Called after protocol commit.
-     *
-     * Parameters:
-     * response - {<OpenLayers.Protocol.Response>} A response object.
-     */
-    onCommit: function(response) {
-        var evt = {"response": response};
-        if(response.success()) {
-            var features = response.reqFeatures;
-            // deal with inserts, updates, and deletes
-            var state, feature;
-            var destroys = [];
-            var insertIds = response.insertIds || [];
-            var j = 0;
-            for(var i=0, len=features.length; i<len; ++i) {
-                feature = features[i];
-                // if projection was different, we may be dealing with clones
-                feature = feature._original || feature;
-                state = feature.state;
-                if(state) {
-                    if(state == OpenLayers.State.DELETE) {
-                        destroys.push(feature);
-                    } else if(state == OpenLayers.State.INSERT) {
-                        feature.fid = insertIds[j];
-                        ++j;
-                    }
-                    feature.state = null;
-                }
-            }
-
-            if(destroys.length > 0) {
-                this.layer.destroyFeatures(destroys);
-            }
-
-            this.events.triggerEvent("success", evt);
-
-        } else {
-            this.events.triggerEvent("fail", evt);
-        }
-    },
-   
-    CLASS_NAME: "OpenLayers.Strategy.Save" 
-});
-

--- a/labs/openlayers/lib/OpenLayers/Style.js
+++ /dev/null
@@ -1,444 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Util.js
- * @requires OpenLayers/Feature/Vector.js
- */
-
-/**
- * Class: OpenLayers.Style
- * This class represents a UserStyle obtained
- *     from a SLD, containing styling rules.
- */
-OpenLayers.Style = OpenLayers.Class({
-
-    /**
-     * Property: id
-     * {String} A unique id for this session.
-     */
-    id: null,
-    
-    /**
-     * APIProperty: name
-     * {String}
-     */
-    name: null,
-    
-    /**
-     * Property: title
-     * {String} Title of this style (set if included in SLD)
-     */
-    title: null,
-    
-    /**
-     * Property: description
-     * {String} Description of this style (set if abstract is included in SLD)
-     */
-    description: null,
-
-    /**
-     * APIProperty: layerName
-     * {<String>} name of the layer that this style belongs to, usually
-     * according to the NamedLayer attribute of an SLD document.
-     */
-    layerName: null,
-    
-    /**
-     * APIProperty: isDefault
-     * {Boolean}
-     */
-    isDefault: false,
-     
-    /** 
-     * Property: rules 
-     * {Array(<OpenLayers.Rule>)}
-     */
-    rules: null,
-    
-    /**
-     * Property: context
-     * {Object} An optional object with properties that symbolizers' property
-     * values should be evaluated against. If no context is specified,
-     * feature.attributes will be used
-     */
-    context: null,
-
-    /**
-     * Property: defaultStyle
-     * {Object} hash of style properties to use as default for merging
-     * rule-based style symbolizers onto. If no rules are defined,
-     * createSymbolizer will return this style. If <defaultsPerSymbolizer> is set to
-     * true, the defaultStyle will only be taken into account if there are
-     * rules defined.
-     */
-    defaultStyle: null,
-    
-    /**
-     * Property: defaultsPerSymbolizer
-     * {Boolean} If set to true, the <defaultStyle> will extend the symbolizer
-     * of every rule. Properties of the <defaultStyle> will also be used to set
-     * missing symbolizer properties if the symbolizer has stroke, fill or
-     * graphic set to true. Default is false.
-     */
-    defaultsPerSymbolizer: false,
-    
-    /**
-     * Property: propertyStyles
-     * {Hash of Boolean} cache of style properties that need to be parsed for
-     * propertyNames. Property names are keys, values won't be used.
-     */
-    propertyStyles: null,
-    
-
-    /** 
-     * Constructor: OpenLayers.Style
-     * Creates a UserStyle.
-     *
-     * Parameters:
-     * style        - {Object} Optional hash of style properties that will be
-     *                used as default style for this style object. This style
-     *                applies if no rules are specified. Symbolizers defined in
-     *                rules will extend this default style.
-     * options - {Object} An optional object with properties to set on the
-     *     style.
-     *
-     * Valid options:
-     * rules - {Array(<OpenLayers.Rule>)} List of rules to be added to the
-     *     style.
-     * 
-     * Return:
-     * {<OpenLayers.Style>}
-     */
-    initialize: function(style, options) {
-
-        OpenLayers.Util.extend(this, options);
-        this.rules = [];
-        if(options && options.rules) {
-            this.addRules(options.rules);
-        }
-
-        // use the default style from OpenLayers.Feature.Vector if no style
-        // was given in the constructor
-        this.setDefaultStyle(style ||
-                             OpenLayers.Feature.Vector.style["default"]);
-
-        this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
-    },
-
-    /** 
-     * APIMethod: destroy
-     * nullify references to prevent circular references and memory leaks
-     */
-    destroy: function() {
-        for (var i=0, len=this.rules.length; i<len; i++) {
-            this.rules[i].destroy();
-            this.rules[i] = null;
-        }
-        this.rules = null;
-        this.defaultStyle = null;
-    },
-    
-    /**
-     * Method: createSymbolizer
-     * creates a style by applying all feature-dependent rules to the base
-     * style.
-     * 
-     * Parameters:
-     * feature - {<OpenLayers.Feature>} feature to evaluate rules for
-     * 
-     * Returns:
-     * {Object} symbolizer hash
-     */
-    createSymbolizer: function(feature) {
-        var style = this.defaultsPerSymbolizer ? {} : this.createLiterals(
-            OpenLayers.Util.extend({}, this.defaultStyle), feature);
-        
-        var rules = this.rules;
-
-        var rule, context;
-        var elseRules = [];
-        var appliedRules = false;
-        for(var i=0, len=rules.length; i<len; i++) {
-            rule = rules[i];
-            // does the rule apply?
-            var applies = rule.evaluate(feature);
-            
-            if(applies) {
-                if(rule instanceof OpenLayers.Rule && rule.elseFilter) {
-                    elseRules.push(rule);
-                } else {
-                    appliedRules = true;
-                    this.applySymbolizer(rule, style, feature);
-                }
-            }
-        }
-        
-        // if no other rules apply, apply the rules with else filters
-        if(appliedRules == false && elseRules.length > 0) {
-            appliedRules = true;
-            for(var i=0, len=elseRules.length; i<len; i++) {
-                this.applySymbolizer(elseRules[i], style, feature);
-            }
-        }
-
-        // don't display if there were rules but none applied
-        if(rules.length > 0 && appliedRules == false) {
-            style.display = "none";
-        }
-        
-        return style;
-    },
-    
-    /**
-     * Method: applySymbolizer
-     *
-     * Parameters:
-     * rule - {OpenLayers.Rule}
-     * style - {Object}
-     * feature - {<OpenLayer.Feature.Vector>}
-     *
-     * Returns:
-     * {Object} A style with new symbolizer applied.
-     */
-    applySymbolizer: function(rule, style, feature) {
-        var symbolizerPrefix = feature.geometry ?
-                this.getSymbolizerPrefix(feature.geometry) :
-                OpenLayers.Style.SYMBOLIZER_PREFIXES[0];
-
-        var symbolizer = rule.symbolizer[symbolizerPrefix] || rule.symbolizer;
-        
-        if(this.defaultsPerSymbolizer === true) {
-            var defaults = this.defaultStyle;
-            OpenLayers.Util.applyDefaults(symbolizer, {
-                pointRadius: defaults.pointRadius
-            });
-            if(symbolizer.stroke === true || symbolizer.graphic === true) {
-                OpenLayers.Util.applyDefaults(symbolizer, {
-                    strokeWidth: defaults.strokeWidth,
-                    strokeColor: defaults.strokeColor,
-                    strokeOpacity: defaults.strokeOpacity,
-                    strokeDashstyle: defaults.strokeDashstyle,
-                    strokeLinecap: defaults.strokeLinecap
-                });
-            }
-            if(symbolizer.fill === true || symbolizer.graphic === true) {
-                OpenLayers.Util.applyDefaults(symbolizer, {
-                    fillColor: defaults.fillColor,
-                    fillOpacity: defaults.fillOpacity
-                });
-            }
-            if(symbolizer.graphic === true) {
-                OpenLayers.Util.applyDefaults(symbolizer, {
-                    pointRadius: this.defaultStyle.pointRadius,
-                    externalGraphic: this.defaultStyle.externalGraphic,
-                    graphicName: this.defaultStyle.graphicName,
-                    graphicOpacity: this.defaultStyle.graphicOpacity,
-                    graphicWidth: this.defaultStyle.graphicWidth,
-                    graphicHeight: this.defaultStyle.graphicHeight,
-                    graphicXOffset: this.defaultStyle.graphicXOffset,
-                    graphicYOffset: this.defaultStyle.graphicYOffset
-                });
-            }
-        }
-
-        // merge the style with the current style
-        return this.createLiterals(
-                OpenLayers.Util.extend(style, symbolizer), feature);
-    },
-    
-    /**
-     * Method: createLiterals
-     * creates literals for all style properties that have an entry in
-     * <this.propertyStyles>.
-     * 
-     * Parameters:
-     * style   - {Object} style to create literals for. Will be modified
-     *           inline.
-     * feature - {Object}
-     * 
-     * Returns:
-     * {Object} the modified style
-     */
-    createLiterals: function(style, feature) {
-        var context = OpenLayers.Util.extend({}, feature.attributes || feature.data);
-        OpenLayers.Util.extend(context, this.context);
-        
-        for (var i in this.propertyStyles) {
-            style[i] = OpenLayers.Style.createLiteral(style[i], context, feature, i);
-        }
-        return style;
-    },
-    
-    /**
-     * Method: findPropertyStyles
-     * Looks into all rules for this style and the defaultStyle to collect
-     * all the style hash property names containing ${...} strings that have
-     * to be replaced using the createLiteral method before returning them.
-     * 
-     * Returns:
-     * {Object} hash of property names that need createLiteral parsing. The
-     * name of the property is the key, and the value is true;
-     */
-    findPropertyStyles: function() {
-        var propertyStyles = {};
-
-        // check the default style
-        var style = this.defaultStyle;
-        this.addPropertyStyles(propertyStyles, style);
-
-        // walk through all rules to check for properties in their symbolizer
-        var rules = this.rules;
-        var symbolizer, value;
-        for (var i=0, len=rules.length; i<len; i++) {
-            symbolizer = rules[i].symbolizer;
-            for (var key in symbolizer) {
-                value = symbolizer[key];
-                if (typeof value == "object") {
-                    // symbolizer key is "Point", "Line" or "Polygon"
-                    this.addPropertyStyles(propertyStyles, value);
-                } else {
-                    // symbolizer is a hash of style properties
-                    this.addPropertyStyles(propertyStyles, symbolizer);
-                    break;
-                }
-            }
-        }
-        return propertyStyles;
-    },
-    
-    /**
-     * Method: addPropertyStyles
-     * 
-     * Parameters:
-     * propertyStyles - {Object} hash to add new property styles to. Will be
-     *                  modified inline
-     * symbolizer     - {Object} search this symbolizer for property styles
-     * 
-     * Returns:
-     * {Object} propertyStyles hash
-     */
-    addPropertyStyles: function(propertyStyles, symbolizer) {
-        var property;
-        for (var key in symbolizer) {
-            property = symbolizer[key];
-            if (typeof property == "string" &&
-                    property.match(/\$\{\w+\}/)) {
-                propertyStyles[key] = true;
-            }
-        }
-        return propertyStyles;
-    },
-    
-    /**
-     * APIMethod: addRules
-     * Adds rules to this style.
-     * 
-     * Parameters:
-     * rules - {Array(<OpenLayers.Rule>)}
-     */
-    addRules: function(rules) {
-        Array.prototype.push.apply(this.rules, rules);
-        this.propertyStyles = this.findPropertyStyles();
-    },
-    
-    /**
-     * APIMethod: setDefaultStyle
-     * Sets the default style for this style object.
-     * 
-     * Parameters:
-     * style - {Object} Hash of style properties
-     */
-    setDefaultStyle: function(style) {
-        this.defaultStyle = style; 
-        this.propertyStyles = this.findPropertyStyles();
-    },
-        
-    /**
-     * Method: getSymbolizerPrefix
-     * Returns the correct symbolizer prefix according to the
-     * geometry type of the passed geometry
-     * 
-     * Parameters:
-     * geometry {<OpenLayers.Geometry>}
-     * 
-     * Returns:
-     * {String} key of the according symbolizer
-     */
-    getSymbolizerPrefix: function(geometry) {
-        var prefixes = OpenLayers.Style.SYMBOLIZER_PREFIXES;
-        for (var i=0, len=prefixes.length; i<len; i++) {
-            if (geometry.CLASS_NAME.indexOf(prefixes[i]) != -1) {
-                return prefixes[i];
-            }
-        }
-    },
-    
-    /**
-     * APIMethod: clone
-     * Clones this style.
-     * 
-     * Returns:
-     * {<OpenLayers.Style>} Clone of this style.
-     */
-    clone: function() {
-        var options = OpenLayers.Util.extend({}, this);
-        // clone rules
-        if(this.rules) {
-            options.rules = [];
-            for(var i=0, len=this.rules.length; i<len; ++i) {
-                options.rules.push(this.rules[i].clone());
-            }
-        }
-        // clone context
-        options.context = this.context && OpenLayers.Util.extend({}, this.context);
-        //clone default style
-        var defaultStyle = OpenLayers.Util.extend({}, this.defaultStyle);
-        return new OpenLayers.Style(defaultStyle, options);
-    },
-    
-    CLASS_NAME: "OpenLayers.Style"
-});
-
-
-/**
- * Function: createLiteral
- * converts a style value holding a combination of PropertyName and Literal
- * into a Literal, taking the property values from the passed features.
- * 
- * Parameters:
- * value - {String} value to parse. If this string contains a construct like
- *         "foo ${bar}", then "foo " will be taken as literal, and "${bar}"
- *         will be replaced by the value of the "bar" attribute of the passed
- *         feature.
- * context - {Object} context to take attribute values from
- * feature - {<OpenLayers.Feature.Vector>} optional feature to pass to
- *           <OpenLayers.String.format> for evaluating functions in the
- *           context.
- * property - {String} optional, name of the property for which the literal is
- *            being created for evaluating functions in the context.
- * 
- * Returns:
- * {String} the parsed value. In the example of the value parameter above, the
- * result would be "foo valueOfBar", assuming that the passed feature has an
- * attribute named "bar" with the value "valueOfBar".
- */
-OpenLayers.Style.createLiteral = function(value, context, feature, property) {
-    if (typeof value == "string" && value.indexOf("${") != -1) {
-        value = OpenLayers.String.format(value, context, [feature, property]);
-        value = (isNaN(value) || !value) ? value : parseFloat(value);
-    }
-    return value;
-};
-    
-/**
- * Constant: OpenLayers.Style.SYMBOLIZER_PREFIXES
- * {Array} prefixes of the sld symbolizers. These are the
- * same as the main geometry types
- */
-OpenLayers.Style.SYMBOLIZER_PREFIXES = ['Point', 'Line', 'Polygon', 'Text',
-    'Raster'];
-

--- a/labs/openlayers/lib/OpenLayers/Style2.js
+++ /dev/null
@@ -1,112 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Rule.js
- * @requires OpenLayers/Symbolizer/Point.js
- * @requires OpenLayers/Symbolizer/Line.js
- * @requires OpenLayers/Symbolizer/Polygon.js
- * @requires OpenLayers/Symbolizer/Text.js
- * @requires OpenLayers/Symbolizer/Raster.js
- */
-
-/**
- * Class: OpenLayers.Style2
- * This class represents a collection of rules for rendering features.
- */
-OpenLayers.Style2 = OpenLayers.Class({
-
-    /**
-     * Property: id
-     * {String} A unique id for this session.
-     */
-    id: null,
-    
-    /**
-     * APIProperty: name
-     * {String} Style identifier.
-     */
-    name: null,
-    
-    /**
-     * APIProperty: title
-     * {String} Title of this style.
-     */
-    title: null,
-    
-    /**
-     * APIProperty: description
-     * {String} Description of this style.
-     */
-    description: null,
-
-    /**
-     * APIProperty: layerName
-     * {<String>} Name of the layer that this style belongs to, usually
-     *     according to the NamedLayer attribute of an SLD document.
-     */
-    layerName: null,
-    
-    /**
-     * APIProperty: isDefault
-     * {Boolean}
-     */
-    isDefault: false,
-     
-    /** 
-     * APIProperty: rules 
-     * {Array(<OpenLayers.Rule>)} Collection of rendering rules.
-     */
-    rules: null,
-    
-    /** 
-     * Constructor: OpenLayers.Style2
-     * Creates a style representing a collection of rendering rules.
-     *
-     * Parameters:
-     * config - {Object} An object containing properties to be set on the 
-     *     style.  Any documented properties may be set at construction.
-     *
-     * Return:
-     * {<OpenLayers.Style2>} A new style object.
-     */
-    initialize: function(config) {
-        OpenLayers.Util.extend(this, config);
-        this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
-    },
-
-    /** 
-     * APIMethod: destroy
-     * nullify references to prevent circular references and memory leaks
-     */
-    destroy: function() {
-        for (var i=0, len=this.rules.length; i<len; i++) {
-            this.rules[i].destroy();
-        }
-        delete this.rules;
-    },
-
-    /**
-     * APIMethod: clone
-     * Clones this style.
-     * 
-     * Returns:
-     * {<OpenLayers.Style2>} Clone of this style.
-     */
-    clone: function() {
-        var config = OpenLayers.Util.extend({}, this);
-        // clone rules
-        if (this.rules) {
-            config.rules = [];
-            for (var i=0, len=this.rules.length; i<len; ++i) {
-                config.rules.push(this.rules[i].clone());
-            }
-        }
-        return new OpenLayers.Style2(config);
-    },
-    
-    CLASS_NAME: "OpenLayers.Style2"
-});
-

--- a/labs/openlayers/lib/OpenLayers/StyleMap.js
+++ /dev/null
@@ -1,161 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Style.js
- * @requires OpenLayers/Feature/Vector.js
- */
- 
-/**
- * Class: OpenLayers.StyleMap
- */
-OpenLayers.StyleMap = OpenLayers.Class({
-    
-    /**
-     * Property: styles
-     * Hash of {<OpenLayers.Style>}, keyed by names of well known
-     * rendering intents (e.g. "default", "temporary", "select", "delete").
-     */
-    styles: null,
-    
-    /**
-     * Property: extendDefault
-     * {Boolean} if true, every render intent will extend the symbolizers
-     * specified for the "default" intent at rendering time. Otherwise, every
-     * rendering intent will be treated as a completely independent style.
-     */
-    extendDefault: true,
-    
-    /**
-     * Constructor: OpenLayers.StyleMap
-     * 
-     * Parameters:
-     * style   - {Object} Optional. Either a style hash, or a style object, or
-     *           a hash of style objects (style hashes) keyed by rendering
-     *           intent. If just one style hash or style object is passed,
-     *           this will be used for all known render intents (default,
-     *           select, temporary)
-     * options - {Object} optional hash of additional options for this
-     *           instance
-     */
-    initialize: function (style, options) {
-        this.styles = {
-            "default": new OpenLayers.Style(
-                OpenLayers.Feature.Vector.style["default"]),
-            "select": new OpenLayers.Style(
-                OpenLayers.Feature.Vector.style["select"]),
-            "temporary": new OpenLayers.Style(
-                OpenLayers.Feature.Vector.style["temporary"]),
-            "delete": new OpenLayers.Style(
-                OpenLayers.Feature.Vector.style["delete"])
-        };
-        
-        // take whatever the user passed as style parameter and convert it
-        // into parts of stylemap.
-        if(style instanceof OpenLayers.Style) {
-            // user passed a style object
-            this.styles["default"] = style;
-            this.styles["select"] = style;
-            this.styles["temporary"] = style;
-            this.styles["delete"] = style;
-        } else if(typeof style == "object") {
-            for(var key in style) {
-                if(style[key] instanceof OpenLayers.Style) {
-                    // user passed a hash of style objects
-                    this.styles[key] = style[key];
-                } else if(typeof style[key] == "object") {
-                    // user passsed a hash of style hashes
-                    this.styles[key] = new OpenLayers.Style(style[key]);
-                } else {
-                    // user passed a style hash (i.e. symbolizer)
-                    this.styles["default"] = new OpenLayers.Style(style);
-                    this.styles["select"] = new OpenLayers.Style(style);
-                    this.styles["temporary"] = new OpenLayers.Style(style);
-                    this.styles["delete"] = new OpenLayers.Style(style);
-                    break;
-                }
-            }
-        }
-        OpenLayers.Util.extend(this, options);
-    },
-
-    /**
-     * Method: destroy
-     */
-    destroy: function() {
-        for(var key in this.styles) {
-            this.styles[key].destroy();
-        }
-        this.styles = null;
-    },
-    
-    /**
-     * Method: createSymbolizer
-     * Creates the symbolizer for a feature for a render intent.
-     * 
-     * Parameters:
-     * feature - {<OpenLayers.Feature>} The feature to evaluate the rules
-     *           of the intended style against.
-     * intent  - {String} The intent determines the symbolizer that will be
-     *           used to draw the feature. Well known intents are "default"
-     *           (for just drawing the features), "select" (for selected
-     *           features) and "temporary" (for drawing features).
-     * 
-     * Returns:
-     * {Object} symbolizer hash
-     */
-    createSymbolizer: function(feature, intent) {
-        if(!feature) {
-            feature = new OpenLayers.Feature.Vector();
-        }
-        if(!this.styles[intent]) {
-            intent = "default";
-        }
-        feature.renderIntent = intent;
-        var defaultSymbolizer = {};
-        if(this.extendDefault && intent != "default") {
-            defaultSymbolizer = this.styles["default"].createSymbolizer(feature);
-        }
-        return OpenLayers.Util.extend(defaultSymbolizer,
-            this.styles[intent].createSymbolizer(feature));
-    },
-    
-    /**
-     * Method: addUniqueValueRules
-     * Convenience method to create comparison rules for unique values of a
-     * property. The rules will be added to the style object for a specified
-     * rendering intent. This method is a shortcut for creating something like
-     * the "unique value legends" familiar from well known desktop GIS systems
-     * 
-     * Parameters:
-     * renderIntent - {String} rendering intent to add the rules to
-     * property     - {String} values of feature attributes to create the
-     *                rules for
-     * symbolizers  - {Object} Hash of symbolizers, keyed by the desired
-     *                property values 
-     * context      - {Object} An optional object with properties that
-     *                symbolizers' property values should be evaluated
-     *                against. If no context is specified, feature.attributes
-     *                will be used
-     */
-    addUniqueValueRules: function(renderIntent, property, symbolizers, context) {
-        var rules = [];
-        for (var value in symbolizers) {
-            rules.push(new OpenLayers.Rule({
-                symbolizer: symbolizers[value],
-                context: context,
-                filter: new OpenLayers.Filter.Comparison({
-                    type: OpenLayers.Filter.Comparison.EQUAL_TO,
-                    property: property,
-                    value: value
-                })
-            }));
-        }
-        this.styles[renderIntent].addRules(rules);
-    },
-
-    CLASS_NAME: "OpenLayers.StyleMap"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Symbolizer.js
+++ /dev/null
@@ -1,52 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * Class: OpenLayers.Symbolizer
- * Base class representing a symbolizer used for feature rendering.
- */
-OpenLayers.Symbolizer = OpenLayers.Class({
-    
-
-    /**
-     * APIProperty: zIndex
-     * {Number} The zIndex determines the rendering order for a symbolizer.
-     *     Symbolizers with larger zIndex values are rendered over symbolizers
-     *     with smaller zIndex values.  Default is 0.
-     */
-    zIndex: 0,
-    
-    /**
-     * Constructor: OpenLayers.Symbolizer
-     * Instances of this class are not useful.  See one of the subclasses.
-     *
-     * Parameters:
-     * config - {Object} An object containing properties to be set on the 
-     *     symbolizer.  Any documented symbolizer property can be set at 
-     *     construction.
-     *
-     * Returns:
-     * A new symbolizer.
-     */
-    initialize: function(config) {
-        OpenLayers.Util.extend(this, config);
-    },
-    
-    /** 
-     * APIMethod: clone
-     * Create a copy of this symbolizer.
-     *
-     * Returns a symbolizer of the same type with the same properties.
-     */
-    clone: function() {
-        var Type = eval(this.CLASS_NAME);
-        return new Type(OpenLayers.Util.extend({}, this));
-    },
-    
-    CLASS_NAME: "OpenLayers.Symbolizer"
-    
-});
-
-

--- a/labs/openlayers/lib/OpenLayers/Symbolizer/Line.js
+++ /dev/null
@@ -1,70 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Symbolizer.js
- */
-
-/**
- * Class: OpenLayers.Symbolizer.Line
- * A symbolizer used to render line features.
- */
-OpenLayers.Symbolizer.Line = OpenLayers.Class(OpenLayers.Symbolizer, {
-
-    /**
-     * APIProperty: strokeColor
-     * {String} Color for line stroke.  This is a RGB hex value (e.g. "#ff0000"
-     *     for red).
-     */
-    strokeColor: null,
-    
-    /**
-     * APIProperty: strokeOpacity
-     * {Number} Stroke opacity (0-1).
-     */
-    strokeOpacity: null,
-    
-    /**
-     * APIProperty: strokeWidth
-     * {Number} Pixel stroke width.
-     */
-    strokeWidth: null,
-    
-    /**
-     * APIProperty: strokeLinecap
-     * {String} Stroke cap type ("butt", "round", or "square").
-     */
-    strokeLinecap: null,
-    
-    /**
-     * Property: strokeDashstyle
-     * {String} Stroke dash style according to the SLD spec. Note that the
-     *     OpenLayers values for strokeDashstyle ("dot", "dash", "dashdot",
-     *     "longdash", "longdashdot", or "solid") will not work in SLD, but
-     *     most SLD patterns will render correctly in OpenLayers.
-     */
-    strokeDashstyle: null,
-
-    /**
-     * Constructor: OpenLayers.Symbolizer.Line
-     * Create a symbolizer for rendering lines.
-     *
-     * Parameters:
-     * config - {Object} An object containing properties to be set on the 
-     *     symbolizer.  Any documented symbolizer property can be set at 
-     *     construction.
-     *
-     * Returns:
-     * A new line symbolizer.
-     */
-    initialize: function(config) {
-        OpenLayers.Symbolizer.prototype.initialize.apply(this, arguments);
-    },
-    
-    CLASS_NAME: "OpenLayers.Symbolizer.Line"
-    
-});
-
-

--- a/labs/openlayers/lib/OpenLayers/Symbolizer/Point.js
+++ /dev/null
@@ -1,142 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Symbolizer.js
- */
-
-/**
- * Class: OpenLayers.Symbolizer.Point
- * A symbolizer used to render point features.
- */
-OpenLayers.Symbolizer.Point = OpenLayers.Class(OpenLayers.Symbolizer, {
-    
-    /**
-     * APIProperty: strokeColor
-     * {String} Color for line stroke.  This is a RGB hex value (e.g. "#ff0000"
-     *     for red).
-     */
-    strokeColor: null,
-    
-    /**
-     * APIProperty: strokeOpacity
-     * {Number} Stroke opacity (0-1).
-     */
-    strokeOpacity: null,
-    
-    /**
-     * APIProperty: strokeWidth
-     * {Number} Pixel stroke width.
-     */
-    strokeWidth: null,
-    
-    /**
-     * APIProperty: strokeLinecap
-     * {String} Stroke cap type ("butt", "round", or "square").
-     */
-    strokeLinecap: null,
-    
-    /**
-     * Property: strokeDashstyle
-     * {String} Stroke dash style according to the SLD spec. Note that the
-     *     OpenLayers values for strokeDashstyle ("dot", "dash", "dashdot",
-     *     "longdash", "longdashdot", or "solid") will not work in SLD, but
-     *     most SLD patterns will render correctly in OpenLayers.
-     */
-    strokeDashstyle: null,
-
-    /**
-     * APIProperty: fillColor
-     * {String} RGB hex fill color (e.g. "#ff0000" for red).
-     */
-    fillColor: null,
-    
-    /**
-     * APIProperty: fillOpacity
-     * {Number} Fill opacity (0-1).
-     */
-    fillOpacity: null, 
-
-    /**
-     * APIProperty: pointRadius
-     * {Number} Pixel point radius.
-     */
-    pointRadius: null,
-
-    /**
-     * APIProperty: externalGraphic
-     * {String} Url to an external graphic that will be used for rendering 
-     *     points.
-     */
-    externalGraphic: null,
-    
-    /**
-     * APIProperty: graphicWidth
-     * {Number} Pixel width for sizing an external graphic.
-     */
-    graphicWidth: null,
-    
-    /**
-     * APIProperty: graphicHeight
-     * {Number} Pixel height for sizing an external graphic.
-     */
-    graphicHeight: null,
-    
-    /**
-     * APIProperty: graphicOpacity
-     * {Number} Opacity (0-1) for an external graphic.
-     */
-    graphicOpacity: null,
-    
-    /**
-     * APIProperty: graphicXOffset
-     * {Number} Pixel offset along the positive x axis for displacing an 
-     *     external graphic.
-     */
-    graphicXOffset: null,
-    
-    /**
-     * APIProperty: graphicYOffset
-     * {Number} Pixel offset along the positive y axis for displacing an 
-     *     external graphic.
-     */
-    graphicYOffset: null,
-
-    /**
-     * APIProperty: rotation
-     * {Number} The rotation of a graphic in the clockwise direction about its 
-     *     center point (or any point off center as specified by 
-     *     <graphicXOffset> and <graphicYOffset>).
-     */
-    rotation: null,
-    
-    /**
-     * APIProperty: graphicName
-     * {String} Named graphic to use when rendering points.  Supported values 
-     *     include "circle", "square", "star", "x", "cross", and "triangle".
-     */
-    graphicName: null,
-    
-    /**
-     * Constructor: OpenLayers.Symbolizer.Point
-     * Create a symbolizer for rendering points.
-     *
-     * Parameters:
-     * config - {Object} An object containing properties to be set on the 
-     *     symbolizer.  Any documented symbolizer property can be set at 
-     *     construction.
-     *
-     * Returns:
-     * A new point symbolizer.
-     */
-    initialize: function(config) {
-        OpenLayers.Symbolizer.prototype.initialize.apply(this, arguments);
-    },
-    
-    CLASS_NAME: "OpenLayers.Symbolizer.Point"
-    
-});
-
-

--- a/labs/openlayers/lib/OpenLayers/Symbolizer/Polygon.js
+++ /dev/null
@@ -1,82 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Symbolizer.js
- */
-
-/**
- * Class: OpenLayers.Symbolizer.Polygon
- * A symbolizer used to render line features.
- */
-OpenLayers.Symbolizer.Polygon = OpenLayers.Class(OpenLayers.Symbolizer, {
-    
-    /**
-     * APIProperty: strokeColor
-     * {String} Color for line stroke.  This is a RGB hex value (e.g. "#ff0000"
-     *     for red).
-     */
-    strokeColor: null,
-    
-    /**
-     * APIProperty: strokeOpacity
-     * {Number} Stroke opacity (0-1).
-     */
-    strokeOpacity: null,
-    
-    /**
-     * APIProperty: strokeWidth
-     * {Number} Pixel stroke width.
-     */
-    strokeWidth: null,
-    
-    /**
-     * APIProperty: strokeLinecap
-     * {String} Stroke cap type ("butt", "round", or "square").
-     */
-    strokeLinecap: null,
-    
-    /**
-     * Property: strokeDashstyle
-     * {String} Stroke dash style according to the SLD spec. Note that the
-     *     OpenLayers values for strokeDashstyle ("dot", "dash", "dashdot",
-     *     "longdash", "longdashdot", or "solid") will not work in SLD, but
-     *     most SLD patterns will render correctly in OpenLayers.
-     */
-    strokeDashstyle: null,
-
-    /**
-     * APIProperty: fillColor
-     * {String} RGB hex fill color (e.g. "#ff0000" for red).
-     */
-    fillColor: null,
-    
-    /**
-     * APIProperty: fillOpacity
-     * {Number} Fill opacity (0-1).
-     */
-    fillOpacity: null, 
-
-    /**
-     * Constructor: OpenLayers.Symbolizer.Polygon
-     * Create a symbolizer for rendering polygons.
-     *
-     * Parameters:
-     * config - {Object} An object containing properties to be set on the 
-     *     symbolizer.  Any documented symbolizer property can be set at 
-     *     construction.
-     *
-     * Returns:
-     * A new polygon symbolizer.
-     */
-    initialize: function(config) {
-        OpenLayers.Symbolizer.prototype.initialize.apply(this, arguments);
-    },
-    
-    CLASS_NAME: "OpenLayers.Symbolizer.Polygon"
-    
-});
-
-

--- a/labs/openlayers/lib/OpenLayers/Symbolizer/Raster.js
+++ /dev/null
@@ -1,35 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Symbolizer.js
- */
-
-/**
- * Class: OpenLayers.Symbolizer.Raster
- * A symbolizer used to render raster images.
- */
-OpenLayers.Symbolizer.Raster = OpenLayers.Class(OpenLayers.Symbolizer, {
-    
-    /**
-     * Constructor: OpenLayers.Symbolizer.Raster
-     * Create a symbolizer for rendering rasters.
-     *
-     * Parameters:
-     * config - {Object} An object containing properties to be set on the 
-     *     symbolizer.  Any documented symbolizer property can be set at 
-     *     construction.
-     *
-     * Returns:
-     * A new raster symbolizer.
-     */
-    initialize: function(config) {
-        OpenLayers.Symbolizer.prototype.initialize.apply(this, arguments);
-    },
-    
-    CLASS_NAME: "OpenLayers.Symbolizer.Raster"
-    
-});
-

--- a/labs/openlayers/lib/OpenLayers/Symbolizer/Text.js
+++ /dev/null
@@ -1,66 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Symbolizer.js
- */
-
-/**
- * Class: OpenLayers.Symbolizer.Text
- * A symbolizer used to render text labels for features.
- */
-OpenLayers.Symbolizer.Text = OpenLayers.Class(OpenLayers.Symbolizer, {
-    
-    /** 
-     * APIProperty: label
-     * {String} The text for the label.
-     */
-    label: null,
-    
-    /** 
-     * APIProperty: fontFamily
-     * {String} The font family for the label.
-     */
-    fontFamily: null,
-
-    /** 
-     * APIProperty: fontSize
-     * {String} The font size for the label.
-     */
-    fontSize: null,
-
-    /** 
-     * APIProperty: fontWeight
-     * {String} The font weight for the label.
-     */
-    fontWeight: null,
-    
-    /**
-     * Property: fontStyle
-     * {String} The font style for the label.
-     */
-    fontStyle: null,
-
-    /**
-     * Constructor: OpenLayers.Symbolizer.Text
-     * Create a symbolizer for rendering text labels.
-     *
-     * Parameters:
-     * config - {Object} An object containing properties to be set on the 
-     *     symbolizer.  Any documented symbolizer property can be set at 
-     *     construction.
-     *
-     * Returns:
-     * A new text symbolizer.
-     */
-    initialize: function(config) {
-        OpenLayers.Symbolizer.prototype.initialize.apply(this, arguments);
-    },
-    
-    CLASS_NAME: "OpenLayers.Symbolizer.Text"
-    
-});
-
-

--- a/labs/openlayers/lib/OpenLayers/Tile.js
+++ /dev/null
@@ -1,282 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/*
- * @requires OpenLayers/Util.js
- * @requires OpenLayers/Console.js
- */
-
-/*
- * Class: OpenLayers.Tile 
- * This is a class designed to designate a single tile, however
- *     it is explicitly designed to do relatively little. Tiles store 
- *     information about themselves -- such as the URL that they are related
- *     to, and their size - but do not add themselves to the layer div 
- *     automatically, for example. Create a new tile with the 
- *     <OpenLayers.Tile> constructor, or a subclass. 
- * 
- * TBD 3.0 - remove reference to url in above paragraph
- * 
- */
-OpenLayers.Tile = OpenLayers.Class({
-    
-    /** 
-     * Constant: EVENT_TYPES
-     * {Array(String)} Supported application event types
-     */
-    EVENT_TYPES: [ "loadstart", "loadend", "reload", "unload"],
-    
-    /**
-     * APIProperty: events
-     * {<OpenLayers.Events>} An events object that handles all 
-     *                       events on the tile.
-     */
-    events: null,
-
-    /**
-     * Property: id 
-     * {String} null
-     */
-    id: null,
-    
-    /** 
-     * Property: layer 
-     * {<OpenLayers.Layer>} layer the tile is attached to 
-     */
-    layer: null,
-    
-    /**
-     * Property: url
-     * {String} url of the request.
-     *
-     * TBD 3.0 
-     * Deprecated. The base tile class does not need an url. This should be 
-     * handled in subclasses. Does not belong here.
-     */
-    url: null,
-
-    /** 
-     * APIProperty: bounds 
-     * {<OpenLayers.Bounds>} null
-     */
-    bounds: null,
-    
-    /** 
-     * Property: size 
-     * {<OpenLayers.Size>} null
-     */
-    size: null,
-    
-    /** 
-     * Property: position 
-     * {<OpenLayers.Pixel>} Top Left pixel of the tile
-     */    
-    position: null,
-
-    /**
-     * Property: isLoading
-     * {Boolean} Is the tile loading?
-     */
-    isLoading: false,
-        
-    /** TBD 3.0 -- remove 'url' from the list of parameters to the constructor.
-     *             there is no need for the base tile class to have a url.
-     * 
-     * Constructor: OpenLayers.Tile
-     * Constructor for a new <OpenLayers.Tile> instance.
-     * 
-     * Parameters:
-     * layer - {<OpenLayers.Layer>} layer that the tile will go in.
-     * position - {<OpenLayers.Pixel>}
-     * bounds - {<OpenLayers.Bounds>}
-     * url - {<String>}
-     * size - {<OpenLayers.Size>}
-     */   
-    initialize: function(layer, position, bounds, url, size) {
-        this.layer = layer;
-        this.position = position.clone();
-        this.bounds = bounds.clone();
-        this.url = url;
-        this.size = size.clone();
-
-        //give the tile a unique id based on its BBOX.
-        this.id = OpenLayers.Util.createUniqueID("Tile_");
-        
-        this.events = new OpenLayers.Events(this, null, this.EVENT_TYPES);
-    },
-
-    /**
-     * Method: unload
-     * Call immediately before destroying if you are listening to tile
-     * events, so that counters are properly handled if tile is still
-     * loading at destroy-time. Will only fire an event if the tile is
-     * still loading.
-     */
-    unload: function() {
-       if (this.isLoading) { 
-           this.isLoading = false; 
-           this.events.triggerEvent("unload"); 
-       }
-    },
-    
-    /** 
-     * APIMethod: destroy
-     * Nullify references to prevent circular references and memory leaks.
-     */
-    destroy:function() {
-        this.layer  = null;
-        this.bounds = null;
-        this.size = null;
-        this.position = null;
-        
-        this.events.destroy();
-        this.events = null;
-    },
-    
-    /**
-     * Method: clone
-     *
-     * Parameters:
-     * obj - {<OpenLayers.Tile>} The tile to be cloned
-     *
-     * Returns:
-     * {<OpenLayers.Tile>} An exact clone of this <OpenLayers.Tile>
-     */
-    clone: function (obj) {
-        if (obj == null) {
-            obj = new OpenLayers.Tile(this.layer, 
-                                      this.position, 
-                                      this.bounds, 
-                                      this.url, 
-                                      this.size);
-        } 
-        
-        // catch any randomly tagged-on properties
-        OpenLayers.Util.applyDefaults(obj, this);
-        
-        return obj;
-    },
-
-    /**
-     * Method: draw
-     * Clear whatever is currently in the tile, then return whether or not 
-     *     it should actually be re-drawn.
-     * 
-     * Returns:
-     * {Boolean} Whether or not the tile should actually be drawn. Note that 
-     *     this is not really the best way of doing things, but such is 
-     *     the way the code has been developed. Subclasses call this and
-     *     depend on the return to know if they should draw or not.
-     */
-    draw: function() {
-        var maxExtent = this.layer.maxExtent;
-        var withinMaxExtent = (maxExtent &&
-                               this.bounds.intersectsBounds(maxExtent, false));
- 
-        // The only case where we *wouldn't* want to draw the tile is if the 
-        // tile is outside its layer's maxExtent.
-        this.shouldDraw = (withinMaxExtent || this.layer.displayOutsideMaxExtent);
-                
-        //clear tile's contents and mark as not drawn
-        this.clear();
-        
-        return this.shouldDraw;
-    },
-    
-    /** 
-     * Method: moveTo
-     * Reposition the tile.
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * redraw - {Boolean} Call draw method on tile after moving.
-     *     Default is true
-     */
-    moveTo: function (bounds, position, redraw) {
-        if (redraw == null) {
-            redraw = true;
-        }
-
-        this.bounds = bounds.clone();
-        this.position = position.clone();
-        if (redraw) {
-            this.draw();
-        }
-    },
-
-    /** 
-     * Method: clear
-     * Clear the tile of any bounds/position-related data so that it can 
-     *     be reused in a new location. To be implemented by subclasses.
-     */
-    clear: function() {
-        // to be implemented by subclasses
-    },
-    
-    /**   
-     * Method: getBoundsFromBaseLayer
-     * Take the pixel locations of the corner of the tile, and pass them to 
-     *     the base layer and ask for the location of those pixels, so that 
-     *     displaying tiles over Google works fine.
-     *
-     * Parameters:
-     * position - {<OpenLayers.Pixel>}
-     *
-     * Returns:
-     * bounds - {<OpenLayers.Bounds>} 
-     */
-    getBoundsFromBaseLayer: function(position) {
-        var msg = OpenLayers.i18n('reprojectDeprecated',
-                                              {'layerName':this.layer.name});
-        OpenLayers.Console.warn(msg);
-        var topLeft = this.layer.map.getLonLatFromLayerPx(position); 
-        var bottomRightPx = position.clone();
-        bottomRightPx.x += this.size.w;
-        bottomRightPx.y += this.size.h;
-        var bottomRight = this.layer.map.getLonLatFromLayerPx(bottomRightPx); 
-        // Handle the case where the base layer wraps around the date line.
-        // Google does this, and it breaks WMS servers to request bounds in 
-        // that fashion.  
-        if (topLeft.lon > bottomRight.lon) {
-            if (topLeft.lon < 0) {
-                topLeft.lon = -180 - (topLeft.lon+180);
-            } else {
-                bottomRight.lon = 180+bottomRight.lon+180;
-            }        
-        }
-        var bounds = new OpenLayers.Bounds(topLeft.lon, 
-                                       bottomRight.lat, 
-                                       bottomRight.lon, 
-                                       topLeft.lat);  
-        return bounds;
-    },        
-        
-    /** 
-     * Method: showTile
-     * Show the tile only if it should be drawn.
-     */
-    showTile: function() { 
-        if (this.shouldDraw) {
-            this.show();
-        }
-    },
-    
-    /** 
-     * Method: show
-     * Show the tile.  To be implemented by subclasses.
-     */
-    show: function() { },
-    
-    /** 
-     * Method: hide
-     * Hide the tile.  To be implemented by subclasses.
-     */
-    hide: function() { },
-    
-    CLASS_NAME: "OpenLayers.Tile"
-});
-

--- a/labs/openlayers/lib/OpenLayers/Tile/Image.js
+++ /dev/null
@@ -1,579 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Tile.js
- */
-
-/**
- * Class: OpenLayers.Tile.Image
- * Instances of OpenLayers.Tile.Image are used to manage the image tiles
- * used by various layers.  Create a new image tile with the
- * <OpenLayers.Tile.Image> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Tile>
- */
-OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
-
-    /** 
-     * Property: url
-     * {String} The URL of the image being requested. No default. Filled in by
-     * layer.getURL() function. 
-     */
-    url: null,
-    
-    /** 
-     * Property: imgDiv
-     * {DOMElement} The div element which wraps the image.
-     */
-    imgDiv: null,
-
-    /**
-     * Property: frame
-     * {DOMElement} The image element is appended to the frame.  Any gutter on
-     * the image will be hidden behind the frame. 
-     */ 
-    frame: null, 
-    
-    /**
-     * Property: layerAlphaHack
-     * {Boolean} True if the png alpha hack needs to be applied on the layer's div.
-     */
-    layerAlphaHack: null,
-    
-    /**
-     * Property: isBackBuffer
-     * {Boolean} Is this tile a back buffer tile?
-     */
-    isBackBuffer: false,
-    
-    /**
-     * Property: lastRatio
-     * {Float} Used in transition code only.  This is the previous ratio
-     *     of the back buffer tile resolution to the map resolution.  Compared
-     *     with the current ratio to determine if zooming occurred.
-     */
-    lastRatio: 1,
-
-    /**
-     * Property: isFirstDraw
-     * {Boolean} Is this the first time the tile is being drawn?
-     *     This is used to force resetBackBuffer to synchronize
-     *     the backBufferTile with the foreground tile the first time
-     *     the foreground tile loads so that if the user zooms
-     *     before the layer has fully loaded, the backBufferTile for
-     *     tiles that have been loaded can be used.
-     */
-    isFirstDraw: true,
-        
-    /**
-     * Property: backBufferTile
-     * {<OpenLayers.Tile>} A clone of the tile used to create transition
-     *     effects when the tile is moved or changes resolution.
-     */
-    backBufferTile: null,
-
-    /** TBD 3.0 - reorder the parameters to the init function to remove 
-     *             URL. the getUrl() function on the layer gets called on 
-     *             each draw(), so no need to specify it here.
-     * 
-     * Constructor: OpenLayers.Tile.Image
-     * Constructor for a new <OpenLayers.Tile.Image> instance.
-     * 
-     * Parameters:
-     * layer - {<OpenLayers.Layer>} layer that the tile will go in.
-     * position - {<OpenLayers.Pixel>}
-     * bounds - {<OpenLayers.Bounds>}
-     * url - {<String>} Deprecated. Remove me in 3.0.
-     * size - {<OpenLayers.Size>}
-     */   
-    initialize: function(layer, position, bounds, url, size) {
-        OpenLayers.Tile.prototype.initialize.apply(this, arguments);
-
-        this.url = url; //deprecated remove me
-        
-        this.frame = document.createElement('div'); 
-        this.frame.style.overflow = 'hidden'; 
-        this.frame.style.position = 'absolute'; 
-
-        this.layerAlphaHack = this.layer.alpha && OpenLayers.Util.alphaHack();
-    },
-
-    /** 
-     * APIMethod: destroy
-     * nullify references to prevent circular references and memory leaks
-     */
-    destroy: function() {
-        if (this.imgDiv != null)  {
-            if (this.layerAlphaHack) {
-                // unregister the "load" handler
-                OpenLayers.Event.stopObservingElement(this.imgDiv.childNodes[0]);                
-            }
-
-            // unregister the "load" and "error" handlers. Only the "error" handler if
-            // this.layerAlphaHack is true.
-            OpenLayers.Event.stopObservingElement(this.imgDiv);
-            
-            if (this.imgDiv.parentNode == this.frame) {
-                this.frame.removeChild(this.imgDiv);
-                this.imgDiv.map = null;
-            }
-            this.imgDiv.urls = null;
-            // abort any currently loading image
-            this.imgDiv.src = OpenLayers.Util.getImagesLocation() + "blank.gif";
-        }
-        this.imgDiv = null;
-        if ((this.frame != null) && (this.frame.parentNode == this.layer.div)) { 
-            this.layer.div.removeChild(this.frame); 
-        }
-        this.frame = null; 
-        
-        /* clean up the backBufferTile if it exists */
-        if (this.backBufferTile) {
-            this.backBufferTile.destroy();
-            this.backBufferTile = null;
-        }
-        
-        this.layer.events.unregister("loadend", this, this.resetBackBuffer);
-        
-        OpenLayers.Tile.prototype.destroy.apply(this, arguments);
-    },
-
-    /**
-     * Method: clone
-     *
-     * Parameters:
-     * obj - {<OpenLayers.Tile.Image>} The tile to be cloned
-     *
-     * Returns:
-     * {<OpenLayers.Tile.Image>} An exact clone of this <OpenLayers.Tile.Image>
-     */
-    clone: function (obj) {
-        if (obj == null) {
-            obj = new OpenLayers.Tile.Image(this.layer, 
-                                            this.position, 
-                                            this.bounds, 
-                                            this.url, 
-                                            this.size);        
-        } 
-        
-        //pick up properties from superclass
-        obj = OpenLayers.Tile.prototype.clone.apply(this, [obj]);
-        
-        //dont want to directly copy the image div
-        obj.imgDiv = null;
-            
-        
-        return obj;
-    },
-    
-    /**
-     * Method: draw
-     * Check that a tile should be drawn, and draw it.
-     * 
-     * Returns:
-     * {Boolean} Always returns true.
-     */
-    draw: function() {
-        if (this.layer != this.layer.map.baseLayer && this.layer.reproject) {
-            this.bounds = this.getBoundsFromBaseLayer(this.position);
-        }
-        var drawTile = OpenLayers.Tile.prototype.draw.apply(this, arguments);
-        
-        if ((OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS, this.layer.transitionEffect) != -1) || 
-            this.layer.singleTile) {
-            if (drawTile) {
-                //we use a clone of this tile to create a double buffer for visual
-                //continuity.  The backBufferTile is used to create transition
-                //effects while the tile in the grid is repositioned and redrawn
-                if (!this.backBufferTile) {
-                    this.backBufferTile = this.clone();
-                    this.backBufferTile.hide();
-                    // this is important.  It allows the backBuffer to place itself
-                    // appropriately in the DOM.  The Image subclass needs to put
-                    // the backBufferTile behind the main tile so the tiles can
-                    // load over top and display as soon as they are loaded.
-                    this.backBufferTile.isBackBuffer = true;
-                    
-                    // potentially end any transition effects when the tile loads
-                    this.events.register('loadend', this, this.resetBackBuffer);
-                    
-                    // clear transition back buffer tile only after all tiles in
-                    // this layer have loaded to avoid visual glitches
-                    this.layer.events.register("loadend", this, this.resetBackBuffer);
-                }
-                // run any transition effects
-                this.startTransition();
-            } else {
-                // if we aren't going to draw the tile, then the backBuffer should
-                // be hidden too!
-                if (this.backBufferTile) {
-                    this.backBufferTile.clear();
-                }
-            }
-        } else {
-            if (drawTile && this.isFirstDraw) {
-                this.events.register('loadend', this, this.showTile);
-                this.isFirstDraw = false;
-            }   
-        }    
-        
-        if (!drawTile) {
-            return false;
-        }
-        
-        if (this.isLoading) {
-            //if we're already loading, send 'reload' instead of 'loadstart'.
-            this.events.triggerEvent("reload"); 
-        } else {
-            this.isLoading = true;
-            this.events.triggerEvent("loadstart");
-        }
-        
-        return this.renderTile();
-    },
-    
-    /** 
-     * Method: resetBackBuffer
-     * Triggered by two different events, layer loadend, and tile loadend.
-     *     In any of these cases, we check to see if we can hide the 
-     *     backBufferTile yet and update its parameters to match the 
-     *     foreground tile.
-     *
-     * Basic logic:
-     *  - If the backBufferTile hasn't been drawn yet, reset it
-     *  - If layer is still loading, show foreground tile but don't hide
-     *    the backBufferTile yet
-     *  - If layer is done loading, reset backBuffer tile and show 
-     *    foreground tile
-     */
-    resetBackBuffer: function() {
-        this.showTile();
-        if (this.backBufferTile && 
-            (this.isFirstDraw || !this.layer.numLoadingTiles)) {
-            this.isFirstDraw = false;
-            // check to see if the backBufferTile is within the max extents
-            // before rendering it 
-            var maxExtent = this.layer.maxExtent;
-            var withinMaxExtent = (maxExtent &&
-                                   this.bounds.intersectsBounds(maxExtent, false));
-            if (withinMaxExtent) {
-                this.backBufferTile.position = this.position;
-                this.backBufferTile.bounds = this.bounds;
-                this.backBufferTile.size = this.size;
-                this.backBufferTile.imageSize = this.layer.getImageSize(this.bounds) || this.size;
-                this.backBufferTile.imageOffset = this.layer.imageOffset;
-                this.backBufferTile.resolution = this.layer.getResolution();
-                this.backBufferTile.renderTile();
-            }
-
-            this.backBufferTile.hide();
-        }
-    },
-    
-    /**
-     * Method: renderTile
-     * Internal function to actually initialize the image tile,
-     *     position it correctly, and set its url.
-     */
-    renderTile: function() {
-        if (this.imgDiv == null) {
-            this.initImgDiv();
-        }
-
-        this.imgDiv.viewRequestID = this.layer.map.viewRequestID;
-        
-        if (this.layer.async) {
-            // Asyncronous image requests call the asynchronous getURL method
-            // on the layer to fetch an image that covers 'this.bounds', in the scope of
-            // 'this', setting the 'url' property of the layer itself, and running
-            // the callback 'positionFrame' when the image request returns.
-            this.layer.getURLasync(this.bounds, this, "url", this.positionImage);
-        } else {
-            // syncronous image requests get the url and position the frame immediately,
-            // and don't wait for an image request to come back.
-          
-            // needed for changing to a different server for onload error
-            if (this.layer.url instanceof Array) {
-                this.imgDiv.urls = this.layer.url.slice();
-            }
-          
-            this.url = this.layer.getURL(this.bounds);
-          
-            // position the frame immediately
-            this.positionImage(); 
-        }
-        return true;
-    },
-
-    /**
-     * Method: positionImage
-     * Using the properties currenty set on the layer, position the tile correctly.
-     * This method is used both by the async and non-async versions of the Tile.Image
-     * code.
-     */
-     positionImage: function() {
-        // if the this layer doesn't exist at the point the image is
-        // returned, do not attempt to use it for size computation
-        if (this.layer === null) {
-            return;
-        }
-        // position the frame 
-        OpenLayers.Util.modifyDOMElement(this.frame, 
-                                          null, this.position, this.size);   
-
-        var imageSize = this.layer.getImageSize(this.bounds); 
-        if (this.layerAlphaHack) {
-            OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,
-                    null, null, imageSize, this.url);
-        } else {
-            OpenLayers.Util.modifyDOMElement(this.imgDiv,
-                    null, null, imageSize) ;
-            this.imgDiv.src = this.url;
-        }
-    },
-
-    /** 
-     * Method: clear
-     *  Clear the tile of any bounds/position-related data so that it can 
-     *   be reused in a new location.
-     */
-    clear: function() {
-        if(this.imgDiv) {
-            this.hide();
-            if (OpenLayers.Tile.Image.useBlankTile) { 
-                this.imgDiv.src = OpenLayers.Util.getImagesLocation() + "blank.gif";
-            }    
-        }
-    },
-
-    /**
-     * Method: initImgDiv
-     * Creates the imgDiv property on the tile.
-     */
-    initImgDiv: function() {
-        
-        var offset = this.layer.imageOffset; 
-        var size = this.layer.getImageSize(this.bounds); 
-     
-        if (this.layerAlphaHack) {
-            this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null,
-                                                           offset,
-                                                           size,
-                                                           null,
-                                                           "relative",
-                                                           null,
-                                                           null,
-                                                           null,
-                                                           true);
-        } else {
-            this.imgDiv = OpenLayers.Util.createImage(null,
-                                                      offset,
-                                                      size,
-                                                      null,
-                                                      "relative",
-                                                      null,
-                                                      null,
-                                                      true);
-        }
-        
-        this.imgDiv.className = 'olTileImage';
-
-        /* checkImgURL used to be used to called as a work around, but it
-           ended up hiding problems instead of solving them and broke things
-           like relative URLs. See discussion on the dev list:
-           http://openlayers.org/pipermail/dev/2007-January/000205.html
-
-        OpenLayers.Event.observe( this.imgDiv, "load",
-            OpenLayers.Function.bind(this.checkImgURL, this) );
-        */
-        this.frame.style.zIndex = this.isBackBuffer ? 0 : 1;
-        this.frame.appendChild(this.imgDiv); 
-        this.layer.div.appendChild(this.frame); 
-
-        if(this.layer.opacity != null) {
-            
-            OpenLayers.Util.modifyDOMElement(this.imgDiv, null, null, null,
-                                             null, null, null, 
-                                             this.layer.opacity);
-        }
-
-        // we need this reference to check back the viewRequestID
-        this.imgDiv.map = this.layer.map;
-
-        //bind a listener to the onload of the image div so that we 
-        // can register when a tile has finished loading.
-        var onload = function() {
-            
-            //normally isLoading should always be true here but there are some 
-            // right funky conditions where loading and then reloading a tile
-            // with the same url *really*fast*. this check prevents sending 
-            // a 'loadend' if the msg has already been sent
-            //
-            if (this.isLoading) { 
-                this.isLoading = false; 
-                this.events.triggerEvent("loadend"); 
-            }
-        };
-        
-        if (this.layerAlphaHack) { 
-            OpenLayers.Event.observe(this.imgDiv.childNodes[0], 'load', 
-                                     OpenLayers.Function.bind(onload, this));    
-        } else { 
-            OpenLayers.Event.observe(this.imgDiv, 'load', 
-                                 OpenLayers.Function.bind(onload, this)); 
-        } 
-        
-
-        // Bind a listener to the onerror of the image div so that we
-        // can registere when a tile has finished loading with errors.
-        var onerror = function() {
-
-            // If we have gone through all image reload attempts, it is time
-            // to realize that we are done with this image. Since
-            // OpenLayers.Util.onImageLoadError already has taken care about
-            // the error, we can continue as if the image was loaded
-            // successfully.
-            if (this.imgDiv._attempts > OpenLayers.IMAGE_RELOAD_ATTEMPTS) {
-                onload.call(this);
-            }
-        };
-        OpenLayers.Event.observe(this.imgDiv, "error",
-                                 OpenLayers.Function.bind(onerror, this));
-    },
-
-    /**
-     * Method: checkImgURL
-     * Make sure that the image that just loaded is the one this tile is meant
-     * to display, since panning/zooming might have changed the tile's URL in
-     * the meantime. If the tile URL did change before the image loaded, set
-     * the imgDiv display to 'none', as either (a) it will be reset to visible
-     * when the new URL loads in the image, or (b) we don't want to display
-     * this tile after all because its new bounds are outside our maxExtent.
-     * 
-     * This function should no longer  be neccesary with the improvements to
-     * Grid.js in OpenLayers 2.3. The lack of a good isEquivilantURL function
-     * caused problems in 2.2, but it's possible that with the improved 
-     * isEquivilant URL function, this might be neccesary at some point.
-     * 
-     * See discussion in the thread at 
-     * http://openlayers.org/pipermail/dev/2007-January/000205.html
-     */
-    checkImgURL: function () {
-        // Sometimes our image will load after it has already been removed
-        // from the map, in which case this check is not needed.  
-        if (this.layer) {
-            var loaded = this.layerAlphaHack ? this.imgDiv.firstChild.src : this.imgDiv.src;
-            if (!OpenLayers.Util.isEquivalentUrl(loaded, this.url)) {
-                this.hide();
-            }
-        }
-    },
-    
-    /**
-     * Method: startTransition
-     * This method is invoked on tiles that are backBuffers for tiles in the
-     *     grid.  The grid tile is about to be cleared and a new tile source
-     *     loaded.  This is where the transition effect needs to be started
-     *     to provide visual continuity.
-     */
-    startTransition: function() {
-        // backBufferTile has to be valid and ready to use
-        if (!this.backBufferTile || !this.backBufferTile.imgDiv) {
-            return;
-        }
-
-        // calculate the ratio of change between the current resolution of the
-        // backBufferTile and the layer.  If several animations happen in a
-        // row, then the backBufferTile will scale itself appropriately for
-        // each request.
-        var ratio = 1;
-        if (this.backBufferTile.resolution) {
-            ratio = this.backBufferTile.resolution / this.layer.getResolution();
-        }
-        
-        // if the ratio is not the same as it was last time (i.e. we are
-        // zooming), then we need to adjust the backBuffer tile
-        if (ratio != this.lastRatio) {
-            if (this.layer.transitionEffect == 'resize') {
-                // In this case, we can just immediately resize the 
-                // backBufferTile.
-                var upperLeft = new OpenLayers.LonLat(
-                    this.backBufferTile.bounds.left, 
-                    this.backBufferTile.bounds.top
-                );
-                var size = new OpenLayers.Size(
-                    this.backBufferTile.size.w * ratio,
-                    this.backBufferTile.size.h * ratio
-                );
-
-                var px = this.layer.map.getLayerPxFromLonLat(upperLeft);
-                OpenLayers.Util.modifyDOMElement(this.backBufferTile.frame, 
-                                                 null, px, size);
-                var imageSize = this.backBufferTile.imageSize;
-                imageSize = new OpenLayers.Size(imageSize.w * ratio, 
-                                                imageSize.h * ratio);
-                var imageOffset = this.backBufferTile.imageOffset;
-                if(imageOffset) {
-                    imageOffset = new OpenLayers.Pixel(
-                        imageOffset.x * ratio, imageOffset.y * ratio
-                    );
-                }
-
-                OpenLayers.Util.modifyDOMElement(
-                    this.backBufferTile.imgDiv, null, imageOffset, imageSize
-                ) ;
-
-                this.backBufferTile.show();
-            }
-        } else {
-            // default effect is just to leave the existing tile
-            // until the new one loads if this is a singleTile and
-            // there was no change in resolution.  Otherwise we
-            // don't bother to show the backBufferTile at all
-            if (this.layer.singleTile) {
-                this.backBufferTile.show();
-            } else {
-                this.backBufferTile.hide();
-            }
-        }
-        this.lastRatio = ratio;
-
-    },
-    
-    /** 
-     * Method: show
-     * Show the tile by showing its frame.
-     */
-    show: function() {
-        this.frame.style.display = '';
-        // Force a reflow on gecko based browsers to actually show the element
-        // before continuing execution.
-        if (OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS, 
-                this.layer.transitionEffect) != -1) {
-            if (navigator.userAgent.toLowerCase().indexOf("gecko") != -1) { 
-                this.frame.scrollLeft = this.frame.scrollLeft; 
-            } 
-        }
-    },
-    
-    /** 
-     * Method: hide
-     * Hide the tile by hiding its frame.
-     */
-    hide: function() {
-        this.frame.style.display = 'none';
-    },
-    
-    CLASS_NAME: "OpenLayers.Tile.Image"
-  }
-);
-
-OpenLayers.Tile.Image.useBlankTile = ( 
-    OpenLayers.Util.getBrowserName() == "safari" || 
-    OpenLayers.Util.getBrowserName() == "opera"); 
-

--- a/labs/openlayers/lib/OpenLayers/Tile/Image/IFrame.js
+++ /dev/null
@@ -1,263 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-
-/**
- * @requires OpenLayers/Tile/Image.js
- */
-
-/**
- * Class: OpenLayers.Tile.Image.IFrame
- * Instances of OpenLayers.Tile.Image.IFrame are used to manage the image tiles
- * used by Layer.WMS.Post loaded via HTTP-POST-protocol. Create a new image
- * tile with the <OpenLayers.Tile.Image.IFrame> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Tile.Image>
- */
-OpenLayers.Tile.Image.IFrame = OpenLayers.Class(OpenLayers.Tile.Image, {
-    
-    /**
-     * Property: layerAlphaHack
-     * {Boolean} Always false for an instance.
-     */
-
-    /**
-     * Constructor: OpenLayers.Tile.Image.IFrame
-     * Constructor for a new <OpenLayers.Tile.Image.IFrame> instance.
-     * 
-     * Parameters:
-     * layer - {<OpenLayers.Layer>} layer that the tile will go in.
-     * position - {<OpenLayers.Pixel>}
-     * bounds - {<OpenLayers.Bounds>}
-     * size - {<OpenLayers.Size>}
-     */   
-    initialize: function(layer, position, bounds, url, size) {
-        OpenLayers.Tile.Image.prototype.initialize.apply(this, arguments);
-        this.layerAlphaHack = false;
-    },
-
-    /** 
-     * Method: destroy
-     * nullify references to prevent circular references and memory leaks
-     */
-    destroy: function() {
-        if(this.imgDiv != null) {
-            // unregister the "load" handler
-            OpenLayers.Event.stopObservingElement(this.imgDiv.firstChild);
-        }
-        OpenLayers.Tile.Image.prototype.destroy.apply(this, arguments);
-    },
-
-    /**
-     * Method: clear
-     * Removes the iframe from DOM (avoids back-button problems).
-     */
-    clear: function() {
-        if(this.imgDiv) {
-            var iFrame = this.imgDiv.firstChild;
-            OpenLayers.Event.stopObservingElement(iFrame);
-            this.imgDiv.removeChild(iFrame);
-        }
-    },
-
-    /**
-     * Method: clone
-     *
-     * Parameters:
-     * obj - {<OpenLayers.Tile.Image.IFrame>} The tile to be cloned
-     *
-     * Returns:
-     * {<OpenLayers.Tile.Image.IFrame>} An exact clone of this 
-     * <OpenLayers.Tile.Image.IFrame>
-     */
-    clone: function (obj) {
-        if (obj == null) {
-            obj = new OpenLayers.Tile.Image.IFrame(
-                this.layer, this.position, this.bounds, this.url, this.size);
-        } 
-        
-        //pick up properties from superclass
-        obj = OpenLayers.Tile.Image.prototype.clone.apply(this, [obj]);
-        
-        return obj;
-    },
-
-    /**
-     * Method: renderTile
-     */
-     renderTile: function() {
-        if(OpenLayers.Tile.Image.prototype.renderTile.apply(this, arguments)) {
-            // create a html form and add it temporary to the layer div
-            var form = this.createRequestForm();
-            this.imgDiv.appendChild(form);
-
-            // submit the form (means fetching the image)
-            form.submit();
-            this.imgDiv.removeChild(form);
-        }
-    },
-
-    /**
-     * Method: initImgDiv
-     * Creates the imgDiv property on the tile.
-     */
-    initImgDiv: function() {
-        this.imgDiv = this.createImgDiv();
-
-        OpenLayers.Util.modifyDOMElement(this.imgDiv, this.id, null,
-            this.layer.getImageSize(), "relative");
-        this.imgDiv.className = 'olTileImage';
-
-        this.frame.appendChild(this.imgDiv); 
-        this.layer.div.appendChild(this.frame); 
-
-        if(this.layer.opacity != null) {
-            
-            OpenLayers.Util.modifyDOMElement(this.imgDiv, null, null, null,
-                                             null, null, null, 
-                                             this.layer.opacity);
-        }
-
-        // we need this reference to check back the viewRequestID
-        this.imgDiv.map = this.layer.map;
-    },
-
-    /**
-     * Method: createImgDiv
-     * Creates a div with iframe.and eventPane
-     *
-     * Returns:
-     * {DOMElement}
-     */
-    createImgDiv: function() {
-        var eventPane = document.createElement("div");
-
-        if(OpenLayers.Util.getBrowserName() == "msie") {
-            // IE cannot handle events on elements without backgroundcolor. So we
-            // use this little hack to make elements transparent
-            eventPane.style.backgroundColor = '#FFFFFF';
-            eventPane.style.filter          = 'chroma(color=#FFFFFF)';
-        }
-
-        OpenLayers.Util.modifyDOMElement(eventPane, null,
-            new OpenLayers.Pixel(0,0), this.layer.getImageSize(), "absolute");
-
-        var imgDiv = document.createElement("div");
-        imgDiv.appendChild(eventPane);
-        return imgDiv;
-    },
-
-    /**
-     * Method: createIFrame
-     * Create the IFrame which shows the image.
-     *
-     * Returns:
-     * {DOMElement} Iframe
-     */
-    createIFrame: function() {
-        var id = this.id+'_iFrame';
-        var iframe;
-        if(OpenLayers.Util.getBrowserName() == "msie") {
-            // InternetExplorer does not set the name attribute of an iFrame 
-            // properly via DOM manipulation, so we need to do it on our own with
-            // this hack.
-            iframe = document.createElement('<iframe name="'+id+'">');
-
-            // IFrames in InternetExplorer are not transparent, if you set the
-            // backgroundColor transparent. This is a workarround to get 
-            // transparent iframes.
-            iframe.style.backgroundColor = '#FFFFFF';
-            iframe.style.filter          = 'chroma(color=#FFFFFF)';
-        }
-        else {
-            iframe = document.createElement('iframe');
-            iframe.style.backgroundColor = 'transparent';
-        
-            // iframe.name needs to be an unique id, otherwise it 
-            // could happen that other iframes are overwritten.
-            iframe.name = id;
-        }
-        iframe.id = id;
-
-        // some special properties to avoid scaling the images and scrollbars 
-        // in the iframe
-        iframe.scrolling             = 'no';
-        iframe.marginWidth           = '0px';
-        iframe.marginHeight          = '0px';
-        iframe.frameBorder           = '0';
-
-        OpenLayers.Util.modifyDOMElement(iframe, id, 
-            new OpenLayers.Pixel(0,0), this.layer.getImageSize(), "absolute");
-
-        //bind a listener to the onload of the iframe so that we
-        // can register when a tile has finished loading.
-        var onload = function() {
-            this.show();
-            //normally isLoading should always be true here but there are some
-            // right funky conditions where loading and then reloading a tile
-            // with the same url *really*fast*. this check prevents sending
-            // a 'loadend' if the msg has already been sent
-            //
-            if (this.isLoading) {
-                this.isLoading = false;
-                this.events.triggerEvent("loadend");
-            }
-        };
-        OpenLayers.Event.observe(iframe, 'load',
-            OpenLayers.Function.bind(onload, this));
-
-        return iframe;
-    },
-    
-    /**
-     * Method: createRequestForm
-     * Create the html <form> element with width, height, bbox and all 
-     * parameters specified in the layer params.
-     *
-     * Returns: 
-     * {DOMElement} The form element which sends the HTTP-POST request to the
-     *              WMS. 
-     */
-    createRequestForm: function() {
-        // creation of the form element
-        var form = document.createElement('form');
-        form.method = 'POST';
-        var cacheId = this.layer.params["_OLSALT"];
-        cacheId = (cacheId ? cacheId + "_" : "") + this.bounds.toBBOX();
-        form.action = OpenLayers.Util.urlAppend(this.layer.url, cacheId);
-
-        // insert the iframe, which has been removed to avoid back-button
-        // problems
-        this.imgDiv.insertBefore(this.createIFrame(), this.imgDiv.firstChild);
-
-        form.target = this.id+'_iFrame';
-
-        // adding all parameters in layer params as hidden fields to the html
-        // form element
-        var imageSize = this.layer.getImageSize();
-        var params = OpenLayers.Util.extend(
-            {
-                "BBOX": this.encodeBBOX ? this.bounds.toBBOX() :
-                        this.bounds.toArray(),
-                "WIDTH": imageSize.w,
-                "HEIGHT": imageSize.h
-            }, this.layer.params);
-            
-        for(var par in params) {
-            var field = document.createElement('input');
-            field.type  = 'hidden';
-            field.name  = par;
-            field.value = params[par];
-            form.appendChild(field);
-        }   
-
-        return form;
-    },
-    
-    CLASS_NAME: "OpenLayers.Tile.Image.IFrame"
-  }
-);
-

--- a/labs/openlayers/lib/OpenLayers/Tile/WFS.js
+++ /dev/null
@@ -1,193 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
- 
-/**
- * @requires OpenLayers/Tile.js
- * @requires OpenLayers/Request/XMLHttpRequest.js
- */
-
-/**
- * Class: OpenLayers.Tile.WFS
- * Instances of OpenLayers.Tile.WFS are used to manage the image tiles
- * used by various layers.  Create a new image tile with the
- * <OpenLayers.Tile.WFS> constructor.
- *
- * Inherits from:
- *  - <OpenLayers.Tile>
- */
-OpenLayers.Tile.WFS = OpenLayers.Class(OpenLayers.Tile, {
-
-    /** 
-     * Property: features 
-     * {Array(<OpenLayers.Feature>)} list of features in this tile 
-     */
-    features: null,
-
-    /** 
-     * Property: url 
-     * {String} 
-     */
-    url: null,
-    
-    /** 
-     * Property: request 
-     * {<OpenLayers.Request.XMLHttpRequest>} 
-     */ 
-    request: null,     
-    
-    /** TBD 3.0 - reorder the parameters to the init function to put URL 
-     *             as last, so we can continue to call tile.initialize() 
-     *             without changing the arguments. 
-     * 
-     * Constructor: OpenLayers.Tile.WFS
-     * Constructor for a new <OpenLayers.Tile.WFS> instance.
-     * 
-     * Parameters:
-     * layer - {<OpenLayers.Layer>} layer that the tile will go in.
-     * position - {<OpenLayers.Pixel>}
-     * bounds - {<OpenLayers.Bounds>}
-     * url - {<String>}
-     * size - {<OpenLayers.Size>}
-     */   
-    initialize: function(layer, position, bounds, url, size) {
-        OpenLayers.Tile.prototype.initialize.apply(this, arguments);
-        this.url = url;        
-        this.features = [];
-    },
-
-    /** 
-     * APIMethod: destroy
-     * nullify references to prevent circular references and memory leaks
-     */
-    destroy: function() {
-        OpenLayers.Tile.prototype.destroy.apply(this, arguments);
-        this.destroyAllFeatures();
-        this.features = null;
-        this.url = null;
-        if(this.request) {
-            this.request.abort();
-            //this.request.destroy();
-            this.request = null;
-        }
-    },
-
-    /** 
-     * Method: clear
-     *  Clear the tile of any bounds/position-related data so that it can 
-     *   be reused in a new location.
-     */
-    clear: function() {
-        this.destroyAllFeatures();
-    },
-    
-    /**
-     * Method: draw
-     * Check that a tile should be drawn, and load features for it.
-     */
-    draw:function() {
-        if (OpenLayers.Tile.prototype.draw.apply(this, arguments)) {
-            if (this.isLoading) {
-                //if already loading, send 'reload' instead of 'loadstart'.
-                this.events.triggerEvent("reload"); 
-            } else {
-                this.isLoading = true;
-                this.events.triggerEvent("loadstart");
-            }
-            this.loadFeaturesForRegion(this.requestSuccess);
-        }
-    },
-
-    /** 
-    * Method: loadFeaturesForRegion
-    * Abort any pending requests and issue another request for data. 
-    *
-    * Input are function pointers for what to do on success and failure.
-    *
-    * Parameters:
-    * success - {function}
-    * failure - {function}
-    */
-    loadFeaturesForRegion:function(success, failure) {
-        if(this.request) {
-            this.request.abort();
-        }
-        this.request = OpenLayers.Request.GET({
-            url: this.url,
-            success: success,
-            failure: failure,
-            scope: this
-        });
-    },
-    
-    /**
-    * Method: requestSuccess
-    * Called on return from request succcess. Adds results via 
-    * layer.addFeatures in vector mode, addResults otherwise. 
-    *
-    * Parameters:
-    * request - {<OpenLayers.Request.XMLHttpRequest>}
-    */
-    requestSuccess:function(request) {
-        if (this.features) {
-            var doc = request.responseXML;
-            if (!doc || !doc.documentElement) {
-                doc = request.responseText; 
-            }
-            if (this.layer.vectorMode) {
-                this.layer.addFeatures(this.layer.formatObject.read(doc));
-            } else {
-                var xml = new OpenLayers.Format.XML();
-                if (typeof doc == "string") {
-                    doc = xml.read(doc);
-                }
-                var resultFeatures = xml.getElementsByTagNameNS(
-                    doc, "http://www.opengis.net/gml", "featureMember"
-                );
-                this.addResults(resultFeatures);
-            }
-        }
-        if (this.events) {
-            this.events.triggerEvent("loadend"); 
-        }
-
-        //request produced with success, we can delete the request object.
-        //this.request.destroy();
-        this.request = null;
-    },
-
-    /**
-     * Method: addResults
-     * Construct new feature via layer featureClass constructor, and add to
-     * this.features.
-     * 
-     * Parameters:
-     * results - {Object}
-     */
-    addResults: function(results) {
-        for (var i=0; i < results.length; i++) {
-            var feature = new this.layer.featureClass(this.layer, 
-                                                      results[i]);
-            this.features.push(feature);
-        }
-    },
-
-
-    /** 
-     * Method: destroyAllFeatures
-     * Iterate through and call destroy() on each feature, removing it from
-     *   the local array
-     */
-    destroyAllFeatures: function() {
-        while(this.features.length > 0) {
-            var feature = this.features.shift();
-            feature.destroy();
-        }
-    },
-
-    CLASS_NAME: "OpenLayers.Tile.WFS"
-  }
-);
-

--- a/labs/openlayers/lib/OpenLayers/Tween.js
+++ /dev/null
@@ -1,319 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Namespace: OpenLayers.Tween
- */
-OpenLayers.Tween = OpenLayers.Class({
-    
-    /**
-     * Constant: INTERVAL
-     * {int} Interval in milliseconds between 2 steps
-     */
-    INTERVAL: 10,
-    
-    /**
-     * APIProperty: easing
-     * {<OpenLayers.Easing>(Function)} Easing equation used for the animation
-     *     Defaultly set to OpenLayers.Easing.Expo.easeOut
-     */
-    easing: null,
-    
-    /**
-     * APIProperty: begin
-     * {Object} Values to start the animation with
-     */
-    begin: null,
-    
-    /**
-     * APIProperty: finish
-     * {Object} Values to finish the animation with
-     */
-    finish: null,
-    
-    /**
-     * APIProperty: duration
-     * {int} duration of the tween (number of steps)
-     */
-    duration: null,
-    
-    /**
-     * APIProperty: callbacks
-     * {Object} An object with start, eachStep and done properties whose values
-     *     are functions to be call during the animation. They are passed the
-     *     current computed value as argument.
-     */
-    callbacks: null,
-    
-    /**
-     * Property: time
-     * {int} Step counter
-     */
-    time: null,
-    
-    /**
-     * Property: interval
-     * {int} Interval id returned by window.setInterval
-     */
-    interval: null,
-    
-    /**
-     * Property: playing
-     * {Boolean} Tells if the easing is currently playing
-     */
-    playing: false,
-    
-    /** 
-     * Constructor: OpenLayers.Tween
-     * Creates a Tween.
-     *
-     * Parameters:
-     * easing - {<OpenLayers.Easing>(Function)} easing function method to use
-     */ 
-    initialize: function(easing) {
-        this.easing = (easing) ? easing : OpenLayers.Easing.Expo.easeOut;
-    },
-    
-    /**
-     * APIMethod: start
-     * Plays the Tween, and calls the callback method on each step
-     * 
-     * Parameters:
-     * begin - {Object} values to start the animation with
-     * finish - {Object} values to finish the animation with
-     * duration - {int} duration of the tween (number of steps)
-     * options - {Object} hash of options (for example callbacks (start, eachStep, done))
-     */
-    start: function(begin, finish, duration, options) {
-        this.playing = true;
-        this.begin = begin;
-        this.finish = finish;
-        this.duration = duration;
-        this.callbacks = options.callbacks;
-        this.time = 0;
-        if (this.interval) {
-            window.clearInterval(this.interval);
-            this.interval = null;
-        }
-        if (this.callbacks && this.callbacks.start) {
-            this.callbacks.start.call(this, this.begin);
-        }
-        this.interval = window.setInterval(
-            OpenLayers.Function.bind(this.play, this), this.INTERVAL);
-    },
-    
-    /**
-     * APIMethod: stop
-     * Stops the Tween, and calls the done callback
-     *     Doesn't do anything if animation is already finished
-     */
-    stop: function() {
-        if (!this.playing) {
-            return;
-        }
-        
-        if (this.callbacks && this.callbacks.done) {
-            this.callbacks.done.call(this, this.finish);
-        }
-        window.clearInterval(this.interval);
-        this.interval = null;
-        this.playing = false;
-    },
-    
-    /**
-     * Method: play
-     * Calls the appropriate easing method
-     */
-    play: function() {
-        var value = {};
-        for (var i in this.begin) {
-            var b = this.begin[i];
-            var f = this.finish[i];
-            if (b == null || f == null || isNaN(b) || isNaN(f)) {
-                OpenLayers.Console.error('invalid value for Tween');
-            }
-            
-            var c = f - b;
-            value[i] = this.easing.apply(this, [this.time, b, c, this.duration]);
-        }
-        this.time++;
-        
-        if (this.callbacks && this.callbacks.eachStep) {
-            this.callbacks.eachStep.call(this, value);
-        }
-        
-        if (this.time > this.duration) {
-            this.stop();
-        }
-    },
-    
-    /**
-     * Create empty functions for all easing methods.
-     */
-    CLASS_NAME: "OpenLayers.Tween"
-});
-
-/**
- * Namespace: OpenLayers.Easing
- * 
- * Credits:
- *      Easing Equations by Robert Penner, <http://www.robertpenner.com/easing/>
- */
-OpenLayers.Easing = {
-    /**
-     * Create empty functions for all easing methods.
-     */
-    CLASS_NAME: "OpenLayers.Easing"
-};
-
-/**
- * Namespace: OpenLayers.Easing.Linear
- */
-OpenLayers.Easing.Linear = {
-    
-    /**
-     * Function: easeIn
-     * 
-     * Parameters:
-     * t - {Float} time
-     * b - {Float} beginning position
-     * c - {Float} total change
-     * d - {Float} duration of the transition
-     */
-    easeIn: function(t, b, c, d) {
-        return c*t/d + b;
-    },
-    
-    /**
-     * Function: easeOut
-     * 
-     * Parameters:
-     * t - {Float} time
-     * b - {Float} beginning position
-     * c - {Float} total change
-     * d - {Float} duration of the transition
-     */
-    easeOut: function(t, b, c, d) {
-        return c*t/d + b;
-    },
-    
-    /**
-     * Function: easeInOut
-     * 
-     * Parameters:
-     * t - {Float} time
-     * b - {Float} beginning position
-     * c - {Float} total change
-     * d - {Float} duration of the transition
-     */
-    easeInOut: function(t, b, c, d) {
-        return c*t/d + b;
-    },
-
-    CLASS_NAME: "OpenLayers.Easing.Linear"
-};
-
-/**
- * Namespace: OpenLayers.Easing.Expo
- */
-OpenLayers.Easing.Expo = {
-    
-    /**
-     * Function: easeIn
-     * 
-     * Parameters:
-     * t - {Float} time
-     * b - {Float} beginning position
-     * c - {Float} total change
-     * d - {Float} duration of the transition
-     */
-    easeIn: function(t, b, c, d) {
-        return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
-    },
-    
-    /**
-     * Function: easeOut
-     * 
-     * Parameters:
-     * t - {Float} time
-     * b - {Float} beginning position
-     * c - {Float} total change
-     * d - {Float} duration of the transition
-     */
-    easeOut: function(t, b, c, d) {
-        return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
-    },
-    
-    /**
-     * Function: easeInOut
-     * 
-     * Parameters:
-     * t - {Float} time
-     * b - {Float} beginning position
-     * c - {Float} total change
-     * d - {Float} duration of the transition
-     */
-    easeInOut: function(t, b, c, d) {
-        if (t==0) return b;
-        if (t==d) return b+c;
-        if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
-        return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
-    },
-
-    CLASS_NAME: "OpenLayers.Easing.Expo"
-};
-
-/**
- * Namespace: OpenLayers.Easing.Quad
- */
-OpenLayers.Easing.Quad = {
-    
-    /**
-     * Function: easeIn
-     * 
-     * Parameters:
-     * t - {Float} time
-     * b - {Float} beginning position
-     * c - {Float} total change
-     * d - {Float} duration of the transition
-     */
-    easeIn: function(t, b, c, d) {
-        return c*(t/=d)*t + b;
-    },
-    
-    /**
-     * Function: easeOut
-     * 
-     * Parameters:
-     * t - {Float} time
-     * b - {Float} beginning position
-     * c - {Float} total change
-     * d - {Float} duration of the transition
-     */
-    easeOut: function(t, b, c, d) {
-        return -c *(t/=d)*(t-2) + b;
-    },
-    
-    /**
-     * Function: easeInOut
-     * 
-     * Parameters:
-     * t - {Float} time
-     * b - {Float} beginning position
-     * c - {Float} total change
-     * d - {Float} duration of the transition
-     */
-    easeInOut: function(t, b, c, d) {
-        if ((t/=d/2) < 1) return c/2*t*t + b;
-        return -c/2 * ((--t)*(t-2) - 1) + b;
-    },
-
-    CLASS_NAME: "OpenLayers.Easing.Quad"
-};
-

--- a/labs/openlayers/lib/OpenLayers/Util.js
+++ /dev/null
@@ -1,1798 +1,1 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
 
-/**
- * @requires OpenLayers/Console.js
- */
-
-/**
- * Namespace: Util
- */
-OpenLayers.Util = {};
-
-/** 
- * Function: getElement
- * This is the old $() from prototype
- */
-OpenLayers.Util.getElement = function() {
-    var elements = [];
-
-    for (var i=0, len=arguments.length; i<len; i++) {
-        var element = arguments[i];
-        if (typeof element == 'string') {
-            element = document.getElementById(element);
-        }
-        if (arguments.length == 1) {
-            return element;
-        }
-        elements.push(element);
-    }
-    return elements;
-};
-
-/**
- * Function: isElement
- * A cross-browser implementation of "e instanceof Element".
- *
- * Parameters:
- * o - {Object} The object to test.
- *
- * Returns:
- * {Boolean}
- */
-OpenLayers.Util.isElement = function(o) {
-    return !!(o && o.nodeType === 1);
-};
-
-/** 
- * Maintain existing definition of $.
- */
-if(typeof window.$  === "undefined") {
-    window.$ = OpenLayers.Util.getElement;
-}
-
-/**
- * APIFunction: extend
- * Copy all properties of a source object to a destination object.  Modifies
- *     the passed in destination object.  Any properties on the source object
- *     that are set to undefined will not be (re)set on the destination object.
- *
- * Parameters:
- * destination - {Object} The object that will be modified
- * source - {Object} The object with properties to be set on the destination
- *
- * Returns:
- * {Object} The destination object.
- */
-OpenLayers.Util.extend = function(destination, source) {
-    destination = destination || {};
-    if(source) {
-        for(var property in source) {
-            var value = source[property];
-            if(value !== undefined) {
-                destination[property] = value;
-            }
-        }
-
-        /**
-         * IE doesn't include the toString property when iterating over an object's
-         * properties with the for(property in object) syntax.  Explicitly check if
-         * the source has its own toString property.
-         */
-
-        /*
-         * FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative
-         * prototype object" when calling hawOwnProperty if the source object
-         * is an instance of window.Event.
-         */
-
-        var sourceIsEvt = typeof window.Event == "function"
-                          && source instanceof window.Event;
-
-        if(!sourceIsEvt
-           && source.hasOwnProperty && source.hasOwnProperty('toString')) {
-            destination.toString = source.toString;
-        }
-    }
-    return destination;
-};
-
-
-/** 
- * Function: removeItem
- * Remove an object from an array. Iterates through the array
- *     to find the item, then removes it.
- *
- * Parameters:
- * array - {Array}
- * item - {Object}
- * 
- * Return
- * {Array} A reference to the array
- */
-OpenLayers.Util.removeItem = function(array, item) {
-    for(var i = array.length - 1; i >= 0; i--) {
-        if(array[i] == item) {
-            array.splice(i,1);
-            //break;more than once??
-        }
-    }
-    return array;
-};
-
-/**
- * Function: clearArray
- * *Deprecated*. This function will disappear in 3.0.
- * Please use "array.length = 0" instead.
- * 
- * Parameters:
- * array - {Array}
- */
-OpenLayers.Util.clearArray = function(array) {
-    OpenLayers.Console.warn(
-        OpenLayers.i18n(
-            "methodDeprecated", {'newMethod': 'array = []'}
-        )
-    );
-    array.length = 0;
-};
-
-/** 
- * Function: indexOf
- * Seems to exist already in FF, but not in MOZ.
- * 
- * Parameters:
- * array - {Array}
- * obj - {Object}
- * 
- * Returns:
- * {Integer} The index at, which the first object was found in the array.
- *           If not found, returns -1.
- */
-OpenLayers.Util.indexOf = function(array, obj) {
-    // use the build-in function if available.
-    if (typeof array.indexOf == "function") {
-        return array.indexOf(obj);
-    } else {
-        for (var i = 0, len = array.length; i < len; i++) {
-            if (array[i] == obj) {
-                return i;
-            }
-        }
-        return -1;   
-    }
-};
-
-
-
-/**
- * Function: modifyDOMElement
- * 
- * Modifies many properties of a DOM element all at once.  Passing in 
- * null to an individual parameter will avoid setting the attribute.
- *
- * Parameters:
- * id - {String} The element id attribute to set.
- * px - {<OpenLayers.Pixel>} The left and top style position.
- * sz - {<OpenLayers.Size>}  The width and height style attributes.
- * position - {String}       The position attribute.  eg: absolute, 
- *                           relative, etc.
- * border - {String}         The style.border attribute.  eg:
- *                           solid black 2px
- * overflow - {String}       The style.overview attribute.  
- * opacity - {Float}         Fractional value (0.0 - 1.0)
- */
-OpenLayers.Util.modifyDOMElement = function(element, id, px, sz, position, 
-                                            border, overflow, opacity) {
-
-    if (id) {
-        element.id = id;
-    }
-    if (px) {
-        element.style.left = px.x + "px";
-        element.style.top = px.y + "px";
-    }
-    if (sz) {
-        element.style.width = sz.w + "px";
-        element.style.height = sz.h + "px";
-    }
-    if (position) {
-        element.style.position = position;
-    }
-    if (border) {
-        element.style.border = border;
-    }
-    if (overflow) {
-        element.style.overflow = overflow;
-    }
-    if (parseFloat(opacity) >= 0.0 && parseFloat(opacity) < 1.0) {
-        element.style.filter = 'alpha(opacity=' + (opacity * 100) + ')';
-        element.style.opacity = opacity;
-    } else if (parseFloat(opacity) == 1.0) {
-        element.style.filter = '';
-        element.style.opacity = '';
-    }
-};
-
-/** 
- * Function: createDiv
- * Creates a new div and optionally set some standard attributes.
- * Null may be passed to each parameter if you do not wish to
- * set a particular attribute.
- * Note - zIndex is NOT set on the resulting div.
- * 
- * Parameters:
- * id - {String} An identifier for this element.  If no id is
- *               passed an identifier will be created 
- *               automatically.
- * px - {<OpenLayers.Pixel>} The element left and top position. 
- * sz - {<OpenLayers.Size>} The element width and height.
- * imgURL - {String} A url pointing to an image to use as a 
- *                   background image.
- * position - {String} The style.position value. eg: absolute,
- *                     relative etc.
- * border - {String} The the style.border value. 
- *                   eg: 2px solid black
- * overflow - {String} The style.overflow value. Eg. hidden
- * opacity - {Float} Fractional value (0.0 - 1.0)
- * 
- * Returns: 
- * {DOMElement} A DOM Div created with the specified attributes.
- */
-OpenLayers.Util.createDiv = function(id, px, sz, imgURL, position, 
-                                     border, overflow, opacity) {
-
-    var dom = document.createElement('div');
-
-    if (imgURL) {
-        dom.style.backgroundImage = 'url(' + imgURL + ')';
-    }
-
-    //set generic properties
-    if (!id) {
-        id = OpenLayers.Util.createUniqueID("OpenLayersDiv");
-    }
-    if (!position) {
-        position = "absolute";
-    }
-    OpenLayers.Util.modifyDOMElement(dom, id, px, sz, position, 
-                                     border, overflow, opacity);
-
-    return dom;
-};
-
-/**
- * Function: createImage
- * Creates an img element with specific attribute values.
- *  
- * Parameters:
- * id - {String} The id field for the img.  If none assigned one will be
- *               automatically generated.
- * px - {<OpenLayers.Pixel>} The left and top positions.
- * sz - {<OpenLayers.Size>} The style.width and style.height values.
- * imgURL - {String} The url to use as the image source.
- * position - {String} The style.position value.
- * border - {String} The border to place around the image.
- * opacity - {Float} Fractional value (0.0 - 1.0)
- * delayDisplay - {Boolean} If true waits until the image has been
- *                          loaded.
- * 
- * Returns:
- * {DOMElement} A DOM Image created with the specified attributes.
- */
-OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border,
-                                       opacity, delayDisplay) {
-
-    var image = document.createElement("img");
-
-    //set generic properties
-    if (!id) {
-        id = OpenLayers.Util.createUniqueID("OpenLayersDiv");
-    }
-    if (!position) {
-        position = "relative";
-    }
-    OpenLayers.Util.modifyDOMElement(image, id, px, sz, position, 
-                                     border, null, opacity);
-
-    if(delayDisplay) {
-        image.style.display = "none";
-        OpenLayers.Event.observe(image, "load", 
-            OpenLayers.Function.bind(OpenLayers.Util.onImageLoad, image));
-        OpenLayers.Event.observe(image, "error", 
-            OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError, image));
-        
-    }
-    
-    //set special properties
-    image.style.alt = id;
-    image.galleryImg = "no";
-    if (imgURL) {
-        image.src = imgURL;
-    }
-
-
-        
-    return image;
-};
-
-/**
- * Function: setOpacity
- * *Deprecated*.  This function has been deprecated. Instead, please use 
- *     <OpenLayers.Util.modifyDOMElement> 
- *     or 
- *     <OpenLayers.Util.modifyAlphaImageDiv>
- * 
- * Set the opacity of a DOM Element
- *     Note that for this function to work in IE, elements must "have layout"
- *     according to:
- *     http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/haslayout.asp
- *
- * Parameters:
- * element - {DOMElement} Set the opacity on this DOM element
- * opacity - {Float} Opacity value (0.0 - 1.0)
- */
-OpenLayers.Util.setOpacity = function(element, opacity) {
-    OpenLayers.Util.modifyDOMElement(element, null, null, null,
-                                     null, null, null, opacity);
-};
-
-/**
- * Function: onImageLoad
- * Bound to image load events.  For all images created with <createImage> or
- *     <createAlphaImageDiv>, this function will be bound to the load event.
- */
-OpenLayers.Util.onImageLoad = function() {
-    // The complex check here is to solve issues described in #480.
-    // Every time a map view changes, it increments the 'viewRequestID' 
-    // property. As the requests for the images for the new map view are sent
-    // out, they are tagged with this unique viewRequestID. 
-    // 
-    // If an image has no viewRequestID property set, we display it regardless, 
-    // but if it does have a viewRequestID property, we check that it matches 
-    // the viewRequestID set on the map.
-    // 
-    // If the viewRequestID on the map has changed, that means that the user
-    // has changed the map view since this specific request was sent out, and
-    // therefore this tile does not need to be displayed (so we do not execute
-    // this code that turns its display on).
-    //
-    if (!this.viewRequestID ||
-        (this.map && this.viewRequestID == this.map.viewRequestID)) { 
-        this.style.display = "";  
-    }
-    OpenLayers.Element.removeClass(this, "olImageLoadError");
-};
-
-/**
- * Property: IMAGE_RELOAD_ATTEMPTS
- * {Integer} How many times should we try to reload an image before giving up?
- *           Default is 0
- */
-OpenLayers.IMAGE_RELOAD_ATTEMPTS = 0;
-
-/**
- * Function: onImageLoadError 
- */
-OpenLayers.Util.onImageLoadError = function() {
-    this._attempts = (this._attempts) ? (this._attempts + 1) : 1;
-    if (this._attempts <= OpenLayers.IMAGE_RELOAD_ATTEMPTS) {
-        var urls = this.urls;
-        if (urls && urls instanceof Array && urls.length > 1){
-            var src = this.src.toString();
-            var current_url, k;
-            for (k = 0; current_url = urls[k]; k++){
-                if(src.indexOf(current_url) != -1){
-                    break;
-                }
-            }
-            var guess = Math.floor(urls.length * Math.random());
-            var new_url = urls[guess];
-            k = 0;
-            while(new_url == current_url && k++ < 4){
-                guess = Math.floor(urls.length * Math.random());
-                new_url = urls[guess];
-            }
-            this.src = src.replace(current_url, new_url);
-        } else {
-            this.src = this.src;
-        }
-    } else {
-        OpenLayers.Element.addClass(this, "olImageLoadError");
-    }
-    this.style.display = "";
-};
-
-/**
- * Property: alphaHackNeeded
- * {Boolean} true if the png alpha hack is necessary and possible, false otherwise.
- */
-OpenLayers.Util.alphaHackNeeded = null;
-
-/**
- * Function: alphaHack
- * Checks whether it's necessary (and possible) to use the png alpha
- * hack which allows alpha transparency for png images under Internet
- * Explorer.
- * 
- * Returns:
- * {Boolean} true if the png alpha hack is necessary and possible, false otherwise.
- */
-OpenLayers.Util.alphaHack = function() {
-    if (OpenLayers.Util.alphaHackNeeded == null) {
-        var arVersion = navigator.appVersion.split("MSIE");
-        var version = parseFloat(arVersion[1]);
-        var filter = false;
-    
-        // IEs4Lin dies when trying to access document.body.filters, because 
-        // the property is there, but requires a DLL that can't be provided. This
-        // means that we need to wrap this in a try/catch so that this can
-        // continue.
-    
-        try { 
-            filter = !!(document.body.filters);
-        } catch (e) {}    
-    
-        OpenLayers.Util.alphaHackNeeded = (filter && 
-                                           (version >= 5.5) && (version < 7));
-    }
-    return OpenLayers.Util.alphaHackNeeded;
-};
-
-/** 
- * Function: modifyAlphaImageDiv
- * 
- * div - {DOMElement} Div containing Alpha-adjusted Image
- * id - {String}
- * px - {<OpenLayers.Pixel>}
- * sz - {<OpenLayers.Size>}
- * imgURL - {String}
- * position - {String}
- * border - {String}
- * sizing {String} 'crop', 'scale', or 'image'. Default is "scale"
- * opacity - {Float} Fractional value (0.0 - 1.0)
- */ 
-OpenLayers.Util.modifyAlphaImageDiv = function(div, id, px, sz, imgURL, 
-                                               position, border, sizing, 
-                                               opacity) {
-
-    OpenLayers.Util.modifyDOMElement(div, id, px, sz, position,
-                                     null, null, opacity);
-
-    var img = div.childNodes[0];
-
-    if (imgURL) {
-        img.src = imgURL;
-    }
-    OpenLayers.Util.modifyDOMElement(img, div.id + "_innerImage", null, sz, 
-                                     "relative", border);
-    
-    if (OpenLayers.Util.alphaHack()) {
-        if(div.style.display != "none") {
-            div.style.display = "inline-block";
-        }
-        if (sizing == null) {
-            sizing = "scale";
-        }
-        
-        div.style.filter = "progid:DXImageTransform.Microsoft" +
-                           ".AlphaImageLoader(src='" + img.src + "', " +
-                           "sizingMethod='" + sizing + "')";
-        if (parseFloat(div.style.opacity) >= 0.0 && 
-            parseFloat(div.style.opacity) < 1.0) {
-            div.style.filter += " alpha(opacity=" + div.style.opacity * 100 + ")";
-        }
-
-        img.style.filter = "alpha(opacity=0)";
-    }
-};
-
-/** 
- * Function: createAlphaImageDiv
- * 
- * id - {String}
- * px - {<OpenLayers.Pixel>}
- * sz - {<OpenLayers.Size>}
- * imgURL - {String}
- * position - {String}
- * border - {String}
- * sizing - {String} 'crop', 'scale', or 'image'. Default is "scale"
- * opacity - {Float} Fractional value (0.0 - 1.0)
- * delayDisplay - {Boolean} If true waits until the image has been
- *                          loaded.
- * 
- * Returns:
- * {DOMElement} A DOM Div created with a DOM Image inside it. If the hack is 
- *              needed for transparency in IE, it is added.
- */ 
-OpenLayers.Util.createAlphaImageDiv = function(id, px, sz, imgURL, 
-                                               position, border, sizing, 
-                                               opacity, delayDisplay) {
-    
-    var div = OpenLayers.Util.createDiv();
-    var img = OpenLayers.Util.createImage(null, null, null, null, null, null, 
-                                          null, false);
-    div.appendChild(img);
-
-    if (delayDisplay) {
-        img.style.display = "none";
-        OpenLayers.Event.observe(img, "load",
-            OpenLayers.Function.bind(OpenLayers.Util.onImageLoad, div));
-        OpenLayers.Event.observe(img, "error",
-            OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError, div));
-    }
-
-    OpenLayers.Util.modifyAlphaImageDiv(div, id, px, sz, imgURL, position, 
-                                        border, sizing, opacity);
-    
-    return div;
-};
-
-
-/** 
- * Function: upperCaseObject
- * Creates a new hashtable and copies over all the keys from the 
- *     passed-in object, but storing them under an uppercased
- *     version of the key at which they were stored.
- * 
- * Parameters: 
- * object - {Object}
- * 
- * Returns: 
- * {Object} A new Object with all the same keys but uppercased
- */
-OpenLayers.Util.upperCaseObject = function (object) {
-    var uObject = {};
-    for (var key in object) {
-        uObject[key.toUpperCase()] = object[key];
-    }
-    return uObject;
-};
-
-/** 
- * Function: applyDefaults
- * Takes an object and copies any properties that don't exist from
- *     another properties, by analogy with OpenLayers.Util.extend() from
- *     Prototype.js.
- * 
- * Parameters:
- * to - {Object} The destination object.
- * from - {Object} The source object.  Any properties of this object that
- *     are undefined in the to object will be set on the to object.
- *
- * Returns:
- * {Object} A reference to the to object.  Note that the to argument is modified
- *     in place and returned by this function.
- */
-OpenLayers.Util.applyDefaults = function (to, from) {
-    to = to || {};
-    /*
-     * FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative
-     * prototype object" when calling hawOwnProperty if the source object is an
-     * instance of window.Event.
-     */
-    var fromIsEvt = typeof window.Event == "function"
-                    && from instanceof window.Event;
-
-    for (var key in from) {
-        if (to[key] === undefined ||
-            (!fromIsEvt && from.hasOwnProperty
-             && from.hasOwnProperty(key) && !to.hasOwnProperty(key))) {
-            to[key] = from[key];
-        }
-    }
-    /**
-     * IE doesn't include the toString property when iterating over an object's
-     * properties with the for(property in object) syntax.  Explicitly check if
-     * the source has its own toString property.
-     */
-    if(!fromIsEvt && from && from.hasOwnProperty
-       && from.hasOwnProperty('toString') && !to.hasOwnProperty('toString')) {
-        to.toString = from.toString;
-    }
-    
-    return to;
-};
-
-/**
- * Function: getParameterString
- * 
- * Parameters:
- * params - {Object}
- * 
- * Returns:
- * {String} A concatenation of the properties of an object in 
- *          http parameter notation. 
- *          (ex. <i>"key1=value1&key2=value2&key3=value3"</i>)
- *          If a parameter is actually a list, that parameter will then
- *          be set to a comma-seperated list of values (foo,bar) instead
- *          of being URL escaped (foo%3Abar). 
- */
-OpenLayers.Util.getParameterString = function(params) {
-    var paramsArray = [];
-    
-    for (var key in params) {
-      var value = params[key];
-      if ((value != null) && (typeof value != 'function')) {
-        var encodedValue;
-        if (typeof value == 'object' && value.constructor == Array) {
-          /* value is an array; encode items and separate with "," */
-          var encodedItemArray = [];
-          var item;
-          for (var itemIndex=0, len=value.length; itemIndex<len; itemIndex++) {
-            item = value[itemIndex];
-            encodedItemArray.push(encodeURIComponent(
-                (item === null || item === undefined) ? "" : item)
-            );
-          }
-          encodedValue = encodedItemArray.join(",");
-        }
-        else {
-          /* value is a string; simply encode */
-          encodedValue = encodeURIComponent(value);
-        }
-        paramsArray.push(encodeURIComponent(key) + "=" + encodedValue);
-      }
-    }
-    
-    return paramsArray.join("&");
-};
-
-/**
- * Function: urlAppend
- * Appends a parameter string to a url. This function includes the logic for
- * using the appropriate character (none, & or ?) to append to the url before
- * appending the param string.
- * 
- * Parameters:
- * url - {String} The url to append to
- * paramStr - {String} The param string to append
- * 
- * Returns:
- * {String} The new url
- */
-OpenLayers.Util.urlAppend = function(url, paramStr) {
-    var newUrl = url;
-    if(paramStr) {
-        var parts = (url + " ").split(/[?&]/);
-        newUrl += (parts.pop() === " " ?
-            paramStr :
-            parts.length ? "&" + paramStr : "?" + paramStr);
-    }
-    return newUrl;
-};
-
-/**
- * Property: ImgPath
- * {String} Default is ''.
- */
-OpenLayers.ImgPath = '';
-
-/** 
- * Function: getImagesLocation
- * 
- * Returns:
- * {String} The fully formatted image location string
- */
-OpenLayers.Util.getImagesLocation = function() {
-    return OpenLayers.ImgPath || (OpenLayers._getScriptLocation() + "img/");
-};
-
-
-/** 
- * Function: Try
- * Execute functions until one of them doesn't throw an error. 
- *     Capitalized because "try" is a reserved word in JavaScript.
- *     Taken directly from OpenLayers.Util.Try()
- * 
- * Parameters:
- * [*] - {Function} Any number of parameters may be passed to Try()
- *    It will attempt to execute each of them until one of them 
- *    successfully executes. 
- *    If none executes successfully, returns null.
- * 
- * Returns:
- * {*} The value returned by the first successfully executed function.
- */
-OpenLayers.Util.Try = function() {
-    var returnValue = null;
-
-    for (var i=0, len=arguments.length; i<len; i++) {
-      var lambda = arguments[i];
-      try {
-        returnValue = lambda();
-        break;
-      } catch (e) {}
-    }
-
-    return returnValue;
-};
-
-
-/** 
- * Function: getNodes
- * 
- * These could/should be made namespace aware?
- * 
- * Parameters:
- * p - {}
- * tagName - {String}
- * 
- * Returns:
- * {Array}
- */
-OpenLayers.Util.getNodes=function(p, tagName) {
-    var nodes = OpenLayers.Util.Try(
-        function () {
-            return OpenLayers.Util._getNodes(p.documentElement.childNodes,
-                                            tagName);
-        },
-        function () {
-            return OpenLayers.Util._getNodes(p.childNodes, tagName);
-        }
-    );
-    return nodes;
-};
-
-/**
- * Function: _getNodes
- * 
- * Parameters:
- * nodes - {Array}
- * tagName - {String}
- * 
- * Returns:
- * {Array}
- */
-OpenLayers.Util._getNodes=function(nodes, tagName) {
-    var retArray = [];
-    for (var i=0, len=nodes.length; i<len; i++) {
-        if (nodes[i].nodeName==tagName) {
-            retArray.push(nodes[i]);
-        }
-    }
-
-    return retArray;
-};
-
-
-
-/**
- * Function: getTagText
- * 
- * Parameters:
- * parent - {}
- * item - {String}
- * index - {Integer}
- * 
- * Returns:
- * {String}
- */
-OpenLayers.Util.getTagText = function (parent, item, index) {
-    var result = OpenLayers.Util.getNodes(parent, item);
-    if (result && (result.length > 0))
-    {
-        if (!index) {
-            index=0;
-        }
-        if (result[index].childNodes.length > 1) {
-            return result.childNodes[1].nodeValue; 
-        }
-        else if (result[index].childNodes.length == 1) {
-            return result[index].firstChild.nodeValue; 
-        }
-    } else { 
-        return ""; 
-    }
-};
-
-/**
- * Function: getXmlNodeValue
- * 
- * Parameters:
- * node - {XMLNode}
- * 
- * Returns:
- * {String} The text value of the given node, without breaking in firefox or IE
- */
-OpenLayers.Util.getXmlNodeValue = function(node) {
-    var val = null;
-    OpenLayers.Util.Try( 
-        function() {
-            val = node.text;
-            if (!val) {
-                val = node.textContent;
-            }
-            if (!val) {
-                val = node.firstChild.nodeValue;
-            }
-        }, 
-        function() {
-            val = node.textContent;
-        }); 
-    return val;
-};
-
-/** 
- * Function: mouseLeft
- * 
- * Parameters:
- * evt - {Event}
- * div - {HTMLDivElement}
- * 
- * Returns:
- * {Boolean}
- */
-OpenLayers.Util.mouseLeft = function (evt, div) {
-    // start with the element to which the mouse has moved
-    var target = (evt.relatedTarget) ? evt.relatedTarget : evt.toElement;
-    // walk up the DOM tree.
-    while (target != div && target != null) {
-        target = target.parentNode;
-    }
-    // if the target we stop at isn't the div, then we've left the div.
-    return (target != div);
-};
-
-/**
- * Property: precision
- * {Number} The number of significant digits to retain to avoid
- * floating point precision errors.
- *
- * We use 14 as a "safe" default because, although IEEE 754 double floats
- * (standard on most modern operating systems) support up to about 16
- * significant digits, 14 significant digits are sufficient to represent
- * sub-millimeter accuracy in any coordinate system that anyone is likely to
- * use with OpenLayers.
- *
- * If DEFAULT_PRECISION is set to 0, the original non-truncating behavior
- * of OpenLayers <2.8 is preserved. Be aware that this will cause problems
- * with certain projections, e.g. spherical Mercator.
- *
- */
-OpenLayers.Util.DEFAULT_PRECISION = 14;
-
-/**
- * Function: toFloat
- * Convenience method to cast an object to a Number, rounded to the
- * desired floating point precision.
- *
- * Parameters:
- * number    - {Number} The number to cast and round.
- * precision - {Number} An integer suitable for use with
- *      Number.toPrecision(). Defaults to OpenLayers.Util.DEFAULT_PRECISION.
- *      If set to 0, no rounding is performed.
- *
- * Returns:
- * {Number} The cast, rounded number.
- */
-OpenLayers.Util.toFloat = function (number, precision) {
-    if (precision == null) {
-        precision = OpenLayers.Util.DEFAULT_PRECISION;
-    }
-    var number;
-    if (precision == 0) {
-        number = parseFloat(number);
-    } else {
-        number = parseFloat(parseFloat(number).toPrecision(precision));
-    }
-    return number;
-};
-
-/**
- * Function: rad
- * 
- * Parameters:
- * x - {Float}
- * 
- * Returns:
- * {Float}
- */
-OpenLayers.Util.rad = function(x) {return x*Math.PI/180;};
-
-/**
- * Function: deg
- *
- * Parameters:
- * x - {Float}
- *
- * Returns:
- * {Float}
- */
-OpenLayers.Util.deg = function(x) {return x*180/Math.PI;};
-
-/**
- * Property: VincentyConstants
- * {Object} Constants for Vincenty functions.
- */
-OpenLayers.Util.VincentyConstants = {
-    a: 6378137,
-    b: 6356752.3142,
-    f: 1/298.257223563
-};
-
-/**
- * APIFunction: distVincenty
- * Given two objects representing points with geographic coordinates, this
- *     calculates the distance between those points on the surface of an
- *     ellipsoid.
- *
- * Parameters:
- * p1 - {<OpenLayers.LonLat>} (or any object with both .lat, .lon properties)
- * p2 - {<OpenLayers.LonLat>} (or any object with both .lat, .lon properties)
- *
- * Returns:
- * {Float} The distance (in km) between the two input points as measured on an
- *     ellipsoid.  Note that the input point objects must be in geographic
- *     coordinates (decimal degrees) and the return distance is in kilometers.
- */
-OpenLayers.Util.distVincenty = function(p1, p2) {
-    var ct = OpenLayers.Util.VincentyConstants;
-    var a = ct.a, b = ct.b, f = ct.f;
-
-    var L = OpenLayers.Util.rad(p2.lon - p1.lon);
-    var U1 = Math.atan((1-f) * Math.tan(OpenLayers.Util.rad(p1.lat)));
-    var U2 = Math.atan((1-f) * Math.tan(OpenLayers.Util.rad(p2.lat)));
-    var sinU1 = Math.sin(U1), cosU1 = Math.cos(U1);
-    var sinU2 = Math.sin(U2), cosU2 = Math.cos(U2);
-    var lambda = L, lambdaP = 2*Math.PI;
-    var iterLimit = 20;
-    while (Math.abs(lambda-lambdaP) > 1e-12 && --iterLimit>0) {
-        var sinLambda = Math.sin(lambda), cosLambda = Math.cos(lambda);
-        var sinSigma = Math.sqrt((cosU2*sinLambda) * (cosU2*sinLambda) +
-        (cosU1*sinU2-sinU1*cosU2*cosLambda) * (cosU1*sinU2-sinU1*cosU2*cosLambda));
-        if (sinSigma==0) {
-            return 0;  // co-incident points
-        }
-        var cosSigma = sinU1*sinU2 + cosU1*cosU2*cosLambda;
-        var sigma = Math.atan2(sinSigma, cosSigma);
-        var alpha = Math.asin(cosU1 * cosU2 * sinLambda / sinSigma);
-        var cosSqAlpha = Math.cos(alpha) * Math.cos(alpha);
-        var cos2SigmaM = cosSigma - 2*sinU1*sinU2/cosSqAlpha;
-        var C = f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));
-        lambdaP = lambda;
-        lambda = L + (1-C) * f * Math.sin(alpha) *
-        (sigma + C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));
-    }
-    if (iterLimit==0) {
-        return NaN;  // formula failed to converge
-    }
-    var uSq = cosSqAlpha * (a*a - b*b) / (b*b);
-    var A = 1 + uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));
-    var B = uSq/1024 * (256+uSq*(-128+uSq*(74-47*uSq)));
-    var deltaSigma = B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-
-        B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));
-    var s = b*A*(sigma-deltaSigma);
-    var d = s.toFixed(3)/1000; // round to 1mm precision
-    return d;
-};
-
-/**
- * APIFunction: destinationVincenty
- * Calculate destination point given start point lat/long (numeric degrees),
- * bearing (numeric degrees) & distance (in m).
- * Adapted from Chris Veness work, see
- * http://www.movable-type.co.uk/scripts/latlong-vincenty-direct.html
- *
- * Parameters:
- * lonlat  - {<OpenLayers.LonLat>} (or any object with both .lat, .lon
- *     properties) The start point.
- * brng     - {Float} The bearing (degrees).
- * distance - {Float} The ground distance (meters).
- *
- * Returns:
- * {<OpenLayers.LonLat>} The destination point.
- */
-OpenLayers.Util.destinationVincenty = function(lonlat, brng, dist) {
-    var u = OpenLayers.Util;
-    var ct = u.VincentyConstants;
-    var a = ct.a, b = ct.b, f = ct.f;
-
-    var lon1 = lonlat.lon;
-    var lat1 = lonlat.lat;
-
-    var s = dist;
-    var alpha1 = u.rad(brng);
-    var sinAlpha1 = Math.sin(alpha1);
-    var cosAlpha1 = Math.cos(alpha1);
-
-    var tanU1 = (1-f) * Math.tan(u.rad(lat1));
-    var cosU1 = 1 / Math.sqrt((1 + tanU1*tanU1)), sinU1 = tanU1*cosU1;
-    var sigma1 = Math.atan2(tanU1, cosAlpha1);
-    var sinAlpha = cosU1 * sinAlpha1;
-    var cosSqAlpha = 1 - sinAlpha*sinAlpha;
-    var uSq = cosSqAlpha * (a*a - b*b) / (b*b);
-    var A = 1 + uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));
-    var B = uSq/1024 * (256+uSq*(-128+uSq*(74-47*uSq)));
-
-    var sigma = s / (b*A), sigmaP = 2*Math.PI;
-    while (Math.abs(sigma-sigmaP) > 1e-12) {
-        var cos2SigmaM = Math.cos(2*sigma1 + sigma);
-        var sinSigma = Math.sin(sigma);
-        var cosSigma = Math.cos(sigma);
-        var deltaSigma = B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-
-            B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));
-        sigmaP = sigma;
-        sigma = s / (b*A) + deltaSigma;
-    }
-
-    var tmp = sinU1*sinSigma - cosU1*cosSigma*cosAlpha1;
-    var lat2 = Math.atan2(sinU1*cosSigma + cosU1*sinSigma*cosAlpha1,
-        (1-f)*Math.sqrt(sinAlpha*sinAlpha + tmp*tmp));
-    var lambda = Math.atan2(sinSigma*sinAlpha1, cosU1*cosSigma - sinU1*sinSigma*cosAlpha1);
-    var C = f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));
-    var L = lambda - (1-C) * f * sinAlpha *
-        (sigma + C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));
-
-    var revAz = Math.atan2(sinAlpha, -tmp);  // final bearing
-
-    return new OpenLayers.LonLat(lon1+u.deg(L), u.deg(lat2));
-};
-
-/**
- * Function: getParameters
- * Parse the parameters from a URL or from the current page itself into a 
- *     JavaScript Object. Note that parameter values with commas are separated
- *     out into an Array.
- * 
- * Parameters:
- * url - {String} Optional url used to extract the query string.
- *                If null, query string is taken from page location.
- * 
- * Returns:
- * {Object} An object of key/value pairs from the query string.
- */
-OpenLayers.Util.getParameters = function(url) {
-    // if no url specified, take it from the location bar
-    url = url || window.location.href;
-
-    //parse out parameters portion of url string
-    var paramsString = "";
-    if (OpenLayers.String.contains(url, '?')) {
-        var start = url.indexOf('?') + 1;
-        var end = OpenLayers.String.contains(url, "#") ?
-                    url.indexOf('#') : url.length;
-        paramsString = url.substring(start, end);
-    }
-
-    var parameters = {};
-    var pairs = paramsString.split(/[&;]/);
-    for(var i=0, len=pairs.length; i<len; ++i) {
-        var keyValue = pairs[i].split('=');
-        if (keyValue[0]) {
-            var key = decodeURIComponent(keyValue[0]);
-            var value = keyValue[1] || ''; //empty string if no value
-
-            //decode individual values (being liberal by replacing "+" with " ")
-            value = decodeURIComponent(value.replace(/\+/g, " ")).split(",");
-
-            //if there's only one value, do not return as array                    
-            if (value.length == 1) {
-                value = value[0];
-            }                
-            
-            parameters[key] = value;
-         }
-     }
-    return parameters;
-};
-
-/**
- * Function: getArgs
- * *Deprecated*.  Will be removed in 3.0.  Please use instead
- *     <OpenLayers.Util.getParameters>
- * 
- * Parameters:
- * url - {String} Optional url used to extract the query string.
- *                If null, query string is taken from page location.
- * 
- * Returns:
- * {Object} An object of key/value pairs from the query string.
- */
-OpenLayers.Util.getArgs = function(url) {
-    OpenLayers.Console.warn(
-        OpenLayers.i18n(
-            "methodDeprecated", {'newMethod': 'OpenLayers.Util.getParameters'}
-        )
-    );
-    return OpenLayers.Util.getParameters(url);
-};
-
-/**
- * Property: lastSeqID
- * {Integer} The ever-incrementing count variable.
- *           Used for generating unique ids.
- */
-OpenLayers.Util.lastSeqID = 0;
-
-/**
- * Function: createUniqueID
- * Create a unique identifier for this session.  Each time this function
- *     is called, a counter is incremented.  The return will be the optional
- *     prefix (defaults to "id_") appended with the counter value.
- * 
- * Parameters:
- * prefix {String} Optionsal string to prefix unique id. Default is "id_".
- * 
- * Returns:
- * {String} A unique id string, built on the passed in prefix.
- */
-OpenLayers.Util.createUniqueID = function(prefix) {
-    if (prefix == null) {
-        prefix = "id_";
-    }
-    OpenLayers.Util.lastSeqID += 1; 
-    return prefix + OpenLayers.Util.lastSeqID;        
-};
-
-/**
- * Constant: INCHES_PER_UNIT
- * {Object} Constant inches per unit -- borrowed from MapServer mapscale.c
- * derivation of nautical miles from http://en.wikipedia.org/wiki/Nautical_mile
- * Includes the full set of units supported by CS-MAP (http://trac.osgeo.org/csmap/)
- * and PROJ.4 (http://trac.osgeo.org/proj/)
- * The hardcoded table is maintain in a CS-MAP source code module named CSdataU.c
- * The hardcoded table of PROJ.4 units are in pj_units.c.
- */
-OpenLayers.INCHES_PER_UNIT = { 
-    'inches': 1.0,
-    'ft': 12.0,
-    'mi': 63360.0,
-    'm': 39.3701,
-    'km': 39370.1,
-    'dd': 4374754,
-    'yd': 36
-};
-OpenLayers.INCHES_PER_UNIT["in"]= OpenLayers.INCHES_PER_UNIT.inches;
-OpenLayers.INCHES_PER_UNIT["degrees"] = OpenLayers.INCHES_PER_UNIT.dd;
-OpenLayers.INCHES_PER_UNIT["nmi"] = 1852 * OpenLayers.INCHES_PER_UNIT.m;
-
-// Units from CS-Map
-OpenLayers.METERS_PER_INCH = 0.02540005080010160020;
-OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT, {
-    "Inch": OpenLayers.INCHES_PER_UNIT.inches,
-    "Meter": 1.0 / OpenLayers.METERS_PER_INCH,   //EPSG:9001
-    "Foot": 0.30480060960121920243 / OpenLayers.METERS_PER_INCH,   //EPSG:9003
-    "IFoot": 0.30480000000000000000 / OpenLayers.METERS_PER_INCH,   //EPSG:9002
-    "ClarkeFoot": 0.3047972651151 / OpenLayers.METERS_PER_INCH,   //EPSG:9005
-    "SearsFoot": 0.30479947153867624624 / OpenLayers.METERS_PER_INCH,   //EPSG:9041
-    "GoldCoastFoot": 0.30479971018150881758 / OpenLayers.METERS_PER_INCH,   //EPSG:9094
-    "IInch": 0.02540000000000000000 / OpenLayers.METERS_PER_INCH,
-    "MicroInch": 0.00002540000000000000 / OpenLayers.METERS_PER_INCH,
-    "Mil": 0.00000002540000000000 / OpenLayers.METERS_PER_INCH,
-    "Centimeter": 0.01000000000000000000 / OpenLayers.METERS_PER_INCH,
-    "Kilometer": 1000.00000000000000000000 / OpenLayers.METERS_PER_INCH,   //EPSG:9036
-    "Yard": 0.91440182880365760731 / OpenLayers.METERS_PER_INCH,
-    "SearsYard": 0.914398414616029 / OpenLayers.METERS_PER_INCH,   //EPSG:9040
-    "IndianYard": 0.91439853074444079983 / OpenLayers.METERS_PER_INCH,   //EPSG:9084
-    "IndianYd37": 0.91439523 / OpenLayers.METERS_PER_INCH,   //EPSG:9085
-    "IndianYd62": 0.9143988 / OpenLayers.METERS_PER_INCH,   //EPSG:9086
-    "IndianYd75": 0.9143985 / OpenLayers.METERS_PER_INCH,   //EPSG:9087
-    "IndianFoot": 0.30479951 / OpenLayers.METERS_PER_INCH,   //EPSG:9080
-    "IndianFt37": 0.30479841 / OpenLayers.METERS_PER_INCH,   //EPSG:9081
-    "IndianFt62": 0.3047996 / OpenLayers.METERS_PER_INCH,   //EPSG:9082
-    "IndianFt75": 0.3047995 / OpenLayers.METERS_PER_INCH,   //EPSG:9083
-    "Mile": 1609.34721869443738887477 / OpenLayers.METERS_PER_INCH,
-    "IYard": 0.91440000000000000000 / OpenLayers.METERS_PER_INCH,   //EPSG:9096
-    "IMile": 1609.34400000000000000000 / OpenLayers.METERS_PER_INCH,   //EPSG:9093
-    "NautM": 1852.00000000000000000000 / OpenLayers.METERS_PER_INCH,   //EPSG:9030
-    "Lat-66": 110943.316488932731 / OpenLayers.METERS_PER_INCH,
-    "Lat-83": 110946.25736872234125 / OpenLayers.METERS_PER_INCH,
-    "Decimeter": 0.10000000000000000000 / OpenLayers.METERS_PER_INCH,
-    "Millimeter": 0.00100000000000000000 / OpenLayers.METERS_PER_INCH,
-    "Dekameter": 10.00000000000000000000 / OpenLayers.METERS_PER_INCH,
-    "Decameter": 10.00000000000000000000 / OpenLayers.METERS_PER_INCH,
-    "Hectometer": 100.00000000000000000000 / OpenLayers.METERS_PER_INCH,
-    "GermanMeter": 1.0000135965 / OpenLayers.METERS_PER_INCH,   //EPSG:9031
-    "CaGrid": 0.999738 / OpenLayers.METERS_PER_INCH,
-    "ClarkeChain": 20.1166194976 / OpenLayers.METERS_PER_INCH,   //EPSG:9038
-    "GunterChain": 20.11684023368047 / OpenLayers.METERS_PER_INCH,   //EPSG:9033
-    "BenoitChain": 20.116782494375872 / OpenLayers.METERS_PER_INCH,   //EPSG:9062
-    "SearsChain": 20.11676512155 / OpenLayers.METERS_PER_INCH,   //EPSG:9042
-    "ClarkeLink": 0.201166194976 / OpenLayers.METERS_PER_INCH,   //EPSG:9039
-    "GunterLink": 0.2011684023368047 / OpenLayers.METERS_PER_INCH,   //EPSG:9034
-    "BenoitLink": 0.20116782494375872 / OpenLayers.METERS_PER_INCH,   //EPSG:9063
-    "SearsLink": 0.2011676512155 / OpenLayers.METERS_PER_INCH,   //EPSG:9043
-    "Rod": 5.02921005842012 / OpenLayers.METERS_PER_INCH,
-    "IntnlChain": 20.1168 / OpenLayers.METERS_PER_INCH,   //EPSG:9097
-    "IntnlLink": 0.201168 / OpenLayers.METERS_PER_INCH,   //EPSG:9098
-    "Perch": 5.02921005842012 / OpenLayers.METERS_PER_INCH,
-    "Pole": 5.02921005842012 / OpenLayers.METERS_PER_INCH,
-    "Furlong": 201.1684023368046 / OpenLayers.METERS_PER_INCH,
-    "Rood": 3.778266898 / OpenLayers.METERS_PER_INCH,
-    "CapeFoot": 0.3047972615 / OpenLayers.METERS_PER_INCH,
-    "Brealey": 375.00000000000000000000 / OpenLayers.METERS_PER_INCH,
-    "ModAmFt": 0.304812252984505969011938 / OpenLayers.METERS_PER_INCH,
-    "Fathom": 1.8288 / OpenLayers.METERS_PER_INCH,
-    "NautM-UK": 1853.184 / OpenLayers.METERS_PER_INCH,
-    "50kilometers": 50000.0 / OpenLayers.METERS_PER_INCH,
-    "150kilometers": 150000.0 / OpenLayers.METERS_PER_INCH
-});
-
-//unit abbreviations supported by PROJ.4
-OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT, {
-    "mm": OpenLayers.INCHES_PER_UNIT["Meter"] / 1000.0,
-    "cm": OpenLayers.INCHES_PER_UNIT["Meter"] / 100.0,
-    "dm": OpenLayers.INCHES_PER_UNIT["Meter"] * 100.0,
-    "km": OpenLayers.INCHES_PER_UNIT["Meter"] * 1000.0,
-    "kmi": OpenLayers.INCHES_PER_UNIT["nmi"],    //International Nautical Mile
-    "fath": OpenLayers.INCHES_PER_UNIT["Fathom"], //International Fathom
-    "ch": OpenLayers.INCHES_PER_UNIT["IntnlChain"],  //International Chain
-    "link": OpenLayers.INCHES_PER_UNIT["IntnlLink"], //International Link
-    "us-in": OpenLayers.INCHES_PER_UNIT["inches"], //U.S. Surveyor's Inch
-    "us-ft": OpenLayers.INCHES_PER_UNIT["Foot"],	//U.S. Surveyor's Foot
-    "us-yd": OpenLayers.INCHES_PER_UNIT["Yard"],	//U.S. Surveyor's Yard
-    "us-ch": OpenLayers.INCHES_PER_UNIT["GunterChain"], //U.S. Surveyor's Chain
-    "us-mi": OpenLayers.INCHES_PER_UNIT["Mile"],   //U.S. Surveyor's Statute Mile
-    "ind-yd": OpenLayers.INCHES_PER_UNIT["IndianYd37"],  //Indian Yard
-    "ind-ft": OpenLayers.INCHES_PER_UNIT["IndianFt37"],  //Indian Foot
-    "ind-ch": 20.11669506 / OpenLayers.METERS_PER_INCH  //Indian Chain
-});
-
-/** 
- * Constant: DOTS_PER_INCH
- * {Integer} 72 (A sensible default)
- */
-OpenLayers.DOTS_PER_INCH = 72;
-
-/**
- * Function: normalizeScale
- * 
- * Parameters:
- * scale - {float}
- * 
- * Returns:
- * {Float} A normalized scale value, in 1 / X format. 
- *         This means that if a value less than one ( already 1/x) is passed
- *         in, it just returns scale directly. Otherwise, it returns 
- *         1 / scale
- */
-OpenLayers.Util.normalizeScale = function (scale) {
-    var normScale = (scale > 1.0) ? (1.0 / scale) 
-                                  : scale;
-    return normScale;
-};
-
-/**
- * Function: getResolutionFromScale
- * 
- * Parameters:
- * scale - {Float}
- * units - {String} Index into OpenLayers.INCHES_PER_UNIT hashtable.
- *                  Default is degrees
- * 
- * Returns:
- * {Float} The corresponding resolution given passed-in scale and unit 
- *     parameters.  If the given scale is falsey, the returned resolution will
- *     be undefined.
- */
-OpenLayers.Util.getResolutionFromScale = function (scale, units) {
-    var resolution;
-    if (scale) {
-        if (units == null) {
-            units = "degrees";
-        }
-        var normScale = OpenLayers.Util.normalizeScale(scale);
-        resolution = 1 / (normScale * OpenLayers.INCHES_PER_UNIT[units]
-                                        * OpenLayers.DOTS_PER_INCH);        
-    }
-    return resolution;
-};
-
-/**
- * Function: getScaleFromResolution
- * 
- * Parameters:
- * resolution - {Float}
- * units - {String} Index into OpenLayers.INCHES_PER_UNIT hashtable.
- *                  Default is degrees
- * 
- * Returns:
- * {Float} The corresponding scale given passed-in resolution and unit 
- *         parameters.
- */
-OpenLayers.Util.getScaleFromResolution = function (resolution, units) {
-
-    if (units == null) {
-        units = "degrees";
-    }
-
-    var scale = resolution * OpenLayers.INCHES_PER_UNIT[units] *
-                    OpenLayers.DOTS_PER_INCH;
-    return scale;
-};
-
-/**
- * Function: safeStopPropagation
- * *Deprecated*. This function has been deprecated. Please use directly 
- *     <OpenLayers.Event.stop> passing 'true' as the 2nd 
- *     argument (preventDefault)
- * 
- * Safely stop the propagation of an event *without* preventing
- *   the default browser action from occurring.
- * 
- * Parameter:
- * evt - {Event}
- */
-OpenLayers.Util.safeStopPropagation = function(evt) {
-    OpenLayers.Event.stop(evt, true);
-};
-
-/**
- * Function: pagePositon
- * Calculates the position of an element on the page. 
- *
- * Parameters:
- * forElement - {DOMElement}
- * 
- * Returns:
- * {Array} two item array, L value then T value.
- */
-OpenLayers.Util.pagePosition = function(forElement) {
-    var valueT = 0, valueL = 0;
-
-    var element = forElement;
-    var child = forElement;
-    while(element) {
-
-        if(element == document.body) {
-            if(OpenLayers.Element.getStyle(child, 'position') == 'absolute') {
-                break;
-            }
-        }
-        
-        valueT += element.offsetTop  || 0;
-        valueL += element.offsetLeft || 0;
-
-        child = element;
-        try {
-            // wrapping this in a try/catch because IE chokes on the offsetParent
-            element = element.offsetParent;
-        } catch(e) {
-            OpenLayers.Console.error(OpenLayers.i18n(
-                                  "pagePositionFailed",{'elemId':element.id}));
-            break;
-        }
-    }
-
-    element = forElement;
-    while(element) {
-        valueT -= element.scrollTop  || 0;
-        valueL -= element.scrollLeft || 0;
-        element = element.parentNode;
-    }
-    
-    return [valueL, valueT];
-};
-
-
-/** 
- * Function: isEquivalentUrl
- * Test two URLs for equivalence. 
- * 
- * Setting 'ignoreCase' allows for case-independent comparison.
- * 
- * Comparison is based on: 
- *  - Protocol
- *  - Host (evaluated without the port)
- *  - Port (set 'ignorePort80' to ignore "80" values)
- *  - Hash ( set 'ignoreHash' to disable)
- *  - Pathname (for relative <-> absolute comparison) 
- *  - Arguments (so they can be out of order)
- *  
- * Parameters:
- * url1 - {String}
- * url2 - {String}
- * options - {Object} Allows for customization of comparison:
- *                    'ignoreCase' - Default is True
- *                    'ignorePort80' - Default is True
- *                    'ignoreHash' - Default is True
- *
- * Returns:
- * {Boolean} Whether or not the two URLs are equivalent
- */
-OpenLayers.Util.isEquivalentUrl = function(url1, url2, options) {
-    options = options || {};
-
-    OpenLayers.Util.applyDefaults(options, {
-        ignoreCase: true,
-        ignorePort80: true,
-        ignoreHash: true
-    });
-
-    var urlObj1 = OpenLayers.Util.createUrlObject(url1, options);
-    var urlObj2 = OpenLayers.Util.createUrlObject(url2, options);
-
-    //compare all keys except for "args" (treated below)
-    for(var key in urlObj1) {
-        if(key !== "args") {
-            if(urlObj1[key] != urlObj2[key]) {
-                return false;
-            }
-        }
-    }
-
-    // compare search args - irrespective of order
-    for(var key in urlObj1.args) {
-        if(urlObj1.args[key] != urlObj2.args[key]) {
-            return false;
-        }
-        delete urlObj2.args[key];
-    }
-    // urlObj2 shouldn't have any args left
-    for(var key in urlObj2.args) {
-        return false;
-    }
-    
-    return true;
-};
-
-/**
- * Function: createUrlObject
- * 
- * Parameters:
- * url - {String}
- * options - {Object} A hash of options.  Can be one of:
- *            ignoreCase: lowercase url,
- *            ignorePort80: don't include explicit port if port is 80,
- *            ignoreHash: Don't include part of url after the hash (#).
- * 
- * Returns:
- * {Object} An object with separate url, a, port, host, and args parsed out 
- *          and ready for comparison
- */
-OpenLayers.Util.createUrlObject = function(url, options) {
-    options = options || {};
-
-    // deal with relative urls first
-    if(!(/^\w+:\/\//).test(url)) {
-        var loc = window.location;
-        var port = loc.port ? ":" + loc.port : "";
-        var fullUrl = loc.protocol + "//" + loc.host.split(":").shift() + port;
-        if(url.indexOf("/") === 0) {
-            // full pathname
-            url = fullUrl + url;
-        } else {
-            // relative to current path
-            var parts = loc.pathname.split("/");
-            parts.pop();
-            url = fullUrl + parts.join("/") + "/" + url;
-        }
-    }
-  
-    if (options.ignoreCase) {
-        url = url.toLowerCase(); 
-    }
-
-    var a = document.createElement('a');
-    a.href = url;
-    
-    var urlObject = {};
-    
-    //host (without port)
-    urlObject.host = a.host.split(":").shift();
-
-    //protocol
-    urlObject.protocol = a.protocol;  
-
-    //port (get uniform browser behavior with port 80 here)
-    if(options.ignorePort80) {
-        urlObject.port = (a.port == "80" || a.port == "0") ? "" : a.port;
-    } else {
-        urlObject.port = (a.port == "" || a.port == "0") ? "80" : a.port;
-    }
-
-    //hash
-    urlObject.hash = (options.ignoreHash || a.hash === "#") ? "" : a.hash;  
-    
-    //args
-    var queryString = a.search;
-    if (!queryString) {
-        var qMark = url.indexOf("?");
-        queryString = (qMark != -1) ? url.substr(qMark) : "";
-    }
-    urlObject.args = OpenLayers.Util.getParameters(queryString);
-
-    //pathname (uniform browser behavior with leading "/")
-    urlObject.pathname = (a.pathname.charAt(0) == "/") ? a.pathname : "/" + a.pathname;
-    
-    return urlObject; 
-};
- 
-/**
- * Function: removeTail
- * Takes a url and removes everything after the ? and #
- * 
- * Parameters:
- * url - {String} The url to process
- * 
- * Returns:
- * {String} The string with all queryString and Hash removed
- */
-OpenLayers.Util.removeTail = function(url) {
-    var head = null;
-    
-    var qMark = url.indexOf("?");
-    var hashMark = url.indexOf("#");
-
-    if (qMark == -1) {
-        head = (hashMark != -1) ? url.substr(0,hashMark) : url;
-    } else {
-        head = (hashMark != -1) ? url.substr(0,Math.min(qMark, hashMark)) 
-                                  : url.substr(0, qMark);
-    }
-    return head;
-};
-
-
-/**
- * Function: getBrowserName
- * 
- * Returns:
- * {String} A string which specifies which is the current 
- *          browser in which we are running. 
- * 
- *          Currently-supported browser detection and codes:
- *           * 'opera' -- Opera
- *           * 'msie'  -- Internet Explorer
- *           * 'safari' -- Safari
- *           * 'firefox' -- FireFox
- *           * 'mozilla' -- Mozilla
- * 
- *          If we are unable to property identify the browser, we 
- *           return an empty string.
- */
-OpenLayers.Util.getBrowserName = function() {
-    var browserName = "";
-    
-    var ua = navigator.userAgent.toLowerCase();
-    if ( ua.indexOf( "opera" ) != -1 ) {
-        browserName = "opera";
-    } else if ( ua.indexOf( "msie" ) != -1 ) {
-        browserName = "msie";
-    } else if ( ua.indexOf( "safari" ) != -1 ) {
-        browserName = "safari";
-    } else if ( ua.indexOf( "mozilla" ) != -1 ) {
-        if ( ua.indexOf( "firefox" ) != -1 ) {
-            browserName = "firefox";
-        } else {
-            browserName = "mozilla";
-        }
-    }
-    
-    return browserName;
-};
-
-
-
-    
-/**
- * Method: getRenderedDimensions
- * Renders the contentHTML offscreen to determine actual dimensions for
- *     popup sizing. As we need layout to determine dimensions the content
- *     is rendered -9999px to the left and absolute to ensure the 
- *     scrollbars do not flicker
- *     
- * Parameters:
- * contentHTML
- * size - {<OpenLayers.Size>} If either the 'w' or 'h' properties is 
- *     specified, we fix that dimension of the div to be measured. This is 
- *     useful in the case where we have a limit in one dimension and must 
- *     therefore meaure the flow in the other dimension.
- * options - {Object}
- *     displayClass - {String} Optional parameter.  A CSS class name(s) string
- *         to provide the CSS context of the rendered content.
- *     containerElement - {DOMElement} Optional parameter. Insert the HTML to 
- *         this node instead of the body root when calculating dimensions. 
- * 
- * Returns:
- * {OpenLayers.Size}
- */
-OpenLayers.Util.getRenderedDimensions = function(contentHTML, size, options) {
-    
-    var w, h;
-    
-    // create temp container div with restricted size
-    var container = document.createElement("div");
-    container.style.visibility = "hidden";
-        
-    var containerElement = (options && options.containerElement) 
-    	? options.containerElement : document.body;
-
-    //fix a dimension, if specified.
-    if (size) {
-        if (size.w) {
-            w = size.w;
-            container.style.width = w + "px";
-        } else if (size.h) {
-            h = size.h;
-            container.style.height = h + "px";
-        }
-    }
-
-    //add css classes, if specified
-    if (options && options.displayClass) {
-        container.className = options.displayClass;
-    }
-    
-    // create temp content div and assign content
-    var content = document.createElement("div");
-    content.innerHTML = contentHTML;
-    
-    // we need overflow visible when calculating the size
-    content.style.overflow = "visible";
-    if (content.childNodes) {
-        for (var i=0, l=content.childNodes.length; i<l; i++) {
-            if (!content.childNodes[i].style) continue;
-            content.childNodes[i].style.overflow = "visible";
-        }
-    }
-    
-    // add content to restricted container 
-    container.appendChild(content);
-    
-    // append container to body for rendering
-    containerElement.appendChild(container);
-    
-    // Opera and IE7 can't handle a node with position:aboslute if it inherits
-    // position:absolute from a parent.
-    var parentHasPositionAbsolute = false;
-    var parent = container.parentNode;
-    while (parent && parent.tagName.toLowerCase()!="body") {
-        var parentPosition = OpenLayers.Element.getStyle(parent, "position");
-        if(parentPosition == "absolute") {
-            parentHasPositionAbsolute = true;
-            break;
-        } else if (parentPosition && parentPosition != "static") {
-            break;
-        }
-        parent = parent.parentNode;
-    }
-
-    if(!parentHasPositionAbsolute) {
-        container.style.position = "absolute";
-    }
-    
-    // calculate scroll width of content and add corners and shadow width
-    if (!w) {
-        w = parseInt(content.scrollWidth);
-    
-        // update container width to allow height to adjust
-        container.style.width = w + "px";
-    }        
-    // capture height and add shadow and corner image widths
-    if (!h) {
-        h = parseInt(content.scrollHeight);
-    }
-
-    // remove elements
-    container.removeChild(content);
-    containerElement.removeChild(container);
-    
-    return new OpenLayers.Size(w, h);
-};
-
-/**
- * APIFunction: getScrollbarWidth
- * This function has been modified by the OpenLayers from the original version,
- *     written by Matthew Eernisse and released under the Apache 2 
- *     license here:
- * 
- *     http://www.fleegix.org/articles/2006/05/30/getting-the-scrollbar-width-in-pixels
- * 
- *     It has been modified simply to cache its value, since it is physically 
- *     impossible that this code could ever run in more than one browser at 
- *     once. 
- * 
- * Returns:
- * {Integer}
- */
-OpenLayers.Util.getScrollbarWidth = function() {
-    
-    var scrollbarWidth = OpenLayers.Util._scrollbarWidth;
-    
-    if (scrollbarWidth == null) {
-        var scr = null;
-        var inn = null;
-        var wNoScroll = 0;
-        var wScroll = 0;
-    
-        // Outer scrolling div
-        scr = document.createElement('div');
-        scr.style.position = 'absolute';
-        scr.style.top = '-1000px';
-        scr.style.left = '-1000px';
-        scr.style.width = '100px';
-        scr.style.height = '50px';
-        // Start with no scrollbar
-        scr.style.overflow = 'hidden';
-    
-        // Inner content div
-        inn = document.createElement('div');
-        inn.style.width = '100%';
-        inn.style.height = '200px';
-    
-        // Put the inner div in the scrolling div
-        scr.appendChild(inn);
-        // Append the scrolling div to the doc
-        document.body.appendChild(scr);
-    
-        // Width of the inner div sans scrollbar
-        wNoScroll = inn.offsetWidth;
-    
-        // Add the scrollbar
-        scr.style.overflow = 'scroll';
-        // Width of the inner div width scrollbar
-        wScroll = inn.offsetWidth;
-    
-        // Remove the scrolling div from the doc
-        document.body.removeChild(document.body.lastChild);
-    
-        // Pixel width of the scroller
-        OpenLayers.Util._scrollbarWidth = (wNoScroll - wScroll);
-        scrollbarWidth = OpenLayers.Util._scrollbarWidth;
-    }
-
-    return scrollbarWidth;
-};
-
-/**
- * APIFunction: getFormattedLonLat
- * This function will return latitude or longitude value formatted as 
- *
- * Parameters:
- * coordinate - {Float} the coordinate value to be formatted
- * axis - {String} value of either 'lat' or 'lon' to indicate which axis is to
- *          to be formatted (default = lat)
- * dmsOption - {String} specify the precision of the output can be one of:
- *           'dms' show degrees minutes and seconds
- *           'dm' show only degrees and minutes
- *           'd' show only degrees
- * 
- * Returns:
- * {String} the coordinate value formatted as a string
- */
-OpenLayers.Util.getFormattedLonLat = function(coordinate, axis, dmsOption) {
-    if (!dmsOption) {
-        dmsOption = 'dms';    //default to show degree, minutes, seconds
-    }
-    var abscoordinate = Math.abs(coordinate)
-    var coordinatedegrees = Math.floor(abscoordinate);
-
-    var coordinateminutes = (abscoordinate - coordinatedegrees)/(1/60);
-    var tempcoordinateminutes = coordinateminutes;
-    coordinateminutes = Math.floor(coordinateminutes);
-    var coordinateseconds = (tempcoordinateminutes - coordinateminutes)/(1/60);
-    coordinateseconds =  Math.round(coordinateseconds*10);
-    coordinateseconds /= 10;
-
-    if( coordinatedegrees < 10 ) {
-        coordinatedegrees = "0" + coordinatedegrees;
-    }
-    var str = coordinatedegrees + "\u00B0";
-
-    if (dmsOption.indexOf('dm') >= 0) {
-        if( coordinateminutes < 10 ) {
-            coordinateminutes = "0" + coordinateminutes;
-        }
-        str += coordinateminutes + "'";
-  
-        if (dmsOption.indexOf('dms') >= 0) {
-            if( coordinateseconds < 10 ) {
-                coordinateseconds = "0" + coordinateseconds;
-            }
-            str += coordinateseconds + '"';
-        }
-    }
-    
-    if (axis == "lon") {
-        str += coordinate < 0 ? OpenLayers.i18n("W") : OpenLayers.i18n("E");
-    } else {
-        str += coordinate < 0 ? OpenLayers.i18n("S") : OpenLayers.i18n("N");
-    }
-    return str;
-};
-
-

--- a/labs/openlayers/lib/Rico/Color.js
+++ /dev/null
@@ -1,245 +1,1 @@
-/*
- * This file has been edited substantially from the Rico-released version by
- * the OpenLayers development team.
- *
- * This file is licensed under the Apache License, Version 2.0.
- */
-OpenLayers.Rico.Color = OpenLayers.Class({
 
-   initialize: function(red, green, blue) {
-      this.rgb = { r: red, g : green, b : blue };
-   },
-
-   setRed: function(r) {
-      this.rgb.r = r;
-   },
-
-   setGreen: function(g) {
-      this.rgb.g = g;
-   },
-
-   setBlue: function(b) {
-      this.rgb.b = b;
-   },
-
-   setHue: function(h) {
-
-      // get an HSB model, and set the new hue...
-      var hsb = this.asHSB();
-      hsb.h = h;
-
-      // convert back to RGB...
-      this.rgb = OpenLayers.Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b);
-   },
-
-   setSaturation: function(s) {
-      // get an HSB model, and set the new hue...
-      var hsb = this.asHSB();
-      hsb.s = s;
-
-      // convert back to RGB and set values...
-      this.rgb = OpenLayers.Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b);
-   },
-
-   setBrightness: function(b) {
-      // get an HSB model, and set the new hue...
-      var hsb = this.asHSB();
-      hsb.b = b;
-
-      // convert back to RGB and set values...
-      this.rgb = OpenLayers.Rico.Color.HSBtoRGB( hsb.h, hsb.s, hsb.b );
-   },
-
-   darken: function(percent) {
-      var hsb  = this.asHSB();
-      this.rgb = OpenLayers.Rico.Color.HSBtoRGB(hsb.h, hsb.s, Math.max(hsb.b - percent,0));
-   },
-
-   brighten: function(percent) {
-      var hsb  = this.asHSB();
-      this.rgb = OpenLayers.Rico.Color.HSBtoRGB(hsb.h, hsb.s, Math.min(hsb.b + percent,1));
-   },
-
-   blend: function(other) {
-      this.rgb.r = Math.floor((this.rgb.r + other.rgb.r)/2);
-      this.rgb.g = Math.floor((this.rgb.g + other.rgb.g)/2);
-      this.rgb.b = Math.floor((this.rgb.b + other.rgb.b)/2);
-   },
-
-   isBright: function() {
-      var hsb = this.asHSB();
-      return this.asHSB().b > 0.5;
-   },
-
-   isDark: function() {
-      return ! this.isBright();
-   },
-
-   asRGB: function() {
-      return "rgb(" + this.rgb.r + "," + this.rgb.g + "," + this.rgb.b + ")";
-   },
-
-   asHex: function() {
-      return "#" + this.rgb.r.toColorPart() + this.rgb.g.toColorPart() + this.rgb.b.toColorPart();
-   },
-
-   asHSB: function() {
-      return OpenLayers.Rico.Color.RGBtoHSB(this.rgb.r, this.rgb.g, this.rgb.b);
-   },
-
-   toString: function() {
-      return this.asHex();
-   }
-
-});
-
-OpenLayers.Rico.Color.createFromHex = function(hexCode) {
-  if(hexCode.length==4) {
-    var shortHexCode = hexCode; 
-    var hexCode = '#';
-    for(var i=1;i<4;i++) { 
-        hexCode += (shortHexCode.charAt(i) + 
-shortHexCode.charAt(i)); 
-    }
-  }
-   if ( hexCode.indexOf('#') == 0 ) {
-       hexCode = hexCode.substring(1);
-   }
-   var red   = hexCode.substring(0,2);
-   var green = hexCode.substring(2,4);
-   var blue  = hexCode.substring(4,6);
-   return new OpenLayers.Rico.Color( parseInt(red,16), parseInt(green,16), parseInt(blue,16) );
-};
-
-/**
- * Factory method for creating a color from the background of
- * an HTML element.
- */
-OpenLayers.Rico.Color.createColorFromBackground = function(elem) {
-
-   var actualColor = 
-      RicoUtil.getElementsComputedStyle(OpenLayers.Util.getElement(elem), 
-                                        "backgroundColor", 
-                                        "background-color");
-
-   if ( actualColor == "transparent" && elem.parentNode ) {
-      return OpenLayers.Rico.Color.createColorFromBackground(elem.parentNode);
-   }
-   if ( actualColor == null ) {
-      return new OpenLayers.Rico.Color(255,255,255);
-   }
-   if ( actualColor.indexOf("rgb(") == 0 ) {
-      var colors = actualColor.substring(4, actualColor.length - 1 );
-      var colorArray = colors.split(",");
-      return new OpenLayers.Rico.Color( parseInt( colorArray[0] ),
-                            parseInt( colorArray[1] ),
-                            parseInt( colorArray[2] )  );
-
-   }
-   else if ( actualColor.indexOf("#") == 0 ) {
-      return OpenLayers.Rico.Color.createFromHex(actualColor);
-   }
-   else {
-      return new OpenLayers.Rico.Color(255,255,255);
-   }
-};
-
-OpenLayers.Rico.Color.HSBtoRGB = function(hue, saturation, brightness) {
-
-   var red   = 0;
-    var green = 0;
-    var blue  = 0;
-
-   if (saturation == 0) {
-      red = parseInt(brightness * 255.0 + 0.5);
-       green = red;
-       blue = red;
-    }
-    else {
-      var h = (hue - Math.floor(hue)) * 6.0;
-      var f = h - Math.floor(h);
-      var p = brightness * (1.0 - saturation);
-      var q = brightness * (1.0 - saturation * f);
-      var t = brightness * (1.0 - (saturation * (1.0 - f)));
-
-      switch (parseInt(h)) {
-         case 0:
-            red   = (brightness * 255.0 + 0.5);
-            green = (t * 255.0 + 0.5);
-            blue  = (p * 255.0 + 0.5);
-            break;
-         case 1:
-            red   = (q * 255.0 + 0.5);
-            green = (brightness * 255.0 + 0.5);
-            blue  = (p * 255.0 + 0.5);
-            break;
-         case 2:
-            red   = (p * 255.0 + 0.5);
-            green = (brightness * 255.0 + 0.5);
-            blue  = (t * 255.0 + 0.5);
-            break;
-         case 3:
-            red   = (p * 255.0 + 0.5);
-            green = (q * 255.0 + 0.5);
-            blue  = (brightness * 255.0 + 0.5);
-            break;
-         case 4:
-            red   = (t * 255.0 + 0.5);
-            green = (p * 255.0 + 0.5);
-            blue  = (brightness * 255.0 + 0.5);
-            break;
-          case 5:
-            red   = (brightness * 255.0 + 0.5);
-            green = (p * 255.0 + 0.5);
-            blue  = (q * 255.0 + 0.5);
-            break;
-        }
-    }
-
-   return { r : parseInt(red), g : parseInt(green) , b : parseInt(blue) };
-};
-
-OpenLayers.Rico.Color.RGBtoHSB = function(r, g, b) {
-
-   var hue;
-   var saturation;
-   var brightness;
-
-   var cmax = (r > g) ? r : g;
-   if (b > cmax) {
-      cmax = b;
-   }
-   var cmin = (r < g) ? r : g;
-   if (b < cmin) {
-      cmin = b;
-   }
-   brightness = cmax / 255.0;
-   if (cmax != 0) {
-      saturation = (cmax - cmin)/cmax;
-   } else {
-      saturation = 0;
-   }
-   if (saturation == 0) {
-      hue = 0;
-   } else {
-      var redc   = (cmax - r)/(cmax - cmin);
-        var greenc = (cmax - g)/(cmax - cmin);
-        var bluec  = (cmax - b)/(cmax - cmin);
-
-        if (r == cmax) {
-           hue = bluec - greenc;
-        } else if (g == cmax) {
-           hue = 2.0 + redc - bluec;
-      } else {
-           hue = 4.0 + greenc - redc;
-      }
-        hue = hue / 6.0;
-        if (hue < 0) {
-           hue = hue + 1.0;
-        }
-   }
-
-   return { h : hue, s : saturation, b : brightness };
-};
-
-

--- a/labs/openlayers/lib/Rico/Corner.js
+++ /dev/null
@@ -1,330 +1,1 @@
-/*
- * This file has been edited substantially from the Rico-released
- * version by the OpenLayers development team.
- *  
- *  Copyright 2005 Sabre Airline Solutions  
- *  
- *  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.
- *
- */  
-OpenLayers.Rico = new Object();
-OpenLayers.Rico.Corner = {
 
-    round: function(e, options) {
-        e = OpenLayers.Util.getElement(e);
-        this._setOptions(options);
-
-        var color = this.options.color;
-        if ( this.options.color == "fromElement" ) {
-            color = this._background(e);
-        }
-        var bgColor = this.options.bgColor;
-        if ( this.options.bgColor == "fromParent" ) {
-            bgColor = this._background(e.offsetParent);
-        }
-        this._roundCornersImpl(e, color, bgColor);
-    },
-
-    /**   This is a helper function to change the background
-    *     color of <div> that has had Rico rounded corners added.
-    *
-    *     It seems we cannot just set the background color for the
-    *     outer <div> so each <span> element used to create the
-    *     corners must have its background color set individually.
-    *
-    * @param {DOM} theDiv - A child of the outer <div> that was
-    *                        supplied to the `round` method.
-    *
-    * @param {String} newColor - The new background color to use.
-    */
-    changeColor: function(theDiv, newColor) {
-   
-        theDiv.style.backgroundColor = newColor;
-
-        var spanElements = theDiv.parentNode.getElementsByTagName("span");
-        
-        for (var currIdx = 0; currIdx < spanElements.length; currIdx++) {
-            spanElements[currIdx].style.backgroundColor = newColor;
-        }
-    }, 
-
-
-    /**   This is a helper function to change the background
-    *     opacity of <div> that has had Rico rounded corners added.
-    *
-    *     See changeColor (above) for algorithm explanation
-    *
-    * @param {DOM} theDiv A child of the outer <div> that was
-    *                        supplied to the `round` method.
-    *
-    * @param {int} newOpacity The new opacity to use (0-1).
-    */
-    changeOpacity: function(theDiv, newOpacity) {
-   
-        var mozillaOpacity = newOpacity;
-        var ieOpacity = 'alpha(opacity=' + newOpacity * 100 + ')';
-        
-        theDiv.style.opacity = mozillaOpacity;
-        theDiv.style.filter = ieOpacity;
-
-        var spanElements = theDiv.parentNode.getElementsByTagName("span");
-        
-        for (var currIdx = 0; currIdx < spanElements.length; currIdx++) {
-            spanElements[currIdx].style.opacity = mozillaOpacity;
-            spanElements[currIdx].style.filter = ieOpacity;
-        }
-
-    },
-
-    /** this function takes care of redoing the rico cornering
-    *    
-    *    you can't just call updateRicoCorners() again and pass it a 
-    *    new options string. you have to first remove the divs that 
-    *    rico puts on top and below the content div.
-    *
-    * @param {DOM} theDiv - A child of the outer <div> that was
-    *                        supplied to the `round` method.
-    *
-    * @param {Object} options - list of options
-    */
-    reRound: function(theDiv, options) {
-
-        var topRico = theDiv.parentNode.childNodes[0];
-        //theDiv would be theDiv.parentNode.childNodes[1]
-        var bottomRico = theDiv.parentNode.childNodes[2];
-       
-        theDiv.parentNode.removeChild(topRico);
-        theDiv.parentNode.removeChild(bottomRico); 
-
-        this.round(theDiv.parentNode, options);
-    }, 
-
-   _roundCornersImpl: function(e, color, bgColor) {
-      if(this.options.border) {
-         this._renderBorder(e,bgColor);
-      }
-      if(this._isTopRounded()) {
-         this._roundTopCorners(e,color,bgColor);
-      }
-      if(this._isBottomRounded()) {
-         this._roundBottomCorners(e,color,bgColor);
-      }
-   },
-
-   _renderBorder: function(el,bgColor) {
-      var borderValue = "1px solid " + this._borderColor(bgColor);
-      var borderL = "border-left: "  + borderValue;
-      var borderR = "border-right: " + borderValue;
-      var style   = "style='" + borderL + ";" + borderR +  "'";
-      el.innerHTML = "<div " + style + ">" + el.innerHTML + "</div>";
-   },
-
-   _roundTopCorners: function(el, color, bgColor) {
-      var corner = this._createCorner(bgColor);
-      for(var i=0 ; i < this.options.numSlices ; i++ ) {
-         corner.appendChild(this._createCornerSlice(color,bgColor,i,"top"));
-      }
-      el.style.paddingTop = 0;
-      el.insertBefore(corner,el.firstChild);
-   },
-
-   _roundBottomCorners: function(el, color, bgColor) {
-      var corner = this._createCorner(bgColor);
-      for(var i=(this.options.numSlices-1) ; i >= 0 ; i-- ) {
-         corner.appendChild(this._createCornerSlice(color,bgColor,i,"bottom"));
-      }
-      el.style.paddingBottom = 0;
-      el.appendChild(corner);
-   },
-
-   _createCorner: function(bgColor) {
-      var corner = document.createElement("div");
-      corner.style.backgroundColor = (this._isTransparent() ? "transparent" : bgColor);
-      return corner;
-   },
-
-   _createCornerSlice: function(color,bgColor, n, position) {
-      var slice = document.createElement("span");
-
-      var inStyle = slice.style;
-      inStyle.backgroundColor = color;
-      inStyle.display  = "block";
-      inStyle.height   = "1px";
-      inStyle.overflow = "hidden";
-      inStyle.fontSize = "1px";
-
-      var borderColor = this._borderColor(color,bgColor);
-      if ( this.options.border && n == 0 ) {
-         inStyle.borderTopStyle    = "solid";
-         inStyle.borderTopWidth    = "1px";
-         inStyle.borderLeftWidth   = "0px";
-         inStyle.borderRightWidth  = "0px";
-         inStyle.borderBottomWidth = "0px";
-         inStyle.height            = "0px"; // assumes css compliant box model
-         inStyle.borderColor       = borderColor;
-      }
-      else if(borderColor) {
-         inStyle.borderColor = borderColor;
-         inStyle.borderStyle = "solid";
-         inStyle.borderWidth = "0px 1px";
-      }
-
-      if ( !this.options.compact && (n == (this.options.numSlices-1)) ) {
-         inStyle.height = "2px";
-      }
-      this._setMargin(slice, n, position);
-      this._setBorder(slice, n, position);
-      return slice;
-   },
-
-   _setOptions: function(options) {
-      this.options = {
-         corners : "all",
-         color   : "fromElement",
-         bgColor : "fromParent",
-         blend   : true,
-         border  : false,
-         compact : false
-      };
-      OpenLayers.Util.extend(this.options, options || {});
-
-      this.options.numSlices = this.options.compact ? 2 : 4;
-      if ( this._isTransparent() ) {
-         this.options.blend = false;
-      }
-   },
-
-   _whichSideTop: function() {
-      if ( this._hasString(this.options.corners, "all", "top") ) {
-         return "";
-      }
-      if ( this.options.corners.indexOf("tl") >= 0 && this.options.corners.indexOf("tr") >= 0 ) {
-         return "";
-      }
-      if (this.options.corners.indexOf("tl") >= 0) {
-         return "left";
-      } else if (this.options.corners.indexOf("tr") >= 0) {
-          return "right";
-      }
-      return "";
-   },
-
-   _whichSideBottom: function() {
-      if ( this._hasString(this.options.corners, "all", "bottom") ) {
-         return "";
-      }
-      if ( this.options.corners.indexOf("bl")>=0 && this.options.corners.indexOf("br")>=0 ) {
-         return "";
-      }
-
-      if(this.options.corners.indexOf("bl") >=0) {
-         return "left";
-      } else if(this.options.corners.indexOf("br")>=0) {
-         return "right";
-      }
-      return "";
-   },
-
-   _borderColor : function(color,bgColor) {
-      if ( color == "transparent" ) {
-         return bgColor;
-      } else if ( this.options.border ) {
-         return this.options.border;
-      } else if ( this.options.blend ) {
-         return this._blend( bgColor, color );
-      } else {
-         return "";
-      }
-   },
-
-
-   _setMargin: function(el, n, corners) {
-      var marginSize = this._marginSize(n);
-      var whichSide = corners == "top" ? this._whichSideTop() : this._whichSideBottom();
-
-      if ( whichSide == "left" ) {
-         el.style.marginLeft = marginSize + "px"; el.style.marginRight = "0px";
-      }
-      else if ( whichSide == "right" ) {
-         el.style.marginRight = marginSize + "px"; el.style.marginLeft  = "0px";
-      }
-      else {
-         el.style.marginLeft = marginSize + "px"; el.style.marginRight = marginSize + "px";
-      }
-   },
-
-   _setBorder: function(el,n,corners) {
-      var borderSize = this._borderSize(n);
-      var whichSide = corners == "top" ? this._whichSideTop() : this._whichSideBottom();
-      if ( whichSide == "left" ) {
-         el.style.borderLeftWidth = borderSize + "px"; el.style.borderRightWidth = "0px";
-      }
-      else if ( whichSide == "right" ) {
-         el.style.borderRightWidth = borderSize + "px"; el.style.borderLeftWidth  = "0px";
-      }
-      else {
-         el.style.borderLeftWidth = borderSize + "px"; el.style.borderRightWidth = borderSize + "px";
-      }
-      if (this.options.border != false) {
-        el.style.borderLeftWidth = borderSize + "px"; el.style.borderRightWidth = borderSize + "px";
-      }
-   },
-
-   _marginSize: function(n) {
-      if ( this._isTransparent() ) {
-         return 0;
-      }
-      var marginSizes          = [ 5, 3, 2, 1 ];
-      var blendedMarginSizes   = [ 3, 2, 1, 0 ];
-      var compactMarginSizes   = [ 2, 1 ];
-      var smBlendedMarginSizes = [ 1, 0 ];
-
-      if ( this.options.compact && this.options.blend ) {
-         return smBlendedMarginSizes[n];
-      } else if ( this.options.compact ) {
-         return compactMarginSizes[n];
-      } else if ( this.options.blend ) {
-         return blendedMarginSizes[n];
-      } else {
-         return marginSizes[n];
-      }
-   },
-
-   _borderSize: function(n) {
-      var transparentBorderSizes = [ 5, 3, 2, 1 ];
-      var blendedBorderSizes     = [ 2, 1, 1, 1 ];
-      var compactBorderSizes     = [ 1, 0 ];
-      var actualBorderSizes      = [ 0, 2, 0, 0 ];
-
-      if ( this.options.compact && (this.options.blend || this._isTransparent()) ) {
-         return 1;
-      } else if ( this.options.compact ) {
-         return compactBorderSizes[n];
-      } else if ( this.options.blend ) {
-         return blendedBorderSizes[n];
-      } else if ( this.options.border ) {
-         return actualBorderSizes[n];
-      } else if ( this._isTransparent() ) {
-         return transparentBorderSizes[n];
-      }
-      return 0;
-   },
-
-   _hasString: function(str) { for(var i=1 ; i<arguments.length ; i++) if (str.indexOf(arguments[i]) >= 0) { return true; } return false; },
-   _blend: function(c1, c2) { var cc1 = OpenLayers.Rico.Color.createFromHex(c1); cc1.blend(OpenLayers.Rico.Color.createFromHex(c2)); return cc1; },
-   _background: function(el) { try { return OpenLayers.Rico.Color.createColorFromBackground(el).asHex(); } catch(err) { return "#ffffff"; } },
-   _isTransparent: function() { return this.options.color == "transparent"; },
-   _isTopRounded: function() { return this._hasString(this.options.corners, "all", "top", "tl", "tr"); },
-   _isBottomRounded: function() { return this._hasString(this.options.corners, "all", "bottom", "bl", "br"); },
-   _hasSingleTextChild: function(el) { return el.childNodes.length == 1 && el.childNodes[0].nodeType == 3; }
-};

--- a/labs/openlayers/license.txt
+++ /dev/null
@@ -1,39 +1,1 @@
-This license applies to all code and content in the 'branches', 'trunk', and
-'project' directories of the Openlayers code repository at svn.openlayers.org,
-and applies to all release of OpenLayers later than 2.5.
 
-Copyright (c) 2005-2010 OpenLayers Contributors. See authors.txt for
-  full list.
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted (subject to the limitations in the
-disclaimer below) 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 OpenLayers nor the names of its contributors 
-   may be used to endorse or promote products derived from this 
-   software without specific prior written permission.
-
-NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
-GRANTED BY THIS LICENSE.  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.
-

--- a/labs/openlayers/news.txt
+++ /dev/null
@@ -1,60 +1,1 @@
-OpenLayers 2.10
-  r10722
-  Released 09/09/10
-  http://trac.openlayers.org/wiki/Release/2.10/Notes
 
-OpenLayers 2.9:
- r10251
- Released 04/22/10
- http://trac.openlayers.org/wiki/Release/2.9/Notes
-
-OpenLayers 2.8:
- r9492
- Released 06/22/09
- http://trac.openlayers.org/wiki/Release/2.8/Notes
-
-OpenLayers 2.7:
- r8063
- Released 09/29/08
- http://trac.openlayers.org/wiki/Release/2.7/Notes
-
-OpenLayers 2.6:
- r6945
- Released 04/15/08
- http://trac.openlayers.org/wiki/Release/2.6/Notes
-
-OpenLayers 2.5:
- r4899
- Released 10/09/07 
- http://trac.openlayers.org/wiki/Release/2.5/Notes
-
-OpenLayers 2.4:
- r3198
- Released 05/29/07 
- http://trac.openlayers.org/wiki/Release/2.4/Notes
-
-OpenLayers 2.3:
- r2255
- Released 02/21/07 
- http://trac.openlayers.org/wiki/Release/2.3/Notes
-
-OpenLayers 2.2:
- r1866
- Released 11/15/06 
- http://trac.openlayers.org/wiki/Release/2.2/Notes
-
-OpenLayers 2.1:
- r1521
- Released 10/02/06
- http://trac.openlayers.org/wiki/Release/2.1/Notes
-
-OpenLayers 2.0:
- r1368
- Released 08/25/06
- http://trac.openlayers.org/wiki/Release/2.0/Notes
-
-OpenLayers 1.0
- r787
- Released 06/27/06
- Initial release.
-

--- a/labs/openlayers/readme.txt
+++ /dev/null
@@ -1,73 +1,1 @@
-OpenLayers
--=-=-=-=-=-
-Copyright (c) 2005-2010 OpenLayers Contributors. See authors.txt for
-more details.
 
-OpenLayers is a JavaScript library for building map applications
-on the web. OpenLayers is made available under a BSD-license.
-Please see license.txt in this distribution for more details.
-
-------------------
-Getting OpenLayers
-------------------
-
-OpenLayers lives at http://www.openlayers.org/.
-
-You can get OpenLayers from
-    http://trac.openlayers.org/wiki/HowToDownload.
-
----------------------
-Installing OpenLayers
----------------------
-
-You can use OpenLayers as-is by copying build/OpenLayers.js and the
-entire theme/ and img/ directories up to your webserver, putting them 
-in the same directory. The files can be in subdirectories on your website, 
-or right in the root of the site, as in these examples. 
-To include the OpenLayers library in your web page from the root of the site, use:
-
-  <script type="text/javascript" src="/OpenLayers.js" />
-
-As an example, using bash (with the release files in ~/openlayers ):
-$ cd /var/www/html
-$ cp ~/openlayers/build/OpenLayers.js ./
-$ cp -R ~/openlayers/theme ./
-$ cp -R ~/openlayers/img ./
-
-If you want to use the multiple-file version of OpenLayers (for, say,
-debugging or development purposes), copy the lib/ directory up to your
-webserver in the same directory you put the img/ folder. Then add
-the following to your web page instead:
-
-  <script type="text/javascript" src="/lib/OpenLayers.js" />
-
-As an example, using bash (with the release files in ~/openlayers ):
-$ cd /var/www/html
-$ cp -R ~/openlayers/lib ./
-$ cp -R ~/openlayers/theme ./
-$ cp -R ~/openlayers/img ./
-
-
-------------------------------------
-Using OpenLayers in Your Own Website
-------------------------------------
-
-The examples/ directory is full of useful examples.
-
-Documentation is available at http://trac.openlayers.org/wiki/Documentation.
-You can generate the API documentation with http://www.naturaldocs.org/:
-As an example, using bash (with the release files in ~/openlayers ):
-$ cd ~/openlayers/
-$ /path/to/NaturalDocs -i lib/ -o HTML doc/ -p doc_config/ -s Default OL
-
-Information on changes in the API is available in news.txt.
-
---------------------------
-Contributing to OpenLayers
---------------------------
-
-Please join the email lists at http://openlayers.org/mailman/listinfo
-Patches are welcome!
-
-= 30 =
-

--- a/labs/openlayers/release-license.txt
+++ /dev/null
@@ -1,4 +1,1 @@
-This license information is now available at:
 
-http://svn.openlayers.org/trunk/openlayers/license.txt
-

--- a/labs/openlayers/repository-license.txt
+++ /dev/null
@@ -1,4 +1,1 @@
-This license information is now available at:
 
-http://svn.openlayers.org/trunk/openlayers/license.txt
-

--- a/labs/openlayers/theme/default/framedCloud.css
+++ /dev/null

--- a/labs/openlayers/theme/default/google.css
+++ /dev/null
@@ -1,11 +1,1 @@
-.olLayerGoogleCopyright {
-    right: 3px;
-    bottom: 2px;
-    left: auto;  
-}
-.olLayerGooglePoweredBy {
-    left: 2px;
-    bottom: 2px;   
-}
 
-

--- a/labs/openlayers/theme/default/ie6-style.css
+++ /dev/null
@@ -1,8 +1,1 @@
-.olControlZoomPanel div {
-    background-image: url(img/zoom-panel-NOALPHA.png);
-}
-.olControlPanPanel div {
-    background-image: url(img/pan-panel-NOALPHA.png);
-}
 
-

 Binary files a/labs/openlayers/theme/default/img/add_point_off.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/add_point_on.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/blank.gif and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/close.gif and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/drag-rectangle-off.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/drag-rectangle-on.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/draw_line_off.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/draw_line_on.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/draw_point_off.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/draw_point_on.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/draw_polygon_off.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/draw_polygon_on.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/editing_tool_bar.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/move_feature_off.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/move_feature_on.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/navigation_history.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/overview_replacement.gif and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/pan-panel-NOALPHA.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/pan-panel.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/pan_off.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/pan_on.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/panning-hand-off.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/panning-hand-on.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/remove_point_off.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/remove_point_on.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/ruler.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/save_features_off.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/save_features_on.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/view_next_off.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/view_next_on.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/view_previous_off.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/view_previous_on.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/zoom-panel-NOALPHA.png and /dev/null differ
 Binary files a/labs/openlayers/theme/default/img/zoom-panel.png and /dev/null differ
--- a/labs/openlayers/theme/default/style.css
+++ /dev/null
@@ -1,398 +1,1 @@
-div.olMap {
-    z-index: 0;
-    padding: 0px!important;
-    margin: 0px!important;
-    cursor: default;
-}
 
-div.olMapViewport {
-    text-align: left;
-}
-
-div.olLayerDiv {
-   -moz-user-select: none;
-}
-
-.olLayerGoogleCopyright {
-    left: 2px;
-    bottom: 2px;  
-}
-.olLayerGooglePoweredBy {
-    left: 2px;
-    bottom: 15px;   
-}
-.olControlAttribution {
-    font-size: smaller; 
-    right: 3px; 
-    bottom: 4.5em; 
-    position: absolute; 
-    display: block;
-}
-.olControlScale {
-    right: 3px;
-    bottom: 3em;
-    display: block;
-    position: absolute;
-    font-size: smaller;
-}
-.olControlScaleLine {
-   display: block;
-   position: absolute;
-   left: 10px;
-   bottom: 15px;
-   font-size: xx-small;
-}
-.olControlScaleLineBottom {
-   border: solid 2px black;
-   border-bottom: none;
-   margin-top:-2px;
-   text-align: center;
-}
-.olControlScaleLineTop {
-   border: solid 2px black;
-   border-top: none;
-   text-align: center;
-}
-
-.olControlPermalink {
-    right: 3px;
-    bottom: 1.5em;
-    display: block;
-    position: absolute;
-    font-size: smaller;
-} 
-
-div.olControlMousePosition {
-    bottom: 0em;
-    right: 3px;
-    display: block;
-    position: absolute;
-    font-family: Arial;
-    font-size: smaller;
-}
-
-.olControlOverviewMapContainer {
-    position: absolute;
-    bottom: 0px;
-    right: 0px;
-}
-
-.olControlOverviewMapElement {
-    padding: 10px 18px 10px 10px;
-    background-color: #00008B;
-    -moz-border-radius: 1em 0 0 0;
-}
-
-.olControlOverviewMapMinimizeButton {
-    right: 0px;
-    bottom: 80px;
-}    
-
-.olControlOverviewMapMaximizeButton {
-    right: 0px;
-    bottom: 80px;
-}
-
-.olControlOverviewMapExtentRectangle {
-    overflow: hidden;
-    background-image: url("img/blank.gif");
-    cursor: move;
-    border: 2px dotted red;
-}
-.olControlOverviewMapRectReplacement {
-    overflow: hidden;
-    cursor: move;
-    background-image: url("img/overview_replacement.gif");
-    background-repeat: no-repeat;
-    background-position: center;
-}
-
-.olLayerGeoRSSDescription {
-    float:left;
-    width:100%;
-    overflow:auto;
-    font-size:1.0em;
-}
-.olLayerGeoRSSClose {
-    float:right;
-    color:gray;
-    font-size:1.2em;
-    margin-right:6px;
-    font-family:sans-serif;
-}
-.olLayerGeoRSSTitle {
-    float:left;font-size:1.2em;
-}
-
-.olPopupContent {
-    padding:5px;
-    overflow: auto;
-}    
-.olControlNavToolbar { 
-    width:0px;
-    height:0px;
-}    
-.olControlNavToolbar div { 
-  display:block;
-  width:  28px;
-  height: 28px;
-  top: 300px;
-  left: 6px;
-  position: relative;
-}
-
-.olControlNavigationHistory {
-   background-image: url("img/navigation_history.png");
-   background-repeat: no-repeat;
-   width:  24px;
-   height: 24px;
-
-}
-.olControlNavigationHistoryPreviousItemActive { 
-  background-position: 0px 0px;
-}
-.olControlNavigationHistoryPreviousItemInactive { 
-   background-position: 0px -24px;
-}
-.olControlNavigationHistoryNextItemActive { 
-   background-position: -24px 0px;
-}
-.olControlNavigationHistoryNextItemInactive { 
-   background-position: -24px -24px;
-}
-
-.olControlNavToolbar .olControlNavigationItemActive { 
-  background-image: url("img/panning-hand-on.png");
-  background-repeat: no-repeat;
-}
-.olControlNavToolbar .olControlNavigationItemInactive { 
-  background-image: url("img/panning-hand-off.png");
-  background-repeat: no-repeat;
-}
-.olControlNavToolbar .olControlZoomBoxItemActive { 
-  background-image: url("img/drag-rectangle-on.png");
-  background-color: orange;
-  background-repeat: no-repeat;
-}
-.olControlNavToolbar .olControlZoomBoxItemInactive { 
-  background-image: url("img/drag-rectangle-off.png");
-  background-repeat: no-repeat;
-}
-.olControlEditingToolbar  {
-    float:right;
-    right: 0px;
-    height: 30px; 
-    width: 200px;
-}
-.olControlEditingToolbar div { 
-  background-image: url("img/editing_tool_bar.png");
-  background-repeat: no-repeat;
-  float:right;
-  width:  24px;
-  height: 24px;
-  margin: 5px;
-}
-.olControlEditingToolbar .olControlNavigationItemActive { 
-  background-position: -103px -23px; 
-}
-.olControlEditingToolbar .olControlNavigationItemInactive { 
-  background-position: -103px -0px; 
-}
-.olControlEditingToolbar .olControlDrawFeaturePointItemActive { 
-  background-position: -77px -23px; 
-}
-.olControlEditingToolbar .olControlDrawFeaturePointItemInactive { 
-  background-position: -77px -0px; 
-}
-.olControlEditingToolbar .olControlDrawFeaturePathItemInactive { 
-  background-position: -51px 0px; 
-}
-.olControlEditingToolbar .olControlDrawFeaturePathItemActive { 
-  background-position: -51px -23px; 
-}
-.olControlEditingToolbar .olControlDrawFeaturePolygonItemInactive { 
-  background-position: -26px 0px; 
-}
-.olControlEditingToolbar .olControlDrawFeaturePolygonItemActive { 
-  background-position: -26px -23px ;                                                                   
-}
-div.olControlSaveFeaturesItemActive { 
-    background-image: url(img/save_features_on.png);
-    background-repeat: no-repeat;
-    background-position: 0px 1px;
-}
-div.olControlSaveFeaturesItemInactive { 
-    background-image: url(img/save_features_off.png);
-    background-repeat: no-repeat;
-    background-position: 0px 1px;
-}
-
-.olHandlerBoxZoomBox {
-    border: 2px solid red;
-    position: absolute;
-    background-color: white;
-    opacity: 0.50;
-    font-size: 1px;
-    filter: alpha(opacity=50);
-}
-.olHandlerBoxSelectFeature {
-    border: 2px solid blue;
-    position: absolute;
-    background-color: white;
-    opacity: 0.50;
-    font-size: 1px;
-    filter: alpha(opacity=50);
-}   
-
-.olControlPanPanel {
-    top: 10px;
-    left: 5px;
-}  
-
-.olControlPanPanel div {
-    background-image: url(img/pan-panel.png);
-    height: 18px;
-    width: 18px;
-    cursor: pointer;
-    position: absolute;
-}
-
-.olControlPanPanel .olControlPanNorthItemInactive {
-    top: 0px;
-    left: 9px;
-    background-position: 0px 0px;
-}
-.olControlPanPanel .olControlPanSouthItemInactive {
-    top: 36px;
-    left: 9px;
-    background-position: 18px 0px;
-}
-.olControlPanPanel .olControlPanWestItemInactive {
-    position: absolute;
-    top: 18px;
-    left: 0px;
-    background-position: 0px 18px;
-}
-.olControlPanPanel .olControlPanEastItemInactive {
-    top: 18px;
-    left: 18px;
-    background-position: 18px 18px;
-}
-
-.olControlZoomPanel {
-    top: 71px;
-    left: 14px;
-} 
-
-.olControlZoomPanel div {
-    background-image: url(img/zoom-panel.png);
-    position: absolute;
-    height: 18px;
-    width: 18px;
-    cursor: pointer;
-}
-
-.olControlZoomPanel .olControlZoomInItemInactive {
-    top: 0px;
-    left: 0px;
-    background-position: 0px 0px;
-}
-
-.olControlZoomPanel .olControlZoomToMaxExtentItemInactive {
-    top: 18px;
-    left: 0px;
-    background-position: 0px -18px;
-}
-
-.olControlZoomPanel .olControlZoomOutItemInactive {
-    top: 36px;
-    left: 0px;
-    background-position: 0px 18px;
-}
-
-.olPopupCloseBox {
-  background: url("img/close.gif") no-repeat;
-  cursor: pointer;
-}
-
-.olFramedCloudPopupContent {
-    padding: 5px;
-    overflow: auto;
-}
-
-.olControlNoSelect {
- -moz-user-select: none;
-}
-
-.olImageLoadError {
-    background-color: pink;
-    opacity: 0.5;
-    filter: alpha(opacity=50); /* IE */
-}
-
-/**
- * Cursor styles
- */
-
-.olCursorWait {
-    cursor: wait;
-}
-.olDragDown {
-    cursor: move;
-}
-.olDrawBox {
-    cursor: crosshair;
-}
-.olControlDragFeatureOver {
-    cursor: move;
-}
-.olControlDragFeatureActive.olControlDragFeatureOver.olDragDown {
-    cursor: -moz-grabbing;
-}
-
-/**
- * Layer switcher
- */
-.olControlLayerSwitcher {
-    position: absolute;
-    top: 25px;
-    right: 0px;
-    width: 20em;
-    font-family: sans-serif;
-    font-weight: bold;
-    margin-top: 3px;
-    margin-left: 3px;
-    margin-bottom: 3px;
-    font-size: smaller;
-    color: white;
-    background-color: transparent;
-}
-
-.olControlLayerSwitcher .layersDiv {
-    padding-top: 5px;
-    padding-left: 10px;
-    padding-bottom: 5px;
-    padding-right: 75px;
-    background-color: darkblue;
-    width: 100%;
-    height: 100%;
-}
-
-.olControlLayerSwitcher .layersDiv .baseLbl,
-.olControlLayerSwitcher .layersDiv .dataLbl {
-    margin-top: 3px;
-    margin-left: 3px;
-    margin-bottom: 3px;
-}
-
-.olControlLayerSwitcher .layersDiv .baseLayersDiv,
-.olControlLayerSwitcher .layersDiv .dataLayersDiv {
-    padding-left: 10px;
-}
-
-.olControlLayerSwitcher .maximizeDiv,
-.olControlLayerSwitcher .minimizeDiv {
-    top: 5px;
-    right: 0px;
-}
-

--- a/labs/openlayers/tools/BeautifulSoup.py
+++ /dev/null
@@ -1,1768 +1,1 @@
-"""Beautiful Soup
-Elixir and Tonic
-"The Screen-Scraper's Friend"
-http://www.crummy.com/software/BeautifulSoup/
 
-Beautiful Soup parses a (possibly invalid) XML or HTML document into a
-tree representation. It provides methods and Pythonic idioms that make
-it easy to navigate, search, and modify the tree.
-
-A well-formed XML/HTML document yields a well-formed data
-structure. An ill-formed XML/HTML document yields a correspondingly
-ill-formed data structure. If your document is only locally
-well-formed, you can use this library to find and process the
-well-formed part of it. The BeautifulSoup class 
-
-Beautiful Soup works with Python 2.2 and up. It has no external
-dependencies, but you'll have more success at converting data to UTF-8
-if you also install these three packages:
-
-* chardet, for auto-detecting character encodings
-  http://chardet.feedparser.org/
-* cjkcodecs and iconv_codec, which add more encodings to the ones supported
-  by stock Python.
-  http://cjkpython.i18n.org/
-
-Beautiful Soup defines classes for two main parsing strategies:
-    
- * BeautifulStoneSoup, for parsing XML, SGML, or your domain-specific
-   language that kind of looks like XML.
-
- * BeautifulSoup, for parsing run-of-the-mill HTML code, be it valid
-   or invalid. This class has web browser-like heuristics for
-   obtaining a sensible parse tree in the face of common HTML errors.
-
-Beautiful Soup also defines a class (UnicodeDammit) for autodetecting
-the encoding of an HTML or XML document, and converting it to
-Unicode. Much of this code is taken from Mark Pilgrim's Universal Feed Parser.
-
-For more than you ever wanted to know about Beautiful Soup, see the
-documentation:
-http://www.crummy.com/software/BeautifulSoup/documentation.html
-
-"""
-from __future__ import generators
-
-__author__ = "Leonard Richardson (leonardr@segfault.org)"
-__version__ = "3.0.4"
-__copyright__ = "Copyright (c) 2004-2007 Leonard Richardson"
-__license__ = "PSF"
-
-from sgmllib import SGMLParser, SGMLParseError
-import codecs
-import types
-import re
-import sgmllib
-try:
-  from htmlentitydefs import name2codepoint
-except ImportError:
-  name2codepoint = {}
-
-#This hack makes Beautiful Soup able to parse XML with namespaces
-sgmllib.tagfind = re.compile('[a-zA-Z][-_.:a-zA-Z0-9]*')
-
-DEFAULT_OUTPUT_ENCODING = "utf-8"
-
-# First, the classes that represent markup elements.
-
-class PageElement:
-    """Contains the navigational information for some part of the page
-    (either a tag or a piece of text)"""
-
-    def setup(self, parent=None, previous=None):
-        """Sets up the initial relations between this element and
-        other elements."""        
-        self.parent = parent
-        self.previous = previous
-        self.next = None
-        self.previousSibling = None
-        self.nextSibling = None
-        if self.parent and self.parent.contents:
-            self.previousSibling = self.parent.contents[-1]
-            self.previousSibling.nextSibling = self
-
-    def replaceWith(self, replaceWith):        
-        oldParent = self.parent
-        myIndex = self.parent.contents.index(self)
-        if hasattr(replaceWith, 'parent') and replaceWith.parent == self.parent:
-            # We're replacing this element with one of its siblings.
-            index = self.parent.contents.index(replaceWith)
-            if index and index < myIndex:
-                # Furthermore, it comes before this element. That
-                # means that when we extract it, the index of this
-                # element will change.
-                myIndex = myIndex - 1
-        self.extract()        
-        oldParent.insert(myIndex, replaceWith)
-        
-    def extract(self):
-        """Destructively rips this element out of the tree."""        
-        if self.parent:
-            try:
-                self.parent.contents.remove(self)
-            except ValueError:
-                pass
-
-        #Find the two elements that would be next to each other if
-        #this element (and any children) hadn't been parsed. Connect
-        #the two.        
-        lastChild = self._lastRecursiveChild()
-        nextElement = lastChild.next
-
-        if self.previous:
-            self.previous.next = nextElement
-        if nextElement:
-            nextElement.previous = self.previous
-        self.previous = None
-        lastChild.next = None
-
-        self.parent = None        
-        if self.previousSibling:
-            self.previousSibling.nextSibling = self.nextSibling
-        if self.nextSibling:
-            self.nextSibling.previousSibling = self.previousSibling
-        self.previousSibling = self.nextSibling = None       
-
-    def _lastRecursiveChild(self):
-        "Finds the last element beneath this object to be parsed."
-        lastChild = self
-        while hasattr(lastChild, 'contents') and lastChild.contents:
-            lastChild = lastChild.contents[-1]
-        return lastChild
-
-    def insert(self, position, newChild):
-        if (isinstance(newChild, basestring)
-            or isinstance(newChild, unicode)) \
-            and not isinstance(newChild, NavigableString):
-            newChild = NavigableString(newChild)        
-
-        position =  min(position, len(self.contents))
-        if hasattr(newChild, 'parent') and newChild.parent != None:
-            # We're 'inserting' an element that's already one
-            # of this object's children. 
-            if newChild.parent == self:
-                index = self.find(newChild)
-                if index and index < position:
-                    # Furthermore we're moving it further down the
-                    # list of this object's children. That means that
-                    # when we extract this element, our target index
-                    # will jump down one.
-                    position = position - 1
-            newChild.extract()
-            
-        newChild.parent = self
-        previousChild = None
-        if position == 0:
-            newChild.previousSibling = None
-            newChild.previous = self
-        else:
-            previousChild = self.contents[position-1]
-            newChild.previousSibling = previousChild
-            newChild.previousSibling.nextSibling = newChild
-            newChild.previous = previousChild._lastRecursiveChild()
-        if newChild.previous:
-            newChild.previous.next = newChild        
-
-        newChildsLastElement = newChild._lastRecursiveChild()
-
-        if position >= len(self.contents):
-            newChild.nextSibling = None
-            
-            parent = self
-            parentsNextSibling = None
-            while not parentsNextSibling:
-                parentsNextSibling = parent.nextSibling
-                parent = parent.parent
-                if not parent: # This is the last element in the document.
-                    break
-            if parentsNextSibling:
-                newChildsLastElement.next = parentsNextSibling
-            else:
-                newChildsLastElement.next = None
-        else:
-            nextChild = self.contents[position]            
-            newChild.nextSibling = nextChild            
-            if newChild.nextSibling:
-                newChild.nextSibling.previousSibling = newChild
-            newChildsLastElement.next = nextChild
-
-        if newChildsLastElement.next:
-            newChildsLastElement.next.previous = newChildsLastElement
-        self.contents.insert(position, newChild)
-
-    def findNext(self, name=None, attrs={}, text=None, **kwargs):
-        """Returns the first item that matches the given criteria and
-        appears after this Tag in the document."""
-        return self._findOne(self.findAllNext, name, attrs, text, **kwargs)
-
-    def findAllNext(self, name=None, attrs={}, text=None, limit=None,
-                    **kwargs):
-        """Returns all items that match the given criteria and appear
-        before after Tag in the document."""
-        return self._findAll(name, attrs, text, limit, self.nextGenerator)
-
-    def findNextSibling(self, name=None, attrs={}, text=None, **kwargs):
-        """Returns the closest sibling to this Tag that matches the
-        given criteria and appears after this Tag in the document."""
-        return self._findOne(self.findNextSiblings, name, attrs, text,
-                             **kwargs)
-
-    def findNextSiblings(self, name=None, attrs={}, text=None, limit=None,
-                         **kwargs):
-        """Returns the siblings of this Tag that match the given
-        criteria and appear after this Tag in the document."""
-        return self._findAll(name, attrs, text, limit,
-                             self.nextSiblingGenerator, **kwargs)
-    fetchNextSiblings = findNextSiblings # Compatibility with pre-3.x
-
-    def findPrevious(self, name=None, attrs={}, text=None, **kwargs):
-        """Returns the first item that matches the given criteria and
-        appears before this Tag in the document."""
-        return self._findOne(self.findAllPrevious, name, attrs, text, **kwargs)
-
-    def findAllPrevious(self, name=None, attrs={}, text=None, limit=None,
-                        **kwargs):
-        """Returns all items that match the given criteria and appear
-        before this Tag in the document."""
-        return self._findAll(name, attrs, text, limit, self.previousGenerator,
-                           **kwargs)
-    fetchPrevious = findAllPrevious # Compatibility with pre-3.x
-
-    def findPreviousSibling(self, name=None, attrs={}, text=None, **kwargs):
-        """Returns the closest sibling to this Tag that matches the
-        given criteria and appears before this Tag in the document."""
-        return self._findOne(self.findPreviousSiblings, name, attrs, text,
-                             **kwargs)
-
-    def findPreviousSiblings(self, name=None, attrs={}, text=None,
-                             limit=None, **kwargs):
-        """Returns the siblings of this Tag that match the given
-        criteria and appear before this Tag in the document."""
-        return self._findAll(name, attrs, text, limit,
-                             self.previousSiblingGenerator, **kwargs)
-    fetchPreviousSiblings = findPreviousSiblings # Compatibility with pre-3.x
-
-    def findParent(self, name=None, attrs={}, **kwargs):
-        """Returns the closest parent of this Tag that matches the given
-        criteria."""
-        # NOTE: We can't use _findOne because findParents takes a different
-        # set of arguments.
-        r = None
-        l = self.findParents(name, attrs, 1)
-        if l:
-            r = l[0]
-        return r
-
-    def findParents(self, name=None, attrs={}, limit=None, **kwargs):
-        """Returns the parents of this Tag that match the given
-        criteria."""
-
-        return self._findAll(name, attrs, None, limit, self.parentGenerator,
-                             **kwargs)
-    fetchParents = findParents # Compatibility with pre-3.x
-
-    #These methods do the real heavy lifting.
-
-    def _findOne(self, method, name, attrs, text, **kwargs):
-        r = None
-        l = method(name, attrs, text, 1, **kwargs)
-        if l:
-            r = l[0]
-        return r
-    
-    def _findAll(self, name, attrs, text, limit, generator, **kwargs):
-        "Iterates over a generator looking for things that match."
-
-        if isinstance(name, SoupStrainer):
-            strainer = name
-        else:
-            # Build a SoupStrainer
-            strainer = SoupStrainer(name, attrs, text, **kwargs)
-        results = ResultSet(strainer)
-        g = generator()
-        while True:
-            try:
-                i = g.next()
-            except StopIteration:
-                break
-            if i:
-                found = strainer.search(i)
-                if found:
-                    results.append(found)
-                    if limit and len(results) >= limit:
-                        break
-        return results
-
-    #These Generators can be used to navigate starting from both
-    #NavigableStrings and Tags.                
-    def nextGenerator(self):
-        i = self
-        while i:
-            i = i.next
-            yield i
-
-    def nextSiblingGenerator(self):
-        i = self
-        while i:
-            i = i.nextSibling
-            yield i
-
-    def previousGenerator(self):
-        i = self
-        while i:
-            i = i.previous
-            yield i
-
-    def previousSiblingGenerator(self):
-        i = self
-        while i:
-            i = i.previousSibling
-            yield i
-
-    def parentGenerator(self):
-        i = self
-        while i:
-            i = i.parent
-            yield i
-
-    # Utility methods
-    def substituteEncoding(self, str, encoding=None):
-        encoding = encoding or "utf-8"
-        return str.replace("%SOUP-ENCODING%", encoding)    
-
-    def toEncoding(self, s, encoding=None):
-        """Encodes an object to a string in some encoding, or to Unicode.
-        ."""
-        if isinstance(s, unicode):
-            if encoding:
-                s = s.encode(encoding)
-        elif isinstance(s, str):
-            if encoding:
-                s = s.encode(encoding)
-            else:
-                s = unicode(s)
-        else:
-            if encoding:
-                s  = self.toEncoding(str(s), encoding)
-            else:
-                s = unicode(s)
-        return s
-
-class NavigableString(unicode, PageElement):
-
-    def __getattr__(self, attr):
-        """text.string gives you text. This is for backwards
-        compatibility for Navigable*String, but for CData* it lets you
-        get the string without the CData wrapper."""
-        if attr == 'string':
-            return self
-        else:
-            raise AttributeError, "'%s' object has no attribute '%s'" % (self.__class__.__name__, attr)
-
-    def __unicode__(self):
-        return self.__str__(None)
-
-    def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING):
-        if encoding:
-            return self.encode(encoding)
-        else:
-            return self
-        
-class CData(NavigableString):
-
-    def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING):
-        return "<![CDATA[%s]]>" % NavigableString.__str__(self, encoding)
-
-class ProcessingInstruction(NavigableString):
-    def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING):
-        output = self
-        if "%SOUP-ENCODING%" in output:
-            output = self.substituteEncoding(output, encoding)
-        return "<?%s?>" % self.toEncoding(output, encoding)
-
-class Comment(NavigableString):
-    def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING):
-        return "<!--%s-->" % NavigableString.__str__(self, encoding)    
-
-class Declaration(NavigableString):
-    def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING):
-        return "<!%s>" % NavigableString.__str__(self, encoding)        
-
-class Tag(PageElement):
-
-    """Represents a found HTML tag with its attributes and contents."""
-
-    XML_SPECIAL_CHARS_TO_ENTITIES = { "'" : "squot",
-                                      '"' : "quote",
-                                      "&" : "amp",
-                                      "<" : "lt",
-                                      ">" : "gt" }
-
-    def __init__(self, parser, name, attrs=None, parent=None,
-                 previous=None):
-        "Basic constructor."
-
-        # We don't actually store the parser object: that lets extracted
-        # chunks be garbage-collected
-        self.parserClass = parser.__class__
-        self.isSelfClosing = parser.isSelfClosingTag(name)
-        self.name = name
-        if attrs == None:
-            attrs = []
-        self.attrs = attrs
-        self.contents = []
-        self.setup(parent, previous)
-        self.hidden = False
-        self.containsSubstitutions = False
-
-    def get(self, key, default=None):
-        """Returns the value of the 'key' attribute for the tag, or
-        the value given for 'default' if it doesn't have that
-        attribute."""
-        return self._getAttrMap().get(key, default)    
-
-    def has_key(self, key):
-        return self._getAttrMap().has_key(key)
-
-    def __getitem__(self, key):
-        """tag[key] returns the value of the 'key' attribute for the tag,
-        and throws an exception if it's not there."""
-        return self._getAttrMap()[key]
-
-    def __iter__(self):
-        "Iterating over a tag iterates over its contents."
-        return iter(self.contents)
-
-    def __len__(self):
-        "The length of a tag is the length of its list of contents."
-        return len(self.contents)
-
-    def __contains__(self, x):
-        return x in self.contents
-
-    def __nonzero__(self):
-        "A tag is non-None even if it has no contents."
-        return True
-
-    def __setitem__(self, key, value):        
-        """Setting tag[key] sets the value of the 'key' attribute for the
-        tag."""
-        self._getAttrMap()
-        self.attrMap[key] = value
-        found = False
-        for i in range(0, len(self.attrs)):
-            if self.attrs[i][0] == key:
-                self.attrs[i] = (key, value)
-                found = True
-        if not found:
-            self.attrs.append((key, value))
-        self._getAttrMap()[key] = value
-
-    def __delitem__(self, key):
-        "Deleting tag[key] deletes all 'key' attributes for the tag."
-        for item in self.attrs:
-            if item[0] == key:
-                self.attrs.remove(item)
-                #We don't break because bad HTML can define the same
-                #attribute multiple times.
-            self._getAttrMap()
-            if self.attrMap.has_key(key):
-                del self.attrMap[key]
-
-    def __call__(self, *args, **kwargs):
-        """Calling a tag like a function is the same as calling its
-        findAll() method. Eg. tag('a') returns a list of all the A tags
-        found within this tag."""
-        return apply(self.findAll, args, kwargs)
-
-    def __getattr__(self, tag):
-        #print "Getattr %s.%s" % (self.__class__, tag)
-        if len(tag) > 3 and tag.rfind('Tag') == len(tag)-3:
-            return self.find(tag[:-3])
-        elif tag.find('__') != 0:
-            return self.find(tag)
-
-    def __eq__(self, other):
-        """Returns true iff this tag has the same name, the same attributes,
-        and the same contents (recursively) as the given tag.
-
-        NOTE: right now this will return false if two tags have the
-        same attributes in a different order. Should this be fixed?"""
-        if not hasattr(other, 'name') or not hasattr(other, 'attrs') or not hasattr(other, 'contents') or self.name != other.name or self.attrs != other.attrs or len(self) != len(other):
-            return False
-        for i in range(0, len(self.contents)):
-            if self.contents[i] != other.contents[i]:
-                return False
-        return True
-
-    def __ne__(self, other):
-        """Returns true iff this tag is not identical to the other tag,
-        as defined in __eq__."""
-        return not self == other
-
-    def __repr__(self, encoding=DEFAULT_OUTPUT_ENCODING):
-        """Renders this tag as a string."""
-        return self.__str__(encoding)
-
-    def __unicode__(self):
-        return self.__str__(None)
-
-    def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING,
-                prettyPrint=False, indentLevel=0):
-        """Returns a string or Unicode representation of this tag and
-        its contents. To get Unicode, pass None for encoding.
-
-        NOTE: since Python's HTML parser consumes whitespace, this
-        method is not certain to reproduce the whitespace present in
-        the original string."""
-
-        encodedName = self.toEncoding(self.name, encoding)
-
-        attrs = []
-        if self.attrs:
-            for key, val in self.attrs:
-                fmt = '%s="%s"'
-                if isString(val):                    
-                    if self.containsSubstitutions and '%SOUP-ENCODING%' in val:
-                        val = self.substituteEncoding(val, encoding)
-
-                    # The attribute value either:
-                    #
-                    # * Contains no embedded double quotes or single quotes.
-                    #   No problem: we enclose it in double quotes.
-                    # * Contains embedded single quotes. No problem:
-                    #   double quotes work here too.
-                    # * Contains embedded double quotes. No problem:
-                    #   we enclose it in single quotes.
-                    # * Embeds both single _and_ double quotes. This
-                    #   can't happen naturally, but it can happen if
-                    #   you modify an attribute value after parsing
-                    #   the document. Now we have a bit of a
-                    #   problem. We solve it by enclosing the
-                    #   attribute in single quotes, and escaping any
-                    #   embedded single quotes to XML entities.
-                    if '"' in val:
-                        fmt = "%s='%s'"
-                        # This can't happen naturally, but it can happen
-                        # if you modify an attribute value after parsing.
-                        if "'" in val:
-                            val = val.replace("'", "&squot;")
-
-                    # Now we're okay w/r/t quotes. But the attribute
-                    # value might also contain angle brackets, or
-                    # ampersands that aren't part of entities. We need
-                    # to escape those to XML entities too.
-                    val = re.sub("([<>]|&(?![^\s]+;))",
-                                 lambda x: "&" + self.XML_SPECIAL_CHARS_TO_ENTITIES[x.group(0)[0]] + ";",
-                                 val)
-                                      
-                attrs.append(fmt % (self.toEncoding(key, encoding),
-                                    self.toEncoding(val, encoding)))
-        close = ''
-        closeTag = ''
-        if self.isSelfClosing:
-            close = ' /'
-        else:
-            closeTag = '</%s>' % encodedName
-
-        indentTag, indentContents = 0, 0
-        if prettyPrint:
-            indentTag = indentLevel
-            space = (' ' * (indentTag-1))
-            indentContents = indentTag + 1
-        contents = self.renderContents(encoding, prettyPrint, indentContents)
-        if self.hidden:
-            s = contents
-        else:
-            s = []
-            attributeString = ''
-            if attrs:
-                attributeString = ' ' + ' '.join(attrs)            
-            if prettyPrint:
-                s.append(space)
-            s.append('<%s%s%s>' % (encodedName, attributeString, close))
-            if prettyPrint:
-                s.append("\n")
-            s.append(contents)
-            if prettyPrint and contents and contents[-1] != "\n":
-                s.append("\n")
-            if prettyPrint and closeTag:
-                s.append(space)
-            s.append(closeTag)
-            if prettyPrint and closeTag and self.nextSibling:
-                s.append("\n")
-            s = ''.join(s)
-        return s
-
-    def prettify(self, encoding=DEFAULT_OUTPUT_ENCODING):
-        return self.__str__(encoding, True)
-
-    def renderContents(self, encoding=DEFAULT_OUTPUT_ENCODING,
-                       prettyPrint=False, indentLevel=0):
-        """Renders the contents of this tag as a string in the given
-        encoding. If encoding is None, returns a Unicode string.."""
-        s=[]
-        for c in self:
-            text = None
-            if isinstance(c, NavigableString):
-                text = c.__str__(encoding)
-            elif isinstance(c, Tag):
-                s.append(c.__str__(encoding, prettyPrint, indentLevel))
-            if text and prettyPrint:
-                text = text.strip()              
-            if text:
-                if prettyPrint:
-                    s.append(" " * (indentLevel-1))
-                s.append(text)
-                if prettyPrint:
-                    s.append("\n")
-        return ''.join(s)    
-
-    #Soup methods
-
-    def find(self, name=None, attrs={}, recursive=True, text=None,
-             **kwargs):
-        """Return only the first child of this Tag matching the given
-        criteria."""
-        r = None
-        l = self.findAll(name, attrs, recursive, text, 1, **kwargs)
-        if l:
-            r = l[0]
-        return r
-    findChild = find
-
-    def findAll(self, name=None, attrs={}, recursive=True, text=None,
-                limit=None, **kwargs):
-        """Extracts a list of Tag objects that match the given
-        criteria.  You can specify the name of the Tag and any
-        attributes you want the Tag to have.
-
-        The value of a key-value pair in the 'attrs' map can be a
-        string, a list of strings, a regular expression object, or a
-        callable that takes a string and returns whether or not the
-        string matches for some custom definition of 'matches'. The
-        same is true of the tag name."""
-        generator = self.recursiveChildGenerator
-        if not recursive:
-            generator = self.childGenerator
-        return self._findAll(name, attrs, text, limit, generator, **kwargs)
-    findChildren = findAll
-
-    # Pre-3.x compatibility methods
-    first = find
-    fetch = findAll
-    
-    def fetchText(self, text=None, recursive=True, limit=None):
-        return self.findAll(text=text, recursive=recursive, limit=limit)
-
-    def firstText(self, text=None, recursive=True):
-        return self.find(text=text, recursive=recursive)
-    
-    #Utility methods
-
-    def append(self, tag):
-        """Appends the given tag to the contents of this tag."""
-        self.contents.append(tag)
-
-    #Private methods
-
-    def _getAttrMap(self):
-        """Initializes a map representation of this tag's attributes,
-        if not already initialized."""
-        if not getattr(self, 'attrMap'):
-            self.attrMap = {}
-            for (key, value) in self.attrs:
-                self.attrMap[key] = value 
-        return self.attrMap
-
-    #Generator methods
-    def childGenerator(self):
-        for i in range(0, len(self.contents)):
-            yield self.contents[i]
-        raise StopIteration
-    
-    def recursiveChildGenerator(self):
-        stack = [(self, 0)]
-        while stack:
-            tag, start = stack.pop()
-            if isinstance(tag, Tag):            
-                for i in range(start, len(tag.contents)):
-                    a = tag.contents[i]
-                    yield a
-                    if isinstance(a, Tag) and tag.contents:
-                        if i < len(tag.contents) - 1:
-                            stack.append((tag, i+1))
-                        stack.append((a, 0))
-                        break
-        raise StopIteration
-
-# Next, a couple classes to represent queries and their results.
-class SoupStrainer:
-    """Encapsulates a number of ways of matching a markup element (tag or
-    text)."""
-
-    def __init__(self, name=None, attrs={}, text=None, **kwargs):
-        self.name = name
-        if isString(attrs):
-            kwargs['class'] = attrs
-            attrs = None
-        if kwargs:
-            if attrs:
-                attrs = attrs.copy()
-                attrs.update(kwargs)
-            else:
-                attrs = kwargs
-        self.attrs = attrs
-        self.text = text
-
-    def __str__(self):
-        if self.text:
-            return self.text
-        else:
-            return "%s|%s" % (self.name, self.attrs)
-    
-    def searchTag(self, markupName=None, markupAttrs={}):
-        found = None
-        markup = None
-        if isinstance(markupName, Tag):
-            markup = markupName
-            markupAttrs = markup
-        callFunctionWithTagData = callable(self.name) \
-                                and not isinstance(markupName, Tag)
-
-        if (not self.name) \
-               or callFunctionWithTagData \
-               or (markup and self._matches(markup, self.name)) \
-               or (not markup and self._matches(markupName, self.name)):
-            if callFunctionWithTagData:
-                match = self.name(markupName, markupAttrs)
-            else:
-                match = True            
-                markupAttrMap = None
-                for attr, matchAgainst in self.attrs.items():
-                    if not markupAttrMap:
-                         if hasattr(markupAttrs, 'get'):
-                            markupAttrMap = markupAttrs
-                         else:
-                            markupAttrMap = {}
-                            for k,v in markupAttrs:
-                                markupAttrMap[k] = v
-                    attrValue = markupAttrMap.get(attr)
-                    if not self._matches(attrValue, matchAgainst):
-                        match = False
-                        break
-            if match:
-                if markup:
-                    found = markup
-                else:
-                    found = markupName
-        return found
-
-    def search(self, markup):
-        #print 'looking for %s in %s' % (self, markup)
-        found = None
-        # If given a list of items, scan it for a text element that
-        # matches.        
-        if isList(markup) and not isinstance(markup, Tag):
-            for element in markup:
-                if isinstance(element, NavigableString) \
-                       and self.search(element):
-                    found = element
-                    break
-        # If it's a Tag, make sure its name or attributes match.
-        # Don't bother with Tags if we're searching for text.
-        elif isinstance(markup, Tag):
-            if not self.text:
-                found = self.searchTag(markup)
-        # If it's text, make sure the text matches.
-        elif isinstance(markup, NavigableString) or \
-                 isString(markup):
-            if self._matches(markup, self.text):
-                found = markup
-        else:
-            raise Exception, "I don't know how to match against a %s" \
-                  % markup.__class__
-        return found
-        
-    def _matches(self, markup, matchAgainst):    
-        #print "Matching %s against %s" % (markup, matchAgainst)
-        result = False
-        if matchAgainst == True and type(matchAgainst) == types.BooleanType:
-            result = markup != None
-        elif callable(matchAgainst):
-            result = matchAgainst(markup)
-        else:
-            #Custom match methods take the tag as an argument, but all
-            #other ways of matching match the tag name as a string.
-            if isinstance(markup, Tag):
-                markup = markup.name
-            if markup and not isString(markup):
-                markup = unicode(markup)
-            #Now we know that chunk is either a string, or None.
-            if hasattr(matchAgainst, 'match'):
-                # It's a regexp object.
-                result = markup and matchAgainst.search(markup)
-            elif isList(matchAgainst):
-                result = markup in matchAgainst
-            elif hasattr(matchAgainst, 'items'):
-                result = markup.has_key(matchAgainst)
-            elif matchAgainst and isString(markup):
-                if isinstance(markup, unicode):
-                    matchAgainst = unicode(matchAgainst)
-                else:
-                    matchAgainst = str(matchAgainst)
-
-            if not result:
-                result = matchAgainst == markup
-        return result
-
-class ResultSet(list):
-    """A ResultSet is just a list that keeps track of the SoupStrainer
-    that created it."""
-    def __init__(self, source):
-        list.__init__([])
-        self.source = source
-
-# Now, some helper functions.
-
-def isList(l):
-    """Convenience method that works with all 2.x versions of Python
-    to determine whether or not something is listlike."""
-    return hasattr(l, '__iter__') \
-           or (type(l) in (types.ListType, types.TupleType))
-
-def isString(s):
-    """Convenience method that works with all 2.x versions of Python
-    to determine whether or not something is stringlike."""
-    try:
-        return isinstance(s, unicode) or isintance(s, basestring) 
-    except NameError:
-        return isinstance(s, str)
-
-def buildTagMap(default, *args):
-    """Turns a list of maps, lists, or scalars into a single map.
-    Used to build the SELF_CLOSING_TAGS, NESTABLE_TAGS, and
-    NESTING_RESET_TAGS maps out of lists and partial maps."""
-    built = {}
-    for portion in args:
-        if hasattr(portion, 'items'):
-            #It's a map. Merge it.
-            for k,v in portion.items():
-                built[k] = v
-        elif isList(portion):
-            #It's a list. Map each item to the default.
-            for k in portion:
-                built[k] = default
-        else:
-            #It's a scalar. Map it to the default.
-            built[portion] = default
-    return built
-
-# Now, the parser classes.
-
-class BeautifulStoneSoup(Tag, SGMLParser):
-
-    """This class contains the basic parser and search code. It defines
-    a parser that knows nothing about tag behavior except for the
-    following:
-   
-      You can't close a tag without closing all the tags it encloses.
-      That is, "<foo><bar></foo>" actually means
-      "<foo><bar></bar></foo>".
-
-    [Another possible explanation is "<foo><bar /></foo>", but since
-    this class defines no SELF_CLOSING_TAGS, it will never use that
-    explanation.]
-
-    This class is useful for parsing XML or made-up markup languages,
-    or when BeautifulSoup makes an assumption counter to what you were
-    expecting."""
-
-    XML_ENTITY_LIST = {}
-    for i in Tag.XML_SPECIAL_CHARS_TO_ENTITIES.values():
-        XML_ENTITY_LIST[i] = True 
-
-    SELF_CLOSING_TAGS = {}
-    NESTABLE_TAGS = {}
-    RESET_NESTING_TAGS = {}
-    QUOTE_TAGS = {}
-
-    MARKUP_MASSAGE = [(re.compile('(<[^<>]*)/>'),
-                       lambda x: x.group(1) + ' />'),
-                      (re.compile('<!\s+([^<>]*)>'),
-                       lambda x: '<!' + x.group(1) + '>')
-                      ]
-
-    ROOT_TAG_NAME = u'[document]'
-
-    HTML_ENTITIES = "html"
-    XML_ENTITIES = "xml"
-
-    def __init__(self, markup="", parseOnlyThese=None, fromEncoding=None,
-                 markupMassage=True, smartQuotesTo=XML_ENTITIES,
-                 convertEntities=None, selfClosingTags=None):
-        """The Soup object is initialized as the 'root tag', and the
-        provided markup (which can be a string or a file-like object)
-        is fed into the underlying parser. 
-
-        sgmllib will process most bad HTML, and the BeautifulSoup
-        class has some tricks for dealing with some HTML that kills
-        sgmllib, but Beautiful Soup can nonetheless choke or lose data
-        if your data uses self-closing tags or declarations
-        incorrectly.
-
-        By default, Beautiful Soup uses regexes to sanitize input,
-        avoiding the vast majority of these problems. If the problems
-        don't apply to you, pass in False for markupMassage, and
-        you'll get better performance.
-
-        The default parser massage techniques fix the two most common
-        instances of invalid HTML that choke sgmllib:
-
-         <br/> (No space between name of closing tag and tag close)
-         <! --Comment--> (Extraneous whitespace in declaration)
-
-        You can pass in a custom list of (RE object, replace method)
-        tuples to get Beautiful Soup to scrub your input the way you
-        want."""
-
-        self.parseOnlyThese = parseOnlyThese
-        self.fromEncoding = fromEncoding
-        self.smartQuotesTo = smartQuotesTo
-        self.convertEntities = convertEntities
-        if self.convertEntities:
-            # It doesn't make sense to convert encoded characters to
-            # entities even while you're converting entities to Unicode.
-            # Just convert it all to Unicode.
-            self.smartQuotesTo = None
-        self.instanceSelfClosingTags = buildTagMap(None, selfClosingTags)
-        SGMLParser.__init__(self)
-            
-        if hasattr(markup, 'read'):        # It's a file-type object.
-            markup = markup.read()
-        self.markup = markup
-        self.markupMassage = markupMassage
-        try:
-            self._feed()
-        except StopParsing:
-            pass
-        self.markup = None                 # The markup can now be GCed
-        
-    def _feed(self, inDocumentEncoding=None):
-        # Convert the document to Unicode.
-        markup = self.markup
-        if isinstance(markup, unicode):
-            if not hasattr(self, 'originalEncoding'):
-                self.originalEncoding = None
-        else:
-            dammit = UnicodeDammit\
-                     (markup, [self.fromEncoding, inDocumentEncoding],
-                      smartQuotesTo=self.smartQuotesTo)
-            markup = dammit.unicode
-            self.originalEncoding = dammit.originalEncoding
-        if markup:
-            if self.markupMassage:
-                if not isList(self.markupMassage):
-                    self.markupMassage = self.MARKUP_MASSAGE            
-                for fix, m in self.markupMassage:
-                    markup = fix.sub(m, markup)
-        self.reset()
-
-        SGMLParser.feed(self, markup)
-        # Close out any unfinished strings and close all the open tags.
-        self.endData()
-        while self.currentTag.name != self.ROOT_TAG_NAME:
-            self.popTag()
-
-    def __getattr__(self, methodName):
-        """This method routes method call requests to either the SGMLParser
-        superclass or the Tag superclass, depending on the method name."""
-        #print "__getattr__ called on %s.%s" % (self.__class__, methodName)
-
-        if methodName.find('start_') == 0 or methodName.find('end_') == 0 \
-               or methodName.find('do_') == 0:
-            return SGMLParser.__getattr__(self, methodName)
-        elif methodName.find('__') != 0:
-            return Tag.__getattr__(self, methodName)
-        else:
-            raise AttributeError
-
-    def isSelfClosingTag(self, name):
-        """Returns true iff the given string is the name of a
-        self-closing tag according to this parser."""
-        return self.SELF_CLOSING_TAGS.has_key(name) \
-               or self.instanceSelfClosingTags.has_key(name)
-            
-    def reset(self):
-        Tag.__init__(self, self, self.ROOT_TAG_NAME)
-        self.hidden = 1
-        SGMLParser.reset(self)
-        self.currentData = []
-        self.currentTag = None
-        self.tagStack = []
-        self.quoteStack = []
-        self.pushTag(self)
-    
-    def popTag(self):
-        tag = self.tagStack.pop()
-        # Tags with just one string-owning child get the child as a
-        # 'string' property, so that soup.tag.string is shorthand for
-        # soup.tag.contents[0]
-        if len(self.currentTag.contents) == 1 and \
-           isinstance(self.currentTag.contents[0], NavigableString):
-            self.currentTag.string = self.currentTag.contents[0]
-
-        #print "Pop", tag.name
-        if self.tagStack:
-            self.currentTag = self.tagStack[-1]
-        return self.currentTag
-
-    def pushTag(self, tag):
-        #print "Push", tag.name
-        if self.currentTag:
-            self.currentTag.append(tag)
-        self.tagStack.append(tag)
-        self.currentTag = self.tagStack[-1]
-
-    def endData(self, containerClass=NavigableString):
-        if self.currentData:
-            currentData = ''.join(self.currentData)
-            if not currentData.strip():
-                if '\n' in currentData:
-                    currentData = '\n'
-                else:
-                    currentData = ' '
-            self.currentData = []
-            if self.parseOnlyThese and len(self.tagStack) <= 1 and \
-                   (not self.parseOnlyThese.text or \
-                    not self.parseOnlyThese.search(currentData)):
-                return
-            o = containerClass(currentData)
-            o.setup(self.currentTag, self.previous)
-            if self.previous:
-                self.previous.next = o
-            self.previous = o
-            self.currentTag.contents.append(o)
-
-
-    def _popToTag(self, name, inclusivePop=True):
-        """Pops the tag stack up to and including the most recent
-        instance of the given tag. If inclusivePop is false, pops the tag
-        stack up to but *not* including the most recent instqance of
-        the given tag."""
-        #print "Popping to %s" % name
-        if name == self.ROOT_TAG_NAME:
-            return            
-
-        numPops = 0
-        mostRecentTag = None
-        for i in range(len(self.tagStack)-1, 0, -1):
-            if name == self.tagStack[i].name:
-                numPops = len(self.tagStack)-i
-                break
-        if not inclusivePop:
-            numPops = numPops - 1
-
-        for i in range(0, numPops):
-            mostRecentTag = self.popTag()
-        return mostRecentTag    
-
-    def _smartPop(self, name):
-
-        """We need to pop up to the previous tag of this type, unless
-        one of this tag's nesting reset triggers comes between this
-        tag and the previous tag of this type, OR unless this tag is a
-        generic nesting trigger and another generic nesting trigger
-        comes between this tag and the previous tag of this type.
-
-        Examples:
-         <p>Foo<b>Bar<p> should pop to 'p', not 'b'.
-         <p>Foo<table>Bar<p> should pop to 'table', not 'p'.
-         <p>Foo<table><tr>Bar<p> should pop to 'tr', not 'p'.
-         <p>Foo<b>Bar<p> should pop to 'p', not 'b'.
-
-         <li><ul><li> *<li>* should pop to 'ul', not the first 'li'.
-         <tr><table><tr> *<tr>* should pop to 'table', not the first 'tr'
-         <td><tr><td> *<td>* should pop to 'tr', not the first 'td'
-        """
-
-        nestingResetTriggers = self.NESTABLE_TAGS.get(name)
-        isNestable = nestingResetTriggers != None
-        isResetNesting = self.RESET_NESTING_TAGS.has_key(name)
-        popTo = None
-        inclusive = True
-        for i in range(len(self.tagStack)-1, 0, -1):
-            p = self.tagStack[i]
-            if (not p or p.name == name) and not isNestable:
-                #Non-nestable tags get popped to the top or to their
-                #last occurance.
-                popTo = name
-                break
-            if (nestingResetTriggers != None
-                and p.name in nestingResetTriggers) \
-                or (nestingResetTriggers == None and isResetNesting
-                    and self.RESET_NESTING_TAGS.has_key(p.name)):
-                
-                #If we encounter one of the nesting reset triggers
-                #peculiar to this tag, or we encounter another tag
-                #that causes nesting to reset, pop up to but not
-                #including that tag.
-                popTo = p.name
-                inclusive = False
-                break
-            p = p.parent
-        if popTo:
-            self._popToTag(popTo, inclusive)
-
-    def unknown_starttag(self, name, attrs, selfClosing=0):
-        #print "Start tag %s: %s" % (name, attrs)
-        if self.quoteStack:
-            #This is not a real tag.
-            #print "<%s> is not real!" % name
-            attrs = ''.join(map(lambda(x, y): ' %s="%s"' % (x, y), attrs))
-            self.handle_data('<%s%s>' % (name, attrs))
-            return        
-        self.endData()
-
-        if not self.isSelfClosingTag(name) and not selfClosing:
-            self._smartPop(name)
-
-        if self.parseOnlyThese and len(self.tagStack) <= 1 \
-               and (self.parseOnlyThese.text or not self.parseOnlyThese.searchTag(name, attrs)):
-            return
-
-        tag = Tag(self, name, attrs, self.currentTag, self.previous)
-        if self.previous:
-            self.previous.next = tag
-        self.previous = tag
-        self.pushTag(tag)
-        if selfClosing or self.isSelfClosingTag(name):
-            self.popTag()                
-        if name in self.QUOTE_TAGS:
-            #print "Beginning quote (%s)" % name
-            self.quoteStack.append(name)
-            self.literal = 1
-        return tag
-
-    def unknown_endtag(self, name):
-        #print "End tag %s" % name
-        if self.quoteStack and self.quoteStack[-1] != name:
-            #This is not a real end tag.
-            #print "</%s> is not real!" % name
-            self.handle_data('</%s>' % name)
-            return
-        self.endData()
-        self._popToTag(name)
-        if self.quoteStack and self.quoteStack[-1] == name:
-            self.quoteStack.pop()
-            self.literal = (len(self.quoteStack) > 0)
-
-    def handle_data(self, data):
-        self.currentData.append(data)
-
-    def _toStringSubclass(self, text, subclass):
-        """Adds a certain piece of text to the tree as a NavigableString
-        subclass."""
-        self.endData()
-        self.handle_data(text)
-        self.endData(subclass)
-
-    def handle_pi(self, text):
-        """Handle a processing instruction as a ProcessingInstruction
-        object, possibly one with a %SOUP-ENCODING% slot into which an
-        encoding will be plugged later."""
-        if text[:3] == "xml":
-            text = "xml version='1.0' encoding='%SOUP-ENCODING%'"
-        self._toStringSubclass(text, ProcessingInstruction)
-
-    def handle_comment(self, text):
-        "Handle comments as Comment objects."
-        self._toStringSubclass(text, Comment)
-
-    def handle_charref(self, ref):
-        "Handle character references as data."
-        if self.convertEntities in [self.HTML_ENTITIES,
-                                    self.XML_ENTITIES]:
-            data = unichr(int(ref))
-        else:
-            data = '&#%s;' % ref
-        self.handle_data(data)
-
-    def handle_entityref(self, ref):
-        """Handle entity references as data, possibly converting known
-        HTML entity references to the corresponding Unicode
-        characters."""
-        data = None
-        if self.convertEntities == self.HTML_ENTITIES or \
-               (self.convertEntities == self.XML_ENTITIES and \
-                self.XML_ENTITY_LIST.get(ref)):
-            try:
-                data = unichr(name2codepoint[ref])
-            except KeyError:
-                pass
-        if not data:
-            data = '&%s;' % ref
-        self.handle_data(data)
-        
-    def handle_decl(self, data):
-        "Handle DOCTYPEs and the like as Declaration objects."
-        self._toStringSubclass(data, Declaration)
-
-    def parse_declaration(self, i):
-        """Treat a bogus SGML declaration as raw data. Treat a CDATA
-        declaration as a CData object."""
-        j = None
-        if self.rawdata[i:i+9] == '<![CDATA[':
-             k = self.rawdata.find(']]>', i)
-             if k == -1:
-                 k = len(self.rawdata)
-             data = self.rawdata[i+9:k]
-             j = k+3
-             self._toStringSubclass(data, CData)
-        else:
-            try:
-                j = SGMLParser.parse_declaration(self, i)
-            except SGMLParseError:
-                toHandle = self.rawdata[i:]
-                self.handle_data(toHandle)
-                j = i + len(toHandle)
-        return j
-
-class BeautifulSoup(BeautifulStoneSoup):
-
-    """This parser knows the following facts about HTML:
-
-    * Some tags have no closing tag and should be interpreted as being
-      closed as soon as they are encountered.
-
-    * The text inside some tags (ie. 'script') may contain tags which
-      are not really part of the document and which should be parsed
-      as text, not tags. If you want to parse the text as tags, you can
-      always fetch it and parse it explicitly.
-
-    * Tag nesting rules:
-
-      Most tags can't be nested at all. For instance, the occurance of
-      a <p> tag should implicitly close the previous <p> tag.
-
-       <p>Para1<p>Para2
-        should be transformed into:
-       <p>Para1</p><p>Para2
-
-      Some tags can be nested arbitrarily. For instance, the occurance
-      of a <blockquote> tag should _not_ implicitly close the previous
-      <blockquote> tag.
-
-       Alice said: <blockquote>Bob said: <blockquote>Blah
-        should NOT be transformed into:
-       Alice said: <blockquote>Bob said: </blockquote><blockquote>Blah
-
-      Some tags can be nested, but the nesting is reset by the
-      interposition of other tags. For instance, a <tr> tag should
-      implicitly close the previous <tr> tag within the same <table>,
-      but not close a <tr> tag in another table.
-
-       <table><tr>Blah<tr>Blah
-        should be transformed into:
-       <table><tr>Blah</tr><tr>Blah
-        but,
-       <tr>Blah<table><tr>Blah
-        should NOT be transformed into
-       <tr>Blah<table></tr><tr>Blah
-
-    Differing assumptions about tag nesting rules are a major source
-    of problems with the BeautifulSoup class. If BeautifulSoup is not
-    treating as nestable a tag your page author treats as nestable,
-    try ICantBelieveItsBeautifulSoup, MinimalSoup, or
-    BeautifulStoneSoup before writing your own subclass."""
-
-    def __init__(self, *args, **kwargs):
-        if not kwargs.has_key('smartQuotesTo'):
-            kwargs['smartQuotesTo'] = self.HTML_ENTITIES
-        BeautifulStoneSoup.__init__(self, *args, **kwargs)
-
-    SELF_CLOSING_TAGS = buildTagMap(None,
-                                    ['br' , 'hr', 'input', 'img', 'meta',
-                                    'spacer', 'link', 'frame', 'base'])
-
-    QUOTE_TAGS = {'script': None}
-    
-    #According to the HTML standard, each of these inline tags can
-    #contain another tag of the same type. Furthermore, it's common
-    #to actually use these tags this way.
-    NESTABLE_INLINE_TAGS = ['span', 'font', 'q', 'object', 'bdo', 'sub', 'sup',
-                            'center']
-
-    #According to the HTML standard, these block tags can contain
-    #another tag of the same type. Furthermore, it's common
-    #to actually use these tags this way.
-    NESTABLE_BLOCK_TAGS = ['blockquote', 'div', 'fieldset', 'ins', 'del']
-
-    #Lists can contain other lists, but there are restrictions.    
-    NESTABLE_LIST_TAGS = { 'ol' : [],
-                           'ul' : [],
-                           'li' : ['ul', 'ol'],
-                           'dl' : [],
-                           'dd' : ['dl'],
-                           'dt' : ['dl'] }
-
-    #Tables can contain other tables, but there are restrictions.    
-    NESTABLE_TABLE_TAGS = {'table' : [], 
-                           'tr' : ['table', 'tbody', 'tfoot', 'thead'],
-                           'td' : ['tr'],
-                           'th' : ['tr'],
-                           'thead' : ['table'],
-                           'tbody' : ['table'],
-                           'tfoot' : ['table'],
-                           }
-
-    NON_NESTABLE_BLOCK_TAGS = ['address', 'form', 'p', 'pre']
-
-    #If one of these tags is encountered, all tags up to the next tag of
-    #this type are popped.
-    RESET_NESTING_TAGS = buildTagMap(None, NESTABLE_BLOCK_TAGS, 'noscript',
-                                     NON_NESTABLE_BLOCK_TAGS,
-                                     NESTABLE_LIST_TAGS,
-                                     NESTABLE_TABLE_TAGS)
-
-    NESTABLE_TAGS = buildTagMap([], NESTABLE_INLINE_TAGS, NESTABLE_BLOCK_TAGS,
-                                NESTABLE_LIST_TAGS, NESTABLE_TABLE_TAGS)
-
-    # Used to detect the charset in a META tag; see start_meta
-    CHARSET_RE = re.compile("((^|;)\s*charset=)([^;]*)")
-
-    def start_meta(self, attrs):
-        """Beautiful Soup can detect a charset included in a META tag,
-        try to convert the document to that charset, and re-parse the
-        document from the beginning."""
-        httpEquiv = None
-        contentType = None
-        contentTypeIndex = None
-        tagNeedsEncodingSubstitution = False
-
-        for i in range(0, len(attrs)):
-            key, value = attrs[i]
-            key = key.lower()
-            if key == 'http-equiv':
-                httpEquiv = value
-            elif key == 'content':
-                contentType = value
-                contentTypeIndex = i
-
-        if httpEquiv and contentType: # It's an interesting meta tag.
-            match = self.CHARSET_RE.search(contentType)
-            if match:
-                if getattr(self, 'declaredHTMLEncoding') or \
-                       (self.originalEncoding == self.fromEncoding):
-                    # This is our second pass through the document, or
-                    # else an encoding was specified explicitly and it
-                    # worked. Rewrite the meta tag.
-                    newAttr = self.CHARSET_RE.sub\
-                              (lambda(match):match.group(1) +
-                               "%SOUP-ENCODING%", value)
-                    attrs[contentTypeIndex] = (attrs[contentTypeIndex][0],
-                                               newAttr)
-                    tagNeedsEncodingSubstitution = True
-                else:
-                    # This is our first pass through the document.
-                    # Go through it again with the new information.
-                    newCharset = match.group(3)
-                    if newCharset and newCharset != self.originalEncoding:
-                        self.declaredHTMLEncoding = newCharset
-                        self._feed(self.declaredHTMLEncoding)
-                        raise StopParsing
-        tag = self.unknown_starttag("meta", attrs)
-        if tag and tagNeedsEncodingSubstitution:
-            tag.containsSubstitutions = True
-
-class StopParsing(Exception):
-    pass
-   
-class ICantBelieveItsBeautifulSoup(BeautifulSoup):
-
-    """The BeautifulSoup class is oriented towards skipping over
-    common HTML errors like unclosed tags. However, sometimes it makes
-    errors of its own. For instance, consider this fragment:
-
-     <b>Foo<b>Bar</b></b>
-
-    This is perfectly valid (if bizarre) HTML. However, the
-    BeautifulSoup class will implicitly close the first b tag when it
-    encounters the second 'b'. It will think the author wrote
-    "<b>Foo<b>Bar", and didn't close the first 'b' tag, because
-    there's no real-world reason to bold something that's already
-    bold. When it encounters '</b></b>' it will close two more 'b'
-    tags, for a grand total of three tags closed instead of two. This
-    can throw off the rest of your document structure. The same is
-    true of a number of other tags, listed below.
-
-    It's much more common for someone to forget to close a 'b' tag
-    than to actually use nested 'b' tags, and the BeautifulSoup class
-    handles the common case. This class handles the not-co-common
-    case: where you can't believe someone wrote what they did, but
-    it's valid HTML and BeautifulSoup screwed up by assuming it
-    wouldn't be."""
-
-    I_CANT_BELIEVE_THEYRE_NESTABLE_INLINE_TAGS = \
-     ['em', 'big', 'i', 'small', 'tt', 'abbr', 'acronym', 'strong',
-      'cite', 'code', 'dfn', 'kbd', 'samp', 'strong', 'var', 'b',
-      'big']
-
-    I_CANT_BELIEVE_THEYRE_NESTABLE_BLOCK_TAGS = ['noscript']
-
-    NESTABLE_TAGS = buildTagMap([], BeautifulSoup.NESTABLE_TAGS,
-                                I_CANT_BELIEVE_THEYRE_NESTABLE_BLOCK_TAGS,
-                                I_CANT_BELIEVE_THEYRE_NESTABLE_INLINE_TAGS)
-
-class MinimalSoup(BeautifulSoup):
-    """The MinimalSoup class is for parsing HTML that contains
-    pathologically bad markup. It makes no assumptions about tag
-    nesting, but it does know which tags are self-closing, that
-    <script> tags contain Javascript and should not be parsed, that
-    META tags may contain encoding information, and so on.
-
-    This also makes it better for subclassing than BeautifulStoneSoup
-    or BeautifulSoup."""
-    
-    RESET_NESTING_TAGS = buildTagMap('noscript')
-    NESTABLE_TAGS = {}
-
-class BeautifulSOAP(BeautifulStoneSoup):
-    """This class will push a tag with only a single string child into
-    the tag's parent as an attribute. The attribute's name is the tag
-    name, and the value is the string child. An example should give
-    the flavor of the change:
-
-    <foo><bar>baz</bar></foo>
-     =>
-    <foo bar="baz"><bar>baz</bar></foo>
-
-    You can then access fooTag['bar'] instead of fooTag.barTag.string.
-
-    This is, of course, useful for scraping structures that tend to
-    use subelements instead of attributes, such as SOAP messages. Note
-    that it modifies its input, so don't print the modified version
-    out.
-
-    I'm not sure how many people really want to use this class; let me
-    know if you do. Mainly I like the name."""
-
-    def popTag(self):
-        if len(self.tagStack) > 1:
-            tag = self.tagStack[-1]
-            parent = self.tagStack[-2]
-            parent._getAttrMap()
-            if (isinstance(tag, Tag) and len(tag.contents) == 1 and
-                isinstance(tag.contents[0], NavigableString) and 
-                not parent.attrMap.has_key(tag.name)):
-                parent[tag.name] = tag.contents[0]
-        BeautifulStoneSoup.popTag(self)
-
-#Enterprise class names! It has come to our attention that some people
-#think the names of the Beautiful Soup parser classes are too silly
-#and "unprofessional" for use in enterprise screen-scraping. We feel
-#your pain! For such-minded folk, the Beautiful Soup Consortium And
-#All-Night Kosher Bakery recommends renaming this file to
-#"RobustParser.py" (or, in cases of extreme enterprisness,
-#"RobustParserBeanInterface.class") and using the following
-#enterprise-friendly class aliases:
-class RobustXMLParser(BeautifulStoneSoup):
-    pass
-class RobustHTMLParser(BeautifulSoup):
-    pass
-class RobustWackAssHTMLParser(ICantBelieveItsBeautifulSoup):
-    pass
-class RobustInsanelyWackAssHTMLParser(MinimalSoup):
-    pass
-class SimplifyingSOAPParser(BeautifulSOAP):
-    pass
-
-######################################################
-#
-# Bonus library: Unicode, Dammit
-#
-# This class forces XML data into a standard format (usually to UTF-8
-# or Unicode).  It is heavily based on code from Mark Pilgrim's
-# Universal Feed Parser. It does not rewrite the XML or HTML to
-# reflect a new encoding: that happens in BeautifulStoneSoup.handle_pi
-# (XML) and BeautifulSoup.start_meta (HTML).
-
-# Autodetects character encodings.
-# Download from http://chardet.feedparser.org/
-try:
-    import chardet
-#    import chardet.constants
-#    chardet.constants._debug = 1
-except:
-    chardet = None
-chardet = None
-
-# cjkcodecs and iconv_codec make Python know about more character encodings.
-# Both are available from http://cjkpython.i18n.org/
-# They're built in if you use Python 2.4.
-try:
-    import cjkcodecs.aliases
-except:
-    pass
-try:
-    import iconv_codec
-except:
-    pass
-
-class UnicodeDammit:
-    """A class for detecting the encoding of a *ML document and
-    converting it to a Unicode string. If the source encoding is
-    windows-1252, can replace MS smart quotes with their HTML or XML
-    equivalents."""
-
-    # This dictionary maps commonly seen values for "charset" in HTML
-    # meta tags to the corresponding Python codec names. It only covers
-    # values that aren't in Python's aliases and can't be determined
-    # by the heuristics in find_codec.
-    CHARSET_ALIASES = { "macintosh" : "mac-roman",
-                        "x-sjis" : "shift-jis" }
-
-    def __init__(self, markup, overrideEncodings=[],
-                 smartQuotesTo='xml'):
-        self.markup, documentEncoding, sniffedEncoding = \
-                     self._detectEncoding(markup)
-        self.smartQuotesTo = smartQuotesTo
-        self.triedEncodings = []
-        if markup == '' or isinstance(markup, unicode):
-            self.originalEncoding = None
-            self.unicode = unicode(markup)            
-            return
-        
-        u = None
-        for proposedEncoding in overrideEncodings:
-            u = self._convertFrom(proposedEncoding)
-            if u: break
-        if not u:
-            for proposedEncoding in (documentEncoding, sniffedEncoding):
-                u = self._convertFrom(proposedEncoding)
-                if u: break
-                
-        # If no luck and we have auto-detection library, try that:
-        if not u and chardet and not isinstance(self.markup, unicode):
-            u = self._convertFrom(chardet.detect(self.markup)['encoding'])
-
-        # As a last resort, try utf-8 and windows-1252:
-        if not u:
-            for proposed_encoding in ("utf-8", "windows-1252"):
-                u = self._convertFrom(proposed_encoding)
-                if u: break
-        self.unicode = u
-        if not u: self.originalEncoding = None
-
-    def _subMSChar(self, orig):
-        """Changes a MS smart quote character to an XML or HTML
-        entity."""
-        sub = self.MS_CHARS.get(orig)
-        if type(sub) == types.TupleType:
-            if self.smartQuotesTo == 'xml':
-                sub = '&#x%s;' % sub[1]
-            else:
-                sub = '&%s;' % sub[0]
-        return sub            
-
-    def _convertFrom(self, proposed):        
-        proposed = self.find_codec(proposed)
-        if not proposed or proposed in self.triedEncodings:
-            return None
-        self.triedEncodings.append(proposed)
-        markup = self.markup
-
-        # Convert smart quotes to HTML if coming from an encoding
-        # that might have them.
-        if self.smartQuotesTo and proposed.lower() in("windows-1252",
-                                                      "iso-8859-1",
-                                                      "iso-8859-2"):
-            markup = re.compile("([\x80-\x9f])").sub \
-                     (lambda(x): self._subMSChar(x.group(1)),
-                      markup)
-
-        try:
-            # print "Trying to convert document to %s" % proposed
-            u = self._toUnicode(markup, proposed)
-            self.markup = u       
-            self.originalEncoding = proposed
-        except Exception, e:
-            # print "That didn't work!"
-            # print e
-            return None        
-        #print "Correct encoding: %s" % proposed
-        return self.markup
-
-    def _toUnicode(self, data, encoding):
-        '''Given a string and its encoding, decodes the string into Unicode.
-        %encoding is a string recognized by encodings.aliases'''
-
-        # strip Byte Order Mark (if present)
-        if (len(data) >= 4) and (data[:2] == '\xfe\xff') \
-               and (data[2:4] != '\x00\x00'):
-            encoding = 'utf-16be'
-            data = data[2:]
-        elif (len(data) >= 4) and (data[:2] == '\xff\xfe') \
-                 and (data[2:4] != '\x00\x00'):
-            encoding = 'utf-16le'
-            data = data[2:]
-        elif data[:3] == '\xef\xbb\xbf':
-            encoding = 'utf-8'
-            data = data[3:]
-        elif data[:4] == '\x00\x00\xfe\xff':
-            encoding = 'utf-32be'
-            data = data[4:]
-        elif data[:4] == '\xff\xfe\x00\x00':
-            encoding = 'utf-32le'
-            data = data[4:]
-        newdata = unicode(data, encoding)
-        return newdata
-    
-    def _detectEncoding(self, xml_data):
-        """Given a document, tries to detect its XML encoding."""
-        xml_encoding = sniffed_xml_encoding = None
-        try:
-            if xml_data[:4] == '\x4c\x6f\xa7\x94':
-                # EBCDIC
-                xml_data = self._ebcdic_to_ascii(xml_data)
-            elif xml_data[:4] == '\x00\x3c\x00\x3f':
-                # UTF-16BE
-                sniffed_xml_encoding = 'utf-16be'
-                xml_data = unicode(xml_data, 'utf-16be').encode('utf-8')
-            elif (len(xml_data) >= 4) and (xml_data[:2] == '\xfe\xff') \
-                     and (xml_data[2:4] != '\x00\x00'):
-                # UTF-16BE with BOM
-                sniffed_xml_encoding = 'utf-16be'
-                xml_data = unicode(xml_data[2:], 'utf-16be').encode('utf-8')
-            elif xml_data[:4] == '\x3c\x00\x3f\x00':
-                # UTF-16LE
-                sniffed_xml_encoding = 'utf-16le'
-                xml_data = unicode(xml_data, 'utf-16le').encode('utf-8')
-            elif (len(xml_data) >= 4) and (xml_data[:2] == '\xff\xfe') and \
-                     (xml_data[2:4] != '\x00\x00'):
-                # UTF-16LE with BOM
-                sniffed_xml_encoding = 'utf-16le'
-                xml_data = unicode(xml_data[2:], 'utf-16le').encode('utf-8')
-            elif xml_data[:4] == '\x00\x00\x00\x3c':
-                # UTF-32BE
-                sniffed_xml_encoding = 'utf-32be'
-                xml_data = unicode(xml_data, 'utf-32be').encode('utf-8')
-            elif xml_data[:4] == '\x3c\x00\x00\x00':
-                # UTF-32LE
-                sniffed_xml_encoding = 'utf-32le'
-                xml_data = unicode(xml_data, 'utf-32le').encode('utf-8')
-            elif xml_data[:4] == '\x00\x00\xfe\xff':
-                # UTF-32BE with BOM
-                sniffed_xml_encoding = 'utf-32be'
-                xml_data = unicode(xml_data[4:], 'utf-32be').encode('utf-8')
-            elif xml_data[:4] == '\xff\xfe\x00\x00':
-                # UTF-32LE with BOM
-                sniffed_xml_encoding = 'utf-32le'
-                xml_data = unicode(xml_data[4:], 'utf-32le').encode('utf-8')
-            elif xml_data[:3] == '\xef\xbb\xbf':
-                # UTF-8 with BOM
-                sniffed_xml_encoding = 'utf-8'
-                xml_data = unicode(xml_data[3:], 'utf-8').encode('utf-8')
-            else:
-                sniffed_xml_encoding = 'ascii'
-                pass
-            xml_encoding_match = re.compile \
-                                 ('^<\?.*encoding=[\'"](.*?)[\'"].*\?>')\
-                                 .match(xml_data)
-        except:
-            xml_encoding_match = None
-        if xml_encoding_match:
-            xml_encoding = xml_encoding_match.groups()[0].lower()
-            if sniffed_xml_encoding and \
-               (xml_encoding in ('iso-10646-ucs-2', 'ucs-2', 'csunicode',
-                                 'iso-10646-ucs-4', 'ucs-4', 'csucs4',
-                                 'utf-16', 'utf-32', 'utf_16', 'utf_32',
-                                 'utf16', 'u16')):
-                xml_encoding = sniffed_xml_encoding
-        return xml_data, xml_encoding, sniffed_xml_encoding
-
-
-    def find_codec(self, charset):
-        return self._codec(self.CHARSET_ALIASES.get(charset, charset)) \
-               or (charset and self._codec(charset.replace("-", ""))) \
-               or (charset and self._codec(charset.replace("-", "_"))) \
-               or charset
-
-    def _codec(self, charset):
-        if not charset: return charset 
-        codec = None
-        try:
-            codecs.lookup(charset)
-            codec = charset
-        except LookupError:
-            pass
-        return codec
-
-    EBCDIC_TO_ASCII_MAP = None
-    def _ebcdic_to_ascii(self, s):
-        c = self.__class__
-        if not c.EBCDIC_TO_ASCII_MAP:
-            emap = (0,1,2,3,156,9,134,127,151,141,142,11,12,13,14,15,
-                    16,17,18,19,157,133,8,135,24,25,146,143,28,29,30,31,
-                    128,129,130,131,132,10,23,27,136,137,138,139,140,5,6,7,
-                    144,145,22,147,148,149,150,4,152,153,154,155,20,21,158,26,
-                    32,160,161,162,163,164,165,166,167,168,91,46,60,40,43,33,
-                    38,169,170,171,172,173,174,175,176,177,93,36,42,41,59,94,
-                    45,47,178,179,180,181,182,183,184,185,124,44,37,95,62,63,
-                    186,187,188,189,190,191,192,193,194,96,58,35,64,39,61,34,
-                    195,97,98,99,100,101,102,103,104,105,196,197,198,199,200,
-                    201,202,106,107,108,109,110,111,112,113,114,203,204,205,
-                    206,207,208,209,126,115,116,117,118,119,120,121,122,210,
-                    211,212,213,214,215,216,217,218,219,220,221,222,223,224,
-                    225,226,227,228,229,230,231,123,65,66,67,68,69,70,71,72,
-                    73,232,233,234,235,236,237,125,74,75,76,77,78,79,80,81,
-                    82,238,239,240,241,242,243,92,159,83,84,85,86,87,88,89,
-                    90,244,245,246,247,248,249,48,49,50,51,52,53,54,55,56,57,
-                    250,251,252,253,254,255)
-            import string
-            c.EBCDIC_TO_ASCII_MAP = string.maketrans( \
-            ''.join(map(chr, range(256))), ''.join(map(chr, emap)))
-        return s.translate(c.EBCDIC_TO_ASCII_MAP)
-
-    MS_CHARS = { '\x80' : ('euro', '20AC'),
-                 '\x81' : ' ',
-                 '\x82' : ('sbquo', '201A'),
-                 '\x83' : ('fnof', '192'),
-                 '\x84' : ('bdquo', '201E'),
-                 '\x85' : ('hellip', '2026'),
-                 '\x86' : ('dagger', '2020'),
-                 '\x87' : ('Dagger', '2021'),
-                 '\x88' : ('circ', '2C6'),
-                 '\x89' : ('permil', '2030'),
-                 '\x8A' : ('Scaron', '160'),
-                 '\x8B' : ('lsaquo', '2039'),
-                 '\x8C' : ('OElig', '152'),
-                 '\x8D' : '?',
-                 '\x8E' : ('#x17D', '17D'),
-                 '\x8F' : '?',
-                 '\x90' : '?',
-                 '\x91' : ('lsquo', '2018'),
-                 '\x92' : ('rsquo', '2019'),
-                 '\x93' : ('ldquo', '201C'),
-                 '\x94' : ('rdquo', '201D'),
-                 '\x95' : ('bull', '2022'),
-                 '\x96' : ('ndash', '2013'),
-                 '\x97' : ('mdash', '2014'),
-                 '\x98' : ('tilde', '2DC'),
-                 '\x99' : ('trade', '2122'),
-                 '\x9a' : ('scaron', '161'),
-                 '\x9b' : ('rsaquo', '203A'),
-                 '\x9c' : ('oelig', '153'),
-                 '\x9d' : '?',
-                 '\x9e' : ('#x17E', '17E'),
-                 '\x9f' : ('Yuml', ''),}
-
-#######################################################################
-
-
-#By default, act as an HTML pretty-printer.
-if __name__ == '__main__':
-    import sys
-    soup = BeautifulSoup(sys.stdin.read())
-    print soup.prettify()
-

--- a/labs/openlayers/tools/README.txt
+++ /dev/null
@@ -1,15 +1,1 @@
-This directory contains tools used in the packaging or deployment of OpenLayers.
 
-Javascript minimizing tools:
-
- * jsmin.c, jsmin.py:
-   jsmin.py is a direct translation of the jsmin.c code into Python. jsmin.py
-   will therefore run anyplace Python runs... but at significantly slower speed.
- 
- * shrinksafe.py
-   shrinksafe.py calls out to a third party javascript shrinking service. This 
-   creates file sizes about 4% smaller (as of commit 501) of the OpenLayers 
-   code. However, this also has the side effect of making you dependant on the 
-   web service -- and since that service sometimes goes dead, it's risky to 
-   depend on it.
-

--- a/labs/openlayers/tools/exampleparser.py
+++ /dev/null
@@ -1,252 +1,1 @@
-#!/usr/bin/env python
 
-import sys
-import os
-import re
-import urllib2
-import time
-from xml.dom.minidom import Document
-
-try:
-    import xml.etree.ElementTree as ElementTree 
-except ImportError:
-    try:
-        import cElementTree as ElementTree
-    except ImportError:
-        try:
-            import elementtree.ElementTree as ElementTree
-        except ImportError:
-            import lxml.etree as ElementTree
-
-missing_deps = False
-try:
-    import simplejson
-    from BeautifulSoup import BeautifulSoup
-except ImportError, E:
-    missing_deps = E 
-
-feedName = "example-list.xml"
-feedPath = "http://openlayers.org/dev/examples/"
-
-def getListOfOnlineExamples(baseUrl):
-    """
-    useful if you want to get a list of examples a url. not used by default.
-    """
-    html = urllib2.urlopen(baseUrl)
-    soup = BeautifulSoup(html)
-    examples = soup.findAll('li')
-    examples = [example.find('a').get('href') for example in examples]
-    examples = [example for example in examples if example.endswith('.html')]
-    examples = [example for example in examples]
-    return examples
-    
-def getListOfExamples(relPath):
-    """
-    returns list of .html filenames within a given path - excludes example-list.html
-    """
-    examples = os.listdir(relPath)
-    examples = [example for example in examples if example.endswith('.html') and example != "example-list.html"]
-    return examples
-    
-
-def getExampleHtml(location):
-    """
-    returns html of a specific example that is available online or locally
-    """
-    print '.',
-    if location.startswith('http'):
-        return urllib2.urlopen(location).read()
-    else:
-        f = open(location)
-        html = f.read()
-        f.close()
-        return html
-        
-    
-def extractById(soup, tagId, value=None):
-    """
-    returns full contents of a particular tag id
-    """
-    beautifulTag = soup.find(id=tagId)
-    if beautifulTag:
-        if beautifulTag.contents: 
-            value = str(beautifulTag.renderContents()).strip()
-            value = value.replace('\t','')
-            value = value.replace('\n','')
-    return value
-
-def getRelatedClasses(html):
-    """
-    parses the html, and returns a list of all OpenLayers Classes 
-    used within (ie what parts of OL the javascript uses).  
-    """
-    rawstr = r'''(?P<class>OpenLayers\..*?)\('''
-    return re.findall(rawstr, html)
-
-def parseHtml(html,ids):
-    """
-    returns dictionary of items of interest
-    """
-    soup = BeautifulSoup(html)
-    d = {}
-    for tagId in ids:
-        d[tagId] = extractById(soup,tagId)
-    #classes should eventually be parsed from docs - not automatically created.
-    classes = getRelatedClasses(html)
-    d['classes'] = classes
-    return d
-
-def getSvnInfo(path):
-    h = os.popen("svn info %s --xml" % path)
-    tree = ElementTree.fromstring(h.read())
-    h.close()
-    d = {
-        'url': tree.findtext('entry/url'),
-        'author': tree.findtext('entry/commit/author'),
-        'date': tree.findtext('entry/commit/date')
-    }
-    return d
-    
-def createFeed(examples):
-    doc = Document()
-    atomuri = "http://www.w3.org/2005/Atom"
-    feed = doc.createElementNS(atomuri, "feed")
-    feed.setAttribute("xmlns", atomuri)
-    title = doc.createElementNS(atomuri, "title")
-    title.appendChild(doc.createTextNode("OpenLayers Examples"))
-    feed.appendChild(title)
-    link = doc.createElementNS(atomuri, "link")
-    link.setAttribute("rel", "self")
-    link.setAttribute("href", feedPath + feedName)
-    
-    modtime = time.strftime("%Y-%m-%dT%I:%M:%SZ", time.gmtime())
-    id = doc.createElementNS(atomuri, "id")
-    id.appendChild(doc.createTextNode("%s%s#%s" % (feedPath, feedName, modtime)))
-    feed.appendChild(id)
-    
-    updated = doc.createElementNS(atomuri, "updated")
-    updated.appendChild(doc.createTextNode(modtime))
-    feed.appendChild(updated)
-
-    examples.sort(key=lambda x:x["modified"])
-    for example in sorted(examples, key=lambda x:x["modified"], reverse=True):
-        entry = doc.createElementNS(atomuri, "entry")
-        
-        title = doc.createElementNS(atomuri, "title")
-        title.appendChild(doc.createTextNode(example["title"] or example["example"]))
-        entry.appendChild(title)
-        
-        link = doc.createElementNS(atomuri, "link")
-        link.setAttribute("href", "%s%s" % (feedPath, example["example"]))
-        entry.appendChild(link)
-    
-        summary = doc.createElementNS(atomuri, "summary")
-        summary.appendChild(doc.createTextNode(example["shortdesc"] or example["example"]))
-        entry.appendChild(summary)
-        
-        updated = doc.createElementNS(atomuri, "updated")
-        updated.appendChild(doc.createTextNode(example["modified"]))
-        entry.appendChild(updated)
-        
-        author = doc.createElementNS(atomuri, "author")
-        name = doc.createElementNS(atomuri, "name")
-        name.appendChild(doc.createTextNode(example["author"]))
-        author.appendChild(name)
-        entry.appendChild(author)
-        
-        id = doc.createElementNS(atomuri, "id")
-        id.appendChild(doc.createTextNode("%s%s#%s" % (feedPath, example["example"], example["modified"])))
-        entry.appendChild(id)
-        
-        feed.appendChild(entry)
-
-    doc.appendChild(feed)
-    return doc    
-    
-def wordIndex(examples):
-    """
-    Create an inverted index based on words in title and shortdesc.  Keys are
-    lower cased words.  Values are dictionaries with example index keys and
-    count values.
-    """
-    index = {}
-    unword = re.compile("\\W+")
-    keys = ["shortdesc", "title"]
-    for i in range(len(examples)):
-        for key in keys:
-            text = examples[i][key]
-            if text:
-                words = unword.split(text)
-                for word in words:
-                    if word:
-                        word = word.lower()
-                        if index.has_key(word):
-                            if index[word].has_key(i):
-                                index[word][i] += 1
-                            else:
-                                index[word][i] = 1
-                        else:
-                            index[word] = {i: 1}
-    return index
-    
-if __name__ == "__main__":
-
-    if missing_deps:
-        print "This script requires simplejson and BeautifulSoup. You don't have them. \n(%s)" % E
-        sys.exit()
-    
-    if len(sys.argv) > 1:
-        outFile = open(sys.argv[1],'w')
-    else:
-        outFile = open('../examples/example-list.js','w')
-    
-    examplesLocation = '../examples'
-    print 'Reading examples from %s and writing out to %s' % (examplesLocation, outFile.name)
-   
-    exampleList = []
-    docIds = ['title','shortdesc']
-   
-    #comment out option to create docs from online resource
-    #examplesLocation = 'http://svn.openlayers.org/sandbox/docs/examples/'
-    #examples = getListOfOnlineExamples(examplesLocation)
-
-    examples = getListOfExamples(examplesLocation)
-
-    modtime = time.strftime("%Y-%m-%dT%I:%M:%SZ", time.gmtime())
-
-    for example in examples:
-        url = os.path.join(examplesLocation,example)
-        html = getExampleHtml(url)
-        tagvalues = parseHtml(html,docIds)
-        tagvalues['example'] = example
-        # add in svn info
-        d = getSvnInfo(url)
-        tagvalues["modified"] = d["date"] or modtime
-        tagvalues["author"] = d["author"] or "anonymous"
-        tagvalues['link'] = example
-
-        exampleList.append(tagvalues)
-        
-    print
-    
-    exampleList.sort(key=lambda x:x['example'].lower())
-    
-    index = wordIndex(exampleList)
-
-    json = simplejson.dumps({"examples": exampleList, "index": index})
-    #give the json a global variable we can use in our js.  This should be replaced or made optional.
-    json = 'var info=' + json 
-    outFile.write(json)
-    outFile.close()
-
-    print "writing feed to ../examples/%s " % feedName
-    atom = open('../examples/%s' % feedName, 'w')
-    doc = createFeed(exampleList)
-    atom.write(doc.toxml())
-    atom.close()
-
-
-    print 'complete'
-
-    
-

--- a/labs/openlayers/tools/jsmin.c
+++ /dev/null
@@ -1,273 +1,1 @@
-/* jsmin.c
-   2006-05-04
 
-Copyright (c) 2002 Douglas Crockford  (www.crockford.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 shall be used for Good, not Evil.
-
-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.
-*/
-
-#include <stdlib.h>
-#include <stdio.h>
-
-static int   theA;
-static int   theB;
-static int   theLookahead = EOF;
-
-
-/* isAlphanum -- return true if the character is a letter, digit, underscore,
-        dollar sign, or non-ASCII character.
-*/
-
-static int
-isAlphanum(int c)
-{
-    return ((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') ||
-        (c >= 'A' && c <= 'Z') || c == '_' || c == '$' || c == '\\' ||
-        c > 126);
-}
-
-
-/* get -- return the next character from stdin. Watch out for lookahead. If
-        the character is a control character, translate it to a space or
-        linefeed.
-*/
-
-static int
-get()
-{
-    int c = theLookahead;
-    theLookahead = EOF;
-    if (c == EOF) {
-        c = getc(stdin);
-    }
-    if (c >= ' ' || c == '\n' || c == EOF) {
-        return c;
-    }
-    if (c == '\r') {
-        return '\n';
-    }
-    return ' ';
-}
-
-
-/* peek -- get the next character without getting it.
-*/
-
-static int
-peek()
-{
-    theLookahead = get();
-    return theLookahead;
-}
-
-
-/* next -- get the next character, excluding comments. peek() is used to see
-        if a '/' is followed by a '/' or '*'.
-*/
-
-static int
-next()
-{
-    int c = get();
-    if  (c == '/') {
-        switch (peek()) {
-        case '/':
-            for (;;) {
-                c = get();
-                if (c <= '\n') {
-                    return c;
-                }
-            }
-        case '*':
-            get();
-            for (;;) {
-                switch (get()) {
-                case '*':
-                    if (peek() == '/') {
-                        get();
-                        return ' ';
-                    }
-                    break;
-                case EOF:
-                    fprintf(stderr, "Error: JSMIN Unterminated comment.\n");
-                    exit(1);
-                }
-            }
-        default:
-            return c;
-        }
-    }
-    return c;
-}
-
-
-/* action -- do something! What you do is determined by the argument:
-        1   Output A. Copy B to A. Get the next B.
-        2   Copy B to A. Get the next B. (Delete A).
-        3   Get the next B. (Delete B).
-   action treats a string as a single character. Wow!
-   action recognizes a regular expression if it is preceded by ( or , or =.
-*/
-
-static void
-action(int d)
-{
-    switch (d) {
-    case 1:
-        putc(theA, stdout);
-    case 2:
-        theA = theB;
-        if (theA == '\'' || theA == '"') {
-            for (;;) {
-                putc(theA, stdout);
-                theA = get();
-                if (theA == theB) {
-                    break;
-                }
-                if (theA <= '\n') {
-                    fprintf(stderr,
-"Error: JSMIN unterminated string literal: %c\n", theA);
-                    exit(1);
-                }
-                if (theA == '\\') {
-                    putc(theA, stdout);
-                    theA = get();
-                }
-            }
-        }
-    case 3:
-        theB = next();
-        if (theB == '/' && (theA == '(' || theA == ',' || theA == '=' ||
-                theA == ':' || theA == '[' || theA == '!' || theA == '&' || 
-                theA == '|')) {
-            putc(theA, stdout);
-            putc(theB, stdout);
-            for (;;) {
-                theA = get();
-                if (theA == '/') {
-                    break;
-                } else if (theA =='\\') {
-                    putc(theA, stdout);
-                    theA = get();
-                } else if (theA <= '\n') {
-                    fprintf(stderr,
-"Error: JSMIN unterminated Regular Expression literal.\n", theA);
-                    exit(1);
-                }
-                putc(theA, stdout);
-            }
-            theB = next();
-        }
-    }
-}
-
-
-/* jsmin -- Copy the input to the output, deleting the characters which are
-        insignificant to JavaScript. Comments will be removed. Tabs will be
-        replaced with spaces. Carriage returns will be replaced with linefeeds.
-        Most spaces and linefeeds will be removed.
-*/
-
-static void
-jsmin()
-{
-    theA = '\n';
-    action(3);
-    while (theA != EOF) {
-        switch (theA) {
-        case ' ':
-            if (isAlphanum(theB)) {
-                action(1);
-            } else {
-                action(2);
-            }
-            break;
-        case '\n':
-            switch (theB) {
-            case '{':
-            case '[':
-            case '(':
-            case '+':
-            case '-':
-                action(1);
-                break;
-            case ' ':
-                action(3);
-                break;
-            default:
-                if (isAlphanum(theB)) {
-                    action(1);
-                } else {
-                    action(2);
-                }
-            }
-            break;
-        default:
-            switch (theB) {
-            case ' ':
-                if (isAlphanum(theA)) {
-                    action(1);
-                    break;
-                }
-                action(3);
-                break;
-            case '\n':
-                switch (theA) {
-                case '}':
-                case ']':
-                case ')':
-                case '+':
-                case '-':
-                case '"':
-                case '\'':
-                    action(1);
-                    break;
-                default:
-                    if (isAlphanum(theA)) {
-                        action(1);
-                    } else {
-                        action(3);
-                    }
-                }
-                break;
-            default:
-                action(1);
-                break;
-            }
-        }
-    }
-}
-
-
-/* main -- Output any command line arguments as comments
-        and then minify the input.
-*/
-extern int
-main(int argc, char* argv[])
-{
-    int i;
-    for (i = 1; i < argc; i += 1) {
-        fprintf(stdout, "// %s\n", argv[i]);
-    }
-    jsmin();
-    return 0;
-}
-

--- a/labs/openlayers/tools/jsmin.py
+++ /dev/null
@@ -1,217 +1,1 @@
-#!/usr/bin/python
 
-# This code is original from jsmin by Douglas Crockford, it was translated to
-# Python by Baruch Even. The original code had the following copyright and
-# license.
-#
-# /* jsmin.c
-#    2007-01-08
-#
-# Copyright (c) 2002 Douglas Crockford  (www.crockford.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 shall be used for Good, not Evil.
-#
-# 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.
-# */
-
-from StringIO import StringIO
-
-def jsmin(js):
-    ins = StringIO(js)
-    outs = StringIO()
-    JavascriptMinify().minify(ins, outs)
-    str = outs.getvalue()
-    if len(str) > 0 and str[0] == '\n':
-        str = str[1:]
-    return str
-
-def isAlphanum(c):
-    """return true if the character is a letter, digit, underscore,
-           dollar sign, or non-ASCII character.
-    """
-    return ((c >= 'a' and c <= 'z') or (c >= '0' and c <= '9') or
-            (c >= 'A' and c <= 'Z') or c == '_' or c == '$' or c == '\\' or (c is not None and ord(c) > 126));
-
-class UnterminatedComment(Exception):
-    pass
-
-class UnterminatedStringLiteral(Exception):
-    pass
-
-class UnterminatedRegularExpression(Exception):
-    pass
-
-class JavascriptMinify(object):
-
-    def _outA(self):
-        self.outstream.write(self.theA)
-    def _outB(self):
-        self.outstream.write(self.theB)
-
-    def _get(self):
-        """return the next character from stdin. Watch out for lookahead. If
-           the character is a control character, translate it to a space or
-           linefeed.
-        """
-        c = self.theLookahead
-        self.theLookahead = None
-        if c == None:
-            c = self.instream.read(1)
-        if c >= ' ' or c == '\n':
-            return c
-        if c == '': # EOF
-            return '\000'
-        if c == '\r':
-            return '\n'
-        return ' '
-
-    def _peek(self):
-        self.theLookahead = self._get()
-        return self.theLookahead
-
-    def _next(self):
-        """get the next character, excluding comments. peek() is used to see
-           if a '/' is followed by a '/' or '*'.
-        """
-        c = self._get()
-        if c == '/':
-            p = self._peek()
-            if p == '/':
-                c = self._get()
-                while c > '\n':
-                    c = self._get()
-                return c
-            if p == '*':
-                c = self._get()
-                while 1:
-                    c = self._get()
-                    if c == '*':
-                        if self._peek() == '/':
-                            self._get()
-                            return ' '
-                    if c == '\000':
-                        raise UnterminatedComment()
-
-        return c
-
-    def _action(self, action):
-        """do something! What you do is determined by the argument:
-           1   Output A. Copy B to A. Get the next B.
-           2   Copy B to A. Get the next B. (Delete A).
-           3   Get the next B. (Delete B).
-           action treats a string as a single character. Wow!
-           action recognizes a regular expression if it is preceded by ( or , or =.
-        """
-        if action <= 1:
-            self._outA()
-
-        if action <= 2:
-            self.theA = self.theB
-            if self.theA == "'" or self.theA == '"':
-                while 1:
-                    self._outA()
-                    self.theA = self._get()
-                    if self.theA == self.theB:
-                        break
-                    if self.theA <= '\n':
-                        raise UnterminatedStringLiteral()
-                    if self.theA == '\\':
-                        self._outA()
-                        self.theA = self._get()
-
-
-        if action <= 3:
-            self.theB = self._next()
-            if self.theB == '/' and (self.theA == '(' or self.theA == ',' or
-                                     self.theA == '=' or self.theA == ':' or
-                                     self.theA == '[' or self.theA == '?' or
-                                     self.theA == '!' or self.theA == '&' or
-                                     self.theA == '|'):
-                self._outA()
-                self._outB()
-                while 1:
-                    self.theA = self._get()
-                    if self.theA == '/':
-                        break
-                    elif self.theA == '\\':
-                        self._outA()
-                        self.theA = self._get()
-                    elif self.theA <= '\n':
-                        raise UnterminatedRegularExpression()
-                    self._outA()
-                self.theB = self._next()
-
-
-    def _jsmin(self):
-        """Copy the input to the output, deleting the characters which are
-           insignificant to JavaScript. Comments will be removed. Tabs will be
-           replaced with spaces. Carriage returns will be replaced with linefeeds.
-           Most spaces and linefeeds will be removed.
-        """
-        self.theA = '\n'
-        self._action(3)
-
-        while self.theA != '\000':
-            if self.theA == ' ':
-                if isAlphanum(self.theB):
-                    self._action(1)
-                else:
-                    self._action(2)
-            elif self.theA == '\n':
-                if self.theB in ['{', '[', '(', '+', '-']:
-                    self._action(1)
-                elif self.theB == ' ':
-                    self._action(3)
-                else:
-                    if isAlphanum(self.theB):
-                        self._action(1)
-                    else:
-                        self._action(2)
-            else:
-                if self.theB == ' ':
-                    if isAlphanum(self.theA):
-                        self._action(1)
-                    else:
-                        self._action(3)
-                elif self.theB == '\n':
-                    if self.theA in ['}', ']', ')', '+', '-', '"', '\'']:
-                        self._action(1)
-                    else:
-                        if isAlphanum(self.theA):
-                            self._action(1)
-                        else:
-                            self._action(3)
-                else:
-                    self._action(1)
-
-    def minify(self, instream, outstream):
-        self.instream = instream
-        self.outstream = outstream
-        self.theA = None
-        self.thaB = None
-        self.theLookahead = None
-
-        self._jsmin()
-        self.instream.close()
-
-if __name__ == '__main__':
-    import sys
-    jsm = JavascriptMinify()
-    jsm.minify(sys.stdin, sys.stdout)
-

--- a/labs/openlayers/tools/mergejs.py
+++ /dev/null
@@ -1,253 +1,1 @@
-#!/usr/bin/env python
-#
-# Merge multiple JavaScript source code files into one.
-#
-# Usage:
-# This script requires source files to have dependencies specified in them.
-#
-# Dependencies are specified with a comment of the form:
-#
-#     // @requires <file path>
-#
-#  e.g.
-#
-#    // @requires Geo/DataSource.js
-#
-# This script should be executed like so:
-#
-#     mergejs.py <output.js> <directory> [...]
-#
-# e.g.
-#
-#     mergejs.py openlayers.js Geo/ CrossBrowser/
-#
-#  This example will cause the script to walk the `Geo` and
-#  `CrossBrowser` directories--and subdirectories thereof--and import
-#  all `*.js` files encountered. The dependency declarations will be extracted
-#  and then the source code from imported files will be output to 
-#  a file named `openlayers.js` in an order which fulfils the dependencies
-#  specified.
-#
-#
-# Note: This is a very rough initial version of this code.
-#
-# -- Copyright 2005-2010 OpenLayers contributors / OpenLayers project --
-#
 
-# TODO: Allow files to be excluded. e.g. `Crossbrowser/DebugMode.js`?
-# TODO: Report error when dependency can not be found rather than KeyError.
-
-import re
-import os
-import sys
-
-SUFFIX_JAVASCRIPT = ".js"
-
-RE_REQUIRE = "@requires:? (.*)\n" # TODO: Ensure in comment?
-class SourceFile:
-    """
-    Represents a Javascript source code file.
-    """
-
-    def __init__(self, filepath, source):
-        """
-        """
-        self.filepath = filepath
-        self.source = source
-
-        self.requiredBy = []
-
-
-    def _getRequirements(self):
-        """
-        Extracts the dependencies specified in the source code and returns
-        a list of them.
-        """
-        # TODO: Cache?
-        return re.findall(RE_REQUIRE, self.source)
-
-    requires = property(fget=_getRequirements, doc="")
-
-
-
-def usage(filename):
-    """
-    Displays a usage message.
-    """
-    print "%s [-c <config file>] <output.js> <directory> [...]" % filename
-
-
-class Config:
-    """
-    Represents a parsed configuration file.
-
-    A configuration file should be of the following form:
-
-        [first]
-        3rd/prototype.js
-        core/application.js
-        core/params.js
-        # A comment
-
-        [last]
-        core/api.js # Another comment
-
-        [exclude]
-        3rd/logger.js
-
-    All headings are required.
-
-    The files listed in the `first` section will be forced to load
-    *before* all other files (in the order listed). The files in `last`
-    section will be forced to load *after* all the other files (in the
-    order listed).
-
-    The files list in the `exclude` section will not be imported.
-
-    Any text appearing after a # symbol indicates a comment.
-    
-    """
-
-    def __init__(self, filename):
-        """
-        Parses the content of the named file and stores the values.
-        """
-        lines = [re.sub("#.*?$", "", line).strip() # Assumes end-of-line character is present
-                 for line in open(filename)
-                 if line.strip() and not line.strip().startswith("#")] # Skip blank lines and comments
-
-        self.forceFirst = lines[lines.index("[first]") + 1:lines.index("[last]")]
-
-        self.forceLast = lines[lines.index("[last]") + 1:lines.index("[include]")]
-        self.include =  lines[lines.index("[include]") + 1:lines.index("[exclude]")]
-        self.exclude =  lines[lines.index("[exclude]") + 1:]
-
-def run (sourceDirectory, outputFilename = None, configFile = None):
-    cfg = None
-    if configFile:
-        cfg = Config(configFile)
-
-    allFiles = []
-
-    ## Find all the Javascript source files
-    for root, dirs, files in os.walk(sourceDirectory):
-        for filename in files:
-            if filename.endswith(SUFFIX_JAVASCRIPT) and not filename.startswith("."):
-                filepath = os.path.join(root, filename)[len(sourceDirectory)+1:]
-                filepath = filepath.replace("\\", "/")
-                if cfg and cfg.include:
-                    if filepath in cfg.include or filepath in cfg.forceFirst:
-                        allFiles.append(filepath)
-                elif (not cfg) or (filepath not in cfg.exclude):
-                    allFiles.append(filepath)
-
-    ## Header inserted at the start of each file in the output
-    HEADER = "/* " + "=" * 70 + "\n    %s\n" + "   " + "=" * 70 + " */\n\n"
-
-    files = {}
-
-    order = [] # List of filepaths to output, in a dependency satisfying order 
-
-    ## Import file source code
-    ## TODO: Do import when we walk the directories above?
-    for filepath in allFiles:
-        print "Importing: %s" % filepath
-        fullpath = os.path.join(sourceDirectory, filepath).strip()
-        content = open(fullpath, "U").read() # TODO: Ensure end of line @ EOF?
-        files[filepath] = SourceFile(filepath, content) # TODO: Chop path?
-
-    print
-
-    from toposort import toposort
-
-    complete = False
-    resolution_pass = 1
-
-    while not complete:
-        order = [] # List of filepaths to output, in a dependency satisfying order 
-        nodes = []
-        routes = []
-        ## Resolve the dependencies
-        print "Resolution pass %s... " % resolution_pass
-        resolution_pass += 1 
-
-        for filepath, info in files.items():
-            nodes.append(filepath)
-            for neededFilePath in info.requires:
-                routes.append((neededFilePath, filepath))
-
-        for dependencyLevel in toposort(nodes, routes):
-            for filepath in dependencyLevel:
-                order.append(filepath)
-                if not files.has_key(filepath):
-                    print "Importing: %s" % filepath
-                    fullpath = os.path.join(sourceDirectory, filepath).strip()
-                    content = open(fullpath, "U").read() # TODO: Ensure end of line @ EOF?
-                    files[filepath] = SourceFile(filepath, content) # TODO: Chop path?
-        
-
-
-        # Double check all dependencies have been met
-        complete = True
-        try:
-            for fp in order:
-                if max([order.index(rfp) for rfp in files[fp].requires] +
-                       [order.index(fp)]) != order.index(fp):
-                    complete = False
-        except:
-            complete = False
-        
-        print    
-
-
-    ## Move forced first and last files to the required position
-    if cfg:
-        print "Re-ordering files..."
-        order = cfg.forceFirst + [item
-                     for item in order
-                     if ((item not in cfg.forceFirst) and
-                         (item not in cfg.forceLast))] + cfg.forceLast
-    
-    print
-    ## Output the files in the determined order
-    result = []
-
-    for fp in order:
-        f = files[fp]
-        print "Exporting: ", f.filepath
-        result.append(HEADER % f.filepath)
-        source = f.source
-        result.append(source)
-        if not source.endswith("\n"):
-            result.append("\n")
-
-    print "\nTotal files merged: %d " % len(files)
-
-    if outputFilename:
-        print "\nGenerating: %s" % (outputFilename)
-        open(outputFilename, "w").write("".join(result))
-    return "".join(result)
-
-if __name__ == "__main__":
-    import getopt
-
-    options, args = getopt.getopt(sys.argv[1:], "-c:")
-    
-    try:
-        outputFilename = args[0]
-    except IndexError:
-        usage(sys.argv[0])
-        raise SystemExit
-    else:
-        sourceDirectory = args[1]
-        if not sourceDirectory:
-            usage(sys.argv[0])
-            raise SystemExit
-
-    configFile = None
-    if options and options[0][0] == "-c":
-        configFile = options[0][1]
-        print "Parsing configuration file: %s" % filename
-
-    run( sourceDirectory, outputFilename, configFile )
-

--- a/labs/openlayers/tools/minimize.py
+++ /dev/null
@@ -1,48 +1,1 @@
-# Minimal Python Minimizer
-# Copyright 2008, Christopher Schmidt
-# Released under the MIT License
-#
-# Taken from: http://svn.crschmidt.net/personal/python/minimize.py
-# $Id: minimize.py 6 2008-01-03 06:33:35Z crschmidt $
-#
-# 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.
 
-import re
-
-def strip_comments_helper(data):
-    """remove all /* */ format comments and surrounding whitespace."""
-    p = re.compile(r'[\s]*/\*.*?\*/[\s]*', re.DOTALL)
-    return p.sub('',data)
-
-def minimize(data, exclude=None):
-    """Central function call. This will call all other compression
-       functions. To add further compression algorithms, simply add
-       functions whose names end in _helper which take a string as input 
-       and return a more compressed string as output."""
-    for key, item in globals().iteritems():
-        if key.endswith("_helper"):
-            func_key = key[:-7]
-            if not exclude or not func_key in exclude:   
-                data = item(data)
-    return data   
-
-if __name__ == "__main__":
-    import sys
-    print minimize(open(sys.argv[1]).read())
-

--- a/labs/openlayers/tools/oldot.py
+++ /dev/null
@@ -1,44 +1,1 @@
-import re
-import os    
-def run():
-    sourceDirectory = "../lib/OpenLayers"    
-    allFiles = []
-    SUFFIX_JAVASCRIPT = ".js"
-    ## Find all the Javascript source files
-    for root, dirs, files in os.walk(sourceDirectory):
-        for filename in files:
-            if filename.endswith(SUFFIX_JAVASCRIPT) and not filename.startswith("."):
-                filepath = os.path.join(root, filename)[len(sourceDirectory)+1:]
-                filepath = filepath.replace("\\", "/")
-                data = open(os.path.join(sourceDirectory, filepath)).read()
-                parents = re.search("OpenLayers.Class\((.*?){", data, 
-                      re.DOTALL)
-                if parents:
-                    parents = [x.strip() for x in parents.group(1).strip().strip(",").split(",")]
-                else: 
-                    parents = []
-                cls = "OpenLayers.%s" % filepath.strip(".js").replace("/", ".")
-                allFiles.append([cls, parents])
-    return allFiles
-print """
-digraph name {
-  fontname = "Helvetica"
-  fontsize = 8
-  K = 0.6
 
-  node [
-    fontname = "Helvetica"
-    fontsize = 8
-    shape = "plaintext"
-  ]
-"""
-
-for i in run():
-    print i[0].replace(".", "_")
-    for item in i[1]:
-        if not item: continue
-        print "%s -> %s" % (i[0].replace(".","_"), item.replace(".", "_"))
-    print "; "
-
-print """}"""
-

--- a/labs/openlayers/tools/release.sh
+++ /dev/null
@@ -1,30 +1,1 @@
-#!/bin/sh
 
-VERSION=$1
-
-svn export http://svn.openlayers.org/tags/openlayers/release-$VERSION OpenLayers-$VERSION
-cd OpenLayers-$VERSION/build
-./build.py full
-cp OpenLayers.js ..
-
-cd ..
-
-mkdir doc/devdocs
-mkdir doc/apidocs
-rm tools/*.pyc
-
-mkdir /www/openlayers/htdocs/api/$VERSION
-cp OpenLayers.js /www/openlayers/htdocs/api/$VERSION
-cp -a img/ /www/openlayers/htdocs/api/$VERSION
-cp -a theme/ /www/openlayers/htdocs/api/$VERSION
-
-cd ..
-
-~/nd/NaturalDocs -i OpenLayers-$VERSION/lib -o HTML OpenLayers-$VERSION/doc/devdocs -p OpenLayers-$VERSION/doc_config -s Small OL
-~/nd/NaturalDocs -i OpenLayers-$VERSION/lib -o HTML OpenLayers-$VERSION/doc/apidocs -p OpenLayers-$VERSION/apidoc_config -s Small OL
-
-tar cvfz OpenLayers-$VERSION.tar.gz OpenLayers-$VERSION/
-zip -9r OpenLayers-$VERSION.zip OpenLayers-$VERSION/
-
-cp OpenLayers-$VERSION.* /www/openlayers/htdocs/download 
-

--- a/labs/openlayers/tools/shrinksafe.py
+++ /dev/null
@@ -1,55 +1,1 @@
-#!/usr/bin/env python
-#
-# Script to provide a wrapper around the ShrinkSafe "web service"
-# <http://shrinksafe.dojotoolkit.org/>
-#
 
-#
-# We use this script for two reasons:
-#
-#  * This avoids having to install and configure Java and the standalone
-#    ShrinkSafe utility.
-#
-#  * The current ShrinkSafe standalone utility was broken when we last
-#    used it.
-#
-
-import sys
-
-import urllib
-import urllib2
-
-URL_SHRINK_SAFE = "http://shrinksafe.dojotoolkit.org/shrinksafe.php"
-
-# This would normally be dynamically generated:
-BOUNDARY_MARKER = "---------------------------72288400411964641492083565382"
-                   
-if __name__ == "__main__":
-    ## Grab the source code
-    try:
-        sourceFilename = sys.argv[1]
-    except:
-        print "Usage: %s (<source filename>|-)" % sys.argv[0]
-        raise SystemExit
-
-    if sourceFilename == "-":
-        sourceCode = sys.stdin.read()
-        sourceFilename = "stdin.js"
-    else:
-        sourceCode = open(sourceFilename).read()
-        
-    ## Create the request replicating posting of the form from the web page
-    request = urllib2.Request(url=URL_SHRINK_SAFE)
-    request.add_header("Content-Type",
-                       "multipart/form-data; boundary=%s" % BOUNDARY_MARKER)
-    request.add_data("""
---%s
-Content-Disposition: form-data; name="shrinkfile[]"; filename="%s"
-Content-Type: application/x-javascript
-
-%s
-""" % (BOUNDARY_MARKER, sourceFilename, sourceCode))
-
-    ## Deliver the result
-    print urllib2.urlopen(request).read(),
-

--- a/labs/openlayers/tools/toposort.py
+++ /dev/null
@@ -1,261 +1,1 @@
-#
-# According to <http://www.vrplumber.com/programming/> this file
-# is licensed under a BSD-style license. We only use the section
-# originally by Tim Peters.
-#
-# TODO: The use of this code needs to be okayed by someone.
-#
 
-class RecursionError( OverflowError, ValueError ):
-    '''Unable to calculate result because of recursive structure'''
-    
-
-def sort(nodes, routes, noRecursion=1):
-    '''Passed a list of node IDs and a list of source,dest ID routes
-    attempt to create a list of stages where each sub list
-    is one stage in a process.
-    '''
-    children, parents = _buildChildrenLists(routes)
-    # first stage is those nodes
-    # having no incoming routes...
-    stage = []
-    stages = [stage]
-    taken = []
-    for node in nodes:
-        if (not parents.get(node)):
-            stage.append (node)
-    if nodes and not stage:
-        # there is no element which does not depend on
-        # some other element!!!
-        stage.append( nodes[0])
-    taken.extend( stage )
-    nodes = filter ( lambda x, l=stage: x not in l, nodes )
-    while nodes:
-        previousStageChildren = []
-        nodelen = len(nodes)
-        # second stage are those nodes
-        # which are direct children of the first stage
-        for node in stage:
-            for child in children.get (node, []):
-                if child not in previousStageChildren and child not in taken:
-                    previousStageChildren.append(child)
-                elif child in taken and noRecursion:
-                    raise RecursionError( (child, node) )
-        # unless they are children of other direct children...
-        # TODO, actually do that...
-        stage = previousStageChildren
-        removes = []
-        for current in stage:
-            currentParents = parents.get( current, [] )
-            for parent in currentParents:
-                if parent in stage and parent != current:
-                    # might wind up removing current...
-                    if not current in parents.get(parent, []):
-                        # is not mutually dependent...
-                        removes.append( current )
-        for remove in removes:
-            while remove in stage:
-                stage.remove( remove )
-        stages.append( stage)
-        taken.extend( stage )
-        nodes = filter ( lambda x, l=stage: x not in l, nodes )
-        if nodelen == len(nodes):
-            if noRecursion:
-                raise RecursionError( nodes )
-            else:
-                stages.append( nodes[:] )
-                nodes = []
-    return stages
-
-def _buildChildrenLists (routes):
-    childrenTable = {}
-    parentTable = {}
-    for sourceID,destinationID in routes:
-        currentChildren = childrenTable.get( sourceID, [])
-        currentParents = parentTable.get( destinationID, [])
-        if not destinationID in currentChildren:
-            currentChildren.append ( destinationID)
-        if not sourceID in currentParents:
-            currentParents.append ( sourceID)
-        childrenTable[sourceID] = currentChildren
-        parentTable[destinationID] = currentParents
-    return childrenTable, parentTable
-
-
-def toposort (nodes, routes, noRecursion=1):
-    '''Topological sort from Tim Peters, fairly efficient
-    in comparison (it seems).'''
-    #first calculate the recursion depth
-    
-    dependencies = {}
-    inversedependencies = {}
-    if not nodes:
-        return []
-    if not routes:
-        return [nodes]
-    for node in nodes:
-        dependencies[ node ] = (0, node)
-        inversedependencies[ node ] = []
-    
-    
-    for depended, depends in routes:
-        # is it a null rule
-        try:
-            newdependencylevel, object = dependencies.get ( depends, (0, depends))
-        except TypeError:
-            print depends
-            raise
-        dependencies[ depends ] = (newdependencylevel + 1,  depends)
-        # "dependency (existence) of depended-on"
-        newdependencylevel,object = dependencies.get ( depended, (0, depended) )
-        dependencies[ depended ] = (newdependencylevel, depended)
-        # Inverse dependency set up
-        dependencieslist = inversedependencies.get ( depended, [])
-        dependencieslist.append (depends)
-        inversedependencies[depended] = dependencieslist
-    ### Now we do the actual sorting
-    # The first task is to create the sortable
-    # list of dependency-levels
-    sortinglist = dependencies.values()
-    sortinglist.sort ()
-    output = []
-    while sortinglist:
-        deletelist = []
-        generation = []
-        output.append( generation)
-        while sortinglist and sortinglist[0][0] == 0:
-            number, object = sortinglist[0]
-            generation.append ( object )
-            deletelist.append( object )
-            for inverse in inversedependencies.get(object, () ):
-                try:
-                    oldcount, inverse = dependencies [ inverse]
-                    if oldcount > 0:
-                        # will be dealt with on later pass
-                        dependencies [ inverse] = (oldcount-1, inverse)
-                    else:
-                        # will be dealt with on this pass,
-                        # so needs not to be in the sorting list next time
-                        deletelist.append( inverse )
-                    # just in case a loop comes through
-                    inversedependencies[object] = []
-                except KeyError:
-                    # dealing with a recursion-breaking run...
-                    pass
-            del sortinglist [0]
-        # if no elements could be deleted, then
-        # there is something which depends upon itself
-        if not deletelist:
-            if noRecursion:
-                raise RecursionError( sortinglist )
-            else:
-                # hack so that something gets deleted...
-##                import pdb
-##                pdb.set_trace()
-                dependencies[sortinglist[0][1]] = (0,sortinglist[0][1])
-        # delete the items that were dealt with
-        for item in deletelist:
-            try:
-                del dependencies [ item ]
-            except KeyError:
-                pass
-        # need to recreate the sortinglist
-        sortinglist = dependencies.values()
-        if not generation:
-            output.remove( generation )
-        sortinglist.sort ()
-    return output
-
-
-
-
-
-if __name__ == "__main__":
-
-    nodes = ['a', 'b', 'c', 'd', 'e', 'f']
-    route = [('a', 'b'), ('b', 'c'), ('b', 'd'), ('e','f')]
-
-    for x in  toposort( nodes, route):
-        for a in x:
-            print a
-
-    raise SystemExit
-
-
-
-    import pprint, traceback
-    nodes= [ 0,1,2,3,4,5 ]
-    testingValues = [
-        [ (0,1),(1,2),(2,3),(3,4),(4,5)],
-        [ (0,1),(0,2),(1,2),(3,4),(4,5)],
-        [
-        (0,1),
-        (0,2),
-        (0,2),
-                    (2,4),
-                    (2,5),
-                (3,2),
-        (0,3)],
-        [
-        (0,1), # 3-element cycle test, no orphan nodes
-        (1,2),
-        (2,0),
-                    (2,4),
-                    (2,5),
-                (3,2),
-        (0,3)],
-        [
-        (0,1),
-        (1,1),
-        (1,1),
-                (1,4),
-                (1,5),
-                (1,2),
-        (3,1),
-        (2,1),
-        (2,0)],
-        [
-            (0,1),
-            (1,0),
-            (0,2),
-            (0,3),
-        ],
-        [
-            (0,1),
-            (1,0),
-            (0,2),
-            (3,1),
-        ],
-    ]
-    print 'sort, no recursion allowed'
-    for index in range(len(testingValues)):
-##        print '    %s -- %s'%( index, testingValues[index])
-        try:
-            print '        ', sort( nodes, testingValues[index] )
-        except:
-            print 'exception raised'
-    print 'toposort, no recursion allowed'
-    for index in range(len(testingValues)):
-##        print '    %s -- %s'%( index, testingValues[index])
-        try:
-            print '        ', toposort( nodes, testingValues[index] )
-        except:
-            print 'exception raised'
-    print 'sort, recursion allowed'
-    for index in range(len(testingValues)):
-##        print '    %s -- %s'%( index, testingValues[index])
-        try:
-            print '        ', sort( nodes, testingValues[index],0 )
-        except:
-            print 'exception raised'
-    print 'toposort, recursion allowed'
-    for index in range(len(testingValues)):
-##        print '    %s -- %s'%( index, testingValues[index])
-        try:
-            print '        ', toposort( nodes, testingValues[index],0 )
-        except:
-            print 'exception raised'
-        
-        
-    
-

--- a/labs/openlayers/tools/update_dev_dir.sh
+++ /dev/null
@@ -1,47 +1,1 @@
-#!/bin/sh
 
-# Used to update http://openlayers.org/dev/ 
-
-svn up /osgeo/openlayers/docs/dev; 
-
-# Get current 'Last Changed Rev'
-REV=`svn info /osgeo/openlayers/docs/dev/ | grep 'Revision' | awk '{print $2}'`
-
-# Get the last svn rev
-touch /tmp/ol_svn_rev
-OLD_REV="o`cat /tmp/ol_svn_rev`"
-
-# If they're not equal, do some work.
-if [ ! o$REV = $OLD_REV ]; then
-
-    cd /osgeo/openlayers/docs/dev/tools/ 
-    python exampleparser.py
-    cd /osgeo/openlayers/docs/dev/build
-    ./build.py
-    
-    cp OpenLayers.js ..
-    cd ..
-    
-    sed -i -e 's!../lib/OpenLayers.js!../OpenLayers.js!' examples/*.html
-    naturaldocs -i /osgeo/openlayers/docs/dev/lib -o HTML /osgeo/openlayers/dev/apidocs -p /osgeo/openlayers/docs/dev/apidoc_config -s Default OL >/dev/null
-    naturaldocs -i /osgeo/openlayers/docs/dev/lib -o HTML /osgeo/openlayers/dev/docs -p /osgeo/openlayers/docs/dev/doc_config -s Default OL >/dev/null
-    
-    svn up /osgeo/openlayers/dev/sandbox/
-    # Record the revision
-    echo -n $REV > /tmp/ol_svn_rev
-fi    
-   
-svn up /osgeo/openlayers/documentation-checkout
-REV=`svn info /osgeo/openlayers/documentation-checkout | grep 'Last Changed Rev' | awk '{print $4}'`
-# Get the last svn rev
-touch /tmp/ol_doc_rev
-OLD_REV="o`cat /tmp/ol_doc_rev`"
-# If they're not equal, do some work.
-if [ ! o$REV = $OLD_REV ]; then
-    cd /osgeo/openlayers/documentation-checkout
-    make html > /dev/null
-    cp -r _build/html/*  /osgeo/openlayers/documentation
-    
-    echo -n $REV > /tmp/ol_doc_rev
-fi    
-

file:a/labs/stop.pdf.php (deleted)
--- a/labs/stop.pdf.php
+++ /dev/null
@@ -1,207 +1,1 @@
-<?php
 
-/*
- *    Copyright 2010,2011 Alexander Sadleir 
-
-  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.
- */
-include ('../include/common.inc.php');
-$stopid = filter_var($_REQUEST['stopid'], FILTER_SANITIZE_NUMBER_INT);
-$url = $APIurl . "/json/stop?stop_id=" . $stopid;
-$stop = json_decode(getPage($url));
-$html.= '<table><tr><td><br><br> ';
-$url = $APIurl . "/json/stoproutes?stop=" . $stopid . "&time=" . midnight_seconds() . "&service_period=" . service_period();
-$routes = json_decode(getPage($url));
-foreach ($routes as $route) {
-    $html.= '<br> <a href="trip.php?routeid=' . $route[0] . '&stopid=' . $stopid . '">' . $route[1] . ' - ' . $route[2] . '</a>';
-    $viaPoints = viaPointNames($route[3], $stopid);
-    if ($viaPoints != "")
-        $html.= '<br><small>Via: ' . $viaPoints . '</small>';
-    $html.= "<br>";
-}
-$html.= '</td><td>' . staticmap(Array(
-            0 => Array(
-                $stop[2],
-                $stop[3]
-            )
-                ), 0, false) . "</td></tr>";
-$url = $APIurl . "/json/stoptrips?stop=" . $stopid . "&time=" . midnight_seconds() . "&service_period=" . service_period();
-$trips = json_decode(getPage($url));
-$html.= "</table><br><br><table>";
-$html.= "<thead><tr><th>Route</th><th>Time</th></tr></thead>";
-debug(print_r($trips, true));
-foreach ($trips as $row) {
-    $html.= '<tr><td><a href="trip.php?stopid=' . $stopid . '&tripid=' . $row[1][0] . '">' . $row[1][1] . "</a></td>";
-    $html.= '<td>' . midnight_seconds_to_time($row[0]) . '</td>';
-    $html.= '</tr>';
-}
-$html.= '</table>';
-if (sizeof($trips) == 0)
-    $html.= "<center>No trips in the near future.</center>";
-require_once ('lib/tcpdf/config/lang/eng.php');
-require_once ('lib/tcpdf/tcpdf.php');
-
-// create new PDF document
-class Custom_TCPDF extends TCPDF {
-
-    var $QRCodeURL;
-
-    function set_QRCodeURL($url) {
-        $this->QRCodeURL = $url;
-    }
-
-    /**
-     * This method is used to render the page header.
-     * It is automatically called by AddPage() and could be overwritten in your own inherited class.
-     * @public
-     */
-    public function Header() {
-        if ($this->header_xobjid < 0) {
-            // start a new XObject Template
-            $this->header_xobjid = $this->startTemplate($this->w, $this->tMargin + 10);
-            $headerfont = $this->getHeaderFont();
-            $headerdata = $this->getHeaderData();
-            $this->y = $this->header_margin;
-            if ($this->rtl) {
-                $this->x = $this->w - $this->original_rMargin;
-            } else {
-                $this->x = $this->original_lMargin - 10;
-            }
-            if (isset($this->QRCodeURL)) {
-                // QRCODE,H : QR-CODE Best error correction
-                $style = array(
-                    'border' => 1,
-                    'padding' => 0,
-                    'fgcolor' => array(
-                        0,
-                        0,
-                        0
-                    ),
-                    'bgcolor' => false, //array(255,255,255)
-                    'module_width' => 1, // width of a single module in points
-                    'module_height' => 1
-                        // height of a single module in points
-                );
-                $this->write2DBarcode($this->QRCodeURL, 'QRCODE,H', '', '', 25, 25, $style, 'T');
-                $imgy = 50 + 20;
-            } elseif (($headerdata['logo']) AND ($headerdata['logo'] != K_BLANK_IMAGE)) {
-                $imgtype = $this->getImageFileType(K_PATH_IMAGES . $headerdata['logo']);
-                if (($imgtype == 'eps') OR ($imgtype == 'ai')) {
-                    $this->ImageEps(K_PATH_IMAGES . $headerdata['logo'], '', '', $headerdata['logo_width']);
-                } elseif ($imgtype == 'svg') {
-                    $this->ImageSVG(K_PATH_IMAGES . $headerdata['logo'], '', '', $headerdata['logo_width']);
-                } else {
-                    $this->Image(K_PATH_IMAGES . $headerdata['logo'], '', '', $headerdata['logo_width']);
-                }
-                $imgy = $this->getImageRBY();
-            } else {
-                $imgy = $this->y;
-            }
-            $cell_height = round(($this->cell_height_ratio * $headerfont[2]) / $this->k, 2);
-            // set starting margin for text data cell
-            if ($this->getRTL()) {
-                $header_x = $this->original_rMargin + ($headerdata['logo_width'] * 1.1);
-            } else {
-                $header_x = $this->original_lMargin + ($headerdata['logo_width'] * 1.1);
-            }
-            $cw = $this->w - $this->original_lMargin - $this->original_rMargin - ($headerdata['logo_width'] * 1.1);
-            $this->SetTextColor(0, 0, 0);
-            // header title
-            $this->SetFont($headerfont[0], 'B', $headerfont[2] + 1);
-            $this->SetX($header_x);
-            $this->Cell($cw, $cell_height, $headerdata['title'], 0, 1, '', 0, '', 0);
-            // header string
-            $this->SetFont($headerfont[0], $headerfont[1], $headerfont[2]);
-            $this->SetX($header_x);
-            $this->MultiCell($cw, $cell_height, $headerdata['string'], 0, '', 0, 1, '', '', true, 0, false);
-            // print an ending header line
-            //$this->SetLineStyle(array('width' => 0.85 / $this->k, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
-            //$this->SetY((2.835 / $this->k) + max($imgy, $this->y));
-            if ($this->rtl) {
-                $this->SetX($this->original_rMargin);
-            } else {
-                $this->SetX($this->original_lMargin);
-            }
-            //$this->Cell(($this->w - $this->original_lMargin - $this->original_rMargin), 0, '', 'T', 0, 'C');
-            $this->endTemplate();
-        }
-        // print header template
-        $x = 0;
-        $dx = 0;
-        if ($this->booklet AND (($this->page % 2) == 0)) {
-            // adjust margins for booklet mode
-            $dx = ($this->original_lMargin - $this->original_rMargin);
-        }
-        if ($this->rtl) {
-            $x = $this->w + $dx;
-        } else {
-            $x = 0 + $dx;
-        }
-        $this->printTemplate($this->header_xobjid, $x, 0, 0, 0, '', '', false);
-    }
-
-}
-
-$pdf = new Custom_TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
-// set document information
-$pdf->SetCreator(PDF_CREATOR);
-$pdf->SetAuthor('bus.lambdacomplex.org');
-$pdf->SetTitle($stop[1]);
-// set default header data
-$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, $stop[1] . " Timetable", "Some description of customization like Weekdays, 9am-10am");
-$pdf->set_QRCodeURL(curPageURL() . "stop.php?stopid=" . $_REQUEST['stopid']);
-// set header and footer fonts
-$pdf->setHeaderFont(Array(
-    PDF_FONT_NAME_MAIN,
-    '',
-    PDF_FONT_SIZE_MAIN
-));
-$pdf->setFooterFont(Array(
-    PDF_FONT_NAME_DATA,
-    '',
-    PDF_FONT_SIZE_DATA
-));
-// set default monospaced font
-$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
-//set margins
-$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
-$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
-$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
-//set auto page breaks
-$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
-//set image scale factor
-$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
-//set some language-dependent strings
-$pdf->setLanguageArray($l);
-// ---------------------------------------------------------
-// set default font subsetting mode
-$pdf->setFontSubsetting(true);
-// Set font
-// dejavusans is a UTF-8 Unicode font, if you only need to
-// print standard ASCII chars, you can use core fonts like
-// helvetica or times to reduce file size.
-$pdf->SetFont('helvetica', '', 14, '', true);
-// Add a page
-// This method has several options, check the source code documentation for more information.
-$pdf->AddPage();
-// Print text using writeHTMLCell()
-$pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);
-// ---------------------------------------------------------
-// Close and output PDF document
-// This method has several options, check the source code documentation for more information.
-$pdf->Output('example_001.pdf', 'I');
-//============================================================+
-// END OF FILE
-//============================================================+
-?>
-

--- a/labs/stopBrowser.kml.php
+++ /dev/null
@@ -1,78 +1,1 @@
-<?php
 
-/*
- *    Copyright 2010,2011 Alexander Sadleir 
-
-  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.
- */
-header('Content-type: application/vnd.google-earth.kml+xml');
-//http://wiki.openstreetmap.org/wiki/OpenLayers_Dynamic_KML
-// Creates the KML/XML Document.
-$dom = new DOMDocument('1.0', 'UTF-8');
-
-// Creates the root KML element and appends it to the root document.
-$node = $dom->createElementNS('http://earth.google.com/kml/2.1', 'kml');
-$parNode = $dom->appendChild($node);
-
-// Creates a KML Document element and append it to the KML element.
-$dnode = $dom->createElement('Document');
-$docNode = $parNode->appendChild($dnode);
-
-
-$bbox = $_GET['bbox']; // get the bbox param from google earth
-list($bbox_south, $bbox_west, $bbox_north, $bbox_east) = explode(",", $bbox); // west, south, east, north
-
-include ('../include/common.inc.php');
-$debugOkay = Array();
-$contents = getNearbyStops((($bbox_west + $bbox_east) / 2), ($bbox_south + $bbox_north) / 2, 50, 3000);
-foreach ($contents as $stop) {
-    $description = 'http://bus.lambdacomplex.org/' . 'stop.php?stopid=' . $stop['stop_id'] . " <br>";
-    $trips = getStopTripsWithTimes($stop['stop_id'], "", "", "", 3);
-    if ($trips) {
-        foreach ($trips as $key => $row) {
-            if ($key < 3) {
-                $destination = getTripDestination($row['trip_id']);
-                $description .= $row['route_short_name'] . ' ' . $destination['stop_name'] . ' @ ' . $row['arrival_time'] . "<br>";
-            }
-        }
-    } else {
-        $description .= "No more trips today";
-    }
-    // Creates a Placemark and append it to the Document.
-    $node = $dom->createElement('Placemark');
-    $placeNode = $docNode->appendChild($node);
-
-    // Creates an id attribute and assign it the value of id column.
-    $placeNode->setAttribute('id', 'placemark' . $stop['stop_id']);
-
-    // Create name, and description elements and assigns them the values of the name and address columns from the results.
-    $nameNode = $dom->createElement('name', htmlentities($stop['stop_name']));
-    $descriptionNode = $dom->createElement('description', $description);
-    $placeNode->appendChild($nameNode);
-    $placeNode->appendChild($descriptionNode);
-
-    // Creates a Point element.
-    $pointNode = $dom->createElement('Point');
-    $placeNode->appendChild($pointNode);
-
-    // Creates a coordinates element and gives it the value of the lng and lat columns from the results.
-    $coorStr = $stop['stop_lon'] . ',' . $stop['stop_lat'];
-    $coorNode = $dom->createElement('coordinates', $coorStr);
-    $pointNode->appendChild($coorNode);
-}
-
-
-$kmlOutput = $dom->saveXML();
-echo $kmlOutput;
-?>
-

file:a/labs/stopBrowser.php (deleted)
--- a/labs/stopBrowser.php
+++ /dev/null
@@ -1,119 +1,1 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-    <!-- 
-    /*
- *    Copyright 2010,2011 Alexander Sadleir 
 
-  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.
- */
-    -->
-    <head>
-        <script src="openlayers/OpenLayers.js"></script>
-        <SCRIPT TYPE="text/javascript" SRC="OpenStreetMap.js"></SCRIPT> 
-        <script type="text/javascript">
-            var map,select;
-       
-	
-            function init()
-            {
-                var extent = new OpenLayers.Bounds(148.98, -35.48, 149.25, -35.15);
- 
-                // set up the map options
-                var options = 
-                    {
-                    maxExtent: extent,
-                    numZoomLevels: 20, 
-                }; 
- 
-                // create the ol map object
-                map = new OpenLayers.Map('map', options);
-    
-                var osmtiles = new OpenLayers.Layer.OSM("OSM");
-
-                var nearmap = new OpenLayers.Layer.OSM.NearMap("NearMap");
-
-                var stopbrowser = new OpenLayers.Layer.Vector("POI", {
-                    projection: new OpenLayers.Projection("EPSG:4326"),
-                    strategies: [
-                        new OpenLayers.Strategy.BBOX(),
-                    ],
-                    protocol: new OpenLayers.Protocol.HTTP({
-                        url: "stopBrowser.kml.php",  //Note that it is probably worth adding a Math.random() on the end of the URL to stop caching.
-                        format: new OpenLayers.Format.KML({
-                            extractStyles: true, 
-                            extractAttributes: true
-                        }),
-                    })
-                });
-
-                map.addLayers([osmtiles,stopbrowser,nearmap]);
-
-                var lonLat = new OpenLayers.LonLat(149.11, -35.28).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
-                map.setCenter(lonLat, 15);
-                map.addControl( new OpenLayers.Control.LayerSwitcher({'ascending':false}));
-                map.addControl(new OpenLayers.Control.MousePosition(
-                {
-                    displayProjection: new OpenLayers.Projection("EPSG:4326"),
-                    suffix: "__________________________________"
-                }));
-                map.addControl(new OpenLayers.Control.MousePosition(
-                {
-                    displayProjection: new OpenLayers.Projection("EPSG:900913")
-                }));
-    
-                select = new OpenLayers.Control.SelectFeature(stopbrowser);
-            
-                stopbrowser.events.on({
-                    "featureselected": onFeatureSelect,
-                    "featureunselected": onFeatureUnselect
-                });
- 
-                map.addControl(select);
-                select.activate();   
-
-            }
-            function onPopupClose(evt) {
-                select.unselectAll();
-            }
-            function onFeatureSelect(event) {
-                var feature = event.feature;
-                // Since KML is user-generated, do naive protection against
-                // Javascript.
-                var content = "<h2>"+feature.attributes.name + "</h2>" + feature.attributes.description;
-                if (content.search("<script") != -1) {
-                    content = "Content contained Javascript! Escaped content below.<br />" + content.replace(/</g, "&lt;");
-                }
-                popup = new OpenLayers.Popup.FramedCloud("chicken", 
-                feature.geometry.getBounds().getCenterLonLat(),
-                new OpenLayers.Size(100,100),
-                content,
-                null, true, onPopupClose);
-                feature.popup = popup;
-                map.addPopup(popup);
-            }
-            function onFeatureUnselect(event) {
-                var feature = event.feature;
-                if(feature.popup) {
-                    map.removePopup(feature.popup);
-                    feature.popup.destroy();
-                    delete feature.popup;
-                }
-            }
-        </script>
-
-    </head>
-    <body onload="init()">
-        <div id="map" width="100%" height="100%" class="smallmap"></div>
-    </body>
-</html>
-
-

file:a/labs/tiles/empty.png (deleted)
 Binary files a/labs/tiles/empty.png and /dev/null differ
--- a/lib/GoogleMapUtility.php
+++ /dev/null
@@ -1,97 +1,1 @@
-<?php
-/*
-*DISCLAIMER
-* 
-*THIS SOFTWARE IS PROVIDED BY THE AUTHOR '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 AUTHOR 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.
-*
-*	@author: Olivier G. <olbibigo_AT_gmail_DOT_com>
-*	@version: 1.1
-*	@history:
-*		1.0	creation
-		1.1	disclaimer added
-*/
-class GoogleMapUtility {
-	const TILE_SIZE = 256;
-	
-	//(lat, lng, z) -> parent tile (X,Y)
-	public static function getTileXY($lat, $lng, $zoom) {
-		$normalised = GoogleMapUtility::_toNormalisedMercatorCoords(GoogleMapUtility::_toMercatorCoords($lat, $lng));
-		$scale = 1 << ($zoom);
-		return new Point(
-			(int)($normalised->x * $scale), 
-			(int)($normalised->y * $scale)
-		);
-	}//toTileXY
-	
-	//(lat, lng, z) -> (x,y) with (0,0) in the upper left corner of the MAP
-	public static function getPixelCoords($lat, $lng, $zoom) {
-		$normalised = GoogleMapUtility::_toNormalisedMercatorCoords(GoogleMapUtility::_toMercatorCoords($lat, $lng));
-		$scale = (1 << ($zoom)) * GoogleMapUtility::TILE_SIZE;
-		return new Point(
-			(int)($normalised->x * $scale), 
-			(int)($normalised->y * $scale)
-		);
-	}//getPixelCoords
 
-	//(lat, lng, z) -> (x,y) in the upper left corner of the TILE ($X, $Y)
-	public static function getOffsetPixelCoords($lat,$lng,$zoom, $X, $Y) {
-		$pixelCoords = GoogleMapUtility::getPixelCoords($lat, $lng, $zoom);
-		return new Point(
-			$pixelCoords->x - $X * GoogleMapUtility::TILE_SIZE, 
-			$pixelCoords->y - $Y * GoogleMapUtility::TILE_SIZE
-		);
-	}//getPixelOffsetInTile
-	
-	public static function getTileRect($X,$Y,$zoom) {
-		$tilesAtThisZoom = 1 << $zoom;
-		$lngWidth = 360.0 / $tilesAtThisZoom;
-		$lng = -180 + ($X * $lngWidth);	
-		$latHeightMerc = 1.0 / $tilesAtThisZoom;
-		$topLatMerc = $Y * $latHeightMerc;
-		$bottomLatMerc = $topLatMerc + $latHeightMerc;
-		$bottomLat = (180 / M_PI) * ((2 * atan(exp(M_PI * (1 - (2 * $bottomLatMerc))))) - (M_PI / 2));
-		$topLat = (180 / M_PI) * ((2 * atan(exp(M_PI * (1 - (2 * $topLatMerc))))) - (M_PI / 2));
-		$latHeight = $topLat - $bottomLat;
-		return new Boundary($lng, $bottomLat, $lngWidth, $latHeight);
-	}//getTileRect	
-
-	private static function _toMercatorCoords($lat, $lng) {
-		if ($lng > 180) {
-			$lng -= 360;
-		}
-		$lng /= 360;
-		$lat = asinh(tan(deg2rad($lat)))/M_PI/2;
-		return new Point($lng, $lat);
-	}//_toMercatorCoords
-
-	private static function _toNormalisedMercatorCoords($point) {
-		$point->x += 0.5;
-		$point->y = abs($point->y-0.5);
-		return $point;
-	}//_toNormalisedMercatorCoords
-}//GoogleMapUtility
-
-class Point {
-	public $x,$y;
-	function __construct($x,$y) {
-		$this->x = $x;
-		$this->y = $y;
-	}
-	function __toString() {
-		return "({$this->x},{$this->y})";
-	}
-}//Point
-
-class Boundary {
-	public $x,$y,$width,$height;
-	function __construct($x,$y,$width,$height) {
-		$this->x = $x;
-		$this->y = $y;
-		$this->width = $width;
-		$this->height = $height;
-	}
-	function __toString() {
-		return "({$this->x} x {$this->y},{$this->width},{$this->height})";
-	}
-}//Boundary
-?>

file:a/lib/HeatMap.php (deleted)
--- a/lib/HeatMap.php
+++ /dev/null
@@ -1,275 +1,1 @@
-<?php
-/*
-*DISCLAIMER
-* http://blog.gmapify.fr/create-beautiful-tiled-heat-maps-with-php-and-gd
-*THIS SOFTWARE IS PROVIDED BY THE AUTHOR '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 AUTHOR 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.
-*
-*	@author: Olivier G. <olbibigo_AT_gmail_DOT_com>
-*	@version: 1.0
-*	@history:
-*		1.0	creation
-*/
-	define('PI2', 2*M_PI);
 
-	class HeatMapPoint{
-		public $x,$y;
-		function __construct($x,$y) {
-			$this->x = $x;
-			$this->y = $y;
-		}
-		function __toString() {
-			return "({$this->x},{$this->y})";
-		}
-	}//Point
-
-	class HeatMap{
-		//TRANSPARENCY
-		public static $WITH_ALPHA = 0;
-		public static $WITH_TRANSPARENCY = 1;
-		//GRADIENT STYLE
-		public static $GRADIENT_CLASSIC = 'classic';
-		public static $GRADIENT_FIRE = 'fire';
-		public static $GRADIENT_PGAITCH = 'pgaitch';
-		//GRADIENT MODE (for heatImage)
-		public static $GRADIENT_NO_NEGATE_NO_INTERPOLATE = 0;
-		public static $GRADIENT_NO_NEGATE_INTERPOLATE = 1;
-		public static $GRADIENT_NEGATE_NO_INTERPOLATE = 2;
-		public static $GRADIENT_NEGATE_INTERPOLATE = 3;
-		//NOT PROCESSED PIXEL (for heatImage)
-		public static $KEEP_VALUE = 0;
-		public static $NO_KEEP_VALUE = 1;
-		//CONSTRAINTS
-		private static $MIN_RADIUS = 2;//in px
-		private static $MAX_RADIUS = 50;//in px
-		private static $MAX_IMAGE_SIZE = 10000;//in px
-		
-		//generate an $image_width by $image_height pixels heatmap image of $points
-		public static function createImage($data, $image_width, $image_height, $mode=0, $spot_radius = 30, $dimming = 75, $gradient_name = 'classic'){
-			$_gradient_name = $gradient_name;
-			if(($_gradient_name != self::$GRADIENT_CLASSIC) && ($_gradient_name != self::$GRADIENT_FIRE) && ($_gradient_name != self::$GRADIENT_PGAITCH)){
-				$_gradient_name = self::$GRADIENT_CLASSIC;
-			}
-			$_image_width = min(self::$MAX_IMAGE_SIZE, max(0, intval($image_width)));
-			$_image_height = min(self::$MAX_IMAGE_SIZE, max(0, intval($image_height)));
-			$_spot_radius = min(self::$MAX_RADIUS, max(self::$MIN_RADIUS, intval($spot_radius)));
-			$_dimming = min(255, max(0, intval($dimming)));
-			if(!is_array($data)){
-				return false;
-			}
-			$im = imagecreatetruecolor($_image_width, $_image_height);
-			$white = imagecolorallocate($im, 255, 255, 255);
-			imagefill($im, 0, 0, $white);
-			if(self::$WITH_ALPHA == $mode){
-				imagealphablending($im, false);
-				imagesavealpha($im,true);
-			}
-			//Step 1: create grayscale image
-			foreach($data as $datum){
-				if( (is_array($datum) && (count($datum)==1)) || (!is_array($datum) && ('HeatMapPoint' == get_class($datum)))){//Plot points
-					if('HeatMapPoint' != get_class($datum)){
-						$datum = $datum[0];
-					}
-					self::_drawCircularGradient($im, $datum->x, $datum->y, $_spot_radius, $_dimming);
-				}else if(is_array($datum)){//Draw lines
-					$length = count($datum)-1;
-					for($i=0; $i < $length; ++$i){//Loop through points
-						//Bresenham's algorithm to plot from from $datum[$i] to $datum[$i+1];
-						self::_drawBilinearGradient($im, $datum[$i], $datum[$i+1], $_spot_radius, $_dimming);
-					}
-				}
-			}
-			//Gaussian filter
-			if($_spot_radius >= 30){
-				imagefilter($im, IMG_FILTER_GAUSSIAN_BLUR);
-			}
-			//Step 2: create colored image
-			if(FALSE === ($grad_rgba = self::_createGradient($im, $mode, $_gradient_name))){
-				return FALSE;
-			}
-			$grad_size = count($grad_rgba);
-			for($x=0; $x <$_image_width; ++$x){
-				for($y=0; $y <$_image_height; ++$y){
-					$level = imagecolorat($im, $x, $y) & 0xFF;
-					if( ($level >= 0) && ($level < $grad_size) ){
-						imagesetpixel($im, $x, $y, $grad_rgba[imagecolorat($im, $x, $y) & 0xFF]);
-					}
-				}
-			}
-			if(self::$WITH_TRANSPARENCY == $mode){
-				imagecolortransparent($im, $grad_rgba[count($grad_rgba)-1]);
-			}
-			return $im;
-		}//createImage
-
-		//Heat an image
-		public static function heatImage($filepath, $gradient_name = 'classic', $mode= 0, $min_level=0, $max_level=255, $gradient_interpolate=0, $keep_value=0){
-			$_gradient_name = $gradient_name;
-			if(($_gradient_name != self::$GRADIENT_CLASSIC) && ($_gradient_name != self::$GRADIENT_FIRE) && ($_gradient_name != self::$GRADIENT_PGAITCH)){
-				$_gradient_name = self::$GRADIENT_CLASSIC;
-			}
-			$_min_level = min(255, max(0, intval($min_level)));
-			$_max_level = min(255, max(0, intval($max_level)));
-
-			//try opening jpg first then png then gif format
-			if(FALSE === ($im = @imagecreatefromjpeg($filepath))){
-				if(FALSE === ($im = @imagecreatefrompng($filepath))){
-					if(FALSE === ($im = @imagecreatefromgif($filepath))){
-						return FALSE;
-					}
-				}
-			}
-			if(self::$WITH_ALPHA == $mode){
-				imagealphablending($im, false);
-				imagesavealpha($im,true);
-			}
-			$width = imagesx($im);
-			$height = imagesy($im);	
-			if(FALSE === ($grad_rgba = self::_createGradient($im, $mode, $_gradient_name))){
-				return FALSE;
-			}
-			//Convert to grayscale
-			$grad_size = count($grad_rgba);
-			$level_range = $_max_level - $_min_level;
-			for($x=0; $x <$width; ++$x){
-				for($y=0; $y <$height; ++$y){
-					$rgb = imagecolorat($im, $x, $y);
-					$r = ($rgb >> 16) & 0xFF;
-					$g = ($rgb >> 8) & 0xFF;
-					$b = $rgb & 0xFF;
-					$gray_level = Min(255, Max(0, floor(0.33 * $r + 0.5 * $g + 0.16 * $b)));//between 0 and 255				
-					if( ($gray_level >= $_min_level) && ($gray_level <= $_max_level) ){
-						switch($gradient_interpolate){
-							case self::$GRADIENT_NO_NEGATE_NO_INTERPOLATE:
-								//$_max_level takes related lowest gradient color
-								//$_min_level takes related highest gradient color
-								$value = 255 - $gray_level;
-								break;
-							case self::$GRADIENT_NEGATE_NO_INTERPOLATE:
-								//$_max_level takes related highest gradient color
-								//$_min_level takes related lowest gradient color
-								$value = $gray_level;
-								break;
-							case self::$GRADIENT_NO_NEGATE_INTERPOLATE:
-								//$_max_level takes lowest gradient color
-								//$_min_level takes highest gradient color
-								$value = 255- floor(($gray_level - $_min_level) * $grad_size / $level_range);
-								break;
-							case self::$GRADIENT_NEGATE_INTERPOLATE:
-								//$_max_level takes highest gradient color
-								//$_min_level takes lowest gradient color
-								$value = floor(($gray_level - $_min_level) * $grad_size / $level_range);
-								break;
-							default:
-						}
-						imagesetpixel($im, $x, $y, $grad_rgba[$value]);
-					}else{
-						if(self::$KEEP_VALUE == $keep_value){
-							//Do nothing
-						}else{//self::$NO_KEEP_VALUE
-							imagesetpixel($im, $x, $y, imagecolorallocatealpha($im,0,0,0,0));
-						}
-					}
-				}
-			}			
-			if(self::$WITH_TRANSPARENCY == $mode){
-				imagecolortransparent($im, $grad_rgba[count($grad_rgba)-1]);
-			}
-			return $im;
-		}//heatImage
-		
-		private static function _drawCircularGradient(&$im, $center_x, $center_y, $spot_radius, $dimming){
-			$dirty = array();
-			$ratio = (255 - $dimming) / $spot_radius;
-			for($r=$spot_radius; $r > 0; --$r){
-				$channel = $dimming + $r * $ratio;
-				$angle_step = 0.45/$r; //0.01;
-				//Process pixel by pixel to draw a radial grayscale radient
-				for($angle=0; $angle <= PI2; $angle += $angle_step){
-					$x = floor($center_x + $r*cos($angle));
-					$y = floor($center_y + $r*sin($angle));
-					if(!isset($dirty[$x][$y])){
-						$previous_channel = @imagecolorat($im, $x, $y) & 0xFF;//grayscale so same value
-						$new_channel = Max(0, Min(255,($previous_channel * $channel)/255));
-						imagesetpixel($im, $x, $y, imagecolorallocate($im, $new_channel, $new_channel, $new_channel));
-						$dirty[$x][$y] = 0;
-					}
-				}
-			}
-		}//_drawCircularGradient
-		
-		private static function _drawBilinearGradient(&$im, $point0, $point1, $spot_radius, $dimming){
-			if($point0->x < $point1->x){
-				$x0 = $point0->x;
-				$y0 = $point0->y;
-				$x1 = $point1->x;
-				$y1 = $point1->y;
-			}else{
-				$x0 = $point1->x;
-				$y0 = $point1->y;
-				$x1 = $point0->x;
-				$y1 = $point0->y;
-			}
-
-			if( ($x0==$x1) && ($y0==$y1)){//check if same coordinates
-				return false;
-			}
-			$steep = (abs($y1 - $y0) > abs($x1 - $x0))? true: false;
-			if($steep){
-				list($x0, $y0) = array($y0, $x0);//swap
-				list($x1, $y1) = array($y1, $x1);//swap
-			}
-			if($x0>$x1){
-				list($x0, $x1) = array($x1, $x0);//swap
-				list($y0, $y1) = array($y1, $y0);//swap
-			}
-			$deltax = $x1 - $x0;
-			$deltay = abs($y1 - $y0);
-			$error = $deltax / 2;
-			$y = $y0;
-			if( $y0 < $y1){
-				$ystep = 1; 
-			}else{
-				$ystep = -1;
-			}
-			$step = max(1, floor($spot_radius/ 3));
-			for($x=$x0; $x<=$x1; ++$x){//Loop through x value
-				if(0==(($x-$x0) % $step)){
-					if($steep){
-						self::_drawCircularGradient(&$im, $y, $x, $spot_radius, $dimming);
-					}else{ 
-						self::_drawCircularGradient(&$im, $x, $y, $spot_radius, $dimming);
-					}
-				}
-				$error -= $deltay;
-				if($error<0){
-						$y = $y + $ystep;
-						$error = $error + $deltax;
-				}
-			}		
-		}//_drawBilinearGradient
-		
-		private static function _createGradient($im, $mode, $gradient_name){
-			//create the gradient from an image
-			if(FALSE === ($grad_im = imagecreatefrompng('gradient/'.$gradient_name.'.png'))){
-				return FALSE;
-			}
-			$width_g = imagesx($grad_im);
-			$height_g = imagesy($grad_im);
-			//Get colors along the longest dimension
-			//Max density is for lower channel value
-			for($y=$height_g-1; $y >= 0 ; --$y){
-					$rgb = imagecolorat($grad_im, 1, $y);
-					//Linear function
-					$alpha = Min(127, Max(0, floor(127 - $y/2)));
-					if(self::$WITH_ALPHA == $mode){
-						$grad_rgba[] = imagecolorallocatealpha($im, ($rgb >> 16) & 0xFF, ($rgb >> 8) & 0xFF, $rgb & 0xFF, $alpha);
-					}else{
-						$grad_rgba[] = imagecolorallocate($im, ($rgb >> 16) & 0xFF, ($rgb >> 8) & 0xFF, $rgb & 0xFF);
-					}
-			}
-			imagedestroy($grad_im);
-			unset($grad_im);
-			return($grad_rgba);
-		}//_createGradient
-	}//Heatmap
-?>

directory:b/lib/amon-php (new)
--- /dev/null
+++ b/lib/amon-php

file:a/lib/postgis.sh (deleted)
--- a/lib/postgis.sh
+++ /dev/null
@@ -1,3 +1,1 @@
-createlang -d dbname plpgsql
-psql -d transitdata -f postgis.sql
 

file:a/lib/postgis.sql (deleted)
--- a/lib/postgis.sql
+++ /dev/null
@@ -1,7788 +1,1 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- $Id: postgis.sql.in.c 5385 2010-03-09 00:22:41Z pramsey $
---
--- PostGIS - Spatial Types for PostgreSQL
--- http://postgis.refractions.net
--- Copyright 2001-2003 Refractions Research Inc.
---
--- This is free software; you can redistribute and/or modify it under
--- the terms of the GNU General Public Licence. See the COPYING file.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---	    other changes will require a bump in Major version.
---	    Currently only function replaceble by CREATE OR REPLACE
---	    are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--- INSTALL VERSION: 1.5.1
-
-SET client_min_messages TO warning;
-
-BEGIN;
-
--------------------------------------------------------------------
---  SPHEROID TYPE
--------------------------------------------------------------------
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_spheroid_in(cstring)
-	RETURNS spheroid
-	AS '$libdir/postgis-1.5','ellipsoid_in'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_spheroid_out(spheroid)
-	RETURNS cstring
-	AS '$libdir/postgis-1.5','ellipsoid_out'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION spheroid_in(cstring)
-	RETURNS spheroid
-	AS '$libdir/postgis-1.5','ellipsoid_in'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION spheroid_out(spheroid)
-	RETURNS cstring
-	AS '$libdir/postgis-1.5','ellipsoid_out'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE TYPE spheroid (
-	alignment = double,
-	internallength = 65,
-	input = spheroid_in,
-	output = spheroid_out
-);
-
--------------------------------------------------------------------
---  GEOMETRY TYPE (lwgeom)
--------------------------------------------------------------------
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_in(cstring)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_in'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_out(geometry)
-	RETURNS cstring
-	AS '$libdir/postgis-1.5','LWGEOM_out'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_analyze(internal)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_analyze'
-	LANGUAGE 'C' VOLATILE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_recv(internal)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_recv'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_send(geometry)
-	RETURNS bytea
-	AS '$libdir/postgis-1.5','LWGEOM_send'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_in(cstring)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_in'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_out(geometry)
-	RETURNS cstring
-	AS '$libdir/postgis-1.5','LWGEOM_out'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_analyze(internal)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_analyze'
-	LANGUAGE 'C' VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_recv(internal)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_recv'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_send(geometry)
-	RETURNS bytea
-	AS '$libdir/postgis-1.5','LWGEOM_send'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE TYPE geometry (
-	internallength = variable,
-	input = geometry_in,
-	output = geometry_out,
-	send = geometry_send,
-	receive = geometry_recv,
-	delimiter = ':',
-	analyze = geometry_analyze,
-	storage = main
-);
-
--------------------------------------------
--- Affine transforms
--------------------------------------------
-
--- Availability: 1.1.2
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_affine'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_affine'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.1.2
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Affine(geometry,float8,float8,float8,float8,float8,float8)
-	RETURNS geometry
-	AS 'SELECT affine($1,  $2, $3, 0,  $4, $5, 0,  0, 0, 1,  $6, $7, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Affine(geometry,float8,float8,float8,float8,float8,float8)
-	RETURNS geometry
-	AS 'SELECT affine($1,  $2, $3, 0,  $4, $5, 0,  0, 0, 1,  $6, $7, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.1.2
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION RotateZ(geometry,float8)
-	RETURNS geometry
-	AS 'SELECT affine($1,  cos($2), -sin($2), 0,  sin($2), cos($2), 0,  0, 0, 1,  0, 0, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_RotateZ(geometry,float8)
-	RETURNS geometry
-	AS 'SELECT affine($1,  cos($2), -sin($2), 0,  sin($2), cos($2), 0,  0, 0, 1,  0, 0, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.1.2
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Rotate(geometry,float8)
-	RETURNS geometry
-	AS 'SELECT rotateZ($1, $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Rotate(geometry,float8)
-	RETURNS geometry
-	AS 'SELECT rotateZ($1, $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.1.2
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION RotateX(geometry,float8)
-	RETURNS geometry
-	AS 'SELECT affine($1, 1, 0, 0, 0, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_RotateX(geometry,float8)
-	RETURNS geometry
-	AS 'SELECT affine($1, 1, 0, 0, 0, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.1.2
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION RotateY(geometry,float8)
-	RETURNS geometry
-	AS 'SELECT affine($1,  cos($2), 0, sin($2),  0, 1, 0,  -sin($2), 0, cos($2), 0,  0, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_RotateY(geometry,float8)
-	RETURNS geometry
-	AS 'SELECT affine($1,  cos($2), 0, sin($2),  0, 1, 0,  -sin($2), 0, cos($2), 0,  0, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Translate(geometry,float8,float8,float8)
-	RETURNS geometry
-	AS 'SELECT affine($1, 1, 0, 0, 0, 1, 0, 0, 0, 1, $2, $3, $4)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Translate(geometry,float8,float8,float8)
-	RETURNS geometry
-	AS 'SELECT affine($1, 1, 0, 0, 0, 1, 0, 0, 0, 1, $2, $3, $4)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Translate(geometry,float8,float8)
-	RETURNS geometry
-	AS 'SELECT translate($1, $2, $3, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Translate(geometry,float8,float8)
-	RETURNS geometry
-	AS 'SELECT translate($1, $2, $3, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.1.0
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Scale(geometry,float8,float8,float8)
-	RETURNS geometry
-	AS 'SELECT affine($1,  $2, 0, 0,  0, $3, 0,  0, 0, $4,  0, 0, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Scale(geometry,float8,float8,float8)
-	RETURNS geometry
-	AS 'SELECT affine($1,  $2, 0, 0,  0, $3, 0,  0, 0, $4,  0, 0, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.1.0
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Scale(geometry,float8,float8)
-	RETURNS geometry
-	AS 'SELECT scale($1, $2, $3, 1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Scale(geometry,float8,float8)
-	RETURNS geometry
-	AS 'SELECT scale($1, $2, $3, 1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.1.0
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION transscale(geometry,float8,float8,float8,float8)
-	RETURNS geometry
-	AS 'SELECT affine($1,  $4, 0, 0,  0, $5, 0,
-		0, 0, 1,  $2 * $4, $3 * $5, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_transscale(geometry,float8,float8,float8,float8)
-	RETURNS geometry
-	AS 'SELECT affine($1,  $4, 0, 0,  0, $5, 0,
-		0, 0, 1,  $2 * $4, $3 * $5, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.1.0
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION shift_longitude(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_longitude_shift'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_shift_longitude(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_longitude_shift'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--------------------------------------------------------------------
---  BOX3D TYPE
--------------------------------------------------------------------
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_box3d_in(cstring)
-	RETURNS box3d
-	AS '$libdir/postgis-1.5', 'BOX3D_in'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_box3d_out(box3d)
-	RETURNS cstring
-	AS '$libdir/postgis-1.5', 'BOX3D_out'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION box3d_in(cstring)
-	RETURNS box3d
-	AS '$libdir/postgis-1.5', 'BOX3D_in'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION box3d_out(box3d)
-	RETURNS cstring
-	AS '$libdir/postgis-1.5', 'BOX3D_out'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE TYPE box3d (
-	alignment = double,
-	internallength = 48,
-	input = box3d_in,
-	output = box3d_out
-);
-
--- Temporary box3d aggregate type to retain full double precision
--- for ST_Extent(). Should be removed when we change the output
--- type of ST_Extent() to return something other than BOX2DFLOAT4.
-CREATE OR REPLACE FUNCTION box3d_extent_in(cstring)
-	RETURNS box3d_extent
-	AS '$libdir/postgis-1.5', 'BOX3D_in'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION box3d_extent_out(box3d_extent)
-	RETURNS cstring
-	AS '$libdir/postgis-1.5', 'BOX3D_extent_out'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE TYPE box3d_extent (
-	alignment = double,
-	internallength = 48,
-	input = box3d_extent_in,
-	output = box3d_extent_out
-);
-
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION box3d_extent(box3d_extent)
-	RETURNS box3d
-	AS '$libdir/postgis-1.5', 'BOX3D_extent_to_BOX3D'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION box2d(box3d_extent)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5', 'BOX3D_to_BOX2DFLOAT4'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry(box3d_extent)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','BOX3D_to_LWGEOM'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- End of temporary hack
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION xmin(box3d)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','BOX3D_xmin'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_XMin(box3d)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','BOX3D_xmin'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION ymin(box3d)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','BOX3D_ymin'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_YMin(box3d)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','BOX3D_ymin'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION zmin(box3d)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','BOX3D_zmin'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_ZMin(box3d)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','BOX3D_zmin'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION xmax(box3d)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','BOX3D_xmax'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_XMax(box3d)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','BOX3D_xmax'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION ymax(box3d)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','BOX3D_ymax'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_YMax(box3d)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','BOX3D_ymax'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION zmax(box3d)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','BOX3D_zmax'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_ZMax(box3d)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','BOX3D_zmax'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--------------------------------------------------------------------
---  CHIP TYPE
--------------------------------------------------------------------
-
-CREATE OR REPLACE FUNCTION chip_in(cstring)
-	RETURNS chip
-	AS '$libdir/postgis-1.5','CHIP_in'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION chip_out(chip)
-	RETURNS cstring
-	AS '$libdir/postgis-1.5','CHIP_out'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION ST_chip_in(cstring)
-	RETURNS chip
-	AS '$libdir/postgis-1.5','CHIP_in'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION ST_chip_out(chip)
-	RETURNS cstring
-	AS '$libdir/postgis-1.5','CHIP_out'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE TYPE chip (
-	alignment = double,
-	internallength = variable,
-	input = chip_in,
-	output = chip_out,
-	storage = extended
-);
-
------------------------------------------------------------------------
--- BOX2D
------------------------------------------------------------------------
-
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_box2d_in(cstring)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5','BOX2DFLOAT4_in'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_box2d_out(box2d)
-	RETURNS cstring
-	AS '$libdir/postgis-1.5','BOX2DFLOAT4_out'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-	
-CREATE OR REPLACE FUNCTION box2d_in(cstring)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5','BOX2DFLOAT4_in'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION box2d_out(box2d)
-	RETURNS cstring
-	AS '$libdir/postgis-1.5','BOX2DFLOAT4_out'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE TYPE box2d (
-	internallength = 16,
-	input = box2d_in,
-	output = box2d_out,
-	storage = plain
-);
-
-
--------------------------------------------------------------------
--- BTREE indexes
--------------------------------------------------------------------
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_lt(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'lwgeom_lt'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_le(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'lwgeom_le'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_gt(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'lwgeom_gt'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_ge(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'lwgeom_ge'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_eq(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'lwgeom_eq'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_cmp(geometry, geometry)
-	RETURNS integer
-	AS '$libdir/postgis-1.5', 'lwgeom_cmp'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_lt(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'lwgeom_lt'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_le(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'lwgeom_le'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_gt(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'lwgeom_gt'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_ge(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'lwgeom_ge'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_eq(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'lwgeom_eq'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_cmp(geometry, geometry)
-	RETURNS integer
-	AS '$libdir/postgis-1.5', 'lwgeom_cmp'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
---
--- Sorting operators for Btree
---
-
-CREATE OPERATOR < (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_lt,
-	COMMUTATOR = '>', NEGATOR = '>=',
-	RESTRICT = contsel, JOIN = contjoinsel
-);
-
-CREATE OPERATOR <= (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_le,
-	COMMUTATOR = '>=', NEGATOR = '>',
-	RESTRICT = contsel, JOIN = contjoinsel
-);
-
-CREATE OPERATOR = (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_eq,
-	COMMUTATOR = '=', -- we might implement a faster negator here
-	RESTRICT = contsel, JOIN = contjoinsel
-);
-
-CREATE OPERATOR >= (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_ge,
-	COMMUTATOR = '<=', NEGATOR = '<',
-	RESTRICT = contsel, JOIN = contjoinsel
-);
-CREATE OPERATOR > (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_gt,
-	COMMUTATOR = '<', NEGATOR = '<=',
-	RESTRICT = contsel, JOIN = contjoinsel
-);
-
-
-CREATE OPERATOR CLASS btree_geometry_ops
-	DEFAULT FOR TYPE geometry USING btree AS
-	OPERATOR	1	< ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	= ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	> ,
-	FUNCTION	1	geometry_cmp (geometry, geometry);
-
-
-
--------------------------------------------------------------------
--- GiST indexes
--------------------------------------------------------------------
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION postgis_gist_sel (internal, oid, internal, int4)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'LWGEOM_gist_sel'
-	LANGUAGE 'C';
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION postgis_gist_joinsel(internal, oid, internal, smallint)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'LWGEOM_gist_joinsel'
-	LANGUAGE 'C';
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_postgis_gist_sel (internal, oid, internal, int4)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'LWGEOM_gist_sel'
-	LANGUAGE 'C';
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_postgis_gist_joinsel(internal, oid, internal, smallint)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'LWGEOM_gist_joinsel'
-	LANGUAGE 'C';
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_overleft(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_overleft'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_overright(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_overright'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_overabove(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_overabove'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_overbelow(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_overbelow'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_left(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_left'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_right(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_right'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_above(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_above'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_below(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_below'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_contain(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_contain'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_contained(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_contained'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_overlap(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_overlap'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry_same(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_samebox'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION geometry_same(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_samebox'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_gist_sel (internal, oid, internal, int4)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'LWGEOM_gist_sel'
-	LANGUAGE 'C';
-
-CREATE OR REPLACE FUNCTION geometry_gist_joinsel(internal, oid, internal, smallint)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'LWGEOM_gist_joinsel'
-	LANGUAGE 'C';
-
-CREATE OR REPLACE FUNCTION geometry_overleft(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_overleft'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_overright(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_overright'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_overabove(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_overabove'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_overbelow(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_overbelow'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_left(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_left'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_right(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_right'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_above(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_above'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_below(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_below'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_contain(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_contain'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_contained(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_contained'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_overlap(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_overlap'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry_samebox(geometry, geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_samebox'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OPERATOR << (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_left,
-	COMMUTATOR = '>>',
-	RESTRICT = positionsel, JOIN = positionjoinsel
-);
-
-CREATE OPERATOR &< (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_overleft,
-	COMMUTATOR = '&>',
-	RESTRICT = positionsel, JOIN = positionjoinsel
-);
-
-CREATE OPERATOR <<| (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_below,
-	COMMUTATOR = '|>>',
-	RESTRICT = positionsel, JOIN = positionjoinsel
-);
-
-CREATE OPERATOR &<| (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_overbelow,
-	COMMUTATOR = '|&>',
-	RESTRICT = positionsel, JOIN = positionjoinsel
-);
-
-CREATE OPERATOR && (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_overlap,
-	COMMUTATOR = '&&',
-	RESTRICT = geometry_gist_sel, JOIN = geometry_gist_joinsel
-);
-
-CREATE OPERATOR &> (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_overright,
-	COMMUTATOR = '&<',
-	RESTRICT = positionsel, JOIN = positionjoinsel
-);
-
-CREATE OPERATOR >> (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_right,
-	COMMUTATOR = '<<',
-	RESTRICT = positionsel, JOIN = positionjoinsel
-);
-
-CREATE OPERATOR |&> (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_overabove,
-	COMMUTATOR = '&<|',
-	RESTRICT = positionsel, JOIN = positionjoinsel
-);
-
-CREATE OPERATOR |>> (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_above,
-	COMMUTATOR = '<<|',
-	RESTRICT = positionsel, JOIN = positionjoinsel
-);
-
-CREATE OPERATOR ~= (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_samebox,
-	COMMUTATOR = '~=',
-	RESTRICT = eqsel, JOIN = eqjoinsel
-);
-
-CREATE OPERATOR @ (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_contained,
-	COMMUTATOR = '~',
-	RESTRICT = contsel, JOIN = contjoinsel
-);
-
-CREATE OPERATOR ~ (
-	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_contain,
-	COMMUTATOR = '@',
-	RESTRICT = contsel, JOIN = contjoinsel
-);
-
--- gist support functions
-
-CREATE OR REPLACE FUNCTION LWGEOM_gist_consistent(internal,geometry,int4)
-	RETURNS bool
-	AS '$libdir/postgis-1.5' ,'LWGEOM_gist_consistent'
-	LANGUAGE 'C';
-
-CREATE OR REPLACE FUNCTION LWGEOM_gist_compress(internal)
-	RETURNS internal
-	AS '$libdir/postgis-1.5','LWGEOM_gist_compress'
-	LANGUAGE 'C';
-
-CREATE OR REPLACE FUNCTION LWGEOM_gist_penalty(internal,internal,internal)
-	RETURNS internal
-	AS '$libdir/postgis-1.5' ,'LWGEOM_gist_penalty'
-	LANGUAGE 'C';
-
-CREATE OR REPLACE FUNCTION LWGEOM_gist_picksplit(internal, internal)
-	RETURNS internal
-	AS '$libdir/postgis-1.5' ,'LWGEOM_gist_picksplit'
-	LANGUAGE 'C';
-
-CREATE OR REPLACE FUNCTION LWGEOM_gist_union(bytea, internal)
-	RETURNS internal
-	AS '$libdir/postgis-1.5' ,'LWGEOM_gist_union'
-	LANGUAGE 'C';
-
-CREATE OR REPLACE FUNCTION LWGEOM_gist_same(box2d, box2d, internal)
-	RETURNS internal
-	AS '$libdir/postgis-1.5' ,'LWGEOM_gist_same'
-	LANGUAGE 'C';
-
-CREATE OR REPLACE FUNCTION LWGEOM_gist_decompress(internal)
-	RETURNS internal
-	AS '$libdir/postgis-1.5' ,'LWGEOM_gist_decompress'
-	LANGUAGE 'C';
-
--------------------------------------------
--- GIST opclass index binding entries.
--------------------------------------------
---
--- Create opclass index bindings for PG>=73
---
-
-CREATE OPERATOR CLASS gist_geometry_ops
-	DEFAULT FOR TYPE geometry USING gist AS
-	STORAGE 	box2d,
-	OPERATOR        1        << 	,
-	OPERATOR        2        &<	,
-	OPERATOR        3        &&	,
-	OPERATOR        4        &>	,
-	OPERATOR        5        >>	,
-	OPERATOR        6        ~=	,
-	OPERATOR        7        ~	,
-	OPERATOR        8        @	,
-	OPERATOR	9	 &<|	,
-	OPERATOR	10	 <<|	,
-	OPERATOR	11	 |>>	,
-	OPERATOR	12	 |&>	,
-	FUNCTION        1        LWGEOM_gist_consistent (internal, geometry, int4),
-	FUNCTION        2        LWGEOM_gist_union (bytea, internal),
-	FUNCTION        3        LWGEOM_gist_compress (internal),
-	FUNCTION        4        LWGEOM_gist_decompress (internal),
-	FUNCTION        5        LWGEOM_gist_penalty (internal, internal, internal),
-	FUNCTION        6        LWGEOM_gist_picksplit (internal, internal),
-	FUNCTION        7        LWGEOM_gist_same (box2d, box2d, internal);
-
--------------------------------------------
--- other lwgeom functions
--------------------------------------------
-
-CREATE OR REPLACE FUNCTION addbbox(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_addBBOX'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION postgis_addbbox(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_addBBOX'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION dropbbox(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_dropBBOX'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION postgis_dropbbox(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_dropBBOX'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION getsrid(geometry)
-	RETURNS int4
-	AS '$libdir/postgis-1.5','LWGEOM_getSRID'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION getbbox(geometry)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5','LWGEOM_to_BOX2DFLOAT4'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION postgis_getbbox(geometry)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5','LWGEOM_to_BOX2DFLOAT4'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION hasbbox(geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_hasBBOX'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION postgis_hasbbox(geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_hasBBOX'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--------------------------------------------
---- CHIP functions
--------------------------------------------
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION srid(chip)
-	RETURNS int4
-	AS '$libdir/postgis-1.5','CHIP_getSRID'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_srid(chip)
-	RETURNS int4
-	AS '$libdir/postgis-1.5','CHIP_getSRID'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION height(chip)
-	RETURNS int4
-	AS '$libdir/postgis-1.5','CHIP_getHeight'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_height(chip)
-	RETURNS int4
-	AS '$libdir/postgis-1.5','CHIP_getHeight'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION factor(chip)
-	RETURNS FLOAT4
-	AS '$libdir/postgis-1.5','CHIP_getFactor'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_factor(chip)
-	RETURNS FLOAT4
-	AS '$libdir/postgis-1.5','CHIP_getFactor'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION width(chip)
-	RETURNS int4
-	AS '$libdir/postgis-1.5','CHIP_getWidth'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_width(chip)
-	RETURNS int4
-	AS '$libdir/postgis-1.5','CHIP_getWidth'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION datatype(chip)
-	RETURNS int4
-	AS '$libdir/postgis-1.5','CHIP_getDatatype'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_datatype(chip)
-	RETURNS int4
-	AS '$libdir/postgis-1.5','CHIP_getDatatype'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION compression(chip)
-	RETURNS int4
-	AS '$libdir/postgis-1.5','CHIP_getCompression'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_compression(chip)
-	RETURNS int4
-	AS '$libdir/postgis-1.5','CHIP_getCompression'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION setSRID(chip,int4)
-	RETURNS chip
-	AS '$libdir/postgis-1.5','CHIP_setSRID'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION setFactor(chip,float4)
-	RETURNS chip
-	AS '$libdir/postgis-1.5','CHIP_setFactor'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_setFactor(chip,float4)
-	RETURNS chip
-	AS '$libdir/postgis-1.5','CHIP_setFactor'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-------------------------------------------------------------------------
--- DEBUG
-------------------------------------------------------------------------
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION mem_size(geometry)
-	RETURNS int4
-	AS '$libdir/postgis-1.5', 'LWGEOM_mem_size'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_mem_size(geometry)
-	RETURNS int4
-	AS '$libdir/postgis-1.5', 'LWGEOM_mem_size'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION summary(geometry)
-	RETURNS text
-	AS '$libdir/postgis-1.5', 'LWGEOM_summary'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_summary(geometry)
-	RETURNS text
-	AS '$libdir/postgis-1.5', 'LWGEOM_summary'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION npoints(geometry)
-	RETURNS int4
-	AS '$libdir/postgis-1.5', 'LWGEOM_npoints'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_npoints(geometry)
-	RETURNS int4
-	AS '$libdir/postgis-1.5', 'LWGEOM_npoints'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION nrings(geometry)
-	RETURNS int4
-	AS '$libdir/postgis-1.5', 'LWGEOM_nrings'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_nrings(geometry)
-	RETURNS int4
-	AS '$libdir/postgis-1.5', 'LWGEOM_nrings'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-------------------------------------------------------------------------
--- Misures
-------------------------------------------------------------------------
-
--- this is a fake (for back-compatibility)
--- uses 3d if 3d is available, 2d otherwise
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION length3d(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'LWGEOM_length_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_length3d(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'LWGEOM_length_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION length2d(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'LWGEOM_length2d_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_length2d(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'LWGEOM_length2d_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION length(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'LWGEOM_length_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: length2d(geometry)
-CREATE OR REPLACE FUNCTION ST_Length(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'LWGEOM_length2d_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- this is a fake (for back-compatibility)
--- uses 3d if 3d is available, 2d otherwise
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION length3d_spheroid(geometry, spheroid)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','LWGEOM_length_ellipsoid_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_length3d_spheroid(geometry, spheroid)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','LWGEOM_length_ellipsoid_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION length_spheroid(geometry, spheroid)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','LWGEOM_length_ellipsoid_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_length_spheroid(geometry, spheroid)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','LWGEOM_length_ellipsoid_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION length2d_spheroid(geometry, spheroid)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','LWGEOM_length2d_ellipsoid'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_length2d_spheroid(geometry, spheroid)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','LWGEOM_length2d_ellipsoid'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- this is a fake (for back-compatibility)
--- uses 3d if 3d is available, 2d otherwise
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION perimeter3d(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'LWGEOM_perimeter_poly'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_perimeter3d(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'LWGEOM_perimeter_poly'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION perimeter2d(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'LWGEOM_perimeter2d_poly'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_perimeter2d(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'LWGEOM_perimeter2d_poly'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION perimeter(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'LWGEOM_perimeter_poly'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: perimeter2d(geometry)
-CREATE OR REPLACE FUNCTION ST_Perimeter(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'LWGEOM_perimeter2d_poly'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- this is an alias for 'area(geometry)'
--- there is nothing such an 'area3d'...
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION area2d(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'LWGEOM_area_polygon'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
--- Deprecation in 1.3.4
-CREATE OR REPLACE FUNCTION ST_area2d(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'LWGEOM_area_polygon'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION area(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','LWGEOM_area_polygon'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: area(geometry)
-CREATE OR REPLACE FUNCTION ST_Area(geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','LWGEOM_area_polygon'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION distance_spheroid(geometry,geometry,spheroid)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','LWGEOM_distance_ellipsoid'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_distance_spheroid(geometry,geometry,spheroid)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','LWGEOM_distance_ellipsoid'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION distance_sphere(geometry,geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','LWGEOM_distance_sphere'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_distance_sphere(geometry,geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5','LWGEOM_distance_sphere'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Minimum distance. 2d only.
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION distance(geometry,geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'LWGEOM_mindistance2d'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- PostGIS equivalent function: distance(geometry,geometry)
-CREATE OR REPLACE FUNCTION ST_Distance(geometry,geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'LWGEOM_mindistance2d'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION point_inside_circle(geometry,float8,float8,float8)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_inside_circle_point'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_point_inside_circle(geometry,float8,float8,float8)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_inside_circle_point'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION azimuth(geometry,geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'LWGEOM_azimuth'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_azimuth(geometry,geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'LWGEOM_azimuth'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-------------------------------------------------------------------------
--- MISC
-------------------------------------------------------------------------
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION force_2d(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_force_2d'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_force_2d(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_force_2d'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION force_3dz(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_force_3dz'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_force_3dz(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_force_3dz'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- an alias for force_3dz
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION force_3d(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_force_3dz'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_force_3d(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_force_3dz'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION force_3dm(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_force_3dm'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_force_3dm(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_force_3dm'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION force_4d(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_force_4d'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_force_4d(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_force_4d'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION force_collection(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_force_collection'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_force_collection(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_force_collection'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_CollectionExtract(geometry, integer)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'ST_CollectionExtract'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION multi(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_force_multi'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_multi(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_force_multi'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION expand(box3d,float8)
-	RETURNS box3d
-	AS '$libdir/postgis-1.5', 'BOX3D_expand'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Expand(box3d,float8)
-	RETURNS box3d
-	AS '$libdir/postgis-1.5', 'BOX3D_expand'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION expand(box2d,float8)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_expand'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_expand(box2d,float8)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_expand'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION expand(geometry,float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_expand'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_expand(geometry,float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_expand'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION envelope(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_envelope'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: envelope(geometry)
-CREATE OR REPLACE FUNCTION ST_Envelope(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_envelope'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION reverse(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_reverse'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Reverse(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_reverse'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION ForceRHR(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_forceRHR_poly'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_ForceRHR(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_forceRHR_poly'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION noop(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_noop'
-	LANGUAGE 'C' VOLATILE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION postgis_noop(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_noop'
-	LANGUAGE 'C' VOLATILE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION zmflag(geometry)
-	RETURNS smallint
-	AS '$libdir/postgis-1.5', 'LWGEOM_zmflag'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION ST_zmflag(geometry)
-	RETURNS smallint
-	AS '$libdir/postgis-1.5', 'LWGEOM_zmflag'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION ndims(geometry)
-	RETURNS smallint
-	AS '$libdir/postgis-1.5', 'LWGEOM_ndims'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_NDims(geometry)
-	RETURNS smallint
-	AS '$libdir/postgis-1.5', 'LWGEOM_ndims'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsEWKT(geometry)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','LWGEOM_asEWKT'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_AsEWKT(geometry)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','LWGEOM_asEWKT'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsEWKB(geometry)
-	RETURNS BYTEA
-	AS '$libdir/postgis-1.5','WKBFromLWGEOM'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_AsEWKB(geometry)
-	RETURNS BYTEA
-	AS '$libdir/postgis-1.5','WKBFromLWGEOM'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsHEXEWKB(geometry)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','LWGEOM_asHEXEWKB'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_AsHEXEWKB(geometry)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','LWGEOM_asHEXEWKB'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsHEXEWKB(geometry, text)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','LWGEOM_asHEXEWKB'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_AsHEXEWKB(geometry, text)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','LWGEOM_asHEXEWKB'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsEWKB(geometry,text)
-	RETURNS bytea
-	AS '$libdir/postgis-1.5','WKBFromLWGEOM'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_AsEWKB(geometry,text)
-	RETURNS bytea
-	AS '$libdir/postgis-1.5','WKBFromLWGEOM'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeomFromEWKB(bytea)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOMFromWKB'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_GeomFromEWKB(bytea)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOMFromWKB'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeomFromEWKT(text)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','parse_WKT_lwgeom'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_GeomFromEWKT(text)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','parse_WKT_lwgeom'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION postgis_cache_bbox()
-	RETURNS trigger
-	AS '$libdir/postgis-1.5', 'cache_bbox'
-	LANGUAGE 'C';
-
-------------------------------------------------------------------------
--- CONSTRUCTORS
-------------------------------------------------------------------------
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MakePoint(float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makepoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MakePoint(float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makepoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MakePoint(float8, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makepoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MakePoint(float8, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makepoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MakePoint(float8, float8, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makepoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MakePoint(float8, float8, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makepoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MakePointM(float8, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makepoint3dm'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.3.4
-CREATE OR REPLACE FUNCTION ST_MakePointM(float8, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makepoint3dm'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MakeBox2d(geometry, geometry)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_construct'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MakeBox2d(geometry, geometry)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_construct'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MakeBox3d(geometry, geometry)
-	RETURNS box3d
-	AS '$libdir/postgis-1.5', 'BOX3D_construct'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MakeBox3d(geometry, geometry)
-	RETURNS box3d
-	AS '$libdir/postgis-1.5', 'BOX3D_construct'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION makeline_garray (geometry[])
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makeline_garray'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MakeLine_GArray (geometry[])
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makeline_garray'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION ST_MakeLine (geometry[])
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makeline_garray'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION LineFromMultiPoint(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_line_from_mpoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_LineFromMultiPoint(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_line_from_mpoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MakeLine(geometry, geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makeline'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MakeLine(geometry, geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makeline'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AddPoint(geometry, geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_addpoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_AddPoint(geometry, geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_addpoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AddPoint(geometry, geometry, integer)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_addpoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_AddPoint(geometry, geometry, integer)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_addpoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION RemovePoint(geometry, integer)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_removepoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_RemovePoint(geometry, integer)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_removepoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION SetPoint(geometry, integer, geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_setpoint_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_SetPoint(geometry, integer, geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_setpoint_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_MakeEnvelope(float8, float8, float8, float8, integer)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'ST_MakeEnvelope'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MakePolygon(geometry, geometry[])
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makepoly'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MakePolygon(geometry, geometry[])
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makepoly'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MakePolygon(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makepoly'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MakePolygon(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makepoly'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION BuildArea(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_buildarea'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_BuildArea(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_buildarea'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Polygonize_GArray (geometry[])
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'polygonize_garray'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION ST_Polygonize_GArray (geometry[])
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'polygonize_garray'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION ST_Polygonize (geometry[])
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'polygonize_garray'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION LineMerge(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'linemerge'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_LineMerge(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'linemerge'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
-
-CREATE TYPE geometry_dump AS (path integer[], geom geometry);
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Dump(geometry)
-	RETURNS SETOF geometry_dump
-	AS '$libdir/postgis-1.5', 'LWGEOM_dump'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Dump(geometry)
-	RETURNS SETOF geometry_dump
-	AS '$libdir/postgis-1.5', 'LWGEOM_dump'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION DumpRings(geometry)
-	RETURNS SETOF geometry_dump
-	AS '$libdir/postgis-1.5', 'LWGEOM_dump_rings'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_DumpRings(geometry)
-	RETURNS SETOF geometry_dump
-	AS '$libdir/postgis-1.5', 'LWGEOM_dump_rings'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
------------------------------------------------------------------------
--- _ST_DumpPoints()
------------------------------------------------------------------------
--- A helper function for ST_DumpPoints(geom)
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION _ST_DumpPoints(the_geom geometry, cur_path integer[]) RETURNS SETOF geometry_dump AS $$
-DECLARE
-  tmp geometry_dump;
-  tmp2 geometry_dump;
-  nb_points integer;
-  nb_geom integer;
-  i integer;
-  j integer;
-  g geometry;
-  
-BEGIN
-  
-  RAISE DEBUG '%,%', cur_path, ST_GeometryType(the_geom);
-
-  -- Special case (MULTI* OR GEOMETRYCOLLECTION) : iterate and return the DumpPoints of the geometries
-  SELECT ST_NumGeometries(the_geom) INTO nb_geom;
-
-  IF (nb_geom IS NOT NULL) THEN
-    
-    i = 1;
-    FOR tmp2 IN SELECT (ST_Dump(the_geom)).* LOOP
-
-      FOR tmp IN SELECT * FROM _ST_DumpPoints(tmp2.geom, cur_path || tmp2.path) LOOP
-	    RETURN NEXT tmp;
-      END LOOP;
-      i = i + 1;
-      
-    END LOOP;
-
-    RETURN;
-  END IF;
-  
-
-  -- Special case (POLYGON) : return the points of the rings of a polygon
-  IF (ST_GeometryType(the_geom) = 'ST_Polygon') THEN
-
-    FOR tmp IN SELECT * FROM _ST_DumpPoints(ST_ExteriorRing(the_geom), cur_path || ARRAY[1]) LOOP
-      RETURN NEXT tmp;
-    END LOOP;
-    
-    j := ST_NumInteriorRings(the_geom);
-    FOR i IN 1..j LOOP
-        FOR tmp IN SELECT * FROM _ST_DumpPoints(ST_InteriorRingN(the_geom, i), cur_path || ARRAY[i+1]) LOOP
-          RETURN NEXT tmp;
-        END LOOP;
-    END LOOP;
-    
-    RETURN;
-  END IF;
-
-    
-  -- Special case (POINT) : return the point
-  IF (ST_GeometryType(the_geom) = 'ST_Point') THEN
-
-    tmp.path = cur_path || ARRAY[1];
-    tmp.geom = the_geom;
-
-    RETURN NEXT tmp;
-    RETURN;
-
-  END IF;
-
-
-  -- Use ST_NumPoints rather than ST_NPoints to have a NULL value if the_geom isn't
-  -- a LINESTRING or CIRCULARSTRING.
-  SELECT ST_NumPoints(the_geom) INTO nb_points;
-
-  -- This should never happen
-  IF (nb_points IS NULL) THEN
-    RAISE EXCEPTION 'Unexpected error while dumping geometry %', ST_AsText(the_geom);
-  END IF;
-
-  FOR i IN 1..nb_points LOOP
-    tmp.path = cur_path || ARRAY[i];
-    tmp.geom := ST_PointN(the_geom, i);
-    RETURN NEXT tmp;
-  END LOOP;
-   
-END
-$$ LANGUAGE plpgsql;
-
------------------------------------------------------------------------
--- ST_DumpPoints()
------------------------------------------------------------------------
--- This function mimicks that of ST_Dump for collections, but this function 
--- that returns a path and all the points that make up a particular geometry.
--- This current implementation in plpgsql does not scale very well at all.
--- and should be ported to C at some point.
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_DumpPoints(geometry) RETURNS SETOF geometry_dump AS $$
-  SELECT * FROM _ST_DumpPoints($1, NULL);
-$$ LANGUAGE SQL;
-
-
-------------------------------------------------------------------------
-
---
--- Aggregate functions
---
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION combine_bbox(box2d,geometry)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_combine'
-	LANGUAGE 'C' IMMUTABLE;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Combine_BBox(box2d,geometry)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_combine'
-	LANGUAGE 'C' IMMUTABLE;
-
--- Temporary hack function
-CREATE OR REPLACE FUNCTION combine_bbox(box3d_extent,geometry)
-	RETURNS box3d_extent
-	AS '$libdir/postgis-1.5', 'BOX3D_combine'
-	LANGUAGE 'C' IMMUTABLE;
-
--- Temporary hack function
-CREATE OR REPLACE FUNCTION ST_Combine_BBox(box3d_extent,geometry)
-	RETURNS box3d_extent
-	AS '$libdir/postgis-1.5', 'BOX3D_combine'
-	LANGUAGE 'C' IMMUTABLE;
-
--- Deprecation in 1.2.3
-CREATE AGGREGATE Extent(
-	sfunc = ST_combine_bbox,
-	basetype = geometry,
-	stype = box3d_extent
-	);
-
--- Availability: 1.2.2
-CREATE AGGREGATE ST_Extent(
-	sfunc = ST_combine_bbox,
-	basetype = geometry,
-	stype = box3d_extent
-	);
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION combine_bbox(box3d,geometry)
-	RETURNS box3d
-	AS '$libdir/postgis-1.5', 'BOX3D_combine'
-	LANGUAGE 'C' IMMUTABLE;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Combine_BBox(box3d,geometry)
-	RETURNS box3d
-	AS '$libdir/postgis-1.5', 'BOX3D_combine'
-	LANGUAGE 'C' IMMUTABLE;
-
--- Deprecation in 1.2.3
-CREATE AGGREGATE Extent3d(
-	sfunc = combine_bbox,
-	basetype = geometry,
-	stype = box3d
-	);
-
--- Availability: 1.2.2
-CREATE AGGREGATE ST_Extent3d(
-	sfunc = ST_combine_bbox,
-	basetype = geometry,
-	stype = box3d
-	);
-
------------------------------------------------------------------------
--- ESTIMATED_EXTENT( <schema name>, <table name>, <column name> )
------------------------------------------------------------------------
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION estimated_extent(text,text,text) RETURNS box2d AS
-	'$libdir/postgis-1.5', 'LWGEOM_estimated_extent'
-	LANGUAGE 'C' IMMUTABLE STRICT SECURITY DEFINER;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_estimated_extent(text,text,text) RETURNS box2d AS
-	'$libdir/postgis-1.5', 'LWGEOM_estimated_extent'
-	LANGUAGE 'C' IMMUTABLE STRICT SECURITY DEFINER;
-
------------------------------------------------------------------------
--- ESTIMATED_EXTENT( <table name>, <column name> )
------------------------------------------------------------------------
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION estimated_extent(text,text) RETURNS box2d AS
-	'$libdir/postgis-1.5', 'LWGEOM_estimated_extent'
-	LANGUAGE 'C' IMMUTABLE STRICT SECURITY DEFINER;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_estimated_extent(text,text) RETURNS box2d AS
-	'$libdir/postgis-1.5', 'LWGEOM_estimated_extent'
-	LANGUAGE 'C' IMMUTABLE STRICT SECURITY DEFINER;
-
------------------------------------------------------------------------
--- FIND_EXTENT( <schema name>, <table name>, <column name> )
------------------------------------------------------------------------
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION find_extent(text,text,text) RETURNS box2d AS
-$$
-DECLARE
-	schemaname alias for $1;
-	tablename alias for $2;
-	columnname alias for $3;
-	myrec RECORD;
-
-BEGIN
-	FOR myrec IN EXECUTE 'SELECT extent("' || columnname || '") FROM "' || schemaname || '"."' || tablename || '"' LOOP
-		return myrec.extent;
-	END LOOP;
-END;
-$$
-LANGUAGE 'plpgsql' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_find_extent(text,text,text) RETURNS box2d AS
-$$
-DECLARE
-	schemaname alias for $1;
-	tablename alias for $2;
-	columnname alias for $3;
-	myrec RECORD;
-
-BEGIN
-	FOR myrec IN EXECUTE 'SELECT extent("' || columnname || '") FROM "' || schemaname || '"."' || tablename || '"' LOOP
-		return myrec.extent;
-	END LOOP;
-END;
-$$
-LANGUAGE 'plpgsql' IMMUTABLE STRICT;
-
-
------------------------------------------------------------------------
--- FIND_EXTENT( <table name>, <column name> )
------------------------------------------------------------------------
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION find_extent(text,text) RETURNS box2d AS
-$$
-DECLARE
-	tablename alias for $1;
-	columnname alias for $2;
-	myrec RECORD;
-
-BEGIN
-	FOR myrec IN EXECUTE 'SELECT extent("' || columnname || '") FROM "' || tablename || '"' LOOP
-		return myrec.extent;
-	END LOOP;
-END;
-$$
-LANGUAGE 'plpgsql' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_find_extent(text,text) RETURNS box2d AS
-$$
-DECLARE
-	tablename alias for $1;
-	columnname alias for $2;
-	myrec RECORD;
-
-BEGIN
-	FOR myrec IN EXECUTE 'SELECT extent("' || columnname || '") FROM "' || tablename || '"' LOOP
-		return myrec.extent;
-	END LOOP;
-END;
-$$
-LANGUAGE 'plpgsql' IMMUTABLE STRICT;
-
--------------------------------------------------------------------
--- SPATIAL_REF_SYS
--------------------------------------------------------------------
-CREATE TABLE spatial_ref_sys (
-	 srid integer not null primary key,
-	 auth_name varchar(256),
-	 auth_srid integer,
-	 srtext varchar(2048),
-	 proj4text varchar(2048)
-);
-
--------------------------------------------------------------------
--- GEOMETRY_COLUMNS
--------------------------------------------------------------------
-CREATE TABLE geometry_columns (
-	f_table_catalog varchar(256) not null,
-	f_table_schema varchar(256) not null,
-	f_table_name varchar(256) not null,
-	f_geometry_column varchar(256) not null,
-	coord_dimension integer not null,
-	srid integer not null,
-	type varchar(30) not null,
-	CONSTRAINT geometry_columns_pk primary key (
-		f_table_catalog,
-		f_table_schema,
-		f_table_name,
-		f_geometry_column )
-) WITH OIDS;
-
------------------------------------------------------------------------
--- RENAME_GEOMETRY_TABLE_CONSTRAINTS()
------------------------------------------------------------------------
--- This function has been obsoleted for the difficulty in
--- finding attribute on which the constraint is applied.
--- AddGeometryColumn will name the constraints in a meaningful
--- way, but nobody can rely on it since old postgis versions did
--- not do that.
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION rename_geometry_table_constraints() RETURNS text
-AS
-$$
-SELECT 'rename_geometry_table_constraint() is obsoleted'::text
-$$
-LANGUAGE 'SQL' IMMUTABLE;
-
------------------------------------------------------------------------
--- FIX_GEOMETRY_COLUMNS()
------------------------------------------------------------------------
--- This function will:
---
---	o try to fix the schema of records with an integer one
---		(for PG>=73)
---
---	o link records to system tables through attrelid and varattnum
---		(for PG<75)
---
---	o delete all records for which no linking was possible
---		(for PG<75)
---
---
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION fix_geometry_columns() RETURNS text
-AS
-$$
-DECLARE
-	mislinked record;
-	result text;
-	linked integer;
-	deleted integer;
-	foundschema integer;
-BEGIN
-
-	-- Since 7.3 schema support has been added.
-	-- Previous postgis versions used to put the database name in
-	-- the schema column. This needs to be fixed, so we try to
-	-- set the correct schema for each geometry_colums record
-	-- looking at table, column, type and srid.
-	UPDATE geometry_columns SET f_table_schema = n.nspname
-		FROM pg_namespace n, pg_class c, pg_attribute a,
-			pg_constraint sridcheck, pg_constraint typecheck
-			WHERE ( f_table_schema is NULL
-		OR f_table_schema = ''
-			OR f_table_schema NOT IN (
-					SELECT nspname::varchar
-					FROM pg_namespace nn, pg_class cc, pg_attribute aa
-					WHERE cc.relnamespace = nn.oid
-					AND cc.relname = f_table_name::name
-					AND aa.attrelid = cc.oid
-					AND aa.attname = f_geometry_column::name))
-			AND f_table_name::name = c.relname
-			AND c.oid = a.attrelid
-			AND c.relnamespace = n.oid
-			AND f_geometry_column::name = a.attname
-
-			AND sridcheck.conrelid = c.oid
-		AND sridcheck.consrc LIKE '(srid(% = %)'
-			AND sridcheck.consrc ~ textcat(' = ', srid::text)
-
-			AND typecheck.conrelid = c.oid
-		AND typecheck.consrc LIKE
-		'((geometrytype(%) = ''%''::text) OR (% IS NULL))'
-			AND typecheck.consrc ~ textcat(' = ''', type::text)
-
-			AND NOT EXISTS (
-					SELECT oid FROM geometry_columns gc
-					WHERE c.relname::varchar = gc.f_table_name
-					AND n.nspname::varchar = gc.f_table_schema
-					AND a.attname::varchar = gc.f_geometry_column
-			);
-
-	GET DIAGNOSTICS foundschema = ROW_COUNT;
-
-	-- no linkage to system table needed
-	return 'fixed:'||foundschema::text;
-
-END;
-$$
-LANGUAGE 'plpgsql' VOLATILE;
-
------------------------------------------------------------------------
--- POPULATE_GEOMETRY_COLUMNS()
------------------------------------------------------------------------
--- Truncates and refills the geometry_columns table from all tables and
--- views in the database that contain geometry columns. This function
--- is a simple wrapper for populate_geometry_columns(oid).  In essence,
--- this function ensures every geometry column in the database has the
--- appropriate spatial contraints (for tables) and exists in the
--- geometry_columns table.
--- Availability: 1.4.0
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION populate_geometry_columns()
-	RETURNS text AS
-$$
-DECLARE
-	inserted    integer;
-	oldcount    integer;
-	probed      integer;
-	stale       integer;
-	gcs         RECORD;
-	gc          RECORD;
-	gsrid       integer;
-	gndims      integer;
-	gtype       text;
-	query       text;
-	gc_is_valid boolean;
-
-BEGIN
-	SELECT count(*) INTO oldcount FROM geometry_columns;
-	inserted := 0;
-
-	EXECUTE 'TRUNCATE geometry_columns';
-
-	-- Count the number of geometry columns in all tables and views
-	SELECT count(DISTINCT c.oid) INTO probed
-	FROM pg_class c,
-		 pg_attribute a,
-		 pg_type t,
-		 pg_namespace n
-	WHERE (c.relkind = 'r' OR c.relkind = 'v')
-	AND t.typname = 'geometry'
-	AND a.attisdropped = false
-	AND a.atttypid = t.oid
-	AND a.attrelid = c.oid
-	AND c.relnamespace = n.oid
-	AND n.nspname NOT ILIKE 'pg_temp%';
-
-	-- Iterate through all non-dropped geometry columns
-	RAISE DEBUG 'Processing Tables.....';
-
-	FOR gcs IN
-	SELECT DISTINCT ON (c.oid) c.oid, n.nspname, c.relname
-		FROM pg_class c,
-			 pg_attribute a,
-			 pg_type t,
-			 pg_namespace n
-		WHERE c.relkind = 'r'
-		AND t.typname = 'geometry'
-		AND a.attisdropped = false
-		AND a.atttypid = t.oid
-		AND a.attrelid = c.oid
-		AND c.relnamespace = n.oid
-		AND n.nspname NOT ILIKE 'pg_temp%'
-	LOOP
-
-	inserted := inserted + populate_geometry_columns(gcs.oid);
-	END LOOP;
-
-	-- Add views to geometry columns table
-	RAISE DEBUG 'Processing Views.....';
-	FOR gcs IN
-	SELECT DISTINCT ON (c.oid) c.oid, n.nspname, c.relname
-		FROM pg_class c,
-			 pg_attribute a,
-			 pg_type t,
-			 pg_namespace n
-		WHERE c.relkind = 'v'
-		AND t.typname = 'geometry'
-		AND a.attisdropped = false
-		AND a.atttypid = t.oid
-		AND a.attrelid = c.oid
-		AND c.relnamespace = n.oid
-	LOOP
-
-	inserted := inserted + populate_geometry_columns(gcs.oid);
-	END LOOP;
-
-	IF oldcount > inserted THEN
-	stale = oldcount-inserted;
-	ELSE
-	stale = 0;
-	END IF;
-
-	RETURN 'probed:' ||probed|| ' inserted:'||inserted|| ' conflicts:'||probed-inserted|| ' deleted:'||stale;
-END
-
-$$
-LANGUAGE 'plpgsql' VOLATILE;
-
------------------------------------------------------------------------
--- POPULATE_GEOMETRY_COLUMNS(tbl_oid oid)
------------------------------------------------------------------------
--- DELETEs from and reINSERTs into the geometry_columns table all entries
--- associated with the oid of a particular table or view.
---
--- If the provided oid is for a table, this function tries to determine
--- the srid, dimension, and geometry type of the all geometries
--- in the table, adding contraints as necessary to the table.  If
--- successful, an appropriate row is inserted into the geometry_columns
--- table, otherwise, the exception is caught and an error notice is
--- raised describing the problem. (This is so the wrapper function
--- populate_geometry_columns() can apply spatial constraints to all
--- geometry columns across an entire database at once without erroring
--- out)
---
--- If the provided oid is for a view, as with a table oid, this function
--- tries to determine the srid, dimension, and type of all the geometries
--- in the view, inserting appropriate entries into the geometry_columns
--- table.
--- Availability: 1.4.0
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION populate_geometry_columns(tbl_oid oid)
-	RETURNS integer AS
-$$
-DECLARE
-	gcs         RECORD;
-	gc          RECORD;
-	gsrid       integer;
-	gndims      integer;
-	gtype       text;
-	query       text;
-	gc_is_valid boolean;
-	inserted    integer;
-
-BEGIN
-	inserted := 0;
-
-	-- Iterate through all geometry columns in this table
-	FOR gcs IN
-	SELECT n.nspname, c.relname, a.attname
-		FROM pg_class c,
-			 pg_attribute a,
-			 pg_type t,
-			 pg_namespace n
-		WHERE c.relkind = 'r'
-		AND t.typname = 'geometry'
-		AND a.attisdropped = false
-		AND a.atttypid = t.oid
-		AND a.attrelid = c.oid
-		AND c.relnamespace = n.oid
-		AND n.nspname NOT ILIKE 'pg_temp%'
-		AND c.oid = tbl_oid
-	LOOP
-
-	RAISE DEBUG 'Processing table %.%.%', gcs.nspname, gcs.relname, gcs.attname;
-
-	DELETE FROM geometry_columns
-	  WHERE f_table_schema = quote_ident(gcs.nspname)
-	  AND f_table_name = quote_ident(gcs.relname)
-	  AND f_geometry_column = quote_ident(gcs.attname);
-
-	gc_is_valid := true;
-
-	-- Try to find srid check from system tables (pg_constraint)
-	gsrid :=
-		(SELECT replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', '')
-		 FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s
-		 WHERE n.nspname = gcs.nspname
-		 AND c.relname = gcs.relname
-		 AND a.attname = gcs.attname
-		 AND a.attrelid = c.oid
-		 AND s.connamespace = n.oid
-		 AND s.conrelid = c.oid
-		 AND a.attnum = ANY (s.conkey)
-		 AND s.consrc LIKE '%srid(% = %');
-	IF (gsrid IS NULL) THEN
-		-- Try to find srid from the geometry itself
-		EXECUTE 'SELECT srid(' || quote_ident(gcs.attname) || ')
-				 FROM ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-				 WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1'
-			INTO gc;
-		gsrid := gc.srid;
-
-		-- Try to apply srid check to column
-		IF (gsrid IS NOT NULL) THEN
-			BEGIN
-				EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-						 ADD CONSTRAINT ' || quote_ident('enforce_srid_' || gcs.attname) || '
-						 CHECK (srid(' || quote_ident(gcs.attname) || ') = ' || gsrid || ')';
-			EXCEPTION
-				WHEN check_violation THEN
-					RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not apply constraint CHECK (srid(%) = %)', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname), quote_ident(gcs.attname), gsrid;
-					gc_is_valid := false;
-			END;
-		END IF;
-	END IF;
-
-	-- Try to find ndims check from system tables (pg_constraint)
-	gndims :=
-		(SELECT replace(split_part(s.consrc, ' = ', 2), ')', '')
-		 FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s
-		 WHERE n.nspname = gcs.nspname
-		 AND c.relname = gcs.relname
-		 AND a.attname = gcs.attname
-		 AND a.attrelid = c.oid
-		 AND s.connamespace = n.oid
-		 AND s.conrelid = c.oid
-		 AND a.attnum = ANY (s.conkey)
-		 AND s.consrc LIKE '%ndims(% = %');
-	IF (gndims IS NULL) THEN
-		-- Try to find ndims from the geometry itself
-		EXECUTE 'SELECT ndims(' || quote_ident(gcs.attname) || ')
-				 FROM ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-				 WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1'
-			INTO gc;
-		gndims := gc.ndims;
-
-		-- Try to apply ndims check to column
-		IF (gndims IS NOT NULL) THEN
-			BEGIN
-				EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-						 ADD CONSTRAINT ' || quote_ident('enforce_dims_' || gcs.attname) || '
-						 CHECK (ndims(' || quote_ident(gcs.attname) || ') = '||gndims||')';
-			EXCEPTION
-				WHEN check_violation THEN
-					RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not apply constraint CHECK (ndims(%) = %)', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname), quote_ident(gcs.attname), gndims;
-					gc_is_valid := false;
-			END;
-		END IF;
-	END IF;
-
-	-- Try to find geotype check from system tables (pg_constraint)
-	gtype :=
-		(SELECT replace(split_part(s.consrc, '''', 2), ')', '')
-		 FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s
-		 WHERE n.nspname = gcs.nspname
-		 AND c.relname = gcs.relname
-		 AND a.attname = gcs.attname
-		 AND a.attrelid = c.oid
-		 AND s.connamespace = n.oid
-		 AND s.conrelid = c.oid
-		 AND a.attnum = ANY (s.conkey)
-		 AND s.consrc LIKE '%geometrytype(% = %');
-	IF (gtype IS NULL) THEN
-		-- Try to find geotype from the geometry itself
-		EXECUTE 'SELECT geometrytype(' || quote_ident(gcs.attname) || ')
-				 FROM ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-				 WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1'
-			INTO gc;
-		gtype := gc.geometrytype;
-		--IF (gtype IS NULL) THEN
-		--    gtype := 'GEOMETRY';
-		--END IF;
-
-		-- Try to apply geometrytype check to column
-		IF (gtype IS NOT NULL) THEN
-			BEGIN
-				EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-				ADD CONSTRAINT ' || quote_ident('enforce_geotype_' || gcs.attname) || '
-				CHECK ((geometrytype(' || quote_ident(gcs.attname) || ') = ' || quote_literal(gtype) || ') OR (' || quote_ident(gcs.attname) || ' IS NULL))';
-			EXCEPTION
-				WHEN check_violation THEN
-					-- No geometry check can be applied. This column contains a number of geometry types.
-					RAISE WARNING 'Could not add geometry type check (%) to table column: %.%.%', gtype, quote_ident(gcs.nspname),quote_ident(gcs.relname),quote_ident(gcs.attname);
-			END;
-		END IF;
-	END IF;
-
-	IF (gsrid IS NULL) THEN
-		RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine the srid', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname);
-	ELSIF (gndims IS NULL) THEN
-		RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine the number of dimensions', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname);
-	ELSIF (gtype IS NULL) THEN
-		RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine the geometry type', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname);
-	ELSE
-		-- Only insert into geometry_columns if table constraints could be applied.
-		IF (gc_is_valid) THEN
-			INSERT INTO geometry_columns (f_table_catalog,f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, type)
-			VALUES ('', gcs.nspname, gcs.relname, gcs.attname, gndims, gsrid, gtype);
-			inserted := inserted + 1;
-		END IF;
-	END IF;
-	END LOOP;
-
-	-- Add views to geometry columns table
-	FOR gcs IN
-	SELECT n.nspname, c.relname, a.attname
-		FROM pg_class c,
-			 pg_attribute a,
-			 pg_type t,
-			 pg_namespace n
-		WHERE c.relkind = 'v'
-		AND t.typname = 'geometry'
-		AND a.attisdropped = false
-		AND a.atttypid = t.oid
-		AND a.attrelid = c.oid
-		AND c.relnamespace = n.oid
-		AND n.nspname NOT ILIKE 'pg_temp%'
-		AND c.oid = tbl_oid
-	LOOP
-		RAISE DEBUG 'Processing view %.%.%', gcs.nspname, gcs.relname, gcs.attname;
-
-		EXECUTE 'SELECT ndims(' || quote_ident(gcs.attname) || ')
-				 FROM ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-				 WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1'
-			INTO gc;
-		gndims := gc.ndims;
-
-		EXECUTE 'SELECT srid(' || quote_ident(gcs.attname) || ')
-				 FROM ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-				 WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1'
-			INTO gc;
-		gsrid := gc.srid;
-
-		EXECUTE 'SELECT geometrytype(' || quote_ident(gcs.attname) || ')
-				 FROM ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
-				 WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1'
-			INTO gc;
-		gtype := gc.geometrytype;
-
-		IF (gndims IS NULL) THEN
-			RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine ndims', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname);
-		ELSIF (gsrid IS NULL) THEN
-			RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine srid', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname);
-		ELSIF (gtype IS NULL) THEN
-			RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine gtype', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname);
-		ELSE
-			query := 'INSERT INTO geometry_columns (f_table_catalog,f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, type) ' ||
-					 'VALUES ('''', ' || quote_literal(gcs.nspname) || ',' || quote_literal(gcs.relname) || ',' || quote_literal(gcs.attname) || ',' || gndims || ',' || gsrid || ',' || quote_literal(gtype) || ')';
-			EXECUTE query;
-			inserted := inserted + 1;
-		END IF;
-	END LOOP;
-
-	RETURN inserted;
-END
-
-$$
-LANGUAGE 'plpgsql' VOLATILE;
-
-
------------------------------------------------------------------------
--- PROBE_GEOMETRY_COLUMNS()
------------------------------------------------------------------------
--- Fill the geometry_columns table with values probed from the system
--- catalogues. This is done by simply looking up constraints previously
--- added to a geometry column. If geometry constraints are missing, no
--- attempt is made to add the necessary constraints to the geometry
--- column, nor is it recorded in the geometry_columns table.
--- 3d flag cannot be probed, it defaults to 2
---
--- Note that bogus records already in geometry_columns are not
--- overridden (a check for schema.table.column is performed), so
--- to have a fresh probe backup your geometry_columns, delete from
--- it and probe.
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION probe_geometry_columns() RETURNS text AS
-$$
-DECLARE
-	inserted integer;
-	oldcount integer;
-	probed integer;
-	stale integer;
-BEGIN
-
-	SELECT count(*) INTO oldcount FROM geometry_columns;
-
-	SELECT count(*) INTO probed
-		FROM pg_class c, pg_attribute a, pg_type t,
-			pg_namespace n,
-			pg_constraint sridcheck, pg_constraint typecheck
-
-		WHERE t.typname = 'geometry'
-		AND a.atttypid = t.oid
-		AND a.attrelid = c.oid
-		AND c.relnamespace = n.oid
-		AND sridcheck.connamespace = n.oid
-		AND typecheck.connamespace = n.oid
-		AND sridcheck.conrelid = c.oid
-		AND sridcheck.consrc LIKE '(srid('||a.attname||') = %)'
-		AND typecheck.conrelid = c.oid
-		AND typecheck.consrc LIKE
-		'((geometrytype('||a.attname||') = ''%''::text) OR (% IS NULL))'
-		;
-
-	INSERT INTO geometry_columns SELECT
-		''::varchar as f_table_catalogue,
-		n.nspname::varchar as f_table_schema,
-		c.relname::varchar as f_table_name,
-		a.attname::varchar as f_geometry_column,
-		2 as coord_dimension,
-		trim(both  ' =)' from
-			replace(replace(split_part(
-				sridcheck.consrc, ' = ', 2), ')', ''), '(', ''))::integer AS srid,
-		trim(both ' =)''' from substr(typecheck.consrc,
-			strpos(typecheck.consrc, '='),
-			strpos(typecheck.consrc, '::')-
-			strpos(typecheck.consrc, '=')
-			))::varchar as type
-		FROM pg_class c, pg_attribute a, pg_type t,
-			pg_namespace n,
-			pg_constraint sridcheck, pg_constraint typecheck
-		WHERE t.typname = 'geometry'
-		AND a.atttypid = t.oid
-		AND a.attrelid = c.oid
-		AND c.relnamespace = n.oid
-		AND sridcheck.connamespace = n.oid
-		AND typecheck.connamespace = n.oid
-		AND sridcheck.conrelid = c.oid
-		AND sridcheck.consrc LIKE '(st_srid('||a.attname||') = %)'
-		AND typecheck.conrelid = c.oid
-		AND typecheck.consrc LIKE
-		'((geometrytype('||a.attname||') = ''%''::text) OR (% IS NULL))'
-
-			AND NOT EXISTS (
-					SELECT oid FROM geometry_columns gc
-					WHERE c.relname::varchar = gc.f_table_name
-					AND n.nspname::varchar = gc.f_table_schema
-					AND a.attname::varchar = gc.f_geometry_column
-			);
-
-	GET DIAGNOSTICS inserted = ROW_COUNT;
-
-	IF oldcount > probed THEN
-		stale = oldcount-probed;
-	ELSE
-		stale = 0;
-	END IF;
-
-	RETURN 'probed:'||probed::text||
-		' inserted:'||inserted::text||
-		' conflicts:'||(probed-inserted)::text||
-		' stale:'||stale::text;
-END
-
-$$
-LANGUAGE 'plpgsql' VOLATILE;
-
------------------------------------------------------------------------
--- ADDGEOMETRYCOLUMN
---   <catalogue>, <schema>, <table>, <column>, <srid>, <type>, <dim>
------------------------------------------------------------------------
---
--- Type can be one of GEOMETRY, GEOMETRYCOLLECTION, POINT, MULTIPOINT, POLYGON,
--- MULTIPOLYGON, LINESTRING, or MULTILINESTRING.
---
--- Geometry types (except GEOMETRY) are checked for consistency using a CHECK constraint.
--- Uses an ALTER TABLE command to add the geometry column to the table.
--- Addes a row to geometry_columns.
--- Addes a constraint on the table that all the geometries MUST have the same
--- SRID. Checks the coord_dimension to make sure its between 0 and 3.
--- Should also check the precision grid (future expansion).
---
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION AddGeometryColumn(varchar,varchar,varchar,varchar,integer,varchar,integer)
-	RETURNS text
-	AS
-$$
-DECLARE
-	catalog_name alias for $1;
-	schema_name alias for $2;
-	table_name alias for $3;
-	column_name alias for $4;
-	new_srid alias for $5;
-	new_type alias for $6;
-	new_dim alias for $7;
-	rec RECORD;
-	sr varchar;
-	real_schema name;
-	sql text;
-
-BEGIN
-
-	-- Verify geometry type
-	IF ( NOT ( (new_type = 'GEOMETRY') OR
-			   (new_type = 'GEOMETRYCOLLECTION') OR
-			   (new_type = 'POINT') OR
-			   (new_type = 'MULTIPOINT') OR
-			   (new_type = 'POLYGON') OR
-			   (new_type = 'MULTIPOLYGON') OR
-			   (new_type = 'LINESTRING') OR
-			   (new_type = 'MULTILINESTRING') OR
-			   (new_type = 'GEOMETRYCOLLECTIONM') OR
-			   (new_type = 'POINTM') OR
-			   (new_type = 'MULTIPOINTM') OR
-			   (new_type = 'POLYGONM') OR
-			   (new_type = 'MULTIPOLYGONM') OR
-			   (new_type = 'LINESTRINGM') OR
-			   (new_type = 'MULTILINESTRINGM') OR
-			   (new_type = 'CIRCULARSTRING') OR
-			   (new_type = 'CIRCULARSTRINGM') OR
-			   (new_type = 'COMPOUNDCURVE') OR
-			   (new_type = 'COMPOUNDCURVEM') OR
-			   (new_type = 'CURVEPOLYGON') OR
-			   (new_type = 'CURVEPOLYGONM') OR
-			   (new_type = 'MULTICURVE') OR
-			   (new_type = 'MULTICURVEM') OR
-			   (new_type = 'MULTISURFACE') OR
-			   (new_type = 'MULTISURFACEM')) )
-	THEN
-		RAISE EXCEPTION 'Invalid type name - valid ones are:
-	POINT, MULTIPOINT,
-	LINESTRING, MULTILINESTRING,
-	POLYGON, MULTIPOLYGON,
-	CIRCULARSTRING, COMPOUNDCURVE, MULTICURVE,
-	CURVEPOLYGON, MULTISURFACE,
-	GEOMETRY, GEOMETRYCOLLECTION,
-	POINTM, MULTIPOINTM,
-	LINESTRINGM, MULTILINESTRINGM,
-	POLYGONM, MULTIPOLYGONM,
-	CIRCULARSTRINGM, COMPOUNDCURVEM, MULTICURVEM
-	CURVEPOLYGONM, MULTISURFACEM,
-	or GEOMETRYCOLLECTIONM';
-		RETURN 'fail';
-	END IF;
-
-
-	-- Verify dimension
-	IF ( (new_dim >4) OR (new_dim <0) ) THEN
-		RAISE EXCEPTION 'invalid dimension';
-		RETURN 'fail';
-	END IF;
-
-	IF ( (new_type LIKE '%M') AND (new_dim!=3) ) THEN
-		RAISE EXCEPTION 'TypeM needs 3 dimensions';
-		RETURN 'fail';
-	END IF;
-
-
-	-- Verify SRID
-	IF ( new_srid != -1 ) THEN
-		SELECT SRID INTO sr FROM spatial_ref_sys WHERE SRID = new_srid;
-		IF NOT FOUND THEN
-			RAISE EXCEPTION 'AddGeometryColumns() - invalid SRID';
-			RETURN 'fail';
-		END IF;
-	END IF;
-
-
-	-- Verify schema
-	IF ( schema_name IS NOT NULL AND schema_name != '' ) THEN
-		sql := 'SELECT nspname FROM pg_namespace ' ||
-			'WHERE text(nspname) = ' || quote_literal(schema_name) ||
-			'LIMIT 1';
-		RAISE DEBUG '%', sql;
-		EXECUTE sql INTO real_schema;
-
-		IF ( real_schema IS NULL ) THEN
-			RAISE EXCEPTION 'Schema % is not a valid schemaname', quote_literal(schema_name);
-			RETURN 'fail';
-		END IF;
-	END IF;
-
-	IF ( real_schema IS NULL ) THEN
-		RAISE DEBUG 'Detecting schema';
-		sql := 'SELECT n.nspname AS schemaname ' ||
-			'FROM pg_catalog.pg_class c ' ||
-			  'JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace ' ||
-			'WHERE c.relkind = ' || quote_literal('r') ||
-			' AND n.nspname NOT IN (' || quote_literal('pg_catalog') || ', ' || quote_literal('pg_toast') || ')' ||
-			' AND pg_catalog.pg_table_is_visible(c.oid)' ||
-			' AND c.relname = ' || quote_literal(table_name);
-		RAISE DEBUG '%', sql;
-		EXECUTE sql INTO real_schema;
-
-		IF ( real_schema IS NULL ) THEN
-			RAISE EXCEPTION 'Table % does not occur in the search_path', quote_literal(table_name);
-			RETURN 'fail';
-		END IF;
-	END IF;
-
-
-	-- Add geometry column to table
-	sql := 'ALTER TABLE ' ||
-		quote_ident(real_schema) || '.' || quote_ident(table_name)
-		|| ' ADD COLUMN ' || quote_ident(column_name) ||
-		' geometry ';
-	RAISE DEBUG '%', sql;
-	EXECUTE sql;
-
-
-	-- Delete stale record in geometry_columns (if any)
-	sql := 'DELETE FROM geometry_columns WHERE
-		f_table_catalog = ' || quote_literal('') ||
-		' AND f_table_schema = ' ||
-		quote_literal(real_schema) ||
-		' AND f_table_name = ' || quote_literal(table_name) ||
-		' AND f_geometry_column = ' || quote_literal(column_name);
-	RAISE DEBUG '%', sql;
-	EXECUTE sql;
-
-
-	-- Add record in geometry_columns
-	sql := 'INSERT INTO geometry_columns (f_table_catalog,f_table_schema,f_table_name,' ||
-										  'f_geometry_column,coord_dimension,srid,type)' ||
-		' VALUES (' ||
-		quote_literal('') || ',' ||
-		quote_literal(real_schema) || ',' ||
-		quote_literal(table_name) || ',' ||
-		quote_literal(column_name) || ',' ||
-		new_dim::text || ',' ||
-		new_srid::text || ',' ||
-		quote_literal(new_type) || ')';
-	RAISE DEBUG '%', sql;
-	EXECUTE sql;
-
-
-	-- Add table CHECKs
-	sql := 'ALTER TABLE ' ||
-		quote_ident(real_schema) || '.' || quote_ident(table_name)
-		|| ' ADD CONSTRAINT '
-		|| quote_ident('enforce_srid_' || column_name)
-		|| ' CHECK (ST_SRID(' || quote_ident(column_name) ||
-		') = ' || new_srid::text || ')' ;
-	RAISE DEBUG '%', sql;
-	EXECUTE sql;
-
-	sql := 'ALTER TABLE ' ||
-		quote_ident(real_schema) || '.' || quote_ident(table_name)
-		|| ' ADD CONSTRAINT '
-		|| quote_ident('enforce_dims_' || column_name)
-		|| ' CHECK (ST_NDims(' || quote_ident(column_name) ||
-		') = ' || new_dim::text || ')' ;
-	RAISE DEBUG '%', sql;
-	EXECUTE sql;
-
-	IF ( NOT (new_type = 'GEOMETRY')) THEN
-		sql := 'ALTER TABLE ' ||
-			quote_ident(real_schema) || '.' || quote_ident(table_name) || ' ADD CONSTRAINT ' ||
-			quote_ident('enforce_geotype_' || column_name) ||
-			' CHECK (GeometryType(' ||
-			quote_ident(column_name) || ')=' ||
-			quote_literal(new_type) || ' OR (' ||
-			quote_ident(column_name) || ') is null)';
-		RAISE DEBUG '%', sql;
-		EXECUTE sql;
-	END IF;
-
-	RETURN
-		real_schema || '.' ||
-		table_name || '.' || column_name ||
-		' SRID:' || new_srid::text ||
-		' TYPE:' || new_type ||
-		' DIMS:' || new_dim::text || ' ';
-END;
-$$
-LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-----------------------------------------------------------------------------
--- ADDGEOMETRYCOLUMN ( <schema>, <table>, <column>, <srid>, <type>, <dim> )
-----------------------------------------------------------------------------
---
--- This is a wrapper to the real AddGeometryColumn, for use
--- when catalogue is undefined
---
-----------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION AddGeometryColumn(varchar,varchar,varchar,integer,varchar,integer) RETURNS text AS $$
-DECLARE
-	ret  text;
-BEGIN
-	SELECT AddGeometryColumn('',$1,$2,$3,$4,$5,$6) into ret;
-	RETURN ret;
-END;
-$$
-LANGUAGE 'plpgsql' STABLE STRICT;
-
-----------------------------------------------------------------------------
--- ADDGEOMETRYCOLUMN ( <table>, <column>, <srid>, <type>, <dim> )
-----------------------------------------------------------------------------
---
--- This is a wrapper to the real AddGeometryColumn, for use
--- when catalogue and schema are undefined
---
-----------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION AddGeometryColumn(varchar,varchar,integer,varchar,integer) RETURNS text AS $$
-DECLARE
-	ret  text;
-BEGIN
-	SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5) into ret;
-	RETURN ret;
-END;
-$$
-LANGUAGE 'plpgsql' VOLATILE STRICT;
-
------------------------------------------------------------------------
--- DROPGEOMETRYCOLUMN
---   <catalogue>, <schema>, <table>, <column>
------------------------------------------------------------------------
---
--- Removes geometry column reference from geometry_columns table.
--- Drops the column with pgsql >= 73.
--- Make some silly enforcements on it for pgsql < 73
---
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION DropGeometryColumn(varchar, varchar,varchar,varchar)
-	RETURNS text
-	AS
-$$
-DECLARE
-	catalog_name alias for $1;
-	schema_name alias for $2;
-	table_name alias for $3;
-	column_name alias for $4;
-	myrec RECORD;
-	okay boolean;
-	real_schema name;
-
-BEGIN
-
-
-	-- Find, check or fix schema_name
-	IF ( schema_name != '' ) THEN
-		okay = 'f';
-
-		FOR myrec IN SELECT nspname FROM pg_namespace WHERE text(nspname) = schema_name LOOP
-			okay := 't';
-		END LOOP;
-
-		IF ( okay <> 't' ) THEN
-			RAISE NOTICE 'Invalid schema name - using current_schema()';
-			SELECT current_schema() into real_schema;
-		ELSE
-			real_schema = schema_name;
-		END IF;
-	ELSE
-		SELECT current_schema() into real_schema;
-	END IF;
-
-	-- Find out if the column is in the geometry_columns table
-	okay = 'f';
-	FOR myrec IN SELECT * from geometry_columns where f_table_schema = text(real_schema) and f_table_name = table_name and f_geometry_column = column_name LOOP
-		okay := 't';
-	END LOOP;
-	IF (okay <> 't') THEN
-		RAISE EXCEPTION 'column not found in geometry_columns table';
-		RETURN 'f';
-	END IF;
-
-	-- Remove ref from geometry_columns table
-	EXECUTE 'delete from geometry_columns where f_table_schema = ' ||
-		quote_literal(real_schema) || ' and f_table_name = ' ||
-		quote_literal(table_name)  || ' and f_geometry_column = ' ||
-		quote_literal(column_name);
-
-	-- Remove table column
-	EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) || '.' ||
-		quote_ident(table_name) || ' DROP COLUMN ' ||
-		quote_ident(column_name);
-
-	RETURN real_schema || '.' || table_name || '.' || column_name ||' effectively removed.';
-
-END;
-$$
-LANGUAGE 'plpgsql' VOLATILE STRICT;
-
------------------------------------------------------------------------
--- DROPGEOMETRYCOLUMN
---   <schema>, <table>, <column>
------------------------------------------------------------------------
---
--- This is a wrapper to the real DropGeometryColumn, for use
--- when catalogue is undefined
---
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION DropGeometryColumn(varchar,varchar,varchar)
-	RETURNS text
-	AS
-$$
-DECLARE
-	ret text;
-BEGIN
-	SELECT DropGeometryColumn('',$1,$2,$3) into ret;
-	RETURN ret;
-END;
-$$
-LANGUAGE 'plpgsql' VOLATILE STRICT;
-
------------------------------------------------------------------------
--- DROPGEOMETRYCOLUMN
---   <table>, <column>
------------------------------------------------------------------------
---
--- This is a wrapper to the real DropGeometryColumn, for use
--- when catalogue and schema is undefined.
---
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION DropGeometryColumn(varchar,varchar)
-	RETURNS text
-	AS
-$$
-DECLARE
-	ret text;
-BEGIN
-	SELECT DropGeometryColumn('','',$1,$2) into ret;
-	RETURN ret;
-END;
-$$
-LANGUAGE 'plpgsql' VOLATILE STRICT;
-
------------------------------------------------------------------------
--- DROPGEOMETRYTABLE
---   <catalogue>, <schema>, <table>
------------------------------------------------------------------------
---
--- Drop a table and all its references in geometry_columns
---
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION DropGeometryTable(varchar, varchar,varchar)
-	RETURNS text
-	AS
-$$
-DECLARE
-	catalog_name alias for $1;
-	schema_name alias for $2;
-	table_name alias for $3;
-	real_schema name;
-
-BEGIN
-
-	IF ( schema_name = '' ) THEN
-		SELECT current_schema() into real_schema;
-	ELSE
-		real_schema = schema_name;
-	END IF;
-
-	-- Remove refs from geometry_columns table
-	EXECUTE 'DELETE FROM geometry_columns WHERE ' ||
-		'f_table_schema = ' || quote_literal(real_schema) ||
-		' AND ' ||
-		' f_table_name = ' || quote_literal(table_name);
-
-	-- Remove table
-	EXECUTE 'DROP TABLE '
-		|| quote_ident(real_schema) || '.' ||
-		quote_ident(table_name);
-
-	RETURN
-		real_schema || '.' ||
-		table_name ||' dropped.';
-
-END;
-$$
-LANGUAGE 'plpgsql' VOLATILE STRICT;
-
------------------------------------------------------------------------
--- DROPGEOMETRYTABLE
---   <schema>, <table>
------------------------------------------------------------------------
---
--- Drop a table and all its references in geometry_columns
---
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION DropGeometryTable(varchar,varchar) RETURNS text AS
-$$ SELECT DropGeometryTable('',$1,$2) $$
-LANGUAGE 'sql' WITH (isstrict);
-
------------------------------------------------------------------------
--- DROPGEOMETRYTABLE
---   <table>
------------------------------------------------------------------------
---
--- Drop a table and all its references in geometry_columns
--- For PG>=73 use current_schema()
---
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION DropGeometryTable(varchar) RETURNS text AS
-$$ SELECT DropGeometryTable('','',$1) $$
-LANGUAGE 'sql' VOLATILE STRICT;
-
------------------------------------------------------------------------
--- UPDATEGEOMETRYSRID
---   <catalogue>, <schema>, <table>, <column>, <srid>
------------------------------------------------------------------------
---
--- Change SRID of all features in a spatially-enabled table
---
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION UpdateGeometrySRID(varchar,varchar,varchar,varchar,integer)
-	RETURNS text
-	AS
-$$
-DECLARE
-	catalog_name alias for $1;
-	schema_name alias for $2;
-	table_name alias for $3;
-	column_name alias for $4;
-	new_srid alias for $5;
-	myrec RECORD;
-	okay boolean;
-	cname varchar;
-	real_schema name;
-
-BEGIN
-
-
-	-- Find, check or fix schema_name
-	IF ( schema_name != '' ) THEN
-		okay = 'f';
-
-		FOR myrec IN SELECT nspname FROM pg_namespace WHERE text(nspname) = schema_name LOOP
-			okay := 't';
-		END LOOP;
-
-		IF ( okay <> 't' ) THEN
-			RAISE EXCEPTION 'Invalid schema name';
-		ELSE
-			real_schema = schema_name;
-		END IF;
-	ELSE
-		SELECT INTO real_schema current_schema()::text;
-	END IF;
-
-	-- Find out if the column is in the geometry_columns table
-	okay = 'f';
-	FOR myrec IN SELECT * from geometry_columns where f_table_schema = text(real_schema) and f_table_name = table_name and f_geometry_column = column_name LOOP
-		okay := 't';
-	END LOOP;
-	IF (okay <> 't') THEN
-		RAISE EXCEPTION 'column not found in geometry_columns table';
-		RETURN 'f';
-	END IF;
-
-	-- Update ref from geometry_columns table
-	EXECUTE 'UPDATE geometry_columns SET SRID = ' || new_srid::text ||
-		' where f_table_schema = ' ||
-		quote_literal(real_schema) || ' and f_table_name = ' ||
-		quote_literal(table_name)  || ' and f_geometry_column = ' ||
-		quote_literal(column_name);
-
-	-- Make up constraint name
-	cname = 'enforce_srid_'  || column_name;
-
-	-- Drop enforce_srid constraint
-	EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) ||
-		'.' || quote_ident(table_name) ||
-		' DROP constraint ' || quote_ident(cname);
-
-	-- Update geometries SRID
-	EXECUTE 'UPDATE ' || quote_ident(real_schema) ||
-		'.' || quote_ident(table_name) ||
-		' SET ' || quote_ident(column_name) ||
-		' = setSRID(' || quote_ident(column_name) ||
-		', ' || new_srid::text || ')';
-
-	-- Reset enforce_srid constraint
-	EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) ||
-		'.' || quote_ident(table_name) ||
-		' ADD constraint ' || quote_ident(cname) ||
-		' CHECK (srid(' || quote_ident(column_name) ||
-		') = ' || new_srid::text || ')';
-
-	RETURN real_schema || '.' || table_name || '.' || column_name ||' SRID changed to ' || new_srid::text;
-
-END;
-$$
-LANGUAGE 'plpgsql' VOLATILE STRICT;
-
------------------------------------------------------------------------
--- UPDATEGEOMETRYSRID
---   <schema>, <table>, <column>, <srid>
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION UpdateGeometrySRID(varchar,varchar,varchar,integer)
-	RETURNS text
-	AS $$
-DECLARE
-	ret  text;
-BEGIN
-	SELECT UpdateGeometrySRID('',$1,$2,$3,$4) into ret;
-	RETURN ret;
-END;
-$$
-LANGUAGE 'plpgsql' VOLATILE STRICT;
-
------------------------------------------------------------------------
--- UPDATEGEOMETRYSRID
---   <table>, <column>, <srid>
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION UpdateGeometrySRID(varchar,varchar,integer)
-	RETURNS text
-	AS $$
-DECLARE
-	ret  text;
-BEGIN
-	SELECT UpdateGeometrySRID('','',$1,$2,$3) into ret;
-	RETURN ret;
-END;
-$$
-LANGUAGE 'plpgsql' VOLATILE STRICT;
-
------------------------------------------------------------------------
--- FIND_SRID( <schema>, <table>, <geom col> )
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION find_srid(varchar,varchar,varchar) RETURNS int4 AS
-$$
-DECLARE
-	schem text;
-	tabl text;
-	sr int4;
-BEGIN
-	IF $1 IS NULL THEN
-	  RAISE EXCEPTION 'find_srid() - schema is NULL!';
-	END IF;
-	IF $2 IS NULL THEN
-	  RAISE EXCEPTION 'find_srid() - table name is NULL!';
-	END IF;
-	IF $3 IS NULL THEN
-	  RAISE EXCEPTION 'find_srid() - column name is NULL!';
-	END IF;
-	schem = $1;
-	tabl = $2;
--- if the table contains a . and the schema is empty
--- split the table into a schema and a table
--- otherwise drop through to default behavior
-	IF ( schem = '' and tabl LIKE '%.%' ) THEN
-	 schem = substr(tabl,1,strpos(tabl,'.')-1);
-	 tabl = substr(tabl,length(schem)+2);
-	ELSE
-	 schem = schem || '%';
-	END IF;
-
-	select SRID into sr from geometry_columns where f_table_schema like schem and f_table_name = tabl and f_geometry_column = $3;
-	IF NOT FOUND THEN
-	   RAISE EXCEPTION 'find_srid() - couldnt find the corresponding SRID - is the geometry registered in the GEOMETRY_COLUMNS table?  Is there an uppercase/lowercase missmatch?';
-	END IF;
-	return sr;
-END;
-$$
-LANGUAGE 'plpgsql' IMMUTABLE STRICT;
-
-
----------------------------------------------------------------
--- PROJ support
----------------------------------------------------------------
-
-CREATE OR REPLACE FUNCTION get_proj4_from_srid(integer) RETURNS text AS
-$$
-BEGIN
-	RETURN proj4text::text FROM spatial_ref_sys WHERE srid= $1;
-END;
-$$
-LANGUAGE 'plpgsql' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION postgis_transform_geometry(geometry,text,text,int)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','transform_geom'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION transform(geometry,integer)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','transform'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: transform(geometry,integer)
-CREATE OR REPLACE FUNCTION ST_Transform(geometry,integer)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','transform'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-
------------------------------------------------------------------------
--- POSTGIS_VERSION()
------------------------------------------------------------------------
-
-CREATE OR REPLACE FUNCTION postgis_version() RETURNS text
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION postgis_proj_version() RETURNS text
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE;
-
---
--- IMPORTANT:
--- Starting at 1.1.0 this function is used by postgis_proc_upgrade.pl
--- to extract version of postgis being installed.
--- Do not modify this w/out also changing postgis_proc_upgrade.pl
---
-CREATE OR REPLACE FUNCTION postgis_scripts_installed() RETURNS text
-	AS 'SELECT ''1.5 r5385''::text AS version'
-	LANGUAGE 'sql' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION postgis_lib_version() RETURNS text
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE; -- a new lib will require a new session
-
--- NOTE: starting at 1.1.0 this is the same of postgis_lib_version()
-CREATE OR REPLACE FUNCTION postgis_scripts_released() RETURNS text
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION postgis_uses_stats() RETURNS bool
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION postgis_geos_version() RETURNS text
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION postgis_libxml_version() RETURNS text
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION postgis_scripts_build_date() RETURNS text
-	AS 'SELECT ''2010-03-11 19:15:17''::text AS version'
-	LANGUAGE 'sql' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION postgis_lib_build_date() RETURNS text
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION postgis_full_version() RETURNS text
-AS $$
-DECLARE
-	libver text;
-	projver text;
-	geosver text;
-	libxmlver text;
-	usestats bool;
-	dbproc text;
-	relproc text;
-	fullver text;
-BEGIN
-	SELECT postgis_lib_version() INTO libver;
-	SELECT postgis_proj_version() INTO projver;
-	SELECT postgis_geos_version() INTO geosver;
-	SELECT postgis_libxml_version() INTO libxmlver;
-	SELECT postgis_uses_stats() INTO usestats;
-	SELECT postgis_scripts_installed() INTO dbproc;
-	SELECT postgis_scripts_released() INTO relproc;
-
-	fullver = 'POSTGIS="' || libver || '"';
-
-	IF  geosver IS NOT NULL THEN
-		fullver = fullver || ' GEOS="' || geosver || '"';
-	END IF;
-
-	IF  projver IS NOT NULL THEN
-		fullver = fullver || ' PROJ="' || projver || '"';
-	END IF;
-
-	IF  libxmlver IS NOT NULL THEN
-		fullver = fullver || ' LIBXML="' || libxmlver || '"';
-	END IF;
-
-	IF usestats THEN
-		fullver = fullver || ' USE_STATS';
-	END IF;
-
-	-- fullver = fullver || ' DBPROC="' || dbproc || '"';
-	-- fullver = fullver || ' RELPROC="' || relproc || '"';
-
-	IF dbproc != relproc THEN
-		fullver = fullver || ' (procs from ' || dbproc || ' need upgrade)';
-	END IF;
-
-	RETURN fullver;
-END
-$$
-LANGUAGE 'plpgsql' IMMUTABLE;
-
----------------------------------------------------------------
--- CASTS
----------------------------------------------------------------
-
--- Legacy ST_ variants of casts, to be removed in 2.0
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_box2d(geometry)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5','LWGEOM_to_BOX2DFLOAT4'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_box3d(geometry)
-	RETURNS box3d
-	AS '$libdir/postgis-1.5','LWGEOM_to_BOX3D'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_box(geometry)
-	RETURNS box
-	AS '$libdir/postgis-1.5','LWGEOM_to_BOX'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_box2d(box3d)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5','BOX3D_to_BOX2DFLOAT4'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_box3d(box2d)
-	RETURNS box3d
-	AS '$libdir/postgis-1.5','BOX2DFLOAT4_to_BOX3D'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_box(box3d)
-	RETURNS box
-	AS '$libdir/postgis-1.5','BOX3D_to_BOX'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_text(geometry)
-	RETURNS text
-	AS '$libdir/postgis-1.5','LWGEOM_to_text'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry(box2d)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','BOX2DFLOAT4_to_LWGEOM'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry(box3d)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','BOX3D_to_LWGEOM'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry(text)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','parse_WKT_lwgeom'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry(chip)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','CHIP_to_LWGEOM'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry(bytea)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_from_bytea'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_bytea(geometry)
-	RETURNS bytea
-	AS '$libdir/postgis-1.5','LWGEOM_to_bytea'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_box3d_extent(box3d_extent)
-	RETURNS box3d
-	AS '$libdir/postgis-1.5', 'BOX3D_extent_to_BOX3D'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_box2d(box3d_extent)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5', 'BOX3D_to_BOX2DFLOAT4'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.5.0
-CREATE OR REPLACE FUNCTION st_geometry(box3d_extent)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','BOX3D_to_LWGEOM'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-	
--- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 	
-		
-CREATE OR REPLACE FUNCTION box2d(geometry)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5','LWGEOM_to_BOX2DFLOAT4'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION box3d(geometry)
-	RETURNS box3d
-	AS '$libdir/postgis-1.5','LWGEOM_to_BOX3D'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION box(geometry)
-	RETURNS box
-	AS '$libdir/postgis-1.5','LWGEOM_to_BOX'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION box2d(box3d)
-	RETURNS box2d
-	AS '$libdir/postgis-1.5','BOX3D_to_BOX2DFLOAT4'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION box3d(box2d)
-	RETURNS box3d
-	AS '$libdir/postgis-1.5','BOX2DFLOAT4_to_BOX3D'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION box(box3d)
-	RETURNS box
-	AS '$libdir/postgis-1.5','BOX3D_to_BOX'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION text(geometry)
-	RETURNS text
-	AS '$libdir/postgis-1.5','LWGEOM_to_text'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- this is kept for backward-compatibility
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION box3dtobox(box3d)
-	RETURNS box
-	AS 'SELECT box($1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry(box2d)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','BOX2DFLOAT4_to_LWGEOM'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry(box3d)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','BOX3D_to_LWGEOM'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry(text)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','parse_WKT_lwgeom'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry(chip)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','CHIP_to_LWGEOM'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geometry(bytea)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_from_bytea'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION bytea(geometry)
-	RETURNS bytea
-	AS '$libdir/postgis-1.5','LWGEOM_to_bytea'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- 7.3+ explicit casting definitions
-CREATE CAST (geometry AS box2d) WITH FUNCTION box2d(geometry) AS IMPLICIT;
-CREATE CAST (geometry AS box3d) WITH FUNCTION box3d(geometry) AS IMPLICIT;
-CREATE CAST (geometry AS box) WITH FUNCTION box(geometry) AS IMPLICIT;
-CREATE CAST (box3d AS box2d) WITH FUNCTION box2d(box3d) AS IMPLICIT;
-CREATE CAST (box2d AS box3d) WITH FUNCTION box3d(box2d) AS IMPLICIT;
-CREATE CAST (box2d AS geometry) WITH FUNCTION geometry(box2d) AS IMPLICIT;
-CREATE CAST (box3d AS box) WITH FUNCTION box(box3d) AS IMPLICIT;
-CREATE CAST (box3d AS geometry) WITH FUNCTION geometry(box3d) AS IMPLICIT;
-CREATE CAST (text AS geometry) WITH FUNCTION geometry(text) AS IMPLICIT;
-CREATE CAST (geometry AS text) WITH FUNCTION text(geometry) AS IMPLICIT;
-CREATE CAST (chip AS geometry) WITH FUNCTION geometry(chip) AS IMPLICIT;
-CREATE CAST (bytea AS geometry) WITH FUNCTION geometry(bytea) AS IMPLICIT;
-CREATE CAST (geometry AS bytea) WITH FUNCTION bytea(geometry) AS IMPLICIT;
-
--- Casts to allow the box3d_extent type to automatically cast to box3d/box2d in queries
-CREATE CAST (box3d_extent AS box3d) WITH FUNCTION box3d_extent(box3d_extent) AS IMPLICIT;
-CREATE CAST (box3d_extent AS box2d) WITH FUNCTION box2d(box3d_extent) AS IMPLICIT;
-CREATE CAST (box3d_extent AS geometry) WITH FUNCTION geometry(box3d_extent) AS IMPLICIT;
-
----------------------------------------------------------------
--- Algorithms
----------------------------------------------------------------
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Simplify(geometry, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_simplify2d'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Simplify(geometry, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_simplify2d'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- SnapToGrid(input, xoff, yoff, xsize, ysize)
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION SnapToGrid(geometry, float8, float8, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_snaptogrid'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_SnapToGrid(geometry, float8, float8, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_snaptogrid'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- SnapToGrid(input, xsize, ysize) # offsets=0
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION SnapToGrid(geometry, float8, float8)
-	RETURNS geometry
-	AS 'SELECT SnapToGrid($1, 0, 0, $2, $3)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_SnapToGrid(geometry, float8, float8)
-	RETURNS geometry
-	AS 'SELECT ST_SnapToGrid($1, 0, 0, $2, $3)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- SnapToGrid(input, size) # xsize=ysize=size, offsets=0
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION SnapToGrid(geometry, float8)
-	RETURNS geometry
-	AS 'SELECT SnapToGrid($1, 0, 0, $2, $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_SnapToGrid(geometry, float8)
-	RETURNS geometry
-	AS 'SELECT ST_SnapToGrid($1, 0, 0, $2, $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- SnapToGrid(input, point_offsets, xsize, ysize, zsize, msize)
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION SnapToGrid(geometry, geometry, float8, float8, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_snaptogrid_pointoff'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_SnapToGrid(geometry, geometry, float8, float8, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_snaptogrid_pointoff'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Segmentize(geometry, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_segmentize2d'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Segmentize(geometry, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_segmentize2d'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
----------------------------------------------------------------
--- LRS
----------------------------------------------------------------
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION line_interpolate_point(geometry, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_line_interpolate_point'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_line_interpolate_point(geometry, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_line_interpolate_point'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION line_substring(geometry, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_line_substring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_line_substring(geometry, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_line_substring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION line_locate_point(geometry, geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'LWGEOM_line_locate_point'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_line_locate_point(geometry, geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'LWGEOM_line_locate_point'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION locate_between_measures(geometry, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_locate_between_m'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_locate_between_measures(geometry, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_locate_between_m'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION locate_along_measure(geometry, float8)
-	RETURNS geometry
-	AS $$ SELECT locate_between_measures($1, $2, $2) $$
-	LANGUAGE 'sql' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_locate_along_measure(geometry, float8)
-	RETURNS geometry
-	AS $$ SELECT locate_between_measures($1, $2, $2) $$
-	LANGUAGE 'sql' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_AddMeasure(geometry, float8, float8) 
-	RETURNS geometry 
-	AS '$libdir/postgis-1.5', 'ST_AddMeasure' 
-	LANGUAGE 'C' IMMUTABLE STRICT;
-    
----------------------------------------------------------------
--- GEOS
----------------------------------------------------------------
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION intersection(geometry,geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','intersection'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: intersection(geometry,geometry)
-CREATE OR REPLACE FUNCTION ST_Intersection(geometry,geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','intersection'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION buffer(geometry,float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','buffer'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- PostGIS equivalent function: buffer(geometry,float8)
-CREATE OR REPLACE FUNCTION ST_Buffer(geometry,float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','buffer'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.5.0 - requires GEOS-3.2 or higher
-CREATE OR REPLACE FUNCTION _ST_Buffer(geometry,float8,cstring)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','buffer'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Buffer(geometry,float8,integer)
-	RETURNS geometry
-	AS $$ SELECT _ST_Buffer($1, $2,
-		CAST('quad_segs='||CAST($3 AS text) as cstring))
-	   $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_buffer(geometry,float8,text)
-	RETURNS geometry
-	AS $$ SELECT _ST_Buffer($1, $2,
-		CAST( regexp_replace($3, '^[0123456789]+$',
-			'quad_segs='||$3) AS cstring)
-		)
-	   $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION buffer(geometry,float8,integer)
-	RETURNS geometry
-	AS 'SELECT ST_Buffer($1, $2, $3)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION convexhull(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','convexhull'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- PostGIS equivalent function: convexhull(geometry)
-CREATE OR REPLACE FUNCTION ST_ConvexHull(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','convexhull'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Only accepts LINESTRING as parameters.
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION _ST_LineCrossingDirection(geometry, geometry)
-	RETURNS integer
-	AS '$libdir/postgis-1.5', 'ST_LineCrossingDirection'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION ST_LineCrossingDirection(geometry, geometry)
-	RETURNS integer AS
-	$$ SELECT CASE WHEN NOT $1 && $2 THEN 0 ELSE _ST_LineCrossingDirection($1,$2) END $$
-	LANGUAGE 'sql' IMMUTABLE;
-
-
--- Only accepts LINESTRING as parameters.
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION ST_LocateBetweenElevations(geometry, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'ST_LocateBetweenElevations'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Requires GEOS >= 3.0.0
--- Availability: 1.3.3
-CREATE OR REPLACE FUNCTION ST_SimplifyPreserveTopology(geometry, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','topologypreservesimplify'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Requires GEOS >= 3.1.0
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION ST_IsValidReason(geometry)
-	RETURNS text
-	AS '$libdir/postgis-1.5', 'isvalidreason'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
-
--- Requires GEOS >= 3.2.0
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_HausdorffDistance(geometry, geometry)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'hausdorffdistance'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
-
-
--- Requires GEOS >= 3.2.0
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_HausdorffDistance(geometry, geometry, float8)
-	RETURNS FLOAT8
-	AS '$libdir/postgis-1.5', 'hausdorffdistancedensify'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION difference(geometry,geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','difference'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: difference(geometry,geometry)
-CREATE OR REPLACE FUNCTION ST_Difference(geometry,geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','difference'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION boundary(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','boundary'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: boundary(geometry)
-CREATE OR REPLACE FUNCTION ST_Boundary(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','boundary'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION symdifference(geometry,geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','symdifference'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: symdifference(geometry,geometry)
-CREATE OR REPLACE FUNCTION ST_SymDifference(geometry,geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','symdifference'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION symmetricdifference(geometry,geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','symdifference'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_symmetricdifference(geometry,geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','symdifference'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeomUnion(geometry,geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','geomunion'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: GeomUnion(geometry,geometry)
-CREATE OR REPLACE FUNCTION ST_Union(geometry,geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','geomunion'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
---------------------------------------------------------------------------------
--- Aggregates and their supporting functions
---------------------------------------------------------------------------------
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION collect(geometry, geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_collect'
-	LANGUAGE 'C' IMMUTABLE;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_collect(geometry, geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_collect'
-	LANGUAGE 'C' IMMUTABLE;
-
--- Deprecation in 1.2.3
-CREATE AGGREGATE memcollect(
-	sfunc = ST_collect,
-	basetype = geometry,
-	stype = geometry
-	);
-
--- Availability: 1.2.2
-CREATE AGGREGATE ST_memcollect(
-	sfunc = ST_collect,
-	basetype = geometry,
-	stype = geometry
-	);
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_collect (geometry[])
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_collect_garray'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE AGGREGATE MemGeomUnion (
-	basetype = geometry,
-	sfunc = geomunion,
-	stype = geometry
-	);
-
--- Availability: 1.2.2
-CREATE AGGREGATE ST_MemUnion (
-	basetype = geometry,
-	sfunc = ST_Union,
-	stype = geometry
-	);
-
---
--- pgis_abs
--- Container type to hold the ArrayBuildState pointer as it passes through
--- the geometry array accumulation aggregate.
---
-CREATE OR REPLACE FUNCTION pgis_abs_in(cstring)
-	RETURNS pgis_abs
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION pgis_abs_out(pgis_abs)
-	RETURNS cstring
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE TYPE pgis_abs (
-	internallength = 8,
-	input = pgis_abs_in,
-	output = pgis_abs_out,
-	alignment = double
-);
-
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION pgis_geometry_accum_transfn(pgis_abs, geometry)
-	RETURNS pgis_abs
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C';
-
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION pgis_geometry_accum_finalfn(pgis_abs)
-	RETURNS geometry[]
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C';
-
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION pgis_geometry_union_finalfn(pgis_abs)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C';
-
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION pgis_geometry_collect_finalfn(pgis_abs)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C';
-
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION pgis_geometry_polygonize_finalfn(pgis_abs)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C';
-
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION pgis_geometry_makeline_finalfn(pgis_abs)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C';
-
--- Deprecation in: 1.2.3
-CREATE AGGREGATE accum (
-	sfunc = pgis_geometry_accum_transfn,
-	basetype = geometry,
-	stype = pgis_abs,
-	finalfunc = pgis_geometry_accum_finalfn
-	);
-
--- Availability: 1.2.2
-CREATE AGGREGATE ST_Accum (
-	sfunc = pgis_geometry_accum_transfn,
-	basetype = geometry,
-	stype = pgis_abs,
-	finalfunc = pgis_geometry_accum_finalfn
-	);
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION unite_garray (geometry[])
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'pgis_union_geometry_array'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.4.0
-CREATE OR REPLACE FUNCTION ST_unite_garray (geometry[])
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','pgis_union_geometry_array'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION ST_Union (geometry[])
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','pgis_union_geometry_array'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE AGGREGATE ST_Union (
-	basetype = geometry,
-	sfunc = pgis_geometry_accum_transfn,
-	stype = pgis_abs,
-	finalfunc = pgis_geometry_union_finalfn
-	);
-
--- Deprecation in 1.2.3
-CREATE AGGREGATE collect (
-	basetype = geometry,
-	sfunc = pgis_geometry_accum_transfn,
-	stype = pgis_abs,
-	finalfunc = pgis_geometry_collect_finalfn
-);
-
--- Availability: 1.2.2
-CREATE AGGREGATE ST_Collect (
-	BASETYPE = geometry,
-	SFUNC = pgis_geometry_accum_transfn,
-	STYPE = pgis_abs,
-	FINALFUNC = pgis_geometry_collect_finalfn
-	);
-
--- Deprecation in 1.2.3
-CREATE AGGREGATE Polygonize (
-	BASETYPE = geometry,
-	SFUNC = pgis_geometry_accum_transfn,
-	STYPE = pgis_abs,
-	FINALFUNC = pgis_geometry_polygonize_finalfn
-	);
-
--- Availability: 1.2.2
-CREATE AGGREGATE ST_Polygonize (
-	BASETYPE = geometry,
-	SFUNC = pgis_geometry_accum_transfn,
-	STYPE = pgis_abs,
-	FINALFUNC = pgis_geometry_polygonize_finalfn
-	);
-
--- Deprecation in 1.2.3
-CREATE AGGREGATE makeline (
-	BASETYPE = geometry,
-	SFUNC = pgis_geometry_accum_transfn,
-	STYPE = pgis_abs,
-	FINALFUNC = pgis_geometry_makeline_finalfn
-	);
-
--- Availability: 1.2.2
-CREATE AGGREGATE ST_MakeLine (
-	BASETYPE = geometry,
-	SFUNC = pgis_geometry_accum_transfn,
-	STYPE = pgis_abs,
-	FINALFUNC = pgis_geometry_makeline_finalfn
-	);
-
-
-
---------------------------------------------------------------------------------
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION relate(geometry,geometry)
-	RETURNS text
-	AS '$libdir/postgis-1.5','relate_full'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_relate(geometry,geometry)
-	RETURNS text
-	AS '$libdir/postgis-1.5','relate_full'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION relate(geometry,geometry,text)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5','relate_pattern'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: relate(geometry,geometry,text)
-CREATE OR REPLACE FUNCTION ST_Relate(geometry,geometry,text)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5','relate_pattern'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION disjoint(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: disjoint(geometry,geometry)
-CREATE OR REPLACE FUNCTION ST_Disjoint(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5','disjoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION touches(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: touches(geometry,geometry)
-CREATE OR REPLACE FUNCTION _ST_Touches(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5','touches'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
--- Inlines index magic
-CREATE OR REPLACE FUNCTION ST_Touches(geometry,geometry)
-	RETURNS boolean
-	AS 'SELECT $1 && $2 AND _ST_Touches($1,$2)'
-	LANGUAGE 'SQL' IMMUTABLE;
-
--- Availability: 1.3.4
-CREATE OR REPLACE FUNCTION _ST_DWithin(geometry,geometry,float8)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5', 'LWGEOM_dwithin'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_DWithin(geometry, geometry, float8)
-	RETURNS boolean
-	AS 'SELECT $1 && ST_Expand($2,$3) AND $2 && ST_Expand($1,$3) AND _ST_DWithin($1, $2, $3)'
-	LANGUAGE 'SQL' IMMUTABLE;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION intersects(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: intersects(geometry,geometry)
-CREATE OR REPLACE FUNCTION _ST_Intersects(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5','intersects'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
--- Inlines index magic
-CREATE OR REPLACE FUNCTION ST_Intersects(geometry,geometry)
-	RETURNS boolean
-	AS 'SELECT $1 && $2 AND _ST_Intersects($1,$2)'
-	LANGUAGE 'SQL' IMMUTABLE;
-	
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION crosses(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: crosses(geometry,geometry)
-CREATE OR REPLACE FUNCTION _ST_Crosses(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5','crosses'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
--- Inlines index magic
-CREATE OR REPLACE FUNCTION ST_Crosses(geometry,geometry)
-	RETURNS boolean
-	AS 'SELECT $1 && $2 AND _ST_Crosses($1,$2)'
-	LANGUAGE 'SQL' IMMUTABLE;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION within(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: within(geometry,geometry)
-CREATE OR REPLACE FUNCTION _ST_Within(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5','within'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
--- Inlines index magic
-CREATE OR REPLACE FUNCTION ST_Within(geometry,geometry)
-	RETURNS boolean
-	AS 'SELECT $1 && $2 AND _ST_Within($1,$2)'
-	LANGUAGE 'SQL' IMMUTABLE;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Contains(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: contains(geometry,geometry)
-CREATE OR REPLACE FUNCTION _ST_Contains(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5','contains'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
--- Inlines index magic
-CREATE OR REPLACE FUNCTION ST_Contains(geometry,geometry)
-	RETURNS boolean
-	AS 'SELECT $1 && $2 AND _ST_Contains($1,$2)'
-	LANGUAGE 'SQL' IMMUTABLE;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION _ST_CoveredBy(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5', 'coveredby'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_CoveredBy(geometry,geometry)
-	RETURNS boolean
-	AS 'SELECT $1 && $2 AND _ST_CoveredBy($1,$2)'
-	LANGUAGE 'SQL' IMMUTABLE;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION _ST_Covers(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5', 'covers'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
--- Inlines index magic
-CREATE OR REPLACE FUNCTION ST_Covers(geometry,geometry)
-	RETURNS boolean
-	AS 'SELECT $1 && $2 AND _ST_Covers($1,$2)'
-	LANGUAGE 'SQL' IMMUTABLE;
-
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION _ST_ContainsProperly(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5','containsproperly'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.4.0
--- Inlines index magic
-CREATE OR REPLACE FUNCTION ST_ContainsProperly(geometry,geometry)
-	RETURNS boolean
-	AS 'SELECT $1 && $2 AND _ST_ContainsProperly($1,$2)'
-	LANGUAGE 'SQL' IMMUTABLE;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION overlaps(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: overlaps(geometry,geometry)
-CREATE OR REPLACE FUNCTION _ST_Overlaps(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5','overlaps'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.2
--- Inlines index magic
-CREATE OR REPLACE FUNCTION ST_Overlaps(geometry,geometry)
-	RETURNS boolean
-	AS 'SELECT $1 && $2 AND _ST_Overlaps($1,$2)'
-	LANGUAGE 'SQL' IMMUTABLE;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION IsValid(geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5', 'isvalid'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- PostGIS equivalent function: IsValid(geometry)
--- TODO: change null returns to true
-CREATE OR REPLACE FUNCTION ST_IsValid(geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5', 'isvalid'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- This is also available w/out GEOS
-CREATE OR REPLACE FUNCTION Centroid(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-	
--- PostGIS equivalent function: Centroid(geometry)
-CREATE OR REPLACE FUNCTION ST_Centroid(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'centroid'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-	
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION IsRing(geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: IsRing(geometry)
-CREATE OR REPLACE FUNCTION ST_IsRing(geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5', 'isring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PointOnSurface(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: PointOnSurface(geometry)
-CREATE OR REPLACE FUNCTION ST_PointOnSurface(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'pointonsurface'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION IsSimple(geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5', 'issimple'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: IsSimple(geometry)
-CREATE OR REPLACE FUNCTION ST_IsSimple(geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5', 'issimple'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Equals(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5','geomequals'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION _ST_Equals(geometry,geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5','geomequals'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.2.1
-CREATE OR REPLACE FUNCTION ST_Equals(geometry,geometry)
-	RETURNS boolean
-	AS 'SELECT $1 && $2 AND _ST_Equals($1,$2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
-
------------------------------------------------------------------------
--- GML & KML INPUT
--- Availability: 1.5.0
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION ST_GeomFromGML(text)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','geom_from_gml'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION ST_GMLToSQL(text)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','geom_from_gml'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION ST_GeomFromKML(text)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','geom_from_kml'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
------------------------------------------------------------------------
--- SVG OUTPUT
------------------------------------------------------------------------
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsSVG(geometry,int4,int4)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','assvg_geometry'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_AsSVG(geometry,int4,int4)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','assvg_geometry'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsSVG(geometry,int4)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','assvg_geometry'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_AsSVG(geometry,int4)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','assvg_geometry'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsSVG(geometry)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','assvg_geometry'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_AsSVG(geometry)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','assvg_geometry'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
------------------------------------------------------------------------
--- GML OUTPUT
------------------------------------------------------------------------
--- _ST_AsGML(version, geom, precision, option)
-CREATE OR REPLACE FUNCTION _ST_AsGML(int4, geometry, int4, int4)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','LWGEOM_asGML'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- AsGML(geom, precision) / version=2
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsGML(geometry, int4)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsGML(2, $1, $2, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_AsGML(geometry, int4)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsGML(2, $1, $2, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- AsGML(geom) / precision=15 version=2
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsGML(geometry)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsGML(2, $1, 15, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_AsGML(geometry)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsGML(2, $1, 15, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGML(version, geom) / precision=15 version=2
--- Availability: 1.3.2
-CREATE OR REPLACE FUNCTION ST_AsGML(int4, geometry)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsGML($1, $2, 15, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGML(version, geom, precision)
--- Availability: 1.3.2
-CREATE OR REPLACE FUNCTION ST_AsGML(int4, geometry, int4)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsGML($1, $2, $3, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGML (geom, precision, option) / version=2
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION ST_AsGML(geometry, int4, int4)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsGML(2, $1, $2, $3)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGML(version, geom, precision, option)
--- Availability: 1.4.0
-CREATE OR REPLACE FUNCTION ST_AsGML(int4, geometry, int4, int4)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsGML($1, $2, $3, $4)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
------------------------------------------------------------------------
--- KML OUTPUT
------------------------------------------------------------------------
--- _ST_AsKML(version, geom, precision)
-CREATE OR REPLACE FUNCTION _ST_AsKML(int4, geometry, int4)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','LWGEOM_asKML'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- AsKML(geom, precision) / version=2
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsKML(geometry, int4)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsKML(2, transform($1,4326), $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_AsKML(geometry, int4)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsKML(2, ST_Transform($1,4326), $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- AsKML(geom) / precision=15 version=2
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsKML(geometry)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsKML(2, transform($1,4326), 15)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- AsKML(version, geom, precision)
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsKML(int4, geometry, int4)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsKML($1, transform($2,4326), $3)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_AsKML(geometry)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsKML(2, ST_Transform($1,4326), 15)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsKML(version, geom) / precision=15 version=2
--- Availability: 1.3.2
-CREATE OR REPLACE FUNCTION ST_AsKML(int4, geometry)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsKML($1, ST_Transform($2,4326), 15)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsKML(version, geom, precision)
--- Availability: 1.3.2
-CREATE OR REPLACE FUNCTION ST_AsKML(int4, geometry, int4)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsKML($1, ST_Transform($2,4326), $3)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
------------------------------------------------------------------------
--- GEOJSON OUTPUT
--- Availability: 1.3.4
------------------------------------------------------------------------
--- _ST_AsGeoJson(version, geom, precision, options)
-CREATE OR REPLACE FUNCTION _ST_AsGeoJson(int4, geometry, int4, int4)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','LWGEOM_asGeoJson'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- ST_AsGeoJson(geom, precision) / version=1 options=0
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(geometry, int4)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsGeoJson(1, $1, $2, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGeoJson(geom) / precision=15 version=1 options=0
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(geometry)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsGeoJson(1, $1, 15, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGeoJson(version, geom) / precision=15 options=0
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(int4, geometry)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsGeoJson($1, $2, 15, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGeoJson(version, geom, precision) / options=0
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(int4, geometry, int4)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsGeoJson($1, $2, $3, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGeoJson(geom, precision, options) / version=1
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(geometry, int4, int4)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsGeoJson(1, $1, $2, $3)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGeoJson(version, geom, precision,options)
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(int4, geometry, int4, int4)
-	RETURNS TEXT
-	AS 'SELECT _ST_AsGeoJson($1, $2, $3, $4)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
-------------------------------------------------------------------------
--- GeoHash (geohash.org)
-------------------------------------------------------------------------
-
--- Availability 1.4.0
-CREATE OR REPLACE FUNCTION ST_GeoHash(geometry, int4)
-	RETURNS TEXT
-		AS '$libdir/postgis-1.5', 'ST_GeoHash'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability 1.4.0
-CREATE OR REPLACE FUNCTION ST_GeoHash(geometry)
-	RETURNS TEXT
-	AS 'SELECT ST_GeoHash($1, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
-------------------------------------------------------------------------
--- OGC defined
-------------------------------------------------------------------------
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION NumPoints(geometry)
-	RETURNS int4
-	AS '$libdir/postgis-1.5', 'LWGEOM_numpoints_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: NumPoints(geometry)
-CREATE OR REPLACE FUNCTION ST_NumPoints(geometry)
-	RETURNS int4
-	AS '$libdir/postgis-1.5', 'LWGEOM_numpoints_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION NumGeometries(geometry)
-	RETURNS int4
-	AS '$libdir/postgis-1.5', 'LWGEOM_numgeometries_collection'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: NumGeometries(geometry)
-CREATE OR REPLACE FUNCTION ST_NumGeometries(geometry)
-	RETURNS int4
-	AS '$libdir/postgis-1.5', 'LWGEOM_numgeometries_collection'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeometryN(geometry,integer)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_geometryn_collection'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: GeometryN(geometry)
-CREATE OR REPLACE FUNCTION ST_GeometryN(geometry,integer)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_geometryn_collection'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Dimension(geometry)
-	RETURNS int4
-	AS '$libdir/postgis-1.5', 'LWGEOM_dimension'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: Dimension(geometry)
-CREATE OR REPLACE FUNCTION ST_Dimension(geometry)
-	RETURNS int4
-	AS '$libdir/postgis-1.5', 'LWGEOM_dimension'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION ExteriorRing(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_exteriorring_polygon'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: ExteriorRing(geometry)
-CREATE OR REPLACE FUNCTION ST_ExteriorRing(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_exteriorring_polygon'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION NumInteriorRings(geometry)
-	RETURNS integer
-	AS '$libdir/postgis-1.5','LWGEOM_numinteriorrings_polygon'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: NumInteriorRings(geometry)
-CREATE OR REPLACE FUNCTION ST_NumInteriorRings(geometry)
-	RETURNS integer
-	AS '$libdir/postgis-1.5','LWGEOM_numinteriorrings_polygon'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION NumInteriorRing(geometry)
-	RETURNS integer
-	AS '$libdir/postgis-1.5','LWGEOM_numinteriorrings_polygon'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_NumInteriorRing(geometry)
-	RETURNS integer
-	AS '$libdir/postgis-1.5','LWGEOM_numinteriorrings_polygon'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION InteriorRingN(geometry,integer)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_interiorringn_polygon'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: InteriorRingN(geometry)
-CREATE OR REPLACE FUNCTION ST_InteriorRingN(geometry,integer)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_interiorringn_polygon'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeometryType(geometry)
-	RETURNS text
-	AS '$libdir/postgis-1.5', 'LWGEOM_getTYPE'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Not quite equivalent to GeometryType
-CREATE OR REPLACE FUNCTION ST_GeometryType(geometry)
-	RETURNS text
-	AS '$libdir/postgis-1.5', 'geometry_geometrytype'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PointN(geometry,integer)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_pointn_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: PointN(geometry,integer)
-CREATE OR REPLACE FUNCTION ST_PointN(geometry,integer)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_pointn_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION X(geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5','LWGEOM_x_point'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: X(geometry)
-CREATE OR REPLACE FUNCTION ST_X(geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5','LWGEOM_x_point'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Y(geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5','LWGEOM_y_point'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: Y(geometry)
-CREATE OR REPLACE FUNCTION ST_Y(geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5','LWGEOM_y_point'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION Z(geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5','LWGEOM_z_point'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_Z(geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5','LWGEOM_z_point'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION M(geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5','LWGEOM_m_point'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_M(geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5','LWGEOM_m_point'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION StartPoint(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_startpoint_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: StartPoint(geometry))
-CREATE OR REPLACE FUNCTION ST_StartPoint(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_startpoint_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION EndPoint(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_endpoint_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: EndPoint(geometry))
-CREATE OR REPLACE FUNCTION ST_EndPoint(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_endpoint_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION IsClosed(geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5', 'LWGEOM_isclosed_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: IsClosed(geometry)
-CREATE OR REPLACE FUNCTION ST_IsClosed(geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5', 'LWGEOM_isclosed_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION IsEmpty(geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5', 'LWGEOM_isempty'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: IsEmpty(geometry)
-CREATE OR REPLACE FUNCTION ST_IsEmpty(geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5', 'LWGEOM_isempty'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION SRID(geometry)
-	RETURNS int4
-	AS '$libdir/postgis-1.5','LWGEOM_getSRID'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: getSRID(geometry)
-CREATE OR REPLACE FUNCTION ST_SRID(geometry)
-	RETURNS int4
-	AS '$libdir/postgis-1.5','LWGEOM_getSRID'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION SetSRID(geometry,int4)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_setSRID'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_SetSRID(geometry,int4)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_setSRID'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsBinary(geometry)
-	RETURNS bytea
-	AS '$libdir/postgis-1.5','LWGEOM_asBinary'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: AsBinary(geometry)
-CREATE OR REPLACE FUNCTION ST_AsBinary(geometry)
-	RETURNS bytea
-	AS '$libdir/postgis-1.5','LWGEOM_asBinary'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsBinary(geometry,text)
-	RETURNS bytea
-	AS '$libdir/postgis-1.5','LWGEOM_asBinary'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_AsBinary(geometry,text)
-	RETURNS bytea
-	AS '$libdir/postgis-1.5','LWGEOM_asBinary'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION AsText(geometry)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','LWGEOM_asText'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: AsText(geometry)
-CREATE OR REPLACE FUNCTION ST_AsText(geometry)
-	RETURNS TEXT
-	AS '$libdir/postgis-1.5','LWGEOM_asText'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeometryFromText(text)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_from_text'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_GeometryFromText(text)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_from_text'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeometryFromText(text, int4)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_from_text'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_GeometryFromText(text, int4)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_from_text'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeomFromText(text)
-	RETURNS geometry AS 'SELECT geometryfromtext($1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_GeomFromText(text)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_from_text'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeomFromText(text, int4)
-	RETURNS geometry AS 'SELECT geometryfromtext($1, $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: ST_GeometryFromText(text, int4)
-CREATE OR REPLACE FUNCTION ST_GeomFromText(text, int4)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_from_text'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PointFromText(text)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''POINT''
-	THEN GeomFromText($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_PointFromText(text)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = ''POINT''
-	THEN ST_GeomFromText($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PointFromText(text, int4)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''POINT''
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: PointFromText(text, int4)
--- TODO: improve this ... by not duplicating constructor time.
-CREATE OR REPLACE FUNCTION ST_PointFromText(text, int4)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1, $2)) = ''POINT''
-	THEN ST_GeomFromText($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION LineFromText(text)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''LINESTRING''
-	THEN GeomFromText($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_LineFromText(text)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = ''LINESTRING''
-	THEN ST_GeomFromText($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION LineFromText(text, int4)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''LINESTRING''
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: LineFromText(text, int4)
-CREATE OR REPLACE FUNCTION ST_LineFromText(text, int4)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''LINESTRING''
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION LineStringFromText(text)
-	RETURNS geometry
-	AS 'SELECT LineFromText($1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION LineStringFromText(text, int4)
-	RETURNS geometry
-	AS 'SELECT LineFromText($1, $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PolyFromText(text)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''POLYGON''
-	THEN GeomFromText($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_PolyFromText(text)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = ''POLYGON''
-	THEN ST_GeomFromText($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PolyFromText(text, int4)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''POLYGON''
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: ST_PolygonFromText(text, int4)
-CREATE OR REPLACE FUNCTION ST_PolyFromText(text, int4)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1, $2)) = ''POLYGON''
-	THEN ST_GeomFromText($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PolygonFromText(text, int4)
-	RETURNS geometry
-	AS 'SELECT PolyFromText($1, $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_PolygonFromText(text, int4)
-	RETURNS geometry
-	AS 'SELECT PolyFromText($1, $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PolygonFromText(text)
-	RETURNS geometry
-	AS 'SELECT PolyFromText($1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_PolygonFromText(text)
-	RETURNS geometry
-	AS 'SELECT ST_PolyFromText($1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MLineFromText(text, int4)
-	RETURNS geometry
-	AS '
-	SELECT CASE
-	WHEN geometrytype(GeomFromText($1, $2)) = ''MULTILINESTRING''
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: MLineFromText(text, int4)
-CREATE OR REPLACE FUNCTION ST_MLineFromText(text, int4)
-	RETURNS geometry
-	AS '
-	SELECT CASE
-	WHEN geometrytype(GeomFromText($1, $2)) = ''MULTILINESTRING''
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MLineFromText(text)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''MULTILINESTRING''
-	THEN GeomFromText($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MLineFromText(text)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = ''MULTILINESTRING''
-	THEN ST_GeomFromText($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiLineStringFromText(text)
-	RETURNS geometry
-	AS 'SELECT ST_MLineFromText($1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MultiLineStringFromText(text)
-	RETURNS geometry
-	AS 'SELECT ST_MLineFromText($1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiLineStringFromText(text, int4)
-	RETURNS geometry
-	AS 'SELECT MLineFromText($1, $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MultiLineStringFromText(text, int4)
-	RETURNS geometry
-	AS 'SELECT MLineFromText($1, $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MPointFromText(text, int4)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromText($1,$2)) = ''MULTIPOINT''
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: MPointFromText(text, int4)
-CREATE OR REPLACE FUNCTION ST_MPointFromText(text, int4)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''MULTIPOINT''
-	THEN GeomFromText($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MPointFromText(text)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''MULTIPOINT''
-	THEN GeomFromText($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MPointFromText(text)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = ''MULTIPOINT''
-	THEN ST_GeomFromText($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiPointFromText(text, int4)
-	RETURNS geometry
-	AS 'SELECT MPointFromText($1, $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiPointFromText(text)
-	RETURNS geometry
-	AS 'SELECT MPointFromText($1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MultiPointFromText(text)
-	RETURNS geometry
-	AS 'SELECT ST_MPointFromText($1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiPointFromText(text)
-	RETURNS geometry
-	AS 'SELECT MPointFromText($1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MultiPointFromText(text)
-	RETURNS geometry
-	AS 'SELECT MPointFromText($1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MPolyFromText(text, int4)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''MULTIPOLYGON''
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: MPolyFromText(text, int4)
-CREATE OR REPLACE FUNCTION ST_MPolyFromText(text, int4)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1, $2)) = ''MULTIPOLYGON''
-	THEN ST_GeomFromText($1,$2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MPolyFromText(text)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''MULTIPOLYGON''
-	THEN GeomFromText($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
---Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MPolyFromText(text)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = ''MULTIPOLYGON''
-	THEN ST_GeomFromText($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiPolygonFromText(text, int4)
-	RETURNS geometry
-	AS 'SELECT MPolyFromText($1, $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MultiPolygonFromText(text, int4)
-	RETURNS geometry
-	AS 'SELECT MPolyFromText($1, $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiPolygonFromText(text)
-	RETURNS geometry
-	AS 'SELECT MPolyFromText($1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MultiPolygonFromText(text)
-	RETURNS geometry
-	AS 'SELECT MPolyFromText($1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeomCollFromText(text, int4)
-	RETURNS geometry
-	AS '
-	SELECT CASE
-	WHEN geometrytype(GeomFromText($1, $2)) = ''GEOMETRYCOLLECTION''
-	THEN GeomFromText($1,$2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_GeomCollFromText(text, int4)
-	RETURNS geometry
-	AS '
-	SELECT CASE
-	WHEN geometrytype(ST_GeomFromText($1, $2)) = ''GEOMETRYCOLLECTION''
-	THEN ST_GeomFromText($1,$2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeomCollFromText(text)
-	RETURNS geometry
-	AS '
-	SELECT CASE
-	WHEN geometrytype(GeomFromText($1)) = ''GEOMETRYCOLLECTION''
-	THEN GeomFromText($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_GeomCollFromText(text)
-	RETURNS geometry
-	AS '
-	SELECT CASE
-	WHEN geometrytype(ST_GeomFromText($1)) = ''GEOMETRYCOLLECTION''
-	THEN ST_GeomFromText($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeomFromWKB(bytea)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_from_WKB'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_GeomFromWKB(bytea)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_from_WKB'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeomFromWKB(bytea, int)
-	RETURNS geometry
-	AS 'SELECT setSRID(GeomFromWKB($1), $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: GeomFromWKB(bytea, int)
-CREATE OR REPLACE FUNCTION ST_GeomFromWKB(bytea, int)
-	RETURNS geometry
-	AS 'SELECT ST_SetSRID(ST_GeomFromWKB($1), $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PointFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''POINT''
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: PointFromWKB(bytea, int)
-CREATE OR REPLACE FUNCTION ST_PointFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = ''POINT''
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PointFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''POINT''
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_PointFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = ''POINT''
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION LineFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''LINESTRING''
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: LineFromWKB(bytea, int)
-CREATE OR REPLACE FUNCTION ST_LineFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = ''LINESTRING''
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION LineFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''LINESTRING''
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_LineFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = ''LINESTRING''
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION LinestringFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''LINESTRING''
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_LinestringFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = ''LINESTRING''
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION LinestringFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''LINESTRING''
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_LinestringFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''LINESTRING''
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PolyFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''POLYGON''
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: PolyFromWKB(text, int)
-CREATE OR REPLACE FUNCTION ST_PolyFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = ''POLYGON''
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PolyFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''POLYGON''
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_PolyFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = ''POLYGON''
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PolygonFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1,$2)) = ''POLYGON''
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_PolygonFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1,$2)) = ''POLYGON''
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION PolygonFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''POLYGON''
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_PolygonFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''POLYGON''
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MPointFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1,$2)) = ''MULTIPOINT''
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: MPointFromWKB(text, int)
-CREATE OR REPLACE FUNCTION ST_MPointFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTIPOINT''
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MPointFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTIPOINT''
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MPointFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = ''MULTIPOINT''
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiPointFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1,$2)) = ''MULTIPOINT''
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MultiPointFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1,$2)) = ''MULTIPOINT''
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiPointFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTIPOINT''
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MultiPointFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = ''MULTIPOINT''
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiLineFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTILINESTRING''
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION MultiLineFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTILINESTRING''
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiLineFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTILINESTRING''
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MultiLineFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = ''MULTILINESTRING''
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MLineFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTILINESTRING''
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: MLineFromWKB(text, int)
-CREATE OR REPLACE FUNCTION ST_MLineFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = ''MULTILINESTRING''
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MLineFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTILINESTRING''
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MLineFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = ''MULTILINESTRING''
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MPolyFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTIPOLYGON''
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: MPolyFromWKB(bytea, int)
-CREATE OR REPLACE FUNCTION ST_MPolyFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = ''MULTIPOLYGON''
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MPolyFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTIPOLYGON''
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MPolyFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = ''MULTIPOLYGON''
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiPolyFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTIPOLYGON''
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MultiPolyFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = ''MULTIPOLYGON''
-	THEN ST_GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION MultiPolyFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTIPOLYGON''
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_MultiPolyFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = ''MULTIPOLYGON''
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeomCollFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE
-	WHEN geometrytype(GeomFromWKB($1, $2)) = ''GEOMETRYCOLLECTION''
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_GeomCollFromWKB(bytea, int)
-	RETURNS geometry
-	AS '
-	SELECT CASE
-	WHEN geometrytype(GeomFromWKB($1, $2)) = ''GEOMETRYCOLLECTION''
-	THEN GeomFromWKB($1, $2)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION GeomCollFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE
-	WHEN geometrytype(GeomFromWKB($1)) = ''GEOMETRYCOLLECTION''
-	THEN GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_GeomCollFromWKB(bytea)
-	RETURNS geometry
-	AS '
-	SELECT CASE
-	WHEN geometrytype(ST_GeomFromWKB($1)) = ''GEOMETRYCOLLECTION''
-	THEN ST_GeomFromWKB($1)
-	ELSE NULL END
-	'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
---New functions
-
--- Maximum distance between linestrings.
-
-CREATE OR REPLACE FUNCTION max_distance(geometry,geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'LWGEOM_maxdistance2d_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION _ST_MaxDistance(geometry,geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'LWGEOM_maxdistance2d_linestring'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-	
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_MaxDistance(geometry,geometry)
-	RETURNS float8
-	AS 'SELECT _ST_MaxDistance(ST_ConvexHull($1), ST_ConvexHull($2))'
-	LANGUAGE 'SQL' IMMUTABLE STRICT; 
-
-CREATE OR REPLACE FUNCTION ST_ClosestPoint(geometry,geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_closestpoint'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION ST_ShortestLine(geometry,geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_shortestline2d'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION _ST_LongestLine(geometry,geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_longestline2d'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION ST_LongestLine(geometry,geometry)
-	RETURNS geometry
-	AS 'SELECT _ST_LongestLine(ST_ConvexHull($1), ST_ConvexHull($2))'
-	LANGUAGE 'SQL' IMMUTABLE STRICT; 
-
-CREATE OR REPLACE FUNCTION _ST_DFullyWithin(geometry,geometry,float8)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5', 'LWGEOM_dfullywithin'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-
-CREATE OR REPLACE FUNCTION ST_DFullyWithin(geometry, geometry, float8)
-	RETURNS boolean
-	AS 'SELECT $1 && ST_Expand($2,$3) AND $2 && ST_Expand($1,$3) AND _ST_DFullyWithin(ST_ConvexHull($1), ST_ConvexHull($2), $3)'
-	LANGUAGE 'SQL' IMMUTABLE; 
-	
-	
---
--- SFSQL 1.1
---
--- BdPolyFromText(multiLineStringTaggedText String, SRID Integer): Polygon
---
---  Construct a Polygon given an arbitrary
---  collection of closed linestrings as a
---  MultiLineString text representation.
---
--- This is a PLPGSQL function rather then an SQL function
--- To avoid double call of BuildArea (one to get GeometryType
--- and another to actual return, in a CASE WHEN construct).
--- Also, we profit from plpgsql to RAISE exceptions.
---
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION BdPolyFromText(text, integer)
-RETURNS geometry
-AS $$
-DECLARE
-	geomtext alias for $1;
-	srid alias for $2;
-	mline geometry;
-	geom geometry;
-BEGIN
-	mline := MultiLineStringFromText(geomtext, srid);
-
-	IF mline IS NULL
-	THEN
-		RAISE EXCEPTION 'Input is not a MultiLinestring';
-	END IF;
-
-	geom := BuildArea(mline);
-
-	IF GeometryType(geom) != 'POLYGON'
-	THEN
-		RAISE EXCEPTION 'Input returns more then a single polygon, try using BdMPolyFromText instead';
-	END IF;
-
-	RETURN geom;
-END;
-$$
-LANGUAGE 'plpgsql' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_BdPolyFromText(text, integer)
-RETURNS geometry
-AS $$
-DECLARE
-	geomtext alias for $1;
-	srid alias for $2;
-	mline geometry;
-	geom geometry;
-BEGIN
-	mline := ST_MultiLineStringFromText(geomtext, srid);
-
-	IF mline IS NULL
-	THEN
-		RAISE EXCEPTION 'Input is not a MultiLinestring';
-	END IF;
-
-	geom := ST_BuildArea(mline);
-
-	IF GeometryType(geom) != 'POLYGON'
-	THEN
-		RAISE EXCEPTION 'Input returns more then a single polygon, try using BdMPolyFromText instead';
-	END IF;
-
-	RETURN geom;
-END;
-$$
-LANGUAGE 'plpgsql' IMMUTABLE STRICT;
-
---
--- SFSQL 1.1
---
--- BdMPolyFromText(multiLineStringTaggedText String, SRID Integer): MultiPolygon
---
---  Construct a MultiPolygon given an arbitrary
---  collection of closed linestrings as a
---  MultiLineString text representation.
---
--- This is a PLPGSQL function rather then an SQL function
--- To raise an exception in case of invalid input.
---
--- Deprecation in 1.2.3
-CREATE OR REPLACE FUNCTION BdMPolyFromText(text, integer)
-RETURNS geometry
-AS $$
-DECLARE
-	geomtext alias for $1;
-	srid alias for $2;
-	mline geometry;
-	geom geometry;
-BEGIN
-	mline := MultiLineStringFromText(geomtext, srid);
-
-	IF mline IS NULL
-	THEN
-		RAISE EXCEPTION 'Input is not a MultiLinestring';
-	END IF;
-
-	geom := multi(BuildArea(mline));
-
-	RETURN geom;
-END;
-$$
-LANGUAGE 'plpgsql' IMMUTABLE STRICT;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_BdMPolyFromText(text, integer)
-RETURNS geometry
-AS $$
-DECLARE
-	geomtext alias for $1;
-	srid alias for $2;
-	mline geometry;
-	geom geometry;
-BEGIN
-	mline := ST_MultiLineStringFromText(geomtext, srid);
-
-	IF mline IS NULL
-	THEN
-		RAISE EXCEPTION 'Input is not a MultiLinestring';
-	END IF;
-
-	geom := multi(ST_BuildArea(mline));
-
-	RETURN geom;
-END;
-$$
-LANGUAGE 'plpgsql' IMMUTABLE STRICT;
-
-
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- 
--- $Id: long_xact.sql.in.c 4894 2009-11-25 19:15:57Z pramsey $
---
--- PostGIS - Spatial Types for PostgreSQL
--- http://postgis.refractions.net
--- Copyright 2001-2003 Refractions Research Inc.
---
--- This is free software; you can redistribute and/or modify it under
--- the terms of the GNU General Public Licence. See the COPYING file.
---  
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
-
------------------------------------------------------------------------
--- LONG TERM LOCKING
------------------------------------------------------------------------
-
--- UnlockRows(authid)
--- removes all locks held by the given auth
--- returns the number of locks released
-CREATE OR REPLACE FUNCTION UnlockRows(text)
-	RETURNS int
-	AS $$ 
-DECLARE
-	ret int;
-BEGIN
-
-	IF NOT LongTransactionsEnabled() THEN
-		RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.';
-	END IF;
-
-	EXECUTE 'DELETE FROM authorization_table where authid = ' ||
-		quote_literal($1);
-
-	GET DIAGNOSTICS ret = ROW_COUNT;
-
-	RETURN ret;
-END;
-$$
-LANGUAGE 'plpgsql'  VOLATILE STRICT;
-
--- LockRow([schema], table, rowid, auth, [expires]) 
--- Returns 1 if successfully obtained the lock, 0 otherwise
-CREATE OR REPLACE FUNCTION LockRow(text, text, text, text, timestamp)
-	RETURNS int
-	AS $$ 
-DECLARE
-	myschema alias for $1;
-	mytable alias for $2;
-	myrid   alias for $3;
-	authid alias for $4;
-	expires alias for $5;
-	ret int;
-	mytoid oid;
-	myrec RECORD;
-	
-BEGIN
-
-	IF NOT LongTransactionsEnabled() THEN
-		RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.';
-	END IF;
-
-	EXECUTE 'DELETE FROM authorization_table WHERE expires < now()'; 
-
-	SELECT c.oid INTO mytoid FROM pg_class c, pg_namespace n
-		WHERE c.relname = mytable
-		AND c.relnamespace = n.oid
-		AND n.nspname = myschema;
-
-	-- RAISE NOTICE 'toid: %', mytoid;
-
-	FOR myrec IN SELECT * FROM authorization_table WHERE 
-		toid = mytoid AND rid = myrid
-	LOOP
-		IF myrec.authid != authid THEN
-			RETURN 0;
-		ELSE
-			RETURN 1;
-		END IF;
-	END LOOP;
-
-	EXECUTE 'INSERT INTO authorization_table VALUES ('||
-		quote_literal(mytoid::text)||','||quote_literal(myrid)||
-		','||quote_literal(expires::text)||
-		','||quote_literal(authid) ||')';
-
-	GET DIAGNOSTICS ret = ROW_COUNT;
-
-	RETURN ret;
-END;
-$$
-LANGUAGE 'plpgsql'  VOLATILE STRICT;
-
--- LockRow(schema, table, rid, authid);
-CREATE OR REPLACE FUNCTION LockRow(text, text, text, text)
-	RETURNS int
-	AS
-$$ SELECT LockRow($1, $2, $3, $4, now()::timestamp+'1:00'); $$
-	LANGUAGE 'sql'  VOLATILE STRICT;
-
--- LockRow(table, rid, authid);
-CREATE OR REPLACE FUNCTION LockRow(text, text, text)
-	RETURNS int
-	AS
-$$ SELECT LockRow(current_schema(), $1, $2, $3, now()::timestamp+'1:00'); $$
-	LANGUAGE 'sql'  VOLATILE STRICT;
-
--- LockRow(schema, table, rid, expires);
-CREATE OR REPLACE FUNCTION LockRow(text, text, text, timestamp)
-	RETURNS int
-	AS
-$$ SELECT LockRow(current_schema(), $1, $2, $3, $4); $$
-	LANGUAGE 'sql'  VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION AddAuth(text)
-	RETURNS BOOLEAN
-	AS $$ 
-DECLARE
-	lockid alias for $1;
-	okay boolean;
-	myrec record;
-BEGIN
-	-- check to see if table exists
-	--  if not, CREATE TEMP TABLE mylock (transid xid, lockcode text)
-	okay := 'f';
-	FOR myrec IN SELECT * FROM pg_class WHERE relname = 'temp_lock_have_table' LOOP
-		okay := 't';
-	END LOOP; 
-	IF (okay <> 't') THEN 
-		CREATE TEMP TABLE temp_lock_have_table (transid xid, lockcode text);
-			-- this will only work from pgsql7.4 up
-			-- ON COMMIT DELETE ROWS;
-	END IF;
-
-	--  INSERT INTO mylock VALUES ( $1)
---	EXECUTE 'INSERT INTO temp_lock_have_table VALUES ( '||
---		quote_literal(getTransactionID()) || ',' ||
---		quote_literal(lockid) ||')';
-
-	INSERT INTO temp_lock_have_table VALUES (getTransactionID(), lockid);
-
-	RETURN true::boolean;
-END;
-$$
-LANGUAGE PLPGSQL;
- 
-
--- CheckAuth( <schema>, <table>, <ridcolumn> )
---
--- Returns 0
---
-CREATE OR REPLACE FUNCTION CheckAuth(text, text, text)
-	RETURNS INT
-	AS $$ 
-DECLARE
-	schema text;
-BEGIN
-	IF NOT LongTransactionsEnabled() THEN
-		RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.';
-	END IF;
-
-	if ( $1 != '' ) THEN
-		schema = $1;
-	ELSE
-		SELECT current_schema() into schema;
-	END IF;
-
-	-- TODO: check for an already existing trigger ?
-
-	EXECUTE 'CREATE TRIGGER check_auth BEFORE UPDATE OR DELETE ON ' 
-		|| quote_ident(schema) || '.' || quote_ident($2)
-		||' FOR EACH ROW EXECUTE PROCEDURE CheckAuthTrigger('
-		|| quote_literal($3) || ')';
-
-	RETURN 0;
-END;
-$$
-LANGUAGE 'plpgsql';
-
--- CheckAuth(<table>, <ridcolumn>)
-CREATE OR REPLACE FUNCTION CheckAuth(text, text)
-	RETURNS INT
-	AS
-	$$ SELECT CheckAuth('', $1, $2) $$
-	LANGUAGE 'SQL';
-
-CREATE OR REPLACE FUNCTION CheckAuthTrigger()
-	RETURNS trigger AS 
-	'$libdir/postgis-1.5', 'check_authorization'
-	LANGUAGE C;
-
-CREATE OR REPLACE FUNCTION GetTransactionID()
-	RETURNS xid AS 
-	'$libdir/postgis-1.5', 'getTransactionID'
-	LANGUAGE C;
-
-
---
--- Enable Long transactions support
---
---  Creates the authorization_table if not already existing
---
-CREATE OR REPLACE FUNCTION EnableLongTransactions()
-	RETURNS TEXT
-	AS $$ 
-DECLARE
-	"query" text;
-	exists bool;
-	rec RECORD;
-
-BEGIN
-
-	exists = 'f';
-	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorization_table'
-	LOOP
-		exists = 't';
-	END LOOP;
-
-	IF NOT exists
-	THEN
-		"query" = 'CREATE TABLE authorization_table (
-			toid oid, -- table oid
-			rid text, -- row id
-			expires timestamp,
-			authid text
-		)';
-		EXECUTE "query";
-	END IF;
-
-	exists = 'f';
-	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorized_tables'
-	LOOP
-		exists = 't';
-	END LOOP;
-
-	IF NOT exists THEN
-		"query" = 'CREATE VIEW authorized_tables AS ' ||
-			'SELECT ' ||
-			'n.nspname as schema, ' ||
-			'c.relname as table, trim(' ||
-			quote_literal(chr(92) || '000') ||
-			' from t.tgargs) as id_column ' ||
-			'FROM pg_trigger t, pg_class c, pg_proc p ' ||
-			', pg_namespace n ' ||
-			'WHERE p.proname = ' || quote_literal('checkauthtrigger') ||
-			' AND c.relnamespace = n.oid' ||
-			' AND t.tgfoid = p.oid and t.tgrelid = c.oid';
-		EXECUTE "query";
-	END IF;
-
-	RETURN 'Long transactions support enabled';
-END;
-$$
-LANGUAGE 'plpgsql';
-
---
--- Check if Long transactions support is enabled
---
-CREATE OR REPLACE FUNCTION LongTransactionsEnabled()
-	RETURNS bool
-AS $$ 
-DECLARE
-	rec RECORD;
-BEGIN
-	FOR rec IN SELECT oid FROM pg_class WHERE relname = 'authorized_tables'
-	LOOP
-		return 't';
-	END LOOP;
-	return 'f';
-END;
-$$
-LANGUAGE 'plpgsql';
-
---
--- Disable Long transactions support
---
---  (1) Drop any long_xact trigger 
---  (2) Drop the authorization_table
---  (3) KEEP the authorized_tables view
---
-CREATE OR REPLACE FUNCTION DisableLongTransactions()
-	RETURNS TEXT
-	AS $$ 
-DECLARE
-	rec RECORD;
-
-BEGIN
-
-	--
-	-- Drop all triggers applied by CheckAuth()
-	--
-	FOR rec IN
-		SELECT c.relname, t.tgname, t.tgargs FROM pg_trigger t, pg_class c, pg_proc p
-		WHERE p.proname = 'checkauthtrigger' and t.tgfoid = p.oid and t.tgrelid = c.oid
-	LOOP
-		EXECUTE 'DROP TRIGGER ' || quote_ident(rec.tgname) ||
-			' ON ' || quote_ident(rec.relname);
-	END LOOP;
-
-	--
-	-- Drop the authorization_table table
-	--
-	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorization_table' LOOP
-		DROP TABLE authorization_table;
-	END LOOP;
-
-	--
-	-- Drop the authorized_tables view
-	--
-	FOR rec IN SELECT * FROM pg_class WHERE relname = 'authorized_tables' LOOP
-		DROP VIEW authorized_tables;
-	END LOOP;
-
-	RETURN 'Long transactions support disabled';
-END;
-$$
-LANGUAGE 'plpgsql';
-
----------------------------------------------------------------
--- END
----------------------------------------------------------------
-
-
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- 
--- $Id: sqlmm.sql.in.c 4894 2009-11-25 19:15:57Z pramsey $
---
--- PostGIS - Spatial Types for PostgreSQL
--- http://postgis.refractions.net
--- Copyright 2001-2003 Refractions Research Inc.
---
--- This is free software; you can redistribute and/or modify it under
--- the terms of the GNU General Public Licence. See the COPYING file.
---  
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- This file defines a subset of SQL/MM functions (that is, only those
--- currently defined by ESRI's ArcSDE). Since these functions already exist
--- in PostGIS (for the most part), these functions simply expose the current
--- functions. Although mostly complying with SQL/MM standards, these prototypes
--- follow ESRI's ArcSDE SQL Specifications and not SQL/MM standards where 
--- disparities exist.
---
--- Specification Disparity Notes:
---   * ST_OrderingEquals(geometry, geometry) is implemented as per
---     ESRI's ArcSDE SQL specifications, not SQL/MM specifications.
---     (http://edndoc.esri.com/arcsde/9.1/sql_api/sqlapi3.htm#ST_OrderingEquals)
---   * Geometry constructors default to an SRID of -1, not 0 as per SQL/MM specs.
---   * Boolean return type methods (ie. ST_IsValid, ST_IsEmpty, ...)
---      * SQL/MM           : RETURNS 1 if TRUE, 0 if (FALSE, NULL)
---      * ESRI in Informix : RETURNS 1 if (TRUE, NULL), 0 if FALSE
---      * ESRI in DB2      : RETURNS 1 if TRUE, 0 if FALSE, NULL if NULL 
---      * PostGIS          : RETURNS 1 if TRUE, 0 if FALSE, NULL if NULL 
---
--- TODO: Implement ESRI's Shape constructors
---   * SE_AsShape(geometry)
---   * SE_ShapeToSQL
---   * SE_GeomFromShape
---   * SE_PointFromShape
---   * SE_LineFromShape
---   * SE_PolyFromShape
---   * SE_MPointFromShape
---   * SE_MLineFromShape
---   * SE_MPolyFromShape
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions for constructing an ST_Geometry
---     value given its WTK representation
--- (http://edndoc.esri.com/arcsde/9.1/general_topics/storing_geo_in_rdbms.html)
--------------------------------------------------------------------------------
-
--- PostGIS equivalent function: ST_GeometryFromText(text)
--- Note: Defaults to an SRID=-1, not 0 as per SQL/MM specs.
-CREATE OR REPLACE FUNCTION ST_WKTToSQL(text)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_from_text'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-
--- ST_GeomFromText(text, int4) - already defined
--- ST_PointFromText(text, int4) - already defined
--- ST_LineFromText(text, int4) - already defined
--- ST_PolyFromText(text, int4) - already defined
--- ST_MPointFromText(text, int4) - already defined
--- ST_MLineFromText(text, int4) - already defined
--- ST_MPolyFromText(text, int4) - already defined
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions for constructing an ST_Geometry
---     value given its WKB representation
--------------------------------------------------------------------------------
-
--- PostGIS equivalent function: GeomFromWKB(bytea))
--- Note: Defaults to an SRID=-1, not 0 as per SQL/MM specs.
-
-CREATE OR REPLACE FUNCTION ST_WKBToSQL(bytea)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','LWGEOM_from_WKB'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-
--- ST_GeomFromWKB(bytea, int) - already defined
--- ST_PointFromWKB(bytea, int) - already defined
--- ST_LineFromWKB(bytea, int) - already defined
--- ST_PolyFromWKB(bytea, int) - already defined
--- ST_MPointFromWKB(bytea, int) - already defined
--- ST_MLineFromWKB(bytea, int) - already defined
--- ST_MPolyFromWKB(bytea, int) - already defined
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions for constructing an ST_Geometry
---     value given an ESRI Shape representation
--------------------------------------------------------------------------------
-
--- TODO: SE_ShapeToSQL
--- TODO: SE_GeomFromShape
--- TODO: SE_PointFromShape
--- TODO: SE_LineFromShape
--- TODO: SE_PolyFromShape
--- TODO: SE_MPointFromShape
--- TODO: SE_MLineFromShape
--- TODO: SE_MPolyFromShape
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions for obtaining the WKT representation
---     of an ST_Geometry
--------------------------------------------------------------------------------
-
--- ST_AsText(geometry) - already defined
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions for obtaining the WKB representation
---     of an ST_Geometry
--------------------------------------------------------------------------------
-
--- ST_AsBinary(geometry) - already defined
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions for obtaining the ESRI Shape 
--- representation of an ST_Geometry
--------------------------------------------------------------------------------
-
--- TODO: SE_AsShape(geometry)
---CREATE OR REPLACE FUNCTION SE_AsShape(geometry)
---    RETURNS bytea
---    AS '$libdir/postgis-1.5','LWGEOM_AsShape'
---    LANGUAGE 'C' IMMUTABLE STRICT; 
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions on type ST_Geometry
--------------------------------------------------------------------------------
-
--- PostGIS equivalent function: ndims(geometry)
-CREATE OR REPLACE FUNCTION ST_CoordDim(geometry)
-	RETURNS smallint
-	AS '$libdir/postgis-1.5', 'LWGEOM_ndims'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-
--- ST_Dimension(geometry) - already defined.
--- ST_GeometryType(geometry) - already defined.
--- ST_SRID(geometry) - already defined.
--- ST_IsEmpty(geometry) - already defined.
--- ST_IsSimple(geometry) - already defined.
--- ST_IsValid(geometry) - already defined.
--- ST_Boundary(geometry) - already defined.
--- ST_Envelope(geometry) - already defined.
--- ST_Transform(geometry) - already defined.
--- ST_AsText(geometry) - already defined.
--- ST_AsBinary(geometry) - already defined.
--- SE_AsShape(geometry) - already defined.
--- ST_X(geometry) - already defined.
--- ST_Y(geometry) - already defined.
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION _ST_OrderingEquals(geometry, geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5', 'LWGEOM_same'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.3.0
-CREATE OR REPLACE FUNCTION ST_OrderingEquals(geometry, geometry)
-	RETURNS boolean
-	AS $$ 
-	SELECT $1 ~= $2 AND _ST_OrderingEquals($1, $2)
-	$$	
-	LANGUAGE 'SQL' IMMUTABLE STRICT; 
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION SE_Is3D(geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_hasz'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION SE_IsMeasured(geometry)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'LWGEOM_hasm'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions on type ST_Point
--------------------------------------------------------------------------------
-
--- PostGIS equivalent function: makePoint(float8,float8)
-CREATE OR REPLACE FUNCTION ST_Point(float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_makepoint'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-
--- PostGIS equivalent function: Z(geometry)
-CREATE OR REPLACE FUNCTION SE_Z(geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5','LWGEOM_z_point'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-
--- PostGIS equivalent function: M(geometry)
-CREATE OR REPLACE FUNCTION SE_M(geometry)
-	RETURNS float8
-	AS '$libdir/postgis-1.5','LWGEOM_m_point'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions on type ST_Curve
--------------------------------------------------------------------------------
-
--- ST_StartPoint(geometry) - already defined.
--- ST_EndPoint(geometry) - already defined.
--- ST_IsClosed(geometry) - already defined.
--- ST_IsRing(geometry) - already defined.
--- ST_Length(geometry) - already defined.
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions on type ST_LineString
--------------------------------------------------------------------------------
-
--- ST_NumPoints(geometry) - already defined.
--- ST_PointN(geometry) - already defined.
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions on type ST_Surface
--------------------------------------------------------------------------------
-
--- ST_Centroid(geometry) - already defined.
--- ST_PointOnSurface(geometry) - already defined.
--- ST_Area(geometry) - already defined.
--- ST_Perimeter(geometry) - already defined.
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions on type ST_Polygon
--------------------------------------------------------------------------------
-
--- PostGIS equivalent function: MakePolygon(geometry)
-CREATE OR REPLACE FUNCTION ST_Polygon(geometry, int)
-	RETURNS geometry
-	AS $$ 
-	SELECT setSRID(makepolygon($1), $2)
-	$$	
-	LANGUAGE 'SQL' IMMUTABLE STRICT; 
-
--- ST_ExteriorRing(geometry) - already defined.
--- ST_NumInteriorRing(geometry) - already defined.
--- ST_InteriorRingN(geometry, integer) - already defined.
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions on type ST_GeomCollection
--------------------------------------------------------------------------------
-
--- ST_NumGeometries(geometry) - already defined.
--- ST_GeometryN(geometry, integer) - already defined.
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions on type ST_MultiCurve
--------------------------------------------------------------------------------
-
--- ST_IsClosed(geometry) - already defined.
--- ST_Length(geometry) - already defined.
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions on type ST_MultiSurface
--------------------------------------------------------------------------------
-
--- ST_Centroid(geometry) - already defined.
--- ST_PointOnSurface(geometry) - already defined.
--- ST_Area(geometry) - already defined.
--- ST_Perimeter(geometry) - already defined.
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions that test spatial relationships
--------------------------------------------------------------------------------
-
--- ST_Equals(geometry, geometry) - already defined.
--- ST_Disjoint(geometry, geometry) - already defined.
--- ST_Touches(geometry, geometry) - already defined.
--- ST_Within(geometry, geometry) - already defined.
--- ST_Overlaps(geometry, geometry) - already defined.
--- ST_Crosses(geometry, geometry) - already defined.
--- ST_Intersects(geometry, geometry) - already defined.
--- ST_Contains(geometry, geometry) - already defined.
--- ST_Relate(geometry, geometry, text) - already defined.
-
--- PostGIS equivalent function: none
-CREATE OR REPLACE FUNCTION SE_EnvelopesIntersect(geometry,geometry)
-	RETURNS boolean
-	AS $$ 
-	SELECT $1 && $2
-	$$	
-	LANGUAGE 'SQL' IMMUTABLE STRICT; 
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions for distance relationships
--------------------------------------------------------------------------------
-
--- ST_Distance(geometry, geometry) - already defined.
-
--------------------------------------------------------------------------------
--- SQL/MM (ArcSDE subset) - SQL Functions that implement spatial operators
--------------------------------------------------------------------------------
-
--- ST_Intersection(geometry, geometry) - already defined.
--- ST_Difference(geometry, geometry) - already defined.
--- ST_Union(geometry, geometry) - already defined.
--- ST_SymDifference(geometry, geometry) - already defined.
--- ST_Buffer(geometry, float8) - already defined.
--- ST_ConvexHull(geometry) already defined.
-
--- PostGIS equivalent function: locate_along_measure(geometry, float8)
-CREATE OR REPLACE FUNCTION SE_LocateAlong(geometry, float8)
-	RETURNS geometry
-	AS $$ SELECT locate_between_measures($1, $2, $2) $$
-	LANGUAGE 'sql' IMMUTABLE STRICT;
-
--- PostGIS equivalent function: locate_between_measures(geometry, float8, float8)
-CREATE OR REPLACE FUNCTION SE_LocateBetween(geometry, float8, float8)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_locate_between_m'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-
-
--------------------------------------------------------------------------------
--- END
--------------------------------------------------------------------------------
-
-
----------------------------------------------------------------------------
--- $Id: geography.sql.in.c 5065 2009-12-30 01:25:17Z pramsey $
---
--- PostGIS - Spatial Types for PostgreSQL
--- Copyright 2009 Paul Ramsey <pramsey@cleverelephant.ca>
---
--- This is free software; you can redistribute and/or modify it under
--- the terms of the GNU General Public Licence. See the COPYING file.
---
----------------------------------------------------------------------------
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_typmod_in(cstring[])
-	RETURNS integer
-	AS '$libdir/postgis-1.5','geography_typmod_in'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_typmod_out(integer)
-	RETURNS cstring
-	AS '$libdir/postgis-1.5','geography_typmod_out'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-	
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_in(cstring, oid, integer)
-	RETURNS geography
-	AS '$libdir/postgis-1.5','geography_in'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_out(geography)
-	RETURNS cstring
-	AS '$libdir/postgis-1.5','geography_out'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_analyze(internal)
-	RETURNS bool
-	AS '$libdir/postgis-1.5','geography_analyze'
-	LANGUAGE 'C' VOLATILE STRICT; 
-
--- Availability: 1.5.0
-CREATE TYPE geography (
-	internallength = variable,
-	input = geography_in,
-	output = geography_out,
-	typmod_in = geography_typmod_in,
-	typmod_out = geography_typmod_out,
-	analyze = geography_analyze,
-	storage = main,
-	alignment = double
-);
-
---
--- GIDX type is used by the GiST index bindings. 
--- In/out functions are stubs, as all access should be internal.
----
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION gidx_in(cstring)
-	RETURNS gidx
-	AS '$libdir/postgis-1.5','gidx_in'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION gidx_out(gidx)
-	RETURNS cstring
-	AS '$libdir/postgis-1.5','gidx_out'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-
--- Availability: 1.5.0
-CREATE TYPE gidx (
-	internallength = variable,
-	input = gidx_in,
-	output = gidx_out,
-	storage = plain,
-	alignment = double
-);
-
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography(geography, integer, boolean)
-	RETURNS geography
-	AS '$libdir/postgis-1.5','geography_enforce_typmod'
-	LANGUAGE 'C' IMMUTABLE STRICT; 
-
--- Availability: 1.5.0
-CREATE CAST (geography AS geography) WITH FUNCTION geography(geography, integer, boolean) AS IMPLICIT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_AsText(geography)
-	RETURNS text
-	AS '$libdir/postgis-1.5','geography_as_text'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-	
--- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
--- TODO Remove in 2.0
-CREATE OR REPLACE FUNCTION ST_AsText(text)
-	RETURNS text AS
-	$$ SELECT ST_AsText($1::geometry);  $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_GeographyFromText(text)
-	RETURNS geography
-	AS '$libdir/postgis-1.5','geography_from_text'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_GeogFromText(text)
-	RETURNS geography
-	AS '$libdir/postgis-1.5','geography_from_text'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_AsBinary(geography)
-	RETURNS bytea
-	AS '$libdir/postgis-1.5','geography_as_binary'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-	
--- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
--- TODO Remove in 2.0
-CREATE OR REPLACE FUNCTION ST_AsBinary(text)
-	RETURNS bytea AS
-	$$ SELECT ST_AsBinary($1::geometry);  $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_GeogFromWKB(bytea)
-	RETURNS geography
-	AS '$libdir/postgis-1.5','geography_from_binary'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_typmod_dims(integer)
-	RETURNS integer
-	AS '$libdir/postgis-1.5','geography_typmod_dims'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_typmod_srid(integer)
-	RETURNS integer
-	AS '$libdir/postgis-1.5','geography_typmod_srid'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_typmod_type(integer)
-	RETURNS text
-	AS '$libdir/postgis-1.5','geography_typmod_type'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE VIEW geography_columns AS
-	SELECT
-		current_database() AS f_table_catalog, 
-		n.nspname AS f_table_schema, 
-		c.relname AS f_table_name, 
-		a.attname AS f_geography_column,
-		geography_typmod_dims(a.atttypmod) AS coord_dimension,
-		geography_typmod_srid(a.atttypmod) AS srid,
-		geography_typmod_type(a.atttypmod) AS type
-	FROM 
-		pg_class c, 
-		pg_attribute a, 
-		pg_type t, 
-		pg_namespace n
-	WHERE c.relkind IN('r','v')
-	AND t.typname = 'geography'
-	AND a.attisdropped = false
-	AND a.atttypid = t.oid
-	AND a.attrelid = c.oid
-	AND c.relnamespace = n.oid;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography(geometry)
-	RETURNS geography
-	AS '$libdir/postgis-1.5','geography_from_geometry'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE CAST (geometry AS geography) WITH FUNCTION geography(geometry) AS IMPLICIT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geometry(geography)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5','geometry_from_geography'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE CAST (geography AS geometry) WITH FUNCTION geometry(geography) ;
-
--- ---------- ---------- ---------- ---------- ---------- ---------- ----------
--- GiST Support Functions
--- ---------- ---------- ---------- ---------- ---------- ---------- ----------
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_consistent(internal,geometry,int4) 
-	RETURNS bool 
-	AS '$libdir/postgis-1.5' ,'geography_gist_consistent'
-	LANGUAGE 'C';
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_compress(internal) 
-	RETURNS internal 
-	AS '$libdir/postgis-1.5','geography_gist_compress'
-	LANGUAGE 'C';
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_penalty(internal,internal,internal) 
-	RETURNS internal 
-	AS '$libdir/postgis-1.5' ,'geography_gist_penalty'
-	LANGUAGE 'C';
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_picksplit(internal, internal) 
-	RETURNS internal 
-	AS '$libdir/postgis-1.5' ,'geography_gist_picksplit'
-	LANGUAGE 'C';
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_union(bytea, internal) 
-	RETURNS internal 
-	AS '$libdir/postgis-1.5' ,'geography_gist_union'
-	LANGUAGE 'C';
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_same(box2d, box2d, internal) 
-	RETURNS internal 
-	AS '$libdir/postgis-1.5' ,'geography_gist_same'
-	LANGUAGE 'C';
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_decompress(internal) 
-	RETURNS internal 
-	AS '$libdir/postgis-1.5' ,'geography_gist_decompress'
-	LANGUAGE 'C';
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_selectivity (internal, oid, internal, int4)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'geography_gist_selectivity'
-	LANGUAGE 'C';
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_join_selectivity(internal, oid, internal, smallint)
-	RETURNS float8
-	AS '$libdir/postgis-1.5', 'geography_gist_join_selectivity'
-	LANGUAGE 'C';
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_overlaps(geography, geography) 
-	RETURNS boolean 
-	AS '$libdir/postgis-1.5' ,'geography_overlaps'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OPERATOR && (
-	LEFTARG = geography, RIGHTARG = geography, PROCEDURE = geography_overlaps,
-	COMMUTATOR = '&&',
-	RESTRICT = geography_gist_selectivity, 
-	JOIN = geography_gist_join_selectivity
-);
-
-
--- Availability: 1.5.0
-CREATE OPERATOR CLASS gist_geography_ops
-	DEFAULT FOR TYPE geography USING GIST AS
-	STORAGE 	gidx,
-	OPERATOR        3        &&	,
---	OPERATOR        6        ~=	,
---	OPERATOR        7        ~	,
---	OPERATOR        8        @	,
-	FUNCTION        1        geography_gist_consistent (internal, geometry, int4),
-	FUNCTION        2        geography_gist_union (bytea, internal),
-	FUNCTION        3        geography_gist_compress (internal),
-	FUNCTION        4        geography_gist_decompress (internal),
-	FUNCTION        5        geography_gist_penalty (internal, internal, internal),
-	FUNCTION        6        geography_gist_picksplit (internal, internal),
-	FUNCTION        7        geography_gist_same (box2d, box2d, internal);
-
-
--- ---------- ---------- ---------- ---------- ---------- ---------- ----------
--- B-Tree Functions
--- For sorting and grouping
--- Availability: 1.5.0
--- ---------- ---------- ---------- ---------- ---------- ---------- ----------
-
-CREATE OR REPLACE FUNCTION geography_lt(geography, geography)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'geography_lt'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geography_le(geography, geography)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'geography_le'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geography_gt(geography, geography)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'geography_gt'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geography_ge(geography, geography)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'geography_ge'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geography_eq(geography, geography)
-	RETURNS bool
-	AS '$libdir/postgis-1.5', 'geography_eq'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION geography_cmp(geography, geography)
-	RETURNS integer
-	AS '$libdir/postgis-1.5', 'geography_cmp'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
---
--- Sorting operators for Btree
---
-
-CREATE OPERATOR < (
-	LEFTARG = geography, RIGHTARG = geography, PROCEDURE = geography_lt,
-	COMMUTATOR = '>', NEGATOR = '>=',
-	RESTRICT = contsel, JOIN = contjoinsel
-);
-
-CREATE OPERATOR <= (
-	LEFTARG = geography, RIGHTARG = geography, PROCEDURE = geography_le,
-	COMMUTATOR = '>=', NEGATOR = '>',
-	RESTRICT = contsel, JOIN = contjoinsel
-);
-
-CREATE OPERATOR = (
-	LEFTARG = geography, RIGHTARG = geography, PROCEDURE = geography_eq,
-	COMMUTATOR = '=', -- we might implement a faster negator here
-	RESTRICT = contsel, JOIN = contjoinsel
-);
-
-CREATE OPERATOR >= (
-	LEFTARG = geography, RIGHTARG = geography, PROCEDURE = geography_ge,
-	COMMUTATOR = '<=', NEGATOR = '<',
-	RESTRICT = contsel, JOIN = contjoinsel
-);
-CREATE OPERATOR > (
-	LEFTARG = geography, RIGHTARG = geography, PROCEDURE = geography_gt,
-	COMMUTATOR = '<', NEGATOR = '<=',
-	RESTRICT = contsel, JOIN = contjoinsel
-);
-
-CREATE OPERATOR CLASS btree_geography_ops
-	DEFAULT FOR TYPE geography USING btree AS
-	OPERATOR	1	< ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	= ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	> ,
-	FUNCTION	1	geography_cmp (geography, geography);
-
-
--- ---------- ---------- ---------- ---------- ---------- ---------- ----------
--- Export Functions
--- Availability: 1.5.0
--- ---------- ---------- ---------- ---------- ---------- ---------- ----------
-
---
--- SVG OUTPUT
---
-
--- ST_AsSVG(geography, precision, rel)
-CREATE OR REPLACE FUNCTION ST_AsSVG(geography,int4,int4)
-	RETURNS text
-	AS '$libdir/postgis-1.5','geography_as_svg'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- ST_AsSVG(geography, precision) / rel=0
-CREATE OR REPLACE FUNCTION ST_AsSVG(geography,int4)
-	RETURNS text
-	AS '$libdir/postgis-1.5','geography_as_svg'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- ST_AsSVG(geography) / precision=15, rel=0
-CREATE OR REPLACE FUNCTION ST_AsSVG(geography)
-	RETURNS text
-	AS '$libdir/postgis-1.5','geography_as_svg'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-	
--- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
--- TODO Remove in 2.0
-CREATE OR REPLACE FUNCTION ST_AsSVG(text)
-	RETURNS text AS
-	$$ SELECT ST_AsSVG($1::geometry);  $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
-
---
--- GML OUTPUT
---
-
--- _ST_AsGML(version, geography, precision, option)
-CREATE OR REPLACE FUNCTION _ST_AsGML(int4, geography, int4, int4)
-	RETURNS text
-	AS '$libdir/postgis-1.5','geography_as_gml'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- ST_AsGML(geography, precision) / version=2 options=0
-CREATE OR REPLACE FUNCTION ST_AsGML(geography, int4)
-	RETURNS text
-	AS 'SELECT _ST_AsGML(2, $1, $2, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGML(geography) / precision=15 version=2 options=0
-CREATE OR REPLACE FUNCTION ST_AsGML(geography)
-	RETURNS text
-	AS 'SELECT _ST_AsGML(2, $1, 15, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
--- TODO Remove in 2.0
-CREATE OR REPLACE FUNCTION ST_AsGML(text)
-	RETURNS text AS
-	$$ SELECT ST_AsGML($1::geometry);  $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGML(version, geography) / precision=15 version=2 options=0
-CREATE OR REPLACE FUNCTION ST_AsGML(int4, geography)
-	RETURNS text
-	AS 'SELECT _ST_AsGML($1, $2, 15, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGML(version, geography, precision) / options = 0
-CREATE OR REPLACE FUNCTION ST_AsGML(int4, geography, int4)
-	RETURNS text
-	AS 'SELECT _ST_AsGML($1, $2, $3, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGML (geography, precision, option) / version=2
-CREATE OR REPLACE FUNCTION ST_AsGML(geography, int4, int4)
-	RETURNS text
-	AS 'SELECT _ST_AsGML(2, $1, $2, $3)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGML(version, geography, precision, option)
-CREATE OR REPLACE FUNCTION ST_AsGML(int4, geography, int4, int4)
-	RETURNS text
-	AS 'SELECT _ST_AsGML($1, $2, $3, $4)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
-
-
---
--- KML OUTPUT
---
-
--- _ST_AsKML(version, geography, precision)
-CREATE OR REPLACE FUNCTION _ST_AsKML(int4, geography, int4)
-	RETURNS text
-	AS '$libdir/postgis-1.5','geography_as_kml'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- AsKML(geography,precision) / version=2
-CREATE OR REPLACE FUNCTION ST_AsKML(geography, int4)
-	RETURNS text
-	AS 'SELECT _ST_AsKML(2, $1, $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- AsKML(geography) / precision=15 version=2
-CREATE OR REPLACE FUNCTION ST_AsKML(geography)
-	RETURNS text
-	AS 'SELECT _ST_AsKML(2, $1, 15)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
--- TODO Remove in 2.0
-CREATE OR REPLACE FUNCTION ST_AsKML(text)
-	RETURNS text AS
-	$$ SELECT ST_AsKML($1::geometry);  $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsKML(version, geography) / precision=15 
-CREATE OR REPLACE FUNCTION ST_AsKML(int4, geography)
-	RETURNS text
-	AS 'SELECT _ST_AsKML($1, $2, 15)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsKML(version, geography, precision)
-CREATE OR REPLACE FUNCTION ST_AsKML(int4, geography, int4)
-	RETURNS text
-	AS 'SELECT _ST_AsKML($1, $2, $3)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
-
-
---
--- GeoJson Output
---
-
-CREATE OR REPLACE FUNCTION _ST_AsGeoJson(int4, geography, int4, int4)
-	RETURNS text
-	AS '$libdir/postgis-1.5','geography_as_geojson'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- ST_AsGeoJson(geography, precision) / version=1 options=0
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(geography, int4)
-	RETURNS text
-	AS 'SELECT _ST_AsGeoJson(1, $1, $2, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGeoJson(geography) / precision=15 version=1 options=0
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(geography)
-	RETURNS text
-	AS 'SELECT _ST_AsGeoJson(1, $1, 15, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
--- TODO Remove in 2.0
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(text)
-	RETURNS text AS
-	$$ SELECT ST_AsGeoJson($1::geometry);  $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGeoJson(version, geography) / precision=15 options=0
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(int4, geography)
-	RETURNS text
-	AS 'SELECT _ST_AsGeoJson($1, $2, 15, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGeoJson(version, geography, precision) / options=0
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(int4, geography, int4)
-	RETURNS text
-	AS 'SELECT _ST_AsGeoJson($1, $2, $3, 0)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGeoJson(geography, precision, options) / version=1
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(geography, int4, int4)
-	RETURNS text
-	AS 'SELECT _ST_AsGeoJson(1, $1, $2, $3)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ST_AsGeoJson(version, geography, precision,options)
-CREATE OR REPLACE FUNCTION ST_AsGeoJson(int4, geography, int4, int4)
-	RETURNS text
-	AS 'SELECT _ST_AsGeoJson($1, $2, $3, $4)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ---------- ---------- ---------- ---------- ---------- ---------- ----------
--- Measurement Functions
--- Availability: 1.5.0
--- ---------- ---------- ---------- ---------- ---------- ---------- ----------
-
--- Stop calculation and return immediately once distance is less than tolerance
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION _ST_Distance(geography, geography, float8, boolean)
-	RETURNS float8
-	AS '$libdir/postgis-1.5','geography_distance'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Stop calculation and return immediately once distance is less than tolerance
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION _ST_DWithin(geography, geography, float8, boolean)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5','geography_dwithin'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_Distance(geography, geography, boolean)
-	RETURNS float8
-	AS 'SELECT _ST_Distance($1, $2, 0.0, $3)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Currently defaulting to spheroid calculations
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_Distance(geography, geography)
-	RETURNS float8
-	AS 'SELECT _ST_Distance($1, $2, 0.0, true)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-	
--- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
--- TODO Remove in 2.0
-CREATE OR REPLACE FUNCTION ST_Distance(text, text)
-	RETURNS float8 AS
-	$$ SELECT ST_Distance($1::geometry, $2::geometry);  $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Only expands the bounding box, the actual geometry will remain unchanged, use with care.
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION _ST_Expand(geography, float8)
-	RETURNS geography
-	AS '$libdir/postgis-1.5','geography_expand'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_DWithin(geography, geography, float8, boolean)
-	RETURNS boolean
-	AS 'SELECT $1 && _ST_Expand($2,$3) AND $2 && _ST_Expand($1,$3) AND _ST_DWithin($1, $2, $3, $4)'
-	LANGUAGE 'SQL' IMMUTABLE;
-
--- Currently defaulting to spheroid calculations
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_DWithin(geography, geography, float8)
-	RETURNS boolean
-	AS 'SELECT $1 && _ST_Expand($2,$3) AND $2 && _ST_Expand($1,$3) AND _ST_DWithin($1, $2, $3, true)'
-	LANGUAGE 'SQL' IMMUTABLE;
-
--- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
--- TODO Remove in 2.0
-CREATE OR REPLACE FUNCTION ST_DWithin(text, text, float8)
-	RETURNS boolean AS
-	$$ SELECT ST_DWithin($1::geometry, $2::geometry, $3);  $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_Area(geography, boolean)
-	RETURNS float8
-	AS '$libdir/postgis-1.5','geography_area'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Currently defaulting to spheroid calculations
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_Area(geography)
-	RETURNS float8
-	AS 'SELECT ST_Area($1, true)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
--- TODO Remove in 2.0
-CREATE OR REPLACE FUNCTION ST_Area(text)
-	RETURNS float8 AS
-	$$ SELECT ST_Area($1::geometry);  $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_Length(geography, boolean)
-	RETURNS float8
-	AS '$libdir/postgis-1.5','geography_length'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_Length(geography)
-	RETURNS float8
-	AS 'SELECT ST_Length($1, true)'
-	LANGUAGE 'SQL' IMMUTABLE;
-
--- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
--- TODO Remove in 2.0
-CREATE OR REPLACE FUNCTION ST_Length(text)
-	RETURNS float8 AS
-	$$ SELECT ST_Length($1::geometry);  $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION _ST_PointOutside(geography)
-	RETURNS geography
-	AS '$libdir/postgis-1.5','geography_point_outside'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Only implemented for polygon-over-point
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION _ST_Covers(geography, geography)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5','geography_covers'
-	LANGUAGE 'C' IMMUTABLE STRICT
-	COST 100;
-
--- Only implemented for polygon-over-point
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_Covers(geography, geography)
-	RETURNS boolean
-	AS 'SELECT $1 && $2 AND _ST_Covers($1, $2)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
--- TODO Remove in 2.0
-CREATE OR REPLACE FUNCTION ST_Covers(text, text)
-	RETURNS boolean AS
-	$$ SELECT ST_Covers($1::geometry, $2::geometry);  $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Only implemented for polygon-over-point
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_CoveredBy(geography, geography)
-	RETURNS boolean
-	AS 'SELECT $1 && $2 AND _ST_Covers($2, $1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
--- TODO Remove in 2.0
-CREATE OR REPLACE FUNCTION ST_CoveredBy(text, text)
-	RETURNS boolean AS
-	$$ SELECT ST_CoveredBy($1::geometry, $2::geometry);  $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_Intersects(geography, geography)
-	RETURNS boolean
-	AS 'SELECT $1 && $2 AND _ST_Distance($1, $2, 0.0, false) < 0.00001'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
--- TODO Remove in 2.0
-CREATE OR REPLACE FUNCTION ST_Intersects(text, text)
-	RETURNS boolean AS
-	$$ SELECT ST_Intersects($1::geometry, $2::geometry);  $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION _ST_BestSRID(geography, geography)
-	RETURNS integer
-	AS '$libdir/postgis-1.5','geography_bestsrid'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION _ST_BestSRID(geography)
-	RETURNS integer
-	AS 'SELECT _ST_BestSRID($1,$1)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_Buffer(geography, float8)
-	RETURNS geography
-	AS 'SELECT geography(ST_Transform(ST_Buffer(ST_Transform(geometry($1), _ST_BestSRID($1)), $2), 4326))'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
--- TODO Remove in 2.0
-CREATE OR REPLACE FUNCTION ST_Buffer(text, float8)
-	RETURNS geometry AS
-	$$ SELECT ST_Buffer($1::geometry, $2);  $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_Intersection(geography, geography)
-	RETURNS geography
-	AS 'SELECT geography(ST_Transform(ST_Intersection(ST_Transform(geometry($1), _ST_BestSRID($1, $2)), ST_Transform(geometry($2), _ST_BestSRID($1, $2))), 4326))'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
--- TODO Remove in 2.0
-CREATE OR REPLACE FUNCTION ST_Intersection(text, text)
-	RETURNS geometry AS
-	$$ SELECT ST_Intersection($1::geometry, $2::geometry);  $$
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
--- ---------- ---------- ---------- ---------- ---------- ---------- ----------
-
----------------------------------------------------------------
--- SQL-MM
----------------------------------------------------------------
-
---
--- SQL-MM
---
--- ST_CurveToLine(Geometry geometry, SegmentsPerQuarter integer)
---
--- Converts a given geometry to a linear geometry.  Each curveed
--- geometry or segment is converted into a linear approximation using
--- the given number of segments per quarter circle.
-CREATE OR REPLACE FUNCTION ST_CurveToLine(geometry, integer)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_curve_segmentize'
-	LANGUAGE 'C' IMMUTABLE STRICT;
---
--- SQL-MM
---
--- ST_CurveToLine(Geometry geometry, SegmentsPerQuarter integer)
---
--- Converts a given geometry to a linear geometry.  Each curveed
--- geometry or segment is converted into a linear approximation using
--- the default value of 32 segments per quarter circle
-CREATE OR REPLACE FUNCTION ST_CurveToLine(geometry)
-	RETURNS geometry AS 'SELECT ST_CurveToLine($1, 32)'
-	LANGUAGE 'SQL' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION ST_HasArc(geometry)
-	RETURNS boolean
-	AS '$libdir/postgis-1.5', 'LWGEOM_has_arc'
-	LANGUAGE 'C' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION ST_LineToCurve(geometry)
-	RETURNS geometry
-	AS '$libdir/postgis-1.5', 'LWGEOM_line_desegmentize'
-	LANGUAGE 'C' IMMUTABLE STRICT;
----------------------------------------------------------------
--- END
----------------------------------------------------------------
-
-
----------------------------------------------------------------
--- USER CONTRIUBUTED
----------------------------------------------------------------
-
------------------------------------------------------------------------
--- ST_MinimumBoundingCircle(inputgeom geometry, segs_per_quarter integer)
------------------------------------------------------------------------
--- Returns the smallest circle polygon that can fully contain a geometry
--- Defaults to 48 segs per quarter to approximate a circle
--- Contributed by Bruce Rindahl
--- Availability: 1.4.0
------------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION ST_MinimumBoundingCircle(inputgeom geometry, segs_per_quarter integer)
-	RETURNS geometry AS
-$BODY$
-	DECLARE
-	hull GEOMETRY;
-	ring GEOMETRY;
-	center GEOMETRY;
-	radius DOUBLE PRECISION;
-	dist DOUBLE PRECISION;
-	d DOUBLE PRECISION;
-	idx1 integer;
-	idx2 integer;
-	l1 GEOMETRY;
-	l2 GEOMETRY;
-	p1 GEOMETRY;
-	p2 GEOMETRY;
-	a1 DOUBLE PRECISION;
-	a2 DOUBLE PRECISION;
-
-
-	BEGIN
-
-	-- First compute the ConvexHull of the geometry
-	hull = ST_ConvexHull(inputgeom);
-	--A point really has no MBC
-	IF ST_GeometryType(hull) = 'ST_Point' THEN
-		RETURN hull;
-	END IF;
-	-- convert the hull perimeter to a linestring so we can manipulate individual points
-	--If its already a linestring force it to a closed linestring
-	ring = CASE WHEN ST_GeometryType(hull) = 'ST_LineString' THEN ST_AddPoint(hull, ST_StartPoint(hull)) ELSE ST_ExteriorRing(hull) END;
-
-	dist = 0;
-	-- Brute Force - check every pair
-	FOR i in 1 .. (ST_NumPoints(ring)-2)
-		LOOP
-			FOR j in i .. (ST_NumPoints(ring)-1)
-				LOOP
-				d = ST_Distance(ST_PointN(ring,i),ST_PointN(ring,j));
-				-- Check the distance and update if larger
-				IF (d > dist) THEN
-					dist = d;
-					idx1 = i;
-					idx2 = j;
-				END IF;
-			END LOOP;
-		END LOOP;
-
-	-- We now have the diameter of the convex hull.  The following line returns it if desired.
-	-- RETURN MakeLine(PointN(ring,idx1),PointN(ring,idx2));
-
-	-- Now for the Minimum Bounding Circle.  Since we know the two points furthest from each
-	-- other, the MBC must go through those two points. Start with those points as a diameter of a circle.
-
-	-- The radius is half the distance between them and the center is midway between them
-	radius = ST_Distance(ST_PointN(ring,idx1),ST_PointN(ring,idx2)) / 2.0;
-	center = ST_Line_interpolate_point(ST_MakeLine(ST_PointN(ring,idx1),ST_PointN(ring,idx2)),0.5);
-
-	-- Loop through each vertex and check if the distance from the center to the point
-	-- is greater than the current radius.
-	FOR k in 1 .. (ST_NumPoints(ring)-1)
-		LOOP
-		IF(k <> idx1 and k <> idx2) THEN
-			dist = ST_Distance(center,ST_PointN(ring,k));
-			IF (dist > radius) THEN
-				-- We have to expand the circle.  The new circle must pass trhough
-				-- three points - the two original diameters and this point.
-
-				-- Draw a line from the first diameter to this point
-				l1 = ST_Makeline(ST_PointN(ring,idx1),ST_PointN(ring,k));
-				-- Compute the midpoint
-				p1 = ST_line_interpolate_point(l1,0.5);
-				-- Rotate the line 90 degrees around the midpoint (perpendicular bisector)
-				l1 = ST_Translate(ST_Rotate(ST_Translate(l1,-X(p1),-Y(p1)),pi()/2),X(p1),Y(p1));
-				--  Compute the azimuth of the bisector
-				a1 = ST_Azimuth(ST_PointN(l1,1),ST_PointN(l1,2));
-				--  Extend the line in each direction the new computed distance to insure they will intersect
-				l1 = ST_AddPoint(l1,ST_Makepoint(X(ST_PointN(l1,2))+sin(a1)*dist,Y(ST_PointN(l1,2))+cos(a1)*dist),-1);
-				l1 = ST_AddPoint(l1,ST_Makepoint(X(ST_PointN(l1,1))-sin(a1)*dist,Y(ST_PointN(l1,1))-cos(a1)*dist),0);
-
-				-- Repeat for the line from the point to the other diameter point
-				l2 = ST_Makeline(ST_PointN(ring,idx2),ST_PointN(ring,k));
-				p2 = ST_Line_interpolate_point(l2,0.5);
-				l2 = ST_Translate(ST_Rotate(ST_Translate(l2,-X(p2),-Y(p2)),pi()/2),X(p2),Y(p2));
-				a2 = ST_Azimuth(ST_PointN(l2,1),ST_PointN(l2,2));
-				l2 = ST_AddPoint(l2,ST_Makepoint(X(ST_PointN(l2,2))+sin(a2)*dist,Y(ST_PointN(l2,2))+cos(a2)*dist),-1);
-				l2 = ST_AddPoint(l2,ST_Makepoint(X(ST_PointN(l2,1))-sin(a2)*dist,Y(ST_PointN(l2,1))-cos(a2)*dist),0);
-
-				-- The new center is the intersection of the two bisectors
-				center = ST_Intersection(l1,l2);
-				-- The new radius is the distance to any of the three points
-				radius = ST_Distance(center,ST_PointN(ring,idx1));
-			END IF;
-		END IF;
-		END LOOP;
-	--DONE!!  Return the MBC via the buffer command
-	RETURN ST_Buffer(center,radius,segs_per_quarter);
-
-	END;
-$BODY$
-	LANGUAGE 'plpgsql' IMMUTABLE STRICT;
-
-CREATE OR REPLACE FUNCTION ST_MinimumBoundingCircle(geometry)
- RETURNS geometry AS
-'SELECT ST_MinimumBoundingCircle($1, 48)'
- LANGUAGE 'sql' IMMUTABLE STRICT;
-COMMIT;
-
-
--- First drop old aggregates
-DROP AGGREGATE IF EXISTS geomunion(geometry);
-DROP AGGREGATE IF EXISTS st_geomunion(geometry);
-DROP AGGREGATE IF EXISTS accum_old(geometry);
-DROP AGGREGATE IF EXISTS st_accum_old(geometry);
-
--- Then drop old functions
-DROP FUNCTION IF EXISTS box2d_overleft(box2d, box2d);
-DROP FUNCTION IF EXISTS box2d_overright(box2d, box2d);
-DROP FUNCTION IF EXISTS box2d_left(box2d, box2d);
-DROP FUNCTION IF EXISTS box2d_right(box2d, box2d);
-DROP FUNCTION IF EXISTS box2d_contain(box2d, box2d);
-DROP FUNCTION IF EXISTS box2d_contained(box2d, box2d);
-DROP FUNCTION IF EXISTS box2d_overlap(box2d, box2d);
-DROP FUNCTION IF EXISTS box2d_same(box2d, box2d);
-DROP FUNCTION IF EXISTS box2d_intersects(box2d, box2d);
-DROP FUNCTION IF EXISTS st_box2d_overleft(box2d, box2d);
-DROP FUNCTION IF EXISTS st_box2d_overright(box2d, box2d);
-DROP FUNCTION IF EXISTS st_box2d_left(box2d, box2d);
-DROP FUNCTION IF EXISTS st_box2d_right(box2d, box2d);
-DROP FUNCTION IF EXISTS st_box2d_contain(box2d, box2d);
-DROP FUNCTION IF EXISTS st_box2d_contained(box2d, box2d);
-DROP FUNCTION IF EXISTS st_box2d_overlap(box2d, box2d);
-DROP FUNCTION IF EXISTS st_box2d_same(box2d, box2d);
-DROP FUNCTION IF EXISTS st_box2d_intersects(box2d, box2d);
-DROP FUNCTION IF EXISTS st_addbbox(geometry);
-DROP FUNCTION IF EXISTS st_dropbbox(geometry); 
-DROP FUNCTION IF EXISTS st_hasbbox(geometry); 
-DROP FUNCTION IF EXISTS cache_bbox();
-DROP FUNCTION IF EXISTS st_cache_bbox();
-DROP FUNCTION IF EXISTS transform_geometry(geometry,text,text,int);
-DROP FUNCTION IF EXISTS collector(geometry, geometry);
-DROP FUNCTION IF EXISTS st_collector(geometry, geometry);
-DROP FUNCTION IF EXISTS geom_accum (geometry[],geometry);
-DROP FUNCTION IF EXISTS st_geom_accum (geometry[],geometry);
-DROP FUNCTION IF EXISTS collect_garray (geometry[]);
-DROP FUNCTION IF EXISTS st_collect_garray (geometry[]);
-DROP FUNCTION IF EXISTS geosnoop(geometry);
-DROP FUNCTION IF EXISTS jtsnoop(geometry);
-DROP FUNCTION IF EXISTS st_noop(geometry);
-DROP FUNCTION IF EXISTS st_max_distance(geometry, geometry);
-
-
-

file:a/lib/ses.php (deleted)
--- a/lib/ses.php
+++ /dev/null
@@ -1,704 +1,1 @@
-<?php
-/**
-*
-* Copyright (c) 2011, Dan Myers.
-* Parts copyright (c) 2008, Donovan Schonknecht.
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* - Redistributions of source code must retain the above copyright notice,
-*   this list of conditions and the following disclaimer.
-* - Redistributions in binary form must reproduce the above copyright
-*   notice, this list of conditions and the following disclaimer in the
-*   documentation and/or other materials provided with the distribution.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*
-* This is a modified BSD license (the third clause has been removed).
-* The BSD license may be found here:
-* http://www.opensource.org/licenses/bsd-license.php
-*
-* Amazon Simple Email Service is a trademark of Amazon.com, Inc. or its affiliates.
-*
-* SimpleEmailService is based on Donovan Schonknecht's Amazon S3 PHP class, found here:
-* http://undesigned.org.za/2007/10/22/amazon-s3-php-class
-*
-*/
 
-/**
-* Amazon SimpleEmailService PHP class
-*
-* @link http://sourceforge.net/projects/php-aws-ses/
-* version 0.8.1
-*
-*/
-class SimpleEmailService
-{
-	protected $__accessKey; // AWS Access key
-	protected $__secretKey; // AWS Secret key
-	protected $__host;
-
-	public function getAccessKey() { return $this->__accessKey; }
-	public function getSecretKey() { return $this->__secretKey; }
-	public function getHost() { return $this->__host; }
-
-	protected $__verifyHost = 1;
-	protected $__verifyPeer = 1;
-
-	// verifyHost and verifyPeer determine whether curl verifies ssl certificates.
-	// It may be necessary to disable these checks on certain systems.
-	// These only have an effect if SSL is enabled.
-	public function verifyHost() { return $this->__verifyHost; }
-	public function enableVerifyHost($enable = true) { $this->__verifyHost = $enable; }
-
-	public function verifyPeer() { return $this->__verifyPeer; }
-	public function enableVerifyPeer($enable = true) { $this->__verifyPeer = $enable; }
-
-	/**
-	* Constructor
-	*
-	* @param string $accessKey Access key
-	* @param string $secretKey Secret key
-	* @return void
-	*/
-	public function __construct($accessKey = null, $secretKey = null, $host = 'email.us-east-1.amazonaws.com') {
-		if ($accessKey !== null && $secretKey !== null) {
-			$this->setAuth($accessKey, $secretKey);
-		}
-		$this->__host = $host;
-	}
-
-	/**
-	* Set AWS access key and secret key
-	*
-	* @param string $accessKey Access key
-	* @param string $secretKey Secret key
-	* @return void
-	*/
-	public function setAuth($accessKey, $secretKey) {
-		$this->__accessKey = $accessKey;
-		$this->__secretKey = $secretKey;
-	}
-
-	/**
-	* Lists the email addresses that have been verified and can be used as the 'From' address
-	* 
-	* @return An array containing two items: a list of verified email addresses, and the request id.
-	*/
-	public function listVerifiedEmailAddresses() {
-		$rest = new SimpleEmailServiceRequest($this, 'GET');
-		$rest->setParameter('Action', 'ListVerifiedEmailAddresses');
-
-		$rest = $rest->getResponse();
-		if($rest->error === false && $rest->code !== 200) {
-			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
-		}
-		if($rest->error !== false) {
-			$this->__triggerError('listVerifiedEmailAddresses', $rest->error);
-			return false;
-		}
-
-		$response = array();
-		if(!isset($rest->body)) {
-			return $response;
-		}
-
-		$addresses = array();
-		foreach($rest->body->ListVerifiedEmailAddressesResult->VerifiedEmailAddresses->member as $address) {
-			$addresses[] = (string)$address;
-		}
-
-		$response['Addresses'] = $addresses;
-		$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
-
-		return $response;
-	}
-
-	/**
-	* Requests verification of the provided email address, so it can be used
-	* as the 'From' address when sending emails through SimpleEmailService.
-	*
-	* After submitting this request, you should receive a verification email
-	* from Amazon at the specified address containing instructions to follow.
-	*
-	* @param string email The email address to get verified
-	* @return The request id for this request.
-	*/
-	public function verifyEmailAddress($email) {
-		$rest = new SimpleEmailServiceRequest($this, 'POST');
-		$rest->setParameter('Action', 'VerifyEmailAddress');
-		$rest->setParameter('EmailAddress', $email);
-
-		$rest = $rest->getResponse();
-		if($rest->error === false && $rest->code !== 200) {
-			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
-		}
-		if($rest->error !== false) {
-			$this->__triggerError('verifyEmailAddress', $rest->error);
-			return false;
-		}
-
-		$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
-		return $response;
-	}
-
-	/**
-	* Removes the specified email address from the list of verified addresses.
-	*
-	* @param string email The email address to remove
-	* @return The request id for this request.
-	*/
-	public function deleteVerifiedEmailAddress($email) {
-		$rest = new SimpleEmailServiceRequest($this, 'DELETE');
-		$rest->setParameter('Action', 'DeleteVerifiedEmailAddress');
-		$rest->setParameter('EmailAddress', $email);
-
-		$rest = $rest->getResponse();
-		if($rest->error === false && $rest->code !== 200) {
-			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
-		}
-		if($rest->error !== false) {
-			$this->__triggerError('deleteVerifiedEmailAddress', $rest->error);
-			return false;
-		}
-
-		$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
-		return $response;
-	}
-
-	/**
-	* Retrieves information on the current activity limits for this account.
-	* See http://docs.amazonwebservices.com/ses/latest/APIReference/API_GetSendQuota.html
-	*
-	* @return An array containing information on this account's activity limits.
-	*/
-	public function getSendQuota() {
-		$rest = new SimpleEmailServiceRequest($this, 'GET');
-		$rest->setParameter('Action', 'GetSendQuota');
-
-		$rest = $rest->getResponse();
-		if($rest->error === false && $rest->code !== 200) {
-			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
-		}
-		if($rest->error !== false) {
-			$this->__triggerError('getSendQuota', $rest->error);
-			return false;
-		}
-
-		$response = array();
-		if(!isset($rest->body)) {
-			return $response;
-		}
-
-		$response['Max24HourSend'] = (string)$rest->body->GetSendQuotaResult->Max24HourSend;
-		$response['MaxSendRate'] = (string)$rest->body->GetSendQuotaResult->MaxSendRate;
-		$response['SentLast24Hours'] = (string)$rest->body->GetSendQuotaResult->SentLast24Hours;
-		$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
-
-		return $response;
-	}
-
-	/**
-	* Retrieves statistics for the last two weeks of activity on this account.
-	* See http://docs.amazonwebservices.com/ses/latest/APIReference/API_GetSendStatistics.html
-	*
-	* @return An array of activity statistics.  Each array item covers a 15-minute period.
-	*/
-	public function getSendStatistics() {
-		$rest = new SimpleEmailServiceRequest($this, 'GET');
-		$rest->setParameter('Action', 'GetSendStatistics');
-
-		$rest = $rest->getResponse();
-		if($rest->error === false && $rest->code !== 200) {
-			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
-		}
-		if($rest->error !== false) {
-			$this->__triggerError('getSendStatistics', $rest->error);
-			return false;
-		}
-
-		$response = array();
-		if(!isset($rest->body)) {
-			return $response;
-		}
-
-		$datapoints = array();
-		foreach($rest->body->GetSendStatisticsResult->SendDataPoints->member as $datapoint) {
-			$p = array();
-			$p['Bounces'] = (string)$datapoint->Bounces;
-			$p['Complaints'] = (string)$datapoint->Complaints;
-			$p['DeliveryAttempts'] = (string)$datapoint->DeliveryAttempts;
-			$p['Rejects'] = (string)$datapoint->Rejects;
-			$p['Timestamp'] = (string)$datapoint->Timestamp;
-
-			$datapoints[] = $p;
-		}
-
-		$response['SendDataPoints'] = $datapoints;
-		$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
-
-		return $response;
-	}
-
-
-	/**
-	* Given a SimpleEmailServiceMessage object, submits the message to the service for sending.
-	*
-	* @return An array containing the unique identifier for this message and a separate request id.
-	*         Returns false if the provided message is missing any required fields.
-	*/
-	public function sendEmail($sesMessage) {
-		if(!$sesMessage->validate()) {
-			return false;
-		}
-
-		$rest = new SimpleEmailServiceRequest($this, 'POST');
-		$rest->setParameter('Action', 'SendEmail');
-
-		$i = 1;
-		foreach($sesMessage->to as $to) {
-			$rest->setParameter('Destination.ToAddresses.member.'.$i, $to);
-			$i++;
-		}
-
-		if(is_array($sesMessage->cc)) {
-			$i = 1;
-			foreach($sesMessage->cc as $cc) {
-				$rest->setParameter('Destination.CcAddresses.member.'.$i, $cc);
-				$i++;
-			}
-		}
-
-		if(is_array($sesMessage->bcc)) {
-			$i = 1;
-			foreach($sesMessage->bcc as $bcc) {
-				$rest->setParameter('Destination.BccAddresses.member.'.$i, $bcc);
-				$i++;
-			}
-		}
-
-		if(is_array($sesMessage->replyto)) {
-			$i = 1;
-			foreach($sesMessage->replyto as $replyto) {
-				$rest->setParameter('ReplyToAddresses.member.'.$i, $replyto);
-				$i++;
-			}
-		}
-
-		$rest->setParameter('Source', $sesMessage->from);
-
-		if($sesMessage->returnpath != null) {
-			$rest->setParameter('ReturnPath', $sesMessage->returnpath);
-		}
-
-		if($sesMessage->subject != null && strlen($sesMessage->subject) > 0) {
-			$rest->setParameter('Message.Subject.Data', $sesMessage->subject);
-			if($sesMessage->subjectCharset != null && strlen($sesMessage->subjectCharset) > 0) {
-				$rest->setParameter('Message.Subject.Charset', $sesMessage->subjectCharset);
-			}
-		}
-
-
-		if($sesMessage->messagetext != null && strlen($sesMessage->messagetext) > 0) {
-			$rest->setParameter('Message.Body.Text.Data', $sesMessage->messagetext);
-			if($sesMessage->messageTextCharset != null && strlen($sesMessage->messageTextCharset) > 0) {
-				$rest->setParameter('Message.Body.Text.Charset', $sesMessage->messageTextCharset);
-			}
-		}
-
-		if($sesMessage->messagehtml != null && strlen($sesMessage->messagehtml) > 0) {
-			$rest->setParameter('Message.Body.Html.Data', $sesMessage->messagehtml);
-			if($sesMessage->messageHtmlCharset != null && strlen($sesMessage->messageHtmlCharset) > 0) {
-				$rest->setParameter('Message.Body.Html.Charset', $sesMessage->messageHtmlCharset);
-			}
-		}
-
-		$rest = $rest->getResponse();
-		if($rest->error === false && $rest->code !== 200) {
-			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
-		}
-		if($rest->error !== false) {
-			$this->__triggerError('sendEmail', $rest->error);
-			return false;
-		}
-
-		$response['MessageId'] = (string)$rest->body->SendEmailResult->MessageId;
-		$response['RequestId'] = (string)$rest->body->ResponseMetadata->RequestId;
-		return $response;
-	}
-
-	/**
-	* Trigger an error message
-	*
-	* @internal Used by member functions to output errors
-	* @param array $error Array containing error information
-	* @return string
-	*/
-	public function __triggerError($functionname, $error)
-	{
-		if($error == false) {
-			trigger_error(sprintf("SimpleEmailService::%s(): Encountered an error, but no description given", $functionname), E_USER_WARNING);
-		}
-		else if(isset($error['curl']) && $error['curl'])
-		{
-			trigger_error(sprintf("SimpleEmailService::%s(): %s %s", $functionname, $error['code'], $error['message']), E_USER_WARNING);
-		}
-		else if(isset($error['Error']))
-		{
-			$e = $error['Error'];
-			$message = sprintf("SimpleEmailService::%s(): %s - %s: %s\nRequest Id: %s\n", $functionname, $e['Type'], $e['Code'], $e['Message'], $error['RequestId']);
-			trigger_error($message, E_USER_WARNING);
-		}
-	}
-
-	/**
-	* Callback handler for 503 retries.
-	*
-	* @internal Used by SimpleDBRequest to call the user-specified callback, if set
-	* @param $attempt The number of failed attempts so far
-	* @return The retry delay in microseconds, or 0 to stop retrying.
-	*/
-	public function __executeServiceTemporarilyUnavailableRetryDelay($attempt)
-	{
-		if(is_callable($this->__serviceUnavailableRetryDelayCallback)) {
-			$callback = $this->__serviceUnavailableRetryDelayCallback;
-			return $callback($attempt);
-		}
-		return 0;
-	}
-}
-
-final class SimpleEmailServiceRequest
-{
-	private $ses, $verb, $parameters = array();
-	public $response;
-
-	/**
-	* Constructor
-	*
-	* @param string $ses The SimpleEmailService object making this request
-	* @param string $action action
-	* @param string $verb HTTP verb
-	* @return mixed
-	*/
-	function __construct($ses, $verb) {
-		$this->ses = $ses;
-		$this->verb = $verb;
-		$this->response = new STDClass;
-		$this->response->error = false;
-	}
-
-	/**
-	* Set request parameter
-	*
-	* @param string  $key Key
-	* @param string  $value Value
-	* @param boolean $replace Whether to replace the key if it already exists (default true)
-	* @return void
-	*/
-	public function setParameter($key, $value, $replace = true) {
-		if(!$replace && isset($this->parameters[$key]))
-		{
-			$temp = (array)($this->parameters[$key]);
-			$temp[] = $value;
-			$this->parameters[$key] = $temp;
-		}
-		else
-		{
-			$this->parameters[$key] = $value;
-		}
-	}
-
-	/**
-	* Get the response
-	*
-	* @return object | false
-	*/
-	public function getResponse() {
-
-		$params = array();
-		foreach ($this->parameters as $var => $value)
-		{
-			if(is_array($value))
-			{
-				foreach($value as $v)
-				{
-					$params[] = $var.'='.$this->__customUrlEncode($v);
-				}
-			}
-			else
-			{
-				$params[] = $var.'='.$this->__customUrlEncode($value);
-			}
-		}
-
-		sort($params, SORT_STRING);
-
-		// must be in format 'Sun, 06 Nov 1994 08:49:37 GMT'
-		$date = gmdate('D, d M Y H:i:s e');
-
-		$query = implode('&', $params);
-
-		$headers = array();
-		$headers[] = 'Date: '.$date;
-		$headers[] = 'Host: '.$this->ses->getHost();
-
-		$auth = 'AWS3-HTTPS AWSAccessKeyId='.$this->ses->getAccessKey();
-		$auth .= ',Algorithm=HmacSHA256,Signature='.$this->__getSignature($date);
-		$headers[] = 'X-Amzn-Authorization: '.$auth;
-
-		$url = 'https://'.$this->ses->getHost().'/';
-
-		// Basic setup
-		$curl = curl_init();
-		curl_setopt($curl, CURLOPT_USERAGENT, 'SimpleEmailService/php');
-
-		curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, ($this->ses->verifyHost() ? 1 : 0));
-		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, ($this->ses->verifyPeer() ? 1 : 0));
-
-		// Request types
-		switch ($this->verb) {
-			case 'GET':
-				$url .= '?'.$query;
-				break;
-			case 'POST':
-				curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $this->verb);
-				curl_setopt($curl, CURLOPT_POSTFIELDS, $query);
-				$headers[] = 'Content-Type: application/x-www-form-urlencoded';
-			break;
-			case 'DELETE':
-				$url .= '?'.$query;
-				curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
-			break;
-			default: break;
-		}
-		curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
-		curl_setopt($curl, CURLOPT_HEADER, false);
-
-		curl_setopt($curl, CURLOPT_URL, $url);
-		curl_setopt($curl, CURLOPT_RETURNTRANSFER, false);
-		curl_setopt($curl, CURLOPT_WRITEFUNCTION, array(&$this, '__responseWriteCallback'));
-		curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
-
-		// Execute, grab errors
-		if (curl_exec($curl)) {
-			$this->response->code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
-		} else {
-			$this->response->error = array(
-				'curl' => true,
-				'code' => curl_errno($curl),
-				'message' => curl_error($curl),
-				'resource' => $this->resource
-			);
-		}
-
-		@curl_close($curl);
-
-		// Parse body into XML
-		if ($this->response->error === false && isset($this->response->body)) {
-			$this->response->body = simplexml_load_string($this->response->body);
-
-			// Grab SES errors
-			if (!in_array($this->response->code, array(200, 201, 202, 204))
-				&& isset($this->response->body->Error)) {
-				$error = $this->response->body->Error;
-				$output = array();
-				$output['curl'] = false;
-				$output['Error'] = array();
-				$output['Error']['Type'] = (string)$error->Type;
-				$output['Error']['Code'] = (string)$error->Code;
-				$output['Error']['Message'] = (string)$error->Message;
-				$output['RequestId'] = (string)$this->response->body->RequestId;
-
-				$this->response->error = $output;
-				unset($this->response->body);
-			}
-		}
-
-		return $this->response;
-	}
-
-	/**
-	* CURL write callback
-	*
-	* @param resource &$curl CURL resource
-	* @param string &$data Data
-	* @return integer
-	*/
-	private function __responseWriteCallback(&$curl, &$data) {
-		$this->response->body .= $data;
-		return strlen($data);
-	}
-
-	/**
-	* Contributed by afx114
-	* URL encode the parameters as per http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?Query_QueryAuth.html
-	* PHP's rawurlencode() follows RFC 1738, not RFC 3986 as required by Amazon. The only difference is the tilde (~), so convert it back after rawurlencode
-	* See: http://www.morganney.com/blog/API/AWS-Product-Advertising-API-Requires-a-Signed-Request.php
-	*
-	* @param string $var String to encode
-	* @return string
-	*/
-	private function __customUrlEncode($var) {
-		return str_replace('%7E', '~', rawurlencode($var));
-	}
-
-	/**
-	* Generate the auth string using Hmac-SHA256
-	*
-	* @internal Used by SimpleDBRequest::getResponse()
-	* @param string $string String to sign
-	* @return string
-	*/
-	private function __getSignature($string) {
-		return base64_encode(hash_hmac('sha256', $string, $this->ses->getSecretKey(), true));
-	}
-}
-
-
-final class SimpleEmailServiceMessage {
-
-	// these are public for convenience only
-	// these are not to be used outside of the SimpleEmailService class!
-	public $to, $cc, $bcc, $replyto;
-	public $from, $returnpath;
-	public $subject, $messagetext, $messagehtml;
-	public $subjectCharset, $messageTextCharset, $messageHtmlCharset;
-
-	function __construct() {
-		$to = array();
-		$cc = array();
-		$bcc = array();
-		$replyto = array();
-
-		$from = null;
-		$returnpath = null;
-
-		$subject = null;
-		$messagetext = null;
-		$messagehtml = null;
-
-		$subjectCharset = null;
-		$messageTextCharset = null;
-		$messageHtmlCharset = null;
-	}
-
-
-	/**
-	* addTo, addCC, addBCC, and addReplyTo have the following behavior:
-	* If a single address is passed, it is appended to the current list of addresses.
-	* If an array of addresses is passed, that array is merged into the current list.
-	*/
-	function addTo($to) {
-		if(!is_array($to)) {
-			$this->to[] = $to;
-		}
-		else {
-			$this->to = array_merge($this->to, $to);
-		}
-	}
-
-	function addCC($cc) {
-		if(!is_array($cc)) {
-			$this->cc[] = $cc;
-		}
-		else {
-			$this->cc = array_merge($this->cc, $cc);
-		}
-	}
-
-	function addBCC($bcc) {
-		if(!is_array($bcc)) {
-			$this->bcc[] = $bcc;
-		}
-		else {
-			$this->bcc = array_merge($this->bcc, $bcc);
-		}
-	}
-
-	function addReplyTo($replyto) {
-		if(!is_array($replyto)) {
-			$this->replyto[] = $replyto;
-		}
-		else {
-			$this->replyto = array_merge($this->replyto, $replyto);
-		}
-	}
-
-	function setFrom($from) {
-		$this->from = $from;
-	}
-
-	function setReturnPath($returnpath) {
-		$this->returnpath = $returnpath;
-	}
-
-	function setSubject($subject) {
-		$this->subject = $subject;
-	}
-
-	function setSubjectCharset($charset) {
-		$this->subjectCharset = $charset;
-	}
-
-	function setMessageFromString($text, $html = null) {
-		$this->messagetext = $text;
-		$this->messagehtml = $html;
-	}
-
-	function setMessageFromFile($textfile, $htmlfile = null) {
-		if(file_exists($textfile) && is_file($textfile) && is_readable($textfile)) {
-			$this->messagetext = file_get_contents($textfile);
-		}
-		if(file_exists($htmlfile) && is_file($htmlfile) && is_readable($htmlfile)) {
-			$this->messagehtml = file_get_contents($htmlfile);
-		}
-	}
-
-	function setMessageFromURL($texturl, $htmlurl = null) {
-		$this->messagetext = file_get_contents($texturl);
-		if($htmlurl !== null) {
-			$this->messagehtml = file_get_contents($htmlurl);
-		}
-	}
-
-	function setMessageCharset($textCharset, $htmlCharset = null) {
-		$this->messageTextCharset = $textCharset;
-		$this->messageHtmlCharset = $htmlCharset;
-	}
-
-	/**
-	* Validates whether the message object has sufficient information to submit a request to SES.
-	* This does not guarantee the message will arrive, nor that the request will succeed;
-	* instead, it makes sure that no required fields are missing.
-	*
-	* This is used internally before attempting a SendEmail or SendRawEmail request,
-	* but it can be used outside of this file if verification is desired.
-	* May be useful if e.g. the data is being populated from a form; developers can generally
-	* use this function to verify completeness instead of writing custom logic.
-	*
-	* @return boolean
-	*/
-	public function validate() {
-		if(count($this->to) == 0)
-			return false;
-		if($this->from == null || strlen($this->from) == 0)
-			return false;
-		if($this->messagetext == null)
-			return false;
-		return true;
-	}
-}
-

--- a/myway/myway_timeliness.php
+++ b/myway/myway_timeliness.php
@@ -17,10 +17,10 @@
 include ('../include/common.inc.php');
 include_header("MyWay Deltas", "mywayDelta");
 ?>
-
-    <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../js/flot/excanvas.min.js"></script><![endif]--> 
-
-<script language="javascript" type="text/javascript" src="../js/flot/jquery.flot.js"></script> 
+<!--[if lt IE 9]>
+    <script type="text/javascript" src="../js/FlashCanvas/bin/flashcanvas.js"></script>
+    <![endif]-->
+    <script type="text/javascript" src="../js/flotr2/flotr2.min.js"></script>
 <center><div id="placeholder" style="width:900px;height:550px"></div></center>
 <script type="text/javascript"> 
     $(function () {
@@ -67,9 +67,9 @@
 };
 ?>
 
-        var placeholder = $("#placeholder");
+        var placeholder = document.getElementById("placeholder");
 
-        var plot = $.plot(placeholder, [
+        var plot = Flotr.draw(placeholder, [
 <?php
 foreach ($labels as $key => $label) {
     echo "        {
@@ -83,64 +83,32 @@
         {
             xaxis: {
                 mode: "time",
-                min: midnight + (1000*60*60*8),
+                 min: midnight + (1000*60*60*5.6),
                 max: midnight + (1000*60*60*23.5)
+
             },
             yaxis: {
-                tickFormatter: yformatter
+                tickFormatter: yformatter,
+                min: -60*8,
+                max: 60*8
             },
-            grid: { hoverable: true, clickable: true, labelMargin: 32   }
+            mouse: { track: true, relative: true, trackFormatter: showTooltip}
         });
-        var o;
-        o = plot.pointOffset({ x: midnight+ (9*60*60*1000), y: -1.2});
-        placeholder.append('<div style="position:absolute;left:' + (o.left + 4) + 'px;top:' + o.top + 'px;color:#666;font-size:smaller">9am</div>');
-        o = plot.pointOffset({ x: midnight+ (16*60*60*1000), y: -1.2});
-        placeholder.append('<div style="position:absolute;left:' + (o.left + 4) + 'px;top:' + o.top + 'px;color:#666;font-size:smaller">4pm</div>');
-
+       
     });
     function yformatter(v) {
         if (Math.floor(v/60) < -9) return "";
         return Math.abs(Math.floor(v/60)) + " min " + (v == 0 ? "" : (v >0 ? "early":"late"))
     }
-    function showTooltip(x, y, contents) {
-        $('<div id="tooltip">' + contents + '</div>').css( {
-            position: 'absolute',
-            display: 'none',
-            top: y + 5,
-            left: x + 5,
-            border: '1px solid #fdd',
-            padding: '2px',
-            'background-color': '#fee',
-            opacity: 0.80
-        }).appendTo("body").fadeIn(200);
-    }
- 
-    var previousPoint = null;
-    $("#placeholder").bind("plothover", function (event, pos, item) {
-        $("#x").text(pos.x.toFixed(2));
-        $("#y").text(pos.y.toFixed(2));
- 
-        if (item) {
-            if (previousPoint != item.dataIndex) {
-                previousPoint = item.dataIndex;
-                    
-                $("#tooltip").remove();
-                var x = item.datapoint[0].toFixed(2),
-                y = item.datapoint[1].toFixed(2);
+    function showTooltip(point) {
+
                     
                 var d = new Date();
-                d.setTime(x);
+                d.setTime(point.x);
                 var time = d.getUTCHours() +':'+ (d.getUTCMinutes().toString().length == 1 ? '0'+ d.getMinutes():  d.getUTCMinutes())
 
                     
-                showTooltip(item.pageX, item.pageY,
-                item.series.label + " at "+ time +" = " + Math.abs(new Number(y/60).toFixed(2))+" minutes "+(y >0 ? "early":"late"));
-            }
-        }
-        else {
-            $("#tooltip").remove();
-            previousPoint = null;            
-        }
-    });
+                return  point.series.label + " at "+ time +" = " + Math.abs(new Number(point.y/60).toFixed(2))+" minutes "+(point.y >0 ? "early":"late");
+    }
 
 </script> 

--- a/myway/myway_timeliness_calculate.php
+++ b/myway/myway_timeliness_calculate.php
@@ -95,7 +95,7 @@
     }
     $timeDeltas = Array();
     foreach ($potentialRoutes as $potentialRoute) {
-        echo "Matched route: {$potentialRoute['route_id']} {$potentialRoute['route_short_name']}{$potentialRoute['route_long_name']} {$timing_period}<br>";
+        echo "Matched route: {$potentialRoute['route_id']} {$potentialRoute['route_short_name']} {$timing_period}<br>";
         foreach ($potentialStops as $potentialStop) {
             $stopRoutes = getStopRoutes($potentialStop['stop_id'], $timing_period);
             $foundRoute = Array();

--- a/myway/myway_timeliness_freqdist.php
+++ b/myway/myway_timeliness_freqdist.php
@@ -17,10 +17,10 @@
 include ('../include/common.inc.php');
 include_header("MyWay Deltas", "mywayDelta");
 ?>
-
-    <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../js/flot/excanvas.min.js"></script><![endif]--> 
-
-<script language="javascript" type="text/javascript" src="../js/flot/jquery.flot.js"></script> 
+<!--[if lt IE 9]>
+    <script type="text/javascript" src="../js/FlashCanvas/bin/flashcanvas.js"></script>
+    <![endif]-->
+    <script type="text/javascript" src="../js/flotr2/flotr2.min.js"></script>
 <center><div id="placeholder" style="width:900px;height:550px"></div></center>
 <script type="text/javascript"> 
     $(function () {
@@ -41,9 +41,10 @@
 };
 ?>
 
-        var placeholder = $("#placeholder");
 
-        var plot = $.plot(placeholder, [
+        var placeholder = document.getElementById("placeholder");
+
+        var plot = Flotr.draw(placeholder, [
             {
                 data: d1,
                 bars: { show: true }
@@ -51,7 +52,6 @@
         ],
         {
 
-            grid: { hoverable: true, clickable: true, labelMargin: 17  },
         });
 
     });

--- a/myway/myway_timeliness_route.json.php
+++ b/myway/myway_timeliness_route.json.php
@@ -21,12 +21,12 @@
 header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
 ?>
 {
-"label": "<?php echo $_REQUEST['routeid']; ?>",
+"label": "<?php echo $routename; ?>",
 "data": <?php
-$query = "select * from myway_timingdeltas where route_name = :route_name AND abs(timing_delta) < 2*(select stddev(timing_delta) from myway_timingdeltas)  order by stop_sequence;";
+$query = "select * from myway_timingdeltas where route_name = :route_name 
+AND abs(timing_delta) < 2*(select stddev(timing_delta) from myway_timingdeltas)  order by stop_sequence;";
 $query = $conn->prepare($query);
-$_REQUEST['routeid'].=" ";
-$query->bindParam(':route_name', $_REQUEST['routeid'], PDO::PARAM_STR);
+$query->bindParam(':route_name', $routename, PDO::PARAM_STR);
 
 $query->execute();
 if (!$query) {
@@ -36,6 +36,8 @@
 foreach ($query->fetchAll() as $delta) {
     $points[] = "[{$delta['stop_sequence']}, {$delta['timing_delta']}]";
 };
-echo "[" . implode(",", $points) . "]";
+echo "[" . implode(",", $points) . '],';
 ?>
+"points": { "show" : true }
 }
+

--- a/myway/myway_timeliness_route.php
+++ b/myway/myway_timeliness_route.php
@@ -17,12 +17,12 @@
 include ('../include/common.inc.php');
 include_header("MyWay Deltas", "mywayDelta");
 ?>
-
-    <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../js/flot/excanvas.min.js"></script><![endif]--> 
-
-<script language="javascript" type="text/javascript" src="../js/flot/jquery.flot.js"></script> 
+<!--[if lt IE 9]>
+    <script type="text/javascript" src="../js/FlashCanvas/bin/flashcanvas.js"></script>
+    <![endif]-->
+    <script type="text/javascript" src="../js/flotr2/flotr2.min.js"></script>
 <form method="get" action="">
-    <select id="routeid" name="routeid">
+    <select id="routename" name="routename">
         <?php
         $query = "select distinct route_name from myway_timingdeltas order by route_name";
         $query = $conn->prepare($query);
@@ -38,8 +38,9 @@
     <center><div id="placeholder" style="width:900px;height:550px"></div></center>
     <script type="text/javascript"> 
         $(function () {
+        var placeholder = document.getElementById("placeholder");
 
-            var placeholder = $("#placeholder");
+       
             var data = [];
             var options = {
                 xaxis: {
@@ -47,40 +48,34 @@
                 yaxis: {
                     tickFormatter: yformatter
                 },
-                grid: { hoverable: true, clickable: true, labelMargin: 32   },
-                series: {
-                    lines: { show: false },
-                    points: { show: true }
-                }
+            mouse: { track: true, relative: true, trackFormatter: showTooltip}
+       
             };
     
-            var plot = $.plot(placeholder, data, options);
+            Flotr.draw(placeholder,  data, options);
  
             // fetch one series, adding to what we got
             var alreadyFetched = {};
     
-            $("#routeid").change(function () {
+            $("#routename").change(function () {
                 var select = $(this);
         
                 // find the URL in the link right next to us 
                 //    var dataurl = button.siblings('a').attr('href');
-                var dataurl = "myway_timeliness_route.json.php?routeid=" + select.val();
+                var dataurl = "myway_timeliness_route.json.php?routename=" + select.val();
                 // then fetch the data with jQuery
                 function onDataReceived(series) {
-                    // extract the first coordinate pair so you can see that
-                    // data is now an ordinary Javascript object
-                    var firstcoordinate = '(' + series.data[0][0] + ', ' + series.data[0][1] + ')';
  
       
                     // let's add it to our current data
                     if (!alreadyFetched[series.label]) {
-                        alreadyFetched[series.label] = true;
+                        alreadyFetched[series.label] = true;  
                         data.push(series);
                     }
             
                     // and plot all we got
-                    $.plot(placeholder, data, options);
-                }
+            Flotr.draw(placeholder,  data, options);
+      }
         
                 $.ajax({
                     url: dataurl,
@@ -99,41 +94,12 @@
             if (Math.floor(v/60) < -9) return "";
             return Math.abs(Math.floor(v/60)) + " min " + (v == 0 ? "" : (v >0 ? "early":"late"))
         }
-        function showTooltip(x, y, contents) {
-            $('<div id="tooltip">' + contents + '</div>').css( {
-                position: 'absolute',
-                display: 'none',
-                top: y + 5,
-                left: x + 5,
-                border: '1px solid #fdd',
-                padding: '2px',
-                'background-color': '#fee',
-                opacity: 0.80
-            }).appendTo("body").fadeIn(200);
-        }
- 
-        var previousPoint = null;
-        $("#placeholder").bind("plothover", function (event, pos, item) {
-            $("#x").text(pos.x.toFixed(2));
-            $("#y").text(pos.y.toFixed(2));
- 
-            if (item) {
-                if (previousPoint != item.dataIndex) {
-                    previousPoint = item.dataIndex;
-                    
-                    $("#tooltip").remove();
-                    var x = item.datapoint[0],
-                    y = item.datapoint[1].toFixed(2);
-                    
-                    showTooltip(item.pageX, item.pageY,
-                    item.series.label + " at stop_sequence "+ x +" = " + Math.abs(new Number(y/60).toFixed(2))+" minutes "+(y >0 ? "early":"late"));
-                }
-            }
-            else {
-                $("#tooltip").remove();
-                previousPoint = null;            
-            }
-        });
+        function showTooltip(point) {
+
+             
+                return  point.series.label + "<br> at stop sequence "+ point.x +" = " + Math.abs(new Number(point.y/60).toFixed(2))+" minutes "+(point.y >0 ? "early":"late");
+    }
+
 
     </script> 
 

--- a/myway/myway_timeliness_stop.json.php
+++ b/myway/myway_timeliness_stop.json.php
@@ -42,7 +42,9 @@
     echo "[]";
 }
 else
-    echo "[" . implode(",", $points) . "]";
+    echo "[" . implode(",", $points) . "],";
 ?>
+
+"points": { "show" : true }
 }
 

--- a/myway/myway_timeliness_stop.php
+++ b/myway/myway_timeliness_stop.php
@@ -17,10 +17,10 @@
 include ('../include/common.inc.php');
 include_header("MyWay Deltas", "mywayDelta");
 ?>
-
-    <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../js/flot/excanvas.min.js"></script><![endif]--> 
-
-<script language="javascript" type="text/javascript" src="../js/flot/jquery.flot.js"></script> 
+<!--[if lt IE 9]>
+    <script type="text/javascript" src="../js/FlashCanvas/bin/flashcanvas.js"></script>
+    <![endif]-->
+    <script type="text/javascript" src="../js/flotr2/flotr2.min.js"></script>
 <form method="get" action="">
     <select id="stopid" name="stopid">
         <?php
@@ -41,8 +41,7 @@
             d.setUTCMinutes(0);
             d.setUTCHours(0);
             var midnight = d.getTime();
-
-            var placeholder = $("#placeholder");
+        var placeholder = document.getElementById("placeholder");
             var data = [];
             var options = {
                 xaxis: {
@@ -51,19 +50,12 @@
                 yaxis: {
                     tickFormatter: yformatter
                 },
-                grid: { hoverable: true, clickable: true, labelMargin: 32   },
-                series: {
-                    lines: { show: false },
-                    points: { show: true }
-                }
+            mouse: { track: true, relative: true, trackFormatter: showTooltip}
+       
             };
 
-            var plot = $.plot(placeholder, data, options);
-            var o;
-            o = plot.pointOffset({ x: midnight+ (9*60*60*1000), y: -1.2});
-            placeholder.append('<div style="position:absolute;left:' + (o.left + 4) + 'px;top:' + o.top + 'px;color:#666;font-size:smaller">9am</div>');
-            o = plot.pointOffset({ x: midnight+ (16*60*60*1000), y: -1.2});
-            placeholder.append('<div style="position:absolute;left:' + (o.left + 4) + 'px;top:' + o.top + 'px;color:#666;font-size:smaller">4pm</div>');
+           
+            Flotr.draw(placeholder,  data, options);   
             // fetch one series, adding to what we got
             var alreadyFetched = {};
     
@@ -75,11 +67,6 @@
                 var dataurl = "myway_timeliness_stop.json.php?stopid=" + select.val();
                 // then fetch the data with jQuery
                 function onDataReceived(series) {
-                    // extract the first coordinate pair so you can see that
-                    // data is now an ordinary Javascript object
-                    var firstcoordinate = '(' + series.data[0][0] + ', ' + series.data[0][1] + ')';
- 
-      
                     // let's add it to our current data
                     if (!alreadyFetched[series.label]) {
                         alreadyFetched[series.label] = true;
@@ -87,8 +74,9 @@
                     }
             
                     // and plot all we got
-                    $.plot(placeholder, data, options);
-                }
+            
+            Flotr.draw(placeholder,  data, options);
+        }
         
                 $.ajax({
                     url: dataurl,
@@ -103,46 +91,16 @@
             if (Math.floor(v/60) < -9) return "";
             return Math.abs(Math.floor(v/60)) + " min " + (v == 0 ? "" : (v >0 ? "early":"late"))
         }
-        function showTooltip(x, y, contents) {
-            $('<div id="tooltip">' + contents + '</div>').css( {
-                position: 'absolute',
-                display: 'none',
-                top: y + 5,
-                left: x + 5,
-                border: '1px solid #fdd',
-                padding: '2px',
-                'background-color': '#fee',
-                opacity: 0.80
-            }).appendTo("body").fadeIn(200);
-        }
- 
-        var previousPoint = null;
-        $("#placeholder").bind("plothover", function (event, pos, item) {
-            $("#x").text(pos.x.toFixed(2));
-            $("#y").text(pos.y.toFixed(2));
- 
-            if (item) {
-                if (previousPoint != item.dataIndex) {
-                    previousPoint = item.dataIndex;
-                    
-                    $("#tooltip").remove();
-                    var x = item.datapoint[0].toFixed(2),
-                    y = item.datapoint[1].toFixed(2);
-                    
-                    var d = new Date();
-                    d.setTime(x);
-                    var time = d.getUTCHours() +':'+ (d.getUTCMinutes().toString().length == 1 ? '0'+ d.getMinutes():  d.getUTCMinutes())
+      function showTooltip(point) {
 
                     
-                    showTooltip(item.pageX, item.pageY,
-                    item.series.label + " at "+ time +" = " + Math.abs(new Number(y/60).toFixed(2))+" minutes "+(y >0 ? "early":"late"));
-                }
-            }
-            else {
-                $("#tooltip").remove();
-                previousPoint = null;            
-            }
-        });
+                var d = new Date();
+                d.setTime(point.x);
+                var time = d.getUTCHours() +':'+ (d.getUTCMinutes().toString().length == 1 ? '0'+ d.getMinutes():  d.getUTCMinutes())
+
+                    
+                return  point.series.label + " at "+ time +" = " + Math.abs(new Number(point.y/60).toFixed(2))+" minutes "+(point.y >0 ? "early":"late");
+    }
 
     </script> 
 

--- a/routeList.php
+++ b/routeList.php
@@ -50,17 +50,17 @@
     echo '  <ul data-role="listview" data-filter="true" data-inset="true" >';
     foreach ($routes as $route) {
         $time = getRouteAtStop($route['route_id'], $route['direction_id'], $route['stop_id']);
- $start = getTripStartingPoint($time['trip_id']); 
-    $end = getTripDestination($time['trip_id']);
+        $start = getTripStartingPoint($time['trip_id']);
+        $end = getTripDestination($time['trip_id']);
         //print_r($route);
         echo '<li> <a href="trip.php?routeid=' . $route['route_id'] . '&directionid=' . $route['direction_id'] . '"><h3>' . $route['route_short_name'] . "</h3>
                    
-                <p>" . $time['trip_headsign'] . (strstr($time['trip_headsign'], "bound") === false ? "bound" : "") . " from ".$start['stop_name']." to ".$end['stop_name'] . " (" . ucwords($time['service_id']) . ")</p>";
+                <p>" . $time['trip_headsign'] . (strstr($time['trip_headsign'], "bound") === false ? "bound" : "") . " from " . $start['stop_name'] . " to " . $end['stop_name'] . " (" . ucwords($time['service_id']) . ")</p>";
         $stop = getStop($route['stop_id']);
-echo "<p>Board at ".$stop['stop_name']."</p>";
+        echo "<p>Board at " . $stop['stop_name'] . "</p>";
         echo '<span class="ui-li-count">' . ($time['arrival_time'] ? $time['arrival_time'] : "No more trips today") . "<br>" . floor($route['distance']) . 'm away</span>';
-        
-    echo"       </a></li>\n";
+
+        echo"       </a></li>\n";
     }
 }
 
@@ -92,7 +92,8 @@
 } else if (isset($nearby)) {
     $routes = Array();
     include_header("Routes Nearby", "routeList", true, true);
-    trackEvent("Route Lists", "Routes Nearby", $_SESSION['lat'] . "," . $_SESSION['lon']);
+    if (isset($_SESSION['lat']))
+        trackEvent("Route Lists", "Routes Nearby", $_SESSION['lat'] . "," . $_SESSION['lon']);
     navbar();
     placeSettings();
     if (!isset($_SESSION['lat']) || !isset($_SESSION['lat']) || $_SESSION['lat'] == "" || $_SESSION['lon'] == "") {
@@ -132,7 +133,7 @@
                     $seriesRange[$seriesNum]['max'] = $routeNumber;
                     $seriesRange[$seriesNum]['min'] = $routeNumber;
                 }
-                $routeSeries[$seriesNum][$seriesNum . "-" . $row[1] . "-" . $row[0]] = $row;
+                $routeSeries[$seriesNum][] = null;
             }
         }
         ksort($routeSeries);
@@ -157,7 +158,8 @@
         displayRoutes(getRoutesByDestination($routeDestination));
     } else {
         foreach (getRoutesByDestination() as $destination) {
-            echo '<li><a href="' . curPageURL() . '/routeList.php?routeDestination=' . urlencode($destination['stop_name']) . '">' . $destination['stop_name'] . "... </a></li>\n";
+            echo '<li><a href="' . curPageURL() . '/routeList.php?routeDestination='
+            . urlencode($destination['stop_name']) . '">' . $destination['stop_name'] . "... </a></li>\n";
         }
     }
 }

--- /dev/null
+++ b/rtpis/gtfs-realtime.php
@@ -1,1 +1,85 @@
+<?php
 
+/*
+ *    Copyright 2010,2011 Alexander Sadleir 
+
+  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.
+ */
+include ('../include/common.inc.php');
+function accept_header($header = false) {
+    // http://jrgns.net/parse_http_accept_header
+    $toret = null;
+    $header = $header ? $header : (array_key_exists('HTTP_ACCEPT', $_SERVER) ? $_SERVER['HTTP_ACCEPT']: false);
+    if ($header) {
+        $types = explode(',', $header);
+        $types = array_map('trim', $types);
+        foreach ($types as $one_type) {
+            $one_type = explode(';', $one_type);
+            $type = array_shift($one_type);
+            if ($type) {
+                list($precedence, $tokens) = self::accept_header_options($one_type);
+                list($main_type, $sub_type) = array_map('trim', explode('/', $type));
+                $toret[] = array('main_type' => $main_type, 'sub_type' => $sub_type, 'precedence' => (float)$precedence, 'tokens' => $tokens);
+            }
+        }
+        usort($toret, array('Parser', 'compare_media_ranges'));
+    }
+    return $toret;
+}
+function usage() {
+echo "Usage notes: Must specify format json/protobuf and gtfs-realtime feedtype alerts/updates. If callback is specified, will provide jsonp. Can filter with parmaters filter_class route/stop and filter_id with the id specified in GTFS.";
+die();
+}
+
+$filter_class = (isset($_REQUEST['filter_class']) ? $_REQUEST['filter_class'] : "");
+$filter_id = (isset($_REQUEST['filter_id']) ? $_REQUEST['filter_id']:"");
+
+$json_types =  Array("application/json","application/x-javascript","text/javascript","text/x-javascript","text/x-json");
+if ($_REQUEST['json']) {
+if ($_REQUEST['alerts']) {
+    $return = getServiceAlertsAsJSON($filter_class,$filter_id);
+} else if ($_REQUEST['updates']) {
+    $return = getTripUpdatesAsJSON($filter_class,$filter_id);
+} else {
+	usage();
+}
+    header('Content-Type: application/json; charset=utf8');
+// header('Access-Control-Allow-Origin: http://bus.lambdacomplex.org/');
+    header('Access-Control-Max-Age: 3628800');
+    header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
+    if (isset($_GET['callback'])) {
+        $json = '(' . $return . ');'; //must wrap in parens and end with semicolon
+        //print_r($_GET['callback'] . $json); //callback is prepended for json-p
+    }
+    else {
+        echo $return;
+	}
+} else if ($_REQUEST['protobuf']) {
+if ($_REQUEST['alerts']) {
+    $return = getServiceAlertsAsBinary($filter_class,$filter_id);
+} else if ($_REQUEST['updates']) {
+    $return = getTripUpdatesAsBinary($filter_class,$filter_id);
+} else {
+	usage();
+}
+    header('Content-Type: application/x-protobuf');
+header('Content-Disposition: attachment; filename="'.(isset($_REQUEST['updates'])?"updates.":"alerts.").date("c").'.protobuf"');
+// header('Access-Control-Allow-Origin: http://bus.lambdacomplex.org/');
+    header('Access-Control-Max-Age: 3628800');
+    header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
+        echo $return;
+} else {
+usage();
+}
+?>
+

file:b/rtpis/importer.py (new)
--- /dev/null
+++ b/rtpis/importer.py
@@ -1,1 +1,104 @@
+# info
+# http://stackoverflow.com/questions/4206882/named-entity-recognition-with-preset-list-of-names-for-python-php/4207128#4207128
+# http://alias-i.com/lingpipe/demos/tutorial/ne/read-me.html approximate dist
+# http://streamhacker.com/2008/12/29/how-to-train-a-nltk-chunker/ more training
+# http://www.postgresql.org/docs/9.1/static/pgtrgm.html
 
+# data sources
+# http://twitter.com/#!/ACTEmergencyInf instant site wide
+# http://twitter.com/#!/ACTPol_Traffic
+# http://esa.act.gov.au/feeds/currentincidents.xml
+
+# source: https://gist.github.com/322906/90dea659c04570757cccf0ce1e6d26c9d06f9283
+# to install python -m nltk.downloader punkt
+import nltk
+import tweepy
+import psycopg2
+import pickle
+
+from iniparse import INIConfig
+
+def insert_service_alert_sitewide(heading, message, url):
+        print "NaN"
+
+def insert_service_alert_for_street(streets, heading, message, url):
+    	conn_string = "host='localhost' dbname='energymapper' user='postgres' password='snmc'"
+	# print the connection string we will use to connect
+	print "Connecting to database\n	->%s" % (conn_string)
+	try:
+		# get a connection, if a connect cannot be made an exception will be raised here
+		conn = psycopg2.connect(conn_string)
+
+		# conn.cursor will return a cursor object, you can use this cursor to perform queries
+		cursor = conn.cursor()
+
+		# execute our Query
+		cursor.execute("")
+
+		# retrieve the records from the database
+		records = cursor.fetchall()
+
+  	  	for record in records:
+			ys.append(record[0])
+                # >>> cur.execute("INSERT INTO test (num, data) VALUES (%s, %s)", (42, 'bar'))
+                #>>> cur.statusmessage
+                #'INSERT 0 1'
+	except:
+		# Get the most recent exception
+		exceptionType, exceptionValue, exceptionTraceback = sys.exc_info()
+		# Exit the script and print an error telling what happened.
+		sys.exit("Database connection failed!\n ->%s" % (exceptionValue))
+		
+
+def extract_entity_names(t):
+    entity_names = []
+    
+    if hasattr(t, 'node') and t.node:
+        if t.node == 'NE':
+            entity_names.append(' '.join([child[0] for child in t]))
+        else:
+            for child in t:
+                entity_names.extend(extract_entity_names(child))
+                
+    return entity_names
+
+def extract_names(sample):     
+    sentences = nltk.sent_tokenize(sample)
+    tokenized_sentences = [nltk.word_tokenize(sentence) for sentence in sentences]
+    tagged_sentences = [nltk.pos_tag(sentence) for sentence in tokenized_sentences]
+    chunked_sentences = nltk.batch_ne_chunk(tagged_sentences, binary=True)
+    # chunked/tagged may be enough to just find and match the nouns
+
+    entity_names = []
+    for tree in chunked_sentences:
+        # Print results per sentence
+        # print extract_entity_names(tree)
+        
+        entity_names.extend(extract_entity_names(tree))
+
+    # Print all entity names
+    #print entity_names
+
+    # Print unique entity names
+    print set(entity_names)
+
+cfg = INIConfig(open('/tmp/aws.ini'))
+
+auth = tweepy.OAuthHandler(cfg.api_keys.twitter_consumer_key, cfg.api_keys.twitter_consumer_secret)
+auth.set_access_token(cfg.api_keys.twitter_access_token, cfg.api_keys.twitter_access_token_secret)
+
+#api = tweepy.API(auth)
+api = tweepy.API()
+# If the authentication was successful, you should
+# see the name of the account print out
+#print api.me().name
+# https://github.com/tweepy/tweepy/blob/master/tweepy/api.py
+for status in api.user_timeline(screen_name="ACTPol_Traffic",exclude_replies='true'):
+            print status.text
+            print status.created_at
+            print extract_names(status.text)
+# print api.update_status(status="test")
+
+last_tweet_ids = { "lion": "111", "kitty": "2222" } 
+pickle.dump( last_tweet_ids, open( "save.p", "wb" ) )
+last_tweet_ids = pickle.load( open( "save.p", "rb" ) )

file:b/rtpis/index.php (new)
--- /dev/null
+++ b/rtpis/index.php
@@ -1,1 +1,21 @@
+<?php
+include ('../include/common.inc.php');
 
+include_header("Service Alerts", "index");
+echo '<ul data-role="listview" data-theme="e" data-groupingtheme="e">';
+	
+ if ($_SESSION['authed'] == true) {
+ 	echo'	<li><a href="servicealert_editor.php"><h3>servicealert_editor</h3>
+		<p>servicealert_editor</p></a></li>';
+          }
+ 	echo'	<li><a href="servicealert_viewer.php"><h3>Service Alert Viewer</h3>
+		<p>Browse current network alerts</p></a></li>';
+          
+           echo'  </ul>';
+
+?>	    </div>
+<?php
+include_footer()
+?>
+        
+

file:b/rtpis/punkt.zip (new)
--- /dev/null
+++ b/rtpis/punkt.zip

--- /dev/null
+++ b/rtpis/servicealert_editor.php
@@ -1,1 +1,189 @@
+<?php
+/*
+ *    Copyright 2010,2011 Alexander Sadleir 
 
+  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.
+ */
+include ('../include/common.inc.php');
+auth();
+include_header("Service Alert Editor", "serviceAlertEditor");
+/**
+ * Currently support:
+ * network inform
+ * stop remove: route patch, stop remove
+ * - stop search
+ * street inform: route inform, stop inform
+ * - street search
+ */
+if (isset($_REQUEST['saveedit'])) {
+
+    if ($_REQUEST['saveedit'] != "") {
+        updateServiceAlert($_REQUEST['saveedit'], $_REQUEST);
+    } else {
+        addServiceAlert($_REQUEST);
+    }
+    echo "Saved " . $_REQUEST['saveedit'];
+    die();
+}
+if (isset($_REQUEST['delete'])) {
+    $deleteParts = explode(";", $_REQUEST['delete']);
+    deleteInformedAlert($deleteParts[0], $deleteParts[1], $deleteParts[2]);
+    echo "Deleted network inform for {$deleteParts[0]} ({$deleteParts[1]},{$deleteParts[2]})<br>\n";
+    die();
+}
+if (isset($_REQUEST['networkinform'])) {
+    addInformedAlert($_REQUEST['networkinform'], "agency", "0", "inform");
+    echo "Added network inform for" . $_REQUEST['networkinform'];
+    die();
+}
+if (isset($_REQUEST['stopsearch'])) {
+    addInformedAlert($_REQUEST['stopsearch'], "stop", $_REQUEST['stopid'], "remove");
+    echo "Added stop remove for" . $_REQUEST['stopsearch'] . ", stop" . $_REQUEST['stopid'] . "<br>\n";
+
+    foreach ($service_periods as $sp) {
+        echo "Remove from $sp routes<br>\n";
+        foreach (getStopRoutes($_REQUEST['stopid'], $sp) as $route) {
+            addInformedAlert($_REQUEST['stopsearch'], "route", $route['route_id'], "patch");
+            echo "Added route patch for" . $_REQUEST['stopsearch'] . ", route" . $route['route_id'] . "<br>\n";
+        }
+    }
+    die();
+}
+if (isset($_REQUEST['streetsearch'])) {
+
+    echo "Informing stops of street<br>\n";
+    foreach (getStopsByName($_REQUEST['street']) as $stop) {
+        addInformedAlert($_REQUEST['streetsearch'], "stop", $stop['stop_id'], "inform");
+        echo "Added stop inform for" . $_REQUEST['streetsearch'] . ", stop" . $stop['stop_id'] . " ". $stop['stop_name']."<br>\n";
+
+        foreach ($service_periods as $sp) {
+            echo "Informing $sp routes<br>\n";
+            foreach (getStopRoutes($stop['stop_id'], $sp) as $route) {
+                addInformedAlert($_REQUEST['streetsearch'], "route", $route['route_id'], "inform");
+                echo "Added route inform for stop" . $_REQUEST['streetsearch'] . ", route" . $route['route_id'] . "<br>\n";
+            }
+        }
+    }
+    
+        die();
+}
+?>
+Active and Future Alerts:
+<table>
+    <?php
+    foreach (getFutureAlerts() as $alert) {
+        echo "<tr><td>" . date("c", $alert['start']) . "<br>to<br>" . date("c", $alert['end']) . "</td><td><b>" .$alert['header']."</b><br>". $alert['description'] . '</td><td><a href="?edit=' . $alert['id'] . '">edit</a></td></tr>';
+    }
+    ?>
+</table>
+<?php
+$alert = getServiceAlert((isset($_REQUEST['edit'])?$_REQUEST['edit']:""));
+?>
+<form action="<?php echo basename(__FILE__);
+?>" method="get">
+
+    <div data-role="fieldcontain">
+        <label for="startdate"> Start Date</label>
+        <input type="text" name="startdate" id="startdate" value="<?php
+      if ($alert['start']) {
+          echo date("c", $alert['start']);
+      } else {
+          echo date("c", strtotime("0:00"));
+}
+?>"  />
+    </div>
+    <div data-role="fieldcontain">
+        <label for="enddate"> End Date </label>
+        <input type="text" name="enddate" id="enddate" value="<?php
+               if ($alert['end']) {
+                   echo date("c", $alert['end']);
+               } else {
+                   echo date("c", strtotime("23:59"));
+}
+?>"  />
+    </div>
+    <div data-role="fieldcontain">
+        <label for="header">Header</label>
+        <input type="text" name="header" id="header" value="<?php echo $alert['header']; ?>"  />
+    </div>
+    <div data-role="fieldcontain">
+        <label for="description">Description</label>
+        <textarea name="description"><?php echo $alert['description']; ?></textarea>
+    </div>
+    <div data-role="fieldcontain">
+        <label for="url">URL</label>
+        <input type="text" name="url" id="url" value="<?php echo $alert['url']; ?>"  />
+    </div>
+    <div data-role="fieldcontain">
+        <label for="cause"> Cause:  </label>
+        <select name="cause" id="cause">
+            
+            <?php
+            foreach ($serviceAlertCause as $key => $value) {
+                echo "<option value=\"$key\"" . ($key === $alert['cause'] ? " SELECTED" : "") . '>' . $value . '</option>';
+            }
+            ?>
+        </select></div>
+    <div data-role="fieldcontain">
+        <label for="effect"> Effect:  </label>
+        <select name="effect" id="effect">
+            <?php
+            foreach ($serviceAlertEffect as $key => $value) {
+                echo "<option value=\"$key\"" . ($key === $alert['effect'] ? " SELECTED" : "") . '>' . $value . '</option>';
+            }
+            ?>
+        </select></div>
+    <input type="hidden" name="saveedit" value="<?php if (isset($_REQUEST['edit']))echo $_REQUEST['edit']; ?>"/>
+    <input type="submit" value="Save"/>
+</div></form>
+
+<?php
+if (isset($_REQUEST['edit'])) {
+    echo "Informed Entities for ID {$_REQUEST['edit']}:";
+    echo '<table>';
+    foreach (getInformedAlerts($_REQUEST['edit'], "", "") as $informed) {
+        echo "<tr><td>{$informed['informed_class']}</td><td>{$informed['informed_id']}</td><td>{$informed['informed_action']}" . '</td><td><a href="?delete=' . $_REQUEST['edit'] . ';' . $informed['informed_class'] . ';' . $informed['informed_id'] . '">delete</a></td></tr>';
+    }
+    echo '</table>';
+    ?>
+    <form action="<?php echo basename(__FILE__);
+    ?>" method="get">
+        <input type="hidden" name="networkinform" value="<?php echo $_REQUEST['edit'];
+    ?>"/>
+        <input type="submit" value="Add Network Inform"/>
+    </form>
+    <form action="<?php echo basename(__FILE__);
+    ?>" method="get">
+        <div data-role="fieldcontain">
+            <label for="stopid">StopID to remove</label>
+            <input type="text" name="stopid" />
+        </div>
+        <input type="hidden" name="stopsearch" value="<?php echo $_REQUEST['edit'];
+    ?>"/>
+        <input type="submit" value="Stop Search"/>
+    </form>
+    <form action="<?php echo basename(__FILE__);
+    ?>" method="get">
+        <div data-role="fieldcontain">
+            <label for="street">Street to inform</label>
+            <input type="text" name="street" />
+        </div>
+        <input type="hidden" name="streetsearch" value="<?php echo $_REQUEST['edit'];
+    ?>"/>
+        <input type="submit" value="Street Search"/>
+    </form>
+    <?php
+}
+include_footer();
+?>
+

--- /dev/null
+++ b/rtpis/servicealert_viewer.php
@@ -1,1 +1,53 @@
+<?php
+/*
+ *    Copyright 2010,2011 Alexander Sadleir 
 
+  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.
+ */
+include ('../include/common.inc.php');
+include_header("Service Alert Viewer", "serviceAlertViewer");
+/**
+ * Currently support:
+ * network inform
+ * stop remove: route patch, stop remove
+ * - stop search
+ * street inform: route inform, stop inform
+ * - street search
+ */
+if (!isset($_REQUEST['view'])) {
+
+?>
+Active and Future Alerts:
+<table>
+    <?php
+    foreach (getFutureAlerts() as $alert) {
+        echo "<tr><td>{$alert['header']}</td><td>" . substr($alert['description'], 0, 999) . '</td><td><a href="?view=' . $alert['id'] . '">View</a></td></tr>';
+    }
+    ?>
+</table>
+<?php
+} else {
+$alert = getServiceAlert($_REQUEST['view']);
+echo "<h1>{$alert['header']}</h1>
+<h2> From ".date("c",$alert['start'])." to ".date("c",$alert['end'])."</h2>
+<small>{$alert['description']}</small><br>
+Source: <A href='{$alert['url']}'>{$alert['url']}</a><br>"; 
+    echo "Informed Entities for ID {$_REQUEST['view']}:";
+    echo '<table>';
+    foreach (getInformedAlerts($_REQUEST['view'], "", "") as $informed) {
+        echo "<tr><td>{$informed['informed_class']}</td><td>{$informed['informed_id']}</td><td>{$informed['informed_action']}" . '</td></tr>';
+    }
+    echo '</table>';
+}
+include_footer();
+?>

file:b/rtpis/siri.php (new)
--- /dev/null
+++ b/rtpis/siri.php
@@ -1,1 +1,80 @@
+<?php
 
+/*
+ *    Copyright 2010,2011 Alexander Sadleir 
+
+  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.
+ */
+include ('include/common.inc.php');
+function accept_header($header = false) {
+    // http://jrgns.net/parse_http_accept_header
+    $toret = null;
+    $header = $header ? $header : (array_key_exists('HTTP_ACCEPT', $_SERVER) ? $_SERVER['HTTP_ACCEPT']: false);
+    if ($header) {
+        $types = explode(',', $header);
+        $types = array_map('trim', $types);
+        foreach ($types as $one_type) {
+            $one_type = explode(';', $one_type);
+            $type = array_shift($one_type);
+            if ($type) {
+                list($precedence, $tokens) = self::accept_header_options($one_type);
+                list($main_type, $sub_type) = array_map('trim', explode('/', $type));
+                $toret[] = array('main_type' => $main_type, 'sub_type' => $sub_type, 'precedence' => (float)$precedence, 'tokens' => $tokens);
+            }
+        }
+        usort($toret, array('Parser', 'compare_media_ranges'));
+    }
+    return $toret;
+}
+function usage() {
+echo "Usage notes: Must specify format json/xml. If callback is specified, will provide jsonp. Can filter with parmaters filter_class route/stop and filter_id with the id specified in GTFS."
+die();
+}
+$json_types =  Array("application/json","application/x-javascript","text/javascript","text/x-javascript","text/x-json");
+if ($_REQUEST['json']) {
+if ($_REQUEST['alerts']) {
+    $return = getServiceAlertsAsJSON($_REQUEST['filter_class'], $_REQUEST['filter_id']);
+} else if ($_REQUEST['updates']) {
+    $return = getTripUpdatesAsJSON($_REQUEST['filter_class'], $_REQUEST['filter_id']);
+} else {
+	usage();
+}
+    header('Content-Type: application/json; charset=utf8');
+// header('Access-Control-Allow-Origin: http://bus.lambdacomplex.org/');
+    header('Access-Control-Max-Age: 3628800');
+    header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
+    if (isset($_GET['callback'])) {
+        $json = '(' . $return . ');'; //must wrap in parens and end with semicolon
+        //print_r($_GET['callback'] . $json); //callback is prepended for json-p
+    }
+    else {
+        echo $return;
+	}
+} else if ($_REQUEST['xml']) {
+if ($_REQUEST['alerts']) {
+    $return = getServiceAlertsAsBinary($_REQUEST['filter_class'], $_REQUEST['filter_id']);
+} else if ($_REQUEST['updates']) {
+    $return = getTripUpdatesAsBinary($_REQUEST['filter_class'], $_REQUEST['filter_id']);
+} else {
+	usage();
+}
+    header('Content-Type: application/json; charset=utf8');
+// header('Access-Control-Allow-Origin: http://bus.lambdacomplex.org/');
+    header('Access-Control-Max-Age: 3628800');
+    header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
+        echo $return;
+} else {
+usage();
+}
+?>
+

--- a/servicealerts/importer.py
+++ /dev/null
@@ -1,104 +1,1 @@
-# info
-# http://stackoverflow.com/questions/4206882/named-entity-recognition-with-preset-list-of-names-for-python-php/4207128#4207128
-# http://alias-i.com/lingpipe/demos/tutorial/ne/read-me.html approximate dist
-# http://streamhacker.com/2008/12/29/how-to-train-a-nltk-chunker/ more training
-# http://www.postgresql.org/docs/9.1/static/pgtrgm.html
 
-# data sources
-# http://twitter.com/#!/ACTEmergencyInf instant site wide
-# http://twitter.com/#!/ACTPol_Traffic
-# http://esa.act.gov.au/feeds/currentincidents.xml
-
-# source: https://gist.github.com/322906/90dea659c04570757cccf0ce1e6d26c9d06f9283
-# to install python -m nltk.downloader punkt
-import nltk
-import tweepy
-import psycopg2
-import pickle
-
-from iniparse import INIConfig
-
-def insert_service_alert_sitewide(heading, message, url):
-        print "NaN"
-
-def insert_service_alert_for_street(streets, heading, message, url):
-    	conn_string = "host='localhost' dbname='energymapper' user='postgres' password='snmc'"
-	# print the connection string we will use to connect
-	print "Connecting to database\n	->%s" % (conn_string)
-	try:
-		# get a connection, if a connect cannot be made an exception will be raised here
-		conn = psycopg2.connect(conn_string)
-
-		# conn.cursor will return a cursor object, you can use this cursor to perform queries
-		cursor = conn.cursor()
-
-		# execute our Query
-		cursor.execute("")
-
-		# retrieve the records from the database
-		records = cursor.fetchall()
-
-  	  	for record in records:
-			ys.append(record[0])
-                # >>> cur.execute("INSERT INTO test (num, data) VALUES (%s, %s)", (42, 'bar'))
-                #>>> cur.statusmessage
-                #'INSERT 0 1'
-	except:
-		# Get the most recent exception
-		exceptionType, exceptionValue, exceptionTraceback = sys.exc_info()
-		# Exit the script and print an error telling what happened.
-		sys.exit("Database connection failed!\n ->%s" % (exceptionValue))
-		
-
-def extract_entity_names(t):
-    entity_names = []
-    
-    if hasattr(t, 'node') and t.node:
-        if t.node == 'NE':
-            entity_names.append(' '.join([child[0] for child in t]))
-        else:
-            for child in t:
-                entity_names.extend(extract_entity_names(child))
-                
-    return entity_names
-
-def extract_names(sample):     
-    sentences = nltk.sent_tokenize(sample)
-    tokenized_sentences = [nltk.word_tokenize(sentence) for sentence in sentences]
-    tagged_sentences = [nltk.pos_tag(sentence) for sentence in tokenized_sentences]
-    chunked_sentences = nltk.batch_ne_chunk(tagged_sentences, binary=True)
-    # chunked/tagged may be enough to just find and match the nouns
-
-    entity_names = []
-    for tree in chunked_sentences:
-        # Print results per sentence
-        # print extract_entity_names(tree)
-        
-        entity_names.extend(extract_entity_names(tree))
-
-    # Print all entity names
-    #print entity_names
-
-    # Print unique entity names
-    print set(entity_names)
-
-cfg = INIConfig(open('/tmp/aws.ini'))
-
-auth = tweepy.OAuthHandler(cfg.api_keys.twitter_consumer_key, cfg.api_keys.twitter_consumer_secret)
-auth.set_access_token(cfg.api_keys.twitter_access_token, cfg.api_keys.twitter_access_token_secret)
-
-#api = tweepy.API(auth)
-api = tweepy.API()
-# If the authentication was successful, you should
-# see the name of the account print out
-#print api.me().name
-# https://github.com/tweepy/tweepy/blob/master/tweepy/api.py
-for status in api.user_timeline(screen_name="ACTPol_Traffic",exclude_replies='true'):
-            print status.text
-            print status.created_at
-            print extract_names(status.text)
-# print api.update_status(status="test")
-
-last_tweet_ids = { "lion": "111", "kitty": "2222" } 
-pickle.dump( last_tweet_ids, open( "save.p", "wb" ) )
-last_tweet_ids = pickle.load( open( "save.p", "rb" ) )

file:a/servicealerts/index.php (deleted)
--- a/servicealerts/index.php
+++ /dev/null
@@ -1,21 +1,1 @@
-<?php
-include ('../include/common.inc.php');
 
-include_header("Service Alerts", "index");
-echo '<ul data-role="listview" data-theme="e" data-groupingtheme="e">';
-	
- if ($_SESSION['authed'] == true) {
- 	echo'	<li><a href="servicealert_editor.php"><h3>servicealert_editor</h3>
-		<p>servicealert_editor</p></a></li>';
-          }
- 	echo'	<li><a href="servicealert_viewer.php"><h3>Service Alert Viewer</h3>
-		<p>Browse current network alerts</p></a></li>';
-          
-           echo'  </ul>';
-
-?>	    </div>
-<?php
-include_footer()
-?>
-        
-

file:a/servicealerts/punkt.zip (deleted)
--- a/servicealerts/punkt.zip
+++ /dev/null

--- a/servicealerts/servicealert_editor.php
+++ /dev/null
@@ -1,166 +1,1 @@
-<?php
-/*
- *    Copyright 2010,2011 Alexander Sadleir 
 
-  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.
- */
-include ('../include/common.inc.php');
-auth();
-include_header("Service Alert Editor", "serviceAlertEditor");
-/**
- * Currently support:
- * network inform
- * stop remove: route patch, stop remove
- * - stop search
- * street inform: route inform, stop inform
- * - street search
- */
-if (isset($_REQUEST['saveedit'])) {
-
-    if ($_REQUEST['saveedit'] != "")
-        updateServiceAlert($_REQUEST['saveedit'], $_REQUEST['startdate'], $_REQUEST['enddate'], $_REQUEST['header'], $_REQUEST['description'], $_REQUEST['url']);
-    else
-        addServiceAlert($_REQUEST['startdate'], $_REQUEST['enddate'], $_REQUEST['description'], $_REQUEST['url']);
-    echo "Saved " . $_REQUEST['saveedit'];
-    die();
-}
-if ($_REQUEST['delete']) {
-    $deleteParts = explode(";", $_REQUEST['delete']);
-    deleteInformedAlert($deleteParts[0], $deleteParts[1], $deleteParts[2]);
-    echo "Deleted network inform for {$deleteParts[0]} ({$deleteParts[1]},{$deleteParts[2]})<br>\n";
-    die();
-}
-if ($_REQUEST['networkinform']) {
-    addInformedAlert($_REQUEST['networkinform'], "agency", "0", "inform");
-    echo "Added network inform for" . $_REQUEST['networkinform'];
-    die();
-}
-if ($_REQUEST['stopsearch']) {
-    addInformedAlert($_REQUEST['stopsearch'], "stop", $_REQUEST['stopid'], "remove");
-    echo "Added stop remove for" . $_REQUEST['stopsearch'] . ", stop" . $_REQUEST['stopid'] . "<br>\n";
-
-    foreach ($service_periods as $sp) {
-        echo "Remove from $sp routes<br>\n";
-        foreach (getStopRoutes($_REQUEST['stopid'], $sp) as $route) {
-            addInformedAlert($_REQUEST['stopsearch'], "route", $route['route_id'], "patch");
-            echo "Added route patch for" . $_REQUEST['stopsearch'] . ", route" . $route['route_id'] . "<br>\n";
-        }
-    }
-    die();
-}
-if ($_REQUEST['streetsearch']) {
-
-    echo "Informing stops of street<br>\n";
-    foreach (getStopByName() as $stop) {
-        addInformedAlert($_REQUEST['stopsearch'], "stop", $_REQUEST['stopid'], "inform");
-        echo "Added stop inform for" . $_REQUEST['stopsearch'] . ", stop" . $_REQUEST['stopid'] . "<br>\n";
-
-        foreach ($service_periods as $sp) {
-            echo "Informing $sp routes<br>\n";
-            foreach (getStopRoutes($_REQUEST['stopid'], $sp) as $route) {
-                addInformedAlert($_REQUEST['stopsearch'], "route", $route['route_id'], "inform");
-                echo "Added route inform for stop" . $_REQUEST['stopsearch'] . ", route" . $route['route_id'] . "<br>\n";
-            }
-        }
-        die();
-    }
-}
-?>
-Active and Future Alerts:
-<table>
-    <?php
-    foreach (getFutureAlerts() as $alert) {
-        echo "<tr><td>{$alert['start']}</td><td>{$alert['end']}</td><td>" . substr($alert['description'], 0, 999) . '</td><td><a href="?edit=' . $alert['id'] . '">edit</a></td></tr>';
-    }
-    ?>
-</table>
-<?php
-$alert = getServiceAlert($_REQUEST['edit']);
-?>
-<form action="<?php echo basename(__FILE__);
-?>" method="get">
-
-    <div data-role="fieldcontain">
-        <label for="startdate"> Start Date</label>
-        <input type="text" name="startdate" id="startdate" value="<?php
-      if ($alert['start'])
-          echo $alert['start'];
-      else
-          echo date("c", strtotime("0:00"));
-?>"  />
-    </div>
-    <div data-role="fieldcontain">
-        <label for="enddate"> End Date </label>
-        <input type="text" name="enddate" id="enddate" value="<?php
-      if ($alert['end'])
-          echo $alert['end'];
-      else
-          echo date("c", strtotime("23:59"));
-?>"  />
-    </div>
-    <div data-role="fieldcontain">
-        <label for="header">Header</label>
-        <input type="text" name="header" id="header" value="<?php echo $alert['header']; ?>"  />
-    </div>
-    <div data-role="fieldcontain">
-        <label for="description">Description</label>
-        <textarea name="description">
-<?php echo $alert['description']; ?></textarea>
-    </div>
-    <div data-role="fieldcontain">
-        <label for="url">URL</label>
-        <input type="text" name="url" id="url" value="<?php echo $alert['url']; ?>"  />
-    </div>
-    <input type="hidden" name="saveedit" value="<?php echo $_REQUEST['edit']; ?>"/>
-    <input type="submit" value="Save"/>
-</div></form>
-
-<?php
-if ($_REQUEST['edit']) {
-    echo "Informed Entities for ID {$_REQUEST['edit']}:";
-    echo '<table>';
-    foreach (getInformedAlerts($_REQUEST['edit'], "", "") as $informed) {
-        echo "<tr><td>{$informed['informed_class']}</td><td>{$informed['informed_id']}</td><td>{$informed['informed_action']}" . '</td><td><a href="?delete=' . $_REQUEST['edit'] . ';' . $informed['informed_class'] . ';' . $informed['informed_id'] . '">delete</a></td></tr>';
-    }
-    echo '</table>';
-    ?>
-    <form action="<?php echo basename(__FILE__);
-    ?>" method="get">
-        <input type="hidden" name="networkinform" value="<?php echo $_REQUEST['edit'];
-    ?>"/>
-        <input type="submit" value="Add Network Inform"/>
-    </form>
-    <form action="<?php echo basename(__FILE__);
-    ?>" method="get">
-        <div data-role="fieldcontain">
-            <label for="stopid">StopID to remove</label>
-            <input type="text" name="stopid" />
-        </div>
-        <input type="hidden" name="stopsearch" value="<?php echo $_REQUEST['edit'];
-    ?>"/>
-        <input type="submit" value="Stop Search"/>
-    </form>
-    <form action="<?php echo basename(__FILE__);
-    ?>" method="get">
-        <div data-role="fieldcontain">
-            <label for="street">Street to inform</label>
-            <input type="text" name="street" />
-        </div>
-        <input type="hidden" name="streetsearch" value="<?php echo $_REQUEST['edit'];
-    ?>"/>
-        <input type="submit" value="Street Search"/>
-    </form>
-    <?php
-}
-include_footer();
-?>

--- a/servicealerts/servicealert_viewer.php
+++ /dev/null
@@ -1,53 +1,1 @@
-<?php
-/*
- *    Copyright 2010,2011 Alexander Sadleir 
 
-  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.
- */
-include ('../include/common.inc.php');
-include_header("Service Alert Viewer", "serviceAlertViewer");
-/**
- * Currently support:
- * network inform
- * stop remove: route patch, stop remove
- * - stop search
- * street inform: route inform, stop inform
- * - street search
- */
-if (!isset($_REQUEST['view'])) {
-
-?>
-Active and Future Alerts:
-<table>
-    <?php
-    foreach (getFutureAlerts() as $alert) {
-        echo "<tr><td>{$alert['header']}</td><td>" . substr($alert['description'], 0, 999) . '</td><td><a href="?view=' . $alert['id'] . '">View</a></td></tr>';
-    }
-    ?>
-</table>
-<?php
-} else {
-$alert = getServiceAlert($_REQUEST['view']);
-echo "<h1>{$alert['header']}</h1>
-<h2> From ".date("c",$alert['start'])." to ".date("c",$alert['end'])."</h2>
-<small>{$alert['description']}</small><br>
-Source: <A href='{$alert['url']}'>{$alert['url']}</a><br>"; 
-    echo "Informed Entities for ID {$_REQUEST['view']}:";
-    echo '<table>';
-    foreach (getInformedAlerts($_REQUEST['view'], "", "") as $informed) {
-        echo "<tr><td>{$informed['informed_class']}</td><td>{$informed['informed_id']}</td><td>{$informed['informed_action']}" . '</td></tr>';
-    }
-    echo '</table>';
-}
-include_footer();
-?>

file:a/servicealerts_api.php (deleted)
--- a/servicealerts_api.php
+++ /dev/null
@@ -1,34 +1,1 @@
-<?php
 
-/*
- *    Copyright 2010,2011 Alexander Sadleir 
-
-  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.
- */
-include ('include/common.inc.php');
-
-if (basename(__FILE__) == "servicealerts_api.php") {
-    $return = getServiceAlertsAsJSON($_REQUEST['filter_class'], $_REQUEST['filter_id']);
-    header('Content-Type: text/javascript; charset=utf8');
-// header('Access-Control-Allow-Origin: http://bus.lambdacomplex.org/');
-    header('Access-Control-Max-Age: 3628800');
-    header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
-    if (isset($_GET['callback'])) {
-        $json = '(' . $return . ');'; //must wrap in parens and end with semicolon
-        //print_r($_GET['callback'] . $json); //callback is prepended for json-p
-    }
-    else
-        echo $return;
-}
-?>
-

file:b/setup/busuidb.sh (new)
--- /dev/null
+++ b/setup/busuidb.sh
@@ -1,1 +1,19 @@
+createdb transitdata
+createlang -d transitdata plpgsql
+psql -d transitdata -f /var/www/lib/postgis.sql
+# curl https://github.com/maxious/ACTBus-ui/raw/master/transitdata.cbrfeed.sql.gz -o transitdata.cbrfeed.sql.gz 
+#made with pg_dump transitdata | gzip -c >  transitdata.cbrfeed.sql.gz
+gunzip /var/www/transitdata.cbrfeed.sql.gz
+psql -d transitdata -f /var/www/transitdata.cbrfeed.sql
+#createuser transitdata -SDRP
+#password transitdata
+#psql -d transitdata -c "GRANT SELECT ON TABLE agency,calendar,calendar_dates,routes,stop_times,stops,trips TO transitdata;"
+#psql -d transitdata -c "GRANT SELECT,INSERT ON TABLE myway_observations,myway_timingdeltas,myway_routes,myway_stops TO transitdata;"
+#psql -d transitdata -c	"GRANT SELECT,INSERT,UPDATE ON TABLE servicealerts_alerts,servicealerts_informed TO transitdata;"
+#psql -d transitdata -c	"GRANT USAGE,SELECT ON SEQUENCE servicealerts_alerts_id_seq TO transitdata;"
+##psql -d transitdata -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO transitdata;"
+## INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type")
+##SELECT '', 'public', 'shapes', 'shape_pt', ST_CoordDim(shape_pt), ST_SRID(shape_pt), GeometryType(shape_pt)
+##FROM shapes LIMIT 1;
+php /var/www/updatedb.php
 

file:b/setup/busuiotp.sh (new)
--- /dev/null
+++ b/setup/busuiotp.sh
@@ -1,1 +1,10 @@
+wget http://s3-ap-southeast-1.amazonaws.com/busresources/Graph.obj \
+-O /tmp/Graph.obj
+/etc/init.d/tomcat6 stop
+rm -rfv /usr/share/tomcat6/webapps/opentripplanner*
+wget http://s3-ap-southeast-1.amazonaws.com/busresources/opentripplanner-webapp.war \
+-O /usr/share/tomcat6/webapps/opentripplanner-webapp.war
+wget http://s3-ap-southeast-1.amazonaws.com/busresources/opentripplanner-api-webapp.war \
+-O /usr/share/tomcat6/webapps/opentripplanner-api-webapp.war
+/etc/init.d/tomcat6 restart
 

--- /dev/null
+++ b/setup/busuiotp.testing.sh
@@ -1,1 +1,10 @@
+wget http://s3-ap-southeast-1.amazonaws.com/busresources/testing/Graph.obj \
+-O /tmp/Graph.obj
+/etc/init.d/tomcat6 stop
+rm -rfv /usr/share/tomcat6/webapps/opentripplanner*
+wget http://s3-ap-southeast-1.amazonaws.com/busresources/testing/opentripplanner-webapp.war \
+-O /usr/share/tomcat6/webapps/opentripplanner-webapp.war
+wget http://s3-ap-southeast-1.amazonaws.com/busresources/testing/opentripplanner-api-webapp.war \
+-O /usr/share/tomcat6/webapps/opentripplanner-api-webapp.war
+/etc/init.d/tomcat6 restart
 

file:b/setup/busuiphp.sh (new)
--- /dev/null
+++ b/setup/busuiphp.sh
@@ -1,1 +1,12 @@
+cp /root/aws.php /tmp/
+chmod  777 /var/cache/lighttpd/compress/
 
+chcon -h system_u:object_r:httpd_sys_content_t /var/www
+chcon -R -h root:object_r:httpd_sys_content_t /var/www/*
+
+chcon -R -t httpd_sys_content_rw_t /var/www/labs/tiles
+chmod -R 777 /var/www/labs/tiles
+
+wget http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip \
+-O /var/www/cbrfeed.zip
+

--- /dev/null
+++ b/setup/compress.conf
@@ -1,1 +1,33 @@
+#######################################################################
+##
+##  Output Compression 
+## --------------------
+##
+## see http://www.lighttpd.net/documentation/compress.html
+##
+server.modules += ( "mod_compress" )
 
+##
+## where should the compressed files be cached?
+## see the base config for the declaration of the variable.
+##
+## This directory should be changed per vhost otherwise you can
+## run into trouble with overlapping filenames
+##
+compress.cache-dir         = cache_dir + "/compress"
+
+##
+## FileTypes to compress.
+## 
+#compress.filetype          = ("text/plain", "text/html")
+compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml")
+
+##
+## Maximum filesize that will be compressed.
+## Default is 0, which means unlimited file size.
+## 
+#compress.max-filesize = 0
+
+##
+#######################################################################
+

--- /dev/null
+++ b/setup/data-sources.xml
@@ -1,1 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
 
+        <!-- Single graph -->
+        <import resource="classpath:org/opentripplanner/api/application-context.xml" />
+
+        <bean id="graphBundle" class="org.opentripplanner.model.GraphBundle">
+                <property name="path" value="/tmp/" />
+        </bean>
+
+</beans>
+

file:b/setup/expire.conf (new)
--- /dev/null
+++ b/setup/expire.conf
@@ -1,1 +1,29 @@
+#######################################################################
+##
+##  Expire Module 
+## --------------- 
+##
+## See http://www.lighttpd.net/documentation/expire.html
+##
+server.modules += ( "mod_expire" )
 
+##
+##  assignes a expiration to all files below the specified path. The
+##  specification of the time is made up of:
+##
+##    <access|modification> <number> <years|months|days|hours|minutes|seconds>
+##    
+#expire.url = (
+#  "/buggy/"  => "access 2 hours",
+#  "/images/" => "access plus 1 seconds 2 minutes"
+#)
+etag.use-mtime = "enable"
+etag.use-inode = "disable"
+static-file.etags = "enable"
+$HTTP["url"] =~ "\.(css|js|png|jpg|ico|gif)$" {
+	expire.url = ( "" => "access 7 days" )
+}
+
+##
+#######################################################################
+

--- /dev/null
+++ b/setup/fastcgi.conf
@@ -1,1 +1,144 @@
+#######################################################################
+##
+##  FastCGI Module 
+## --------------- 
+##
+## http://www.lighttpd.net/documentation/fastcgi.html
+##
+server.modules += ( "mod_fastcgi" )
+fastcgi.server             = ( ".php" =>
+                               ( "localhost" =>
+                                 (
+                                   "socket" => 
+"/var/run/lighttpd/php-fastcgi.socket",
+                                   "bin-path" => "/usr/bin/php-cgi"
+                                 )
+                               )
+                            )
+##
+## PHP Example
+## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini.
+##
+## The number of php processes you will get can be easily calculated:
+##
+## num-procs = max-procs * ( 1 + PHP_FCGI_CHILDREN )
+##
+## for the php-num-procs example it means you will get 17*5 = 85 php
+## processes. you always should need this high number for your very
+## busy sites. And if you have a lot of RAM. :)
+##
+#fastcgi.server = ( ".php" =>
+#                   ( "php-local" =>
+#                     (
+#                       "socket" => socket_dir + "/php-fastcgi-1.socket",
+#                       "bin-path" => server_root + "/php-cgi",
+#                       "max-procs" => 1,
+#                       "broken-scriptfilename" => "enable",
+#                     )
+#                   ),
+#                   ( "php-tcp" =>
+#                     (
+#                       "host" => "127.0.0.1",
+#                       "port" => 9999,
+#                       "check-local" => "disable",
+#                       "broken-scriptfilename" => "enable",
+#                     )
+#                   ),
+#
+#                   ( "php-num-procs" =>
+#                     (
+#                       "socket" => socket_dir + "/php-fastcgi-2.socket",
+#                       "bin-path" => server_root + "/php-cgi",
+#                       "bin-environment" => (
+#                         "PHP_FCGI_CHILDREN" => "16",
+#                         "PHP_FCGI_MAX_REQUESTS" => "10000",
+#                       ),
+#                       "max-procs" => 5,
+#                       "broken-scriptfilename" => "enable",
+#                     )
+#                   ),
+#                )
 
+##
+## Ruby on Rails Example
+##
+## Normally you only run one Rails application on one vhost.
+##
+#$HTTP["host"] == "rails1.example.com" {
+#  server.document-root  = server_root + "/rails/someapp/public"
+#  server.error-handler-404 = "/dispatch.fcgi"
+#  fastcgi.server = ( ".fcgi" =>
+#    ("someapp" =>
+#      ( "socket" => socket_dir + "/someapp-fcgi.socket",
+#        "bin-path" => server_root + "/rails/someapp/public/dispatch.fcgi",
+#        "bin-environment" => (
+#              "RAILS_ENV" => "production",
+#              "TMP" => home_dir + "/rails/someapp",
+#        ),
+#      )
+#    )
+#  )
+#}
+
+##
+## Another example with multiple rails applications on one vhost.
+##
+## http://blog.lighttpd.net/articles/2005/11/23/lighttpd-1-4-8-and-multiple-rails-apps
+##
+#$HTTP["host"] == "rails2.example.com" {
+#  $HTTP["url"] =~ "^/someapp1" {
+#    server.document-root  = server_root + "/rails/someapp1/public"
+#    server.error-handler-404 = "/dispatch.fcgi"
+#    fastcgi.server = ( ".fcgi" =>
+#      ("someapp1" =>
+#        ( "socket" => socket_dir + "/someapp1-fcgi.socket",
+#          "bin-path" => server_root + "/rails/someapp1/public/dispatch.fcgi",
+#          "bin-environment" => (
+#                "RAILS_ENV" => "production",
+#                "TMP" => home_dir + "/rails/someapp1",
+#          ),
+#          "strip-request-uri" => "/someapp1/"
+#        )
+#      )
+#    )
+#  }
+#
+#  $HTTP["url"] =~ "^/someapp2" {
+#    server.document-root  = server_root + "/rails/someapp2/public"
+#    server.error-handler-404 = "/dispatch.fcgi"
+#    fastcgi.server = ( ".fcgi" =>
+#      ("someapp2" =>
+#        ( "socket" => socket_dir + "/someapp2-fcgi.socket",
+#          "bin-path" => server_root + "/rails/someapp2/public/dispatch.fcgi",
+#          "bin-environment" => (
+#                "RAILS_ENV" => "production",
+#                "TMP" => home_dir + "/rails/someapp2",
+#          ),
+#          "strip-request-uri" => "/someapp2/"
+#        )
+#      )
+#    )
+#  }
+#}
+
+## chrooted webserver + external PHP
+##
+## $ spawn-fcgi -f /usr/bin/php-cgi -p 2000 -a 127.0.0.1 -C 8
+##
+## webserver chrooted to /srv/www/
+## php running outside the chroot
+#
+#fastcgi.server = ( 
+#  ".php" => (( 
+#    "host" => "127.0.0.1",
+#    "port" => "2000",
+#    "docroot" => "/srv/www/servers/www.example.org/htdocs/"
+#  )))
+#
+#server.chroot = "/srv/www"
+#server.document-root = "/servers/wwww.example.org/htdocs/"
+#
+
+##
+#######################################################################
+

--- /dev/null
+++ b/setup/graph-config.xml
@@ -1,1 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:context="http://www.springframework.org/schema/context"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
 
+    <bean id="graphBundle" class="org.opentripplanner.model.GraphBundle">
+        <property name="path" value="c:\tmp\" />
+    </bean>
+
+    <bean id="gtfsBuilder" class="org.opentripplanner.graph_builder.impl.GtfsGraphBuilderImpl">
+        <property name="gtfsBundles">
+            <bean id="gtfsBundles" class="org.opentripplanner.graph_builder.model.GtfsBundles">
+                <property name="bundles">
+                    <list>
+                        <bean class="org.opentripplanner.graph_builder.model.GtfsBundle">
+                            <property name="path" value="C:\tmp\cbrfeed.zip" />
+                        </bean>
+                    </list>
+                </property>
+            </bean>
+        </property>
+    </bean>
+
+    <bean id="osmBuilder" class="org.opentripplanner.graph_builder.impl.osm.OpenStreetMapGraphBuilderImpl">
+        <property name="provider">
+    <bean class="org.opentripplanner.openstreetmap.impl.AnyFileBasedOpenStreetMapProviderImpl">
+        <property name="path" value="C:\Users\Madoka\Documents\canberra.osm" />
+    </bean>
+        </property>
+    </bean>
+
+    <bean id="transitStreetLink" class="org.opentripplanner.graph_builder.impl.TransitToStreetNetworkGraphBuilderImpl" />
+   <bean id="optimizeTransit" class="org.opentripplanner.graph_builder.impl.OptimizeTransitGraphBuilderImpl" />
+
+    <bean id="graphBuilderTask" class="org.opentripplanner.graph_builder.GraphBuilderTask">
+        <property name="graphBundle" ref="graphBundle" />
+        <property name="graphBuilders">
+            <list>
+                <!-- GTFS comes before OSM, because we use the loaded set of stops to determine our OSM coverage -->
+                <ref bean="gtfsBuilder" />
+                <ref bean="osmBuilder" />
+                <ref bean="transitStreetLink" />
+                <ref bean="optimizeTransit" />
+            </list>
+        </property>
+<property name="modes">
+  <list>
+    <bean class="org.opentripplanner.routing.core.TraverseOptions">
+      <property name="mode" value="WALK" />
+      <property name="optimize" value="QUICK" />
+    </bean>
+      </list>
+    </property>
+    <property name="contractionFactor" value="0.97" /> 
+</bean>
+</beans>

--- /dev/null
+++ b/setup/modules.conf
@@ -1,1 +1,173 @@
+#######################################################################
+##
+##  Modules to load
+## -----------------
+##
+## at least mod_access and mod_accesslog should be loaded
+## all other module should only be loaded if really neccesary
+##
+## - saves some time
+## - saves memory
+##
+## the default module set contains:
+##
+## "mod_indexfile", "mod_dirlisting", "mod_staticfile"
+##
+## you dont have to include those modules in your list
+##
+## Modules, which are pulled in via conf.d/*.conf
+##
+## NOTE: the order of modules is important.
+##
+## - mod_accesslog     -> conf.d/access_log.conf
+## - mod_compress      -> conf.d/compress.conf
+## - mod_status        -> conf.d/status.conf
+## - mod_webdav        -> conf.d/webdav.conf
+## - mod_cml           -> conf.d/cml.conf
+## - mod_evhost        -> conf.d/evhost.conf
+## - mod_simple_vhost  -> conf.d/simple_vhost.conf
+## - mod_mysql_vhost   -> conf.d/mysql_vhost.conf
+## - mod_trigger_b4_dl -> conf.d/trigger_b4_dl.conf
+## - mod_userdir       -> conf.d/userdir.conf
+## - mod_rrdtool       -> conf.d/rrdtool.conf
+## - mod_ssi           -> conf.d/ssi.conf
+## - mod_cgi           -> conf.d/cgi.conf
+## - mod_scgi          -> conf.d/scgi.conf
+## - mod_fastcgi       -> conf.d/fastcgi.conf
+## - mod_proxy         -> conf.d/proxy.conf
+## - mod_secdownload   -> conf.d/secdownload.conf
+## - mod_expire        -> conf.d/expire.conf
+##
 
+server.modules = (
+  "mod_access",
+#  "mod_alias",
+#  "mod_auth",
+#  "mod_evasive",
+#  "mod_redirect",
+#  "mod_rewrite",
+#  "mod_setenv",
+#  "mod_usertrack",
+)
+
+##
+#######################################################################
+
+#######################################################################
+##
+##  Config for various Modules
+##
+
+##
+## mod_ssi
+##
+#include "conf.d/ssi.conf"
+
+##
+## mod_status
+##
+#include "conf.d/status.conf"
+
+##
+## mod_webdav
+##
+#include "conf.d/webdav.conf"
+
+##
+## mod_compress
+##
+include "conf.d/compress.conf"
+
+##
+## mod_userdir
+##
+#include "conf.d/userdir.conf"
+
+##
+## mod_magnet
+##
+#include "conf.d/magnet.conf"
+
+##
+## mod_cml
+##
+#include "conf.d/cml.conf"
+
+##
+## mod_rrdtool
+##
+#include "conf.d/rrdtool.conf"
+
+##
+## mod_proxy
+##
+#include "conf.d/proxy.conf"
+
+##
+## mod_expire
+##
+include "conf.d/expire.conf"
+
+##
+## mod_secdownload
+##
+#include "conf.d/secdownload.conf"
+
+##
+#######################################################################
+
+#######################################################################
+##
+## CGI modules
+##
+
+##
+## SCGI (mod_scgi)
+##
+#include "conf.d/scgi.conf"
+
+##
+## FastCGI (mod_fastcgi)
+##
+include "conf.d/fastcgi.conf"
+
+##
+## plain old CGI (mod_cgi)
+##
+#include "conf.d/cgi.conf"
+
+##
+#######################################################################
+
+#######################################################################
+##
+## VHost Modules
+##
+##  Only load ONE of them!
+## ========================
+##
+
+##
+## You can use conditionals for vhosts aswell.
+## 
+## see http://www.lighttpd.net/documentation/configuration.html
+##
+
+##
+## mod_evhost
+##
+#include "conf.d/evhost.conf"
+
+##
+## mod_simple_vhost
+##
+#include "conf.d/simple_vhost.conf"
+
+##
+## mod_mysql_vhost
+##
+#include "conf.d/mysql_vhost.conf"
+
+##
+#######################################################################
+

file:b/setup/pg_hba.conf (new)
--- /dev/null
+++ b/setup/pg_hba.conf
@@ -1,1 +1,77 @@
+# PostgreSQL Client Authentication Configuration File
+# ===================================================
+#
+# Refer to the "Client Authentication" section in the
+# PostgreSQL documentation for a complete description
+# of this file.  A short synopsis follows.
+#
+# This file controls: which hosts are allowed to connect, how clients
+# are authenticated, which PostgreSQL user names they can use, which
+# databases they can access.  Records take one of these forms:
+#
+# local      DATABASE  USER  METHOD  [OPTIONS]
+# host       DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTIONS]
+# hostssl    DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTIONS]
+# hostnossl  DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTIONS]
+#
+# (The uppercase items must be replaced by actual values.)
+#
+# The first field is the connection type: "local" is a Unix-domain socket,
+# "host" is either a plain or SSL-encrypted TCP/IP socket, "hostssl" is an
+# SSL-encrypted TCP/IP socket, and "hostnossl" is a plain TCP/IP socket.
+#
+# DATABASE can be "all", "sameuser", "samerole", a database name, or
+# a comma-separated list thereof.
+#
+# USER can be "all", a user name, a group name prefixed with "+", or
+# a comma-separated list thereof.  In both the DATABASE and USER fields
+# you can also write a file name prefixed with "@" to include names from
+# a separate file.
+#
+# CIDR-ADDRESS specifies the set of hosts the record matches.
+# It is made up of an IP address and a CIDR mask that is an integer
+# (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that specifies
+# the number of significant bits in the mask.  Alternatively, you can write
+# an IP address and netmask in separate columns to specify the set of hosts.
+#
+# METHOD can be "trust", "reject", "md5", "password", "gss", "sspi", "krb5",
+# "ident", "pam", "ldap" or "cert".  Note that "password" sends passwords
+# in clear text; "md5" is preferred since it sends encrypted passwords.
+#
+# OPTIONS are a set of options for the authentication in the format
+# NAME=VALUE. The available options depend on the different authentication
+# methods - refer to the "Client Authentication" section in the documentation
+# for a list of which options are available for which authentication methods.
+#
+# Database and user names containing spaces, commas, quotes and other special
+# characters must be quoted. Quoting one of the keywords "all", "sameuser" or
+# "samerole" makes the name lose its special character, and just match a
+# database or username with that name.
+#
+# This file is read on server startup and when the postmaster receives
+# a SIGHUP signal.  If you edit the file on a running system, you have
+# to SIGHUP the postmaster for the changes to take effect.  You can use
+# "pg_ctl reload" to do that.
 
+# Put your actual configuration here
+# ----------------------------------
+#
+# If you want to allow non-local connections, you need to add more
+# "host" records. In that case you will also need to make PostgreSQL listen
+# on a non-local interface via the listen_addresses configuration parameter,
+# or via the -i or -h command line switches.
+#
+
+
+
+# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
+
+# "local" is for Unix domain socket connections only
+local   all         all                               trust
+# IPv4 local connections:
+host    all         all         127.0.0.1/32          trust
+# IPv6 local connections:
+host    all         all         ::1/128               trust
+#Allow any IP to connect, with a password:
+host    all         all         0.0.0.0          0.0.0.0      md5
+

file:b/setup/php.ini (new)
--- /dev/null
+++ b/setup/php.ini
@@ -1,1 +1,1662 @@
-
+[PHP]
+
+date.timezone = "Australia/Sydney"
+
+;;;;;;;;;;;;;;;;;;;
+; About php.ini   ;
+;;;;;;;;;;;;;;;;;;;
+; PHP's initialization file, generally called php.ini, is responsible for
+; configuring many of the aspects of PHP's behavior.
+
+; PHP attempts to find and load this configuration from a number of locations.
+; The following is a summary of its search order:
+; 1. SAPI module specific location.
+; 2. The PHPRC environment variable. (As of PHP 5.2.0)
+; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0)
+; 4. Current working directory (except CLI)
+; 5. The web server's directory (for SAPI modules), or directory of PHP
+; (otherwise in Windows)
+; 6. The directory from the --with-config-file-path compile time option, or the
+; Windows directory (C:\windows or C:\winnt)
+; See the PHP docs for more specific information.
+; http://www.php.net/manual/en/configuration.file.php
+
+; The syntax of the file is extremely simple.  Whitespace and Lines
+; beginning with a semicolon are silently ignored (as you probably guessed).
+; Section headers (e.g. [Foo]) are also silently ignored, even though
+; they might mean something in the future. 
+
+; Directives following the section heading [PATH=/www/mysite] only
+; apply to PHP files in the /www/mysite directory.  Directives
+; following the section heading [HOST=www.example.com] only apply to
+; PHP files served from www.example.com.  Directives set in these
+; special sections cannot be overridden by user-defined INI files or
+; at runtime. Currently, [PATH=] and [HOST=] sections only work under
+; CGI/FastCGI.
+; http://www.php.net/manual/en/ini.sections.php
+
+; Directives are specified using the following syntax:
+; directive = value
+; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
+; Directives are variables used to configure PHP or PHP extensions.
+; There is no name validation.  If PHP can't find an expected
+; directive because it is not set or is mistyped, a default value will be used.
+
+; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
+; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
+; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a
+; previously set variable or directive (e.g. ${foo})
+
+; Expressions in the INI file are limited to bitwise operators and parentheses:
+; |  bitwise OR
+; ^  bitwise XOR
+; &  bitwise AND
+; ~  bitwise NOT
+; !  boolean NOT
+
+; Boolean flags can be turned on using the values 1, On, True or Yes.
+; They can be turned off using the values 0, Off, False or No.
+
+; An empty string can be denoted by simply not writing anything after the equal
+; sign, or by using the None keyword:
+
+;  foo =         ; sets foo to an empty string
+;  foo = None    ; sets foo to an empty string
+;  foo = "None"  ; sets foo to the string 'None'
+
+; If you use constants in your value, and these constants belong to a
+; dynamically loaded extension (either a PHP extension or a Zend extension),
+; you may only use these constants *after* the line that loads the extension.
+
+;;;;;;;;;;;;;;;;;;;
+; About this file ;
+;;;;;;;;;;;;;;;;;;;
+; PHP comes packaged with two INI files. One that is recommended to be used
+; in production environments and one that is recommended to be used in
+; development environments.
+
+; php.ini-production contains settings which hold security, performance and
+; best practices at its core. But please be aware, these settings may break
+; compatibility with older or less security conscience applications. We
+; recommending using the production ini in production and testing environments.
+
+; php.ini-development is very similar to its production variant, except it's
+; much more verbose when it comes to errors. We recommending using the
+; development version only in development environments as errors shown to
+; application users can inadvertently leak otherwise secure information.
+
+; This 2 files are provided, by RPM, in /usr/share/doc/php-common-*/
+; File used by RPM (the /etc/php.ini) is mainly the php.ini-production
+
+;;;;;;;;;;;;;;;;;;;
+; Quick Reference ;
+;;;;;;;;;;;;;;;;;;;
+; The following are all the settings which are different in either the production
+; or development versions of the INIs with respect to PHP's default behavior.
+; Please see the actual settings later in the document for more details as to why
+; we recommend these changes in PHP's behavior.
+
+; allow_call_time_pass_reference
+;   Default Value: On
+;   Development Value: Off
+;   Production Value: Off
+
+; display_errors
+;   Default Value: On
+;   Development Value: On
+;   Production Value: Off
+
+; display_startup_errors
+;   Default Value: Off
+;   Development Value: On
+;   Production Value: Off
+
+; error_reporting
+;   Default Value: E_ALL & ~E_NOTICE
+;   Development Value: E_ALL | E_STRICT
+;   Production Value: E_ALL & ~E_DEPRECATED
+
+; html_errors
+;   Default Value: On
+;   Development Value: On
+;   Production value: Off
+
+; log_errors
+;   Default Value: Off
+;   Development Value: On
+;   Production Value: On
+
+; magic_quotes_gpc
+;   Default Value: On
+;   Development Value: Off
+;   Production Value: Off
+
+; max_input_time
+;   Default Value: -1 (Unlimited)
+;   Development Value: 60 (60 seconds)
+;   Production Value: 60 (60 seconds)
+
+; output_buffering
+;   Default Value: Off
+;   Development Value: 4096
+;   Production Value: 4096
+
+; register_argc_argv
+;   Default Value: On
+;   Development Value: Off
+;   Production Value: Off
+
+; register_long_arrays
+;   Default Value: On
+;   Development Value: Off
+;   Production Value: Off
+
+; request_order
+;   Default Value: None
+;   Development Value: "GP"
+;   Production Value: "GP"
+
+; session.bug_compat_42
+;   Default Value: On
+;   Development Value: On
+;   Production Value: Off
+
+; session.bug_compat_warn
+;   Default Value: On
+;   Development Value: On
+;   Production Value: Off
+
+; session.gc_divisor
+;   Default Value: 100
+;   Development Value: 1000
+;   Production Value: 1000
+
+; session.hash_bits_per_character
+;   Default Value: 4
+;   Development Value: 5
+;   Production Value: 5
+
+; short_open_tag
+;   Default Value: On
+;   Development Value: Off
+;   Production Value: Off
+
+; track_errors
+;   Default Value: Off
+;   Development Value: On
+;   Production Value: Off
+
+; url_rewriter.tags
+;   Default Value: "a=href,area=href,frame=src,form=,fieldset="
+;   Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
+;   Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
+
+; variables_order
+;   Default Value: "EGPCS"
+;   Development Value: "GPCS"
+;   Production Value: "GPCS"
+
+;;;;;;;;;;;;;;;;;;;;
+; php.ini Options  ;
+;;;;;;;;;;;;;;;;;;;;
+; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini"
+;user_ini.filename = ".user.ini"
+
+; To disable this feature set this option to empty value
+;user_ini.filename =
+
+; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes)
+;user_ini.cache_ttl = 300
+
+;;;;;;;;;;;;;;;;;;;;
+; Language Options ;
+;;;;;;;;;;;;;;;;;;;;
+
+; Enable the PHP scripting language engine under Apache.
+; http://www.php.net/manual/en/apache.configuration.php#ini.engine
+engine = On
+
+; This directive determines whether or not PHP will recognize code between
+; <? and ?> tags as PHP source which should be processed as such. It's been
+; recommended for several years that you not use the short tag "short cut" and
+; instead to use the full <?php and ?> tag combination. With the wide spread use
+; of XML and use of these tags by other languages, the server can become easily
+; confused and end up parsing the wrong code in the wrong context. But because
+; this short cut has been a feature for such a long time, it's currently still
+; supported for backwards compatibility, but we recommend you don't use them.
+; Default Value: On
+; Development Value: Off
+; Production Value: Off
+; http://www.php.net/manual/en/ini.core.php#ini.short-open-tag
+short_open_tag = Off
+
+; Allow ASP-style <% %> tags.
+; http://www.php.net/manual/en/ini.core.php#ini.asp-tags
+asp_tags = Off
+
+; The number of significant digits displayed in floating point numbers.
+; http://www.php.net/manual/en/ini.core.php#ini.precision
+precision = 14
+
+; Enforce year 2000 compliance (will cause problems with non-compliant browsers)
+; http://www.php.net/manual/en/ini.core.php#ini.y2k-compliance
+y2k_compliance = On
+
+; Output buffering is a mechanism for controlling how much output data
+; (excluding headers and cookies) PHP should keep internally before pushing that
+; data to the client. If your application's output exceeds this setting, PHP
+; will send that data in chunks of roughly the size you specify.
+; Turning on this setting and managing its maximum buffer size can yield some
+; interesting side-effects depending on your application and web server.
+; You may be able to send headers and cookies after you've already sent output
+; through print or echo. You also may see performance benefits if your server is
+; emitting less packets due to buffered output versus PHP streaming the output
+; as it gets it. On production servers, 4096 bytes is a good setting for performance
+; reasons.
+; Note: Output buffering can also be controlled via Output Buffering Control
+;   functions.
+; Possible Values:
+;   On = Enabled and buffer is unlimited. (Use with caution)
+;   Off = Disabled
+;   Integer = Enables the buffer and sets its maximum size in bytes.
+; Default Value: Off
+; Development Value: 4096
+; Production Value: 4096
+; http://www.php.net/manual/en/outcontrol.configuration.php#ini.output-buffering
+output_buffering = 4096
+
+; You can redirect all of the output of your scripts to a function.  For
+; example, if you set output_handler to "mb_output_handler", character
+; encoding will be transparently converted to the specified encoding.
+; Setting any output handler automatically turns on output buffering.
+; Note: People who wrote portable scripts should not depend on this ini
+;   directive. Instead, explicitly set the output handler using ob_start().
+;   Using this ini directive may cause problems unless you know what script
+;   is doing.
+; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
+;   and you cannot use both "ob_gzhandler" and "zlib.output_compression".
+; Note: output_handler must be empty if this is set 'On' !!!!
+;   Instead you must use zlib.output_handler.
+; http://www.php.net/manual/en/outcontrol.configuration.php#ini.output-handler
+;output_handler =
+
+; Transparent output compression using the zlib library
+; Valid values for this option are 'off', 'on', or a specific buffer size
+; to be used for compression (default is 4KB)
+; Note: Resulting chunk size may vary due to nature of compression. PHP
+;   outputs chunks that are few hundreds bytes each as a result of
+;   compression. If you prefer a larger chunk size for better
+;   performance, enable output_buffering in addition.
+; Note: You need to use zlib.output_handler instead of the standard
+;   output_handler, or otherwise the output will be corrupted.
+; http://www.php.net/manual/en/zlib.configuration.php#ini.zlib.output-compression
+zlib.output_compression = on
+
+; http://www.php.net/manual/en/zlib.configuration.php#ini.zlib.output-compression-level
+;zlib.output_compression_level = -1
+
+; You cannot specify additional output handlers if zlib.output_compression
+; is activated here. This setting does the same as output_handler but in
+; a different order.
+; http://www.php.net/manual/en/zlib.configuration.php#ini.zlib.output-handler
+;zlib.output_handler =
+
+; Implicit flush tells PHP to tell the output layer to flush itself
+; automatically after every output block.  This is equivalent to calling the
+; PHP function flush() after each and every call to print() or echo() and each
+; and every HTML block.  Turning this option on has serious performance
+; implications and is generally recommended for debugging purposes only.
+; http://www.php.net/manual/en/outcontrol.configuration.php#ini.implicit-flush
+implicit_flush = Off
+
+; The unserialize callback function will be called (with the undefined class'
+; name as parameter), if the unserializer finds an undefined class
+; which should be instantiated. A warning appears if the specified function is
+; not defined, or if the function doesn't include/implement the missing class.
+; So only set this entry, if you really want to implement such a
+; callback-function.
+unserialize_callback_func =
+
+; When floats & doubles are serialized store serialize_precision significant
+; digits after the floating point. The default value ensures that when floats
+; are decoded with unserialize, the data will remain the same.
+serialize_precision = 100
+
+; This directive allows you to enable and disable warnings which PHP will issue
+; if you pass a value by reference at function call time. Passing values by
+; reference at function call time is a deprecated feature which will be removed
+; from PHP at some point in the near future. The acceptable method for passing a
+; value by reference to a function is by declaring the reference in the functions
+; definition, not at call time. This directive does not disable this feature, it
+; only determines whether PHP will warn you about it or not. These warnings
+; should enabled in development environments only.
+; Default Value: On (Suppress warnings)
+; Development Value: Off (Issue warnings)
+; Production Value: Off (Issue warnings)
+; http://www.php.net/manual/en/ini.core.php#ini.allow-call-time-pass-reference
+allow_call_time_pass_reference = Off
+
+; Safe Mode
+; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode
+safe_mode = Off
+
+; By default, Safe Mode does a UID compare check when
+; opening files. If you want to relax this to a GID compare,
+; then turn on safe_mode_gid.
+; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-gid
+safe_mode_gid = Off
+
+; When safe_mode is on, UID/GID checks are bypassed when
+; including files from this directory and its subdirectories.
+; (directory must also be in include_path or full path must
+; be used when including)
+; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-include-dir
+safe_mode_include_dir =
+
+; When safe_mode is on, only executables located in the safe_mode_exec_dir
+; will be allowed to be executed via the exec family of functions.
+; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-exec-dir
+safe_mode_exec_dir =
+
+; Setting certain environment variables may be a potential security breach.
+; This directive contains a comma-delimited list of prefixes.  In Safe Mode,
+; the user may only alter environment variables whose names begin with the
+; prefixes supplied here.  By default, users will only be able to set
+; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR).
+; Note:  If this directive is empty, PHP will let the user modify ANY
+;   environment variable!
+; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-allowed-env-vars
+safe_mode_allowed_env_vars = PHP_
+
+; This directive contains a comma-delimited list of environment variables that
+; the end user won't be able to change using putenv().  These variables will be
+; protected even if safe_mode_allowed_env_vars is set to allow to change them.
+; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-protected-env-vars
+safe_mode_protected_env_vars = LD_LIBRARY_PATH
+
+; open_basedir, if set, limits all file operations to the defined directory
+; and below.  This directive makes most sense if used in a per-directory
+; or per-virtualhost web server configuration file. This directive is
+; *NOT* affected by whether Safe Mode is turned On or Off.
+; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.open-basedir
+;open_basedir =
+
+; This directive allows you to disable certain functions for security reasons.
+; It receives a comma-delimited list of function names. This directive is
+; *NOT* affected by whether Safe Mode is turned On or Off.
+; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.disable-functions
+disable_functions =
+
+; This directive allows you to disable certain classes for security reasons.
+; It receives a comma-delimited list of class names. This directive is
+; *NOT* affected by whether Safe Mode is turned On or Off.
+; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.disable-classes
+disable_classes =
+
+; Colors for Syntax Highlighting mode.  Anything that's acceptable in
+; <span style="color: ???????"> would work.
+; http://www.php.net/manual/en/misc.configuration.php#ini.syntax-highlighting
+;highlight.string  = #DD0000
+;highlight.comment = #FF9900
+;highlight.keyword = #007700
+;highlight.bg      = #FFFFFF
+;highlight.default = #0000BB
+;highlight.html    = #000000
+
+; If enabled, the request will be allowed to complete even if the user aborts
+; the request. Consider enabling it if executing long requests, which may end up
+; being interrupted by the user or a browser timing out. PHP's default behavior
+; is to disable this feature.
+; http://www.php.net/manual/en/misc.configuration.php#ini.ignore-user-abort
+;ignore_user_abort = On
+
+; Determines the size of the realpath cache to be used by PHP. This value should
+; be increased on systems where PHP opens many files to reflect the quantity of
+; the file operations performed.
+; http://www.php.net/manual/en/ini.core.php#ini.realpath-cache-size
+;realpath_cache_size = 16k
+
+; Duration of time, in seconds for which to cache realpath information for a given
+; file or directory. For systems with rarely changing files, consider increasing this
+; value.
+; http://www.php.net/manual/en/ini.core.php#ini.realpath-cache-ttl
+;realpath_cache_ttl = 120
+
+;;;;;;;;;;;;;;;;;
+; Miscellaneous ;
+;;;;;;;;;;;;;;;;;
+
+; Decides whether PHP may expose the fact that it is installed on the server
+; (e.g. by adding its signature to the Web server header).  It is no security
+; threat in any way, but it makes it possible to determine whether you use PHP
+; on your server or not.
+; http://www.php.net/manual/en/ini.core.php#ini.expose-php
+expose_php = On
+
+;;;;;;;;;;;;;;;;;;;
+; Resource Limits ;
+;;;;;;;;;;;;;;;;;;;
+
+; Maximum execution time of each script, in seconds
+; http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time
+max_execution_time = 30     
+
+; Maximum amount of time each script may spend parsing request data. It's a good
+; idea to limit this time on productions servers in order to eliminate unexpectedly
+; long running scripts. 
+; Default Value: -1 (Unlimited)
+; Development Value: 60 (60 seconds)
+; Production Value: 60 (60 seconds)
+; http://www.php.net/manual/en/info.configuration.php#ini.max-input-time
+max_input_time = 60
+
+; Maximum input variable nesting level
+; http://www.php.net/manual/en/info.configuration.php#ini.max-input-nesting-level
+;max_input_nesting_level = 64
+
+; Maximum amount of memory a script may consume (128MB)
+; http://www.php.net/manual/en/ini.core.php#ini.memory-limit
+memory_limit = 128M
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Error handling and logging ;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+; This directive informs PHP of which errors, warnings and notices you would like
+; it to take action for. The recommended way of setting values for this
+; directive is through the use of the error level constants and bitwise
+; operators. The error level constants are below here for convenience as well as
+; some common settings and their meanings.
+; By default, PHP is set to take action on all errors, notices and warnings EXCEPT
+; those related to E_NOTICE and E_STRICT, which together cover best practices and
+; recommended coding standards in PHP. For performance reasons, this is the
+; recommend error reporting setting. Your production server shouldn't be wasting
+; resources complaining about best practices and coding standards. That's what
+; development servers and development settings are for.
+; Note: The php.ini-development file has this setting as E_ALL | E_STRICT. This
+; means it pretty much reports everything which is exactly what you want during
+; development and early testing.
+;
+; Error Level Constants:
+; E_ALL             - All errors and warnings (includes E_STRICT as of PHP 6.0.0)
+; E_ERROR           - fatal run-time errors
+; E_RECOVERABLE_ERROR  - almost fatal run-time errors
+; E_WARNING         - run-time warnings (non-fatal errors)
+; E_PARSE           - compile-time parse errors
+; E_NOTICE          - run-time notices (these are warnings which often result
+;                     from a bug in your code, but it's possible that it was
+;                     intentional (e.g., using an uninitialized variable and
+;                     relying on the fact it's automatically initialized to an
+;                     empty string)
+; E_STRICT          - run-time notices, enable to have PHP suggest changes
+;                     to your code which will ensure the best interoperability
+;                     and forward compatibility of your code
+; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
+; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
+;                     initial startup
+; E_COMPILE_ERROR   - fatal compile-time errors
+; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
+; E_USER_ERROR      - user-generated error message
+; E_USER_WARNING    - user-generated warning message
+; E_USER_NOTICE     - user-generated notice message
+; E_DEPRECATED      - warn about code that will not work in future versions
+;                     of PHP
+; E_USER_DEPRECATED - user-generated deprecation warnings
+;
+; Common Values:
+;   E_ALL & ~E_NOTICE  (Show all errors, except for notices and coding standards warnings.)
+;   E_ALL & ~E_NOTICE | E_STRICT  (Show all errors, except for notices)
+;   E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR  (Show only errors)
+;   E_ALL | E_STRICT  (Show all errors, warnings and notices including coding standards.)
+; Default Value: E_ALL & ~E_NOTICE
+; Development Value: E_ALL | E_STRICT
+; Production Value: E_ALL & ~E_DEPRECATED
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting
+error_reporting = E_ALL & ~E_DEPRECATED
+
+; This directive controls whether or not and where PHP will output errors,
+; notices and warnings too. Error output is very useful during development, but
+; it could be very dangerous in production environments. Depending on the code
+; which is triggering the error, sensitive information could potentially leak
+; out of your application such as database usernames and passwords or worse.
+; It's recommended that errors be logged on production servers rather than
+; having the errors sent to STDOUT.
+; Possible Values:
+;   Off = Do not display any errors 
+;   stderr = Display errors to STDERR (affects only CGI/CLI binaries!)   
+;   On or stdout = Display errors to STDOUT
+; Default Value: On
+; Development Value: On
+; Production Value: Off
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors
+display_errors = Off
+
+; The display of errors which occur during PHP's startup sequence are handled
+; separately from display_errors. PHP's default behavior is to suppress those
+; errors from clients. Turning the display of startup errors on can be useful in
+; debugging configuration problems. But, it's strongly recommended that you
+; leave this setting off on production servers.
+; Default Value: Off
+; Development Value: On
+; Production Value: Off
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-startup-errors
+display_startup_errors = Off
+
+; Besides displaying errors, PHP can also log errors to locations such as a
+; server-specific log, STDERR, or a location specified by the error_log
+; directive found below. While errors should not be displayed on productions
+; servers they should still be monitored and logging is a great way to do that.
+; Default Value: Off
+; Development Value: On
+; Production Value: On
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.log-errors
+log_errors = On
+
+; Set maximum length of log_errors. In error_log information about the source is
+; added. The default is 1024 and 0 allows to not apply any maximum length at all.
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.log-errors-max-len
+log_errors_max_len = 1024
+
+; Do not log repeated messages. Repeated errors must occur in same file on same
+; line unless ignore_repeated_source is set true.
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.ignore-repeated-errors
+ignore_repeated_errors = Off
+
+; Ignore source of message when ignoring repeated messages. When this setting
+; is On you will not log errors with repeated messages from different files or
+; source lines.
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.ignore-repeated-source
+ignore_repeated_source = Off
+
+; If this parameter is set to Off, then memory leaks will not be shown (on
+; stdout or in the log). This has only effect in a debug compile, and if
+; error reporting includes E_WARNING in the allowed list
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.report-memleaks
+report_memleaks = On
+
+; This setting is on by default.
+;report_zend_debug = 0
+
+; Store the last error/warning message in $php_errormsg (boolean). Setting this value
+; to On can assist in debugging and is appropriate for development servers. It should
+; however be disabled on production servers.
+; Default Value: Off
+; Development Value: On
+; Production Value: Off
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.track-errors
+track_errors = Off
+
+; Turn off normal error reporting and emit XML-RPC error XML
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.xmlrpc-errors
+;xmlrpc_errors = 0
+
+; An XML-RPC faultCode
+;xmlrpc_error_number = 0
+
+; When PHP displays or logs an error, it has the capability of inserting html
+; links to documentation related to that error. This directive controls whether
+; those HTML links appear in error messages or not. For performance and security
+; reasons, it's recommended you disable this on production servers.
+; Default Value: On
+; Development Value: On
+; Production value: Off
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.html-errors
+html_errors = Off
+
+; If html_errors is set On PHP produces clickable error messages that direct
+; to a page describing the error or function causing the error in detail.
+; You can download a copy of the PHP manual from http://www.php.net/docs.php
+; and change docref_root to the base URL of your local copy including the
+; leading '/'. You must also specify the file extension being used including
+; the dot. PHP's default behavior is to leave these settings empty.
+; Note: Never use this feature for production boxes.
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.docref-root
+; Examples
+;docref_root = "/phpmanual/"
+
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.docref-ext
+;docref_ext = .html
+
+; String to output before an error message. PHP's default behavior is to leave
+; this setting blank.
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-prepend-string
+; Example:
+;error_prepend_string = "<font color=#ff0000>"
+
+; String to output after an error message. PHP's default behavior is to leave
+; this setting blank.
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-append-string
+; Example:
+;error_append_string = "</font>"
+
+; Log errors to specified file. PHP's default behavior is to leave this value
+; empty.
+; http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-log
+; Example:
+;error_log = php_errors.log
+; Log errors to syslog (Event Log on NT, not valid in Windows 95).
+;error_log = syslog
+
+;;;;;;;;;;;;;;;;;
+; Data Handling ;
+;;;;;;;;;;;;;;;;;
+
+; Note - track_vars is ALWAYS enabled as of PHP 4.0.3
+
+; The separator used in PHP generated URLs to separate arguments.
+; PHP's default setting is "&".
+; http://www.php.net/manual/en/ini.core.php#ini.arg-separator.output
+; Example:
+;arg_separator.output = "&amp;"
+
+; List of separator(s) used by PHP to parse input URLs into variables.
+; PHP's default setting is "&".
+; NOTE: Every character in this directive is considered as separator!
+; http://www.php.net/manual/en/ini.core.php#ini.arg-separator.input
+; Example:
+;arg_separator.input = ";&"
+
+; This directive determines which super global arrays are registered when PHP
+; starts up. If the register_globals directive is enabled, it also determines
+; what order variables are populated into the global space. G,P,C,E & S are
+; abbreviations for the following respective super globals: GET, POST, COOKIE,
+; ENV and SERVER. There is a performance penalty paid for the registration of
+; these arrays and because ENV is not as commonly used as the others, ENV is
+; is not recommended on productions servers. You can still get access to
+; the environment variables through getenv() should you need to.
+; Default Value: "EGPCS"
+; Development Value: "GPCS"
+; Production Value: "GPCS";
+; http://www.php.net/manual/en/ini.core.php#ini.variables-order
+variables_order = "GPCS"
+
+; This directive determines which super global data (G,P,C,E & S) should
+; be registered into the super global array REQUEST. If so, it also determines
+; the order in which that data is registered. The values for this directive are
+; specified in the same manner as the variables_order directive, EXCEPT one.
+; Leaving this value empty will cause PHP to use the value set in the 
+; variables_order directive. It does not mean it will leave the super globals
+; array REQUEST empty.
+; Default Value: None
+; Development Value: "GP"
+; Production Value: "GP"
+; http://www.php.net/manual/en/ini.core.php#ini.request-order
+request_order = "GP"
+
+; Whether or not to register the EGPCS variables as global variables.  You may
+; want to turn this off if you don't want to clutter your scripts' global scope
+; with user data.  This makes most sense when coupled with track_vars - in which
+; case you can access all of the GPC variables through the $HTTP_*_VARS[],
+; variables.
+; You should do your best to write your scripts so that they do not require
+; register_globals to be on;  Using form variables as globals can easily lead
+; to possible security problems, if the code is not very well thought of.
+; http://www.php.net/manual/en/ini.core.php#ini.register-globals
+register_globals = Off
+
+; Determines whether the deprecated long $HTTP_*_VARS type predefined variables
+; are registered by PHP or not. As they are deprecated, we obviously don't
+; recommend you use them. They are on by default for compatibility reasons but
+; they are not recommended on production servers.
+; Default Value: On
+; Development Value: Off
+; Production Value: Off
+; http://www.php.net/manual/en/ini.core.php#ini.register-long-arrays
+register_long_arrays = Off
+
+; This directive determines whether PHP registers $argv & $argc each time it
+; runs. $argv contains an array of all the arguments passed to PHP when a script
+; is invoked. $argc contains an integer representing the number of arguments
+; that were passed when the script was invoked. These arrays are extremely
+; useful when running scripts from the command line. When this directive is
+; enabled, registering these variables consumes CPU cycles and memory each time
+; a script is executed. For performance reasons, this feature should be disabled
+; on production servers.
+; Default Value: On
+; Development Value: Off
+; Production Value: Off
+; http://www.php.net/manual/en/ini.core.php#ini.register-argc-argv
+register_argc_argv = Off
+
+; When enabled, the SERVER and ENV variables are created when they're first
+; used (Just In Time) instead of when the script starts. If these variables
+; are not used within a script, having this directive on will result in a
+; performance gain. The PHP directives register_globals, register_long_arrays,
+; and register_argc_argv must be disabled for this directive to have any affect.
+; http://www.php.net/manual/en/ini.core.php#ini.auto-globals-jit
+auto_globals_jit = On
+
+; Maximum size of POST data that PHP will accept.
+; http://www.php.net/manual/en/ini.core.php#ini.post-max-size
+post_max_size = 8M
+
+; Magic quotes are a preprocessing feature of PHP where PHP will attempt to
+; escape any character sequences in GET, POST, COOKIE and ENV data which might
+; otherwise corrupt data being placed in resources such as databases before
+; making that data available to you. Because of character encoding issues and
+; non-standard SQL implementations across many databases, it's not currently
+; possible for this feature to be 100% accurate. PHP's default behavior is to
+; enable the feature. We strongly recommend you use the escaping mechanisms
+; designed specifically for the database your using instead of relying on this
+; feature. Also note, this feature has been deprecated as of PHP 5.3.0 and is
+; scheduled for removal in PHP 6.
+; Default Value: On
+; Development Value: Off
+; Production Value: Off
+; http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc
+magic_quotes_gpc = Off
+
+; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
+; http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-runtime
+magic_quotes_runtime = Off
+
+; Use Sybase-style magic quotes (escape ' with '' instead of \').
+; http://www.php.net/manual/en/sybase.configuration.php#ini.magic-quotes-sybase
+magic_quotes_sybase = Off
+
+; Automatically add files before PHP document.
+; http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file
+auto_prepend_file =
+
+; Automatically add files after PHP document.
+; http://www.php.net/manual/en/ini.core.php#ini.auto-append-file
+auto_append_file =
+
+; As of 4.0b4, PHP always outputs a character encoding by default in
+; the Content-type: header.  To disable sending of the charset, simply
+; set it to be empty.
+;
+; PHP's built-in default is text/html
+; http://www.php.net/manual/en/ini.core.php#ini.default-mimetype
+default_mimetype = "text/html"
+
+; PHP's default character set is set to empty.
+; http://www.php.net/manual/en/ini.core.php#ini.default-charset
+;default_charset = "iso-8859-1"
+
+; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is
+; to disable this feature.
+; http://www.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data
+;always_populate_raw_post_data = On
+
+;;;;;;;;;;;;;;;;;;;;;;;;;
+; Paths and Directories ;
+;;;;;;;;;;;;;;;;;;;;;;;;;
+
+; UNIX: "/path1:/path2"
+;include_path = ".:/php/includes"
+;
+; Windows: "\path1;\path2"
+;include_path = ".;c:\php\includes"
+;
+; PHP's default setting for include_path is ".;/path/to/php/pear"
+; http://www.php.net/manual/en/ini.core.php#ini.include-path
+
+; The root of the PHP pages, used only if nonempty.
+; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
+; if you are running php as a CGI under any web server (other than IIS)
+; see documentation for security issues.  The alternate is to use the
+; cgi.force_redirect configuration below
+; http://www.php.net/manual/en/ini.core.php#ini.doc-root
+doc_root =
+
+; The directory under which PHP opens the script using /~username used only
+; if nonempty.
+; http://www.php.net/manual/en/ini.core.php#ini.user-dir
+user_dir =
+
+; Directory in which the loadable extensions (modules) reside.
+; http://www.php.net/manual/en/ini.core.php#ini.extension-dir
+; extension_dir = "./"
+
+; Whether or not to enable the dl() function.  The dl() function does NOT work
+; properly in multithreaded servers, such as IIS or Zeus, and is automatically
+; disabled on them.
+; http://www.php.net/manual/en/info.configuration.php#ini.enable-dl
+enable_dl = Off
+
+; cgi.force_redirect is necessary to provide security running PHP as a CGI under
+; most web servers.  Left undefined, PHP turns this on by default.  You can
+; turn it off here AT YOUR OWN RISK
+; **You CAN safely turn this off for IIS, in fact, you MUST.**
+; http://www.php.net/manual/en/ini.core.php#ini.cgi.force-redirect
+;cgi.force_redirect = 1
+
+; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
+; every request. PHP's default behavior is to disable this feature.
+;cgi.nph = 1
+
+; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
+; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
+; will look for to know it is OK to continue execution.  Setting this variable MAY
+; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
+; http://www.php.net/manual/en/ini.core.php#ini.cgi.redirect-status-env
+;cgi.redirect_status_env = ;
+
+; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
+; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
+; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting
+; this to 1 will cause PHP CGI to fix its paths to conform to the spec.  A setting
+; of zero causes PHP to behave as before.  Default is 1.  You should fix your scripts
+; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
+; http://www.php.net/manual/en/ini.core.php#ini.cgi.fix-pathinfo
+cgi.fix_pathinfo=1
+
+; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
+; security tokens of the calling client.  This allows IIS to define the
+; security context that the request runs under.  mod_fastcgi under Apache
+; does not currently support this feature (03/17/2002)
+; Set to 1 if running under IIS.  Default is zero.
+; http://www.php.net/manual/en/ini.core.php#ini.fastcgi.impersonate
+;fastcgi.impersonate = 1;
+
+; Disable logging through FastCGI connection. PHP's default behavior is to enable
+; this feature.
+;fastcgi.logging = 0
+
+; cgi.rfc2616_headers configuration option tells PHP what type of headers to
+; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
+; is supported by Apache. When this option is set to 1 PHP will send
+; RFC2616 compliant header.
+; Default is zero.
+; http://www.php.net/manual/en/ini.core.php#ini.cgi.rfc2616-headers
+;cgi.rfc2616_headers = 0
+
+;;;;;;;;;;;;;;;;
+; File Uploads ;
+;;;;;;;;;;;;;;;;
+
+; Whether to allow HTTP file uploads.
+; http://www.php.net/manual/en/ini.core.php#ini.file-uploads
+file_uploads = On
+
+; Temporary directory for HTTP uploaded files (will use system default if not
+; specified).
+; http://www.php.net/manual/en/ini.core.php#ini.upload-tmp-dir
+;upload_tmp_dir =
+
+; Maximum allowed size for uploaded files.
+; http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize
+upload_max_filesize = 2M
+
+;;;;;;;;;;;;;;;;;;
+; Fopen wrappers ;
+;;;;;;;;;;;;;;;;;;
+
+; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
+; http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen
+allow_url_fopen = On
+
+; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
+; http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-include
+allow_url_include = Off
+
+; Define the anonymous ftp password (your email address). PHP's default setting
+; for this is empty.
+; http://www.php.net/manual/en/filesystem.configuration.php#ini.from
+;from="john@doe.com"
+
+; Define the User-Agent string. PHP's default setting for this is empty.
+; http://www.php.net/manual/en/filesystem.configuration.php#ini.user-agent
+;user_agent="PHP"
+
+; Default timeout for socket based streams (seconds)
+; http://www.php.net/manual/en/filesystem.configuration.php#ini.default-socket-timeout
+default_socket_timeout = 60
+
+; If your scripts have to deal with files from Macintosh systems,
+; or you are running on a Mac and need to deal with files from
+; unix or win32 systems, setting this flag will cause PHP to
+; automatically detect the EOL character in those files so that
+; fgets() and file() will work regardless of the source of the file.
+; http://www.php.net/manual/en/filesystem.configuration.php#ini.auto-detect-line-endings
+;auto_detect_line_endings = Off
+
+;;;;;;;;;;;;;;;;;;;;;;
+; Dynamic Extensions ;
+;;;;;;;;;;;;;;;;;;;;;;
+
+; If you wish to have an extension loaded automatically, use the following
+; syntax:
+;
+;   extension=modulename.extension
+;
+; For example
+;
+;   extension=msql.so
+;
+; ... or with a path:
+;
+;   extension=/path/to/extension/msql.so
+;
+; If you only provide the name of the extension, PHP will look for it in its
+; default extension directory.
+
+;;;;
+; Note: packaged extension modules are now loaded via the .ini files
+; found in the directory /etc/php.d; these are loaded by default.
+;;;;
+
+
+;;;;;;;;;;;;;;;;;;;
+; Module Settings ;
+;;;;;;;;;;;;;;;;;;;
+
+[Date]
+; Defines the default timezone used by the date functions
+; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
+;date.timezone =
+
+; http://www.php.net/manual/en/datetime.configuration.php#ini.date.default-latitude
+;date.default_latitude = 31.7667
+
+; http://www.php.net/manual/en/datetime.configuration.php#ini.date.default-longitude
+;date.default_longitude = 35.2333
+
+; http://www.php.net/manual/en/datetime.configuration.php#ini.date.sunrise-zenith
+;date.sunrise_zenith = 90.583333
+
+; http://www.php.net/manual/en/datetime.configuration.php#ini.date.sunset-zenith
+;date.sunset_zenith = 90.583333
+
+[filter]
+; http://www.php.net/manual/en/filter.configuration.php#ini.filter.default
+;filter.default = unsafe_raw
+
+; http://www.php.net/manual/en/filter.configuration.php#ini.filter.default-flags
+;filter.default_flags =
+
+[iconv]
+;iconv.input_encoding = ISO-8859-1
+;iconv.internal_encoding = ISO-8859-1
+;iconv.output_encoding = ISO-8859-1
+
+[intl]
+;intl.default_locale = 
+
+[sqlite]
+; http://www.php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case
+;sqlite.assoc_case = 0
+
+[sqlite3]
+;sqlite3.extension_dir =
+
+[Pcre]
+;PCRE library backtracking limit.
+; http://www.php.net/manual/en/pcre.configuration.php#ini.pcre.backtrack-limit
+;pcre.backtrack_limit=100000
+
+;PCRE library recursion limit. 
+;Please note that if you set this value to a high number you may consume all 
+;the available process stack and eventually crash PHP (due to reaching the 
+;stack size limit imposed by the Operating System).
+; http://www.php.net/manual/en/pcre.configuration.php#ini.pcre.recursion-limit
+;pcre.recursion_limit=100000
+
+[Pdo]
+; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off"
+; http://www.php.net/manual/en/ref.pdo-odbc.php#ini.pdo-odbc.connection-pooling
+;pdo_odbc.connection_pooling=strict
+
+[Phar]
+; http://www.php.net/manual/en/phar.configuration.php#ini.phar.readonly
+;phar.readonly = On
+
+; http://www.php.net/manual/en/phar.configuration.php#ini.phar.require-hash
+;phar.require_hash = On
+
+;phar.cache_list =
+
+[Syslog]
+; Whether or not to define the various syslog variables (e.g. $LOG_PID,
+; $LOG_CRON, etc.).  Turning it off is a good idea performance-wise.  In
+; runtime, you can define these variables by calling define_syslog_variables().
+; http://www.php.net/manual/en/network.configuration.php#ini.define-syslog-variables
+define_syslog_variables  = Off
+
+[mail function]
+; For Win32 only.
+; http://www.php.net/manual/en/mail.configuration.php#ini.smtp
+SMTP = localhost
+; http://www.php.net/manual/en/mail.configuration.php#ini.smtp-port
+smtp_port = 25
+
+; For Win32 only.
+; http://www.php.net/manual/en/mail.configuration.php#ini.sendmail-from
+;sendmail_from = me@example.com
+
+; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
+; http://www.php.net/manual/en/mail.configuration.php#ini.sendmail-path
+sendmail_path = /usr/sbin/sendmail -t -i
+
+; Force the addition of the specified parameters to be passed as extra parameters
+; to the sendmail binary. These parameters will always replace the value of
+; the 5th parameter to mail(), even in safe mode.
+;mail.force_extra_parameters =
+
+; Add X-PHP-Originaiting-Script: that will include uid of the script followed by the filename
+mail.add_x_header = On
+
+; Log all mail() calls including the full path of the script, line #, to address and headers
+;mail.log =
+
+[SQL]
+; http://www.php.net/manual/en/ini.core.php#ini.sql.safe-mode
+sql.safe_mode = Off
+
+[ODBC]
+; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.default-db
+;odbc.default_db    =  Not yet implemented
+
+; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.default-user
+;odbc.default_user  =  Not yet implemented
+
+; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.default-pw
+;odbc.default_pw    =  Not yet implemented
+
+; Allow or prevent persistent links.
+; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.allow-persistent
+odbc.allow_persistent = On
+
+; Check that a connection is still valid before reuse.
+; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.check-persistent
+odbc.check_persistent = On
+
+; Maximum number of persistent links.  -1 means no limit.
+; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.max-persistent
+odbc.max_persistent = -1
+
+; Maximum number of links (persistent + non-persistent).  -1 means no limit.
+; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.max-links
+odbc.max_links = -1
+
+; Handling of LONG fields.  Returns number of bytes to variables.  0 means
+; passthru.
+; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.defaultlrl
+odbc.defaultlrl = 4096
+
+; Handling of binary data.  0 means passthru, 1 return as is, 2 convert to char.
+; See the documentation on odbc_binmode and odbc_longreadlen for an explanation
+; of uodbc.defaultlrl and uodbc.defaultbinmode
+; http://www.php.net/manual/en/odbc.configuration.php#ini.uodbc.defaultbinmode
+odbc.defaultbinmode = 1
+
+;birdstep.max_links = -1
+
+[MySQL]
+; Allow or prevent persistent links.
+; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.allow-persistent
+mysql.allow_persistent = On
+
+; Maximum number of persistent links.  -1 means no limit.
+; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.max-persistent
+mysql.max_persistent = -1
+
+; Maximum number of links (persistent + non-persistent).  -1 means no limit.
+; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.max-links
+mysql.max_links = -1
+
+; Default port number for mysql_connect().  If unset, mysql_connect() will use
+; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
+; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
+; at MYSQL_PORT.
+; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-port
+mysql.default_port =
+
+; Default socket name for local MySQL connects.  If empty, uses the built-in
+; MySQL defaults.
+; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-socket
+mysql.default_socket =
+
+; Default host for mysql_connect() (doesn't apply in safe mode).
+; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-host
+mysql.default_host =
+
+; Default user for mysql_connect() (doesn't apply in safe mode).
+; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-user
+mysql.default_user =
+
+; Default password for mysql_connect() (doesn't apply in safe mode).
+; Note that this is generally a *bad* idea to store passwords in this file.
+; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
+; and reveal this password!  And of course, any users with read access to this
+; file will be able to reveal the password as well.
+; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-password
+mysql.default_password =
+
+; Maximum time (in seconds) for connect timeout. -1 means no limit
+; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.connect-timeout
+mysql.connect_timeout = 60
+
+; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
+; SQL-Errors will be displayed.
+; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.trace-mode
+mysql.trace_mode = Off
+
+[MySQLi]
+
+; Maximum number of links.  -1 means no limit.
+; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.max-links
+mysqli.max_links = -1
+
+; Default port number for mysqli_connect().  If unset, mysqli_connect() will use
+; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
+; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
+; at MYSQL_PORT.
+; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.default-port
+mysqli.default_port = 3306
+
+; Default socket name for local MySQL connects.  If empty, uses the built-in
+; MySQL defaults.
+; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.default-socket
+mysqli.default_socket =
+
+; Default host for mysql_connect() (doesn't apply in safe mode).
+; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.default-host
+mysqli.default_host =
+
+; Default user for mysql_connect() (doesn't apply in safe mode).
+; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.default-user
+mysqli.default_user =
+
+; Default password for mysqli_connect() (doesn't apply in safe mode).
+; Note that this is generally a *bad* idea to store passwords in this file.
+; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
+; and reveal this password!  And of course, any users with read access to this
+; file will be able to reveal the password as well.
+; http://www.php.net/manual/en/mysqli.configuration.php#ini.mysqli.default-pw
+mysqli.default_pw =
+
+; Allow or prevent reconnect
+mysqli.reconnect = Off
+
+[PostgresSQL]
+; Allow or prevent persistent links.
+; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.allow-persistent
+pgsql.allow_persistent = On
+
+; Detect broken persistent links always with pg_pconnect().
+; Auto reset feature requires a little overheads.
+; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.auto-reset-persistent
+pgsql.auto_reset_persistent = Off
+
+; Maximum number of persistent links.  -1 means no limit.
+; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.max-persistent
+pgsql.max_persistent = -1
+
+; Maximum number of links (persistent+non persistent).  -1 means no limit.
+; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.max-links
+pgsql.max_links = -1
+
+; Ignore PostgreSQL backends Notice message or not.
+; Notice message logging require a little overheads.
+; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.ignore-notice
+pgsql.ignore_notice = 0
+
+; Log PostgreSQL backends Noitce message or not.
+; Unless pgsql.ignore_notice=0, module cannot log notice message.
+; http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.log-notice
+pgsql.log_notice = 0
+
+[Sybase-CT]
+; Allow or prevent persistent links.
+; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.allow-persistent
+sybct.allow_persistent = On
+
+; Maximum number of persistent links.  -1 means no limit.
+; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.max-persistent
+sybct.max_persistent = -1
+
+; Maximum number of links (persistent + non-persistent).  -1 means no limit.
+; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.max-links
+sybct.max_links = -1
+
+; Minimum server message severity to display.
+; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.min-server-severity
+sybct.min_server_severity = 10
+
+; Minimum client message severity to display.
+; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.min-client-severity
+sybct.min_client_severity = 10
+
+; Set per-context timeout
+; http://www.php.net/manual/en/sybase.configuration.php#ini.sybct.timeout
+;sybct.timeout=
+
+;sybct.packet_size
+
+[bcmath]
+; Number of decimal digits for all bcmath functions.
+; http://www.php.net/manual/en/bc.configuration.php#ini.bcmath.scale
+bcmath.scale = 0
+
+[browscap]
+; http://www.php.net/manual/en/misc.configuration.php#ini.browscap
+;browscap = extra/browscap.ini
+
+[Session]
+; Handler used to store/retrieve data.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.save-handler
+session.save_handler = files
+
+; Argument passed to save_handler.  In the case of files, this is the path
+; where data files are stored. Note: Windows users have to change this
+; variable in order to use PHP's session functions.
+;
+; As of PHP 4.0.1, you can define the path as:
+;
+;     session.save_path = "N;/path"
+;
+; where N is an integer.  Instead of storing all the session files in
+; /path, what this will do is use subdirectories N-levels deep, and
+; store the session data in those directories.  This is useful if you
+; or your OS have problems with lots of files in one directory, and is
+; a more efficient layout for servers that handle lots of sessions.
+;
+; NOTE 1: PHP will not create this directory structure automatically.
+;         You can use the script in the ext/session dir for that purpose.
+; NOTE 2: See the section on garbage collection below if you choose to
+;         use subdirectories for session storage
+;
+; The file storage module creates files using mode 600 by default.
+; You can change that by using
+;
+;     session.save_path = "N;MODE;/path"
+;
+; where MODE is the octal representation of the mode. Note that this
+; does not overwrite the process's umask.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.save-path
+session.save_path = "/tmp"
+
+; Whether to use cookies.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.use-cookies
+session.use_cookies = 1
+
+; http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-secure
+;session.cookie_secure =
+
+; This option forces PHP to fetch and use a cookie for storing and maintaining
+; the session id. We encourage this operation as it's very helpful in combatting
+; session hijacking when not specifying and managing your own session id. It is
+; not the end all be all of session hijacking defense, but it's a good start.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.use-only-cookies
+session.use_only_cookies = 1
+
+; Name of the session (used as cookie name).
+; http://www.php.net/manual/en/session.configuration.php#ini.session.name
+session.name = PHPSESSID
+
+; Initialize session on request startup.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.auto-start
+session.auto_start = 0
+
+; Lifetime in seconds of cookie or, if 0, until browser is restarted.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-lifetime
+session.cookie_lifetime = 0
+
+; The path for which the cookie is valid.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-path
+session.cookie_path = /
+
+; The domain for which the cookie is valid.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-domain
+session.cookie_domain =
+
+; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-httponly
+session.cookie_httponly = 
+
+; Handler used to serialize data.  php is the standard serializer of PHP.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.serialize-handler
+session.serialize_handler = php
+
+; Defines the probability that the 'garbage collection' process is started
+; on every session initialization. The probability is calculated by using
+; gc_probability/gc_divisor. Where session.gc_probability is the numerator
+; and gc_divisor is the denominator in the equation. Setting this value to 1
+; when the session.gc_divisor value is 100 will give you approximately a 1% chance
+; the gc will run on any give request.
+; Default Value: 1
+; Development Value: 1
+; Production Value: 1
+; http://www.php.net/manual/en/session.configuration.php#ini.session.gc-probability
+session.gc_probability = 1
+
+; Defines the probability that the 'garbage collection' process is started on every
+; session initialization. The probability is calculated by using the following equation: 
+; gc_probability/gc_divisor. Where session.gc_probability is the numerator and
+; session.gc_divisor is the denominator in the equation. Setting this value to 1
+; when the session.gc_divisor value is 100 will give you approximately a 1% chance
+; the gc will run on any give request. Increasing this value to 1000 will give you
+; a 0.1% chance the gc will run on any give request. For high volume production servers,
+; this is a more efficient approach.
+; Default Value: 100
+; Development Value: 1000
+; Production Value: 1000
+; http://www.php.net/manual/en/session.configuration.php#ini.session.gc-divisor
+session.gc_divisor = 1000
+
+; After this number of seconds, stored data will be seen as 'garbage' and
+; cleaned up by the garbage collection process.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime
+session.gc_maxlifetime = 1440
+
+; NOTE: If you are using the subdirectory option for storing session files
+;       (see session.save_path above), then garbage collection does *not*
+;       happen automatically.  You will need to do your own garbage
+;       collection through a shell script, cron entry, or some other method.
+;       For example, the following script would is the equivalent of
+;       setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
+;          cd /path/to/sessions; find -cmin +24 | xargs rm
+
+; PHP 4.2 and less have an undocumented feature/bug that allows you to
+; to initialize a session variable in the global scope, even when register_globals
+; is disabled.  PHP 4.3 and later will warn you, if this feature is used.
+; You can disable the feature and the warning separately. At this time,
+; the warning is only displayed, if bug_compat_42 is enabled. This feature
+; introduces some serious security problems if not handled correctly. It's
+; recommended that you do not use this feature on production servers. But you
+; should enable this on development servers and enable the warning as well. If you
+; do not enable the feature on development servers, you won't be warned when it's
+; used and debugging errors caused by this can be difficult to track down.
+; Default Value: On
+; Development Value: On
+; Production Value: Off
+; http://www.php.net/manual/en/session.configuration.php#ini.session.bug-compat-42
+session.bug_compat_42 = Off
+
+; This setting controls whether or not you are warned by PHP when initializing a
+; session value into the global space. session.bug_compat_42 must be enabled before
+; these warnings can be issued by PHP. See the directive above for more information.
+; Default Value: On
+; Development Value: On
+; Production Value: Off
+; http://www.php.net/manual/en/session.configuration.php#ini.session.bug-compat-warn
+session.bug_compat_warn = Off
+
+; Check HTTP Referer to invalidate externally stored URLs containing ids.
+; HTTP_REFERER has to contain this substring for the session to be
+; considered as valid.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.referer-check
+session.referer_check =
+
+; How many bytes to read from the file.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.entropy-length
+session.entropy_length = 0
+
+; Specified here to create the session id.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.entropy-file
+;session.entropy_file = /dev/urandom
+session.entropy_file =
+
+; http://www.php.net/manual/en/session.configuration.php#ini.session.entropy-length
+;session.entropy_length = 16
+
+; Set to {nocache,private,public,} to determine HTTP caching aspects
+; or leave this empty to avoid sending anti-caching headers.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.cache-limiter
+session.cache_limiter = nocache
+
+; Document expires after n minutes.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.cache-expire
+session.cache_expire = 180
+
+; trans sid support is disabled by default.
+; Use of trans sid may risk your users security.
+; Use this option with caution.
+; - User may send URL contains active session ID
+;   to other person via. email/irc/etc.
+; - URL that contains active session ID may be stored
+;   in publically accessible computer.
+; - User may access your site with the same session ID
+;   always using URL stored in browser's history or bookmarks.
+; http://www.php.net/manual/en/session.configuration.php#ini.session.use-trans-sid
+session.use_trans_sid = 0
+
+; Select a hash function for use in generating session ids.
+; Possible Values 
+;   0  (MD5 128 bits)
+;   1  (SHA-1 160 bits)
+; http://www.php.net/manual/en/session.configuration.php#ini.session.hash-function
+session.hash_function = 0
+
+; Define how many bits are stored in each character when converting
+; the binary hash data to something readable.
+; Possible values:
+;   4  (4 bits: 0-9, a-f)
+;   5  (5 bits: 0-9, a-v)
+;   6  (6 bits: 0-9, a-z, A-Z, "-", ",")
+; Default Value: 4
+; Development Value: 5
+; Production Value: 5
+; http://www.php.net/manual/en/session.configuration.php#ini.session.hash-bits-per-character
+session.hash_bits_per_character = 5
+
+; The URL rewriter will look for URLs in a defined set of HTML tags.
+; form/fieldset are special; if you include them here, the rewriter will
+; add a hidden <input> field with the info which is otherwise appended
+; to URLs.  If you want XHTML conformity, remove the form entry.
+; Note that all valid entries require a "=", even if no value follows.
+; Default Value: "a=href,area=href,frame=src,form=,fieldset="
+; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
+; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
+; http://www.php.net/manual/en/session.configuration.php#ini.url-rewriter.tags
+url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
+
+[MSSQL]
+; Allow or prevent persistent links.
+mssql.allow_persistent = On
+
+; Maximum number of persistent links.  -1 means no limit.
+mssql.max_persistent = -1
+
+; Maximum number of links (persistent+non persistent).  -1 means no limit.
+mssql.max_links = -1
+
+; Minimum error severity to display.
+mssql.min_error_severity = 10
+
+; Minimum message severity to display.
+mssql.min_message_severity = 10
+
+; Compatibility mode with old versions of PHP 3.0.
+mssql.compatability_mode = Off
+
+; Connect timeout
+;mssql.connect_timeout = 5
+
+; Query timeout
+;mssql.timeout = 60
+
+; Valid range 0 - 2147483647.  Default = 4096.
+;mssql.textlimit = 4096
+
+; Valid range 0 - 2147483647.  Default = 4096.
+;mssql.textsize = 4096
+
+; Limits the number of records in each batch.  0 = all records in one batch.
+;mssql.batchsize = 0
+
+; Specify how datetime and datetim4 columns are returned
+; On => Returns data converted to SQL server settings
+; Off => Returns values as YYYY-MM-DD hh:mm:ss
+;mssql.datetimeconvert = On
+
+; Use NT authentication when connecting to the server
+mssql.secure_connection = Off
+
+; Specify max number of processes. -1 = library default
+; msdlib defaults to 25
+; FreeTDS defaults to 4096
+;mssql.max_procs = -1
+
+; Specify client character set. 
+; If empty or not set the client charset from freetds.comf is used
+; This is only used when compiled with FreeTDS
+;mssql.charset = "ISO-8859-1"
+
+[Assertion]
+; Assert(expr); active by default.
+; http://www.php.net/manual/en/info.configuration.php#ini.assert.active
+;assert.active = On
+
+; Issue a PHP warning for each failed assertion.
+; http://www.php.net/manual/en/info.configuration.php#ini.assert.warning
+;assert.warning = On
+
+; Don't bail out by default.
+; http://www.php.net/manual/en/info.configuration.php#ini.assert.bail
+;assert.bail = Off
+
+; User-function to be called if an assertion fails.
+; http://www.php.net/manual/en/info.configuration.php#ini.assert.callback
+;assert.callback = 0
+
+; Eval the expression with current error_reporting().  Set to true if you want
+; error_reporting(0) around the eval().
+; http://www.php.net/manual/en/info.configuration.php#ini.assert.quiet-eval
+;assert.quiet_eval = 0
+
+[COM]
+; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs
+; http://www.php.net/manual/en/com.configuration.php#ini.com.typelib-file
+;com.typelib_file =
+
+; allow Distributed-COM calls
+; http://www.php.net/manual/en/com.configuration.php#ini.com.allow-dcom
+;com.allow_dcom = true
+
+; autoregister constants of a components typlib on com_load()
+; http://www.php.net/manual/en/com.configuration.php#ini.com.autoregister-typelib
+;com.autoregister_typelib = true
+
+; register constants casesensitive
+; http://www.php.net/manual/en/com.configuration.php#ini.com.autoregister-casesensitive
+;com.autoregister_casesensitive = false
+
+; show warnings on duplicate constant registrations
+; http://www.php.net/manual/en/com.configuration.php#ini.com.autoregister-verbose
+;com.autoregister_verbose = true
+
+[mbstring]
+; language for internal character representation.
+; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.language
+;mbstring.language = Japanese
+
+; internal/script encoding.
+; Some encoding cannot work as internal encoding.
+; (e.g. SJIS, BIG5, ISO-2022-*)
+; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.internal-encoding
+;mbstring.internal_encoding = EUC-JP
+
+; http input encoding.
+; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.http-input
+;mbstring.http_input = auto
+
+; http output encoding. mb_output_handler must be
+; registered as output buffer to function
+; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.http-output
+;mbstring.http_output = SJIS
+
+; enable automatic encoding translation according to
+; mbstring.internal_encoding setting. Input chars are
+; converted to internal encoding by setting this to On.
+; Note: Do _not_ use automatic encoding translation for
+;       portable libs/applications.
+; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.encoding-translation
+;mbstring.encoding_translation = Off
+
+; automatic encoding detection order.
+; auto means
+; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.detect-order
+;mbstring.detect_order = auto
+
+; substitute_character used when character cannot be converted
+; one from another
+; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.substitute-character
+;mbstring.substitute_character = none;
+
+; overload(replace) single byte functions by mbstring functions.
+; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
+; etc. Possible values are 0,1,2,4 or combination of them.
+; For example, 7 for overload everything.
+; 0: No overload
+; 1: Overload mail() function
+; 2: Overload str*() functions
+; 4: Overload ereg*() functions
+; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.func-overload
+;mbstring.func_overload = 0
+
+; enable strict encoding detection.
+;mbstring.strict_detection = Off
+
+; This directive specifies the regex pattern of content types for which mb_output_handler()
+; is activated.
+; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml)
+;mbstring.http_output_conv_mimetype=
+
+[gd]
+; Tell the jpeg decode to ignore warnings and try to create
+; a gd image. The warning will then be displayed as notices
+; disabled by default
+; http://www.php.net/manual/en/image.configuration.php#ini.image.jpeg-ignore-warning
+;gd.jpeg_ignore_warning = 0
+
+[exif]
+; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.
+; With mbstring support this will automatically be converted into the encoding
+; given by corresponding encode setting. When empty mbstring.internal_encoding
+; is used. For the decode settings you can distinguish between motorola and
+; intel byte order. A decode setting cannot be empty.
+; http://www.php.net/manual/en/exif.configuration.php#ini.exif.encode-unicode
+;exif.encode_unicode = ISO-8859-15
+
+; http://www.php.net/manual/en/exif.configuration.php#ini.exif.decode-unicode-motorola
+;exif.decode_unicode_motorola = UCS-2BE
+
+; http://www.php.net/manual/en/exif.configuration.php#ini.exif.decode-unicode-intel
+;exif.decode_unicode_intel    = UCS-2LE
+
+; http://www.php.net/manual/en/exif.configuration.php#ini.exif.encode-jis
+;exif.encode_jis =
+
+; http://www.php.net/manual/en/exif.configuration.php#ini.exif.decode-jis-motorola
+;exif.decode_jis_motorola = JIS
+
+; http://www.php.net/manual/en/exif.configuration.php#ini.exif.decode-jis-intel
+;exif.decode_jis_intel    = JIS
+
+[Tidy]
+; The path to a default tidy configuration file to use when using tidy
+; http://www.php.net/manual/en/tidy.configuration.php#ini.tidy.default-config
+;tidy.default_config = /usr/local/lib/php/default.tcfg
+
+; Should tidy clean and repair output automatically?
+; WARNING: Do not use this option if you are generating non-html content
+; such as dynamic images
+; http://www.php.net/manual/en/tidy.configuration.php#ini.tidy.clean-output
+tidy.clean_output = Off
+
+[soap]
+; Enables or disables WSDL caching feature.
+; http://www.php.net/manual/en/soap.configuration.php#ini.soap.wsdl-cache-enabled
+soap.wsdl_cache_enabled=1
+
+; Sets the directory name where SOAP extension will put cache files.
+; http://www.php.net/manual/en/soap.configuration.php#ini.soap.wsdl-cache-dir
+soap.wsdl_cache_dir="/tmp"
+
+; (time to live) Sets the number of second while cached file will be used 
+; instead of original one.
+; http://www.php.net/manual/en/soap.configuration.php#ini.soap.wsdl-cache-ttl
+soap.wsdl_cache_ttl=86400
+
+[sysvshm]
+; A default size of the shared memory segment
+;sysvshm.init_mem = 10000
+
+
+; Local Variables:
+; tab-width: 4
+; End:
+

--- /dev/null
+++ b/setup/postgresql.conf
@@ -1,1 +1,502 @@
-
+# -----------------------------
+# PostgreSQL configuration file
+# -----------------------------
+#
+# This file consists of lines of the form:
+#
+#   name = value
+#
+# (The "=" is optional.)  Whitespace may be used.  Comments are introduced with
+# "#" anywhere on a line.  The complete list of parameter names and allowed
+# values can be found in the PostgreSQL documentation.
+#
+# The commented-out settings shown in this file represent the default values.
+# Re-commenting a setting is NOT sufficient to revert it to the default value;
+# you need to reload the server.
+#
+# This file is read on server startup and when the server receives a SIGHUP
+# signal.  If you edit the file on a running system, you have to SIGHUP the
+# server for the changes to take effect, or use "pg_ctl reload".  Some
+# parameters, which are marked below, require a server shutdown and restart to
+# take effect.
+#
+# Any parameter can also be given as a command-line option to the server, e.g.,
+# "postgres -c log_connections=on".  Some parameters can be changed at run time
+# with the "SET" SQL command.
+#
+# Memory units:  kB = kilobytes        Time units:  ms  = milliseconds
+#                MB = megabytes                     s   = seconds
+#                GB = gigabytes                     min = minutes
+#                                                   h   = hours
+#                                                   d   = days
+
+
+#------------------------------------------------------------------------------
+# FILE LOCATIONS
+#------------------------------------------------------------------------------
+
+# The default values of these variables are driven from the -D command-line
+# option or PGDATA environment variable, represented here as ConfigDir.
+
+#data_directory = 'ConfigDir'		# use data in another directory
+					# (change requires restart)
+#hba_file = 'ConfigDir/pg_hba.conf'	# host-based authentication file
+					# (change requires restart)
+#ident_file = 'ConfigDir/pg_ident.conf'	# ident configuration file
+					# (change requires restart)
+
+# If external_pid_file is not explicitly set, no extra PID file is written.
+#external_pid_file = '(none)'		# write an extra PID file
+					# (change requires restart)
+
+
+#------------------------------------------------------------------------------
+# CONNECTIONS AND AUTHENTICATION
+#------------------------------------------------------------------------------
+
+# - Connection Settings -
+
+listen_addresses = '*'		# what IP address(es) to listen on;
+					# comma-separated list of addresses;
+					# defaults to 'localhost', '*' = all
+					# (change requires restart)
+#port = 5432				# (change requires restart)
+max_connections = 100			# (change requires restart)
+# Note:  Increasing max_connections costs ~400 bytes of shared memory per 
+# connection slot, plus lock space (see max_locks_per_transaction).
+#superuser_reserved_connections = 3	# (change requires restart)
+#unix_socket_directory = ''		# (change requires restart)
+#unix_socket_group = ''			# (change requires restart)
+#unix_socket_permissions = 0777		# begin with 0 to use octal notation
+					# (change requires restart)
+#bonjour_name = ''			# defaults to the computer name
+					# (change requires restart)
+
+# - Security and Authentication -
+
+#authentication_timeout = 1min		# 1s-600s
+#ssl = off				# (change requires restart)
+#ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH'	# allowed SSL ciphers
+					# (change requires restart)
+#ssl_renegotiation_limit = 512MB	# amount of data between renegotiations
+#password_encryption = on
+#db_user_namespace = off
+
+# Kerberos and GSSAPI
+#krb_server_keyfile = ''
+#krb_srvname = 'postgres'		# (Kerberos only)
+#krb_caseins_users = off
+
+# - TCP Keepalives -
+# see "man 7 tcp" for details
+
+#tcp_keepalives_idle = 0		# TCP_KEEPIDLE, in seconds;
+					# 0 selects the system default
+#tcp_keepalives_interval = 0		# TCP_KEEPINTVL, in seconds;
+					# 0 selects the system default
+#tcp_keepalives_count = 0		# TCP_KEEPCNT;
+					# 0 selects the system default
+
+
+#------------------------------------------------------------------------------
+# RESOURCE USAGE (except WAL)
+#------------------------------------------------------------------------------
+
+# - Memory -
+
+shared_buffers = 32MB			# min 128kB
+					# (change requires restart)
+#temp_buffers = 8MB			# min 800kB
+#max_prepared_transactions = 0		# zero disables the feature
+					# (change requires restart)
+# Note:  Increasing max_prepared_transactions costs ~600 bytes of shared memory
+# per transaction slot, plus lock space (see max_locks_per_transaction).
+# It is not advisable to set max_prepared_transactions nonzero unless you
+# actively intend to use prepared transactions.
+#work_mem = 1MB				# min 64kB
+#maintenance_work_mem = 16MB		# min 1MB
+#max_stack_depth = 2MB			# min 100kB
+
+# - Kernel Resource Usage -
+
+#max_files_per_process = 1000		# min 25
+					# (change requires restart)
+#shared_preload_libraries = ''		# (change requires restart)
+
+# - Cost-Based Vacuum Delay -
+
+#vacuum_cost_delay = 0ms		# 0-100 milliseconds
+#vacuum_cost_page_hit = 1		# 0-10000 credits
+#vacuum_cost_page_miss = 10		# 0-10000 credits
+#vacuum_cost_page_dirty = 20		# 0-10000 credits
+#vacuum_cost_limit = 200		# 1-10000 credits
+
+# - Background Writer -
+
+#bgwriter_delay = 200ms			# 10-10000ms between rounds
+#bgwriter_lru_maxpages = 100		# 0-1000 max buffers written/round
+#bgwriter_lru_multiplier = 2.0		# 0-10.0 multipler on buffers scanned/round
+
+# - Asynchronous Behavior -
+
+#effective_io_concurrency = 1		# 1-1000. 0 disables prefetching
+
+
+#------------------------------------------------------------------------------
+# WRITE AHEAD LOG
+#------------------------------------------------------------------------------
+
+# - Settings -
+
+#fsync = on				# turns forced synchronization on or off
+#synchronous_commit = on		# immediate fsync at commit
+#wal_sync_method = fsync		# the default is the first option 
+					# supported by the operating system:
+					#   open_datasync
+					#   fdatasync
+					#   fsync
+					#   fsync_writethrough
+					#   open_sync
+#full_page_writes = on			# recover from partial page writes
+#wal_buffers = 64kB			# min 32kB
+					# (change requires restart)
+#wal_writer_delay = 200ms		# 1-10000 milliseconds
+
+#commit_delay = 0			# range 0-100000, in microseconds
+#commit_siblings = 5			# range 1-1000
+
+# - Checkpoints -
+
+#checkpoint_segments = 3		# in logfile segments, min 1, 16MB each
+#checkpoint_timeout = 5min		# range 30s-1h
+#checkpoint_completion_target = 0.5	# checkpoint target duration, 0.0 - 1.0
+#checkpoint_warning = 30s		# 0 disables
+
+# - Archiving -
+
+#archive_mode = off		# allows archiving to be done
+				# (change requires restart)
+#archive_command = ''		# command to use to archive a logfile segment
+#archive_timeout = 0		# force a logfile segment switch after this
+				# number of seconds; 0 disables
+
+
+#------------------------------------------------------------------------------
+# QUERY TUNING
+#------------------------------------------------------------------------------
+
+# - Planner Method Configuration -
+
+#enable_bitmapscan = on
+#enable_hashagg = on
+#enable_hashjoin = on
+#enable_indexscan = on
+#enable_mergejoin = on
+#enable_nestloop = on
+#enable_seqscan = on
+#enable_sort = on
+#enable_tidscan = on
+
+# - Planner Cost Constants -
+
+#seq_page_cost = 1.0			# measured on an arbitrary scale
+#random_page_cost = 4.0			# same scale as above
+#cpu_tuple_cost = 0.01			# same scale as above
+#cpu_index_tuple_cost = 0.005		# same scale as above
+#cpu_operator_cost = 0.0025		# same scale as above
+#effective_cache_size = 128MB
+
+# - Genetic Query Optimizer -
+
+#geqo = on
+#geqo_threshold = 12
+#geqo_effort = 5			# range 1-10
+#geqo_pool_size = 0			# selects default based on effort
+#geqo_generations = 0			# selects default based on effort
+#geqo_selection_bias = 2.0		# range 1.5-2.0
+
+# - Other Planner Options -
+
+#default_statistics_target = 100	# range 1-10000
+#constraint_exclusion = partition	# on, off, or partition
+#cursor_tuple_fraction = 0.1		# range 0.0-1.0
+#from_collapse_limit = 8
+#join_collapse_limit = 8		# 1 disables collapsing of explicit 
+					# JOIN clauses
+
+
+#------------------------------------------------------------------------------
+# ERROR REPORTING AND LOGGING
+#------------------------------------------------------------------------------
+
+# - Where to Log -
+
+#log_destination = 'stderr'		# Valid values are combinations of
+					# stderr, csvlog, syslog and eventlog,
+					# depending on platform.  csvlog
+					# requires logging_collector to be on.
+
+# This is used when logging to stderr:
+logging_collector = on			# Enable capturing of stderr and csvlog
+					# into log files. Required to be on for
+					# csvlogs.
+					# (change requires restart)
+
+# These are only used if logging_collector is on:
+log_directory = 'pg_log'		# directory where log files are written,
+					# can be absolute or relative to PGDATA
+log_filename = 'postgresql-%a.log'	# log file name pattern,
+					# can include strftime() escapes
+log_truncate_on_rotation = on		# If on, an existing log file of the
+					# same name as the new log file will be
+					# truncated rather than appended to.
+					# But such truncation only occurs on
+					# time-driven rotation, not on restarts
+					# or size-driven rotation.  Default is
+					# off, meaning append to existing files
+					# in all cases.
+log_rotation_age = 1d			# Automatic rotation of logfiles will
+					# happen after that time.  0 disables.
+log_rotation_size = 0			# Automatic rotation of logfiles will 
+					# happen after that much log output.
+					# 0 disables.
+
+# These are relevant when logging to syslog:
+#syslog_facility = 'LOCAL0'
+#syslog_ident = 'postgres'
+
+#silent_mode = off			# Run server silently.
+					# DO NOT USE without syslog or
+					# logging_collector
+					# (change requires restart)
+
+
+# - When to Log -
+
+#client_min_messages = notice		# values in order of decreasing detail:
+					#   debug5
+					#   debug4
+					#   debug3
+					#   debug2
+					#   debug1
+					#   log
+					#   notice
+					#   warning
+					#   error
+
+#log_min_messages = warning		# values in order of decreasing detail:
+					#   debug5
+					#   debug4
+					#   debug3
+					#   debug2
+					#   debug1
+					#   info
+					#   notice
+					#   warning
+					#   error
+					#   log
+					#   fatal
+					#   panic
+
+#log_error_verbosity = default		# terse, default, or verbose messages
+
+#log_min_error_statement = error	# values in order of decreasing detail:
+				 	#   debug5
+					#   debug4
+					#   debug3
+					#   debug2
+					#   debug1
+				 	#   info
+					#   notice
+					#   warning
+					#   error
+					#   log
+					#   fatal
+					#   panic (effectively off)
+
+#log_min_duration_statement = -1	# -1 is disabled, 0 logs all statements
+					# and their durations, > 0 logs only
+					# statements running at least this number
+					# of milliseconds
+
+
+# - What to Log -
+
+#debug_print_parse = off
+#debug_print_rewritten = off
+#debug_print_plan = off
+#debug_pretty_print = on
+#log_checkpoints = off
+#log_connections = off
+#log_disconnections = off
+#log_duration = off
+#log_hostname = off
+#log_line_prefix = ''			# special values:
+					#   %u = user name
+					#   %d = database name
+					#   %r = remote host and port
+					#   %h = remote host
+					#   %p = process ID
+					#   %t = timestamp without milliseconds
+					#   %m = timestamp with milliseconds
+					#   %i = command tag
+					#   %c = session ID
+					#   %l = session line number
+					#   %s = session start timestamp
+					#   %v = virtual transaction ID
+					#   %x = transaction ID (0 if none)
+					#   %q = stop here in non-session
+					#        processes
+					#   %% = '%'
+					# e.g. '<%u%%%d> '
+#log_lock_waits = off			# log lock waits >= deadlock_timeout
+#log_statement = 'none'			# none, ddl, mod, all
+#log_temp_files = -1			# log temporary files equal or larger
+					# than the specified size in kilobytes;
+					# -1 disables, 0 logs all temp files
+#log_timezone = unknown			# actually, defaults to TZ environment
+					# setting
+
+
+#------------------------------------------------------------------------------
+# RUNTIME STATISTICS
+#------------------------------------------------------------------------------
+
+# - Query/Index Statistics Collector -
+
+#track_activities = on
+#track_counts = on
+#track_functions = none			# none, pl, all
+#track_activity_query_size = 1024
+#update_process_title = on
+#stats_temp_directory = 'pg_stat_tmp'
+
+
+# - Statistics Monitoring -
+
+#log_parser_stats = off
+#log_planner_stats = off
+#log_executor_stats = off
+#log_statement_stats = off
+
+
+#------------------------------------------------------------------------------
+# AUTOVACUUM PARAMETERS
+#------------------------------------------------------------------------------
+
+#autovacuum = on			# Enable autovacuum subprocess?  'on' 
+					# requires track_counts to also be on.
+#log_autovacuum_min_duration = -1	# -1 disables, 0 logs all actions and
+					# their durations, > 0 logs only
+					# actions running at least this number
+					# of milliseconds.
+#autovacuum_max_workers = 3		# max number of autovacuum subprocesses
+#autovacuum_naptime = 1min		# time between autovacuum runs
+#autovacuum_vacuum_threshold = 50	# min number of row updates before
+					# vacuum
+#autovacuum_analyze_threshold = 50	# min number of row updates before 
+					# analyze
+#autovacuum_vacuum_scale_factor = 0.2	# fraction of table size before vacuum
+#autovacuum_analyze_scale_factor = 0.1	# fraction of table size before analyze
+#autovacuum_freeze_max_age = 200000000	# maximum XID age before forced vacuum
+					# (change requires restart)
+#autovacuum_vacuum_cost_delay = 20ms	# default vacuum cost delay for
+					# autovacuum, in milliseconds;
+					# -1 means use vacuum_cost_delay
+#autovacuum_vacuum_cost_limit = -1	# default vacuum cost limit for
+					# autovacuum, -1 means use
+					# vacuum_cost_limit
+
+
+#------------------------------------------------------------------------------
+# CLIENT CONNECTION DEFAULTS
+#------------------------------------------------------------------------------
+
+# - Statement Behavior -
+
+#search_path = '"$user",public'		# schema names
+#default_tablespace = ''		# a tablespace name, '' uses the default
+#temp_tablespaces = ''			# a list of tablespace names, '' uses
+					# only default tablespace
+#check_function_bodies = on
+#default_transaction_isolation = 'read committed'
+#default_transaction_read_only = off
+#session_replication_role = 'origin'
+#statement_timeout = 0			# in milliseconds, 0 is disabled
+#vacuum_freeze_min_age = 50000000
+#vacuum_freeze_table_age = 150000000
+#xmlbinary = 'base64'
+#xmloption = 'content'
+
+# - Locale and Formatting -
+
+datestyle = 'iso, mdy'
+#intervalstyle = 'postgres'
+#timezone = unknown			# actually, defaults to TZ environment
+					# setting
+#timezone_abbreviations = 'Default'     # Select the set of available time zone
+					# abbreviations.  Currently, there are
+					#   Default
+					#   Australia
+					#   India
+					# You can create your own file in
+					# share/timezonesets/.
+#extra_float_digits = 0			# min -15, max 2
+#client_encoding = sql_ascii		# actually, defaults to database
+					# encoding
+
+# These settings are initialized by initdb, but they can be changed.
+lc_messages = 'en_US.UTF-8'			# locale for system error message
+					# strings
+lc_monetary = 'en_US.UTF-8'			# locale for monetary formatting
+lc_numeric = 'en_US.UTF-8'			# locale for number formatting
+lc_time = 'en_US.UTF-8'				# locale for time formatting
+
+# default configuration for text search
+default_text_search_config = 'pg_catalog.english'
+
+# - Other Defaults -
+
+#dynamic_library_path = '$libdir'
+#local_preload_libraries = ''
+
+
+#------------------------------------------------------------------------------
+# LOCK MANAGEMENT
+#------------------------------------------------------------------------------
+
+#deadlock_timeout = 1s
+#max_locks_per_transaction = 64		# min 10
+					# (change requires restart)
+# Note:  Each lock table slot uses ~270 bytes of shared memory, and there are
+# max_locks_per_transaction * (max_connections + max_prepared_transactions)
+# lock table slots.
+
+
+#------------------------------------------------------------------------------
+# VERSION/PLATFORM COMPATIBILITY
+#------------------------------------------------------------------------------
+
+# - Previous PostgreSQL Versions -
+
+#add_missing_from = off
+#array_nulls = on
+#backslash_quote = safe_encoding	# on, off, or safe_encoding
+#default_with_oids = off
+#escape_string_warning = on
+#regex_flavor = advanced		# advanced, extended, or basic
+#sql_inheritance = on
+#standard_conforming_strings = off
+#synchronize_seqscans = on
+
+# - Other Platforms and Clients -
+
+#transform_null_equals = off
+
+
+#------------------------------------------------------------------------------
+# CUSTOMIZED OPTIONS
+#------------------------------------------------------------------------------
+
+#custom_variable_classes = ''		# list of custom variable class names
+

file:b/setup/rc.local (new)
--- /dev/null
+++ b/setup/rc.local
@@ -1,1 +1,14 @@
+#!/bin/sh
+#
+# This script will be executed *after* all the other init scripts.
+# You can put your own initialization stuff in here if you don't
+# want to do the full Sys V style init stuff.
 
+touch /var/lock/subsys/local
+cd /tmp
+rm -rfv busui
+git clone http://maxious.lambdacomplex.org/busui/git
+sh busui/aws/awsStartup.sh
+
+
+

--- /dev/null
+++ b/setup/systemStartup.sh
@@ -1,1 +1,13 @@
+#!/bin/bash
+#this script should be run from a fresh git checkout from github
+#ami base must have yum install lighttpd-fastcgi, git, tomcat6 
+#php-cli php-gd tomcat6-webapps tomcat6-admin-webapps svn maven2
+#postgres postgres-server php-pg
+#http://www.how2forge.org/installing-lighttpd-with-php5-and-mysql-support-on-fedora-12
 
+sh busuiphp.sh
+sh busuidb.sh
+sh busuiotp.sh
+
+
+

--- /dev/null
+++ b/setup/transitdata.sql
@@ -1,1 +1,1260 @@
 
+--
+-- PostgreSQL database dump
+--
+
+SET statement_timeout = 0;
+SET client_encoding = 'UTF8';
+SET standard_conforming_strings = on;
+SET check_function_bodies = false;
+SET client_min_messages = warning;
+
+--
+-- Name: topology; Type: SCHEMA; Schema: -; Owner: postgres
+--
+
+CREATE SCHEMA topology;
+
+
+ALTER SCHEMA topology OWNER TO postgres;
+
+--
+-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
+--
+
+CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
+
+
+--
+-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: 
+--
+
+COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
+
+
+--
+-- Name: postgis; Type: EXTENSION; Schema: -; Owner: 
+--
+
+CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public;
+
+
+--
+-- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner: 
+--
+
+COMMENT ON EXTENSION postgis IS 'postgis geometry,geography, and raster spatial types and functions';
+
+
+--
+-- Name: postgis_topology; Type: EXTENSION; Schema: -; Owner: 
+--
+
+CREATE EXTENSION IF NOT EXISTS postgis_topology WITH SCHEMA topology;
+
+
+--
+-- Name: EXTENSION postgis_topology; Type: COMMENT; Schema: -; Owner: 
+--
+
+COMMENT ON EXTENSION postgis_topology IS 'postgis topology spatial types and functions';
+
+
+SET search_path = public, pg_catalog;
+
+--
+-- Name: linefromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION linefromtext(text) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromText($1)) = 'LINESTRING'
+	THEN GeomFromText($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.linefromtext(text) OWNER TO postgres;
+
+--
+-- Name: linefromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION linefromtext(text, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = 'LINESTRING'
+	THEN GeomFromText($1,$2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.linefromtext(text, integer) OWNER TO postgres;
+
+--
+-- Name: linefromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION linefromwkb(bytea) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'LINESTRING'
+	THEN GeomFromWKB($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.linefromwkb(bytea) OWNER TO postgres;
+
+--
+-- Name: linefromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION linefromwkb(bytea, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'LINESTRING'
+	THEN GeomFromWKB($1, $2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.linefromwkb(bytea, integer) OWNER TO postgres;
+
+--
+-- Name: linestringfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION linestringfromtext(text) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$SELECT LineFromText($1)$_$;
+
+
+ALTER FUNCTION public.linestringfromtext(text) OWNER TO postgres;
+
+--
+-- Name: linestringfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION linestringfromtext(text, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$SELECT LineFromText($1, $2)$_$;
+
+
+ALTER FUNCTION public.linestringfromtext(text, integer) OWNER TO postgres;
+
+--
+-- Name: linestringfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION linestringfromwkb(bytea) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'LINESTRING'
+	THEN GeomFromWKB($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.linestringfromwkb(bytea) OWNER TO postgres;
+
+--
+-- Name: linestringfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION linestringfromwkb(bytea, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'LINESTRING'
+	THEN GeomFromWKB($1, $2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.linestringfromwkb(bytea, integer) OWNER TO postgres;
+
+--
+-- Name: mlinefromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION mlinefromtext(text) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromText($1)) = 'MULTILINESTRING'
+	THEN GeomFromText($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.mlinefromtext(text) OWNER TO postgres;
+
+--
+-- Name: mlinefromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION mlinefromtext(text, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE
+	WHEN geometrytype(GeomFromText($1, $2)) = 'MULTILINESTRING'
+	THEN GeomFromText($1,$2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.mlinefromtext(text, integer) OWNER TO postgres;
+
+--
+-- Name: mlinefromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION mlinefromwkb(bytea) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'MULTILINESTRING'
+	THEN GeomFromWKB($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.mlinefromwkb(bytea) OWNER TO postgres;
+
+--
+-- Name: mlinefromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION mlinefromwkb(bytea, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'MULTILINESTRING'
+	THEN GeomFromWKB($1, $2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.mlinefromwkb(bytea, integer) OWNER TO postgres;
+
+--
+-- Name: mpointfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION mpointfromtext(text) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromText($1)) = 'MULTIPOINT'
+	THEN GeomFromText($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.mpointfromtext(text) OWNER TO postgres;
+
+--
+-- Name: mpointfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION mpointfromtext(text, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromText($1,$2)) = 'MULTIPOINT'
+	THEN GeomFromText($1,$2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.mpointfromtext(text, integer) OWNER TO postgres;
+
+--
+-- Name: mpointfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION mpointfromwkb(bytea) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'MULTIPOINT'
+	THEN GeomFromWKB($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.mpointfromwkb(bytea) OWNER TO postgres;
+
+--
+-- Name: mpointfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION mpointfromwkb(bytea, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1,$2)) = 'MULTIPOINT'
+	THEN GeomFromWKB($1, $2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.mpointfromwkb(bytea, integer) OWNER TO postgres;
+
+--
+-- Name: mpolyfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION mpolyfromtext(text) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromText($1)) = 'MULTIPOLYGON'
+	THEN GeomFromText($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.mpolyfromtext(text) OWNER TO postgres;
+
+--
+-- Name: mpolyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION mpolyfromtext(text, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = 'MULTIPOLYGON'
+	THEN GeomFromText($1,$2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.mpolyfromtext(text, integer) OWNER TO postgres;
+
+--
+-- Name: mpolyfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION mpolyfromwkb(bytea, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'MULTIPOLYGON'
+	THEN GeomFromWKB($1, $2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.mpolyfromwkb(bytea, integer) OWNER TO postgres;
+
+--
+-- Name: multilinefromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION multilinefromwkb(bytea) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'MULTILINESTRING'
+	THEN GeomFromWKB($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.multilinefromwkb(bytea) OWNER TO postgres;
+
+--
+-- Name: multilinefromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION multilinefromwkb(bytea, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'MULTILINESTRING'
+	THEN GeomFromWKB($1, $2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.multilinefromwkb(bytea, integer) OWNER TO postgres;
+
+--
+-- Name: multilinestringfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION multilinestringfromtext(text) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$SELECT ST_MLineFromText($1)$_$;
+
+
+ALTER FUNCTION public.multilinestringfromtext(text) OWNER TO postgres;
+
+--
+-- Name: multilinestringfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION multilinestringfromtext(text, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$SELECT MLineFromText($1, $2)$_$;
+
+
+ALTER FUNCTION public.multilinestringfromtext(text, integer) OWNER TO postgres;
+
+--
+-- Name: multipointfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION multipointfromtext(text) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$SELECT MPointFromText($1)$_$;
+
+
+ALTER FUNCTION public.multipointfromtext(text) OWNER TO postgres;
+
+--
+-- Name: multipointfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION multipointfromtext(text, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$SELECT MPointFromText($1, $2)$_$;
+
+
+ALTER FUNCTION public.multipointfromtext(text, integer) OWNER TO postgres;
+
+--
+-- Name: multipointfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION multipointfromwkb(bytea) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'MULTIPOINT'
+	THEN GeomFromWKB($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.multipointfromwkb(bytea) OWNER TO postgres;
+
+--
+-- Name: multipointfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION multipointfromwkb(bytea, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1,$2)) = 'MULTIPOINT'
+	THEN GeomFromWKB($1, $2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.multipointfromwkb(bytea, integer) OWNER TO postgres;
+
+--
+-- Name: multipolyfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION multipolyfromwkb(bytea) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'MULTIPOLYGON'
+	THEN GeomFromWKB($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.multipolyfromwkb(bytea) OWNER TO postgres;
+
+--
+-- Name: multipolyfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION multipolyfromwkb(bytea, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'MULTIPOLYGON'
+	THEN GeomFromWKB($1, $2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.multipolyfromwkb(bytea, integer) OWNER TO postgres;
+
+--
+-- Name: multipolygonfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION multipolygonfromtext(text) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$SELECT MPolyFromText($1)$_$;
+
+
+ALTER FUNCTION public.multipolygonfromtext(text) OWNER TO postgres;
+
+--
+-- Name: multipolygonfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION multipolygonfromtext(text, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$SELECT MPolyFromText($1, $2)$_$;
+
+
+ALTER FUNCTION public.multipolygonfromtext(text, integer) OWNER TO postgres;
+
+--
+-- Name: pointfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION pointfromtext(text) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromText($1)) = 'POINT'
+	THEN GeomFromText($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.pointfromtext(text) OWNER TO postgres;
+
+--
+-- Name: pointfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION pointfromtext(text, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = 'POINT'
+	THEN GeomFromText($1,$2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.pointfromtext(text, integer) OWNER TO postgres;
+
+--
+-- Name: pointfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION pointfromwkb(bytea) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'POINT'
+	THEN GeomFromWKB($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.pointfromwkb(bytea) OWNER TO postgres;
+
+--
+-- Name: pointfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION pointfromwkb(bytea, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'POINT'
+	THEN GeomFromWKB($1, $2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.pointfromwkb(bytea, integer) OWNER TO postgres;
+
+--
+-- Name: polyfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION polyfromtext(text) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromText($1)) = 'POLYGON'
+	THEN GeomFromText($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.polyfromtext(text) OWNER TO postgres;
+
+--
+-- Name: polyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION polyfromtext(text, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = 'POLYGON'
+	THEN GeomFromText($1,$2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.polyfromtext(text, integer) OWNER TO postgres;
+
+--
+-- Name: polyfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION polyfromwkb(bytea) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'POLYGON'
+	THEN GeomFromWKB($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.polyfromwkb(bytea) OWNER TO postgres;
+
+--
+-- Name: polyfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION polyfromwkb(bytea, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = 'POLYGON'
+	THEN GeomFromWKB($1, $2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.polyfromwkb(bytea, integer) OWNER TO postgres;
+
+--
+-- Name: polygonfromtext(text); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION polygonfromtext(text) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$SELECT PolyFromText($1)$_$;
+
+
+ALTER FUNCTION public.polygonfromtext(text) OWNER TO postgres;
+
+--
+-- Name: polygonfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION polygonfromtext(text, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$SELECT PolyFromText($1, $2)$_$;
+
+
+ALTER FUNCTION public.polygonfromtext(text, integer) OWNER TO postgres;
+
+--
+-- Name: polygonfromwkb(bytea); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION polygonfromwkb(bytea) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = 'POLYGON'
+	THEN GeomFromWKB($1)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.polygonfromwkb(bytea) OWNER TO postgres;
+
+--
+-- Name: polygonfromwkb(bytea, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION polygonfromwkb(bytea, integer) RETURNS geometry
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$
+	SELECT CASE WHEN geometrytype(GeomFromWKB($1,$2)) = 'POLYGON'
+	THEN GeomFromWKB($1, $2)
+	ELSE NULL END
+	$_$;
+
+
+ALTER FUNCTION public.polygonfromwkb(bytea, integer) OWNER TO postgres;
+
+--
+-- Name: st_askml(integer, geometry); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION st_askml(integer, geometry) RETURNS text
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$SELECT _ST_AsKML($1, ST_Transform($2,4326), 15)$_$;
+
+
+ALTER FUNCTION public.st_askml(integer, geometry) OWNER TO postgres;
+
+--
+-- Name: st_askml(integer, geography); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION st_askml(integer, geography) RETURNS text
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$SELECT _ST_AsKML($1, $2, 15)$_$;
+
+
+ALTER FUNCTION public.st_askml(integer, geography) OWNER TO postgres;
+
+--
+-- Name: memcollect(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
+--
+
+CREATE AGGREGATE memcollect(geometry) (
+    SFUNC = public.st_collect,
+    STYPE = geometry
+);
+
+
+ALTER AGGREGATE public.memcollect(geometry) OWNER TO postgres;
+
+--
+-- Name: st_extent3d(geometry); Type: AGGREGATE; Schema: public; Owner: postgres
+--
+
+CREATE AGGREGATE st_extent3d(geometry) (
+    SFUNC = public.st_combine_bbox,
+    STYPE = box3d
+);
+
+
+ALTER AGGREGATE public.st_extent3d(geometry) OWNER TO postgres;
+
+SET default_tablespace = '';
+
+SET default_with_oids = false;
+
+--
+-- Name: agency; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE agency (
+    agency_name text NOT NULL,
+    agency_url text,
+    agency_timezone text,
+    agency_lang text,
+    agency_phone text,
+    agency_fare_url text,
+    agency_id integer
+);
+
+
+ALTER TABLE public.agency OWNER TO postgres;
+
+--
+-- Name: calendar; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE calendar (
+    service_id text NOT NULL,
+    start_date text,
+    end_date text,
+    monday integer,
+    tuesday integer,
+    wednesday integer,
+    thursday integer,
+    friday integer,
+    saturday integer,
+    sunday integer
+);
+
+
+ALTER TABLE public.calendar OWNER TO postgres;
+
+--
+-- Name: calendar_dates; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE calendar_dates (
+    service_id text NOT NULL,
+    date text NOT NULL,
+    exception_type text
+);
+
+
+ALTER TABLE public.calendar_dates OWNER TO postgres;
+
+--
+-- Name: fare_attributes; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE fare_attributes (
+    fare_id text NOT NULL,
+    price double precision,
+    currency_type text,
+    payment_method integer,
+    transfers text,
+    transfer_duration integer
+);
+
+
+ALTER TABLE public.fare_attributes OWNER TO postgres;
+
+--
+-- Name: feed_info; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE feed_info (
+    feed_publisher_name text NOT NULL,
+    feed_publisher_url text,
+    feed_lang text,
+    feed_start_date text,
+    feed_end_date text,
+    feed_version text
+);
+
+
+ALTER TABLE public.feed_info OWNER TO postgres;
+
+--
+-- Name: myway_observations; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE myway_observations (
+    observation_id text NOT NULL,
+    myway_stop text,
+    "time" timestamp with time zone,
+    myway_route text
+);
+
+
+ALTER TABLE public.myway_observations OWNER TO postgres;
+
+--
+-- Name: myway_routes; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE myway_routes (
+    myway_route text NOT NULL,
+    route_short_name text,
+    trip_headsign text
+);
+
+
+ALTER TABLE public.myway_routes OWNER TO postgres;
+
+--
+-- Name: myway_stops; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE myway_stops (
+    myway_stop text NOT NULL,
+    stop_id text
+);
+
+
+ALTER TABLE public.myway_stops OWNER TO postgres;
+
+--
+-- Name: myway_timingdeltas; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE myway_timingdeltas (
+    observation_id text NOT NULL,
+    route_id text,
+    stop_id text,
+    timing_delta integer,
+    "time" time with time zone,
+    date date,
+    timing_period text,
+    stop_sequence integer,
+    myway_stop text,
+    route_name text
+);
+
+
+ALTER TABLE public.myway_timingdeltas OWNER TO postgres;
+
+--
+-- Name: myway_timingdeltas_timing_period_seq; Type: SEQUENCE; Schema: public; Owner: postgres
+--
+
+CREATE SEQUENCE myway_timingdeltas_timing_period_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+ALTER TABLE public.myway_timingdeltas_timing_period_seq OWNER TO postgres;
+
+--
+-- Name: myway_timingdeltas_timing_period_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
+--
+
+ALTER SEQUENCE myway_timingdeltas_timing_period_seq OWNED BY myway_timingdeltas.timing_period;
+
+
+--
+-- Name: routes; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE routes (
+    route_id text NOT NULL,
+    route_short_name text,
+    route_long_name text,
+    route_desc text,
+    route_type integer,
+    route_url text,
+    route_text_color text,
+    route_color text,
+    agency_id text
+);
+
+
+ALTER TABLE public.routes OWNER TO postgres;
+
+--
+-- Name: servicealerts_alerts; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE servicealerts_alerts (
+    id integer NOT NULL,
+    url text,
+    description text,
+    start timestamp with time zone,
+    "end" timestamp with time zone,
+    cause text,
+    effect text,
+    header text
+);
+
+
+ALTER TABLE public.servicealerts_alerts OWNER TO postgres;
+
+--
+-- Name: servicealerts_alerts_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
+--
+
+CREATE SEQUENCE servicealerts_alerts_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+ALTER TABLE public.servicealerts_alerts_id_seq OWNER TO postgres;
+
+--
+-- Name: servicealerts_alerts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
+--
+
+ALTER SEQUENCE servicealerts_alerts_id_seq OWNED BY servicealerts_alerts.id;
+
+
+--
+-- Name: servicealerts_informed; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE servicealerts_informed (
+    servicealert_id integer NOT NULL,
+    informed_class text NOT NULL,
+    informed_id text NOT NULL,
+    informed_action text
+);
+
+
+ALTER TABLE public.servicealerts_informed OWNER TO postgres;
+
+--
+-- Name: shapes; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE shapes (
+    shape_id text NOT NULL,
+    shape_pt_lat double precision,
+    shape_pt_lon double precision,
+    shape_pt_sequence integer NOT NULL,
+    shape_dist_traveled integer,
+    shape_pt geography
+);
+
+
+ALTER TABLE public.shapes OWNER TO postgres;
+
+--
+-- Name: stop_times; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE stop_times (
+    trip_id text NOT NULL,
+    arrival_time time without time zone,
+    departure_time time without time zone,
+    stop_id text,
+    stop_sequence integer NOT NULL,
+    stop_headsign text,
+    pickup_type text,
+    drop_off_type text,
+    shape_dist_traveled text
+);
+
+
+ALTER TABLE public.stop_times OWNER TO postgres;
+
+--
+-- Name: stops; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE stops (
+    stop_id text NOT NULL,
+    stop_code text,
+    stop_name text,
+    stop_desc text,
+    stop_lat double precision,
+    stop_lon double precision,
+    zone_id text,
+    stop_url text,
+    location_type integer,
+    "position" geography
+);
+
+
+ALTER TABLE public.stops OWNER TO postgres;
+
+--
+-- Name: trips; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE TABLE trips (
+    route_id text,
+    service_id text,
+    trip_id text NOT NULL,
+    trip_headsign text,
+    direction_id text,
+    block_id text,
+    shape_id text
+);
+
+
+ALTER TABLE public.trips OWNER TO postgres;
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
+--
+
+ALTER TABLE servicealerts_alerts ALTER COLUMN id SET DEFAULT nextval('servicealerts_alerts_id_seq'::regclass);
+
+
+--
+-- Name: agency_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY agency
+    ADD CONSTRAINT agency_pkey PRIMARY KEY (agency_name);
+
+
+--
+-- Name: calendar_dates_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY calendar_dates
+    ADD CONSTRAINT calendar_dates_pkey PRIMARY KEY (service_id, date);
+
+
+--
+-- Name: calendar_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY calendar
+    ADD CONSTRAINT calendar_pkey PRIMARY KEY (service_id);
+
+
+--
+-- Name: fare_attributes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY fare_attributes
+    ADD CONSTRAINT fare_attributes_pkey PRIMARY KEY (fare_id);
+
+
+--
+-- Name: feed_info_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY feed_info
+    ADD CONSTRAINT feed_info_pkey PRIMARY KEY (feed_publisher_name);
+
+
+--
+-- Name: myway_observations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY myway_observations
+    ADD CONSTRAINT myway_observations_pkey PRIMARY KEY (observation_id);
+
+
+--
+-- Name: myway_routes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY myway_routes
+    ADD CONSTRAINT myway_routes_pkey PRIMARY KEY (myway_route);
+
+
+--
+-- Name: myway_timingdeltas_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY myway_timingdeltas
+    ADD CONSTRAINT myway_timingdeltas_pkey PRIMARY KEY (observation_id);
+
+
+--
+-- Name: mywaystops_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY myway_stops
+    ADD CONSTRAINT mywaystops_pkey PRIMARY KEY (myway_stop);
+
+
+--
+-- Name: routes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY routes
+    ADD CONSTRAINT routes_pkey PRIMARY KEY (route_id);
+
+
+--
+-- Name: servicealerts_alerts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY servicealerts_alerts
+    ADD CONSTRAINT servicealerts_alerts_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: servicealerts_informed_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY servicealerts_informed
+    ADD CONSTRAINT servicealerts_informed_pkey PRIMARY KEY (servicealert_id, informed_class, informed_id);
+
+
+--
+-- Name: shapes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY shapes
+    ADD CONSTRAINT shapes_pkey PRIMARY KEY (shape_id, shape_pt_sequence);
+
+
+--
+-- Name: stop_times_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY stop_times
+    ADD CONSTRAINT stop_times_pkey PRIMARY KEY (trip_id, stop_sequence);
+
+
+--
+-- Name: stops_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY stops
+    ADD CONSTRAINT stops_pkey PRIMARY KEY (stop_id);
+
+
+--
+-- Name: stops_stop_code_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY stops
+    ADD CONSTRAINT stops_stop_code_key UNIQUE (stop_code);
+
+
+--
+-- Name: trips_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+--
+
+ALTER TABLE ONLY trips
+    ADD CONSTRAINT trips_pkey PRIMARY KEY (trip_id);
+
+
+--
+-- Name: routenumber; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE INDEX routenumber ON routes USING btree (route_short_name);
+
+
+--
+-- Name: routetrips; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE INDEX routetrips ON trips USING btree (route_id);
+
+
+--
+-- Name: starttime; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE UNIQUE INDEX starttime ON stop_times USING btree (trip_id, stop_id, stop_sequence);
+
+
+--
+-- Name: stops_position_idx; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE INDEX stops_position_idx ON stops USING gist ("position");
+
+
+--
+-- Name: stoptimes; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE INDEX stoptimes ON stop_times USING btree (arrival_time, stop_id);
+
+
+--
+-- Name: times; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE INDEX times ON stop_times USING btree (arrival_time);
+
+
+--
+-- Name: triptimes; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
+--
+
+CREATE INDEX triptimes ON stop_times USING btree (trip_id, arrival_time);
+
+
+--
+-- Name: servicealerts_alertid; Type: FK CONSTRAINT; Schema: public; Owner: postgres
+--
+
+ALTER TABLE ONLY servicealerts_informed
+    ADD CONSTRAINT servicealerts_alertid FOREIGN KEY (servicealert_id) REFERENCES servicealerts_alerts(id);
+
+
+--
+-- Name: public; Type: ACL; Schema: -; Owner: postgres
+--
+
+REVOKE ALL ON SCHEMA public FROM PUBLIC;
+REVOKE ALL ON SCHEMA public FROM postgres;
+GRANT ALL ON SCHEMA public TO postgres;
+GRANT ALL ON SCHEMA public TO PUBLIC;
+
+
+--
+-- Name: myway_observations; Type: ACL; Schema: public; Owner: postgres
+--
+
+REVOKE ALL ON TABLE myway_observations FROM PUBLIC;
+REVOKE ALL ON TABLE myway_observations FROM postgres;
+GRANT ALL ON TABLE myway_observations TO postgres;
+
+
+--
+-- Name: stops; Type: ACL; Schema: public; Owner: postgres
+--
+
+REVOKE ALL ON TABLE stops FROM PUBLIC;
+REVOKE ALL ON TABLE stops FROM postgres;
+GRANT ALL ON TABLE stops TO postgres;
+GRANT SELECT ON TABLE stops TO transitdata;
+
+
+--
+-- PostgreSQL database dump complete
+--
+
+

file:a/stop.php -> file:b/stop.php
--- a/stop.php
+++ b/stop.php
@@ -16,8 +16,9 @@
   limitations under the License.
  */
 include ('include/common.inc.php');
-if ($stopid)
+if (isset($stopid)) {
     $stop = getStop($stopid);
+}
 /* if ($stopcode != "" && $stop[5] != $stopcode) {
   $url = $APIurl . "/json/stopcodesearch?q=" . $stopcode;
   $stopsearch = json_decode(getPage($url));
@@ -74,10 +75,10 @@
     }
 }
 if (sizeof($stops) > 0) {
-$stopDescParts = explode("<br>",$stop['stop_desc']);
-include_header(trim(str_replace("Street: ","",$stopDescParts[0])), "stop");
-} else {
-    include_header($stop['stop_name']);
+    $stopDescParts = explode("<br>", $stop['stop_desc']);
+    include_header(trim(str_replace("Street: ", "", $stopDescParts[0])), "stop");
+} else {
+    include_header($stop['stop_name'], "stop");
 }
 /* $serviceAlerts = json_decode(getPage(curPageURL() . "/servicealerts_api.php?filter_class=stop&filter_id=".$stopid) , true);
 
@@ -85,7 +86,7 @@
   echo '<div id="servicewarning">'.$serviceAlert['alert']['description']['translation'].'</div>';
   } */
 
-echo '<span class="content-secondary">';
+echo '<div class="content-secondary">';
 echo $stopLinks;
 if (sizeof($stops) > 0) {
     trackEvent("View Stops", "View Combined Stops", $stop["stop_name"], $stop["stop_id"]);
@@ -102,21 +103,21 @@
 
 timeSettings();
 
-echo '</span><span class="content-primary">';
+echo '</div><div class="content-primary">';
 echo '  <ul data-role="listview"  data-inset="true">';
 if (sizeof($allStopsTrips) > 0) {
     sktimesort($allStopsTrips, "arrival_time", true);
     $trips = $allStopsTrips;
 } else {
-    $trips = getStopTripsWithTimes($stopid);
+    $trips = getStopTripsWithTimes($stopid, "", "", "", (isset($filterIncludeRoutes) || isset($filterHasStop) ? "75" : ""));
 }
 
 echo "<div class='ui-header' style='overflow: visible; height: 2.5em'>";
 // if we have too many trips, cut down to size.
-if (sizeof($trips) > 10) {
-    $trips = array_splice($trips, 0,10);
-}
-    
+if (!isset($filterIncludeRoutes) && !isset($filterHasStop) && sizeof($trips) > 10) {
+    $trips = array_splice($trips, 0, 10);
+}
+
 // later/earlier button setup
 if (sizeof($trips) == 0) {
     $time = isset($_REQUEST['time']) ? strtotime($_REQUEST['time']) : time();
@@ -127,7 +128,7 @@
     $earlierTime = strtotime($trips[$tripsKeys[0]]['arrival_time']) - (90 * 60);
     $laterTime = strtotime($trips[$tripsKeys[sizeof($trips) - 1]]['arrival_time']) - 60;
 }
-if (sizeof($stopids) > 0) {
+if (isset($stopids) && sizeof($stopids) > 0) {
     $stopidurl = "stopids=" . implode(",", $stopids);
 } else {
     $stopidurl = "stopid=$stopid";
@@ -140,34 +141,67 @@
 if (sizeof($trips) == 0) {
     echo "<li style='text-align: center;'>No trips in the near future.</li>";
 } else {
+            if ($labs) {
+// ETA calculation
+                
+                $tripETA = Array();
+                // max/min delay instead of stddev?
+                $query = $query = "select 'lol', avg(timing_delta), stddev(timing_delta), count(*) from myway_timingdeltas where extract(hour from time) between ".date("H", $earlierTime)." and ".date("H", $laterTime);
+       //select 'lol', stop_id,extract(hour from time), avg(timing_delta), stddev(timing_delta), count(*) from myway_timingdeltas where stop_id = '5501' group by stop_id, extract(hour from time) order by extract(hour from time)
+                $query = $conn->prepare($query);
+    $query->execute();
+    if (!$query) {
+        databaseError($conn->errorInfo());
+        return Array();
+    }
+    $ETAparams = Array();
+    foreach ($query->fetchAll() as $row) {
+        $ETAparams[$row[0]] = Array("avg"=> $row[1], "stddev"=>floor($row[2]),"count"=>$row[3]);
+    };
+    //print_r($ETAparams);
     foreach ($trips as $trip) {
-        echo '<li>';
-
-        $destination = getTripDestination($trip['trip_id']);
-        echo '<a href="trip.php?stopid=' . $stopid . '&amp;tripid=' . $trip['trip_id'] . '"><h3>'. $trip['route_short_name'] . " towards " . $destination['stop_name'] . "</h3><p>";
-        $viaPoints = viaPointNames($trip['trip_id'], $trip['stop_sequence']);
-        if ($viaPoints != "")
-            echo '<br><span class="viaPoints">Via: ' . $viaPoints . '</span>';
-        if (sizeof($tripStopNumbers) > 0) {
-            echo '<br><small>Boarding At: ';
-            if (sizeof($tripStopNumbers[$trip['trip_id']]) == sizeof($stopids)) {
-                echo "All Stops";
-            } else {
-                foreach ($tripStopNumbers[$trip['trip_id']] as $key) {
-                    echo $stopNames[$key] . ', ';
+        $tripETA[$trip['trip_id']] = date("H:i",strtotime($trip['arrival_time']." - ".(floor($ETAparams['lol']['stddev']))." seconds"))." to ".
+        date("H:i",strtotime($trip['arrival_time']." + ".(floor($ETAparams['lol']['stddev']))." seconds"));
+    }
+    //print_r($tripETA);
+}
+    foreach ($trips as $trip) {
+        if (
+                isset($filterHasStop) && (getTripHasStop($trip['trip_id'], $filterHasStop) == 1)
+                || (isset($filterIncludeRoutes) && in_array($trip["route_short_name"], $filterIncludeRoutes))
+                || (!isset($filterIncludeRoutes) && !isset($filterHasStop))
+        ) {
+            echo '<li>';
+
+            $destination = getTripDestination($trip['trip_id']);
+            echo '<a href="trip.php?stopid=' . $stopid . '&amp;tripid=' . $trip['trip_id'] . '"><h3>' . $trip['route_short_name'] . " towards " . $destination['stop_name'] . "</h3><p>";
+            $viaPoints = viaPointNames($trip['trip_id'], $trip['stop_sequence']);
+if ($labs) {
+                echo '<br><span class="eta">ETA: ' . $tripETA[$trip['trip_id']] . '</span>';
+            }
+            if ($viaPoints != "")
+                echo '<br><span class="viaPoints">Via: ' . $viaPoints . '</span>';
+            if (sizeof($tripStopNumbers) > 0) {
+                echo '<br><small>Boarding At: ';
+                if (sizeof($tripStopNumbers[$trip['trip_id']]) == sizeof($stopids)) {
+                    echo "All Stops";
+                } else {
+                    foreach ($tripStopNumbers[$trip['trip_id']] as $key) {
+                        echo $stopNames[$key] . ', ';
+                    }
                 }
+                echo '</small>';
             }
-            echo '</small>';
+            echo '</p>';
+            echo '<p class="ui-li-aside"><strong>' . $trip['arrival_time'] . '</strong></p>';
+            echo '</a></li>';
+            flush();
+            @ob_flush();
         }
-        echo '</p>';
-        echo '<p class="ui-li-aside"><strong>' . $trip['arrival_time'] . '</strong></p>';
-        echo '</a></li>';
-        flush();
-        @ob_flush();
     }
 }
 echo '</ul>';
-echo '</span>';
+echo '</div>';
 include_footer();
 ?>
 

--- a/stopList.php
+++ b/stopList.php
@@ -60,7 +60,7 @@
             die();
         }
         $stops = getNearbyStops($_SESSION['lat'], $_SESSION['lon'], 15);
-        echo '<span class="content-secondary">';
+        echo '<div class="content-secondary">';
         $stopPositions[] = Array(
             $_SESSION['lat'],
             $_SESSION['lon']
@@ -73,7 +73,7 @@
         }
         echo staticmap($stopPositions, true, true);
         placeSettings();
-        echo '</span><span class="content-primary">';
+        echo '</div><div class="content-primary">';
     } else if (isset($suburb)) {
         $stops = getStopsBySuburb($suburb);
         include_header("Stops in " . ucwords($suburb), "stopList");
@@ -94,9 +94,8 @@
         //var_dump($stops);
         $stopsGrouped = Array();
         foreach ($stops as $key => $stop) {
-            if (stopCompare($stops[$key]["stop_name"]) 
-                    != stopCompare($stops[$key + 1]["stop_name"])
-                    || $key + 1 >= sizeof($stops)) {
+            if ($key + 1 >= sizeof($stops) || 
+                    stopCompare($stops[$key]["stop_name"]) != stopCompare($stops[$key + 1]["stop_name"])) {
                 if (sizeof($stopsGrouped) > 0) {
                     // print and empty grouped stops
                     // subsequent duplicates
@@ -145,8 +144,9 @@
         }
     }
     echo '</ul>';
-    if (isset($nearby))
-        echo '</span>';
+    if (isset($nearby)) {
+        echo '</div>';
+}
 }
 include_footer();
 ?>

file:a/trip.php -> file:b/trip.php
--- a/trip.php
+++ b/trip.php
@@ -31,10 +31,12 @@
 $directionid = $trip['direction_id'];
 $service_period = strtolower($trip["service_id"]);
 $destination = getTripDestination($trip['trip_id']);
-include_header("Stops on " . $trip['route_short_name'] . ' ' . $destination['stop_name'], "trip");
-trackEvent("Route/Trip View", "View Route", $trip['route_short_name'] . ' ' . $destination['stop_name'], $routeid);
-echo '<span class="content-secondary">';
-echo '<a href="' . $trip['route_url'] . '">View Original Timetable/Map</a>';
+include_header("Route " . $trip['route_id'] . ' to ' . $destination['stop_name'], "trip");
+trackEvent("Route/Trip View", "View Route", $trip['route_id'] . ' ' . $destination['stop_name'], $routeid);
+echo '<div class="content-secondary">';
+echo '<a href="' . $trip['route_url'] . '">View Original Timetable/Map</a> ';
+echo '<a href="geo/trip.kml.php?tripid='.$tripid.'">View Trip in Google Earth</a> ';
+echo '<a href="geo/route.kml.php?routeid='.$routeid.'">View Route in Google Earth</a>';
 echo '<h2>Via:</h2> <small>' . viaPointNames($tripid) . '</small>';
 echo '<h2>Other Trips:</h2> ';
 $routeTrips = getRouteTrips($routeid, $trip['direction_id'], $service_period);
@@ -57,7 +59,7 @@
     foreach (getRouteHeadsigns($routeid) as $headsign) {
         if ($headsign['direction_id'] != $directionid || strtolower($headsign['service_id']) != $service_period) {
 
-            echo '<a href="trip.php?routeid=' . $routeid . '&directionid=' . $headsign['direction_id'] . '&service_period=' . $headsign['service_id'] . '"> Starting at ' . $headsign['stop_name'] . ' (' . $headsign['service_id'] . ')</a> ';
+            echo '<a href="trip.php?routeid=' . $routeid . '&amp;directionid=' . $headsign['direction_id'] . '&amp;service_period=' . $headsign['service_id'] . '"> Starting at ' . $headsign['stop_name'] . ' (' . $headsign['service_id'] . ')</a> ';
             $otherDir++;
         }
     }
@@ -65,21 +67,23 @@
 if ($otherDir == 0) {
     echo "None";
 }
-echo '</span><span class="content-primary">';
+echo '</div><div class="content-primary">';
 flush();
 @ob_flush();
 echo "<div class='ui-header' style='overflow: visible; height: 1.5em'>";
-if ($nextTrip)
+if (isset($nextTrip)) {
     echo '<a href="trip.php?tripid=' . $nextTrip . "&amp;routeid=" . $routeid . '" data-icon="arrow-r" class="ui-btn-right">Next Trip</a>';
-if ($prevTrip)
+}
+if (isset($prevTrip)) {
     echo '<a href="trip.php?tripid=' . $prevTrip . "&amp;routeid=" . $routeid . '" data-icon="arrow-l" class="ui-btn-left">Previous Trip</a>';
+}
 echo "</div>";
 echo '  <ul data-role="listview"  data-inset="true">';
 $stopsGrouped = Array();
 $tripStopTimes = getTripStopTimes($tripid);
 echo '<li data-role="list-divider">' . $tripStopTimes[0]['arrival_time'] . ' to ' . $tripStopTimes[sizeof($tripStopTimes) - 1]['arrival_time'] . ' towards ' . $destination['stop_name'] . ' (' . ucwords(strtolower($tripStopTimes[0]['service_id'])) . ')</li>';
 foreach ($tripStopTimes as $key => $tripStopTime) {
-    if ($key + 1 > sizeof($tripStopTimes) || stopCompare($tripStopTimes[$key]["stop_name"]) != stopCompare($tripStopTimes[$key + 1]["stop_name"])) {
+    if ($key + 1 >= sizeof($tripStopTimes) || stopCompare($tripStopTimes[$key]["stop_name"]) != stopCompare($tripStopTimes[$key + 1]["stop_name"])) {
         echo '<li>';
 
         if (sizeof($stopsGrouped) > 0) {
@@ -117,7 +121,6 @@
         if ($key - 1 <= 0 || stopCompare($tripStopTimes[$key]['stop_name']) != stopCompare($tripStopTimes[$key - 1]['stop_name'])) {
             // first duplicate
             $stopsGrouped = Array(
-                "name" => trim(preg_replace("/\(Platform.*/", "", $stop['stop_name'])),
                 "startTime" => $tripStopTime['arrival_time'],
                 "stop_ids" => Array(
                     $tripStopTime['stop_id']
@@ -131,7 +134,7 @@
     }
 }
 echo '</ul>';
-echo '</span>';
+echo '</div>';
 include_footer();
 ?>