aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rwxr-xr-xbin/make_css1
-rwxr-xr-xbin/send-comments1
-rw-r--r--conf/packages.debian-squeeze1
-rw-r--r--conf/packages.debian-squeeze+testing1
-rw-r--r--data/dashboard.json236
-rw-r--r--perllib/FixMyStreet/App.pm10
-rw-r--r--perllib/FixMyStreet/App/Controller/Auth.pm49
-rw-r--r--perllib/FixMyStreet/App/Controller/Contact.pm15
-rw-r--r--perllib/FixMyStreet/App/Controller/Dashboard.pm155
-rw-r--r--perllib/FixMyStreet/App/Controller/Photo.pm6
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm79
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/Update.pm31
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Static.pm7
-rw-r--r--perllib/FixMyStreet/Cobrand/Barnet.pm84
-rw-r--r--perllib/FixMyStreet/Cobrand/Bromley.pm9
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm21
-rw-r--r--perllib/FixMyStreet/Cobrand/FixMyStreet.pm18
-rw-r--r--perllib/FixMyStreet/Cobrand/LichfieldDC.pm2
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/AlertType.pm15
-rw-r--r--perllib/FixMyStreet/SendReport/Barnet.pm11
-rw-r--r--perllib/FixMyStreet/SendReport/Open311.pm2
-rw-r--r--perllib/Open311.pm2
-rw-r--r--perllib/Open311/GetServiceRequestUpdates.pm12
-rw-r--r--phonegap/Android/.classpath9
-rw-r--r--phonegap/Android/.project33
-rw-r--r--phonegap/Android/AndroidManifest.xml30
l---------phonegap/Android/assets/www1
-rw-r--r--phonegap/Android/gen/org/mysociety/FixMyStreet/R.java27
-rwxr-xr-xphonegap/Android/libs/cordova-1.8.0.jarbin0 -> 163938 bytes
-rw-r--r--phonegap/Android/proguard.cfg40
-rw-r--r--phonegap/Android/project.properties11
-rw-r--r--phonegap/Android/res/drawable-hdpi/ic_launcher.pngbin0 -> 4147 bytes
-rw-r--r--phonegap/Android/res/drawable-ldpi/ic_launcher.pngbin0 -> 1723 bytes
-rw-r--r--phonegap/Android/res/drawable-mdpi/ic_launcher.pngbin0 -> 2574 bytes
-rw-r--r--phonegap/Android/res/layout/main.xml12
-rw-r--r--phonegap/Android/res/values/strings.xml7
-rw-r--r--phonegap/Android/res/xml/cordova.xml5
-rw-r--r--phonegap/Android/res/xml/plugins.xml38
-rw-r--r--phonegap/Android/src/org/mysociety/FixMyStreet/AndroidActivity.java13
-rw-r--r--phonegap/README11
-rwxr-xr-xphonegap/android_cordova.js5726
-rw-r--r--phonegap/iPhone/FixMyStreet.xcodeproj/project.pbxproj557
-rw-r--r--phonegap/iPhone/FixMyStreet.xcodeproj/project.xcworkspace/contents.xcworkspacedata7
-rw-r--r--phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/FixMyStreet.xcscheme84
-rw-r--r--phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/xcschememanagement.plist22
-rw-r--r--phonegap/iPhone/FixMyStreet/Classes/AppDelegate.h50
-rw-r--r--phonegap/iPhone/FixMyStreet/Classes/AppDelegate.m140
-rw-r--r--phonegap/iPhone/FixMyStreet/Classes/MainViewController.h36
-rw-r--r--phonegap/iPhone/FixMyStreet/Classes/MainViewController.m140
-rw-r--r--phonegap/iPhone/FixMyStreet/Classes/MainViewController.xib118
-rw-r--r--phonegap/iPhone/FixMyStreet/Cordova.plist63
-rw-r--r--phonegap/iPhone/FixMyStreet/FixMyStreet-Info.plist53
-rw-r--r--phonegap/iPhone/FixMyStreet/FixMyStreet-Prefix.pch7
-rw-r--r--phonegap/iPhone/FixMyStreet/Plugins/README1
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg.pngbin0 -> 955 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg@2x.pngbin0 -> 971 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg~ipad.pngbin0 -> 969 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone.pngbin0 -> 72226 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone@2x.pngbin0 -> 282409 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone~ipad.pngbin0 -> 393975 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button.pngbin0 -> 5852 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button@2x.pngbin0 -> 13875 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button~ipad.pngbin0 -> 7547 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg.pngbin0 -> 973 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg@2x.pngbin0 -> 990 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg~ipad.pngbin0 -> 996 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button.pngbin0 -> 5514 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button@2x.pngbin0 -> 12965 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button~ipad.pngbin0 -> 7119 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/de.lproj/Localizable.strings26
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/en.lproj/Localizable.strings25
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/es.lproj/Localizable.strings25
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/icons/icon-72.pngbin0 -> 4944 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/icons/icon.pngbin0 -> 3902 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/icons/icon@2x.pngbin0 -> 7869 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/se.lproj/Localizable.strings26
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/splash/Default.pngbin0 -> 9537 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/Resources/splash/Default@2x.pngbin0 -> 22029 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet/en.lproj/InfoPlist.strings2
-rw-r--r--phonegap/iPhone/FixMyStreet/main.m35
-rwxr-xr-xphonegap/iPhone/FixMyStreet/verify.sh12
-rw-r--r--phonegap/iphone_cordova.js5226
-rw-r--r--phonegap/www/about.html153
-rw-r--r--phonegap/www/around.html262
-rw-r--r--phonegap/www/cordova-1.8.0.js5226
-rw-r--r--phonegap/www/css/base.css2148
-rw-r--r--phonegap/www/css/layout.css1012
-rw-r--r--phonegap/www/css/mobile.css179
-rw-r--r--phonegap/www/email_sent.html60
-rwxr-xr-xphonegap/www/fonts/Museo300-Regular-webfont.eotbin0 -> 25034 bytes
-rwxr-xr-xphonegap/www/fonts/Museo300-Regular-webfont.svg229
-rwxr-xr-xphonegap/www/fonts/Museo300-Regular-webfont.ttfbin0 -> 57284 bytes
-rwxr-xr-xphonegap/www/fonts/Museo300-Regular-webfont.woffbin0 -> 27800 bytes
-rwxr-xr-xphonegap/www/fonts/MuseoSans_300-webfont.eotbin0 -> 21394 bytes
-rwxr-xr-xphonegap/www/fonts/MuseoSans_300-webfont.svg227
-rwxr-xr-xphonegap/www/fonts/MuseoSans_300-webfont.ttfbin0 -> 46872 bytes
-rwxr-xr-xphonegap/www/fonts/MuseoSans_300-webfont.woffbin0 -> 24796 bytes
-rwxr-xr-xphonegap/www/fonts/MuseoSans_300_Italic-webfont.eotbin0 -> 24673 bytes
-rwxr-xr-xphonegap/www/fonts/MuseoSans_300_Italic-webfont.svg227
-rwxr-xr-xphonegap/www/fonts/MuseoSans_300_Italic-webfont.ttfbin0 -> 56332 bytes
-rwxr-xr-xphonegap/www/fonts/MuseoSans_300_Italic-webfont.woffbin0 -> 28188 bytes
-rwxr-xr-xphonegap/www/fonts/MuseoSans_500-webfont.eotbin0 -> 21871 bytes
-rwxr-xr-xphonegap/www/fonts/MuseoSans_500-webfont.svg227
-rwxr-xr-xphonegap/www/fonts/MuseoSans_500-webfont.ttfbin0 -> 47500 bytes
-rwxr-xr-xphonegap/www/fonts/MuseoSans_500-webfont.woffbin0 -> 25248 bytes
-rwxr-xr-xphonegap/www/fonts/MuseoSans_500_Italic-webfont.eotbin0 -> 24415 bytes
-rwxr-xr-xphonegap/www/fonts/MuseoSans_500_Italic-webfont.svg227
-rwxr-xr-xphonegap/www/fonts/MuseoSans_500_Italic-webfont.ttfbin0 -> 55672 bytes
-rwxr-xr-xphonegap/www/fonts/MuseoSans_500_Italic-webfont.woffbin0 -> 27864 bytes
-rw-r--r--phonegap/www/i/arrow-east.gifbin0 -> 65 bytes
-rw-r--r--phonegap/www/i/arrow-north.gifbin0 -> 61 bytes
-rw-r--r--phonegap/www/i/arrow-northeast.gifbin0 -> 61 bytes
-rw-r--r--phonegap/www/i/arrow-northwest.gifbin0 -> 61 bytes
-rw-r--r--phonegap/www/i/arrow-south.gifbin0 -> 60 bytes
-rw-r--r--phonegap/www/i/arrow-southeast.gifbin0 -> 61 bytes
-rw-r--r--phonegap/www/i/arrow-southwest.gifbin0 -> 61 bytes
-rw-r--r--phonegap/www/i/arrow-west.gifbin0 -> 64 bytes
-rw-r--r--phonegap/www/i/email.pngbin0 -> 593 bytes
-rw-r--r--phonegap/www/i/flower.gifbin0 -> 1644 bytes
-rw-r--r--phonegap/www/i/grey.gifbin0 -> 34 bytes
-rw-r--r--phonegap/www/i/moj.pngbin0 -> 2067 bytes
-rw-r--r--phonegap/www/i/mysociety-dark.pngbin0 -> 4688 bytes
-rw-r--r--phonegap/www/i/mysociety-on-white.gifbin0 -> 1132 bytes
-rw-r--r--phonegap/www/i/new.pngbin0 -> 989 bytes
-rw-r--r--phonegap/www/i/pin-green.pngbin0 -> 1806 bytes
-rw-r--r--phonegap/www/i/pin-red.pngbin0 -> 1841 bytes
-rw-r--r--phonegap/www/i/pin-shadow-big.pngbin0 -> 1202 bytes
-rw-r--r--phonegap/www/i/pin-shadow.pngbin0 -> 720 bytes
-rw-r--r--phonegap/www/i/pin-yellow-big.pngbin0 -> 2364 bytes
-rw-r--r--phonegap/www/i/pin-yellow.pngbin0 -> 1475 bytes
-rw-r--r--phonegap/www/i/rose.gifbin0 -> 1421 bytes
-rw-r--r--phonegap/www/i/zoomin.gifbin0 -> 1090 bytes
-rw-r--r--phonegap/www/i/zoomout.gifbin0 -> 1082 bytes
-rw-r--r--phonegap/www/images/ie_fixed.gifbin0 -> 321 bytes
-rw-r--r--phonegap/www/images/ie_front_logo.gifbin0 -> 4225 bytes
-rw-r--r--phonegap/www/images/ie_green_chevron.gifbin0 -> 237 bytes
-rw-r--r--phonegap/www/images/ie_key_tools_sprite.gifbin0 -> 375 bytes
-rw-r--r--phonegap/www/images/ie_key_tools_sprite_dark.gifbin0 -> 373 bytes
-rw-r--r--phonegap/www/images/ie_logo.gifbin0 -> 2349 bytes
-rw-r--r--phonegap/www/images/ie_mobileapps.gifbin0 -> 2668 bytes
-rw-r--r--phonegap/www/images/ie_mysoc_logo.gifbin0 -> 599 bytes
-rw-r--r--phonegap/www/images/ie_sub_map_links_sprite.gifbin0 -> 461 bytes
-rw-r--r--phonegap/www/images/spinner-black-333.gifbin0 -> 1849 bytes
-rw-r--r--phonegap/www/images/spinner-black.gifbin0 -> 1849 bytes
-rw-r--r--phonegap/www/images/spinner-yellow.gifbin0 -> 1849 bytes
-rw-r--r--phonegap/www/images/sprite.pngbin0 -> 97274 bytes
-rw-r--r--phonegap/www/images/tile.jpgbin0 -> 21980 bytes
-rw-r--r--phonegap/www/index.html110
-rw-r--r--phonegap/www/js/OpenLayers.Projection.OrdnanceSurvey.js489
-rw-r--r--phonegap/www/js/OpenLayers.fixmystreet.js1269
-rw-r--r--phonegap/www/js/config.js-example5
-rw-r--r--phonegap/www/js/fixmystreet.js572
-rw-r--r--phonegap/www/js/geo.min.js85
-rw-r--r--phonegap/www/js/jquery-1.7.0.min.js4
-rw-r--r--phonegap/www/js/jquery.ba-hashchange.min.js9
-rw-r--r--phonegap/www/js/jquery.validate.js1188
-rw-r--r--phonegap/www/js/jquery.validate.min.js51
-rw-r--r--phonegap/www/js/json2.js487
-rw-r--r--phonegap/www/js/map-OpenLayers.js522
-rw-r--r--phonegap/www/js/map-OpenStreetMap.js140
-rw-r--r--phonegap/www/js/map-bing-ol.js122
-rw-r--r--phonegap/www/js/map-bing.js22
-rw-r--r--phonegap/www/js/map-google.js22
-rw-r--r--phonegap/www/js/map-streetview.js76
-rw-r--r--phonegap/www/js/mobile.js487
-rw-r--r--phonegap/www/js/southampton.js50
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/OpenLayers.js2553
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/blank.gifbin0 -> 42 bytes
-rwxr-xr-xphonegap/www/jslib/OpenLayers-2.10/img/cloud-popup-relative.pngbin0 -> 3177 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/drag-rectangle-off.pngbin0 -> 1202 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/drag-rectangle-on.pngbin0 -> 1218 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/east-mini.pngbin0 -> 451 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/layer-switcher-maximize.pngbin0 -> 451 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/layer-switcher-minimize.pngbin0 -> 249 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/marker-blue.pngbin0 -> 992 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/marker-gold.pngbin0 -> 831 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/marker-green.pngbin0 -> 967 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/marker.pngbin0 -> 606 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/measuring-stick-off.pngbin0 -> 3343 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/measuring-stick-on.pngbin0 -> 3816 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/north-mini.pngbin0 -> 484 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/panning-hand-off.pngbin0 -> 3875 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/panning-hand-on.pngbin0 -> 3977 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/slider.pngbin0 -> 285 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/south-mini.pngbin0 -> 481 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/west-mini.pngbin0 -> 453 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/zoom-minus-mini.pngbin0 -> 359 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/zoom-plus-mini.pngbin0 -> 489 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/zoom-world-mini.pngbin0 -> 1072 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/img/zoombar.pngbin0 -> 463 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/license.txt38
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/framedCloud.css0
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/google.css10
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/ie6-style.css7
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/add_point_off.pngbin0 -> 1616 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/add_point_on.pngbin0 -> 1464 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/blank.gifbin0 -> 42 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/close.gifbin0 -> 1078 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/drag-rectangle-off.pngbin0 -> 1202 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/drag-rectangle-on.pngbin0 -> 1218 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_line_off.pngbin0 -> 1567 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_line_on.pngbin0 -> 1399 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_point_off.pngbin0 -> 1612 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_point_on.pngbin0 -> 1460 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_polygon_off.pngbin0 -> 1546 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_polygon_on.pngbin0 -> 1407 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/editing_tool_bar.pngbin0 -> 3901 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/move_feature_off.pngbin0 -> 1543 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/move_feature_on.pngbin0 -> 1379 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/navigation_history.pngbin0 -> 7021 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/overview_replacement.gifbin0 -> 79 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan-panel-NOALPHA.pngbin0 -> 566 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan-panel.pngbin0 -> 1287 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan_off.pngbin0 -> 1696 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan_on.pngbin0 -> 1568 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/panning-hand-off.pngbin0 -> 3875 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/panning-hand-on.pngbin0 -> 3977 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/remove_point_off.pngbin0 -> 1612 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/remove_point_on.pngbin0 -> 1464 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/ruler.pngbin0 -> 1211 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/save_features_off.pngbin0 -> 357 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/save_features_on.pngbin0 -> 364 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_next_off.pngbin0 -> 1644 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_next_on.pngbin0 -> 1686 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_previous_off.pngbin0 -> 1553 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_previous_on.pngbin0 -> 1592 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/zoom-panel-NOALPHA.pngbin0 -> 1173 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/img/zoom-panel.pngbin0 -> 1624 bytes
-rw-r--r--phonegap/www/jslib/OpenLayers-2.10/theme/default/style.css397
-rw-r--r--phonegap/www/no_connection.html78
-rw-r--r--phonegap/www/report_created.html59
-rw-r--r--phonegap/www/sign_in.html105
-rw-r--r--phonegap/www/signed_in.html83
-rw-r--r--t/app/controller/dashboard.t641
-rw-r--r--t/app/model/alert_type.t144
-rw-r--r--t/open311/getservicerequestupdates.t11
-rw-r--r--templates/email/bromley/questionnaire.txt4
-rw-r--r--templates/email/bromley/signature.txt3
-rw-r--r--templates/email/default/alert-confirm.txt7
-rw-r--r--templates/email/default/alert-problem-area.txt3
-rw-r--r--templates/email/default/alert-problem-council.txt3
-rw-r--r--templates/email/default/alert-problem-nearby.txt3
-rw-r--r--templates/email/default/alert-problem-ward.txt3
-rw-r--r--templates/email/default/alert-problem.txt3
-rw-r--r--templates/email/default/alert-update.txt3
-rw-r--r--templates/email/default/login.txt3
-rw-r--r--templates/email/default/partial.txt3
-rw-r--r--templates/email/default/problem-confirm.txt7
-rw-r--r--templates/email/default/questionnaire.txt3
-rw-r--r--templates/email/default/reply-autoresponse2
-rw-r--r--templates/email/default/signature.txt2
-rw-r--r--templates/email/default/submit-brent.txt5
-rw-r--r--templates/email/default/submit-example.txt2
-rw-r--r--templates/email/default/submit.txt5
-rw-r--r--templates/email/default/update-confirm.txt5
-rwxr-xr-xtemplates/web/barnet/faq/faq-en-gb.html103
-rw-r--r--templates/web/barnet/footer.html45
-rw-r--r--templates/web/barnet/header.html146
-rw-r--r--templates/web/barnet/index.html100
-rw-r--r--templates/web/barnet/report/new/councils_text_all.html4
-rw-r--r--templates/web/barnet/report/updates-sidebar-notes.html1
-rwxr-xr-xtemplates/web/bromley/faq/faq-en-gb.html2
-rw-r--r--templates/web/bromley/header.html5
-rw-r--r--templates/web/bromley/report/display.html6
-rw-r--r--templates/web/bromley/tokens/confirm_problem.html13
-rw-r--r--templates/web/default/dashboard/index.html76
-rwxr-xr-xtemplates/web/default/faq/faq-en-gb.html8
-rw-r--r--templates/web/default/report/new/extra_name.html2
-rw-r--r--templates/web/default/report/updates.html2
-rwxr-xr-xtemplates/web/default/reports/council.html30
-rw-r--r--templates/web/default/tokens/confirm_problem.html11
-rw-r--r--templates/web/fixmystreet/alert/_list.html4
-rwxr-xr-xtemplates/web/fixmystreet/faq/faq-en-gb.html8
-rw-r--r--templates/web/fixmystreet/footer.html2
-rw-r--r--templates/web/fixmystreet/header.html1
-rw-r--r--templates/web/fixmystreet/report/display.html9
-rw-r--r--templates/web/fixmystreet/report/new/notes.html2
-rw-r--r--templates/web/fixmystreet/report/updates-sidebar-notes.html5
-rw-r--r--templates/web/fixmystreet/static/for_councils.html44
-rw-r--r--templates/web/fixmystreet/static/for_councils_faq.html366
-rwxr-xr-xtemplates/web/fixmystreet/static/privacy.html8
-rw-r--r--web/cobrands/barnet/_colours.scss9
-rw-r--r--web/cobrands/barnet/barnet.scss115
-rw-r--r--web/cobrands/barnet/base.scss39
-rw-r--r--web/cobrands/barnet/config.rb25
-rw-r--r--web/cobrands/barnet/img/barnet-footer-logo.gifbin0 -> 5262 bytes
-rw-r--r--web/cobrands/barnet/img/barnet-logo.gifbin0 -> 6372 bytes
-rw-r--r--web/cobrands/barnet/img/barnet-skipnav.pngbin0 -> 799 bytes
-rw-r--r--web/cobrands/barnet/img/bcArrow.gifbin0 -> 3741 bytes
-rw-r--r--web/cobrands/barnet/img/browsealoud.gifbin0 -> 3109 bytes
-rw-r--r--web/cobrands/barnet/img/directgov.gifbin0 -> 3316 bytes
-rw-r--r--web/cobrands/barnet/img/fms-logo.pngbin0 -> 4740 bytes
-rw-r--r--web/cobrands/barnet/img/nav-arrow-active.gifbin0 -> 3831 bytes
-rw-r--r--web/cobrands/barnet/img/nav-bg-active.gifbin0 -> 153 bytes
-rw-r--r--web/cobrands/barnet/img/social1-facebook.gifbin0 -> 499 bytes
-rw-r--r--web/cobrands/barnet/img/social2-twitter.gifbin0 -> 876 bytes
-rw-r--r--web/cobrands/barnet/img/social3-youtube.gifbin0 -> 1017 bytes
-rw-r--r--web/cobrands/barnet/img/social4-flickr.gifbin0 -> 670 bytes
-rw-r--r--web/cobrands/barnet/layout.scss260
-rw-r--r--web/cobrands/barnet/position_map.js25
-rw-r--r--web/cobrands/bromley/position_map.js19
-rw-r--r--web/cobrands/fixmystreet/_layout.scss1
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js35
-rw-r--r--web/cobrands/fixmystreet/position_map.js21
-rw-r--r--web/js/fixmystreet.js12
-rw-r--r--web/js/map-OpenLayers.js2
-rw-r--r--web/js/southampton.js97
309 files changed, 34398 insertions, 742 deletions
diff --git a/.gitignore b/.gitignore
index e56b6ca4a..e0f87998d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,9 +22,16 @@ tags
/web/cobrands/fixmystreet/*.css
/web/cobrands/bromley/*.css
/web/cobrands/fixmybarangay/*.css
+/web/photo
+/web/cobrands/barnet/*.css
/local
/web/cobrands/fixmystreet/compass_app_log.txt
blog/web/wp
blog/conf/general
blog/conf/general.deployed
+
+phonegap/www/js/config.js
+phonegap/Android/bin/
+phonegap/iPhone/FixMyStreet.xcodeproj/project.xcworkspace/xcuserdata
+phonegap/Android/gen/
diff --git a/bin/make_css b/bin/make_css
index c362fda97..6b9a67e65 100755
--- a/bin/make_css
+++ b/bin/make_css
@@ -14,6 +14,7 @@
DIRECTORY=$(cd `dirname $0`/../web && pwd)
# FixMyStreet uses compass
+
NEWSTYLE="fixmystreet bromley fixmybarangay"
NEWSTYLE_REGEX=${NEWSTYLE// /\\|}
for site in $NEWSTYLE; do
diff --git a/bin/send-comments b/bin/send-comments
index 0fb3a75b9..b1c1463ce 100755
--- a/bin/send-comments
+++ b/bin/send-comments
@@ -49,6 +49,7 @@ while ( my $council = $councils->next ) {
'problem.whensent' => { '!=' => undef },
'problem.external_id' => { '!=' => undef },
'problem.council' => { -like => '%' . $council->area_id .'%' },
+ 'problem.send_method_used' => 'Open311',
},
{
join => 'problem',
diff --git a/conf/packages.debian-squeeze b/conf/packages.debian-squeeze
index cb494157d..0efd5e469 100644
--- a/conf/packages.debian-squeeze
+++ b/conf/packages.debian-squeeze
@@ -36,3 +36,4 @@ postgresql-8.4
postgresql-server-dev-8.4
gnuplot
ttf-bitstream-vera
+libexpat1-dev
diff --git a/conf/packages.debian-squeeze+testing b/conf/packages.debian-squeeze+testing
index cec3a2624..7935ff3fe 100644
--- a/conf/packages.debian-squeeze+testing
+++ b/conf/packages.debian-squeeze+testing
@@ -36,3 +36,4 @@ postgresql-8.4
postgresql-server-dev-8.4
gnuplot
ttf-bitstream-vera
+libexpat1-dev
diff --git a/data/dashboard.json b/data/dashboard.json
new file mode 100644
index 000000000..1da667356
--- /dev/null
+++ b/data/dashboard.json
@@ -0,0 +1,236 @@
+{
+ "council": { "name": "South Borsetshire District Council" },
+ "wards": {
+ "1": { "id": 1, "name": "West Ward" },
+ "2": { "id": 2, "name": "East Ward" },
+ "3": { "id": 3, "name": "North Ward" },
+ "4": { "id": 4, "name": "South Ward" }
+ },
+ "category_options": [
+ "Abandoned vehicles",
+ "Grafitti",
+ "Potholes",
+ "Street lighting",
+ "Trees",
+ "Other"
+ ],
+ "counts_all": {
+ "wtd": {
+ "total": 10,
+ "planned": 2,
+ "in progress": 1,
+ "investigating": 1,
+ "fixed - council": 3,
+ "fixed_user": 2,
+ "time_to_fix": 2,
+ "time_to_mark": 2,
+ "not_marked": 1
+ },
+ "week": {
+ "total": 21,
+ "planned": 5,
+ "in progress": 3,
+ "investigating": 4,
+ "fixed - council": 6,
+ "fixed_user": 3,
+ "time_to_fix": 3,
+ "time_to_mark": 2,
+ "not_marked": 1
+ },
+ "weeks": {
+ "total": 57,
+ "planned": 5,
+ "in progress": 16,
+ "investigating": 4,
+ "fixed - council": 23,
+ "fixed_user": 9,
+ "time_to_fix": 2,
+ "time_to_mark": 2,
+ "not_marked": 1
+ },
+ "ytd": {
+ "total": 171,
+ "planned": 23,
+ "in progress": 34,
+ "investigating": 9,
+ "fixed - council": 72,
+ "fixed_user": 33,
+ "time_to_fix": 2,
+ "time_to_mark": 2,
+ "not_marked": 1
+ }
+ },
+ "counts_some": {
+ "wtd": {
+ "total": 5,
+ "planned": 0,
+ "in progress": 1,
+ "investigating": 1,
+ "fixed - council": 2,
+ "fixed_user": 1,
+ "time_to_fix": 2,
+ "time_to_mark": 2,
+ "not_marked": 0
+ },
+ "week": {
+ "total": 7,
+ "planned": 1,
+ "in progress": 2,
+ "investigating": 1,
+ "fixed - council": 2,
+ "fixed_user": 1,
+ "time_to_fix": 3,
+ "time_to_mark": 2,
+ "not_marked": 0
+ },
+ "weeks": {
+ "total": 57,
+ "planned": 5,
+ "in progress": 16,
+ "investigating": 4,
+ "fixed - council": 23,
+ "fixed_user": 9,
+ "time_to_fix": 2,
+ "time_to_mark": 2,
+ "not_marked": 1
+ },
+ "ytd": {
+ "total": 57,
+ "planned": 5,
+ "in progress": 16,
+ "investigating": 4,
+ "fixed - council": 23,
+ "fixed_user": 9,
+ "time_to_fix": 2,
+ "time_to_mark": 2,
+ "not_marked": 1
+ }
+ },
+ "lists": {
+ "all": {
+ "1": [
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Fallen Tree" },
+ { "id": 0, "title": "Fly tipping" },
+ { "id": 0, "title": "Loose kerb" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Abandoned car" },
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Uneven paving" }
+ ],
+ "2": [
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Fly tipping" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Uneven paving" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Loose kerb" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Fallen Tree" },
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Abandoned car" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Loose kerb" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Blocked drain" }
+ ],
+ "3": [
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Loose kerb" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Fly tipping" },
+ { "id": 0, "title": "Uneven paving" },
+ { "id": 0, "title": "Fallen Tree" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Loose kerb" },
+ { "id": 0, "title": "Abandoned car" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Fallen Tree" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Fly tipping" },
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Abandoned car" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Loose kerb" },
+ { "id": 0, "title": "Uneven paving" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Pothole" }
+ ]
+ },
+ "filtered": {
+ "1": [
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Fallen Tree" },
+ { "id": 0, "title": "Loose kerb" },
+ { "id": 0, "title": "Abandoned car" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Uneven paving" }
+ ],
+ "2": [
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Loose kerb" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Fly tipping" },
+ { "id": 0, "title": "Fallen Tree" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Loose kerb" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Fallen Tree" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Fly tipping" },
+ { "id": 0, "title": "Abandoned car" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Uneven paving" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Pothole" }
+ ],
+ "3": [
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Uneven paving" },
+ { "id": 0, "title": "Fallen Tree" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Loose kerb" },
+ { "id": 0, "title": "Abandoned car" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Fallen Tree" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Fly tipping" },
+ { "id": 0, "title": "Burst pipe" },
+ { "id": 0, "title": "Abandoned car" },
+ { "id": 0, "title": "Pothole" },
+ { "id": 0, "title": "Uneven paving" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Blocked drain" },
+ { "id": 0, "title": "Pothole" }
+ ]
+ }
+ }
+}
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 3d9f0a511..6ccc801ce 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -319,6 +319,16 @@ sub send_email_cron {
unpack('h*', random_bytes(5, 1))
);
+ $params->{_parameters_}->{signature} = '';
+ #$params->{_parameters_}->{signature} = $c->view('Email')->render(
+ # $c, 'signature.txt', {
+ # additional_template_paths => [
+ # FixMyStreet->path_to( 'templates', 'email', $c->cobrand->moniker, $c->stash->{lang_code} )->stringify,
+ # FixMyStreet->path_to( 'templates', 'email', $c->cobrand->moniker )->stringify,
+ # ]
+ # }
+ #);
+
my $email = mySociety::Locale::in_gb_locale { mySociety::Email::construct_email($params) };
if ( FixMyStreet->test_mode ) {
diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm
index c67de692a..3dc25dedf 100644
--- a/perllib/FixMyStreet/App/Controller/Auth.pm
+++ b/perllib/FixMyStreet/App/Controller/Auth.pm
@@ -7,6 +7,7 @@ BEGIN { extends 'Catalyst::Controller'; }
use Email::Valid;
use Net::Domain::TLD;
use mySociety::AuthToken;
+use JSON;
=head1 NAME
@@ -250,6 +251,54 @@ sub sign_out : Local {
$c->logout();
}
+sub ajax_sign_in : Path('ajax/sign_in') {
+ my ( $self, $c ) = @_;
+
+ my $return = {};
+ if ( $c->forward( 'sign_in' ) ) {
+ $return->{name} = $c->user->name;
+ } else {
+ $return->{error} = 1;
+ }
+
+ my $body = JSON->new->utf8(1)->encode( $return );
+ $c->res->content_type('application/json; charset=utf-8');
+ $c->res->body($body);
+
+ return 1;
+}
+
+sub ajax_sign_out : Path('ajax/sign_out') {
+ my ( $self, $c ) = @_;
+
+ $c->logout();
+
+ my $body = JSON->new->utf8(1)->encode( { signed_out => 1 } );
+ $c->res->content_type('application/json; charset=utf-8');
+ $c->res->body($body);
+
+ return 1;
+}
+
+sub ajax_check_auth : Path('ajax/check_auth') {
+ my ( $self, $c ) = @_;
+
+ my $code = 401;
+ my $data = { not_authorized => 1 };
+
+ if ( $c->user ) {
+ $data = { name => $c->user->name };
+ $code = 200;
+ }
+
+ my $body = JSON->new->utf8(1)->encode( $data );
+ $c->res->content_type('application/json; charset=utf-8');
+ $c->res->code($code);
+ $c->res->body($body);
+
+ return 1;
+}
+
=head2 check_auth
Utility page - returns a simple message 'OK' and a 200 response if the user is
diff --git a/perllib/FixMyStreet/App/Controller/Contact.pm b/perllib/FixMyStreet/App/Controller/Contact.pm
index 91580f05a..c300aee9a 100644
--- a/perllib/FixMyStreet/App/Controller/Contact.pm
+++ b/perllib/FixMyStreet/App/Controller/Contact.pm
@@ -139,17 +139,17 @@ sub prepare_params_for_email : Private {
$c->stash->{message} =~ s/\r\n/\n/g;
$c->stash->{subject} =~ s/\r|\n/ /g;
- my $base_url = $c->cobrand->base_url_for_emails( $c->cobrand->extra_data );
- my $admin_base_url = $c->cobrand->admin_base_url
- || 'https://secure.mysociety.org/admin/bci/';
+ my $base_url = $c->cobrand->base_url_for_emails( $c->cobrand->extra_data );
+ my $admin_url = $c->cobrand->admin_base_url;
if ( $c->stash->{update} ) {
my $problem_url = $base_url . '/report/' . $c->stash->{update}->problem_id
. '#update_' . $c->stash->{update}->id;
- my $admin_url = $admin_base_url . 'update_edit/' . $c->stash->{update}->id;
+ my $admin_url = " - $admin_url" . 'update_edit/' . $c->stash->{update}->id
+ if $admin_url;
$c->stash->{message} .= sprintf(
- " \n\n[ Complaint about update %d on report %d - %s - %s ]",
+ " \n\n[ Complaint about update %d on report %d - %s%s ]",
$c->stash->{update}->id,
$c->stash->{update}->problem_id,
$problem_url, $admin_url
@@ -158,9 +158,10 @@ sub prepare_params_for_email : Private {
elsif ( $c->stash->{problem} ) {
my $problem_url = $base_url . '/report/' . $c->stash->{problem}->id;
- my $admin_url = $admin_base_url . 'report_edit/' . $c->stash->{problem}->id;
+ $admin_url = " - $admin_url" . 'report_edit/' . $c->stash->{problem}->id
+ if $admin_url;
$c->stash->{message} .= sprintf(
- " \n\n[ Complaint about report %d - %s - %s ]",
+ " \n\n[ Complaint about report %d - %s%s ]",
$c->stash->{problem}->id,
$problem_url, $admin_url
);
diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm
index 0273e0eda..e4266dc64 100644
--- a/perllib/FixMyStreet/App/Controller/Dashboard.pm
+++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm
@@ -3,6 +3,7 @@ use Moose;
use namespace::autoclean;
use DateTime;
+use File::Slurp;
BEGIN { extends 'Catalyst::Controller'; }
@@ -18,6 +19,49 @@ Catalyst Controller.
=cut
+sub example : Local : Args(0) {
+ my ( $self, $c ) = @_;
+ $c->stash->{template} = 'dashboard/index.html';
+
+ $c->stash->{children} = {};
+ for my $i (1..3) {
+ $c->stash->{children}{$i} = { id => $i, name => "Ward $i" };
+ }
+
+ # TODO Set up manual version of what the below would do
+ #$c->forward( '/report/new/setup_categories_and_councils' );
+
+ # See if we've had anything from the dropdowns - perhaps vary results if so
+ $c->stash->{ward} = $c->req->param('ward');
+ $c->stash->{category} = $c->req->param('category');
+ $c->stash->{q_state} = $c->req->param('state');
+
+ eval {
+ my $data = File::Slurp::read_file(
+ FixMyStreet->path_to( 'data/dashboard.json' )->stringify
+ );
+ my $j = JSON->new->utf8->decode($data);
+ if ( !$c->stash->{ward} && !$c->stash->{category} ) {
+ $c->stash->{problems} = $j->{counts_all};
+ } else {
+ $c->stash->{problems} = $j->{counts_some};
+ }
+ $c->stash->{council} = $j->{council};
+ $c->stash->{children} = $j->{wards};
+ $c->stash->{category_options} = $j->{category_options};
+ if ( lc($c->stash->{q_state}) eq 'all' or !$c->stash->{q_state} ) {
+ $c->stash->{lists} = $j->{lists}->{all};
+ } else {
+ $c->stash->{lists} = $j->{lists}->{filtered};
+ }
+ };
+ if ($@) {
+ $c->stash->{message} = _("There was a problem showing this page. Please try again later.") . ' ' .
+ sprintf(_('The error was: %s'), $@);
+ $c->stash->{template} = 'errors/generic.html';
+ }
+}
+
=head2 check_page_allowed
Checks if we can view this page, and if not redirect to 404.
@@ -48,20 +92,21 @@ sub index : Path : Args(0) {
# Set up the data for the dropdowns
+ my $council_detail = mySociety::MaPit::call('area', $council );
+ $c->stash->{council} = $council_detail;
+
my $children = mySociety::MaPit::call('area/children', $council,
type => $mySociety::VotingArea::council_child_types,
);
$c->stash->{children} = $children;
- # XXX Hmm, this is probably the best way to go
- $c->stash->{all_councils} = { $council => { id => $council } };
+ $c->stash->{all_councils} = { $council => $council_detail };
$c->forward( '/report/new/setup_categories_and_councils' );
# See if we've had anything from the dropdowns
$c->stash->{ward} = $c->req->param('ward');
$c->stash->{category} = $c->req->param('category');
- $c->stash->{q_state} = $c->req->param('state');
my %where = (
council => $council, # XXX This will break in a two tier council. Restriction needs looking at...
@@ -71,40 +116,54 @@ sub index : Path : Args(0) {
if $c->stash->{ward};
$where{category} = $c->stash->{category}
if $c->stash->{category};
- if ( $c->stash->{q_state} eq 'fixed' ) {
- $where{'problem.state'} = [ FixMyStreet::DB::Result::Problem->fixed_states() ];
- } elsif ( $c->stash->{q_state} ) {
- $where{'problem.state'} = $c->stash->{q_state}
- }
+ $c->stash->{where} = \%where;
+ my $prob_where = { %where };
+ $prob_where->{state} = $prob_where->{'problem.state'};
+ delete $prob_where->{'problem.state'};
+ $c->stash->{prob_where} = $prob_where;
my %counts;
my $t = DateTime->today;
+ $counts{wtd} = $c->forward( 'updates_search', [ $t->subtract( days => $t->dow - 1 ) ] );
+ $counts{week} = $c->forward( 'updates_search', [ DateTime->now->subtract( weeks => 1 ) ] );
+ $counts{weeks} = $c->forward( 'updates_search', [ DateTime->now->subtract( weeks => 4 ) ] );
+ $counts{ytd} = $c->forward( 'updates_search', [ DateTime->today->set( day => 1, month => 1 ) ] );
- $counts{wtd} = $c->forward( 'updates_search', [ {
- %where,
- 'me.confirmed' => { '>=', $t->subtract( days => $t->dow - 1 )
- } } ] );
-
- $counts{week} = $c->forward( 'updates_search', [ {
- %where,
- 'me.confirmed' => { '>=', DateTime->now->subtract( weeks => 1 )
- } } ] );
-
- $counts{weeks} = $c->forward( 'updates_search', [ {
- %where,
- 'me.confirmed' => { '>=', DateTime->now->subtract( weeks => 4 )
- } } ] );
+ $c->stash->{problems} = \%counts;
- $counts{ytd} = $c->forward( 'updates_search', [ {
- %where,
- 'me.confirmed' => { '>=', DateTime->today->set( day => 1, month => 1 )
- } } ] );
+ # List of reports underneath summary table
- $c->stash->{problems} = \%counts;
+ $c->stash->{q_state} = $c->req->param('state') || '';
+ if ( $c->stash->{q_state} eq 'fixed' ) {
+ $prob_where->{state} = [ FixMyStreet::DB::Result::Problem->fixed_states() ];
+ } elsif ( $c->stash->{q_state} ) {
+ $prob_where->{state} = $c->stash->{q_state};
+ }
+ my $params = {
+ %$prob_where,
+ 'me.confirmed' => { '>=', DateTime->now->subtract( days => 30 ) },
+ };
+ my @problems = $c->cobrand->problems->search( $params )->all;
+ my %problems;
+ foreach (@problems) {
+ if ($_->confirmed >= DateTime->now->subtract(days => 7)) {
+ push @{$problems{1}}, $_;
+ } elsif ($_->confirmed >= DateTime->now->subtract(days => 14)) {
+ push @{$problems{2}}, $_;
+ } else {
+ push @{$problems{3}}, $_;
+ }
+ }
+ $c->stash->{lists} = \%problems;
}
sub updates_search : Private {
- my ( $self, $c, $params ) = @_;
+ my ( $self, $c, $time ) = @_;
+
+ my $params = {
+ %{$c->stash->{where}},
+ 'me.confirmed' => { '>=', $time },
+ };
my $comments = $c->model('DB::Comment')->search(
$params,
@@ -124,14 +183,48 @@ sub updates_search : Private {
'fixed - user', 'fixed', 'unconfirmed', 'hidden',
'partial', 'planned');
+ for my $vars (
+ [ 'time_to_fix', 'fixed - council' ],
+ [ 'time_to_mark', 'in progress', 'planned', 'investigating', 'closed' ],
+ ) {
+ my $col = shift @$vars;
+ my $substmt = "select min(id) from comment where me.problem_id=comment.problem_id and problem_state in ('"
+ . join("','", @$vars) . "')";
+ $comments = $c->model('DB::Comment')->search(
+ { %$params,
+ problem_state => $vars,
+ 'me.id' => \"= ($substmt)",
+ },
+ {
+ select => [
+ { count => 'me.id' },
+ { avg => { extract => "epoch from me.confirmed-problem.confirmed" } },
+ ],
+ as => [ qw/state_count time/ ],
+ join => 'problem'
+ }
+ )->first;
+ $counts{$col} = int( ($comments->get_column('time')||0) / 60 / 60 / 24 + 0.5 );
+ }
+
$counts{fixed_user} = $c->model('DB::Comment')->search(
- { %$params, mark_fixed => 1 }, { join => 'problem' }
+ { %$params, mark_fixed => 1, problem_state => undef }, { join => 'problem' }
)->count;
- $params->{state} = $params->{'problem.state'};
- delete $params->{'problem.state'};
+ $params = {
+ %{$c->stash->{prob_where}},
+ 'me.confirmed' => { '>=', $time },
+ };
$counts{total} = $c->cobrand->problems->search( $params )->count;
+ $params = {
+ %{$c->stash->{prob_where}},
+ 'me.confirmed' => { '>=', $time },
+ state => 'confirmed',
+ '(select min(id) from comment where me.id=problem_id and problem_state is not null)' => undef,
+ };
+ $counts{not_marked} = $c->cobrand->problems->search( $params )->count;
+
return \%counts;
}
diff --git a/perllib/FixMyStreet/App/Controller/Photo.pm b/perllib/FixMyStreet/App/Controller/Photo.pm
index a6717fc33..fc4c3fde7 100644
--- a/perllib/FixMyStreet/App/Controller/Photo.pm
+++ b/perllib/FixMyStreet/App/Controller/Photo.pm
@@ -6,6 +6,8 @@ BEGIN {extends 'Catalyst::Controller'; }
use DateTime::Format::HTTP;
use Digest::SHA1 qw(sha1_hex);
+use File::Path;
+use File::Slurp;
use Path::Class;
=head1 NAME
@@ -95,6 +97,10 @@ sub index :LocalRegex('^(c/)?(\d+)(?:\.(full|tn|fp))?\.jpeg$') {
sub output : Private {
my ( $self, $c, $photo ) = @_;
+ # Save to file
+ File::Path::make_path( FixMyStreet->path_to( 'web', 'photo', 'c' )->stringify );
+ File::Slurp::write_file( FixMyStreet->path_to( 'web', $c->req->path )->stringify, \$photo );
+
my $dt = DateTime->now()->add( years => 1 );
$c->res->content_type( 'image/jpeg' );
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index cca625bd5..6f249b2fe 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -125,6 +125,8 @@ sub format_problem_for_display : Private {
$c->stash->{add_alert} = 1;
}
+ $c->stash->{extra_name_info} = $problem->council eq '2482' ? 1 : 0;
+
$c->forward('generate_map_tags');
return 1;
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 37ff1ae76..5bf184ae6 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -104,6 +104,68 @@ sub report_new : Path : Args(0) {
$c->forward('redirect_or_confirm_creation');
}
+# This is for the new phonegap versions of the app. It looks a lot like
+# report_new but there's a few workflow differences as we only ever want
+# to sent JSON back here
+
+sub report_new_ajax : Path('mobile') : Args(0) {
+ my ( $self, $c ) = @_;
+
+ # create the report - loading a partial if available
+ $c->forward('initialize_report');
+
+ unless ( $c->forward('determine_location') ) {
+ $c->stash->{ json_response } = { errors => 'Unable to determine location' };
+ $c->forward('send_json_response');
+ return 1;
+ }
+
+ $c->forward('setup_categories_and_councils');
+ $c->forward('process_user');
+ $c->forward('process_report');
+ $c->forward('/photo/process_photo');
+
+ unless ($c->forward('check_for_errors')) {
+ $c->stash->{ json_response } = { errors => $c->stash->{field_errors} };
+ $c->stash->{ json_response }->{check_name} = $c->user->name if $c->stash->{check_name};
+ $c->forward('send_json_response');
+ return 1;
+ }
+
+ $c->forward('save_user_and_report');
+
+ my $report = $c->stash->{report};
+ my $data = $c->stash->{token_data} || {};
+ my $token = $c->model("DB::Token")->create( {
+ scope => 'problem',
+ data => {
+ %$data,
+ id => $report->id
+ }
+ } );
+ if ( $report->confirmed ) {
+ $c->stash->{ json_response } = { success => 1, report => $report->id };
+ } else {
+ $c->stash->{token_url} = $c->uri_for_email( '/P', $token->token );
+ $c->send_email( 'problem-confirm.txt', {
+ to => [ [ $report->user->email, $report->name ] ],
+ } );
+ $c->stash->{ json_response } = { success => 1 };
+ }
+
+ $c->forward('send_json_response');
+}
+
+sub send_json_response : Private {
+ my ( $self, $c ) = @_;
+
+ my $body = JSON->new->utf8(1)->encode(
+ $c->stash->{json_response},
+ );
+ $c->res->content_type('application/json; charset=utf-8');
+ $c->res->body($body);
+}
+
sub report_form_ajax : Path('ajax') : Args(0) {
my ( $self, $c ) = @_;
@@ -124,7 +186,6 @@ sub report_form_ajax : Path('ajax') : Args(0) {
# render templates to get the html
my $category = $c->render_fragment( 'report/new/category.html');
my $councils_text = $c->render_fragment( 'report/new/councils_text.html');
- my $has_open311 = keys %{ $c->stash->{category_extras} };
my $extra_name_info = $c->stash->{extra_name_info}
? $c->render_fragment('report/new/extra_name.html')
: '';
@@ -133,7 +194,6 @@ sub report_form_ajax : Path('ajax') : Args(0) {
{
councils_text => $councils_text,
category => $category,
- has_open311 => $has_open311,
extra_name_info => $extra_name_info,
}
);
@@ -579,10 +639,6 @@ sub setup_categories_and_councils : Private {
$area_ids_to_list{ $contact->area_id } = 1;
- next # TODO - move this to the cobrand
- if $c->cobrand->moniker eq 'southampton'
- && $contact->category =~ /Street lighting|Traffic lights/;
-
next if $contact->category eq _('Other');
unless ( $seen{$contact->category} ) {
@@ -595,8 +651,9 @@ sub setup_categories_and_councils : Private {
}
if (@category_options) {
- @category_options =
- ( _('-- Pick a category --'), @category_options, _('Other') );
+ @category_options = ( _('-- Pick a category --'), @category_options );
+ push @category_options, _('Other')
+ unless $first_council->{id} == 2482;
$category_label = _('Category');
}
}
@@ -679,6 +736,7 @@ sub process_user : Private {
my $user = $c->user->obj;
$report->user( $user );
$report->name( $user->name );
+ $c->stash->{check_name} = 1;
$c->stash->{field_errors}->{name} = _('You have successfully signed in; please check and confirm your details are accurate:');
$c->log->info($user->id . ' logged in during problem creation');
return 1;
@@ -712,6 +770,7 @@ sub process_report : Private {
(
'title', 'detail', 'pc', #
'detail_size', 'detail_depth',
+ 'detail_offensive',
'may_show_name', #
'category', #
'partial', #
@@ -732,7 +791,7 @@ sub process_report : Private {
$report->title( Utils::cleanup_text( $params{title} ) );
my $detail = Utils::cleanup_text( $params{detail}, { allow_multiline => 1 } );
- for my $w ('depth', 'size') {
+ for my $w ('depth', 'size', 'offensive') {
next unless $params{"detail_$w"};
next if $params{"detail_$w"} eq '-- Please select --';
$detail .= "\n\n\u$w: " . $params{"detail_$w"};
@@ -813,7 +872,7 @@ sub process_report : Private {
};
}
- $c->cobrand->process_extras( $c, \@contacts, \@extra );
+ $c->cobrand->process_extras( $c, $contacts[0]->area_id, \@extra );
if ( @extra ) {
$c->stash->{report_meta} = \@extra;
diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm
index 5b0dad170..3a2b40c2c 100644
--- a/perllib/FixMyStreet/App/Controller/Report/Update.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm
@@ -201,13 +201,16 @@ sub process_update : Private {
$update->problem_state( $params{state} );
}
+ my @extra; # Next function fills this, but we don't need it here.
+ # This is just so that the error checkign for these extra fields runs.
+ # TODO Use extra here as it is used on reports.
+ $c->cobrand->process_extras( $c, $update->problem->council, \@extra );
+
if ( $c->req->param('fms_extra_title') ) {
my %extras = ();
$extras{title} = $c->req->param('fms_extra_title');
- $extras{email_alerts_required} = $c->req->param('add_alert');
+ $extras{email_alerts_requested} = $c->req->param('add_alert');
$update->extra( \%extras );
-
- $c->stash->{fms_extra_title} = $c->req->param('fms_extra_title');
}
if ( $c->stash->{ first_name } && $c->stash->{ last_name } ) {
@@ -392,14 +395,20 @@ sub signup_for_alerts : Private {
if ( $c->stash->{add_alert} ) {
my $update = $c->stash->{update};
- my $alert = $c->model('DB::Alert')->find_or_create(
- user => $update->user,
- alert_type => 'new_updates',
- parameter => $update->problem_id,
- cobrand => $update->cobrand,
- cobrand_data => $update->cobrand_data,
- lang => $update->lang,
- );
+ my $options = {
+ user => $update->user,
+ alert_type => 'new_updates',
+ parameter => $update->problem_id,
+ };
+ my $alert = $c->model('DB::Alert')->find($options);
+ unless ($alert) {
+ $alert = $c->model('DB::Alert')->create({
+ %$options,
+ cobrand => $update->cobrand,
+ cobrand_data => $update->cobrand_data,
+ lang => $update->lang,
+ });
+ }
$alert->confirm();
} elsif ( $c->user && ( my $alert = $c->user->alert_for_problem($c->stash->{update}->problem_id) ) ) {
diff --git a/perllib/FixMyStreet/App/Controller/Static.pm b/perllib/FixMyStreet/App/Controller/Static.pm
index d4b7a1b83..723f0f2e1 100755
--- a/perllib/FixMyStreet/App/Controller/Static.pm
+++ b/perllib/FixMyStreet/App/Controller/Static.pm
@@ -22,13 +22,6 @@ sub about : Global : Args(0) {
# don't need to do anything here - should just pass through.
}
-sub for_councils : Path('/for-councils') : Args(0) {
- my ( $self, $c ) = @_;
-}
-sub for_councils_faq : Path('/for-councils/faq') : Args(0) {
- my ( $self, $c ) = @_;
-}
-
sub privacy : Global : Args(0) {
my ( $self, $c ) = @_;
}
diff --git a/perllib/FixMyStreet/Cobrand/Barnet.pm b/perllib/FixMyStreet/Cobrand/Barnet.pm
index 6f115ec63..b3876a2c6 100644
--- a/perllib/FixMyStreet/Cobrand/Barnet.pm
+++ b/perllib/FixMyStreet/Cobrand/Barnet.pm
@@ -8,16 +8,100 @@ sub council_id { return 2489; }
sub council_area { return 'Barnet'; }
sub council_name { return 'Barnet Council'; }
sub council_url { return 'barnet'; }
+sub all_reports_style { return 'detailed'; }
+
+sub path_to_web_templates {
+ my $self = shift;
+ return [
+ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify,
+ FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify
+ ];
+}
sub disambiguate_location {
my $self = shift;
return {
%{ $self->SUPER::disambiguate_location() },
+ town => 'Barnet',
centre => '51.612832,-0.218169',
span => '0.0563,0.09',
bounds => [ '51.584682,-0.263169', '51.640982,-0.173169' ],
};
}
+sub generate_problem_banner {
+ my ( $self, $problem ) = @_;
+
+ my $banner = {};
+ if ( $problem->is_open && time() - $problem->lastupdate_local->epoch > 8 * 7 * 24 * 60 * 60 )
+ {
+ $banner->{id} = 'unknown';
+ $banner->{text} = _('Unknown');
+ }
+ if ($problem->is_fixed) {
+ $banner->{id} = 'fixed';
+ $banner->{text} = _('Fixed');
+ }
+ if ($problem->is_closed) {
+ $banner->{id} = 'closed';
+ $banner->{text} = _('Closed');
+ }
+
+ if ( grep { $problem->state eq $_ } ( 'investigating', 'in progress', 'planned' ) ) {
+ $banner->{id} = 'progress';
+ $banner->{text} = _('In progress');
+ }
+
+ return $banner;
+}
+
+sub council_rss_alert_options {
+ my $self = shift;
+ my $all_councils = shift;
+ my $c = shift;
+
+ my %councils = map { $_ => 1 } $self->area_types();
+
+ my $num_councils = scalar keys %$all_councils;
+
+ my ( @options, @reported_to_options );
+ if ( $num_councils == 1 or $num_councils == 2 ) {
+ my ($council, $ward);
+ foreach (values %$all_councils) {
+ if ($councils{$_->{type}}) {
+ $council = $_;
+ $council->{short_name} = $self->short_name( $council );
+ ( $council->{id_name} = $council->{short_name} ) =~ tr/+/_/;
+ } else {
+ $ward = $_;
+ $ward->{short_name} = $self->short_name( $ward );
+ ( $ward->{id_name} = $ward->{short_name} ) =~ tr/+/_/;
+ }
+ }
+
+ push @options,
+ {
+ type => 'council',
+ id => sprintf( 'council:%s:%s', $council->{id}, $council->{id_name} ),
+ text => 'All problems within the council.',
+ rss_text => sprintf( _('RSS feed of problems within %s'), $council->{name}),
+ uri => $c->uri_for( '/rss/reports/' . $council->{short_name} ),
+ };
+ push @options,
+ {
+ type => 'ward',
+ id => sprintf( 'ward:%s:%s:%s:%s', $council->{id}, $ward->{id}, $council->{id_name}, $ward->{id_name} ),
+ rss_text => sprintf( _('RSS feed of problems within %s ward'), $ward->{name}),
+ text => sprintf( _('Problems within %s ward'), $ward->{name}),
+ uri => $c->uri_for( '/rss/reports/' . $council->{short_name} . '/' . $ward->{short_name} ),
+ } if $ward;
+ }
+
+ return ( \@options, @reported_to_options ? \@reported_to_options : undef );
+}
+
+sub example_places {
+ return [ 'N11 1NP', 'Wood St' ];
+}
1;
diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm
index f7d885da2..c5c6c6345 100644
--- a/perllib/FixMyStreet/Cobrand/Bromley.pm
+++ b/perllib/FixMyStreet/Cobrand/Bromley.pm
@@ -10,11 +10,15 @@ sub council_id { return 2482; }
sub council_area { return 'Bromley'; }
sub council_name { return 'Bromley Council'; }
sub council_url { return 'bromley'; }
+sub all_reports_style { return 'detailed'; }
sub base_url {
- 'https://fix.bromley.gov.uk';
+ return FixMyStreet->config('BASE_URL') if FixMyStreet->config('STAGING_SITE');
+ return 'https://fix.bromley.gov.uk';
}
+sub admin_base_url { '' }
+
sub path_to_web_templates {
my $self = shift;
return [
@@ -27,6 +31,9 @@ sub site_title {
my ($self) = @_;
return "London Borough of Bromley - Report a problem in Bromley\x{2019}s streets or parks";
}
+sub site_name {
+ return 'Bromley FixMyStreet';
+}
sub disambiguate_location {
my $self = shift;
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index be024f134..87bd2d316 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -97,7 +97,7 @@ Base URL for the admin interface.
=cut
-sub admin_base_url { 0 }
+sub admin_base_url { '' }
=head2 writetothem_url
@@ -136,6 +136,15 @@ Parameter is QUERY
sub enter_postcode_text { _('Enter a nearby street name and area') }
+=head2 all_reports_style
+
+Return the type of problem information to display on the all reports
+pages for councils. Can be either simple or detailed.
+
+=cut
+
+sub all_reports_style { return 'simple'; }
+
=head2 set_lang_and_domain
my $set_lang = $cobrand->set_lang_and_domain( $lang, $unicode, $dir )
@@ -351,6 +360,16 @@ Return the title to be used in page heads.
sub site_title { 'FixMyStreet' }
+=head2 site_name
+
+Return short name for use in emails.
+
+=cut
+sub site_name {
+ my $self = shift;
+ $self->site_title;
+}
+
=head2 map_type
Return an override type of map if necessary.
diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
index aba58495e..fbc48449c 100644
--- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
+++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
@@ -14,6 +14,10 @@ sub enter_postcode_text {
return _("Enter a nearby GB postcode, or street name and area");
}
+sub admin_base_url {
+ return 'https://secure.mysociety.org/admin/bci/';
+}
+
sub get_council_sender {
my ( $self, $area_id, $area_info ) = @_;
@@ -29,6 +33,8 @@ sub get_council_sender {
return 'Email';
}
+sub all_reports_style { return 'detailed'; }
+
sub generate_problem_banner {
my ( $self, $problem ) = @_;
@@ -56,13 +62,13 @@ sub generate_problem_banner {
}
sub process_extras {
- my $self = shift;
- my $ctx = shift;
- my $contacts = shift;
- my $extra = shift;
- my $fields = shift || [];
+ my $self = shift;
+ my $ctx = shift;
+ my $area_id = shift;
+ my $extra = shift;
+ my $fields = shift || [];
- if ( $contacts->[0]->area_id == 2482 ) {
+ if ( $area_id == 2482 ) {
my @fields = ( 'fms_extra_title', @$fields );
for my $field ( @fields ) {
my $value = $ctx->request->param( $field );
diff --git a/perllib/FixMyStreet/Cobrand/LichfieldDC.pm b/perllib/FixMyStreet/Cobrand/LichfieldDC.pm
index 4d93aaf76..804289d34 100644
--- a/perllib/FixMyStreet/Cobrand/LichfieldDC.pm
+++ b/perllib/FixMyStreet/Cobrand/LichfieldDC.pm
@@ -26,7 +26,7 @@ sub disambiguate_location {
%{ $self->SUPER::disambiguate_location() },
centre => '52.688198,-1.804966',
span => '0.1196,0.218675',
- bounds => [ '52.807793,-1.586291', '52.584891,-1.963232' ],
+ bounds => [ '52.584891,-1.963232', '52.807793,-1.586291' ],
};
}
diff --git a/perllib/FixMyStreet/DB/ResultSet/AlertType.pm b/perllib/FixMyStreet/DB/ResultSet/AlertType.pm
index 32654e534..26d8f32a9 100644
--- a/perllib/FixMyStreet/DB/ResultSet/AlertType.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/AlertType.pm
@@ -65,6 +65,8 @@ sub email_alerts ($) {
# call checks if this is the host that sends mail for this cobrand.
next unless $cobrand->email_host;
+ my ( $sql_restriction, $name_restictions, $hashref_restriction ) = $cobrand->site_restriction( $row->{cobrand_data} );
+
FixMyStreet::App->model('DB::AlertSent')->create( {
alert_id => $row->{alert_id},
parameter => $row->{item_id},
@@ -84,6 +86,9 @@ sub email_alerts ($) {
}
my $url = $cobrand->base_url_for_emails( $row->{alert_cobrand_data} );
+ if ( $hashref_restriction && $hashref_restriction->{council} && $row->{council} ne $hashref_restriction->{council} ) {
+ $url = mySociety::Config::get('BASE_URL');
+ }
# this is currently only for new_updates
if ($row->{item_text}) {
$data{problem_url} = $url . "/report/" . $row->{id};
@@ -136,8 +141,7 @@ sub email_alerts ($) {
my $longitude = $alert->parameter;
my $latitude = $alert->parameter2;
- my $url = $cobrand->base_url_for_emails( $alert->cobrand_data );
- my ($site_restriction, $site_id) = $cobrand->site_restriction( $alert->cobrand_data );
+ my ($site_restriction, $site_id, $hashref_restriction) = $cobrand->site_restriction( $alert->cobrand_data );
my $d = mySociety::Gaze::get_radius_containing_population($latitude, $longitude, 200000);
# Convert integer to GB locale string (with a ".")
$d = mySociety::Locale::in_gb_locale {
@@ -145,14 +149,13 @@ sub email_alerts ($) {
};
my $states = "'" . join( "', '", FixMyStreet::DB::Result::Problem::visible_states() ) . "'";
my %data = ( template => $template, data => '', alert_id => $alert->id, alert_email => $alert->user->email, lang => $alert->lang, cobrand => $alert->cobrand, cobrand_data => $alert->cobrand_data );
- my $q = "select problem.id, problem.postcode, problem.geocode, problem.title from problem_find_nearby(?, ?, ?) as nearby, problem, users
+ my $q = "select problem.id, problem.council, problem.postcode, problem.geocode, problem.title from problem_find_nearby(?, ?, ?) as nearby, problem, users
where nearby.problem_id = problem.id
and problem.user_id = users.id
and problem.state in ($states)
and problem.confirmed >= ? and problem.confirmed >= ms_current_timestamp() - '7 days'::interval
and (select whenqueued from alert_sent where alert_sent.alert_id = ? and alert_sent.parameter::integer = problem.id) is null
and users.email <> ?
- $site_restriction
order by confirmed desc";
$q = dbh()->prepare($q);
$q->execute($latitude, $longitude, $d, $alert->whensubscribed, $alert->id, $alert->user->email);
@@ -161,6 +164,10 @@ sub email_alerts ($) {
alert_id => $alert->id,
parameter => $row->{id},
} );
+ my $url = $cobrand->base_url_for_emails( $alert->cobrand_data );
+ if ( $hashref_restriction && $hashref_restriction->{council} && $row->{council} ne $hashref_restriction->{council} ) {
+ $url = mySociety::Config::get('BASE_URL');
+ }
my $postcode = $cobrand->format_postcode( $row->{postcode} );
$postcode = ", $postcode" if $postcode;
$data{data} .= $url . "/report/" . $row->{id} . " - $row->{title}$postcode\n\n";
diff --git a/perllib/FixMyStreet/SendReport/Barnet.pm b/perllib/FixMyStreet/SendReport/Barnet.pm
index 9a54dd91d..ecbe82872 100644
--- a/perllib/FixMyStreet/SendReport/Barnet.pm
+++ b/perllib/FixMyStreet/SendReport/Barnet.pm
@@ -149,14 +149,21 @@ sub send {
'string' => $result->get_faultstring(),
'detail' => $result->get_detail(), # possibly only contains debug info
);
- $fault{$_}=~s/^\s*|\s*$//g foreach keys %fault;
+ foreach (keys %fault) {
+ $fault{$_}="" unless defined $fault{$_};
+ $fault{$_}=~s/^\s*|\s*$//g;
+ }
$fault{actor}&&=" (actor: $fault{actor})";
$fault{'detail'} &&= "\n" . $fault{'detail'};
$err_msg = "Failed (problem id $h{id}): Fault $fault{code}$fault{actor}\n$fault{string}$fault{detail}";
}
};
- print "$err_msg\n" if $err_msg;
+ if ($err_msg) {
+ # for timeouts, we can tidy the message a wee bit (i.e. strip the 'error deserializing...' message)
+ $err_msg=~s/(?:Error deserializing message:.*)(Can't connect to [a-zA-Z0-9.:]+\s*\(Connection timed out\)).*/$1/s;
+ print "$err_msg\n";
+ }
if ($@) {
my $e = shift;
print "Caught an error: $@\n";
diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm
index 845a6295c..9bb33b9ef 100644
--- a/perllib/FixMyStreet/SendReport/Open311.pm
+++ b/perllib/FixMyStreet/SendReport/Open311.pm
@@ -54,7 +54,6 @@ sub send {
$always_send_latlong = 0;
$send_notpinpointed = 1;
-
$basic_desc = 1;
}
@@ -93,6 +92,7 @@ sub send {
if ( $resp ) {
$row->external_id( $resp );
+ $row->send_method_used('Open311');
$result *= 0;
$self->success( 1 );
} else {
diff --git a/perllib/Open311.pm b/perllib/Open311.pm
index 2df6ac5dd..fd6a67706 100644
--- a/perllib/Open311.pm
+++ b/perllib/Open311.pm
@@ -281,7 +281,7 @@ sub _populate_service_request_update_params {
if ( $comment->photo ) {
my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker($comment->cobrand)->new();
my $email_base_url = $cobrand->base_url_for_emails($comment->cobrand_data);
- my $url = $email_base_url . '/photos/c/' . $comment->id . '.full.jpeg';
+ my $url = $email_base_url . '/photo/c/' . $comment->id . '.full.jpeg';
$params->{media_url} = $url;
}
diff --git a/perllib/Open311/GetServiceRequestUpdates.pm b/perllib/Open311/GetServiceRequestUpdates.pm
index b5577ff6c..c30d05b22 100644
--- a/perllib/Open311/GetServiceRequestUpdates.pm
+++ b/perllib/Open311/GetServiceRequestUpdates.pm
@@ -98,19 +98,15 @@ sub update_comments {
if ( $comment->created_local > $p->lastupdate_local ) {
if ( $p->is_open and lc($request->{status}) eq 'closed' ) {
$p->state( 'fixed - council' );
- $p->lastupdate( $comment->created );
- $p->update;
-
- $comment->mark_fixed( 1 );
+ $comment->problem_state( 'fixed - council' );
} elsif ( ( $p->is_closed || $p->is_fixed ) and lc($request->{status}) eq 'open' ) {
$p->state( 'confirmed' );
- $p->lastupdate( $comment->created );
- $p->update;
-
- $comment->mark_open( 1 );
+ $comment->problem_state( 'confirmed' );
}
}
+ $p->lastupdate( $comment->created );
+ $p->update;
$comment->insert();
if ( $self->suppress_alerts ) {
diff --git a/phonegap/Android/.classpath b/phonegap/Android/.classpath
new file mode 100644
index 000000000..075ed1757
--- /dev/null
+++ b/phonegap/Android/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+ <classpathentry kind="lib" path="libs/cordova-1.8.0.jar"/>
+ <classpathentry kind="output" path="bin/classes"/>
+</classpath>
diff --git a/phonegap/Android/.project b/phonegap/Android/.project
new file mode 100644
index 000000000..72e54dea9
--- /dev/null
+++ b/phonegap/Android/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Android</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/phonegap/Android/AndroidManifest.xml b/phonegap/Android/AndroidManifest.xml
new file mode 100644
index 000000000..b9540ffbe
--- /dev/null
+++ b/phonegap/Android/AndroidManifest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="org.mysociety.FixMyStreet"
+ android:versionCode="1"
+ android:versionName="1.0" >
+
+ <uses-sdk android:minSdkVersion="10" />
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
+ <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
+ <uses-permission android:name="android.permission.CAMERA"/>
+ <uses-permission android:name="android.permission.INTERNET"/>
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+
+ <application
+ android:icon="@drawable/ic_launcher"
+ android:label="@string/app_name">
+ <activity
+ android:name=".AndroidActivity"
+ android:label="@string/app_name" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+
+</manifest> \ No newline at end of file
diff --git a/phonegap/Android/assets/www b/phonegap/Android/assets/www
new file mode 120000
index 000000000..933a59978
--- /dev/null
+++ b/phonegap/Android/assets/www
@@ -0,0 +1 @@
+../../www \ No newline at end of file
diff --git a/phonegap/Android/gen/org/mysociety/FixMyStreet/R.java b/phonegap/Android/gen/org/mysociety/FixMyStreet/R.java
new file mode 100644
index 000000000..adcacc076
--- /dev/null
+++ b/phonegap/Android/gen/org/mysociety/FixMyStreet/R.java
@@ -0,0 +1,27 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found. It
+ * should not be modified by hand.
+ */
+
+package org.mysociety.FixMyStreet;
+
+public final class R {
+ public static final class attr {
+ }
+ public static final class drawable {
+ public static final int ic_launcher=0x7f020000;
+ }
+ public static final class layout {
+ public static final int main=0x7f030000;
+ }
+ public static final class string {
+ public static final int app_name=0x7f050001;
+ public static final int hello=0x7f050000;
+ }
+ public static final class xml {
+ public static final int cordova=0x7f040000;
+ public static final int plugins=0x7f040001;
+ }
+}
diff --git a/phonegap/Android/libs/cordova-1.8.0.jar b/phonegap/Android/libs/cordova-1.8.0.jar
new file mode 100755
index 000000000..326fa8392
--- /dev/null
+++ b/phonegap/Android/libs/cordova-1.8.0.jar
Binary files differ
diff --git a/phonegap/Android/proguard.cfg b/phonegap/Android/proguard.cfg
new file mode 100644
index 000000000..b1cdf17b5
--- /dev/null
+++ b/phonegap/Android/proguard.cfg
@@ -0,0 +1,40 @@
+-optimizationpasses 5
+-dontusemixedcaseclassnames
+-dontskipnonpubliclibraryclasses
+-dontpreverify
+-verbose
+-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
+
+-keep public class * extends android.app.Activity
+-keep public class * extends android.app.Application
+-keep public class * extends android.app.Service
+-keep public class * extends android.content.BroadcastReceiver
+-keep public class * extends android.content.ContentProvider
+-keep public class * extends android.app.backup.BackupAgentHelper
+-keep public class * extends android.preference.Preference
+-keep public class com.android.vending.licensing.ILicensingService
+
+-keepclasseswithmembernames class * {
+ native <methods>;
+}
+
+-keepclasseswithmembers class * {
+ public <init>(android.content.Context, android.util.AttributeSet);
+}
+
+-keepclasseswithmembers class * {
+ public <init>(android.content.Context, android.util.AttributeSet, int);
+}
+
+-keepclassmembers class * extends android.app.Activity {
+ public void *(android.view.View);
+}
+
+-keepclassmembers enum * {
+ public static **[] values();
+ public static ** valueOf(java.lang.String);
+}
+
+-keep class * implements android.os.Parcelable {
+ public static final android.os.Parcelable$Creator *;
+}
diff --git a/phonegap/Android/project.properties b/phonegap/Android/project.properties
new file mode 100644
index 000000000..f049142c1
--- /dev/null
+++ b/phonegap/Android/project.properties
@@ -0,0 +1,11 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-10
diff --git a/phonegap/Android/res/drawable-hdpi/ic_launcher.png b/phonegap/Android/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 000000000..8074c4c57
--- /dev/null
+++ b/phonegap/Android/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/phonegap/Android/res/drawable-ldpi/ic_launcher.png b/phonegap/Android/res/drawable-ldpi/ic_launcher.png
new file mode 100644
index 000000000..1095584ec
--- /dev/null
+++ b/phonegap/Android/res/drawable-ldpi/ic_launcher.png
Binary files differ
diff --git a/phonegap/Android/res/drawable-mdpi/ic_launcher.png b/phonegap/Android/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 000000000..a07c69fa5
--- /dev/null
+++ b/phonegap/Android/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/phonegap/Android/res/layout/main.xml b/phonegap/Android/res/layout/main.xml
new file mode 100644
index 000000000..bc12cd823
--- /dev/null
+++ b/phonegap/Android/res/layout/main.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
+
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/hello" />
+
+</LinearLayout> \ No newline at end of file
diff --git a/phonegap/Android/res/values/strings.xml b/phonegap/Android/res/values/strings.xml
new file mode 100644
index 000000000..a4df04a14
--- /dev/null
+++ b/phonegap/Android/res/values/strings.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <string name="hello">Hello World, AndroidActivity!</string>
+ <string name="app_name">FixMyStreet</string>
+
+</resources> \ No newline at end of file
diff --git a/phonegap/Android/res/xml/cordova.xml b/phonegap/Android/res/xml/cordova.xml
new file mode 100644
index 000000000..c7b500003
--- /dev/null
+++ b/phonegap/Android/res/xml/cordova.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<cordova>
+ <access origin="http://127.0.0.1*"/>
+ <log level="DEBUG"/>
+</cordova>
diff --git a/phonegap/Android/res/xml/plugins.xml b/phonegap/Android/res/xml/plugins.xml
new file mode 100644
index 000000000..76879a1ce
--- /dev/null
+++ b/phonegap/Android/res/xml/plugins.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<plugins>
+ <plugin name="App" value="org.apache.cordova.App"/>
+ <plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
+ <plugin name="Device" value="org.apache.cordova.Device"/>
+ <plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
+ <plugin name="Compass" value="org.apache.cordova.CompassListener"/>
+ <plugin name="Media" value="org.apache.cordova.AudioHandler"/>
+ <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
+ <plugin name="Contacts" value="org.apache.cordova.ContactManager"/>
+ <plugin name="File" value="org.apache.cordova.FileUtils"/>
+ <plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager"/>
+ <plugin name="Notification" value="org.apache.cordova.Notification"/>
+ <plugin name="Storage" value="org.apache.cordova.Storage"/>
+ <plugin name="Temperature" value="org.apache.cordova.TempListener"/>
+ <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
+ <plugin name="Capture" value="org.apache.cordova.Capture"/>
+ <plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
+ <plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
+</plugins>
diff --git a/phonegap/Android/src/org/mysociety/FixMyStreet/AndroidActivity.java b/phonegap/Android/src/org/mysociety/FixMyStreet/AndroidActivity.java
new file mode 100644
index 000000000..f5401fb27
--- /dev/null
+++ b/phonegap/Android/src/org/mysociety/FixMyStreet/AndroidActivity.java
@@ -0,0 +1,13 @@
+package org.mysociety.FixMyStreet;
+
+import android.os.Bundle;
+import org.apache.cordova.*;
+
+public class AndroidActivity extends DroidGap {
+ /** Called when the activity is first created. */
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ super.loadUrl("file:///android_asset/www/index.html");
+ }
+} \ No newline at end of file
diff --git a/phonegap/README b/phonegap/README
new file mode 100644
index 000000000..33249369e
--- /dev/null
+++ b/phonegap/README
@@ -0,0 +1,11 @@
+BUILDING
+---------
+
+The cordova.sj file in www is for bilding on the iPhone. In order
+to build on android you need to replace it with the android_cordova.js
+file in this directory.
+
+If you Build on android and see an error about Cordova.exec before deviceready
+then it's likely that you have forgotten this step.
+
+To build on iPhone copy the iphone_cordova.js over the cordova.js in www.
diff --git a/phonegap/android_cordova.js b/phonegap/android_cordova.js
new file mode 100755
index 000000000..3e59432ed
--- /dev/null
+++ b/phonegap/android_cordova.js
@@ -0,0 +1,5726 @@
+// commit ac0a3990438f4a89faa993316fb5614f61cf3be6
+
+// File generated at :: Tue Jun 05 2012 14:14:16 GMT-0700 (PDT)
+
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+
+;(function() {
+
+// file: lib/scripts/require.js
+var require,
+ define;
+
+(function () {
+ var modules = {};
+
+ function build(module) {
+ var factory = module.factory;
+ module.exports = {};
+ delete module.factory;
+ factory(require, module.exports, module);
+ return module.exports;
+ }
+
+ require = function (id) {
+ if (!modules[id]) {
+ throw "module " + id + " not found";
+ }
+ return modules[id].factory ? build(modules[id]) : modules[id].exports;
+ };
+
+ define = function (id, factory) {
+ if (modules[id]) {
+ throw "module " + id + " already defined";
+ }
+
+ modules[id] = {
+ id: id,
+ factory: factory
+ };
+ };
+
+ define.remove = function (id) {
+ delete modules[id];
+ };
+
+})();
+
+//Export for use in node
+if (typeof module === "object" && typeof require === "function") {
+ module.exports.require = require;
+ module.exports.define = define;
+}
+// file: lib/cordova.js
+define("cordova", function(require, exports, module) {
+var channel = require('cordova/channel');
+
+/**
+ * Listen for DOMContentLoaded and notify our channel subscribers.
+ */
+document.addEventListener('DOMContentLoaded', function() {
+ channel.onDOMContentLoaded.fire();
+}, false);
+if (document.readyState == 'complete' || document.readyState == 'interactive') {
+ channel.onDOMContentLoaded.fire();
+}
+
+/**
+ * Intercept calls to addEventListener + removeEventListener and handle deviceready,
+ * resume, and pause events.
+ */
+var m_document_addEventListener = document.addEventListener;
+var m_document_removeEventListener = document.removeEventListener;
+var m_window_addEventListener = window.addEventListener;
+var m_window_removeEventListener = window.removeEventListener;
+
+/**
+ * Houses custom event handlers to intercept on document + window event listeners.
+ */
+var documentEventHandlers = {},
+ windowEventHandlers = {};
+
+document.addEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ if (typeof documentEventHandlers[e] != 'undefined') {
+ if (evt === 'deviceready') {
+ documentEventHandlers[e].subscribeOnce(handler);
+ } else {
+ documentEventHandlers[e].subscribe(handler);
+ }
+ } else {
+ m_document_addEventListener.call(document, evt, handler, capture);
+ }
+};
+
+window.addEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ if (typeof windowEventHandlers[e] != 'undefined') {
+ windowEventHandlers[e].subscribe(handler);
+ } else {
+ m_window_addEventListener.call(window, evt, handler, capture);
+ }
+};
+
+document.removeEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ // If unsubcribing from an event that is handled by a plugin
+ if (typeof documentEventHandlers[e] != "undefined") {
+ documentEventHandlers[e].unsubscribe(handler);
+ } else {
+ m_document_removeEventListener.call(document, evt, handler, capture);
+ }
+};
+
+window.removeEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ // If unsubcribing from an event that is handled by a plugin
+ if (typeof windowEventHandlers[e] != "undefined") {
+ windowEventHandlers[e].unsubscribe(handler);
+ } else {
+ m_window_removeEventListener.call(window, evt, handler, capture);
+ }
+};
+
+function createEvent(type, data) {
+ var event = document.createEvent('Events');
+ event.initEvent(type, false, false);
+ if (data) {
+ for (var i in data) {
+ if (data.hasOwnProperty(i)) {
+ event[i] = data[i];
+ }
+ }
+ }
+ return event;
+}
+
+if(typeof window.console === "undefined") {
+ window.console = {
+ log:function(){}
+ };
+}
+
+var cordova = {
+ define:define,
+ require:require,
+ /**
+ * Methods to add/remove your own addEventListener hijacking on document + window.
+ */
+ addWindowEventHandler:function(event, opts) {
+ return (windowEventHandlers[event] = channel.create(event, opts));
+ },
+ addDocumentEventHandler:function(event, opts) {
+ return (documentEventHandlers[event] = channel.create(event, opts));
+ },
+ removeWindowEventHandler:function(event) {
+ delete windowEventHandlers[event];
+ },
+ removeDocumentEventHandler:function(event) {
+ delete documentEventHandlers[event];
+ },
+ /**
+ * Retreive original event handlers that were replaced by Cordova
+ *
+ * @return object
+ */
+ getOriginalHandlers: function() {
+ return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
+ 'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
+ },
+ /**
+ * Method to fire event from native code
+ */
+ fireDocumentEvent: function(type, data) {
+ var evt = createEvent(type, data);
+ if (typeof documentEventHandlers[type] != 'undefined') {
+ documentEventHandlers[type].fire(evt);
+ } else {
+ document.dispatchEvent(evt);
+ }
+ },
+ fireWindowEvent: function(type, data) {
+ var evt = createEvent(type,data);
+ if (typeof windowEventHandlers[type] != 'undefined') {
+ windowEventHandlers[type].fire(evt);
+ } else {
+ window.dispatchEvent(evt);
+ }
+ },
+ // TODO: this is Android only; think about how to do this better
+ shuttingDown:false,
+ UsePolling:false,
+ // END TODO
+
+ // TODO: iOS only
+ // This queue holds the currently executing command and all pending
+ // commands executed with cordova.exec().
+ commandQueue:[],
+ // Indicates if we're currently in the middle of flushing the command
+ // queue on the native side.
+ commandQueueFlushing:false,
+ // END TODO
+ /**
+ * Plugin callback mechanism.
+ */
+ callbackId: 0,
+ callbacks: {},
+ callbackStatus: {
+ NO_RESULT: 0,
+ OK: 1,
+ CLASS_NOT_FOUND_EXCEPTION: 2,
+ ILLEGAL_ACCESS_EXCEPTION: 3,
+ INSTANTIATION_EXCEPTION: 4,
+ MALFORMED_URL_EXCEPTION: 5,
+ IO_EXCEPTION: 6,
+ INVALID_ACTION: 7,
+ JSON_EXCEPTION: 8,
+ ERROR: 9
+ },
+
+ /**
+ * Called by native code when returning successful result from an action.
+ *
+ * @param callbackId
+ * @param args
+ */
+ callbackSuccess: function(callbackId, args) {
+ if (cordova.callbacks[callbackId]) {
+
+ // If result is to be sent to callback
+ if (args.status == cordova.callbackStatus.OK) {
+ try {
+ if (cordova.callbacks[callbackId].success) {
+ cordova.callbacks[callbackId].success(args.message);
+ }
+ }
+ catch (e) {
+ console.log("Error in success callback: "+callbackId+" = "+e);
+ }
+ }
+
+ // Clear callback if not expecting any more results
+ if (!args.keepCallback) {
+ delete cordova.callbacks[callbackId];
+ }
+ }
+ },
+
+ /**
+ * Called by native code when returning error result from an action.
+ *
+ * @param callbackId
+ * @param args
+ */
+ callbackError: function(callbackId, args) {
+ if (cordova.callbacks[callbackId]) {
+ try {
+ if (cordova.callbacks[callbackId].fail) {
+ cordova.callbacks[callbackId].fail(args.message);
+ }
+ }
+ catch (e) {
+ console.log("Error in error callback: "+callbackId+" = "+e);
+ }
+
+ // Clear callback if not expecting any more results
+ if (!args.keepCallback) {
+ delete cordova.callbacks[callbackId];
+ }
+ }
+ },
+ // TODO: remove in 2.0.
+ addPlugin: function(name, obj) {
+ console.log("[DEPRECATION NOTICE] window.addPlugin and window.plugins will be removed in version 2.0.");
+ if (!window.plugins[name]) {
+ window.plugins[name] = obj;
+ }
+ else {
+ console.log("Error: Plugin "+name+" already exists.");
+ }
+ },
+
+ addConstructor: function(func) {
+ channel.onCordovaReady.subscribeOnce(function() {
+ try {
+ func();
+ } catch(e) {
+ console.log("Failed to run constructor: " + e);
+ }
+ });
+ }
+};
+
+// Register pause, resume and deviceready channels as events on document.
+channel.onPause = cordova.addDocumentEventHandler('pause');
+channel.onResume = cordova.addDocumentEventHandler('resume');
+channel.onDeviceReady = cordova.addDocumentEventHandler('deviceready');
+
+// Adds deprecation warnings to functions of an object (but only logs a message once)
+function deprecateFunctions(obj, objLabel) {
+ var newObj = {};
+ var logHash = {};
+ for (var i in obj) {
+ if (obj.hasOwnProperty(i)) {
+ if (typeof obj[i] == 'function') {
+ newObj[i] = (function(prop){
+ var oldFunk = obj[prop];
+ var funkId = objLabel + '_' + prop;
+ return function() {
+ if (!logHash[funkId]) {
+ console.log('[DEPRECATION NOTICE] The "' + objLabel + '" global will be removed in version 2.0, please use lowercase "cordova".');
+ logHash[funkId] = true;
+ }
+ oldFunk.apply(obj, arguments);
+ };
+ })(i);
+ } else {
+ newObj[i] = (function(prop) { return obj[prop]; })(i);
+ }
+ }
+ }
+ return newObj;
+}
+
+/**
+ * Legacy variable for plugin support
+ * TODO: remove in 2.0.
+ */
+if (!window.PhoneGap) {
+ window.PhoneGap = deprecateFunctions(cordova, 'PhoneGap');
+}
+if (!window.Cordova) {
+ window.Cordova = deprecateFunctions(cordova, 'Cordova');
+}
+
+/**
+ * Plugins object
+ * TODO: remove in 2.0.
+ */
+if (!window.plugins) {
+ window.plugins = {};
+}
+
+module.exports = cordova;
+
+});
+
+// file: lib/common/builder.js
+define("cordova/builder", function(require, exports, module) {
+var utils = require('cordova/utils');
+
+function each(objects, func, context) {
+ for (var prop in objects) {
+ if (objects.hasOwnProperty(prop)) {
+ func.apply(context, [objects[prop], prop]);
+ }
+ }
+}
+
+function include(parent, objects, clobber, merge) {
+ each(objects, function (obj, key) {
+ try {
+ var result = obj.path ? require(obj.path) : {};
+
+ if (clobber) {
+ // Clobber if it doesn't exist.
+ if (typeof parent[key] === 'undefined') {
+ parent[key] = result;
+ } else if (typeof obj.path !== 'undefined') {
+ // If merging, merge properties onto parent, otherwise, clobber.
+ if (merge) {
+ recursiveMerge(parent[key], result);
+ } else {
+ parent[key] = result;
+ }
+ }
+ result = parent[key];
+ } else {
+ // Overwrite if not currently defined.
+ if (typeof parent[key] == 'undefined') {
+ parent[key] = result;
+ } else if (merge && typeof obj.path !== 'undefined') {
+ // If merging, merge parent onto result
+ recursiveMerge(result, parent[key]);
+ parent[key] = result;
+ } else {
+ // Set result to what already exists, so we can build children into it if they exist.
+ result = parent[key];
+ }
+ }
+
+ if (obj.children) {
+ include(result, obj.children, clobber, merge);
+ }
+ } catch(e) {
+ utils.alert('Exception building cordova JS globals: ' + e + ' for key "' + key + '"');
+ }
+ });
+}
+
+/**
+ * Merge properties from one object onto another recursively. Properties from
+ * the src object will overwrite existing target property.
+ *
+ * @param target Object to merge properties into.
+ * @param src Object to merge properties from.
+ */
+function recursiveMerge(target, src) {
+ for (var prop in src) {
+ if (src.hasOwnProperty(prop)) {
+ if (typeof target.prototype !== 'undefined' && target.prototype.constructor === target) {
+ // If the target object is a constructor override off prototype.
+ target.prototype[prop] = src[prop];
+ } else {
+ target[prop] = typeof src[prop] === 'object' ? recursiveMerge(
+ target[prop], src[prop]) : src[prop];
+ }
+ }
+ }
+ return target;
+}
+
+module.exports = {
+ build: function (objects) {
+ return {
+ intoButDontClobber: function (target) {
+ include(target, objects, false, false);
+ },
+ intoAndClobber: function(target) {
+ include(target, objects, true, false);
+ },
+ intoAndMerge: function(target) {
+ include(target, objects, true, true);
+ }
+ };
+ }
+};
+
+});
+
+// file: lib/common/channel.js
+define("cordova/channel", function(require, exports, module) {
+var utils = require('cordova/utils');
+
+/**
+ * Custom pub-sub "channel" that can have functions subscribed to it
+ * This object is used to define and control firing of events for
+ * cordova initialization.
+ *
+ * The order of events during page load and Cordova startup is as follows:
+ *
+ * onDOMContentLoaded Internal event that is received when the web page is loaded and parsed.
+ * onNativeReady Internal event that indicates the Cordova native side is ready.
+ * onCordovaReady Internal event fired when all Cordova JavaScript objects have been created.
+ * onCordovaInfoReady Internal event fired when device properties are available.
+ * onCordovaConnectionReady Internal event fired when the connection property has been set.
+ * onDeviceReady User event fired to indicate that Cordova is ready
+ * onResume User event fired to indicate a start/resume lifecycle event
+ * onPause User event fired to indicate a pause lifecycle event
+ * onDestroy Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
+ *
+ * The only Cordova events that user code should register for are:
+ * deviceready Cordova native code is initialized and Cordova APIs can be called from JavaScript
+ * pause App has moved to background
+ * resume App has returned to foreground
+ *
+ * Listeners can be registered as:
+ * document.addEventListener("deviceready", myDeviceReadyListener, false);
+ * document.addEventListener("resume", myResumeListener, false);
+ * document.addEventListener("pause", myPauseListener, false);
+ *
+ * The DOM lifecycle events should be used for saving and restoring state
+ * window.onload
+ * window.onunload
+ *
+ */
+
+/**
+ * Channel
+ * @constructor
+ * @param type String the channel name
+ * @param opts Object options to pass into the channel, currently
+ * supports:
+ * onSubscribe: callback that fires when
+ * something subscribes to the Channel. Sets
+ * context to the Channel.
+ * onUnsubscribe: callback that fires when
+ * something unsubscribes to the Channel. Sets
+ * context to the Channel.
+ */
+var Channel = function(type, opts) {
+ this.type = type;
+ this.handlers = {};
+ this.numHandlers = 0;
+ this.guid = 1;
+ this.fired = false;
+ this.enabled = true;
+ this.events = {
+ onSubscribe:null,
+ onUnsubscribe:null
+ };
+ if (opts) {
+ if (opts.onSubscribe) this.events.onSubscribe = opts.onSubscribe;
+ if (opts.onUnsubscribe) this.events.onUnsubscribe = opts.onUnsubscribe;
+ }
+},
+ channel = {
+ /**
+ * Calls the provided function only after all of the channels specified
+ * have been fired.
+ */
+ join: function (h, c) {
+ var i = c.length;
+ var len = i;
+ var f = function() {
+ if (!(--i)) h();
+ };
+ for (var j=0; j<len; j++) {
+ !c[j].fired?c[j].subscribeOnce(f):i--;
+ }
+ if (!i) h();
+ },
+ create: function (type, opts) {
+ channel[type] = new Channel(type, opts);
+ return channel[type];
+ },
+
+ /**
+ * cordova Channels that must fire before "deviceready" is fired.
+ */
+ deviceReadyChannelsArray: [],
+ deviceReadyChannelsMap: {},
+
+ /**
+ * Indicate that a feature needs to be initialized before it is ready to be used.
+ * This holds up Cordova's "deviceready" event until the feature has been initialized
+ * and Cordova.initComplete(feature) is called.
+ *
+ * @param feature {String} The unique feature name
+ */
+ waitForInitialization: function(feature) {
+ if (feature) {
+ var c = null;
+ if (this[feature]) {
+ c = this[feature];
+ }
+ else {
+ c = this.create(feature);
+ }
+ this.deviceReadyChannelsMap[feature] = c;
+ this.deviceReadyChannelsArray.push(c);
+ }
+ },
+
+ /**
+ * Indicate that initialization code has completed and the feature is ready to be used.
+ *
+ * @param feature {String} The unique feature name
+ */
+ initializationComplete: function(feature) {
+ var c = this.deviceReadyChannelsMap[feature];
+ if (c) {
+ c.fire();
+ }
+ }
+ };
+
+function forceFunction(f) {
+ if (f === null || f === undefined || typeof f != 'function') throw "Function required as first argument!";
+}
+
+/**
+ * Subscribes the given function to the channel. Any time that
+ * Channel.fire is called so too will the function.
+ * Optionally specify an execution context for the function
+ * and a guid that can be used to stop subscribing to the channel.
+ * Returns the guid.
+ */
+Channel.prototype.subscribe = function(f, c, g) {
+ // need a function to call
+ forceFunction(f);
+
+ var func = f;
+ if (typeof c == "object") { func = utils.close(c, f); }
+
+ g = g || func.observer_guid || f.observer_guid;
+ if (!g) {
+ // first time we've seen this subscriber
+ g = this.guid++;
+ }
+ else {
+ // subscriber already handled; dont set it twice
+ return g;
+ }
+ func.observer_guid = g;
+ f.observer_guid = g;
+ this.handlers[g] = func;
+ this.numHandlers++;
+ if (this.events.onSubscribe) this.events.onSubscribe.call(this);
+ if (this.fired) func.call(this);
+ return g;
+};
+
+/**
+ * Like subscribe but the function is only called once and then it
+ * auto-unsubscribes itself.
+ */
+Channel.prototype.subscribeOnce = function(f, c) {
+ // need a function to call
+ forceFunction(f);
+
+ var g = null;
+ var _this = this;
+ var m = function() {
+ f.apply(c || null, arguments);
+ _this.unsubscribe(g);
+ };
+ if (this.fired) {
+ if (typeof c == "object") { f = utils.close(c, f); }
+ f.apply(this, this.fireArgs);
+ } else {
+ g = this.subscribe(m);
+ }
+ return g;
+};
+
+/**
+ * Unsubscribes the function with the given guid from the channel.
+ */
+Channel.prototype.unsubscribe = function(g) {
+ // need a function to unsubscribe
+ if (g === null || g === undefined) { throw "You must pass _something_ into Channel.unsubscribe"; }
+
+ if (typeof g == 'function') { g = g.observer_guid; }
+ var handler = this.handlers[g];
+ if (handler) {
+ if (handler.observer_guid) handler.observer_guid=null;
+ this.handlers[g] = null;
+ delete this.handlers[g];
+ this.numHandlers--;
+ if (this.events.onUnsubscribe) this.events.onUnsubscribe.call(this);
+ }
+};
+
+/**
+ * Calls all functions subscribed to this channel.
+ */
+Channel.prototype.fire = function(e) {
+ if (this.enabled) {
+ var fail = false;
+ this.fired = true;
+ for (var item in this.handlers) {
+ var handler = this.handlers[item];
+ if (typeof handler == 'function') {
+ var rv = (handler.apply(this, arguments)===false);
+ fail = fail || rv;
+ }
+ }
+ this.fireArgs = arguments;
+ return !fail;
+ }
+ return true;
+};
+
+// defining them here so they are ready super fast!
+// DOM event that is received when the web page is loaded and parsed.
+channel.create('onDOMContentLoaded');
+
+// Event to indicate the Cordova native side is ready.
+channel.create('onNativeReady');
+
+// Event to indicate that all Cordova JavaScript objects have been created
+// and it's time to run plugin constructors.
+channel.create('onCordovaReady');
+
+// Event to indicate that device properties are available
+channel.create('onCordovaInfoReady');
+
+// Event to indicate that the connection property has been set.
+channel.create('onCordovaConnectionReady');
+
+// Event to indicate that Cordova is ready
+channel.create('onDeviceReady');
+
+// Event to indicate a resume lifecycle event
+channel.create('onResume');
+
+// Event to indicate a pause lifecycle event
+channel.create('onPause');
+
+// Event to indicate a destroy lifecycle event
+channel.create('onDestroy');
+
+// Channels that must fire before "deviceready" is fired.
+channel.waitForInitialization('onCordovaReady');
+channel.waitForInitialization('onCordovaInfoReady');
+channel.waitForInitialization('onCordovaConnectionReady');
+
+module.exports = channel;
+
+});
+
+// file: lib/common/common.js
+define("cordova/common", function(require, exports, module) {
+module.exports = {
+ objects: {
+ cordova: {
+ path: 'cordova',
+ children: {
+ exec: {
+ path: 'cordova/exec'
+ },
+ logger: {
+ path: 'cordova/plugin/logger'
+ }
+ }
+ },
+ Cordova: {
+ children: {
+ exec: {
+ path: 'cordova/exec'
+ }
+ }
+ },
+ PhoneGap:{
+ children: {
+ exec: {
+ path: 'cordova/exec'
+ }
+ }
+ },
+ navigator: {
+ children: {
+ notification: {
+ path: 'cordova/plugin/notification'
+ },
+ accelerometer: {
+ path: 'cordova/plugin/accelerometer'
+ },
+ battery: {
+ path: 'cordova/plugin/battery'
+ },
+ camera:{
+ path: 'cordova/plugin/Camera'
+ },
+ compass:{
+ path: 'cordova/plugin/compass'
+ },
+ contacts: {
+ path: 'cordova/plugin/contacts'
+ },
+ device:{
+ children:{
+ capture: {
+ path: 'cordova/plugin/capture'
+ }
+ }
+ },
+ geolocation: {
+ path: 'cordova/plugin/geolocation'
+ },
+ network: {
+ children: {
+ connection: {
+ path: 'cordova/plugin/network'
+ }
+ }
+ },
+ splashscreen: {
+ path: 'cordova/plugin/splashscreen'
+ }
+ }
+ },
+ Acceleration: {
+ path: 'cordova/plugin/Acceleration'
+ },
+ Camera:{
+ path: 'cordova/plugin/CameraConstants'
+ },
+ CameraPopoverOptions: {
+ path: 'cordova/plugin/CameraPopoverOptions'
+ },
+ CaptureError: {
+ path: 'cordova/plugin/CaptureError'
+ },
+ CaptureAudioOptions:{
+ path: 'cordova/plugin/CaptureAudioOptions'
+ },
+ CaptureImageOptions: {
+ path: 'cordova/plugin/CaptureImageOptions'
+ },
+ CaptureVideoOptions: {
+ path: 'cordova/plugin/CaptureVideoOptions'
+ },
+ CompassHeading:{
+ path: 'cordova/plugin/CompassHeading'
+ },
+ CompassError:{
+ path: 'cordova/plugin/CompassError'
+ },
+ ConfigurationData: {
+ path: 'cordova/plugin/ConfigurationData'
+ },
+ Connection: {
+ path: 'cordova/plugin/Connection'
+ },
+ Contact: {
+ path: 'cordova/plugin/Contact'
+ },
+ ContactAddress: {
+ path: 'cordova/plugin/ContactAddress'
+ },
+ ContactError: {
+ path: 'cordova/plugin/ContactError'
+ },
+ ContactField: {
+ path: 'cordova/plugin/ContactField'
+ },
+ ContactFindOptions: {
+ path: 'cordova/plugin/ContactFindOptions'
+ },
+ ContactName: {
+ path: 'cordova/plugin/ContactName'
+ },
+ ContactOrganization: {
+ path: 'cordova/plugin/ContactOrganization'
+ },
+ Coordinates: {
+ path: 'cordova/plugin/Coordinates'
+ },
+ DirectoryEntry: {
+ path: 'cordova/plugin/DirectoryEntry'
+ },
+ DirectoryReader: {
+ path: 'cordova/plugin/DirectoryReader'
+ },
+ Entry: {
+ path: 'cordova/plugin/Entry'
+ },
+ File: {
+ path: 'cordova/plugin/File'
+ },
+ FileEntry: {
+ path: 'cordova/plugin/FileEntry'
+ },
+ FileError: {
+ path: 'cordova/plugin/FileError'
+ },
+ FileReader: {
+ path: 'cordova/plugin/FileReader'
+ },
+ FileSystem: {
+ path: 'cordova/plugin/FileSystem'
+ },
+ FileTransfer: {
+ path: 'cordova/plugin/FileTransfer'
+ },
+ FileTransferError: {
+ path: 'cordova/plugin/FileTransferError'
+ },
+ FileUploadOptions: {
+ path: 'cordova/plugin/FileUploadOptions'
+ },
+ FileUploadResult: {
+ path: 'cordova/plugin/FileUploadResult'
+ },
+ FileWriter: {
+ path: 'cordova/plugin/FileWriter'
+ },
+ Flags: {
+ path: 'cordova/plugin/Flags'
+ },
+ LocalFileSystem: {
+ path: 'cordova/plugin/LocalFileSystem'
+ },
+ Media: {
+ path: 'cordova/plugin/Media'
+ },
+ MediaError: {
+ path: 'cordova/plugin/MediaError'
+ },
+ MediaFile: {
+ path: 'cordova/plugin/MediaFile'
+ },
+ MediaFileData:{
+ path: 'cordova/plugin/MediaFileData'
+ },
+ Metadata:{
+ path: 'cordova/plugin/Metadata'
+ },
+ Position: {
+ path: 'cordova/plugin/Position'
+ },
+ PositionError: {
+ path: 'cordova/plugin/PositionError'
+ },
+ ProgressEvent: {
+ path: 'cordova/plugin/ProgressEvent'
+ },
+ requestFileSystem:{
+ path: 'cordova/plugin/requestFileSystem'
+ },
+ resolveLocalFileSystemURI:{
+ path: 'cordova/plugin/resolveLocalFileSystemURI'
+ }
+ }
+};
+
+});
+
+// file: lib/android/exec.js
+define("cordova/exec", function(require, exports, module) {
+/**
+ * Execute a cordova command. It is up to the native side whether this action
+ * is synchronous or asynchronous. The native side can return:
+ * Synchronous: PluginResult object as a JSON string
+ * Asynchrounous: Empty string ""
+ * If async, the native side will cordova.callbackSuccess or cordova.callbackError,
+ * depending upon the result of the action.
+ *
+ * @param {Function} success The success callback
+ * @param {Function} fail The fail callback
+ * @param {String} service The name of the service to use
+ * @param {String} action Action to be run in cordova
+ * @param {String[]} [args] Zero or more arguments to pass to the method
+ */
+var cordova = require('cordova');
+
+module.exports = function(success, fail, service, action, args) {
+ try {
+ var callbackId = service + cordova.callbackId++;
+ if (success || fail) {
+ cordova.callbacks[callbackId] = {success:success, fail:fail};
+ }
+
+ var r = prompt(JSON.stringify(args), "gap:"+JSON.stringify([service, action, callbackId, true]));
+
+ // If a result was returned
+ if (r.length > 0) {
+ var v;
+ eval("v="+r+";");
+
+ // If status is OK, then return value back to caller
+ if (v.status === cordova.callbackStatus.OK) {
+
+ // If there is a success callback, then call it now with
+ // returned value
+ if (success) {
+ try {
+ success(v.message);
+ } catch (e) {
+ console.log("Error in success callback: " + callbackId + " = " + e);
+ }
+
+ // Clear callback if not expecting any more results
+ if (!v.keepCallback) {
+ delete cordova.callbacks[callbackId];
+ }
+ }
+ return v.message;
+ }
+
+ // If no result
+ else if (v.status === cordova.callbackStatus.NO_RESULT) {
+ // Clear callback if not expecting any more results
+ if (!v.keepCallback) {
+ delete cordova.callbacks[callbackId];
+ }
+ }
+
+ // If error, then display error
+ else {
+ console.log("Error: Status="+v.status+" Message="+v.message);
+
+ // If there is a fail callback, then call it now with returned value
+ if (fail) {
+ try {
+ fail(v.message);
+ }
+ catch (e1) {
+ console.log("Error in error callback: "+callbackId+" = "+e1);
+ }
+
+ // Clear callback if not expecting any more results
+ if (!v.keepCallback) {
+ delete cordova.callbacks[callbackId];
+ }
+ }
+ return null;
+ }
+ }
+ } catch (e2) {
+ console.log("Error: "+e2);
+ }
+};
+
+});
+
+// file: lib/android/platform.js
+define("cordova/platform", function(require, exports, module) {
+module.exports = {
+ id: "android",
+ initialize:function() {
+ var channel = require("cordova/channel"),
+ cordova = require('cordova'),
+ callback = require('cordova/plugin/android/callback'),
+ polling = require('cordova/plugin/android/polling'),
+ exec = require('cordova/exec');
+
+ channel.onDestroy.subscribe(function() {
+ cordova.shuttingDown = true;
+ });
+
+ // Start listening for XHR callbacks
+ // Figure out which bridge approach will work on this Android
+ // device: polling or XHR-based callbacks
+ setTimeout(function() {
+ if (cordova.UsePolling) {
+ polling();
+ }
+ else {
+ var isPolling = prompt("usePolling", "gap_callbackServer:");
+ cordova.UsePolling = isPolling;
+ if (isPolling == "true") {
+ cordova.UsePolling = true;
+ polling();
+ } else {
+ cordova.UsePolling = false;
+ callback();
+ }
+ }
+ }, 1);
+
+ // Inject a listener for the backbutton on the document.
+ var backButtonChannel = cordova.addDocumentEventHandler('backbutton', {
+ onSubscribe:function() {
+ // If we just attached the first handler, let native know we need to override the back button.
+ if (this.numHandlers === 1) {
+ exec(null, null, "App", "overrideBackbutton", [true]);
+ }
+ },
+ onUnsubscribe:function() {
+ // If we just detached the last handler, let native know we no longer override the back button.
+ if (this.numHandlers === 0) {
+ exec(null, null, "App", "overrideBackbutton", [false]);
+ }
+ }
+ });
+
+ // Add hardware MENU and SEARCH button handlers
+ cordova.addDocumentEventHandler('menubutton');
+ cordova.addDocumentEventHandler('searchbutton');
+
+ // Figure out if we need to shim-in localStorage and WebSQL
+ // support from the native side.
+ var storage = require('cordova/plugin/android/storage');
+
+ // First patch WebSQL if necessary
+ if (typeof window.openDatabase == 'undefined') {
+ // Not defined, create an openDatabase function for all to use!
+ window.openDatabase = storage.openDatabase;
+ } else {
+ // Defined, but some Android devices will throw a SECURITY_ERR -
+ // so we wrap the whole thing in a try-catch and shim in our own
+ // if the device has Android bug 16175.
+ var originalOpenDatabase = window.openDatabase;
+ window.openDatabase = function(name, version, desc, size) {
+ var db = null;
+ try {
+ db = originalOpenDatabase(name, version, desc, size);
+ }
+ catch (ex) {
+ if (ex.code === 18) {
+ db = null;
+ } else {
+ throw ex;
+ }
+ }
+
+ if (db === null) {
+ return storage.openDatabase(name, version, desc, size);
+ }
+ else {
+ return db;
+ }
+
+ };
+ }
+
+ // Patch localStorage if necessary
+ if (typeof window.localStorage == 'undefined' || window.localStorage === null) {
+ window.localStorage = new storage.CupcakeLocalStorage();
+ }
+
+ // Let native code know we are all done on the JS side.
+ // Native code will then un-hide the WebView.
+ channel.join(function() {
+ prompt("", "gap_init:");
+ }, [channel.onCordovaReady]);
+ },
+ objects: {
+ cordova: {
+ children: {
+ JSCallback:{
+ path:"cordova/plugin/android/callback"
+ },
+ JSCallbackPolling:{
+ path:"cordova/plugin/android/polling"
+ }
+ }
+ },
+ navigator: {
+ children: {
+ app:{
+ path: "cordova/plugin/android/app"
+ }
+ }
+ },
+ device:{
+ path: "cordova/plugin/android/device"
+ },
+ File: { // exists natively on Android WebView, override
+ path: "cordova/plugin/File"
+ },
+ FileReader: { // exists natively on Android WebView, override
+ path: "cordova/plugin/FileReader"
+ },
+ FileError: { //exists natively on Android WebView on Android 4.x
+ path: "cordova/plugin/FileError"
+ },
+ MediaError: { // exists natively on Android WebView on Android 4.x
+ path: "cordova/plugin/MediaError"
+ }
+ },
+ merges: {
+ navigator: {
+ children: {
+ notification: {
+ path: 'cordova/plugin/android/notification'
+ }
+ }
+ }
+ }
+};
+
+});
+
+// file: lib/common/plugin/Acceleration.js
+define("cordova/plugin/Acceleration", function(require, exports, module) {
+var Acceleration = function(x, y, z, timestamp) {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.timestamp = timestamp || (new Date()).getTime();
+};
+
+module.exports = Acceleration;
+
+});
+
+// file: lib/common/plugin/Camera.js
+define("cordova/plugin/Camera", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ Camera = require('cordova/plugin/CameraConstants');
+
+var cameraExport = {};
+
+// Tack on the Camera Constants to the base camera plugin.
+for (var key in Camera) {
+ cameraExport[key] = Camera[key];
+}
+
+/**
+ * Gets a picture from source defined by "options.sourceType", and returns the
+ * image as defined by the "options.destinationType" option.
+
+ * The defaults are sourceType=CAMERA and destinationType=FILE_URI.
+ *
+ * @param {Function} successCallback
+ * @param {Function} errorCallback
+ * @param {Object} options
+ */
+cameraExport.getPicture = function(successCallback, errorCallback, options) {
+ // successCallback required
+ if (typeof successCallback != "function") {
+ console.log("Camera Error: successCallback is not a function");
+ return;
+ }
+
+ // errorCallback optional
+ if (errorCallback && (typeof errorCallback != "function")) {
+ console.log("Camera Error: errorCallback is not a function");
+ return;
+ }
+
+ var quality = 50;
+ if (options && typeof options.quality == "number") {
+ quality = options.quality;
+ } else if (options && typeof options.quality == "string") {
+ var qlity = parseInt(options.quality, 10);
+ if (isNaN(qlity) === false) {
+ quality = qlity.valueOf();
+ }
+ }
+
+ var destinationType = Camera.DestinationType.FILE_URI;
+ if (typeof options.destinationType == "number") {
+ destinationType = options.destinationType;
+ }
+
+ var sourceType = Camera.PictureSourceType.CAMERA;
+ if (typeof options.sourceType == "number") {
+ sourceType = options.sourceType;
+ }
+
+ var targetWidth = -1;
+ if (typeof options.targetWidth == "number") {
+ targetWidth = options.targetWidth;
+ } else if (typeof options.targetWidth == "string") {
+ var width = parseInt(options.targetWidth, 10);
+ if (isNaN(width) === false) {
+ targetWidth = width.valueOf();
+ }
+ }
+
+ var targetHeight = -1;
+ if (typeof options.targetHeight == "number") {
+ targetHeight = options.targetHeight;
+ } else if (typeof options.targetHeight == "string") {
+ var height = parseInt(options.targetHeight, 10);
+ if (isNaN(height) === false) {
+ targetHeight = height.valueOf();
+ }
+ }
+
+ var encodingType = Camera.EncodingType.JPEG;
+ if (typeof options.encodingType == "number") {
+ encodingType = options.encodingType;
+ }
+
+ var mediaType = Camera.MediaType.PICTURE;
+ if (typeof options.mediaType == "number") {
+ mediaType = options.mediaType;
+ }
+ var allowEdit = false;
+ if (typeof options.allowEdit == "boolean") {
+ allowEdit = options.allowEdit;
+ } else if (typeof options.allowEdit == "number") {
+ allowEdit = options.allowEdit <= 0 ? false : true;
+ }
+ var correctOrientation = false;
+ if (typeof options.correctOrientation == "boolean") {
+ correctOrientation = options.correctOrientation;
+ } else if (typeof options.correctOrientation == "number") {
+ correctOrientation = options.correctOrientation <=0 ? false : true;
+ }
+ var saveToPhotoAlbum = false;
+ if (typeof options.saveToPhotoAlbum == "boolean") {
+ saveToPhotoAlbum = options.saveToPhotoAlbum;
+ } else if (typeof options.saveToPhotoAlbum == "number") {
+ saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
+ }
+ var popoverOptions = null;
+ if (typeof options.popoverOptions == "object") {
+ popoverOptions = options.popoverOptions;
+ }
+
+ exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType, mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions]);
+};
+
+module.exports = cameraExport;
+});
+
+// file: lib/common/plugin/CameraConstants.js
+define("cordova/plugin/CameraConstants", function(require, exports, module) {
+module.exports = {
+ DestinationType:{
+ DATA_URL: 0, // Return base64 encoded string
+ FILE_URI: 1 // Return file uri (content://media/external/images/media/2 for Android)
+ },
+ EncodingType:{
+ JPEG: 0, // Return JPEG encoded image
+ PNG: 1 // Return PNG encoded image
+ },
+ MediaType:{
+ PICTURE: 0, // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
+ VIDEO: 1, // allow selection of video only, ONLY RETURNS URL
+ ALLMEDIA : 2 // allow selection from all media types
+ },
+ PictureSourceType:{
+ PHOTOLIBRARY : 0, // Choose image from picture library (same as SAVEDPHOTOALBUM for Android)
+ CAMERA : 1, // Take picture from camera
+ SAVEDPHOTOALBUM : 2 // Choose image from picture library (same as PHOTOLIBRARY for Android)
+ },
+ PopoverArrowDirection:{
+ ARROW_UP : 1, // matches iOS UIPopoverArrowDirection constants to specify arrow location on popover
+ ARROW_DOWN : 2,
+ ARROW_LEFT : 4,
+ ARROW_RIGHT : 8,
+ ARROW_ANY : 15
+ }
+};
+});
+
+// file: lib/common/plugin/CameraPopoverOptions.js
+define("cordova/plugin/CameraPopoverOptions", function(require, exports, module) {
+var Camera = require('cordova/plugin/CameraConstants');
+
+/**
+ * Encapsulates options for iOS Popover image picker
+ */
+var CameraPopoverOptions = function(x,y,width,height,arrowDir){
+ // information of rectangle that popover should be anchored to
+ this.x = x || 0;
+ this.y = y || 32;
+ this.width = width || 320;
+ this.height = height || 480;
+ // The direction of the popover arrow
+ this.arrowDir = arrowDir || Camera.PopoverArrowDirection.ARROW_ANY;
+};
+
+module.exports = CameraPopoverOptions;
+});
+
+// file: lib/common/plugin/CaptureAudioOptions.js
+define("cordova/plugin/CaptureAudioOptions", function(require, exports, module) {
+/**
+ * Encapsulates all audio capture operation configuration options.
+ */
+var CaptureAudioOptions = function(){
+ // Upper limit of sound clips user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single sound clip in seconds.
+ this.duration = 0;
+ // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
+ this.mode = null;
+};
+
+module.exports = CaptureAudioOptions;
+});
+
+// file: lib/common/plugin/CaptureError.js
+define("cordova/plugin/CaptureError", function(require, exports, module) {
+/**
+ * The CaptureError interface encapsulates all errors in the Capture API.
+ */
+var CaptureError = function(c) {
+ this.code = c || null;
+};
+
+// Camera or microphone failed to capture image or sound.
+CaptureError.CAPTURE_INTERNAL_ERR = 0;
+// Camera application or audio capture application is currently serving other capture request.
+CaptureError.CAPTURE_APPLICATION_BUSY = 1;
+// Invalid use of the API (e.g. limit parameter has value less than one).
+CaptureError.CAPTURE_INVALID_ARGUMENT = 2;
+// User exited camera application or audio capture application before capturing anything.
+CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
+// The requested capture operation is not supported.
+CaptureError.CAPTURE_NOT_SUPPORTED = 20;
+
+module.exports = CaptureError;
+});
+
+// file: lib/common/plugin/CaptureImageOptions.js
+define("cordova/plugin/CaptureImageOptions", function(require, exports, module) {
+/**
+ * Encapsulates all image capture operation configuration options.
+ */
+var CaptureImageOptions = function(){
+ // Upper limit of images user can take. Value must be equal or greater than 1.
+ this.limit = 1;
+ // The selected image mode. Must match with one of the elements in supportedImageModes array.
+ this.mode = null;
+};
+
+module.exports = CaptureImageOptions;
+});
+
+// file: lib/common/plugin/CaptureVideoOptions.js
+define("cordova/plugin/CaptureVideoOptions", function(require, exports, module) {
+/**
+ * Encapsulates all video capture operation configuration options.
+ */
+var CaptureVideoOptions = function(){
+ // Upper limit of videos user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single video clip in seconds.
+ this.duration = 0;
+ // The selected video mode. Must match with one of the elements in supportedVideoModes array.
+ this.mode = null;
+};
+
+module.exports = CaptureVideoOptions;
+});
+
+// file: lib/common/plugin/CompassError.js
+define("cordova/plugin/CompassError", function(require, exports, module) {
+/**
+ * CompassError.
+ * An error code assigned by an implementation when an error has occured
+ * @constructor
+ */
+var CompassError = function(err) {
+ this.code = (err !== undefined ? err : null);
+};
+
+CompassError.COMPASS_INTERNAL_ERR = 0;
+CompassError.COMPASS_NOT_SUPPORTED = 20;
+
+module.exports = CompassError;
+});
+
+// file: lib/common/plugin/CompassHeading.js
+define("cordova/plugin/CompassHeading", function(require, exports, module) {
+var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, timestamp) {
+ this.magneticHeading = (magneticHeading !== undefined ? magneticHeading : null);
+ this.trueHeading = (trueHeading !== undefined ? trueHeading : null);
+ this.headingAccuracy = (headingAccuracy !== undefined ? headingAccuracy : null);
+ this.timestamp = (timestamp !== undefined ? timestamp : new Date().getTime());
+};
+
+module.exports = CompassHeading;
+});
+
+// file: lib/common/plugin/ConfigurationData.js
+define("cordova/plugin/ConfigurationData", function(require, exports, module) {
+/**
+ * Encapsulates a set of parameters that the capture device supports.
+ */
+function ConfigurationData() {
+ // The ASCII-encoded string in lower case representing the media type.
+ this.type = null;
+ // The height attribute represents height of the image or video in pixels.
+ // In the case of a sound clip this attribute has value 0.
+ this.height = 0;
+ // The width attribute represents width of the image or video in pixels.
+ // In the case of a sound clip this attribute has value 0
+ this.width = 0;
+}
+
+module.exports = ConfigurationData;
+});
+
+// file: lib/common/plugin/Connection.js
+define("cordova/plugin/Connection", function(require, exports, module) {
+/**
+ * Network status
+ */
+module.exports = {
+ UNKNOWN: "unknown",
+ ETHERNET: "ethernet",
+ WIFI: "wifi",
+ CELL_2G: "2g",
+ CELL_3G: "3g",
+ CELL_4G: "4g",
+ NONE: "none"
+};
+});
+
+// file: lib/common/plugin/Contact.js
+define("cordova/plugin/Contact", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ ContactError = require('cordova/plugin/ContactError'),
+ utils = require('cordova/utils');
+
+/**
+* Converts primitives into Complex Object
+* Currently only used for Date fields
+*/
+function convertIn(contact) {
+ var value = contact.birthday;
+ try {
+ contact.birthday = new Date(parseFloat(value));
+ } catch (exception){
+ console.log("Cordova Contact convertIn error: exception creating date.");
+ }
+ return contact;
+}
+
+/**
+* Converts Complex objects into primitives
+* Only conversion at present is for Dates.
+**/
+
+function convertOut(contact) {
+ var value = contact.birthday;
+ if (value !== null) {
+ // try to make it a Date object if it is not already
+ if (!utils.isDate(value)){
+ try {
+ value = new Date(value);
+ } catch(exception){
+ value = null;
+ }
+ }
+ if (utils.isDate(value)){
+ value = value.valueOf(); // convert to milliseconds
+ }
+ contact.birthday = value;
+ }
+ return contact;
+}
+
+/**
+* Contains information about a single contact.
+* @constructor
+* @param {DOMString} id unique identifier
+* @param {DOMString} displayName
+* @param {ContactName} name
+* @param {DOMString} nickname
+* @param {Array.<ContactField>} phoneNumbers array of phone numbers
+* @param {Array.<ContactField>} emails array of email addresses
+* @param {Array.<ContactAddress>} addresses array of addresses
+* @param {Array.<ContactField>} ims instant messaging user ids
+* @param {Array.<ContactOrganization>} organizations
+* @param {DOMString} birthday contact's birthday
+* @param {DOMString} note user notes about contact
+* @param {Array.<ContactField>} photos
+* @param {Array.<ContactField>} categories
+* @param {Array.<ContactField>} urls contact's web sites
+*/
+var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
+ ims, organizations, birthday, note, photos, categories, urls) {
+ this.id = id || null;
+ this.rawId = null;
+ this.displayName = displayName || null;
+ this.name = name || null; // ContactName
+ this.nickname = nickname || null;
+ this.phoneNumbers = phoneNumbers || null; // ContactField[]
+ this.emails = emails || null; // ContactField[]
+ this.addresses = addresses || null; // ContactAddress[]
+ this.ims = ims || null; // ContactField[]
+ this.organizations = organizations || null; // ContactOrganization[]
+ this.birthday = birthday || null;
+ this.note = note || null;
+ this.photos = photos || null; // ContactField[]
+ this.categories = categories || null; // ContactField[]
+ this.urls = urls || null; // ContactField[]
+};
+
+/**
+* Removes contact from device storage.
+* @param successCB success callback
+* @param errorCB error callback
+*/
+Contact.prototype.remove = function(successCB, errorCB) {
+ var fail = function(code) {
+ errorCB(new ContactError(code));
+ };
+ if (this.id === null) {
+ fail(ContactError.UNKNOWN_ERROR);
+ }
+ else {
+ exec(successCB, fail, "Contacts", "remove", [this.id]);
+ }
+};
+
+/**
+* Creates a deep copy of this Contact.
+* With the contact ID set to null.
+* @return copy of this Contact
+*/
+Contact.prototype.clone = function() {
+ var clonedContact = utils.clone(this);
+ var i;
+ clonedContact.id = null;
+ clonedContact.rawId = null;
+ // Loop through and clear out any id's in phones, emails, etc.
+ if (clonedContact.phoneNumbers) {
+ for (i = 0; i < clonedContact.phoneNumbers.length; i++) {
+ clonedContact.phoneNumbers[i].id = null;
+ }
+ }
+ if (clonedContact.emails) {
+ for (i = 0; i < clonedContact.emails.length; i++) {
+ clonedContact.emails[i].id = null;
+ }
+ }
+ if (clonedContact.addresses) {
+ for (i = 0; i < clonedContact.addresses.length; i++) {
+ clonedContact.addresses[i].id = null;
+ }
+ }
+ if (clonedContact.ims) {
+ for (i = 0; i < clonedContact.ims.length; i++) {
+ clonedContact.ims[i].id = null;
+ }
+ }
+ if (clonedContact.organizations) {
+ for (i = 0; i < clonedContact.organizations.length; i++) {
+ clonedContact.organizations[i].id = null;
+ }
+ }
+ if (clonedContact.categories) {
+ for (i = 0; i < clonedContact.categories.length; i++) {
+ clonedContact.categories[i].id = null;
+ }
+ }
+ if (clonedContact.photos) {
+ for (i = 0; i < clonedContact.photos.length; i++) {
+ clonedContact.photos[i].id = null;
+ }
+ }
+ if (clonedContact.urls) {
+ for (i = 0; i < clonedContact.urls.length; i++) {
+ clonedContact.urls[i].id = null;
+ }
+ }
+ return clonedContact;
+};
+
+/**
+* Persists contact to device storage.
+* @param successCB success callback
+* @param errorCB error callback
+*/
+Contact.prototype.save = function(successCB, errorCB) {
+ var fail = function(code) {
+ errorCB(new ContactError(code));
+ };
+ var success = function(result) {
+ if (result) {
+ if (typeof successCB === 'function') {
+ var fullContact = require('cordova/plugin/contacts').create(result);
+ successCB(convertIn(fullContact));
+ }
+ }
+ else {
+ // no Entry object returned
+ fail(ContactError.UNKNOWN_ERROR);
+ }
+ };
+ var dupContact = convertOut(utils.clone(this));
+ exec(success, fail, "Contacts", "save", [dupContact]);
+};
+
+
+module.exports = Contact;
+
+});
+
+// file: lib/common/plugin/ContactAddress.js
+define("cordova/plugin/ContactAddress", function(require, exports, module) {
+/**
+* Contact address.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code
+* @param formatted // NOTE: not a W3C standard
+* @param streetAddress
+* @param locality
+* @param region
+* @param postalCode
+* @param country
+*/
+
+var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
+ this.id = null;
+ this.pref = (typeof pref != 'undefined' ? pref : false);
+ this.type = type || null;
+ this.formatted = formatted || null;
+ this.streetAddress = streetAddress || null;
+ this.locality = locality || null;
+ this.region = region || null;
+ this.postalCode = postalCode || null;
+ this.country = country || null;
+};
+
+module.exports = ContactAddress;
+});
+
+// file: lib/common/plugin/ContactError.js
+define("cordova/plugin/ContactError", function(require, exports, module) {
+/**
+ * ContactError.
+ * An error code assigned by an implementation when an error has occured
+ * @constructor
+ */
+var ContactError = function(err) {
+ this.code = (typeof err != 'undefined' ? err : null);
+};
+
+/**
+ * Error codes
+ */
+ContactError.UNKNOWN_ERROR = 0;
+ContactError.INVALID_ARGUMENT_ERROR = 1;
+ContactError.TIMEOUT_ERROR = 2;
+ContactError.PENDING_OPERATION_ERROR = 3;
+ContactError.IO_ERROR = 4;
+ContactError.NOT_SUPPORTED_ERROR = 5;
+ContactError.PERMISSION_DENIED_ERROR = 20;
+
+module.exports = ContactError;
+});
+
+// file: lib/common/plugin/ContactField.js
+define("cordova/plugin/ContactField", function(require, exports, module) {
+/**
+* Generic contact field.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
+* @param type
+* @param value
+* @param pref
+*/
+var ContactField = function(type, value, pref) {
+ this.id = null;
+ this.type = (type && type.toString()) || null;
+ this.value = (value && value.toString()) || null;
+ this.pref = (typeof pref != 'undefined' ? pref : false);
+};
+
+module.exports = ContactField;
+});
+
+// file: lib/common/plugin/ContactFindOptions.js
+define("cordova/plugin/ContactFindOptions", function(require, exports, module) {
+/**
+ * ContactFindOptions.
+ * @constructor
+ * @param filter used to match contacts against
+ * @param multiple boolean used to determine if more than one contact should be returned
+ */
+
+var ContactFindOptions = function(filter, multiple) {
+ this.filter = filter || '';
+ this.multiple = (typeof multiple != 'undefined' ? multiple : false);
+};
+
+module.exports = ContactFindOptions;
+});
+
+// file: lib/common/plugin/ContactName.js
+define("cordova/plugin/ContactName", function(require, exports, module) {
+/**
+* Contact name.
+* @constructor
+* @param formatted // NOTE: not part of W3C standard
+* @param familyName
+* @param givenName
+* @param middle
+* @param prefix
+* @param suffix
+*/
+var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
+ this.formatted = formatted || null;
+ this.familyName = familyName || null;
+ this.givenName = givenName || null;
+ this.middleName = middle || null;
+ this.honorificPrefix = prefix || null;
+ this.honorificSuffix = suffix || null;
+};
+
+module.exports = ContactName;
+});
+
+// file: lib/common/plugin/ContactOrganization.js
+define("cordova/plugin/ContactOrganization", function(require, exports, module) {
+/**
+* Contact organization.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
+* @param name
+* @param dept
+* @param title
+* @param startDate
+* @param endDate
+* @param location
+* @param desc
+*/
+
+var ContactOrganization = function(pref, type, name, dept, title) {
+ this.id = null;
+ this.pref = (typeof pref != 'undefined' ? pref : false);
+ this.type = type || null;
+ this.name = name || null;
+ this.department = dept || null;
+ this.title = title || null;
+};
+
+module.exports = ContactOrganization;
+});
+
+// file: lib/common/plugin/Coordinates.js
+define("cordova/plugin/Coordinates", function(require, exports, module) {
+/**
+ * This class contains position information.
+ * @param {Object} lat
+ * @param {Object} lng
+ * @param {Object} alt
+ * @param {Object} acc
+ * @param {Object} head
+ * @param {Object} vel
+ * @param {Object} altacc
+ * @constructor
+ */
+var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
+ /**
+ * The latitude of the position.
+ */
+ this.latitude = lat;
+ /**
+ * The longitude of the position,
+ */
+ this.longitude = lng;
+ /**
+ * The accuracy of the position.
+ */
+ this.accuracy = acc;
+ /**
+ * The altitude of the position.
+ */
+ this.altitude = (alt !== undefined ? alt : null);
+ /**
+ * The direction the device is moving at the position.
+ */
+ this.heading = (head !== undefined ? head : null);
+ /**
+ * The velocity with which the device is moving at the position.
+ */
+ this.speed = (vel !== undefined ? vel : null);
+
+ if (this.speed === 0 || this.speed === null) {
+ this.heading = NaN;
+ }
+
+ /**
+ * The altitude accuracy of the position.
+ */
+ this.altitudeAccuracy = (altacc !== undefined) ? altacc : null;
+};
+
+module.exports = Coordinates;
+
+});
+
+// file: lib/common/plugin/DirectoryEntry.js
+define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec'),
+ Entry = require('cordova/plugin/Entry'),
+ FileError = require('cordova/plugin/FileError'),
+ DirectoryReader = require('cordova/plugin/DirectoryReader');
+
+/**
+ * An interface representing a directory on the file system.
+ *
+ * {boolean} isFile always false (readonly)
+ * {boolean} isDirectory always true (readonly)
+ * {DOMString} name of the directory, excluding the path leading to it (readonly)
+ * {DOMString} fullPath the absolute full path to the directory (readonly)
+ * {FileSystem} filesystem on which the directory resides (readonly)
+ */
+var DirectoryEntry = function(name, fullPath) {
+ DirectoryEntry.__super__.constructor.apply(this, [false, true, name, fullPath]);
+};
+
+utils.extend(DirectoryEntry, Entry);
+
+/**
+ * Creates a new DirectoryReader to read entries from this directory
+ */
+DirectoryEntry.prototype.createReader = function() {
+ return new DirectoryReader(this.fullPath);
+};
+
+/**
+ * Creates or looks up a directory
+ *
+ * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
+ * @param {Flags} options to create or excluively create the directory
+ * @param {Function} successCallback is called with the new entry
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryEntry.prototype.getDirectory = function(path, options, successCallback, errorCallback) {
+ var win = typeof successCallback !== 'function' ? null : function(result) {
+ var entry = new DirectoryEntry(result.name, result.fullPath);
+ successCallback(entry);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(win, fail, "File", "getDirectory", [this.fullPath, path, options]);
+};
+
+/**
+ * Deletes a directory and all of it's contents
+ *
+ * @param {Function} successCallback is called with no parameters
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryEntry.prototype.removeRecursively = function(successCallback, errorCallback) {
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(successCallback, fail, "File", "removeRecursively", [this.fullPath]);
+};
+
+/**
+ * Creates or looks up a file
+ *
+ * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
+ * @param {Flags} options to create or excluively create the file
+ * @param {Function} successCallback is called with the new entry
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {
+ var win = typeof successCallback !== 'function' ? null : function(result) {
+ var FileEntry = require('cordova/plugin/FileEntry');
+ var entry = new FileEntry(result.name, result.fullPath);
+ successCallback(entry);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(win, fail, "File", "getFile", [this.fullPath, path, options]);
+};
+
+module.exports = DirectoryEntry;
+
+});
+
+// file: lib/common/plugin/DirectoryReader.js
+define("cordova/plugin/DirectoryReader", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError') ;
+
+/**
+ * An interface that lists the files and directories in a directory.
+ */
+function DirectoryReader(path) {
+ this.path = path || null;
+}
+
+/**
+ * Returns a list of entries from a directory.
+ *
+ * @param {Function} successCallback is called with a list of entries
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryReader.prototype.readEntries = function(successCallback, errorCallback) {
+ var win = typeof successCallback !== 'function' ? null : function(result) {
+ var retVal = [];
+ for (var i=0; i<result.length; i++) {
+ var entry = null;
+ if (result[i].isDirectory) {
+ entry = new (require('cordova/plugin/DirectoryEntry'))();
+ }
+ else if (result[i].isFile) {
+ entry = new (require('cordova/plugin/FileEntry'))();
+ }
+ entry.isDirectory = result[i].isDirectory;
+ entry.isFile = result[i].isFile;
+ entry.name = result[i].name;
+ entry.fullPath = result[i].fullPath;
+ retVal.push(entry);
+ }
+ successCallback(retVal);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(win, fail, "File", "readEntries", [this.path]);
+};
+
+module.exports = DirectoryReader;
+
+});
+
+// file: lib/common/plugin/Entry.js
+define("cordova/plugin/Entry", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError'),
+ Metadata = require('cordova/plugin/Metadata');
+
+/**
+ * Represents a file or directory on the local file system.
+ *
+ * @param isFile
+ * {boolean} true if Entry is a file (readonly)
+ * @param isDirectory
+ * {boolean} true if Entry is a directory (readonly)
+ * @param name
+ * {DOMString} name of the file or directory, excluding the path
+ * leading to it (readonly)
+ * @param fullPath
+ * {DOMString} the absolute full path to the file or directory
+ * (readonly)
+ */
+function Entry(isFile, isDirectory, name, fullPath, fileSystem) {
+ this.isFile = (typeof isFile != 'undefined'?isFile:false);
+ this.isDirectory = (typeof isDirectory != 'undefined'?isDirectory:false);
+ this.name = name || '';
+ this.fullPath = fullPath || '';
+ this.filesystem = fileSystem || null;
+}
+
+/**
+ * Look up the metadata of the entry.
+ *
+ * @param successCallback
+ * {Function} is called with a Metadata object
+ * @param errorCallback
+ * {Function} is called with a FileError
+ */
+Entry.prototype.getMetadata = function(successCallback, errorCallback) {
+ var success = typeof successCallback !== 'function' ? null : function(lastModified) {
+ var metadata = new Metadata(lastModified);
+ successCallback(metadata);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+
+ exec(success, fail, "File", "getMetadata", [this.fullPath]);
+};
+
+/**
+ * Set the metadata of the entry.
+ *
+ * @param successCallback
+ * {Function} is called with a Metadata object
+ * @param errorCallback
+ * {Function} is called with a FileError
+ * @param metadataObject
+ * {Object} keys and values to set
+ */
+Entry.prototype.setMetadata = function(successCallback, errorCallback, metadataObject) {
+
+ exec(successCallback, errorCallback, "File", "setMetadata", [this.fullPath, metadataObject]);
+};
+
+/**
+ * Move a file or directory to a new location.
+ *
+ * @param parent
+ * {DirectoryEntry} the directory to which to move this entry
+ * @param newName
+ * {DOMString} new name of the entry, defaults to the current name
+ * @param successCallback
+ * {Function} called with the new DirectoryEntry object
+ * @param errorCallback
+ * {Function} called with a FileError
+ */
+Entry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
+ var fail = function(code) {
+ if (typeof errorCallback === 'function') {
+ errorCallback(new FileError(code));
+ }
+ };
+ // user must specify parent Entry
+ if (!parent) {
+ fail(FileError.NOT_FOUND_ERR);
+ return;
+ }
+ // source path
+ var srcPath = this.fullPath,
+ // entry name
+ name = newName || this.name,
+ success = function(entry) {
+ if (entry) {
+ if (typeof successCallback === 'function') {
+ // create appropriate Entry object
+ var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
+ try {
+ successCallback(result);
+ }
+ catch (e) {
+ console.log('Error invoking callback: ' + e);
+ }
+ }
+ }
+ else {
+ // no Entry object returned
+ fail(FileError.NOT_FOUND_ERR);
+ }
+ };
+
+ // copy
+ exec(success, fail, "File", "moveTo", [srcPath, parent.fullPath, name]);
+};
+
+/**
+ * Copy a directory to a different location.
+ *
+ * @param parent
+ * {DirectoryEntry} the directory to which to copy the entry
+ * @param newName
+ * {DOMString} new name of the entry, defaults to the current name
+ * @param successCallback
+ * {Function} called with the new Entry object
+ * @param errorCallback
+ * {Function} called with a FileError
+ */
+Entry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
+ var fail = function(code) {
+ if (typeof errorCallback === 'function') {
+ errorCallback(new FileError(code));
+ }
+ };
+
+ // user must specify parent Entry
+ if (!parent) {
+ fail(FileError.NOT_FOUND_ERR);
+ return;
+ }
+
+ // source path
+ var srcPath = this.fullPath,
+ // entry name
+ name = newName || this.name,
+ // success callback
+ success = function(entry) {
+ if (entry) {
+ if (typeof successCallback === 'function') {
+ // create appropriate Entry object
+ var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
+ try {
+ successCallback(result);
+ }
+ catch (e) {
+ console.log('Error invoking callback: ' + e);
+ }
+ }
+ }
+ else {
+ // no Entry object returned
+ fail(FileError.NOT_FOUND_ERR);
+ }
+ };
+
+ // copy
+ exec(success, fail, "File", "copyTo", [srcPath, parent.fullPath, name]);
+};
+
+/**
+ * Return a URL that can be used to identify this entry.
+ */
+Entry.prototype.toURL = function() {
+ // fullPath attribute contains the full URL
+ return this.fullPath;
+};
+
+/**
+ * Returns a URI that can be used to identify this entry.
+ *
+ * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
+ * @return uri
+ */
+Entry.prototype.toURI = function(mimeType) {
+ console.log("DEPRECATED: Update your code to use 'toURL'");
+ // fullPath attribute contains the full URI
+ return this.toURL();
+};
+
+/**
+ * Remove a file or directory. It is an error to attempt to delete a
+ * directory that is not empty. It is an error to attempt to delete a
+ * root directory of a file system.
+ *
+ * @param successCallback {Function} called with no parameters
+ * @param errorCallback {Function} called with a FileError
+ */
+Entry.prototype.remove = function(successCallback, errorCallback) {
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(successCallback, fail, "File", "remove", [this.fullPath]);
+};
+
+/**
+ * Look up the parent DirectoryEntry of this entry.
+ *
+ * @param successCallback {Function} called with the parent DirectoryEntry object
+ * @param errorCallback {Function} called with a FileError
+ */
+Entry.prototype.getParent = function(successCallback, errorCallback) {
+ var win = typeof successCallback !== 'function' ? null : function(result) {
+ var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
+ var entry = new DirectoryEntry(result.name, result.fullPath);
+ successCallback(entry);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(win, fail, "File", "getParent", [this.fullPath]);
+};
+
+module.exports = Entry;
+});
+
+// file: lib/common/plugin/File.js
+define("cordova/plugin/File", function(require, exports, module) {
+/**
+ * Constructor.
+ * name {DOMString} name of the file, without path information
+ * fullPath {DOMString} the full path of the file, including the name
+ * type {DOMString} mime type
+ * lastModifiedDate {Date} last modified date
+ * size {Number} size of the file in bytes
+ */
+
+var File = function(name, fullPath, type, lastModifiedDate, size){
+ this.name = name || '';
+ this.fullPath = fullPath || null;
+ this.type = type || null;
+ this.lastModifiedDate = lastModifiedDate || null;
+ this.size = size || 0;
+};
+
+module.exports = File;
+});
+
+// file: lib/common/plugin/FileEntry.js
+define("cordova/plugin/FileEntry", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec'),
+ Entry = require('cordova/plugin/Entry'),
+ FileWriter = require('cordova/plugin/FileWriter'),
+ File = require('cordova/plugin/File'),
+ FileError = require('cordova/plugin/FileError');
+
+/**
+ * An interface representing a file on the file system.
+ *
+ * {boolean} isFile always true (readonly)
+ * {boolean} isDirectory always false (readonly)
+ * {DOMString} name of the file, excluding the path leading to it (readonly)
+ * {DOMString} fullPath the absolute full path to the file (readonly)
+ * {FileSystem} filesystem on which the file resides (readonly)
+ */
+var FileEntry = function(name, fullPath) {
+ FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath]);
+};
+
+utils.extend(FileEntry, Entry);
+
+/**
+ * Creates a new FileWriter associated with the file that this FileEntry represents.
+ *
+ * @param {Function} successCallback is called with the new FileWriter
+ * @param {Function} errorCallback is called with a FileError
+ */
+FileEntry.prototype.createWriter = function(successCallback, errorCallback) {
+ this.file(function(filePointer) {
+ var writer = new FileWriter(filePointer);
+
+ if (writer.fileName === null || writer.fileName === "") {
+ if (typeof errorCallback === "function") {
+ errorCallback(new FileError(FileError.INVALID_STATE_ERR));
+ }
+ } else {
+ if (typeof successCallback === "function") {
+ successCallback(writer);
+ }
+ }
+ }, errorCallback);
+};
+
+/**
+ * Returns a File that represents the current state of the file that this FileEntry represents.
+ *
+ * @param {Function} successCallback is called with the new File object
+ * @param {Function} errorCallback is called with a FileError
+ */
+FileEntry.prototype.file = function(successCallback, errorCallback) {
+ var win = typeof successCallback !== 'function' ? null : function(f) {
+ var file = new File(f.name, f.fullPath, f.type, f.lastModifiedDate, f.size);
+ successCallback(file);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(win, fail, "File", "getFileMetadata", [this.fullPath]);
+};
+
+
+module.exports = FileEntry;
+});
+
+// file: lib/common/plugin/FileError.js
+define("cordova/plugin/FileError", function(require, exports, module) {
+/**
+ * FileError
+ */
+function FileError(error) {
+ this.code = error || null;
+}
+
+// File error codes
+// Found in DOMException
+FileError.NOT_FOUND_ERR = 1;
+FileError.SECURITY_ERR = 2;
+FileError.ABORT_ERR = 3;
+
+// Added by File API specification
+FileError.NOT_READABLE_ERR = 4;
+FileError.ENCODING_ERR = 5;
+FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
+FileError.INVALID_STATE_ERR = 7;
+FileError.SYNTAX_ERR = 8;
+FileError.INVALID_MODIFICATION_ERR = 9;
+FileError.QUOTA_EXCEEDED_ERR = 10;
+FileError.TYPE_MISMATCH_ERR = 11;
+FileError.PATH_EXISTS_ERR = 12;
+
+module.exports = FileError;
+});
+
+// file: lib/common/plugin/FileReader.js
+define("cordova/plugin/FileReader", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError'),
+ ProgressEvent = require('cordova/plugin/ProgressEvent');
+
+/**
+ * This class reads the mobile device file system.
+ *
+ * For Android:
+ * The root directory is the root of the file system.
+ * To read from the SD card, the file name is "sdcard/my_file.txt"
+ * @constructor
+ */
+var FileReader = function() {
+ this.fileName = "";
+
+ this.readyState = 0; // FileReader.EMPTY
+
+ // File data
+ this.result = null;
+
+ // Error
+ this.error = null;
+
+ // Event handlers
+ this.onloadstart = null; // When the read starts.
+ this.onprogress = null; // While reading (and decoding) file or fileBlob data, and reporting partial file data (progess.loaded/progress.total)
+ this.onload = null; // When the read has successfully completed.
+ this.onerror = null; // When the read has failed (see errors).
+ this.onloadend = null; // When the request has completed (either in success or failure).
+ this.onabort = null; // When the read has been aborted. For instance, by invoking the abort() method.
+};
+
+// States
+FileReader.EMPTY = 0;
+FileReader.LOADING = 1;
+FileReader.DONE = 2;
+
+/**
+ * Abort reading file.
+ */
+FileReader.prototype.abort = function() {
+ this.result = null;
+
+ if (this.readyState == FileReader.DONE || this.readyState == FileReader.EMPTY) {
+ return;
+ }
+
+ this.readyState = FileReader.DONE;
+
+ // If abort callback
+ if (typeof this.onabort === 'function') {
+ this.onabort(new ProgressEvent('abort', {target:this}));
+ }
+ // If load end callback
+ if (typeof this.onloadend === 'function') {
+ this.onloadend(new ProgressEvent('loadend', {target:this}));
+ }
+};
+
+/**
+ * Read text file.
+ *
+ * @param file {File} File object containing file properties
+ * @param encoding [Optional] (see http://www.iana.org/assignments/character-sets)
+ */
+FileReader.prototype.readAsText = function(file, encoding) {
+ // Figure out pathing
+ this.fileName = '';
+ if (typeof file.fullPath === 'undefined') {
+ this.fileName = file;
+ } else {
+ this.fileName = file.fullPath;
+ }
+
+ // Already loading something
+ if (this.readyState == FileReader.LOADING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // LOADING state
+ this.readyState = FileReader.LOADING;
+
+ // If loadstart callback
+ if (typeof this.onloadstart === "function") {
+ this.onloadstart(new ProgressEvent("loadstart", {target:this}));
+ }
+
+ // Default encoding is UTF-8
+ var enc = encoding ? encoding : "UTF-8";
+
+ var me = this;
+
+ // Read file
+ exec(
+ // Success callback
+ function(r) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // Save result
+ me.result = r;
+
+ // If onload callback
+ if (typeof me.onload === "function") {
+ me.onload(new ProgressEvent("load", {target:me}));
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ },
+ // Error callback
+ function(e) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ // null result
+ me.result = null;
+
+ // Save error
+ me.error = new FileError(e);
+
+ // If onerror callback
+ if (typeof me.onerror === "function") {
+ me.onerror(new ProgressEvent("error", {target:me}));
+ }
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ }, "File", "readAsText", [this.fileName, enc]);
+};
+
+
+/**
+ * Read file and return data as a base64 encoded data url.
+ * A data url is of the form:
+ * data:[<mediatype>][;base64],<data>
+ *
+ * @param file {File} File object containing file properties
+ */
+FileReader.prototype.readAsDataURL = function(file) {
+ this.fileName = "";
+ if (typeof file.fullPath === "undefined") {
+ this.fileName = file;
+ } else {
+ this.fileName = file.fullPath;
+ }
+
+ // Already loading something
+ if (this.readyState == FileReader.LOADING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // LOADING state
+ this.readyState = FileReader.LOADING;
+
+ // If loadstart callback
+ if (typeof this.onloadstart === "function") {
+ this.onloadstart(new ProgressEvent("loadstart", {target:this}));
+ }
+
+ var me = this;
+
+ // Read file
+ exec(
+ // Success callback
+ function(r) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ // Save result
+ me.result = r;
+
+ // If onload callback
+ if (typeof me.onload === "function") {
+ me.onload(new ProgressEvent("load", {target:me}));
+ }
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ },
+ // Error callback
+ function(e) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ me.result = null;
+
+ // Save error
+ me.error = new FileError(e);
+
+ // If onerror callback
+ if (typeof me.onerror === "function") {
+ me.onerror(new ProgressEvent("error", {target:me}));
+ }
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ }, "File", "readAsDataURL", [this.fileName]);
+};
+
+/**
+ * Read file and return data as a binary data.
+ *
+ * @param file {File} File object containing file properties
+ */
+FileReader.prototype.readAsBinaryString = function(file) {
+ // TODO - Can't return binary data to browser.
+ console.log('method "readAsBinaryString" is not supported at this time.');
+};
+
+/**
+ * Read file and return data as a binary data.
+ *
+ * @param file {File} File object containing file properties
+ */
+FileReader.prototype.readAsArrayBuffer = function(file) {
+ // TODO - Can't return binary data to browser.
+ console.log('This method is not supported at this time.');
+};
+
+module.exports = FileReader;
+});
+
+// file: lib/common/plugin/FileSystem.js
+define("cordova/plugin/FileSystem", function(require, exports, module) {
+var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
+
+/**
+ * An interface representing a file system
+ *
+ * @constructor
+ * {DOMString} name the unique name of the file system (readonly)
+ * {DirectoryEntry} root directory of the file system (readonly)
+ */
+var FileSystem = function(name, root) {
+ this.name = name || null;
+ if (root) {
+ this.root = new DirectoryEntry(root.name, root.fullPath);
+ }
+};
+
+module.exports = FileSystem;
+});
+
+// file: lib/common/plugin/FileTransfer.js
+define("cordova/plugin/FileTransfer", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * FileTransfer uploads a file to a remote server.
+ * @constructor
+ */
+var FileTransfer = function() {};
+
+/**
+* Given an absolute file path, uploads a file on the device to a remote server
+* using a multipart HTTP request.
+* @param filePath {String} Full path of the file on the device
+* @param server {String} URL of the server to receive the file
+* @param successCallback (Function} Callback to be invoked when upload has completed
+* @param errorCallback {Function} Callback to be invoked upon error
+* @param options {FileUploadOptions} Optional parameters such as file name and mimetype
+* @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
+*/
+FileTransfer.prototype.upload = function(filePath, server, successCallback, errorCallback, options, trustAllHosts) {
+ // check for options
+ var fileKey = null;
+ var fileName = null;
+ var mimeType = null;
+ var params = null;
+ var chunkedMode = true;
+ if (options) {
+ fileKey = options.fileKey;
+ fileName = options.fileName;
+ mimeType = options.mimeType;
+ if (options.chunkedMode !== null || typeof options.chunkedMode != "undefined") {
+ chunkedMode = options.chunkedMode;
+ }
+ if (options.params) {
+ params = options.params;
+ }
+ else {
+ params = {};
+ }
+ }
+
+ exec(successCallback, errorCallback, 'FileTransfer', 'upload', [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode]);
+};
+
+/**
+ * Downloads a file form a given URL and saves it to the specified directory.
+ * @param source {String} URL of the server to receive the file
+ * @param target {String} Full path of the file on the device
+ * @param successCallback (Function} Callback to be invoked when upload has completed
+ * @param errorCallback {Function} Callback to be invoked upon error
+ */
+FileTransfer.prototype.download = function(source, target, successCallback, errorCallback) {
+ var win = function(result) {
+ var entry = null;
+ if (result.isDirectory) {
+ entry = new (require('cordova/plugin/DirectoryEntry'))();
+ }
+ else if (result.isFile) {
+ entry = new (require('cordova/plugin/FileEntry'))();
+ }
+ entry.isDirectory = result.isDirectory;
+ entry.isFile = result.isFile;
+ entry.name = result.name;
+ entry.fullPath = result.fullPath;
+ successCallback(entry);
+ };
+ exec(win, errorCallback, 'FileTransfer', 'download', [source, target]);
+};
+
+module.exports = FileTransfer;
+
+});
+
+// file: lib/common/plugin/FileTransferError.js
+define("cordova/plugin/FileTransferError", function(require, exports, module) {
+/**
+ * FileTransferError
+ * @constructor
+ */
+var FileTransferError = function(code) {
+ this.code = code || null;
+};
+
+FileTransferError.FILE_NOT_FOUND_ERR = 1;
+FileTransferError.INVALID_URL_ERR = 2;
+FileTransferError.CONNECTION_ERR = 3;
+
+module.exports = FileTransferError;
+});
+
+// file: lib/common/plugin/FileUploadOptions.js
+define("cordova/plugin/FileUploadOptions", function(require, exports, module) {
+/**
+ * Options to customize the HTTP request used to upload files.
+ * @constructor
+ * @param fileKey {String} Name of file request parameter.
+ * @param fileName {String} Filename to be used by the server. Defaults to image.jpg.
+ * @param mimeType {String} Mimetype of the uploaded file. Defaults to image/jpeg.
+ * @param params {Object} Object with key: value params to send to the server.
+ */
+var FileUploadOptions = function(fileKey, fileName, mimeType, params) {
+ this.fileKey = fileKey || null;
+ this.fileName = fileName || null;
+ this.mimeType = mimeType || null;
+ this.params = params || null;
+};
+
+module.exports = FileUploadOptions;
+});
+
+// file: lib/common/plugin/FileUploadResult.js
+define("cordova/plugin/FileUploadResult", function(require, exports, module) {
+/**
+ * FileUploadResult
+ * @constructor
+ */
+var FileUploadResult = function() {
+ this.bytesSent = 0;
+ this.responseCode = null;
+ this.response = null;
+};
+
+module.exports = FileUploadResult;
+});
+
+// file: lib/common/plugin/FileWriter.js
+define("cordova/plugin/FileWriter", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError'),
+ ProgressEvent = require('cordova/plugin/ProgressEvent');
+
+/**
+ * This class writes to the mobile device file system.
+ *
+ * For Android:
+ * The root directory is the root of the file system.
+ * To write to the SD card, the file name is "sdcard/my_file.txt"
+ *
+ * @constructor
+ * @param file {File} File object containing file properties
+ * @param append if true write to the end of the file, otherwise overwrite the file
+ */
+var FileWriter = function(file) {
+ this.fileName = "";
+ this.length = 0;
+ if (file) {
+ this.fileName = file.fullPath || file;
+ this.length = file.size || 0;
+ }
+ // default is to write at the beginning of the file
+ this.position = 0;
+
+ this.readyState = 0; // EMPTY
+
+ this.result = null;
+
+ // Error
+ this.error = null;
+
+ // Event handlers
+ this.onwritestart = null; // When writing starts
+ this.onprogress = null; // While writing the file, and reporting partial file data
+ this.onwrite = null; // When the write has successfully completed.
+ this.onwriteend = null; // When the request has completed (either in success or failure).
+ this.onabort = null; // When the write has been aborted. For instance, by invoking the abort() method.
+ this.onerror = null; // When the write has failed (see errors).
+};
+
+// States
+FileWriter.INIT = 0;
+FileWriter.WRITING = 1;
+FileWriter.DONE = 2;
+
+/**
+ * Abort writing file.
+ */
+FileWriter.prototype.abort = function() {
+ // check for invalid state
+ if (this.readyState === FileWriter.DONE || this.readyState === FileWriter.INIT) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // set error
+ this.error = new FileError(FileError.ABORT_ERR);
+
+ this.readyState = FileWriter.DONE;
+
+ // If abort callback
+ if (typeof this.onabort === "function") {
+ this.onabort(new ProgressEvent("abort", {"target":this}));
+ }
+
+ // If write end callback
+ if (typeof this.onwriteend === "function") {
+ this.onwriteend(new ProgressEvent("writeend", {"target":this}));
+ }
+};
+
+/**
+ * Writes data to the file
+ *
+ * @param text to be written
+ */
+FileWriter.prototype.write = function(text) {
+ // Throw an exception if we are already writing a file
+ if (this.readyState === FileWriter.WRITING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // WRITING state
+ this.readyState = FileWriter.WRITING;
+
+ var me = this;
+
+ // If onwritestart callback
+ if (typeof me.onwritestart === "function") {
+ me.onwritestart(new ProgressEvent("writestart", {"target":me}));
+ }
+
+ // Write file
+ exec(
+ // Success callback
+ function(r) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileWriter.DONE) {
+ return;
+ }
+
+ // position always increases by bytes written because file would be extended
+ me.position += r;
+ // The length of the file is now where we are done writing.
+
+ me.length = me.position;
+
+ // DONE state
+ me.readyState = FileWriter.DONE;
+
+ // If onwrite callback
+ if (typeof me.onwrite === "function") {
+ me.onwrite(new ProgressEvent("write", {"target":me}));
+ }
+
+ // If onwriteend callback
+ if (typeof me.onwriteend === "function") {
+ me.onwriteend(new ProgressEvent("writeend", {"target":me}));
+ }
+ },
+ // Error callback
+ function(e) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileWriter.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileWriter.DONE;
+
+ // Save error
+ me.error = new FileError(e);
+
+ // If onerror callback
+ if (typeof me.onerror === "function") {
+ me.onerror(new ProgressEvent("error", {"target":me}));
+ }
+
+ // If onwriteend callback
+ if (typeof me.onwriteend === "function") {
+ me.onwriteend(new ProgressEvent("writeend", {"target":me}));
+ }
+ }, "File", "write", [this.fileName, text, this.position]);
+};
+
+/**
+ * Moves the file pointer to the location specified.
+ *
+ * If the offset is a negative number the position of the file
+ * pointer is rewound. If the offset is greater than the file
+ * size the position is set to the end of the file.
+ *
+ * @param offset is the location to move the file pointer to.
+ */
+FileWriter.prototype.seek = function(offset) {
+ // Throw an exception if we are already writing a file
+ if (this.readyState === FileWriter.WRITING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ if (!offset && offset !== 0) {
+ return;
+ }
+
+ // See back from end of file.
+ if (offset < 0) {
+ this.position = Math.max(offset + this.length, 0);
+ }
+ // Offset is bigger then file size so set position
+ // to the end of the file.
+ else if (offset > this.length) {
+ this.position = this.length;
+ }
+ // Offset is between 0 and file size so set the position
+ // to start writing.
+ else {
+ this.position = offset;
+ }
+};
+
+/**
+ * Truncates the file to the size specified.
+ *
+ * @param size to chop the file at.
+ */
+FileWriter.prototype.truncate = function(size) {
+ // Throw an exception if we are already writing a file
+ if (this.readyState === FileWriter.WRITING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // WRITING state
+ this.readyState = FileWriter.WRITING;
+
+ var me = this;
+
+ // If onwritestart callback
+ if (typeof me.onwritestart === "function") {
+ me.onwritestart(new ProgressEvent("writestart", {"target":this}));
+ }
+
+ // Write file
+ exec(
+ // Success callback
+ function(r) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileWriter.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileWriter.DONE;
+
+ // Update the length of the file
+ me.length = r;
+ me.position = Math.min(me.position, r);
+
+ // If onwrite callback
+ if (typeof me.onwrite === "function") {
+ me.onwrite(new ProgressEvent("write", {"target":me}));
+ }
+
+ // If onwriteend callback
+ if (typeof me.onwriteend === "function") {
+ me.onwriteend(new ProgressEvent("writeend", {"target":me}));
+ }
+ },
+ // Error callback
+ function(e) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileWriter.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileWriter.DONE;
+
+ // Save error
+ me.error = new FileError(e);
+
+ // If onerror callback
+ if (typeof me.onerror === "function") {
+ me.onerror(new ProgressEvent("error", {"target":me}));
+ }
+
+ // If onwriteend callback
+ if (typeof me.onwriteend === "function") {
+ me.onwriteend(new ProgressEvent("writeend", {"target":me}));
+ }
+ }, "File", "truncate", [this.fileName, size]);
+};
+
+module.exports = FileWriter;
+
+});
+
+// file: lib/common/plugin/Flags.js
+define("cordova/plugin/Flags", function(require, exports, module) {
+/**
+ * Supplies arguments to methods that lookup or create files and directories.
+ *
+ * @param create
+ * {boolean} file or directory if it doesn't exist
+ * @param exclusive
+ * {boolean} used with create; if true the command will fail if
+ * target path exists
+ */
+function Flags(create, exclusive) {
+ this.create = create || false;
+ this.exclusive = exclusive || false;
+}
+
+module.exports = Flags;
+});
+
+// file: lib/common/plugin/LocalFileSystem.js
+define("cordova/plugin/LocalFileSystem", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * Represents a local file system.
+ */
+var LocalFileSystem = function() {
+
+};
+
+LocalFileSystem.TEMPORARY = 0; //temporary, with no guarantee of persistence
+LocalFileSystem.PERSISTENT = 1; //persistent
+
+module.exports = LocalFileSystem;
+});
+
+// file: lib/common/plugin/Media.js
+define("cordova/plugin/Media", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec');
+
+var mediaObjects = {};
+
+/**
+ * This class provides access to the device media, interfaces to both sound and video
+ *
+ * @constructor
+ * @param src The file name or url to play
+ * @param successCallback The callback to be called when the file is done playing or recording.
+ * successCallback()
+ * @param errorCallback The callback to be called if there is an error.
+ * errorCallback(int errorCode) - OPTIONAL
+ * @param statusCallback The callback to be called when media status has changed.
+ * statusCallback(int statusCode) - OPTIONAL
+ */
+var Media = function(src, successCallback, errorCallback, statusCallback) {
+
+ // successCallback optional
+ if (successCallback && (typeof successCallback !== "function")) {
+ console.log("Media Error: successCallback is not a function");
+ return;
+ }
+
+ // errorCallback optional
+ if (errorCallback && (typeof errorCallback !== "function")) {
+ console.log("Media Error: errorCallback is not a function");
+ return;
+ }
+
+ // statusCallback optional
+ if (statusCallback && (typeof statusCallback !== "function")) {
+ console.log("Media Error: statusCallback is not a function");
+ return;
+ }
+
+ this.id = utils.createUUID();
+ mediaObjects[this.id] = this;
+ this.src = src;
+ this.successCallback = successCallback;
+ this.errorCallback = errorCallback;
+ this.statusCallback = statusCallback;
+ this._duration = -1;
+ this._position = -1;
+ exec(null, this.errorCallback, "Media", "create", [this.id, this.src]);
+};
+
+// Media messages
+Media.MEDIA_STATE = 1;
+Media.MEDIA_DURATION = 2;
+Media.MEDIA_POSITION = 3;
+Media.MEDIA_ERROR = 9;
+
+// Media states
+Media.MEDIA_NONE = 0;
+Media.MEDIA_STARTING = 1;
+Media.MEDIA_RUNNING = 2;
+Media.MEDIA_PAUSED = 3;
+Media.MEDIA_STOPPED = 4;
+Media.MEDIA_MSG = ["None", "Starting", "Running", "Paused", "Stopped"];
+
+// "static" function to return existing objs.
+Media.get = function(id) {
+ return mediaObjects[id];
+};
+
+/**
+ * Start or resume playing audio file.
+ */
+Media.prototype.play = function(options) {
+ exec(null, null, "Media", "startPlayingAudio", [this.id, this.src, options]);
+};
+
+/**
+ * Stop playing audio file.
+ */
+Media.prototype.stop = function() {
+ var me = this;
+ exec(function() {
+ me._position = 0;
+ me.successCallback();
+ }, this.errorCallback, "Media", "stopPlayingAudio", [this.id]);
+};
+
+/**
+ * Seek or jump to a new time in the track..
+ */
+Media.prototype.seekTo = function(milliseconds) {
+ var me = this;
+ exec(function(p) {
+ me._position = p;
+ }, this.errorCallback, "Media", "seekToAudio", [this.id, milliseconds]);
+};
+
+/**
+ * Pause playing audio file.
+ */
+Media.prototype.pause = function() {
+ exec(null, this.errorCallback, "Media", "pausePlayingAudio", [this.id]);
+};
+
+/**
+ * Get duration of an audio file.
+ * The duration is only set for audio that is playing, paused or stopped.
+ *
+ * @return duration or -1 if not known.
+ */
+Media.prototype.getDuration = function() {
+ return this._duration;
+};
+
+/**
+ * Get position of audio.
+ */
+Media.prototype.getCurrentPosition = function(success, fail) {
+ var me = this;
+ exec(function(p) {
+ me._position = p;
+ success(p);
+ }, fail, "Media", "getCurrentPositionAudio", [this.id]);
+};
+
+/**
+ * Start recording audio file.
+ */
+Media.prototype.startRecord = function() {
+ exec(this.successCallback, this.errorCallback, "Media", "startRecordingAudio", [this.id, this.src]);
+};
+
+/**
+ * Stop recording audio file.
+ */
+Media.prototype.stopRecord = function() {
+ exec(this.successCallback, this.errorCallback, "Media", "stopRecordingAudio", [this.id]);
+};
+
+/**
+ * Release the resources.
+ */
+Media.prototype.release = function() {
+ exec(null, this.errorCallback, "Media", "release", [this.id]);
+};
+
+/**
+ * Adjust the volume.
+ */
+Media.prototype.setVolume = function(volume) {
+ exec(null, null, "Media", "setVolume", [this.id, volume]);
+};
+
+/**
+ * Audio has status update.
+ * PRIVATE
+ *
+ * @param id The media object id (string)
+ * @param status The status code (int)
+ * @param msg The status message (string)
+ */
+Media.onStatus = function(id, msg, value) {
+ var media = mediaObjects[id];
+ // If state update
+ if (msg === Media.MEDIA_STATE) {
+ if (value === Media.MEDIA_STOPPED) {
+ if (media.successCallback) {
+ media.successCallback();
+ }
+ }
+ if (media.statusCallback) {
+ media.statusCallback(value);
+ }
+ }
+ else if (msg === Media.MEDIA_DURATION) {
+ media._duration = value;
+ }
+ else if (msg === Media.MEDIA_ERROR) {
+ if (media.errorCallback) {
+ // value should be a MediaError object when msg == MEDIA_ERROR
+ media.errorCallback(value);
+ }
+ }
+ else if (msg === Media.MEDIA_POSITION) {
+ media._position = value;
+ }
+};
+
+module.exports = Media;
+});
+
+// file: lib/common/plugin/MediaError.js
+define("cordova/plugin/MediaError", function(require, exports, module) {
+/**
+ * This class contains information about any Media errors.
+ * @constructor
+ */
+var MediaError = function(code, msg) {
+ this.code = (code !== undefined ? code : null);
+ this.message = msg || "";
+};
+
+MediaError.MEDIA_ERR_NONE_ACTIVE = 0;
+MediaError.MEDIA_ERR_ABORTED = 1;
+MediaError.MEDIA_ERR_NETWORK = 2;
+MediaError.MEDIA_ERR_DECODE = 3;
+MediaError.MEDIA_ERR_NONE_SUPPORTED = 4;
+
+module.exports = MediaError;
+});
+
+// file: lib/common/plugin/MediaFile.js
+define("cordova/plugin/MediaFile", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec'),
+ File = require('cordova/plugin/File'),
+ CaptureError = require('cordova/plugin/CaptureError');
+/**
+ * Represents a single file.
+ *
+ * name {DOMString} name of the file, without path information
+ * fullPath {DOMString} the full path of the file, including the name
+ * type {DOMString} mime type
+ * lastModifiedDate {Date} last modified date
+ * size {Number} size of the file in bytes
+ */
+var MediaFile = function(name, fullPath, type, lastModifiedDate, size){
+ MediaFile.__super__.constructor.apply(this, arguments);
+};
+
+utils.extend(MediaFile, File);
+
+/**
+ * Request capture format data for a specific file and type
+ *
+ * @param {Function} successCB
+ * @param {Function} errorCB
+ */
+MediaFile.prototype.getFormatData = function(successCallback, errorCallback) {
+ if (typeof this.fullPath === "undefined" || this.fullPath === null) {
+ errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
+ } else {
+ exec(successCallback, errorCallback, "Capture", "getFormatData", [this.fullPath, this.type]);
+ }
+};
+
+// TODO: can we axe this?
+/**
+ * Casts a PluginResult message property (array of objects) to an array of MediaFile objects
+ * (used in Objective-C and Android)
+ *
+ * @param {PluginResult} pluginResult
+ */
+MediaFile.cast = function(pluginResult) {
+ var mediaFiles = [];
+ for (var i=0; i<pluginResult.message.length; i++) {
+ var mediaFile = new MediaFile();
+ mediaFile.name = pluginResult.message[i].name;
+ mediaFile.fullPath = pluginResult.message[i].fullPath;
+ mediaFile.type = pluginResult.message[i].type;
+ mediaFile.lastModifiedDate = pluginResult.message[i].lastModifiedDate;
+ mediaFile.size = pluginResult.message[i].size;
+ mediaFiles.push(mediaFile);
+ }
+ pluginResult.message = mediaFiles;
+ return pluginResult;
+};
+
+module.exports = MediaFile;
+
+});
+
+// file: lib/common/plugin/MediaFileData.js
+define("cordova/plugin/MediaFileData", function(require, exports, module) {
+/**
+ * MediaFileData encapsulates format information of a media file.
+ *
+ * @param {DOMString} codecs
+ * @param {long} bitrate
+ * @param {long} height
+ * @param {long} width
+ * @param {float} duration
+ */
+var MediaFileData = function(codecs, bitrate, height, width, duration){
+ this.codecs = codecs || null;
+ this.bitrate = bitrate || 0;
+ this.height = height || 0;
+ this.width = width || 0;
+ this.duration = duration || 0;
+};
+
+module.exports = MediaFileData;
+});
+
+// file: lib/common/plugin/Metadata.js
+define("cordova/plugin/Metadata", function(require, exports, module) {
+/**
+ * Information about the state of the file or directory
+ *
+ * {Date} modificationTime (readonly)
+ */
+var Metadata = function(time) {
+ this.modificationTime = (typeof time != 'undefined'?new Date(time):null);
+};
+
+module.exports = Metadata;
+});
+
+// file: lib/common/plugin/Position.js
+define("cordova/plugin/Position", function(require, exports, module) {
+var Coordinates = require('cordova/plugin/Coordinates');
+
+var Position = function(coords, timestamp) {
+ if (coords) {
+ this.coords = new Coordinates(coords.latitude, coords.longitude, coords.altitude, coords.accuracy, coords.heading, coords.velocity, coords.altitudeAccuracy);
+ } else {
+ this.coords = new Coordinates();
+ }
+ this.timestamp = (timestamp !== undefined) ? timestamp : new Date();
+};
+
+module.exports = Position;
+
+});
+
+// file: lib/common/plugin/PositionError.js
+define("cordova/plugin/PositionError", function(require, exports, module) {
+/**
+ * Position error object
+ *
+ * @constructor
+ * @param code
+ * @param message
+ */
+var PositionError = function(code, message) {
+ this.code = code || null;
+ this.message = message || '';
+};
+
+PositionError.PERMISSION_DENIED = 1;
+PositionError.POSITION_UNAVAILABLE = 2;
+PositionError.TIMEOUT = 3;
+
+module.exports = PositionError;
+});
+
+// file: lib/common/plugin/ProgressEvent.js
+define("cordova/plugin/ProgressEvent", function(require, exports, module) {
+// If ProgressEvent exists in global context, use it already, otherwise use our own polyfill
+// Feature test: See if we can instantiate a native ProgressEvent;
+// if so, use that approach,
+// otherwise fill-in with our own implementation.
+//
+// NOTE: right now we always fill in with our own. Down the road would be nice if we can use whatever is native in the webview.
+var ProgressEvent = (function() {
+ /*
+ var createEvent = function(data) {
+ var event = document.createEvent('Events');
+ event.initEvent('ProgressEvent', false, false);
+ if (data) {
+ for (var i in data) {
+ if (data.hasOwnProperty(i)) {
+ event[i] = data[i];
+ }
+ }
+ if (data.target) {
+ // TODO: cannot call <some_custom_object>.dispatchEvent
+ // need to first figure out how to implement EventTarget
+ }
+ }
+ return event;
+ };
+ try {
+ var ev = createEvent({type:"abort",target:document});
+ return function ProgressEvent(type, data) {
+ data.type = type;
+ return createEvent(data);
+ };
+ } catch(e){
+ */
+ return function ProgressEvent(type, dict) {
+ this.type = type;
+ this.bubbles = false;
+ this.cancelBubble = false;
+ this.cancelable = false;
+ this.lengthComputable = false;
+ this.loaded = dict && dict.loaded ? dict.loaded : 0;
+ this.total = dict && dict.total ? dict.total : 0;
+ this.target = dict && dict.target ? dict.target : null;
+ };
+ //}
+})();
+
+module.exports = ProgressEvent;
+});
+
+// file: lib/common/plugin/accelerometer.js
+define("cordova/plugin/accelerometer", function(require, exports, module) {
+/**
+ * This class provides access to device accelerometer data.
+ * @constructor
+ */
+var utils = require("cordova/utils"),
+ exec = require("cordova/exec"),
+ Acceleration = require('cordova/plugin/Acceleration');
+
+// Is the accel sensor running?
+var running = false;
+
+// Keeps reference to watchAcceleration calls.
+var timers = {};
+
+// Array of listeners; used to keep track of when we should call start and stop.
+var listeners = [];
+
+// Last returned acceleration object from native
+var accel = null;
+
+// Tells native to start.
+function start() {
+ exec(function(a) {
+ var tempListeners = listeners.slice(0);
+ accel = new Acceleration(a.x, a.y, a.z, a.timestamp);
+ for (var i = 0, l = tempListeners.length; i < l; i++) {
+ tempListeners[i].win(accel);
+ }
+ }, function(e) {
+ var tempListeners = listeners.slice(0);
+ for (var i = 0, l = tempListeners.length; i < l; i++) {
+ tempListeners[i].fail(e);
+ }
+ }, "Accelerometer", "start", []);
+ running = true;
+}
+
+// Tells native to stop.
+function stop() {
+ exec(null, null, "Accelerometer", "stop", []);
+ running = false;
+}
+
+// Adds a callback pair to the listeners array
+function createCallbackPair(win, fail) {
+ return {win:win, fail:fail};
+}
+
+// Removes a win/fail listener pair from the listeners array
+function removeListeners(l) {
+ var idx = listeners.indexOf(l);
+ if (idx > -1) {
+ listeners.splice(idx, 1);
+ if (listeners.length === 0) {
+ stop();
+ }
+ }
+}
+
+var accelerometer = {
+ /**
+ * Asynchronously aquires the current acceleration.
+ *
+ * @param {Function} successCallback The function to call when the acceleration data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the acceleration data. (OPTIONAL)
+ * @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
+ */
+ getCurrentAcceleration: function(successCallback, errorCallback, options) {
+ // successCallback required
+ if (typeof successCallback !== "function") {
+ throw "getCurrentAcceleration must be called with at least a success callback function as first parameter.";
+ }
+
+ var p;
+ var win = function(a) {
+ successCallback(a);
+ removeListeners(p);
+ };
+ var fail = function(e) {
+ errorCallback(e);
+ removeListeners(p);
+ };
+
+ p = createCallbackPair(win, fail);
+ listeners.push(p);
+
+ if (!running) {
+ start();
+ }
+ },
+
+ /**
+ * Asynchronously aquires the acceleration repeatedly at a given interval.
+ *
+ * @param {Function} successCallback The function to call each time the acceleration data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the acceleration data. (OPTIONAL)
+ * @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
+ * @return String The watch id that must be passed to #clearWatch to stop watching.
+ */
+ watchAcceleration: function(successCallback, errorCallback, options) {
+ // Default interval (10 sec)
+ var frequency = (options && options.frequency && typeof options.frequency == 'number') ? options.frequency : 10000;
+
+ // successCallback required
+ if (typeof successCallback !== "function") {
+ throw "watchAcceleration must be called with at least a success callback function as first parameter.";
+ }
+
+ // Keep reference to watch id, and report accel readings as often as defined in frequency
+ var id = utils.createUUID();
+
+ var p = createCallbackPair(function(){}, function(e) {
+ errorCallback(e);
+ removeListeners(p);
+ });
+ listeners.push(p);
+
+ timers[id] = {
+ timer:window.setInterval(function() {
+ if (accel) {
+ successCallback(accel);
+ }
+ }, frequency),
+ listeners:p
+ };
+
+ if (running) {
+ // If we're already running then immediately invoke the success callback
+ successCallback(accel);
+ } else {
+ start();
+ }
+
+ return id;
+ },
+
+ /**
+ * Clears the specified accelerometer watch.
+ *
+ * @param {String} id The id of the watch returned from #watchAcceleration.
+ */
+ clearWatch: function(id) {
+ // Stop javascript timer & remove from timer list
+ if (id && timers[id]) {
+ window.clearInterval(timers[id].timer);
+ removeListeners(timers[id].listeners);
+ delete timers[id];
+ }
+ }
+};
+
+module.exports = accelerometer;
+
+});
+
+// file: lib/android/plugin/android/app.js
+define("cordova/plugin/android/app", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+module.exports = {
+ /**
+ * Clear the resource cache.
+ */
+ clearCache:function() {
+ exec(null, null, "App", "clearCache", []);
+ },
+
+ /**
+ * Load the url into the webview or into new browser instance.
+ *
+ * @param url The URL to load
+ * @param props Properties that can be passed in to the activity:
+ * wait: int => wait msec before loading URL
+ * loadingDialog: "Title,Message" => display a native loading dialog
+ * loadUrlTimeoutValue: int => time in msec to wait before triggering a timeout error
+ * clearHistory: boolean => clear webview history (default=false)
+ * openExternal: boolean => open in a new browser (default=false)
+ *
+ * Example:
+ * navigator.app.loadUrl("http://server/myapp/index.html", {wait:2000, loadingDialog:"Wait,Loading App", loadUrlTimeoutValue: 60000});
+ */
+ loadUrl:function(url, props) {
+ exec(null, null, "App", "loadUrl", [url, props]);
+ },
+
+ /**
+ * Cancel loadUrl that is waiting to be loaded.
+ */
+ cancelLoadUrl:function() {
+ exec(null, null, "App", "cancelLoadUrl", []);
+ },
+
+ /**
+ * Clear web history in this web view.
+ * Instead of BACK button loading the previous web page, it will exit the app.
+ */
+ clearHistory:function() {
+ exec(null, null, "App", "clearHistory", []);
+ },
+
+ /**
+ * Go to previous page displayed.
+ * This is the same as pressing the backbutton on Android device.
+ */
+ backHistory:function() {
+ exec(null, null, "App", "backHistory", []);
+ },
+
+ /**
+ * Override the default behavior of the Android back button.
+ * If overridden, when the back button is pressed, the "backKeyDown" JavaScript event will be fired.
+ *
+ * Note: The user should not have to call this method. Instead, when the user
+ * registers for the "backbutton" event, this is automatically done.
+ *
+ * @param override T=override, F=cancel override
+ */
+ overrideBackbutton:function(override) {
+ exec(null, null, "App", "overrideBackbutton", [override]);
+ },
+
+ /**
+ * Exit and terminate the application.
+ */
+ exitApp:function() {
+ return exec(null, null, "App", "exitApp", []);
+ }
+};
+});
+
+// file: lib/android/plugin/android/callback.js
+define("cordova/plugin/android/callback", function(require, exports, module) {
+var port = null,
+ token = null,
+ cordova = require('cordova'),
+ polling = require('cordova/plugin/android/polling'),
+ callback = function() {
+ // Exit if shutting down app
+ if (cordova.shuttingDown) {
+ return;
+ }
+
+ // If polling flag was changed, start using polling from now on
+ if (cordova.UsePolling) {
+ polling();
+ return;
+ }
+
+ var xmlhttp = new XMLHttpRequest();
+
+ // Callback function when XMLHttpRequest is ready
+ xmlhttp.onreadystatechange=function(){
+ if(xmlhttp.readyState === 4){
+
+ // Exit if shutting down app
+ if (cordova.shuttingDown) {
+ return;
+ }
+
+ // If callback has JavaScript statement to execute
+ if (xmlhttp.status === 200) {
+
+ // Need to url decode the response
+ var msg = decodeURIComponent(xmlhttp.responseText);
+ setTimeout(function() {
+ try {
+ var t = eval(msg);
+ }
+ catch (e) {
+ // If we're getting an error here, seeing the message will help in debugging
+ console.log("JSCallback: Message from Server: " + msg);
+ console.log("JSCallback Error: "+e);
+ }
+ }, 1);
+ setTimeout(callback, 1);
+ }
+
+ // If callback ping (used to keep XHR request from timing out)
+ else if (xmlhttp.status === 404) {
+ setTimeout(callback, 10);
+ }
+
+ // If security error
+ else if (xmlhttp.status === 403) {
+ console.log("JSCallback Error: Invalid token. Stopping callbacks.");
+ }
+
+ // If server is stopping
+ else if (xmlhttp.status === 503) {
+ console.log("JSCallback Server Closed: Stopping callbacks.");
+ }
+
+ // If request wasn't GET
+ else if (xmlhttp.status === 400) {
+ console.log("JSCallback Error: Bad request. Stopping callbacks.");
+ }
+
+ // If error, revert to polling
+ else {
+ console.log("JSCallback Error: Request failed.");
+ cordova.UsePolling = true;
+ polling();
+ }
+ }
+ };
+
+ if (port === null) {
+ port = prompt("getPort", "gap_callbackServer:");
+ }
+ if (token === null) {
+ token = prompt("getToken", "gap_callbackServer:");
+ }
+ xmlhttp.open("GET", "http://127.0.0.1:"+port+"/"+token , true);
+ xmlhttp.send();
+};
+
+module.exports = callback;
+});
+
+// file: lib/android/plugin/android/device.js
+define("cordova/plugin/android/device", function(require, exports, module) {
+var channel = require('cordova/channel'),
+ utils = require('cordova/utils'),
+ exec = require('cordova/exec');
+
+/**
+ * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
+ * phone, etc.
+ * @constructor
+ */
+function Device() {
+ this.available = false;
+ this.platform = null;
+ this.version = null;
+ this.name = null;
+ this.uuid = null;
+ this.cordova = null;
+
+ var me = this;
+
+ channel.onCordovaReady.subscribeOnce(function() {
+ me.getInfo(function(info) {
+ me.available = true;
+ me.platform = info.platform;
+ me.version = info.version;
+ me.name = info.name;
+ me.uuid = info.uuid;
+ me.cordova = info.cordova;
+ channel.onCordovaInfoReady.fire();
+ },function(e) {
+ me.available = false;
+ utils.alert("[ERROR] Error initializing Cordova: " + e);
+ });
+ });
+}
+
+/**
+ * Get device info
+ *
+ * @param {Function} successCallback The function to call when the heading data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL)
+ */
+Device.prototype.getInfo = function(successCallback, errorCallback) {
+
+ // successCallback required
+ if (typeof successCallback !== "function") {
+ console.log("Device Error: successCallback is not a function");
+ return;
+ }
+
+ // errorCallback optional
+ if (errorCallback && (typeof errorCallback !== "function")) {
+ console.log("Device Error: errorCallback is not a function");
+ return;
+ }
+
+ // Get info
+ exec(successCallback, errorCallback, "Device", "getDeviceInfo", []);
+};
+
+/*
+ * DEPRECATED
+ * This is only for Android.
+ *
+ * You must explicitly override the back button.
+ */
+Device.prototype.overrideBackButton = function() {
+ console.log("Device.overrideBackButton() is deprecated. Use App.overrideBackbutton(true).");
+ navigator.app.overrideBackbutton(true);
+};
+
+/*
+ * DEPRECATED
+ * This is only for Android.
+ *
+ * This resets the back button to the default behaviour
+ */
+Device.prototype.resetBackButton = function() {
+ console.log("Device.resetBackButton() is deprecated. Use App.overrideBackbutton(false).");
+ navigator.app.overrideBackbutton(false);
+};
+
+/*
+ * DEPRECATED
+ * This is only for Android.
+ *
+ * This terminates the activity!
+ */
+Device.prototype.exitApp = function() {
+ console.log("Device.exitApp() is deprecated. Use App.exitApp().");
+ navigator.app.exitApp();
+};
+
+module.exports = new Device();
+});
+
+// file: lib/android/plugin/android/notification.js
+define("cordova/plugin/android/notification", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * Provides Android enhanced notification API.
+ */
+module.exports = {
+ activityStart : function(title, message) {
+ // If title and message not specified then mimic Android behavior of
+ // using default strings.
+ if (typeof title === "undefined" && typeof message == "undefined") {
+ title = "Busy";
+ message = 'Please wait...';
+ }
+
+ exec(null, null, 'Notification', 'activityStart', [ title, message ]);
+ },
+
+ /**
+ * Close an activity dialog
+ */
+ activityStop : function() {
+ exec(null, null, 'Notification', 'activityStop', []);
+ },
+
+ /**
+ * Display a progress dialog with progress bar that goes from 0 to 100.
+ *
+ * @param {String}
+ * title Title of the progress dialog.
+ * @param {String}
+ * message Message to display in the dialog.
+ */
+ progressStart : function(title, message) {
+ exec(null, null, 'Notification', 'progressStart', [ title, message ]);
+ },
+
+ /**
+ * Close the progress dialog.
+ */
+ progressStop : function() {
+ exec(null, null, 'Notification', 'progressStop', []);
+ },
+
+ /**
+ * Set the progress dialog value.
+ *
+ * @param {Number}
+ * value 0-100
+ */
+ progressValue : function(value) {
+ exec(null, null, 'Notification', 'progressValue', [ value ]);
+ }
+};
+});
+
+// file: lib/android/plugin/android/polling.js
+define("cordova/plugin/android/polling", function(require, exports, module) {
+var cordova = require('cordova'),
+ period = 50,
+ polling = function() {
+ // Exit if shutting down app
+ if (cordova.shuttingDown) {
+ return;
+ }
+
+ // If polling flag was changed, stop using polling from now on and switch to XHR server / callback
+ if (!cordova.UsePolling) {
+ require('cordova/plugin/android/callback')();
+ return;
+ }
+
+ var msg = prompt("", "gap_poll:");
+ if (msg) {
+ setTimeout(function() {
+ try {
+ var t = eval(""+msg);
+ }
+ catch (e) {
+ console.log("JSCallbackPolling: Message from Server: " + msg);
+ console.log("JSCallbackPolling Error: "+e);
+ }
+ }, 1);
+ setTimeout(polling, 1);
+ }
+ else {
+ setTimeout(polling, period);
+ }
+};
+
+module.exports = polling;
+});
+
+// file: lib/android/plugin/android/storage.js
+define("cordova/plugin/android/storage", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec'),
+ channel = require('cordova/channel');
+
+var queryQueue = {};
+
+/**
+ * SQL result set object
+ * PRIVATE METHOD
+ * @constructor
+ */
+var DroidDB_Rows = function() {
+ this.resultSet = []; // results array
+ this.length = 0; // number of rows
+};
+
+/**
+ * Get item from SQL result set
+ *
+ * @param row The row number to return
+ * @return The row object
+ */
+DroidDB_Rows.prototype.item = function(row) {
+ return this.resultSet[row];
+};
+
+/**
+ * SQL result set that is returned to user.
+ * PRIVATE METHOD
+ * @constructor
+ */
+var DroidDB_Result = function() {
+ this.rows = new DroidDB_Rows();
+};
+
+/**
+ * Callback from native code when query is complete.
+ * PRIVATE METHOD
+ *
+ * @param id Query id
+ */
+function completeQuery(id, data) {
+ var query = queryQueue[id];
+ if (query) {
+ try {
+ delete queryQueue[id];
+
+ // Get transaction
+ var tx = query.tx;
+
+ // If transaction hasn't failed
+ // Note: We ignore all query results if previous query
+ // in the same transaction failed.
+ if (tx && tx.queryList[id]) {
+
+ // Save query results
+ var r = new DroidDB_Result();
+ r.rows.resultSet = data;
+ r.rows.length = data.length;
+ try {
+ if (typeof query.successCallback === 'function') {
+ query.successCallback(query.tx, r);
+ }
+ } catch (ex) {
+ console.log("executeSql error calling user success callback: "+ex);
+ }
+
+ tx.queryComplete(id);
+ }
+ } catch (e) {
+ console.log("executeSql error: "+e);
+ }
+ }
+}
+
+/**
+ * Callback from native code when query fails
+ * PRIVATE METHOD
+ *
+ * @param reason Error message
+ * @param id Query id
+ */
+function failQuery(reason, id) {
+ var query = queryQueue[id];
+ if (query) {
+ try {
+ delete queryQueue[id];
+
+ // Get transaction
+ var tx = query.tx;
+
+ // If transaction hasn't failed
+ // Note: We ignore all query results if previous query
+ // in the same transaction failed.
+ if (tx && tx.queryList[id]) {
+ tx.queryList = {};
+
+ try {
+ if (typeof query.errorCallback === 'function') {
+ query.errorCallback(query.tx, reason);
+ }
+ } catch (ex) {
+ console.log("executeSql error calling user error callback: "+ex);
+ }
+
+ tx.queryFailed(id, reason);
+ }
+
+ } catch (e) {
+ console.log("executeSql error: "+e);
+ }
+ }
+}
+
+/**
+ * SQL query object
+ * PRIVATE METHOD
+ *
+ * @constructor
+ * @param tx The transaction object that this query belongs to
+ */
+var DroidDB_Query = function(tx) {
+
+ // Set the id of the query
+ this.id = utils.createUUID();
+
+ // Add this query to the queue
+ queryQueue[this.id] = this;
+
+ // Init result
+ this.resultSet = [];
+
+ // Set transaction that this query belongs to
+ this.tx = tx;
+
+ // Add this query to transaction list
+ this.tx.queryList[this.id] = this;
+
+ // Callbacks
+ this.successCallback = null;
+ this.errorCallback = null;
+
+};
+
+/**
+ * Transaction object
+ * PRIVATE METHOD
+ * @constructor
+ */
+var DroidDB_Tx = function() {
+
+ // Set the id of the transaction
+ this.id = utils.createUUID();
+
+ // Callbacks
+ this.successCallback = null;
+ this.errorCallback = null;
+
+ // Query list
+ this.queryList = {};
+};
+
+/**
+ * Mark query in transaction as complete.
+ * If all queries are complete, call the user's transaction success callback.
+ *
+ * @param id Query id
+ */
+DroidDB_Tx.prototype.queryComplete = function(id) {
+ delete this.queryList[id];
+
+ // If no more outstanding queries, then fire transaction success
+ if (this.successCallback) {
+ var count = 0;
+ var i;
+ for (i in this.queryList) {
+ if (this.queryList.hasOwnProperty(i)) {
+ count++;
+ }
+ }
+ if (count === 0) {
+ try {
+ this.successCallback();
+ } catch(e) {
+ console.log("Transaction error calling user success callback: " + e);
+ }
+ }
+ }
+};
+
+/**
+ * Mark query in transaction as failed.
+ *
+ * @param id Query id
+ * @param reason Error message
+ */
+DroidDB_Tx.prototype.queryFailed = function(id, reason) {
+
+ // The sql queries in this transaction have already been run, since
+ // we really don't have a real transaction implemented in native code.
+ // However, the user callbacks for the remaining sql queries in transaction
+ // will not be called.
+ this.queryList = {};
+
+ if (this.errorCallback) {
+ try {
+ this.errorCallback(reason);
+ } catch(e) {
+ console.log("Transaction error calling user error callback: " + e);
+ }
+ }
+};
+
+/**
+ * Execute SQL statement
+ *
+ * @param sql SQL statement to execute
+ * @param params Statement parameters
+ * @param successCallback Success callback
+ * @param errorCallback Error callback
+ */
+DroidDB_Tx.prototype.executeSql = function(sql, params, successCallback, errorCallback) {
+
+ // Init params array
+ if (typeof params === 'undefined') {
+ params = [];
+ }
+
+ // Create query and add to queue
+ var query = new DroidDB_Query(this);
+ queryQueue[query.id] = query;
+
+ // Save callbacks
+ query.successCallback = successCallback;
+ query.errorCallback = errorCallback;
+
+ // Call native code
+ exec(null, null, "Storage", "executeSql", [sql, params, query.id]);
+};
+
+var DatabaseShell = function() {
+};
+
+/**
+ * Start a transaction.
+ * Does not support rollback in event of failure.
+ *
+ * @param process {Function} The transaction function
+ * @param successCallback {Function}
+ * @param errorCallback {Function}
+ */
+DatabaseShell.prototype.transaction = function(process, errorCallback, successCallback) {
+ var tx = new DroidDB_Tx();
+ tx.successCallback = successCallback;
+ tx.errorCallback = errorCallback;
+ try {
+ process(tx);
+ } catch (e) {
+ console.log("Transaction error: "+e);
+ if (tx.errorCallback) {
+ try {
+ tx.errorCallback(e);
+ } catch (ex) {
+ console.log("Transaction error calling user error callback: "+e);
+ }
+ }
+ }
+};
+
+/**
+ * Open database
+ *
+ * @param name Database name
+ * @param version Database version
+ * @param display_name Database display name
+ * @param size Database size in bytes
+ * @return Database object
+ */
+var DroidDB_openDatabase = function(name, version, display_name, size) {
+ exec(null, null, "Storage", "openDatabase", [name, version, display_name, size]);
+ var db = new DatabaseShell();
+ return db;
+};
+
+/**
+ * For browsers with no localStorage we emulate it with SQLite. Follows the w3c api.
+ * TODO: Do similar for sessionStorage.
+ * @constructor
+ */
+var CupcakeLocalStorage = function() {
+ channel.waitForInitialization("cupcakeStorage");
+
+ try {
+
+ this.db = openDatabase('localStorage', '1.0', 'localStorage', 2621440);
+ var storage = {};
+ this.length = 0;
+ function setLength (length) {
+ this.length = length;
+ localStorage.length = length;
+ }
+ this.db.transaction(
+ function (transaction) {
+ var i;
+ transaction.executeSql('CREATE TABLE IF NOT EXISTS storage (id NVARCHAR(40) PRIMARY KEY, body NVARCHAR(255))');
+ transaction.executeSql('SELECT * FROM storage', [], function(tx, result) {
+ for(var i = 0; i < result.rows.length; i++) {
+ storage[result.rows.item(i).id] = result.rows.item(i).body;
+ }
+ setLength(result.rows.length);
+ channel.initializationComplete("cupcakeStorage");
+ });
+
+ },
+ function (err) {
+ utils.alert(err.message);
+ }
+ );
+ this.setItem = function(key, val) {
+ if (typeof(storage[key])=='undefined') {
+ this.length++;
+ }
+ storage[key] = val;
+ this.db.transaction(
+ function (transaction) {
+ transaction.executeSql('CREATE TABLE IF NOT EXISTS storage (id NVARCHAR(40) PRIMARY KEY, body NVARCHAR(255))');
+ transaction.executeSql('REPLACE INTO storage (id, body) values(?,?)', [key,val]);
+ }
+ );
+ };
+ this.getItem = function(key) {
+ return storage[key];
+ };
+ this.removeItem = function(key) {
+ delete storage[key];
+ this.length--;
+ this.db.transaction(
+ function (transaction) {
+ transaction.executeSql('CREATE TABLE IF NOT EXISTS storage (id NVARCHAR(40) PRIMARY KEY, body NVARCHAR(255))');
+ transaction.executeSql('DELETE FROM storage where id=?', [key]);
+ }
+ );
+ };
+ this.clear = function() {
+ storage = {};
+ this.length = 0;
+ this.db.transaction(
+ function (transaction) {
+ transaction.executeSql('CREATE TABLE IF NOT EXISTS storage (id NVARCHAR(40) PRIMARY KEY, body NVARCHAR(255))');
+ transaction.executeSql('DELETE FROM storage', []);
+ }
+ );
+ };
+ this.key = function(index) {
+ var i = 0;
+ for (var j in storage) {
+ if (i==index) {
+ return j;
+ } else {
+ i++;
+ }
+ }
+ return null;
+ };
+
+ } catch(e) {
+ utils.alert("Database error "+e+".");
+ return;
+ }
+};
+
+module.exports = {
+ openDatabase:DroidDB_openDatabase,
+ CupcakeLocalStorage:CupcakeLocalStorage,
+ failQuery:failQuery,
+ completeQuery:completeQuery
+};
+
+});
+
+// file: lib/common/plugin/battery.js
+define("cordova/plugin/battery", function(require, exports, module) {
+/**
+ * This class contains information about the current battery status.
+ * @constructor
+ */
+var cordova = require('cordova'),
+ exec = require('cordova/exec');
+
+function handlers() {
+ return battery.channels.batterystatus.numHandlers +
+ battery.channels.batterylow.numHandlers +
+ battery.channels.batterycritical.numHandlers;
+}
+
+var Battery = function() {
+ this._level = null;
+ this._isPlugged = null;
+ // Create new event handlers on the window (returns a channel instance)
+ var subscriptionEvents = {
+ onSubscribe:this.onSubscribe,
+ onUnsubscribe:this.onUnsubscribe
+ };
+ this.channels = {
+ batterystatus:cordova.addWindowEventHandler("batterystatus", subscriptionEvents),
+ batterylow:cordova.addWindowEventHandler("batterylow", subscriptionEvents),
+ batterycritical:cordova.addWindowEventHandler("batterycritical", subscriptionEvents)
+ };
+};
+/**
+ * Event handlers for when callbacks get registered for the battery.
+ * Keep track of how many handlers we have so we can start and stop the native battery listener
+ * appropriately (and hopefully save on battery life!).
+ */
+Battery.prototype.onSubscribe = function() {
+ var me = battery;
+ // If we just registered the first handler, make sure native listener is started.
+ if (handlers() === 1) {
+ exec(me._status, me._error, "Battery", "start", []);
+ }
+};
+
+Battery.prototype.onUnsubscribe = function() {
+ var me = battery;
+
+ // If we just unregistered the last handler, make sure native listener is stopped.
+ if (handlers() === 0) {
+ exec(null, null, "Battery", "stop", []);
+ }
+};
+
+/**
+ * Callback for battery status
+ *
+ * @param {Object} info keys: level, isPlugged
+ */
+Battery.prototype._status = function(info) {
+ if (info) {
+ var me = battery;
+ var level = info.level;
+ if (me._level !== level || me._isPlugged !== info.isPlugged) {
+ // Fire batterystatus event
+ cordova.fireWindowEvent("batterystatus", info);
+
+ // Fire low battery event
+ if (level === 20 || level === 5) {
+ if (level === 20) {
+ cordova.fireWindowEvent("batterylow", info);
+ }
+ else {
+ cordova.fireWindowEvent("batterycritical", info);
+ }
+ }
+ }
+ me._level = level;
+ me._isPlugged = info.isPlugged;
+ }
+};
+
+/**
+ * Error callback for battery start
+ */
+Battery.prototype._error = function(e) {
+ console.log("Error initializing Battery: " + e);
+};
+
+var battery = new Battery();
+
+module.exports = battery;
+});
+
+// file: lib/common/plugin/capture.js
+define("cordova/plugin/capture", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ MediaFile = require('cordova/plugin/MediaFile');
+
+/**
+ * Launches a capture of different types.
+ *
+ * @param (DOMString} type
+ * @param {Function} successCB
+ * @param {Function} errorCB
+ * @param {CaptureVideoOptions} options
+ */
+function _capture(type, successCallback, errorCallback, options) {
+ var win = function(pluginResult) {
+ var mediaFiles = [];
+ var i;
+ for (i = 0; i < pluginResult.length; i++) {
+ var mediaFile = new MediaFile();
+ mediaFile.name = pluginResult[i].name;
+ mediaFile.fullPath = pluginResult[i].fullPath;
+ mediaFile.type = pluginResult[i].type;
+ mediaFile.lastModifiedDate = pluginResult[i].lastModifiedDate;
+ mediaFile.size = pluginResult[i].size;
+ mediaFiles.push(mediaFile);
+ }
+ successCallback(mediaFiles);
+ };
+ exec(win, errorCallback, "Capture", type, [options]);
+}
+/**
+ * The Capture interface exposes an interface to the camera and microphone of the hosting device.
+ */
+function Capture() {
+ this.supportedAudioModes = [];
+ this.supportedImageModes = [];
+ this.supportedVideoModes = [];
+}
+
+/**
+ * Launch audio recorder application for recording audio clip(s).
+ *
+ * @param {Function} successCB
+ * @param {Function} errorCB
+ * @param {CaptureAudioOptions} options
+ */
+Capture.prototype.captureAudio = function(successCallback, errorCallback, options){
+ _capture("captureAudio", successCallback, errorCallback, options);
+};
+
+/**
+ * Launch camera application for taking image(s).
+ *
+ * @param {Function} successCB
+ * @param {Function} errorCB
+ * @param {CaptureImageOptions} options
+ */
+Capture.prototype.captureImage = function(successCallback, errorCallback, options){
+ _capture("captureImage", successCallback, errorCallback, options);
+};
+
+/**
+ * Launch device camera application for recording video(s).
+ *
+ * @param {Function} successCB
+ * @param {Function} errorCB
+ * @param {CaptureVideoOptions} options
+ */
+Capture.prototype.captureVideo = function(successCallback, errorCallback, options){
+ _capture("captureVideo", successCallback, errorCallback, options);
+};
+
+
+module.exports = new Capture();
+
+});
+
+// file: lib/common/plugin/compass.js
+define("cordova/plugin/compass", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ utils = require('cordova/utils'),
+ CompassHeading = require('cordova/plugin/CompassHeading'),
+ CompassError = require('cordova/plugin/CompassError'),
+ timers = {},
+ compass = {
+ /**
+ * Asynchronously acquires the current heading.
+ * @param {Function} successCallback The function to call when the heading
+ * data is available
+ * @param {Function} errorCallback The function to call when there is an error
+ * getting the heading data.
+ * @param {CompassOptions} options The options for getting the heading data (not used).
+ */
+ getCurrentHeading:function(successCallback, errorCallback, options) {
+ // successCallback required
+ if (typeof successCallback !== "function") {
+ console.log("Compass Error: successCallback is not a function");
+ return;
+ }
+
+ // errorCallback optional
+ if (errorCallback && (typeof errorCallback !== "function")) {
+ console.log("Compass Error: errorCallback is not a function");
+ return;
+ }
+
+ var win = function(result) {
+ var ch = new CompassHeading(result.magneticHeading, result.trueHeading, result.headingAccuracy, result.timestamp);
+ successCallback(ch);
+ };
+ var fail = function(code) {
+ var ce = new CompassError(code);
+ errorCallback(ce);
+ };
+
+ // Get heading
+ exec(win, fail, "Compass", "getHeading", [options]);
+ },
+
+ /**
+ * Asynchronously acquires the heading repeatedly at a given interval.
+ * @param {Function} successCallback The function to call each time the heading
+ * data is available
+ * @param {Function} errorCallback The function to call when there is an error
+ * getting the heading data.
+ * @param {HeadingOptions} options The options for getting the heading data
+ * such as timeout and the frequency of the watch. For iOS, filter parameter
+ * specifies to watch via a distance filter rather than time.
+ */
+ watchHeading:function(successCallback, errorCallback, options) {
+ // Default interval (100 msec)
+ var frequency = (options !== undefined && options.frequency !== undefined) ? options.frequency : 100;
+ var filter = (options !== undefined && options.filter !== undefined) ? options.filter : 0;
+
+ // successCallback required
+ if (typeof successCallback !== "function") {
+ console.log("Compass Error: successCallback is not a function");
+ return;
+ }
+
+ // errorCallback optional
+ if (errorCallback && (typeof errorCallback !== "function")) {
+ console.log("Compass Error: errorCallback is not a function");
+ return;
+ }
+
+ var id = utils.createUUID();
+ if (filter > 0) {
+ // is an iOS request for watch by filter, no timer needed
+ timers[id] = "iOS";
+ compass.getCurrentHeading(successCallback, errorCallback, options);
+ } else {
+ // Start watch timer to get headings
+ timers[id] = window.setInterval(function() {
+ compass.getCurrentHeading(successCallback, errorCallback);
+ }, frequency);
+ }
+
+ return id;
+ },
+
+ /**
+ * Clears the specified heading watch.
+ * @param {String} watchId The ID of the watch returned from #watchHeading.
+ */
+ clearWatch:function(id) {
+ // Stop javascript timer & remove from timer list
+ if (id && timers[id]) {
+ if (timers[id] != "iOS") {
+ clearInterval(timers[id]);
+ } else {
+ // is iOS watch by filter so call into device to stop
+ exec(null, null, "Compass", "stopHeading", []);
+ }
+ delete timers[id];
+ }
+ }
+ };
+
+module.exports = compass;
+});
+
+// file: lib/common/plugin/console-via-logger.js
+define("cordova/plugin/console-via-logger", function(require, exports, module) {
+//------------------------------------------------------------------------------
+
+var logger = require("cordova/plugin/logger");
+var utils = require("cordova/utils");
+
+//------------------------------------------------------------------------------
+// object that we're exporting
+//------------------------------------------------------------------------------
+var console = module.exports;
+
+//------------------------------------------------------------------------------
+// copy of the original console object
+//------------------------------------------------------------------------------
+var WinConsole = window.console;
+
+//------------------------------------------------------------------------------
+// whether to use the logger
+//------------------------------------------------------------------------------
+var UseLogger = false;
+
+//------------------------------------------------------------------------------
+// Timers
+//------------------------------------------------------------------------------
+var Timers = {};
+
+//------------------------------------------------------------------------------
+// used for unimplemented methods
+//------------------------------------------------------------------------------
+function noop() {}
+
+//------------------------------------------------------------------------------
+// used for unimplemented methods
+//------------------------------------------------------------------------------
+console.useLogger = function (value) {
+ if (arguments.length) UseLogger = !!value;
+
+ if (UseLogger) {
+ if (logger.useConsole()) {
+ throw new Error("console and logger are too intertwingly");
+ }
+ }
+
+ return UseLogger;
+};
+
+//------------------------------------------------------------------------------
+console.log = function() {
+ if (logger.useConsole()) return;
+ logger.log.apply(logger, [].slice.call(arguments));
+};
+
+//------------------------------------------------------------------------------
+console.error = function() {
+ if (logger.useConsole()) return;
+ logger.error.apply(logger, [].slice.call(arguments));
+};
+
+//------------------------------------------------------------------------------
+console.warn = function() {
+ if (logger.useConsole()) return;
+ logger.warn.apply(logger, [].slice.call(arguments));
+};
+
+//------------------------------------------------------------------------------
+console.info = function() {
+ if (logger.useConsole()) return;
+ logger.info.apply(logger, [].slice.call(arguments));
+};
+
+//------------------------------------------------------------------------------
+console.debug = function() {
+ if (logger.useConsole()) return;
+ logger.debug.apply(logger, [].slice.call(arguments));
+};
+
+//------------------------------------------------------------------------------
+console.assert = function(expression) {
+ if (expression) return;
+
+ var message = utils.vformat(arguments[1], [].slice.call(arguments, 2));
+ console.log("ASSERT: " + message);
+};
+
+//------------------------------------------------------------------------------
+console.clear = function() {};
+
+//------------------------------------------------------------------------------
+console.dir = function(object) {
+ console.log("%o", object);
+};
+
+//------------------------------------------------------------------------------
+console.dirxml = function(node) {
+ console.log(node.innerHTML);
+};
+
+//------------------------------------------------------------------------------
+console.trace = noop;
+
+//------------------------------------------------------------------------------
+console.group = console.log;
+
+//------------------------------------------------------------------------------
+console.groupCollapsed = console.log;
+
+//------------------------------------------------------------------------------
+console.groupEnd = noop;
+
+//------------------------------------------------------------------------------
+console.time = function(name) {
+ Timers[name] = new Date().valueOf();
+};
+
+//------------------------------------------------------------------------------
+console.timeEnd = function(name) {
+ var timeStart = Timers[name];
+ if (!timeStart) {
+ console.warn("unknown timer: " + name);
+ return;
+ }
+
+ var timeElapsed = new Date().valueOf() - timeStart;
+ console.log(name + ": " + timeElapsed + "ms");
+};
+
+//------------------------------------------------------------------------------
+console.timeStamp = noop;
+
+//------------------------------------------------------------------------------
+console.profile = noop;
+
+//------------------------------------------------------------------------------
+console.profileEnd = noop;
+
+//------------------------------------------------------------------------------
+console.count = noop;
+
+//------------------------------------------------------------------------------
+console.exception = console.log;
+
+//------------------------------------------------------------------------------
+console.table = function(data, columns) {
+ console.log("%o", data);
+};
+
+//------------------------------------------------------------------------------
+// return a new function that calls both functions passed as args
+//------------------------------------------------------------------------------
+function wrapperedOrigCall(orgFunc, newFunc) {
+ return function() {
+ var args = [].slice.call(arguments);
+ try { orgFunc.apply(WinConsole, args); } catch (e) {}
+ try { newFunc.apply(console, args); } catch (e) {}
+ };
+}
+
+//------------------------------------------------------------------------------
+// For every function that exists in the original console object, that
+// also exists in the new console object, wrap the new console method
+// with one that calls both
+//------------------------------------------------------------------------------
+for (var key in console) {
+ if (typeof WinConsole[key] == "function") {
+ console[key] = wrapperedOrigCall(WinConsole[key], console[key]);
+ }
+}
+
+});
+
+// file: lib/common/plugin/contacts.js
+define("cordova/plugin/contacts", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ ContactError = require('cordova/plugin/ContactError'),
+ utils = require('cordova/utils'),
+ Contact = require('cordova/plugin/Contact');
+
+/**
+* Represents a group of Contacts.
+* @constructor
+*/
+var contacts = {
+ /**
+ * Returns an array of Contacts matching the search criteria.
+ * @param fields that should be searched
+ * @param successCB success callback
+ * @param errorCB error callback
+ * @param {ContactFindOptions} options that can be applied to contact searching
+ * @return array of Contacts matching search criteria
+ */
+ find:function(fields, successCB, errorCB, options) {
+ if (!successCB) {
+ throw new TypeError("You must specify a success callback for the find command.");
+ }
+ if (!fields || (utils.isArray(fields) && fields.length === 0)) {
+ if (typeof errorCB === "function") {
+ errorCB(new ContactError(ContactError.INVALID_ARGUMENT_ERROR));
+ }
+ } else {
+ var win = function(result) {
+ var cs = [];
+ for (var i = 0, l = result.length; i < l; i++) {
+ cs.push(contacts.create(result[i]));
+ }
+ successCB(cs);
+ };
+ exec(win, errorCB, "Contacts", "search", [fields, options]);
+ }
+ },
+
+ /**
+ * This function creates a new contact, but it does not persist the contact
+ * to device storage. To persist the contact to device storage, invoke
+ * contact.save().
+ * @param properties an object who's properties will be examined to create a new Contact
+ * @returns new Contact object
+ */
+ create:function(properties) {
+ var i;
+ var contact = new Contact();
+ for (i in properties) {
+ if (typeof contact[i] !== 'undefined' && properties.hasOwnProperty(i)) {
+ contact[i] = properties[i];
+ }
+ }
+ return contact;
+ }
+};
+
+module.exports = contacts;
+
+});
+
+// file: lib/common/plugin/geolocation.js
+define("cordova/plugin/geolocation", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec'),
+ PositionError = require('cordova/plugin/PositionError'),
+ Position = require('cordova/plugin/Position');
+
+var timers = {}; // list of timers in use
+
+// Returns default params, overrides if provided with values
+function parseParameters(options) {
+ var opt = {
+ maximumAge: 0,
+ enableHighAccuracy: false,
+ timeout: Infinity
+ };
+
+ if (options) {
+ if (options.maximumAge !== undefined && !isNaN(options.maximumAge) && options.maximumAge > 0) {
+ opt.maximumAge = options.maximumAge;
+ }
+ if (options.enableHighAccuracy !== undefined) {
+ opt.enableHighAccuracy = options.enableHighAccuracy;
+ }
+ if (options.timeout !== undefined && !isNaN(options.timeout)) {
+ if (options.timeout < 0) {
+ opt.timeout = 0;
+ } else {
+ opt.timeout = options.timeout;
+ }
+ }
+ }
+
+ return opt;
+}
+
+// Returns a timeout failure, closed over a specified timeout value and error callback.
+function createTimeout(errorCallback, timeout) {
+ var t = setTimeout(function() {
+ clearTimeout(t);
+ t = null;
+ errorCallback({
+ code:PositionError.TIMEOUT,
+ message:"Position retrieval timed out."
+ });
+ }, timeout);
+ return t;
+}
+
+var geolocation = {
+ lastPosition:null, // reference to last known (cached) position returned
+ /**
+ * Asynchronously aquires the current position.
+ *
+ * @param {Function} successCallback The function to call when the position data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the heading position. (OPTIONAL)
+ * @param {PositionOptions} options The options for getting the position data. (OPTIONAL)
+ */
+ getCurrentPosition:function(successCallback, errorCallback, options) {
+ if (arguments.length === 0) {
+ throw new Error("getCurrentPosition must be called with at least one argument.");
+ }
+ options = parseParameters(options);
+
+ // Timer var that will fire an error callback if no position is retrieved from native
+ // before the "timeout" param provided expires
+ var timeoutTimer = null;
+
+ var win = function(p) {
+ clearTimeout(timeoutTimer);
+ if (!timeoutTimer) {
+ // Timeout already happened, or native fired error callback for
+ // this geo request.
+ // Don't continue with success callback.
+ return;
+ }
+ var pos = new Position(
+ {
+ latitude:p.latitude,
+ longitude:p.longitude,
+ altitude:p.altitude,
+ accuracy:p.accuracy,
+ heading:p.heading,
+ velocity:p.velocity,
+ altitudeAccuracy:p.altitudeAccuracy
+ },
+ (p.timestamp === undefined ? new Date() : ((p.timestamp instanceof Date) ? p.timestamp : new Date(p.timestamp)))
+ );
+ geolocation.lastPosition = pos;
+ successCallback(pos);
+ };
+ var fail = function(e) {
+ clearTimeout(timeoutTimer);
+ timeoutTimer = null;
+ var err = new PositionError(e.code, e.message);
+ if (errorCallback) {
+ errorCallback(err);
+ }
+ };
+
+ // Check our cached position, if its timestamp difference with current time is less than the maximumAge, then just
+ // fire the success callback with the cached position.
+ if (geolocation.lastPosition && options.maximumAge && (((new Date()).getTime() - geolocation.lastPosition.timestamp.getTime()) <= options.maximumAge)) {
+ successCallback(geolocation.lastPosition);
+ // If the cached position check failed and the timeout was set to 0, error out with a TIMEOUT error object.
+ } else if (options.timeout === 0) {
+ fail({
+ code:PositionError.TIMEOUT,
+ message:"timeout value in PositionOptions set to 0 and no cached Position object available, or cached Position object's age exceed's provided PositionOptions' maximumAge parameter."
+ });
+ // Otherwise we have to call into native to retrieve a position.
+ } else {
+ if (options.timeout !== Infinity) {
+ // If the timeout value was not set to Infinity (default), then
+ // set up a timeout function that will fire the error callback
+ // if no successful position was retrieved before timeout expired.
+ timeoutTimer = createTimeout(fail, options.timeout);
+ } else {
+ // This is here so the check in the win function doesn't mess stuff up
+ // may seem weird but this guarantees timeoutTimer is
+ // always truthy before we call into native
+ timeoutTimer = true;
+ }
+ exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.maximumAge]);
+ }
+ return timeoutTimer;
+ },
+ /**
+ * Asynchronously watches the geolocation for changes to geolocation. When a change occurs,
+ * the successCallback is called with the new location.
+ *
+ * @param {Function} successCallback The function to call each time the location data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the location data. (OPTIONAL)
+ * @param {PositionOptions} options The options for getting the location data such as frequency. (OPTIONAL)
+ * @return String The watch id that must be passed to #clearWatch to stop watching.
+ */
+ watchPosition:function(successCallback, errorCallback, options) {
+ if (arguments.length === 0) {
+ throw new Error("watchPosition must be called with at least one argument.");
+ }
+ options = parseParameters(options);
+
+ var id = utils.createUUID();
+
+ // Tell device to get a position ASAP, and also retrieve a reference to the timeout timer generated in getCurrentPosition
+ timers[id] = geolocation.getCurrentPosition(successCallback, errorCallback, options);
+
+ var fail = function(e) {
+ clearTimeout(timers[id]);
+ var err = new PositionError(e.code, e.message);
+ if (errorCallback) {
+ errorCallback(err);
+ }
+ };
+
+ var win = function(p) {
+ clearTimeout(timers[id]);
+ if (options.timeout !== Infinity) {
+ timers[id] = createTimeout(fail, options.timeout);
+ }
+ var pos = new Position(
+ {
+ latitude:p.latitude,
+ longitude:p.longitude,
+ altitude:p.altitude,
+ accuracy:p.accuracy,
+ heading:p.heading,
+ velocity:p.velocity,
+ altitudeAccuracy:p.altitudeAccuracy
+ },
+ (p.timestamp === undefined ? new Date() : ((p.timestamp instanceof Date) ? p.timestamp : new Date(p.timestamp)))
+ );
+ geolocation.lastPosition = pos;
+ successCallback(pos);
+ };
+
+ exec(win, fail, "Geolocation", "addWatch", [id, options.enableHighAccuracy]);
+
+ return id;
+ },
+ /**
+ * Clears the specified heading watch.
+ *
+ * @param {String} id The ID of the watch returned from #watchPosition
+ */
+ clearWatch:function(id) {
+ if (id && timers[id] !== undefined) {
+ clearTimeout(timers[id]);
+ delete timers[id];
+ exec(null, null, "Geolocation", "clearWatch", [id]);
+ }
+ }
+};
+
+module.exports = geolocation;
+
+});
+
+// file: lib/common/plugin/logger.js
+define("cordova/plugin/logger", function(require, exports, module) {
+//------------------------------------------------------------------------------
+// The logger module exports the following properties/functions:
+//
+// LOG - constant for the level LOG
+// ERROR - constant for the level ERROR
+// WARN - constant for the level WARN
+// INFO - constant for the level INFO
+// DEBUG - constant for the level DEBUG
+// logLevel() - returns current log level
+// logLevel(value) - sets and returns a new log level
+// useConsole() - returns whether logger is using console
+// useConsole(value) - sets and returns whether logger is using console
+// log(message,...) - logs a message at level LOG
+// error(message,...) - logs a message at level ERROR
+// warn(message,...) - logs a message at level WARN
+// info(message,...) - logs a message at level INFO
+// debug(message,...) - logs a message at level DEBUG
+// logLevel(level,message,...) - logs a message specified level
+//
+//------------------------------------------------------------------------------
+
+var logger = exports;
+
+var exec = require('cordova/exec');
+var utils = require('cordova/utils');
+
+var UseConsole = true;
+var Queued = [];
+var DeviceReady = false;
+var CurrentLevel;
+
+/**
+ * Logging levels
+ */
+
+var Levels = [
+ "LOG",
+ "ERROR",
+ "WARN",
+ "INFO",
+ "DEBUG"
+];
+
+/*
+ * add the logging levels to the logger object and
+ * to a separate levelsMap object for testing
+ */
+
+var LevelsMap = {};
+for (var i=0; i<Levels.length; i++) {
+ var level = Levels[i];
+ LevelsMap[level] = i;
+ logger[level] = level;
+}
+
+CurrentLevel = LevelsMap.WARN;
+
+/**
+ * Getter/Setter for the logging level
+ *
+ * Returns the current logging level.
+ *
+ * When a value is passed, sets the logging level to that value.
+ * The values should be one of the following constants:
+ * logger.LOG
+ * logger.ERROR
+ * logger.WARN
+ * logger.INFO
+ * logger.DEBUG
+ *
+ * The value used determines which messages get printed. The logging
+ * values above are in order, and only messages logged at the logging
+ * level or above will actually be displayed to the user. Eg, the
+ * default level is WARN, so only messages logged with LOG, ERROR, or
+ * WARN will be displayed; INFO and DEBUG messages will be ignored.
+ */
+logger.level = function (value) {
+ if (arguments.length) {
+ if (LevelsMap[value] === null) {
+ throw new Error("invalid logging level: " + value);
+ }
+ CurrentLevel = LevelsMap[value];
+ }
+
+ return Levels[CurrentLevel];
+};
+
+/**
+ * Getter/Setter for the useConsole functionality
+ *
+ * When useConsole is true, the logger will log via the
+ * browser 'console' object. Otherwise, it will use the
+ * native Logger plugin.
+ */
+logger.useConsole = function (value) {
+ if (arguments.length) UseConsole = !!value;
+
+ if (UseConsole) {
+ if (typeof console == "undefined") {
+ throw new Error("global console object is not defined");
+ }
+
+ if (typeof console.log != "function") {
+ throw new Error("global console object does not have a log function");
+ }
+
+ if (typeof console.useLogger == "function") {
+ if (console.useLogger()) {
+ throw new Error("console and logger are too intertwingly");
+ }
+ }
+ }
+
+ return UseConsole;
+};
+
+/**
+ * Logs a message at the LOG level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.log = function(message) { logWithArgs("LOG", arguments); };
+
+/**
+ * Logs a message at the ERROR level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.error = function(message) { logWithArgs("ERROR", arguments); };
+
+/**
+ * Logs a message at the WARN level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.warn = function(message) { logWithArgs("WARN", arguments); };
+
+/**
+ * Logs a message at the INFO level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.info = function(message) { logWithArgs("INFO", arguments); };
+
+/**
+ * Logs a message at the DEBUG level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.debug = function(message) { logWithArgs("DEBUG", arguments); };
+
+// log at the specified level with args
+function logWithArgs(level, args) {
+ args = [level].concat([].slice.call(args));
+ logger.logLevel.apply(logger, args);
+}
+
+/**
+ * Logs a message at the specified level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.logLevel = function(level, message /* , ... */) {
+ // format the message with the parameters
+ var formatArgs = [].slice.call(arguments, 2);
+ message = utils.vformat(message, formatArgs);
+
+ if (LevelsMap[level] === null) {
+ throw new Error("invalid logging level: " + level);
+ }
+
+ if (LevelsMap[level] > CurrentLevel) return;
+
+ // queue the message if not yet at deviceready
+ if (!DeviceReady && !UseConsole) {
+ Queued.push([level, message]);
+ return;
+ }
+
+ // if not using the console, use the native logger
+ if (!UseConsole) {
+ exec(null, null, "Logger", "logLevel", [level, message]);
+ return;
+ }
+
+ // make sure console is not using logger
+ if (console.__usingCordovaLogger) {
+ throw new Error("console and logger are too intertwingly");
+ }
+
+ // log to the console
+ switch (level) {
+ case logger.LOG: console.log(message); break;
+ case logger.ERROR: console.log("ERROR: " + message); break;
+ case logger.WARN: console.log("WARN: " + message); break;
+ case logger.INFO: console.log("INFO: " + message); break;
+ case logger.DEBUG: console.log("DEBUG: " + message); break;
+ }
+};
+
+// when deviceready fires, log queued messages
+logger.__onDeviceReady = function() {
+ if (DeviceReady) return;
+
+ DeviceReady = true;
+
+ for (var i=0; i<Queued.length; i++) {
+ var messageArgs = Queued[i];
+ logger.logLevel(messageArgs[0], messageArgs[1]);
+ }
+
+ Queued = null;
+};
+
+// add a deviceready event to log queued messages
+document.addEventListener("deviceready", logger.__onDeviceReady, false);
+
+});
+
+// file: lib/common/plugin/network.js
+define("cordova/plugin/network", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ cordova = require('cordova'),
+ channel = require('cordova/channel');
+
+var NetworkConnection = function () {
+ this.type = null;
+ this._firstRun = true;
+ this._timer = null;
+ this.timeout = 500;
+
+ var me = this;
+
+ channel.onCordovaReady.subscribeOnce(function() {
+ me.getInfo(function (info) {
+ me.type = info;
+ if (info === "none") {
+ // set a timer if still offline at the end of timer send the offline event
+ me._timer = setTimeout(function(){
+ cordova.fireDocumentEvent("offline");
+ me._timer = null;
+ }, me.timeout);
+ } else {
+ // If there is a current offline event pending clear it
+ if (me._timer !== null) {
+ clearTimeout(me._timer);
+ me._timer = null;
+ }
+ cordova.fireDocumentEvent("online");
+ }
+
+ // should only fire this once
+ if (me._firstRun) {
+ me._firstRun = false;
+ channel.onCordovaConnectionReady.fire();
+ }
+ },
+ function (e) {
+ // If we can't get the network info we should still tell Cordova
+ // to fire the deviceready event.
+ if (me._firstRun) {
+ me._firstRun = false;
+ channel.onCordovaConnectionReady.fire();
+ }
+ console.log("Error initializing Network Connection: " + e);
+ });
+ });
+};
+
+/**
+ * Get connection info
+ *
+ * @param {Function} successCallback The function to call when the Connection data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the Connection data. (OPTIONAL)
+ */
+NetworkConnection.prototype.getInfo = function (successCallback, errorCallback) {
+ // Get info
+ exec(successCallback, errorCallback, "NetworkStatus", "getConnectionInfo", []);
+};
+
+module.exports = new NetworkConnection();
+});
+
+// file: lib/common/plugin/notification.js
+define("cordova/plugin/notification", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * Provides access to notifications on the device.
+ */
+
+module.exports = {
+
+ /**
+ * Open a native alert dialog, with a customizable title and button text.
+ *
+ * @param {String} message Message to print in the body of the alert
+ * @param {Function} completeCallback The callback that is called when user clicks on a button.
+ * @param {String} title Title of the alert dialog (default: Alert)
+ * @param {String} buttonLabel Label of the close button (default: OK)
+ */
+ alert: function(message, completeCallback, title, buttonLabel) {
+ var _title = (title || "Alert");
+ var _buttonLabel = (buttonLabel || "OK");
+ exec(completeCallback, null, "Notification", "alert", [message, _title, _buttonLabel]);
+ },
+
+ /**
+ * Open a native confirm dialog, with a customizable title and button text.
+ * The result that the user selects is returned to the result callback.
+ *
+ * @param {String} message Message to print in the body of the alert
+ * @param {Function} resultCallback The callback that is called when user clicks on a button.
+ * @param {String} title Title of the alert dialog (default: Confirm)
+ * @param {String} buttonLabels Comma separated list of the labels of the buttons (default: 'OK,Cancel')
+ */
+ confirm: function(message, resultCallback, title, buttonLabels) {
+ var _title = (title || "Confirm");
+ var _buttonLabels = (buttonLabels || "OK,Cancel");
+ exec(resultCallback, null, "Notification", "confirm", [message, _title, _buttonLabels]);
+ },
+
+ /**
+ * Causes the device to vibrate.
+ *
+ * @param {Integer} mills The number of milliseconds to vibrate for.
+ */
+ vibrate: function(mills) {
+ exec(null, null, "Notification", "vibrate", [mills]);
+ },
+
+ /**
+ * Causes the device to beep.
+ * On Android, the default notification ringtone is played "count" times.
+ *
+ * @param {Integer} count The number of beeps.
+ */
+ beep: function(count) {
+ exec(null, null, "Notification", "beep", [count]);
+ }
+};
+});
+
+// file: lib/common/plugin/requestFileSystem.js
+define("cordova/plugin/requestFileSystem", function(require, exports, module) {
+var FileError = require('cordova/plugin/FileError'),
+ FileSystem = require('cordova/plugin/FileSystem'),
+ exec = require('cordova/exec');
+
+/**
+ * Request a file system in which to store application data.
+ * @param type local file system type
+ * @param size indicates how much storage space, in bytes, the application expects to need
+ * @param successCallback invoked with a FileSystem object
+ * @param errorCallback invoked if error occurs retrieving file system
+ */
+var requestFileSystem = function(type, size, successCallback, errorCallback) {
+ var fail = function(code) {
+ if (typeof errorCallback === 'function') {
+ errorCallback(new FileError(code));
+ }
+ };
+
+ if (type < 0 || type > 3) {
+ fail(FileError.SYNTAX_ERR);
+ } else {
+ // if successful, return a FileSystem object
+ var success = function(file_system) {
+ if (file_system) {
+ if (typeof successCallback === 'function') {
+ // grab the name and root from the file system object
+ var result = new FileSystem(file_system.name, file_system.root);
+ successCallback(result);
+ }
+ }
+ else {
+ // no FileSystem object returned
+ fail(FileError.NOT_FOUND_ERR);
+ }
+ };
+ exec(success, fail, "File", "requestFileSystem", [type, size]);
+ }
+};
+
+module.exports = requestFileSystem;
+});
+
+// file: lib/common/plugin/resolveLocalFileSystemURI.js
+define("cordova/plugin/resolveLocalFileSystemURI", function(require, exports, module) {
+var DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
+ FileEntry = require('cordova/plugin/FileEntry'),
+ FileError = require('cordova/plugin/FileError'),
+ exec = require('cordova/exec');
+
+/**
+ * Look up file system Entry referred to by local URI.
+ * @param {DOMString} uri URI referring to a local file or directory
+ * @param successCallback invoked with Entry object corresponding to URI
+ * @param errorCallback invoked if error occurs retrieving file system entry
+ */
+module.exports = function(uri, successCallback, errorCallback) {
+ // error callback
+ var fail = function(error) {
+ if (typeof errorCallback === 'function') {
+ errorCallback(new FileError(error));
+ }
+ };
+ // sanity check for 'not:valid:filename'
+ if(!uri || uri.split(":").length > 2) {
+ setTimeout( function() {
+ fail(FileError.ENCODING_ERR);
+ },0);
+ return;
+ }
+ // if successful, return either a file or directory entry
+ var success = function(entry) {
+ var result;
+ if (entry) {
+ if (typeof successCallback === 'function') {
+ // create appropriate Entry object
+ result = (entry.isDirectory) ? new DirectoryEntry(entry.name, entry.fullPath) : new FileEntry(entry.name, entry.fullPath);
+ try {
+ successCallback(result);
+ }
+ catch (e) {
+ console.log('Error invoking callback: ' + e);
+ }
+ }
+ }
+ else {
+ // no Entry object returned
+ fail(FileError.NOT_FOUND_ERR);
+ }
+ };
+
+ exec(success, fail, "File", "resolveLocalFileSystemURI", [uri]);
+};
+
+});
+
+// file: lib/common/plugin/splashscreen.js
+define("cordova/plugin/splashscreen", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+var splashscreen = {
+ hide:function() {
+ exec(null, null, "SplashScreen", "hide", []);
+ }
+};
+
+module.exports = splashscreen;
+});
+
+// file: lib/common/utils.js
+define("cordova/utils", function(require, exports, module) {
+var utils = exports;
+
+/**
+ * Returns an indication of whether the argument is an array or not
+ */
+utils.isArray = function(a) {
+ return Object.prototype.toString.call(a) == '[object Array]';
+};
+
+/**
+ * Returns an indication of whether the argument is a Date or not
+ */
+utils.isDate = function(d) {
+ return Object.prototype.toString.call(d) == '[object Date]';
+};
+
+/**
+ * Does a deep clone of the object.
+ */
+utils.clone = function(obj) {
+ if(!obj || typeof obj == 'function' || utils.isDate(obj) || typeof obj != 'object') {
+ return obj;
+ }
+
+ var retVal, i;
+
+ if(utils.isArray(obj)){
+ retVal = [];
+ for(i = 0; i < obj.length; ++i){
+ retVal.push(utils.clone(obj[i]));
+ }
+ return retVal;
+ }
+
+ retVal = {};
+ for(i in obj){
+ if(!(i in retVal) || retVal[i] != obj[i]) {
+ retVal[i] = utils.clone(obj[i]);
+ }
+ }
+ return retVal;
+};
+
+/**
+ * Returns a wrappered version of the function
+ */
+utils.close = function(context, func, params) {
+ if (typeof params == 'undefined') {
+ return function() {
+ return func.apply(context, arguments);
+ };
+ } else {
+ return function() {
+ return func.apply(context, params);
+ };
+ }
+};
+
+/**
+ * Create a UUID
+ */
+utils.createUUID = function() {
+ return UUIDcreatePart(4) + '-' +
+ UUIDcreatePart(2) + '-' +
+ UUIDcreatePart(2) + '-' +
+ UUIDcreatePart(2) + '-' +
+ UUIDcreatePart(6);
+};
+
+/**
+ * Extends a child object from a parent object using classical inheritance
+ * pattern.
+ */
+utils.extend = (function() {
+ // proxy used to establish prototype chain
+ var F = function() {};
+ // extend Child from Parent
+ return function(Child, Parent) {
+ F.prototype = Parent.prototype;
+ Child.prototype = new F();
+ Child.__super__ = Parent.prototype;
+ Child.prototype.constructor = Child;
+ };
+}());
+
+/**
+ * Alerts a message in any available way: alert or console.log.
+ */
+utils.alert = function(msg) {
+ if (alert) {
+ alert(msg);
+ } else if (console && console.log) {
+ console.log(msg);
+ }
+};
+
+/**
+ * Formats a string and arguments following it ala sprintf()
+ *
+ * see utils.vformat() for more information
+ */
+utils.format = function(formatString /* ,... */) {
+ var args = [].slice.call(arguments, 1);
+ return utils.vformat(formatString, args);
+};
+
+/**
+ * Formats a string and arguments following it ala vsprintf()
+ *
+ * format chars:
+ * %j - format arg as JSON
+ * %o - format arg as JSON
+ * %c - format arg as ''
+ * %% - replace with '%'
+ * any other char following % will format it's
+ * arg via toString().
+ *
+ * for rationale, see FireBug's Console API:
+ * http://getfirebug.com/wiki/index.php/Console_API
+ */
+utils.vformat = function(formatString, args) {
+ if (formatString === null || formatString === undefined) return "";
+ if (arguments.length == 1) return formatString.toString();
+ if (typeof formatString != "string") return formatString.toString();
+
+ var pattern = /(.*?)%(.)(.*)/;
+ var rest = formatString;
+ var result = [];
+
+ while (args.length) {
+ var arg = args.shift();
+ var match = pattern.exec(rest);
+
+ if (!match) break;
+
+ rest = match[3];
+
+ result.push(match[1]);
+
+ if (match[2] == '%') {
+ result.push('%');
+ args.unshift(arg);
+ continue;
+ }
+
+ result.push(formatted(arg, match[2]));
+ }
+
+ result.push(rest);
+
+ return result.join('');
+};
+
+//------------------------------------------------------------------------------
+function UUIDcreatePart(length) {
+ var uuidpart = "";
+ for (var i=0; i<length; i++) {
+ var uuidchar = parseInt((Math.random() * 256), 10).toString(16);
+ if (uuidchar.length == 1) {
+ uuidchar = "0" + uuidchar;
+ }
+ uuidpart += uuidchar;
+ }
+ return uuidpart;
+}
+
+//------------------------------------------------------------------------------
+function formatted(object, formatChar) {
+
+ try {
+ switch(formatChar) {
+ case 'j':
+ case 'o': return JSON.stringify(object);
+ case 'c': return '';
+ }
+ }
+ catch (e) {
+ return "error JSON.stringify()ing argument: " + e;
+ }
+
+ if ((object === null) || (object === undefined)) {
+ return Object.prototype.toString.call(object);
+ }
+
+ return object.toString();
+}
+
+});
+
+
+window.cordova = require('cordova');
+
+// file: lib/scripts/bootstrap.js
+(function (context) {
+ var channel = require("cordova/channel"),
+ _self = {
+ boot: function () {
+ /**
+ * Create all cordova objects once page has fully loaded and native side is ready.
+ */
+ channel.join(function() {
+ var builder = require('cordova/builder'),
+ base = require('cordova/common'),
+ platform = require('cordova/platform');
+
+ // Drop the common globals into the window object, but be nice and don't overwrite anything.
+ builder.build(base.objects).intoButDontClobber(window);
+
+ // Drop the platform-specific globals into the window object
+ // and clobber any existing object.
+ builder.build(platform.objects).intoAndClobber(window);
+
+ // Merge the platform-specific overrides/enhancements into
+ // the window object.
+ if (typeof platform.merges !== 'undefined') {
+ builder.build(platform.merges).intoAndMerge(window);
+ }
+
+ // Call the platform-specific initialization
+ platform.initialize();
+
+ // Fire event to notify that all objects are created
+ channel.onCordovaReady.fire();
+
+ // Fire onDeviceReady event once all constructors have run and
+ // cordova info has been received from native side.
+ channel.join(function() {
+ require('cordova').fireDocumentEvent('deviceready');
+ }, channel.deviceReadyChannelsArray);
+
+ }, [ channel.onDOMContentLoaded, channel.onNativeReady ]);
+ }
+ };
+
+ // boot up once native side is ready
+ channel.onNativeReady.subscribeOnce(_self.boot);
+
+ // _nativeReady is global variable that the native side can set
+ // to signify that the native code is ready. It is a global since
+ // it may be called before any cordova JS is ready.
+ if (window._nativeReady) {
+ channel.onNativeReady.fire();
+ }
+
+}(window));
+
+
+})(); \ No newline at end of file
diff --git a/phonegap/iPhone/FixMyStreet.xcodeproj/project.pbxproj b/phonegap/iPhone/FixMyStreet.xcodeproj/project.pbxproj
new file mode 100644
index 000000000..9dea27891
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet.xcodeproj/project.pbxproj
@@ -0,0 +1,557 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 24D3BF4C1508D60F005923FE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF4B1508D60F005923FE /* Foundation.framework */; };
+ 24D3BF4E1508D60F005923FE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF4D1508D60F005923FE /* UIKit.framework */; };
+ 24D3BF501508D60F005923FE /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF4F1508D60F005923FE /* CoreGraphics.framework */; };
+ 24D3BF521508D60F005923FE /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF511508D60F005923FE /* AddressBook.framework */; };
+ 24D3BF541508D60F005923FE /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF531508D60F005923FE /* AddressBookUI.framework */; };
+ 24D3BF561508D60F005923FE /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF551508D60F005923FE /* AudioToolbox.framework */; };
+ 24D3BF581508D60F005923FE /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF571508D60F005923FE /* AVFoundation.framework */; };
+ 24D3BF5A1508D60F005923FE /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF591508D60F005923FE /* CoreLocation.framework */; };
+ 24D3BF5C1508D60F005923FE /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF5B1508D60F005923FE /* MediaPlayer.framework */; };
+ 24D3BF5E1508D60F005923FE /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF5D1508D60F005923FE /* QuartzCore.framework */; };
+ 24D3BF601508D60F005923FE /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF5F1508D60F005923FE /* SystemConfiguration.framework */; };
+ 24D3BF621508D60F005923FE /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF611508D60F005923FE /* MobileCoreServices.framework */; };
+ 24D3BF641508D60F005923FE /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF631508D60F005923FE /* CoreMedia.framework */; };
+ 24D3BF6A1508D60F005923FE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF681508D60F005923FE /* InfoPlist.strings */; };
+ 24D3BF6C1508D60F005923FE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 24D3BF6B1508D60F005923FE /* main.m */; };
+ 24D3BF6F1508D60F005923FE /* Cordova.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF6E1508D60F005923FE /* Cordova.framework */; };
+ 24D3BF741508D60F005923FE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF721508D60F005923FE /* Localizable.strings */; };
+ 24D3BF781508D60F005923FE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF761508D60F005923FE /* Localizable.strings */; };
+ 24D3BF7C1508D60F005923FE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF7A1508D60F005923FE /* Localizable.strings */; };
+ 24D3BF801508D60F005923FE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF7E1508D60F005923FE /* Localizable.strings */; };
+ 24D3BF831508D60F005923FE /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF821508D60F005923FE /* icon.png */; };
+ 24D3BF851508D60F005923FE /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF841508D60F005923FE /* icon@2x.png */; };
+ 24D3BF871508D60F005923FE /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF861508D60F005923FE /* icon-72.png */; };
+ 24D3BF8A1508D60F005923FE /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF891508D60F005923FE /* Default.png */; };
+ 24D3BF8C1508D60F005923FE /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF8B1508D60F005923FE /* Default@2x.png */; };
+ 24D3BF8E1508D60F005923FE /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF8D1508D60F005923FE /* Capture.bundle */; };
+ 24D3BF901508D60F005923FE /* Cordova.plist in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF8F1508D60F005923FE /* Cordova.plist */; };
+ 24D3BF941508D60F005923FE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 24D3BF931508D60F005923FE /* AppDelegate.m */; };
+ 24D3BF971508D60F005923FE /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24D3BF961508D60F005923FE /* MainViewController.m */; };
+ 24D3BF991508D60F005923FE /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF981508D60F005923FE /* MainViewController.xib */; };
+ 24D3BF9D1508D60F005923FE /* verify.sh in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF9C1508D60F005923FE /* verify.sh */; };
+ 24E16541150E0F9600F31308 /* www in Resources */ = {isa = PBXBuildFile; fileRef = 24E16540150E0F9600F31308 /* www */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 24D3BF471508D60F005923FE /* FixMyStreet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FixMyStreet.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 24D3BF4B1508D60F005923FE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 24D3BF4D1508D60F005923FE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 24D3BF4F1508D60F005923FE /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 24D3BF511508D60F005923FE /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
+ 24D3BF531508D60F005923FE /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
+ 24D3BF551508D60F005923FE /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+ 24D3BF571508D60F005923FE /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+ 24D3BF591508D60F005923FE /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
+ 24D3BF5B1508D60F005923FE /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
+ 24D3BF5D1508D60F005923FE /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+ 24D3BF5F1508D60F005923FE /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+ 24D3BF611508D60F005923FE /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+ 24D3BF631508D60F005923FE /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+ 24D3BF671508D60F005923FE /* FixMyStreet-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FixMyStreet-Info.plist"; sourceTree = "<group>"; };
+ 24D3BF691508D60F005923FE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 24D3BF6B1508D60F005923FE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 24D3BF6D1508D60F005923FE /* FixMyStreet-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FixMyStreet-Prefix.pch"; sourceTree = "<group>"; };
+ 24D3BF6E1508D60F005923FE /* Cordova.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cordova.framework; path = /Users/Shared/Cordova/Frameworks/Cordova.framework; sourceTree = "<absolute>"; };
+ 24D3BF731508D60F005923FE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 24D3BF771508D60F005923FE /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 24D3BF7B1508D60F005923FE /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = Resources/de.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 24D3BF7F1508D60F005923FE /* se */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = se; path = Resources/se.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 24D3BF821508D60F005923FE /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
+ 24D3BF841508D60F005923FE /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
+ 24D3BF861508D60F005923FE /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
+ 24D3BF891508D60F005923FE /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
+ 24D3BF8B1508D60F005923FE /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
+ 24D3BF8D1508D60F005923FE /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
+ 24D3BF8F1508D60F005923FE /* Cordova.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Cordova.plist; sourceTree = "<group>"; };
+ 24D3BF921508D60F005923FE /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
+ 24D3BF931508D60F005923FE /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
+ 24D3BF951508D60F005923FE /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
+ 24D3BF961508D60F005923FE /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
+ 24D3BF981508D60F005923FE /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
+ 24D3BF9B1508D60F005923FE /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
+ 24D3BF9C1508D60F005923FE /* verify.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = verify.sh; sourceTree = "<group>"; };
+ 24E16540150E0F9600F31308 /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = ../www; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 24D3BF411508D60F005923FE /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 24D3BF4C1508D60F005923FE /* Foundation.framework in Frameworks */,
+ 24D3BF4E1508D60F005923FE /* UIKit.framework in Frameworks */,
+ 24D3BF501508D60F005923FE /* CoreGraphics.framework in Frameworks */,
+ 24D3BF521508D60F005923FE /* AddressBook.framework in Frameworks */,
+ 24D3BF541508D60F005923FE /* AddressBookUI.framework in Frameworks */,
+ 24D3BF561508D60F005923FE /* AudioToolbox.framework in Frameworks */,
+ 24D3BF581508D60F005923FE /* AVFoundation.framework in Frameworks */,
+ 24D3BF5A1508D60F005923FE /* CoreLocation.framework in Frameworks */,
+ 24D3BF5C1508D60F005923FE /* MediaPlayer.framework in Frameworks */,
+ 24D3BF5E1508D60F005923FE /* QuartzCore.framework in Frameworks */,
+ 24D3BF601508D60F005923FE /* SystemConfiguration.framework in Frameworks */,
+ 24D3BF621508D60F005923FE /* MobileCoreServices.framework in Frameworks */,
+ 24D3BF641508D60F005923FE /* CoreMedia.framework in Frameworks */,
+ 24D3BF6F1508D60F005923FE /* Cordova.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 24D3BF441508D60F005923FE /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 24D3BF391508D60E005923FE = {
+ isa = PBXGroup;
+ children = (
+ 24E16540150E0F9600F31308 /* www */,
+ 24D3BF651508D60F005923FE /* FixMyStreet */,
+ 24D3BF4A1508D60F005923FE /* Frameworks */,
+ 24D3BF481508D60F005923FE /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 24D3BF481508D60F005923FE /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 24D3BF471508D60F005923FE /* FixMyStreet.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 24D3BF4A1508D60F005923FE /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 24D3BF4B1508D60F005923FE /* Foundation.framework */,
+ 24D3BF4D1508D60F005923FE /* UIKit.framework */,
+ 24D3BF4F1508D60F005923FE /* CoreGraphics.framework */,
+ 24D3BF511508D60F005923FE /* AddressBook.framework */,
+ 24D3BF531508D60F005923FE /* AddressBookUI.framework */,
+ 24D3BF551508D60F005923FE /* AudioToolbox.framework */,
+ 24D3BF571508D60F005923FE /* AVFoundation.framework */,
+ 24D3BF591508D60F005923FE /* CoreLocation.framework */,
+ 24D3BF5B1508D60F005923FE /* MediaPlayer.framework */,
+ 24D3BF5D1508D60F005923FE /* QuartzCore.framework */,
+ 24D3BF5F1508D60F005923FE /* SystemConfiguration.framework */,
+ 24D3BF611508D60F005923FE /* MobileCoreServices.framework */,
+ 24D3BF631508D60F005923FE /* CoreMedia.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 24D3BF651508D60F005923FE /* FixMyStreet */ = {
+ isa = PBXGroup;
+ children = (
+ 24D3BF6E1508D60F005923FE /* Cordova.framework */,
+ 24D3BF701508D60F005923FE /* Resources */,
+ 24D3BF911508D60F005923FE /* Classes */,
+ 24D3BF9A1508D60F005923FE /* Plugins */,
+ 24D3BF661508D60F005923FE /* Supporting Files */,
+ );
+ path = FixMyStreet;
+ sourceTree = "<group>";
+ };
+ 24D3BF661508D60F005923FE /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 24D3BF671508D60F005923FE /* FixMyStreet-Info.plist */,
+ 24D3BF681508D60F005923FE /* InfoPlist.strings */,
+ 24D3BF6B1508D60F005923FE /* main.m */,
+ 24D3BF6D1508D60F005923FE /* FixMyStreet-Prefix.pch */,
+ 24D3BF8F1508D60F005923FE /* Cordova.plist */,
+ 24D3BF981508D60F005923FE /* MainViewController.xib */,
+ 24D3BF9C1508D60F005923FE /* verify.sh */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 24D3BF701508D60F005923FE /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 24D3BF8D1508D60F005923FE /* Capture.bundle */,
+ 24D3BF711508D60F005923FE /* en.lproj */,
+ 24D3BF751508D60F005923FE /* es.lproj */,
+ 24D3BF791508D60F005923FE /* de.lproj */,
+ 24D3BF7D1508D60F005923FE /* se.lproj */,
+ 24D3BF811508D60F005923FE /* icons */,
+ 24D3BF881508D60F005923FE /* splash */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 24D3BF711508D60F005923FE /* en.lproj */ = {
+ isa = PBXGroup;
+ children = (
+ 24D3BF721508D60F005923FE /* Localizable.strings */,
+ );
+ name = en.lproj;
+ sourceTree = "<group>";
+ };
+ 24D3BF751508D60F005923FE /* es.lproj */ = {
+ isa = PBXGroup;
+ children = (
+ 24D3BF761508D60F005923FE /* Localizable.strings */,
+ );
+ name = es.lproj;
+ sourceTree = "<group>";
+ };
+ 24D3BF791508D60F005923FE /* de.lproj */ = {
+ isa = PBXGroup;
+ children = (
+ 24D3BF7A1508D60F005923FE /* Localizable.strings */,
+ );
+ name = de.lproj;
+ sourceTree = "<group>";
+ };
+ 24D3BF7D1508D60F005923FE /* se.lproj */ = {
+ isa = PBXGroup;
+ children = (
+ 24D3BF7E1508D60F005923FE /* Localizable.strings */,
+ );
+ name = se.lproj;
+ sourceTree = "<group>";
+ };
+ 24D3BF811508D60F005923FE /* icons */ = {
+ isa = PBXGroup;
+ children = (
+ 24D3BF821508D60F005923FE /* icon.png */,
+ 24D3BF841508D60F005923FE /* icon@2x.png */,
+ 24D3BF861508D60F005923FE /* icon-72.png */,
+ );
+ name = icons;
+ sourceTree = "<group>";
+ };
+ 24D3BF881508D60F005923FE /* splash */ = {
+ isa = PBXGroup;
+ children = (
+ 24D3BF891508D60F005923FE /* Default.png */,
+ 24D3BF8B1508D60F005923FE /* Default@2x.png */,
+ );
+ name = splash;
+ sourceTree = "<group>";
+ };
+ 24D3BF911508D60F005923FE /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 24D3BF921508D60F005923FE /* AppDelegate.h */,
+ 24D3BF931508D60F005923FE /* AppDelegate.m */,
+ 24D3BF951508D60F005923FE /* MainViewController.h */,
+ 24D3BF961508D60F005923FE /* MainViewController.m */,
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
+ 24D3BF9A1508D60F005923FE /* Plugins */ = {
+ isa = PBXGroup;
+ children = (
+ 24D3BF9B1508D60F005923FE /* README */,
+ );
+ name = Plugins;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 24D3BF461508D60F005923FE /* FixMyStreet */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 24D3BFA01508D60F005923FE /* Build configuration list for PBXNativeTarget "FixMyStreet" */;
+ buildPhases = (
+ 24D3BF401508D60F005923FE /* Sources */,
+ 24D3BF411508D60F005923FE /* Frameworks */,
+ 24D3BF421508D60F005923FE /* Resources */,
+ 24D3BF431508D60F005923FE /* Sources */,
+ 24D3BF441508D60F005923FE /* Frameworks */,
+ 24D3BF451508D60F005923FE /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = FixMyStreet;
+ productName = FixMyStreet;
+ productReference = 24D3BF471508D60F005923FE /* FixMyStreet.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 24D3BF3B1508D60E005923FE /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0420;
+ };
+ buildConfigurationList = 24D3BF3E1508D60E005923FE /* Build configuration list for PBXProject "FixMyStreet" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ es,
+ de,
+ se,
+ );
+ mainGroup = 24D3BF391508D60E005923FE;
+ productRefGroup = 24D3BF481508D60F005923FE /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 24D3BF461508D60F005923FE /* FixMyStreet */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 24D3BF421508D60F005923FE /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 24D3BF6A1508D60F005923FE /* InfoPlist.strings in Resources */,
+ 24D3BF741508D60F005923FE /* Localizable.strings in Resources */,
+ 24D3BF781508D60F005923FE /* Localizable.strings in Resources */,
+ 24D3BF7C1508D60F005923FE /* Localizable.strings in Resources */,
+ 24D3BF801508D60F005923FE /* Localizable.strings in Resources */,
+ 24D3BF831508D60F005923FE /* icon.png in Resources */,
+ 24D3BF851508D60F005923FE /* icon@2x.png in Resources */,
+ 24D3BF871508D60F005923FE /* icon-72.png in Resources */,
+ 24D3BF8A1508D60F005923FE /* Default.png in Resources */,
+ 24D3BF8C1508D60F005923FE /* Default@2x.png in Resources */,
+ 24D3BF8E1508D60F005923FE /* Capture.bundle in Resources */,
+ 24D3BF901508D60F005923FE /* Cordova.plist in Resources */,
+ 24D3BF991508D60F005923FE /* MainViewController.xib in Resources */,
+ 24D3BF9D1508D60F005923FE /* verify.sh in Resources */,
+ 24E16541150E0F9600F31308 /* www in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 24D3BF451508D60F005923FE /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/bash;
+ shellScript = "\n\t\t\t\t\t\t\t\tchmod 755 $PROJECT_DIR/$PROJECT_NAME/verify.sh\n\t\t\t\t\t\t\t\t$PROJECT_DIR/$PROJECT_NAME/verify.sh\n\t\t\t\t\t";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 24D3BF401508D60F005923FE /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 24D3BF6C1508D60F005923FE /* main.m in Sources */,
+ 24D3BF941508D60F005923FE /* AppDelegate.m in Sources */,
+ 24D3BF971508D60F005923FE /* MainViewController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 24D3BF431508D60F005923FE /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 24D3BF681508D60F005923FE /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 24D3BF691508D60F005923FE /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 24D3BF721508D60F005923FE /* Localizable.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 24D3BF731508D60F005923FE /* en */,
+ );
+ name = Localizable.strings;
+ sourceTree = "<group>";
+ };
+ 24D3BF761508D60F005923FE /* Localizable.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 24D3BF771508D60F005923FE /* es */,
+ );
+ name = Localizable.strings;
+ sourceTree = "<group>";
+ };
+ 24D3BF7A1508D60F005923FE /* Localizable.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 24D3BF7B1508D60F005923FE /* de */,
+ );
+ name = Localizable.strings;
+ sourceTree = "<group>";
+ };
+ 24D3BF7E1508D60F005923FE /* Localizable.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 24D3BF7F1508D60F005923FE /* se */,
+ );
+ name = Localizable.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 24D3BF9E1508D60F005923FE /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = (
+ armv6,
+ "$(ARCHS_STANDARD_32_BIT)",
+ );
+ CLANG_ENABLE_OBJC_ARC = NO;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ 24D3BF9F1508D60F005923FE /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = (
+ armv6,
+ "$(ARCHS_STANDARD_32_BIT)",
+ );
+ CLANG_ENABLE_OBJC_ARC = NO;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 24D3BFA11508D60F005923FE /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = YES;
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = /Users/Shared/Cordova/Frameworks;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "FixMyStreet/FixMyStreet-Prefix.pch";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1,",
+ "CORDOVA_FRAMEWORK=1",
+ );
+ INFOPLIST_FILE = "FixMyStreet/FixMyStreet-Info.plist";
+ OTHER_LDFLAGS = (
+ "-weak_framework",
+ UIKit,
+ "-weak_framework",
+ AVFoundation,
+ "-weak_framework",
+ CoreMedia,
+ "-weak_library",
+ /usr/lib/libSystem.B.dylib,
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TARGETED_DEVICE_FAMILY = 1;
+ VALIDATE_PRODUCT = YES;
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ 24D3BFA21508D60F005923FE /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = YES;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ FRAMEWORK_SEARCH_PATHS = /Users/Shared/Cordova/Frameworks;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "FixMyStreet/FixMyStreet-Prefix.pch";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "NDEBUG=1,",
+ "CORDOVA_FRAMEWORK=1",
+ );
+ INFOPLIST_FILE = "FixMyStreet/FixMyStreet-Info.plist";
+ OTHER_LDFLAGS = (
+ "-weak_framework",
+ UIKit,
+ "-weak_framework",
+ AVFoundation,
+ "-weak_framework",
+ CoreMedia,
+ "-weak_library",
+ /usr/lib/libSystem.B.dylib,
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TARGETED_DEVICE_FAMILY = 1;
+ VALIDATE_PRODUCT = NO;
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 24D3BF3E1508D60E005923FE /* Build configuration list for PBXProject "FixMyStreet" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 24D3BF9E1508D60F005923FE /* Debug */,
+ 24D3BF9F1508D60F005923FE /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 24D3BFA01508D60F005923FE /* Build configuration list for PBXNativeTarget "FixMyStreet" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 24D3BFA11508D60F005923FE /* Debug */,
+ 24D3BFA21508D60F005923FE /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 24D3BF3B1508D60E005923FE /* Project object */;
+}
diff --git a/phonegap/iPhone/FixMyStreet.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/phonegap/iPhone/FixMyStreet.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 000000000..f65be0eea
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:FixMyStreet.xcodeproj">
+ </FileRef>
+</Workspace>
diff --git a/phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/FixMyStreet.xcscheme b/phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/FixMyStreet.xcscheme
new file mode 100644
index 000000000..1bd90c562
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/FixMyStreet.xcscheme
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "24D3BF461508D60F005923FE"
+ BuildableName = "FixMyStreet.app"
+ BlueprintName = "FixMyStreet"
+ ReferencedContainer = "container:FixMyStreet.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "24D3BF461508D60F005923FE"
+ BuildableName = "FixMyStreet.app"
+ BlueprintName = "FixMyStreet"
+ ReferencedContainer = "container:FixMyStreet.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "24D3BF461508D60F005923FE"
+ BuildableName = "FixMyStreet.app"
+ BlueprintName = "FixMyStreet"
+ ReferencedContainer = "container:FixMyStreet.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "24D3BF461508D60F005923FE"
+ BuildableName = "FixMyStreet.app"
+ BlueprintName = "FixMyStreet"
+ ReferencedContainer = "container:FixMyStreet.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/xcschememanagement.plist b/phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 000000000..0d3188478
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>FixMyStreet.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>24D3BF461508D60F005923FE</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
diff --git a/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.h b/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.h
new file mode 100644
index 000000000..cee4240b1
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.h
@@ -0,0 +1,50 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+ */
+
+//
+// AppDelegate.h
+// cordova1.8.0
+//
+// Created by Struan Donald on 08/06/2012.
+// Copyright __MyCompanyName__ 2012. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#ifdef CORDOVA_FRAMEWORK
+ #import <Cordova/CDVViewController.h>
+#else
+ #import "CDVViewController.h"
+#endif
+
+
+@interface AppDelegate : NSObject < UIApplicationDelegate > {
+
+}
+
+// invoke string is passed to your app on launch, this is only valid if you
+// edit cordova1.8.0-Info.plist to add a protocol
+// a simple tutorial can be found here :
+// http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
+
+@property (nonatomic, retain) IBOutlet UIWindow* window;
+@property (nonatomic, retain) IBOutlet CDVViewController* viewController;
+
+@end
+
diff --git a/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.m b/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.m
new file mode 100644
index 000000000..ad518dc80
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.m
@@ -0,0 +1,140 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+ */
+
+//
+// AppDelegate.m
+// cordova1.8.0
+//
+// Created by Struan Donald on 08/06/2012.
+// Copyright __MyCompanyName__ 2012. All rights reserved.
+//
+
+#import "AppDelegate.h"
+#import "MainViewController.h"
+
+#ifdef CORDOVA_FRAMEWORK
+ #import <Cordova/CDVPlugin.h>
+ #import <Cordova/CDVURLProtocol.h>
+#else
+ #import "CDVPlugin.h"
+ #import "CDVURLProtocol.h"
+#endif
+
+
+@implementation AppDelegate
+
+@synthesize window, viewController;
+
+- (id) init
+{
+ /** If you need to do any extra app-specific initialization, you can do it here
+ * -jm
+ **/
+ NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
+ [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
+
+ [CDVURLProtocol registerURLProtocol];
+
+ return [super init];
+}
+
+#pragma UIApplicationDelegate implementation
+
+/**
+ * This is main kick off after the app inits, the views and Settings are setup here. (preferred - iOS4 and up)
+ */
+- (BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
+{
+ NSURL* url = [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey];
+ NSString* invokeString = nil;
+
+ if (url && [url isKindOfClass:[NSURL class]]) {
+ invokeString = [url absoluteString];
+ NSLog(@"cordova1.8.0 launchOptions = %@", url);
+ }
+
+ CGRect screenBounds = [[UIScreen mainScreen] bounds];
+ self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
+ self.window.autoresizesSubviews = YES;
+
+ CGRect viewBounds = [[UIScreen mainScreen] applicationFrame];
+
+ self.viewController = [[[MainViewController alloc] init] autorelease];
+ self.viewController.useSplashScreen = YES;
+ self.viewController.wwwFolderName = @"www";
+ self.viewController.startPage = @"index.html";
+ self.viewController.invokeString = invokeString;
+ self.viewController.view.frame = viewBounds;
+
+ // check whether the current orientation is supported: if it is, keep it, rather than forcing a rotation
+ BOOL forceStartupRotation = YES;
+ UIDeviceOrientation curDevOrientation = [[UIDevice currentDevice] orientation];
+
+ if (UIDeviceOrientationUnknown == curDevOrientation) {
+ // UIDevice isn't firing orientation notifications yet… go look at the status bar
+ curDevOrientation = (UIDeviceOrientation)[[UIApplication sharedApplication] statusBarOrientation];
+ }
+
+ if (UIDeviceOrientationIsValidInterfaceOrientation(curDevOrientation)) {
+ for (NSNumber *orient in self.viewController.supportedOrientations) {
+ if ([orient intValue] == curDevOrientation) {
+ forceStartupRotation = NO;
+ break;
+ }
+ }
+ }
+
+ if (forceStartupRotation) {
+ NSLog(@"supportedOrientations: %@", self.viewController.supportedOrientations);
+ // The first item in the supportedOrientations array is the start orientation (guaranteed to be at least Portrait)
+ UIInterfaceOrientation newOrient = [[self.viewController.supportedOrientations objectAtIndex:0] intValue];
+ NSLog(@"AppDelegate forcing status bar to: %d from: %d", newOrient, curDevOrientation);
+ [[UIApplication sharedApplication] setStatusBarOrientation:newOrient];
+ }
+
+ [self.window addSubview:self.viewController.view];
+ [self.window makeKeyAndVisible];
+
+ return YES;
+}
+
+// this happens while we are running ( in the background, or from within our own app )
+// only valid if cordova1.8.0-Info.plist specifies a protocol to handle
+- (BOOL) application:(UIApplication*)application handleOpenURL:(NSURL*)url
+{
+ if (!url) {
+ return NO;
+ }
+
+ // calls into javascript global function 'handleOpenURL'
+ NSString* jsString = [NSString stringWithFormat:@"handleOpenURL(\"%@\");", url];
+ [self.viewController.webView stringByEvaluatingJavaScriptFromString:jsString];
+
+ // all plugins will get the notification, and their handlers will be called
+ [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
+
+ return YES;
+}
+
+- (void) dealloc
+{
+ [super dealloc];
+}
+
+@end
diff --git a/phonegap/iPhone/FixMyStreet/Classes/MainViewController.h b/phonegap/iPhone/FixMyStreet/Classes/MainViewController.h
new file mode 100644
index 000000000..3f48936da
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Classes/MainViewController.h
@@ -0,0 +1,36 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+ */
+
+//
+// MainViewController.h
+// cordova1.8.0
+//
+// Created by Struan Donald on 08/06/2012.
+// Copyright __MyCompanyName__ 2012. All rights reserved.
+//
+
+#ifdef CORDOVA_FRAMEWORK
+ #import <Cordova/CDVViewController.h>
+#else
+ #import "CDVViewController.h"
+#endif
+
+@interface MainViewController : CDVViewController
+
+@end
diff --git a/phonegap/iPhone/FixMyStreet/Classes/MainViewController.m b/phonegap/iPhone/FixMyStreet/Classes/MainViewController.m
new file mode 100644
index 000000000..289da3596
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Classes/MainViewController.m
@@ -0,0 +1,140 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+ */
+
+//
+// MainViewController.h
+// cordova1.8.0
+//
+// Created by Struan Donald on 08/06/2012.
+// Copyright __MyCompanyName__ 2012. All rights reserved.
+//
+
+#import "MainViewController.h"
+
+@implementation MainViewController
+
+- (id) initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
+{
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+ if (self) {
+ // Custom initialization
+ }
+ return self;
+}
+
+- (void) didReceiveMemoryWarning
+{
+ // Releases the view if it doesn't have a superview.
+ [super didReceiveMemoryWarning];
+
+ // Release any cached data, images, etc that aren't in use.
+}
+
+#pragma mark - View lifecycle
+
+- (void) viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view from its nib.
+}
+
+- (void) viewDidUnload
+{
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+ // e.g. self.myOutlet = nil;
+}
+
+- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ // Return YES for supported orientations
+ return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation];
+}
+
+/* Comment out the block below to over-ride */
+/*
+- (CDVCordovaView*) newCordovaViewWithFrame:(CGRect)bounds
+{
+ return[super newCordovaViewWithFrame:bounds];
+}
+*/
+
+/* Comment out the block below to over-ride */
+/*
+#pragma CDVCommandDelegate implementation
+
+- (id) getCommandInstance:(NSString*)className
+{
+ return [super getCommandInstance:className];
+}
+
+- (BOOL) execute:(CDVInvokedUrlCommand*)command
+{
+ return [super execute:command];
+}
+
+- (NSString*) pathForResource:(NSString*)resourcepath;
+{
+ return [super pathForResource:resourcepath];
+}
+
+- (void) registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className
+{
+ return [super registerPlugin:plugin withClassName:className];
+}
+*/
+
+#pragma UIWebDelegate implementation
+
+- (void) webViewDidFinishLoad:(UIWebView*) theWebView
+{
+ // only valid if ___PROJECTNAME__-Info.plist specifies a protocol to handle
+ if (self.invokeString)
+ {
+ // this is passed before the deviceready event is fired, so you can access it in js when you receive deviceready
+ NSString* jsString = [NSString stringWithFormat:@"var invokeString = \"%@\";", self.invokeString];
+ [theWebView stringByEvaluatingJavaScriptFromString:jsString];
+ }
+
+ // Black base color for background matches the native apps
+ theWebView.backgroundColor = [UIColor blackColor];
+
+ return [super webViewDidFinishLoad:theWebView];
+}
+
+/* Comment out the block below to over-ride */
+/*
+
+- (void) webViewDidStartLoad:(UIWebView*)theWebView
+{
+ return [super webViewDidStartLoad:theWebView];
+}
+
+- (void) webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error
+{
+ return [super webView:theWebView didFailLoadWithError:error];
+}
+
+- (BOOL) webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
+{
+ return [super webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType];
+}
+*/
+
+@end
diff --git a/phonegap/iPhone/FixMyStreet/Classes/MainViewController.xib b/phonegap/iPhone/FixMyStreet/Classes/MainViewController.xib
new file mode 100644
index 000000000..9837f578c
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Classes/MainViewController.xib
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
+ <data>
+ <int key="IBDocument.SystemTarget">1280</int>
+ <string key="IBDocument.SystemVersion">11C25</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1919</string>
+ <string key="IBDocument.AppKitVersion">1138.11</string>
+ <string key="IBDocument.HIToolboxVersion">566.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">916</string>
+ </object>
+ <array key="IBDocument.IntegratedClassDependencies">
+ <string>IBProxyObject</string>
+ <string>IBUIView</string>
+ </array>
+ <array key="IBDocument.PluginDependencies">
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </array>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="975951072">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="191373211">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrame">{{0, 20}, {320, 460}}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </array>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <array class="NSMutableArray" key="connectionRecords">
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="191373211"/>
+ </object>
+ <int key="connectionID">3</int>
+ </object>
+ </array>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <array key="orderedObjects">
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <array key="object" id="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1</int>
+ <reference key="object" ref="191373211"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="975951072"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-1.CustomClassName">MainViewController</string>
+ <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="-2.CustomClassName">UIResponder</string>
+ <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+ <nil key="activeLocalization"/>
+ <dictionary class="NSMutableDictionary" key="localizations"/>
+ <nil key="sourceID"/>
+ <int key="maxID">3</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <array class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <object class="IBPartialClassDescription">
+ <string key="className">MainViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/MainViewController.h</string>
+ </object>
+ </object>
+ </array>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">916</string>
+ </data>
+</archive>
diff --git a/phonegap/iPhone/FixMyStreet/Cordova.plist b/phonegap/iPhone/FixMyStreet/Cordova.plist
new file mode 100644
index 000000000..66c06689d
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Cordova.plist
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>UIWebViewBounce</key>
+ <true/>
+ <key>TopActivityIndicator</key>
+ <string>gray</string>
+ <key>EnableLocation</key>
+ <false/>
+ <key>EnableViewportScale</key>
+ <false/>
+ <key>AutoHideSplashScreen</key>
+ <true/>
+ <key>ShowSplashScreenSpinner</key>
+ <true/>
+ <key>MediaPlaybackRequiresUserAction</key>
+ <false/>
+ <key>AllowInlineMediaPlayback</key>
+ <false/>
+ <key>OpenAllWhitelistURLsInWebView</key>
+ <false/>
+ <key>ExternalHosts</key>
+ <array>
+ <string>*.tilma.mysociety.org</string>
+ <string>mapit.mysociety.org</string>
+ <string>*.tile.openstreetmap.org</string>
+ <string>*.virtualearth.net</string>
+ <string>struan.fixmystreet.com</string>
+ </array>
+ <key>Plugins</key>
+ <dict>
+ <key>Compass</key>
+ <string>CDVLocation</string>
+ <key>Accelerometer</key>
+ <string>CDVAccelerometer</string>
+ <key>Camera</key>
+ <string>CDVCamera</string>
+ <key>NetworkStatus</key>
+ <string>CDVConnection</string>
+ <key>Contacts</key>
+ <string>CDVContacts</string>
+ <key>Debug Console</key>
+ <string>CDVDebugConsole</string>
+ <key>File</key>
+ <string>CDVFile</string>
+ <key>FileTransfer</key>
+ <string>CDVFileTransfer</string>
+ <key>Geolocation</key>
+ <string>CDVLocation</string>
+ <key>Notification</key>
+ <string>CDVNotification</string>
+ <key>Media</key>
+ <string>CDVSound</string>
+ <key>Capture</key>
+ <string>CDVCapture</string>
+ <key>SplashScreen</key>
+ <string>CDVSplashScreen</string>
+ <key>Battery</key>
+ <string>CDVBattery</string>
+ </dict>
+</dict>
+</plist>
diff --git a/phonegap/iPhone/FixMyStreet/FixMyStreet-Info.plist b/phonegap/iPhone/FixMyStreet/FixMyStreet-Info.plist
new file mode 100644
index 000000000..3162159f6
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/FixMyStreet-Info.plist
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string>icon.png</string>
+ <key>CFBundleIconFiles</key>
+ <array>
+ <string>icon.png</string>
+ <string>icon@2x.png</string>
+ <string>icon-72.png</string>
+ </array>
+ <key>CFBundleIdentifier</key>
+ <string>org.mysociety.FixMyStreet</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>2.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>2.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>NSMainNibFile</key>
+ <string></string>
+ <key>NSMainNibFile~ipad</key>
+ <string></string>
+ <key>UIStatusBarHidden</key>
+ <true/>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ </array>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
diff --git a/phonegap/iPhone/FixMyStreet/FixMyStreet-Prefix.pch b/phonegap/iPhone/FixMyStreet/FixMyStreet-Prefix.pch
new file mode 100644
index 000000000..b74079015
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/FixMyStreet-Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'FixMyStreet' target in the 'FixMyStreet' project
+//
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+#endif
diff --git a/phonegap/iPhone/FixMyStreet/Plugins/README b/phonegap/iPhone/FixMyStreet/Plugins/README
new file mode 100644
index 000000000..438840dbc
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Plugins/README
@@ -0,0 +1 @@
+Put the .h and .m files of your plugin here. The .js files of your plugin belong in the www folder. \ No newline at end of file
diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg.png
new file mode 100644
index 000000000..784e9c7dd
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg@2x.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg@2x.png
new file mode 100644
index 000000000..1e28c6dbc
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg@2x.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg~ipad.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg~ipad.png
new file mode 100644
index 000000000..efbef8aaa
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg~ipad.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone.png
new file mode 100644
index 000000000..155b88cae
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone@2x.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone@2x.png
new file mode 100644
index 000000000..79ef16bac
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone@2x.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone~ipad.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone~ipad.png
new file mode 100644
index 000000000..ef1c472bf
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone~ipad.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button.png
new file mode 100644
index 000000000..ceb95898f
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button@2x.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button@2x.png
new file mode 100644
index 000000000..d6ce30281
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button@2x.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button~ipad.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button~ipad.png
new file mode 100644
index 000000000..d8e24a4d0
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button~ipad.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg.png
new file mode 100644
index 000000000..bafc087e2
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg@2x.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg@2x.png
new file mode 100644
index 000000000..798490b0f
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg@2x.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg~ipad.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg~ipad.png
new file mode 100644
index 000000000..3b467f632
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg~ipad.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button.png
new file mode 100644
index 000000000..9c31838a4
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button@2x.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button@2x.png
new file mode 100644
index 000000000..8cf657eaa
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button@2x.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button~ipad.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button~ipad.png
new file mode 100644
index 000000000..59bb7a573
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button~ipad.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/de.lproj/Localizable.strings b/phonegap/iPhone/FixMyStreet/Resources/de.lproj/Localizable.strings
new file mode 100644
index 000000000..f1cdb42d1
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/de.lproj/Localizable.strings
@@ -0,0 +1,26 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+ */
+
+
+// accessibility label for recording button
+"toggle audio recording" = "starten/beenden der Tonaufnahme";
+// notification spoken by VoiceOver when timed recording finishes
+"timed recording complete" = "programmierte Aufnahme beendet";
+// accessibility hint for display of recorded elapsed time
+"recorded time in minutes and seconds" = "aufgenommene Zeit in Minuten und Sekunden"; \ No newline at end of file
diff --git a/phonegap/iPhone/FixMyStreet/Resources/en.lproj/Localizable.strings b/phonegap/iPhone/FixMyStreet/Resources/en.lproj/Localizable.strings
new file mode 100644
index 000000000..897268443
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/en.lproj/Localizable.strings
@@ -0,0 +1,25 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+ */
+
+// accessibility label for recording button
+"toggle audio recording" = "toggle audio recording";
+// notification spoken by VoiceOver when timed recording finishes
+"timed recording complete" = "timed recording complete";
+// accessibility hint for display of recorded elapsed time
+"recorded time in minutes and seconds" = "recorded time in minutes and seconds"; \ No newline at end of file
diff --git a/phonegap/iPhone/FixMyStreet/Resources/es.lproj/Localizable.strings b/phonegap/iPhone/FixMyStreet/Resources/es.lproj/Localizable.strings
new file mode 100644
index 000000000..23831e662
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/es.lproj/Localizable.strings
@@ -0,0 +1,25 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+ */
+
+// accessibility label for recording button
+"toggle audio recording" = "grabación de audio cambiar";
+// notification spoken by VoiceOver when timed recording finishes
+"timed recording complete" = "tiempo de grabación completo";
+// accessibility hint for display of recorded elapsed time
+"recorded time in minutes and seconds" = "tiempo registrado en minutos y segundos"; \ No newline at end of file
diff --git a/phonegap/iPhone/FixMyStreet/Resources/icons/icon-72.png b/phonegap/iPhone/FixMyStreet/Resources/icons/icon-72.png
new file mode 100644
index 000000000..8c6e5df34
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/icons/icon-72.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/icons/icon.png b/phonegap/iPhone/FixMyStreet/Resources/icons/icon.png
new file mode 100644
index 000000000..b2571a719
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/icons/icon.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/icons/icon@2x.png b/phonegap/iPhone/FixMyStreet/Resources/icons/icon@2x.png
new file mode 100644
index 000000000..d75098f5a
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/icons/icon@2x.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/se.lproj/Localizable.strings b/phonegap/iPhone/FixMyStreet/Resources/se.lproj/Localizable.strings
new file mode 100644
index 000000000..0af964685
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/se.lproj/Localizable.strings
@@ -0,0 +1,26 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+ */
+
+
+// accessibility label for recording button
+"toggle audio recording" = "börja/avsluta inspelning";
+// notification spoken by VoiceOver when timed recording finishes
+"timed recording complete" = "inspelning har avslutad";
+// accessibility hint for display of recorded elapsed time
+"recorded time in minutes and seconds" = "inspelad tid in minuter och sekund"; \ No newline at end of file
diff --git a/phonegap/iPhone/FixMyStreet/Resources/splash/Default.png b/phonegap/iPhone/FixMyStreet/Resources/splash/Default.png
new file mode 100644
index 000000000..644f3804c
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/splash/Default.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/Resources/splash/Default@2x.png b/phonegap/iPhone/FixMyStreet/Resources/splash/Default@2x.png
new file mode 100644
index 000000000..02d6e3593
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/Resources/splash/Default@2x.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet/en.lproj/InfoPlist.strings b/phonegap/iPhone/FixMyStreet/en.lproj/InfoPlist.strings
new file mode 100644
index 000000000..477b28ff8
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
diff --git a/phonegap/iPhone/FixMyStreet/main.m b/phonegap/iPhone/FixMyStreet/main.m
new file mode 100644
index 000000000..b6fba52b1
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/main.m
@@ -0,0 +1,35 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+ */
+//
+// main.m
+// FixMyStreet
+//
+// Created by Struan Donald on 08/03/2012.
+// Copyright __MyCompanyName__ 2012. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+int main(int argc, char *argv[]) {
+
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+ int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
+ [pool release];
+ return retVal;
+}
diff --git a/phonegap/iPhone/FixMyStreet/verify.sh b/phonegap/iPhone/FixMyStreet/verify.sh
new file mode 100755
index 000000000..0f6f0373c
--- /dev/null
+++ b/phonegap/iPhone/FixMyStreet/verify.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+
+if [ ! -d "$PROJECT_DIR/www" ] ; then
+ cp -R /Users/Shared/Cordova/Frameworks/Cordova.framework/www "$PROJECT_DIR"
+fi
+# detect www folder reference in project, if missing, print warning
+grep "{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \"<group>\"; };" "$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj"
+rc=$?
+if [ $rc != 0 ] ; then
+echo -e "warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)" 1>&2
+fi \ No newline at end of file
diff --git a/phonegap/iphone_cordova.js b/phonegap/iphone_cordova.js
new file mode 100644
index 000000000..d9cced70f
--- /dev/null
+++ b/phonegap/iphone_cordova.js
@@ -0,0 +1,5226 @@
+// commit 109b8649b0e98597b147842a6f71999d2f7910f2
+
+// File generated at :: Tue Jun 05 2012 14:10:19 GMT-0700 (PDT)
+
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+
+;(function() {
+
+// file: lib/scripts/require.js
+var require,
+ define;
+
+(function () {
+ var modules = {};
+
+ function build(module) {
+ var factory = module.factory;
+ module.exports = {};
+ delete module.factory;
+ factory(require, module.exports, module);
+ return module.exports;
+ }
+
+ require = function (id) {
+ if (!modules[id]) {
+ throw "module " + id + " not found";
+ }
+ return modules[id].factory ? build(modules[id]) : modules[id].exports;
+ };
+
+ define = function (id, factory) {
+ if (modules[id]) {
+ throw "module " + id + " already defined";
+ }
+
+ modules[id] = {
+ id: id,
+ factory: factory
+ };
+ };
+
+ define.remove = function (id) {
+ delete modules[id];
+ };
+
+})();
+
+//Export for use in node
+if (typeof module === "object" && typeof require === "function") {
+ module.exports.require = require;
+ module.exports.define = define;
+}
+// file: lib/cordova.js
+define("cordova", function(require, exports, module) {
+var channel = require('cordova/channel');
+
+/**
+ * Listen for DOMContentLoaded and notify our channel subscribers.
+ */
+document.addEventListener('DOMContentLoaded', function() {
+ channel.onDOMContentLoaded.fire();
+}, false);
+if (document.readyState == 'complete' || document.readyState == 'interactive') {
+ channel.onDOMContentLoaded.fire();
+}
+
+/**
+ * Intercept calls to addEventListener + removeEventListener and handle deviceready,
+ * resume, and pause events.
+ */
+var m_document_addEventListener = document.addEventListener;
+var m_document_removeEventListener = document.removeEventListener;
+var m_window_addEventListener = window.addEventListener;
+var m_window_removeEventListener = window.removeEventListener;
+
+/**
+ * Houses custom event handlers to intercept on document + window event listeners.
+ */
+var documentEventHandlers = {},
+ windowEventHandlers = {};
+
+document.addEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ if (typeof documentEventHandlers[e] != 'undefined') {
+ if (evt === 'deviceready') {
+ documentEventHandlers[e].subscribeOnce(handler);
+ } else {
+ documentEventHandlers[e].subscribe(handler);
+ }
+ } else {
+ m_document_addEventListener.call(document, evt, handler, capture);
+ }
+};
+
+window.addEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ if (typeof windowEventHandlers[e] != 'undefined') {
+ windowEventHandlers[e].subscribe(handler);
+ } else {
+ m_window_addEventListener.call(window, evt, handler, capture);
+ }
+};
+
+document.removeEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ // If unsubcribing from an event that is handled by a plugin
+ if (typeof documentEventHandlers[e] != "undefined") {
+ documentEventHandlers[e].unsubscribe(handler);
+ } else {
+ m_document_removeEventListener.call(document, evt, handler, capture);
+ }
+};
+
+window.removeEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ // If unsubcribing from an event that is handled by a plugin
+ if (typeof windowEventHandlers[e] != "undefined") {
+ windowEventHandlers[e].unsubscribe(handler);
+ } else {
+ m_window_removeEventListener.call(window, evt, handler, capture);
+ }
+};
+
+function createEvent(type, data) {
+ var event = document.createEvent('Events');
+ event.initEvent(type, false, false);
+ if (data) {
+ for (var i in data) {
+ if (data.hasOwnProperty(i)) {
+ event[i] = data[i];
+ }
+ }
+ }
+ return event;
+}
+
+if(typeof window.console === "undefined") {
+ window.console = {
+ log:function(){}
+ };
+}
+
+var cordova = {
+ define:define,
+ require:require,
+ /**
+ * Methods to add/remove your own addEventListener hijacking on document + window.
+ */
+ addWindowEventHandler:function(event, opts) {
+ return (windowEventHandlers[event] = channel.create(event, opts));
+ },
+ addDocumentEventHandler:function(event, opts) {
+ return (documentEventHandlers[event] = channel.create(event, opts));
+ },
+ removeWindowEventHandler:function(event) {
+ delete windowEventHandlers[event];
+ },
+ removeDocumentEventHandler:function(event) {
+ delete documentEventHandlers[event];
+ },
+ /**
+ * Retreive original event handlers that were replaced by Cordova
+ *
+ * @return object
+ */
+ getOriginalHandlers: function() {
+ return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
+ 'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
+ },
+ /**
+ * Method to fire event from native code
+ */
+ fireDocumentEvent: function(type, data) {
+ var evt = createEvent(type, data);
+ if (typeof documentEventHandlers[type] != 'undefined') {
+ documentEventHandlers[type].fire(evt);
+ } else {
+ document.dispatchEvent(evt);
+ }
+ },
+ fireWindowEvent: function(type, data) {
+ var evt = createEvent(type,data);
+ if (typeof windowEventHandlers[type] != 'undefined') {
+ windowEventHandlers[type].fire(evt);
+ } else {
+ window.dispatchEvent(evt);
+ }
+ },
+ // TODO: this is Android only; think about how to do this better
+ shuttingDown:false,
+ UsePolling:false,
+ // END TODO
+
+ // TODO: iOS only
+ // This queue holds the currently executing command and all pending
+ // commands executed with cordova.exec().
+ commandQueue:[],
+ // Indicates if we're currently in the middle of flushing the command
+ // queue on the native side.
+ commandQueueFlushing:false,
+ // END TODO
+ /**
+ * Plugin callback mechanism.
+ */
+ callbackId: 0,
+ callbacks: {},
+ callbackStatus: {
+ NO_RESULT: 0,
+ OK: 1,
+ CLASS_NOT_FOUND_EXCEPTION: 2,
+ ILLEGAL_ACCESS_EXCEPTION: 3,
+ INSTANTIATION_EXCEPTION: 4,
+ MALFORMED_URL_EXCEPTION: 5,
+ IO_EXCEPTION: 6,
+ INVALID_ACTION: 7,
+ JSON_EXCEPTION: 8,
+ ERROR: 9
+ },
+
+ /**
+ * Called by native code when returning successful result from an action.
+ *
+ * @param callbackId
+ * @param args
+ */
+ callbackSuccess: function(callbackId, args) {
+ if (cordova.callbacks[callbackId]) {
+
+ // If result is to be sent to callback
+ if (args.status == cordova.callbackStatus.OK) {
+ try {
+ if (cordova.callbacks[callbackId].success) {
+ cordova.callbacks[callbackId].success(args.message);
+ }
+ }
+ catch (e) {
+ console.log("Error in success callback: "+callbackId+" = "+e);
+ }
+ }
+
+ // Clear callback if not expecting any more results
+ if (!args.keepCallback) {
+ delete cordova.callbacks[callbackId];
+ }
+ }
+ },
+
+ /**
+ * Called by native code when returning error result from an action.
+ *
+ * @param callbackId
+ * @param args
+ */
+ callbackError: function(callbackId, args) {
+ if (cordova.callbacks[callbackId]) {
+ try {
+ if (cordova.callbacks[callbackId].fail) {
+ cordova.callbacks[callbackId].fail(args.message);
+ }
+ }
+ catch (e) {
+ console.log("Error in error callback: "+callbackId+" = "+e);
+ }
+
+ // Clear callback if not expecting any more results
+ if (!args.keepCallback) {
+ delete cordova.callbacks[callbackId];
+ }
+ }
+ },
+ // TODO: remove in 2.0.
+ addPlugin: function(name, obj) {
+ console.log("[DEPRECATION NOTICE] window.addPlugin and window.plugins will be removed in version 2.0.");
+ if (!window.plugins[name]) {
+ window.plugins[name] = obj;
+ }
+ else {
+ console.log("Error: Plugin "+name+" already exists.");
+ }
+ },
+
+ addConstructor: function(func) {
+ channel.onCordovaReady.subscribeOnce(function() {
+ try {
+ func();
+ } catch(e) {
+ console.log("Failed to run constructor: " + e);
+ }
+ });
+ }
+};
+
+// Register pause, resume and deviceready channels as events on document.
+channel.onPause = cordova.addDocumentEventHandler('pause');
+channel.onResume = cordova.addDocumentEventHandler('resume');
+channel.onDeviceReady = cordova.addDocumentEventHandler('deviceready');
+
+// Adds deprecation warnings to functions of an object (but only logs a message once)
+function deprecateFunctions(obj, objLabel) {
+ var newObj = {};
+ var logHash = {};
+ for (var i in obj) {
+ if (obj.hasOwnProperty(i)) {
+ if (typeof obj[i] == 'function') {
+ newObj[i] = (function(prop){
+ var oldFunk = obj[prop];
+ var funkId = objLabel + '_' + prop;
+ return function() {
+ if (!logHash[funkId]) {
+ console.log('[DEPRECATION NOTICE] The "' + objLabel + '" global will be removed in version 2.0, please use lowercase "cordova".');
+ logHash[funkId] = true;
+ }
+ oldFunk.apply(obj, arguments);
+ };
+ })(i);
+ } else {
+ newObj[i] = (function(prop) { return obj[prop]; })(i);
+ }
+ }
+ }
+ return newObj;
+}
+
+/**
+ * Legacy variable for plugin support
+ * TODO: remove in 2.0.
+ */
+if (!window.PhoneGap) {
+ window.PhoneGap = deprecateFunctions(cordova, 'PhoneGap');
+}
+if (!window.Cordova) {
+ window.Cordova = deprecateFunctions(cordova, 'Cordova');
+}
+
+/**
+ * Plugins object
+ * TODO: remove in 2.0.
+ */
+if (!window.plugins) {
+ window.plugins = {};
+}
+
+module.exports = cordova;
+
+});
+
+// file: lib/common/builder.js
+define("cordova/builder", function(require, exports, module) {
+var utils = require('cordova/utils');
+
+function each(objects, func, context) {
+ for (var prop in objects) {
+ if (objects.hasOwnProperty(prop)) {
+ func.apply(context, [objects[prop], prop]);
+ }
+ }
+}
+
+function include(parent, objects, clobber, merge) {
+ each(objects, function (obj, key) {
+ try {
+ var result = obj.path ? require(obj.path) : {};
+
+ if (clobber) {
+ // Clobber if it doesn't exist.
+ if (typeof parent[key] === 'undefined') {
+ parent[key] = result;
+ } else if (typeof obj.path !== 'undefined') {
+ // If merging, merge properties onto parent, otherwise, clobber.
+ if (merge) {
+ recursiveMerge(parent[key], result);
+ } else {
+ parent[key] = result;
+ }
+ }
+ result = parent[key];
+ } else {
+ // Overwrite if not currently defined.
+ if (typeof parent[key] == 'undefined') {
+ parent[key] = result;
+ } else if (merge && typeof obj.path !== 'undefined') {
+ // If merging, merge parent onto result
+ recursiveMerge(result, parent[key]);
+ parent[key] = result;
+ } else {
+ // Set result to what already exists, so we can build children into it if they exist.
+ result = parent[key];
+ }
+ }
+
+ if (obj.children) {
+ include(result, obj.children, clobber, merge);
+ }
+ } catch(e) {
+ utils.alert('Exception building cordova JS globals: ' + e + ' for key "' + key + '"');
+ }
+ });
+}
+
+/**
+ * Merge properties from one object onto another recursively. Properties from
+ * the src object will overwrite existing target property.
+ *
+ * @param target Object to merge properties into.
+ * @param src Object to merge properties from.
+ */
+function recursiveMerge(target, src) {
+ for (var prop in src) {
+ if (src.hasOwnProperty(prop)) {
+ if (typeof target.prototype !== 'undefined' && target.prototype.constructor === target) {
+ // If the target object is a constructor override off prototype.
+ target.prototype[prop] = src[prop];
+ } else {
+ target[prop] = typeof src[prop] === 'object' ? recursiveMerge(
+ target[prop], src[prop]) : src[prop];
+ }
+ }
+ }
+ return target;
+}
+
+module.exports = {
+ build: function (objects) {
+ return {
+ intoButDontClobber: function (target) {
+ include(target, objects, false, false);
+ },
+ intoAndClobber: function(target) {
+ include(target, objects, true, false);
+ },
+ intoAndMerge: function(target) {
+ include(target, objects, true, true);
+ }
+ };
+ }
+};
+
+});
+
+// file: lib/common/channel.js
+define("cordova/channel", function(require, exports, module) {
+var utils = require('cordova/utils');
+
+/**
+ * Custom pub-sub "channel" that can have functions subscribed to it
+ * This object is used to define and control firing of events for
+ * cordova initialization.
+ *
+ * The order of events during page load and Cordova startup is as follows:
+ *
+ * onDOMContentLoaded Internal event that is received when the web page is loaded and parsed.
+ * onNativeReady Internal event that indicates the Cordova native side is ready.
+ * onCordovaReady Internal event fired when all Cordova JavaScript objects have been created.
+ * onCordovaInfoReady Internal event fired when device properties are available.
+ * onCordovaConnectionReady Internal event fired when the connection property has been set.
+ * onDeviceReady User event fired to indicate that Cordova is ready
+ * onResume User event fired to indicate a start/resume lifecycle event
+ * onPause User event fired to indicate a pause lifecycle event
+ * onDestroy Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
+ *
+ * The only Cordova events that user code should register for are:
+ * deviceready Cordova native code is initialized and Cordova APIs can be called from JavaScript
+ * pause App has moved to background
+ * resume App has returned to foreground
+ *
+ * Listeners can be registered as:
+ * document.addEventListener("deviceready", myDeviceReadyListener, false);
+ * document.addEventListener("resume", myResumeListener, false);
+ * document.addEventListener("pause", myPauseListener, false);
+ *
+ * The DOM lifecycle events should be used for saving and restoring state
+ * window.onload
+ * window.onunload
+ *
+ */
+
+/**
+ * Channel
+ * @constructor
+ * @param type String the channel name
+ * @param opts Object options to pass into the channel, currently
+ * supports:
+ * onSubscribe: callback that fires when
+ * something subscribes to the Channel. Sets
+ * context to the Channel.
+ * onUnsubscribe: callback that fires when
+ * something unsubscribes to the Channel. Sets
+ * context to the Channel.
+ */
+var Channel = function(type, opts) {
+ this.type = type;
+ this.handlers = {};
+ this.numHandlers = 0;
+ this.guid = 1;
+ this.fired = false;
+ this.enabled = true;
+ this.events = {
+ onSubscribe:null,
+ onUnsubscribe:null
+ };
+ if (opts) {
+ if (opts.onSubscribe) this.events.onSubscribe = opts.onSubscribe;
+ if (opts.onUnsubscribe) this.events.onUnsubscribe = opts.onUnsubscribe;
+ }
+},
+ channel = {
+ /**
+ * Calls the provided function only after all of the channels specified
+ * have been fired.
+ */
+ join: function (h, c) {
+ var i = c.length;
+ var len = i;
+ var f = function() {
+ if (!(--i)) h();
+ };
+ for (var j=0; j<len; j++) {
+ !c[j].fired?c[j].subscribeOnce(f):i--;
+ }
+ if (!i) h();
+ },
+ create: function (type, opts) {
+ channel[type] = new Channel(type, opts);
+ return channel[type];
+ },
+
+ /**
+ * cordova Channels that must fire before "deviceready" is fired.
+ */
+ deviceReadyChannelsArray: [],
+ deviceReadyChannelsMap: {},
+
+ /**
+ * Indicate that a feature needs to be initialized before it is ready to be used.
+ * This holds up Cordova's "deviceready" event until the feature has been initialized
+ * and Cordova.initComplete(feature) is called.
+ *
+ * @param feature {String} The unique feature name
+ */
+ waitForInitialization: function(feature) {
+ if (feature) {
+ var c = null;
+ if (this[feature]) {
+ c = this[feature];
+ }
+ else {
+ c = this.create(feature);
+ }
+ this.deviceReadyChannelsMap[feature] = c;
+ this.deviceReadyChannelsArray.push(c);
+ }
+ },
+
+ /**
+ * Indicate that initialization code has completed and the feature is ready to be used.
+ *
+ * @param feature {String} The unique feature name
+ */
+ initializationComplete: function(feature) {
+ var c = this.deviceReadyChannelsMap[feature];
+ if (c) {
+ c.fire();
+ }
+ }
+ };
+
+function forceFunction(f) {
+ if (f === null || f === undefined || typeof f != 'function') throw "Function required as first argument!";
+}
+
+/**
+ * Subscribes the given function to the channel. Any time that
+ * Channel.fire is called so too will the function.
+ * Optionally specify an execution context for the function
+ * and a guid that can be used to stop subscribing to the channel.
+ * Returns the guid.
+ */
+Channel.prototype.subscribe = function(f, c, g) {
+ // need a function to call
+ forceFunction(f);
+
+ var func = f;
+ if (typeof c == "object") { func = utils.close(c, f); }
+
+ g = g || func.observer_guid || f.observer_guid;
+ if (!g) {
+ // first time we've seen this subscriber
+ g = this.guid++;
+ }
+ else {
+ // subscriber already handled; dont set it twice
+ return g;
+ }
+ func.observer_guid = g;
+ f.observer_guid = g;
+ this.handlers[g] = func;
+ this.numHandlers++;
+ if (this.events.onSubscribe) this.events.onSubscribe.call(this);
+ if (this.fired) func.call(this);
+ return g;
+};
+
+/**
+ * Like subscribe but the function is only called once and then it
+ * auto-unsubscribes itself.
+ */
+Channel.prototype.subscribeOnce = function(f, c) {
+ // need a function to call
+ forceFunction(f);
+
+ var g = null;
+ var _this = this;
+ var m = function() {
+ f.apply(c || null, arguments);
+ _this.unsubscribe(g);
+ };
+ if (this.fired) {
+ if (typeof c == "object") { f = utils.close(c, f); }
+ f.apply(this, this.fireArgs);
+ } else {
+ g = this.subscribe(m);
+ }
+ return g;
+};
+
+/**
+ * Unsubscribes the function with the given guid from the channel.
+ */
+Channel.prototype.unsubscribe = function(g) {
+ // need a function to unsubscribe
+ if (g === null || g === undefined) { throw "You must pass _something_ into Channel.unsubscribe"; }
+
+ if (typeof g == 'function') { g = g.observer_guid; }
+ var handler = this.handlers[g];
+ if (handler) {
+ if (handler.observer_guid) handler.observer_guid=null;
+ this.handlers[g] = null;
+ delete this.handlers[g];
+ this.numHandlers--;
+ if (this.events.onUnsubscribe) this.events.onUnsubscribe.call(this);
+ }
+};
+
+/**
+ * Calls all functions subscribed to this channel.
+ */
+Channel.prototype.fire = function(e) {
+ if (this.enabled) {
+ var fail = false;
+ this.fired = true;
+ for (var item in this.handlers) {
+ var handler = this.handlers[item];
+ if (typeof handler == 'function') {
+ var rv = (handler.apply(this, arguments)===false);
+ fail = fail || rv;
+ }
+ }
+ this.fireArgs = arguments;
+ return !fail;
+ }
+ return true;
+};
+
+// defining them here so they are ready super fast!
+// DOM event that is received when the web page is loaded and parsed.
+channel.create('onDOMContentLoaded');
+
+// Event to indicate the Cordova native side is ready.
+channel.create('onNativeReady');
+
+// Event to indicate that all Cordova JavaScript objects have been created
+// and it's time to run plugin constructors.
+channel.create('onCordovaReady');
+
+// Event to indicate that device properties are available
+channel.create('onCordovaInfoReady');
+
+// Event to indicate that the connection property has been set.
+channel.create('onCordovaConnectionReady');
+
+// Event to indicate that Cordova is ready
+channel.create('onDeviceReady');
+
+// Event to indicate a resume lifecycle event
+channel.create('onResume');
+
+// Event to indicate a pause lifecycle event
+channel.create('onPause');
+
+// Event to indicate a destroy lifecycle event
+channel.create('onDestroy');
+
+// Channels that must fire before "deviceready" is fired.
+channel.waitForInitialization('onCordovaReady');
+channel.waitForInitialization('onCordovaInfoReady');
+channel.waitForInitialization('onCordovaConnectionReady');
+
+module.exports = channel;
+
+});
+
+// file: lib/common/common.js
+define("cordova/common", function(require, exports, module) {
+module.exports = {
+ objects: {
+ cordova: {
+ path: 'cordova',
+ children: {
+ exec: {
+ path: 'cordova/exec'
+ },
+ logger: {
+ path: 'cordova/plugin/logger'
+ }
+ }
+ },
+ Cordova: {
+ children: {
+ exec: {
+ path: 'cordova/exec'
+ }
+ }
+ },
+ PhoneGap:{
+ children: {
+ exec: {
+ path: 'cordova/exec'
+ }
+ }
+ },
+ navigator: {
+ children: {
+ notification: {
+ path: 'cordova/plugin/notification'
+ },
+ accelerometer: {
+ path: 'cordova/plugin/accelerometer'
+ },
+ battery: {
+ path: 'cordova/plugin/battery'
+ },
+ camera:{
+ path: 'cordova/plugin/Camera'
+ },
+ compass:{
+ path: 'cordova/plugin/compass'
+ },
+ contacts: {
+ path: 'cordova/plugin/contacts'
+ },
+ device:{
+ children:{
+ capture: {
+ path: 'cordova/plugin/capture'
+ }
+ }
+ },
+ geolocation: {
+ path: 'cordova/plugin/geolocation'
+ },
+ network: {
+ children: {
+ connection: {
+ path: 'cordova/plugin/network'
+ }
+ }
+ },
+ splashscreen: {
+ path: 'cordova/plugin/splashscreen'
+ }
+ }
+ },
+ Acceleration: {
+ path: 'cordova/plugin/Acceleration'
+ },
+ Camera:{
+ path: 'cordova/plugin/CameraConstants'
+ },
+ CameraPopoverOptions: {
+ path: 'cordova/plugin/CameraPopoverOptions'
+ },
+ CaptureError: {
+ path: 'cordova/plugin/CaptureError'
+ },
+ CaptureAudioOptions:{
+ path: 'cordova/plugin/CaptureAudioOptions'
+ },
+ CaptureImageOptions: {
+ path: 'cordova/plugin/CaptureImageOptions'
+ },
+ CaptureVideoOptions: {
+ path: 'cordova/plugin/CaptureVideoOptions'
+ },
+ CompassHeading:{
+ path: 'cordova/plugin/CompassHeading'
+ },
+ CompassError:{
+ path: 'cordova/plugin/CompassError'
+ },
+ ConfigurationData: {
+ path: 'cordova/plugin/ConfigurationData'
+ },
+ Connection: {
+ path: 'cordova/plugin/Connection'
+ },
+ Contact: {
+ path: 'cordova/plugin/Contact'
+ },
+ ContactAddress: {
+ path: 'cordova/plugin/ContactAddress'
+ },
+ ContactError: {
+ path: 'cordova/plugin/ContactError'
+ },
+ ContactField: {
+ path: 'cordova/plugin/ContactField'
+ },
+ ContactFindOptions: {
+ path: 'cordova/plugin/ContactFindOptions'
+ },
+ ContactName: {
+ path: 'cordova/plugin/ContactName'
+ },
+ ContactOrganization: {
+ path: 'cordova/plugin/ContactOrganization'
+ },
+ Coordinates: {
+ path: 'cordova/plugin/Coordinates'
+ },
+ DirectoryEntry: {
+ path: 'cordova/plugin/DirectoryEntry'
+ },
+ DirectoryReader: {
+ path: 'cordova/plugin/DirectoryReader'
+ },
+ Entry: {
+ path: 'cordova/plugin/Entry'
+ },
+ File: {
+ path: 'cordova/plugin/File'
+ },
+ FileEntry: {
+ path: 'cordova/plugin/FileEntry'
+ },
+ FileError: {
+ path: 'cordova/plugin/FileError'
+ },
+ FileReader: {
+ path: 'cordova/plugin/FileReader'
+ },
+ FileSystem: {
+ path: 'cordova/plugin/FileSystem'
+ },
+ FileTransfer: {
+ path: 'cordova/plugin/FileTransfer'
+ },
+ FileTransferError: {
+ path: 'cordova/plugin/FileTransferError'
+ },
+ FileUploadOptions: {
+ path: 'cordova/plugin/FileUploadOptions'
+ },
+ FileUploadResult: {
+ path: 'cordova/plugin/FileUploadResult'
+ },
+ FileWriter: {
+ path: 'cordova/plugin/FileWriter'
+ },
+ Flags: {
+ path: 'cordova/plugin/Flags'
+ },
+ LocalFileSystem: {
+ path: 'cordova/plugin/LocalFileSystem'
+ },
+ Media: {
+ path: 'cordova/plugin/Media'
+ },
+ MediaError: {
+ path: 'cordova/plugin/MediaError'
+ },
+ MediaFile: {
+ path: 'cordova/plugin/MediaFile'
+ },
+ MediaFileData:{
+ path: 'cordova/plugin/MediaFileData'
+ },
+ Metadata:{
+ path: 'cordova/plugin/Metadata'
+ },
+ Position: {
+ path: 'cordova/plugin/Position'
+ },
+ PositionError: {
+ path: 'cordova/plugin/PositionError'
+ },
+ ProgressEvent: {
+ path: 'cordova/plugin/ProgressEvent'
+ },
+ requestFileSystem:{
+ path: 'cordova/plugin/requestFileSystem'
+ },
+ resolveLocalFileSystemURI:{
+ path: 'cordova/plugin/resolveLocalFileSystemURI'
+ }
+ }
+};
+
+});
+
+// file: lib/ios/exec.js
+define("cordova/exec", function(require, exports, module) {
+ /**
+ * Creates a gap bridge iframe used to notify the native code about queued
+ * commands.
+ *
+ * @private
+ */
+var cordova = require('cordova'),
+ utils = require('cordova/utils'),
+ gapBridge,
+ createGapBridge = function() {
+ gapBridge = document.createElement("iframe");
+ gapBridge.setAttribute("style", "display:none;");
+ gapBridge.setAttribute("height","0px");
+ gapBridge.setAttribute("width","0px");
+ gapBridge.setAttribute("frameborder","0");
+ document.documentElement.appendChild(gapBridge);
+ },
+ channel = require('cordova/channel');
+
+module.exports = function() {
+ if (!channel.onCordovaInfoReady.fired) {
+ utils.alert("ERROR: Attempting to call cordova.exec()" +
+ " before 'deviceready'. Ignoring.");
+ return;
+ }
+
+ var successCallback, failCallback, service, action, actionArgs, splitCommand;
+ var callbackId = null;
+ if (typeof arguments[0] !== "string") {
+ // FORMAT ONE
+ successCallback = arguments[0];
+ failCallback = arguments[1];
+ service = arguments[2];
+ action = arguments[3];
+ actionArgs = arguments[4];
+
+ // Since we need to maintain backwards compatibility, we have to pass
+ // an invalid callbackId even if no callback was provided since plugins
+ // will be expecting it. The Cordova.exec() implementation allocates
+ // an invalid callbackId and passes it even if no callbacks were given.
+ callbackId = 'INVALID';
+ } else {
+ // FORMAT TWO
+ splitCommand = arguments[0].split(".");
+ action = splitCommand.pop();
+ service = splitCommand.join(".");
+ actionArgs = Array.prototype.splice.call(arguments, 1);
+ }
+
+ // Start building the command object.
+ var command = {
+ className: service,
+ methodName: action,
+ "arguments": []
+ };
+
+ // Register the callbacks and add the callbackId to the positional
+ // arguments if given.
+ if (successCallback || failCallback) {
+ callbackId = service + cordova.callbackId++;
+ cordova.callbacks[callbackId] =
+ {success:successCallback, fail:failCallback};
+ }
+ if (callbackId !== null) {
+ command["arguments"].push(callbackId);
+ }
+
+ for (var i = 0; i < actionArgs.length; ++i) {
+ var arg = actionArgs[i];
+ if (arg === undefined || arg === null) { // nulls are pushed to the args now (becomes NSNull)
+ command["arguments"].push(arg);
+ } else if (typeof(arg) == 'object' && !(utils.isArray(arg))) {
+ command.options = arg;
+ } else {
+ command["arguments"].push(arg);
+ }
+ }
+
+ // Stringify and queue the command. We stringify to command now to
+ // effectively clone the command arguments in case they are mutated before
+ // the command is executed.
+ cordova.commandQueue.push(JSON.stringify(command));
+
+ // If the queue length is 1, then that means it was empty before we queued
+ // the given command, so let the native side know that we have some
+ // commands to execute, unless the queue is currently being flushed, in
+ // which case the command will be picked up without notification.
+ if (cordova.commandQueue.length == 1 && !cordova.commandQueueFlushing) {
+ if (!gapBridge) {
+ createGapBridge();
+ }
+ gapBridge.src = "gap://ready";
+ }
+};
+
+});
+
+// file: lib/ios/platform.js
+define("cordova/platform", function(require, exports, module) {
+module.exports = {
+ id: "ios",
+ initialize:function() {
+ // iOS doesn't allow reassigning / overriding navigator.geolocation object.
+ // So clobber its methods here instead :)
+ var geo = require('cordova/plugin/geolocation');
+
+ navigator.geolocation.getCurrentPosition = geo.getCurrentPosition;
+ navigator.geolocation.watchPosition = geo.watchPosition;
+ navigator.geolocation.clearWatch = geo.clearWatch;
+ },
+ objects: {
+ File: { // exists natively, override
+ path: "cordova/plugin/File"
+ },
+ MediaError: { // exists natively, override
+ path: "cordova/plugin/MediaError"
+ },
+ device: {
+ path: 'cordova/plugin/ios/device'
+ },
+ console: {
+ path: 'cordova/plugin/ios/console'
+ }
+ },
+ merges:{
+ Contact:{
+ path: "cordova/plugin/ios/Contact"
+ },
+ Entry:{
+ path: "cordova/plugin/ios/Entry"
+ },
+ FileReader:{
+ path: "cordova/plugin/ios/FileReader"
+ },
+ navigator:{
+ children:{
+ notification:{
+ path:"cordova/plugin/ios/notification"
+ },
+ contacts:{
+ path:"cordova/plugin/ios/contacts"
+ }
+ }
+ }
+ }
+};
+
+// use the native logger
+var logger = require("cordova/plugin/logger");
+logger.useConsole(false);
+
+});
+
+// file: lib/common/plugin/Acceleration.js
+define("cordova/plugin/Acceleration", function(require, exports, module) {
+var Acceleration = function(x, y, z, timestamp) {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.timestamp = timestamp || (new Date()).getTime();
+};
+
+module.exports = Acceleration;
+
+});
+
+// file: lib/common/plugin/Camera.js
+define("cordova/plugin/Camera", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ Camera = require('cordova/plugin/CameraConstants');
+
+var cameraExport = {};
+
+// Tack on the Camera Constants to the base camera plugin.
+for (var key in Camera) {
+ cameraExport[key] = Camera[key];
+}
+
+/**
+ * Gets a picture from source defined by "options.sourceType", and returns the
+ * image as defined by the "options.destinationType" option.
+
+ * The defaults are sourceType=CAMERA and destinationType=FILE_URI.
+ *
+ * @param {Function} successCallback
+ * @param {Function} errorCallback
+ * @param {Object} options
+ */
+cameraExport.getPicture = function(successCallback, errorCallback, options) {
+ // successCallback required
+ if (typeof successCallback != "function") {
+ console.log("Camera Error: successCallback is not a function");
+ return;
+ }
+
+ // errorCallback optional
+ if (errorCallback && (typeof errorCallback != "function")) {
+ console.log("Camera Error: errorCallback is not a function");
+ return;
+ }
+
+ var quality = 50;
+ if (options && typeof options.quality == "number") {
+ quality = options.quality;
+ } else if (options && typeof options.quality == "string") {
+ var qlity = parseInt(options.quality, 10);
+ if (isNaN(qlity) === false) {
+ quality = qlity.valueOf();
+ }
+ }
+
+ var destinationType = Camera.DestinationType.FILE_URI;
+ if (typeof options.destinationType == "number") {
+ destinationType = options.destinationType;
+ }
+
+ var sourceType = Camera.PictureSourceType.CAMERA;
+ if (typeof options.sourceType == "number") {
+ sourceType = options.sourceType;
+ }
+
+ var targetWidth = -1;
+ if (typeof options.targetWidth == "number") {
+ targetWidth = options.targetWidth;
+ } else if (typeof options.targetWidth == "string") {
+ var width = parseInt(options.targetWidth, 10);
+ if (isNaN(width) === false) {
+ targetWidth = width.valueOf();
+ }
+ }
+
+ var targetHeight = -1;
+ if (typeof options.targetHeight == "number") {
+ targetHeight = options.targetHeight;
+ } else if (typeof options.targetHeight == "string") {
+ var height = parseInt(options.targetHeight, 10);
+ if (isNaN(height) === false) {
+ targetHeight = height.valueOf();
+ }
+ }
+
+ var encodingType = Camera.EncodingType.JPEG;
+ if (typeof options.encodingType == "number") {
+ encodingType = options.encodingType;
+ }
+
+ var mediaType = Camera.MediaType.PICTURE;
+ if (typeof options.mediaType == "number") {
+ mediaType = options.mediaType;
+ }
+ var allowEdit = false;
+ if (typeof options.allowEdit == "boolean") {
+ allowEdit = options.allowEdit;
+ } else if (typeof options.allowEdit == "number") {
+ allowEdit = options.allowEdit <= 0 ? false : true;
+ }
+ var correctOrientation = false;
+ if (typeof options.correctOrientation == "boolean") {
+ correctOrientation = options.correctOrientation;
+ } else if (typeof options.correctOrientation == "number") {
+ correctOrientation = options.correctOrientation <=0 ? false : true;
+ }
+ var saveToPhotoAlbum = false;
+ if (typeof options.saveToPhotoAlbum == "boolean") {
+ saveToPhotoAlbum = options.saveToPhotoAlbum;
+ } else if (typeof options.saveToPhotoAlbum == "number") {
+ saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
+ }
+ var popoverOptions = null;
+ if (typeof options.popoverOptions == "object") {
+ popoverOptions = options.popoverOptions;
+ }
+
+ exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType, mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions]);
+};
+
+module.exports = cameraExport;
+});
+
+// file: lib/common/plugin/CameraConstants.js
+define("cordova/plugin/CameraConstants", function(require, exports, module) {
+module.exports = {
+ DestinationType:{
+ DATA_URL: 0, // Return base64 encoded string
+ FILE_URI: 1 // Return file uri (content://media/external/images/media/2 for Android)
+ },
+ EncodingType:{
+ JPEG: 0, // Return JPEG encoded image
+ PNG: 1 // Return PNG encoded image
+ },
+ MediaType:{
+ PICTURE: 0, // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
+ VIDEO: 1, // allow selection of video only, ONLY RETURNS URL
+ ALLMEDIA : 2 // allow selection from all media types
+ },
+ PictureSourceType:{
+ PHOTOLIBRARY : 0, // Choose image from picture library (same as SAVEDPHOTOALBUM for Android)
+ CAMERA : 1, // Take picture from camera
+ SAVEDPHOTOALBUM : 2 // Choose image from picture library (same as PHOTOLIBRARY for Android)
+ },
+ PopoverArrowDirection:{
+ ARROW_UP : 1, // matches iOS UIPopoverArrowDirection constants to specify arrow location on popover
+ ARROW_DOWN : 2,
+ ARROW_LEFT : 4,
+ ARROW_RIGHT : 8,
+ ARROW_ANY : 15
+ }
+};
+});
+
+// file: lib/common/plugin/CameraPopoverOptions.js
+define("cordova/plugin/CameraPopoverOptions", function(require, exports, module) {
+var Camera = require('cordova/plugin/CameraConstants');
+
+/**
+ * Encapsulates options for iOS Popover image picker
+ */
+var CameraPopoverOptions = function(x,y,width,height,arrowDir){
+ // information of rectangle that popover should be anchored to
+ this.x = x || 0;
+ this.y = y || 32;
+ this.width = width || 320;
+ this.height = height || 480;
+ // The direction of the popover arrow
+ this.arrowDir = arrowDir || Camera.PopoverArrowDirection.ARROW_ANY;
+};
+
+module.exports = CameraPopoverOptions;
+});
+
+// file: lib/common/plugin/CaptureAudioOptions.js
+define("cordova/plugin/CaptureAudioOptions", function(require, exports, module) {
+/**
+ * Encapsulates all audio capture operation configuration options.
+ */
+var CaptureAudioOptions = function(){
+ // Upper limit of sound clips user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single sound clip in seconds.
+ this.duration = 0;
+ // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
+ this.mode = null;
+};
+
+module.exports = CaptureAudioOptions;
+});
+
+// file: lib/common/plugin/CaptureError.js
+define("cordova/plugin/CaptureError", function(require, exports, module) {
+/**
+ * The CaptureError interface encapsulates all errors in the Capture API.
+ */
+var CaptureError = function(c) {
+ this.code = c || null;
+};
+
+// Camera or microphone failed to capture image or sound.
+CaptureError.CAPTURE_INTERNAL_ERR = 0;
+// Camera application or audio capture application is currently serving other capture request.
+CaptureError.CAPTURE_APPLICATION_BUSY = 1;
+// Invalid use of the API (e.g. limit parameter has value less than one).
+CaptureError.CAPTURE_INVALID_ARGUMENT = 2;
+// User exited camera application or audio capture application before capturing anything.
+CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
+// The requested capture operation is not supported.
+CaptureError.CAPTURE_NOT_SUPPORTED = 20;
+
+module.exports = CaptureError;
+});
+
+// file: lib/common/plugin/CaptureImageOptions.js
+define("cordova/plugin/CaptureImageOptions", function(require, exports, module) {
+/**
+ * Encapsulates all image capture operation configuration options.
+ */
+var CaptureImageOptions = function(){
+ // Upper limit of images user can take. Value must be equal or greater than 1.
+ this.limit = 1;
+ // The selected image mode. Must match with one of the elements in supportedImageModes array.
+ this.mode = null;
+};
+
+module.exports = CaptureImageOptions;
+});
+
+// file: lib/common/plugin/CaptureVideoOptions.js
+define("cordova/plugin/CaptureVideoOptions", function(require, exports, module) {
+/**
+ * Encapsulates all video capture operation configuration options.
+ */
+var CaptureVideoOptions = function(){
+ // Upper limit of videos user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single video clip in seconds.
+ this.duration = 0;
+ // The selected video mode. Must match with one of the elements in supportedVideoModes array.
+ this.mode = null;
+};
+
+module.exports = CaptureVideoOptions;
+});
+
+// file: lib/common/plugin/CompassError.js
+define("cordova/plugin/CompassError", function(require, exports, module) {
+/**
+ * CompassError.
+ * An error code assigned by an implementation when an error has occured
+ * @constructor
+ */
+var CompassError = function(err) {
+ this.code = (err !== undefined ? err : null);
+};
+
+CompassError.COMPASS_INTERNAL_ERR = 0;
+CompassError.COMPASS_NOT_SUPPORTED = 20;
+
+module.exports = CompassError;
+});
+
+// file: lib/common/plugin/CompassHeading.js
+define("cordova/plugin/CompassHeading", function(require, exports, module) {
+var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, timestamp) {
+ this.magneticHeading = (magneticHeading !== undefined ? magneticHeading : null);
+ this.trueHeading = (trueHeading !== undefined ? trueHeading : null);
+ this.headingAccuracy = (headingAccuracy !== undefined ? headingAccuracy : null);
+ this.timestamp = (timestamp !== undefined ? timestamp : new Date().getTime());
+};
+
+module.exports = CompassHeading;
+});
+
+// file: lib/common/plugin/ConfigurationData.js
+define("cordova/plugin/ConfigurationData", function(require, exports, module) {
+/**
+ * Encapsulates a set of parameters that the capture device supports.
+ */
+function ConfigurationData() {
+ // The ASCII-encoded string in lower case representing the media type.
+ this.type = null;
+ // The height attribute represents height of the image or video in pixels.
+ // In the case of a sound clip this attribute has value 0.
+ this.height = 0;
+ // The width attribute represents width of the image or video in pixels.
+ // In the case of a sound clip this attribute has value 0
+ this.width = 0;
+}
+
+module.exports = ConfigurationData;
+});
+
+// file: lib/common/plugin/Connection.js
+define("cordova/plugin/Connection", function(require, exports, module) {
+/**
+ * Network status
+ */
+module.exports = {
+ UNKNOWN: "unknown",
+ ETHERNET: "ethernet",
+ WIFI: "wifi",
+ CELL_2G: "2g",
+ CELL_3G: "3g",
+ CELL_4G: "4g",
+ NONE: "none"
+};
+});
+
+// file: lib/common/plugin/Contact.js
+define("cordova/plugin/Contact", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ ContactError = require('cordova/plugin/ContactError'),
+ utils = require('cordova/utils');
+
+/**
+* Converts primitives into Complex Object
+* Currently only used for Date fields
+*/
+function convertIn(contact) {
+ var value = contact.birthday;
+ try {
+ contact.birthday = new Date(parseFloat(value));
+ } catch (exception){
+ console.log("Cordova Contact convertIn error: exception creating date.");
+ }
+ return contact;
+}
+
+/**
+* Converts Complex objects into primitives
+* Only conversion at present is for Dates.
+**/
+
+function convertOut(contact) {
+ var value = contact.birthday;
+ if (value !== null) {
+ // try to make it a Date object if it is not already
+ if (!utils.isDate(value)){
+ try {
+ value = new Date(value);
+ } catch(exception){
+ value = null;
+ }
+ }
+ if (utils.isDate(value)){
+ value = value.valueOf(); // convert to milliseconds
+ }
+ contact.birthday = value;
+ }
+ return contact;
+}
+
+/**
+* Contains information about a single contact.
+* @constructor
+* @param {DOMString} id unique identifier
+* @param {DOMString} displayName
+* @param {ContactName} name
+* @param {DOMString} nickname
+* @param {Array.<ContactField>} phoneNumbers array of phone numbers
+* @param {Array.<ContactField>} emails array of email addresses
+* @param {Array.<ContactAddress>} addresses array of addresses
+* @param {Array.<ContactField>} ims instant messaging user ids
+* @param {Array.<ContactOrganization>} organizations
+* @param {DOMString} birthday contact's birthday
+* @param {DOMString} note user notes about contact
+* @param {Array.<ContactField>} photos
+* @param {Array.<ContactField>} categories
+* @param {Array.<ContactField>} urls contact's web sites
+*/
+var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
+ ims, organizations, birthday, note, photos, categories, urls) {
+ this.id = id || null;
+ this.rawId = null;
+ this.displayName = displayName || null;
+ this.name = name || null; // ContactName
+ this.nickname = nickname || null;
+ this.phoneNumbers = phoneNumbers || null; // ContactField[]
+ this.emails = emails || null; // ContactField[]
+ this.addresses = addresses || null; // ContactAddress[]
+ this.ims = ims || null; // ContactField[]
+ this.organizations = organizations || null; // ContactOrganization[]
+ this.birthday = birthday || null;
+ this.note = note || null;
+ this.photos = photos || null; // ContactField[]
+ this.categories = categories || null; // ContactField[]
+ this.urls = urls || null; // ContactField[]
+};
+
+/**
+* Removes contact from device storage.
+* @param successCB success callback
+* @param errorCB error callback
+*/
+Contact.prototype.remove = function(successCB, errorCB) {
+ var fail = function(code) {
+ errorCB(new ContactError(code));
+ };
+ if (this.id === null) {
+ fail(ContactError.UNKNOWN_ERROR);
+ }
+ else {
+ exec(successCB, fail, "Contacts", "remove", [this.id]);
+ }
+};
+
+/**
+* Creates a deep copy of this Contact.
+* With the contact ID set to null.
+* @return copy of this Contact
+*/
+Contact.prototype.clone = function() {
+ var clonedContact = utils.clone(this);
+ var i;
+ clonedContact.id = null;
+ clonedContact.rawId = null;
+ // Loop through and clear out any id's in phones, emails, etc.
+ if (clonedContact.phoneNumbers) {
+ for (i = 0; i < clonedContact.phoneNumbers.length; i++) {
+ clonedContact.phoneNumbers[i].id = null;
+ }
+ }
+ if (clonedContact.emails) {
+ for (i = 0; i < clonedContact.emails.length; i++) {
+ clonedContact.emails[i].id = null;
+ }
+ }
+ if (clonedContact.addresses) {
+ for (i = 0; i < clonedContact.addresses.length; i++) {
+ clonedContact.addresses[i].id = null;
+ }
+ }
+ if (clonedContact.ims) {
+ for (i = 0; i < clonedContact.ims.length; i++) {
+ clonedContact.ims[i].id = null;
+ }
+ }
+ if (clonedContact.organizations) {
+ for (i = 0; i < clonedContact.organizations.length; i++) {
+ clonedContact.organizations[i].id = null;
+ }
+ }
+ if (clonedContact.categories) {
+ for (i = 0; i < clonedContact.categories.length; i++) {
+ clonedContact.categories[i].id = null;
+ }
+ }
+ if (clonedContact.photos) {
+ for (i = 0; i < clonedContact.photos.length; i++) {
+ clonedContact.photos[i].id = null;
+ }
+ }
+ if (clonedContact.urls) {
+ for (i = 0; i < clonedContact.urls.length; i++) {
+ clonedContact.urls[i].id = null;
+ }
+ }
+ return clonedContact;
+};
+
+/**
+* Persists contact to device storage.
+* @param successCB success callback
+* @param errorCB error callback
+*/
+Contact.prototype.save = function(successCB, errorCB) {
+ var fail = function(code) {
+ errorCB(new ContactError(code));
+ };
+ var success = function(result) {
+ if (result) {
+ if (typeof successCB === 'function') {
+ var fullContact = require('cordova/plugin/contacts').create(result);
+ successCB(convertIn(fullContact));
+ }
+ }
+ else {
+ // no Entry object returned
+ fail(ContactError.UNKNOWN_ERROR);
+ }
+ };
+ var dupContact = convertOut(utils.clone(this));
+ exec(success, fail, "Contacts", "save", [dupContact]);
+};
+
+
+module.exports = Contact;
+
+});
+
+// file: lib/common/plugin/ContactAddress.js
+define("cordova/plugin/ContactAddress", function(require, exports, module) {
+/**
+* Contact address.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code
+* @param formatted // NOTE: not a W3C standard
+* @param streetAddress
+* @param locality
+* @param region
+* @param postalCode
+* @param country
+*/
+
+var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
+ this.id = null;
+ this.pref = (typeof pref != 'undefined' ? pref : false);
+ this.type = type || null;
+ this.formatted = formatted || null;
+ this.streetAddress = streetAddress || null;
+ this.locality = locality || null;
+ this.region = region || null;
+ this.postalCode = postalCode || null;
+ this.country = country || null;
+};
+
+module.exports = ContactAddress;
+});
+
+// file: lib/common/plugin/ContactError.js
+define("cordova/plugin/ContactError", function(require, exports, module) {
+/**
+ * ContactError.
+ * An error code assigned by an implementation when an error has occured
+ * @constructor
+ */
+var ContactError = function(err) {
+ this.code = (typeof err != 'undefined' ? err : null);
+};
+
+/**
+ * Error codes
+ */
+ContactError.UNKNOWN_ERROR = 0;
+ContactError.INVALID_ARGUMENT_ERROR = 1;
+ContactError.TIMEOUT_ERROR = 2;
+ContactError.PENDING_OPERATION_ERROR = 3;
+ContactError.IO_ERROR = 4;
+ContactError.NOT_SUPPORTED_ERROR = 5;
+ContactError.PERMISSION_DENIED_ERROR = 20;
+
+module.exports = ContactError;
+});
+
+// file: lib/common/plugin/ContactField.js
+define("cordova/plugin/ContactField", function(require, exports, module) {
+/**
+* Generic contact field.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
+* @param type
+* @param value
+* @param pref
+*/
+var ContactField = function(type, value, pref) {
+ this.id = null;
+ this.type = (type && type.toString()) || null;
+ this.value = (value && value.toString()) || null;
+ this.pref = (typeof pref != 'undefined' ? pref : false);
+};
+
+module.exports = ContactField;
+});
+
+// file: lib/common/plugin/ContactFindOptions.js
+define("cordova/plugin/ContactFindOptions", function(require, exports, module) {
+/**
+ * ContactFindOptions.
+ * @constructor
+ * @param filter used to match contacts against
+ * @param multiple boolean used to determine if more than one contact should be returned
+ */
+
+var ContactFindOptions = function(filter, multiple) {
+ this.filter = filter || '';
+ this.multiple = (typeof multiple != 'undefined' ? multiple : false);
+};
+
+module.exports = ContactFindOptions;
+});
+
+// file: lib/common/plugin/ContactName.js
+define("cordova/plugin/ContactName", function(require, exports, module) {
+/**
+* Contact name.
+* @constructor
+* @param formatted // NOTE: not part of W3C standard
+* @param familyName
+* @param givenName
+* @param middle
+* @param prefix
+* @param suffix
+*/
+var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
+ this.formatted = formatted || null;
+ this.familyName = familyName || null;
+ this.givenName = givenName || null;
+ this.middleName = middle || null;
+ this.honorificPrefix = prefix || null;
+ this.honorificSuffix = suffix || null;
+};
+
+module.exports = ContactName;
+});
+
+// file: lib/common/plugin/ContactOrganization.js
+define("cordova/plugin/ContactOrganization", function(require, exports, module) {
+/**
+* Contact organization.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
+* @param name
+* @param dept
+* @param title
+* @param startDate
+* @param endDate
+* @param location
+* @param desc
+*/
+
+var ContactOrganization = function(pref, type, name, dept, title) {
+ this.id = null;
+ this.pref = (typeof pref != 'undefined' ? pref : false);
+ this.type = type || null;
+ this.name = name || null;
+ this.department = dept || null;
+ this.title = title || null;
+};
+
+module.exports = ContactOrganization;
+});
+
+// file: lib/common/plugin/Coordinates.js
+define("cordova/plugin/Coordinates", function(require, exports, module) {
+/**
+ * This class contains position information.
+ * @param {Object} lat
+ * @param {Object} lng
+ * @param {Object} alt
+ * @param {Object} acc
+ * @param {Object} head
+ * @param {Object} vel
+ * @param {Object} altacc
+ * @constructor
+ */
+var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
+ /**
+ * The latitude of the position.
+ */
+ this.latitude = lat;
+ /**
+ * The longitude of the position,
+ */
+ this.longitude = lng;
+ /**
+ * The accuracy of the position.
+ */
+ this.accuracy = acc;
+ /**
+ * The altitude of the position.
+ */
+ this.altitude = (alt !== undefined ? alt : null);
+ /**
+ * The direction the device is moving at the position.
+ */
+ this.heading = (head !== undefined ? head : null);
+ /**
+ * The velocity with which the device is moving at the position.
+ */
+ this.speed = (vel !== undefined ? vel : null);
+
+ if (this.speed === 0 || this.speed === null) {
+ this.heading = NaN;
+ }
+
+ /**
+ * The altitude accuracy of the position.
+ */
+ this.altitudeAccuracy = (altacc !== undefined) ? altacc : null;
+};
+
+module.exports = Coordinates;
+
+});
+
+// file: lib/common/plugin/DirectoryEntry.js
+define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec'),
+ Entry = require('cordova/plugin/Entry'),
+ FileError = require('cordova/plugin/FileError'),
+ DirectoryReader = require('cordova/plugin/DirectoryReader');
+
+/**
+ * An interface representing a directory on the file system.
+ *
+ * {boolean} isFile always false (readonly)
+ * {boolean} isDirectory always true (readonly)
+ * {DOMString} name of the directory, excluding the path leading to it (readonly)
+ * {DOMString} fullPath the absolute full path to the directory (readonly)
+ * {FileSystem} filesystem on which the directory resides (readonly)
+ */
+var DirectoryEntry = function(name, fullPath) {
+ DirectoryEntry.__super__.constructor.apply(this, [false, true, name, fullPath]);
+};
+
+utils.extend(DirectoryEntry, Entry);
+
+/**
+ * Creates a new DirectoryReader to read entries from this directory
+ */
+DirectoryEntry.prototype.createReader = function() {
+ return new DirectoryReader(this.fullPath);
+};
+
+/**
+ * Creates or looks up a directory
+ *
+ * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
+ * @param {Flags} options to create or excluively create the directory
+ * @param {Function} successCallback is called with the new entry
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryEntry.prototype.getDirectory = function(path, options, successCallback, errorCallback) {
+ var win = typeof successCallback !== 'function' ? null : function(result) {
+ var entry = new DirectoryEntry(result.name, result.fullPath);
+ successCallback(entry);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(win, fail, "File", "getDirectory", [this.fullPath, path, options]);
+};
+
+/**
+ * Deletes a directory and all of it's contents
+ *
+ * @param {Function} successCallback is called with no parameters
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryEntry.prototype.removeRecursively = function(successCallback, errorCallback) {
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(successCallback, fail, "File", "removeRecursively", [this.fullPath]);
+};
+
+/**
+ * Creates or looks up a file
+ *
+ * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
+ * @param {Flags} options to create or excluively create the file
+ * @param {Function} successCallback is called with the new entry
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {
+ var win = typeof successCallback !== 'function' ? null : function(result) {
+ var FileEntry = require('cordova/plugin/FileEntry');
+ var entry = new FileEntry(result.name, result.fullPath);
+ successCallback(entry);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(win, fail, "File", "getFile", [this.fullPath, path, options]);
+};
+
+module.exports = DirectoryEntry;
+
+});
+
+// file: lib/common/plugin/DirectoryReader.js
+define("cordova/plugin/DirectoryReader", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError') ;
+
+/**
+ * An interface that lists the files and directories in a directory.
+ */
+function DirectoryReader(path) {
+ this.path = path || null;
+}
+
+/**
+ * Returns a list of entries from a directory.
+ *
+ * @param {Function} successCallback is called with a list of entries
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryReader.prototype.readEntries = function(successCallback, errorCallback) {
+ var win = typeof successCallback !== 'function' ? null : function(result) {
+ var retVal = [];
+ for (var i=0; i<result.length; i++) {
+ var entry = null;
+ if (result[i].isDirectory) {
+ entry = new (require('cordova/plugin/DirectoryEntry'))();
+ }
+ else if (result[i].isFile) {
+ entry = new (require('cordova/plugin/FileEntry'))();
+ }
+ entry.isDirectory = result[i].isDirectory;
+ entry.isFile = result[i].isFile;
+ entry.name = result[i].name;
+ entry.fullPath = result[i].fullPath;
+ retVal.push(entry);
+ }
+ successCallback(retVal);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(win, fail, "File", "readEntries", [this.path]);
+};
+
+module.exports = DirectoryReader;
+
+});
+
+// file: lib/common/plugin/Entry.js
+define("cordova/plugin/Entry", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError'),
+ Metadata = require('cordova/plugin/Metadata');
+
+/**
+ * Represents a file or directory on the local file system.
+ *
+ * @param isFile
+ * {boolean} true if Entry is a file (readonly)
+ * @param isDirectory
+ * {boolean} true if Entry is a directory (readonly)
+ * @param name
+ * {DOMString} name of the file or directory, excluding the path
+ * leading to it (readonly)
+ * @param fullPath
+ * {DOMString} the absolute full path to the file or directory
+ * (readonly)
+ */
+function Entry(isFile, isDirectory, name, fullPath, fileSystem) {
+ this.isFile = (typeof isFile != 'undefined'?isFile:false);
+ this.isDirectory = (typeof isDirectory != 'undefined'?isDirectory:false);
+ this.name = name || '';
+ this.fullPath = fullPath || '';
+ this.filesystem = fileSystem || null;
+}
+
+/**
+ * Look up the metadata of the entry.
+ *
+ * @param successCallback
+ * {Function} is called with a Metadata object
+ * @param errorCallback
+ * {Function} is called with a FileError
+ */
+Entry.prototype.getMetadata = function(successCallback, errorCallback) {
+ var success = typeof successCallback !== 'function' ? null : function(lastModified) {
+ var metadata = new Metadata(lastModified);
+ successCallback(metadata);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+
+ exec(success, fail, "File", "getMetadata", [this.fullPath]);
+};
+
+/**
+ * Set the metadata of the entry.
+ *
+ * @param successCallback
+ * {Function} is called with a Metadata object
+ * @param errorCallback
+ * {Function} is called with a FileError
+ * @param metadataObject
+ * {Object} keys and values to set
+ */
+Entry.prototype.setMetadata = function(successCallback, errorCallback, metadataObject) {
+
+ exec(successCallback, errorCallback, "File", "setMetadata", [this.fullPath, metadataObject]);
+};
+
+/**
+ * Move a file or directory to a new location.
+ *
+ * @param parent
+ * {DirectoryEntry} the directory to which to move this entry
+ * @param newName
+ * {DOMString} new name of the entry, defaults to the current name
+ * @param successCallback
+ * {Function} called with the new DirectoryEntry object
+ * @param errorCallback
+ * {Function} called with a FileError
+ */
+Entry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
+ var fail = function(code) {
+ if (typeof errorCallback === 'function') {
+ errorCallback(new FileError(code));
+ }
+ };
+ // user must specify parent Entry
+ if (!parent) {
+ fail(FileError.NOT_FOUND_ERR);
+ return;
+ }
+ // source path
+ var srcPath = this.fullPath,
+ // entry name
+ name = newName || this.name,
+ success = function(entry) {
+ if (entry) {
+ if (typeof successCallback === 'function') {
+ // create appropriate Entry object
+ var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
+ try {
+ successCallback(result);
+ }
+ catch (e) {
+ console.log('Error invoking callback: ' + e);
+ }
+ }
+ }
+ else {
+ // no Entry object returned
+ fail(FileError.NOT_FOUND_ERR);
+ }
+ };
+
+ // copy
+ exec(success, fail, "File", "moveTo", [srcPath, parent.fullPath, name]);
+};
+
+/**
+ * Copy a directory to a different location.
+ *
+ * @param parent
+ * {DirectoryEntry} the directory to which to copy the entry
+ * @param newName
+ * {DOMString} new name of the entry, defaults to the current name
+ * @param successCallback
+ * {Function} called with the new Entry object
+ * @param errorCallback
+ * {Function} called with a FileError
+ */
+Entry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
+ var fail = function(code) {
+ if (typeof errorCallback === 'function') {
+ errorCallback(new FileError(code));
+ }
+ };
+
+ // user must specify parent Entry
+ if (!parent) {
+ fail(FileError.NOT_FOUND_ERR);
+ return;
+ }
+
+ // source path
+ var srcPath = this.fullPath,
+ // entry name
+ name = newName || this.name,
+ // success callback
+ success = function(entry) {
+ if (entry) {
+ if (typeof successCallback === 'function') {
+ // create appropriate Entry object
+ var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
+ try {
+ successCallback(result);
+ }
+ catch (e) {
+ console.log('Error invoking callback: ' + e);
+ }
+ }
+ }
+ else {
+ // no Entry object returned
+ fail(FileError.NOT_FOUND_ERR);
+ }
+ };
+
+ // copy
+ exec(success, fail, "File", "copyTo", [srcPath, parent.fullPath, name]);
+};
+
+/**
+ * Return a URL that can be used to identify this entry.
+ */
+Entry.prototype.toURL = function() {
+ // fullPath attribute contains the full URL
+ return this.fullPath;
+};
+
+/**
+ * Returns a URI that can be used to identify this entry.
+ *
+ * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
+ * @return uri
+ */
+Entry.prototype.toURI = function(mimeType) {
+ console.log("DEPRECATED: Update your code to use 'toURL'");
+ // fullPath attribute contains the full URI
+ return this.toURL();
+};
+
+/**
+ * Remove a file or directory. It is an error to attempt to delete a
+ * directory that is not empty. It is an error to attempt to delete a
+ * root directory of a file system.
+ *
+ * @param successCallback {Function} called with no parameters
+ * @param errorCallback {Function} called with a FileError
+ */
+Entry.prototype.remove = function(successCallback, errorCallback) {
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(successCallback, fail, "File", "remove", [this.fullPath]);
+};
+
+/**
+ * Look up the parent DirectoryEntry of this entry.
+ *
+ * @param successCallback {Function} called with the parent DirectoryEntry object
+ * @param errorCallback {Function} called with a FileError
+ */
+Entry.prototype.getParent = function(successCallback, errorCallback) {
+ var win = typeof successCallback !== 'function' ? null : function(result) {
+ var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
+ var entry = new DirectoryEntry(result.name, result.fullPath);
+ successCallback(entry);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(win, fail, "File", "getParent", [this.fullPath]);
+};
+
+module.exports = Entry;
+});
+
+// file: lib/common/plugin/File.js
+define("cordova/plugin/File", function(require, exports, module) {
+/**
+ * Constructor.
+ * name {DOMString} name of the file, without path information
+ * fullPath {DOMString} the full path of the file, including the name
+ * type {DOMString} mime type
+ * lastModifiedDate {Date} last modified date
+ * size {Number} size of the file in bytes
+ */
+
+var File = function(name, fullPath, type, lastModifiedDate, size){
+ this.name = name || '';
+ this.fullPath = fullPath || null;
+ this.type = type || null;
+ this.lastModifiedDate = lastModifiedDate || null;
+ this.size = size || 0;
+};
+
+module.exports = File;
+});
+
+// file: lib/common/plugin/FileEntry.js
+define("cordova/plugin/FileEntry", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec'),
+ Entry = require('cordova/plugin/Entry'),
+ FileWriter = require('cordova/plugin/FileWriter'),
+ File = require('cordova/plugin/File'),
+ FileError = require('cordova/plugin/FileError');
+
+/**
+ * An interface representing a file on the file system.
+ *
+ * {boolean} isFile always true (readonly)
+ * {boolean} isDirectory always false (readonly)
+ * {DOMString} name of the file, excluding the path leading to it (readonly)
+ * {DOMString} fullPath the absolute full path to the file (readonly)
+ * {FileSystem} filesystem on which the file resides (readonly)
+ */
+var FileEntry = function(name, fullPath) {
+ FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath]);
+};
+
+utils.extend(FileEntry, Entry);
+
+/**
+ * Creates a new FileWriter associated with the file that this FileEntry represents.
+ *
+ * @param {Function} successCallback is called with the new FileWriter
+ * @param {Function} errorCallback is called with a FileError
+ */
+FileEntry.prototype.createWriter = function(successCallback, errorCallback) {
+ this.file(function(filePointer) {
+ var writer = new FileWriter(filePointer);
+
+ if (writer.fileName === null || writer.fileName === "") {
+ if (typeof errorCallback === "function") {
+ errorCallback(new FileError(FileError.INVALID_STATE_ERR));
+ }
+ } else {
+ if (typeof successCallback === "function") {
+ successCallback(writer);
+ }
+ }
+ }, errorCallback);
+};
+
+/**
+ * Returns a File that represents the current state of the file that this FileEntry represents.
+ *
+ * @param {Function} successCallback is called with the new File object
+ * @param {Function} errorCallback is called with a FileError
+ */
+FileEntry.prototype.file = function(successCallback, errorCallback) {
+ var win = typeof successCallback !== 'function' ? null : function(f) {
+ var file = new File(f.name, f.fullPath, f.type, f.lastModifiedDate, f.size);
+ successCallback(file);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(win, fail, "File", "getFileMetadata", [this.fullPath]);
+};
+
+
+module.exports = FileEntry;
+});
+
+// file: lib/common/plugin/FileError.js
+define("cordova/plugin/FileError", function(require, exports, module) {
+/**
+ * FileError
+ */
+function FileError(error) {
+ this.code = error || null;
+}
+
+// File error codes
+// Found in DOMException
+FileError.NOT_FOUND_ERR = 1;
+FileError.SECURITY_ERR = 2;
+FileError.ABORT_ERR = 3;
+
+// Added by File API specification
+FileError.NOT_READABLE_ERR = 4;
+FileError.ENCODING_ERR = 5;
+FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
+FileError.INVALID_STATE_ERR = 7;
+FileError.SYNTAX_ERR = 8;
+FileError.INVALID_MODIFICATION_ERR = 9;
+FileError.QUOTA_EXCEEDED_ERR = 10;
+FileError.TYPE_MISMATCH_ERR = 11;
+FileError.PATH_EXISTS_ERR = 12;
+
+module.exports = FileError;
+});
+
+// file: lib/common/plugin/FileReader.js
+define("cordova/plugin/FileReader", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError'),
+ ProgressEvent = require('cordova/plugin/ProgressEvent');
+
+/**
+ * This class reads the mobile device file system.
+ *
+ * For Android:
+ * The root directory is the root of the file system.
+ * To read from the SD card, the file name is "sdcard/my_file.txt"
+ * @constructor
+ */
+var FileReader = function() {
+ this.fileName = "";
+
+ this.readyState = 0; // FileReader.EMPTY
+
+ // File data
+ this.result = null;
+
+ // Error
+ this.error = null;
+
+ // Event handlers
+ this.onloadstart = null; // When the read starts.
+ this.onprogress = null; // While reading (and decoding) file or fileBlob data, and reporting partial file data (progess.loaded/progress.total)
+ this.onload = null; // When the read has successfully completed.
+ this.onerror = null; // When the read has failed (see errors).
+ this.onloadend = null; // When the request has completed (either in success or failure).
+ this.onabort = null; // When the read has been aborted. For instance, by invoking the abort() method.
+};
+
+// States
+FileReader.EMPTY = 0;
+FileReader.LOADING = 1;
+FileReader.DONE = 2;
+
+/**
+ * Abort reading file.
+ */
+FileReader.prototype.abort = function() {
+ this.result = null;
+
+ if (this.readyState == FileReader.DONE || this.readyState == FileReader.EMPTY) {
+ return;
+ }
+
+ this.readyState = FileReader.DONE;
+
+ // If abort callback
+ if (typeof this.onabort === 'function') {
+ this.onabort(new ProgressEvent('abort', {target:this}));
+ }
+ // If load end callback
+ if (typeof this.onloadend === 'function') {
+ this.onloadend(new ProgressEvent('loadend', {target:this}));
+ }
+};
+
+/**
+ * Read text file.
+ *
+ * @param file {File} File object containing file properties
+ * @param encoding [Optional] (see http://www.iana.org/assignments/character-sets)
+ */
+FileReader.prototype.readAsText = function(file, encoding) {
+ // Figure out pathing
+ this.fileName = '';
+ if (typeof file.fullPath === 'undefined') {
+ this.fileName = file;
+ } else {
+ this.fileName = file.fullPath;
+ }
+
+ // Already loading something
+ if (this.readyState == FileReader.LOADING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // LOADING state
+ this.readyState = FileReader.LOADING;
+
+ // If loadstart callback
+ if (typeof this.onloadstart === "function") {
+ this.onloadstart(new ProgressEvent("loadstart", {target:this}));
+ }
+
+ // Default encoding is UTF-8
+ var enc = encoding ? encoding : "UTF-8";
+
+ var me = this;
+
+ // Read file
+ exec(
+ // Success callback
+ function(r) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // Save result
+ me.result = r;
+
+ // If onload callback
+ if (typeof me.onload === "function") {
+ me.onload(new ProgressEvent("load", {target:me}));
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ },
+ // Error callback
+ function(e) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ // null result
+ me.result = null;
+
+ // Save error
+ me.error = new FileError(e);
+
+ // If onerror callback
+ if (typeof me.onerror === "function") {
+ me.onerror(new ProgressEvent("error", {target:me}));
+ }
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ }, "File", "readAsText", [this.fileName, enc]);
+};
+
+
+/**
+ * Read file and return data as a base64 encoded data url.
+ * A data url is of the form:
+ * data:[<mediatype>][;base64],<data>
+ *
+ * @param file {File} File object containing file properties
+ */
+FileReader.prototype.readAsDataURL = function(file) {
+ this.fileName = "";
+ if (typeof file.fullPath === "undefined") {
+ this.fileName = file;
+ } else {
+ this.fileName = file.fullPath;
+ }
+
+ // Already loading something
+ if (this.readyState == FileReader.LOADING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // LOADING state
+ this.readyState = FileReader.LOADING;
+
+ // If loadstart callback
+ if (typeof this.onloadstart === "function") {
+ this.onloadstart(new ProgressEvent("loadstart", {target:this}));
+ }
+
+ var me = this;
+
+ // Read file
+ exec(
+ // Success callback
+ function(r) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ // Save result
+ me.result = r;
+
+ // If onload callback
+ if (typeof me.onload === "function") {
+ me.onload(new ProgressEvent("load", {target:me}));
+ }
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ },
+ // Error callback
+ function(e) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ me.result = null;
+
+ // Save error
+ me.error = new FileError(e);
+
+ // If onerror callback
+ if (typeof me.onerror === "function") {
+ me.onerror(new ProgressEvent("error", {target:me}));
+ }
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ }, "File", "readAsDataURL", [this.fileName]);
+};
+
+/**
+ * Read file and return data as a binary data.
+ *
+ * @param file {File} File object containing file properties
+ */
+FileReader.prototype.readAsBinaryString = function(file) {
+ // TODO - Can't return binary data to browser.
+ console.log('method "readAsBinaryString" is not supported at this time.');
+};
+
+/**
+ * Read file and return data as a binary data.
+ *
+ * @param file {File} File object containing file properties
+ */
+FileReader.prototype.readAsArrayBuffer = function(file) {
+ // TODO - Can't return binary data to browser.
+ console.log('This method is not supported at this time.');
+};
+
+module.exports = FileReader;
+});
+
+// file: lib/common/plugin/FileSystem.js
+define("cordova/plugin/FileSystem", function(require, exports, module) {
+var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
+
+/**
+ * An interface representing a file system
+ *
+ * @constructor
+ * {DOMString} name the unique name of the file system (readonly)
+ * {DirectoryEntry} root directory of the file system (readonly)
+ */
+var FileSystem = function(name, root) {
+ this.name = name || null;
+ if (root) {
+ this.root = new DirectoryEntry(root.name, root.fullPath);
+ }
+};
+
+module.exports = FileSystem;
+});
+
+// file: lib/common/plugin/FileTransfer.js
+define("cordova/plugin/FileTransfer", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * FileTransfer uploads a file to a remote server.
+ * @constructor
+ */
+var FileTransfer = function() {};
+
+/**
+* Given an absolute file path, uploads a file on the device to a remote server
+* using a multipart HTTP request.
+* @param filePath {String} Full path of the file on the device
+* @param server {String} URL of the server to receive the file
+* @param successCallback (Function} Callback to be invoked when upload has completed
+* @param errorCallback {Function} Callback to be invoked upon error
+* @param options {FileUploadOptions} Optional parameters such as file name and mimetype
+* @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
+*/
+FileTransfer.prototype.upload = function(filePath, server, successCallback, errorCallback, options, trustAllHosts) {
+ // check for options
+ var fileKey = null;
+ var fileName = null;
+ var mimeType = null;
+ var params = null;
+ var chunkedMode = true;
+ if (options) {
+ fileKey = options.fileKey;
+ fileName = options.fileName;
+ mimeType = options.mimeType;
+ if (options.chunkedMode !== null || typeof options.chunkedMode != "undefined") {
+ chunkedMode = options.chunkedMode;
+ }
+ if (options.params) {
+ params = options.params;
+ }
+ else {
+ params = {};
+ }
+ }
+
+ exec(successCallback, errorCallback, 'FileTransfer', 'upload', [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode]);
+};
+
+/**
+ * Downloads a file form a given URL and saves it to the specified directory.
+ * @param source {String} URL of the server to receive the file
+ * @param target {String} Full path of the file on the device
+ * @param successCallback (Function} Callback to be invoked when upload has completed
+ * @param errorCallback {Function} Callback to be invoked upon error
+ */
+FileTransfer.prototype.download = function(source, target, successCallback, errorCallback) {
+ var win = function(result) {
+ var entry = null;
+ if (result.isDirectory) {
+ entry = new (require('cordova/plugin/DirectoryEntry'))();
+ }
+ else if (result.isFile) {
+ entry = new (require('cordova/plugin/FileEntry'))();
+ }
+ entry.isDirectory = result.isDirectory;
+ entry.isFile = result.isFile;
+ entry.name = result.name;
+ entry.fullPath = result.fullPath;
+ successCallback(entry);
+ };
+ exec(win, errorCallback, 'FileTransfer', 'download', [source, target]);
+};
+
+module.exports = FileTransfer;
+
+});
+
+// file: lib/common/plugin/FileTransferError.js
+define("cordova/plugin/FileTransferError", function(require, exports, module) {
+/**
+ * FileTransferError
+ * @constructor
+ */
+var FileTransferError = function(code) {
+ this.code = code || null;
+};
+
+FileTransferError.FILE_NOT_FOUND_ERR = 1;
+FileTransferError.INVALID_URL_ERR = 2;
+FileTransferError.CONNECTION_ERR = 3;
+
+module.exports = FileTransferError;
+});
+
+// file: lib/common/plugin/FileUploadOptions.js
+define("cordova/plugin/FileUploadOptions", function(require, exports, module) {
+/**
+ * Options to customize the HTTP request used to upload files.
+ * @constructor
+ * @param fileKey {String} Name of file request parameter.
+ * @param fileName {String} Filename to be used by the server. Defaults to image.jpg.
+ * @param mimeType {String} Mimetype of the uploaded file. Defaults to image/jpeg.
+ * @param params {Object} Object with key: value params to send to the server.
+ */
+var FileUploadOptions = function(fileKey, fileName, mimeType, params) {
+ this.fileKey = fileKey || null;
+ this.fileName = fileName || null;
+ this.mimeType = mimeType || null;
+ this.params = params || null;
+};
+
+module.exports = FileUploadOptions;
+});
+
+// file: lib/common/plugin/FileUploadResult.js
+define("cordova/plugin/FileUploadResult", function(require, exports, module) {
+/**
+ * FileUploadResult
+ * @constructor
+ */
+var FileUploadResult = function() {
+ this.bytesSent = 0;
+ this.responseCode = null;
+ this.response = null;
+};
+
+module.exports = FileUploadResult;
+});
+
+// file: lib/common/plugin/FileWriter.js
+define("cordova/plugin/FileWriter", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError'),
+ ProgressEvent = require('cordova/plugin/ProgressEvent');
+
+/**
+ * This class writes to the mobile device file system.
+ *
+ * For Android:
+ * The root directory is the root of the file system.
+ * To write to the SD card, the file name is "sdcard/my_file.txt"
+ *
+ * @constructor
+ * @param file {File} File object containing file properties
+ * @param append if true write to the end of the file, otherwise overwrite the file
+ */
+var FileWriter = function(file) {
+ this.fileName = "";
+ this.length = 0;
+ if (file) {
+ this.fileName = file.fullPath || file;
+ this.length = file.size || 0;
+ }
+ // default is to write at the beginning of the file
+ this.position = 0;
+
+ this.readyState = 0; // EMPTY
+
+ this.result = null;
+
+ // Error
+ this.error = null;
+
+ // Event handlers
+ this.onwritestart = null; // When writing starts
+ this.onprogress = null; // While writing the file, and reporting partial file data
+ this.onwrite = null; // When the write has successfully completed.
+ this.onwriteend = null; // When the request has completed (either in success or failure).
+ this.onabort = null; // When the write has been aborted. For instance, by invoking the abort() method.
+ this.onerror = null; // When the write has failed (see errors).
+};
+
+// States
+FileWriter.INIT = 0;
+FileWriter.WRITING = 1;
+FileWriter.DONE = 2;
+
+/**
+ * Abort writing file.
+ */
+FileWriter.prototype.abort = function() {
+ // check for invalid state
+ if (this.readyState === FileWriter.DONE || this.readyState === FileWriter.INIT) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // set error
+ this.error = new FileError(FileError.ABORT_ERR);
+
+ this.readyState = FileWriter.DONE;
+
+ // If abort callback
+ if (typeof this.onabort === "function") {
+ this.onabort(new ProgressEvent("abort", {"target":this}));
+ }
+
+ // If write end callback
+ if (typeof this.onwriteend === "function") {
+ this.onwriteend(new ProgressEvent("writeend", {"target":this}));
+ }
+};
+
+/**
+ * Writes data to the file
+ *
+ * @param text to be written
+ */
+FileWriter.prototype.write = function(text) {
+ // Throw an exception if we are already writing a file
+ if (this.readyState === FileWriter.WRITING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // WRITING state
+ this.readyState = FileWriter.WRITING;
+
+ var me = this;
+
+ // If onwritestart callback
+ if (typeof me.onwritestart === "function") {
+ me.onwritestart(new ProgressEvent("writestart", {"target":me}));
+ }
+
+ // Write file
+ exec(
+ // Success callback
+ function(r) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileWriter.DONE) {
+ return;
+ }
+
+ // position always increases by bytes written because file would be extended
+ me.position += r;
+ // The length of the file is now where we are done writing.
+
+ me.length = me.position;
+
+ // DONE state
+ me.readyState = FileWriter.DONE;
+
+ // If onwrite callback
+ if (typeof me.onwrite === "function") {
+ me.onwrite(new ProgressEvent("write", {"target":me}));
+ }
+
+ // If onwriteend callback
+ if (typeof me.onwriteend === "function") {
+ me.onwriteend(new ProgressEvent("writeend", {"target":me}));
+ }
+ },
+ // Error callback
+ function(e) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileWriter.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileWriter.DONE;
+
+ // Save error
+ me.error = new FileError(e);
+
+ // If onerror callback
+ if (typeof me.onerror === "function") {
+ me.onerror(new ProgressEvent("error", {"target":me}));
+ }
+
+ // If onwriteend callback
+ if (typeof me.onwriteend === "function") {
+ me.onwriteend(new ProgressEvent("writeend", {"target":me}));
+ }
+ }, "File", "write", [this.fileName, text, this.position]);
+};
+
+/**
+ * Moves the file pointer to the location specified.
+ *
+ * If the offset is a negative number the position of the file
+ * pointer is rewound. If the offset is greater than the file
+ * size the position is set to the end of the file.
+ *
+ * @param offset is the location to move the file pointer to.
+ */
+FileWriter.prototype.seek = function(offset) {
+ // Throw an exception if we are already writing a file
+ if (this.readyState === FileWriter.WRITING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ if (!offset && offset !== 0) {
+ return;
+ }
+
+ // See back from end of file.
+ if (offset < 0) {
+ this.position = Math.max(offset + this.length, 0);
+ }
+ // Offset is bigger then file size so set position
+ // to the end of the file.
+ else if (offset > this.length) {
+ this.position = this.length;
+ }
+ // Offset is between 0 and file size so set the position
+ // to start writing.
+ else {
+ this.position = offset;
+ }
+};
+
+/**
+ * Truncates the file to the size specified.
+ *
+ * @param size to chop the file at.
+ */
+FileWriter.prototype.truncate = function(size) {
+ // Throw an exception if we are already writing a file
+ if (this.readyState === FileWriter.WRITING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // WRITING state
+ this.readyState = FileWriter.WRITING;
+
+ var me = this;
+
+ // If onwritestart callback
+ if (typeof me.onwritestart === "function") {
+ me.onwritestart(new ProgressEvent("writestart", {"target":this}));
+ }
+
+ // Write file
+ exec(
+ // Success callback
+ function(r) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileWriter.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileWriter.DONE;
+
+ // Update the length of the file
+ me.length = r;
+ me.position = Math.min(me.position, r);
+
+ // If onwrite callback
+ if (typeof me.onwrite === "function") {
+ me.onwrite(new ProgressEvent("write", {"target":me}));
+ }
+
+ // If onwriteend callback
+ if (typeof me.onwriteend === "function") {
+ me.onwriteend(new ProgressEvent("writeend", {"target":me}));
+ }
+ },
+ // Error callback
+ function(e) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileWriter.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileWriter.DONE;
+
+ // Save error
+ me.error = new FileError(e);
+
+ // If onerror callback
+ if (typeof me.onerror === "function") {
+ me.onerror(new ProgressEvent("error", {"target":me}));
+ }
+
+ // If onwriteend callback
+ if (typeof me.onwriteend === "function") {
+ me.onwriteend(new ProgressEvent("writeend", {"target":me}));
+ }
+ }, "File", "truncate", [this.fileName, size]);
+};
+
+module.exports = FileWriter;
+
+});
+
+// file: lib/common/plugin/Flags.js
+define("cordova/plugin/Flags", function(require, exports, module) {
+/**
+ * Supplies arguments to methods that lookup or create files and directories.
+ *
+ * @param create
+ * {boolean} file or directory if it doesn't exist
+ * @param exclusive
+ * {boolean} used with create; if true the command will fail if
+ * target path exists
+ */
+function Flags(create, exclusive) {
+ this.create = create || false;
+ this.exclusive = exclusive || false;
+}
+
+module.exports = Flags;
+});
+
+// file: lib/common/plugin/LocalFileSystem.js
+define("cordova/plugin/LocalFileSystem", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * Represents a local file system.
+ */
+var LocalFileSystem = function() {
+
+};
+
+LocalFileSystem.TEMPORARY = 0; //temporary, with no guarantee of persistence
+LocalFileSystem.PERSISTENT = 1; //persistent
+
+module.exports = LocalFileSystem;
+});
+
+// file: lib/common/plugin/Media.js
+define("cordova/plugin/Media", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec');
+
+var mediaObjects = {};
+
+/**
+ * This class provides access to the device media, interfaces to both sound and video
+ *
+ * @constructor
+ * @param src The file name or url to play
+ * @param successCallback The callback to be called when the file is done playing or recording.
+ * successCallback()
+ * @param errorCallback The callback to be called if there is an error.
+ * errorCallback(int errorCode) - OPTIONAL
+ * @param statusCallback The callback to be called when media status has changed.
+ * statusCallback(int statusCode) - OPTIONAL
+ */
+var Media = function(src, successCallback, errorCallback, statusCallback) {
+
+ // successCallback optional
+ if (successCallback && (typeof successCallback !== "function")) {
+ console.log("Media Error: successCallback is not a function");
+ return;
+ }
+
+ // errorCallback optional
+ if (errorCallback && (typeof errorCallback !== "function")) {
+ console.log("Media Error: errorCallback is not a function");
+ return;
+ }
+
+ // statusCallback optional
+ if (statusCallback && (typeof statusCallback !== "function")) {
+ console.log("Media Error: statusCallback is not a function");
+ return;
+ }
+
+ this.id = utils.createUUID();
+ mediaObjects[this.id] = this;
+ this.src = src;
+ this.successCallback = successCallback;
+ this.errorCallback = errorCallback;
+ this.statusCallback = statusCallback;
+ this._duration = -1;
+ this._position = -1;
+ exec(null, this.errorCallback, "Media", "create", [this.id, this.src]);
+};
+
+// Media messages
+Media.MEDIA_STATE = 1;
+Media.MEDIA_DURATION = 2;
+Media.MEDIA_POSITION = 3;
+Media.MEDIA_ERROR = 9;
+
+// Media states
+Media.MEDIA_NONE = 0;
+Media.MEDIA_STARTING = 1;
+Media.MEDIA_RUNNING = 2;
+Media.MEDIA_PAUSED = 3;
+Media.MEDIA_STOPPED = 4;
+Media.MEDIA_MSG = ["None", "Starting", "Running", "Paused", "Stopped"];
+
+// "static" function to return existing objs.
+Media.get = function(id) {
+ return mediaObjects[id];
+};
+
+/**
+ * Start or resume playing audio file.
+ */
+Media.prototype.play = function(options) {
+ exec(null, null, "Media", "startPlayingAudio", [this.id, this.src, options]);
+};
+
+/**
+ * Stop playing audio file.
+ */
+Media.prototype.stop = function() {
+ var me = this;
+ exec(function() {
+ me._position = 0;
+ me.successCallback();
+ }, this.errorCallback, "Media", "stopPlayingAudio", [this.id]);
+};
+
+/**
+ * Seek or jump to a new time in the track..
+ */
+Media.prototype.seekTo = function(milliseconds) {
+ var me = this;
+ exec(function(p) {
+ me._position = p;
+ }, this.errorCallback, "Media", "seekToAudio", [this.id, milliseconds]);
+};
+
+/**
+ * Pause playing audio file.
+ */
+Media.prototype.pause = function() {
+ exec(null, this.errorCallback, "Media", "pausePlayingAudio", [this.id]);
+};
+
+/**
+ * Get duration of an audio file.
+ * The duration is only set for audio that is playing, paused or stopped.
+ *
+ * @return duration or -1 if not known.
+ */
+Media.prototype.getDuration = function() {
+ return this._duration;
+};
+
+/**
+ * Get position of audio.
+ */
+Media.prototype.getCurrentPosition = function(success, fail) {
+ var me = this;
+ exec(function(p) {
+ me._position = p;
+ success(p);
+ }, fail, "Media", "getCurrentPositionAudio", [this.id]);
+};
+
+/**
+ * Start recording audio file.
+ */
+Media.prototype.startRecord = function() {
+ exec(this.successCallback, this.errorCallback, "Media", "startRecordingAudio", [this.id, this.src]);
+};
+
+/**
+ * Stop recording audio file.
+ */
+Media.prototype.stopRecord = function() {
+ exec(this.successCallback, this.errorCallback, "Media", "stopRecordingAudio", [this.id]);
+};
+
+/**
+ * Release the resources.
+ */
+Media.prototype.release = function() {
+ exec(null, this.errorCallback, "Media", "release", [this.id]);
+};
+
+/**
+ * Adjust the volume.
+ */
+Media.prototype.setVolume = function(volume) {
+ exec(null, null, "Media", "setVolume", [this.id, volume]);
+};
+
+/**
+ * Audio has status update.
+ * PRIVATE
+ *
+ * @param id The media object id (string)
+ * @param status The status code (int)
+ * @param msg The status message (string)
+ */
+Media.onStatus = function(id, msg, value) {
+ var media = mediaObjects[id];
+ // If state update
+ if (msg === Media.MEDIA_STATE) {
+ if (value === Media.MEDIA_STOPPED) {
+ if (media.successCallback) {
+ media.successCallback();
+ }
+ }
+ if (media.statusCallback) {
+ media.statusCallback(value);
+ }
+ }
+ else if (msg === Media.MEDIA_DURATION) {
+ media._duration = value;
+ }
+ else if (msg === Media.MEDIA_ERROR) {
+ if (media.errorCallback) {
+ // value should be a MediaError object when msg == MEDIA_ERROR
+ media.errorCallback(value);
+ }
+ }
+ else if (msg === Media.MEDIA_POSITION) {
+ media._position = value;
+ }
+};
+
+module.exports = Media;
+});
+
+// file: lib/common/plugin/MediaError.js
+define("cordova/plugin/MediaError", function(require, exports, module) {
+/**
+ * This class contains information about any Media errors.
+ * @constructor
+ */
+var MediaError = function(code, msg) {
+ this.code = (code !== undefined ? code : null);
+ this.message = msg || "";
+};
+
+MediaError.MEDIA_ERR_NONE_ACTIVE = 0;
+MediaError.MEDIA_ERR_ABORTED = 1;
+MediaError.MEDIA_ERR_NETWORK = 2;
+MediaError.MEDIA_ERR_DECODE = 3;
+MediaError.MEDIA_ERR_NONE_SUPPORTED = 4;
+
+module.exports = MediaError;
+});
+
+// file: lib/common/plugin/MediaFile.js
+define("cordova/plugin/MediaFile", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec'),
+ File = require('cordova/plugin/File'),
+ CaptureError = require('cordova/plugin/CaptureError');
+/**
+ * Represents a single file.
+ *
+ * name {DOMString} name of the file, without path information
+ * fullPath {DOMString} the full path of the file, including the name
+ * type {DOMString} mime type
+ * lastModifiedDate {Date} last modified date
+ * size {Number} size of the file in bytes
+ */
+var MediaFile = function(name, fullPath, type, lastModifiedDate, size){
+ MediaFile.__super__.constructor.apply(this, arguments);
+};
+
+utils.extend(MediaFile, File);
+
+/**
+ * Request capture format data for a specific file and type
+ *
+ * @param {Function} successCB
+ * @param {Function} errorCB
+ */
+MediaFile.prototype.getFormatData = function(successCallback, errorCallback) {
+ if (typeof this.fullPath === "undefined" || this.fullPath === null) {
+ errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
+ } else {
+ exec(successCallback, errorCallback, "Capture", "getFormatData", [this.fullPath, this.type]);
+ }
+};
+
+// TODO: can we axe this?
+/**
+ * Casts a PluginResult message property (array of objects) to an array of MediaFile objects
+ * (used in Objective-C and Android)
+ *
+ * @param {PluginResult} pluginResult
+ */
+MediaFile.cast = function(pluginResult) {
+ var mediaFiles = [];
+ for (var i=0; i<pluginResult.message.length; i++) {
+ var mediaFile = new MediaFile();
+ mediaFile.name = pluginResult.message[i].name;
+ mediaFile.fullPath = pluginResult.message[i].fullPath;
+ mediaFile.type = pluginResult.message[i].type;
+ mediaFile.lastModifiedDate = pluginResult.message[i].lastModifiedDate;
+ mediaFile.size = pluginResult.message[i].size;
+ mediaFiles.push(mediaFile);
+ }
+ pluginResult.message = mediaFiles;
+ return pluginResult;
+};
+
+module.exports = MediaFile;
+
+});
+
+// file: lib/common/plugin/MediaFileData.js
+define("cordova/plugin/MediaFileData", function(require, exports, module) {
+/**
+ * MediaFileData encapsulates format information of a media file.
+ *
+ * @param {DOMString} codecs
+ * @param {long} bitrate
+ * @param {long} height
+ * @param {long} width
+ * @param {float} duration
+ */
+var MediaFileData = function(codecs, bitrate, height, width, duration){
+ this.codecs = codecs || null;
+ this.bitrate = bitrate || 0;
+ this.height = height || 0;
+ this.width = width || 0;
+ this.duration = duration || 0;
+};
+
+module.exports = MediaFileData;
+});
+
+// file: lib/common/plugin/Metadata.js
+define("cordova/plugin/Metadata", function(require, exports, module) {
+/**
+ * Information about the state of the file or directory
+ *
+ * {Date} modificationTime (readonly)
+ */
+var Metadata = function(time) {
+ this.modificationTime = (typeof time != 'undefined'?new Date(time):null);
+};
+
+module.exports = Metadata;
+});
+
+// file: lib/common/plugin/Position.js
+define("cordova/plugin/Position", function(require, exports, module) {
+var Coordinates = require('cordova/plugin/Coordinates');
+
+var Position = function(coords, timestamp) {
+ if (coords) {
+ this.coords = new Coordinates(coords.latitude, coords.longitude, coords.altitude, coords.accuracy, coords.heading, coords.velocity, coords.altitudeAccuracy);
+ } else {
+ this.coords = new Coordinates();
+ }
+ this.timestamp = (timestamp !== undefined) ? timestamp : new Date();
+};
+
+module.exports = Position;
+
+});
+
+// file: lib/common/plugin/PositionError.js
+define("cordova/plugin/PositionError", function(require, exports, module) {
+/**
+ * Position error object
+ *
+ * @constructor
+ * @param code
+ * @param message
+ */
+var PositionError = function(code, message) {
+ this.code = code || null;
+ this.message = message || '';
+};
+
+PositionError.PERMISSION_DENIED = 1;
+PositionError.POSITION_UNAVAILABLE = 2;
+PositionError.TIMEOUT = 3;
+
+module.exports = PositionError;
+});
+
+// file: lib/common/plugin/ProgressEvent.js
+define("cordova/plugin/ProgressEvent", function(require, exports, module) {
+// If ProgressEvent exists in global context, use it already, otherwise use our own polyfill
+// Feature test: See if we can instantiate a native ProgressEvent;
+// if so, use that approach,
+// otherwise fill-in with our own implementation.
+//
+// NOTE: right now we always fill in with our own. Down the road would be nice if we can use whatever is native in the webview.
+var ProgressEvent = (function() {
+ /*
+ var createEvent = function(data) {
+ var event = document.createEvent('Events');
+ event.initEvent('ProgressEvent', false, false);
+ if (data) {
+ for (var i in data) {
+ if (data.hasOwnProperty(i)) {
+ event[i] = data[i];
+ }
+ }
+ if (data.target) {
+ // TODO: cannot call <some_custom_object>.dispatchEvent
+ // need to first figure out how to implement EventTarget
+ }
+ }
+ return event;
+ };
+ try {
+ var ev = createEvent({type:"abort",target:document});
+ return function ProgressEvent(type, data) {
+ data.type = type;
+ return createEvent(data);
+ };
+ } catch(e){
+ */
+ return function ProgressEvent(type, dict) {
+ this.type = type;
+ this.bubbles = false;
+ this.cancelBubble = false;
+ this.cancelable = false;
+ this.lengthComputable = false;
+ this.loaded = dict && dict.loaded ? dict.loaded : 0;
+ this.total = dict && dict.total ? dict.total : 0;
+ this.target = dict && dict.target ? dict.target : null;
+ };
+ //}
+})();
+
+module.exports = ProgressEvent;
+});
+
+// file: lib/common/plugin/accelerometer.js
+define("cordova/plugin/accelerometer", function(require, exports, module) {
+/**
+ * This class provides access to device accelerometer data.
+ * @constructor
+ */
+var utils = require("cordova/utils"),
+ exec = require("cordova/exec"),
+ Acceleration = require('cordova/plugin/Acceleration');
+
+// Is the accel sensor running?
+var running = false;
+
+// Keeps reference to watchAcceleration calls.
+var timers = {};
+
+// Array of listeners; used to keep track of when we should call start and stop.
+var listeners = [];
+
+// Last returned acceleration object from native
+var accel = null;
+
+// Tells native to start.
+function start() {
+ exec(function(a) {
+ var tempListeners = listeners.slice(0);
+ accel = new Acceleration(a.x, a.y, a.z, a.timestamp);
+ for (var i = 0, l = tempListeners.length; i < l; i++) {
+ tempListeners[i].win(accel);
+ }
+ }, function(e) {
+ var tempListeners = listeners.slice(0);
+ for (var i = 0, l = tempListeners.length; i < l; i++) {
+ tempListeners[i].fail(e);
+ }
+ }, "Accelerometer", "start", []);
+ running = true;
+}
+
+// Tells native to stop.
+function stop() {
+ exec(null, null, "Accelerometer", "stop", []);
+ running = false;
+}
+
+// Adds a callback pair to the listeners array
+function createCallbackPair(win, fail) {
+ return {win:win, fail:fail};
+}
+
+// Removes a win/fail listener pair from the listeners array
+function removeListeners(l) {
+ var idx = listeners.indexOf(l);
+ if (idx > -1) {
+ listeners.splice(idx, 1);
+ if (listeners.length === 0) {
+ stop();
+ }
+ }
+}
+
+var accelerometer = {
+ /**
+ * Asynchronously aquires the current acceleration.
+ *
+ * @param {Function} successCallback The function to call when the acceleration data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the acceleration data. (OPTIONAL)
+ * @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
+ */
+ getCurrentAcceleration: function(successCallback, errorCallback, options) {
+ // successCallback required
+ if (typeof successCallback !== "function") {
+ throw "getCurrentAcceleration must be called with at least a success callback function as first parameter.";
+ }
+
+ var p;
+ var win = function(a) {
+ successCallback(a);
+ removeListeners(p);
+ };
+ var fail = function(e) {
+ errorCallback(e);
+ removeListeners(p);
+ };
+
+ p = createCallbackPair(win, fail);
+ listeners.push(p);
+
+ if (!running) {
+ start();
+ }
+ },
+
+ /**
+ * Asynchronously aquires the acceleration repeatedly at a given interval.
+ *
+ * @param {Function} successCallback The function to call each time the acceleration data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the acceleration data. (OPTIONAL)
+ * @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
+ * @return String The watch id that must be passed to #clearWatch to stop watching.
+ */
+ watchAcceleration: function(successCallback, errorCallback, options) {
+ // Default interval (10 sec)
+ var frequency = (options && options.frequency && typeof options.frequency == 'number') ? options.frequency : 10000;
+
+ // successCallback required
+ if (typeof successCallback !== "function") {
+ throw "watchAcceleration must be called with at least a success callback function as first parameter.";
+ }
+
+ // Keep reference to watch id, and report accel readings as often as defined in frequency
+ var id = utils.createUUID();
+
+ var p = createCallbackPair(function(){}, function(e) {
+ errorCallback(e);
+ removeListeners(p);
+ });
+ listeners.push(p);
+
+ timers[id] = {
+ timer:window.setInterval(function() {
+ if (accel) {
+ successCallback(accel);
+ }
+ }, frequency),
+ listeners:p
+ };
+
+ if (running) {
+ // If we're already running then immediately invoke the success callback
+ successCallback(accel);
+ } else {
+ start();
+ }
+
+ return id;
+ },
+
+ /**
+ * Clears the specified accelerometer watch.
+ *
+ * @param {String} id The id of the watch returned from #watchAcceleration.
+ */
+ clearWatch: function(id) {
+ // Stop javascript timer & remove from timer list
+ if (id && timers[id]) {
+ window.clearInterval(timers[id].timer);
+ removeListeners(timers[id].listeners);
+ delete timers[id];
+ }
+ }
+};
+
+module.exports = accelerometer;
+
+});
+
+// file: lib/common/plugin/battery.js
+define("cordova/plugin/battery", function(require, exports, module) {
+/**
+ * This class contains information about the current battery status.
+ * @constructor
+ */
+var cordova = require('cordova'),
+ exec = require('cordova/exec');
+
+function handlers() {
+ return battery.channels.batterystatus.numHandlers +
+ battery.channels.batterylow.numHandlers +
+ battery.channels.batterycritical.numHandlers;
+}
+
+var Battery = function() {
+ this._level = null;
+ this._isPlugged = null;
+ // Create new event handlers on the window (returns a channel instance)
+ var subscriptionEvents = {
+ onSubscribe:this.onSubscribe,
+ onUnsubscribe:this.onUnsubscribe
+ };
+ this.channels = {
+ batterystatus:cordova.addWindowEventHandler("batterystatus", subscriptionEvents),
+ batterylow:cordova.addWindowEventHandler("batterylow", subscriptionEvents),
+ batterycritical:cordova.addWindowEventHandler("batterycritical", subscriptionEvents)
+ };
+};
+/**
+ * Event handlers for when callbacks get registered for the battery.
+ * Keep track of how many handlers we have so we can start and stop the native battery listener
+ * appropriately (and hopefully save on battery life!).
+ */
+Battery.prototype.onSubscribe = function() {
+ var me = battery;
+ // If we just registered the first handler, make sure native listener is started.
+ if (handlers() === 1) {
+ exec(me._status, me._error, "Battery", "start", []);
+ }
+};
+
+Battery.prototype.onUnsubscribe = function() {
+ var me = battery;
+
+ // If we just unregistered the last handler, make sure native listener is stopped.
+ if (handlers() === 0) {
+ exec(null, null, "Battery", "stop", []);
+ }
+};
+
+/**
+ * Callback for battery status
+ *
+ * @param {Object} info keys: level, isPlugged
+ */
+Battery.prototype._status = function(info) {
+ if (info) {
+ var me = battery;
+ var level = info.level;
+ if (me._level !== level || me._isPlugged !== info.isPlugged) {
+ // Fire batterystatus event
+ cordova.fireWindowEvent("batterystatus", info);
+
+ // Fire low battery event
+ if (level === 20 || level === 5) {
+ if (level === 20) {
+ cordova.fireWindowEvent("batterylow", info);
+ }
+ else {
+ cordova.fireWindowEvent("batterycritical", info);
+ }
+ }
+ }
+ me._level = level;
+ me._isPlugged = info.isPlugged;
+ }
+};
+
+/**
+ * Error callback for battery start
+ */
+Battery.prototype._error = function(e) {
+ console.log("Error initializing Battery: " + e);
+};
+
+var battery = new Battery();
+
+module.exports = battery;
+});
+
+// file: lib/common/plugin/capture.js
+define("cordova/plugin/capture", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ MediaFile = require('cordova/plugin/MediaFile');
+
+/**
+ * Launches a capture of different types.
+ *
+ * @param (DOMString} type
+ * @param {Function} successCB
+ * @param {Function} errorCB
+ * @param {CaptureVideoOptions} options
+ */
+function _capture(type, successCallback, errorCallback, options) {
+ var win = function(pluginResult) {
+ var mediaFiles = [];
+ var i;
+ for (i = 0; i < pluginResult.length; i++) {
+ var mediaFile = new MediaFile();
+ mediaFile.name = pluginResult[i].name;
+ mediaFile.fullPath = pluginResult[i].fullPath;
+ mediaFile.type = pluginResult[i].type;
+ mediaFile.lastModifiedDate = pluginResult[i].lastModifiedDate;
+ mediaFile.size = pluginResult[i].size;
+ mediaFiles.push(mediaFile);
+ }
+ successCallback(mediaFiles);
+ };
+ exec(win, errorCallback, "Capture", type, [options]);
+}
+/**
+ * The Capture interface exposes an interface to the camera and microphone of the hosting device.
+ */
+function Capture() {
+ this.supportedAudioModes = [];
+ this.supportedImageModes = [];
+ this.supportedVideoModes = [];
+}
+
+/**
+ * Launch audio recorder application for recording audio clip(s).
+ *
+ * @param {Function} successCB
+ * @param {Function} errorCB
+ * @param {CaptureAudioOptions} options
+ */
+Capture.prototype.captureAudio = function(successCallback, errorCallback, options){
+ _capture("captureAudio", successCallback, errorCallback, options);
+};
+
+/**
+ * Launch camera application for taking image(s).
+ *
+ * @param {Function} successCB
+ * @param {Function} errorCB
+ * @param {CaptureImageOptions} options
+ */
+Capture.prototype.captureImage = function(successCallback, errorCallback, options){
+ _capture("captureImage", successCallback, errorCallback, options);
+};
+
+/**
+ * Launch device camera application for recording video(s).
+ *
+ * @param {Function} successCB
+ * @param {Function} errorCB
+ * @param {CaptureVideoOptions} options
+ */
+Capture.prototype.captureVideo = function(successCallback, errorCallback, options){
+ _capture("captureVideo", successCallback, errorCallback, options);
+};
+
+
+module.exports = new Capture();
+
+});
+
+// file: lib/common/plugin/compass.js
+define("cordova/plugin/compass", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ utils = require('cordova/utils'),
+ CompassHeading = require('cordova/plugin/CompassHeading'),
+ CompassError = require('cordova/plugin/CompassError'),
+ timers = {},
+ compass = {
+ /**
+ * Asynchronously acquires the current heading.
+ * @param {Function} successCallback The function to call when the heading
+ * data is available
+ * @param {Function} errorCallback The function to call when there is an error
+ * getting the heading data.
+ * @param {CompassOptions} options The options for getting the heading data (not used).
+ */
+ getCurrentHeading:function(successCallback, errorCallback, options) {
+ // successCallback required
+ if (typeof successCallback !== "function") {
+ console.log("Compass Error: successCallback is not a function");
+ return;
+ }
+
+ // errorCallback optional
+ if (errorCallback && (typeof errorCallback !== "function")) {
+ console.log("Compass Error: errorCallback is not a function");
+ return;
+ }
+
+ var win = function(result) {
+ var ch = new CompassHeading(result.magneticHeading, result.trueHeading, result.headingAccuracy, result.timestamp);
+ successCallback(ch);
+ };
+ var fail = function(code) {
+ var ce = new CompassError(code);
+ errorCallback(ce);
+ };
+
+ // Get heading
+ exec(win, fail, "Compass", "getHeading", [options]);
+ },
+
+ /**
+ * Asynchronously acquires the heading repeatedly at a given interval.
+ * @param {Function} successCallback The function to call each time the heading
+ * data is available
+ * @param {Function} errorCallback The function to call when there is an error
+ * getting the heading data.
+ * @param {HeadingOptions} options The options for getting the heading data
+ * such as timeout and the frequency of the watch. For iOS, filter parameter
+ * specifies to watch via a distance filter rather than time.
+ */
+ watchHeading:function(successCallback, errorCallback, options) {
+ // Default interval (100 msec)
+ var frequency = (options !== undefined && options.frequency !== undefined) ? options.frequency : 100;
+ var filter = (options !== undefined && options.filter !== undefined) ? options.filter : 0;
+
+ // successCallback required
+ if (typeof successCallback !== "function") {
+ console.log("Compass Error: successCallback is not a function");
+ return;
+ }
+
+ // errorCallback optional
+ if (errorCallback && (typeof errorCallback !== "function")) {
+ console.log("Compass Error: errorCallback is not a function");
+ return;
+ }
+
+ var id = utils.createUUID();
+ if (filter > 0) {
+ // is an iOS request for watch by filter, no timer needed
+ timers[id] = "iOS";
+ compass.getCurrentHeading(successCallback, errorCallback, options);
+ } else {
+ // Start watch timer to get headings
+ timers[id] = window.setInterval(function() {
+ compass.getCurrentHeading(successCallback, errorCallback);
+ }, frequency);
+ }
+
+ return id;
+ },
+
+ /**
+ * Clears the specified heading watch.
+ * @param {String} watchId The ID of the watch returned from #watchHeading.
+ */
+ clearWatch:function(id) {
+ // Stop javascript timer & remove from timer list
+ if (id && timers[id]) {
+ if (timers[id] != "iOS") {
+ clearInterval(timers[id]);
+ } else {
+ // is iOS watch by filter so call into device to stop
+ exec(null, null, "Compass", "stopHeading", []);
+ }
+ delete timers[id];
+ }
+ }
+ };
+
+module.exports = compass;
+});
+
+// file: lib/common/plugin/console-via-logger.js
+define("cordova/plugin/console-via-logger", function(require, exports, module) {
+//------------------------------------------------------------------------------
+
+var logger = require("cordova/plugin/logger");
+var utils = require("cordova/utils");
+
+//------------------------------------------------------------------------------
+// object that we're exporting
+//------------------------------------------------------------------------------
+var console = module.exports;
+
+//------------------------------------------------------------------------------
+// copy of the original console object
+//------------------------------------------------------------------------------
+var WinConsole = window.console;
+
+//------------------------------------------------------------------------------
+// whether to use the logger
+//------------------------------------------------------------------------------
+var UseLogger = false;
+
+//------------------------------------------------------------------------------
+// Timers
+//------------------------------------------------------------------------------
+var Timers = {};
+
+//------------------------------------------------------------------------------
+// used for unimplemented methods
+//------------------------------------------------------------------------------
+function noop() {}
+
+//------------------------------------------------------------------------------
+// used for unimplemented methods
+//------------------------------------------------------------------------------
+console.useLogger = function (value) {
+ if (arguments.length) UseLogger = !!value;
+
+ if (UseLogger) {
+ if (logger.useConsole()) {
+ throw new Error("console and logger are too intertwingly");
+ }
+ }
+
+ return UseLogger;
+};
+
+//------------------------------------------------------------------------------
+console.log = function() {
+ if (logger.useConsole()) return;
+ logger.log.apply(logger, [].slice.call(arguments));
+};
+
+//------------------------------------------------------------------------------
+console.error = function() {
+ if (logger.useConsole()) return;
+ logger.error.apply(logger, [].slice.call(arguments));
+};
+
+//------------------------------------------------------------------------------
+console.warn = function() {
+ if (logger.useConsole()) return;
+ logger.warn.apply(logger, [].slice.call(arguments));
+};
+
+//------------------------------------------------------------------------------
+console.info = function() {
+ if (logger.useConsole()) return;
+ logger.info.apply(logger, [].slice.call(arguments));
+};
+
+//------------------------------------------------------------------------------
+console.debug = function() {
+ if (logger.useConsole()) return;
+ logger.debug.apply(logger, [].slice.call(arguments));
+};
+
+//------------------------------------------------------------------------------
+console.assert = function(expression) {
+ if (expression) return;
+
+ var message = utils.vformat(arguments[1], [].slice.call(arguments, 2));
+ console.log("ASSERT: " + message);
+};
+
+//------------------------------------------------------------------------------
+console.clear = function() {};
+
+//------------------------------------------------------------------------------
+console.dir = function(object) {
+ console.log("%o", object);
+};
+
+//------------------------------------------------------------------------------
+console.dirxml = function(node) {
+ console.log(node.innerHTML);
+};
+
+//------------------------------------------------------------------------------
+console.trace = noop;
+
+//------------------------------------------------------------------------------
+console.group = console.log;
+
+//------------------------------------------------------------------------------
+console.groupCollapsed = console.log;
+
+//------------------------------------------------------------------------------
+console.groupEnd = noop;
+
+//------------------------------------------------------------------------------
+console.time = function(name) {
+ Timers[name] = new Date().valueOf();
+};
+
+//------------------------------------------------------------------------------
+console.timeEnd = function(name) {
+ var timeStart = Timers[name];
+ if (!timeStart) {
+ console.warn("unknown timer: " + name);
+ return;
+ }
+
+ var timeElapsed = new Date().valueOf() - timeStart;
+ console.log(name + ": " + timeElapsed + "ms");
+};
+
+//------------------------------------------------------------------------------
+console.timeStamp = noop;
+
+//------------------------------------------------------------------------------
+console.profile = noop;
+
+//------------------------------------------------------------------------------
+console.profileEnd = noop;
+
+//------------------------------------------------------------------------------
+console.count = noop;
+
+//------------------------------------------------------------------------------
+console.exception = console.log;
+
+//------------------------------------------------------------------------------
+console.table = function(data, columns) {
+ console.log("%o", data);
+};
+
+//------------------------------------------------------------------------------
+// return a new function that calls both functions passed as args
+//------------------------------------------------------------------------------
+function wrapperedOrigCall(orgFunc, newFunc) {
+ return function() {
+ var args = [].slice.call(arguments);
+ try { orgFunc.apply(WinConsole, args); } catch (e) {}
+ try { newFunc.apply(console, args); } catch (e) {}
+ };
+}
+
+//------------------------------------------------------------------------------
+// For every function that exists in the original console object, that
+// also exists in the new console object, wrap the new console method
+// with one that calls both
+//------------------------------------------------------------------------------
+for (var key in console) {
+ if (typeof WinConsole[key] == "function") {
+ console[key] = wrapperedOrigCall(WinConsole[key], console[key]);
+ }
+}
+
+});
+
+// file: lib/common/plugin/contacts.js
+define("cordova/plugin/contacts", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ ContactError = require('cordova/plugin/ContactError'),
+ utils = require('cordova/utils'),
+ Contact = require('cordova/plugin/Contact');
+
+/**
+* Represents a group of Contacts.
+* @constructor
+*/
+var contacts = {
+ /**
+ * Returns an array of Contacts matching the search criteria.
+ * @param fields that should be searched
+ * @param successCB success callback
+ * @param errorCB error callback
+ * @param {ContactFindOptions} options that can be applied to contact searching
+ * @return array of Contacts matching search criteria
+ */
+ find:function(fields, successCB, errorCB, options) {
+ if (!successCB) {
+ throw new TypeError("You must specify a success callback for the find command.");
+ }
+ if (!fields || (utils.isArray(fields) && fields.length === 0)) {
+ if (typeof errorCB === "function") {
+ errorCB(new ContactError(ContactError.INVALID_ARGUMENT_ERROR));
+ }
+ } else {
+ var win = function(result) {
+ var cs = [];
+ for (var i = 0, l = result.length; i < l; i++) {
+ cs.push(contacts.create(result[i]));
+ }
+ successCB(cs);
+ };
+ exec(win, errorCB, "Contacts", "search", [fields, options]);
+ }
+ },
+
+ /**
+ * This function creates a new contact, but it does not persist the contact
+ * to device storage. To persist the contact to device storage, invoke
+ * contact.save().
+ * @param properties an object who's properties will be examined to create a new Contact
+ * @returns new Contact object
+ */
+ create:function(properties) {
+ var i;
+ var contact = new Contact();
+ for (i in properties) {
+ if (typeof contact[i] !== 'undefined' && properties.hasOwnProperty(i)) {
+ contact[i] = properties[i];
+ }
+ }
+ return contact;
+ }
+};
+
+module.exports = contacts;
+
+});
+
+// file: lib/common/plugin/geolocation.js
+define("cordova/plugin/geolocation", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec'),
+ PositionError = require('cordova/plugin/PositionError'),
+ Position = require('cordova/plugin/Position');
+
+var timers = {}; // list of timers in use
+
+// Returns default params, overrides if provided with values
+function parseParameters(options) {
+ var opt = {
+ maximumAge: 0,
+ enableHighAccuracy: false,
+ timeout: Infinity
+ };
+
+ if (options) {
+ if (options.maximumAge !== undefined && !isNaN(options.maximumAge) && options.maximumAge > 0) {
+ opt.maximumAge = options.maximumAge;
+ }
+ if (options.enableHighAccuracy !== undefined) {
+ opt.enableHighAccuracy = options.enableHighAccuracy;
+ }
+ if (options.timeout !== undefined && !isNaN(options.timeout)) {
+ if (options.timeout < 0) {
+ opt.timeout = 0;
+ } else {
+ opt.timeout = options.timeout;
+ }
+ }
+ }
+
+ return opt;
+}
+
+// Returns a timeout failure, closed over a specified timeout value and error callback.
+function createTimeout(errorCallback, timeout) {
+ var t = setTimeout(function() {
+ clearTimeout(t);
+ t = null;
+ errorCallback({
+ code:PositionError.TIMEOUT,
+ message:"Position retrieval timed out."
+ });
+ }, timeout);
+ return t;
+}
+
+var geolocation = {
+ lastPosition:null, // reference to last known (cached) position returned
+ /**
+ * Asynchronously aquires the current position.
+ *
+ * @param {Function} successCallback The function to call when the position data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the heading position. (OPTIONAL)
+ * @param {PositionOptions} options The options for getting the position data. (OPTIONAL)
+ */
+ getCurrentPosition:function(successCallback, errorCallback, options) {
+ if (arguments.length === 0) {
+ throw new Error("getCurrentPosition must be called with at least one argument.");
+ }
+ options = parseParameters(options);
+
+ // Timer var that will fire an error callback if no position is retrieved from native
+ // before the "timeout" param provided expires
+ var timeoutTimer = null;
+
+ var win = function(p) {
+ clearTimeout(timeoutTimer);
+ if (!timeoutTimer) {
+ // Timeout already happened, or native fired error callback for
+ // this geo request.
+ // Don't continue with success callback.
+ return;
+ }
+ var pos = new Position(
+ {
+ latitude:p.latitude,
+ longitude:p.longitude,
+ altitude:p.altitude,
+ accuracy:p.accuracy,
+ heading:p.heading,
+ velocity:p.velocity,
+ altitudeAccuracy:p.altitudeAccuracy
+ },
+ (p.timestamp === undefined ? new Date() : ((p.timestamp instanceof Date) ? p.timestamp : new Date(p.timestamp)))
+ );
+ geolocation.lastPosition = pos;
+ successCallback(pos);
+ };
+ var fail = function(e) {
+ clearTimeout(timeoutTimer);
+ timeoutTimer = null;
+ var err = new PositionError(e.code, e.message);
+ if (errorCallback) {
+ errorCallback(err);
+ }
+ };
+
+ // Check our cached position, if its timestamp difference with current time is less than the maximumAge, then just
+ // fire the success callback with the cached position.
+ if (geolocation.lastPosition && options.maximumAge && (((new Date()).getTime() - geolocation.lastPosition.timestamp.getTime()) <= options.maximumAge)) {
+ successCallback(geolocation.lastPosition);
+ // If the cached position check failed and the timeout was set to 0, error out with a TIMEOUT error object.
+ } else if (options.timeout === 0) {
+ fail({
+ code:PositionError.TIMEOUT,
+ message:"timeout value in PositionOptions set to 0 and no cached Position object available, or cached Position object's age exceed's provided PositionOptions' maximumAge parameter."
+ });
+ // Otherwise we have to call into native to retrieve a position.
+ } else {
+ if (options.timeout !== Infinity) {
+ // If the timeout value was not set to Infinity (default), then
+ // set up a timeout function that will fire the error callback
+ // if no successful position was retrieved before timeout expired.
+ timeoutTimer = createTimeout(fail, options.timeout);
+ } else {
+ // This is here so the check in the win function doesn't mess stuff up
+ // may seem weird but this guarantees timeoutTimer is
+ // always truthy before we call into native
+ timeoutTimer = true;
+ }
+ exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.maximumAge]);
+ }
+ return timeoutTimer;
+ },
+ /**
+ * Asynchronously watches the geolocation for changes to geolocation. When a change occurs,
+ * the successCallback is called with the new location.
+ *
+ * @param {Function} successCallback The function to call each time the location data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the location data. (OPTIONAL)
+ * @param {PositionOptions} options The options for getting the location data such as frequency. (OPTIONAL)
+ * @return String The watch id that must be passed to #clearWatch to stop watching.
+ */
+ watchPosition:function(successCallback, errorCallback, options) {
+ if (arguments.length === 0) {
+ throw new Error("watchPosition must be called with at least one argument.");
+ }
+ options = parseParameters(options);
+
+ var id = utils.createUUID();
+
+ // Tell device to get a position ASAP, and also retrieve a reference to the timeout timer generated in getCurrentPosition
+ timers[id] = geolocation.getCurrentPosition(successCallback, errorCallback, options);
+
+ var fail = function(e) {
+ clearTimeout(timers[id]);
+ var err = new PositionError(e.code, e.message);
+ if (errorCallback) {
+ errorCallback(err);
+ }
+ };
+
+ var win = function(p) {
+ clearTimeout(timers[id]);
+ if (options.timeout !== Infinity) {
+ timers[id] = createTimeout(fail, options.timeout);
+ }
+ var pos = new Position(
+ {
+ latitude:p.latitude,
+ longitude:p.longitude,
+ altitude:p.altitude,
+ accuracy:p.accuracy,
+ heading:p.heading,
+ velocity:p.velocity,
+ altitudeAccuracy:p.altitudeAccuracy
+ },
+ (p.timestamp === undefined ? new Date() : ((p.timestamp instanceof Date) ? p.timestamp : new Date(p.timestamp)))
+ );
+ geolocation.lastPosition = pos;
+ successCallback(pos);
+ };
+
+ exec(win, fail, "Geolocation", "addWatch", [id, options.enableHighAccuracy]);
+
+ return id;
+ },
+ /**
+ * Clears the specified heading watch.
+ *
+ * @param {String} id The ID of the watch returned from #watchPosition
+ */
+ clearWatch:function(id) {
+ if (id && timers[id] !== undefined) {
+ clearTimeout(timers[id]);
+ delete timers[id];
+ exec(null, null, "Geolocation", "clearWatch", [id]);
+ }
+ }
+};
+
+module.exports = geolocation;
+
+});
+
+// file: lib/ios/plugin/ios/Contact.js
+define("cordova/plugin/ios/Contact", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ ContactError = require('cordova/plugin/ContactError');
+
+/**
+ * Provides iOS Contact.display API.
+ */
+module.exports = {
+ display : function(errorCB, options) {
+ /*
+ * Display a contact using the iOS Contact Picker UI
+ * NOT part of W3C spec so no official documentation
+ *
+ * @param errorCB error callback
+ * @param options object
+ * allowsEditing: boolean AS STRING
+ * "true" to allow editing the contact
+ * "false" (default) display contact
+ */
+
+ if (this.id === null) {
+ if (typeof errorCB === "function") {
+ var errorObj = new ContactError(ContactError.UNKNOWN_ERROR);
+ errorCB(errorObj);
+ }
+ }
+ else {
+ exec(null, errorCB, "Contacts","displayContact", [this.id, options]);
+ }
+ }
+};
+});
+
+// file: lib/ios/plugin/ios/Entry.js
+define("cordova/plugin/ios/Entry", function(require, exports, module) {
+module.exports = {
+ toURL:function() {
+ // TODO: refactor path in a cross-platform way so we can eliminate
+ // these kinds of platform-specific hacks.
+ return "file://localhost" + this.fullPath;
+ },
+ toURI: function() {
+ console.log("DEPRECATED: Update your code to use 'toURL'");
+ return "file://localhost" + this.fullPath;
+ }
+};
+});
+
+// file: lib/ios/plugin/ios/FileReader.js
+define("cordova/plugin/ios/FileReader", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError'),
+ FileReader = require('cordova/plugin/FileReader'),
+ ProgressEvent = require('cordova/plugin/ProgressEvent');
+
+module.exports = {
+ readAsText:function(file, encoding) {
+ // Figure out pathing
+ this.fileName = '';
+ if (typeof file.fullPath === 'undefined') {
+ this.fileName = file;
+ } else {
+ this.fileName = file.fullPath;
+ }
+
+ // Already loading something
+ if (this.readyState == FileReader.LOADING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // LOADING state
+ this.readyState = FileReader.LOADING;
+
+ // If loadstart callback
+ if (typeof this.onloadstart === "function") {
+ this.onloadstart(new ProgressEvent("loadstart", {target:this}));
+ }
+
+ // Default encoding is UTF-8
+ var enc = encoding ? encoding : "UTF-8";
+
+ var me = this;
+
+ // Read file
+ exec(
+ // Success callback
+ function(r) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // Save result
+ me.result = decodeURIComponent(r);
+
+ // If onload callback
+ if (typeof me.onload === "function") {
+ me.onload(new ProgressEvent("load", {target:me}));
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ },
+ // Error callback
+ function(e) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ // null result
+ me.result = null;
+
+ // Save error
+ me.error = new FileError(e);
+
+ // If onerror callback
+ if (typeof me.onerror === "function") {
+ me.onerror(new ProgressEvent("error", {target:me}));
+ }
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ },
+ "File", "readAsText", [this.fileName, enc]);
+ }
+};
+});
+
+// file: lib/ios/plugin/ios/console.js
+define("cordova/plugin/ios/console", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * This class provides access to the debugging console.
+ * @constructor
+ */
+var DebugConsole = function() {
+ this.winConsole = window.console;
+ this.logLevel = DebugConsole.INFO_LEVEL;
+};
+
+// from most verbose, to least verbose
+DebugConsole.ALL_LEVEL = 1; // same as first level
+DebugConsole.INFO_LEVEL = 1;
+DebugConsole.WARN_LEVEL = 2;
+DebugConsole.ERROR_LEVEL = 4;
+DebugConsole.NONE_LEVEL = 8;
+
+DebugConsole.prototype.setLevel = function(level) {
+ this.logLevel = level;
+};
+
+var stringify = function(message) {
+ try {
+ if (typeof message === "object" && JSON && JSON.stringify) {
+ try {
+ return JSON.stringify(message);
+ }
+ catch (e) {
+ return "error JSON.stringify()ing argument: " + e;
+ }
+ } else {
+ return message.toString();
+ }
+ } catch (e) {
+ return e.toString();
+ }
+};
+
+/**
+ * Print a normal log message to the console
+ * @param {Object|String} message Message or object to print to the console
+ */
+DebugConsole.prototype.log = function(message) {
+ if (this.logLevel <= DebugConsole.INFO_LEVEL) {
+ exec(null, null, 'Debug Console', 'log', [ stringify(message), { logLevel: 'INFO' } ]);
+ }
+ else if (this.winConsole && this.winConsole.log) {
+ this.winConsole.log(message);
+ }
+};
+
+/**
+ * Print a warning message to the console
+ * @param {Object|String} message Message or object to print to the console
+ */
+DebugConsole.prototype.warn = function(message) {
+ if (this.logLevel <= DebugConsole.WARN_LEVEL) {
+ exec(null, null, 'Debug Console', 'log', [ stringify(message), { logLevel: 'WARN' } ]);
+ }
+ else if (this.winConsole && this.winConsole.warn) {
+ this.winConsole.warn(message);
+ }
+};
+
+/**
+ * Print an error message to the console
+ * @param {Object|String} message Message or object to print to the console
+ */
+DebugConsole.prototype.error = function(message) {
+ if (this.logLevel <= DebugConsole.ERROR_LEVEL) {
+ exec(null, null, 'Debug Console', 'log', [ stringify(message), { logLevel: 'ERROR' } ]);
+ }
+ else if (this.winConsole && this.winConsole.error){
+ this.winConsole.error(message);
+ }
+};
+
+module.exports = new DebugConsole();
+});
+
+// file: lib/ios/plugin/ios/contacts.js
+define("cordova/plugin/ios/contacts", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * Provides iOS enhanced contacts API.
+ */
+module.exports = {
+ newContactUI : function(successCallback) {
+ /*
+ * Create a contact using the iOS Contact Picker UI
+ * NOT part of W3C spec so no official documentation
+ *
+ * returns: the id of the created contact as param to successCallback
+ */
+ exec(successCallback, null, "Contacts","newContact", []);
+ },
+ chooseContact : function(successCallback, options) {
+ /*
+ * Select a contact using the iOS Contact Picker UI
+ * NOT part of W3C spec so no official documentation
+ *
+ * @param errorCB error callback
+ * @param options object
+ * allowsEditing: boolean AS STRING
+ * "true" to allow editing the contact
+ * "false" (default) display contact
+ *
+ * returns: the id of the selected contact as param to successCallback
+ */
+ exec(successCallback, null, "Contacts","chooseContact", [options]);
+ }
+};
+});
+
+// file: lib/ios/plugin/ios/device.js
+define("cordova/plugin/ios/device", function(require, exports, module) {
+/**
+ * this represents the mobile device, and provides properties for inspecting the model, version, UUID of the
+ * phone, etc.
+ * @constructor
+ */
+var exec = require('cordova/exec'),
+ utils = require('cordova/utils'),
+ channel = require('cordova/channel');
+
+var Device = function() {
+ this.platform = null;
+ this.version = null;
+ this.name = null;
+ this.cordova = null;
+ this.uuid = null;
+};
+
+Device.prototype.setInfo = function(info) {
+ try {
+ this.platform = info.platform;
+ this.version = info.version;
+ this.name = info.name;
+ this.cordova = info.cordova;
+ this.uuid = info.uuid;
+ channel.onCordovaInfoReady.fire();
+ } catch(e) {
+ utils.alert('Error during device info setting in cordova/plugin/ios/device!');
+ }
+};
+
+module.exports = new Device();
+
+});
+
+// file: lib/ios/plugin/ios/nativecomm.js
+define("cordova/plugin/ios/nativecomm", function(require, exports, module) {
+var cordova = require('cordova');
+
+/**
+ * Called by native code to retrieve all queued commands and clear the queue.
+ */
+module.exports = function() {
+ var json = JSON.stringify(cordova.commandQueue);
+ cordova.commandQueue = [];
+ return json;
+};
+});
+
+// file: lib/ios/plugin/ios/notification.js
+define("cordova/plugin/ios/notification", function(require, exports, module) {
+var Media = require('cordova/plugin/Media');
+
+module.exports = {
+ beep:function(count) {
+ (new Media('beep.wav')).play();
+ }
+};
+});
+
+// file: lib/common/plugin/logger.js
+define("cordova/plugin/logger", function(require, exports, module) {
+//------------------------------------------------------------------------------
+// The logger module exports the following properties/functions:
+//
+// LOG - constant for the level LOG
+// ERROR - constant for the level ERROR
+// WARN - constant for the level WARN
+// INFO - constant for the level INFO
+// DEBUG - constant for the level DEBUG
+// logLevel() - returns current log level
+// logLevel(value) - sets and returns a new log level
+// useConsole() - returns whether logger is using console
+// useConsole(value) - sets and returns whether logger is using console
+// log(message,...) - logs a message at level LOG
+// error(message,...) - logs a message at level ERROR
+// warn(message,...) - logs a message at level WARN
+// info(message,...) - logs a message at level INFO
+// debug(message,...) - logs a message at level DEBUG
+// logLevel(level,message,...) - logs a message specified level
+//
+//------------------------------------------------------------------------------
+
+var logger = exports;
+
+var exec = require('cordova/exec');
+var utils = require('cordova/utils');
+
+var UseConsole = true;
+var Queued = [];
+var DeviceReady = false;
+var CurrentLevel;
+
+/**
+ * Logging levels
+ */
+
+var Levels = [
+ "LOG",
+ "ERROR",
+ "WARN",
+ "INFO",
+ "DEBUG"
+];
+
+/*
+ * add the logging levels to the logger object and
+ * to a separate levelsMap object for testing
+ */
+
+var LevelsMap = {};
+for (var i=0; i<Levels.length; i++) {
+ var level = Levels[i];
+ LevelsMap[level] = i;
+ logger[level] = level;
+}
+
+CurrentLevel = LevelsMap.WARN;
+
+/**
+ * Getter/Setter for the logging level
+ *
+ * Returns the current logging level.
+ *
+ * When a value is passed, sets the logging level to that value.
+ * The values should be one of the following constants:
+ * logger.LOG
+ * logger.ERROR
+ * logger.WARN
+ * logger.INFO
+ * logger.DEBUG
+ *
+ * The value used determines which messages get printed. The logging
+ * values above are in order, and only messages logged at the logging
+ * level or above will actually be displayed to the user. Eg, the
+ * default level is WARN, so only messages logged with LOG, ERROR, or
+ * WARN will be displayed; INFO and DEBUG messages will be ignored.
+ */
+logger.level = function (value) {
+ if (arguments.length) {
+ if (LevelsMap[value] === null) {
+ throw new Error("invalid logging level: " + value);
+ }
+ CurrentLevel = LevelsMap[value];
+ }
+
+ return Levels[CurrentLevel];
+};
+
+/**
+ * Getter/Setter for the useConsole functionality
+ *
+ * When useConsole is true, the logger will log via the
+ * browser 'console' object. Otherwise, it will use the
+ * native Logger plugin.
+ */
+logger.useConsole = function (value) {
+ if (arguments.length) UseConsole = !!value;
+
+ if (UseConsole) {
+ if (typeof console == "undefined") {
+ throw new Error("global console object is not defined");
+ }
+
+ if (typeof console.log != "function") {
+ throw new Error("global console object does not have a log function");
+ }
+
+ if (typeof console.useLogger == "function") {
+ if (console.useLogger()) {
+ throw new Error("console and logger are too intertwingly");
+ }
+ }
+ }
+
+ return UseConsole;
+};
+
+/**
+ * Logs a message at the LOG level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.log = function(message) { logWithArgs("LOG", arguments); };
+
+/**
+ * Logs a message at the ERROR level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.error = function(message) { logWithArgs("ERROR", arguments); };
+
+/**
+ * Logs a message at the WARN level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.warn = function(message) { logWithArgs("WARN", arguments); };
+
+/**
+ * Logs a message at the INFO level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.info = function(message) { logWithArgs("INFO", arguments); };
+
+/**
+ * Logs a message at the DEBUG level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.debug = function(message) { logWithArgs("DEBUG", arguments); };
+
+// log at the specified level with args
+function logWithArgs(level, args) {
+ args = [level].concat([].slice.call(args));
+ logger.logLevel.apply(logger, args);
+}
+
+/**
+ * Logs a message at the specified level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.logLevel = function(level, message /* , ... */) {
+ // format the message with the parameters
+ var formatArgs = [].slice.call(arguments, 2);
+ message = utils.vformat(message, formatArgs);
+
+ if (LevelsMap[level] === null) {
+ throw new Error("invalid logging level: " + level);
+ }
+
+ if (LevelsMap[level] > CurrentLevel) return;
+
+ // queue the message if not yet at deviceready
+ if (!DeviceReady && !UseConsole) {
+ Queued.push([level, message]);
+ return;
+ }
+
+ // if not using the console, use the native logger
+ if (!UseConsole) {
+ exec(null, null, "Logger", "logLevel", [level, message]);
+ return;
+ }
+
+ // make sure console is not using logger
+ if (console.__usingCordovaLogger) {
+ throw new Error("console and logger are too intertwingly");
+ }
+
+ // log to the console
+ switch (level) {
+ case logger.LOG: console.log(message); break;
+ case logger.ERROR: console.log("ERROR: " + message); break;
+ case logger.WARN: console.log("WARN: " + message); break;
+ case logger.INFO: console.log("INFO: " + message); break;
+ case logger.DEBUG: console.log("DEBUG: " + message); break;
+ }
+};
+
+// when deviceready fires, log queued messages
+logger.__onDeviceReady = function() {
+ if (DeviceReady) return;
+
+ DeviceReady = true;
+
+ for (var i=0; i<Queued.length; i++) {
+ var messageArgs = Queued[i];
+ logger.logLevel(messageArgs[0], messageArgs[1]);
+ }
+
+ Queued = null;
+};
+
+// add a deviceready event to log queued messages
+document.addEventListener("deviceready", logger.__onDeviceReady, false);
+
+});
+
+// file: lib/common/plugin/network.js
+define("cordova/plugin/network", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ cordova = require('cordova'),
+ channel = require('cordova/channel');
+
+var NetworkConnection = function () {
+ this.type = null;
+ this._firstRun = true;
+ this._timer = null;
+ this.timeout = 500;
+
+ var me = this;
+
+ channel.onCordovaReady.subscribeOnce(function() {
+ me.getInfo(function (info) {
+ me.type = info;
+ if (info === "none") {
+ // set a timer if still offline at the end of timer send the offline event
+ me._timer = setTimeout(function(){
+ cordova.fireDocumentEvent("offline");
+ me._timer = null;
+ }, me.timeout);
+ } else {
+ // If there is a current offline event pending clear it
+ if (me._timer !== null) {
+ clearTimeout(me._timer);
+ me._timer = null;
+ }
+ cordova.fireDocumentEvent("online");
+ }
+
+ // should only fire this once
+ if (me._firstRun) {
+ me._firstRun = false;
+ channel.onCordovaConnectionReady.fire();
+ }
+ },
+ function (e) {
+ // If we can't get the network info we should still tell Cordova
+ // to fire the deviceready event.
+ if (me._firstRun) {
+ me._firstRun = false;
+ channel.onCordovaConnectionReady.fire();
+ }
+ console.log("Error initializing Network Connection: " + e);
+ });
+ });
+};
+
+/**
+ * Get connection info
+ *
+ * @param {Function} successCallback The function to call when the Connection data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the Connection data. (OPTIONAL)
+ */
+NetworkConnection.prototype.getInfo = function (successCallback, errorCallback) {
+ // Get info
+ exec(successCallback, errorCallback, "NetworkStatus", "getConnectionInfo", []);
+};
+
+module.exports = new NetworkConnection();
+});
+
+// file: lib/common/plugin/notification.js
+define("cordova/plugin/notification", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * Provides access to notifications on the device.
+ */
+
+module.exports = {
+
+ /**
+ * Open a native alert dialog, with a customizable title and button text.
+ *
+ * @param {String} message Message to print in the body of the alert
+ * @param {Function} completeCallback The callback that is called when user clicks on a button.
+ * @param {String} title Title of the alert dialog (default: Alert)
+ * @param {String} buttonLabel Label of the close button (default: OK)
+ */
+ alert: function(message, completeCallback, title, buttonLabel) {
+ var _title = (title || "Alert");
+ var _buttonLabel = (buttonLabel || "OK");
+ exec(completeCallback, null, "Notification", "alert", [message, _title, _buttonLabel]);
+ },
+
+ /**
+ * Open a native confirm dialog, with a customizable title and button text.
+ * The result that the user selects is returned to the result callback.
+ *
+ * @param {String} message Message to print in the body of the alert
+ * @param {Function} resultCallback The callback that is called when user clicks on a button.
+ * @param {String} title Title of the alert dialog (default: Confirm)
+ * @param {String} buttonLabels Comma separated list of the labels of the buttons (default: 'OK,Cancel')
+ */
+ confirm: function(message, resultCallback, title, buttonLabels) {
+ var _title = (title || "Confirm");
+ var _buttonLabels = (buttonLabels || "OK,Cancel");
+ exec(resultCallback, null, "Notification", "confirm", [message, _title, _buttonLabels]);
+ },
+
+ /**
+ * Causes the device to vibrate.
+ *
+ * @param {Integer} mills The number of milliseconds to vibrate for.
+ */
+ vibrate: function(mills) {
+ exec(null, null, "Notification", "vibrate", [mills]);
+ },
+
+ /**
+ * Causes the device to beep.
+ * On Android, the default notification ringtone is played "count" times.
+ *
+ * @param {Integer} count The number of beeps.
+ */
+ beep: function(count) {
+ exec(null, null, "Notification", "beep", [count]);
+ }
+};
+});
+
+// file: lib/common/plugin/requestFileSystem.js
+define("cordova/plugin/requestFileSystem", function(require, exports, module) {
+var FileError = require('cordova/plugin/FileError'),
+ FileSystem = require('cordova/plugin/FileSystem'),
+ exec = require('cordova/exec');
+
+/**
+ * Request a file system in which to store application data.
+ * @param type local file system type
+ * @param size indicates how much storage space, in bytes, the application expects to need
+ * @param successCallback invoked with a FileSystem object
+ * @param errorCallback invoked if error occurs retrieving file system
+ */
+var requestFileSystem = function(type, size, successCallback, errorCallback) {
+ var fail = function(code) {
+ if (typeof errorCallback === 'function') {
+ errorCallback(new FileError(code));
+ }
+ };
+
+ if (type < 0 || type > 3) {
+ fail(FileError.SYNTAX_ERR);
+ } else {
+ // if successful, return a FileSystem object
+ var success = function(file_system) {
+ if (file_system) {
+ if (typeof successCallback === 'function') {
+ // grab the name and root from the file system object
+ var result = new FileSystem(file_system.name, file_system.root);
+ successCallback(result);
+ }
+ }
+ else {
+ // no FileSystem object returned
+ fail(FileError.NOT_FOUND_ERR);
+ }
+ };
+ exec(success, fail, "File", "requestFileSystem", [type, size]);
+ }
+};
+
+module.exports = requestFileSystem;
+});
+
+// file: lib/common/plugin/resolveLocalFileSystemURI.js
+define("cordova/plugin/resolveLocalFileSystemURI", function(require, exports, module) {
+var DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
+ FileEntry = require('cordova/plugin/FileEntry'),
+ FileError = require('cordova/plugin/FileError'),
+ exec = require('cordova/exec');
+
+/**
+ * Look up file system Entry referred to by local URI.
+ * @param {DOMString} uri URI referring to a local file or directory
+ * @param successCallback invoked with Entry object corresponding to URI
+ * @param errorCallback invoked if error occurs retrieving file system entry
+ */
+module.exports = function(uri, successCallback, errorCallback) {
+ // error callback
+ var fail = function(error) {
+ if (typeof errorCallback === 'function') {
+ errorCallback(new FileError(error));
+ }
+ };
+ // sanity check for 'not:valid:filename'
+ if(!uri || uri.split(":").length > 2) {
+ setTimeout( function() {
+ fail(FileError.ENCODING_ERR);
+ },0);
+ return;
+ }
+ // if successful, return either a file or directory entry
+ var success = function(entry) {
+ var result;
+ if (entry) {
+ if (typeof successCallback === 'function') {
+ // create appropriate Entry object
+ result = (entry.isDirectory) ? new DirectoryEntry(entry.name, entry.fullPath) : new FileEntry(entry.name, entry.fullPath);
+ try {
+ successCallback(result);
+ }
+ catch (e) {
+ console.log('Error invoking callback: ' + e);
+ }
+ }
+ }
+ else {
+ // no Entry object returned
+ fail(FileError.NOT_FOUND_ERR);
+ }
+ };
+
+ exec(success, fail, "File", "resolveLocalFileSystemURI", [uri]);
+};
+
+});
+
+// file: lib/common/plugin/splashscreen.js
+define("cordova/plugin/splashscreen", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+var splashscreen = {
+ hide:function() {
+ exec(null, null, "SplashScreen", "hide", []);
+ }
+};
+
+module.exports = splashscreen;
+});
+
+// file: lib/common/utils.js
+define("cordova/utils", function(require, exports, module) {
+var utils = exports;
+
+/**
+ * Returns an indication of whether the argument is an array or not
+ */
+utils.isArray = function(a) {
+ return Object.prototype.toString.call(a) == '[object Array]';
+};
+
+/**
+ * Returns an indication of whether the argument is a Date or not
+ */
+utils.isDate = function(d) {
+ return Object.prototype.toString.call(d) == '[object Date]';
+};
+
+/**
+ * Does a deep clone of the object.
+ */
+utils.clone = function(obj) {
+ if(!obj || typeof obj == 'function' || utils.isDate(obj) || typeof obj != 'object') {
+ return obj;
+ }
+
+ var retVal, i;
+
+ if(utils.isArray(obj)){
+ retVal = [];
+ for(i = 0; i < obj.length; ++i){
+ retVal.push(utils.clone(obj[i]));
+ }
+ return retVal;
+ }
+
+ retVal = {};
+ for(i in obj){
+ if(!(i in retVal) || retVal[i] != obj[i]) {
+ retVal[i] = utils.clone(obj[i]);
+ }
+ }
+ return retVal;
+};
+
+/**
+ * Returns a wrappered version of the function
+ */
+utils.close = function(context, func, params) {
+ if (typeof params == 'undefined') {
+ return function() {
+ return func.apply(context, arguments);
+ };
+ } else {
+ return function() {
+ return func.apply(context, params);
+ };
+ }
+};
+
+/**
+ * Create a UUID
+ */
+utils.createUUID = function() {
+ return UUIDcreatePart(4) + '-' +
+ UUIDcreatePart(2) + '-' +
+ UUIDcreatePart(2) + '-' +
+ UUIDcreatePart(2) + '-' +
+ UUIDcreatePart(6);
+};
+
+/**
+ * Extends a child object from a parent object using classical inheritance
+ * pattern.
+ */
+utils.extend = (function() {
+ // proxy used to establish prototype chain
+ var F = function() {};
+ // extend Child from Parent
+ return function(Child, Parent) {
+ F.prototype = Parent.prototype;
+ Child.prototype = new F();
+ Child.__super__ = Parent.prototype;
+ Child.prototype.constructor = Child;
+ };
+}());
+
+/**
+ * Alerts a message in any available way: alert or console.log.
+ */
+utils.alert = function(msg) {
+ if (alert) {
+ alert(msg);
+ } else if (console && console.log) {
+ console.log(msg);
+ }
+};
+
+/**
+ * Formats a string and arguments following it ala sprintf()
+ *
+ * see utils.vformat() for more information
+ */
+utils.format = function(formatString /* ,... */) {
+ var args = [].slice.call(arguments, 1);
+ return utils.vformat(formatString, args);
+};
+
+/**
+ * Formats a string and arguments following it ala vsprintf()
+ *
+ * format chars:
+ * %j - format arg as JSON
+ * %o - format arg as JSON
+ * %c - format arg as ''
+ * %% - replace with '%'
+ * any other char following % will format it's
+ * arg via toString().
+ *
+ * for rationale, see FireBug's Console API:
+ * http://getfirebug.com/wiki/index.php/Console_API
+ */
+utils.vformat = function(formatString, args) {
+ if (formatString === null || formatString === undefined) return "";
+ if (arguments.length == 1) return formatString.toString();
+ if (typeof formatString != "string") return formatString.toString();
+
+ var pattern = /(.*?)%(.)(.*)/;
+ var rest = formatString;
+ var result = [];
+
+ while (args.length) {
+ var arg = args.shift();
+ var match = pattern.exec(rest);
+
+ if (!match) break;
+
+ rest = match[3];
+
+ result.push(match[1]);
+
+ if (match[2] == '%') {
+ result.push('%');
+ args.unshift(arg);
+ continue;
+ }
+
+ result.push(formatted(arg, match[2]));
+ }
+
+ result.push(rest);
+
+ return result.join('');
+};
+
+//------------------------------------------------------------------------------
+function UUIDcreatePart(length) {
+ var uuidpart = "";
+ for (var i=0; i<length; i++) {
+ var uuidchar = parseInt((Math.random() * 256), 10).toString(16);
+ if (uuidchar.length == 1) {
+ uuidchar = "0" + uuidchar;
+ }
+ uuidpart += uuidchar;
+ }
+ return uuidpart;
+}
+
+//------------------------------------------------------------------------------
+function formatted(object, formatChar) {
+
+ try {
+ switch(formatChar) {
+ case 'j':
+ case 'o': return JSON.stringify(object);
+ case 'c': return '';
+ }
+ }
+ catch (e) {
+ return "error JSON.stringify()ing argument: " + e;
+ }
+
+ if ((object === null) || (object === undefined)) {
+ return Object.prototype.toString.call(object);
+ }
+
+ return object.toString();
+}
+
+});
+
+
+window.cordova = require('cordova');
+
+// file: lib/scripts/bootstrap.js
+(function (context) {
+ var channel = require("cordova/channel"),
+ _self = {
+ boot: function () {
+ /**
+ * Create all cordova objects once page has fully loaded and native side is ready.
+ */
+ channel.join(function() {
+ var builder = require('cordova/builder'),
+ base = require('cordova/common'),
+ platform = require('cordova/platform');
+
+ // Drop the common globals into the window object, but be nice and don't overwrite anything.
+ builder.build(base.objects).intoButDontClobber(window);
+
+ // Drop the platform-specific globals into the window object
+ // and clobber any existing object.
+ builder.build(platform.objects).intoAndClobber(window);
+
+ // Merge the platform-specific overrides/enhancements into
+ // the window object.
+ if (typeof platform.merges !== 'undefined') {
+ builder.build(platform.merges).intoAndMerge(window);
+ }
+
+ // Call the platform-specific initialization
+ platform.initialize();
+
+ // Fire event to notify that all objects are created
+ channel.onCordovaReady.fire();
+
+ // Fire onDeviceReady event once all constructors have run and
+ // cordova info has been received from native side.
+ channel.join(function() {
+ require('cordova').fireDocumentEvent('deviceready');
+ }, channel.deviceReadyChannelsArray);
+
+ }, [ channel.onDOMContentLoaded, channel.onNativeReady ]);
+ }
+ };
+
+ // boot up once native side is ready
+ channel.onNativeReady.subscribeOnce(_self.boot);
+
+ // _nativeReady is global variable that the native side can set
+ // to signify that the native code is ready. It is a global since
+ // it may be called before any cordova JS is ready.
+ if (window._nativeReady) {
+ channel.onNativeReady.fire();
+ }
+
+}(window));
+
+
+})(); \ No newline at end of file
diff --git a/phonegap/www/about.html b/phonegap/www/about.html
new file mode 100644
index 000000000..03d2d389a
--- /dev/null
+++ b/phonegap/www/about.html
@@ -0,0 +1,153 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title></title>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
+ <meta charset="utf-8">
+
+ <link rel="stylesheet" href="css/base.css">
+ <link rel="stylesheet" href="css/mobile.css">
+ <script type="text/javascript" src="js/config.js"></script>
+ <script type="text/javascript" charset="utf-8" src="cordova-1.8.0.js"></script>
+ <script type="text/javascript" src="js/jquery-1.7.0.min.js"></script>
+ <script type="text/javascript" src="js/json2.js"></script>
+ <script type="text/javascript" src="js/mobile.js"></script>
+ </head>
+ <body class="frontpage fullwidthpage mobile-header">
+ <div class="wrapper">
+ <div class="table-cell">
+ <div id="user-meta">
+ </div>
+ <div class="container">
+ <div class="content" role="main">
+ <div class="tablewrapper">
+ <div class="container">
+ <div class="content" role="main">
+ <h1><a name="faq"></a>Frequently Asked Questions</h1>
+ <dl>
+ <dt>What is FixMyStreet?</dt>
+ <dd>FixMyStreet is a site to help people report, view,
+or discuss local problems they&rsquo;ve found to their local council by
+simply locating them on a map. It launched in early February
+2007.</dd>
+ <dt>What sort of problems should I report with FixMyStreet?</dt>
+ <dd>FixMyStreet is primarily for reporting things which are
+<strong>broken or dirty or damaged or dumped, and need fixing, cleaning
+or clearing</strong>, such as:
+
+ <ul><li>Abandoned vehicles
+ <li>Dog Fouling
+ <li>Flyposting or graffiti
+ <li>Flytipping or litter
+ <li>Streetcleaning, such as broken glass in a cycle lane
+ <li>Unlit lamposts
+ <li>Potholes
+ </ul>
+ </dd>
+
+ <dt>What isn&rsquo;t FixMyStreet for?</dt>
+ <dd>FixMyStreet is not a way of getting in touch with your council for all
+ issues &ndash; please use FixMyStreet only for problems such as the above. We
+ often route problem reports via cleansing services or highways and so using
+ FixMyStreet for other matters may result in a delay in your report getting
+ to the right department. <strong>You will need to contact your council
+ directly for problems such as</strong>:
+
+ <ul><li>Anti-social behaviour
+ <li>Any urgent or emergency problems
+ <li>Noise pollution or barking dogs
+ <li>Fires and smoke/smell pollution
+ <li>Missing wheelie bins or recycling boxes or missed rubbish collections
+ <li>Proposals for speed bumps/ CCTV/ pedestrian crossings/ new road layouts/ etc.
+ <li>Complaining about your neighbours
+ <li>Complaining about the council
+ <li>Joy riding, drug taking, animal cruelty, or other criminal activity
+ </ul>
+ <p>Councils often have direct hotlines for these sorts of issues.</p>
+ </dd>
+
+ <dt>How do I use the site?</dt>
+ <dd>After entering a postcode or location, you are presented
+with a map of that area. You can view problems already reported in that area,
+or report ones of your own simply by clicking on the map at the location of
+the problem.</dd>
+ <dt>How are the problems solved?</dt>
+ <dd>They are reported to the relevant council by email. The
+council can then resolve the problem the way they normally would.
+Alternatively, you can discuss the problem on the website with others, and
+then together lobby the council to fix it, or fix it directly yourselves.</dd>
+ <dt>Is it free?</dt>
+ <dd>The site is free to use, yes. FixMyStreet is run
+by a registered charity, though, so if you want to make a contribution, <a
+href="https://secure.mysociety.org/donate/">please do</a>.</dd>
+
+ <dt>Why do you only cover the countries of Great Britain?</dt>
+ <dd>We would love to cover Northern Ireland, but we have only been able
+ to locate boundaries for Great Britain (from Ordnance Survey). If you
+ know of a source for Northern Ireland council boundaries
+ so that we can add them to the site, that'd be great.</dd>
+ </dl>
+
+ <h2><a name="organisation"></a>Organisation Questions</h2>
+ <dl>
+ <dt>Who built FixMyStreet?</dt>
+ <dd>This site was built by <a href="http://www.mysociety.org/">mySociety</a>,
+ in conjunction with the <a href="http://www.youngfoundation.org.uk/">Young Foundation</a>.
+mySociety is the project of a registered charity which has grown out of the community of
+volunteers who built sites like <a href="http://www.theyworkforyou.com/">TheyWorkForYou.com</a>.
+mySociety&rsquo;s primary mission is to build Internet projects which give people simple, tangible
+benefits in the civic and community aspects of their lives. Our first project
+was <a href="http://www.writetothem.com/">WriteToThem</a>, where you can write to any of your
+elected representatives, for free. The charity is called UK Citizens Online Democracy and is charity number 1076346. mySociety
+can be contacted by email at <a href="mailto:hello&#64;mysociety.org">hello&#64;mysociety.org</a>,
+or by post at mySociety, 483 Green Lanes, London, N13 4BS, UK.</dd>
+ <dt><img src="/i/moj.png" align="right" alt="Ministry of Justice" hspace="10">Who pays for it?</dt>
+ <dd>FixMyStreet was originally paid for via the Department for
+ Constitutional Affairs Innovations Fund. It is now funded by a variety of means, from commercial
+ work to <a href="http://www.mysociety.org/donate/">donations</a>.</dd>
+
+ <dt>Do you need any help with the project?</dt>
+ <dd>Yes, we can use help in all sorts of ways, technical or
+non-technical. Please see our <a
+href="http://www.mysociety.org/helpus/">Get Involved page</a>.</dd>
+ <dt>I&rsquo;d like a site like this for my own location/ where&rsquo;s the "source code" to this site?</dt>
+ <dd>
+The software behind this site is open source, and available
+to you mainly under the GNU Affero GPL software license. You can <a
+href="http://github.com/mysociety/fixmystreet">download the
+source code</a> and help us develop it.
+You&rsquo;re welcome to use it in your own projects, although you must also
+make available the source code to any such projects.
+<a href="http://www.fiksgatami.no/">Fiksgatami</a> is an example of our code
+being used in a Norwegian version of this site.
+</dd>
+ <dt>People build things, not organisations. Who <em>actually</em> built it?</dt>
+ <dd>Matthew Somerville and Francis Irving wrote the site,
+Chris Lightfoot wrote the tileserver and map cutter, Richard Pope created
+our pins, Deborah Kerr keeps things up-to-date and does user support,
+Ayesha Garrett designed our posters, and Tom Steinberg managed it all.
+
+Thanks also to
+<a href="http://www.ordnancesurvey.co.uk">Ordnance Survey</a> (for the maps,
+UK postcodes, and UK addresses &ndash; data &copy; Crown copyright, all
+rights reserved, Ministry of Justice 100037819&nbsp;2008),
+Yahoo! for their BSD-licensed JavaScript libraries, the entire free software
+community (this particular project was brought to you by Perl, PostgreSQL,
+and the number 161.290) and <a
+href="http://www.m247.com/">M247</a> (who kindly host all
+our servers).
+
+Let us know if we&rsquo;ve missed anyone.</dd>
+ </dl>
+ </div><!-- .content role=main -->
+ </div><!-- .container -->
+ </div><!-- .table-cell -->
+ <div class="big-green-banner mobile-map-banner mobile-nav-banner">
+ <a href="index.html">home</a>
+ About
+ </div>
+ </div> <!-- .wrapper -->
+ </body>
+</html>
+</html>
diff --git a/phonegap/www/around.html b/phonegap/www/around.html
new file mode 100644
index 000000000..f3a6bee06
--- /dev/null
+++ b/phonegap/www/around.html
@@ -0,0 +1,262 @@
+<!doctype html>
+<html class="no-js" lang="en-gb">
+ <head>
+ <meta name="viewport" content="initial-scale=1.0">
+
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
+ <meta name="HandHeldFriendly" content="true">
+ <meta name="mobileoptimized" content="0">
+
+ <link rel="stylesheet" href="css/base.css">
+ <link rel="stylesheet" href="css/layout.css" media="(min-width:48em)">
+ <link rel="stylesheet" href="css/mobile.css">
+
+ <script type="text/javascript" src="js/config.js"></script>
+ <script type="text/javascript" src="js/json2.js"></script>
+
+ <script type="text/javascript" charset="utf-8" src="cordova-1.8.0.js"></script>
+
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <script type="text/javascript" src="js/jquery-1.7.0.min.js"></script>
+
+ <script src="js/jquery.validate.min.js" type="text/javascript" charset="utf-8"></script>
+
+ <script type="text/javascript" src="js/geo.min.js"></script>
+ <script type="text/javascript" src="js/fixmystreet.js"></script>
+ <script type="text/javascript" src="js/mobile.js"></script>
+ <script type="text/javascript" src="js/OpenLayers.fixmystreet.js"></script>
+ <script type="text/javascript" src="js/map-OpenLayers.js"></script>
+ <script type="text/javascript" src="js/map-bing-ol.js"></script>
+ <script type="text/javascript" src="js/jquery.ba-hashchange.min.js"></script>
+
+ <script type="text/javascript">
+ validation_strings = {
+ update: 'Please enter a message',
+ title: 'Please enter a subject',
+ detail: 'Please enter some details',
+ name: {
+ required: 'Please enter your name',
+ validName: 'Please enter your full name, councils need this information – if you do not wish your name to be shown on the site, untick the box below'
+ },
+ category: 'Please choose a category',
+ rznvy: {
+ required: 'Please enter your email',
+ email: 'Please enter a valid email'
+ },
+ email: {
+ required: 'Please enter your email',
+ email: 'Please enter a valid email'
+ }
+ };
+ </script>
+ <title> Viewing a location :: FixMyStreet</title>
+ </head>
+
+ <body class="mappage">
+
+ <div class="wrapper">
+ <div class="table-cell">
+ <header id="site-header" role="banner">
+ <div class="container">
+ <span id="site-logo"></span>
+ </div>
+ </header>
+
+ <div id="user-meta">
+
+ </div>
+
+ <div class="container">
+ <div class="content" role="main">
+
+ <form action="" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate">
+
+ <input type="hidden" name="pc" id="pc" value="">
+ <input type="hidden" name="latitude" id="fixmystreet.latitude" value="">
+ <input type="hidden" name="longitude" id="fixmystreet.longitude" value="">
+
+ <input type="hidden" name="zoom" value="2">
+ <script type="text/javascript">
+ var fixmystreet = {
+ 'page': 'around',
+ 'area': '',
+ 'all_pins': '',
+ 'latitude': localStorage.latitude,
+ 'longitude': localStorage.longitude,
+
+ 'zoom': 2,
+ 'numZoomLevels': 5,
+ 'zoomOffset': 13,
+ 'map_type': "",
+ 'pins': [ ]
+
+ };
+
+ $('#fixmystreet\\.latitude').val( localStorage.latitude );
+ $('#fixmystreet\\.longitude').val( localStorage.longitude );
+ $('#pc').val( localStorage.pc );
+ </script>
+ <div id="map_box">
+ <div id="map"></div>
+ <p id="sub_map_links">
+ <a id="hide_pins_link" rel="nofollow" href="">Hide pins</a>
+ <a id="all_pins_link" rel="nofollow" href="">Show old</a>
+ </p>
+ </div>
+
+ <div id="side">
+
+ <h1 class="big-green-banner">Click map to report a problem</h1>
+
+ <section class="full-width">
+ <menu id="problems-nav" class="tab-nav">
+ <ul>
+ <li><a href="#current">Problems on the map</a></li>
+ <li><a href="#current_near">Problems nearby</a></li>
+ </ul>
+ </menu>
+ <ul id="current" class="issue-list-a tab">
+ <li><p>No problems have been reported yet.</p></li>
+ </ul>
+
+ <ul id="current_near" class="issue-list-a tab">
+ <li><p>No problems found.</p></li>
+ </ul>
+ </section>
+ </div>
+
+ <div style="display:none" id="side-form">
+ <div id="report-a-problem-main">
+ <h1>Reporting a problem</h1>
+
+ <p id="councils_text">
+ All the information you provide here will be sent to <strong>the local council</strong>.
+ The subject and details of the problem will be public, plus your name if you give us permission.
+ </p>
+
+ <div id="report-a-problem-sidebar">
+
+ <div class="sidebar-tips">
+ <p>You have located the problem at the point marked with a green pin on the map. If this is not the correct location, simply click on the map again. </p>
+ <p>
+ Please fill in details of the problem below. The council won't be able
+ to help unless you leave as much detail as you can, so please describe the exact location of
+ the problem (e.g. on a wall), what it is, how long it has been there, a description (and a
+ photo of the problem if you have one), etc.
+ </p>
+ </div>
+
+ <div class="sidebar-notes">
+ <p>Please note:</p>
+
+ <ul class="plain-list">
+ <li>We will only use your personal information in accordance with our <a href="/faq#privacy">privacy policy.</a></li>
+ <li>Please be polite, concise and to the point.</li>
+ <li>Please do not be abusive &mdash; abusing your council devalues the service for all users.</li>
+ <li>Writing your message entirely in block capitals makes it hard to read, as does a lack of punctuation.</li>
+ <li>Remember that FixMyStreet is primarily for reporting physical problems that can be fixed. If your problem is not appropriate for submission via this site remember that you can contact your council directly using their own website.</li>
+ </ul>
+ </div>
+ </div>
+
+ <fieldset>
+ <div id="problem_form">
+ <label for="form_title">Subject</label>
+ <input type="text" value="" name="title" id="form_title" placeholder="Provide a title" required>
+
+ <label for="form_detail">Details</label>
+ <textarea rows="7" cols="26" name="detail" id="form_detail" placeholder="Please fill in details of the problem." required></textarea>
+
+ <div id="form_category_row">
+ <label class="inline" for="form_category">Category</label>
+ <select name="category" id="form_category" required><option>Loading...</option></select>
+ </div>
+
+ <div id="add_photo">
+ <label>Add a Photo</label>
+ <input value="Take Photo" type="button" name="photo_button" id="id_photo_button" onclick="takePhoto(navigator.camera.PictureSourceType.CAMERA);" class="green-btn"> Or
+ <input value="Choose" type="button" name="existing" id="id_existing" onclick="takePhoto(navigator.camera.PictureSourceType.SAVEDPHOTOALBUM);" class="green-btn">
+ </div>
+
+ <div id="display_photo" style="display: none">
+ <label>Your Photo</label>
+ <img id="photo" src="" width="200" />
+ <input value="Remove Photo" type="button" name="del_photo_button" id="id_del_photo_button" onclick="delPhoto();" class="green-btn">
+ </div>
+
+ <input type="hidden" name="photo" id="form_photo" value="">
+ <label for="form_email" id="email_label">Your email</label>
+ <input type="email" value="" name="email" id="form_email" placeholder="Please enter your email address" required>
+
+ <div id="form_sign_in">
+ <h3 id="now_submit">Now to submit your report&hellip;</h3>
+ <h2 id="have_password">Do you have a FixMyStreet password?</h2>
+
+ <div id="form_sign_in_yes" class="form-box">
+
+ <h5><strong>Yes</strong> I have a password</h5>
+
+ <label class="hidden-js n" for="password_sign_in">Yes I have a password</label>
+ <div class="form-txt-submit-box">
+ <input type="password" name="password_sign_in" id="password_sign_in" placeholder="Your password" value="">
+ <input class="green-btn" type="submit" id="submit_sign_in" name="submit_sign_in" value="Report">
+ </div>
+ </div>
+
+ <div id="form_sign_in_no" class="form-box">
+ <h5 id="let_me_confirm"><strong>No</strong> Let me confirm my report by email</h5>
+
+ <label for="form_may_show_nameme">Name</label>
+ <input type="text" class="form-focus-trigger validName" value="" name="name" id="form_name" placeholder="Your name">
+
+ <div class="checkbox-group">
+ <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1" checked>
+ <label class="inline" for="form_may_show_name">Show my name publicly</label>
+ </div>
+
+ <div class="general-sidebar-notes form-focus-hidden">
+ <p class="dark">We never show your email address or phone number.</p>
+ <p id="providing_password">Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.</p>
+ </div>
+
+ <label class="form-focus-hidden" for="form_phone">Phone number</label>
+ <input class="form-focus-hidden" type="text" value="" name="phone" id="form_phone" placeholder="Your phone number (optional)">
+
+ <div id="password_surround">
+ <label class="form-focus-hidden" for="password_register" id="password_label">Password</label>
+ </div>
+
+ <div class="form-txt-submit-box form-focus-hidden">
+ <input type="password" name="password_register" id="password_register" value="" placeholder="Enter a password (optional)">
+ <input class="green-btn" type="submit" id="submit_register" name="submit_register" value="Report">
+ </div>
+ </div>
+ </div>
+ </div>
+ </fieldset>
+
+ <input type="hidden" name="submit_problem" value="1">
+ </div>
+
+ </div>
+ </form>
+ </div><!-- .content role=main -->
+ </div><!-- .container -->
+ </div><!-- .table-cell -->
+ </div> <!-- .wrapper -->
+ <div class="spinner" id="loadingSpinner">
+ <div class="bar1"></div>
+ <div class="bar2"></div>
+ <div class="bar3"></div>
+ <div class="bar4"></div>
+ <div class="bar5"></div>
+ <div class="bar6"></div>
+ <div class="bar7"></div>
+ <div class="bar8"></div>
+ <div class="bar9"></div>
+ <div class="bar10"></div>
+ <div class="bar11"></div>
+ <div class="bar12"></div>
+ </div>
+</body>
+</html>
diff --git a/phonegap/www/cordova-1.8.0.js b/phonegap/www/cordova-1.8.0.js
new file mode 100644
index 000000000..d9cced70f
--- /dev/null
+++ b/phonegap/www/cordova-1.8.0.js
@@ -0,0 +1,5226 @@
+// commit 109b8649b0e98597b147842a6f71999d2f7910f2
+
+// File generated at :: Tue Jun 05 2012 14:10:19 GMT-0700 (PDT)
+
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+
+;(function() {
+
+// file: lib/scripts/require.js
+var require,
+ define;
+
+(function () {
+ var modules = {};
+
+ function build(module) {
+ var factory = module.factory;
+ module.exports = {};
+ delete module.factory;
+ factory(require, module.exports, module);
+ return module.exports;
+ }
+
+ require = function (id) {
+ if (!modules[id]) {
+ throw "module " + id + " not found";
+ }
+ return modules[id].factory ? build(modules[id]) : modules[id].exports;
+ };
+
+ define = function (id, factory) {
+ if (modules[id]) {
+ throw "module " + id + " already defined";
+ }
+
+ modules[id] = {
+ id: id,
+ factory: factory
+ };
+ };
+
+ define.remove = function (id) {
+ delete modules[id];
+ };
+
+})();
+
+//Export for use in node
+if (typeof module === "object" && typeof require === "function") {
+ module.exports.require = require;
+ module.exports.define = define;
+}
+// file: lib/cordova.js
+define("cordova", function(require, exports, module) {
+var channel = require('cordova/channel');
+
+/**
+ * Listen for DOMContentLoaded and notify our channel subscribers.
+ */
+document.addEventListener('DOMContentLoaded', function() {
+ channel.onDOMContentLoaded.fire();
+}, false);
+if (document.readyState == 'complete' || document.readyState == 'interactive') {
+ channel.onDOMContentLoaded.fire();
+}
+
+/**
+ * Intercept calls to addEventListener + removeEventListener and handle deviceready,
+ * resume, and pause events.
+ */
+var m_document_addEventListener = document.addEventListener;
+var m_document_removeEventListener = document.removeEventListener;
+var m_window_addEventListener = window.addEventListener;
+var m_window_removeEventListener = window.removeEventListener;
+
+/**
+ * Houses custom event handlers to intercept on document + window event listeners.
+ */
+var documentEventHandlers = {},
+ windowEventHandlers = {};
+
+document.addEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ if (typeof documentEventHandlers[e] != 'undefined') {
+ if (evt === 'deviceready') {
+ documentEventHandlers[e].subscribeOnce(handler);
+ } else {
+ documentEventHandlers[e].subscribe(handler);
+ }
+ } else {
+ m_document_addEventListener.call(document, evt, handler, capture);
+ }
+};
+
+window.addEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ if (typeof windowEventHandlers[e] != 'undefined') {
+ windowEventHandlers[e].subscribe(handler);
+ } else {
+ m_window_addEventListener.call(window, evt, handler, capture);
+ }
+};
+
+document.removeEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ // If unsubcribing from an event that is handled by a plugin
+ if (typeof documentEventHandlers[e] != "undefined") {
+ documentEventHandlers[e].unsubscribe(handler);
+ } else {
+ m_document_removeEventListener.call(document, evt, handler, capture);
+ }
+};
+
+window.removeEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ // If unsubcribing from an event that is handled by a plugin
+ if (typeof windowEventHandlers[e] != "undefined") {
+ windowEventHandlers[e].unsubscribe(handler);
+ } else {
+ m_window_removeEventListener.call(window, evt, handler, capture);
+ }
+};
+
+function createEvent(type, data) {
+ var event = document.createEvent('Events');
+ event.initEvent(type, false, false);
+ if (data) {
+ for (var i in data) {
+ if (data.hasOwnProperty(i)) {
+ event[i] = data[i];
+ }
+ }
+ }
+ return event;
+}
+
+if(typeof window.console === "undefined") {
+ window.console = {
+ log:function(){}
+ };
+}
+
+var cordova = {
+ define:define,
+ require:require,
+ /**
+ * Methods to add/remove your own addEventListener hijacking on document + window.
+ */
+ addWindowEventHandler:function(event, opts) {
+ return (windowEventHandlers[event] = channel.create(event, opts));
+ },
+ addDocumentEventHandler:function(event, opts) {
+ return (documentEventHandlers[event] = channel.create(event, opts));
+ },
+ removeWindowEventHandler:function(event) {
+ delete windowEventHandlers[event];
+ },
+ removeDocumentEventHandler:function(event) {
+ delete documentEventHandlers[event];
+ },
+ /**
+ * Retreive original event handlers that were replaced by Cordova
+ *
+ * @return object
+ */
+ getOriginalHandlers: function() {
+ return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
+ 'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
+ },
+ /**
+ * Method to fire event from native code
+ */
+ fireDocumentEvent: function(type, data) {
+ var evt = createEvent(type, data);
+ if (typeof documentEventHandlers[type] != 'undefined') {
+ documentEventHandlers[type].fire(evt);
+ } else {
+ document.dispatchEvent(evt);
+ }
+ },
+ fireWindowEvent: function(type, data) {
+ var evt = createEvent(type,data);
+ if (typeof windowEventHandlers[type] != 'undefined') {
+ windowEventHandlers[type].fire(evt);
+ } else {
+ window.dispatchEvent(evt);
+ }
+ },
+ // TODO: this is Android only; think about how to do this better
+ shuttingDown:false,
+ UsePolling:false,
+ // END TODO
+
+ // TODO: iOS only
+ // This queue holds the currently executing command and all pending
+ // commands executed with cordova.exec().
+ commandQueue:[],
+ // Indicates if we're currently in the middle of flushing the command
+ // queue on the native side.
+ commandQueueFlushing:false,
+ // END TODO
+ /**
+ * Plugin callback mechanism.
+ */
+ callbackId: 0,
+ callbacks: {},
+ callbackStatus: {
+ NO_RESULT: 0,
+ OK: 1,
+ CLASS_NOT_FOUND_EXCEPTION: 2,
+ ILLEGAL_ACCESS_EXCEPTION: 3,
+ INSTANTIATION_EXCEPTION: 4,
+ MALFORMED_URL_EXCEPTION: 5,
+ IO_EXCEPTION: 6,
+ INVALID_ACTION: 7,
+ JSON_EXCEPTION: 8,
+ ERROR: 9
+ },
+
+ /**
+ * Called by native code when returning successful result from an action.
+ *
+ * @param callbackId
+ * @param args
+ */
+ callbackSuccess: function(callbackId, args) {
+ if (cordova.callbacks[callbackId]) {
+
+ // If result is to be sent to callback
+ if (args.status == cordova.callbackStatus.OK) {
+ try {
+ if (cordova.callbacks[callbackId].success) {
+ cordova.callbacks[callbackId].success(args.message);
+ }
+ }
+ catch (e) {
+ console.log("Error in success callback: "+callbackId+" = "+e);
+ }
+ }
+
+ // Clear callback if not expecting any more results
+ if (!args.keepCallback) {
+ delete cordova.callbacks[callbackId];
+ }
+ }
+ },
+
+ /**
+ * Called by native code when returning error result from an action.
+ *
+ * @param callbackId
+ * @param args
+ */
+ callbackError: function(callbackId, args) {
+ if (cordova.callbacks[callbackId]) {
+ try {
+ if (cordova.callbacks[callbackId].fail) {
+ cordova.callbacks[callbackId].fail(args.message);
+ }
+ }
+ catch (e) {
+ console.log("Error in error callback: "+callbackId+" = "+e);
+ }
+
+ // Clear callback if not expecting any more results
+ if (!args.keepCallback) {
+ delete cordova.callbacks[callbackId];
+ }
+ }
+ },
+ // TODO: remove in 2.0.
+ addPlugin: function(name, obj) {
+ console.log("[DEPRECATION NOTICE] window.addPlugin and window.plugins will be removed in version 2.0.");
+ if (!window.plugins[name]) {
+ window.plugins[name] = obj;
+ }
+ else {
+ console.log("Error: Plugin "+name+" already exists.");
+ }
+ },
+
+ addConstructor: function(func) {
+ channel.onCordovaReady.subscribeOnce(function() {
+ try {
+ func();
+ } catch(e) {
+ console.log("Failed to run constructor: " + e);
+ }
+ });
+ }
+};
+
+// Register pause, resume and deviceready channels as events on document.
+channel.onPause = cordova.addDocumentEventHandler('pause');
+channel.onResume = cordova.addDocumentEventHandler('resume');
+channel.onDeviceReady = cordova.addDocumentEventHandler('deviceready');
+
+// Adds deprecation warnings to functions of an object (but only logs a message once)
+function deprecateFunctions(obj, objLabel) {
+ var newObj = {};
+ var logHash = {};
+ for (var i in obj) {
+ if (obj.hasOwnProperty(i)) {
+ if (typeof obj[i] == 'function') {
+ newObj[i] = (function(prop){
+ var oldFunk = obj[prop];
+ var funkId = objLabel + '_' + prop;
+ return function() {
+ if (!logHash[funkId]) {
+ console.log('[DEPRECATION NOTICE] The "' + objLabel + '" global will be removed in version 2.0, please use lowercase "cordova".');
+ logHash[funkId] = true;
+ }
+ oldFunk.apply(obj, arguments);
+ };
+ })(i);
+ } else {
+ newObj[i] = (function(prop) { return obj[prop]; })(i);
+ }
+ }
+ }
+ return newObj;
+}
+
+/**
+ * Legacy variable for plugin support
+ * TODO: remove in 2.0.
+ */
+if (!window.PhoneGap) {
+ window.PhoneGap = deprecateFunctions(cordova, 'PhoneGap');
+}
+if (!window.Cordova) {
+ window.Cordova = deprecateFunctions(cordova, 'Cordova');
+}
+
+/**
+ * Plugins object
+ * TODO: remove in 2.0.
+ */
+if (!window.plugins) {
+ window.plugins = {};
+}
+
+module.exports = cordova;
+
+});
+
+// file: lib/common/builder.js
+define("cordova/builder", function(require, exports, module) {
+var utils = require('cordova/utils');
+
+function each(objects, func, context) {
+ for (var prop in objects) {
+ if (objects.hasOwnProperty(prop)) {
+ func.apply(context, [objects[prop], prop]);
+ }
+ }
+}
+
+function include(parent, objects, clobber, merge) {
+ each(objects, function (obj, key) {
+ try {
+ var result = obj.path ? require(obj.path) : {};
+
+ if (clobber) {
+ // Clobber if it doesn't exist.
+ if (typeof parent[key] === 'undefined') {
+ parent[key] = result;
+ } else if (typeof obj.path !== 'undefined') {
+ // If merging, merge properties onto parent, otherwise, clobber.
+ if (merge) {
+ recursiveMerge(parent[key], result);
+ } else {
+ parent[key] = result;
+ }
+ }
+ result = parent[key];
+ } else {
+ // Overwrite if not currently defined.
+ if (typeof parent[key] == 'undefined') {
+ parent[key] = result;
+ } else if (merge && typeof obj.path !== 'undefined') {
+ // If merging, merge parent onto result
+ recursiveMerge(result, parent[key]);
+ parent[key] = result;
+ } else {
+ // Set result to what already exists, so we can build children into it if they exist.
+ result = parent[key];
+ }
+ }
+
+ if (obj.children) {
+ include(result, obj.children, clobber, merge);
+ }
+ } catch(e) {
+ utils.alert('Exception building cordova JS globals: ' + e + ' for key "' + key + '"');
+ }
+ });
+}
+
+/**
+ * Merge properties from one object onto another recursively. Properties from
+ * the src object will overwrite existing target property.
+ *
+ * @param target Object to merge properties into.
+ * @param src Object to merge properties from.
+ */
+function recursiveMerge(target, src) {
+ for (var prop in src) {
+ if (src.hasOwnProperty(prop)) {
+ if (typeof target.prototype !== 'undefined' && target.prototype.constructor === target) {
+ // If the target object is a constructor override off prototype.
+ target.prototype[prop] = src[prop];
+ } else {
+ target[prop] = typeof src[prop] === 'object' ? recursiveMerge(
+ target[prop], src[prop]) : src[prop];
+ }
+ }
+ }
+ return target;
+}
+
+module.exports = {
+ build: function (objects) {
+ return {
+ intoButDontClobber: function (target) {
+ include(target, objects, false, false);
+ },
+ intoAndClobber: function(target) {
+ include(target, objects, true, false);
+ },
+ intoAndMerge: function(target) {
+ include(target, objects, true, true);
+ }
+ };
+ }
+};
+
+});
+
+// file: lib/common/channel.js
+define("cordova/channel", function(require, exports, module) {
+var utils = require('cordova/utils');
+
+/**
+ * Custom pub-sub "channel" that can have functions subscribed to it
+ * This object is used to define and control firing of events for
+ * cordova initialization.
+ *
+ * The order of events during page load and Cordova startup is as follows:
+ *
+ * onDOMContentLoaded Internal event that is received when the web page is loaded and parsed.
+ * onNativeReady Internal event that indicates the Cordova native side is ready.
+ * onCordovaReady Internal event fired when all Cordova JavaScript objects have been created.
+ * onCordovaInfoReady Internal event fired when device properties are available.
+ * onCordovaConnectionReady Internal event fired when the connection property has been set.
+ * onDeviceReady User event fired to indicate that Cordova is ready
+ * onResume User event fired to indicate a start/resume lifecycle event
+ * onPause User event fired to indicate a pause lifecycle event
+ * onDestroy Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
+ *
+ * The only Cordova events that user code should register for are:
+ * deviceready Cordova native code is initialized and Cordova APIs can be called from JavaScript
+ * pause App has moved to background
+ * resume App has returned to foreground
+ *
+ * Listeners can be registered as:
+ * document.addEventListener("deviceready", myDeviceReadyListener, false);
+ * document.addEventListener("resume", myResumeListener, false);
+ * document.addEventListener("pause", myPauseListener, false);
+ *
+ * The DOM lifecycle events should be used for saving and restoring state
+ * window.onload
+ * window.onunload
+ *
+ */
+
+/**
+ * Channel
+ * @constructor
+ * @param type String the channel name
+ * @param opts Object options to pass into the channel, currently
+ * supports:
+ * onSubscribe: callback that fires when
+ * something subscribes to the Channel. Sets
+ * context to the Channel.
+ * onUnsubscribe: callback that fires when
+ * something unsubscribes to the Channel. Sets
+ * context to the Channel.
+ */
+var Channel = function(type, opts) {
+ this.type = type;
+ this.handlers = {};
+ this.numHandlers = 0;
+ this.guid = 1;
+ this.fired = false;
+ this.enabled = true;
+ this.events = {
+ onSubscribe:null,
+ onUnsubscribe:null
+ };
+ if (opts) {
+ if (opts.onSubscribe) this.events.onSubscribe = opts.onSubscribe;
+ if (opts.onUnsubscribe) this.events.onUnsubscribe = opts.onUnsubscribe;
+ }
+},
+ channel = {
+ /**
+ * Calls the provided function only after all of the channels specified
+ * have been fired.
+ */
+ join: function (h, c) {
+ var i = c.length;
+ var len = i;
+ var f = function() {
+ if (!(--i)) h();
+ };
+ for (var j=0; j<len; j++) {
+ !c[j].fired?c[j].subscribeOnce(f):i--;
+ }
+ if (!i) h();
+ },
+ create: function (type, opts) {
+ channel[type] = new Channel(type, opts);
+ return channel[type];
+ },
+
+ /**
+ * cordova Channels that must fire before "deviceready" is fired.
+ */
+ deviceReadyChannelsArray: [],
+ deviceReadyChannelsMap: {},
+
+ /**
+ * Indicate that a feature needs to be initialized before it is ready to be used.
+ * This holds up Cordova's "deviceready" event until the feature has been initialized
+ * and Cordova.initComplete(feature) is called.
+ *
+ * @param feature {String} The unique feature name
+ */
+ waitForInitialization: function(feature) {
+ if (feature) {
+ var c = null;
+ if (this[feature]) {
+ c = this[feature];
+ }
+ else {
+ c = this.create(feature);
+ }
+ this.deviceReadyChannelsMap[feature] = c;
+ this.deviceReadyChannelsArray.push(c);
+ }
+ },
+
+ /**
+ * Indicate that initialization code has completed and the feature is ready to be used.
+ *
+ * @param feature {String} The unique feature name
+ */
+ initializationComplete: function(feature) {
+ var c = this.deviceReadyChannelsMap[feature];
+ if (c) {
+ c.fire();
+ }
+ }
+ };
+
+function forceFunction(f) {
+ if (f === null || f === undefined || typeof f != 'function') throw "Function required as first argument!";
+}
+
+/**
+ * Subscribes the given function to the channel. Any time that
+ * Channel.fire is called so too will the function.
+ * Optionally specify an execution context for the function
+ * and a guid that can be used to stop subscribing to the channel.
+ * Returns the guid.
+ */
+Channel.prototype.subscribe = function(f, c, g) {
+ // need a function to call
+ forceFunction(f);
+
+ var func = f;
+ if (typeof c == "object") { func = utils.close(c, f); }
+
+ g = g || func.observer_guid || f.observer_guid;
+ if (!g) {
+ // first time we've seen this subscriber
+ g = this.guid++;
+ }
+ else {
+ // subscriber already handled; dont set it twice
+ return g;
+ }
+ func.observer_guid = g;
+ f.observer_guid = g;
+ this.handlers[g] = func;
+ this.numHandlers++;
+ if (this.events.onSubscribe) this.events.onSubscribe.call(this);
+ if (this.fired) func.call(this);
+ return g;
+};
+
+/**
+ * Like subscribe but the function is only called once and then it
+ * auto-unsubscribes itself.
+ */
+Channel.prototype.subscribeOnce = function(f, c) {
+ // need a function to call
+ forceFunction(f);
+
+ var g = null;
+ var _this = this;
+ var m = function() {
+ f.apply(c || null, arguments);
+ _this.unsubscribe(g);
+ };
+ if (this.fired) {
+ if (typeof c == "object") { f = utils.close(c, f); }
+ f.apply(this, this.fireArgs);
+ } else {
+ g = this.subscribe(m);
+ }
+ return g;
+};
+
+/**
+ * Unsubscribes the function with the given guid from the channel.
+ */
+Channel.prototype.unsubscribe = function(g) {
+ // need a function to unsubscribe
+ if (g === null || g === undefined) { throw "You must pass _something_ into Channel.unsubscribe"; }
+
+ if (typeof g == 'function') { g = g.observer_guid; }
+ var handler = this.handlers[g];
+ if (handler) {
+ if (handler.observer_guid) handler.observer_guid=null;
+ this.handlers[g] = null;
+ delete this.handlers[g];
+ this.numHandlers--;
+ if (this.events.onUnsubscribe) this.events.onUnsubscribe.call(this);
+ }
+};
+
+/**
+ * Calls all functions subscribed to this channel.
+ */
+Channel.prototype.fire = function(e) {
+ if (this.enabled) {
+ var fail = false;
+ this.fired = true;
+ for (var item in this.handlers) {
+ var handler = this.handlers[item];
+ if (typeof handler == 'function') {
+ var rv = (handler.apply(this, arguments)===false);
+ fail = fail || rv;
+ }
+ }
+ this.fireArgs = arguments;
+ return !fail;
+ }
+ return true;
+};
+
+// defining them here so they are ready super fast!
+// DOM event that is received when the web page is loaded and parsed.
+channel.create('onDOMContentLoaded');
+
+// Event to indicate the Cordova native side is ready.
+channel.create('onNativeReady');
+
+// Event to indicate that all Cordova JavaScript objects have been created
+// and it's time to run plugin constructors.
+channel.create('onCordovaReady');
+
+// Event to indicate that device properties are available
+channel.create('onCordovaInfoReady');
+
+// Event to indicate that the connection property has been set.
+channel.create('onCordovaConnectionReady');
+
+// Event to indicate that Cordova is ready
+channel.create('onDeviceReady');
+
+// Event to indicate a resume lifecycle event
+channel.create('onResume');
+
+// Event to indicate a pause lifecycle event
+channel.create('onPause');
+
+// Event to indicate a destroy lifecycle event
+channel.create('onDestroy');
+
+// Channels that must fire before "deviceready" is fired.
+channel.waitForInitialization('onCordovaReady');
+channel.waitForInitialization('onCordovaInfoReady');
+channel.waitForInitialization('onCordovaConnectionReady');
+
+module.exports = channel;
+
+});
+
+// file: lib/common/common.js
+define("cordova/common", function(require, exports, module) {
+module.exports = {
+ objects: {
+ cordova: {
+ path: 'cordova',
+ children: {
+ exec: {
+ path: 'cordova/exec'
+ },
+ logger: {
+ path: 'cordova/plugin/logger'
+ }
+ }
+ },
+ Cordova: {
+ children: {
+ exec: {
+ path: 'cordova/exec'
+ }
+ }
+ },
+ PhoneGap:{
+ children: {
+ exec: {
+ path: 'cordova/exec'
+ }
+ }
+ },
+ navigator: {
+ children: {
+ notification: {
+ path: 'cordova/plugin/notification'
+ },
+ accelerometer: {
+ path: 'cordova/plugin/accelerometer'
+ },
+ battery: {
+ path: 'cordova/plugin/battery'
+ },
+ camera:{
+ path: 'cordova/plugin/Camera'
+ },
+ compass:{
+ path: 'cordova/plugin/compass'
+ },
+ contacts: {
+ path: 'cordova/plugin/contacts'
+ },
+ device:{
+ children:{
+ capture: {
+ path: 'cordova/plugin/capture'
+ }
+ }
+ },
+ geolocation: {
+ path: 'cordova/plugin/geolocation'
+ },
+ network: {
+ children: {
+ connection: {
+ path: 'cordova/plugin/network'
+ }
+ }
+ },
+ splashscreen: {
+ path: 'cordova/plugin/splashscreen'
+ }
+ }
+ },
+ Acceleration: {
+ path: 'cordova/plugin/Acceleration'
+ },
+ Camera:{
+ path: 'cordova/plugin/CameraConstants'
+ },
+ CameraPopoverOptions: {
+ path: 'cordova/plugin/CameraPopoverOptions'
+ },
+ CaptureError: {
+ path: 'cordova/plugin/CaptureError'
+ },
+ CaptureAudioOptions:{
+ path: 'cordova/plugin/CaptureAudioOptions'
+ },
+ CaptureImageOptions: {
+ path: 'cordova/plugin/CaptureImageOptions'
+ },
+ CaptureVideoOptions: {
+ path: 'cordova/plugin/CaptureVideoOptions'
+ },
+ CompassHeading:{
+ path: 'cordova/plugin/CompassHeading'
+ },
+ CompassError:{
+ path: 'cordova/plugin/CompassError'
+ },
+ ConfigurationData: {
+ path: 'cordova/plugin/ConfigurationData'
+ },
+ Connection: {
+ path: 'cordova/plugin/Connection'
+ },
+ Contact: {
+ path: 'cordova/plugin/Contact'
+ },
+ ContactAddress: {
+ path: 'cordova/plugin/ContactAddress'
+ },
+ ContactError: {
+ path: 'cordova/plugin/ContactError'
+ },
+ ContactField: {
+ path: 'cordova/plugin/ContactField'
+ },
+ ContactFindOptions: {
+ path: 'cordova/plugin/ContactFindOptions'
+ },
+ ContactName: {
+ path: 'cordova/plugin/ContactName'
+ },
+ ContactOrganization: {
+ path: 'cordova/plugin/ContactOrganization'
+ },
+ Coordinates: {
+ path: 'cordova/plugin/Coordinates'
+ },
+ DirectoryEntry: {
+ path: 'cordova/plugin/DirectoryEntry'
+ },
+ DirectoryReader: {
+ path: 'cordova/plugin/DirectoryReader'
+ },
+ Entry: {
+ path: 'cordova/plugin/Entry'
+ },
+ File: {
+ path: 'cordova/plugin/File'
+ },
+ FileEntry: {
+ path: 'cordova/plugin/FileEntry'
+ },
+ FileError: {
+ path: 'cordova/plugin/FileError'
+ },
+ FileReader: {
+ path: 'cordova/plugin/FileReader'
+ },
+ FileSystem: {
+ path: 'cordova/plugin/FileSystem'
+ },
+ FileTransfer: {
+ path: 'cordova/plugin/FileTransfer'
+ },
+ FileTransferError: {
+ path: 'cordova/plugin/FileTransferError'
+ },
+ FileUploadOptions: {
+ path: 'cordova/plugin/FileUploadOptions'
+ },
+ FileUploadResult: {
+ path: 'cordova/plugin/FileUploadResult'
+ },
+ FileWriter: {
+ path: 'cordova/plugin/FileWriter'
+ },
+ Flags: {
+ path: 'cordova/plugin/Flags'
+ },
+ LocalFileSystem: {
+ path: 'cordova/plugin/LocalFileSystem'
+ },
+ Media: {
+ path: 'cordova/plugin/Media'
+ },
+ MediaError: {
+ path: 'cordova/plugin/MediaError'
+ },
+ MediaFile: {
+ path: 'cordova/plugin/MediaFile'
+ },
+ MediaFileData:{
+ path: 'cordova/plugin/MediaFileData'
+ },
+ Metadata:{
+ path: 'cordova/plugin/Metadata'
+ },
+ Position: {
+ path: 'cordova/plugin/Position'
+ },
+ PositionError: {
+ path: 'cordova/plugin/PositionError'
+ },
+ ProgressEvent: {
+ path: 'cordova/plugin/ProgressEvent'
+ },
+ requestFileSystem:{
+ path: 'cordova/plugin/requestFileSystem'
+ },
+ resolveLocalFileSystemURI:{
+ path: 'cordova/plugin/resolveLocalFileSystemURI'
+ }
+ }
+};
+
+});
+
+// file: lib/ios/exec.js
+define("cordova/exec", function(require, exports, module) {
+ /**
+ * Creates a gap bridge iframe used to notify the native code about queued
+ * commands.
+ *
+ * @private
+ */
+var cordova = require('cordova'),
+ utils = require('cordova/utils'),
+ gapBridge,
+ createGapBridge = function() {
+ gapBridge = document.createElement("iframe");
+ gapBridge.setAttribute("style", "display:none;");
+ gapBridge.setAttribute("height","0px");
+ gapBridge.setAttribute("width","0px");
+ gapBridge.setAttribute("frameborder","0");
+ document.documentElement.appendChild(gapBridge);
+ },
+ channel = require('cordova/channel');
+
+module.exports = function() {
+ if (!channel.onCordovaInfoReady.fired) {
+ utils.alert("ERROR: Attempting to call cordova.exec()" +
+ " before 'deviceready'. Ignoring.");
+ return;
+ }
+
+ var successCallback, failCallback, service, action, actionArgs, splitCommand;
+ var callbackId = null;
+ if (typeof arguments[0] !== "string") {
+ // FORMAT ONE
+ successCallback = arguments[0];
+ failCallback = arguments[1];
+ service = arguments[2];
+ action = arguments[3];
+ actionArgs = arguments[4];
+
+ // Since we need to maintain backwards compatibility, we have to pass
+ // an invalid callbackId even if no callback was provided since plugins
+ // will be expecting it. The Cordova.exec() implementation allocates
+ // an invalid callbackId and passes it even if no callbacks were given.
+ callbackId = 'INVALID';
+ } else {
+ // FORMAT TWO
+ splitCommand = arguments[0].split(".");
+ action = splitCommand.pop();
+ service = splitCommand.join(".");
+ actionArgs = Array.prototype.splice.call(arguments, 1);
+ }
+
+ // Start building the command object.
+ var command = {
+ className: service,
+ methodName: action,
+ "arguments": []
+ };
+
+ // Register the callbacks and add the callbackId to the positional
+ // arguments if given.
+ if (successCallback || failCallback) {
+ callbackId = service + cordova.callbackId++;
+ cordova.callbacks[callbackId] =
+ {success:successCallback, fail:failCallback};
+ }
+ if (callbackId !== null) {
+ command["arguments"].push(callbackId);
+ }
+
+ for (var i = 0; i < actionArgs.length; ++i) {
+ var arg = actionArgs[i];
+ if (arg === undefined || arg === null) { // nulls are pushed to the args now (becomes NSNull)
+ command["arguments"].push(arg);
+ } else if (typeof(arg) == 'object' && !(utils.isArray(arg))) {
+ command.options = arg;
+ } else {
+ command["arguments"].push(arg);
+ }
+ }
+
+ // Stringify and queue the command. We stringify to command now to
+ // effectively clone the command arguments in case they are mutated before
+ // the command is executed.
+ cordova.commandQueue.push(JSON.stringify(command));
+
+ // If the queue length is 1, then that means it was empty before we queued
+ // the given command, so let the native side know that we have some
+ // commands to execute, unless the queue is currently being flushed, in
+ // which case the command will be picked up without notification.
+ if (cordova.commandQueue.length == 1 && !cordova.commandQueueFlushing) {
+ if (!gapBridge) {
+ createGapBridge();
+ }
+ gapBridge.src = "gap://ready";
+ }
+};
+
+});
+
+// file: lib/ios/platform.js
+define("cordova/platform", function(require, exports, module) {
+module.exports = {
+ id: "ios",
+ initialize:function() {
+ // iOS doesn't allow reassigning / overriding navigator.geolocation object.
+ // So clobber its methods here instead :)
+ var geo = require('cordova/plugin/geolocation');
+
+ navigator.geolocation.getCurrentPosition = geo.getCurrentPosition;
+ navigator.geolocation.watchPosition = geo.watchPosition;
+ navigator.geolocation.clearWatch = geo.clearWatch;
+ },
+ objects: {
+ File: { // exists natively, override
+ path: "cordova/plugin/File"
+ },
+ MediaError: { // exists natively, override
+ path: "cordova/plugin/MediaError"
+ },
+ device: {
+ path: 'cordova/plugin/ios/device'
+ },
+ console: {
+ path: 'cordova/plugin/ios/console'
+ }
+ },
+ merges:{
+ Contact:{
+ path: "cordova/plugin/ios/Contact"
+ },
+ Entry:{
+ path: "cordova/plugin/ios/Entry"
+ },
+ FileReader:{
+ path: "cordova/plugin/ios/FileReader"
+ },
+ navigator:{
+ children:{
+ notification:{
+ path:"cordova/plugin/ios/notification"
+ },
+ contacts:{
+ path:"cordova/plugin/ios/contacts"
+ }
+ }
+ }
+ }
+};
+
+// use the native logger
+var logger = require("cordova/plugin/logger");
+logger.useConsole(false);
+
+});
+
+// file: lib/common/plugin/Acceleration.js
+define("cordova/plugin/Acceleration", function(require, exports, module) {
+var Acceleration = function(x, y, z, timestamp) {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.timestamp = timestamp || (new Date()).getTime();
+};
+
+module.exports = Acceleration;
+
+});
+
+// file: lib/common/plugin/Camera.js
+define("cordova/plugin/Camera", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ Camera = require('cordova/plugin/CameraConstants');
+
+var cameraExport = {};
+
+// Tack on the Camera Constants to the base camera plugin.
+for (var key in Camera) {
+ cameraExport[key] = Camera[key];
+}
+
+/**
+ * Gets a picture from source defined by "options.sourceType", and returns the
+ * image as defined by the "options.destinationType" option.
+
+ * The defaults are sourceType=CAMERA and destinationType=FILE_URI.
+ *
+ * @param {Function} successCallback
+ * @param {Function} errorCallback
+ * @param {Object} options
+ */
+cameraExport.getPicture = function(successCallback, errorCallback, options) {
+ // successCallback required
+ if (typeof successCallback != "function") {
+ console.log("Camera Error: successCallback is not a function");
+ return;
+ }
+
+ // errorCallback optional
+ if (errorCallback && (typeof errorCallback != "function")) {
+ console.log("Camera Error: errorCallback is not a function");
+ return;
+ }
+
+ var quality = 50;
+ if (options && typeof options.quality == "number") {
+ quality = options.quality;
+ } else if (options && typeof options.quality == "string") {
+ var qlity = parseInt(options.quality, 10);
+ if (isNaN(qlity) === false) {
+ quality = qlity.valueOf();
+ }
+ }
+
+ var destinationType = Camera.DestinationType.FILE_URI;
+ if (typeof options.destinationType == "number") {
+ destinationType = options.destinationType;
+ }
+
+ var sourceType = Camera.PictureSourceType.CAMERA;
+ if (typeof options.sourceType == "number") {
+ sourceType = options.sourceType;
+ }
+
+ var targetWidth = -1;
+ if (typeof options.targetWidth == "number") {
+ targetWidth = options.targetWidth;
+ } else if (typeof options.targetWidth == "string") {
+ var width = parseInt(options.targetWidth, 10);
+ if (isNaN(width) === false) {
+ targetWidth = width.valueOf();
+ }
+ }
+
+ var targetHeight = -1;
+ if (typeof options.targetHeight == "number") {
+ targetHeight = options.targetHeight;
+ } else if (typeof options.targetHeight == "string") {
+ var height = parseInt(options.targetHeight, 10);
+ if (isNaN(height) === false) {
+ targetHeight = height.valueOf();
+ }
+ }
+
+ var encodingType = Camera.EncodingType.JPEG;
+ if (typeof options.encodingType == "number") {
+ encodingType = options.encodingType;
+ }
+
+ var mediaType = Camera.MediaType.PICTURE;
+ if (typeof options.mediaType == "number") {
+ mediaType = options.mediaType;
+ }
+ var allowEdit = false;
+ if (typeof options.allowEdit == "boolean") {
+ allowEdit = options.allowEdit;
+ } else if (typeof options.allowEdit == "number") {
+ allowEdit = options.allowEdit <= 0 ? false : true;
+ }
+ var correctOrientation = false;
+ if (typeof options.correctOrientation == "boolean") {
+ correctOrientation = options.correctOrientation;
+ } else if (typeof options.correctOrientation == "number") {
+ correctOrientation = options.correctOrientation <=0 ? false : true;
+ }
+ var saveToPhotoAlbum = false;
+ if (typeof options.saveToPhotoAlbum == "boolean") {
+ saveToPhotoAlbum = options.saveToPhotoAlbum;
+ } else if (typeof options.saveToPhotoAlbum == "number") {
+ saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
+ }
+ var popoverOptions = null;
+ if (typeof options.popoverOptions == "object") {
+ popoverOptions = options.popoverOptions;
+ }
+
+ exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType, mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions]);
+};
+
+module.exports = cameraExport;
+});
+
+// file: lib/common/plugin/CameraConstants.js
+define("cordova/plugin/CameraConstants", function(require, exports, module) {
+module.exports = {
+ DestinationType:{
+ DATA_URL: 0, // Return base64 encoded string
+ FILE_URI: 1 // Return file uri (content://media/external/images/media/2 for Android)
+ },
+ EncodingType:{
+ JPEG: 0, // Return JPEG encoded image
+ PNG: 1 // Return PNG encoded image
+ },
+ MediaType:{
+ PICTURE: 0, // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
+ VIDEO: 1, // allow selection of video only, ONLY RETURNS URL
+ ALLMEDIA : 2 // allow selection from all media types
+ },
+ PictureSourceType:{
+ PHOTOLIBRARY : 0, // Choose image from picture library (same as SAVEDPHOTOALBUM for Android)
+ CAMERA : 1, // Take picture from camera
+ SAVEDPHOTOALBUM : 2 // Choose image from picture library (same as PHOTOLIBRARY for Android)
+ },
+ PopoverArrowDirection:{
+ ARROW_UP : 1, // matches iOS UIPopoverArrowDirection constants to specify arrow location on popover
+ ARROW_DOWN : 2,
+ ARROW_LEFT : 4,
+ ARROW_RIGHT : 8,
+ ARROW_ANY : 15
+ }
+};
+});
+
+// file: lib/common/plugin/CameraPopoverOptions.js
+define("cordova/plugin/CameraPopoverOptions", function(require, exports, module) {
+var Camera = require('cordova/plugin/CameraConstants');
+
+/**
+ * Encapsulates options for iOS Popover image picker
+ */
+var CameraPopoverOptions = function(x,y,width,height,arrowDir){
+ // information of rectangle that popover should be anchored to
+ this.x = x || 0;
+ this.y = y || 32;
+ this.width = width || 320;
+ this.height = height || 480;
+ // The direction of the popover arrow
+ this.arrowDir = arrowDir || Camera.PopoverArrowDirection.ARROW_ANY;
+};
+
+module.exports = CameraPopoverOptions;
+});
+
+// file: lib/common/plugin/CaptureAudioOptions.js
+define("cordova/plugin/CaptureAudioOptions", function(require, exports, module) {
+/**
+ * Encapsulates all audio capture operation configuration options.
+ */
+var CaptureAudioOptions = function(){
+ // Upper limit of sound clips user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single sound clip in seconds.
+ this.duration = 0;
+ // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
+ this.mode = null;
+};
+
+module.exports = CaptureAudioOptions;
+});
+
+// file: lib/common/plugin/CaptureError.js
+define("cordova/plugin/CaptureError", function(require, exports, module) {
+/**
+ * The CaptureError interface encapsulates all errors in the Capture API.
+ */
+var CaptureError = function(c) {
+ this.code = c || null;
+};
+
+// Camera or microphone failed to capture image or sound.
+CaptureError.CAPTURE_INTERNAL_ERR = 0;
+// Camera application or audio capture application is currently serving other capture request.
+CaptureError.CAPTURE_APPLICATION_BUSY = 1;
+// Invalid use of the API (e.g. limit parameter has value less than one).
+CaptureError.CAPTURE_INVALID_ARGUMENT = 2;
+// User exited camera application or audio capture application before capturing anything.
+CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
+// The requested capture operation is not supported.
+CaptureError.CAPTURE_NOT_SUPPORTED = 20;
+
+module.exports = CaptureError;
+});
+
+// file: lib/common/plugin/CaptureImageOptions.js
+define("cordova/plugin/CaptureImageOptions", function(require, exports, module) {
+/**
+ * Encapsulates all image capture operation configuration options.
+ */
+var CaptureImageOptions = function(){
+ // Upper limit of images user can take. Value must be equal or greater than 1.
+ this.limit = 1;
+ // The selected image mode. Must match with one of the elements in supportedImageModes array.
+ this.mode = null;
+};
+
+module.exports = CaptureImageOptions;
+});
+
+// file: lib/common/plugin/CaptureVideoOptions.js
+define("cordova/plugin/CaptureVideoOptions", function(require, exports, module) {
+/**
+ * Encapsulates all video capture operation configuration options.
+ */
+var CaptureVideoOptions = function(){
+ // Upper limit of videos user can record. Value must be equal or greater than 1.
+ this.limit = 1;
+ // Maximum duration of a single video clip in seconds.
+ this.duration = 0;
+ // The selected video mode. Must match with one of the elements in supportedVideoModes array.
+ this.mode = null;
+};
+
+module.exports = CaptureVideoOptions;
+});
+
+// file: lib/common/plugin/CompassError.js
+define("cordova/plugin/CompassError", function(require, exports, module) {
+/**
+ * CompassError.
+ * An error code assigned by an implementation when an error has occured
+ * @constructor
+ */
+var CompassError = function(err) {
+ this.code = (err !== undefined ? err : null);
+};
+
+CompassError.COMPASS_INTERNAL_ERR = 0;
+CompassError.COMPASS_NOT_SUPPORTED = 20;
+
+module.exports = CompassError;
+});
+
+// file: lib/common/plugin/CompassHeading.js
+define("cordova/plugin/CompassHeading", function(require, exports, module) {
+var CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, timestamp) {
+ this.magneticHeading = (magneticHeading !== undefined ? magneticHeading : null);
+ this.trueHeading = (trueHeading !== undefined ? trueHeading : null);
+ this.headingAccuracy = (headingAccuracy !== undefined ? headingAccuracy : null);
+ this.timestamp = (timestamp !== undefined ? timestamp : new Date().getTime());
+};
+
+module.exports = CompassHeading;
+});
+
+// file: lib/common/plugin/ConfigurationData.js
+define("cordova/plugin/ConfigurationData", function(require, exports, module) {
+/**
+ * Encapsulates a set of parameters that the capture device supports.
+ */
+function ConfigurationData() {
+ // The ASCII-encoded string in lower case representing the media type.
+ this.type = null;
+ // The height attribute represents height of the image or video in pixels.
+ // In the case of a sound clip this attribute has value 0.
+ this.height = 0;
+ // The width attribute represents width of the image or video in pixels.
+ // In the case of a sound clip this attribute has value 0
+ this.width = 0;
+}
+
+module.exports = ConfigurationData;
+});
+
+// file: lib/common/plugin/Connection.js
+define("cordova/plugin/Connection", function(require, exports, module) {
+/**
+ * Network status
+ */
+module.exports = {
+ UNKNOWN: "unknown",
+ ETHERNET: "ethernet",
+ WIFI: "wifi",
+ CELL_2G: "2g",
+ CELL_3G: "3g",
+ CELL_4G: "4g",
+ NONE: "none"
+};
+});
+
+// file: lib/common/plugin/Contact.js
+define("cordova/plugin/Contact", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ ContactError = require('cordova/plugin/ContactError'),
+ utils = require('cordova/utils');
+
+/**
+* Converts primitives into Complex Object
+* Currently only used for Date fields
+*/
+function convertIn(contact) {
+ var value = contact.birthday;
+ try {
+ contact.birthday = new Date(parseFloat(value));
+ } catch (exception){
+ console.log("Cordova Contact convertIn error: exception creating date.");
+ }
+ return contact;
+}
+
+/**
+* Converts Complex objects into primitives
+* Only conversion at present is for Dates.
+**/
+
+function convertOut(contact) {
+ var value = contact.birthday;
+ if (value !== null) {
+ // try to make it a Date object if it is not already
+ if (!utils.isDate(value)){
+ try {
+ value = new Date(value);
+ } catch(exception){
+ value = null;
+ }
+ }
+ if (utils.isDate(value)){
+ value = value.valueOf(); // convert to milliseconds
+ }
+ contact.birthday = value;
+ }
+ return contact;
+}
+
+/**
+* Contains information about a single contact.
+* @constructor
+* @param {DOMString} id unique identifier
+* @param {DOMString} displayName
+* @param {ContactName} name
+* @param {DOMString} nickname
+* @param {Array.<ContactField>} phoneNumbers array of phone numbers
+* @param {Array.<ContactField>} emails array of email addresses
+* @param {Array.<ContactAddress>} addresses array of addresses
+* @param {Array.<ContactField>} ims instant messaging user ids
+* @param {Array.<ContactOrganization>} organizations
+* @param {DOMString} birthday contact's birthday
+* @param {DOMString} note user notes about contact
+* @param {Array.<ContactField>} photos
+* @param {Array.<ContactField>} categories
+* @param {Array.<ContactField>} urls contact's web sites
+*/
+var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
+ ims, organizations, birthday, note, photos, categories, urls) {
+ this.id = id || null;
+ this.rawId = null;
+ this.displayName = displayName || null;
+ this.name = name || null; // ContactName
+ this.nickname = nickname || null;
+ this.phoneNumbers = phoneNumbers || null; // ContactField[]
+ this.emails = emails || null; // ContactField[]
+ this.addresses = addresses || null; // ContactAddress[]
+ this.ims = ims || null; // ContactField[]
+ this.organizations = organizations || null; // ContactOrganization[]
+ this.birthday = birthday || null;
+ this.note = note || null;
+ this.photos = photos || null; // ContactField[]
+ this.categories = categories || null; // ContactField[]
+ this.urls = urls || null; // ContactField[]
+};
+
+/**
+* Removes contact from device storage.
+* @param successCB success callback
+* @param errorCB error callback
+*/
+Contact.prototype.remove = function(successCB, errorCB) {
+ var fail = function(code) {
+ errorCB(new ContactError(code));
+ };
+ if (this.id === null) {
+ fail(ContactError.UNKNOWN_ERROR);
+ }
+ else {
+ exec(successCB, fail, "Contacts", "remove", [this.id]);
+ }
+};
+
+/**
+* Creates a deep copy of this Contact.
+* With the contact ID set to null.
+* @return copy of this Contact
+*/
+Contact.prototype.clone = function() {
+ var clonedContact = utils.clone(this);
+ var i;
+ clonedContact.id = null;
+ clonedContact.rawId = null;
+ // Loop through and clear out any id's in phones, emails, etc.
+ if (clonedContact.phoneNumbers) {
+ for (i = 0; i < clonedContact.phoneNumbers.length; i++) {
+ clonedContact.phoneNumbers[i].id = null;
+ }
+ }
+ if (clonedContact.emails) {
+ for (i = 0; i < clonedContact.emails.length; i++) {
+ clonedContact.emails[i].id = null;
+ }
+ }
+ if (clonedContact.addresses) {
+ for (i = 0; i < clonedContact.addresses.length; i++) {
+ clonedContact.addresses[i].id = null;
+ }
+ }
+ if (clonedContact.ims) {
+ for (i = 0; i < clonedContact.ims.length; i++) {
+ clonedContact.ims[i].id = null;
+ }
+ }
+ if (clonedContact.organizations) {
+ for (i = 0; i < clonedContact.organizations.length; i++) {
+ clonedContact.organizations[i].id = null;
+ }
+ }
+ if (clonedContact.categories) {
+ for (i = 0; i < clonedContact.categories.length; i++) {
+ clonedContact.categories[i].id = null;
+ }
+ }
+ if (clonedContact.photos) {
+ for (i = 0; i < clonedContact.photos.length; i++) {
+ clonedContact.photos[i].id = null;
+ }
+ }
+ if (clonedContact.urls) {
+ for (i = 0; i < clonedContact.urls.length; i++) {
+ clonedContact.urls[i].id = null;
+ }
+ }
+ return clonedContact;
+};
+
+/**
+* Persists contact to device storage.
+* @param successCB success callback
+* @param errorCB error callback
+*/
+Contact.prototype.save = function(successCB, errorCB) {
+ var fail = function(code) {
+ errorCB(new ContactError(code));
+ };
+ var success = function(result) {
+ if (result) {
+ if (typeof successCB === 'function') {
+ var fullContact = require('cordova/plugin/contacts').create(result);
+ successCB(convertIn(fullContact));
+ }
+ }
+ else {
+ // no Entry object returned
+ fail(ContactError.UNKNOWN_ERROR);
+ }
+ };
+ var dupContact = convertOut(utils.clone(this));
+ exec(success, fail, "Contacts", "save", [dupContact]);
+};
+
+
+module.exports = Contact;
+
+});
+
+// file: lib/common/plugin/ContactAddress.js
+define("cordova/plugin/ContactAddress", function(require, exports, module) {
+/**
+* Contact address.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code
+* @param formatted // NOTE: not a W3C standard
+* @param streetAddress
+* @param locality
+* @param region
+* @param postalCode
+* @param country
+*/
+
+var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
+ this.id = null;
+ this.pref = (typeof pref != 'undefined' ? pref : false);
+ this.type = type || null;
+ this.formatted = formatted || null;
+ this.streetAddress = streetAddress || null;
+ this.locality = locality || null;
+ this.region = region || null;
+ this.postalCode = postalCode || null;
+ this.country = country || null;
+};
+
+module.exports = ContactAddress;
+});
+
+// file: lib/common/plugin/ContactError.js
+define("cordova/plugin/ContactError", function(require, exports, module) {
+/**
+ * ContactError.
+ * An error code assigned by an implementation when an error has occured
+ * @constructor
+ */
+var ContactError = function(err) {
+ this.code = (typeof err != 'undefined' ? err : null);
+};
+
+/**
+ * Error codes
+ */
+ContactError.UNKNOWN_ERROR = 0;
+ContactError.INVALID_ARGUMENT_ERROR = 1;
+ContactError.TIMEOUT_ERROR = 2;
+ContactError.PENDING_OPERATION_ERROR = 3;
+ContactError.IO_ERROR = 4;
+ContactError.NOT_SUPPORTED_ERROR = 5;
+ContactError.PERMISSION_DENIED_ERROR = 20;
+
+module.exports = ContactError;
+});
+
+// file: lib/common/plugin/ContactField.js
+define("cordova/plugin/ContactField", function(require, exports, module) {
+/**
+* Generic contact field.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
+* @param type
+* @param value
+* @param pref
+*/
+var ContactField = function(type, value, pref) {
+ this.id = null;
+ this.type = (type && type.toString()) || null;
+ this.value = (value && value.toString()) || null;
+ this.pref = (typeof pref != 'undefined' ? pref : false);
+};
+
+module.exports = ContactField;
+});
+
+// file: lib/common/plugin/ContactFindOptions.js
+define("cordova/plugin/ContactFindOptions", function(require, exports, module) {
+/**
+ * ContactFindOptions.
+ * @constructor
+ * @param filter used to match contacts against
+ * @param multiple boolean used to determine if more than one contact should be returned
+ */
+
+var ContactFindOptions = function(filter, multiple) {
+ this.filter = filter || '';
+ this.multiple = (typeof multiple != 'undefined' ? multiple : false);
+};
+
+module.exports = ContactFindOptions;
+});
+
+// file: lib/common/plugin/ContactName.js
+define("cordova/plugin/ContactName", function(require, exports, module) {
+/**
+* Contact name.
+* @constructor
+* @param formatted // NOTE: not part of W3C standard
+* @param familyName
+* @param givenName
+* @param middle
+* @param prefix
+* @param suffix
+*/
+var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
+ this.formatted = formatted || null;
+ this.familyName = familyName || null;
+ this.givenName = givenName || null;
+ this.middleName = middle || null;
+ this.honorificPrefix = prefix || null;
+ this.honorificSuffix = suffix || null;
+};
+
+module.exports = ContactName;
+});
+
+// file: lib/common/plugin/ContactOrganization.js
+define("cordova/plugin/ContactOrganization", function(require, exports, module) {
+/**
+* Contact organization.
+* @constructor
+* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard
+* @param name
+* @param dept
+* @param title
+* @param startDate
+* @param endDate
+* @param location
+* @param desc
+*/
+
+var ContactOrganization = function(pref, type, name, dept, title) {
+ this.id = null;
+ this.pref = (typeof pref != 'undefined' ? pref : false);
+ this.type = type || null;
+ this.name = name || null;
+ this.department = dept || null;
+ this.title = title || null;
+};
+
+module.exports = ContactOrganization;
+});
+
+// file: lib/common/plugin/Coordinates.js
+define("cordova/plugin/Coordinates", function(require, exports, module) {
+/**
+ * This class contains position information.
+ * @param {Object} lat
+ * @param {Object} lng
+ * @param {Object} alt
+ * @param {Object} acc
+ * @param {Object} head
+ * @param {Object} vel
+ * @param {Object} altacc
+ * @constructor
+ */
+var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
+ /**
+ * The latitude of the position.
+ */
+ this.latitude = lat;
+ /**
+ * The longitude of the position,
+ */
+ this.longitude = lng;
+ /**
+ * The accuracy of the position.
+ */
+ this.accuracy = acc;
+ /**
+ * The altitude of the position.
+ */
+ this.altitude = (alt !== undefined ? alt : null);
+ /**
+ * The direction the device is moving at the position.
+ */
+ this.heading = (head !== undefined ? head : null);
+ /**
+ * The velocity with which the device is moving at the position.
+ */
+ this.speed = (vel !== undefined ? vel : null);
+
+ if (this.speed === 0 || this.speed === null) {
+ this.heading = NaN;
+ }
+
+ /**
+ * The altitude accuracy of the position.
+ */
+ this.altitudeAccuracy = (altacc !== undefined) ? altacc : null;
+};
+
+module.exports = Coordinates;
+
+});
+
+// file: lib/common/plugin/DirectoryEntry.js
+define("cordova/plugin/DirectoryEntry", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec'),
+ Entry = require('cordova/plugin/Entry'),
+ FileError = require('cordova/plugin/FileError'),
+ DirectoryReader = require('cordova/plugin/DirectoryReader');
+
+/**
+ * An interface representing a directory on the file system.
+ *
+ * {boolean} isFile always false (readonly)
+ * {boolean} isDirectory always true (readonly)
+ * {DOMString} name of the directory, excluding the path leading to it (readonly)
+ * {DOMString} fullPath the absolute full path to the directory (readonly)
+ * {FileSystem} filesystem on which the directory resides (readonly)
+ */
+var DirectoryEntry = function(name, fullPath) {
+ DirectoryEntry.__super__.constructor.apply(this, [false, true, name, fullPath]);
+};
+
+utils.extend(DirectoryEntry, Entry);
+
+/**
+ * Creates a new DirectoryReader to read entries from this directory
+ */
+DirectoryEntry.prototype.createReader = function() {
+ return new DirectoryReader(this.fullPath);
+};
+
+/**
+ * Creates or looks up a directory
+ *
+ * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
+ * @param {Flags} options to create or excluively create the directory
+ * @param {Function} successCallback is called with the new entry
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryEntry.prototype.getDirectory = function(path, options, successCallback, errorCallback) {
+ var win = typeof successCallback !== 'function' ? null : function(result) {
+ var entry = new DirectoryEntry(result.name, result.fullPath);
+ successCallback(entry);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(win, fail, "File", "getDirectory", [this.fullPath, path, options]);
+};
+
+/**
+ * Deletes a directory and all of it's contents
+ *
+ * @param {Function} successCallback is called with no parameters
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryEntry.prototype.removeRecursively = function(successCallback, errorCallback) {
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(successCallback, fail, "File", "removeRecursively", [this.fullPath]);
+};
+
+/**
+ * Creates or looks up a file
+ *
+ * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
+ * @param {Flags} options to create or excluively create the file
+ * @param {Function} successCallback is called with the new entry
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {
+ var win = typeof successCallback !== 'function' ? null : function(result) {
+ var FileEntry = require('cordova/plugin/FileEntry');
+ var entry = new FileEntry(result.name, result.fullPath);
+ successCallback(entry);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(win, fail, "File", "getFile", [this.fullPath, path, options]);
+};
+
+module.exports = DirectoryEntry;
+
+});
+
+// file: lib/common/plugin/DirectoryReader.js
+define("cordova/plugin/DirectoryReader", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError') ;
+
+/**
+ * An interface that lists the files and directories in a directory.
+ */
+function DirectoryReader(path) {
+ this.path = path || null;
+}
+
+/**
+ * Returns a list of entries from a directory.
+ *
+ * @param {Function} successCallback is called with a list of entries
+ * @param {Function} errorCallback is called with a FileError
+ */
+DirectoryReader.prototype.readEntries = function(successCallback, errorCallback) {
+ var win = typeof successCallback !== 'function' ? null : function(result) {
+ var retVal = [];
+ for (var i=0; i<result.length; i++) {
+ var entry = null;
+ if (result[i].isDirectory) {
+ entry = new (require('cordova/plugin/DirectoryEntry'))();
+ }
+ else if (result[i].isFile) {
+ entry = new (require('cordova/plugin/FileEntry'))();
+ }
+ entry.isDirectory = result[i].isDirectory;
+ entry.isFile = result[i].isFile;
+ entry.name = result[i].name;
+ entry.fullPath = result[i].fullPath;
+ retVal.push(entry);
+ }
+ successCallback(retVal);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(win, fail, "File", "readEntries", [this.path]);
+};
+
+module.exports = DirectoryReader;
+
+});
+
+// file: lib/common/plugin/Entry.js
+define("cordova/plugin/Entry", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError'),
+ Metadata = require('cordova/plugin/Metadata');
+
+/**
+ * Represents a file or directory on the local file system.
+ *
+ * @param isFile
+ * {boolean} true if Entry is a file (readonly)
+ * @param isDirectory
+ * {boolean} true if Entry is a directory (readonly)
+ * @param name
+ * {DOMString} name of the file or directory, excluding the path
+ * leading to it (readonly)
+ * @param fullPath
+ * {DOMString} the absolute full path to the file or directory
+ * (readonly)
+ */
+function Entry(isFile, isDirectory, name, fullPath, fileSystem) {
+ this.isFile = (typeof isFile != 'undefined'?isFile:false);
+ this.isDirectory = (typeof isDirectory != 'undefined'?isDirectory:false);
+ this.name = name || '';
+ this.fullPath = fullPath || '';
+ this.filesystem = fileSystem || null;
+}
+
+/**
+ * Look up the metadata of the entry.
+ *
+ * @param successCallback
+ * {Function} is called with a Metadata object
+ * @param errorCallback
+ * {Function} is called with a FileError
+ */
+Entry.prototype.getMetadata = function(successCallback, errorCallback) {
+ var success = typeof successCallback !== 'function' ? null : function(lastModified) {
+ var metadata = new Metadata(lastModified);
+ successCallback(metadata);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+
+ exec(success, fail, "File", "getMetadata", [this.fullPath]);
+};
+
+/**
+ * Set the metadata of the entry.
+ *
+ * @param successCallback
+ * {Function} is called with a Metadata object
+ * @param errorCallback
+ * {Function} is called with a FileError
+ * @param metadataObject
+ * {Object} keys and values to set
+ */
+Entry.prototype.setMetadata = function(successCallback, errorCallback, metadataObject) {
+
+ exec(successCallback, errorCallback, "File", "setMetadata", [this.fullPath, metadataObject]);
+};
+
+/**
+ * Move a file or directory to a new location.
+ *
+ * @param parent
+ * {DirectoryEntry} the directory to which to move this entry
+ * @param newName
+ * {DOMString} new name of the entry, defaults to the current name
+ * @param successCallback
+ * {Function} called with the new DirectoryEntry object
+ * @param errorCallback
+ * {Function} called with a FileError
+ */
+Entry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
+ var fail = function(code) {
+ if (typeof errorCallback === 'function') {
+ errorCallback(new FileError(code));
+ }
+ };
+ // user must specify parent Entry
+ if (!parent) {
+ fail(FileError.NOT_FOUND_ERR);
+ return;
+ }
+ // source path
+ var srcPath = this.fullPath,
+ // entry name
+ name = newName || this.name,
+ success = function(entry) {
+ if (entry) {
+ if (typeof successCallback === 'function') {
+ // create appropriate Entry object
+ var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
+ try {
+ successCallback(result);
+ }
+ catch (e) {
+ console.log('Error invoking callback: ' + e);
+ }
+ }
+ }
+ else {
+ // no Entry object returned
+ fail(FileError.NOT_FOUND_ERR);
+ }
+ };
+
+ // copy
+ exec(success, fail, "File", "moveTo", [srcPath, parent.fullPath, name]);
+};
+
+/**
+ * Copy a directory to a different location.
+ *
+ * @param parent
+ * {DirectoryEntry} the directory to which to copy the entry
+ * @param newName
+ * {DOMString} new name of the entry, defaults to the current name
+ * @param successCallback
+ * {Function} called with the new Entry object
+ * @param errorCallback
+ * {Function} called with a FileError
+ */
+Entry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
+ var fail = function(code) {
+ if (typeof errorCallback === 'function') {
+ errorCallback(new FileError(code));
+ }
+ };
+
+ // user must specify parent Entry
+ if (!parent) {
+ fail(FileError.NOT_FOUND_ERR);
+ return;
+ }
+
+ // source path
+ var srcPath = this.fullPath,
+ // entry name
+ name = newName || this.name,
+ // success callback
+ success = function(entry) {
+ if (entry) {
+ if (typeof successCallback === 'function') {
+ // create appropriate Entry object
+ var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);
+ try {
+ successCallback(result);
+ }
+ catch (e) {
+ console.log('Error invoking callback: ' + e);
+ }
+ }
+ }
+ else {
+ // no Entry object returned
+ fail(FileError.NOT_FOUND_ERR);
+ }
+ };
+
+ // copy
+ exec(success, fail, "File", "copyTo", [srcPath, parent.fullPath, name]);
+};
+
+/**
+ * Return a URL that can be used to identify this entry.
+ */
+Entry.prototype.toURL = function() {
+ // fullPath attribute contains the full URL
+ return this.fullPath;
+};
+
+/**
+ * Returns a URI that can be used to identify this entry.
+ *
+ * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
+ * @return uri
+ */
+Entry.prototype.toURI = function(mimeType) {
+ console.log("DEPRECATED: Update your code to use 'toURL'");
+ // fullPath attribute contains the full URI
+ return this.toURL();
+};
+
+/**
+ * Remove a file or directory. It is an error to attempt to delete a
+ * directory that is not empty. It is an error to attempt to delete a
+ * root directory of a file system.
+ *
+ * @param successCallback {Function} called with no parameters
+ * @param errorCallback {Function} called with a FileError
+ */
+Entry.prototype.remove = function(successCallback, errorCallback) {
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(successCallback, fail, "File", "remove", [this.fullPath]);
+};
+
+/**
+ * Look up the parent DirectoryEntry of this entry.
+ *
+ * @param successCallback {Function} called with the parent DirectoryEntry object
+ * @param errorCallback {Function} called with a FileError
+ */
+Entry.prototype.getParent = function(successCallback, errorCallback) {
+ var win = typeof successCallback !== 'function' ? null : function(result) {
+ var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
+ var entry = new DirectoryEntry(result.name, result.fullPath);
+ successCallback(entry);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(win, fail, "File", "getParent", [this.fullPath]);
+};
+
+module.exports = Entry;
+});
+
+// file: lib/common/plugin/File.js
+define("cordova/plugin/File", function(require, exports, module) {
+/**
+ * Constructor.
+ * name {DOMString} name of the file, without path information
+ * fullPath {DOMString} the full path of the file, including the name
+ * type {DOMString} mime type
+ * lastModifiedDate {Date} last modified date
+ * size {Number} size of the file in bytes
+ */
+
+var File = function(name, fullPath, type, lastModifiedDate, size){
+ this.name = name || '';
+ this.fullPath = fullPath || null;
+ this.type = type || null;
+ this.lastModifiedDate = lastModifiedDate || null;
+ this.size = size || 0;
+};
+
+module.exports = File;
+});
+
+// file: lib/common/plugin/FileEntry.js
+define("cordova/plugin/FileEntry", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec'),
+ Entry = require('cordova/plugin/Entry'),
+ FileWriter = require('cordova/plugin/FileWriter'),
+ File = require('cordova/plugin/File'),
+ FileError = require('cordova/plugin/FileError');
+
+/**
+ * An interface representing a file on the file system.
+ *
+ * {boolean} isFile always true (readonly)
+ * {boolean} isDirectory always false (readonly)
+ * {DOMString} name of the file, excluding the path leading to it (readonly)
+ * {DOMString} fullPath the absolute full path to the file (readonly)
+ * {FileSystem} filesystem on which the file resides (readonly)
+ */
+var FileEntry = function(name, fullPath) {
+ FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath]);
+};
+
+utils.extend(FileEntry, Entry);
+
+/**
+ * Creates a new FileWriter associated with the file that this FileEntry represents.
+ *
+ * @param {Function} successCallback is called with the new FileWriter
+ * @param {Function} errorCallback is called with a FileError
+ */
+FileEntry.prototype.createWriter = function(successCallback, errorCallback) {
+ this.file(function(filePointer) {
+ var writer = new FileWriter(filePointer);
+
+ if (writer.fileName === null || writer.fileName === "") {
+ if (typeof errorCallback === "function") {
+ errorCallback(new FileError(FileError.INVALID_STATE_ERR));
+ }
+ } else {
+ if (typeof successCallback === "function") {
+ successCallback(writer);
+ }
+ }
+ }, errorCallback);
+};
+
+/**
+ * Returns a File that represents the current state of the file that this FileEntry represents.
+ *
+ * @param {Function} successCallback is called with the new File object
+ * @param {Function} errorCallback is called with a FileError
+ */
+FileEntry.prototype.file = function(successCallback, errorCallback) {
+ var win = typeof successCallback !== 'function' ? null : function(f) {
+ var file = new File(f.name, f.fullPath, f.type, f.lastModifiedDate, f.size);
+ successCallback(file);
+ };
+ var fail = typeof errorCallback !== 'function' ? null : function(code) {
+ errorCallback(new FileError(code));
+ };
+ exec(win, fail, "File", "getFileMetadata", [this.fullPath]);
+};
+
+
+module.exports = FileEntry;
+});
+
+// file: lib/common/plugin/FileError.js
+define("cordova/plugin/FileError", function(require, exports, module) {
+/**
+ * FileError
+ */
+function FileError(error) {
+ this.code = error || null;
+}
+
+// File error codes
+// Found in DOMException
+FileError.NOT_FOUND_ERR = 1;
+FileError.SECURITY_ERR = 2;
+FileError.ABORT_ERR = 3;
+
+// Added by File API specification
+FileError.NOT_READABLE_ERR = 4;
+FileError.ENCODING_ERR = 5;
+FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
+FileError.INVALID_STATE_ERR = 7;
+FileError.SYNTAX_ERR = 8;
+FileError.INVALID_MODIFICATION_ERR = 9;
+FileError.QUOTA_EXCEEDED_ERR = 10;
+FileError.TYPE_MISMATCH_ERR = 11;
+FileError.PATH_EXISTS_ERR = 12;
+
+module.exports = FileError;
+});
+
+// file: lib/common/plugin/FileReader.js
+define("cordova/plugin/FileReader", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError'),
+ ProgressEvent = require('cordova/plugin/ProgressEvent');
+
+/**
+ * This class reads the mobile device file system.
+ *
+ * For Android:
+ * The root directory is the root of the file system.
+ * To read from the SD card, the file name is "sdcard/my_file.txt"
+ * @constructor
+ */
+var FileReader = function() {
+ this.fileName = "";
+
+ this.readyState = 0; // FileReader.EMPTY
+
+ // File data
+ this.result = null;
+
+ // Error
+ this.error = null;
+
+ // Event handlers
+ this.onloadstart = null; // When the read starts.
+ this.onprogress = null; // While reading (and decoding) file or fileBlob data, and reporting partial file data (progess.loaded/progress.total)
+ this.onload = null; // When the read has successfully completed.
+ this.onerror = null; // When the read has failed (see errors).
+ this.onloadend = null; // When the request has completed (either in success or failure).
+ this.onabort = null; // When the read has been aborted. For instance, by invoking the abort() method.
+};
+
+// States
+FileReader.EMPTY = 0;
+FileReader.LOADING = 1;
+FileReader.DONE = 2;
+
+/**
+ * Abort reading file.
+ */
+FileReader.prototype.abort = function() {
+ this.result = null;
+
+ if (this.readyState == FileReader.DONE || this.readyState == FileReader.EMPTY) {
+ return;
+ }
+
+ this.readyState = FileReader.DONE;
+
+ // If abort callback
+ if (typeof this.onabort === 'function') {
+ this.onabort(new ProgressEvent('abort', {target:this}));
+ }
+ // If load end callback
+ if (typeof this.onloadend === 'function') {
+ this.onloadend(new ProgressEvent('loadend', {target:this}));
+ }
+};
+
+/**
+ * Read text file.
+ *
+ * @param file {File} File object containing file properties
+ * @param encoding [Optional] (see http://www.iana.org/assignments/character-sets)
+ */
+FileReader.prototype.readAsText = function(file, encoding) {
+ // Figure out pathing
+ this.fileName = '';
+ if (typeof file.fullPath === 'undefined') {
+ this.fileName = file;
+ } else {
+ this.fileName = file.fullPath;
+ }
+
+ // Already loading something
+ if (this.readyState == FileReader.LOADING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // LOADING state
+ this.readyState = FileReader.LOADING;
+
+ // If loadstart callback
+ if (typeof this.onloadstart === "function") {
+ this.onloadstart(new ProgressEvent("loadstart", {target:this}));
+ }
+
+ // Default encoding is UTF-8
+ var enc = encoding ? encoding : "UTF-8";
+
+ var me = this;
+
+ // Read file
+ exec(
+ // Success callback
+ function(r) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // Save result
+ me.result = r;
+
+ // If onload callback
+ if (typeof me.onload === "function") {
+ me.onload(new ProgressEvent("load", {target:me}));
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ },
+ // Error callback
+ function(e) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ // null result
+ me.result = null;
+
+ // Save error
+ me.error = new FileError(e);
+
+ // If onerror callback
+ if (typeof me.onerror === "function") {
+ me.onerror(new ProgressEvent("error", {target:me}));
+ }
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ }, "File", "readAsText", [this.fileName, enc]);
+};
+
+
+/**
+ * Read file and return data as a base64 encoded data url.
+ * A data url is of the form:
+ * data:[<mediatype>][;base64],<data>
+ *
+ * @param file {File} File object containing file properties
+ */
+FileReader.prototype.readAsDataURL = function(file) {
+ this.fileName = "";
+ if (typeof file.fullPath === "undefined") {
+ this.fileName = file;
+ } else {
+ this.fileName = file.fullPath;
+ }
+
+ // Already loading something
+ if (this.readyState == FileReader.LOADING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // LOADING state
+ this.readyState = FileReader.LOADING;
+
+ // If loadstart callback
+ if (typeof this.onloadstart === "function") {
+ this.onloadstart(new ProgressEvent("loadstart", {target:this}));
+ }
+
+ var me = this;
+
+ // Read file
+ exec(
+ // Success callback
+ function(r) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ // Save result
+ me.result = r;
+
+ // If onload callback
+ if (typeof me.onload === "function") {
+ me.onload(new ProgressEvent("load", {target:me}));
+ }
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ },
+ // Error callback
+ function(e) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ me.result = null;
+
+ // Save error
+ me.error = new FileError(e);
+
+ // If onerror callback
+ if (typeof me.onerror === "function") {
+ me.onerror(new ProgressEvent("error", {target:me}));
+ }
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ }, "File", "readAsDataURL", [this.fileName]);
+};
+
+/**
+ * Read file and return data as a binary data.
+ *
+ * @param file {File} File object containing file properties
+ */
+FileReader.prototype.readAsBinaryString = function(file) {
+ // TODO - Can't return binary data to browser.
+ console.log('method "readAsBinaryString" is not supported at this time.');
+};
+
+/**
+ * Read file and return data as a binary data.
+ *
+ * @param file {File} File object containing file properties
+ */
+FileReader.prototype.readAsArrayBuffer = function(file) {
+ // TODO - Can't return binary data to browser.
+ console.log('This method is not supported at this time.');
+};
+
+module.exports = FileReader;
+});
+
+// file: lib/common/plugin/FileSystem.js
+define("cordova/plugin/FileSystem", function(require, exports, module) {
+var DirectoryEntry = require('cordova/plugin/DirectoryEntry');
+
+/**
+ * An interface representing a file system
+ *
+ * @constructor
+ * {DOMString} name the unique name of the file system (readonly)
+ * {DirectoryEntry} root directory of the file system (readonly)
+ */
+var FileSystem = function(name, root) {
+ this.name = name || null;
+ if (root) {
+ this.root = new DirectoryEntry(root.name, root.fullPath);
+ }
+};
+
+module.exports = FileSystem;
+});
+
+// file: lib/common/plugin/FileTransfer.js
+define("cordova/plugin/FileTransfer", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * FileTransfer uploads a file to a remote server.
+ * @constructor
+ */
+var FileTransfer = function() {};
+
+/**
+* Given an absolute file path, uploads a file on the device to a remote server
+* using a multipart HTTP request.
+* @param filePath {String} Full path of the file on the device
+* @param server {String} URL of the server to receive the file
+* @param successCallback (Function} Callback to be invoked when upload has completed
+* @param errorCallback {Function} Callback to be invoked upon error
+* @param options {FileUploadOptions} Optional parameters such as file name and mimetype
+* @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
+*/
+FileTransfer.prototype.upload = function(filePath, server, successCallback, errorCallback, options, trustAllHosts) {
+ // check for options
+ var fileKey = null;
+ var fileName = null;
+ var mimeType = null;
+ var params = null;
+ var chunkedMode = true;
+ if (options) {
+ fileKey = options.fileKey;
+ fileName = options.fileName;
+ mimeType = options.mimeType;
+ if (options.chunkedMode !== null || typeof options.chunkedMode != "undefined") {
+ chunkedMode = options.chunkedMode;
+ }
+ if (options.params) {
+ params = options.params;
+ }
+ else {
+ params = {};
+ }
+ }
+
+ exec(successCallback, errorCallback, 'FileTransfer', 'upload', [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode]);
+};
+
+/**
+ * Downloads a file form a given URL and saves it to the specified directory.
+ * @param source {String} URL of the server to receive the file
+ * @param target {String} Full path of the file on the device
+ * @param successCallback (Function} Callback to be invoked when upload has completed
+ * @param errorCallback {Function} Callback to be invoked upon error
+ */
+FileTransfer.prototype.download = function(source, target, successCallback, errorCallback) {
+ var win = function(result) {
+ var entry = null;
+ if (result.isDirectory) {
+ entry = new (require('cordova/plugin/DirectoryEntry'))();
+ }
+ else if (result.isFile) {
+ entry = new (require('cordova/plugin/FileEntry'))();
+ }
+ entry.isDirectory = result.isDirectory;
+ entry.isFile = result.isFile;
+ entry.name = result.name;
+ entry.fullPath = result.fullPath;
+ successCallback(entry);
+ };
+ exec(win, errorCallback, 'FileTransfer', 'download', [source, target]);
+};
+
+module.exports = FileTransfer;
+
+});
+
+// file: lib/common/plugin/FileTransferError.js
+define("cordova/plugin/FileTransferError", function(require, exports, module) {
+/**
+ * FileTransferError
+ * @constructor
+ */
+var FileTransferError = function(code) {
+ this.code = code || null;
+};
+
+FileTransferError.FILE_NOT_FOUND_ERR = 1;
+FileTransferError.INVALID_URL_ERR = 2;
+FileTransferError.CONNECTION_ERR = 3;
+
+module.exports = FileTransferError;
+});
+
+// file: lib/common/plugin/FileUploadOptions.js
+define("cordova/plugin/FileUploadOptions", function(require, exports, module) {
+/**
+ * Options to customize the HTTP request used to upload files.
+ * @constructor
+ * @param fileKey {String} Name of file request parameter.
+ * @param fileName {String} Filename to be used by the server. Defaults to image.jpg.
+ * @param mimeType {String} Mimetype of the uploaded file. Defaults to image/jpeg.
+ * @param params {Object} Object with key: value params to send to the server.
+ */
+var FileUploadOptions = function(fileKey, fileName, mimeType, params) {
+ this.fileKey = fileKey || null;
+ this.fileName = fileName || null;
+ this.mimeType = mimeType || null;
+ this.params = params || null;
+};
+
+module.exports = FileUploadOptions;
+});
+
+// file: lib/common/plugin/FileUploadResult.js
+define("cordova/plugin/FileUploadResult", function(require, exports, module) {
+/**
+ * FileUploadResult
+ * @constructor
+ */
+var FileUploadResult = function() {
+ this.bytesSent = 0;
+ this.responseCode = null;
+ this.response = null;
+};
+
+module.exports = FileUploadResult;
+});
+
+// file: lib/common/plugin/FileWriter.js
+define("cordova/plugin/FileWriter", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError'),
+ ProgressEvent = require('cordova/plugin/ProgressEvent');
+
+/**
+ * This class writes to the mobile device file system.
+ *
+ * For Android:
+ * The root directory is the root of the file system.
+ * To write to the SD card, the file name is "sdcard/my_file.txt"
+ *
+ * @constructor
+ * @param file {File} File object containing file properties
+ * @param append if true write to the end of the file, otherwise overwrite the file
+ */
+var FileWriter = function(file) {
+ this.fileName = "";
+ this.length = 0;
+ if (file) {
+ this.fileName = file.fullPath || file;
+ this.length = file.size || 0;
+ }
+ // default is to write at the beginning of the file
+ this.position = 0;
+
+ this.readyState = 0; // EMPTY
+
+ this.result = null;
+
+ // Error
+ this.error = null;
+
+ // Event handlers
+ this.onwritestart = null; // When writing starts
+ this.onprogress = null; // While writing the file, and reporting partial file data
+ this.onwrite = null; // When the write has successfully completed.
+ this.onwriteend = null; // When the request has completed (either in success or failure).
+ this.onabort = null; // When the write has been aborted. For instance, by invoking the abort() method.
+ this.onerror = null; // When the write has failed (see errors).
+};
+
+// States
+FileWriter.INIT = 0;
+FileWriter.WRITING = 1;
+FileWriter.DONE = 2;
+
+/**
+ * Abort writing file.
+ */
+FileWriter.prototype.abort = function() {
+ // check for invalid state
+ if (this.readyState === FileWriter.DONE || this.readyState === FileWriter.INIT) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // set error
+ this.error = new FileError(FileError.ABORT_ERR);
+
+ this.readyState = FileWriter.DONE;
+
+ // If abort callback
+ if (typeof this.onabort === "function") {
+ this.onabort(new ProgressEvent("abort", {"target":this}));
+ }
+
+ // If write end callback
+ if (typeof this.onwriteend === "function") {
+ this.onwriteend(new ProgressEvent("writeend", {"target":this}));
+ }
+};
+
+/**
+ * Writes data to the file
+ *
+ * @param text to be written
+ */
+FileWriter.prototype.write = function(text) {
+ // Throw an exception if we are already writing a file
+ if (this.readyState === FileWriter.WRITING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // WRITING state
+ this.readyState = FileWriter.WRITING;
+
+ var me = this;
+
+ // If onwritestart callback
+ if (typeof me.onwritestart === "function") {
+ me.onwritestart(new ProgressEvent("writestart", {"target":me}));
+ }
+
+ // Write file
+ exec(
+ // Success callback
+ function(r) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileWriter.DONE) {
+ return;
+ }
+
+ // position always increases by bytes written because file would be extended
+ me.position += r;
+ // The length of the file is now where we are done writing.
+
+ me.length = me.position;
+
+ // DONE state
+ me.readyState = FileWriter.DONE;
+
+ // If onwrite callback
+ if (typeof me.onwrite === "function") {
+ me.onwrite(new ProgressEvent("write", {"target":me}));
+ }
+
+ // If onwriteend callback
+ if (typeof me.onwriteend === "function") {
+ me.onwriteend(new ProgressEvent("writeend", {"target":me}));
+ }
+ },
+ // Error callback
+ function(e) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileWriter.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileWriter.DONE;
+
+ // Save error
+ me.error = new FileError(e);
+
+ // If onerror callback
+ if (typeof me.onerror === "function") {
+ me.onerror(new ProgressEvent("error", {"target":me}));
+ }
+
+ // If onwriteend callback
+ if (typeof me.onwriteend === "function") {
+ me.onwriteend(new ProgressEvent("writeend", {"target":me}));
+ }
+ }, "File", "write", [this.fileName, text, this.position]);
+};
+
+/**
+ * Moves the file pointer to the location specified.
+ *
+ * If the offset is a negative number the position of the file
+ * pointer is rewound. If the offset is greater than the file
+ * size the position is set to the end of the file.
+ *
+ * @param offset is the location to move the file pointer to.
+ */
+FileWriter.prototype.seek = function(offset) {
+ // Throw an exception if we are already writing a file
+ if (this.readyState === FileWriter.WRITING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ if (!offset && offset !== 0) {
+ return;
+ }
+
+ // See back from end of file.
+ if (offset < 0) {
+ this.position = Math.max(offset + this.length, 0);
+ }
+ // Offset is bigger then file size so set position
+ // to the end of the file.
+ else if (offset > this.length) {
+ this.position = this.length;
+ }
+ // Offset is between 0 and file size so set the position
+ // to start writing.
+ else {
+ this.position = offset;
+ }
+};
+
+/**
+ * Truncates the file to the size specified.
+ *
+ * @param size to chop the file at.
+ */
+FileWriter.prototype.truncate = function(size) {
+ // Throw an exception if we are already writing a file
+ if (this.readyState === FileWriter.WRITING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // WRITING state
+ this.readyState = FileWriter.WRITING;
+
+ var me = this;
+
+ // If onwritestart callback
+ if (typeof me.onwritestart === "function") {
+ me.onwritestart(new ProgressEvent("writestart", {"target":this}));
+ }
+
+ // Write file
+ exec(
+ // Success callback
+ function(r) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileWriter.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileWriter.DONE;
+
+ // Update the length of the file
+ me.length = r;
+ me.position = Math.min(me.position, r);
+
+ // If onwrite callback
+ if (typeof me.onwrite === "function") {
+ me.onwrite(new ProgressEvent("write", {"target":me}));
+ }
+
+ // If onwriteend callback
+ if (typeof me.onwriteend === "function") {
+ me.onwriteend(new ProgressEvent("writeend", {"target":me}));
+ }
+ },
+ // Error callback
+ function(e) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileWriter.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileWriter.DONE;
+
+ // Save error
+ me.error = new FileError(e);
+
+ // If onerror callback
+ if (typeof me.onerror === "function") {
+ me.onerror(new ProgressEvent("error", {"target":me}));
+ }
+
+ // If onwriteend callback
+ if (typeof me.onwriteend === "function") {
+ me.onwriteend(new ProgressEvent("writeend", {"target":me}));
+ }
+ }, "File", "truncate", [this.fileName, size]);
+};
+
+module.exports = FileWriter;
+
+});
+
+// file: lib/common/plugin/Flags.js
+define("cordova/plugin/Flags", function(require, exports, module) {
+/**
+ * Supplies arguments to methods that lookup or create files and directories.
+ *
+ * @param create
+ * {boolean} file or directory if it doesn't exist
+ * @param exclusive
+ * {boolean} used with create; if true the command will fail if
+ * target path exists
+ */
+function Flags(create, exclusive) {
+ this.create = create || false;
+ this.exclusive = exclusive || false;
+}
+
+module.exports = Flags;
+});
+
+// file: lib/common/plugin/LocalFileSystem.js
+define("cordova/plugin/LocalFileSystem", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * Represents a local file system.
+ */
+var LocalFileSystem = function() {
+
+};
+
+LocalFileSystem.TEMPORARY = 0; //temporary, with no guarantee of persistence
+LocalFileSystem.PERSISTENT = 1; //persistent
+
+module.exports = LocalFileSystem;
+});
+
+// file: lib/common/plugin/Media.js
+define("cordova/plugin/Media", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec');
+
+var mediaObjects = {};
+
+/**
+ * This class provides access to the device media, interfaces to both sound and video
+ *
+ * @constructor
+ * @param src The file name or url to play
+ * @param successCallback The callback to be called when the file is done playing or recording.
+ * successCallback()
+ * @param errorCallback The callback to be called if there is an error.
+ * errorCallback(int errorCode) - OPTIONAL
+ * @param statusCallback The callback to be called when media status has changed.
+ * statusCallback(int statusCode) - OPTIONAL
+ */
+var Media = function(src, successCallback, errorCallback, statusCallback) {
+
+ // successCallback optional
+ if (successCallback && (typeof successCallback !== "function")) {
+ console.log("Media Error: successCallback is not a function");
+ return;
+ }
+
+ // errorCallback optional
+ if (errorCallback && (typeof errorCallback !== "function")) {
+ console.log("Media Error: errorCallback is not a function");
+ return;
+ }
+
+ // statusCallback optional
+ if (statusCallback && (typeof statusCallback !== "function")) {
+ console.log("Media Error: statusCallback is not a function");
+ return;
+ }
+
+ this.id = utils.createUUID();
+ mediaObjects[this.id] = this;
+ this.src = src;
+ this.successCallback = successCallback;
+ this.errorCallback = errorCallback;
+ this.statusCallback = statusCallback;
+ this._duration = -1;
+ this._position = -1;
+ exec(null, this.errorCallback, "Media", "create", [this.id, this.src]);
+};
+
+// Media messages
+Media.MEDIA_STATE = 1;
+Media.MEDIA_DURATION = 2;
+Media.MEDIA_POSITION = 3;
+Media.MEDIA_ERROR = 9;
+
+// Media states
+Media.MEDIA_NONE = 0;
+Media.MEDIA_STARTING = 1;
+Media.MEDIA_RUNNING = 2;
+Media.MEDIA_PAUSED = 3;
+Media.MEDIA_STOPPED = 4;
+Media.MEDIA_MSG = ["None", "Starting", "Running", "Paused", "Stopped"];
+
+// "static" function to return existing objs.
+Media.get = function(id) {
+ return mediaObjects[id];
+};
+
+/**
+ * Start or resume playing audio file.
+ */
+Media.prototype.play = function(options) {
+ exec(null, null, "Media", "startPlayingAudio", [this.id, this.src, options]);
+};
+
+/**
+ * Stop playing audio file.
+ */
+Media.prototype.stop = function() {
+ var me = this;
+ exec(function() {
+ me._position = 0;
+ me.successCallback();
+ }, this.errorCallback, "Media", "stopPlayingAudio", [this.id]);
+};
+
+/**
+ * Seek or jump to a new time in the track..
+ */
+Media.prototype.seekTo = function(milliseconds) {
+ var me = this;
+ exec(function(p) {
+ me._position = p;
+ }, this.errorCallback, "Media", "seekToAudio", [this.id, milliseconds]);
+};
+
+/**
+ * Pause playing audio file.
+ */
+Media.prototype.pause = function() {
+ exec(null, this.errorCallback, "Media", "pausePlayingAudio", [this.id]);
+};
+
+/**
+ * Get duration of an audio file.
+ * The duration is only set for audio that is playing, paused or stopped.
+ *
+ * @return duration or -1 if not known.
+ */
+Media.prototype.getDuration = function() {
+ return this._duration;
+};
+
+/**
+ * Get position of audio.
+ */
+Media.prototype.getCurrentPosition = function(success, fail) {
+ var me = this;
+ exec(function(p) {
+ me._position = p;
+ success(p);
+ }, fail, "Media", "getCurrentPositionAudio", [this.id]);
+};
+
+/**
+ * Start recording audio file.
+ */
+Media.prototype.startRecord = function() {
+ exec(this.successCallback, this.errorCallback, "Media", "startRecordingAudio", [this.id, this.src]);
+};
+
+/**
+ * Stop recording audio file.
+ */
+Media.prototype.stopRecord = function() {
+ exec(this.successCallback, this.errorCallback, "Media", "stopRecordingAudio", [this.id]);
+};
+
+/**
+ * Release the resources.
+ */
+Media.prototype.release = function() {
+ exec(null, this.errorCallback, "Media", "release", [this.id]);
+};
+
+/**
+ * Adjust the volume.
+ */
+Media.prototype.setVolume = function(volume) {
+ exec(null, null, "Media", "setVolume", [this.id, volume]);
+};
+
+/**
+ * Audio has status update.
+ * PRIVATE
+ *
+ * @param id The media object id (string)
+ * @param status The status code (int)
+ * @param msg The status message (string)
+ */
+Media.onStatus = function(id, msg, value) {
+ var media = mediaObjects[id];
+ // If state update
+ if (msg === Media.MEDIA_STATE) {
+ if (value === Media.MEDIA_STOPPED) {
+ if (media.successCallback) {
+ media.successCallback();
+ }
+ }
+ if (media.statusCallback) {
+ media.statusCallback(value);
+ }
+ }
+ else if (msg === Media.MEDIA_DURATION) {
+ media._duration = value;
+ }
+ else if (msg === Media.MEDIA_ERROR) {
+ if (media.errorCallback) {
+ // value should be a MediaError object when msg == MEDIA_ERROR
+ media.errorCallback(value);
+ }
+ }
+ else if (msg === Media.MEDIA_POSITION) {
+ media._position = value;
+ }
+};
+
+module.exports = Media;
+});
+
+// file: lib/common/plugin/MediaError.js
+define("cordova/plugin/MediaError", function(require, exports, module) {
+/**
+ * This class contains information about any Media errors.
+ * @constructor
+ */
+var MediaError = function(code, msg) {
+ this.code = (code !== undefined ? code : null);
+ this.message = msg || "";
+};
+
+MediaError.MEDIA_ERR_NONE_ACTIVE = 0;
+MediaError.MEDIA_ERR_ABORTED = 1;
+MediaError.MEDIA_ERR_NETWORK = 2;
+MediaError.MEDIA_ERR_DECODE = 3;
+MediaError.MEDIA_ERR_NONE_SUPPORTED = 4;
+
+module.exports = MediaError;
+});
+
+// file: lib/common/plugin/MediaFile.js
+define("cordova/plugin/MediaFile", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec'),
+ File = require('cordova/plugin/File'),
+ CaptureError = require('cordova/plugin/CaptureError');
+/**
+ * Represents a single file.
+ *
+ * name {DOMString} name of the file, without path information
+ * fullPath {DOMString} the full path of the file, including the name
+ * type {DOMString} mime type
+ * lastModifiedDate {Date} last modified date
+ * size {Number} size of the file in bytes
+ */
+var MediaFile = function(name, fullPath, type, lastModifiedDate, size){
+ MediaFile.__super__.constructor.apply(this, arguments);
+};
+
+utils.extend(MediaFile, File);
+
+/**
+ * Request capture format data for a specific file and type
+ *
+ * @param {Function} successCB
+ * @param {Function} errorCB
+ */
+MediaFile.prototype.getFormatData = function(successCallback, errorCallback) {
+ if (typeof this.fullPath === "undefined" || this.fullPath === null) {
+ errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
+ } else {
+ exec(successCallback, errorCallback, "Capture", "getFormatData", [this.fullPath, this.type]);
+ }
+};
+
+// TODO: can we axe this?
+/**
+ * Casts a PluginResult message property (array of objects) to an array of MediaFile objects
+ * (used in Objective-C and Android)
+ *
+ * @param {PluginResult} pluginResult
+ */
+MediaFile.cast = function(pluginResult) {
+ var mediaFiles = [];
+ for (var i=0; i<pluginResult.message.length; i++) {
+ var mediaFile = new MediaFile();
+ mediaFile.name = pluginResult.message[i].name;
+ mediaFile.fullPath = pluginResult.message[i].fullPath;
+ mediaFile.type = pluginResult.message[i].type;
+ mediaFile.lastModifiedDate = pluginResult.message[i].lastModifiedDate;
+ mediaFile.size = pluginResult.message[i].size;
+ mediaFiles.push(mediaFile);
+ }
+ pluginResult.message = mediaFiles;
+ return pluginResult;
+};
+
+module.exports = MediaFile;
+
+});
+
+// file: lib/common/plugin/MediaFileData.js
+define("cordova/plugin/MediaFileData", function(require, exports, module) {
+/**
+ * MediaFileData encapsulates format information of a media file.
+ *
+ * @param {DOMString} codecs
+ * @param {long} bitrate
+ * @param {long} height
+ * @param {long} width
+ * @param {float} duration
+ */
+var MediaFileData = function(codecs, bitrate, height, width, duration){
+ this.codecs = codecs || null;
+ this.bitrate = bitrate || 0;
+ this.height = height || 0;
+ this.width = width || 0;
+ this.duration = duration || 0;
+};
+
+module.exports = MediaFileData;
+});
+
+// file: lib/common/plugin/Metadata.js
+define("cordova/plugin/Metadata", function(require, exports, module) {
+/**
+ * Information about the state of the file or directory
+ *
+ * {Date} modificationTime (readonly)
+ */
+var Metadata = function(time) {
+ this.modificationTime = (typeof time != 'undefined'?new Date(time):null);
+};
+
+module.exports = Metadata;
+});
+
+// file: lib/common/plugin/Position.js
+define("cordova/plugin/Position", function(require, exports, module) {
+var Coordinates = require('cordova/plugin/Coordinates');
+
+var Position = function(coords, timestamp) {
+ if (coords) {
+ this.coords = new Coordinates(coords.latitude, coords.longitude, coords.altitude, coords.accuracy, coords.heading, coords.velocity, coords.altitudeAccuracy);
+ } else {
+ this.coords = new Coordinates();
+ }
+ this.timestamp = (timestamp !== undefined) ? timestamp : new Date();
+};
+
+module.exports = Position;
+
+});
+
+// file: lib/common/plugin/PositionError.js
+define("cordova/plugin/PositionError", function(require, exports, module) {
+/**
+ * Position error object
+ *
+ * @constructor
+ * @param code
+ * @param message
+ */
+var PositionError = function(code, message) {
+ this.code = code || null;
+ this.message = message || '';
+};
+
+PositionError.PERMISSION_DENIED = 1;
+PositionError.POSITION_UNAVAILABLE = 2;
+PositionError.TIMEOUT = 3;
+
+module.exports = PositionError;
+});
+
+// file: lib/common/plugin/ProgressEvent.js
+define("cordova/plugin/ProgressEvent", function(require, exports, module) {
+// If ProgressEvent exists in global context, use it already, otherwise use our own polyfill
+// Feature test: See if we can instantiate a native ProgressEvent;
+// if so, use that approach,
+// otherwise fill-in with our own implementation.
+//
+// NOTE: right now we always fill in with our own. Down the road would be nice if we can use whatever is native in the webview.
+var ProgressEvent = (function() {
+ /*
+ var createEvent = function(data) {
+ var event = document.createEvent('Events');
+ event.initEvent('ProgressEvent', false, false);
+ if (data) {
+ for (var i in data) {
+ if (data.hasOwnProperty(i)) {
+ event[i] = data[i];
+ }
+ }
+ if (data.target) {
+ // TODO: cannot call <some_custom_object>.dispatchEvent
+ // need to first figure out how to implement EventTarget
+ }
+ }
+ return event;
+ };
+ try {
+ var ev = createEvent({type:"abort",target:document});
+ return function ProgressEvent(type, data) {
+ data.type = type;
+ return createEvent(data);
+ };
+ } catch(e){
+ */
+ return function ProgressEvent(type, dict) {
+ this.type = type;
+ this.bubbles = false;
+ this.cancelBubble = false;
+ this.cancelable = false;
+ this.lengthComputable = false;
+ this.loaded = dict && dict.loaded ? dict.loaded : 0;
+ this.total = dict && dict.total ? dict.total : 0;
+ this.target = dict && dict.target ? dict.target : null;
+ };
+ //}
+})();
+
+module.exports = ProgressEvent;
+});
+
+// file: lib/common/plugin/accelerometer.js
+define("cordova/plugin/accelerometer", function(require, exports, module) {
+/**
+ * This class provides access to device accelerometer data.
+ * @constructor
+ */
+var utils = require("cordova/utils"),
+ exec = require("cordova/exec"),
+ Acceleration = require('cordova/plugin/Acceleration');
+
+// Is the accel sensor running?
+var running = false;
+
+// Keeps reference to watchAcceleration calls.
+var timers = {};
+
+// Array of listeners; used to keep track of when we should call start and stop.
+var listeners = [];
+
+// Last returned acceleration object from native
+var accel = null;
+
+// Tells native to start.
+function start() {
+ exec(function(a) {
+ var tempListeners = listeners.slice(0);
+ accel = new Acceleration(a.x, a.y, a.z, a.timestamp);
+ for (var i = 0, l = tempListeners.length; i < l; i++) {
+ tempListeners[i].win(accel);
+ }
+ }, function(e) {
+ var tempListeners = listeners.slice(0);
+ for (var i = 0, l = tempListeners.length; i < l; i++) {
+ tempListeners[i].fail(e);
+ }
+ }, "Accelerometer", "start", []);
+ running = true;
+}
+
+// Tells native to stop.
+function stop() {
+ exec(null, null, "Accelerometer", "stop", []);
+ running = false;
+}
+
+// Adds a callback pair to the listeners array
+function createCallbackPair(win, fail) {
+ return {win:win, fail:fail};
+}
+
+// Removes a win/fail listener pair from the listeners array
+function removeListeners(l) {
+ var idx = listeners.indexOf(l);
+ if (idx > -1) {
+ listeners.splice(idx, 1);
+ if (listeners.length === 0) {
+ stop();
+ }
+ }
+}
+
+var accelerometer = {
+ /**
+ * Asynchronously aquires the current acceleration.
+ *
+ * @param {Function} successCallback The function to call when the acceleration data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the acceleration data. (OPTIONAL)
+ * @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
+ */
+ getCurrentAcceleration: function(successCallback, errorCallback, options) {
+ // successCallback required
+ if (typeof successCallback !== "function") {
+ throw "getCurrentAcceleration must be called with at least a success callback function as first parameter.";
+ }
+
+ var p;
+ var win = function(a) {
+ successCallback(a);
+ removeListeners(p);
+ };
+ var fail = function(e) {
+ errorCallback(e);
+ removeListeners(p);
+ };
+
+ p = createCallbackPair(win, fail);
+ listeners.push(p);
+
+ if (!running) {
+ start();
+ }
+ },
+
+ /**
+ * Asynchronously aquires the acceleration repeatedly at a given interval.
+ *
+ * @param {Function} successCallback The function to call each time the acceleration data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the acceleration data. (OPTIONAL)
+ * @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
+ * @return String The watch id that must be passed to #clearWatch to stop watching.
+ */
+ watchAcceleration: function(successCallback, errorCallback, options) {
+ // Default interval (10 sec)
+ var frequency = (options && options.frequency && typeof options.frequency == 'number') ? options.frequency : 10000;
+
+ // successCallback required
+ if (typeof successCallback !== "function") {
+ throw "watchAcceleration must be called with at least a success callback function as first parameter.";
+ }
+
+ // Keep reference to watch id, and report accel readings as often as defined in frequency
+ var id = utils.createUUID();
+
+ var p = createCallbackPair(function(){}, function(e) {
+ errorCallback(e);
+ removeListeners(p);
+ });
+ listeners.push(p);
+
+ timers[id] = {
+ timer:window.setInterval(function() {
+ if (accel) {
+ successCallback(accel);
+ }
+ }, frequency),
+ listeners:p
+ };
+
+ if (running) {
+ // If we're already running then immediately invoke the success callback
+ successCallback(accel);
+ } else {
+ start();
+ }
+
+ return id;
+ },
+
+ /**
+ * Clears the specified accelerometer watch.
+ *
+ * @param {String} id The id of the watch returned from #watchAcceleration.
+ */
+ clearWatch: function(id) {
+ // Stop javascript timer & remove from timer list
+ if (id && timers[id]) {
+ window.clearInterval(timers[id].timer);
+ removeListeners(timers[id].listeners);
+ delete timers[id];
+ }
+ }
+};
+
+module.exports = accelerometer;
+
+});
+
+// file: lib/common/plugin/battery.js
+define("cordova/plugin/battery", function(require, exports, module) {
+/**
+ * This class contains information about the current battery status.
+ * @constructor
+ */
+var cordova = require('cordova'),
+ exec = require('cordova/exec');
+
+function handlers() {
+ return battery.channels.batterystatus.numHandlers +
+ battery.channels.batterylow.numHandlers +
+ battery.channels.batterycritical.numHandlers;
+}
+
+var Battery = function() {
+ this._level = null;
+ this._isPlugged = null;
+ // Create new event handlers on the window (returns a channel instance)
+ var subscriptionEvents = {
+ onSubscribe:this.onSubscribe,
+ onUnsubscribe:this.onUnsubscribe
+ };
+ this.channels = {
+ batterystatus:cordova.addWindowEventHandler("batterystatus", subscriptionEvents),
+ batterylow:cordova.addWindowEventHandler("batterylow", subscriptionEvents),
+ batterycritical:cordova.addWindowEventHandler("batterycritical", subscriptionEvents)
+ };
+};
+/**
+ * Event handlers for when callbacks get registered for the battery.
+ * Keep track of how many handlers we have so we can start and stop the native battery listener
+ * appropriately (and hopefully save on battery life!).
+ */
+Battery.prototype.onSubscribe = function() {
+ var me = battery;
+ // If we just registered the first handler, make sure native listener is started.
+ if (handlers() === 1) {
+ exec(me._status, me._error, "Battery", "start", []);
+ }
+};
+
+Battery.prototype.onUnsubscribe = function() {
+ var me = battery;
+
+ // If we just unregistered the last handler, make sure native listener is stopped.
+ if (handlers() === 0) {
+ exec(null, null, "Battery", "stop", []);
+ }
+};
+
+/**
+ * Callback for battery status
+ *
+ * @param {Object} info keys: level, isPlugged
+ */
+Battery.prototype._status = function(info) {
+ if (info) {
+ var me = battery;
+ var level = info.level;
+ if (me._level !== level || me._isPlugged !== info.isPlugged) {
+ // Fire batterystatus event
+ cordova.fireWindowEvent("batterystatus", info);
+
+ // Fire low battery event
+ if (level === 20 || level === 5) {
+ if (level === 20) {
+ cordova.fireWindowEvent("batterylow", info);
+ }
+ else {
+ cordova.fireWindowEvent("batterycritical", info);
+ }
+ }
+ }
+ me._level = level;
+ me._isPlugged = info.isPlugged;
+ }
+};
+
+/**
+ * Error callback for battery start
+ */
+Battery.prototype._error = function(e) {
+ console.log("Error initializing Battery: " + e);
+};
+
+var battery = new Battery();
+
+module.exports = battery;
+});
+
+// file: lib/common/plugin/capture.js
+define("cordova/plugin/capture", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ MediaFile = require('cordova/plugin/MediaFile');
+
+/**
+ * Launches a capture of different types.
+ *
+ * @param (DOMString} type
+ * @param {Function} successCB
+ * @param {Function} errorCB
+ * @param {CaptureVideoOptions} options
+ */
+function _capture(type, successCallback, errorCallback, options) {
+ var win = function(pluginResult) {
+ var mediaFiles = [];
+ var i;
+ for (i = 0; i < pluginResult.length; i++) {
+ var mediaFile = new MediaFile();
+ mediaFile.name = pluginResult[i].name;
+ mediaFile.fullPath = pluginResult[i].fullPath;
+ mediaFile.type = pluginResult[i].type;
+ mediaFile.lastModifiedDate = pluginResult[i].lastModifiedDate;
+ mediaFile.size = pluginResult[i].size;
+ mediaFiles.push(mediaFile);
+ }
+ successCallback(mediaFiles);
+ };
+ exec(win, errorCallback, "Capture", type, [options]);
+}
+/**
+ * The Capture interface exposes an interface to the camera and microphone of the hosting device.
+ */
+function Capture() {
+ this.supportedAudioModes = [];
+ this.supportedImageModes = [];
+ this.supportedVideoModes = [];
+}
+
+/**
+ * Launch audio recorder application for recording audio clip(s).
+ *
+ * @param {Function} successCB
+ * @param {Function} errorCB
+ * @param {CaptureAudioOptions} options
+ */
+Capture.prototype.captureAudio = function(successCallback, errorCallback, options){
+ _capture("captureAudio", successCallback, errorCallback, options);
+};
+
+/**
+ * Launch camera application for taking image(s).
+ *
+ * @param {Function} successCB
+ * @param {Function} errorCB
+ * @param {CaptureImageOptions} options
+ */
+Capture.prototype.captureImage = function(successCallback, errorCallback, options){
+ _capture("captureImage", successCallback, errorCallback, options);
+};
+
+/**
+ * Launch device camera application for recording video(s).
+ *
+ * @param {Function} successCB
+ * @param {Function} errorCB
+ * @param {CaptureVideoOptions} options
+ */
+Capture.prototype.captureVideo = function(successCallback, errorCallback, options){
+ _capture("captureVideo", successCallback, errorCallback, options);
+};
+
+
+module.exports = new Capture();
+
+});
+
+// file: lib/common/plugin/compass.js
+define("cordova/plugin/compass", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ utils = require('cordova/utils'),
+ CompassHeading = require('cordova/plugin/CompassHeading'),
+ CompassError = require('cordova/plugin/CompassError'),
+ timers = {},
+ compass = {
+ /**
+ * Asynchronously acquires the current heading.
+ * @param {Function} successCallback The function to call when the heading
+ * data is available
+ * @param {Function} errorCallback The function to call when there is an error
+ * getting the heading data.
+ * @param {CompassOptions} options The options for getting the heading data (not used).
+ */
+ getCurrentHeading:function(successCallback, errorCallback, options) {
+ // successCallback required
+ if (typeof successCallback !== "function") {
+ console.log("Compass Error: successCallback is not a function");
+ return;
+ }
+
+ // errorCallback optional
+ if (errorCallback && (typeof errorCallback !== "function")) {
+ console.log("Compass Error: errorCallback is not a function");
+ return;
+ }
+
+ var win = function(result) {
+ var ch = new CompassHeading(result.magneticHeading, result.trueHeading, result.headingAccuracy, result.timestamp);
+ successCallback(ch);
+ };
+ var fail = function(code) {
+ var ce = new CompassError(code);
+ errorCallback(ce);
+ };
+
+ // Get heading
+ exec(win, fail, "Compass", "getHeading", [options]);
+ },
+
+ /**
+ * Asynchronously acquires the heading repeatedly at a given interval.
+ * @param {Function} successCallback The function to call each time the heading
+ * data is available
+ * @param {Function} errorCallback The function to call when there is an error
+ * getting the heading data.
+ * @param {HeadingOptions} options The options for getting the heading data
+ * such as timeout and the frequency of the watch. For iOS, filter parameter
+ * specifies to watch via a distance filter rather than time.
+ */
+ watchHeading:function(successCallback, errorCallback, options) {
+ // Default interval (100 msec)
+ var frequency = (options !== undefined && options.frequency !== undefined) ? options.frequency : 100;
+ var filter = (options !== undefined && options.filter !== undefined) ? options.filter : 0;
+
+ // successCallback required
+ if (typeof successCallback !== "function") {
+ console.log("Compass Error: successCallback is not a function");
+ return;
+ }
+
+ // errorCallback optional
+ if (errorCallback && (typeof errorCallback !== "function")) {
+ console.log("Compass Error: errorCallback is not a function");
+ return;
+ }
+
+ var id = utils.createUUID();
+ if (filter > 0) {
+ // is an iOS request for watch by filter, no timer needed
+ timers[id] = "iOS";
+ compass.getCurrentHeading(successCallback, errorCallback, options);
+ } else {
+ // Start watch timer to get headings
+ timers[id] = window.setInterval(function() {
+ compass.getCurrentHeading(successCallback, errorCallback);
+ }, frequency);
+ }
+
+ return id;
+ },
+
+ /**
+ * Clears the specified heading watch.
+ * @param {String} watchId The ID of the watch returned from #watchHeading.
+ */
+ clearWatch:function(id) {
+ // Stop javascript timer & remove from timer list
+ if (id && timers[id]) {
+ if (timers[id] != "iOS") {
+ clearInterval(timers[id]);
+ } else {
+ // is iOS watch by filter so call into device to stop
+ exec(null, null, "Compass", "stopHeading", []);
+ }
+ delete timers[id];
+ }
+ }
+ };
+
+module.exports = compass;
+});
+
+// file: lib/common/plugin/console-via-logger.js
+define("cordova/plugin/console-via-logger", function(require, exports, module) {
+//------------------------------------------------------------------------------
+
+var logger = require("cordova/plugin/logger");
+var utils = require("cordova/utils");
+
+//------------------------------------------------------------------------------
+// object that we're exporting
+//------------------------------------------------------------------------------
+var console = module.exports;
+
+//------------------------------------------------------------------------------
+// copy of the original console object
+//------------------------------------------------------------------------------
+var WinConsole = window.console;
+
+//------------------------------------------------------------------------------
+// whether to use the logger
+//------------------------------------------------------------------------------
+var UseLogger = false;
+
+//------------------------------------------------------------------------------
+// Timers
+//------------------------------------------------------------------------------
+var Timers = {};
+
+//------------------------------------------------------------------------------
+// used for unimplemented methods
+//------------------------------------------------------------------------------
+function noop() {}
+
+//------------------------------------------------------------------------------
+// used for unimplemented methods
+//------------------------------------------------------------------------------
+console.useLogger = function (value) {
+ if (arguments.length) UseLogger = !!value;
+
+ if (UseLogger) {
+ if (logger.useConsole()) {
+ throw new Error("console and logger are too intertwingly");
+ }
+ }
+
+ return UseLogger;
+};
+
+//------------------------------------------------------------------------------
+console.log = function() {
+ if (logger.useConsole()) return;
+ logger.log.apply(logger, [].slice.call(arguments));
+};
+
+//------------------------------------------------------------------------------
+console.error = function() {
+ if (logger.useConsole()) return;
+ logger.error.apply(logger, [].slice.call(arguments));
+};
+
+//------------------------------------------------------------------------------
+console.warn = function() {
+ if (logger.useConsole()) return;
+ logger.warn.apply(logger, [].slice.call(arguments));
+};
+
+//------------------------------------------------------------------------------
+console.info = function() {
+ if (logger.useConsole()) return;
+ logger.info.apply(logger, [].slice.call(arguments));
+};
+
+//------------------------------------------------------------------------------
+console.debug = function() {
+ if (logger.useConsole()) return;
+ logger.debug.apply(logger, [].slice.call(arguments));
+};
+
+//------------------------------------------------------------------------------
+console.assert = function(expression) {
+ if (expression) return;
+
+ var message = utils.vformat(arguments[1], [].slice.call(arguments, 2));
+ console.log("ASSERT: " + message);
+};
+
+//------------------------------------------------------------------------------
+console.clear = function() {};
+
+//------------------------------------------------------------------------------
+console.dir = function(object) {
+ console.log("%o", object);
+};
+
+//------------------------------------------------------------------------------
+console.dirxml = function(node) {
+ console.log(node.innerHTML);
+};
+
+//------------------------------------------------------------------------------
+console.trace = noop;
+
+//------------------------------------------------------------------------------
+console.group = console.log;
+
+//------------------------------------------------------------------------------
+console.groupCollapsed = console.log;
+
+//------------------------------------------------------------------------------
+console.groupEnd = noop;
+
+//------------------------------------------------------------------------------
+console.time = function(name) {
+ Timers[name] = new Date().valueOf();
+};
+
+//------------------------------------------------------------------------------
+console.timeEnd = function(name) {
+ var timeStart = Timers[name];
+ if (!timeStart) {
+ console.warn("unknown timer: " + name);
+ return;
+ }
+
+ var timeElapsed = new Date().valueOf() - timeStart;
+ console.log(name + ": " + timeElapsed + "ms");
+};
+
+//------------------------------------------------------------------------------
+console.timeStamp = noop;
+
+//------------------------------------------------------------------------------
+console.profile = noop;
+
+//------------------------------------------------------------------------------
+console.profileEnd = noop;
+
+//------------------------------------------------------------------------------
+console.count = noop;
+
+//------------------------------------------------------------------------------
+console.exception = console.log;
+
+//------------------------------------------------------------------------------
+console.table = function(data, columns) {
+ console.log("%o", data);
+};
+
+//------------------------------------------------------------------------------
+// return a new function that calls both functions passed as args
+//------------------------------------------------------------------------------
+function wrapperedOrigCall(orgFunc, newFunc) {
+ return function() {
+ var args = [].slice.call(arguments);
+ try { orgFunc.apply(WinConsole, args); } catch (e) {}
+ try { newFunc.apply(console, args); } catch (e) {}
+ };
+}
+
+//------------------------------------------------------------------------------
+// For every function that exists in the original console object, that
+// also exists in the new console object, wrap the new console method
+// with one that calls both
+//------------------------------------------------------------------------------
+for (var key in console) {
+ if (typeof WinConsole[key] == "function") {
+ console[key] = wrapperedOrigCall(WinConsole[key], console[key]);
+ }
+}
+
+});
+
+// file: lib/common/plugin/contacts.js
+define("cordova/plugin/contacts", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ ContactError = require('cordova/plugin/ContactError'),
+ utils = require('cordova/utils'),
+ Contact = require('cordova/plugin/Contact');
+
+/**
+* Represents a group of Contacts.
+* @constructor
+*/
+var contacts = {
+ /**
+ * Returns an array of Contacts matching the search criteria.
+ * @param fields that should be searched
+ * @param successCB success callback
+ * @param errorCB error callback
+ * @param {ContactFindOptions} options that can be applied to contact searching
+ * @return array of Contacts matching search criteria
+ */
+ find:function(fields, successCB, errorCB, options) {
+ if (!successCB) {
+ throw new TypeError("You must specify a success callback for the find command.");
+ }
+ if (!fields || (utils.isArray(fields) && fields.length === 0)) {
+ if (typeof errorCB === "function") {
+ errorCB(new ContactError(ContactError.INVALID_ARGUMENT_ERROR));
+ }
+ } else {
+ var win = function(result) {
+ var cs = [];
+ for (var i = 0, l = result.length; i < l; i++) {
+ cs.push(contacts.create(result[i]));
+ }
+ successCB(cs);
+ };
+ exec(win, errorCB, "Contacts", "search", [fields, options]);
+ }
+ },
+
+ /**
+ * This function creates a new contact, but it does not persist the contact
+ * to device storage. To persist the contact to device storage, invoke
+ * contact.save().
+ * @param properties an object who's properties will be examined to create a new Contact
+ * @returns new Contact object
+ */
+ create:function(properties) {
+ var i;
+ var contact = new Contact();
+ for (i in properties) {
+ if (typeof contact[i] !== 'undefined' && properties.hasOwnProperty(i)) {
+ contact[i] = properties[i];
+ }
+ }
+ return contact;
+ }
+};
+
+module.exports = contacts;
+
+});
+
+// file: lib/common/plugin/geolocation.js
+define("cordova/plugin/geolocation", function(require, exports, module) {
+var utils = require('cordova/utils'),
+ exec = require('cordova/exec'),
+ PositionError = require('cordova/plugin/PositionError'),
+ Position = require('cordova/plugin/Position');
+
+var timers = {}; // list of timers in use
+
+// Returns default params, overrides if provided with values
+function parseParameters(options) {
+ var opt = {
+ maximumAge: 0,
+ enableHighAccuracy: false,
+ timeout: Infinity
+ };
+
+ if (options) {
+ if (options.maximumAge !== undefined && !isNaN(options.maximumAge) && options.maximumAge > 0) {
+ opt.maximumAge = options.maximumAge;
+ }
+ if (options.enableHighAccuracy !== undefined) {
+ opt.enableHighAccuracy = options.enableHighAccuracy;
+ }
+ if (options.timeout !== undefined && !isNaN(options.timeout)) {
+ if (options.timeout < 0) {
+ opt.timeout = 0;
+ } else {
+ opt.timeout = options.timeout;
+ }
+ }
+ }
+
+ return opt;
+}
+
+// Returns a timeout failure, closed over a specified timeout value and error callback.
+function createTimeout(errorCallback, timeout) {
+ var t = setTimeout(function() {
+ clearTimeout(t);
+ t = null;
+ errorCallback({
+ code:PositionError.TIMEOUT,
+ message:"Position retrieval timed out."
+ });
+ }, timeout);
+ return t;
+}
+
+var geolocation = {
+ lastPosition:null, // reference to last known (cached) position returned
+ /**
+ * Asynchronously aquires the current position.
+ *
+ * @param {Function} successCallback The function to call when the position data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the heading position. (OPTIONAL)
+ * @param {PositionOptions} options The options for getting the position data. (OPTIONAL)
+ */
+ getCurrentPosition:function(successCallback, errorCallback, options) {
+ if (arguments.length === 0) {
+ throw new Error("getCurrentPosition must be called with at least one argument.");
+ }
+ options = parseParameters(options);
+
+ // Timer var that will fire an error callback if no position is retrieved from native
+ // before the "timeout" param provided expires
+ var timeoutTimer = null;
+
+ var win = function(p) {
+ clearTimeout(timeoutTimer);
+ if (!timeoutTimer) {
+ // Timeout already happened, or native fired error callback for
+ // this geo request.
+ // Don't continue with success callback.
+ return;
+ }
+ var pos = new Position(
+ {
+ latitude:p.latitude,
+ longitude:p.longitude,
+ altitude:p.altitude,
+ accuracy:p.accuracy,
+ heading:p.heading,
+ velocity:p.velocity,
+ altitudeAccuracy:p.altitudeAccuracy
+ },
+ (p.timestamp === undefined ? new Date() : ((p.timestamp instanceof Date) ? p.timestamp : new Date(p.timestamp)))
+ );
+ geolocation.lastPosition = pos;
+ successCallback(pos);
+ };
+ var fail = function(e) {
+ clearTimeout(timeoutTimer);
+ timeoutTimer = null;
+ var err = new PositionError(e.code, e.message);
+ if (errorCallback) {
+ errorCallback(err);
+ }
+ };
+
+ // Check our cached position, if its timestamp difference with current time is less than the maximumAge, then just
+ // fire the success callback with the cached position.
+ if (geolocation.lastPosition && options.maximumAge && (((new Date()).getTime() - geolocation.lastPosition.timestamp.getTime()) <= options.maximumAge)) {
+ successCallback(geolocation.lastPosition);
+ // If the cached position check failed and the timeout was set to 0, error out with a TIMEOUT error object.
+ } else if (options.timeout === 0) {
+ fail({
+ code:PositionError.TIMEOUT,
+ message:"timeout value in PositionOptions set to 0 and no cached Position object available, or cached Position object's age exceed's provided PositionOptions' maximumAge parameter."
+ });
+ // Otherwise we have to call into native to retrieve a position.
+ } else {
+ if (options.timeout !== Infinity) {
+ // If the timeout value was not set to Infinity (default), then
+ // set up a timeout function that will fire the error callback
+ // if no successful position was retrieved before timeout expired.
+ timeoutTimer = createTimeout(fail, options.timeout);
+ } else {
+ // This is here so the check in the win function doesn't mess stuff up
+ // may seem weird but this guarantees timeoutTimer is
+ // always truthy before we call into native
+ timeoutTimer = true;
+ }
+ exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.maximumAge]);
+ }
+ return timeoutTimer;
+ },
+ /**
+ * Asynchronously watches the geolocation for changes to geolocation. When a change occurs,
+ * the successCallback is called with the new location.
+ *
+ * @param {Function} successCallback The function to call each time the location data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the location data. (OPTIONAL)
+ * @param {PositionOptions} options The options for getting the location data such as frequency. (OPTIONAL)
+ * @return String The watch id that must be passed to #clearWatch to stop watching.
+ */
+ watchPosition:function(successCallback, errorCallback, options) {
+ if (arguments.length === 0) {
+ throw new Error("watchPosition must be called with at least one argument.");
+ }
+ options = parseParameters(options);
+
+ var id = utils.createUUID();
+
+ // Tell device to get a position ASAP, and also retrieve a reference to the timeout timer generated in getCurrentPosition
+ timers[id] = geolocation.getCurrentPosition(successCallback, errorCallback, options);
+
+ var fail = function(e) {
+ clearTimeout(timers[id]);
+ var err = new PositionError(e.code, e.message);
+ if (errorCallback) {
+ errorCallback(err);
+ }
+ };
+
+ var win = function(p) {
+ clearTimeout(timers[id]);
+ if (options.timeout !== Infinity) {
+ timers[id] = createTimeout(fail, options.timeout);
+ }
+ var pos = new Position(
+ {
+ latitude:p.latitude,
+ longitude:p.longitude,
+ altitude:p.altitude,
+ accuracy:p.accuracy,
+ heading:p.heading,
+ velocity:p.velocity,
+ altitudeAccuracy:p.altitudeAccuracy
+ },
+ (p.timestamp === undefined ? new Date() : ((p.timestamp instanceof Date) ? p.timestamp : new Date(p.timestamp)))
+ );
+ geolocation.lastPosition = pos;
+ successCallback(pos);
+ };
+
+ exec(win, fail, "Geolocation", "addWatch", [id, options.enableHighAccuracy]);
+
+ return id;
+ },
+ /**
+ * Clears the specified heading watch.
+ *
+ * @param {String} id The ID of the watch returned from #watchPosition
+ */
+ clearWatch:function(id) {
+ if (id && timers[id] !== undefined) {
+ clearTimeout(timers[id]);
+ delete timers[id];
+ exec(null, null, "Geolocation", "clearWatch", [id]);
+ }
+ }
+};
+
+module.exports = geolocation;
+
+});
+
+// file: lib/ios/plugin/ios/Contact.js
+define("cordova/plugin/ios/Contact", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ ContactError = require('cordova/plugin/ContactError');
+
+/**
+ * Provides iOS Contact.display API.
+ */
+module.exports = {
+ display : function(errorCB, options) {
+ /*
+ * Display a contact using the iOS Contact Picker UI
+ * NOT part of W3C spec so no official documentation
+ *
+ * @param errorCB error callback
+ * @param options object
+ * allowsEditing: boolean AS STRING
+ * "true" to allow editing the contact
+ * "false" (default) display contact
+ */
+
+ if (this.id === null) {
+ if (typeof errorCB === "function") {
+ var errorObj = new ContactError(ContactError.UNKNOWN_ERROR);
+ errorCB(errorObj);
+ }
+ }
+ else {
+ exec(null, errorCB, "Contacts","displayContact", [this.id, options]);
+ }
+ }
+};
+});
+
+// file: lib/ios/plugin/ios/Entry.js
+define("cordova/plugin/ios/Entry", function(require, exports, module) {
+module.exports = {
+ toURL:function() {
+ // TODO: refactor path in a cross-platform way so we can eliminate
+ // these kinds of platform-specific hacks.
+ return "file://localhost" + this.fullPath;
+ },
+ toURI: function() {
+ console.log("DEPRECATED: Update your code to use 'toURL'");
+ return "file://localhost" + this.fullPath;
+ }
+};
+});
+
+// file: lib/ios/plugin/ios/FileReader.js
+define("cordova/plugin/ios/FileReader", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError'),
+ FileReader = require('cordova/plugin/FileReader'),
+ ProgressEvent = require('cordova/plugin/ProgressEvent');
+
+module.exports = {
+ readAsText:function(file, encoding) {
+ // Figure out pathing
+ this.fileName = '';
+ if (typeof file.fullPath === 'undefined') {
+ this.fileName = file;
+ } else {
+ this.fileName = file.fullPath;
+ }
+
+ // Already loading something
+ if (this.readyState == FileReader.LOADING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // LOADING state
+ this.readyState = FileReader.LOADING;
+
+ // If loadstart callback
+ if (typeof this.onloadstart === "function") {
+ this.onloadstart(new ProgressEvent("loadstart", {target:this}));
+ }
+
+ // Default encoding is UTF-8
+ var enc = encoding ? encoding : "UTF-8";
+
+ var me = this;
+
+ // Read file
+ exec(
+ // Success callback
+ function(r) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // Save result
+ me.result = decodeURIComponent(r);
+
+ // If onload callback
+ if (typeof me.onload === "function") {
+ me.onload(new ProgressEvent("load", {target:me}));
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ },
+ // Error callback
+ function(e) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ // null result
+ me.result = null;
+
+ // Save error
+ me.error = new FileError(e);
+
+ // If onerror callback
+ if (typeof me.onerror === "function") {
+ me.onerror(new ProgressEvent("error", {target:me}));
+ }
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ },
+ "File", "readAsText", [this.fileName, enc]);
+ }
+};
+});
+
+// file: lib/ios/plugin/ios/console.js
+define("cordova/plugin/ios/console", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * This class provides access to the debugging console.
+ * @constructor
+ */
+var DebugConsole = function() {
+ this.winConsole = window.console;
+ this.logLevel = DebugConsole.INFO_LEVEL;
+};
+
+// from most verbose, to least verbose
+DebugConsole.ALL_LEVEL = 1; // same as first level
+DebugConsole.INFO_LEVEL = 1;
+DebugConsole.WARN_LEVEL = 2;
+DebugConsole.ERROR_LEVEL = 4;
+DebugConsole.NONE_LEVEL = 8;
+
+DebugConsole.prototype.setLevel = function(level) {
+ this.logLevel = level;
+};
+
+var stringify = function(message) {
+ try {
+ if (typeof message === "object" && JSON && JSON.stringify) {
+ try {
+ return JSON.stringify(message);
+ }
+ catch (e) {
+ return "error JSON.stringify()ing argument: " + e;
+ }
+ } else {
+ return message.toString();
+ }
+ } catch (e) {
+ return e.toString();
+ }
+};
+
+/**
+ * Print a normal log message to the console
+ * @param {Object|String} message Message or object to print to the console
+ */
+DebugConsole.prototype.log = function(message) {
+ if (this.logLevel <= DebugConsole.INFO_LEVEL) {
+ exec(null, null, 'Debug Console', 'log', [ stringify(message), { logLevel: 'INFO' } ]);
+ }
+ else if (this.winConsole && this.winConsole.log) {
+ this.winConsole.log(message);
+ }
+};
+
+/**
+ * Print a warning message to the console
+ * @param {Object|String} message Message or object to print to the console
+ */
+DebugConsole.prototype.warn = function(message) {
+ if (this.logLevel <= DebugConsole.WARN_LEVEL) {
+ exec(null, null, 'Debug Console', 'log', [ stringify(message), { logLevel: 'WARN' } ]);
+ }
+ else if (this.winConsole && this.winConsole.warn) {
+ this.winConsole.warn(message);
+ }
+};
+
+/**
+ * Print an error message to the console
+ * @param {Object|String} message Message or object to print to the console
+ */
+DebugConsole.prototype.error = function(message) {
+ if (this.logLevel <= DebugConsole.ERROR_LEVEL) {
+ exec(null, null, 'Debug Console', 'log', [ stringify(message), { logLevel: 'ERROR' } ]);
+ }
+ else if (this.winConsole && this.winConsole.error){
+ this.winConsole.error(message);
+ }
+};
+
+module.exports = new DebugConsole();
+});
+
+// file: lib/ios/plugin/ios/contacts.js
+define("cordova/plugin/ios/contacts", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * Provides iOS enhanced contacts API.
+ */
+module.exports = {
+ newContactUI : function(successCallback) {
+ /*
+ * Create a contact using the iOS Contact Picker UI
+ * NOT part of W3C spec so no official documentation
+ *
+ * returns: the id of the created contact as param to successCallback
+ */
+ exec(successCallback, null, "Contacts","newContact", []);
+ },
+ chooseContact : function(successCallback, options) {
+ /*
+ * Select a contact using the iOS Contact Picker UI
+ * NOT part of W3C spec so no official documentation
+ *
+ * @param errorCB error callback
+ * @param options object
+ * allowsEditing: boolean AS STRING
+ * "true" to allow editing the contact
+ * "false" (default) display contact
+ *
+ * returns: the id of the selected contact as param to successCallback
+ */
+ exec(successCallback, null, "Contacts","chooseContact", [options]);
+ }
+};
+});
+
+// file: lib/ios/plugin/ios/device.js
+define("cordova/plugin/ios/device", function(require, exports, module) {
+/**
+ * this represents the mobile device, and provides properties for inspecting the model, version, UUID of the
+ * phone, etc.
+ * @constructor
+ */
+var exec = require('cordova/exec'),
+ utils = require('cordova/utils'),
+ channel = require('cordova/channel');
+
+var Device = function() {
+ this.platform = null;
+ this.version = null;
+ this.name = null;
+ this.cordova = null;
+ this.uuid = null;
+};
+
+Device.prototype.setInfo = function(info) {
+ try {
+ this.platform = info.platform;
+ this.version = info.version;
+ this.name = info.name;
+ this.cordova = info.cordova;
+ this.uuid = info.uuid;
+ channel.onCordovaInfoReady.fire();
+ } catch(e) {
+ utils.alert('Error during device info setting in cordova/plugin/ios/device!');
+ }
+};
+
+module.exports = new Device();
+
+});
+
+// file: lib/ios/plugin/ios/nativecomm.js
+define("cordova/plugin/ios/nativecomm", function(require, exports, module) {
+var cordova = require('cordova');
+
+/**
+ * Called by native code to retrieve all queued commands and clear the queue.
+ */
+module.exports = function() {
+ var json = JSON.stringify(cordova.commandQueue);
+ cordova.commandQueue = [];
+ return json;
+};
+});
+
+// file: lib/ios/plugin/ios/notification.js
+define("cordova/plugin/ios/notification", function(require, exports, module) {
+var Media = require('cordova/plugin/Media');
+
+module.exports = {
+ beep:function(count) {
+ (new Media('beep.wav')).play();
+ }
+};
+});
+
+// file: lib/common/plugin/logger.js
+define("cordova/plugin/logger", function(require, exports, module) {
+//------------------------------------------------------------------------------
+// The logger module exports the following properties/functions:
+//
+// LOG - constant for the level LOG
+// ERROR - constant for the level ERROR
+// WARN - constant for the level WARN
+// INFO - constant for the level INFO
+// DEBUG - constant for the level DEBUG
+// logLevel() - returns current log level
+// logLevel(value) - sets and returns a new log level
+// useConsole() - returns whether logger is using console
+// useConsole(value) - sets and returns whether logger is using console
+// log(message,...) - logs a message at level LOG
+// error(message,...) - logs a message at level ERROR
+// warn(message,...) - logs a message at level WARN
+// info(message,...) - logs a message at level INFO
+// debug(message,...) - logs a message at level DEBUG
+// logLevel(level,message,...) - logs a message specified level
+//
+//------------------------------------------------------------------------------
+
+var logger = exports;
+
+var exec = require('cordova/exec');
+var utils = require('cordova/utils');
+
+var UseConsole = true;
+var Queued = [];
+var DeviceReady = false;
+var CurrentLevel;
+
+/**
+ * Logging levels
+ */
+
+var Levels = [
+ "LOG",
+ "ERROR",
+ "WARN",
+ "INFO",
+ "DEBUG"
+];
+
+/*
+ * add the logging levels to the logger object and
+ * to a separate levelsMap object for testing
+ */
+
+var LevelsMap = {};
+for (var i=0; i<Levels.length; i++) {
+ var level = Levels[i];
+ LevelsMap[level] = i;
+ logger[level] = level;
+}
+
+CurrentLevel = LevelsMap.WARN;
+
+/**
+ * Getter/Setter for the logging level
+ *
+ * Returns the current logging level.
+ *
+ * When a value is passed, sets the logging level to that value.
+ * The values should be one of the following constants:
+ * logger.LOG
+ * logger.ERROR
+ * logger.WARN
+ * logger.INFO
+ * logger.DEBUG
+ *
+ * The value used determines which messages get printed. The logging
+ * values above are in order, and only messages logged at the logging
+ * level or above will actually be displayed to the user. Eg, the
+ * default level is WARN, so only messages logged with LOG, ERROR, or
+ * WARN will be displayed; INFO and DEBUG messages will be ignored.
+ */
+logger.level = function (value) {
+ if (arguments.length) {
+ if (LevelsMap[value] === null) {
+ throw new Error("invalid logging level: " + value);
+ }
+ CurrentLevel = LevelsMap[value];
+ }
+
+ return Levels[CurrentLevel];
+};
+
+/**
+ * Getter/Setter for the useConsole functionality
+ *
+ * When useConsole is true, the logger will log via the
+ * browser 'console' object. Otherwise, it will use the
+ * native Logger plugin.
+ */
+logger.useConsole = function (value) {
+ if (arguments.length) UseConsole = !!value;
+
+ if (UseConsole) {
+ if (typeof console == "undefined") {
+ throw new Error("global console object is not defined");
+ }
+
+ if (typeof console.log != "function") {
+ throw new Error("global console object does not have a log function");
+ }
+
+ if (typeof console.useLogger == "function") {
+ if (console.useLogger()) {
+ throw new Error("console and logger are too intertwingly");
+ }
+ }
+ }
+
+ return UseConsole;
+};
+
+/**
+ * Logs a message at the LOG level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.log = function(message) { logWithArgs("LOG", arguments); };
+
+/**
+ * Logs a message at the ERROR level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.error = function(message) { logWithArgs("ERROR", arguments); };
+
+/**
+ * Logs a message at the WARN level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.warn = function(message) { logWithArgs("WARN", arguments); };
+
+/**
+ * Logs a message at the INFO level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.info = function(message) { logWithArgs("INFO", arguments); };
+
+/**
+ * Logs a message at the DEBUG level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.debug = function(message) { logWithArgs("DEBUG", arguments); };
+
+// log at the specified level with args
+function logWithArgs(level, args) {
+ args = [level].concat([].slice.call(args));
+ logger.logLevel.apply(logger, args);
+}
+
+/**
+ * Logs a message at the specified level.
+ *
+ * Parameters passed after message are used applied to
+ * the message with utils.format()
+ */
+logger.logLevel = function(level, message /* , ... */) {
+ // format the message with the parameters
+ var formatArgs = [].slice.call(arguments, 2);
+ message = utils.vformat(message, formatArgs);
+
+ if (LevelsMap[level] === null) {
+ throw new Error("invalid logging level: " + level);
+ }
+
+ if (LevelsMap[level] > CurrentLevel) return;
+
+ // queue the message if not yet at deviceready
+ if (!DeviceReady && !UseConsole) {
+ Queued.push([level, message]);
+ return;
+ }
+
+ // if not using the console, use the native logger
+ if (!UseConsole) {
+ exec(null, null, "Logger", "logLevel", [level, message]);
+ return;
+ }
+
+ // make sure console is not using logger
+ if (console.__usingCordovaLogger) {
+ throw new Error("console and logger are too intertwingly");
+ }
+
+ // log to the console
+ switch (level) {
+ case logger.LOG: console.log(message); break;
+ case logger.ERROR: console.log("ERROR: " + message); break;
+ case logger.WARN: console.log("WARN: " + message); break;
+ case logger.INFO: console.log("INFO: " + message); break;
+ case logger.DEBUG: console.log("DEBUG: " + message); break;
+ }
+};
+
+// when deviceready fires, log queued messages
+logger.__onDeviceReady = function() {
+ if (DeviceReady) return;
+
+ DeviceReady = true;
+
+ for (var i=0; i<Queued.length; i++) {
+ var messageArgs = Queued[i];
+ logger.logLevel(messageArgs[0], messageArgs[1]);
+ }
+
+ Queued = null;
+};
+
+// add a deviceready event to log queued messages
+document.addEventListener("deviceready", logger.__onDeviceReady, false);
+
+});
+
+// file: lib/common/plugin/network.js
+define("cordova/plugin/network", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ cordova = require('cordova'),
+ channel = require('cordova/channel');
+
+var NetworkConnection = function () {
+ this.type = null;
+ this._firstRun = true;
+ this._timer = null;
+ this.timeout = 500;
+
+ var me = this;
+
+ channel.onCordovaReady.subscribeOnce(function() {
+ me.getInfo(function (info) {
+ me.type = info;
+ if (info === "none") {
+ // set a timer if still offline at the end of timer send the offline event
+ me._timer = setTimeout(function(){
+ cordova.fireDocumentEvent("offline");
+ me._timer = null;
+ }, me.timeout);
+ } else {
+ // If there is a current offline event pending clear it
+ if (me._timer !== null) {
+ clearTimeout(me._timer);
+ me._timer = null;
+ }
+ cordova.fireDocumentEvent("online");
+ }
+
+ // should only fire this once
+ if (me._firstRun) {
+ me._firstRun = false;
+ channel.onCordovaConnectionReady.fire();
+ }
+ },
+ function (e) {
+ // If we can't get the network info we should still tell Cordova
+ // to fire the deviceready event.
+ if (me._firstRun) {
+ me._firstRun = false;
+ channel.onCordovaConnectionReady.fire();
+ }
+ console.log("Error initializing Network Connection: " + e);
+ });
+ });
+};
+
+/**
+ * Get connection info
+ *
+ * @param {Function} successCallback The function to call when the Connection data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the Connection data. (OPTIONAL)
+ */
+NetworkConnection.prototype.getInfo = function (successCallback, errorCallback) {
+ // Get info
+ exec(successCallback, errorCallback, "NetworkStatus", "getConnectionInfo", []);
+};
+
+module.exports = new NetworkConnection();
+});
+
+// file: lib/common/plugin/notification.js
+define("cordova/plugin/notification", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * Provides access to notifications on the device.
+ */
+
+module.exports = {
+
+ /**
+ * Open a native alert dialog, with a customizable title and button text.
+ *
+ * @param {String} message Message to print in the body of the alert
+ * @param {Function} completeCallback The callback that is called when user clicks on a button.
+ * @param {String} title Title of the alert dialog (default: Alert)
+ * @param {String} buttonLabel Label of the close button (default: OK)
+ */
+ alert: function(message, completeCallback, title, buttonLabel) {
+ var _title = (title || "Alert");
+ var _buttonLabel = (buttonLabel || "OK");
+ exec(completeCallback, null, "Notification", "alert", [message, _title, _buttonLabel]);
+ },
+
+ /**
+ * Open a native confirm dialog, with a customizable title and button text.
+ * The result that the user selects is returned to the result callback.
+ *
+ * @param {String} message Message to print in the body of the alert
+ * @param {Function} resultCallback The callback that is called when user clicks on a button.
+ * @param {String} title Title of the alert dialog (default: Confirm)
+ * @param {String} buttonLabels Comma separated list of the labels of the buttons (default: 'OK,Cancel')
+ */
+ confirm: function(message, resultCallback, title, buttonLabels) {
+ var _title = (title || "Confirm");
+ var _buttonLabels = (buttonLabels || "OK,Cancel");
+ exec(resultCallback, null, "Notification", "confirm", [message, _title, _buttonLabels]);
+ },
+
+ /**
+ * Causes the device to vibrate.
+ *
+ * @param {Integer} mills The number of milliseconds to vibrate for.
+ */
+ vibrate: function(mills) {
+ exec(null, null, "Notification", "vibrate", [mills]);
+ },
+
+ /**
+ * Causes the device to beep.
+ * On Android, the default notification ringtone is played "count" times.
+ *
+ * @param {Integer} count The number of beeps.
+ */
+ beep: function(count) {
+ exec(null, null, "Notification", "beep", [count]);
+ }
+};
+});
+
+// file: lib/common/plugin/requestFileSystem.js
+define("cordova/plugin/requestFileSystem", function(require, exports, module) {
+var FileError = require('cordova/plugin/FileError'),
+ FileSystem = require('cordova/plugin/FileSystem'),
+ exec = require('cordova/exec');
+
+/**
+ * Request a file system in which to store application data.
+ * @param type local file system type
+ * @param size indicates how much storage space, in bytes, the application expects to need
+ * @param successCallback invoked with a FileSystem object
+ * @param errorCallback invoked if error occurs retrieving file system
+ */
+var requestFileSystem = function(type, size, successCallback, errorCallback) {
+ var fail = function(code) {
+ if (typeof errorCallback === 'function') {
+ errorCallback(new FileError(code));
+ }
+ };
+
+ if (type < 0 || type > 3) {
+ fail(FileError.SYNTAX_ERR);
+ } else {
+ // if successful, return a FileSystem object
+ var success = function(file_system) {
+ if (file_system) {
+ if (typeof successCallback === 'function') {
+ // grab the name and root from the file system object
+ var result = new FileSystem(file_system.name, file_system.root);
+ successCallback(result);
+ }
+ }
+ else {
+ // no FileSystem object returned
+ fail(FileError.NOT_FOUND_ERR);
+ }
+ };
+ exec(success, fail, "File", "requestFileSystem", [type, size]);
+ }
+};
+
+module.exports = requestFileSystem;
+});
+
+// file: lib/common/plugin/resolveLocalFileSystemURI.js
+define("cordova/plugin/resolveLocalFileSystemURI", function(require, exports, module) {
+var DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
+ FileEntry = require('cordova/plugin/FileEntry'),
+ FileError = require('cordova/plugin/FileError'),
+ exec = require('cordova/exec');
+
+/**
+ * Look up file system Entry referred to by local URI.
+ * @param {DOMString} uri URI referring to a local file or directory
+ * @param successCallback invoked with Entry object corresponding to URI
+ * @param errorCallback invoked if error occurs retrieving file system entry
+ */
+module.exports = function(uri, successCallback, errorCallback) {
+ // error callback
+ var fail = function(error) {
+ if (typeof errorCallback === 'function') {
+ errorCallback(new FileError(error));
+ }
+ };
+ // sanity check for 'not:valid:filename'
+ if(!uri || uri.split(":").length > 2) {
+ setTimeout( function() {
+ fail(FileError.ENCODING_ERR);
+ },0);
+ return;
+ }
+ // if successful, return either a file or directory entry
+ var success = function(entry) {
+ var result;
+ if (entry) {
+ if (typeof successCallback === 'function') {
+ // create appropriate Entry object
+ result = (entry.isDirectory) ? new DirectoryEntry(entry.name, entry.fullPath) : new FileEntry(entry.name, entry.fullPath);
+ try {
+ successCallback(result);
+ }
+ catch (e) {
+ console.log('Error invoking callback: ' + e);
+ }
+ }
+ }
+ else {
+ // no Entry object returned
+ fail(FileError.NOT_FOUND_ERR);
+ }
+ };
+
+ exec(success, fail, "File", "resolveLocalFileSystemURI", [uri]);
+};
+
+});
+
+// file: lib/common/plugin/splashscreen.js
+define("cordova/plugin/splashscreen", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+var splashscreen = {
+ hide:function() {
+ exec(null, null, "SplashScreen", "hide", []);
+ }
+};
+
+module.exports = splashscreen;
+});
+
+// file: lib/common/utils.js
+define("cordova/utils", function(require, exports, module) {
+var utils = exports;
+
+/**
+ * Returns an indication of whether the argument is an array or not
+ */
+utils.isArray = function(a) {
+ return Object.prototype.toString.call(a) == '[object Array]';
+};
+
+/**
+ * Returns an indication of whether the argument is a Date or not
+ */
+utils.isDate = function(d) {
+ return Object.prototype.toString.call(d) == '[object Date]';
+};
+
+/**
+ * Does a deep clone of the object.
+ */
+utils.clone = function(obj) {
+ if(!obj || typeof obj == 'function' || utils.isDate(obj) || typeof obj != 'object') {
+ return obj;
+ }
+
+ var retVal, i;
+
+ if(utils.isArray(obj)){
+ retVal = [];
+ for(i = 0; i < obj.length; ++i){
+ retVal.push(utils.clone(obj[i]));
+ }
+ return retVal;
+ }
+
+ retVal = {};
+ for(i in obj){
+ if(!(i in retVal) || retVal[i] != obj[i]) {
+ retVal[i] = utils.clone(obj[i]);
+ }
+ }
+ return retVal;
+};
+
+/**
+ * Returns a wrappered version of the function
+ */
+utils.close = function(context, func, params) {
+ if (typeof params == 'undefined') {
+ return function() {
+ return func.apply(context, arguments);
+ };
+ } else {
+ return function() {
+ return func.apply(context, params);
+ };
+ }
+};
+
+/**
+ * Create a UUID
+ */
+utils.createUUID = function() {
+ return UUIDcreatePart(4) + '-' +
+ UUIDcreatePart(2) + '-' +
+ UUIDcreatePart(2) + '-' +
+ UUIDcreatePart(2) + '-' +
+ UUIDcreatePart(6);
+};
+
+/**
+ * Extends a child object from a parent object using classical inheritance
+ * pattern.
+ */
+utils.extend = (function() {
+ // proxy used to establish prototype chain
+ var F = function() {};
+ // extend Child from Parent
+ return function(Child, Parent) {
+ F.prototype = Parent.prototype;
+ Child.prototype = new F();
+ Child.__super__ = Parent.prototype;
+ Child.prototype.constructor = Child;
+ };
+}());
+
+/**
+ * Alerts a message in any available way: alert or console.log.
+ */
+utils.alert = function(msg) {
+ if (alert) {
+ alert(msg);
+ } else if (console && console.log) {
+ console.log(msg);
+ }
+};
+
+/**
+ * Formats a string and arguments following it ala sprintf()
+ *
+ * see utils.vformat() for more information
+ */
+utils.format = function(formatString /* ,... */) {
+ var args = [].slice.call(arguments, 1);
+ return utils.vformat(formatString, args);
+};
+
+/**
+ * Formats a string and arguments following it ala vsprintf()
+ *
+ * format chars:
+ * %j - format arg as JSON
+ * %o - format arg as JSON
+ * %c - format arg as ''
+ * %% - replace with '%'
+ * any other char following % will format it's
+ * arg via toString().
+ *
+ * for rationale, see FireBug's Console API:
+ * http://getfirebug.com/wiki/index.php/Console_API
+ */
+utils.vformat = function(formatString, args) {
+ if (formatString === null || formatString === undefined) return "";
+ if (arguments.length == 1) return formatString.toString();
+ if (typeof formatString != "string") return formatString.toString();
+
+ var pattern = /(.*?)%(.)(.*)/;
+ var rest = formatString;
+ var result = [];
+
+ while (args.length) {
+ var arg = args.shift();
+ var match = pattern.exec(rest);
+
+ if (!match) break;
+
+ rest = match[3];
+
+ result.push(match[1]);
+
+ if (match[2] == '%') {
+ result.push('%');
+ args.unshift(arg);
+ continue;
+ }
+
+ result.push(formatted(arg, match[2]));
+ }
+
+ result.push(rest);
+
+ return result.join('');
+};
+
+//------------------------------------------------------------------------------
+function UUIDcreatePart(length) {
+ var uuidpart = "";
+ for (var i=0; i<length; i++) {
+ var uuidchar = parseInt((Math.random() * 256), 10).toString(16);
+ if (uuidchar.length == 1) {
+ uuidchar = "0" + uuidchar;
+ }
+ uuidpart += uuidchar;
+ }
+ return uuidpart;
+}
+
+//------------------------------------------------------------------------------
+function formatted(object, formatChar) {
+
+ try {
+ switch(formatChar) {
+ case 'j':
+ case 'o': return JSON.stringify(object);
+ case 'c': return '';
+ }
+ }
+ catch (e) {
+ return "error JSON.stringify()ing argument: " + e;
+ }
+
+ if ((object === null) || (object === undefined)) {
+ return Object.prototype.toString.call(object);
+ }
+
+ return object.toString();
+}
+
+});
+
+
+window.cordova = require('cordova');
+
+// file: lib/scripts/bootstrap.js
+(function (context) {
+ var channel = require("cordova/channel"),
+ _self = {
+ boot: function () {
+ /**
+ * Create all cordova objects once page has fully loaded and native side is ready.
+ */
+ channel.join(function() {
+ var builder = require('cordova/builder'),
+ base = require('cordova/common'),
+ platform = require('cordova/platform');
+
+ // Drop the common globals into the window object, but be nice and don't overwrite anything.
+ builder.build(base.objects).intoButDontClobber(window);
+
+ // Drop the platform-specific globals into the window object
+ // and clobber any existing object.
+ builder.build(platform.objects).intoAndClobber(window);
+
+ // Merge the platform-specific overrides/enhancements into
+ // the window object.
+ if (typeof platform.merges !== 'undefined') {
+ builder.build(platform.merges).intoAndMerge(window);
+ }
+
+ // Call the platform-specific initialization
+ platform.initialize();
+
+ // Fire event to notify that all objects are created
+ channel.onCordovaReady.fire();
+
+ // Fire onDeviceReady event once all constructors have run and
+ // cordova info has been received from native side.
+ channel.join(function() {
+ require('cordova').fireDocumentEvent('deviceready');
+ }, channel.deviceReadyChannelsArray);
+
+ }, [ channel.onDOMContentLoaded, channel.onNativeReady ]);
+ }
+ };
+
+ // boot up once native side is ready
+ channel.onNativeReady.subscribeOnce(_self.boot);
+
+ // _nativeReady is global variable that the native side can set
+ // to signify that the native code is ready. It is a global since
+ // it may be called before any cordova JS is ready.
+ if (window._nativeReady) {
+ channel.onNativeReady.fire();
+ }
+
+}(window));
+
+
+})(); \ No newline at end of file
diff --git a/phonegap/www/css/base.css b/phonegap/www/css/base.css
new file mode 100644
index 000000000..35b1853a2
--- /dev/null
+++ b/phonegap/www/css/base.css
@@ -0,0 +1,2148 @@
+/* Base stylesheet for FixMyStreet look
+ *
+ * In a mobile first way, this contains the look of the site, and a basic
+ * layout for browsers that can't handle media queries. Baseline grid of 1.5em.
+ */
+/*
+ * HTML5 ✰ Boilerplate, with minor tweaks.
+ *
+ * What follows is the result of much research on cross-browser styling.
+ * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
+ * Kroc Camen, and the H5BP dev community and team.
+ *
+ * Detailed information about this CSS: h5bp.com/css
+ *
+ * ==|== normalize ==========================================================
+ */
+/* =============================================================================
+ HTML5 display definitions
+ ========================================================================== */
+article, aside, details, figcaption, figure, footer, header, hgroup, nav, section {
+ display: block;
+}
+
+audio, canvas, video {
+ display: inline-block;
+ *display: inline;
+ *zoom: 1;
+}
+
+audio:not([controls]) {
+ display: none;
+}
+
+[hidden] {
+ display: none;
+}
+
+/* =============================================================================
+ Base
+ ========================================================================== */
+/*
+ * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units
+ * 2. Force vertical scrollbar in non-IE - mySociety removed.
+ * 3. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g
+ */
+html {
+ font-size: 100%;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+}
+
+/* mySociety change: line-height from 1.4 */
+body {
+ margin: 0;
+ font-size: 1em;
+ line-height: 1.5;
+}
+
+/* mySociety addition: background colour */
+body, button, input, select, textarea {
+ font-family: sans-serif;
+ color: #222;
+ background-color: white;
+}
+
+/*
+ * Remove text-shadow in selection highlight: h5bp.com/i
+ * These selection declarations have to be separate
+ * mySociety change: background colour from #fe57a1
+ */
+::-moz-selection {
+ background: #ffeeaa;
+ color: #000;
+ text-shadow: none;
+}
+
+::selection {
+ background: #ffeeaa;
+ color: #000;
+ text-shadow: none;
+}
+
+/* =============================================================================
+ Links
+ ========================================================================== */
+/* mySociety removal: link colours specified elsewhere */
+a:focus {
+ outline: thin dotted;
+}
+
+/* Improve readability when focused and hovered in all browsers: h5bp.com/h */
+a:hover, a:active {
+ outline: 0;
+}
+
+/* =============================================================================
+ Typography
+ ========================================================================== */
+abbr[title] {
+ border-bottom: 1px dotted;
+}
+
+b, strong {
+ font-weight: bold;
+}
+
+/* mySociety change: from 1em 40px; */
+blockquote {
+ margin: 1.5em 2em;
+}
+
+dfn {
+ font-style: italic;
+}
+
+hr {
+ display: block;
+ height: 1px;
+ border: 0;
+ border-top: 1px solid #ccc;
+ margin: 1em 0;
+ padding: 0;
+}
+
+ins {
+ background: #ff9;
+ color: #000;
+ text-decoration: none;
+}
+
+mark {
+ background: #ff0;
+ color: #000;
+ font-style: italic;
+ font-weight: bold;
+}
+
+/* Redeclare monospace font family: h5bp.com/j */
+pre, code, kbd, samp {
+ font-family: monospace, serif;
+ _font-family: 'courier new', monospace;
+ font-size: 1em;
+}
+
+/* Improve readability of pre-formatted text in all browsers */
+pre {
+ white-space: pre;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+q {
+ quotes: none;
+}
+
+q:before, q:after {
+ content: "";
+ content: none;
+}
+
+small, .small-print {
+ font-size: 85%;
+}
+
+/* Position subscript and superscript content without affecting line-height: h5bp.com/k */
+sub, sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sup {
+ top: -0.5em;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+/* =============================================================================
+ Lists
+ ========================================================================== */
+/* mySociety change: left 40px, top/bottom 1em */
+ul, ol {
+ margin: 0 0 1.5em;
+ padding: 0 0 0 2em;
+}
+
+dd {
+ margin: 0 0 0 2em;
+}
+
+nav ul, nav ol {
+ list-style: none;
+ list-style-image: none;
+ margin: 0;
+ padding: 0;
+}
+
+/* =============================================================================
+ Embedded content
+ ========================================================================== */
+/*
+ * 1. Improve image quality when scaled in IE7: h5bp.com/d
+ * 2. Remove the gap between images and borders on image containers: h5bp.com/e
+ */
+img {
+ border: 0;
+ -ms-interpolation-mode: bicubic;
+ vertical-align: middle;
+}
+
+/*
+ * Correct overflow not hidden in IE9
+ */
+svg:not(:root) {
+ overflow: hidden;
+}
+
+/* =============================================================================
+ Figures
+ ========================================================================== */
+figure {
+ margin: 0;
+}
+
+/* =============================================================================
+ Forms
+ ========================================================================== */
+form {
+ margin: 0;
+}
+
+fieldset {
+ border: 0;
+ margin: 0;
+ padding: 0;
+}
+
+/* Indicate that 'label' will shift focus to the associated form element */
+label {
+ cursor: pointer;
+}
+
+/*
+ * 1. Correct color not inheriting in IE6/7/8/9
+ * 2. Correct alignment displayed oddly in IE6/7
+ */
+legend {
+ border: 0;
+ *margin-left: -7px;
+ padding: 0;
+}
+
+/*
+ * 1. Correct font-size not inheriting in all browsers
+ * 2. Remove margins in FF3/4 S5 Chrome
+ * 3. Define consistent vertical alignment display in all browsers
+ */
+button, input, select, textarea {
+ font-size: 100%;
+ margin: 0;
+ vertical-align: baseline;
+ *vertical-align: middle;
+}
+
+/*
+ * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
+ */
+button, input {
+ line-height: normal;
+}
+
+/*
+ * 1. Display hand cursor for clickable form elements
+ * 2. Allow styling of clickable form elements in iOS
+ * 3. Correct inner spacing displayed oddly in IE7 (doesn't effect IE6)
+ */
+button, input[type="button"], input[type="reset"], input[type="submit"] {
+ cursor: pointer;
+ -webkit-appearance: button;
+ *overflow: visible;
+}
+
+/*
+ * Consistent box sizing and appearance
+ */
+input[type="checkbox"], input[type="radio"] {
+ box-sizing: border-box;
+ padding: 0;
+}
+
+input[type="search"] {
+ -webkit-appearance: textfield;
+ -moz-box-sizing: content-box;
+ -webkit-box-sizing: content-box;
+ box-sizing: content-box;
+}
+
+input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/*
+ * Remove inner padding and border in FF3/4: h5bp.com/l
+ */
+button::-moz-focus-inner, input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+
+/*
+ * 1. Remove default vertical scrollbar in IE6/7/8/9
+ * 2. Allow only vertical resizing
+ */
+textarea {
+ overflow: auto;
+ vertical-align: top;
+ resize: vertical;
+}
+
+/* =============================================================================
+ Tables
+ ========================================================================== */
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+td {
+ vertical-align: top;
+}
+
+/* ==|== primary styles =====================================================
+ Author:
+ ========================================================================== */
+/* ==|== non-semantic helper classes ========================================
+ Please define your styles before this section.
+ ========================================================================== */
+/* For image replacement */
+.ir {
+ display: block;
+ border: 0;
+ text-indent: -999em;
+ overflow: hidden;
+ background-color: transparent;
+ background-repeat: no-repeat;
+ text-align: left;
+ direction: ltr;
+ *line-height: 0;
+}
+
+.ir br {
+ display: none;
+}
+
+/* Hide from both screenreaders and browsers: h5bp.com/u */
+.hidden {
+ display: none !important;
+ visibility: hidden;
+}
+
+/* Hide only visually, but have it available for screenreaders: h5bp.com/v */
+.visuallyhidden {
+ border: 0;
+ clip: rect(0 0 0 0);
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 1px;
+}
+
+/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */
+.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus {
+ clip: auto;
+ height: auto;
+ margin: 0;
+ overflow: visible;
+ position: static;
+ width: auto;
+}
+
+/* Hide visually and from screenreaders, but maintain layout */
+.invisible {
+ visibility: hidden;
+}
+
+/* Contain floats: h5bp.com/q */
+/* mySociety change: rename to cf */
+.cf:before, .cf:after {
+ content: "";
+ display: table;
+}
+
+.cf:after {
+ clear: both;
+}
+
+.cf {
+ *zoom: 1;
+}
+
+/* ==|== print styles =======================================================
+ Print styles.
+ Inlined to avoid required HTTP connection: h5bp.com/r
+ ========================================================================== */
+/* mySociety removal: bits of * and :after */
+@media print {
+ * {
+ box-shadow: none !important;
+ text-shadow: none !important;
+ filter: none !important;
+ -ms-filter: none !important;
+ }
+
+ /* Black prints faster: h5bp.com/s */
+ a, a:visited {
+ text-decoration: underline;
+ }
+
+ abbr[title]:after {
+ content: " (" attr(title) ")";
+ }
+
+ pre, blockquote {
+ border: 1px solid #999;
+ page-break-inside: avoid;
+ }
+
+ thead {
+ display: table-header-group;
+ }
+
+ /* h5bp.com/t */
+ tr, img {
+ page-break-inside: avoid;
+ }
+
+ img {
+ max-width: 100% !important;
+ }
+
+ @page {
+ margin: 0.5cm;
+}
+
+ p, h2, h3 {
+ orphans: 3;
+ widows: 3;
+ }
+
+ h2, h3 {
+ page-break-after: avoid;
+ }
+}
+/* COLOURS */
+/* HEADINGS and TYPOGRAPHY */
+body {
+ font-family: MuseoSans, Helmet, Freesans, sans-serif;
+ margin: 0;
+ font-size: 1em;
+ line-height: 1.5;
+ color: #222;
+ background-color: #fff;
+}
+
+p {
+ font-size: 1em;
+ font-weight: normal;
+ margin: 0 0 1em 0;
+}
+
+small, .small-print {
+ font-family: Helmet, Freesans, sans-serif;
+ font-style: italic;
+ font-size: 0.8125em;
+ line-height: 1.2307em;
+}
+
+h1 {
+ font-family: 'Museo300-display', MuseoSans, Helmet, Freesans, sans-serif;
+ font-size: 2em;
+ line-height: 1em;
+ font-weight: normal;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+#front-main h1 {
+ margin-top: 0.7em;
+}
+
+h1#reports_heading span {
+ display: none;
+}
+
+h1#reports_heading a {
+ display: block;
+ font-size: 50%;
+}
+
+h2 {
+ font-family: 'Museo300-display', MuseoSans, Helmet, Freesans, sans-serif;
+ font-size: 1.5em;
+ /*24px*/
+ line-height: 1.3333em;
+ /*32px*/
+ font-weight: normal;
+ margin-top: 1.333333333em;
+ /*32px*/
+ margin-bottom: 0.666666666em;
+ /*16px*/
+}
+
+h3 {
+ font-size: 1.25em;
+ line-height: 1.20em;
+ margin-top: 1.2em;
+ margin-bottom: 0.8em;
+ font-weight: normal;
+}
+
+h4 {
+ font-size: 1em;
+ font-weight: normal;
+ margin-bottom: 1em;
+}
+
+ul, ol {
+ font-size: 1em;
+ margin-bottom: 2em;
+ margin-left: 2em;
+ padding: 0;
+}
+
+li {
+ margin-bottom: 0.5em;
+}
+
+ul li {
+ list-style: square;
+}
+
+ol li {
+ list-style: decimal;
+}
+
+ol.big-numbers {
+ padding: 0;
+ margin: 0;
+ counter-reset: li;
+}
+ol.big-numbers > li {
+ position: relative;
+ list-style: none;
+ padding: 0 0 0 2.5em;
+ margin-bottom: 2em;
+}
+ol.big-numbers > li:before {
+ content: counter(li);
+ counter-increment: li;
+ position: absolute;
+ left: 0;
+ top: -0.2em;
+ color: #ccc;
+ line-height: 1;
+ font-family: Helmet, Freesans, sans-serif;
+ font-weight: bold;
+ font-size: 2.5em;
+}
+
+dl {
+ margin: 0;
+ padding: 0;
+}
+dl dt {
+ font-size: 1em;
+ line-height: 1.5em;
+ font-weight: bold;
+}
+dl dd {
+ font-weight: 1em;
+ line-height: 1.5em;
+ margin: 0 0 1em 0;
+}
+
+blockquote p:before {
+ content: '“';
+}
+blockquote p:after {
+ content: '”';
+}
+
+pre {
+ font-family: monospace;
+}
+
+img {
+ height: auto;
+}
+
+select, input, textarea {
+ font-size: 99%;
+ max-width: 95%;
+}
+
+select {
+ width: 100%;
+}
+
+a,
+a:visited {
+ text-decoration: none;
+ color: #0BA7D1;
+}
+a:hover, a:active,
+a:visited:hover,
+a:visited:active {
+ text-decoration: underline;
+ color: #0D7CCE;
+}
+
+.small-print {
+ margin-bottom: 1.2307em;
+ color: #666666;
+}
+
+.meta {
+ color: #555555;
+ font-style: italic;
+ margin-bottom: 0px;
+}
+
+.meta-2 {
+ font-family: Helmet, Freesans, sans-serif;
+ color: #666666;
+ font-style: italic;
+ font-size: 0.75em;
+}
+
+h4.static, h4.static-with-rule {
+ font-family: Helmet, Freesans, sans-serif;
+ text-transform: uppercase;
+ font-size: 0.875em;
+ line-height: 1.71428em;
+ color: #666;
+ margin-top: 2em;
+}
+
+h4.static-with-rule {
+ background: #f6f6f6;
+ border-top: 0.25em solid #ffd000;
+ margin-bottom: 0.25em;
+ padding: 0.5em 1em;
+}
+
+/* FORMS */
+::-webkit-input-placeholder {
+ color: #666666;
+ font-style: italic;
+ font-size: 0.9375em;
+}
+
+:-moz-placeholder {
+ color: #666666;
+ font-style: italic;
+ font-size: 0.9375em;
+}
+
+:-ms-placeholder {
+ color: #666666;
+ font-style: italic;
+ font-size: 0.9375em;
+}
+
+.placeholder {
+ color: #666666;
+ font-style: italic;
+ font-size: 0.9375em;
+}
+
+fieldset {
+ margin: 1em;
+}
+
+input[type=text],
+input[type=password],
+input[type=email],
+input[type=file],
+textarea {
+ width: 100%;
+ padding: 0.5em;
+ margin: 0 0 0 -0.5em;
+}
+
+textarea {
+ border: 0.125em solid #888888;
+ -moz-border-radius: 0.25em;
+ -webkit-border-radius: 0.25em;
+ -o-border-radius: 0.25em;
+ -ms-border-radius: 0.25em;
+ -khtml-border-radius: 0.25em;
+ border-radius: 0.25em;
+ display: block;
+ font-size: 1em;
+ line-height: 1.5em;
+ font-family: Helmet, Freesans, sans-serif;
+ min-height: 8em;
+}
+
+input[type=text],
+input[type=password],
+input[type=email],
+input[type=file] {
+ border: 0.125em solid #888888;
+ -moz-border-radius: 0.25em;
+ -webkit-border-radius: 0.25em;
+ -o-border-radius: 0.25em;
+ -ms-border-radius: 0.25em;
+ -khtml-border-radius: 0.25em;
+ border-radius: 0.25em;
+ display: block;
+ font-size: 1em;
+ line-height: 1em;
+}
+
+input[type=file] {
+ margin-bottom: 1em;
+}
+
+label {
+ display: block;
+ margin-top: 1.25em;
+ margin-bottom: 0.25em;
+ font-weight: bold;
+}
+label.inline {
+ display: inline;
+ padding: 0 2em 0 1em;
+ font-weight: normal;
+}
+
+.form-box {
+ margin: 0 -2em 0.25em -2em;
+ background: #eeeeee;
+ padding: 1em 2em 1em 2em;
+ max-width: 26em;
+}
+.form-box > input[type=text] {
+ margin-bottom: 1em;
+}
+.form-box .title {
+ font-size: 1.25em;
+ margin: 0.5em 0;
+}
+.form-box h5 {
+ margin: 0;
+ font-size: 1.125em;
+ font-weight: normal;
+}
+.form-box h5 strong {
+ font-size: 2em;
+ margin-right: 0.25em;
+}
+
+.ie6 .form-box {
+ margin: 0 0 0.25em 0;
+}
+
+.form-txt-submit-box {
+ min-height: 3em;
+}
+.form-txt-submit-box input[type=password], .form-txt-submit-box input[type=text], .form-txt-submit-box input[type=email] {
+ width: 65%;
+ float: left;
+}
+.form-txt-submit-box input[type=submit] {
+ float: right;
+ width: 28%;
+ margin-right: 0.25em;
+ padding-top: 0.7em;
+ padding-bottom: 0.6em;
+}
+
+.checkbox-group {
+ margin: 1em 0;
+}
+
+div.form-error,
+p.form-error {
+ display: -moz-inline-box;
+ -moz-box-orient: vertical;
+ display: inline-block;
+ vertical-align: middle;
+ *vertical-align: auto;
+ background: #ff0000;
+ color: #fff;
+ padding: 0 0.5em;
+ margin: 0 0 0 -0.5em;
+ -moz-border-radius: 0.25em 0.25em 0 0;
+ -webkit-border-radius: 0.25em 0.25em 0 0;
+ -o-border-radius: 0.25em 0.25em 0 0;
+ -ms-border-radius: 0.25em 0.25em 0 0;
+ -khtml-border-radius: 0.25em 0.25em 0 0;
+ border-radius: 0.25em 0.25em 0 0;
+}
+div.form-error,
+p.form-error {
+ *display: inline;
+}
+
+input.form-error,
+textarea.form-error {
+ border-color: #ff0000;
+ -moz-border-radius: 0 0.25em 0.25em 0.25em;
+ -webkit-border-radius: 0 0.25em 0.25em 0.25em;
+ -o-border-radius: 0 0.25em 0.25em 0.25em;
+ -ms-border-radius: 0 0.25em 0.25em 0.25em;
+ -khtml-border-radius: 0 0.25em 0.25em 0.25em;
+ border-radius: 0 0.25em 0.25em 0.25em;
+}
+
+ul.error {
+ background: #ff0000;
+ color: #fff;
+ padding: 0 0.5em;
+ margin: 0 0 0 -0.5em;
+ -moz-border-radius: 0.25em;
+ -webkit-border-radius: 0.25em;
+ -o-border-radius: 0.25em;
+ -ms-border-radius: 0.25em;
+ -khtml-border-radius: 0.25em;
+ border-radius: 0.25em;
+}
+
+div.label-valid,
+p.label-valid {
+ display: none !important;
+ visibility: hidden;
+}
+
+/*** LAYOUT ***/
+.container {
+ padding: 0 1em 1em;
+}
+
+.full-width, .shadow-wrap, #footer-mobileapps, #map_box, .promo, .alert, #front-main #postcodeForm {
+ margin: 0 -1em;
+}
+
+#site-header {
+ border-top: 0.25em solid #ffd000;
+ height: 3em;
+ background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #000000), color-stop(10%, #222222), color-stop(90%, #222222), color-stop(100%, #000000));
+ background: -webkit-linear-gradient(#000000, #222222 10%, #222222 90%, #000000);
+ background: -moz-linear-gradient(#000000, #222222 10%, #222222 90%, #000000);
+ background: -o-linear-gradient(#000000, #222222 10%, #222222 90%, #000000);
+ background: -ms-linear-gradient(#000000, #222222 10%, #222222 90%, #000000);
+ background: linear-gradient(#000000, #222222 10%, #222222 90%, #000000);
+}
+#site-header .container {
+ min-height: 4em;
+}
+
+#site-logo {
+ display: block;
+ width: 175px;
+ height: 40px;
+ top: 0.4em;
+ background: url("../images/sprite.png") -3px -3px no-repeat;
+ text-indent: -999999px;
+ position: absolute;
+ z-index: 2;
+}
+
+.ie6 #site-logo {
+ background: url("../images/ie_logo.gif") 0 -5px no-repeat;
+}
+
+.ie7 #site-logo {
+ background: url("../images/sprite.png") -3px -3px no-repeat;
+}
+
+#nav-link {
+ width: 50px;
+ height: 48px;
+ background: url("../images/sprite.png") -5px -916px no-repeat;
+ display: block;
+ text-indent: -999999px;
+ position: absolute;
+ right: 2em;
+ top: -2px;
+}
+#nav-link:hover {
+ top: 2px;
+}
+
+#main-nav ul {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+}
+#main-nav ul li {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+#main-nav ul li a, #main-nav ul li span {
+ display: block;
+ padding: 0.5em 1em;
+ background: #f6f6f6;
+ color: #333;
+ font-size: 1.25em;
+ border-bottom: 0.25em solid #333;
+}
+#main-nav ul li a:hover, #main-nav ul li span.hover {
+ background: #333;
+ color: #fff;
+ text-decoration: none;
+}
+#main-nav ul li span {
+ background-color: #ccc;
+}
+#main-nav ul#mysoc-menu li a {
+ background: #ffd000;
+}
+#main-nav ul#mysoc-menu li a#mysoc-logo {
+ background-image: url("../images/sprite.png");
+ background-repeat: no-repeat;
+ background-position: -240px -38px;
+ text-indent: -999999px;
+}
+
+.ie6 #main-nav ul#mysoc-menu li a#mysoc-logo {
+ background: url("../images/ie_mysoc_logo.gif") center no-repeat;
+}
+
+.ie7 #main-nav ul#mysoc-menu li a#mysoc-logo {
+ background: url("../images/sprite.png") -240px -38px no-repeat;
+}
+
+.wrapper {
+ width: 100%;
+ display: table;
+ caption-side: bottom;
+}
+
+#user-meta p {
+ position: relative;
+ background: #ffd000;
+ padding: 1em 6em 1em 1em;
+}
+#user-meta p a {
+ position: absolute;
+ right: 1em;
+ display: -moz-inline-box;
+ -moz-box-orient: vertical;
+ display: inline-block;
+ vertical-align: middle;
+ *vertical-align: auto;
+ text-transform: uppercase;
+ font-size: 0.75em;
+ background: #333;
+ padding: 0.25em 0.75em;
+ color: #fff;
+ -moz-border-radius: 0.25em;
+ -webkit-border-radius: 0.25em;
+ -o-border-radius: 0.25em;
+ -ms-border-radius: 0.25em;
+ -khtml-border-radius: 0.25em;
+ border-radius: 0.25em;
+}
+#user-meta p a {
+ *display: inline;
+}
+
+.shadow-wrap ul#key-tools {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ margin-bottom: 1em;
+ display: table;
+ width: 100%;
+}
+.shadow-wrap ul#key-tools li {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+.shadow-wrap ul#key-tools li {
+ display: table-cell;
+ vertical-align: bottom;
+ text-align: center;
+ border-right: 0.25em solid #fff;
+}
+.shadow-wrap ul#key-tools li:last-child {
+ border-right: none;
+}
+.shadow-wrap ul#key-tools li a {
+ display: block;
+ background-color: #f5f5f5;
+ background-repeat: no-repeat;
+ color: #333;
+ padding: 4em 2em 1em 2em;
+ text-transform: uppercase;
+ font-size: 0.6875em;
+ font-family: Helmet, Freesans, sans-serif;
+}
+.shadow-wrap ul#key-tools li a:hover, .shadow-wrap ul#key-tools li a.hover, .shadow-wrap ul#key-tools li a.active {
+ text-decoration: none;
+ background-color: #333;
+ color: #fff;
+}
+.shadow-wrap ul#key-tools li a.abuse {
+ background-image: url("../images/sprite.png");
+ background-position: center -2424px;
+}
+.shadow-wrap ul#key-tools li a.feed {
+ background-image: url("../images/sprite.png");
+ background-position: center -2563px;
+}
+.shadow-wrap ul#key-tools li a.chevron {
+ background-image: url("../images/sprite.png");
+ background-position: center -2716px;
+}
+.shadow-wrap ul#key-tools li a.hover, .shadow-wrap ul#key-tools li a.active {
+ background-image: url("../images/sprite.png");
+ background-position: center -2064px;
+}
+
+.ie6 .shadow-wrap ul#key-tools, .ie7 .shadow-wrap ul#key-tools {
+ background: #f5f5f5;
+}
+.ie6 .shadow-wrap ul#key-tools li, .ie7 .shadow-wrap ul#key-tools li {
+ float: left;
+}
+.ie6 .shadow-wrap ul#key-tools li a, .ie7 .shadow-wrap ul#key-tools li a {
+ padding-left: 1.5em;
+ padding-right: 3em;
+}
+
+.ie6 .shadow-wrap ul#key-tools li a.abuse {
+ background-image: url("../images/ie_key_tools_sprite.gif");
+ background-position: right 0px;
+}
+.ie6 .shadow-wrap ul#key-tools li a.feed {
+ background-image: url("../images/ie_key_tools_sprite.gif");
+ background-position: right -58px;
+}
+.ie6 .shadow-wrap ul#key-tools li a.chevron {
+ background-image: url("../images/ie_key_tools_sprite.gif");
+ background-position: right -116px;
+}
+.ie6 .shadow-wrap ul#key-tools li a:hover {
+ background-image: url("../images/ie_key_tools_sprite_dark.gif");
+}
+
+#footer-mobileapps {
+ padding: 1em;
+}
+#footer-mobileapps h4 {
+ margin: 0;
+}
+#footer-mobileapps ul {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+}
+#footer-mobileapps ul li {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+#footer-mobileapps ul li {
+ border-bottom: 1px solid #AFAFAF;
+}
+#footer-mobileapps ul li:last-child {
+ border-bottom: none;
+}
+#footer-mobileapps ul li a {
+ display: block;
+ padding: 0.5em 0;
+}
+
+#footer-help ul {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+}
+#footer-help ul li {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+#footer-help ul li {
+ border-bottom: 1px solid #AFAFAF;
+}
+#footer-help ul li:last-child {
+ border-bottom: none;
+}
+#footer-help ul li h4 {
+ margin: 0.75em 0 0.25em 0;
+}
+#footer-help ul li p {
+ font-size: 0.75em;
+}
+
+/*BUTTONS*/
+button, input[type=submit], .btn {
+ cursor: pointer;
+ font-size: 0.875em;
+ font-family: Helmet, Freesans, sans-serif;
+ font-weight: bold;
+ text-transform: uppercase;
+ line-height: 1.375em;
+ padding: 0.7em 0.5em 0.5em 0.5em;
+ margin: 0;
+ width: auto;
+ height: auto;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -o-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -khtml-border-radius: 4px;
+ border-radius: 4px;
+ background: #eeeeee;
+ background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #eeeeee), color-stop(100%, #cccccc));
+ background: -webkit-linear-gradient(#eeeeee, #cccccc);
+ background: -moz-linear-gradient(#eeeeee, #cccccc);
+ background: -o-linear-gradient(#eeeeee, #cccccc);
+ background: -ms-linear-gradient(#eeeeee, #cccccc);
+ background: linear-gradient(#eeeeee, #cccccc);
+ border: 1px solid #999999;
+ color: #333333;
+}
+button:hover, input[type=submit]:hover, .btn:hover {
+ background: #777777;
+ background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #999999), color-stop(100%, #777777));
+ background: -webkit-linear-gradient(#999999, #777777);
+ background: -moz-linear-gradient(#999999, #777777);
+ background: -o-linear-gradient(#999999, #777777);
+ background: -ms-linear-gradient(#999999, #777777);
+ background: linear-gradient(#999999, #777777);
+ text-decoration: none;
+ border: 1px solid #666666;
+ color: white;
+}
+
+.green-btn,
+button.green-btn,
+input.green-btn {
+ cursor: pointer;
+ font-size: 0.875em;
+ font-family: Helmet, Freesans, sans-serif;
+ font-weight: bold;
+ text-transform: uppercase;
+ line-height: 1.375em;
+ padding: 0.7em 0.5em 0.5em 0.5em;
+ margin: 0;
+ width: auto;
+ height: auto;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -o-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -khtml-border-radius: 4px;
+ border-radius: 4px;
+ background: #9fde23;
+ background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #9fde23), color-stop(100%, #7fb900));
+ background: -webkit-linear-gradient(#9fde23, #7fb900);
+ background: -moz-linear-gradient(#9fde23, #7fb900);
+ background: -o-linear-gradient(#9fde23, #7fb900);
+ background: -ms-linear-gradient(#9fde23, #7fb900);
+ background: linear-gradient(#9fde23, #7fb900);
+ border: 1px solid #5b9700;
+ color: white;
+}
+.green-btn:hover,
+button.green-btn:hover,
+input.green-btn:hover {
+ background: #9fde23;
+ background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7fb900), color-stop(100%, #9fde23));
+ background: -webkit-linear-gradient(#7fb900, #9fde23);
+ background: -moz-linear-gradient(#7fb900, #9fde23);
+ background: -o-linear-gradient(#7fb900, #9fde23);
+ background: -ms-linear-gradient(#7fb900, #9fde23);
+ background: linear-gradient(#7fb900, #9fde23);
+ text-decoration: none;
+ border: 1px solid #5b9700;
+ color: white;
+}
+
+.red-btn,
+button.red-btn,
+input.red-btn {
+ cursor: pointer;
+ font-size: 0.875em;
+ font-family: Helmet, Freesans, sans-serif;
+ font-weight: bold;
+ text-transform: uppercase;
+ line-height: 1.375em;
+ padding: 0.7em 0.5em 0.5em 0.5em;
+ margin: 0;
+ width: auto;
+ height: auto;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -o-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -khtml-border-radius: 4px;
+ border-radius: 4px;
+ background: #ff0038;
+ background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ff0038), color-stop(100%, #bf002a));
+ background: -webkit-linear-gradient(#ff0038, #bf002a);
+ background: -moz-linear-gradient(#ff0038, #bf002a);
+ background: -o-linear-gradient(#ff0038, #bf002a);
+ background: -ms-linear-gradient(#ff0038, #bf002a);
+ background: linear-gradient(#ff0038, #bf002a);
+ border: 1px solid #80001c;
+ color: white;
+}
+.red-btn:hover,
+button.red-btn:hover,
+input.red-btn:hover {
+ background: #ff0038;
+ background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bf002a), color-stop(100%, #ff0038));
+ background: -webkit-linear-gradient(#bf002a, #ff0038);
+ background: -moz-linear-gradient(#bf002a, #ff0038);
+ background: -o-linear-gradient(#bf002a, #ff0038);
+ background: -ms-linear-gradient(#bf002a, #ff0038);
+ background: linear-gradient(#bf002a, #ff0038);
+ text-decoration: none;
+ border: 1px solid #80001c;
+ color: white;
+}
+
+.final-submit,
+input.final-submit {
+ margin: 1em 0.5em;
+ float: right;
+}
+
+.button-right,
+.button-left,
+a.button-right,
+a.button-left {
+ display: -moz-inline-box;
+ -moz-box-orient: vertical;
+ display: inline-block;
+ vertical-align: middle;
+ *vertical-align: auto;
+ cursor: pointer;
+ font-size: 1em;
+ line-height: 1;
+ margin: 0;
+ border: 1px solid #999;
+ color: #333;
+ background: #eee;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -o-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -khtml-border-radius: 4px;
+ border-radius: 4px;
+}
+.button-right,
+.button-left,
+a.button-right,
+a.button-left {
+ *display: inline;
+}
+.button-right:hover,
+.button-left:hover,
+a.button-right:hover,
+a.button-left:hover {
+ color: #fff;
+ background: #777;
+ text-decoration: none;
+ border: 1px solid #666;
+}
+
+.button-right,
+a.button-right,
+:hover.button-right,
+a:hover.button-right {
+ padding: 1em 3em 1em 1em;
+ background-image: url("../images/sprite.png");
+ background-repeat: no-repeat;
+ background-position: right -686px;
+}
+
+.button-left,
+a.button-left,
+:hover.button-left,
+a:hover.button-left {
+ padding: 1em 1em 1em 3em;
+ background-image: url("../images/sprite.png");
+ background-repeat: no-repeat;
+ background-position: -18px -802px;
+}
+
+.big-green-banner {
+ position: relative;
+ z-index: 1000;
+ top: -1.75em;
+ background: #00bd08;
+ color: #fff;
+ padding: 1em;
+ text-transform: uppercase;
+ text-align: center;
+ font-size: 0.875em;
+}
+.big-green-banner:before {
+ content: "";
+ left: -0.5em;
+ top: 0;
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-left: 0.5em solid transparent;
+ border-bottom: 0.5em solid #4B8304;
+}
+
+.banner {
+ position: relative;
+ z-index: 1100;
+}
+.banner p {
+ position: absolute;
+ top: -1.95em;
+ right: 0;
+ display: -moz-inline-box;
+ -moz-box-orient: vertical;
+ display: inline-block;
+ vertical-align: middle;
+ *vertical-align: auto;
+ font-size: 0.6875em;
+ line-height: 1em;
+ padding: 0.5em 1em;
+ margin: 0;
+ color: #1a1a1a;
+ background: #ccc;
+ text-transform: uppercase;
+ text-align: center;
+}
+.banner p {
+ *display: inline;
+}
+.banner p:before {
+ content: "";
+ left: -0.5em;
+ top: 0;
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-left: 0.5em solid transparent;
+ border-bottom: 0.5em solid #888;
+}
+.banner p#fixed {
+ color: #fff;
+ background: #00bd08;
+}
+.banner p#fixed:before {
+ border-bottom: 0.5em solid #4B8304;
+}
+
+/*OTHER*/
+.plain-list {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+}
+.plain-list li {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+.plain-list li {
+ margin-bottom: 1em;
+}
+
+.issue-list {
+ margin: 0 0 1em 0;
+ padding: 0;
+ border-bottom: 0.25em solid #ffd000;
+}
+.issue-list li {
+ list-style: none;
+ background: #f6f6f6;
+ margin: 0.25em 0 0 0;
+ padding: 0.5em 1em;
+ display: block;
+}
+.issue-list li .update-wrap {
+ display: table;
+ width: 100%;
+}
+.issue-list li .update-wrap .update-text, .issue-list li .update-wrap .update-img {
+ display: table-cell;
+ vertical-align: top;
+}
+.issue-list li .update-wrap .update-text p, .issue-list li .update-wrap .update-img p {
+ margin-bottom: 0.5em;
+}
+.issue-list li .update-wrap .update-img {
+ text-align: right;
+}
+.issue-list li .update-wrap .update-img img {
+ margin: -0.5em -1em 0 0.5em;
+ height: auto;
+}
+
+.ie7 .issue-list li .update-wrap .update-text, .ie7 .issue-list li .update-wrap .update-text {
+ float: left;
+ width: 19em;
+}
+.ie7 .issue-list li .update-wrap .update-img, .ie7 .issue-list li .update-wrap .update-img {
+ float: right;
+}
+
+.issue-list-a, .list-a {
+ margin: 0 0 1em 0;
+ padding: 0;
+ border-bottom: 0.25em solid #ffd000;
+}
+.issue-list-a li, .list-a li {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+.issue-list-a li a, .list-a li a {
+ margin: 0.25em 0 0 0;
+ display: table;
+ background: #f6f6f6;
+ color: #222222;
+ width: 100%;
+}
+.issue-list-a li a:hover, .list-a li a:hover {
+ text-decoration: none;
+ color: #222222;
+ background: #e6e6e6;
+}
+.issue-list-a li a .text, .list-a li a .text, .issue-list-a li a .img, .list-a li a .img {
+ display: table-cell;
+ vertical-align: top;
+}
+.issue-list-a li a .img, .list-a li a .img {
+ text-align: right;
+}
+.issue-list-a li a .img img, .list-a li a .img img {
+ height: auto;
+}
+.issue-list-a li a .text, .list-a li a .text {
+ padding: 0.25em 1em;
+}
+.issue-list-a li a .text h4, .list-a li a .text h4 {
+ margin: 0;
+}
+.issue-list-a li a .text small, .list-a li a .text small, .issue-list-a li a .text .small-print, .list-a li a .text .small-print {
+ color: #666;
+}
+.issue-list-a li > p, .list-a li > p {
+ margin: 0.25em 0 0 0;
+ padding: 0.5em 1em;
+ background: #f6f6f6;
+}
+
+.list-a a {
+ padding: 0.5em 1em;
+ font-weight: bold;
+}
+
+.ie6 .issue-list-a, .ie6 .list-a, .ie7 .issue-list-a, .ie7 .list-a {
+ overflow: hidden;
+}
+.ie6 .issue-list-a li a, .ie6 .list-a li a, .ie7 .issue-list-a li a, .ie7 .list-a li a {
+ clear: both;
+ width: auto;
+ display: block;
+ overflow: hidden;
+}
+.ie6 .issue-list-a li a .text, .ie6 .list-a li a .text, .ie7 .issue-list-a li a .text, .ie7 .list-a li a .text {
+ float: left;
+ width: 18em;
+}
+.ie6 .issue-list-a li a .img, .ie6 .list-a li a .img, .ie7 .issue-list-a li a .img, .ie7 .list-a li a .img {
+ width: 6.25em;
+ float: right;
+}
+
+.ie6 .issue-list-a li a, .ie6 .list-a li a {
+ height: 5.5em;
+}
+.ie6 .issue-list-a li a .img img, .ie6 .list-a li a .img img {
+ height: 60px;
+}
+
+.update-img a {
+ display: -moz-inline-box;
+ -moz-box-orient: vertical;
+ display: inline-block;
+ vertical-align: middle;
+ *vertical-align: auto;
+ position: relative;
+}
+.update-img a {
+ *display: inline;
+}
+.update-img a span {
+ position: absolute;
+ top: 0;
+ right: 0;
+ display: block;
+ width: 20px;
+ height: 20px;
+ opacity: 0.5;
+ background: white url(images/sprite.png) -16px -1098px no-repeat;
+ font: 0/0 a;
+ color: transparent;
+}
+.update-img a:hover span {
+ opacity: 1;
+}
+
+.issue-list li .update-wrap .update-img a span {
+ right: -16px;
+ top: -8px;
+}
+
+.problem-header {
+ margin-bottom: 1em;
+}
+
+.problem-header .update-img {
+ float: right;
+ margin-left: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+#map_box {
+ background: #333;
+ height: 29em;
+ margin-bottom: 1em;
+ overflow: hidden;
+ position: relative;
+}
+#map_box #map {
+ width: 100%;
+ height: 100%;
+}
+
+#fms_pan_zoom {
+ right: 0.5em !important;
+ top: 0.5em !important;
+ left: 0.5em !important;
+}
+
+.ie6 #fms_pan_zoom {
+ left: auto !important;
+}
+
+#fms_pan_zoom_panup,
+#fms_pan_zoom_pandown,
+#fms_pan_zoom_panleft,
+#fms_pan_zoom_panright,
+#fms_pan_zoom_zoomin,
+#fms_pan_zoom_zoomout {
+ width: 36px !important;
+ height: 36px !important;
+ text-indent: -999999px;
+ opacity: 0.85;
+ background: url("../images/sprite.png") no-repeat;
+ filter: none !important;
+}
+#fms_pan_zoom_panup:hover,
+#fms_pan_zoom_pandown:hover,
+#fms_pan_zoom_panleft:hover,
+#fms_pan_zoom_panright:hover,
+#fms_pan_zoom_zoomin:hover,
+#fms_pan_zoom_zoomout:hover {
+ opacity: 1;
+}
+
+#fms_pan_zoom_zoomworld {
+ display: none !important;
+ visibility: none !important;
+}
+
+#fms_pan_zoom_panup {
+ background-position: -42px -222px;
+ right: 30px !important;
+ left: auto !important;
+ top: 0 !important;
+}
+
+#fms_pan_zoom_pandown {
+ background-position: -42px -282px;
+ right: 30px !important;
+ left: auto !important;
+ top: 72px !important;
+}
+
+#fms_pan_zoom_panleft {
+ background-position: -12px -252px;
+ width: 48px !important;
+ right: 48px !important;
+ left: auto !important;
+ top: 36px !important;
+}
+
+#fms_pan_zoom_panright {
+ background-position: -60px -252px;
+ width: 48px !important;
+ right: 0 !important;
+ left: auto !important;
+ top: 36px !important;
+}
+
+#fms_pan_zoom_zoomin {
+ background-position: -152px -223px;
+ height: 44px !important;
+ left: 0 !important;
+ top: 0 !important;
+}
+
+#fms_pan_zoom_zoomout {
+ background-position: -152px -259px;
+ height: 44px !important;
+ left: 0 !important;
+ top: 44px !important;
+}
+
+#sub_map_links {
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 1100;
+ background: #333;
+ background: rgba(0, 0, 0, 0.7);
+ margin: 0;
+}
+#sub_map_links a {
+ display: -moz-inline-box;
+ -moz-box-orient: vertical;
+ display: inline-block;
+ vertical-align: middle;
+ *vertical-align: auto;
+ font-size: 0.6875em;
+ color: #fff;
+ padding: 0.6em 3em 0.5em 1em;
+ background-repeat: no-repeat;
+}
+#sub_map_links a {
+ *display: inline;
+}
+#sub_map_links a#hide_pins_link {
+ background-image: url("../images/sprite.png");
+ background-position: right -3976px;
+}
+#sub_map_links a#all_pins_link {
+ background-image: url("../images/sprite.png");
+ background-position: right -4022px;
+}
+#sub_map_links a#map_permalink {
+ background-image: url("../images/sprite.png");
+ background-position: right -4070px;
+}
+#sub_map_links a.feed {
+ background-image: url("../images/sprite.png");
+ background-position: right -3936px;
+}
+#sub_map_links a:hover {
+ background-color: #000;
+ text-decoration: none;
+}
+
+.ie6 #sub_map_links a#hide_pins_link {
+ background-image: url("../images/ie_sub_map_links_sprite.gif");
+ background-position: right 1px;
+}
+.ie6 #sub_map_links a#all_pins_link {
+ background-image: url("../images/ie_sub_map_links_sprite.gif");
+ background-position: right -45px;
+}
+.ie6 #sub_map_links a#map_permalink {
+ background-image: url("../images/ie_sub_map_links_sprite.gif");
+ background-position: right -93px;
+}
+
+#mob_sub_map_links {
+ position: absolute;
+ z-index: 1100;
+ bottom: 0;
+ display: table;
+ margin: 0;
+ width: 100%;
+ background: rgba(0, 0, 0, 0.7);
+}
+#mob_sub_map_links a {
+ color: #fff;
+ width: 50%;
+ padding: 0.5em 0;
+ font-size: 1em;
+ display: table-cell;
+ text-align: center;
+}
+#mob_sub_map_links a:hover {
+ background: #000;
+ text-decoration: none;
+}
+#mob_sub_map_links.map_complete {
+ background: none;
+ display: block;
+ border-bottom: 4px solid #fff;
+}
+#mob_sub_map_links.map_complete a#try_again {
+ display: block;
+ margin: 0 auto 6em auto;
+ background: rgba(0, 0, 0, 0.8);
+ -moz-border-radius: 0.5em;
+ -webkit-border-radius: 0.5em;
+ -o-border-radius: 0.5em;
+ -ms-border-radius: 0.5em;
+ -khtml-border-radius: 0.5em;
+ border-radius: 0.5em;
+}
+#mob_sub_map_links.map_complete a#mob_ok {
+ position: absolute;
+ right: 1em;
+ bottom: 0;
+ height: 20px;
+ padding-top: 30px;
+ display: block;
+ width: 4em;
+ background: white url("../images/sprite.png") 12px -4140px no-repeat;
+ color: #000;
+}
+
+.mobile-map-banner {
+ margin: 0;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ font-size: 0.75em;
+ background: rgba(0, 0, 0, 0.7);
+ padding: 0.75em 30px;
+}
+.mobile-map-banner a {
+ cursor: pointer;
+ font-size: 0.875em;
+ font-family: Helmet, Freesans, sans-serif;
+ font-weight: bold;
+ text-transform: uppercase;
+ line-height: 1.375em;
+ padding: 0.7em 0.5em 0.5em 0.5em;
+ margin: 0;
+ width: auto;
+ height: auto;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -o-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -khtml-border-radius: 4px;
+ border-radius: 4px;
+ background: #333333;
+ background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #333333), color-stop(100%, #1a1a1a));
+ background: -webkit-linear-gradient(#333333, #1a1a1a);
+ background: -moz-linear-gradient(#333333, #1a1a1a);
+ background: -o-linear-gradient(#333333, #1a1a1a);
+ background: -ms-linear-gradient(#333333, #1a1a1a);
+ background: linear-gradient(#333333, #1a1a1a);
+ border: 1px solid #1a1a1a;
+ color: white;
+ font-weight: normal;
+ font-size: 0.875em;
+ line-height: 1;
+ padding: 0.5em 0.75em;
+ position: absolute;
+ left: 0.3em;
+ top: 0.3em;
+}
+.mobile-map-banner a:hover {
+ background: #333333;
+ background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #1a1a1a), color-stop(100%, #333333));
+ background: -webkit-linear-gradient(#1a1a1a, #333333);
+ background: -moz-linear-gradient(#1a1a1a, #333333);
+ background: -o-linear-gradient(#1a1a1a, #333333);
+ background: -ms-linear-gradient(#1a1a1a, #333333);
+ background: linear-gradient(#1a1a1a, #333333);
+ text-decoration: none;
+ border: 1px solid #1a1a1a;
+ color: white;
+}
+
+.olControlAttribution {
+ bottom: 3.25em !important;
+ right: 0.25em !important;
+ left: 0.25em !important;
+ color: #222222;
+ font-size: 0.75em !important;
+}
+
+.olControlAttribution img {
+ vertical-align: bottom;
+}
+
+.olControlPermalink {
+ bottom: 3px !important;
+ right: 3px;
+}
+
+/* Drag is only present in noscript form. XXX Copy from core. */
+#drag input, #drag img {
+ position: absolute;
+ border: none;
+ max-width: none;
+}
+#drag input {
+ cursor: crosshair;
+ background-color: #cccccc;
+}
+#drag img {
+ cursor: move;
+}
+#drag img.pin {
+ z-index: 100;
+ background-color: inherit;
+}
+#drag a img.pin {
+ cursor: pointer;
+ cursor: hand;
+}
+
+a.rap-notes-trigger,
+a:hover.rap-notes-trigger {
+ display: block;
+ width: 90%;
+ padding-left: 5%;
+ padding-right: 5%;
+}
+
+.rap-notes {
+ margin: 1em 0;
+}
+
+#problems-nav {
+ padding: 0 1em;
+ overflow: hidden;
+ border-bottom: 0.25em solid #333;
+}
+#problems-nav ul {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ display: table;
+ width: 100%;
+}
+#problems-nav ul li {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+#problems-nav ul li {
+ display: table-cell;
+ border-right: 0.25em solid #fff;
+}
+#problems-nav ul li:last-child {
+ border-right: none;
+}
+#problems-nav ul li a {
+ display: block;
+ background: #e2e2e2;
+ color: #333;
+ padding: 1em;
+ text-transform: uppercase;
+ text-align: center;
+}
+#problems-nav ul li a:hover {
+ text-decoration: none;
+ background: #e6e6e6;
+}
+#problems-nav ul li a.active {
+ background: #333;
+ color: #fff;
+}
+
+.ie6 #problems-nav, .ie7 #problems-nav {
+ clear: both;
+ margin: 0;
+ padding: 0;
+}
+.ie6 #problems-nav ul li, .ie7 #problems-nav ul li {
+ float: left;
+}
+
+table.nicetable {
+ width: 100%;
+ margin-bottom: 2em;
+}
+table.nicetable thead {
+ border-bottom: 0.25em solid #ccc;
+}
+table.nicetable thead th {
+ font-size: 0.75em;
+}
+table.nicetable tr.a {
+ background: #f6f6f6;
+}
+table.nicetable tr:nth-child(even) {
+ background: #f6f6f6;
+}
+table.nicetable tr.gone {
+ color: #666666;
+ background-color: #cccccc;
+}
+table.nicetable tr:hover {
+ background: #FFF5CC;
+ cursor: pointer;
+}
+table.nicetable tr td {
+ padding: 0.25em;
+}
+table.nicetable tr td a:hover {
+ text-decoration: none;
+}
+table.nicetable .title {
+ text-align: left;
+}
+table.nicetable .data {
+ width: 12%;
+}
+
+.promo {
+ background: #ffd000;
+ padding: 1em;
+ margin-bottom: 1em;
+ overflow: hidden;
+ position: relative;
+}
+.promo .close-promo {
+ position: absolute;
+ top: 0.5em;
+ right: 0.5em;
+ display: block;
+ width: 16px;
+ height: 16px;
+ text-indent: -999999px;
+ background: url(images/sprite.png) -341px -263px no-repeat;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -o-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -khtml-border-radius: 4px;
+ border-radius: 4px;
+}
+.promo .close-promo:hover {
+ background: #222222 url(images/sprite.png) -341px -223px no-repeat;
+}
+
+.alert {
+ background: #ff0000;
+ padding: 1em;
+ margin-bottom: 1em;
+ color: #fff;
+}
+.alert a, .alert a:hover {
+ color: #ffd000;
+}
+
+.pagination {
+ text-align: center;
+ padding: 0.5em 1em;
+ background: #eee;
+ position: relative;
+}
+.pagination .prev {
+ position: absolute;
+ left: 0.5em;
+}
+.pagination .next {
+ position: absolute;
+ right: 0.5em;
+}
+.pagination a {
+ display: -moz-inline-box;
+ -moz-box-orient: vertical;
+ display: inline-block;
+ vertical-align: middle;
+ *vertical-align: auto;
+ background: #ffd000;
+ padding-left: 0.5em;
+ padding-right: 0.5em;
+ color: #1a1a1a;
+}
+.pagination a {
+ *display: inline;
+}
+.pagination a:hover {
+ color: #1a1a1a;
+ text-decoration: none;
+ background: #e7bd00;
+}
+
+.desk-only {
+ display: none !important;
+}
+
+.js .hidden-js {
+ display: none;
+ visibility: hidden;
+}
+
+.no-js .hidden-nojs {
+ display: none !important;
+ visibility: hidden;
+}
+
+/* Front page */
+#front-main {
+ text-align: center;
+}
+#front-main h2 {
+ font-style: italic;
+ font-family: Helmet, Freesans, sans-serif;
+ font-size: 1.1875em;
+ color: #4d4d4d;
+}
+#front-main #postcodeForm {
+ padding: 1em;
+ color: #222222;
+ background: #ffd000;
+ font-family: Helmet, Freesans, sans-serif;
+}
+#front-main #postcodeForm label {
+ margin: 0;
+}
+#front-main #postcodeForm div {
+ display: table;
+ width: 100%;
+ background: #fff;
+ border: 1px solid #f3b11e;
+}
+#front-main #postcodeForm div input#pc {
+ display: table-cell;
+ margin: 0;
+ padding: 0.25em 2%;
+ width: 82%;
+ border: none;
+ background: none;
+ line-height: 1.5em;
+}
+#front-main #postcodeForm div input#submit {
+ display: table-cell;
+ border: none;
+ padding: 0;
+ margin: 0;
+ width: 14%;
+ height: 35px;
+ background: #000;
+ color: #fff;
+ text-transform: uppercase;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ -o-border-radius: 0;
+ -ms-border-radius: 0;
+ -khtml-border-radius: 0;
+ border-radius: 0;
+}
+#front-main #postcodeForm div input#submit:hover {
+ background: #333;
+}
+#front-main a#geolocate_link {
+ display: -moz-inline-box;
+ -moz-box-orient: vertical;
+ display: inline-block;
+ vertical-align: middle;
+ *vertical-align: auto;
+ vertical-align: top;
+ background: #1a1a1a;
+ color: #C8C8C8;
+ padding: 0.5em;
+ font-family: Helmet, Freesans, sans-serif;
+ font-size: 0.8125em;
+ -moz-border-radius: 0 0 0.25em 0.25em;
+ -webkit-border-radius: 0 0 0.25em 0.25em;
+ -o-border-radius: 0 0 0.25em 0.25em;
+ -ms-border-radius: 0 0 0.25em 0.25em;
+ -khtml-border-radius: 0 0 0.25em 0.25em;
+ border-radius: 0 0 0.25em 0.25em;
+}
+#front-main a#geolocate_link {
+ *display: inline;
+}
+#front-main a#geolocate_link:hover {
+ text-decoration: none;
+ background: #2a2a2a;
+}
+
+#front-howto #front_stats {
+ display: table;
+ width: 100%;
+ color: #222222;
+ background: #ffd000;
+ font-family: Helmet, Freesans, sans-serif;
+}
+#front-howto #front_stats div {
+ display: table-cell;
+ text-align: center;
+ padding: 1em;
+ line-height: 1.25em;
+ font-size: 0.8125em;
+ font-weight: bold;
+}
+#front-howto #front_stats div big {
+ display: block;
+ margin-bottom: 0.5em;
+ font-size: 1.5385em;
+}
+
+#front-recently .issue-list-a, #front-recently .list-a {
+ border-bottom: none;
+ margin-bottom: 0;
+}
+
+#alerts ul {
+ margin-bottom: 1em;
+}
+#alerts li {
+ padding: 0em;
+ margin-bottom: 0.5em;
+}
+#alerts .a {
+ background: #f6f6f6;
+}
+#alerts img[width="16"] {
+ float: right;
+}
diff --git a/phonegap/www/css/layout.css b/phonegap/www/css/layout.css
new file mode 100644
index 000000000..568c81389
--- /dev/null
+++ b/phonegap/www/css/layout.css
@@ -0,0 +1,1012 @@
+/* COLOURS */
+.desk-only {
+ display: block !important;
+}
+
+.mob-only {
+ display: none !important;
+}
+
+body {
+ background: #1a1a1a url../images/tile.jpg) 0 0 repeat;
+}
+
+body.white {
+ background: #FFFFFF;
+}
+
+.container {
+ margin: 0 auto;
+ padding: 0em;
+ width: 60em;
+ position: relative;
+ z-index: 1;
+}
+
+.ie6 .container, .ie7 .container {
+ z-index: 100;
+}
+
+.wrapper {
+ display: table;
+ caption-side: top;
+ width: 100%;
+}
+.wrapper .table-cell {
+ display: table-cell;
+}
+
+.ie6 .wrapper, .ie7 .wrapper {
+ padding-top: 4em;
+}
+
+.nav-wrapper {
+ display: table-caption;
+}
+.nav-wrapper .nav-wrapper-2 {
+ width: 100%;
+ min-height: 4em;
+ position: absolute;
+ border-top: 0.25em solid #ffd000;
+ z-index: 2;
+}
+
+.white .nav-wrapper .nav-wrapper-2 {
+ background: #1a1a1a url../images/tile.jpg) 0 0 repeat;
+}
+
+.ie6 .nav-wrapper, .ie7 .nav-wrapper {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+}
+.ie6 .nav-wrapper .nav-wrapper-2, .ie7 .nav-wrapper .nav-wrapper-2 {
+ position: static;
+}
+
+#site-header {
+ height: auto;
+ background: none;
+ border-top: 0px;
+}
+#site-header .container {
+ position: static;
+}
+
+#site-logo {
+ top: 0.9em;
+ position: absolute;
+ z-index: 3;
+}
+
+.ie6 #site-header, .ie7 #site-header {
+ height: 3em;
+}
+.ie6 #site-header .container, .ie7 #site-header .container {
+ position: relative;
+}
+.ie6 #site-logo, .ie7 #site-logo {
+ position: absolute;
+ top: -3.25em;
+}
+
+#nav-link {
+ left: -999999px;
+}
+
+#main-nav {
+ margin: 0 auto;
+ padding: 0em;
+ width: 60em;
+}
+#main-nav ul {
+ list-style: none;
+ padding: 0px;
+ margin: 0px;
+ float: right;
+}
+#main-nav ul li {
+ list-style: none;
+ display: inline;
+ margin: 0px;
+ padding: 0px;
+ float: left;
+}
+#main-nav ul li a,
+#main-nav ul li span {
+ display: block;
+ color: #fff;
+ background: none;
+ border-bottom: none;
+}
+#main-nav ul#main-menu li a, #main-nav ul#main-menu li span {
+ padding: 0.75em;
+ font-size: 0.9em;
+}
+#main-nav ul#main-menu li a:hover {
+ background: #444;
+ background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #000000), color-stop(10%, #444444), color-stop(95%, #444444), color-stop(100%, #111111));
+ background: -webkit-linear-gradient(#000000, #444444 10%, #444444 95%, #111111);
+ background: -moz-linear-gradient(#000000, #444444 10%, #444444 95%, #111111);
+ background: -o-linear-gradient(#000000, #444444 10%, #444444 95%, #111111);
+ background: -ms-linear-gradient(#000000, #444444 10%, #444444 95%, #111111);
+ background: linear-gradient(#000000, #444444 10%, #444444 95%, #111111);
+}
+#main-nav ul#main-menu li a.report-a-problem-btn {
+ background: #ffd000;
+ padding: 0.25em;
+ margin: 0.5em;
+ color: #333;
+ -moz-border-radius: 0.25em;
+ -webkit-border-radius: 0.25em;
+ -o-border-radius: 0.25em;
+ -ms-border-radius: 0.25em;
+ -khtml-border-radius: 0.25em;
+ border-radius: 0.25em;
+}
+#main-nav ul#main-menu li a.report-a-problem-btn:hover {
+ background: #ffe700;
+}
+#main-nav ul#main-menu li span {
+ color: #ffd000;
+}
+#main-nav ul#mysoc-menu {
+ padding: 0em 0.5em;
+ margin-left: 0.25em;
+ background: #ffd000;
+ -moz-border-radius: 0 0 0.375em 0.375em;
+ -webkit-border-radius: 0 0 0.375em 0.375em;
+ -o-border-radius: 0 0 0.375em 0.375em;
+ -ms-border-radius: 0 0 0.375em 0.375em;
+ -khtml-border-radius: 0 0 0.375em 0.375em;
+ border-radius: 0 0 0.375em 0.375em;
+ -moz-box-shadow: 0em 0.3em 0.1em 0em black;
+ -webkit-box-shadow: 0em 0.3em 0.1em 0em black;
+ -o-box-shadow: 0em 0.3em 0.1em 0em black;
+ box-shadow: 0em 0.3em 0.1em 0em black;
+}
+#main-nav ul#mysoc-menu li a {
+ color: #000;
+ text-transform: uppercase;
+ font-size: 0.6875em;
+ padding: 1.3em 0.7em 1em 0.7em;
+}
+#main-nav ul#mysoc-menu li a#mysoc-logo {
+ width: 84px;
+ height: 16px;
+ background-position: -260px -43px;
+ opacity: 0.8;
+}
+#main-nav ul#mysoc-menu li a#mysoc-logo:hover {
+ opacity: 1;
+}
+#main-nav ul#mysoc-menu li a:hover {
+ color: #fff;
+}
+
+.content {
+ width: 27em;
+ margin-top: 3em;
+ background: #fff;
+ padding: 1em;
+ padding-bottom: 3em;
+ margin-left: 0.5em;
+ margin-bottom: -1em;
+ -moz-box-shadow: 0px 0px 6px 1px black;
+ -webkit-box-shadow: 0px 0px 6px 1px black;
+ -o-box-shadow: 0px 0px 6px 1px black;
+ box-shadow: 0px 0px 6px 1px black;
+}
+
+body.white .content {
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ -o-box-shadow: none;
+ box-shadow: none;
+}
+
+.ie6 .content, .ie7 .content, .ie8 .content {
+ border: 1px solid black;
+ margin: 0;
+}
+
+.ie8 .content {
+ margin-top: 3em;
+}
+
+body.white.mappage .content {
+ -moz-box-shadow: 0px 0px 6px 1px black;
+ -webkit-box-shadow: 0px 0px 6px 1px black;
+ -o-box-shadow: 0px 0px 6px 1px black;
+ box-shadow: 0px 0px 6px 1px black;
+}
+
+body.mappage .content {
+ float: left;
+}
+body.mappage #main-nav ul#main-menu li a,
+body.mappage #main-nav ul#main-menu li span {
+ padding: 1.4em 0.75em 1.35em 0.75em;
+}
+body.mappage #main-nav ul#main-menu li a.report-a-problem-btn {
+ padding: 0.5em;
+ margin: 0.9em 0.25em 0.85em 0.25em;
+}
+body.mappage .nav-wrapper .nav-wrapper-2 {
+ position: fixed;
+ background: #222;
+ background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #000000), color-stop(10%, #222222), color-stop(90%, #222222), color-stop(100%, #000000));
+ background: -webkit-linear-gradient(#000000, #222222 10%, #222222 90%, #000000);
+ background: -moz-linear-gradient(#000000, #222222 10%, #222222 90%, #000000);
+ background: -o-linear-gradient(#000000, #222222 10%, #222222 90%, #000000);
+ background: -ms-linear-gradient(#000000, #222222 10%, #222222 90%, #000000);
+ background: linear-gradient(#000000, #222222 10%, #222222 90%, #000000);
+}
+body.mappage #site-logo {
+ position: fixed;
+}
+
+.ie6 body.mappage .container, .ie7 body.mappage .container {
+ float: left;
+ width: 27em;
+ margin-left: 1.4em;
+}
+.ie6 body.mappage .nav-wrapper, .ie7 body.mappage .nav-wrapper {
+ z-index: 1;
+}
+.ie6 body.mappage .nav-wrapper .nav-wrapper-2, .ie7 body.mappage .nav-wrapper .nav-wrapper-2 {
+ position: static;
+}
+.ie6 body.mappage #site-logo, .ie7 body.mappage #site-logo {
+ position: absolute;
+ top: -3.25em;
+}
+
+.ie6 body.mappage .container {
+ margin-left: 0.7em;
+}
+
+.ie8 body.mappage .nav-wrapper {
+ position: relative;
+ z-index: 0;
+}
+.ie8 body.mappage .nav-wrapper .nav-wrapper-2 {
+ position: static;
+}
+.ie8 body.mappage #site-logo {
+ position: absolute;
+ top: -3.25em;
+}
+.ie8 body.mappage #user-meta p {
+ top: 1em;
+}
+.ie8 body.mappage .content {
+ margin-top: 3em;
+}
+
+body.fullwidthpage .content, body.twothirdswidthpage .content {
+ width: 57em;
+}
+body.fullwidthpage .intro, body.twothirdswidthpage .intro {
+ width: 40em;
+}
+
+body.twothirdswidthpage .content {
+ width: 40em;
+ position: relative;
+}
+body.twothirdswidthpage .content aside {
+ background: #eee;
+ position: absolute;
+ left: 42em;
+ top: 0;
+ z-index: -1;
+ width: 13em;
+ padding: 1em;
+ -moz-box-shadow: 0px 0px 6px 1px black;
+ -webkit-box-shadow: 0px 0px 6px 1px black;
+ -o-box-shadow: 0px 0px 6px 1px black;
+ box-shadow: 0px 0px 6px 1px black;
+}
+body.twothirdswidthpage .content aside h2 {
+ margin-top: 0;
+}
+body.twothirdswidthpage .content aside img {
+ margin-bottom: 0.25em;
+}
+body.twothirdswidthpage .content .sticky-sidebar {
+ position: absolute;
+ left: 42em;
+ z-index: -1;
+}
+body.twothirdswidthpage .content .sticky-sidebar aside {
+ position: fixed;
+ top: 7em;
+ left: auto;
+}
+
+.ie6 body.twothirdswidthpage .content .sticky-sidebar {
+ position: static;
+}
+.ie6 body.twothirdswidthpage .content .sticky-sidebar aside {
+ position: absolute;
+ left: 42em;
+ top: 0;
+}
+
+.tablewrapper {
+ display: table;
+ width: 100%;
+ padding: 1em 0;
+}
+.tablewrapper > div {
+ display: table-cell;
+ width: 50%;
+}
+.tablewrapper .full-width {
+ width: auto;
+ margin: 0;
+}
+
+.ie6 .tablewrapper, .ie7 .tablewrapper {
+ display: block;
+}
+.ie6 .tablewrapper div, .ie7 .tablewrapper div {
+ width: 48%;
+ display: block;
+ float: left;
+ border: none !important;
+}
+
+.bordered {
+ margin: 0 -1em;
+ padding: 0 1em;
+ width: auto;
+ border-top: 0.25em solid #ffd000;
+}
+
+#footer-mobileapps {
+ border-right: 1em solid #fff;
+ background: none;
+ padding: 0;
+ -moz-box-shadow: inset rgba(0, 0, 0, 0) 0 0 0;
+ -webkit-box-shadow: inset rgba(0, 0, 0, 0) 0 0 0;
+ -o-box-shadow: inset rgba(0, 0, 0, 0) 0 0 0;
+ box-shadow: inset rgba(0, 0, 0, 0) 0 0 0;
+}
+#footer-mobileapps h2 {
+ color: #222;
+ margin-top: 0;
+}
+#footer-mobileapps ul {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+}
+#footer-mobileapps ul li {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ border: 0;
+ float: left;
+}
+#footer-mobileapps ul li a {
+ float: left;
+ display: block;
+}
+#footer-mobileapps ul li {
+ border-bottom: none;
+ float: left;
+ margin: 0 1em 1em 0;
+}
+#footer-mobileapps ul li a {
+ color: #222;
+ padding: 0;
+ width: 96px;
+ height: 32px;
+ margin: 0 auto;
+ text-indent: -999999px;
+ background: url(../images/sprite.png) -12px -3610px no-repeat;
+ opacity: 0.8;
+}
+#footer-mobileapps ul li a:hover {
+ opacity: 1;
+}
+#footer-mobileapps ul li a.m-app-iphone {
+ background-position: -12px -3610px;
+}
+#footer-mobileapps ul li a.m-app-iphone-streetreport {
+ background-position: -12px -3678px;
+ height: 50px;
+}
+#footer-mobileapps ul li a.m-app-droid {
+ background-position: -12px -3756px;
+}
+#footer-mobileapps ul li a.m-app-nokia {
+ background-position: -12px -3820px;
+ width: 74px;
+}
+
+.ie6 #footer-mobileapps, .ie7 #footer-mobileapps {
+ margin: 0 0.5em;
+ margin-right: 2%;
+}
+
+.ie6 #footer-mobileapps ul li a {
+ background: url(../images/ie_mobileapps.gif) -1px -1px no-repeat;
+}
+.ie6 #footer-mobileapps ul li a.m-app-iphone-streetreport {
+ background-position: -1px -69px;
+ height: 50px;
+}
+.ie6 #footer-mobileapps ul li a.m-app-droid {
+ background-position: -1px -148px;
+}
+.ie6 #footer-mobileapps ul li a.m-app-nokia {
+ background-position: -1px -212px;
+ width: 74px;
+}
+
+#footer-ads {
+ border-left: 1em solid #fff;
+}
+#footer-ads ul {
+ display: table;
+}
+#footer-ads ul li {
+ display: table-cell;
+ border-bottom: none;
+}
+#footer-ads ul li:last-child {
+ border-left: 1.25em solid #fff;
+}
+
+.ie6 #footer-ads, .ie7 #footer-ads {
+ margin-left: 2%;
+}
+.ie6 #footer-ads ul, .ie7 #footer-ads ul {
+ width: 100%;
+}
+.ie6 #footer-ads ul li, .ie7 #footer-ads ul li {
+ float: left;
+ width: 45%;
+}
+
+#map_box {
+ position: absolute;
+ height: 29em;
+ width: 29em;
+ right: 1em;
+ top: 3em;
+ z-index: 1;
+}
+
+#fms_pan_zoom {
+ top: 4.75em !important;
+}
+
+#fms_pan_zoom_zoomin {
+ left: auto !important;
+ right: 30px;
+ top: 130px !important;
+}
+
+#fms_pan_zoom_zoomout {
+ left: auto !important;
+ right: 30px;
+ top: 174px !important;
+}
+
+.olControlAttribution {
+ bottom: 0.5em !important;
+ left: auto !important;
+}
+
+#sub_map_links {
+ left: auto;
+ bottom: auto;
+ bottom: 2em;
+}
+#sub_map_links #map_links_toggle {
+ display: block;
+ cursor: pointer;
+ position: absolute;
+ left: -1em;
+ width: 1em;
+ height: 100%;
+ background: black url(../images/sprite.png) right -4119px no-repeat;
+ -moz-border-radius: 0.25em 0 0 0.25em;
+ -webkit-border-radius: 0.25em 0 0 0.25em;
+ -o-border-radius: 0.25em 0 0 0.25em;
+ -ms-border-radius: 0.25em 0 0 0.25em;
+ -khtml-border-radius: 0.25em 0 0 0.25em;
+ border-radius: 0.25em 0 0 0.25em;
+}
+#sub_map_links #map_links_toggle:hover {
+ left: -1.5em;
+ border-right: 0.5em solid #000;
+}
+#sub_map_links #map_links_toggle.closed {
+ background-position: right -4159px;
+}
+
+.ie6 #sub_map_links #map_links_toggle {
+ height: 1.75em;
+ background: black url(../images/ie_sub_map_links_sprite.gif") center -143px no-repeat;
+}
+.ie6 #sub_map_links #map_links_toggle.closed {
+ background-position: center -183px;
+}
+
+#user-meta {
+ display: block;
+ position: relative;
+ max-width: 57em;
+ margin: 0 auto;
+}
+#user-meta p {
+ display: -moz-inline-box;
+ -moz-box-orient: vertical;
+ display: inline-block;
+ vertical-align: middle;
+ *vertical-align: auto;
+ position: absolute;
+ top: 1em;
+ height: 2em;
+ padding: 0.25em 6em 0.5em 0.5em;
+ -moz-box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 4px 1px;
+ -webkit-box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 4px 1px;
+ -o-box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 4px 1px;
+ box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 4px 1px;
+}
+#user-meta p {
+ *display: inline;
+}
+#user-meta p a {
+ top: 0.5em;
+ right: 0.5em;
+ font-size: 0.6875em;
+ padding: 0.5em 0.75em;
+ line-height: 1em;
+}
+#user-meta p a:hover {
+ text-decoration: none;
+ background: #444;
+}
+
+.ie6 #user-meta, .ie7 #user-meta {
+ z-index: 1;
+}
+
+.ie8 #user-meta p {
+ top: 5em;
+}
+
+.shadow-wrap {
+ position: fixed;
+ bottom: 0;
+ width: 29em;
+ overflow: hidden;
+ padding-top: 3em;
+}
+.shadow-wrap ul#key-tools {
+ border-top: 0.25em solid #ffd000;
+ margin: 0;
+ -moz-box-shadow: 0em 0px 1em 1em white;
+ -webkit-box-shadow: 0em 0px 1em 1em white;
+ -o-box-shadow: 0em 0px 1em 1em white;
+ box-shadow: 0em 0px 1em 1em white;
+}
+.shadow-wrap ul#key-tools li {
+ border: none;
+}
+.shadow-wrap ul#key-tools li a {
+ font-size: 0.75em;
+ color: #888888;
+ padding: 0.5em 1.5em 0.5em 0;
+ text-transform: none;
+}
+.shadow-wrap ul#key-tools li a.abuse {
+ background-image: url../images/sprite.png);
+ background-position: right -2935px;
+}
+.shadow-wrap ul#key-tools li a.feed {
+ background-image: url../images/sprite.png);
+ background-position: right -3074px;
+}
+.shadow-wrap ul#key-tools li a.chevron {
+ background-image: url../images/sprite.png);
+ background-position: right -3225px;
+}
+.shadow-wrap ul#key-tools li a.hover {
+ background-image: url../images/sprite.png);
+ background-position: right -1876px;
+}
+.shadow-wrap ul#key-tools.singleton li {
+ text-align: right;
+}
+.shadow-wrap ul#key-tools.singleton li a {
+ padding-right: 3em;
+}
+.shadow-wrap.active {
+ padding: 3em 0;
+ position: static;
+}
+
+.ie6 .shadow-wrap {
+ padding-top: 0;
+}
+
+.big-green-banner {
+ top: auto;
+ right: -1.25em;
+ margin-left: -2em;
+ font-size: 1.375em;
+ padding: 1em 3em 1em 1em;
+ background: #00bd08 url../images/sprite.png) right -2188px no-repeat;
+}
+.big-green-banner:before {
+ right: 0;
+ left: auto;
+ top: -0.5em;
+ position: absolute;
+ border-top: 0.5em solid transparent;
+ border-left: 0.5em solid #4B8304;
+ border-bottom: none;
+}
+
+.ie6 .big-green-banner {
+ background: #00bd08 url../images/ie_green_chevron.gif) right center no-repeat;
+}
+
+.banner p {
+ top: -2.25em;
+ padding: 1em;
+}
+.banner p:before {
+ left: -0.75em;
+ border-left: 0.75em solid transparent;
+ border-bottom: 0.75em solid #888;
+}
+.banner p#fixed {
+ padding-top: 5em;
+ background-image: url../images/sprite.png);
+ background-position: -324px -326px;
+ background-repeat: no-repeat;
+}
+.banner p#fixed:before {
+ border-bottom: 0.75em solid #4B8304;
+}
+
+.ie6 .banner p {
+ top: -1.5em;
+}
+.ie6 .banner p#fixed {
+ background-image: url../images/ie_fixed.gif);
+ background-position: center 0.75em;
+}
+
+.full-width {
+ margin: 0 0 0em -1em;
+ width: 29em;
+}
+
+/*FORMS*/
+input[type=text],
+input[type=password],
+input[type=email],
+textarea {
+ width: 25em;
+}
+
+.form-box {
+ max-width: 25em;
+}
+
+/* form errors */
+div.form-error,
+p.form-error {
+ display: block;
+ width: 24.7em;
+}
+
+input.form-error,
+textarea.form-error {
+ -moz-border-radius: 0 0 0.25em 0.25em;
+ -webkit-border-radius: 0 0 0.25em 0.25em;
+ -o-border-radius: 0 0 0.25em 0.25em;
+ -ms-border-radius: 0 0 0.25em 0.25em;
+ -khtml-border-radius: 0 0 0.25em 0.25em;
+ border-radius: 0 0 0.25em 0.25em;
+}
+
+#report-a-problem-sidebar {
+ position: absolute;
+ z-index: -1;
+ left: 29.5em;
+ top: 5em;
+ width: 15em;
+ -moz-box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 4px 1px;
+ -webkit-box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 4px 1px;
+ -o-box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 4px 1px;
+ box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 4px 1px;
+}
+#report-a-problem-sidebar .sidebar-tips {
+ background: #eeeeee;
+ padding: 1em;
+ font-size: 0.75em;
+}
+#report-a-problem-sidebar .sidebar-notes {
+ background: #333333;
+ padding: 1em;
+ color: #ffffff;
+ font-size: 0.75em;
+}
+
+.ie6 #report-a-problem-sidebar, .ie7 #report-a-problem-sidebar {
+ left: 29em;
+}
+
+.no-js #report-a-problem-sidebar {
+ position: static;
+ width: auto;
+ -moz-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
+ -webkit-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
+ -o-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
+ box-shadow: 0 0 0 rgba(0, 0, 0, 0);
+}
+.no-js #report-a-problem-sidebar .sidebar-tips,
+.no-js #report-a-problem-sidebar .sidebar-notes {
+ font-size: 1em;
+}
+
+.general-sidebar-notes {
+ position: absolute;
+ left: 29.5em;
+ width: 15em;
+ z-index: -1;
+ -moz-box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 4px 1px;
+ -webkit-box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 4px 1px;
+ -o-box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 4px 1px;
+ box-shadow: rgba(0, 0, 0, 0.6) 0px 0px 4px 1px;
+}
+.general-sidebar-notes p {
+ background: #eeeeee;
+ font-size: 0.75em;
+ padding: 0.75em;
+ margin: 0;
+}
+.general-sidebar-notes p.dark {
+ background: #333333;
+ color: #ffffff;
+}
+
+.problem-header {
+ min-height: 19em;
+}
+
+body.frontpage .table-cell > .container {
+ width: 100%;
+}
+body.frontpage .table-cell .content {
+ padding-top: 14em;
+ margin: 0 auto;
+}
+body.frontpage .nav-wrapper-2 {
+ height: 6em;
+}
+body.frontpage #site-header {
+ height: 9em;
+}
+body.frontpage #site-logo {
+ top: 3em;
+ width: 300px;
+ height: 60px;
+ background-position: -2px -108px;
+}
+body.frontpage #user-meta p {
+ top: -2em;
+ right: 0;
+}
+
+body.frontpage.white #site-header {
+ background: #1a1a1a url../images/tile.jpg) 0 0 repeat;
+}
+
+.ie6 body.frontpage #site-header, .ie7 body.frontpage #site-header, .ie8 body.frontpage #site-header {
+ height: 4em;
+}
+.ie6 body.frontpage #site-logo, .ie7 body.frontpage #site-logo, .ie8 body.frontpage #site-logo {
+ position: relative;
+ width: 60em;
+ margin: 0 auto;
+}
+.ie6 body.frontpage .wrapper .content, .ie7 body.frontpage .wrapper .content, .ie8 body.frontpage .wrapper .content {
+ padding-top: 12em;
+ margin-top: 1em;
+}
+.ie6 body.frontpage #user-meta p, .ie7 body.frontpage #user-meta p, .ie8 body.frontpage #user-meta p {
+ top: -1em;
+}
+
+.ie6 body.frontpage #site-logo, .ie7 body.frontpage #site-logo {
+ top: -1em;
+}
+
+.ie6 body.frontpage #site-logo {
+ background: url../images/ie_front_logo.gif) 0 0 no-repeat;
+}
+
+.ie8 body.frontpage .wrapper .content {
+ margin-top: 5em;
+}
+.ie8 body.frontpage #user-meta p {
+ top: 3em;
+}
+
+#front-main {
+ background: #ffd000;
+ position: absolute;
+ width: 100%;
+ left: 0;
+ top: 1em;
+}
+#front-main #front-main-container {
+ max-width: 57em;
+ margin: 0 auto;
+}
+#front-main h2 {
+ font-style: normal;
+ margin: 0;
+ color: #222;
+}
+#front-main #postcodeForm {
+ overflow: hidden;
+ margin-right: 0.5em;
+}
+#front-main #postcodeForm label {
+ margin: 0.5em 0;
+}
+#front-main #postcodeForm div {
+ display: block;
+ margin: 0 auto;
+ width: 20em;
+ overflow: hidden;
+}
+#front-main #postcodeForm div input#pc {
+ display: block;
+ float: left;
+ padding: 0.25em 0.5em;
+ height: 1.5em;
+ width: 16em;
+}
+#front-main #postcodeForm div input#submit {
+ display: block;
+ float: right;
+ width: 3em;
+ height: 2.3em;
+ padding-top: 0.2em;
+}
+#front-main a#geolocate_link {
+ background: none;
+ color: #222;
+ margin: -1em 0 0.5em 0;
+}
+#front-main a#geolocate_link:hover {
+ text-decoration: underline;
+ background: none;
+}
+
+.ie6 #front-main, .ie7 #front-main {
+ top: 2em;
+ padding-top: 1em;
+}
+
+#front-howto {
+ border-right: 1em solid #fff;
+}
+#front-howto #front_stats {
+ background: none;
+ border-top: 0.25em solid #ffd000;
+ padding-top: 1em;
+}
+#front-howto #front_stats div big {
+ color: #ffd000;
+ font-size: 3.2308em;
+}
+
+.ie6 #front_stats div, .ie7 #front_stats div {
+ width: 8em;
+ float: left;
+}
+
+#front-recently {
+ border-left: 1em solid #fff;
+}
+
+.ie6 .tablewrapper #front-howto, .ie7 .tablewrapper #front-howto {
+ margin-right: 2%;
+}
+.ie6 .tablewrapper #front-recently, .ie7 .tablewrapper #front-recently {
+ margin-left: 2%;
+}
+
+/* MEDIA QUERIES */
+@media only screen and (min-width: 48em) and (max-width: 61em) {
+ .container {
+ width: 100%;
+ }
+
+ /*FORMS*/
+ input[type=text],
+ input[type=password],
+ input[type=email],
+ textarea {
+ width: 95%;
+ }
+
+ #main-nav {
+ width: auto;
+ float: right;
+ padding-left: 180px;
+ }
+
+ #main-menu {
+ margin-top: 3em;
+ }
+
+ #site-header {
+ height: 6em;
+ }
+
+ #fms_pan_zoom {
+ top: 7em !important;
+ }
+
+ #user-meta p {
+ left: 1em;
+ }
+
+ body.frontpage #user-meta p {
+ left: auto;
+ }
+
+ #map_box {
+ left: 32em;
+ width: auto;
+ }
+
+ #report-a-problem-sidebar {
+ position: static;
+ width: auto;
+ -moz-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
+ -webkit-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
+ -o-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
+ box-shadow: 0 0 0 rgba(0, 0, 0, 0);
+ }
+ #report-a-problem-sidebar .sidebar-tips,
+ #report-a-problem-sidebar .sidebar-notes {
+ font-size: 1em;
+ }
+
+ .full-width {
+ width: auto;
+ margin: 0em -1em 0 -1em;
+ }
+
+ body.fullwidthpage .content, body.twothirdswidthpage .content {
+ width: auto;
+ }
+
+ body.twothirdswidthpage .content {
+ width: 30em;
+ }
+ body.twothirdswidthpage .content .sticky-sidebar {
+ left: 32em;
+ top: 30em;
+ }
+ body.twothirdswidthpage .content .sticky-sidebar aside {
+ top: 9em;
+ }
+}
diff --git a/phonegap/www/css/mobile.css b/phonegap/www/css/mobile.css
new file mode 100644
index 000000000..f17f753fd
--- /dev/null
+++ b/phonegap/www/css/mobile.css
@@ -0,0 +1,179 @@
+/* stop scrolling on iphone */
+#container {
+ width: 100%;
+ height: 100%;
+}
+
+#container .container {
+ padding-bottom: 0;
+}
+
+.mobile-nav-banner {
+ position: fixed;
+ background: black;
+}
+
+.mobile-sign-in-banner {
+ display: none;
+ background: none;
+}
+
+.mobile-sign-in-banner a {
+ position: absolute;
+ left: auto;
+ right: 0.3em;
+ top: 0.8em;
+}
+
+.mobile-info {
+ position: fixed;
+ bottom: 0px;
+ width: 100%;
+ height: 20px;
+ text-align: right;
+ z-index: 1;
+}
+
+.mobile-info a {
+ cursor: pointer;
+ font-size: 0.875em;
+ font-family: Helmet, Freesans, sans-serif;
+ font-weight: bold;
+ line-height: 1.375em;
+ padding: 0.7em 0.5em 0.5em 0.5em;
+ margin: 0;
+ width: auto;
+ height: auto;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -o-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -khtml-border-radius: 4px;
+ border-radius: 4px;
+ background: #333333;
+ background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #333333), color-stop(100%, #1a1a1a));
+ background: -webkit-linear-gradient(#333333, #1a1a1a);
+ background: -moz-linear-gradient(#333333, #1a1a1a);
+ background: -o-linear-gradient(#333333, #1a1a1a);
+ background: -ms-linear-gradient(#333333, #1a1a1a);
+ background: linear-gradient(#333333, #1a1a1a);
+ border: 1px solid #1a1a1a;
+ color: white;
+ font-weight: normal;
+ font-size: 0.875em;
+ line-height: 1;
+ padding: 0.5em 0.75em;
+ position: absolute;
+ right: 0.3em;
+ bottom: 0.3em;
+}
+
+.mobile-header {
+ margin-top: 35px;
+}
+
+.mobile-header #site-logo {
+ margin-top: 35px;
+}
+
+#front-main #postcodeForm {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+}
+
+#front-main #postcodeForm label {
+ font-size: 0.9em
+}
+
+#front-main a#geolocate_link {
+ font-size: 1.2em;
+ -moz-border-radius: 0.25em;
+ -webkit-border-radius: 0.25em;
+ -o-border-radius: 0.25em;
+ -ms-border-radius: 0.25em;
+ -khtml-border-radius: 0.25em;
+ border-radius: 0.25em;
+ margin-top: 0.5em;
+}
+
+#front-howto h2 {
+ margin-top: 0.8em;
+}
+
+ol.big-numbers > li {
+ margin-bottom: 0.8em;
+}
+
+#multiple {
+ margin: auto;
+ margin-bottom: 1em;
+}
+
+#multiple li {
+ list-style: none;
+ margin: auto;
+}
+
+#nav-link {
+ display: none;
+}
+
+#form_sign_in {
+ margin-top: 1em;
+}
+
+#sign_out,
+#sign_in {
+ display: none;
+}
+
+input.green-btn,
+input.green-btn:hover {
+ border-radius: 2px;
+ background: #9fde23;
+ border-top: #CAEF80;
+ border-left: #BCEF58;
+ border-right: #BCEF58;
+}
+
+#loadingSpinner {
+ display: none;
+}
+
+div.spinner {
+ position: absolute;
+ width: 54px;
+ height: 54px;
+ display: inline-block;
+}
+
+div.spinner div {
+ width: 12%;
+ height: 26%;
+ background: #000;
+ position: absolute;
+ left: 44.5%;
+ top: 37%;
+ opacity: 0;
+ -webkit-animation: fade 1s linear infinite;
+ -webkit-border-radius: 50px;
+ -webkit-box-shadow: 0 0 3px rgba(0,0,0,0.2);
+}
+
+div.spinner div.bar1 {-webkit-transform:rotate(0deg) translate(0, -142%); -webkit-animation-delay: 0s;}
+div.spinner div.bar2 {-webkit-transform:rotate(30deg) translate(0, -142%); -webkit-animation-delay: -0.9167s;}
+div.spinner div.bar3 {-webkit-transform:rotate(60deg) translate(0, -142%); -webkit-animation-delay: -0.833s;}
+div.spinner div.bar4 {-webkit-transform:rotate(90deg) translate(0, -142%); -webkit-animation-delay: -0.75s;}
+div.spinner div.bar5 {-webkit-transform:rotate(120deg) translate(0, -142%); -webkit-animation-delay: -0.667s;}
+div.spinner div.bar6 {-webkit-transform:rotate(150deg) translate(0, -142%); -webkit-animation-delay: -0.5833s;}
+div.spinner div.bar7 {-webkit-transform:rotate(180deg) translate(0, -142%); -webkit-animation-delay: -0.5s;}
+div.spinner div.bar8 {-webkit-transform:rotate(210deg) translate(0, -142%); -webkit-animation-delay: -0.41667s;}
+div.spinner div.bar9 {-webkit-transform:rotate(240deg) translate(0, -142%); -webkit-animation-delay: -0.333s;}
+div.spinner div.bar10 {-webkit-transform:rotate(270deg) translate(0, -142%); -webkit-animation-delay: -0.25s;}
+div.spinner div.bar11 {-webkit-transform:rotate(300deg) translate(0, -142%); -webkit-animation-delay: -0.1667s;}
+div.spinner div.bar12 {-webkit-transform:rotate(330deg) translate(0, -142%); -webkit-animation-delay: -0.0833s;}
+
+@-webkit-keyframes fade {
+ from {opacity: 1;}
+ to {opacity: 0.25;}
+}
diff --git a/phonegap/www/email_sent.html b/phonegap/www/email_sent.html
new file mode 100644
index 000000000..529ccb693
--- /dev/null
+++ b/phonegap/www/email_sent.html
@@ -0,0 +1,60 @@
+<!doctype html>
+ <head>
+ <meta name="viewport" content="initial-scale=1.0">
+
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
+ <meta name="HandHeldFriendly" content="true">
+ <meta name="mobileoptimized" content="0">
+
+ <link rel="stylesheet" href="css/base.css">
+ <link rel="stylesheet" href="css/mobile.css">
+ <link rel="stylesheet" href="css/layout.css" media="(min-width:48em)">
+
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <script type="text/javascript" src="js/json2.js"></script>
+ <script type="text/javascript" src="js/config.js"></script>
+ <script type="text/javascript" src="cordova-1.8.0.js"></script>
+ <script type="text/javascript" src="js/jquery-1.7.0.min.js"></script>
+ <script type="text/javascript" src="js/mobile.js"></script>
+
+ <title> Create a report :: FixMyStreet </title>
+ </head>
+ <body class="fullwidthpage mobile-header">
+
+ <div class="wrapper">
+ <div class="table-cell">
+ <header id="site-header" role="banner">
+ <div class="container">
+ <span id="site-logo"></span>
+ </div>
+ </header>
+
+ <div id="user-meta">
+ </div>
+
+ <div class="container">
+ <div class="content" role="main">
+ <h1>Nearly Done! Now check your email...</h1>
+
+ <p>The confirmation email <strong>may</strong> take a few minutes to arrive &mdash; <em>please</em> be patient.</p>
+
+ <p>If you use web-based email or have 'junk mail' filters, you may wish to check your bulk/spam mail folders: sometimes, our messages are marked that way.</p>
+
+ <p>You must now click the link in the email we've just sent you &mdash; if you do not, your problem will not be posted..</p>
+
+ <p>(Don't worry &mdash; we'll hang on to your problem report while you're checking your email.)</p>
+
+ </div>
+ </div>
+ </div>
+
+ <div class="big-green-banner mobile-map-banner mobile-nav-banner">
+ <a href="index.html">home</a>
+ Confirm Report
+ </div>
+ <div class="mobile-info">
+ <a href="about.html">i</a>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/phonegap/www/fonts/Museo300-Regular-webfont.eot b/phonegap/www/fonts/Museo300-Regular-webfont.eot
new file mode 100755
index 000000000..15be4441c
--- /dev/null
+++ b/phonegap/www/fonts/Museo300-Regular-webfont.eot
Binary files differ
diff --git a/phonegap/www/fonts/Museo300-Regular-webfont.svg b/phonegap/www/fonts/Museo300-Regular-webfont.svg
new file mode 100755
index 000000000..71109b80b
--- /dev/null
+++ b/phonegap/www/fonts/Museo300-Regular-webfont.svg
@@ -0,0 +1,229 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>
+This is a custom SVG webfont generated by Fontspring.
+</metadata>
+<defs>
+<font id="Museo300" horiz-adv-x="1241" >
+<font-face units-per-em="2048" ascent="1536" descent="-512" />
+<missing-glyph horiz-adv-x="557" />
+<glyph unicode=" " horiz-adv-x="557" />
+<glyph unicode="&#x09;" horiz-adv-x="557" />
+<glyph unicode="&#xa0;" horiz-adv-x="557" />
+<glyph unicode="!" horiz-adv-x="608" d="M227 0v158h158v-158h-158zM231 1440h144l-6 -1063h-131z" />
+<glyph unicode="&#x22;" horiz-adv-x="638" d="M135 1114v346h121v-346h-121zM383 1114v346h121v-346h-121z" />
+<glyph unicode="#" horiz-adv-x="1460" d="M84 399l20 115h289l72 401h-289l19 115h290l72 410h125l-72 -410h355l71 410h125l-71 -410h286l-20 -115h-287l-70 -401h285l-18 -115h-287l-70 -399h-125l70 399h-354l-70 -399h-125l70 399h-291zM520 514h352l72 401h-354z" />
+<glyph unicode="$" horiz-adv-x="1089" d="M94 246l107 86q4 -8 14 -23.5t44 -54.5t72 -67.5t101.5 -53t132.5 -24.5q127 0 206 73.5t79 182.5q0 72 -39 128t-101.5 94t-138 72.5t-152.5 73.5t-139.5 86t-101.5 120t-39 167q0 135 100.5 233.5t266.5 118.5v195h117v-191q129 -12 232 -71.5t103 -173.5v-103h-135v68 q0 63 -70.5 106t-170.5 43q-135 0 -215 -64.5t-80 -158.5q0 -80 52 -140.5t132 -96t171 -81t171 -91.5t132 -131t52 -197q0 -150 -103 -262.5t-271 -128.5v-191h-117v191q-80 8 -151.5 38.5t-116.5 67.5t-80 74t-49 61z" />
+<glyph unicode="%" horiz-adv-x="1521" d="M127 1180q0 117 84 200.5t202.5 83.5t203.5 -84t85 -200q0 -119 -83.5 -202t-204.5 -83q-119 0 -203 83t-84 202zM139 0l1098 1440h145l-1095 -1440h-148zM248 1180q0 -72 48 -121t117.5 -49t119 49t49.5 121q0 70 -49.5 120t-119 50t-117.5 -50t-48 -120zM819 258 q0 119 84 203t203 84t204 -84t85 -203q0 -117 -85 -200t-204 -83t-203 83t-84 200zM942 260q0 -72 47 -121t117 -49t119 49t49 121q0 70 -49 120t-119 50t-117 -50t-47 -120z" />
+<glyph unicode="&#x26;" horiz-adv-x="1277" d="M94 401q0 127 68.5 233.5t191.5 141.5v4q-8 2 -21.5 8.5t-47 31t-60 57t-48 92t-21.5 131.5q0 162 115.5 263t310.5 101q35 0 76.5 -5t66.5 -11l25 -6l-41 -117q-68 14 -119 14q-125 0 -206 -68.5t-81 -178.5q0 -43 11.5 -82t41 -83t96 -70t160.5 -26h299v199h142v-199 h190v-126h-190v-211q0 -252 -126 -385.5t-347 -133.5q-213 0 -349.5 122t-136.5 304zM240 406q0 -127 92 -212t247.5 -85t243.5 95t88 294v207h-295q-184 0 -280 -80t-96 -219z" />
+<glyph unicode="'" horiz-adv-x="391" d="M135 1114v346h121v-346h-121z" />
+<glyph unicode="(" horiz-adv-x="632" d="M174 680q0 461 221 815h131q-223 -377 -223 -805q0 -473 236 -885h-129q-236 386 -236 875z" />
+<glyph unicode=")" horiz-adv-x="632" d="M94 -195q236 412 236 885q0 428 -224 805h132q221 -360 221 -815q0 -489 -236 -875h-129z" />
+<glyph unicode="*" horiz-adv-x="976" d="M94 1104l41 129l295 -109l-12 316h139l-14 -316l299 107l41 -125l-303 -88v-4l192 -246l-106 -80l-177 260h-4l-174 -258l-108 78l192 246v4z" />
+<glyph unicode="+" d="M86 522v119h473v522h125v-522h471v-119h-471v-522h-125v522h-473z" />
+<glyph unicode="," horiz-adv-x="440" d="M47 -199l117 367h149l-149 -367h-117z" />
+<glyph unicode="-" horiz-adv-x="884" d="M152 518v127h581v-127h-581z" />
+<glyph unicode="." horiz-adv-x="440" d="M141 0v164h158v-164h-158z" />
+<glyph unicode="/" horiz-adv-x="665" d="M6 -86l520 1606h129l-518 -1606h-131z" />
+<glyph unicode="0" horiz-adv-x="1232" d="M121 721q0 743 495 743q180 0 295 -102t159 -262t44 -379q0 -745 -498 -746q-495 1 -495 746zM266 721q0 -612 350.5 -612t350.5 612q0 610 -350.5 610t-350.5 -610z" />
+<glyph unicode="1" horiz-adv-x="974" d="M131 0v127h322v1057l2 80h-4q-14 -31 -72 -86l-154 -154l-90 92l326 324h135v-1313h315v-127h-780z" />
+<glyph unicode="2" horiz-adv-x="1155" d="M86 141q0 147 79 257t190.5 176.5t223 129t190.5 150.5t79 205t-81 193.5t-214 76.5q-106 0 -181 -47t-75 -108v-68h-135v106q0 66 40 116t102.5 79t128 43t124.5 14q201 0 319.5 -115.5t118.5 -287.5q0 -139 -78.5 -245.5t-190.5 -174.5t-223.5 -130t-190.5 -148.5 t-79 -194.5q0 -41 48 -41h602q45 0 45 45v96h133v-143q0 -66 -30 -95.5t-95 -29.5h-721q-72 0 -100.5 32.5t-28.5 108.5z" />
+<glyph unicode="3" horiz-adv-x="1081" d="M53 176l86 107q6 -6 17.5 -18.5t49.5 -42t79 -52.5t104.5 -41t126.5 -18q131 0 228.5 88t97.5 223q0 139 -102.5 221t-247.5 82h-101l-33 84l355 426q35 47 73 80v4q-41 -6 -116 -6h-375q-45 0 -45 -45v-97h-133v144q0 68 27.5 96.5t93.5 28.5h731v-94l-424 -498 q74 -4 146.5 -27.5t142 -71t112.5 -131t43 -194.5q0 -184 -136 -316.5t-339 -132.5q-80 0 -156.5 20.5t-129 50.5t-94.5 59.5t-60 50.5z" />
+<glyph unicode="4" horiz-adv-x="1150" d="M31 397v95l700 948h154v-916h229v-127h-229v-397h-144v397h-710zM197 518q57 6 118 6h428v588l7 139h-5q-35 -59 -73 -110l-400 -529l-75 -90v-4z" />
+<glyph unicode="5" horiz-adv-x="1165" d="M111 180l90 101q4 -6 13 -18.5t40 -41t65.5 -51.5t93 -41t122.5 -18q154 0 256 96t102 239q0 147 -107.5 242.5t-265.5 95.5q-72 0 -141.5 -19.5t-102.5 -39.5l-32 -20l-74 30l61 580q6 68 34 96.5t91 28.5h473q66 0 94.5 -30t28.5 -95v-144h-133v97q0 45 -45 45h-364 q-39 0 -45 -45l-37 -326l-13 -82h4q90 53 218 53q217 0 360 -136t143 -333q0 -195 -144 -332t-361 -137q-80 0 -154 21.5t-121 51.5t-83 59.5t-50 52.5z" />
+<glyph unicode="6" horiz-adv-x="1146" d="M88 633q0 113 22.5 227.5t72.5 224t122 193.5t179.5 135t236.5 51q70 0 136.5 -15t96.5 -30l31 -14l-53 -125q-90 51 -209 51q-143 0 -250.5 -89t-162 -219t-68.5 -284h4q49 82 149.5 128t216.5 46q197 0 323 -128t126 -328q0 -219 -129 -350.5t-324 -131.5 q-231 0 -375.5 185.5t-144.5 472.5zM242 541q0 -154 106.5 -293t257.5 -139q143 0 226 97t83 249q0 150 -89 240.5t-236 90.5q-139 0 -243.5 -77.5t-104.5 -167.5z" />
+<glyph unicode="7" horiz-adv-x="1048" d="M61 1171v144q0 66 29 95.5t94 29.5h850v-99l-712 -1341h-160l626 1180l80 133v4q-37 -4 -108 -4h-518q-45 0 -45 -45v-97h-136z" />
+<glyph unicode="8" horiz-adv-x="1167" d="M96 406q0 70 27 135t64.5 108t74.5 76t64 47l26 14v5q-8 4 -21.5 11t-47 33.5t-59 58.5t-47 84t-21.5 109q0 158 116.5 267.5t317.5 109.5t320.5 -106.5t119.5 -276.5q0 -61 -19.5 -120.5t-48 -100.5t-57 -72.5t-49.5 -46.5l-18 -16v-4q113 -57 172 -134t59 -196 q0 -170 -140.5 -293t-342.5 -123q-201 0 -345.5 117t-144.5 314zM244 412q0 -135 101 -219t241 -84q133 0 234.5 80.5t101.5 203.5q0 102 -68 158.5t-207 112.5q-135 57 -168 57q-55 0 -145 -95t-90 -214zM299 1087q0 -102 68.5 -156t207.5 -106q104 -39 130 -39 q45 0 113.5 94.5t68.5 196.5q0 115 -83 184.5t-214 69.5q-133 0 -212 -70t-79 -174z" />
+<glyph unicode="9" horiz-adv-x="1146" d="M88 983q0 219 128 350t323 131q231 0 375.5 -185t144.5 -472q0 -143 -38 -285.5t-110.5 -267.5t-198.5 -202t-286 -77q-70 0 -136.5 14.5t-96.5 30.5l-31 15l53 125q90 -51 209 -51q143 0 251.5 90t163 220t66.5 283h-4q-49 -82 -150.5 -129t-215.5 -47q-197 0 -322 128 t-125 329zM231 985q0 -150 89.5 -241t236.5 -91q139 0 243.5 78t104.5 168q0 154 -106.5 293t-257.5 139q-143 0 -226.5 -97t-83.5 -249z" />
+<glyph unicode=":" horiz-adv-x="579" d="M211 0v164h158v-164h-158zM211 866v164h158v-164h-158z" />
+<glyph unicode=";" horiz-adv-x="579" d="M111 -199l98 367h149l-131 -367h-116zM211 866v164h158v-164h-158z" />
+<glyph unicode="&#x3c;" d="M141 530v103l926 414v-138l-752 -325v-4l752 -326v-137z" />
+<glyph unicode="=" d="M143 344v119h955v-119h-955zM143 700v119h955v-119h-955z" />
+<glyph unicode="&#x3e;" d="M158 117v137l751 326v4l-751 325v138l925 -414v-103z" />
+<glyph unicode="?" horiz-adv-x="882" d="M80 1350q14 12 40.5 31.5t112.5 52t177 32.5q176 0 292.5 -102t116.5 -260q0 -94 -38 -170t-92 -126t-107.5 -97t-91 -109.5t-37.5 -136.5v-88h-140v92q0 90 37 164t89.5 125t105.5 99t90 109.5t37 131.5q0 100 -76 167.5t-193 67.5q-135 -2 -247 -88zM305 0v158h158 v-158h-158z" />
+<glyph unicode="@" horiz-adv-x="1513" d="M84 495.5q0 313.5 214 532.5t515 219q258 0 380 -110.5t122 -276.5v-645h145v-115h-551q-174 0 -291.5 116t-117.5 277.5t116.5 277.5t292.5 116h267q-4 102 -92.5 170.5t-260.5 68.5q-250 0 -423 -185t-173 -445q0 -264 173 -445.5t434 -181.5v-123q-317 0 -533.5 218 t-216.5 531.5zM643 495.5q0 -116.5 81 -198.5t198 -82h254v563h-250q-121 0 -202 -83t-81 -199.5z" />
+<glyph unicode="A" horiz-adv-x="1345" d="M25 0v127h26q57 0 74 45l471 1268h154l471 -1268q16 -45 73 -45h25v-127h-66q-78 0 -110.5 22.5t-59.5 96.5l-125 340h-571l-127 -340q-29 -74 -60.5 -96.5t-107.5 -22.5h-67zM426 584h494l-191 514l-55 186h-4q-31 -119 -56 -186z" />
+<glyph unicode="B" d="M82 1313v127h612q172 0 280.5 -98.5t108.5 -264.5q0 -223 -184 -313v-4q111 -31 176.5 -128t65.5 -229q0 -186 -122 -294.5t-308 -108.5h-371q-66 0 -95.5 29.5t-29.5 95.5v1188h-133zM358 815h334q109 0 176.5 69.5t67.5 182.5q0 111 -66.5 178.5t-179.5 67.5h-332v-498 zM358 172q0 -45 45 -45h308q131 0 205.5 76t74.5 205t-77.5 206.5t-204.5 77.5h-351v-520z" />
+<glyph unicode="C" horiz-adv-x="1421" d="M78 731q0 311 203.5 522t506.5 211q82 0 171.5 -17t174.5 -52t139 -96.5t54 -139.5v-119h-135v80q0 94 -129 151.5t-270 57.5q-242 0 -404 -169t-162 -429t164 -440t408 -180q250 0 438 170l33 32l82 -104q-8 -10 -23.5 -25.5t-69 -55.5t-114 -70.5t-154.5 -56.5 t-194 -26q-313 0 -516 218.5t-203 537.5z" />
+<glyph unicode="D" horiz-adv-x="1464" d="M86 1313v127h578q330 0 526 -191.5t196 -527.5q0 -340 -196.5 -530.5t-525.5 -190.5h-320q-66 0 -95.5 29.5t-29.5 95.5v1188h-133zM362 172q0 -45 46 -45h241q270 0 429 154.5t159 439.5q0 283 -158.5 437.5t-429.5 154.5h-287v-1141z" />
+<glyph unicode="E" horiz-adv-x="1142" d="M86 1313v127h823q66 0 95.5 -30t29.5 -95v-144h-135v97q0 45 -45 45h-492v-525h541v-126h-541v-490q0 -45 46 -45h505q45 0 45 45v96h134v-143q0 -66 -30 -95.5t-95 -29.5h-623q-66 0 -95.5 29.5t-29.5 95.5v1188h-133z" />
+<glyph unicode="F" horiz-adv-x="1021" d="M86 1313v127h766q66 0 94.5 -30t28.5 -95v-144h-133v97q0 45 -45 45h-435v-541h523v-127h-523v-645h-143v1313h-133z" />
+<glyph unicode="G" horiz-adv-x="1495" d="M80 723q0 311 207 526t512 215q285 0 475 -151l29 -25l-84 -106q-18 16 -52 40.5t-143 65.5t-223 41q-244 0 -408 -173t-164 -433q0 -264 162 -438t408 -174q80 0 155.5 21.5t128 52t92 62.5t58.5 52l20 23v178q0 45 -45 45h-88v127h144q66 0 95.5 -30t29.5 -95v-547 h-132v109l3 61h-5q-6 -8 -19 -21.5t-58 -46t-96.5 -58.5t-132.5 -47.5t-165 -21.5q-297 0 -500.5 213t-203.5 535z" />
+<glyph unicode="H" horiz-adv-x="1550" d="M86 1313v127h152q66 0 95 -30t29 -95v-531h828v531q0 66 28.5 95.5t94.5 29.5h153v-127h-88q-45 0 -45 -45v-1268h-143v657h-828v-657h-143v1268q0 45 -45 45h-88z" />
+<glyph unicode="I" horiz-adv-x="600" d="M94 0v127h135v1186h-135v127h412v-127h-137v-1186h137v-127h-412z" />
+<glyph unicode="J" horiz-adv-x="1034" d="M49 403v58h144v-49q0 -158 76.5 -229.5t187.5 -71.5q109 0 184.5 71.5t75.5 225.5v860q0 45 -45 45h-357v127h420q66 0 95.5 -30t29.5 -95v-912q0 -217 -118.5 -322.5t-286.5 -105.5t-287 106.5t-119 321.5z" />
+<glyph unicode="K" horiz-adv-x="1208" d="M86 1313v127h152q66 0 95 -30t29 -95v-500h173q90 0 120 51l349 574h163l-370 -604q-37 -59 -74 -80v-4q35 -12 70 -82l249 -496q14 -31 37 -39t68 -8h41v-127h-76q-90 0 -127 19.5t-72 89.5l-262 526q-25 53 -131 53h-158v-688h-143v1268q0 45 -45 45h-88z" />
+<glyph unicode="L" horiz-adv-x="1085" d="M86 1313v127h152q66 0 95 -30t29 -95v-1143q0 -45 46 -45h477q45 0 45 45v96h135v-143q0 -66 -29.5 -95.5t-95.5 -29.5h-596q-66 0 -95.5 29.5t-29.5 95.5v1143q0 45 -45 45h-88z" />
+<glyph unicode="M" horiz-adv-x="1730" d="M45 0v127h76q43 0 45 45l100 1268h146l381 -838l71 -170h4q37 96 70 170l381 838h145l101 -1268q2 -45 45 -45h78v-127h-140q-66 0 -93.5 28.5t-31.5 96.5l-67 874l-6 201h-4q-39 -127 -74 -201l-342 -731h-129l-340 731l-76 205h-4q0 -127 -6 -205l-68 -874 q-4 -68 -31.5 -96.5t-93.5 -28.5h-137z" />
+<glyph unicode="N" horiz-adv-x="1556" d="M86 0v127h88q45 0 45 45v1268h131l735 -1026l117 -189h4q-10 113 -10 189v901q0 66 29.5 95.5t95.5 29.5h152v-127h-89q-45 0 -45 -45v-1268h-131l-735 1026l-119 186h-4q12 -111 12 -186v-901q0 -66 -29.5 -95.5t-94.5 -29.5h-152z" />
+<glyph unicode="O" horiz-adv-x="1619" d="M78 729q0 309 213 522t520 213t520 -213t213 -522q0 -315 -214 -534.5t-519 -219.5q-307 0 -520 219.5t-213 534.5zM227 729q0 -260 170 -439t414 -179q242 0 413 179t171 439q0 254 -170 427t-414 173t-414 -173t-170 -427z" />
+<glyph unicode="P" horiz-adv-x="1185" d="M86 1313v127h608q195 0 320 -119t125 -315q0 -199 -125 -320t-320 -121h-332v-565h-143v1313h-133zM362 692h314q143 0 229 84t86 230q0 143 -85 225t-228 82h-316v-621z" />
+<glyph unicode="Q" horiz-adv-x="1619" d="M78 729q0 309 212 522t517 213q311 0 524 -213t213 -522q0 -283 -180 -496l176 -176l-88 -92l-176 178q-197 -168 -469 -168q-305 0 -517 219.5t-212 534.5zM227 729q0 -260 168 -439t412 -179q205 0 356 120l13 11l-172 174l88 92l170 -176q133 170 133 397 q0 254 -169 426t-419 172q-246 0 -413 -172t-167 -426z" />
+<glyph unicode="R" horiz-adv-x="1239" d="M86 1313v127h610q182 0 298 -111.5t116 -298.5q0 -158 -82 -259t-197 -126v-4q29 -16 50 -57l206 -410q14 -31 37 -39t66 -8h29v-127h-64q-90 0 -127 19.5t-72 89.5l-206 411q-29 55 -56.5 70.5t-89.5 15.5h-242v-606h-143v1313h-133zM362 733h320q129 0 204 79t75 214 q0 133 -75 210t-202 77h-322v-580z" />
+<glyph unicode="S" horiz-adv-x="1060" d="M76 180l88 105q6 -6 17.5 -18.5t48 -43t77.5 -53.5t103.5 -42t126.5 -19q121 0 202.5 71.5t81.5 184.5q0 98 -72.5 167.5t-177 116.5t-210 97.5t-178 138.5t-72.5 211q0 154 122.5 261t317.5 107q82 0 165 -20.5t153.5 -79.5t70.5 -147v-103h-135v68q0 63 -75 106 t-177 43q-135 0 -215 -67.5t-80 -163.5q0 -59 30.5 -107.5t81 -80t114 -64.5t130 -59.5t130 -65.5t113.5 -83t81 -112.5t31 -154.5q0 -168 -120 -283t-317 -115q-82 0 -159.5 21.5t-128.5 51.5t-91 59.5t-59 52.5z" />
+<glyph unicode="T" horiz-adv-x="1269" d="M31 1171v152q0 66 25.5 91.5t90.5 25.5h975q66 0 91.5 -25.5t25.5 -91.5v-152h-133v97q0 45 -45 45h-354v-1313h-144v1313h-356q-45 0 -45 -45v-97h-131z" />
+<glyph unicode="U" horiz-adv-x="1468" d="M70 1313v127h151q66 0 95.5 -30t29.5 -95v-815q0 -180 105.5 -284.5t281.5 -104.5q178 0 283.5 105.5t105.5 287.5v811q0 66 30 95.5t95 29.5h152v-127h-88q-45 0 -45 -45v-774q0 -233 -146.5 -376t-384 -143t-385 142.5t-147.5 376.5v774q0 45 -45 45h-88z" />
+<glyph unicode="V" horiz-adv-x="1337" d="M25 1313v127h63q78 0 109.5 -22.5t58.5 -96.5l354 -969l56 -186h4q29 113 55 186l354 969q27 74 59.5 96.5t110.5 22.5h62v-127h-19q-57 0 -73 -45l-474 -1268h-153l-473 1268q-16 45 -74 45h-20z" />
+<glyph unicode="W" horiz-adv-x="1935" d="M35 1313v127h63q82 0 119 -23.5t55 -95.5l250 -993l31 -154h4q18 80 39 154l317 1106h142l288 -1106l33 -154h4q14 80 33 154l250 993q18 72 55 95.5t119 23.5h64v-127h-23q-63 0 -76 -45l-332 -1268h-170l-268 1001l-47 213h-4q-25 -119 -51 -210l-295 -1004h-170 l-330 1268q-12 45 -76 45h-24z" />
+<glyph unicode="X" horiz-adv-x="1167" d="M31 0l458 752l-311 508q-33 53 -102 53h-43v127h76q78 0 116.5 -22.5t81.5 -92.5l185 -309l92 -164h4q43 90 88 164l184 309q43 70 82 92.5t117 22.5h76v-127h-43q-70 0 -103 -53l-313 -508l461 -752h-164l-299 496l-92 157h-4q-41 -86 -86 -159l-297 -494h-164z" />
+<glyph unicode="Y" horiz-adv-x="1212" d="M20 1313v127h56q76 0 113.5 -20.5t82.5 -94.5l244 -407l88 -162h4q43 86 88 162l244 407q45 74 83 94.5t114 20.5h55v-127h-33q-63 0 -94 -53l-387 -633v-627h-143v627l-385 633q-33 53 -97 53h-33z" />
+<glyph unicode="Z" horiz-adv-x="1177" d="M39 0v100l772 1082q25 33 50.5 65.5t39.5 48.5l14 17v4q-35 -4 -104 -4h-573q-45 0 -45 -45v-97h-134v144q0 66 30 95.5t95 29.5h908v-101l-770 -1081q-25 -33 -51.5 -65.5t-41.5 -49.5l-14 -16v-4q35 4 107 4h620q45 0 45 45v96h133v-143q0 -66 -29.5 -95.5t-95.5 -29.5 h-956z" />
+<glyph unicode="[" horiz-adv-x="620" d="M207 -70v1440q0 66 29.5 95.5t95.5 29.5h151v-115h-102q-45 0 -45 -45v-1370q0 -45 45 -45h102v-115h-151q-66 0 -95.5 29.5t-29.5 95.5z" />
+<glyph unicode="\" horiz-adv-x="649" d="M10 1520h131l518 -1606h-129z" />
+<glyph unicode="]" horiz-adv-x="620" d="M137 -80h103q45 0 45 45v1370q0 45 -45 45h-103v115h152q66 0 95.5 -29.5t29.5 -95.5v-1440q0 -66 -30 -95.5t-95 -29.5h-152v115z" />
+<glyph unicode="^" d="M150 512l405 928h96l406 -928h-133l-320 758l-319 -758h-135z" />
+<glyph unicode="_" horiz-adv-x="1077" d="M10 0h1057v-119h-1057v119z" />
+<glyph unicode="`" horiz-adv-x="737" d="M190 1784h156l143 -244h-120z" />
+<glyph unicode="a" horiz-adv-x="1083" d="M82 281q0 354 631 354h57v12q0 160 -61.5 225.5t-204.5 65.5q-63 0 -132 -20.5t-69 -69.5v-66h-133v99q0 49 39 87t97.5 55t108.5 24.5t91 7.5q227 0 315 -104.5t88 -291.5v-493q0 -45 45 -45h86v-121h-141q-66 0 -94.5 29.5t-28.5 93.5l2 76h-4q2 0 -9 -22.5t-37 -56.5 t-62.5 -67t-99 -55.5t-134.5 -22.5q-141 0 -245.5 80.5t-104.5 225.5zM225 289q0 -78 60.5 -136.5t169.5 -58.5q139 0 227 119t88 264v47h-59q-55 0 -93 -2t-102.5 -8t-109 -21.5t-89.5 -40t-68.5 -66.5t-23.5 -97z" />
+<glyph unicode="b" horiz-adv-x="1196" d="M41 1319v121h145q66 0 95.5 -30t29.5 -95v-373l-4 -84h4q4 8 11.5 21.5t36 47.5t65.5 59.5t100.5 47t137.5 21.5q205 0 326.5 -149.5t121.5 -391.5t-130 -390.5t-335 -148.5q-203 0 -315 162l-23 37h-4q4 -35 4 -84v-90h-135v1274q0 45 -45 45h-86zM307 512 q0 -168 86 -291t242 -123q141 0 236.5 113t95.5 303q0 186 -91.5 300t-234.5 114q-141 0 -237.5 -104.5t-96.5 -311.5z" />
+<glyph unicode="c" horiz-adv-x="1081" d="M82 514q0 236 155.5 388.5t387.5 152.5q49 0 107.5 -11.5t118.5 -34t100 -68.5t40 -105v-93h-131v60q0 59 -79 93t-156 34q-170 0 -285 -116t-115 -300t118 -298t286 -114q186 0 317 131l15 15l65 -105q-6 -6 -16.5 -17t-49 -41t-81.5 -51.5t-113 -40t-143 -18.5 q-233 0 -387 150.5t-154 388.5z" />
+<glyph unicode="d" horiz-adv-x="1204" d="M86 516q0 242 129 390.5t334 148.5q207 0 315 -158l21 -35h4q-4 35 -4 78v334q0 45 -45 45h-86v121h145q66 0 95.5 -30t29.5 -95v-1149q0 -45 45 -45h86v-121h-143q-123 0 -123 115l4 65h-4l-11 -22q-7 -14 -36 -49t-66 -62t-101.5 -49.5t-139.5 -22.5q-205 0 -327 149.5 t-122 391.5zM229 516.5q0 -188.5 90.5 -302.5t235.5 -114q141 0 237.5 104.5t96.5 311.5q0 170 -86 292t-242 122q-141 0 -236.5 -112.5t-95.5 -301z" />
+<glyph unicode="e" horiz-adv-x="1122" d="M82 514q0 246 146.5 393.5t361.5 147.5q205 0 318.5 -136.5t113.5 -338.5l-4 -70h-791q2 -188 118 -299t282 -111q170 0 299 117l10 10l68 -104q-16 -16 -48 -41t-131.5 -66t-203.5 -41q-231 0 -385 151.5t-154 387.5zM233 621h646q-6 154 -88 235.5t-203 81.5 q-133 0 -231.5 -83.5t-123.5 -233.5z" />
+<glyph unicode="f" horiz-adv-x="624" d="M51 913v117h129v37q0 119 38 202t98.5 118.5t112.5 49t106 13.5l63 -4v-125q-18 4 -49 4q-37 0 -70 -9t-72.5 -32.5t-63.5 -80t-24 -136.5v-37h263v-117h-263v-913h-139v913h-129z" />
+<glyph unicode="g" horiz-adv-x="1185" d="M86 534.5q0 233.5 121 377t325 143.5q78 0 141.5 -18.5t99.5 -44t60.5 -51.5t32.5 -44l8 -18h5v39q0 113 116 112h144v-121h-84q-45 0 -45 -45v-839q0 -229 -142.5 -342t-353.5 -113q-176 0 -336 82l53 117q127 -72 279 -72q162 0 261 80t99 243v91l2 73h-4 q-96 -178 -323 -178q-207 0 -333 147.5t-126 381zM229 536.5q0 -184.5 92.5 -295t243.5 -110.5q137 0 222 95.5t85 308.5q0 393 -325 393q-150 0 -234 -103.5t-84 -288z" />
+<glyph unicode="h" horiz-adv-x="1239" d="M41 1319v121h145q66 0 95.5 -29t29.5 -92v-436l-4 -84h4q37 92 144.5 174t263.5 82q186 0 266 -100.5t80 -299.5v-489q0 -45 45 -45h86v-121h-145q-66 0 -95.5 29.5t-29.5 95.5v493q0 70 -7.5 118t-30 94.5t-69.5 70t-119 23.5q-131 0 -234.5 -82t-137.5 -211 q-16 -55 -17 -137v-494h-139v1274q0 45 -45 45h-86z" />
+<glyph unicode="i" horiz-adv-x="514" d="M57 909v121h146q66 0 95.5 -29.5t29.5 -95.5v-739q0 -45 45 -45h86v-121h-146q-66 0 -95.5 29.5t-29.5 95.5v739q0 45 -45 45h-86zM184 1264v176h135v-176h-135z" />
+<glyph unicode="j" horiz-adv-x="548" d="M-43 -295q18 -2 45 -2q37 0 72 9t74.5 34t63.5 82t24 139v897q0 45 -46 45h-86v121h146q66 0 95.5 -29.5t29.5 -95.5v-944q0 -121 -38 -203t-99.5 -117.5t-113.5 -49t-108 -13.5l-59 6v121zM233 1264v176h134v-176h-134z" />
+<glyph unicode="k" horiz-adv-x="1019" d="M41 1319v121h145q68 0 96.5 -27t28.5 -92v-684h107q78 0 117 49l264 344h170l-297 -377q-23 -29 -42.5 -47t-27.5 -22l-8 -4v-5q31 -14 63 -75l187 -334q14 -27 33.5 -36t60.5 -9h55v-121h-96q-78 0 -110.5 19.5t-67.5 82.5l-205 369q-25 45 -108 45h-95v-516h-139v1274 q0 45 -45 45h-86z" />
+<glyph unicode="l" horiz-adv-x="501" d="M45 1319v121h145q66 0 95.5 -30t29.5 -95v-1149q0 -45 45 -45h86v-121h-145q-66 0 -95.5 29.5t-29.5 95.5v1149q0 45 -45 45h-86z" />
+<glyph unicode="m" horiz-adv-x="1906" d="M47 909v121h143q125 0 125 -115v-47l-4 -73h4q39 106 146.5 183t226.5 77q272 0 320 -258h4q43 109 147.5 183.5t231.5 74.5q182 0 262 -100.5t80 -299.5v-489q0 -45 45 -45h86v-121h-146q-66 0 -95.5 29.5t-29.5 95.5v496q0 145 -47 226t-176 81q-113 0 -203 -86 t-123 -205q-18 -57 -18 -150v-487h-139v621q0 68 -7.5 114.5t-28 95t-66.5 73t-115 24.5q-121 0 -211 -88t-125 -215q-16 -57 -17 -138v-487h-139v864q0 45 -45 45h-86z" />
+<glyph unicode="n" horiz-adv-x="1245" d="M47 909v121h143q125 0 125 -115v-47l-4 -73h4q37 94 142.5 177t267.5 83q186 0 266 -100.5t80 -299.5v-489q0 -45 45 -45h86v-121h-145q-66 0 -95.5 29.5t-29.5 95.5v493q0 145 -44 225.5t-179 80.5q-131 0 -235.5 -81t-139.5 -210q-16 -57 -17 -139v-494h-139v864 q0 45 -45 45h-86z" />
+<glyph unicode="o" horiz-adv-x="1251" d="M82 520q0 227 158.5 381t384.5 154q227 0 385.5 -153.5t158.5 -381.5q0 -231 -158.5 -388t-383.5 -157q-227 0 -386 157t-159 388zM225 520q0 -178 117 -299t285 -121q166 0 282.5 121t116.5 299q0 174 -116.5 291t-282.5 117q-168 0 -285 -117t-117 -291z" />
+<glyph unicode="p" horiz-adv-x="1202" d="M47 909v121h141q123 0 123 -108l-2 -70h4q4 8 11.5 21.5t36 49t64.5 62.5t101.5 48.5t141.5 21.5q205 0 326.5 -149.5t121.5 -391.5t-129 -390.5t-332 -148.5q-70 0 -131 20.5t-97 49.5t-62.5 56.5t-36.5 48.5l-11 20h-4q4 -37 4 -90v-490h-139v1274q0 45 -45 45h-86z M313 512q0 -168 87 -291t241 -123q141 0 236.5 113t95.5 303q0 188 -90 301t-236 113q-141 0 -237.5 -104.5t-96.5 -311.5z" />
+<glyph unicode="q" horiz-adv-x="1204" d="M88 516q0 242 129 390.5t334 148.5q70 0 131 -20.5t98 -50.5t63.5 -58.5t37.5 -48.5l10 -21h4q-2 29 -2 68q0 106 123 106h141v-121h-86q-45 0 -45 -45v-1274h-139v494l4 90h-4q-4 -8 -11.5 -21.5t-36 -47t-65.5 -60.5t-100.5 -48.5t-136.5 -21.5q-205 0 -327 149.5 t-122 391.5zM229 516.5q0 -188.5 91.5 -302.5t236.5 -114q141 0 237.5 104.5t96.5 311.5q0 170 -86 292t-242 122q-141 0 -237.5 -112.5t-96.5 -301z" />
+<glyph unicode="r" horiz-adv-x="741" d="M47 909v121h143q125 0 125 -117v-69l-4 -78h4q39 123 124 198.5t202 75.5l55 -6v-137q-25 4 -51 4q-106 0 -185 -73.5t-114 -192.5q-29 -92 -29 -201v-434h-139v864q0 45 -45 45h-86z" />
+<glyph unicode="s" horiz-adv-x="901" d="M59 156l80 96q4 -6 13.5 -16.5t40 -38t64.5 -48t88 -37t112 -16.5q92 0 154.5 43t62.5 121q0 61 -59.5 106.5t-144.5 78t-170 69.5t-144.5 103.5t-59.5 158.5q0 135 102.5 207t264.5 72q45 0 94 -9.5t100.5 -29t85 -58t33.5 -90.5v-88h-131v49q0 51 -57.5 78t-120.5 27 q-229 0 -229 -150q0 -63 59 -108t144 -77t170 -68.5t144.5 -104.5t59.5 -162q0 -127 -102.5 -208t-257.5 -81q-227 0 -373 154z" />
+<glyph unicode="t" horiz-adv-x="686" d="M55 913v117h138v285h137v-285h258v-117h-258v-524q0 -70 17.5 -121t42 -79.5t57 -45t59 -21.5t55.5 -5l47 4v-125q-25 -4 -59 -4q-43 0 -84 6t-93.5 29.5t-90 62.5t-64.5 112.5t-27 172.5v538h-135z" />
+<glyph unicode="u" horiz-adv-x="1234" d="M43 909v121h145q66 0 95.5 -28.5t29.5 -92.5v-497q0 -145 45 -225.5t181 -80.5q168 0 273.5 128t105.5 303v493h139v-864q0 -45 45 -45h86v-121h-141q-125 0 -125 115v47l4 74h-4q-39 -94 -144.5 -177.5t-257.5 -83.5q-180 0 -263 98.5t-83 301.5v489q0 45 -45 45h-86z " />
+<glyph unicode="v" horiz-adv-x="1060" d="M29 909v121h55q74 0 105.5 -21.5t58.5 -90.5l248 -644l34 -120h5q16 70 34 120l248 644q27 70 58.5 91t103.5 21h53v-121h-18q-55 0 -72 -47l-336 -862h-151l-336 862q-18 47 -72 47h-18z" />
+<glyph unicode="w" horiz-adv-x="1708" d="M20 909v121h72q76 0 107.5 -21.5t54.5 -93.5l211 -653l31 -110h4q16 61 32 110l252 764h140l252 -764l32 -110h4q12 59 29 110l213 653q23 72 54.5 93.5t107.5 21.5h72v-121h-29q-55 0 -72 -47l-295 -862h-153l-252 733l-31 111h-4q-14 -59 -33 -111l-250 -733h-155 l-295 862q-16 47 -72 47h-27z" />
+<glyph unicode="x" horiz-adv-x="976" d="M37 909v121h76q78 0 111.5 -20.5t80.5 -91.5l148 -230l34 -61h5q18 35 32 61l150 230q47 72 80.5 92t111.5 20h74v-121h-41q-70 0 -96 -41l-223 -331l360 -537h-164l-252 383l-32 57h-5q-16 -29 -34 -57l-252 -383h-162l358 537l-223 329q-31 43 -94 43h-43z" />
+<glyph unicode="y" horiz-adv-x="1103" d="M16 -330l66 103q0 -4 18.5 -21.5t57.5 -37t78 -19.5q121 0 190 168l61 141l-362 858q-20 47 -72 47h-20v121h63q70 0 99.5 -21.5t58.5 -90.5l264 -644l37 -110h4q14 59 35 110l254 644q27 70 57.5 91t102.5 21h63v-121h-20q-53 0 -72 -47l-444 -1077 q-41 -100 -118 -157.5t-177 -57.5q-133 0 -220 94z" />
+<glyph unicode="z" horiz-adv-x="1021" d="M80 0v90l579 723l82 94v4q-35 -4 -102 -4h-377q-45 0 -45 -45v-80h-131v123q0 66 29.5 95.5t95.5 29.5h715v-92l-578 -721l-86 -94v-4q37 4 105 4h426q45 0 45 45v80h131v-123q0 -66 -30 -95.5t-95 -29.5h-764z" />
+<glyph unicode="{" horiz-adv-x="667" d="M68 598v127q6 0 18 3t42 18.5t53.5 38t42 69.5t18.5 107v167q0 96 24.5 168t58 109t80 58.5t78 26.5t64.5 5h31v-115h-19q-27 0 -52.5 -7t-60 -30.5t-55 -79t-20.5 -139.5v-200q0 -55 -16.5 -103.5t-41 -76t-49 -47t-41.5 -25.5l-16 -8v-5q6 -2 17.5 -7t40 -24.5t50 -46 t39 -74.5t17.5 -108v-225q0 -82 21.5 -138t55 -79t59 -31t52.5 -8h19v-115q-12 -2 -31 -2q-33 0 -64.5 5.5t-78 28t-80 59t-58 108.5t-24.5 168v195q0 59 -18.5 105t-43 69.5t-50.5 38t-44 16.5z" />
+<glyph unicode="|" horiz-adv-x="583" d="M227 -322v1936h129v-1936h-129z" />
+<glyph unicode="}" horiz-adv-x="667" d="M90 -82h21q25 0 50 8t59 31t55.5 79t21.5 138v225q0 59 16.5 107.5t41 75t49 46t40.5 25.5l17 6v5q-6 2 -17.5 7t-40 26.5t-50 48t-39 74.5t-17.5 104v200q0 84 -20.5 139.5t-55.5 79t-59.5 30.5t-50.5 7h-21v115h33q31 0 62.5 -5t77.5 -27.5t80 -58.5t58.5 -107.5 t24.5 -168.5v-167q0 -174 137 -226l37 -10v-127q-6 0 -18.5 -3t-42 -18.5t-53 -38t-42 -68.5t-18.5 -105v-195q0 -96 -24.5 -168t-58.5 -108.5t-80 -59t-77.5 -28t-62.5 -5.5l-33 2v115z" />
+<glyph unicode="~" d="M137 428q0 162 69.5 239.5t190.5 77.5q61 0 110.5 -21.5t81.5 -53t61.5 -63.5t68.5 -53.5t86 -21.5q82 0 113.5 63.5t31.5 141.5h121q0 -162 -69.5 -239.5t-190.5 -77.5q-76 0 -134.5 33.5t-89 72.5t-78.5 73t-106 34q-82 0 -113.5 -63.5t-31.5 -141.5h-121z" />
+<glyph unicode="&#xa1;" horiz-adv-x="608" d="M223 872v158h158v-158h-158zM231 -410l7 1063h131l6 -1063h-144z" />
+<glyph unicode="&#xa2;" horiz-adv-x="1116" d="M113 720.5q0 231.5 108.5 390.5t302.5 181v228h117v-228q248 -29 367 -303l-131 -49q-94 221 -287 221q-162 0 -247 -123t-85 -317q0 -197 84 -318.5t248 -121.5q193 0 287 221l131 -51q-125 -281 -367 -304v-227h-117v227q-195 23 -303 182.5t-108 391z" />
+<glyph unicode="&#xa3;" horiz-adv-x="1191" d="M111 0v127h129v541h-93v112h93v305q0 162 119.5 270.5t302.5 108.5q178 0 313 -110l8 -6l-88 -103q-98 86 -233 86q-129 0 -204 -72.5t-75 -181.5v-297h391v-112h-391v-541h539q45 0 45 45v96h133v-143q0 -66 -30 -95.5t-95 -29.5h-864z" />
+<glyph unicode="&#xa5;" horiz-adv-x="1243" d="M35 1313v127h49q78 0 119 -21.5t84 -93.5l243 -407l88 -160h5q43 84 88 160l245 407q41 72 83 93.5t120 21.5h47v-127h-24q-72 0 -99 -45l-266 -439v-4h205v-104h-272l-56 -94v-84h328v-107h-328v-436h-143v436h-332v107h332v84l-59 94h-281v104h215v4l-268 439 q-27 45 -99 45h-24z" />
+<glyph unicode="&#xa7;" horiz-adv-x="849" d="M123 -41l72 98q72 -61 168 -61t159.5 60.5t63.5 162.5q0 35 -8 66l-134 878h123l140 -889q8 -53 8 -71q0 -143 -98.5 -236.5t-256.5 -93.5q-137 2 -237 86zM150 1135q0 143 97 236t255 93q137 -2 237 -86l-71 -96q-70 59 -166 59t-161 -58t-65 -161q0 -33 9 -63l135 -885 h-123l-139 889q-8 33 -8 72z" />
+<glyph unicode="&#xa8;" horiz-adv-x="1009" d="M322 1608v176h120v-176h-120zM629 1608v176h121v-176h-121z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1624" d="M84 721q0 309 212 526t511 217q305 0 519 -217t214 -526q0 -313 -213 -529.5t-520 -216.5q-301 0 -512 217.5t-211 528.5zM205 721q0 -268 174 -451.5t428 -183.5q260 0 437 183.5t177 451.5q0 266 -177 449.5t-437 183.5q-254 0 -428 -183.5t-174 -449.5zM406 717 q0 172 114.5 297t306.5 125q63 0 121 -19.5t94.5 -47.5t65.5 -56.5t41 -48.5l12 -19l-94 -63l-10 15q-6 9 -28.5 33.5t-48.5 43t-66 34t-83 15.5q-141 0 -223 -90t-82 -217t81 -217t224 -90q135 0 226 127l10 14l94 -64q-4 -8 -13 -20t-40 -45t-66.5 -58.5t-93 -46 t-121.5 -20.5q-195 0 -308 124t-113 294z" />
+<glyph unicode="&#xaa;" horiz-adv-x="847" d="M119 541v96h620v-96h-620zM123 979q0 225 389 225h27q-2 86 -35 122t-111 36q-106 0 -106 -41v-49h-109v80q0 41 45 67.5t89 33.5t83 7q143 0 199.5 -66.5t56.5 -185.5v-290q0 -18 19 -19h59v-104h-96q-84 0 -86 79v25h-4q-6 -12 -18.5 -31.5t-62.5 -52.5t-114 -33 q-92 0 -158.5 53.5t-66.5 143.5zM240 985q0 -43 32.5 -73.5t89.5 -30.5q80 0 127.5 68.5t51.5 164.5h-25q-276 0 -276 -129z" />
+<glyph unicode="&#xab;" horiz-adv-x="1069" d="M78 578l336 421h149l-336 -421l336 -420h-149zM444 578l336 421h152l-336 -421l336 -420h-152z" />
+<glyph unicode="&#xac;" d="M143 700v119h955v-495h-125v376h-830z" />
+<glyph unicode="&#xad;" horiz-adv-x="884" d="M152 518v127h581v-127h-581z" />
+<glyph unicode="&#xae;" horiz-adv-x="1624" d="M84 721q0 309 212 526t511 217q305 0 519 -217t214 -526q0 -313 -213 -529.5t-520 -216.5q-301 0 -512 217.5t-211 528.5zM205 721q0 -268 174 -451.5t428 -183.5q260 0 437 183.5t177 451.5q0 266 -177 449.5t-437 183.5q-254 0 -428 -183.5t-174 -449.5zM492 1024v96 h358q106 0 173 -65.5t67 -171.5q0 -84 -44.5 -140.5t-105.5 -70.5v-4q23 -8 41 -43l92 -185q12 -27 55 -26h21v-92h-59q-47 0 -71 11t-44 50l-111 217q-25 45 -73 45h-111v-323h-115v702h-73zM680 735h149q66 0 104 39t38 109q0 68 -38 104.5t-104 36.5h-149v-289z" />
+<glyph unicode="&#xaf;" horiz-adv-x="944" d="M229 1608v110h504v-110h-504z" />
+<glyph unicode="&#x2c9;" horiz-adv-x="944" d="M229 1608v110h504v-110h-504z" />
+<glyph unicode="&#xb0;" horiz-adv-x="784" d="M104 1178q0 117 84 200.5t203 83.5t204 -84t85 -200q0 -119 -84 -202t-205 -83q-119 0 -203 83t-84 202zM227 1178q0 -72 47.5 -121t117 -49t118.5 49t49 121q0 70 -49 120t-118.5 50t-117 -50t-47.5 -120z" />
+<glyph unicode="&#xb1;" d="M86 522v119h473v522h125v-522h471v-119h-471v-522h-125v522h-473zM123 -213h995v-119h-995v119z" />
+<glyph unicode="&#xb2;" horiz-adv-x="837" d="M104 645q0 63 20.5 113.5t64.5 91.5t77 62.5t97 58.5q66 37 100.5 60.5t67 68.5t32.5 98q0 63 -44 105.5t-118 42.5q-57 0 -98 -25t-41 -57v-54h-110v80q0 80 82.5 123t166.5 43q131 0 206 -72.5t75 -185.5q0 -61 -20.5 -109.5t-68.5 -89.5t-77 -59t-96.5 -57t-100 -61.5 t-65.5 -66.5t-33 -93q0 -12 19 -13h358q12 0 12 15v71h111v-102q0 -47 -21.5 -68.5t-68.5 -21.5h-434q-51 0 -72 22.5t-21 79.5z" />
+<glyph unicode="&#xb3;" horiz-adv-x="837" d="M102 674l82 80q10 -12 29.5 -32t78 -52.5t116.5 -32.5q72 0 126 50t54 126t-56.5 121t-136.5 45h-71l-21 70l197 239l47 49v4q-35 -6 -74 -6h-194q-20 0 -21 -22v-58h-111v88q0 53 20.5 75t76.5 22h452v-80l-241 -283q96 -8 174 -78.5t78 -187.5q0 -123 -89.5 -204 t-211.5 -81q-80 0 -156 37t-111 74z" />
+<glyph unicode="&#xb4;" horiz-adv-x="759" d="M236 1540l143 244h156l-179 -244h-120z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1234" d="M43 909v121h145q66 0 95.5 -28.5t29.5 -92.5v-497q0 -145 45 -225.5t181 -80.5q168 0 273.5 128t105.5 303v493h139v-864q0 -45 45 -45h86v-121h-141q-125 0 -125 115v47l4 74h-6q-4 -10 -12.5 -28t-42.5 -63t-74.5 -79.5t-113.5 -62.5t-157 -28q-76 0 -133 21.5 t-76 44.5l-18 20h-4q14 -104 14 -155v-316h-129v1274q0 45 -45 45h-86z" />
+<glyph unicode="&#x3bc;" horiz-adv-x="1234" d="M43 909v121h145q66 0 95.5 -28.5t29.5 -92.5v-497q0 -145 45 -225.5t181 -80.5q168 0 273.5 128t105.5 303v493h139v-864q0 -45 45 -45h86v-121h-141q-125 0 -125 115v47l4 74h-6q-4 -10 -12.5 -28t-42.5 -63t-74.5 -79.5t-113.5 -62.5t-157 -28q-76 0 -133 21.5 t-76 44.5l-18 20h-4q14 -104 14 -155v-316h-129v1274q0 45 -45 45h-86z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1175" d="M88 968.5q0 198.5 143.5 335t343.5 136.5h490v-127h-371v-1415h-116v596q-201 0 -345.5 138t-144.5 336.5zM821 -102v1292h119v-1292h-119z" />
+<glyph unicode="&#xb7;" horiz-adv-x="440" d="M141 508v164h158v-164h-158z" />
+<glyph unicode="&#x2219;" horiz-adv-x="440" d="M141 508v164h158v-164h-158z" />
+<glyph unicode="&#xb8;" horiz-adv-x="845" d="M227 -311q39 -12 86 -13q104 0 104.5 70t-116.5 70l-31 -2l54 227l82 -14v-17l-25 -123q66 -10 105.5 -48t39.5 -97q0 -82 -57 -122t-141 -40l-101 10v99z" />
+<glyph unicode="&#xb9;" horiz-adv-x="837" d="M162 1231l209 209h104v-791h191v-106h-502v106h192v563l2 70h-4q-10 -20 -26 -37l-92 -90z" />
+<glyph unicode="&#xba;" horiz-adv-x="933" d="M125 1126q0 141 100.5 238.5t241.5 97.5t241.5 -97t100.5 -239q0 -145 -99.5 -243.5t-242.5 -98.5t-242.5 98.5t-99.5 243.5zM160 541v96h620v-96h-620zM238 1126q0 -102 66.5 -169.5t162.5 -67.5t162.5 67.5t66.5 169.5q0 100 -66.5 167t-162.5 67t-162.5 -67 t-66.5 -167z" />
+<glyph unicode="&#xbb;" horiz-adv-x="1069" d="M135 158l336 420l-336 421h152l336 -421l-336 -420h-152zM504 158l336 420l-336 421h151l336 -421l-336 -420h-151z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1822" d="M158 1231l209 209h102v-791h188v-106h-497v106h192v563l2 70h-4q-10 -20 -26 -37l-93 -90zM551 0l608 1440h127l-606 -1440h-129zM1016 240v75l426 582h123v-551h137v-106h-137v-240h-117v240h-432zM1155 344q29 2 43 2h252v313l2 80h-4q-14 -29 -33 -55l-231 -305 l-29 -33v-2z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1822" d="M158 1231l209 209h102v-791h188v-106h-497v106h192v563l2 70h-4q-10 -20 -26 -37l-93 -90zM528 0l609 1440h127l-607 -1440h-129zM1063 102q0 63 20.5 114.5t64.5 91.5t78 62.5t95 57.5q66 37 100.5 60.5t67.5 68.5t33 98q0 63 -44 105.5t-118 42.5q-57 0 -98 -24.5 t-41 -57.5v-51h-111v78q0 82 83 123.5t167 41.5q131 0 205.5 -72.5t74.5 -185.5q0 -61 -20.5 -109t-67.5 -88t-77.5 -60.5t-96.5 -57.5q-49 -29 -74.5 -46.5t-59.5 -46t-48 -59t-14 -67.5q0 -14 16 -15h358q12 0 13 15v72h110v-103q0 -90 -90 -90h-434q-51 0 -71.5 22.5 t-20.5 79.5z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1822" d="M127 674l82 80q10 -12 29.5 -32t78 -52.5t115.5 -32.5q72 0 126 50t54 126t-56 121t-136 45h-72l-20 70l196 239l47 49v4q-35 -6 -73 -6h-195q-20 0 -20 -22v-58h-111v88q0 53 20.5 75t75.5 22h453v-80l-242 -283q96 -8 174 -78.5t78 -187.5q0 -123 -89 -204t-212 -81 q-80 0 -155.5 37t-110.5 74zM549 0l608 1440h127l-606 -1440h-129zM1016 240v75l426 582h123v-551h137v-106h-137v-240h-117v240h-432zM1155 344q29 2 43 2h252v313l2 80h-4q-14 -29 -33 -55l-231 -305l-29 -33v-2z" />
+<glyph unicode="&#xbf;" horiz-adv-x="882" d="M63 -68q0 94 38 169t91.5 126.5t107.5 98.5t92 109.5t38 135.5v82h137v-88q0 -90 -36.5 -163.5t-89 -124t-104.5 -98.5t-89 -109.5t-37 -130.5q0 -100 75.5 -168t192.5 -68q61 0 124 21.5t93 42.5l31 22l76 -102q-14 -12 -41 -32t-113 -52.5t-176 -32.5q-176 0 -293 102 t-117 260zM420 872v158h158v-158h-158z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1345" d="M25 0v127h26q57 0 74 45l471 1268h154l471 -1268q16 -45 73 -45h25v-127h-66q-78 0 -110.5 22.5t-59.5 96.5l-125 340h-571l-127 -340q-29 -74 -60.5 -96.5t-107.5 -22.5h-67zM426 584h494l-191 514l-55 186h-4q-31 -119 -56 -186zM434 1784h156l143 -244h-121z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1345" d="M25 0v127h26q57 0 74 45l471 1268h154l471 -1268q16 -45 73 -45h25v-127h-66q-78 0 -110.5 22.5t-59.5 96.5l-125 340h-571l-127 -340q-29 -74 -60.5 -96.5t-107.5 -22.5h-67zM426 584h494l-191 514l-55 186h-4q-31 -119 -56 -186zM612 1540l144 244h155l-178 -244h-121z " />
+<glyph unicode="&#xc2;" horiz-adv-x="1345" d="M25 0v127h26q57 0 74 45l471 1268h154l471 -1268q16 -45 73 -45h25v-127h-66q-78 0 -110.5 22.5t-59.5 96.5l-125 340h-571l-127 -340q-29 -74 -60.5 -96.5t-107.5 -22.5h-67zM426 584h494l-191 514l-55 186h-4q-31 -119 -56 -186zM432 1540l170 244h143l170 -244h-129 l-110 166h-4l-111 -166h-129z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1345" d="M25 0v127h26q57 0 74 45l471 1268h154l471 -1268q16 -45 73 -45h25v-127h-66q-78 0 -110.5 22.5t-59.5 96.5l-125 340h-571l-127 -340q-29 -74 -60.5 -96.5t-107.5 -22.5h-67zM350 1546q0 240 191 240q59 0 103 -37t81 -74t74 -37q82 0 82 142h108q0 -240 -190 -240 q-59 0 -104.5 37t-81 73t-74.5 36q-82 0 -82 -140h-107zM426 584h494l-191 514l-55 186h-4q-31 -119 -56 -186z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1345" d="M25 0v127h26q57 0 74 45l471 1268h154l471 -1268q16 -45 73 -45h25v-127h-66q-78 0 -110.5 22.5t-59.5 96.5l-125 340h-571l-127 -340q-29 -74 -60.5 -96.5t-107.5 -22.5h-67zM426 584h494l-191 514l-55 186h-4q-31 -119 -56 -186zM461 1608v176h121v-176h-121zM768 1608 v176h121v-176h-121z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1345" d="M25 0v127h26q57 0 74 45l471 1268h154l471 -1268q16 -45 73 -45h25v-127h-66q-78 0 -110.5 22.5t-59.5 96.5l-125 340h-571l-127 -340q-29 -74 -60.5 -96.5t-107.5 -22.5h-67zM426 584h494l-191 514l-55 186h-4q-31 -119 -56 -186zM522 1662.5q0 63.5 44 104.5t107.5 41 t107.5 -41t44 -104.5t-44 -104t-107.5 -40.5t-107.5 40.5t-44 104zM606 1663q0 -29 18.5 -48.5t49.5 -19.5q29 0 48 19.5t19 48.5q0 31 -19.5 50.5t-48 19.5t-48 -19.5t-19.5 -50.5z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1685" d="M25 127h18q57 0 74 45l487 1268h848q66 0 95.5 -30t29.5 -95v-144h-135v97q0 45 -45 45h-475v-525h524v-126h-524v-490q0 -27 13 -36t44 -9h477q45 0 45 45v96h135v-143q0 -66 -29.5 -95.5t-95.5 -29.5h-589q-80 0 -112 25.5t-32 99.5v537h-325l-205 -543 q-27 -74 -58.5 -96.5t-109.5 -22.5h-55v127zM500 788h278v525h-82z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1421" d="M78 731q0 311 203.5 522t506.5 211q82 0 171.5 -17.5t174.5 -52t139 -96t54 -139.5v-119h-135v80q0 94 -129 151.5t-270 57.5q-242 0 -404 -169t-162 -429t161 -440t405 -180q84 0 162.5 20.5t134 50t97.5 59t62 50.5l21 20l82 -102l-24 -24q-15 -15 -67.5 -55 t-110.5 -69.5t-151.5 -56.5t-191.5 -29l-19 -88q66 -10 105 -48t39 -97q0 -84 -56.5 -123t-140.5 -39l-100 10v99q39 -12 86 -13q102 0 102 70t-116 70l-29 -2l39 166q-285 27 -462 238.5t-177 512.5z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1142" d="M86 1313v127h823q66 0 95.5 -30t29.5 -95v-144h-135v97q0 45 -45 45h-492v-525h541v-126h-541v-490q0 -45 46 -45h505q45 0 45 45v96h134v-143q0 -66 -30 -95.5t-95 -29.5h-623q-66 0 -95.5 29.5t-29.5 95.5v1188h-133zM362 1784h156l144 -244h-121z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1142" d="M86 1313v127h823q66 0 95.5 -30t29.5 -95v-144h-135v97q0 45 -45 45h-492v-525h541v-126h-541v-490q0 -45 46 -45h505q45 0 45 45v96h134v-143q0 -66 -30 -95.5t-95 -29.5h-623q-66 0 -95.5 29.5t-29.5 95.5v1188h-133zM541 1540l143 244h156l-178 -244h-121z" />
+<glyph unicode="&#xca;" horiz-adv-x="1142" d="M86 1313v127h823q66 0 95.5 -30t29.5 -95v-144h-135v97q0 45 -45 45h-492v-525h541v-126h-541v-490q0 -45 46 -45h505q45 0 45 45v96h134v-143q0 -66 -30 -95.5t-95 -29.5h-623q-66 0 -95.5 29.5t-29.5 95.5v1188h-133zM360 1540l170 244h144l170 -244h-129l-111 166h-4 l-111 -166h-129z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1142" d="M86 1313v127h823q66 0 95.5 -30t29.5 -95v-144h-135v97q0 45 -45 45h-492v-525h541v-126h-541v-490q0 -45 46 -45h505q45 0 45 45v96h134v-143q0 -66 -30 -95.5t-95 -29.5h-623q-66 0 -95.5 29.5t-29.5 95.5v1188h-133zM389 1608v176h121v-176h-121zM696 1608v176h121 v-176h-121z" />
+<glyph unicode="&#xcc;" horiz-adv-x="600" d="M59 1784h156l143 -244h-120zM94 0v127h135v1186h-135v127h412v-127h-137v-1186h137v-127h-412z" />
+<glyph unicode="&#xcd;" horiz-adv-x="600" d="M94 0v127h135v1186h-135v127h412v-127h-137v-1186h137v-127h-412zM238 1540l143 244h156l-179 -244h-120z" />
+<glyph unicode="&#xce;" horiz-adv-x="600" d="M57 1540l170 244h144l170 -244h-129l-111 166h-4l-111 -166h-129zM94 0v127h135v1186h-135v127h412v-127h-137v-1186h137v-127h-412z" />
+<glyph unicode="&#xcf;" horiz-adv-x="600" d="M86 1608v176h121v-176h-121zM94 0v127h135v1186h-135v127h412v-127h-137v-1186h137v-127h-412zM393 1608v176h121v-176h-121z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1464" d="M86 1313v127h578q330 0 526 -191.5t196 -527.5q0 -340 -196.5 -530.5t-525.5 -190.5h-320q-66 0 -95.5 29.5t-29.5 95.5v537h-102v122h102v529h-133zM362 172q0 -45 46 -45h241q270 0 429 154.5t159 439.5q0 283 -158.5 437.5t-429.5 154.5h-287v-529h336v-122h-336v-490 z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1556" d="M86 0v127h88q45 0 45 45v1268h131l735 -1026l117 -189h4q-10 113 -10 189v901q0 66 29.5 95.5t95.5 29.5h152v-127h-89q-45 0 -45 -45v-1268h-131l-735 1026l-119 186h-4q12 -111 12 -186v-901q0 -66 -29.5 -95.5t-94.5 -29.5h-152zM477 1546q0 240 191 240q59 0 103 -37 t81 -74t74 -37q82 0 82 142h108q0 -240 -190 -240q-59 0 -104.5 37t-81 73t-74.5 36q-82 0 -82 -140h-107z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1619" d="M78 729q0 309 213 522t520 213t520 -213t213 -522q0 -315 -214 -534.5t-519 -219.5q-307 0 -520 219.5t-213 534.5zM227 729q0 -260 170 -439t414 -179q242 0 413 179t171 439q0 254 -170 427t-414 173t-414 -173t-170 -427zM565 1784h156l143 -244h-121z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1619" d="M78 729q0 309 213 522t520 213t520 -213t213 -522q0 -315 -214 -534.5t-519 -219.5q-307 0 -520 219.5t-213 534.5zM227 729q0 -260 170 -439t414 -179q242 0 413 179t171 439q0 254 -170 427t-414 173t-414 -173t-170 -427zM743 1540l144 244h155l-178 -244h-121z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1619" d="M78 729q0 309 213 522t520 213t520 -213t213 -522q0 -315 -214 -534.5t-519 -219.5q-307 0 -520 219.5t-213 534.5zM227 729q0 -260 170 -439t414 -179q242 0 413 179t171 439q0 254 -170 427t-414 173t-414 -173t-170 -427zM563 1540l170 244h144l170 -244h-129 l-111 166h-4l-111 -166h-129z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1619" d="M78 729q0 309 213 522t520 213t520 -213t213 -522q0 -315 -214 -534.5t-519 -219.5q-307 0 -520 219.5t-213 534.5zM227 729q0 -260 170 -439t414 -179q242 0 413 179t171 439q0 254 -170 427t-414 173t-414 -173t-170 -427zM481 1546q0 240 191 240q59 0 103 -37t81 -74 t74 -37q82 0 82 142h108q0 -240 -190 -240q-59 0 -104.5 37t-81 73t-74.5 36q-82 0 -82 -140h-107z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1619" d="M78 729q0 309 213 522t520 213t520 -213t213 -522q0 -315 -214 -534.5t-519 -219.5q-307 0 -520 219.5t-213 534.5zM227 729q0 -260 170 -439t414 -179q242 0 413 179t171 439q0 254 -170 427t-414 173t-414 -173t-170 -427zM592 1608v176h121v-176h-121zM899 1608v176 h121v-176h-121z" />
+<glyph unicode="&#xd7;" d="M98 84l443 498l-443 497l84 84l439 -493l438 493l84 -84l-445 -497l445 -498l-84 -84l-438 494l-439 -494z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1626" d="M80 729q0 309 213 522t520 213q209 0 387 -110l98 137l84 -61l-96 -136q260 -223 260 -565q0 -315 -214 -534.5t-519 -219.5q-215 0 -391 115l-98 -139l-86 59l100 142q-121 104 -189.5 254.5t-68.5 322.5zM229 729q0 -283 195 -461l696 973q-143 88 -307 88 q-244 0 -414 -173t-170 -427zM504 203q145 -92 309 -92q244 0 414 179t170 439q0 272 -197 447z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1468" d="M70 1313v127h151q66 0 95.5 -30t29.5 -95v-815q0 -180 105.5 -284.5t281.5 -104.5q178 0 283.5 105.5t105.5 287.5v811q0 66 30 95.5t95 29.5h152v-127h-88q-45 0 -45 -45v-774q0 -233 -146.5 -376t-384 -143t-385 142.5t-147.5 376.5v774q0 45 -45 45h-88zM498 1784h155 l144 -244h-121z" />
+<glyph unicode="&#xda;" horiz-adv-x="1468" d="M70 1313v127h151q66 0 95.5 -30t29.5 -95v-815q0 -180 105.5 -284.5t281.5 -104.5q178 0 283.5 105.5t105.5 287.5v811q0 66 30 95.5t95 29.5h152v-127h-88q-45 0 -45 -45v-774q0 -233 -146.5 -376t-384 -143t-385 142.5t-147.5 376.5v774q0 45 -45 45h-88zM676 1540 l143 244h156l-178 -244h-121z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1468" d="M70 1313v127h151q66 0 95.5 -30t29.5 -95v-815q0 -180 105.5 -284.5t281.5 -104.5q178 0 283.5 105.5t105.5 287.5v811q0 66 30 95.5t95 29.5h152v-127h-88q-45 0 -45 -45v-774q0 -233 -146.5 -376t-384 -143t-385 142.5t-147.5 376.5v774q0 45 -45 45h-88zM496 1540 l170 244h143l170 -244h-129l-111 166h-4l-110 -166h-129z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1468" d="M70 1313v127h151q66 0 95.5 -30t29.5 -95v-815q0 -180 105.5 -284.5t281.5 -104.5q178 0 283.5 105.5t105.5 287.5v811q0 66 30 95.5t95 29.5h152v-127h-88q-45 0 -45 -45v-774q0 -233 -146.5 -376t-384 -143t-385 142.5t-147.5 376.5v774q0 45 -45 45h-88zM524 1608v176 h121v-176h-121zM831 1608v176h121v-176h-121z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1212" d="M20 1313v127h56q76 0 113.5 -20.5t82.5 -94.5l244 -407l88 -162h4q43 86 88 162l244 407q45 74 83 94.5t114 20.5h55v-127h-33q-63 0 -94 -53l-387 -633v-627h-143v627l-385 633q-33 53 -97 53h-33zM547 1540l143 244h156l-178 -244h-121z" />
+<glyph unicode="&#xde;" horiz-adv-x="1196" d="M86 1313v127h152q66 0 95 -30t29 -95v-131h332q195 0 320 -119t125 -317q0 -197 -126 -318t-323 -121h-328v-309h-143v1268q0 45 -45 45h-88zM362 436h314q143 0 229 83t86 228.5t-85 227.5t-228 82h-316v-621z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1142" d="M41 0v121h84q45 0 45 45v921q0 174 123 275.5t289 101.5q160 0 259 -90t99 -215q0 -68 -36 -128t-78 -95t-77.5 -79t-35.5 -85q0 -49 62.5 -103.5t137 -100.5t137 -126t62.5 -174q0 -139 -96 -216t-236 -77q-178 0 -309 111l-8 8l51 109q12 -12 34.5 -28.5t90.5 -45.5 t131 -29q86 0 143.5 43t57.5 129q0 68 -62.5 131.5t-138.5 107.5t-138.5 112.5t-62.5 144.5q0 57 36 110.5t78 89.5t78 86t36 103q0 72 -58.5 126t-163.5 54q-106 0 -186 -69.5t-80 -190.5v-952q0 -66 -29.5 -95.5t-95.5 -29.5h-143z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1083" d="M82 281q0 354 631 354h57v12q0 160 -61.5 225.5t-204.5 65.5q-63 0 -132 -20.5t-69 -69.5v-66h-133v99q0 49 39 87t97.5 55t108.5 24.5t91 7.5q227 0 315 -104.5t88 -291.5v-493q0 -45 45 -45h86v-121h-141q-66 0 -94.5 29.5t-28.5 93.5l2 76h-4q2 0 -9 -22.5t-37 -56.5 t-62.5 -67t-99 -55.5t-134.5 -22.5q-141 0 -245.5 80.5t-104.5 225.5zM225 289q0 -78 60.5 -136.5t169.5 -58.5q139 0 227 119t88 264v47h-59q-55 0 -93 -2t-102.5 -8t-109 -21.5t-89.5 -40t-68.5 -66.5t-23.5 -97zM293 1440h156l143 -244h-121z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1083" d="M82 281q0 354 631 354h57v12q0 160 -61.5 225.5t-204.5 65.5q-63 0 -132 -20.5t-69 -69.5v-66h-133v99q0 49 39 87t97.5 55t108.5 24.5t91 7.5q227 0 315 -104.5t88 -291.5v-493q0 -45 45 -45h86v-121h-141q-66 0 -94.5 29.5t-28.5 93.5l2 76h-4q2 0 -9 -22.5t-37 -56.5 t-62.5 -67t-99 -55.5t-134.5 -22.5q-141 0 -245.5 80.5t-104.5 225.5zM225 289q0 -78 60.5 -136.5t169.5 -58.5q139 0 227 119t88 264v47h-59q-55 0 -93 -2t-102.5 -8t-109 -21.5t-89.5 -40t-68.5 -66.5t-23.5 -97zM471 1196l143 244h156l-178 -244h-121z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1083" d="M82 281q0 354 631 354h57v12q0 160 -61.5 225.5t-204.5 65.5q-63 0 -132 -20.5t-69 -69.5v-66h-133v99q0 49 39 87t97.5 55t108.5 24.5t91 7.5q227 0 315 -104.5t88 -291.5v-493q0 -45 45 -45h86v-121h-141q-66 0 -94.5 29.5t-28.5 93.5l2 76h-4q2 0 -9 -22.5t-37 -56.5 t-62.5 -67t-99 -55.5t-134.5 -22.5q-141 0 -245.5 80.5t-104.5 225.5zM225 289q0 -78 60.5 -136.5t169.5 -58.5q139 0 227 119t88 264v47h-59q-55 0 -93 -2t-102.5 -8t-109 -21.5t-89.5 -40t-68.5 -66.5t-23.5 -97zM291 1196l170 244h143l170 -244h-129l-110 166h-5 l-110 -166h-129z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1083" d="M82 281q0 354 631 354h57v12q0 160 -61.5 225.5t-204.5 65.5q-63 0 -132 -20.5t-69 -69.5v-66h-133v99q0 49 39 87t97.5 55t108.5 24.5t91 7.5q227 0 315 -104.5t88 -291.5v-493q0 -45 45 -45h86v-121h-141q-66 0 -94.5 29.5t-28.5 93.5l2 76h-4q2 0 -9 -22.5t-37 -56.5 t-62.5 -67t-99 -55.5t-134.5 -22.5q-141 0 -245.5 80.5t-104.5 225.5zM209 1202q0 240 190 240q59 0 103.5 -37t81.5 -74t73 -37q82 0 82 142h109q0 -240 -191 -240q-59 0 -104 37t-81 72.5t-75 35.5q-82 0 -82 -139h-106zM225 289q0 -78 60.5 -136.5t169.5 -58.5 q139 0 227 119t88 264v47h-59q-55 0 -93 -2t-102.5 -8t-109 -21.5t-89.5 -40t-68.5 -66.5t-23.5 -97z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1083" d="M82 281q0 354 631 354h57v12q0 160 -61.5 225.5t-204.5 65.5q-63 0 -132 -20.5t-69 -69.5v-66h-133v99q0 49 39 87t97.5 55t108.5 24.5t91 7.5q227 0 315 -104.5t88 -291.5v-493q0 -45 45 -45h86v-121h-141q-66 0 -94.5 29.5t-28.5 93.5l2 76h-4q2 0 -9 -22.5t-37 -56.5 t-62.5 -67t-99 -55.5t-134.5 -22.5q-141 0 -245.5 80.5t-104.5 225.5zM225 289q0 -78 60.5 -136.5t169.5 -58.5q139 0 227 119t88 264v47h-59q-55 0 -93 -2t-102.5 -8t-109 -21.5t-89.5 -40t-68.5 -66.5t-23.5 -97zM319 1264v176h121v-176h-121zM627 1264v176h121v-176h-121 z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1083" d="M82 281q0 354 631 354h57v12q0 160 -61.5 225.5t-204.5 65.5q-63 0 -132 -20.5t-69 -69.5v-66h-133v99q0 49 39 87t97.5 55t108.5 24.5t91 7.5q227 0 315 -104.5t88 -291.5v-493q0 -45 45 -45h86v-121h-141q-66 0 -94.5 29.5t-28.5 93.5l2 76h-4q2 0 -9 -22.5t-37 -56.5 t-62.5 -67t-99 -55.5t-134.5 -22.5q-141 0 -245.5 80.5t-104.5 225.5zM225 289q0 -78 60.5 -136.5t169.5 -58.5q139 0 227 119t88 264v47h-59q-55 0 -93 -2t-102.5 -8t-109 -21.5t-89.5 -40t-68.5 -66.5t-23.5 -97zM381 1318.5q0 63.5 44 104.5t107.5 41t107.5 -41 t44 -104.5t-44 -104t-107.5 -40.5t-107.5 40.5t-44 104zM465 1319q0 -29 18.5 -48.5t48.5 -19.5q29 0 48.5 19.5t19.5 48.5q0 31 -19.5 50.5t-48 19.5t-48 -19.5t-19.5 -50.5z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1783" d="M82 281q0 70 23.5 124t58.5 89.5t90 61.5t105.5 39t120 20.5t113.5 8.5t107 1h68v22q0 160 -61.5 225.5t-202.5 65.5q-66 0 -133.5 -20.5t-67.5 -69.5v-66h-133v99q0 86 104.5 130t231.5 44q289 0 356 -213h4q127 213 389 213q201 0 312.5 -132t111.5 -317l-4 -92h-772 q4 -197 111.5 -305.5t273.5 -108.5q170 0 301 119l8 8l66 -104q-16 -16 -47 -41t-130.5 -66t-203.5 -41q-158 0 -276.5 76t-176.5 211h-4q-6 -23 -19 -51.5t-46 -72.5t-73 -77.5t-106.5 -59.5t-144.5 -26q-150 0 -252 81.5t-102 224.5zM225 289q0 -80 61.5 -137.5 t170.5 -57.5q139 0 226 120t87 265v35h-121q-82 0 -142.5 -6t-132 -26.5t-110.5 -69.5t-39 -123zM913 625h625q-6 152 -89 231.5t-200 79.5q-131 0 -222 -80.5t-114 -230.5z" />
+<glyph unicode="&#xe7;" horiz-adv-x="1081" d="M82 514q0 236 155.5 388.5t387.5 152.5q49 0 107.5 -11.5t118.5 -34t100 -68.5t40 -105v-93h-131v60q0 59 -79 93t-156 34q-170 0 -285 -116t-115 -300t118 -298t286 -114q186 0 317 131l15 15l65 -105q-6 -6 -16.5 -17t-49 -40t-82.5 -51.5t-114 -41t-146 -18.5l-16 -88 q66 -10 104.5 -48t38.5 -97q0 -84 -56 -123t-140 -39l-103 10v99q39 -12 86 -13q104 0 104.5 70t-116.5 70l-31 -2l39 170q-197 29 -321.5 173t-124.5 357z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1122" d="M82 514q0 246 146.5 393.5t361.5 147.5q205 0 318.5 -136.5t113.5 -338.5l-4 -70h-791q2 -188 118 -299t282 -111q170 0 299 117l10 10l68 -104q-16 -16 -48 -41t-131.5 -66t-203.5 -41q-231 0 -385 151.5t-154 387.5zM233 621h646q-6 154 -88 235.5t-203 81.5 q-133 0 -231.5 -83.5t-123.5 -233.5zM346 1440h156l143 -244h-121z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1122" d="M82 514q0 246 146.5 393.5t361.5 147.5q205 0 318.5 -136.5t113.5 -338.5l-4 -70h-791q2 -188 118 -299t282 -111q170 0 299 117l10 10l68 -104q-16 -16 -48 -41t-131.5 -66t-203.5 -41q-231 0 -385 151.5t-154 387.5zM233 621h646q-6 154 -88 235.5t-203 81.5 q-133 0 -231.5 -83.5t-123.5 -233.5zM524 1196l144 244h155l-178 -244h-121z" />
+<glyph unicode="&#xea;" horiz-adv-x="1122" d="M82 514q0 246 146.5 393.5t361.5 147.5q205 0 318.5 -136.5t113.5 -338.5l-4 -70h-791q2 -188 118 -299t282 -111q170 0 299 117l10 10l68 -104q-16 -16 -48 -41t-131.5 -66t-203.5 -41q-231 0 -385 151.5t-154 387.5zM233 621h646q-6 154 -88 235.5t-203 81.5 q-133 0 -231.5 -83.5t-123.5 -233.5zM344 1196l170 244h143l170 -244h-129l-110 166h-4l-111 -166h-129z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1122" d="M82 514q0 246 146.5 393.5t361.5 147.5q205 0 318.5 -136.5t113.5 -338.5l-4 -70h-791q2 -188 118 -299t282 -111q170 0 299 117l10 10l68 -104q-16 -16 -48 -41t-131.5 -66t-203.5 -41q-231 0 -385 151.5t-154 387.5zM233 621h646q-6 154 -88 235.5t-203 81.5 q-133 0 -231.5 -83.5t-123.5 -233.5zM373 1264v176h121v-176h-121zM680 1264v176h121v-176h-121z" />
+<glyph unicode="&#xec;" horiz-adv-x="516" d="M6 1440h156l141 -244h-121zM59 909v121h146q66 0 95.5 -29.5t29.5 -95.5v-739q0 -45 45 -45h86v-121h-146q-66 0 -95.5 29.5t-29.5 95.5v739q0 45 -45 45h-86z" />
+<glyph unicode="&#xed;" horiz-adv-x="516" d="M59 909v121h146q66 0 95.5 -29.5t29.5 -95.5v-739q0 -45 45 -45h86v-121h-146q-66 0 -95.5 29.5t-29.5 95.5v739q0 45 -45 45h-86zM182 1196l144 244h155l-178 -244h-121z" />
+<glyph unicode="&#xee;" horiz-adv-x="516" d="M2 1196l172 244h141l172 -244h-129l-110 166h-4l-113 -166h-129zM59 909v121h146q66 0 95.5 -29.5t29.5 -95.5v-739q0 -45 45 -45h86v-121h-146q-66 0 -95.5 29.5t-29.5 95.5v739q0 45 -45 45h-86z" />
+<glyph unicode="&#xef;" horiz-adv-x="516" d="M51 1264v176h123v-176h-123zM59 909v121h146q66 0 95.5 -29.5t29.5 -95.5v-739q0 -45 45 -45h86v-121h-146q-66 0 -95.5 29.5t-29.5 95.5v739q0 45 -45 45h-86zM309 1264v176h121v-176h-121z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1157" d="M76 475q0 197 130 339t359 142q178 0 287 -102l8 -8h4q-70 199 -254 325l-360 -163l-27 98l277 129q-131 68 -291 104l41 119q236 -59 401 -158l269 121l26 -98l-198 -92q309 -242 309 -672q0 -106 -30 -206.5t-89 -186.5t-159.5 -138.5t-229.5 -52.5q-215 0 -344 149.5 t-129 350.5zM219 473q0 -152 90 -262.5t244 -110.5q176 0 268 132.5t92 299.5q0 133 -92 219.5t-241 86.5q-174 0 -267.5 -107.5t-93.5 -257.5z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1245" d="M47 909v121h143q125 0 125 -115v-47l-4 -73h4q37 94 142.5 177t267.5 83q186 0 266 -100.5t80 -299.5v-489q0 -45 45 -45h86v-121h-145q-66 0 -95.5 29.5t-29.5 95.5v493q0 145 -44 225.5t-179 80.5q-131 0 -235.5 -81t-139.5 -210q-16 -57 -17 -139v-494h-139v864 q0 45 -45 45h-86zM326 1202q0 240 190 240q59 0 103.5 -37t81 -74t73.5 -37q82 0 82 142h109q0 -240 -191 -240q-59 0 -104 37t-81 72.5t-75 35.5q-82 0 -82 -139h-106z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1251" d="M82 520q0 227 158.5 381t384.5 154q227 0 385.5 -153.5t158.5 -381.5q0 -231 -158.5 -388t-383.5 -157q-227 0 -386 157t-159 388zM225 520q0 -178 117 -299t285 -121q166 0 282.5 121t116.5 299q0 174 -116.5 291t-282.5 117q-168 0 -285 -117t-117 -291zM387 1440h156 l143 -244h-121z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1251" d="M82 520q0 227 158.5 381t384.5 154q227 0 385.5 -153.5t158.5 -381.5q0 -231 -158.5 -388t-383.5 -157q-227 0 -386 157t-159 388zM225 520q0 -178 117 -299t285 -121q166 0 282.5 121t116.5 299q0 174 -116.5 291t-282.5 117q-168 0 -285 -117t-117 -291zM565 1196 l144 244h155l-178 -244h-121z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1251" d="M82 520q0 227 158.5 381t384.5 154q227 0 385.5 -153.5t158.5 -381.5q0 -231 -158.5 -388t-383.5 -157q-227 0 -386 157t-159 388zM225 520q0 -178 117 -299t285 -121q166 0 282.5 121t116.5 299q0 174 -116.5 291t-282.5 117q-168 0 -285 -117t-117 -291zM385 1196 l170 244h143l170 -244h-129l-110 166h-4l-111 -166h-129z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1251" d="M82 520q0 227 158.5 381t384.5 154q227 0 385.5 -153.5t158.5 -381.5q0 -231 -158.5 -388t-383.5 -157q-227 0 -386 157t-159 388zM225 520q0 -178 117 -299t285 -121q166 0 282.5 121t116.5 299q0 174 -116.5 291t-282.5 117q-168 0 -285 -117t-117 -291zM303 1202 q0 240 191 240q59 0 103 -37t81 -74t74 -37q82 0 82 142h108q0 -240 -190 -240q-59 0 -104.5 37t-81.5 72.5t-74 35.5q-82 0 -82 -139h-107z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1251" d="M82 520q0 227 158.5 381t384.5 154q227 0 385.5 -153.5t158.5 -381.5q0 -231 -158.5 -388t-383.5 -157q-227 0 -386 157t-159 388zM225 520q0 -178 117 -299t285 -121q166 0 282.5 121t116.5 299q0 174 -116.5 291t-282.5 117q-168 0 -285 -117t-117 -291zM414 1264v176 h121v-176h-121zM721 1264v176h121v-176h-121z" />
+<glyph unicode="&#xf7;" d="M102 522v119h1004v-119h-1004zM526 125v151h154v-151h-154zM526 887v151h154v-151h-154z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1251" d="M82 520q0 227 158.5 381t384.5 154q154 0 280 -76l80 113l84 -62l-80 -110q180 -158 180 -400q0 -231 -158.5 -388t-383.5 -157q-145 0 -265 66l-77 -109l-84 62l75 104q-194 162 -194 422zM225 520q0 -186 129 -311l475 663q-94 55 -202 56q-168 0 -285 -117t-117 -291z M438 150q88 -49 189 -50q166 0 282.5 121t116.5 299q0 172 -119 287z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1234" d="M43 909v121h145q66 0 95.5 -28.5t29.5 -92.5v-497q0 -145 45 -225.5t181 -80.5q168 0 273.5 128t105.5 303v493h139v-864q0 -45 45 -45h86v-121h-141q-125 0 -125 115v47l4 74h-4q-39 -94 -144.5 -177.5t-257.5 -83.5q-180 0 -263 98.5t-83 301.5v489q0 45 -45 45h-86z M365 1440h155l144 -244h-121z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1234" d="M43 909v121h145q66 0 95.5 -28.5t29.5 -92.5v-497q0 -145 45 -225.5t181 -80.5q168 0 273.5 128t105.5 303v493h139v-864q0 -45 45 -45h86v-121h-141q-125 0 -125 115v47l4 74h-4q-39 -94 -144.5 -177.5t-257.5 -83.5q-180 0 -263 98.5t-83 301.5v489q0 45 -45 45h-86z M543 1196l143 244h156l-178 -244h-121z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1234" d="M43 909v121h145q66 0 95.5 -28.5t29.5 -92.5v-497q0 -145 45 -225.5t181 -80.5q168 0 273.5 128t105.5 303v493h139v-864q0 -45 45 -45h86v-121h-141q-125 0 -125 115v47l4 74h-4q-39 -94 -144.5 -177.5t-257.5 -83.5q-180 0 -263 98.5t-83 301.5v489q0 45 -45 45h-86z M362 1196l170 244h144l170 -244h-129l-111 166h-4l-110 -166h-130z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1234" d="M43 909v121h145q66 0 95.5 -28.5t29.5 -92.5v-497q0 -145 45 -225.5t181 -80.5q168 0 273.5 128t105.5 303v493h139v-864q0 -45 45 -45h86v-121h-141q-125 0 -125 115v47l4 74h-4q-39 -94 -144.5 -177.5t-257.5 -83.5q-180 0 -263 98.5t-83 301.5v489q0 45 -45 45h-86z M391 1264v176h121v-176h-121zM698 1264v176h121v-176h-121z" />
+<glyph unicode="&#xfd;" horiz-adv-x="1103" d="M16 -330l66 103q0 -4 18.5 -21.5t57.5 -37t78 -19.5q121 0 190 168l61 141l-362 858q-20 47 -72 47h-20v121h63q70 0 99.5 -21.5t58.5 -90.5l264 -644l37 -110h4q14 59 35 110l254 644q27 70 57.5 91t102.5 21h63v-121h-20q-53 0 -72 -47l-444 -1077 q-41 -100 -118 -157.5t-177 -57.5q-133 0 -220 94zM487 1196l144 244h155l-178 -244h-121z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1196" d="M41 1319v121h145q66 0 95.5 -30t29.5 -95v-367l-4 -90h4q100 197 346 197q209 0 331 -148.5t122 -390.5t-122 -391.5t-331 -149.5q-74 0 -136 19.5t-99 48.5t-63.5 57.5t-36.5 46.5l-11 21h-4q4 -37 4 -90v-488h-139v1684q0 45 -45 45h-86zM307 514q0 -211 96.5 -312.5 t239.5 -101.5q145 0 234.5 114t89.5 302q0 186 -89.5 299t-234.5 113q-147 0 -241.5 -100.5t-94.5 -313.5z" />
+<glyph unicode="&#xff;" horiz-adv-x="1103" d="M16 -330l66 103q0 -4 18.5 -21.5t57.5 -37t78 -19.5q121 0 190 168l61 141l-362 858q-20 47 -72 47h-20v121h63q70 0 99.5 -21.5t58.5 -90.5l264 -644l37 -110h4q14 59 35 110l254 644q27 70 57.5 91t102.5 21h63v-121h-20q-53 0 -72 -47l-444 -1077 q-41 -100 -118 -157.5t-177 -57.5q-133 0 -220 94zM336 1264v176h121v-176h-121zM643 1264v176h121v-176h-121z" />
+<glyph unicode="&#x152;" horiz-adv-x="1863" d="M78 721q0 313 197.5 526t496.5 213q51 0 153.5 -10t137.5 -10h565q66 0 95.5 -30t29.5 -95v-144h-133v97q0 45 -45 45h-477v-525h524v-126h-524v-535h536q45 0 45 45v96h133v-143q0 -125 -114 -125h-633q-35 0 -138.5 -10t-154.5 -10q-299 0 -496.5 213t-197.5 528z M227 721q0 -262 150.5 -433t394.5 -171q119 0 182 14v1176q-72 16 -182 16q-242 0 -393.5 -171t-151.5 -431z" />
+<glyph unicode="&#x153;" horiz-adv-x="2068" d="M82 512q0 240 157.5 391.5t385.5 151.5q154 0 276.5 -74t190.5 -203h4q59 131 174.5 204t265.5 73q205 0 318.5 -136.5t113.5 -338.5l-4 -70h-790q8 -193 121.5 -301.5t277.5 -108.5q170 0 299 117l10 10l68 -104q-16 -16 -48 -41t-131.5 -66t-203.5 -41q-160 0 -283 75 t-186 206h-4q-66 -131 -189 -206t-280 -75q-227 0 -385 149.5t-158 387.5zM225 512q0 -182 116 -297t284 -115t283.5 117t115.5 303q0 182 -116.5 295t-282.5 113q-168 0 -284 -116t-116 -300zM1180 621h645q-8 154 -89 235.5t-202 81.5q-133 0 -231 -83.5t-123 -233.5z" />
+<glyph unicode="&#x178;" horiz-adv-x="1212" d="M20 1313v127h56q76 0 113.5 -20.5t82.5 -94.5l244 -407l88 -162h4q43 86 88 162l244 407q45 74 83 94.5t114 20.5h55v-127h-33q-63 0 -94 -53l-387 -633v-627h-143v627l-385 633q-33 53 -97 53h-33zM395 1608v176h121v-176h-121zM702 1608v176h121v-176h-121z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="962" d="M240 1540l170 244h143l170 -244h-129l-111 166h-4l-110 -166h-129z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="1007" d="M182 1546q0 240 191 240q59 0 103 -37t81 -74t74 -37q82 0 82 142h108q0 -240 -190 -240q-59 0 -104.5 37t-81 73t-74.5 36q-82 0 -82 -140h-107z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1314" d="M145 522v119h1024v-119h-1024z" />
+<glyph unicode="&#x2014;" horiz-adv-x="1724" d="M145 522v119h1434v-119h-1434z" />
+<glyph unicode="&#x2018;" horiz-adv-x="434" d="M104 1106l115 352h111l-80 -352h-146z" />
+<glyph unicode="&#x2019;" horiz-adv-x="434" d="M104 1108l80 352h146l-115 -352h-111z" />
+<glyph unicode="&#x201a;" horiz-adv-x="434" d="M104 -184l80 352h146l-115 -352h-111z" />
+<glyph unicode="&#x201c;" horiz-adv-x="675" d="M104 1106l115 352h111l-80 -352h-146zM346 1106l115 352h110l-79 -352h-146z" />
+<glyph unicode="&#x201d;" horiz-adv-x="675" d="M104 1108l80 352h146l-115 -352h-111zM346 1108l80 352h145l-114 -352h-111z" />
+<glyph unicode="&#x201e;" horiz-adv-x="675" d="M104 -184l80 352h146l-115 -352h-111zM346 -184l80 352h145l-114 -352h-111z" />
+<glyph unicode="&#x2022;" horiz-adv-x="899" d="M158 596q0 121 86 207t206.5 86t205.5 -86t85 -207t-85 -207t-205.5 -86t-206.5 86t-86 207z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1673" d="M276 0v164h158v-164h-158zM758 0v164h157v-164h-157zM1239 0v164h158v-164h-158z" />
+<glyph unicode="&#x2039;" horiz-adv-x="702" d="M78 578l336 421h149l-336 -421l336 -420h-149z" />
+<glyph unicode="&#x203a;" horiz-adv-x="702" d="M135 158l336 420l-336 421h152l336 -421l-336 -420h-152z" />
+<glyph unicode="&#x20ac;" horiz-adv-x="1208" d="M80 545v104h117q-4 37 -4 72l4 94h-117v105h135q61 242 249.5 393t438.5 151q49 0 96.5 -6t69.5 -12l23 -6l-33 -133q-74 23 -158 22q-195 0 -337 -111.5t-195 -297.5h620l-20 -105h-623q-8 -41 -8 -90l4 -76h596l-18 -104h-553q47 -195 193.5 -314.5t344.5 -119.5 q47 0 93 7t69 13l23 8l32 -131q-94 -33 -219 -33q-258 0 -447.5 159t-244.5 411h-131z" />
+<glyph unicode="&#x2122;" horiz-adv-x="1998" d="M88 1251v95q0 53 20.5 73.5t75.5 20.5h566q55 0 75.5 -20.5t20.5 -73.5v-95h-107v62q0 20 -20 20h-195v-790h-116v790h-193q-20 0 -20 -20v-62h-107zM858 647h51q20 0 23 21l59 772h107l235 -514q18 -39 29 -84h4q10 45 29 84l235 514h107l59 -772q2 -20 23 -21h51v-104 h-88q-55 0 -74.5 19.5t-24.5 74.5l-41 514l3 59h-5l-229 -499h-94l-230 499h-4l2 -59l-41 -514q-4 -55 -23.5 -74.5t-74.5 -19.5h-88v104z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1030" d="M0 1030h1030v-1030h-1030v1030z" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1118" d="M51 913v117h129v37q0 119 38 202t98.5 118.5t112.5 49t106 13.5l63 -4v-125q-20 4 -51 4q-37 0 -70 -9t-71.5 -32.5t-62.5 -80t-24 -136.5v-37h488q66 0 95.5 -29.5t29.5 -95.5v-739q0 -45 45 -45h86v-121h-145q-66 0 -95.5 29.5t-29.5 95.5v743q0 45 -45 45h-429v-913 h-139v913h-129zM788 1264v176h136v-176h-136z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="1105" d="M51 913v117h129v37q0 96 26.5 169t64.5 109.5t90.5 60.5t91.5 29t82 5h260q66 0 95.5 -30t29.5 -95v-1149q0 -45 45 -45h86v-121h-146q-66 0 -95.5 29.5t-29.5 95.5v1149q0 45 -45 45h-186q-229 0 -230 -252v-37h263v-117h-263v-913h-139v913h-129z" />
+<glyph unicode="&#xfb03;" horiz-adv-x="1722" d="M51 913v117h129v37q0 119 38 202t98.5 118.5t112.5 49t106 13.5l63 -4v-125q-20 4 -49 4q-37 0 -71 -9t-72.5 -34t-62.5 -80t-24 -137v-35h465v37q0 119 38 202t98.5 118.5t112.5 49t106 13.5l63 -4v-125q-20 4 -49 4q-37 0 -70.5 -9t-72.5 -34t-62.5 -80t-23.5 -137v-35 h487q66 0 95.5 -29.5t29.5 -95.5v-739q0 -45 45 -45h86v-121h-145q-66 0 -95.5 29.5t-29.5 95.5v743q0 45 -45 45h-428v-913h-140v913h-465v-913h-139v913h-129zM1393 1264v176h135v-176h-135z" />
+<glyph unicode="&#xfb04;" horiz-adv-x="1708" d="M51 913v117h129v43q0 117 36 198t96.5 116.5t111.5 49t106 13.5l68 -4v-125q-23 4 -53 4q-37 0 -71 -9t-71.5 -34t-60.5 -79t-23 -132v-41h465v37q0 96 27 169t64.5 109.5t90 60.5t91.5 29t82 5h260q66 0 95.5 -30t29.5 -95v-1149q0 -45 45 -45h86v-121h-146 q-66 0 -95.5 29.5t-29.5 95.5v1149q0 45 -45 45h-186q-229 0 -229 -252v-37h262v-117h-262v-913h-140v913h-465v-913h-139v913h-129z" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/phonegap/www/fonts/Museo300-Regular-webfont.ttf b/phonegap/www/fonts/Museo300-Regular-webfont.ttf
new file mode 100755
index 000000000..072e9a4e0
--- /dev/null
+++ b/phonegap/www/fonts/Museo300-Regular-webfont.ttf
Binary files differ
diff --git a/phonegap/www/fonts/Museo300-Regular-webfont.woff b/phonegap/www/fonts/Museo300-Regular-webfont.woff
new file mode 100755
index 000000000..f8a9dff96
--- /dev/null
+++ b/phonegap/www/fonts/Museo300-Regular-webfont.woff
Binary files differ
diff --git a/phonegap/www/fonts/MuseoSans_300-webfont.eot b/phonegap/www/fonts/MuseoSans_300-webfont.eot
new file mode 100755
index 000000000..5287827df
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_300-webfont.eot
Binary files differ
diff --git a/phonegap/www/fonts/MuseoSans_300-webfont.svg b/phonegap/www/fonts/MuseoSans_300-webfont.svg
new file mode 100755
index 000000000..9a04e92bc
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_300-webfont.svg
@@ -0,0 +1,227 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>
+This is a custom SVG webfont generated by Fontspring.
+</metadata>
+<defs>
+<font id="MuseoSans300" horiz-adv-x="1064" >
+<font-face units-per-em="2048" ascent="1536" descent="-512" />
+<missing-glyph horiz-adv-x="550" />
+<glyph unicode=" " horiz-adv-x="550" />
+<glyph unicode="&#x09;" horiz-adv-x="550" />
+<glyph unicode="&#xa0;" horiz-adv-x="550" />
+<glyph unicode="!" horiz-adv-x="628" d="M238 0v158h157v-158h-157zM242 1440h143l-6 -1063h-131z" />
+<glyph unicode="&#x22;" horiz-adv-x="651" d="M141 1114v346h121v-346h-121zM389 1114v346h121v-346h-121z" />
+<glyph unicode="#" horiz-adv-x="1482" d="M96 399l21 115h289l71 401h-289l19 115h291l71 410h125l-71 -410h354l72 410h125l-72 -410h287l-21 -115h-287l-69 -401h284l-18 -115h-287l-69 -399h-125l69 399h-354l-70 -399h-125l70 399h-291zM532 514h353l71 401h-354z" />
+<glyph unicode="$" horiz-adv-x="1140" d="M125 160l86 108l17 -17q11 -11 49 -38t79 -47.5t104.5 -37.5t127.5 -17q123 0 205 68.5t82 180.5q0 96 -75 165t-181.5 115t-213 95t-181 135t-74.5 207q0 143 104 252t272 129v195h115v-191q201 -10 332 -129l10 -8l-70 -119q-14 14 -40.5 35t-109.5 54.5t-165 33.5 q-135 0 -219 -73.5t-84 -174.5q0 -76 53 -135t134 -94t174.5 -79t174 -89t134 -128t53.5 -191q0 -152 -102.5 -260.5t-274.5 -124.5v-191h-115v191q-115 8 -215 53t-143 86z" />
+<glyph unicode="%" horiz-adv-x="1495" d="M115 1180q0 117 84 200.5t202.5 83.5t203.5 -84t85 -200q0 -119 -84 -202t-205 -83q-119 0 -202.5 83t-83.5 202zM127 0l1098 1440h145l-1096 -1440h-147zM236 1180q0 -72 48 -121t117.5 -49t118.5 49t49 121q0 70 -49 120t-118.5 50t-117.5 -50t-48 -120zM807 258 q0 119 84 203t202.5 84t203.5 -84t85 -203q0 -117 -85 -200t-203.5 -83t-202.5 83t-84 200zM930 260q0 -72 47 -121t116.5 -49t119 49t49.5 121q0 70 -49.5 120t-119 50t-116.5 -50t-47 -120z" />
+<glyph unicode="&#x26;" horiz-adv-x="1380" d="M123 397q0 129 69.5 235.5t192.5 143.5v4q-8 2 -21.5 8.5t-48 31t-61.5 57t-48.5 92t-21.5 131.5q0 166 118 265t314 99l164 -20l-41 -119q-68 14 -118 14q-125 0 -207 -66.5t-82 -180.5q0 -43 11 -82t41 -83t96.5 -70t160.5 -26h303v203h141v-203h195v-126h-195v-211 q0 -252 -128 -385.5t-349 -133.5q-215 0 -350 120t-135 302zM268 406q0 -127 92.5 -212t247.5 -85q336 0 336 389v207h-303q-182 0 -277.5 -80t-95.5 -219z" />
+<glyph unicode="'" horiz-adv-x="403" d="M141 1114v346h121v-346h-121z" />
+<glyph unicode="(" horiz-adv-x="593" d="M164 690q0 428 231 805h129q-231 -391 -231 -805q0 -469 231 -885h-129q-231 398 -231 885z" />
+<glyph unicode=")" horiz-adv-x="591" d="M70 -195q231 412 231 885q0 414 -231 805h129q231 -377 231 -805q0 -487 -231 -885h-129z" />
+<glyph unicode="*" horiz-adv-x="964" d="M88 1104l41 129l295 -109l-12 316h139l-14 -316l299 107l41 -125l-304 -88v-4l193 -246l-107 -80l-176 260h-4l-174 -258l-108 78l192 246v4z" />
+<glyph unicode="+" horiz-adv-x="1409" d="M170 522v119h473v522h125v-522h471v-119h-471v-522h-125v522h-473z" />
+<glyph unicode="," horiz-adv-x="499" d="M74 -199l116 367h154l-151 -367h-119z" />
+<glyph unicode="-" horiz-adv-x="1007" d="M213 518v127h582v-127h-582z" />
+<glyph unicode="." horiz-adv-x="505" d="M172 0v164h162v-164h-162z" />
+<glyph unicode="/" horiz-adv-x="802" d="M84 -86l520 1606h129l-518 -1606h-131z" />
+<glyph unicode="0" horiz-adv-x="1280" d="M143 721q0 219 44 379t159 262t295 102q496 0 496 -743q0 -745 -496 -746q-498 1 -498 746zM291 721q0 -612 350 -612q348 0 348 612q0 610 -348 610q-350 0 -350 -610z" />
+<glyph unicode="1" horiz-adv-x="954" d="M115 0v127h323v1057l2 80h-4q-14 -31 -71 -86l-154 -154l-90 92l325 324h132v-1313h317v-127h-780z" />
+<glyph unicode="2" horiz-adv-x="1157" d="M123 92q0 102 41 191.5t105.5 154t143.5 122.5t157.5 111.5t143 108t105.5 125t41 148.5q0 121 -83 198.5t-216 77.5q-59 0 -113.5 -20.5t-91.5 -49t-64.5 -57.5t-39.5 -49l-12 -20l-107 71l16.5 27.5t49.5 62.5t85 80t122.5 62.5t162.5 27.5q201 0 320 -114.5 t119 -288.5q0 -98 -40 -183t-104.5 -147.5t-142.5 -119t-155 -108.5t-141.5 -106.5t-105 -123t-40.5 -146.5h751v-127h-899q-8 43 -8 92z" />
+<glyph unicode="3" horiz-adv-x="1150" d="M92 172l86 109q16 -18 47 -47t127.5 -76t194.5 -47q133 0 231.5 88t98.5 223q0 145 -105.5 226t-257.5 81h-98l-35 84l360 422l76 80v4q-41 -6 -117 -6h-540v127h841v-94l-430 -496q76 -4 149 -27.5t143.5 -70.5t114.5 -131t44 -195q0 -186 -135 -318.5t-338 -132.5 q-80 0 -156 20.5t-128 49.5t-93 57.5t-61 49.5z" />
+<glyph unicode="4" horiz-adv-x="1222" d="M70 399v93l708 948h154v-916h205v-125h-205v-399h-141v399h-721zM242 524h549v602l6 136h-4q-33 -57 -72 -109l-479 -625v-4z" />
+<glyph unicode="5" horiz-adv-x="1142" d="M111 180l90 99q4 -6 12 -17.5t39 -41.5t65.5 -51.5t91 -39.5t117.5 -18q152 0 255.5 96t103.5 241.5t-104.5 241.5t-260.5 96q-150 0 -262 -77l-90 32l78 699h696v-127h-573l-41 -369l-15 -82h4q90 55 220 56q215 0 355 -136.5t140 -332.5q0 -199 -144.5 -336.5 t-355.5 -137.5q-238 0 -393 168z" />
+<glyph unicode="6" horiz-adv-x="1218" d="M133 651q0 141 38 280.5t110.5 260.5t198.5 196.5t286 75.5q72 0 137.5 -15t95.5 -30l31 -14l-53 -125q-90 51 -209 51q-143 0 -250.5 -88t-162 -214t-66.5 -275h4q51 76 151.5 122t212.5 46q197 0 323 -130t126 -335q0 -219 -129 -350.5t-324 -131.5 q-233 0 -376.5 190.5t-143.5 485.5zM287 549q0 -156 106.5 -298t257.5 -142q143 0 226.5 97t83.5 249q0 154 -89.5 247t-236.5 93q-139 0 -243.5 -78t-104.5 -168z" />
+<glyph unicode="7" d="M78 1313v127h936v-99l-668 -1341h-147l581 1180q16 35 37 67l31 49l12 17v4q-37 -4 -108 -4h-674z" />
+<glyph unicode="8" horiz-adv-x="1232" d="M131 414q0 80 31 153.5t77 123.5t75.5 76t52.5 40q-178 117 -179 293q0 152 114 258t321 106q201 0 320.5 -102t119.5 -272q0 -92 -45 -189.5t-76 -136.5t-55 -64q209 -119 209 -309q0 -172 -136.5 -294t-341.5 -122q-203 0 -345 120t-142 319zM276 420 q0 -139 102.5 -226.5t239.5 -87.5q133 0 232.5 82t99.5 205q0 53 -25.5 96t-81 80t-101.5 60.5t-132 59.5t-127 56q-25 -14 -52.5 -37.5t-66 -64.5t-63.5 -100.5t-25 -122.5zM332 1098q0 -45 20.5 -85t45 -65.5t78.5 -56.5t86 -45.5t105.5 -45t102.5 -42.5q25 23 52.5 57.5 t62.5 112.5t35 155q0 115 -83 182.5t-214 67.5q-133 0 -212 -67.5t-79 -167.5z" />
+<glyph unicode="9" horiz-adv-x="1216" d="M113 983q0 219 128 350t322 131q233 0 376.5 -190.5t143.5 -485.5q0 -141 -37.5 -279t-110.5 -260t-199 -198t-285 -76q-70 0 -136.5 14.5t-97.5 30.5l-31 15l54 125q90 -51 209 -51q211 0 334.5 171t146.5 406h-4q-53 -76 -153.5 -122t-213.5 -46q-197 0 -321.5 130 t-124.5 335zM256 985q0 -154 89 -247t237 -93q141 0 244.5 78t103.5 168q0 156 -106.5 298t-258.5 142q-143 0 -226 -97t-83 -249z" />
+<glyph unicode=":" horiz-adv-x="600" d="M219 0v164h162v-164h-162zM219 866v164h162v-164h-162z" />
+<glyph unicode=";" horiz-adv-x="600" d="M127 -199l100 367h154l-135 -367h-119zM227 866v164h162v-164h-162z" />
+<glyph unicode="&#x3c;" horiz-adv-x="1161" d="M102 530v103l926 414v-138l-752 -325v-4l752 -326v-137z" />
+<glyph unicode="=" horiz-adv-x="1400" d="M223 344v119h955v-119h-955zM223 700v119h955v-119h-955z" />
+<glyph unicode="&#x3e;" horiz-adv-x="1161" d="M133 117v137l752 326v4l-752 325v138l926 -414v-103z" />
+<glyph unicode="?" horiz-adv-x="985" d="M82 1350q14 12 41 31.5t113 52t176 32.5q176 0 292.5 -102t116.5 -260q0 -94 -38 -170t-91 -126t-107.5 -97t-92 -109.5t-37.5 -136.5v-88h-140v92q0 90 37 164t89.5 124t105.5 97t90 109.5t37 134.5q0 100 -76 167.5t-192 67.5q-135 -2 -248 -88zM307 0v158h158v-158 h-158z" />
+<glyph unicode="@" horiz-adv-x="1648" d="M133 495.5q0 313.5 214 532.5t515 219q258 0 380 -110.5t122 -276.5v-645h145v-115h-551q-174 0 -291.5 116t-117.5 277.5t116.5 277.5t292.5 116h267q-4 102 -92.5 170.5t-260.5 68.5q-250 0 -423 -185t-173 -445q0 -264 173.5 -445.5t433.5 -181.5v-123 q-317 0 -533.5 218t-216.5 531.5zM692 495.5q0 -116.5 81 -198.5t198 -82h254v563h-250q-121 0 -202 -83t-81 -199.5z" />
+<glyph unicode="A" horiz-adv-x="1261" d="M27 0l528 1440h152l528 -1440h-150l-165 459h-580l-164 -459h-149zM381 582h496l-189 522l-55 186h-4q-31 -119 -56 -186z" />
+<glyph unicode="B" horiz-adv-x="1282" d="M209 0v1440h491q174 0 282 -98.5t108 -264.5q0 -221 -183 -313v-4q111 -31 176.5 -128t65.5 -229q0 -186 -123 -294.5t-309 -108.5h-508zM350 127h369q131 0 206.5 76t75.5 205t-78.5 206.5t-205.5 77.5h-367v-565zM350 815h350q109 0 176.5 69.5t67.5 182.5t-65.5 179.5 t-180.5 66.5h-348v-498z" />
+<glyph unicode="C" horiz-adv-x="1490" d="M113 729q0 313 206.5 524t516.5 211q96 0 185 -19.5t146.5 -46t101.5 -54t64 -46.5l21 -20l-76 -104q-6 6 -19.5 17t-57.5 38.5t-91 48t-121 38t-149 17.5q-252 0 -416 -173t-164 -429q0 -262 165 -443.5t419 -181.5q82 0 159.5 19.5t131 48.5t95.5 57.5t60 47.5l21 20 l82 -100l-24 -24q-15 -15 -68.5 -54t-113 -67.5t-153.5 -53.5t-192 -25q-315 0 -522 217.5t-207 536.5z" />
+<glyph unicode="D" horiz-adv-x="1515" d="M209 0v1440h465q328 0 525.5 -191.5t197.5 -527.5q0 -340 -196.5 -530.5t-526.5 -190.5h-465zM350 127h309q270 0 430 154.5t160 439.5q0 283 -159.5 437.5t-430.5 154.5h-309v-1186z" />
+<glyph unicode="E" horiz-adv-x="1169" d="M209 0v1440h811v-127h-670v-525h547v-126h-547v-535h707v-127h-848z" />
+<glyph unicode="F" horiz-adv-x="1052" d="M209 0v1440h758v-127h-617v-541h529v-127h-529v-645h-141z" />
+<glyph unicode="G" horiz-adv-x="1552" d="M113 721q0 313 207.5 528t517.5 215q147 0 275 -42t181 -83l56 -43l-76 -106q-18 16 -54 39.5t-147.5 63.5t-228.5 40q-258 0 -421 -175t-163 -435q0 -266 163 -441.5t408 -175.5q125 0 238 53.5t164 106.5l51 51v244h-246v127h381v-688h-131v109l2 61h-4 q-6 -8 -19.5 -21.5t-58.5 -46t-95 -58.5t-131 -47.5t-165 -21.5q-297 0 -500.5 213.5t-203.5 532.5z" />
+<glyph unicode="H" horiz-adv-x="1536" d="M209 0v1440h141v-656h836v656h141v-1440h-141v657h-836v-657h-141z" />
+<glyph unicode="I" horiz-adv-x="559" d="M209 0v1440h141v-1440h-141z" />
+<glyph unicode="J" horiz-adv-x="1073" d="M72 403v58h141v-53q0 -154 77 -228t187 -74q109 0 185.5 72t76.5 225v910h-352v127h494v-1037q0 -217 -119 -322.5t-287 -105.5q-166 0 -284.5 106.5t-118.5 321.5z" />
+<glyph unicode="K" horiz-adv-x="1230" d="M209 0v1440h141v-625h244l387 625h162l-430 -680v-4l458 -756h-165l-412 688h-244v-688h-141z" />
+<glyph unicode="L" horiz-adv-x="1060" d="M209 0v1440h141v-1313h668v-127h-809z" />
+<glyph unicode="M" horiz-adv-x="1748" d="M164 0l115 1440h147l377 -846l69 -176h5q39 102 71 176l377 846h145l115 -1440h-141l-80 1008l-4 200h-4q-43 -127 -76 -200l-338 -740h-133l-338 740l-78 204h-4q2 -127 -4 -204l-80 -1008h-141z" />
+<glyph unicode="N" horiz-adv-x="1542" d="M209 0v1440h137l735 -1037l119 -194h4q-12 119 -12 194v1037h141v-1440h-137l-735 1036l-119 195h-4q12 -119 12 -195v-1036h-141z" />
+<glyph unicode="O" horiz-adv-x="1687" d="M111 729q0 309 213 522t520 213t520 -213t213 -522q0 -315 -214 -534.5t-519 -219.5t-519 219.5t-214 534.5zM258 729q0 -262 170 -442.5t416 -180.5q244 0 415 180.5t171 442.5q0 256 -171.5 430t-414.5 174q-246 0 -416 -174t-170 -430z" />
+<glyph unicode="P" horiz-adv-x="1224" d="M209 0v1440h498q197 0 320.5 -119t123.5 -315q0 -199 -124 -320t-320 -121h-357v-565h-141zM350 692h338q145 0 231.5 84t86.5 230q0 143 -85 225t-231 82h-340v-621z" />
+<glyph unicode="Q" horiz-adv-x="1710" d="M111 729q0 309 212 522t517 213q311 0 524 -213t213 -522q0 -285 -180 -496l178 -178l-86 -88l-176 178q-199 -170 -473 -170q-305 0 -517 219.5t-212 534.5zM258 729q0 -262 168 -442.5t414 -180.5q215 0 372 136l-176 180l86 88l174 -178q133 170 134 397 q0 258 -170 431t-420 173q-246 0 -414 -173t-168 -431z" />
+<glyph unicode="R" horiz-adv-x="1286" d="M209 0v1440h426q180 0 270 -39q102 -45 159.5 -142.5t57.5 -228.5q0 -145 -74.5 -249.5t-197.5 -139.5v-4q14 -18 37 -57l313 -580h-162l-325 606h-363v-606h-141zM350 733h342q131 0 208 79t77 214q0 182 -131 252q-66 35 -205 35h-291v-580z" />
+<glyph unicode="S" horiz-adv-x="1101" d="M102 160l84 108l18 -17q11 -11 49 -38t79 -47.5t104.5 -37.5t126.5 -17q123 0 205 68.5t82 180.5q0 98 -74 168t-179 114t-211.5 92t-180.5 134t-74 209q0 160 127 273.5t322 113.5q221 0 370 -125l15 -14l-70 -119q-14 14 -41 35t-108.5 54.5t-165.5 33.5 q-133 0 -218.5 -73.5t-85.5 -174.5q0 -94 74 -158.5t179.5 -107.5t212 -91t180 -138t73.5 -221q0 -166 -118.5 -278t-317.5 -112q-131 0 -244.5 46.5t-162.5 93.5z" />
+<glyph unicode="T" horiz-adv-x="1204" d="M14 1313v127h1176v-127h-516v-1313h-142v1313h-518z" />
+<glyph unicode="U" horiz-adv-x="1482" d="M190 502v938h144v-936q0 -184 110.5 -291t296.5 -107q188 0 299 108t111 294v932h141v-938q0 -238 -151.5 -382.5t-397.5 -144.5q-248 0 -400.5 144.5t-152.5 382.5z" />
+<glyph unicode="V" horiz-adv-x="1265" d="M25 1440h151l399 -1094l56 -186h4q29 113 55 186l400 1094h151l-534 -1440h-148z" />
+<glyph unicode="W" horiz-adv-x="1898" d="M80 1440h147l279 -1118l33 -154h4l4 20q4 23 12 62t16 72l304 1118h135l303 -1118q8 -33 16 -72t13 -62l4 -20h4q14 80 32 154l289 1118h148l-383 -1440h-170l-275 1014l-47 215h-4q-23 -123 -47 -215l-274 -1014h-170z" />
+<glyph unicode="X" horiz-adv-x="1212" d="M53 0l459 752l-418 688h166l252 -426l94 -166h4q41 92 86 166l254 426h168l-422 -688l461 -752h-164l-299 498l-90 159h-4q-43 -86 -88 -161l-295 -496h-164z" />
+<glyph unicode="Y" horiz-adv-x="1175" d="M31 1440h162l305 -522q43 -74 88 -173h4q43 96 88 173l305 522h160l-484 -822v-618h-143v618z" />
+<glyph unicode="Z" horiz-adv-x="1218" d="M88 0v100l743 1082q53 76 101 131v4q-35 -4 -105 -4h-700v127h981v-101l-743 -1081q-53 -78 -103 -131v-4q37 4 107 4h745v-127h-1026z" />
+<glyph unicode="[" horiz-adv-x="577" d="M219 -195v1690h277v-115h-148v-1460h148v-115h-277z" />
+<glyph unicode="\" horiz-adv-x="804" d="M70 1520h131l518 -1606h-129z" />
+<glyph unicode="]" horiz-adv-x="577" d="M82 -80h147v1460h-147v115h276v-1690h-276v115z" />
+<glyph unicode="^" horiz-adv-x="1241" d="M150 512l405 928h96l406 -928h-133l-320 758l-319 -758h-135z" />
+<glyph unicode="_" horiz-adv-x="1196" d="M70 0h1056v-119h-1056v119z" />
+<glyph unicode="`" horiz-adv-x="1032" d="M365 1784h161l142 -244h-127z" />
+<glyph unicode="a" d="M84 281q0 356 631 356h57v27q0 266 -256 266q-76 0 -148.5 -24.5t-107.5 -49.5l-35 -25l-65 107q14 12 43.5 31.5t125 52.5t197.5 33q186 0 285.5 -101.5t99.5 -294.5v-659h-133v113l4 86h-4q-4 -8 -11 -23.5t-36 -54.5t-64.5 -67.5t-98 -53.5t-134.5 -25 q-141 0 -245.5 80.5t-104.5 225.5zM227 289q0 -78 60.5 -136.5t169.5 -58.5q139 0 227 119t88 264v45h-59q-86 0 -148.5 -5t-150.5 -25.5t-137.5 -71.5t-49.5 -131z" />
+<glyph unicode="b" horiz-adv-x="1206" d="M168 0v1440h139v-500l-4 -84h4q4 8 11.5 21.5t36 47t65.5 60.5t100.5 48.5t136.5 21.5q205 0 327 -149.5t122 -391.5t-130 -390.5t-335 -148.5q-70 0 -129 20.5t-96 50.5t-63.5 59.5t-37.5 50.5l-12 20h-4q4 -35 4 -84v-92h-135zM303 512q0 -168 86 -291t242 -123 q141 0 236.5 113t95.5 303q0 188 -90.5 301t-235.5 113q-141 0 -237.5 -104.5t-96.5 -311.5z" />
+<glyph unicode="c" horiz-adv-x="1124" d="M96 514q0 236 156 388.5t385 152.5q221 0 360 -131l17 -17l-72 -104q-12 14 -36.5 34.5t-103.5 55.5t-161 35q-172 0 -286.5 -116t-114.5 -298q0 -180 116.5 -297t288.5 -117q59 0 114.5 15.5t92.5 36t66.5 42t44.5 35.5l12 17l63 -109q-6 -6 -16 -17t-49 -39t-82 -49.5 t-111.5 -39t-142.5 -17.5q-231 0 -386 150.5t-155 388.5z" />
+<glyph unicode="d" horiz-adv-x="1206" d="M100 516q0 242 129 390.5t334 148.5q207 0 316 -158l20 -37h4q-4 35 -4 78v502h139v-1440h-135v109l4 73h-4l-11 -22q-7 -14 -36 -50t-65.5 -63t-101 -49.5t-140.5 -22.5q-205 0 -327 149.5t-122 391.5zM244 516.5q0 -188.5 90 -302.5t235 -114q141 0 237.5 104.5 t96.5 311.5q0 170 -86 292t-242 122q-141 0 -236 -112.5t-95 -301z" />
+<glyph unicode="e" horiz-adv-x="1132" d="M96 514q0 246 146.5 393.5t361.5 147.5q205 0 317.5 -136.5t112.5 -338.5l-4 -72h-790q4 -190 117.5 -299t281.5 -109q172 0 305 117l8 8l64 -106q-16 -16 -48 -40t-131.5 -64t-201.5 -40q-231 0 -385 151.5t-154 387.5zM246 623h647q-6 154 -88 234.5t-205 80.5 q-135 0 -232 -82.5t-122 -232.5z" />
+<glyph unicode="f" horiz-adv-x="655" d="M86 901v117h129v49q0 119 38 202t99.5 118.5t112.5 49t106 13.5l64 -4v-125q-20 4 -49 4q-37 0 -71 -9t-74 -32.5t-63.5 -80t-23.5 -136.5v-49h264v-117h-264v-901h-139v901h-129z" />
+<glyph unicode="g" horiz-adv-x="1191" d="M100 534.5q0 233.5 121 377t326 143.5q76 0 139.5 -17.5t99 -43t60 -51t33.5 -42.5l8 -18h4q-2 12 -2 35v112h135v-1005q0 -229 -142.5 -342t-351.5 -113q-178 0 -337 82l53 115q127 -72 278 -72q162 0 261.5 80t99.5 243v95l4 73h-4q-96 -180 -326 -180 q-207 0 -333 147.5t-126 381zM244 536.5q0 -184.5 92 -295t246 -110.5q135 0 220 95.5t85 308.5q0 393 -326 393q-150 0 -233.5 -103.5t-83.5 -288z" />
+<glyph unicode="h" horiz-adv-x="1214" d="M168 0v1440h139v-557l-4 -84h4q37 92 144.5 174t265.5 82q184 0 264 -100.5t80 -299.5v-655h-139v618q0 145 -44 225.5t-180 80.5q-131 0 -235.5 -82t-138.5 -211q-16 -55 -17 -137v-494h-139z" />
+<glyph unicode="i" horiz-adv-x="475" d="M164 1266v174h145v-174h-145zM168 0v1030h139v-1030h-139z" />
+<glyph unicode="j" horiz-adv-x="475" d="M-113 -295q18 -2 45 -2q37 0 72 9t75 34t64.5 82t24.5 139v1063h139v-1069q0 -121 -38 -203t-100.5 -117.5t-113.5 -49t-106 -13.5l-62 6v121zM166 1266v174h143v-174h-143z" />
+<glyph unicode="k" horiz-adv-x="1028" d="M168 0v1440h139v-803h164l309 393h168l-358 -448v-4l393 -578h-166l-344 516h-166v-516h-139z" />
+<glyph unicode="l" horiz-adv-x="505" d="M158 244v1196h139v-1166q0 -156 115 -155l34 2v-125q-25 -4 -51 -4q-237 0 -237 252z" />
+<glyph unicode="m" horiz-adv-x="1875" d="M168 1030h137v-153l-4 -82h4q37 106 145.5 183t227.5 77q272 0 319 -258h4q43 109 147.5 183.5t231.5 74.5q182 0 262 -100.5t80 -299.5v-655h-139v621q0 145 -47 226t-176 81q-115 0 -205 -86t-121 -205q-18 -57 -18 -150v-487h-139v621q0 68 -7.5 114.5t-28 95 t-66.5 73t-116 24.5q-121 0 -212 -88t-125 -215q-14 -59 -15 -138v-487h-139v1030z" />
+<glyph unicode="n" horiz-adv-x="1214" d="M168 1030h137v-153l-4 -82h4q37 94 143.5 177t268.5 83q184 0 264 -100.5t80 -299.5v-655h-139v618q0 145 -44 225.5t-180 80.5q-131 0 -235.5 -81t-138.5 -210q-16 -57 -17 -139v-494h-139v1030z" />
+<glyph unicode="o" horiz-adv-x="1273" d="M92 520q0 227 159 381t386 154t386 -153.5t159 -381.5q0 -231 -159 -388t-386 -157t-386 157t-159 388zM236 520q0 -178 116.5 -299t284.5 -121t284.5 121t116.5 299q0 174 -116.5 291t-284.5 117t-284.5 -117t-116.5 -291z" />
+<glyph unicode="p" horiz-adv-x="1206" d="M168 -410v1440h133v-100l-4 -80h4l11 22q7 14 36 49t66 62t102.5 49.5t140.5 22.5q205 0 327 -149.5t122 -391.5t-129 -390.5t-332 -148.5q-70 0 -130 20.5t-96 49.5t-62.5 57.5t-37.5 49.5l-12 20h-4q4 -37 4 -90v-492h-139zM303 512q0 -166 88 -290t240 -124 q141 0 236.5 113t95.5 303q0 188 -90.5 301t-235.5 113q-141 0 -237.5 -104.5t-96.5 -311.5z" />
+<glyph unicode="q" horiz-adv-x="1206" d="M100 516q0 242 129 390.5t334 148.5q207 0 318 -162l20 -37h4q-2 33 -2 78v96h135v-1440h-139v496l4 90h-4q-4 -8 -11 -21.5t-36 -48t-65.5 -61.5t-100 -48.5t-137.5 -21.5q-205 0 -327 149.5t-122 391.5zM244 516.5q0 -188.5 90 -302.5t235 -114q141 0 237.5 104.5 t96.5 311.5q0 170 -86 292t-242 122q-141 0 -236 -112.5t-95 -301z" />
+<glyph unicode="r" horiz-adv-x="729" d="M168 0v1030h137v-182l-4 -82h4q39 123 124 198.5t202 75.5l55 -6v-137q-25 4 -51 4q-106 0 -185 -73.5t-114 -192.5q-29 -92 -29 -201v-434h-139z" />
+<glyph unicode="s" horiz-adv-x="907" d="M84 125l76 100q12 -14 36.5 -34.5t104.5 -55.5t166 -35q88 0 147.5 43t59.5 121q0 61 -57.5 105.5t-138.5 75t-163 66.5t-139 101.5t-57 157.5q0 133 102.5 209t249.5 76q61 0 115.5 -11.5t90.5 -28t62.5 -33.5t38.5 -28l10 -12l-63 -106q-10 10 -29.5 25.5t-86 42 t-142.5 26.5q-86 0 -145.5 -40t-59.5 -120q0 -61 57.5 -105t139.5 -74t162.5 -66t138 -101.5t57.5 -159.5q0 -127 -98 -208t-254 -81q-70 0 -135.5 15.5t-107.5 37t-74.5 44t-49.5 39.5z" />
+<glyph unicode="t" horiz-adv-x="686" d="M72 901v117h137v297h137v-297h258v-117h-258v-512q0 -70 17.5 -121t42 -79.5t57.5 -45t59.5 -21.5t55.5 -5l47 4v-125q-23 -4 -60 -4q-43 0 -84 6t-93 29.5t-90 62.5t-64.5 112.5t-26.5 172.5v526h-135z" />
+<glyph unicode="u" horiz-adv-x="1204" d="M154 375v655h139v-618q0 -145 44 -225.5t179 -80.5q170 0 275.5 127t105.5 304v493h139v-1030h-135v154l4 82h-4q-39 -94 -144.5 -177.5t-258.5 -83.5q-180 0 -262 98.5t-82 301.5z" />
+<glyph unicode="v" horiz-adv-x="993" d="M27 1030h147l287 -756l35 -122h4q16 70 37 122l284 756h146l-394 -1030h-151z" />
+<glyph unicode="w" horiz-adv-x="1640" d="M35 1030h147l250 -768l31 -110h4q14 61 31 110l254 764h137l254 -764l31 -110h4q14 59 30 110l250 768h148l-349 -1030h-151l-252 733l-33 111h-4q-14 -59 -31 -111l-251 -733h-152z" />
+<glyph unicode="x" horiz-adv-x="1005" d="M51 0l363 537l-332 493h164l221 -346l35 -59h2q18 33 35 59l221 346h164l-332 -493l362 -537h-163l-250 387l-35 57h-4h-2q-16 -31 -35 -57l-250 -387h-164z" />
+<glyph unicode="y" horiz-adv-x="1021" d="M14 -369l54 111q57 -47 122 -47q121 0 195 168l64 145l-431 1022h154l303 -751l37 -109h4q14 57 35 109l297 751h151l-507 -1245q-41 -100 -119 -157.5t-178 -57.5q-105 0 -181 61z" />
+<glyph unicode="z" horiz-adv-x="1042" d="M86 0v90l576 723l81 94v4q-35 -4 -102 -4h-530v123h821v-92l-576 -721l-84 -94v-4q37 4 105 4h575v-123h-866z" />
+<glyph unicode="{" horiz-adv-x="688" d="M109 598v127q6 0 18 3t42 18.5t53.5 38t42 69.5t18.5 107v167q0 96 24.5 168t58 109t80 58.5t78 26.5t64.5 5h30v-115h-18q-27 0 -52.5 -7t-60 -30.5t-55 -79t-20.5 -139.5v-200q0 -55 -16.5 -103.5t-41 -76t-49 -47t-41.5 -25.5l-16 -8v-5q6 -2 17 -7t40 -24.5t50.5 -46 t39 -74.5t17.5 -108v-225q0 -82 21.5 -138t55 -79t59 -31t52.5 -8h18v-115q-12 -2 -30 -2q-33 0 -64.5 5.5t-78 28t-80 59t-58 108.5t-24.5 168v195q0 59 -18.5 105t-43 69.5t-50.5 38t-44 16.5z" />
+<glyph unicode="|" horiz-adv-x="563" d="M217 -322v1936h129v-1936h-129z" />
+<glyph unicode="}" horiz-adv-x="688" d="M70 -82h20q25 0 50.5 8t59 31t55 79t21.5 138v225q0 59 16.5 107.5t41 75t49.5 46t41 25.5l16 6v5q-6 2 -17 7t-40 26.5t-50.5 48t-39 74.5t-17.5 104v200q0 84 -20 139.5t-55 79t-59.5 30.5t-51.5 7h-20v115h32q31 0 63 -5t78 -27.5t79.5 -58.5t58.5 -107.5t25 -168.5 v-167q0 -174 137 -226l37 -10v-127q-6 0 -18.5 -3t-42.5 -18.5t-53.5 -38t-41.5 -68.5t-18 -105v-195q0 -96 -25 -168t-58.5 -108.5t-79.5 -59t-78 -28t-63 -5.5l-32 2v115z" />
+<glyph unicode="~" horiz-adv-x="1232" d="M152 428q0 162 69.5 239.5t190.5 77.5q61 0 110 -21.5t81 -53t61.5 -63.5t68.5 -53.5t86 -21.5q82 0 114 63.5t32 141.5h120q0 -162 -69.5 -239.5t-190.5 -77.5q-76 0 -134 33.5t-89 72.5t-79 73t-105 34q-82 0 -114 -63.5t-32 -141.5h-120z" />
+<glyph unicode="&#xa1;" horiz-adv-x="561" d="M201 872v158h157v-158h-157zM209 -410l6 1063h131l6 -1063h-143z" />
+<glyph unicode="&#xa2;" horiz-adv-x="1171" d="M123 720.5q0 231.5 113.5 390.5t316.5 181v172h115v-172q262 -31 383 -303l-131 -49q-102 221 -304 221q-170 0 -259 -123t-89 -317q0 -197 88 -318.5t260 -121.5q203 0 304 221l131 -51q-57 -127 -154.5 -209t-228.5 -95v-174h-115v174q-203 23 -316.5 182.5t-113.5 391 z" />
+<glyph unicode="&#xa3;" horiz-adv-x="1206" d="M121 0v127h129v541h-90v112h90v305q0 162 119.5 270.5t304.5 108.5q86 0 166 -29.5t116 -58.5l37 -28l-86 -103q-100 86 -233 86q-131 0 -206 -72.5t-75 -181.5v-297h393v-112h-393v-541h694v-127h-966z" />
+<glyph unicode="&#xa5;" horiz-adv-x="1230" d="M70 1440h161l293 -510q47 -82 88 -185h4q41 102 89 185l294 510h162l-360 -619h215v-104h-273l-55 -99v-79h328v-107h-328v-432h-143v432h-334v107h334v79l-58 99h-276v104h217z" />
+<glyph unicode="&#xa7;" horiz-adv-x="843" d="M113 -41l71 98q72 -61 168.5 -61t159.5 60.5t63 162.5q0 35 -8 66l-133 878h123l139 -889q8 -53 9 -71q0 -143 -98.5 -236.5t-256.5 -93.5q-137 2 -237 86zM139 1135q0 143 97.5 236t255.5 93q137 -2 237 -86l-72 -96q-70 59 -166 59t-160.5 -58t-64.5 -161q0 -33 8 -63 l136 -885h-123l-140 889q-8 33 -8 72z" />
+<glyph unicode="&#xa8;" horiz-adv-x="1032" d="M299 1608v176h125v-176h-125zM608 1608v176h127v-176h-127z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1701" d="M123 721q0 309 212 526t511 217q305 0 519 -217t214 -526q0 -313 -213 -529.5t-520 -216.5q-301 0 -512 217.5t-211 528.5zM244 721q0 -268 174 -451.5t428 -183.5q260 0 437 183.5t177 451.5q0 266 -177 449.5t-437 183.5q-254 0 -428 -183.5t-174 -449.5zM444 717 q0 172 115 297t307 125q63 0 120.5 -19.5t94.5 -47.5t66 -56.5t41 -48.5l12 -19l-94 -63l-10 15q-6 9 -29 33.5t-48.5 43t-65.5 34t-83 15.5q-141 0 -223 -90t-82 -217t81 -217t224 -90q135 0 226 127l10 14l94 -64q-4 -8 -13 -20t-40 -45t-67 -58.5t-93 -46t-121 -20.5 q-195 0 -308.5 124t-113.5 294z" />
+<glyph unicode="&#xaa;" horiz-adv-x="874" d="M166 541v96h541v-96h-541zM170 977q0 227 391 227h27v8q0 152 -146 152q-41 0 -84 -14.5t-65 -30.5l-23 -14l-53 79q90 76 236 76q121 0 183 -64.5t62 -187.5v-413h-106v100h-4q-6 -12 -19.5 -30.5t-63.5 -50.5t-110 -32q-90 0 -157.5 51.5t-67.5 143.5zM285 987 q0 -45 33.5 -75.5t93.5 -30.5q78 0 126 66.5t48 148.5v18h-25q-276 0 -276 -127z" />
+<glyph unicode="&#xab;" horiz-adv-x="1071" d="M102 578l336 421h150l-336 -421l336 -420h-150zM469 578l336 421h151l-335 -421l335 -420h-151z" />
+<glyph unicode="&#xac;" horiz-adv-x="1275" d="M150 700v119h954v-495h-125v376h-829z" />
+<glyph unicode="&#xad;" horiz-adv-x="884" d="M152 518v127h581v-127h-581z" />
+<glyph unicode="&#xae;" horiz-adv-x="1701" d="M123 721q0 309 212 526t511 217q305 0 519 -217t214 -526q0 -313 -213 -529.5t-520 -216.5q-301 0 -512 217.5t-211 528.5zM244 721q0 -268 174 -451.5t428 -183.5q260 0 437 183.5t177 451.5q0 266 -177 449.5t-437 183.5q-254 0 -428 -183.5t-174 -449.5zM604 1120h285 q106 0 172.5 -65.5t66.5 -171.5q0 -84 -44 -140.5t-105 -70.5v-4q8 -10 27 -45l153 -301h-127l-160 323h-153v-323h-115v798zM719 735h149q66 0 104 39t38 109q0 68 -38 104.5t-104 36.5h-149v-289z" />
+<glyph unicode="&#xaf;" horiz-adv-x="1032" d="M264 1608v112h504v-112h-504z" />
+<glyph unicode="&#xb0;" horiz-adv-x="780" d="M102 1178q0 117 84 200.5t203 83.5t204 -84t85 -200q0 -119 -84 -202t-205 -83q-119 0 -203 83t-84 202zM225 1178q0 -72 47 -121t117 -49t119 49t49 121q0 70 -49 120t-119 50t-117 -50t-47 -120z" />
+<glyph unicode="&#xb1;" horiz-adv-x="1409" d="M170 522v119h473v522h125v-522h471v-119h-471v-522h-125v522h-473zM207 -213h995v-119h-995v119z" />
+<glyph unicode="&#xb2;" horiz-adv-x="782" d="M102 930q0 94 46.5 167.5t112 121t130 88.5t110.5 93t46 116q0 66 -47 111.5t-121 45.5q-100 0 -178 -96l-4 -4l-74 72q10 14 29.5 36.5t87 59.5t143.5 37q127 0 203 -74t76 -186q0 -84 -44.5 -149.5t-108 -108.5t-127 -82t-109.5 -92.5t-50 -116.5h455v-103h-569 q-7 35 -7 64z" />
+<glyph unicode="&#xb3;" horiz-adv-x="782" d="M88 981l72 78q8 -12 25.5 -29.5t73.5 -47.5t118 -30q74 0 133 52.5t59 130t-60 125t-140 47.5h-68l-29 63l203 236l51 51v4q-39 -6 -75 -6h-316v102h539v-74l-244 -282q102 -12 178 -78t76 -188q0 -119 -88 -204t-217 -85q-55 0 -105.5 14.5t-82 33.5t-56 38.5 t-37.5 34.5z" />
+<glyph unicode="&#xb4;" horiz-adv-x="1032" d="M365 1540l141 244h162l-176 -244h-127z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1247" d="M182 -410v1440h140v-618q0 -145 45 -225.5t180 -80.5q168 0 273.5 128t105.5 303v493h139v-1030h-135v156l4 80h-4q-4 -10 -13.5 -28t-43 -63t-74.5 -79.5t-114 -62.5t-157 -28q-76 0 -133 21.5t-76 44.5l-18 20h-4q14 -104 14 -155v-316h-129z" />
+<glyph unicode="&#x3bc;" horiz-adv-x="1247" d="M182 -410v1440h140v-618q0 -145 45 -225.5t180 -80.5q168 0 273.5 128t105.5 303v493h139v-1030h-135v156l4 80h-4q-4 -10 -13.5 -28t-43 -63t-74.5 -79.5t-114 -62.5t-157 -28q-76 0 -133 21.5t-76 44.5l-18 20h-4q14 -104 14 -155v-316h-129z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1173" d="M100 968.5q0 198.5 143.5 335t344.5 136.5h489v-127h-370v-1415h-117v596q-201 0 -345.5 138t-144.5 336.5zM834 -102v1292h118v-1292h-118z" />
+<glyph unicode="&#xb7;" horiz-adv-x="555" d="M199 508v164h157v-164h-157z" />
+<glyph unicode="&#xb8;" horiz-adv-x="1032" d="M367 -311q39 -12 86 -13q104 0 104 70t-117 70l-30 -2l53 227l82 -14v-17l-23 -123q63 -10 103.5 -48t40.5 -97q0 -84 -56.5 -123t-140.5 -39l-102 10v99z" />
+<glyph unicode="&#xb9;" horiz-adv-x="782" d="M150 1556l202 201h107v-788h190v-103h-497v103h194v592l2 49h-2q-8 -16 -43 -51l-82 -78z" />
+<glyph unicode="&#xba;" horiz-adv-x="970" d="M141 1126q0 141 100.5 238.5t242 97.5t241.5 -97t100 -239q0 -145 -99 -243.5t-242.5 -98.5t-243 98.5t-99.5 243.5zM176 541v96h621v-96h-621zM254 1126q0 -102 66.5 -169.5t163 -67.5t163 67.5t66.5 169.5q0 100 -66.5 167t-163 67t-163 -67t-66.5 -167z" />
+<glyph unicode="&#xbb;" horiz-adv-x="1073" d="M115 158l336 420l-336 421h151l336 -421l-336 -420h-151zM483 158l336 420l-336 421h152l336 -421l-336 -420h-152z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1933" d="M127 1239l203 201h106v-789h191v-102h-498v102h195v592l2 49h-2q-8 -16 -43 -51l-82 -78zM528 0l689 1440h118l-686 -1440h-121zM1147 233v78l434 580h113v-555h133v-103h-133v-233h-113v233h-434zM1286 336h295v278l6 127h-4q-33 -55 -65 -100l-232 -301v-4z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1929" d="M127 1239l203 201h106v-789h191v-102h-498v102h195v592l2 49h-2q-8 -16 -43 -51l-82 -78zM530 0l689 1440h118l-686 -1440h-121zM1206 63q0 94 46 168t112 121t130.5 88t110.5 93.5t46 115.5q0 66 -47.5 112t-120.5 46q-100 0 -178 -96l-5 -4l-73 71q10 14 29.5 37 t87 59.5t143.5 36.5q127 0 202.5 -73.5t75.5 -186.5q0 -84 -44 -149.5t-107.5 -108.5t-127 -82t-109.5 -92t-50 -117h455v-102h-570q-6 32 -6 63z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1966" d="M96 664l72 77q8 -12 25.5 -29.5t74 -47t117.5 -29.5q74 0 133.5 52t59.5 130t-60.5 125t-140.5 47h-68l-28 64l202 235l52 51v4q-39 -6 -76 -6h-316v103h539v-74l-244 -283q102 -12 178 -77.5t76 -188.5q0 -119 -88 -204t-217 -85q-55 0 -105.5 14.5t-82 34t-56 39 t-37.5 33.5zM561 0l688 1440h119l-686 -1440h-121zM1180 233v78l434 580h112v-555h134v-103h-134v-233h-112v233h-434zM1319 336h295v278l6 127h-4q-33 -55 -66 -100l-231 -301v-4z" />
+<glyph unicode="&#xbf;" horiz-adv-x="901" d="M92 -68q0 94 38 169t91 126.5t107.5 98.5t92.5 109.5t38 135.5v82h137v-88q0 -88 -37 -160.5t-89 -124t-104.5 -99.5t-89 -109.5t-36.5 -132.5q0 -100 75.5 -168t192.5 -68q61 0 123.5 21.5t93.5 42.5l31 22l75 -102q-14 -12 -40.5 -32t-112.5 -52.5t-176 -32.5 q-176 0 -293 102t-117 260zM449 872v158h157v-158h-157z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1261" d="M27 0l528 1440h152l528 -1440h-150l-165 459h-580l-164 -459h-149zM381 582h496l-189 522l-55 186h-4q-31 -119 -56 -186zM393 1784h162l141 -244h-127z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1261" d="M27 0l528 1440h152l528 -1440h-150l-165 459h-580l-164 -459h-149zM381 582h496l-189 522l-55 186h-4q-31 -119 -56 -186zM565 1540l142 244h161l-176 -244h-127z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1261" d="M27 0l528 1440h152l528 -1440h-150l-165 459h-580l-164 -459h-149zM381 582h496l-189 522l-55 186h-4q-31 -119 -56 -186zM383 1540l170 244h154l172 -244h-136l-110 166h-4l-111 -166h-135z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1261" d="M27 0l528 1440h152l528 -1440h-150l-165 459h-580l-164 -459h-149zM311 1546q0 240 189 240q59 0 103 -37t81 -74t74 -37q82 0 82 142h110q0 -240 -188 -240q-59 0 -103.5 37t-81 73t-73.5 36q-80 0 -80 -140h-113zM381 582h496l-189 522l-55 186h-4q-31 -119 -56 -186z " />
+<glyph unicode="&#xc4;" horiz-adv-x="1261" d="M27 0l528 1440h152l528 -1440h-150l-165 459h-580l-164 -459h-149zM381 582h496l-189 522l-55 186h-4q-31 -119 -56 -186zM414 1608v176h125v-176h-125zM723 1608v176h127v-176h-127z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1261" d="M27 0l528 1440h152l528 -1440h-150l-165 459h-580l-164 -459h-149zM381 582h496l-189 522l-55 186h-4q-31 -119 -56 -186zM477 1662.5q0 63.5 45 104.5t108.5 41t109.5 -41t46 -104.5t-46 -104t-109.5 -40.5t-108.5 40.5t-45 104zM565 1663q0 -29 18.5 -48.5t47.5 -19.5 q31 0 49 19.5t18 48.5q0 31 -18 50.5t-49 19.5q-29 0 -47.5 -19.5t-18.5 -50.5z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1746" d="M20 0l592 1440h985v-127h-669v-525h547v-126h-547v-535h706v-127h-848v664h-348l-268 -664h-150zM489 786h297v527h-84z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1492" d="M115 729q0 313 206.5 524t516.5 211q96 0 185 -19.5t146.5 -46t101.5 -54t64 -46.5l21 -20l-76 -104q-6 6 -19.5 17t-57.5 38.5t-91 48t-120.5 38t-149.5 17.5q-252 0 -416 -173t-164 -429q0 -262 165 -443.5t419 -181.5q82 0 159.5 19.5t131 48.5t95.5 57.5t62 47.5 l19 20l82 -100l-23 -23q-14 -14 -65.5 -52t-108.5 -67.5t-148.5 -54.5t-185.5 -27l-16 -88q63 -10 103 -48t40 -97q0 -84 -56 -123t-140 -39l-103 10v99q39 -12 86 -13q104 0 104.5 70t-116.5 70l-31 -2l39 166q-291 25 -475 236.5t-184 512.5z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1169" d="M209 0v1440h811v-127h-670v-525h547v-126h-547v-535h707v-127h-848zM399 1784h162l141 -244h-127z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1169" d="M209 0v1440h811v-127h-670v-525h547v-126h-547v-535h707v-127h-848zM571 1540l142 244h161l-176 -244h-127z" />
+<glyph unicode="&#xca;" horiz-adv-x="1169" d="M209 0v1440h811v-127h-670v-525h547v-126h-547v-535h707v-127h-848zM391 1540l170 244h154l172 -244h-135l-111 166h-4l-111 -166h-135z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1169" d="M209 0v1440h811v-127h-670v-525h547v-126h-547v-535h707v-127h-848zM422 1608v176h125v-176h-125zM731 1608v176h127v-176h-127z" />
+<glyph unicode="&#xcc;" horiz-adv-x="559" d="M43 1784h162l141 -244h-127zM209 0v1440h141v-1440h-141z" />
+<glyph unicode="&#xcd;" horiz-adv-x="559" d="M209 0v1440h141v-1440h-141zM213 1540l141 244h162l-176 -244h-127z" />
+<glyph unicode="&#xce;" horiz-adv-x="559" d="M33 1540l170 244h153l172 -244h-135l-110 166h-4l-111 -166h-135zM209 0v1440h141v-1440h-141z" />
+<glyph unicode="&#xcf;" horiz-adv-x="559" d="M63 1608v176h125v-176h-125zM209 0v1440h141v-1440h-141zM373 1608v176h127v-176h-127z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1544" d="M119 662v122h123v656h463q330 0 526 -191.5t196 -527.5q0 -340 -196.5 -530.5t-525.5 -190.5h-463v662h-123zM383 127h307q270 0 430 154.5t160 439.5q0 283 -159.5 437.5t-430.5 154.5h-307v-529h342v-122h-342v-535z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1542" d="M209 0v1440h137l735 -1037l119 -194h4q-12 119 -12 194v1037h141v-1440h-137l-735 1036l-119 195h-4q12 -119 12 -195v-1036h-141zM453 1546q0 240 188 240q59 0 103 -37t81 -74t74 -37q82 0 82 142h111q0 -240 -189 -240q-59 0 -103 37t-81 73t-74 36q-80 0 -80 -140 h-112z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1687" d="M111 729q0 309 213 522t520 213t520 -213t213 -522q0 -315 -214 -534.5t-519 -219.5t-519 219.5t-214 534.5zM258 729q0 -262 170 -442.5t416 -180.5q244 0 415 180.5t171 442.5q0 256 -171.5 430t-414.5 174q-246 0 -416 -174t-170 -430zM604 1784h162l141 -244h-127z " />
+<glyph unicode="&#xd3;" horiz-adv-x="1687" d="M111 729q0 309 213 522t520 213t520 -213t213 -522q0 -315 -214 -534.5t-519 -219.5t-519 219.5t-214 534.5zM258 729q0 -262 170 -442.5t416 -180.5q244 0 415 180.5t171 442.5q0 256 -171.5 430t-414.5 174q-246 0 -416 -174t-170 -430zM776 1540l142 244h161 l-176 -244h-127z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1687" d="M111 729q0 309 213 522t520 213t520 -213t213 -522q0 -315 -214 -534.5t-519 -219.5t-519 219.5t-214 534.5zM258 729q0 -262 170 -442.5t416 -180.5q244 0 415 180.5t171 442.5q0 256 -171.5 430t-414.5 174q-246 0 -416 -174t-170 -430zM596 1540l170 244h154l172 -244 h-136l-110 166h-4l-111 -166h-135z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1687" d="M111 729q0 309 213 522t520 213t520 -213t213 -522q0 -315 -214 -534.5t-519 -219.5t-519 219.5t-214 534.5zM258 729q0 -262 170 -442.5t416 -180.5q244 0 415 180.5t171 442.5q0 256 -171.5 430t-414.5 174q-246 0 -416 -174t-170 -430zM524 1546q0 240 189 240 q59 0 103 -37t81 -74t74 -37q82 0 82 142h110q0 -240 -188 -240q-59 0 -103.5 37t-81 73t-73.5 36q-80 0 -80 -140h-113z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1687" d="M111 729q0 309 213 522t520 213t520 -213t213 -522q0 -315 -214 -534.5t-519 -219.5t-519 219.5t-214 534.5zM258 729q0 -262 170 -442.5t416 -180.5q244 0 415 180.5t171 442.5q0 256 -171.5 430t-414.5 174q-246 0 -416 -174t-170 -430zM627 1608v176h125v-176h-125z M936 1608v176h127v-176h-127z" />
+<glyph unicode="&#xd7;" horiz-adv-x="1341" d="M147 84l443 498l-443 497l84 84l439 -493l438 493l84 -84l-444 -497l444 -498l-84 -84l-438 494l-439 -494z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1693" d="M115 729q0 309 213 522t520 213q207 0 387 -108l96 135l84 -61l-96 -136q123 -102 192.5 -249.5t69.5 -315.5q0 -315 -214 -534.5t-519 -219.5q-215 0 -393 115l-99 -139l-86 59l101 142q-121 104 -188.5 254.5t-67.5 322.5zM262 729q0 -279 191 -463l702 979 q-143 88 -307 88q-246 0 -416 -174t-170 -430zM535 201q143 -94 313 -95q244 0 415 180.5t171 442.5q0 274 -195 453z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1482" d="M190 502v938h144v-936q0 -184 110.5 -291t296.5 -107q188 0 299 108t111 294v932h141v-938q0 -238 -151.5 -382.5t-397.5 -144.5q-248 0 -400.5 144.5t-152.5 382.5zM504 1784h162l141 -244h-127z" />
+<glyph unicode="&#xda;" horiz-adv-x="1482" d="M190 502v938h144v-936q0 -184 110.5 -291t296.5 -107q188 0 299 108t111 294v932h141v-938q0 -238 -151.5 -382.5t-397.5 -144.5q-248 0 -400.5 144.5t-152.5 382.5zM676 1540l141 244h162l-176 -244h-127z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1482" d="M190 502v938h144v-936q0 -184 110.5 -291t296.5 -107q188 0 299 108t111 294v932h141v-938q0 -238 -151.5 -382.5t-397.5 -144.5q-248 0 -400.5 144.5t-152.5 382.5zM494 1540l170 244h153l172 -244h-135l-111 166h-4l-110 -166h-135z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1482" d="M190 502v938h144v-936q0 -184 110.5 -291t296.5 -107q188 0 299 108t111 294v932h141v-938q0 -238 -151.5 -382.5t-397.5 -144.5q-248 0 -400.5 144.5t-152.5 382.5zM524 1608v176h125v-176h-125zM834 1608v176h127v-176h-127z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1175" d="M31 1440h162l305 -522q43 -74 88 -173h4q43 96 88 173l305 522h160l-484 -822v-618h-143v618zM520 1540l142 244h161l-176 -244h-127z" />
+<glyph unicode="&#xde;" horiz-adv-x="1226" d="M209 0v1440h141v-256h357q195 0 319.5 -119t124.5 -317q0 -197 -126 -318t-323 -121h-352v-309h-141zM350 436h338q145 0 230.5 83t85.5 228.5t-84 227.5t-230 82h-340v-621z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1173" d="M168 0v1087q0 174 123 275.5t289 101.5q160 0 259 -90t99 -215q0 -72 -36 -134t-78 -99t-77.5 -82t-35.5 -88q0 -45 62.5 -97.5t137 -96.5t137 -119.5t62.5 -163.5q0 -139 -96 -216t-236 -77q-86 0 -161.5 16t-108.5 33l-33 16v133q123 -74 293 -73q84 0 142.5 44 t58.5 128q0 63 -62.5 123.5t-138.5 101.5t-138.5 106.5t-62.5 137.5q0 59 36 114.5t78 92t78 90t36 108.5q0 72 -58.5 126t-163.5 54q-106 0 -186 -69.5t-80 -190.5v-1077h-139z" />
+<glyph unicode="&#xe0;" d="M84 281q0 356 631 356h57v27q0 266 -256 266q-76 0 -148.5 -24.5t-107.5 -49.5l-35 -25l-65 107q14 12 43.5 31.5t125 52.5t197.5 33q186 0 285.5 -101.5t99.5 -294.5v-659h-133v113l4 86h-4q-4 -8 -11 -23.5t-36 -54.5t-64.5 -67.5t-98 -53.5t-134.5 -25 q-141 0 -245.5 80.5t-104.5 225.5zM227 289q0 -78 60.5 -136.5t169.5 -58.5q139 0 227 119t88 264v45h-59q-86 0 -148.5 -5t-150.5 -25.5t-137.5 -71.5t-49.5 -131zM291 1440h162l141 -244h-127z" />
+<glyph unicode="&#xe1;" d="M84 281q0 356 631 356h57v27q0 266 -256 266q-76 0 -148.5 -24.5t-107.5 -49.5l-35 -25l-65 107q14 12 43.5 31.5t125 52.5t197.5 33q186 0 285.5 -101.5t99.5 -294.5v-659h-133v113l4 86h-4q-4 -8 -11 -23.5t-36 -54.5t-64.5 -67.5t-98 -53.5t-134.5 -25 q-141 0 -245.5 80.5t-104.5 225.5zM227 289q0 -78 60.5 -136.5t169.5 -58.5q139 0 227 119t88 264v45h-59q-86 0 -148.5 -5t-150.5 -25.5t-137.5 -71.5t-49.5 -131zM461 1196l141 244h162l-176 -244h-127z" />
+<glyph unicode="&#xe2;" d="M84 281q0 356 631 356h57v27q0 266 -256 266q-76 0 -148.5 -24.5t-107.5 -49.5l-35 -25l-65 107q14 12 43.5 31.5t125 52.5t197.5 33q186 0 285.5 -101.5t99.5 -294.5v-659h-133v113l4 86h-4q-4 -8 -11 -23.5t-36 -54.5t-64.5 -67.5t-98 -53.5t-134.5 -25 q-141 0 -245.5 80.5t-104.5 225.5zM227 289q0 -78 60.5 -136.5t169.5 -58.5q139 0 227 119t88 264v45h-59q-86 0 -148.5 -5t-150.5 -25.5t-137.5 -71.5t-49.5 -131zM283 1196l170 244h153l172 -244h-135l-111 166h-4l-110 -166h-135z" />
+<glyph unicode="&#xe3;" d="M84 281q0 356 631 356h57v27q0 266 -256 266q-76 0 -148.5 -24.5t-107.5 -49.5l-35 -25l-65 107q14 12 43.5 31.5t125 52.5t197.5 33q186 0 285.5 -101.5t99.5 -294.5v-659h-133v113l4 86h-4q-4 -8 -11 -23.5t-36 -54.5t-64.5 -67.5t-98 -53.5t-134.5 -25 q-141 0 -245.5 80.5t-104.5 225.5zM211 1202q0 240 188 240q59 0 103.5 -37t81.5 -74t73 -37q82 0 82 142h111q0 -240 -189 -240q-59 0 -103 37t-81 72.5t-74 35.5q-80 0 -79 -139h-113zM227 289q0 -78 60.5 -136.5t169.5 -58.5q139 0 227 119t88 264v45h-59 q-86 0 -148.5 -5t-150.5 -25.5t-137.5 -71.5t-49.5 -131z" />
+<glyph unicode="&#xe4;" d="M84 281q0 356 631 356h57v27q0 266 -256 266q-76 0 -148.5 -24.5t-107.5 -49.5l-35 -25l-65 107q14 12 43.5 31.5t125 52.5t197.5 33q186 0 285.5 -101.5t99.5 -294.5v-659h-133v113l4 86h-4q-4 -8 -11 -23.5t-36 -54.5t-64.5 -67.5t-98 -53.5t-134.5 -25 q-141 0 -245.5 80.5t-104.5 225.5zM227 289q0 -78 60.5 -136.5t169.5 -58.5q139 0 227 119t88 264v45h-59q-86 0 -148.5 -5t-150.5 -25.5t-137.5 -71.5t-49.5 -131zM313 1264v176h125v-176h-125zM623 1264v176h127v-176h-127z" />
+<glyph unicode="&#xe5;" d="M84 281q0 356 631 356h57v27q0 266 -256 266q-76 0 -148.5 -24.5t-107.5 -49.5l-35 -25l-65 107q14 12 43.5 31.5t125 52.5t197.5 33q186 0 285.5 -101.5t99.5 -294.5v-659h-133v113l4 86h-4q-4 -8 -11 -23.5t-36 -54.5t-64.5 -67.5t-98 -53.5t-134.5 -25 q-141 0 -245.5 80.5t-104.5 225.5zM227 289q0 -78 60.5 -136.5t169.5 -58.5q139 0 227 119t88 264v45h-59q-86 0 -148.5 -5t-150.5 -25.5t-137.5 -71.5t-49.5 -131zM375 1318.5q0 63.5 45 104.5t108.5 41t109.5 -41t46 -104.5t-46 -104t-109.5 -40.5t-108.5 40.5t-45 104z M463 1319q0 -29 18.5 -48.5t46.5 -19.5q31 0 49.5 19.5t18.5 48.5q0 31 -18.5 50.5t-49.5 19.5q-29 0 -47 -19.5t-18 -50.5z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1781" d="M84 281q0 70 23.5 125t58.5 90.5t91 62.5t105.5 40t119 20.5t113.5 8.5t107 1h68v35q0 266 -262 266q-154 0 -281 -94l-4 -5l-63 105q14 12 42.5 32.5t121 53.5t192.5 33q281 0 348 -213h4q127 213 389 213q199 0 312.5 -134.5t113.5 -328.5l-4 -78h-774 q4 -199 110.5 -306.5t274.5 -107.5q82 0 160 32t115 63l37 30l63 -106q-16 -16 -47 -40t-130 -64t-204 -40q-158 0 -276.5 76t-176.5 211h-4q-6 -23 -19 -51.5t-46 -72.5t-73 -77.5t-106.5 -59.5t-144.5 -26q-150 0 -252 81.5t-102 224.5zM227 289q0 -80 61.5 -137.5 t170.5 -57.5q139 0 226 120t87 265v35h-121q-82 0 -142 -6t-132 -26.5t-111 -69.5t-39 -123zM913 629h629q-6 152 -89 229.5t-202 77.5q-133 0 -223 -78.5t-115 -228.5z" />
+<glyph unicode="&#xe7;" horiz-adv-x="1126" d="M98 514q0 236 156 388.5t385 152.5q221 0 360 -131l17 -17l-72 -104q-12 14 -36.5 34.5t-103.5 55.5t-161 35q-172 0 -286.5 -116t-114.5 -298q0 -180 116.5 -297t288.5 -117q59 0 114.5 15.5t92.5 36t66.5 42t42.5 35.5l14 17l63 -109q-14 -16 -43.5 -42.5t-129 -70.5 t-210.5 -49l-16 -88q63 -10 103 -48t40 -97q0 -84 -56 -123t-140 -39l-103 10v99q39 -12 86 -13q104 0 104.5 70t-116.5 70l-31 -2l39 166q-207 23 -338 170t-131 364z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1132" d="M96 514q0 246 146.5 393.5t361.5 147.5q205 0 317.5 -136.5t112.5 -338.5l-4 -72h-790q4 -190 117.5 -299t281.5 -109q172 0 305 117l8 8l64 -106q-16 -16 -48 -40t-131.5 -64t-201.5 -40q-231 0 -385 151.5t-154 387.5zM246 623h647q-6 154 -88 234.5t-205 80.5 q-135 0 -232 -82.5t-122 -232.5zM369 1440h161l142 -244h-127z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1132" d="M96 514q0 246 146.5 393.5t361.5 147.5q205 0 317.5 -136.5t112.5 -338.5l-4 -72h-790q4 -190 117.5 -299t281.5 -109q172 0 305 117l8 8l64 -106q-16 -16 -48 -40t-131.5 -64t-201.5 -40q-231 0 -385 151.5t-154 387.5zM246 623h647q-6 154 -88 234.5t-205 80.5 q-135 0 -232 -82.5t-122 -232.5zM539 1196l141 244h162l-176 -244h-127z" />
+<glyph unicode="&#xea;" horiz-adv-x="1132" d="M96 514q0 246 146.5 393.5t361.5 147.5q205 0 317.5 -136.5t112.5 -338.5l-4 -72h-790q4 -190 117.5 -299t281.5 -109q172 0 305 117l8 8l64 -106q-16 -16 -48 -40t-131.5 -64t-201.5 -40q-231 0 -385 151.5t-154 387.5zM246 623h647q-6 154 -88 234.5t-205 80.5 q-135 0 -232 -82.5t-122 -232.5zM358 1196l170 244h154l172 -244h-135l-111 166h-4l-110 -166h-136z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1132" d="M96 514q0 246 146.5 393.5t361.5 147.5q205 0 317.5 -136.5t112.5 -338.5l-4 -72h-790q4 -190 117.5 -299t281.5 -109q172 0 305 117l8 8l64 -106q-16 -16 -48 -40t-131.5 -64t-201.5 -40q-231 0 -385 151.5t-154 387.5zM246 623h647q-6 154 -88 234.5t-205 80.5 q-135 0 -232 -82.5t-122 -232.5zM389 1264v176h125v-176h-125zM698 1264v176h127v-176h-127z" />
+<glyph unicode="&#xec;" horiz-adv-x="475" d="M0 1440h162l141 -244h-127zM168 0v1030h139v-1030h-139z" />
+<glyph unicode="&#xed;" horiz-adv-x="475" d="M168 0v1030h139v-1030h-139zM172 1196l141 244h162l-176 -244h-127z" />
+<glyph unicode="&#xee;" horiz-adv-x="475" d="M-8 1196l170 244h153l172 -244h-135l-110 166h-4l-111 -166h-135zM168 0v1030h139v-1030h-139z" />
+<glyph unicode="&#xef;" horiz-adv-x="475" d="M23 1264v176h124v-176h-124zM168 0v1030h139v-1030h-139zM332 1264v176h127v-176h-127z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1204" d="M100 475q0 197 130 339t360 142q178 0 287 -102l8 -8h4q-70 199 -254 325l-361 -163l-26 98l276 129q-131 68 -291 104l41 119q236 -59 402 -158l268 121l27 -98l-199 -92q309 -242 309 -672q0 -106 -29.5 -206.5t-89 -186.5t-160 -138.5t-229.5 -52.5q-215 0 -344 149.5 t-129 350.5zM244 473q0 -152 90 -262.5t244 -110.5q176 0 268 132.5t92 299.5q0 133 -92 219.5t-242 86.5q-174 0 -267 -107.5t-93 -257.5z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1214" d="M168 1030h137v-153l-4 -82h4q37 94 143.5 177t268.5 83q184 0 264 -100.5t80 -299.5v-655h-139v618q0 145 -44 225.5t-180 80.5q-131 0 -235.5 -81t-138.5 -210q-16 -57 -17 -139v-494h-139v1030zM317 1202q0 240 189 240q59 0 103 -37t81 -74t74 -37q82 0 82 142h110 q0 -240 -188 -240q-59 0 -103 37t-81 72.5t-74 35.5q-80 0 -80 -139h-113z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1273" d="M92 520q0 227 159 381t386 154t386 -153.5t159 -381.5q0 -231 -159 -388t-386 -157t-386 157t-159 388zM236 520q0 -178 116.5 -299t284.5 -121t284.5 121t116.5 299q0 174 -116.5 291t-284.5 117t-284.5 -117t-116.5 -291zM399 1440h162l141 -244h-127z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1273" d="M92 520q0 227 159 381t386 154t386 -153.5t159 -381.5q0 -231 -159 -388t-386 -157t-386 157t-159 388zM236 520q0 -178 116.5 -299t284.5 -121t284.5 121t116.5 299q0 174 -116.5 291t-284.5 117t-284.5 -117t-116.5 -291zM571 1196l142 244h161l-176 -244h-127z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1273" d="M92 520q0 227 159 381t386 154t386 -153.5t159 -381.5q0 -231 -159 -388t-386 -157t-386 157t-159 388zM236 520q0 -178 116.5 -299t284.5 -121t284.5 121t116.5 299q0 174 -116.5 291t-284.5 117t-284.5 -117t-116.5 -291zM389 1196l170 244h154l172 -244h-135l-111 166 h-4l-111 -166h-135z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1273" d="M92 520q0 227 159 381t386 154t386 -153.5t159 -381.5q0 -231 -159 -388t-386 -157t-386 157t-159 388zM236 520q0 -178 116.5 -299t284.5 -121t284.5 121t116.5 299q0 174 -116.5 291t-284.5 117t-284.5 -117t-116.5 -291zM317 1202q0 240 189 240q59 0 103 -37t81 -74 t74 -37q82 0 82 142h110q0 -240 -188 -240q-59 0 -103 37t-81 72.5t-74 35.5q-80 0 -80 -139h-113z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1273" d="M92 520q0 227 159 381t386 154t386 -153.5t159 -381.5q0 -231 -159 -388t-386 -157t-386 157t-159 388zM236 520q0 -178 116.5 -299t284.5 -121t284.5 121t116.5 299q0 174 -116.5 291t-284.5 117t-284.5 -117t-116.5 -291zM420 1264v176h125v-176h-125zM729 1264v176 h127v-176h-127z" />
+<glyph unicode="&#xf7;" horiz-adv-x="1323" d="M160 522v119h1003v-119h-1003zM584 125v151h153v-151h-153zM584 887v151h153v-151h-153z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1277" d="M94 520q0 227 159 381t386 154q150 0 279 -74l79 111l84 -62l-77 -110q180 -158 180 -400q0 -231 -159 -388t-386 -157q-139 0 -264 66l-78 -109l-84 62l76 104q-195 162 -195 422zM238 520q0 -188 129 -311l475 663q-94 55 -203 56q-168 0 -284.5 -117t-116.5 -291z M451 147q84 -47 188 -47q168 0 284.5 121t116.5 299q0 172 -116 289z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1204" d="M154 375v655h139v-618q0 -145 44 -225.5t179 -80.5q170 0 275.5 127t105.5 304v493h139v-1030h-135v154l4 82h-4q-39 -94 -144.5 -177.5t-258.5 -83.5q-180 0 -262 98.5t-82 301.5zM358 1440h162l142 -244h-127z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1204" d="M154 375v655h139v-618q0 -145 44 -225.5t179 -80.5q170 0 275.5 127t105.5 304v493h139v-1030h-135v154l4 82h-4q-39 -94 -144.5 -177.5t-258.5 -83.5q-180 0 -262 98.5t-82 301.5zM528 1196l142 244h161l-176 -244h-127z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1204" d="M154 375v655h139v-618q0 -145 44 -225.5t179 -80.5q170 0 275.5 127t105.5 304v493h139v-1030h-135v154l4 82h-4q-39 -94 -144.5 -177.5t-258.5 -83.5q-180 0 -262 98.5t-82 301.5zM348 1196l170 244h154l172 -244h-135l-111 166h-4l-111 -166h-135z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1204" d="M154 375v655h139v-618q0 -145 44 -225.5t179 -80.5q170 0 275.5 127t105.5 304v493h139v-1030h-135v154l4 82h-4q-39 -94 -144.5 -177.5t-258.5 -83.5q-180 0 -262 98.5t-82 301.5zM379 1264v176h125v-176h-125zM688 1264v176h127v-176h-127z" />
+<glyph unicode="&#xfd;" horiz-adv-x="1021" d="M14 -369l54 111q57 -47 122 -47q121 0 195 168l64 145l-431 1022h154l303 -751l37 -109h4q14 57 35 109l297 751h151l-507 -1245q-41 -100 -119 -157.5t-178 -57.5q-105 0 -181 61zM446 1196l142 244h162l-177 -244h-127z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1206" d="M168 -410v1850h139v-498l-2 -84h4l13 19q12 18 26 38.5t44 46t65 45t87 34t111 14.5q207 0 329 -149.5t122 -389.5q0 -242 -129 -391.5t-332 -149.5q-70 0 -131 20.5t-97 49.5t-62.5 57.5t-37.5 49.5l-10 20h-4q4 -37 4 -90v-492h-139zM303 514q0 -174 89 -294t241 -120 q141 0 235.5 114t94.5 302q0 184 -90.5 298t-233.5 114q-145 0 -240.5 -102.5t-95.5 -311.5z" />
+<glyph unicode="&#xff;" horiz-adv-x="1021" d="M14 -369l54 111q57 -47 122 -47q121 0 195 168l64 145l-431 1022h154l303 -751l37 -109h4q14 57 35 109l297 751h151l-507 -1245q-41 -100 -119 -157.5t-178 -57.5q-105 0 -181 61zM297 1264v176h125v-176h-125zM606 1264v176h127v-176h-127z" />
+<glyph unicode="&#x152;" horiz-adv-x="1951" d="M113 721q0 313 207.5 526t525.5 213q45 0 129 -10t115 -10h710v-127h-667v-525h544v-126h-544v-535h704v-127h-745q-29 0 -115 -10t-131 -10q-317 0 -525 213t-208 528zM260 721q0 -262 163 -437t423 -175l143 14v1192q-66 16 -143 16q-260 0 -423 -174t-163 -436z" />
+<glyph unicode="&#x153;" horiz-adv-x="2074" d="M94 512q0 240 158 391.5t383 151.5q154 0 275.5 -74t189.5 -203h4q59 131 175 204t265 73q205 0 318.5 -136.5t113.5 -338.5l-4 -72h-790q8 -195 121.5 -301.5t277.5 -106.5q84 0 162 32t112 63l37 30l66 -106q-16 -16 -48 -40t-131.5 -64t-203.5 -40q-160 0 -283 75 t-186 206h-4q-66 -131 -188.5 -206t-278.5 -75q-225 0 -383 149.5t-158 387.5zM238 512q0 -182 115.5 -297t283.5 -115t283.5 117t115.5 303q0 182 -116.5 295t-282.5 113q-168 0 -283.5 -116t-115.5 -300zM1188 623h645q-6 154 -87 234.5t-204 80.5q-135 0 -232 -82.5 t-122 -232.5z" />
+<glyph unicode="&#x178;" horiz-adv-x="1175" d="M31 1440h162l305 -522q43 -74 88 -173h4q43 96 88 173l305 522h160l-484 -822v-618h-143v618zM360 1608v176h125v-176h-125zM670 1608v176h127v-176h-127z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="1032" d="M268 1540l170 244h154l172 -244h-135l-111 166h-4l-111 -166h-135z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="1032" d="M197 1546q0 240 188 240q59 0 103 -37t81 -74t74 -37q82 0 82 142h111q0 -240 -189 -240q-59 0 -103 37t-81 73t-74 36q-80 0 -80 -140h-112z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1449" d="M213 522v119h1024v-119h-1024z" />
+<glyph unicode="&#x2014;" horiz-adv-x="1859" d="M213 522v119h1434v-119h-1434z" />
+<glyph unicode="&#x2018;" horiz-adv-x="440" d="M115 1106l116 352h111l-80 -352h-147z" />
+<glyph unicode="&#x2019;" horiz-adv-x="428" d="M117 1108l80 352h147l-115 -352h-112z" />
+<glyph unicode="&#x201a;" horiz-adv-x="487" d="M104 -184l80 352h146l-115 -352h-111z" />
+<glyph unicode="&#x201c;" horiz-adv-x="686" d="M115 1106l116 352h111l-80 -352h-147zM360 1106l115 352h113l-80 -352h-148z" />
+<glyph unicode="&#x201d;" horiz-adv-x="673" d="M117 1108l80 352h147l-115 -352h-112zM362 1108l80 352h148l-115 -352h-113z" />
+<glyph unicode="&#x201e;" horiz-adv-x="729" d="M104 -184l80 352h146l-115 -352h-111zM346 -184l80 352h145l-114 -352h-111z" />
+<glyph unicode="&#x2022;" horiz-adv-x="821" d="M119 596q0 121 86 207t206.5 86t205.5 -86t85 -207t-85 -207t-205.5 -86t-206.5 86t-86 207z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1464" d="M172 0v164h158v-164h-158zM653 0v164h158v-164h-158zM1135 0v164h157v-164h-157z" />
+<glyph unicode="&#x2039;" horiz-adv-x="702" d="M102 578l336 421h150l-336 -421l336 -420h-150z" />
+<glyph unicode="&#x203a;" horiz-adv-x="704" d="M115 158l336 420l-336 421h151l336 -421l-336 -420h-151z" />
+<glyph unicode="&#x20ac;" horiz-adv-x="1208" d="M84 545v104h113q-12 72 0 166h-113v105h131q61 242 249.5 393t438.5 151l195 -24l-35 -133q-76 23 -162 22q-195 0 -338 -112.5t-196 -296.5h626l-20 -105h-629q-12 -78 -2 -166h600l-20 -104h-557q49 -195 195.5 -314.5t344.5 -119.5q45 0 91 7t69 13l22 8l33 -133 q-94 -31 -217 -31q-258 0 -447.5 159t-244.5 411h-127z" />
+<glyph unicode="&#x2122;" horiz-adv-x="1908" d="M55 1333v107h758v-107h-321v-790h-117v790h-320zM887 543l71 897h107l235 -514q18 -39 29 -84h4q10 45 29 84l235 514h107l70 -897h-113l-51 608l2 59h-4l-230 -499h-94l-229 499h-4l2 -59l-52 -608h-114z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1030" d="M0 1030h1030v-1030h-1030v1030z" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1130" d="M86 913v117h129v37q0 119 38 202t99.5 118.5t112.5 49t106 13.5l64 -4v-125q-20 4 -49 4q-37 0 -71 -9t-74 -32.5t-63.5 -80t-23.5 -136.5v-37h609v-1030h-140v913h-469v-913h-139v913h-129zM819 1266v174h146v-174h-146z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="1161" d="M86 901v117h129v49q0 119 38 202t99.5 118.5t112.5 49t106 13.5l64 -4v-125q-20 4 -49 4q-37 0 -71 -9t-74 -32.5t-63.5 -80t-23.5 -136.5v-49h264v-117h-264v-901h-139v901h-129zM813 244v1196h139v-1166q0 -156 115 -155l35 2v-125q-25 -4 -51 -4q-238 0 -238 252z" />
+<glyph unicode="&#xfb03;" horiz-adv-x="1785" d="M86 913v117h129v37q0 119 38 202t99.5 118.5t112.5 49t106 13.5l64 -4v-125q-20 4 -49 4q-37 0 -71 -9t-74 -32.5t-63.5 -80t-23.5 -136.5v-37h516v37q0 119 38 202t99.5 118.5t112.5 49t107 13.5l63 -4v-125q-20 4 -49 4q-37 0 -70.5 -9t-73.5 -32.5t-63.5 -80 t-23.5 -136.5v-37h608v-1030h-139v913h-469v-913h-140v913h-516v-913h-139v913h-129zM1475 1266v174h145v-174h-145z" />
+<glyph unicode="&#xfb04;" horiz-adv-x="1816" d="M86 913v117h129v37q0 119 38 202t99.5 118.5t112.5 49t106 13.5l64 -4v-125q-20 4 -49 4q-37 0 -71 -9t-74 -32.5t-63.5 -80t-23.5 -136.5v-37h516v37q0 119 38 202t99.5 118.5t112.5 49t107 13.5l63 -4v-125q-20 4 -49 4q-37 0 -70.5 -9t-73.5 -32.5t-63.5 -80 t-23.5 -136.5v-37h264v-117h-264v-913h-140v913h-516v-913h-139v913h-129zM1468 244v1196h140v-1166q0 -156 114 -155l35 2v-125q-25 -4 -51 -4q-238 0 -238 252z" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/phonegap/www/fonts/MuseoSans_300-webfont.ttf b/phonegap/www/fonts/MuseoSans_300-webfont.ttf
new file mode 100755
index 000000000..0a4444b76
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_300-webfont.ttf
Binary files differ
diff --git a/phonegap/www/fonts/MuseoSans_300-webfont.woff b/phonegap/www/fonts/MuseoSans_300-webfont.woff
new file mode 100755
index 000000000..22110a14e
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_300-webfont.woff
Binary files differ
diff --git a/phonegap/www/fonts/MuseoSans_300_Italic-webfont.eot b/phonegap/www/fonts/MuseoSans_300_Italic-webfont.eot
new file mode 100755
index 000000000..3a35076a1
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_300_Italic-webfont.eot
Binary files differ
diff --git a/phonegap/www/fonts/MuseoSans_300_Italic-webfont.svg b/phonegap/www/fonts/MuseoSans_300_Italic-webfont.svg
new file mode 100755
index 000000000..b848d3756
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_300_Italic-webfont.svg
@@ -0,0 +1,227 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>
+This is a custom SVG webfont generated by Fontspring.
+</metadata>
+<defs>
+<font id="MuseoSans300Italic" horiz-adv-x="1255" >
+<font-face units-per-em="2048" ascent="1536" descent="-512" />
+<missing-glyph horiz-adv-x="555" />
+<glyph unicode=" " horiz-adv-x="555" />
+<glyph unicode="&#x09;" horiz-adv-x="555" />
+<glyph unicode="&#xa0;" horiz-adv-x="555" />
+<glyph unicode="!" horiz-adv-x="632" d="M117 0l33 162h161l-32 -162h-162zM205 377l201 1063h145l-215 -1063h-131z" />
+<glyph unicode="&#x22;" horiz-adv-x="647" d="M236 1114l67 346h119l-66 -346h-120zM485 1114l66 346h121l-68 -346h-119z" />
+<glyph unicode="#" horiz-adv-x="1480" d="M53 399l43 115h287l149 401h-286l41 115h286l152 410h129l-152 -410h355l151 410h127l-151 -410h284l-41 -115h-284l-150 -401h283l-41 -115h-285l-147 -399h-129l149 399h-354l-147 -399h-129l149 399h-289zM512 514h352l150 401h-355z" />
+<glyph unicode="$" horiz-adv-x="1142" d="M41 160l96 100q4 -6 14.5 -16.5t43 -36t70.5 -45t98.5 -35.5t125.5 -16q135 0 238.5 82.5t103.5 212.5q0 80 -61 140t-149.5 102t-175.5 88t-148 123t-61 181q0 160 132 284t324 138l39 191h115l-37 -193q94 -10 172 -44t109 -62l30 -29l-84 -108q-12 12 -35.5 30.5 t-101.5 50t-162 31.5q-150 0 -253 -90t-103 -199q0 -72 61.5 -127t149.5 -97t175 -90t148.5 -129t61.5 -191q0 -168 -131 -294t-328 -137l-35 -186h-114l34 193q-111 12 -200.5 56t-124.5 83z" />
+<glyph unicode="%" horiz-adv-x="1505" d="M18 0l1360 1440h160l-1364 -1440h-156zM221 1147q0 121 102.5 219t231.5 98q113 0 182.5 -69.5t69.5 -180.5q0 -125 -101.5 -222t-230.5 -97q-117 0 -185.5 68.5t-68.5 183.5zM344 1145q0 -57 39 -96t100 -39q80 0 140.5 61.5t60.5 142.5q0 57 -38 96.5t-99 39.5 q-80 0 -141.5 -62.5t-61.5 -142.5zM741 227q0 121 102.5 219.5t231.5 98.5q115 0 183.5 -69.5t68.5 -180.5q0 -125 -101.5 -222.5t-230.5 -97.5q-115 0 -184.5 68.5t-69.5 183.5zM864 225q0 -59 39 -97t101 -38q80 0 140 60.5t60 142.5q0 59 -38 98t-99 39 q-78 0 -140.5 -62.5t-62.5 -142.5z" />
+<glyph unicode="&#x26;" horiz-adv-x="1378" d="M76 342q0 145 97 270t249 164v4q-6 2 -16.5 7.5t-35 24.5t-44 45t-36 73t-16.5 104q0 188 140.5 309t349.5 121l176 -26l-57 -113q-68 14 -119 14q-141 0 -242.5 -85t-101.5 -222q0 -201 266 -201h303l41 203h139l-39 -203h195l-25 -126h-194l-43 -211 q-104 -518 -553 -519q-205 0 -319.5 100.5t-114.5 266.5zM223 346q0 -104 77 -170.5t212 -66.5q334 0 412 389l41 207h-303q-182 0 -310.5 -94.5t-128.5 -264.5z" />
+<glyph unicode="'" horiz-adv-x="401" d="M236 1114l67 346h121l-66 -346h-122z" />
+<glyph unicode="(" horiz-adv-x="587" d="M143 350q0 637 418 1145h135q-424 -535 -424 -1149q0 -289 97 -541h-125q-101 258 -101 545z" />
+<glyph unicode=")" horiz-adv-x="589" d="M-94 -195q424 535 424 1149q0 289 -97 541h125q100 -258 101 -545q0 -637 -418 -1145h-135z" />
+<glyph unicode="*" horiz-adv-x="956" d="M178 1108l64 125l274 -109l49 316h140l-76 -316l319 107l19 -129l-324 -90v-4l141 -242l-114 -78l-127 260h-4l-226 -258l-100 80l242 250v4z" />
+<glyph unicode="+" horiz-adv-x="1390" d="M143 522l23 119h471l104 522h125l-102 -522h471l-23 -119h-471l-102 -522h-125l102 522h-473z" />
+<glyph unicode="," horiz-adv-x="507" d="M-78 -199l191 367h157l-223 -367h-125z" />
+<glyph unicode="-" horiz-adv-x="999" d="M190 518l23 127h582l-25 -127h-580z" />
+<glyph unicode="." horiz-adv-x="497" d="M51 0l33 170h166l-33 -170h-166z" />
+<glyph unicode="/" horiz-adv-x="804" d="M-53 -86l831 1606h140l-832 -1606h-139z" />
+<glyph unicode="0" horiz-adv-x="1290" d="M137 440q0 119 20.5 249t69.5 270.5t121 251t186.5 182t253.5 71.5q406 0 406 -467q0 -119 -19.5 -249t-68.5 -270t-121 -249.5t-186.5 -181.5t-255.5 -72q-406 0 -406 465zM285 440q0 -332 262 -331q106 0 194 62t143.5 158.5t93.5 218.5t53.5 234.5t15.5 212.5 q0 336 -263 336q-125 0 -226 -88t-157.5 -226t-86 -287t-29.5 -290z" />
+<glyph unicode="1" horiz-adv-x="954" d="M4 0l23 127h323l203 1042l18 80h-4q-20 -29 -90 -86l-178 -147l-78 100l393 324h134l-259 -1313h318l-25 -127h-778z" />
+<glyph unicode="2" horiz-adv-x="1161" d="M18 0q2 123 56.5 227.5t137.5 179t182.5 141t198.5 127t181 122t133 140.5t51 169q0 102 -66.5 162.5t-184.5 60.5q-59 0 -119 -20.5t-102 -48t-75.5 -56t-50.5 -49.5l-16 -20l-100 79q8 10 22.5 26.5t62.5 59.5t100 77t132 60.5t160 26.5q182 0 285.5 -95t103.5 -253 q0 -141 -86 -259t-213 -201t-256 -158.5t-232.5 -171t-125.5 -199.5h745l-24 -127h-900z" />
+<glyph unicode="3" horiz-adv-x="1159" d="M8 172l96 98q4 -6 13.5 -17t41 -39t69.5 -48.5t99.5 -37.5t129.5 -17q150 0 269.5 108.5t119.5 263.5q0 119 -87 182.5t-222 63.5h-107l-18 84l440 422l90 80v4q-41 -6 -117 -6h-530l24 127h842l-18 -94l-525 -498q47 -2 94.5 -13.5t99.5 -39t91 -66.5t64.5 -102.5 t25.5 -141.5q0 -205 -159.5 -357.5t-376.5 -152.5q-88 0 -166 20.5t-127 49.5t-86 57.5t-53 49.5z" />
+<glyph unicode="4" horiz-adv-x="1226" d="M33 399l18 93l879 948h166l-178 -916h204l-24 -125h-205l-78 -399h-141l78 399h-719zM240 524h536l117 602l33 136h-4l-13 -17q-12 -16 -34.5 -43.5t-43.5 -48.5z" />
+<glyph unicode="5" horiz-adv-x="1157" d="M31 180l102 92q4 -6 11.5 -17t34 -39t58 -49.5t87 -38.5t118.5 -17q164 0 295 118.5t131 286.5q0 119 -86 194.5t-223 75.5q-152 0 -276 -77l-88 32l213 699h700l-25 -127h-571l-115 -365l-28 -82h4q94 51 217 52q190 0 308 -112t118 -286q0 -225 -173 -385t-401 -160 q-252 0 -385 166z" />
+<glyph unicode="6" horiz-adv-x="1228" d="M127 494q0 106 31.5 233t97.5 258t157 237.5t222 174t278 67.5q78 0 146.5 -15t99.5 -30l31 -14l-72 -119q-84 45 -203 45q-211 0 -368.5 -171t-224.5 -406h4q66 78 168 123t208 45q178 0 283 -103.5t105 -275.5q0 -217 -147.5 -392.5t-379.5 -175.5q-203 0 -319.5 141.5 t-116.5 377.5zM274 467q0 -141 77 -249.5t210 -108.5q162 0 273.5 125.5t111.5 304.5q0 119 -71.5 187.5t-200.5 68.5q-137 0 -268.5 -95.5t-131.5 -232.5z" />
+<glyph unicode="7" horiz-adv-x="1071" d="M66 0l813 1180q25 35 50 67.5t40 48.5l14 17v4q-37 -4 -109 -4h-661l25 127h936l-19 -99l-930 -1341h-159z" />
+<glyph unicode="8" horiz-adv-x="1247" d="M90 356q0 94 44 180.5t109.5 145.5t105.5 88t69 43q-135 100 -135 244q0 160 136 283.5t353 123.5q188 0 292.5 -86t104.5 -235q0 -76 -33.5 -156t-86 -143.5t-84 -95t-60.5 -56.5q162 -104 162 -260q0 -190 -161 -323.5t-382 -133.5q-190 0 -312 102.5t-122 278.5z M240 360q0 -117 83 -185.5t203 -68.5q152 0 272 91.5t120 232.5q0 45 -22 83t-68 70.5t-84.5 54t-110.5 55.5t-107 52q-37 -20 -75.5 -47.5t-91 -77t-86 -118t-33.5 -142.5zM430 1057q0 -37 16.5 -71t37 -57.5t65.5 -51t72.5 -41t88 -42t85.5 -40.5q229 190 229 381 q0 92 -69.5 145t-186.5 53q-145 0 -241.5 -81.5t-96.5 -194.5z" />
+<glyph unicode="9" horiz-adv-x="1228" d="M82 35l72 119q86 -45 204 -45q143 0 268.5 88t203 214t120.5 275h-4q-61 -74 -163.5 -121t-211.5 -47q-180 0 -284.5 102.5t-104.5 276.5q0 217 148.5 392t380.5 175q203 0 318.5 -141t115.5 -377q0 -106 -32 -233t-97.5 -258t-156.5 -237.5t-222 -174.5t-279 -68 q-78 0 -146.5 14.5t-98.5 30.5zM326 901q0 -119 71.5 -187.5t196.5 -68.5q137 0 271 95.5t134 232.5q0 141 -77.5 249.5t-208.5 108.5q-162 0 -274.5 -126t-112.5 -304z" />
+<glyph unicode=":" horiz-adv-x="600" d="M98 0l33 170h166l-33 -170h-166zM266 860l33 170h166l-33 -170h-166z" />
+<glyph unicode=";" horiz-adv-x="608" d="M-41 -199l188 367h160l-223 -367h-125zM279 860l32 170h166l-33 -170h-165z" />
+<glyph unicode="&#x3c;" horiz-adv-x="1206" d="M94 530v103l926 414v-138l-752 -325v-4l752 -326v-137z" />
+<glyph unicode="=" horiz-adv-x="1406" d="M215 344v119h954v-119h-954zM215 700v119h954v-119h-954z" />
+<glyph unicode="&#x3e;" horiz-adv-x="1181" d="M150 117v137l751 326v4l-751 325v138l925 -414v-103z" />
+<glyph unicode="?" horiz-adv-x="976" d="M180 0l33 162h160l-33 -162h-160zM213 1358q16 12 47 30.5t120 48t173 29.5q162 0 260 -86t98 -225q0 -100 -45 -183t-112.5 -140.5t-137 -109.5t-127 -117.5t-71.5 -139.5l-19 -88h-137l19 92q18 94 75.5 173t124 132t131 105.5t107.5 118t43 143.5q0 84 -60.5 138 t-162.5 54q-66 0 -132.5 -21.5t-99.5 -43.5l-35 -23z" />
+<glyph unicode="@" horiz-adv-x="1624" d="M96 358q0 231 125 438.5t327 329t421 121.5q236 0 342 -89t106 -234q0 -27 -8 -80l-123 -629h146l-23 -115h-530q-162 0 -260.5 95.5t-98.5 240.5q0 174 142.5 312.5t330.5 138.5h285q4 25 4 39q0 88 -77 144t-230 56q-291 0 -513 -231t-222 -533q0 -217 136 -356 t363 -139l-22 -121q-268 0 -444.5 174t-176.5 438zM664 438q0 -96 63.5 -159.5t167.5 -63.5h254l108 563h-249q-135 0 -239.5 -103.5t-104.5 -236.5z" />
+<glyph unicode="A" d="M-88 0l803 1440h155l248 -1440h-143l-76 459h-580l-253 -459h-154zM383 582h496l-86 522l-23 186h-4q-53 -119 -90 -186z" />
+<glyph unicode="B" horiz-adv-x="1284" d="M90 0l281 1440h463q104 0 172 -27q182 -72 182 -276q0 -131 -68.5 -230.5t-181.5 -146.5v-4q82 -29 130 -103.5t48 -179.5q0 -152 -79 -265.5t-206 -168.5q-92 -39 -204 -39h-537zM256 127h369q86 0 149 29q88 41 141.5 125t53.5 192q0 102 -63.5 160.5t-172.5 58.5h-366 zM391 815h348q123 0 212 88t89 221q0 88 -53 138.5t-151 50.5h-349z" />
+<glyph unicode="C" horiz-adv-x="1488" d="M121 594q0 233 119.5 435t317.5 318.5t417 116.5q297 0 477 -155l31 -31l-90 -100q-6 6 -17.5 16t-50.5 36.5t-83 47t-115.5 37t-147.5 16.5q-287 0 -499 -218t-212 -515q0 -215 130 -352t347 -137q129 0 255 48t188 95l61 47l70 -111q-10 -8 -28.5 -22t-78 -51t-123 -66 t-158.5 -51.5t-190 -22.5q-285 0 -452.5 172.5t-167.5 446.5z" />
+<glyph unicode="D" horiz-adv-x="1511" d="M90 0l281 1440h436q293 0 459 -146.5t166 -412.5q0 -369 -241 -625t-611 -256h-490zM254 127h309q311 0 516 214t205 531q0 211 -130 326t-359 115h-308z" />
+<glyph unicode="E" horiz-adv-x="1163" d="M90 0l281 1440h811l-27 -127h-668l-102 -525h547l-25 -126h-545l-106 -535h705l-23 -127h-848z" />
+<glyph unicode="F" horiz-adv-x="1056" d="M90 0l281 1440h757l-24 -127h-617l-104 -541h528l-24 -127h-529l-127 -645h-141z" />
+<glyph unicode="G" horiz-adv-x="1550" d="M119 578q0 236 118.5 440.5t318.5 325t425 120.5q152 0 276.5 -42t176.5 -83l49 -41l-90 -102q-6 6 -17.5 15.5t-50.5 32t-83 41t-114.5 32.5t-144.5 14q-293 0 -505 -223t-212 -524q0 -213 129 -344t338 -131q80 0 161 22.5t139.5 56t104.5 66.5t70 55l23 23l47 229 h-246l25 127h379l-133 -688h-132l23 111l14 61h-4q-8 -8 -22.5 -21.5t-64.5 -47t-103 -59.5t-134 -47.5t-163 -21.5q-264 0 -431 168.5t-167 434.5z" />
+<glyph unicode="H" horiz-adv-x="1536" d="M90 0l281 1440h141l-127 -656h834l129 656h141l-281 -1440h-143l129 657h-834l-129 -657h-141z" />
+<glyph unicode="I" horiz-adv-x="559" d="M90 0l281 1440h141l-281 -1440h-141z" />
+<glyph unicode="J" horiz-adv-x="1060" d="M14 301q0 51 11 107l10 53h141l-8 -51q-10 -51 -10 -88q0 -213 213 -213q68 0 129 25.5t115.5 95t74.5 173.5l174 910h-350l25 127h491l-203 -1051q-41 -213 -170 -313.5t-288 -100.5q-152 0 -253.5 81t-101.5 245z" />
+<glyph unicode="K" horiz-adv-x="1228" d="M90 0l281 1440h141l-121 -625h234l518 625h168l-572 -686v-4l314 -750h-154l-283 688h-249l-136 -688h-141z" />
+<glyph unicode="L" horiz-adv-x="1044" d="M90 0l281 1440h141l-256 -1313h668l-27 -127h-807z" />
+<glyph unicode="M" horiz-adv-x="1746" d="M43 0l395 1440h144l211 -846l36 -176h5q57 100 104 176l543 846h149l-166 -1440h-139l119 1008q4 35 11 85t13.5 82.5t8.5 32.5h-4q-66 -127 -115 -200l-481 -740h-134l-196 740l-39 204h-4q-20 -127 -41 -204l-279 -1008h-141z" />
+<glyph unicode="N" horiz-adv-x="1529" d="M90 0l281 1440h127l532 -1037q37 -72 80 -194h4q10 119 25 194l202 1037h142l-281 -1440h-127l-532 1036l-82 195h-4q-10 -119 -25 -195l-201 -1036h-141z" />
+<glyph unicode="O" horiz-adv-x="1683" d="M119 598q0 227 124 429t323.5 319.5t416.5 117.5q279 0 453 -170t174 -436q0 -231 -125 -437t-326 -326t-416 -120q-279 0 -451.5 174.5t-172.5 448.5zM264 602q0 -217 134 -355t347 -138q272 0 494.5 222t222.5 521q0 211 -134 345t-347 134q-276 0 -496.5 -217 t-220.5 -512z" />
+<glyph unicode="P" horiz-adv-x="1228" d="M90 0l281 1440h471q141 0 227 -49q170 -92 170 -304q0 -164 -86 -292.5t-223 -188.5q-100 -41 -209 -41h-379l-111 -565h-141zM367 692h340q94 0 167 33q98 45 158 137t60 219q0 111 -70 171.5t-197 60.5h-338z" />
+<glyph unicode="Q" horiz-adv-x="1708" d="M119 598q0 227 124 429t324.5 319.5t417.5 117.5q279 0 452 -170t173 -436q0 -365 -285 -633l139 -174l-94 -84l-139 178q-225 -170 -486 -170q-279 0 -452.5 174.5t-173.5 448.5zM266 602q0 -217 134.5 -355t344.5 -138q215 0 402 141l-143 182l94 84l143 -186 q221 225 221 522q0 211 -133 345t-346 134q-276 0 -496.5 -217t-220.5 -512z" />
+<glyph unicode="R" horiz-adv-x="1282" d="M90 0l281 1440h473q125 0 200 -39q170 -82 170 -291q0 -170 -101 -301t-263 -168v-4q10 -18 24 -59l205 -578h-151l-211 606h-367l-117 -606h-143zM375 733h334q152 0 256 101.5t104 261.5q0 102 -64.5 159.5t-177.5 57.5h-340z" />
+<glyph unicode="S" horiz-adv-x="1101" d="M20 160l95 100q4 -6 14 -16.5t43 -36t71 -45t98 -35.5t126 -16q135 0 238.5 82.5t103.5 212.5q0 80 -61.5 140t-149.5 102t-175 88t-148.5 123t-61.5 181q0 170 147.5 297t354.5 127q117 0 212 -34.5t134 -69.5l37 -35l-84 -108q-12 12 -36 30.5t-100.5 50t-160.5 31.5 q-152 0 -255.5 -89t-103.5 -200q0 -72 61.5 -127t148.5 -97t175 -90t149.5 -129t61.5 -191q0 -174 -140 -302.5t-347 -128.5q-258 0 -420 156z" />
+<glyph unicode="T" horiz-adv-x="1191" d="M143 1313l23 127h1173l-22 -127h-518l-254 -1313h-144l256 1313h-514z" />
+<glyph unicode="U" horiz-adv-x="1476" d="M156 393q0 55 12 117l182 930h142l-183 -934q-10 -49 -10 -96q0 -143 90 -222t252 -79q186 0 317.5 107.5t167.5 293.5l183 930h143l-188 -948q-47 -240 -215 -378.5t-410 -138.5q-219 0 -351 111.5t-132 306.5z" />
+<glyph unicode="V" horiz-adv-x="1259" d="M178 1440h146l184 -1094q12 -74 18 -186h4l15 28q14 31 36.5 79t41.5 79l612 1094h160l-813 -1440h-154z" />
+<glyph unicode="W" horiz-adv-x="1908" d="M236 1440h145l63 -1118l2 -154h5q33 80 67 154l537 1118h141l72 -1118l4 -154h4q31 82 61 154l498 1118h156l-654 -1440h-172l-69 1014l-4 215h-5q-51 -121 -94 -213l-491 -1016h-168z" />
+<glyph unicode="X" horiz-adv-x="1198" d="M-66 0l605 758l-285 682h154l170 -422l63 -164h4q57 86 117 162l340 424h170l-561 -697l319 -743h-151l-207 492l-60 159h-4q-55 -82 -114 -155l-396 -496h-164z" />
+<glyph unicode="Y" horiz-adv-x="1155" d="M176 1440h152l202 -522l58 -173h4q59 94 119 170l405 525h172l-649 -826l-121 -614h-141l123 618z" />
+<glyph unicode="Z" horiz-adv-x="1210" d="M-35 0l21 100l942 1082q68 78 127 131v4q-33 -4 -105 -4h-690l27 127h979l-21 -101l-944 -1081q-68 -78 -127 -131v-4q35 4 105 4h737l-25 -127h-1026z" />
+<glyph unicode="[" horiz-adv-x="581" d="M59 -195l330 1690h277l-23 -115h-149l-281 -1460h147l-22 -115h-279z" />
+<glyph unicode="\" horiz-adv-x="790" d="M242 1520h125l206 -1606h-124z" />
+<glyph unicode="]" horiz-adv-x="569" d="M-82 -195l23 115h149l283 1460h-150l23 115h278l-327 -1690h-279z" />
+<glyph unicode="^" horiz-adv-x="1241" d="M31 512l405 928h96l406 -928h-133l-320 758l-319 -758h-135z" />
+<glyph unicode="_" horiz-adv-x="1187" d="M-76 -119l23 119h1057l-23 -119h-1057z" />
+<glyph unicode="`" horiz-adv-x="1032" d="M281 1784h151l96 -244h-118z" />
+<glyph unicode="a" horiz-adv-x="1067" d="M16 236q0 96 46.5 169.5t116 116.5t165.5 69.5t184 36t183 9.5h65q14 63 15 108q0 184 -211 185q-76 0 -154 -24.5t-119 -49.5l-39 -25l-45 117q16 12 48 29.5t128.5 47.5t192.5 30q160 0 250 -73t90 -220q0 -51 -12 -113l-127 -649h-134l25 119l23 88h-5q2 0 -13 -23.5 t-47 -58.5t-75 -68.5t-107.5 -57.5t-133.5 -24q-131 0 -220.5 70t-89.5 191zM160 254q0 -68 50 -114t148 -46q135 0 247 122t145 269l8 37h-60q-538 0 -538 -268z" />
+<glyph unicode="b" horiz-adv-x="1210" d="M51 0l279 1440h139l-96 -498l-27 -94h4q55 92 157.5 149.5t215.5 57.5q180 0 279.5 -110.5t99.5 -303.5q0 -287 -169 -476.5t-392 -189.5q-117 0 -204 55.5t-120 155.5h-4q0 -43 -10 -92l-19 -94h-133zM274 391q0 -127 64.5 -209t193.5 -82q162 0 294 147.5t132 383.5 q0 139 -69.5 218t-190.5 79q-182 0 -303 -164t-121 -373z" />
+<glyph unicode="c" horiz-adv-x="1124" d="M68 414q0 272 191.5 456.5t440.5 184.5q115 0 208 -37t128 -74l37 -37l-84 -94q-10 12 -31.5 31.5t-95.5 51.5t-155 32q-193 0 -344.5 -145.5t-151.5 -356.5q0 -145 93 -235.5t243 -90.5q188 0 346 133l14 13l43 -117q-6 -6 -18 -16.5t-54 -37t-86 -47t-113 -37 t-138 -16.5q-211 0 -342 121t-131 318z" />
+<glyph unicode="d" horiz-adv-x="1210" d="M70 389q0 287 169 476.5t396 189.5q113 0 199 -52.5t118 -152.5h4q0 43 9 86l98 504h139l-278 -1440h-136l21 109l22 81h-4q-55 -90 -154.5 -152.5t-219.5 -62.5q-184 0 -283.5 110.5t-99.5 303.5zM213 397q0 -139 69.5 -218t192.5 -79q182 0 302 167t120 370 q0 127 -64.5 209t-191.5 82q-162 0 -295 -147.5t-133 -383.5z" />
+<glyph unicode="e" horiz-adv-x="1132" d="M70 410q0 258 172 451.5t426 193.5q186 0 281 -102.5t95 -270.5q0 -35 -8 -79t-16 -71l-6 -24h-791q-8 -41 -8 -88q0 -139 86 -229.5t244 -90.5q82 0 166 32t127 63l43 30l45 -114q-18 -14 -52 -37t-135.5 -61t-197.5 -38q-211 0 -341 120t-130 315zM250 623h645 q6 35 6 71q0 119 -64.5 181.5t-168.5 62.5q-133 0 -249 -84t-169 -231z" />
+<glyph unicode="f" horiz-adv-x="661" d="M102 0l177 903h-129l22 119h129l10 53q23 117 75 198t118.5 115.5t119 48t103.5 13.5l76 -4l-27 -125q-18 4 -47 4t-56.5 -4t-63.5 -20.5t-65.5 -43t-56 -75.5t-38.5 -115l-11 -45h264l-22 -119h-262l-176 -903h-140z" />
+<glyph unicode="g" horiz-adv-x="1193" d="M10 -344l68 106q115 -68 270 -67q158 0 272.5 81t149.5 242l21 95l22 82h-4q-127 -188 -342 -189q-182 0 -286.5 111.5t-104.5 298.5q0 152 60.5 294t187.5 243.5t292 101.5q117 0 207 -43t121 -140h4q-2 23 2 46l23 112h135l-199 -1018q-45 -229 -197.5 -335.5 t-353.5 -106.5q-188 0 -348 86zM219 424q0 -137 70.5 -215t200 -78t223.5 90t135 211t41 246q0 250 -262 250q-186 0 -297 -152.5t-111 -351.5z" />
+<glyph unicode="h" horiz-adv-x="1216" d="M49 0l281 1440h139l-107 -557l-24 -92h4q49 94 173 179t278 85q141 0 216.5 -67.5t75.5 -199.5q0 -55 -16 -137l-125 -651h-139l119 616q16 94 16 138q0 84 -47 127t-129 43q-170 0 -308.5 -132.5t-174.5 -314.5l-93 -477h-139z" />
+<glyph unicode="i" horiz-adv-x="475" d="M49 0l201 1030h139l-201 -1030h-139zM289 1266l37 174h149l-35 -174h-151z" />
+<glyph unicode="j" horiz-adv-x="475" d="M-309 -416l24 121q16 -2 45 -2q37 0 73 9t80 34t80 82t52 139l205 1063h139l-207 -1067q-23 -121 -74 -204t-115.5 -118.5t-115.5 -49t-104 -13.5zM289 1266l35 174h149l-33 -174h-151z" />
+<glyph unicode="k" horiz-adv-x="1026" d="M49 0l283 1440h139l-158 -803h160l385 393h176l-448 -455v-4l280 -571h-153l-246 514h-176l-103 -514h-139z" />
+<glyph unicode="l" horiz-adv-x="505" d="M80 182q0 35 8 74l231 1184h140l-228 -1166q-6 -33 -6 -63q0 -41 16.5 -62.5t35 -25.5t45.5 -4l30 2l-26 -125q-23 -4 -47 -4q-78 0 -138.5 42t-60.5 148z" />
+<glyph unicode="m" horiz-adv-x="1875" d="M51 0l199 1030h137l-29 -151q-4 -20 -11 -43t-11 -37l-4 -13h4q59 113 178 191t248 78q137 0 200.5 -65.5t69.5 -192.5h4q61 111 178 184.5t244 73.5q141 0 214 -68.5t73 -200.5q0 -57 -16 -139l-125 -647h-140l119 608q16 78 16 142q0 178 -178 178 q-156 0 -275.5 -136.5t-152.5 -304.5l-96 -487h-139l119 608q16 78 16 146q0 174 -170 174q-154 0 -280 -135.5t-158 -307.5l-95 -485h-139z" />
+<glyph unicode="n" horiz-adv-x="1216" d="M49 0l201 1030h135l-27 -147l-26 -97h4q49 96 174 182.5t281 86.5q141 0 217.5 -67.5t76.5 -199.5q0 -55 -16 -137l-127 -651h-139l119 616q16 76 16 138q0 170 -176 170q-170 0 -307.5 -132.5t-173.5 -314.5l-93 -477h-139z" />
+<glyph unicode="o" horiz-adv-x="1275" d="M68 426q0 258 192.5 443.5t439.5 185.5q209 0 340 -125t131 -320q0 -260 -194.5 -447.5t-437.5 -187.5q-209 0 -340 126t-131 325zM211 430q0 -145 91 -237.5t239 -92.5q186 0 336.5 148.5t150.5 355.5q0 143 -92 233.5t-238 90.5q-188 0 -337.5 -146.5t-149.5 -351.5z " />
+<glyph unicode="p" horiz-adv-x="1210" d="M-29 -410l279 1440h133l-18 -100l-25 -88h4q59 92 156.5 152.5t220.5 60.5q180 0 280.5 -110.5t100.5 -303.5q0 -287 -168 -476.5t-389 -189.5q-117 0 -203 52.5t-121 154.5h-4q-2 -45 -12 -98l-96 -494h-138zM274 397q0 -129 66 -213t192 -84q162 0 294 147.5t132 383.5 q0 139 -68.5 218t-191.5 79q-180 0 -302 -165t-122 -366z" />
+<glyph unicode="q" horiz-adv-x="1210" d="M70 387q0 289 170 478.5t397 189.5q117 0 201 -53.5t116 -153.5h4q2 33 11 78l20 104h133l-278 -1440h-139l96 496l26 98h-4q-53 -88 -149 -148.5t-221 -60.5q-182 0 -282.5 111t-100.5 301zM213 397q0 -137 70.5 -217t191.5 -80q182 0 303 167t121 370q0 127 -64.5 209 t-191.5 82q-164 0 -297 -147.5t-133 -383.5z" />
+<glyph unicode="r" horiz-adv-x="729" d="M51 0l199 1030h137l-37 -182l-24 -90h4q57 121 156.5 201.5t220.5 80.5q37 0 61 -6l-27 -137q-29 4 -51 4q-154 0 -271.5 -163t-154.5 -353l-74 -385h-139z" />
+<glyph unicode="s" horiz-adv-x="905" d="M-6 125l84 92q12 -12 33.5 -31.5t97.5 -52.5t162 -33q94 0 168.5 50.5t74.5 138.5q0 51 -48 90t-116.5 67.5t-137 62.5t-117 93.5t-48.5 138.5q0 145 115 229.5t264 84.5q98 0 177 -28t110 -56l31 -29l-78 -98q-8 10 -25.5 24.5t-80 38t-136.5 23.5q-92 0 -165.5 -46 t-73.5 -139q0 -61 73.5 -109t160.5 -79t161 -99.5t74 -168.5q0 -135 -113 -224.5t-268 -89.5q-72 0 -137.5 15.5t-107.5 37t-73.5 44t-46.5 39.5z" />
+<glyph unicode="t" horiz-adv-x="681" d="M127 903l23 119h137l57 293h137l-59 -293h260l-23 -119h-258l-98 -510q-10 -57 -10 -92q0 -184 176 -184l59 4l-24 -125q-25 -4 -53 -4q-299 0 -299 291q0 41 10 112l100 508h-135z" />
+<glyph unicode="u" horiz-adv-x="1206" d="M94 242q0 55 17 137l125 651h139l-119 -612q-14 -74 -14 -142q0 -82 40 -126t140 -44q166 0 299 137.5t168 313.5l92 473h139l-200 -1030h-138l29 147l27 97h-4q-53 -98 -173 -183.5t-278 -85.5q-127 0 -208 65t-81 202z" />
+<glyph unicode="v" horiz-adv-x="978" d="M96 1030h140l135 -760l12 -125h4q33 72 64 125l430 760h151l-594 -1030h-147z" />
+<glyph unicode="w" horiz-adv-x="1642" d="M115 1030h139l100 -772l8 -111h5q29 59 55 111l399 768h140l104 -768l10 -111h4q25 57 51 111l402 772h149l-546 -1030h-152l-111 739l-10 111h-4q-27 -61 -53 -111l-391 -739h-152z" />
+<glyph unicode="x" horiz-adv-x="1001" d="M-63 0l471 543l-250 487h155l162 -342l25 -61h2q23 31 45 57l289 346h168l-435 -500l269 -530h-150l-186 383l-27 59h-4q-16 -27 -39 -55l-330 -387h-165z" />
+<glyph unicode="y" horiz-adv-x="1021" d="M-184 -369l69 105q43 -41 115 -41q125 0 229 166l93 149l-234 1020h145l160 -770l19 -108h2q29 57 57 106l447 772h157l-753 -1249q-125 -211 -318 -211q-114 0 -188 61z" />
+<glyph unicode="z" horiz-adv-x="1034" d="M-33 0l17 90l706 723l98 94v4q-33 -4 -98 -4h-524l24 123h820l-19 -92l-708 -721l-101 -94v-4q35 4 103 4h567l-23 -123h-862z" />
+<glyph unicode="{" horiz-adv-x="686" d="M102 598l25 127q8 0 20.5 3t45 18.5t59.5 38t54.5 69.5t39.5 107l35 174q72 360 375 360h30l-20 -115h-18q-25 0 -50.5 -7t-65.5 -28.5t-74 -79t-50 -141.5l-41 -206q-12 -59 -38 -107.5t-55.5 -74t-57 -43t-46.5 -23.5l-18 -6v-5q12 -6 32.5 -19t53.5 -66.5t33 -120.5 q0 -27 -6 -60l-43 -219q-10 -57 -11 -90q0 -72 32 -112t60.5 -47t59.5 -7h18l-22 -115q-12 -2 -33 -2q-31 0 -64.5 9.5t-77.5 33t-73 80t-29 137.5q0 49 13 115l36 189q6 33 7 61q0 70 -34 113t-69 51z" />
+<glyph unicode="|" horiz-adv-x="630" d="M256 -322v1936h129v-1936h-129z" />
+<glyph unicode="}" horiz-adv-x="679" d="M-90 -197l22 115h19q27 0 52.5 7t64 28.5t71.5 78t49 142.5l45 229q18 98 72.5 163t100.5 81l43 17v4q-12 6 -33 19t-53.5 64.5t-32.5 116.5q0 25 6 60l39 196q10 57 10 90q0 72 -31.5 112t-60.5 47t-60 7h-18l23 115q14 2 32 2q31 0 65 -9t78 -32.5t72.5 -80 t28.5 -138.5q0 -49 -12 -115l-33 -164q-6 -37 -6 -63q0 -70 33.5 -113t68.5 -51l33 -8l-25 -127q-6 0 -18 -3t-45 -17.5t-60.5 -38t-55 -69.5t-40.5 -108l-39 -196q-72 -362 -374 -363z" />
+<glyph unicode="~" horiz-adv-x="1206" d="M131 428q0 162 69.5 239.5t190.5 77.5q61 0 110.5 -21.5t81 -53t61.5 -63.5t69 -53.5t86 -21.5q82 0 113.5 63.5t31.5 141.5h121q0 -162 -69.5 -239.5t-190.5 -77.5q-76 0 -134.5 33.5t-89 72.5t-78.5 73t-106 34q-82 0 -113.5 -63.5t-31.5 -141.5h-121z" />
+<glyph unicode="&#xa1;" horiz-adv-x="557" d="M8 -410l215 1063h131l-202 -1063h-144zM248 868l33 162h161l-34 -162h-160z" />
+<glyph unicode="&#xa2;" horiz-adv-x="1173" d="M129 586q0 258 156.5 473t398.5 233l35 172h115l-33 -176q213 -33 299 -231l22 -68l-131 -49q-2 8 -6 23.5t-22.5 53.5t-45 67.5t-78 53t-116.5 23.5q-199 0 -324 -171t-125 -408q0 -139 70 -220t209 -81q186 0 324 180l26 39l127 -54q-6 -12 -18.5 -31.5t-55.5 -68.5 t-92 -89t-127 -73.5t-159 -40.5l-33 -170h-115l33 177q-154 25 -244 139.5t-90 296.5z" />
+<glyph unicode="&#xa3;" horiz-adv-x="1187" d="M2 0l25 127h127l104 541h-90l22 112h89l63 318q31 156 164 261t309 105q184 0 305 -112l10 -11l-98 -92q-8 8 -25.5 22.5t-75 37t-118.5 22.5q-131 0 -220 -72.5t-110 -181.5l-59 -297h393l-22 -112h-392l-106 -541h694l-24 -127h-965z" />
+<glyph unicode="&#xa5;" horiz-adv-x="1224" d="M170 432l18 105h334l19 79l-39 101h-277l21 104h217l-238 619h154l192 -512q31 -80 60 -183h4q55 100 119 183l393 512h170l-479 -619h215l-21 -104h-274l-74 -101l-18 -79h329l-18 -105h-330l-86 -432h-143l86 432h-334z" />
+<glyph unicode="&#xa7;" horiz-adv-x="849" d="M-8 -37l84 88q57 -55 155 -55q123 0 196 80t77 200l39 887h123l-39 -897q-6 -164 -113.5 -278.5t-282.5 -114.5q-68 0 -128 22.5t-87 45.5zM201 174l37 897q6 164 113.5 278.5t283.5 114.5q68 0 128 -22.5t85 -44.5l26 -23l-83 -88q-59 55 -158 55q-121 0 -194.5 -79.5 t-78.5 -202.5l-36 -885h-123z" />
+<glyph unicode="&#xa8;" horiz-adv-x="1032" d="M176 1608l35 176h125l-33 -176h-127zM485 1608l35 176h127l-35 -176h-127z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1722" d="M152 721q0 309 211.5 526t510.5 217q305 0 519.5 -217t214.5 -526q0 -313 -213 -529.5t-521 -216.5q-301 0 -511.5 217.5t-210.5 528.5zM272 721q0 -268 174.5 -451.5t427.5 -183.5q260 0 437.5 183.5t177.5 451.5q0 266 -177 449.5t-438 183.5q-254 0 -428 -183.5 t-174 -449.5zM473 717q0 172 114.5 297t307.5 125q63 0 120.5 -19.5t94.5 -47.5t65.5 -56.5t41.5 -48.5l12 -19l-94 -63l-11 15q-6 9 -28.5 33.5t-48 43t-65.5 34t-83 15.5q-141 0 -223 -90t-82 -217t81 -217t224 -90q135 0 225 127l11 14l94 -64q-4 -8 -13.5 -20t-40 -45 t-66.5 -58.5t-93.5 -46t-120.5 -20.5q-195 0 -308.5 124t-113.5 294z" />
+<glyph unicode="&#xaa;" horiz-adv-x="870" d="M150 541l18 96h539l-19 -96h-538zM233 952q0 57 24 102.5t64.5 71t85 43t98.5 24.5t87 9t70 2h36q8 35 9 53q0 106 -119 107q-41 0 -88 -14.5t-74 -28.5l-25 -14l-39 84q102 70 242 69q215 0 215 -190q0 -33 -12 -90l-76 -385h-108l20 100h-4q-4 -4 -9 -12.5t-26.5 -27.5 t-44 -33.5t-59.5 -27t-74 -12.5q-74 0 -133.5 44t-59.5 126zM352 965q0 -37 28 -60.5t79 -23.5q76 0 141.5 73.5t77.5 141.5l4 18h-27q-303 1 -303 -149z" />
+<glyph unicode="&#xab;" horiz-adv-x="1062" d="M90 582l393 417h160l-407 -428l258 -413h-140zM451 582l421 417h162l-440 -428l260 -413h-141z" />
+<glyph unicode="&#xac;" horiz-adv-x="1306" d="M166 700v119h954v-495h-125v376h-829z" />
+<glyph unicode="&#xad;" horiz-adv-x="884" d="M20 518l23 127h582l-25 -127h-580z" />
+<glyph unicode="&#xae;" horiz-adv-x="1722" d="M152 721q0 309 211.5 526t510.5 217q305 0 519.5 -217t214.5 -526q0 -313 -213 -529.5t-521 -216.5q-301 0 -511.5 217.5t-210.5 528.5zM272 721q0 -268 174.5 -451.5t427.5 -183.5q260 0 437.5 183.5t177.5 451.5q0 266 -177 449.5t-438 183.5q-254 0 -428 -183.5 t-174 -449.5zM633 1120h285q106 0 172.5 -65.5t66.5 -171.5q0 -84 -44 -140.5t-105 -70.5v-4q8 -10 26 -45l154 -301h-127l-160 323h-153v-323h-115v798zM748 735h149q66 0 103.5 39t37.5 109q0 68 -37.5 104.5t-103.5 36.5h-149v-289z" />
+<glyph unicode="&#xaf;" horiz-adv-x="1032" d="M147 1608l21 112h506l-21 -112h-506z" />
+<glyph unicode="&#xb0;" horiz-adv-x="778" d="M205 1141q0 125 101.5 223t228.5 98q111 0 182 -70.5t71 -177.5q0 -125 -102 -223t-227 -98q-113 0 -183.5 69.5t-70.5 178.5zM326 1145q0 -59 38.5 -98t102.5 -39q78 0 139.5 61t61.5 141q0 59 -39 98.5t-101 39.5q-78 0 -140 -61.5t-62 -141.5z" />
+<glyph unicode="&#xb1;" horiz-adv-x="1437" d="M158 522v119h473v522h125v-522h471v-119h-471v-522h-125v522h-473zM195 -213h995v-119h-995v119z" />
+<glyph unicode="&#xb2;" horiz-adv-x="782" d="M0 866q2 113 62.5 200t143.5 141.5t166 101.5t140 106.5t57 130.5q0 55 -38.5 91t-102.5 36q-49 0 -99 -25.5t-77 -50.5l-27 -24l-65 78q12 14 36.5 35.5t96.5 56.5t141 35q117 0 184.5 -61.5t67.5 -162.5q0 -90 -49 -160.5t-124 -117.5t-150.5 -89t-139 -97.5 t-82.5 -120.5h449l-21 -103h-569z" />
+<glyph unicode="&#xb3;" horiz-adv-x="782" d="M16 981l78 72q8 -10 24.5 -27.5t74 -45.5t120.5 -28q86 0 152.5 61.5t66.5 151.5q0 66 -51 104t-121 38h-67l-19 63l248 236l62 51v4q-39 -6 -76 -6h-311l18 102h539l-15 -74l-299 -284q78 -10 143.5 -66.5t65.5 -163.5q0 -127 -98 -225t-240 -98q-170 0 -284 123z" />
+<glyph unicode="&#xb4;" horiz-adv-x="1032" d="M223 1540l191 244h172l-228 -244h-135z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1245" d="M-16 -410l278 1440h139l-118 -612q-16 -86 -17 -142q0 -170 183 -170q166 0 299 137.5t167 313.5l91 473h139l-199 -1030h-137l29 147l26 97h-4q-55 -98 -174 -183.5t-276 -85.5q-150 0 -213 88h-4q-8 -106 -19 -157l-63 -316h-127z" />
+<glyph unicode="&#x3bc;" horiz-adv-x="1245" d="M-16 -410l278 1440h139l-118 -612q-16 -86 -17 -142q0 -170 183 -170q166 0 299 137.5t167 313.5l91 473h139l-199 -1030h-137l29 147l26 97h-4q-55 -98 -174 -183.5t-276 -85.5q-150 0 -213 88h-4q-8 -106 -19 -157l-63 -316h-127z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1173" d="M160 903q0 215 174 376t389 161h512l-23 -127h-370l-275 -1415h-118l114 596q-162 0 -282.5 117.5t-120.5 291.5zM694 -102l250 1292h117l-250 -1292h-117z" />
+<glyph unicode="&#xb7;" horiz-adv-x="559" d="M174 504l33 170h164l-31 -170h-166z" />
+<glyph unicode="&#xb8;" horiz-adv-x="1032" d="M201 -408l20 95q35 -10 82 -11q119 0 119 80q0 59 -105 60l-30 -2l98 227l78 -14l-2 -17l-47 -123q49 -8 83.5 -42.5t34.5 -90.5q0 -86 -67.5 -130t-153.5 -44z" />
+<glyph unicode="&#xb9;" horiz-adv-x="782" d="M53 866l21 103h192l113 583l14 50h-4q-10 -16 -49 -50l-96 -77l-60 81l244 201h107l-154 -788h188l-18 -103h-498z" />
+<glyph unicode="&#xba;" horiz-adv-x="966" d="M160 541l18 96h621l-19 -96h-620zM233 1067q0 160 122 277.5t274 117.5q131 0 214 -79.5t83 -200.5q0 -164 -122 -281t-276 -117q-131 0 -213 79t-82 204zM346 1075q0 -84 51.5 -135t134.5 -51q109 0 195 84t86 203q0 82 -52 133t-136 51q-109 0 -194 -84t-85 -201z" />
+<glyph unicode="&#xbb;" horiz-adv-x="1062" d="M16 158l439 428l-260 413h141l264 -424l-422 -417h-162zM406 158l409 428l-260 413h141l265 -424l-394 -417h-161z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1933" d="M113 549l20 102h193l112 584l15 49h-4q-10 -16 -50 -49l-96 -78l-59 82l243 201h107l-154 -789h189l-19 -102h-497zM406 0l966 1440h127l-964 -1440h-129zM1069 233l14 78l545 580h119l-109 -555h134l-19 -103h-133l-47 -233h-113l45 233h-436zM1235 336h291l53 278 q4 25 13.5 56.5t13.5 50.5l6 20h-4q-43 -55 -86 -100l-287 -301v-4z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1906" d="M113 549l20 102h193l112 584l15 49h-4q-10 -16 -50 -49l-96 -78l-59 82l243 201h107l-154 -789h189l-19 -102h-497zM408 0l966 1440h127l-964 -1440h-129zM1090 0q2 113 62 200t143 141t166 101t140.5 106.5t57.5 131.5q0 55 -39 91t-102 36q-49 0 -99.5 -24.5 t-77.5 -49.5l-26 -26l-66 77q12 14 37 36t96.5 56.5t141.5 34.5q117 0 184.5 -61.5t67.5 -161.5q0 -90 -49.5 -160.5t-124 -118t-150.5 -89t-139.5 -97t-81.5 -121.5h448l-20 -102h-569z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1959" d="M98 664l78 71q8 -10 24.5 -27.5t74 -45t120.5 -27.5q86 0 152.5 61.5t66.5 151.5q0 66 -51 103.5t-121 37.5h-67l-19 64l248 235l62 51v4q-39 -6 -76 -6h-311l18 103h539l-15 -74l-299 -285q78 -10 143.5 -66.5t65.5 -162.5q0 -127 -98 -225.5t-240 -98.5 q-170 0 -284 123zM432 0l967 1440h127l-965 -1440h-129zM1096 233l14 78l545 580h119l-109 -555h133l-18 -103h-133l-48 -233h-112l45 233h-436zM1262 336h290l54 278q4 25 13 56.5t15 50.5l4 20h-4q-43 -55 -86 -100l-286 -301v-4z" />
+<glyph unicode="&#xbf;" horiz-adv-x="899" d="M-43 -119q0 100 45 183t112.5 140.5t137.5 110t126 118t73 138.5l18 82h137l-18 -88q-20 -94 -77.5 -172t-124.5 -131t-130 -105.5t-106.5 -118t-43.5 -142.5q0 -84 60.5 -138.5t163.5 -54.5q66 0 132 21.5t99 42.5l35 22l59 -113q-16 -12 -46.5 -29.5t-120 -47 t-173.5 -29.5q-162 0 -260 85t-98 226zM496 868l32 162h160l-33 -162h-159z" />
+<glyph unicode="&#xc0;" d="M-88 0l803 1440h155l248 -1440h-143l-76 459h-580l-253 -459h-154zM383 582h496l-86 522l-23 186h-4q-53 -119 -90 -186zM623 1784h151l96 -244h-118z" />
+<glyph unicode="&#xc1;" d="M-88 0l803 1440h155l248 -1440h-143l-76 459h-580l-253 -459h-154zM383 582h496l-86 522l-23 186h-4q-53 -119 -90 -186zM741 1540l191 244h172l-227 -244h-136z" />
+<glyph unicode="&#xc2;" d="M-88 0l803 1440h155l248 -1440h-143l-76 459h-580l-253 -459h-154zM383 582h496l-86 522l-23 186h-4q-53 -119 -90 -186zM559 1540l219 244h154l123 -244h-129l-78 166h-4l-144 -166h-141z" />
+<glyph unicode="&#xc3;" d="M-88 0l803 1440h155l248 -1440h-143l-76 459h-580l-253 -459h-154zM383 582h496l-86 522l-23 186h-4q-53 -119 -90 -186zM510 1546q45 240 217 240q45 0 79 -22.5t51 -51.5t42 -51.5t53 -22.5q78 0 105 142h110q-47 -240 -219 -240q-55 0 -93 37t-67.5 73t-64.5 36 q-41 0 -66.5 -43.5t-35.5 -96.5h-111z" />
+<glyph unicode="&#xc4;" d="M-88 0l803 1440h155l248 -1440h-143l-76 459h-580l-253 -459h-154zM383 582h496l-86 522l-23 186h-4q-53 -119 -90 -186zM610 1608l35 176h125l-33 -176h-127zM920 1608l34 176h127l-34 -176h-127z" />
+<glyph unicode="&#xc5;" d="M-88 0l803 1440h155l248 -1440h-143l-76 459h-580l-253 -459h-154zM383 582h496l-86 522l-23 186h-4q-53 -119 -90 -186zM680 1645q0 68 52 115.5t120 47.5q66 0 103.5 -33.5t37.5 -95.5q0 -66 -53 -113.5t-118.5 -47.5t-103.5 34t-38 93zM768 1647q0 -51 55 -52 q35 0 58.5 25t23.5 59q0 23 -15.5 38.5t-39.5 15.5q-33 0 -57.5 -24.5t-24.5 -61.5z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1755" d="M-92 0l870 1440h996l-25 -127h-670l-102 -525h547l-25 -126h-547l-104 -535h706l-24 -127h-848l129 664h-346l-397 -664h-160zM539 786h295l104 527h-82z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1492" d="M125 594q0 233 120 435t317.5 318.5t416.5 116.5q297 0 477 -155l31 -31l-90 -100q-6 6 -17.5 16t-50.5 36.5t-83 47t-115.5 37t-147.5 16.5q-287 0 -499 -218t-212 -515q0 -215 130 -352t348 -137q129 0 254.5 48t187.5 95l61 47l70 -111q-10 -8 -28.5 -22t-78 -51 t-123 -66t-158.5 -51.5t-190 -22.5h-4l-32 -88q49 -8 83.5 -42.5t34.5 -90.5q0 -86 -67.5 -130t-153.5 -44l-110 12l20 95q35 -10 82 -11q119 0 119 80q0 59 -105 60l-30 -2l71 168q-246 27 -387 194.5t-141 417.5z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1163" d="M90 0l281 1440h811l-27 -127h-668l-102 -525h547l-25 -126h-545l-106 -535h705l-23 -127h-848zM627 1784h151l96 -244h-118z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1163" d="M90 0l281 1440h811l-27 -127h-668l-102 -525h547l-25 -126h-545l-106 -535h705l-23 -127h-848zM748 1540l190 244h172l-227 -244h-135z" />
+<glyph unicode="&#xca;" horiz-adv-x="1163" d="M90 0l281 1440h811l-27 -127h-668l-102 -525h547l-25 -126h-545l-106 -535h705l-23 -127h-848zM565 1540l219 244h154l123 -244h-129l-78 166h-4l-143 -166h-142z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1163" d="M90 0l281 1440h811l-27 -127h-668l-102 -525h547l-25 -126h-545l-106 -535h705l-23 -127h-848zM616 1608l35 176h125l-33 -176h-127zM926 1608l35 176h126l-34 -176h-127z" />
+<glyph unicode="&#xcc;" horiz-adv-x="559" d="M90 0l281 1440h141l-281 -1440h-141zM272 1784h152l96 -244h-119z" />
+<glyph unicode="&#xcd;" horiz-adv-x="559" d="M90 0l281 1440h141l-281 -1440h-141zM389 1540l191 244h172l-228 -244h-135z" />
+<glyph unicode="&#xce;" horiz-adv-x="559" d="M90 0l281 1440h141l-281 -1440h-141zM209 1540l219 244h154l123 -244h-130l-77 166h-4l-144 -166h-141z" />
+<glyph unicode="&#xcf;" horiz-adv-x="559" d="M90 0l281 1440h141l-281 -1440h-141zM260 1608l35 176h125l-33 -176h-127zM569 1608l35 176h127l-35 -176h-127z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1540" d="M117 0l129 662h-121l25 122h120l129 656h437q293 0 458.5 -146.5t165.5 -412.5q0 -369 -240.5 -625t-613.5 -256h-489zM283 127h309q311 0 516 214t205 531q0 211 -130 326t-360 115h-307l-104 -529h344l-25 -122h-344z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1529" d="M90 0l281 1440h127l532 -1037q37 -72 80 -194h4q10 119 25 194l202 1037h142l-281 -1440h-127l-532 1036l-82 195h-4q-10 -119 -25 -195l-201 -1036h-141zM641 1546q45 240 217 240q45 0 79 -22.5t51.5 -51.5t42 -51.5t52.5 -22.5q78 0 105 142h110q-47 -240 -219 -240 q-55 0 -93 37t-67.5 73t-64.5 36q-41 0 -66.5 -43.5t-35.5 -96.5h-111z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1683" d="M119 598q0 227 124 429t323.5 319.5t416.5 117.5q279 0 453 -170t174 -436q0 -231 -125 -437t-326 -326t-416 -120q-279 0 -451.5 174.5t-172.5 448.5zM264 602q0 -217 134 -355t347 -138q272 0 494.5 222t222.5 521q0 211 -134 345t-347 134q-276 0 -496.5 -217 t-220.5 -512zM827 1784h152l96 -244h-119z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1683" d="M119 598q0 227 124 429t323.5 319.5t416.5 117.5q279 0 453 -170t174 -436q0 -231 -125 -437t-326 -326t-416 -120q-279 0 -451.5 174.5t-172.5 448.5zM264 602q0 -217 134 -355t347 -138q272 0 494.5 222t222.5 521q0 211 -134 345t-347 134q-276 0 -496.5 -217 t-220.5 -512zM946 1540l191 244h172l-228 -244h-135z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1683" d="M119 598q0 227 124 429t323.5 319.5t416.5 117.5q279 0 453 -170t174 -436q0 -231 -125 -437t-326 -326t-416 -120q-279 0 -451.5 174.5t-172.5 448.5zM264 602q0 -217 134 -355t347 -138q272 0 494.5 222t222.5 521q0 211 -134 345t-347 134q-276 0 -496.5 -217 t-220.5 -512zM764 1540l219 244h154l123 -244h-130l-77 166h-4l-144 -166h-141z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1683" d="M119 598q0 227 124 429t323.5 319.5t416.5 117.5q279 0 453 -170t174 -436q0 -231 -125 -437t-326 -326t-416 -120q-279 0 -451.5 174.5t-172.5 448.5zM264 602q0 -217 134 -355t347 -138q272 0 494.5 222t222.5 521q0 211 -134 345t-347 134q-276 0 -496.5 -217 t-220.5 -512zM715 1546q45 240 217 240q45 0 78.5 -22.5t51 -51.5t42 -51.5t53.5 -22.5q78 0 105 142h110q-47 -240 -219 -240q-55 0 -93 37t-67.5 73t-64.5 36q-41 0 -66.5 -43.5t-36.5 -96.5h-110z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1683" d="M119 598q0 227 124 429t323.5 319.5t416.5 117.5q279 0 453 -170t174 -436q0 -231 -125 -437t-326 -326t-416 -120q-279 0 -451.5 174.5t-172.5 448.5zM264 602q0 -217 134 -355t347 -138q272 0 494.5 222t222.5 521q0 211 -134 345t-347 134q-276 0 -496.5 -217 t-220.5 -512zM815 1608l35 176h125l-33 -176h-127zM1124 1608l35 176h127l-35 -176h-127z" />
+<glyph unicode="&#xd7;" horiz-adv-x="1421" d="M184 84l443 498l-443 497l84 84l439 -493l438 493l84 -84l-445 -497l445 -498l-84 -84l-438 494l-439 -494z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1689" d="M121 598q0 227 124 429t324.5 319.5t417.5 117.5q223 0 383 -114l129 141l78 -66l-129 -141q164 -168 164 -426q0 -231 -125 -437t-324.5 -326t-414.5 -120q-227 0 -392 119l-131 -143l-80 63l136 148q-160 172 -160 436zM268 602q0 -197 113 -332l893 975 q-121 86 -289 86q-276 0 -496.5 -217t-220.5 -512zM453 201q125 -92 295 -92q274 0 495 222t221 521q0 190 -114 326z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1476" d="M156 393q0 55 12 117l182 930h142l-183 -934q-10 -49 -10 -96q0 -143 90 -222t252 -79q186 0 317.5 107.5t167.5 293.5l183 930h143l-188 -948q-47 -240 -215 -378.5t-410 -138.5q-219 0 -351 111.5t-132 306.5zM727 1784h152l96 -244h-119z" />
+<glyph unicode="&#xda;" horiz-adv-x="1476" d="M156 393q0 55 12 117l182 930h142l-183 -934q-10 -49 -10 -96q0 -143 90 -222t252 -79q186 0 317.5 107.5t167.5 293.5l183 930h143l-188 -948q-47 -240 -215 -378.5t-410 -138.5q-219 0 -351 111.5t-132 306.5zM846 1540l190 244h172l-227 -244h-135z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1476" d="M156 393q0 55 12 117l182 930h142l-183 -934q-10 -49 -10 -96q0 -143 90 -222t252 -79q186 0 317.5 107.5t167.5 293.5l183 930h143l-188 -948q-47 -240 -215 -378.5t-410 -138.5q-219 0 -351 111.5t-132 306.5zM664 1540l219 244h153l123 -244h-129l-78 166h-4 l-143 -166h-141z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1476" d="M156 393q0 55 12 117l182 930h142l-183 -934q-10 -49 -10 -96q0 -143 90 -222t252 -79q186 0 317.5 107.5t167.5 293.5l183 930h143l-188 -948q-47 -240 -215 -378.5t-410 -138.5q-219 0 -351 111.5t-132 306.5zM715 1608l35 176h124l-32 -176h-127zM1024 1608l35 176 h127l-35 -176h-127z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1155" d="M176 1440h152l202 -522l58 -173h4q59 94 119 170l405 525h172l-649 -826l-121 -614h-141l123 618zM676 1540l190 244h172l-227 -244h-135z" />
+<glyph unicode="&#xde;" horiz-adv-x="1230" d="M90 0l283 1440h141l-51 -256h332q141 0 227 -49q168 -90 168 -304q0 -164 -86 -292.5t-221 -188.5q-94 -41 -211 -41h-377l-62 -309h-143zM317 436h340q94 0 168 33q98 43 157.5 135t59.5 221q0 109 -69.5 170.5t-194.5 61.5h-340z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1175" d="M51 0l213 1104q33 166 167 263t290 97q154 0 243 -75.5t89 -192.5q0 -68 -33 -126t-78 -98t-91 -76t-79 -75t-33 -80q0 -43 49.5 -92t107.5 -90t107.5 -108.5t49.5 -141.5q0 -133 -111 -228t-258 -95q-88 0 -167 16t-114 33l-34 16l26 129q111 -70 281 -69q88 0 160.5 51 t72.5 145q0 57 -49 113.5t-108.5 95.5t-108.5 97.5t-49 119.5q0 70 49 133.5t107.5 104.5t107.5 98t49 117q0 61 -49 106t-139 45q-109 0 -202 -69.5t-116 -190.5l-211 -1077h-139z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1067" d="M16 236q0 96 46.5 169.5t116 116.5t165.5 69.5t184 36t183 9.5h65q14 63 15 108q0 184 -211 185q-76 0 -154 -24.5t-119 -49.5l-39 -25l-45 117q16 12 48 29.5t128.5 47.5t192.5 30q160 0 250 -73t90 -220q0 -51 -12 -113l-127 -649h-134l25 119l23 88h-5q2 0 -13 -23.5 t-47 -58.5t-75 -68.5t-107.5 -57.5t-133.5 -24q-131 0 -220.5 70t-89.5 191zM160 254q0 -68 50 -114t148 -46q135 0 247 122t145 269l8 37h-60q-538 0 -538 -268zM449 1440h151l96 -244h-118z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1067" d="M16 236q0 96 46.5 169.5t116 116.5t165.5 69.5t184 36t183 9.5h65q14 63 15 108q0 184 -211 185q-76 0 -154 -24.5t-119 -49.5l-39 -25l-45 117q16 12 48 29.5t128.5 47.5t192.5 30q160 0 250 -73t90 -220q0 -51 -12 -113l-127 -649h-134l25 119l23 88h-5q2 0 -13 -23.5 t-47 -58.5t-75 -68.5t-107.5 -57.5t-133.5 -24q-131 0 -220.5 70t-89.5 191zM160 254q0 -68 50 -114t148 -46q135 0 247 122t145 269l8 37h-60q-538 0 -538 -268zM569 1196l191 244h172l-227 -244h-136z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1067" d="M16 236q0 96 46.5 169.5t116 116.5t165.5 69.5t184 36t183 9.5h65q14 63 15 108q0 184 -211 185q-76 0 -154 -24.5t-119 -49.5l-39 -25l-45 117q16 12 48 29.5t128.5 47.5t192.5 30q160 0 250 -73t90 -220q0 -51 -12 -113l-127 -649h-134l25 119l23 88h-5q2 0 -13 -23.5 t-47 -58.5t-75 -68.5t-107.5 -57.5t-133.5 -24q-131 0 -220.5 70t-89.5 191zM160 254q0 -68 50 -114t148 -46q135 0 247 122t145 269l8 37h-60q-538 0 -538 -268zM385 1196l219 244h154l123 -244h-129l-78 166h-4l-144 -166h-141z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1067" d="M16 236q0 96 46.5 169.5t116 116.5t165.5 69.5t184 36t183 9.5h65q14 63 15 108q0 184 -211 185q-76 0 -154 -24.5t-119 -49.5l-39 -25l-45 117q16 12 48 29.5t128.5 47.5t192.5 30q160 0 250 -73t90 -220q0 -51 -12 -113l-127 -649h-134l25 119l23 88h-5q2 0 -13 -23.5 t-47 -58.5t-75 -68.5t-107.5 -57.5t-133.5 -24q-131 0 -220.5 70t-89.5 191zM160 254q0 -68 50 -114t148 -46q135 0 247 122t145 269l8 37h-60q-538 0 -538 -268zM336 1202q45 240 217 240q45 0 79 -22.5t51 -51.5t42 -51.5t53 -22.5q78 0 105 142h110q-47 -240 -219 -240 q-55 0 -93 37t-67.5 72.5t-64.5 35.5q-41 0 -66.5 -43t-36.5 -96h-110z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1067" d="M16 236q0 96 46.5 169.5t116 116.5t165.5 69.5t184 36t183 9.5h65q14 63 15 108q0 184 -211 185q-76 0 -154 -24.5t-119 -49.5l-39 -25l-45 117q16 12 48 29.5t128.5 47.5t192.5 30q160 0 250 -73t90 -220q0 -51 -12 -113l-127 -649h-134l25 119l23 88h-5q2 0 -13 -23.5 t-47 -58.5t-75 -68.5t-107.5 -57.5t-133.5 -24q-131 0 -220.5 70t-89.5 191zM160 254q0 -68 50 -114t148 -46q135 0 247 122t145 269l8 37h-60q-538 0 -538 -268zM436 1264l35 176h125l-33 -176h-127zM745 1264l35 176h127l-35 -176h-127z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1067" d="M16 236q0 96 46.5 169.5t116 116.5t165.5 69.5t184 36t183 9.5h65q14 63 15 108q0 184 -211 185q-76 0 -154 -24.5t-119 -49.5l-39 -25l-45 117q16 12 48 29.5t128.5 47.5t192.5 30q160 0 250 -73t90 -220q0 -51 -12 -113l-127 -649h-134l25 119l23 88h-5q2 0 -13 -23.5 t-47 -58.5t-75 -68.5t-107.5 -57.5t-133.5 -24q-131 0 -220.5 70t-89.5 191zM160 254q0 -68 50 -114t148 -46q135 0 247 122t145 269l8 37h-60q-538 0 -538 -268zM506 1300q0 68 52 116t120 48q66 0 103.5 -33.5t37.5 -95.5q0 -66 -53 -114t-118.5 -47.5t-103.5 34t-38 92.5 zM594 1303q0 -51 55 -52q35 0 58.5 24.5t23.5 59.5q0 23 -15.5 38.5t-39.5 15.5q-33 0 -57.5 -24.5t-24.5 -61.5z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1781" d="M16 236q0 393 689 393h67q14 74 14 116q0 184 -217 185q-152 -2 -301 -99l-45 117q18 12 50 29.5t126.5 47.5t184.5 30q279 0 317 -199h4q160 199 412 199q184 0 280.5 -101.5t96.5 -273.5l-29 -166h-776q-8 -41 -8 -88q0 -158 81.5 -242t229.5 -84q84 0 168 32t127 63 l43 30l45 -114q-18 -14 -53 -37t-135.5 -61t-196.5 -38q-164 0 -276.5 76t-147.5 205h-4q-12 -29 -41 -67.5t-80 -91t-134 -87.5t-179 -35q-133 0 -222.5 69t-89.5 192zM160 252q0 -68 50 -113t146 -45q137 0 244 117t143 262l11 41h-121q-473 0 -473 -262zM918 629h628 q4 45 4 67q0 121 -66.5 181.5t-168.5 60.5q-131 0 -237.5 -81t-159.5 -228z" />
+<glyph unicode="&#xe7;" horiz-adv-x="1128" d="M72 414q0 272 191.5 456.5t441.5 184.5q115 0 208 -37t127 -74l37 -37l-84 -94q-10 12 -31.5 31.5t-95 51.5t-155.5 32q-193 0 -344.5 -145.5t-151.5 -356.5q0 -145 93 -235.5t243 -90.5q188 0 346 133l14 13l43 -117q-6 -6 -18 -16.5t-54 -37t-86 -47t-113 -37 t-138 -16.5h-10l-33 -88q49 -8 84 -42.5t35 -90.5q0 -86 -68 -130t-154 -44l-110 12l20 95q35 -10 82 -11q119 0 119 80q0 59 -104 60l-31 -2l71 170q-172 27 -273 141.5t-101 288.5z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1132" d="M70 410q0 258 172 451.5t426 193.5q186 0 281 -102.5t95 -270.5q0 -35 -8 -79t-16 -71l-6 -24h-791q-8 -41 -8 -88q0 -139 86 -229.5t244 -90.5q82 0 166 32t127 63l43 30l45 -114q-18 -14 -52 -37t-135.5 -61t-197.5 -38q-211 0 -341 120t-130 315zM250 623h645 q6 35 6 71q0 119 -64.5 181.5t-168.5 62.5q-133 0 -249 -84t-169 -231zM526 1440h152l96 -244h-119z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1132" d="M70 410q0 258 172 451.5t426 193.5q186 0 281 -102.5t95 -270.5q0 -35 -8 -79t-16 -71l-6 -24h-791q-8 -41 -8 -88q0 -139 86 -229.5t244 -90.5q82 0 166 32t127 63l43 30l45 -114q-18 -14 -52 -37t-135.5 -61t-197.5 -38q-211 0 -341 120t-130 315zM250 623h645 q6 35 6 71q0 119 -64.5 181.5t-168.5 62.5q-133 0 -249 -84t-169 -231zM645 1196l191 244h172l-228 -244h-135z" />
+<glyph unicode="&#xea;" horiz-adv-x="1132" d="M70 410q0 258 172 451.5t426 193.5q186 0 281 -102.5t95 -270.5q0 -35 -8 -79t-16 -71l-6 -24h-791q-8 -41 -8 -88q0 -139 86 -229.5t244 -90.5q82 0 166 32t127 63l43 30l45 -114q-18 -14 -52 -37t-135.5 -61t-197.5 -38q-211 0 -341 120t-130 315zM250 623h645 q6 35 6 71q0 119 -64.5 181.5t-168.5 62.5q-133 0 -249 -84t-169 -231zM463 1196l219 244h154l122 -244h-129l-77 166h-4l-144 -166h-141z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1132" d="M70 410q0 258 172 451.5t426 193.5q186 0 281 -102.5t95 -270.5q0 -35 -8 -79t-16 -71l-6 -24h-791q-8 -41 -8 -88q0 -139 86 -229.5t244 -90.5q82 0 166 32t127 63l43 30l45 -114q-18 -14 -52 -37t-135.5 -61t-197.5 -38q-211 0 -341 120t-130 315zM250 623h645 q6 35 6 71q0 119 -64.5 181.5t-168.5 62.5q-133 0 -249 -84t-169 -231zM514 1264l35 176h125l-33 -176h-127zM823 1264l35 176h127l-35 -176h-127z" />
+<glyph unicode="&#xec;" horiz-adv-x="475" d="M51 0l199 1030h139l-199 -1030h-139zM162 1440h151l97 -244h-119z" />
+<glyph unicode="&#xed;" horiz-adv-x="475" d="M51 0l199 1030h139l-199 -1030h-139zM283 1196l190 244h172l-227 -244h-135z" />
+<glyph unicode="&#xee;" horiz-adv-x="475" d="M51 0l199 1030h139l-199 -1030h-139zM98 1196l219 244h154l123 -244h-129l-78 166h-4l-143 -166h-142z" />
+<glyph unicode="&#xef;" horiz-adv-x="475" d="M51 0l199 1030h139l-199 -1030h-139zM152 1264l34 176h125l-32 -176h-127zM461 1264l35 176h127l-35 -176h-127z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1208" d="M66 383q0 221 160.5 397t418.5 176q184 0 283 -108l8 -10h4q-35 203 -192 333l-394 -161l-8 100l309 127q-117 70 -274 113l57 108q211 -55 361 -162l303 127l10 -100l-229 -94q209 -199 209 -506q0 -115 -36 -239t-105.5 -240.5t-192.5 -192.5t-277 -76q-199 0 -307 117 t-108 291zM209 387q0 -123 70.5 -205t201.5 -82q190 0 319.5 163t129.5 333q0 109 -76 175.5t-207 66.5q-180 0 -309 -133.5t-129 -317.5z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1216" d="M49 0l201 1030h135l-27 -147l-26 -97h4q49 96 174 182.5t281 86.5q141 0 217.5 -67.5t76.5 -199.5q0 -55 -16 -137l-127 -651h-139l119 616q16 76 16 138q0 170 -176 170q-170 0 -307.5 -132.5t-173.5 -314.5l-93 -477h-139zM444 1202q45 240 217 240q45 0 79 -22.5 t51.5 -51.5t42 -51.5t53.5 -22.5q78 0 104 142h111q-47 -240 -219 -240q-55 0 -93 37t-68 72.5t-65 35.5q-41 0 -66.5 -43t-35.5 -96h-111z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1275" d="M68 426q0 258 192.5 443.5t439.5 185.5q209 0 340 -125t131 -320q0 -260 -194.5 -447.5t-437.5 -187.5q-209 0 -340 126t-131 325zM211 430q0 -145 91 -237.5t239 -92.5q186 0 336.5 148.5t150.5 355.5q0 143 -92 233.5t-238 90.5q-188 0 -337.5 -146.5t-149.5 -351.5z M559 1440h152l96 -244h-119z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1275" d="M68 426q0 258 192.5 443.5t439.5 185.5q209 0 340 -125t131 -320q0 -260 -194.5 -447.5t-437.5 -187.5q-209 0 -340 126t-131 325zM211 430q0 -145 91 -237.5t239 -92.5q186 0 336.5 148.5t150.5 355.5q0 143 -92 233.5t-238 90.5q-188 0 -337.5 -146.5t-149.5 -351.5z M680 1196l190 244h172l-227 -244h-135z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1275" d="M68 426q0 258 192.5 443.5t439.5 185.5q209 0 340 -125t131 -320q0 -260 -194.5 -447.5t-437.5 -187.5q-209 0 -340 126t-131 325zM211 430q0 -145 91 -237.5t239 -92.5q186 0 336.5 148.5t150.5 355.5q0 143 -92 233.5t-238 90.5q-188 0 -337.5 -146.5t-149.5 -351.5z M498 1196l219 244h153l123 -244h-129l-78 166h-4l-143 -166h-141z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1275" d="M68 426q0 258 192.5 443.5t439.5 185.5q209 0 340 -125t131 -320q0 -260 -194.5 -447.5t-437.5 -187.5q-209 0 -340 126t-131 325zM211 430q0 -145 91 -237.5t239 -92.5q186 0 336.5 148.5t150.5 355.5q0 143 -92 233.5t-238 90.5q-188 0 -337.5 -146.5t-149.5 -351.5z M446 1202q45 240 218 240q45 0 78.5 -22.5t51 -51.5t42 -51.5t53.5 -22.5q78 0 104 142h111q-47 -240 -219 -240q-55 0 -93 37t-68 72.5t-65 35.5q-41 0 -66.5 -43t-35.5 -96h-111z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1275" d="M68 426q0 258 192.5 443.5t439.5 185.5q209 0 340 -125t131 -320q0 -260 -194.5 -447.5t-437.5 -187.5q-209 0 -340 126t-131 325zM211 430q0 -145 91 -237.5t239 -92.5q186 0 336.5 148.5t150.5 355.5q0 143 -92 233.5t-238 90.5q-188 0 -337.5 -146.5t-149.5 -351.5z M549 1264l35 176h125l-33 -176h-127zM858 1264l35 176h127l-35 -176h-127z" />
+<glyph unicode="&#xf7;" horiz-adv-x="1316" d="M150 522v119h1003v-119h-1003zM573 125v151h154v-151h-154zM573 887v151h154v-151h-154z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1275" d="M68 426q0 258 192.5 443.5t439.5 185.5q162 0 283 -80l107 117l77 -68l-106 -117q111 -121 110 -297q0 -260 -194.5 -447.5t-437.5 -187.5q-154 0 -269 70l-104 -113l-78 66l100 111q-120 124 -120 317zM211 430q0 -129 72 -217l606 661q-84 53 -191 54 q-188 0 -337.5 -146.5t-149.5 -351.5zM362 145q78 -45 179 -45q186 0 336.5 148.5t150.5 355.5q0 117 -63 199z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1206" d="M94 242q0 55 17 137l125 651h139l-119 -612q-14 -74 -14 -142q0 -82 40 -126t140 -44q166 0 299 137.5t168 313.5l92 473h139l-200 -1030h-138l29 147l27 97h-4q-53 -98 -173 -183.5t-278 -85.5q-127 0 -208 65t-81 202zM518 1440h152l96 -244h-119z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1206" d="M94 242q0 55 17 137l125 651h139l-119 -612q-14 -74 -14 -142q0 -82 40 -126t140 -44q166 0 299 137.5t168 313.5l92 473h139l-200 -1030h-138l29 147l27 97h-4q-53 -98 -173 -183.5t-278 -85.5q-127 0 -208 65t-81 202zM639 1196l190 244h172l-227 -244h-135z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1206" d="M94 242q0 55 17 137l125 651h139l-119 -612q-14 -74 -14 -142q0 -82 40 -126t140 -44q166 0 299 137.5t168 313.5l92 473h139l-200 -1030h-138l29 147l27 97h-4q-53 -98 -173 -183.5t-278 -85.5q-127 0 -208 65t-81 202zM455 1196l219 244h153l123 -244h-129l-78 166h-4 l-143 -166h-141z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1206" d="M94 242q0 55 17 137l125 651h139l-119 -612q-14 -74 -14 -142q0 -82 40 -126t140 -44q166 0 299 137.5t168 313.5l92 473h139l-200 -1030h-138l29 147l27 97h-4q-53 -98 -173 -183.5t-278 -85.5q-127 0 -208 65t-81 202zM508 1264l35 176h125l-33 -176h-127zM817 1264 l35 176h127l-35 -176h-127z" />
+<glyph unicode="&#xfd;" horiz-adv-x="1021" d="M-184 -369l69 105q43 -41 115 -41q125 0 229 166l93 149l-234 1020h145l160 -770l19 -108h2q29 57 57 106l447 772h157l-753 -1249q-125 -211 -318 -211q-114 0 -188 61zM547 1196l190 244h172l-227 -244h-135z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1212" d="M-29 -410l359 1850h137l-96 -504l-23 -86h4q55 86 151.5 145.5t219.5 59.5q180 0 280.5 -110.5t100.5 -303.5q0 -285 -168 -475.5t-389 -190.5q-115 0 -202 53.5t-122 153.5h-4q-2 -45 -12 -98l-96 -494h-140zM276 397q0 -129 66 -213t193 -84q162 0 292.5 147.5 t130.5 383.5q0 139 -68.5 218t-189.5 79q-180 0 -302 -165t-122 -366z" />
+<glyph unicode="&#xff;" horiz-adv-x="1021" d="M-184 -369l69 105q43 -41 115 -41q125 0 229 166l93 149l-234 1020h145l160 -770l19 -108h2q29 57 57 106l447 772h157l-753 -1249q-125 -211 -318 -211q-114 0 -188 61zM416 1264l35 176h124l-32 -176h-127zM725 1264l35 176h127l-35 -176h-127z" />
+<glyph unicode="&#x152;" horiz-adv-x="1943" d="M121 588q0 231 118.5 433t317.5 320.5t422 118.5q51 0 144.5 -10t127.5 -10h711l-25 -127h-667l-103 -525h547l-26 -126h-547l-103 -535h705l-25 -127h-723q-29 0 -116.5 -10t-130.5 -10q-285 0 -456 170t-171 438zM266 582q0 -209 130 -340t354 -131q35 0 71.5 4t55.5 8 l20 4l229 1186q-63 16 -141 16q-293 0 -506 -221t-213 -526z" />
+<glyph unicode="&#x153;" horiz-adv-x="2074" d="M68 426q0 258 192.5 443.5t439.5 185.5q156 0 267.5 -76t158.5 -203h4q80 127 206 203t276 76q184 0 279.5 -102.5t95.5 -270.5q0 -35 -8.5 -79t-16.5 -71l-6 -24h-789q-8 -41 -8 -88q0 -141 87 -230.5t241 -89.5q82 0 166 32t127 63l43 30l45 -114q-18 -14 -52 -37 t-135.5 -61t-197.5 -38q-162 0 -275.5 74t-156.5 207h-4q-88 -129 -224.5 -205t-281.5 -76q-209 0 -341 126t-132 325zM211 430q0 -145 92 -237.5t238 -92.5q186 0 337.5 148.5t151.5 355.5q0 143 -92 233.5t-238 90.5q-190 0 -339.5 -146.5t-149.5 -351.5zM1194 623h643 q6 35 6 71q0 119 -63.5 181.5t-169.5 62.5q-133 0 -248 -84t-168 -231z" />
+<glyph unicode="&#x178;" horiz-adv-x="1155" d="M176 1440h152l202 -522l58 -173h4q59 94 119 170l405 525h172l-649 -826l-121 -614h-141l123 618zM545 1608l35 176h125l-33 -176h-127zM854 1608l35 176h127l-35 -176h-127z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="1032" d="M125 1540l219 244h154l123 -244h-129l-78 166h-4l-144 -166h-141z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="1032" d="M74 1546q45 240 217 240q45 0 78.5 -22.5t51 -51.5t42 -51.5t53.5 -22.5q78 0 105 142h110q-47 -240 -219 -240q-55 0 -93 37t-67.5 73t-64.5 36q-41 0 -66.5 -43.5t-36.5 -96.5h-110z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1441" d="M193 522l22 119h1022l-20 -119h-1024z" />
+<glyph unicode="&#x2014;" horiz-adv-x="1851" d="M193 522l22 119h1432l-21 -119h-1433z" />
+<glyph unicode="&#x2018;" horiz-adv-x="440" d="M205 1108l182 350h117l-146 -350h-153z" />
+<glyph unicode="&#x2019;" horiz-adv-x="432" d="M211 1108l147 350h152l-182 -350h-117z" />
+<glyph unicode="&#x201a;" horiz-adv-x="495" d="M-43 -184l145 352h154l-182 -352h-117z" />
+<glyph unicode="&#x201c;" horiz-adv-x="684" d="M205 1108l182 350h117l-146 -350h-153zM451 1108l182 350h117l-148 -350h-151z" />
+<glyph unicode="&#x201d;" horiz-adv-x="677" d="M211 1108l147 350h152l-182 -350h-117zM457 1108l145 350h154l-183 -350h-116z" />
+<glyph unicode="&#x201e;" horiz-adv-x="741" d="M-43 -184l147 352h152l-182 -352h-117zM203 -184l145 352h154l-183 -352h-116z" />
+<glyph unicode="&#x2022;" horiz-adv-x="823" d="M115 596q0 121 86 207t206.5 86t205.5 -86t85 -207t-85 -207t-205.5 -86t-206.5 86t-86 207z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1458" d="M51 0l33 170h164l-33 -170h-164zM532 0l33 170h164l-33 -170h-164zM1014 0l33 170h163l-32 -170h-164z" />
+<glyph unicode="&#x2039;" horiz-adv-x="688" d="M90 582l393 417h160l-407 -428l258 -413h-140z" />
+<glyph unicode="&#x203a;" horiz-adv-x="686" d="M31 158l407 428l-258 413h139l265 -424l-394 -417h-159z" />
+<glyph unicode="&#x20ac;" horiz-adv-x="1200" d="M68 545l18 104h113q6 84 30 166h-108l18 105h125q102 240 316.5 392t459.5 152l213 -28l-57 -127q-72 20 -158 20q-193 0 -360.5 -113.5t-255.5 -295.5h627l-41 -105h-629q-27 -92 -33 -166h598l-39 -104h-555q12 -190 129 -312t326 -122q45 0 92 7t72 13l24 8l6 -135 q-88 -29 -200 -29q-262 0 -426 158t-174 412h-131z" />
+<glyph unicode="&#x2122;" horiz-adv-x="2027" d="M184 1333v107h758v-107h-321v-790h-117v790h-320zM1016 543l71 897h107l236 -514q18 -39 28 -84h4q10 45 29 84l235 514h107l70 -897h-113l-51 608l2 59h-4l-230 -499h-94l-229 499h-4l2 -59l-52 -608h-114z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1030" d="M0 1030h1030v-1030h-1030v1030z" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1136" d="M102 0l179 911h-129l22 119h129l8 43q23 119 75 200t118.5 115.5t119 48t103.5 13.5l76 -4l-27 -125q-18 4 -47 4t-56.5 -4t-63.5 -20.5t-65.5 -43t-56 -75.5t-38.5 -115l-9 -37h611l-201 -1030h-139l176 911h-467l-178 -911h-140zM950 1266l37 174h150l-35 -174h-152z " />
+<glyph unicode="&#xfb02;" horiz-adv-x="1167" d="M102 0l177 903h-129l22 119h129l10 53q23 117 75 198t118.5 115.5t119 48t103.5 13.5l76 -4l-27 -125q-18 4 -47 4t-56.5 -4t-63.5 -20.5t-65.5 -43t-56 -75.5t-38.5 -115l-11 -45h264l-22 -119h-262l-176 -903h-140zM741 182q0 35 9 74l231 1184h139l-227 -1166 q-6 -33 -6 -63q0 -41 16.5 -62.5t34.5 -25.5t45 -4l31 2l-27 -125q-23 -4 -47 -4q-78 0 -138.5 42t-60.5 148z" />
+<glyph unicode="&#xfb03;" horiz-adv-x="1798" d="M102 0l179 911h-129l22 119h129l8 43q23 119 75 200t118.5 115.5t119 48t103.5 13.5l76 -4l-27 -125q-18 4 -47 4t-56.5 -4t-63.5 -20.5t-65.5 -43t-56 -75.5t-38.5 -115l-9 -37h525l8 43q23 119 75 200t118.5 115.5t118.5 48t104 13.5l75 -4l-26 -125q-18 4 -47 4 t-56.5 -4t-63.5 -20.5t-65.5 -43t-56.5 -75.5t-39 -115l-8 -37h610l-201 -1030h-139l176 911h-467l-178 -911h-139l178 911h-522l-178 -911h-140zM1612 1266l37 174h149l-35 -174h-151z" />
+<glyph unicode="&#xfb04;" horiz-adv-x="1828" d="M102 0l179 911h-129l22 119h129l8 43q23 119 75 200t118.5 115.5t119 48t103.5 13.5l76 -4l-27 -125q-18 4 -47 4t-56.5 -4t-63.5 -20.5t-65.5 -43t-56 -75.5t-38.5 -115l-9 -37h523l8 43q23 119 75 200t118.5 115.5t118.5 47.5q51 14 103 14l76 -4l-26 -125q-18 4 -47 4 t-56.5 -4t-63.5 -20.5t-65.5 -43t-56.5 -75.5t-39 -115l-8 -37h264l-23 -119h-262l-178 -911h-139l178 911h-520l-178 -911h-140zM1403 182q0 35 8 74l232 1184h139l-228 -1166q-6 -33 -6 -63q0 -41 16.5 -62.5t35 -25.5t45.5 -4l30 2l-26 -125q-23 -4 -47 -4 q-78 0 -138.5 42t-60.5 148z" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/phonegap/www/fonts/MuseoSans_300_Italic-webfont.ttf b/phonegap/www/fonts/MuseoSans_300_Italic-webfont.ttf
new file mode 100755
index 000000000..58241a2e9
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_300_Italic-webfont.ttf
Binary files differ
diff --git a/phonegap/www/fonts/MuseoSans_300_Italic-webfont.woff b/phonegap/www/fonts/MuseoSans_300_Italic-webfont.woff
new file mode 100755
index 000000000..95c94194f
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_300_Italic-webfont.woff
Binary files differ
diff --git a/phonegap/www/fonts/MuseoSans_500-webfont.eot b/phonegap/www/fonts/MuseoSans_500-webfont.eot
new file mode 100755
index 000000000..2731833c7
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_500-webfont.eot
Binary files differ
diff --git a/phonegap/www/fonts/MuseoSans_500-webfont.svg b/phonegap/www/fonts/MuseoSans_500-webfont.svg
new file mode 100755
index 000000000..dd240b802
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_500-webfont.svg
@@ -0,0 +1,227 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>
+This is a custom SVG webfont generated by Fontspring.
+</metadata>
+<defs>
+<font id="MuseoSans500" horiz-adv-x="1681" >
+<font-face units-per-em="2048" ascent="1536" descent="-512" />
+<missing-glyph horiz-adv-x="526" />
+<glyph unicode=" " horiz-adv-x="526" />
+<glyph unicode="&#x09;" horiz-adv-x="526" />
+<glyph unicode="&#xa0;" horiz-adv-x="526" />
+<glyph unicode="!" horiz-adv-x="651" d="M223 1446h205l-12 -1049h-178zM225 0v199h203v-199h-203z" />
+<glyph unicode="&#x22;" horiz-adv-x="700" d="M129 1085v385h156v-385h-156zM416 1085v385h155v-385h-155z" />
+<glyph unicode="#" horiz-adv-x="1470" d="M90 391l25 152h268l59 344h-264l25 149h266l72 410h166l-72 -410h317l72 410h166l-72 -410h268l-26 -149h-266l-62 -344h266l-26 -152h-264l-70 -391h-166l68 391h-318l-67 -391h-166l67 391h-266zM549 543h317l62 344h-318z" />
+<glyph unicode="$" horiz-adv-x="1159" d="M111 166l114 153q6 -6 17.5 -16t50.5 -37.5t79 -48t101.5 -37t120.5 -16.5q106 0 178 57.5t72 155.5q0 82 -73 142.5t-177.5 104.5t-208.5 95t-177 139t-73 209q0 150 105.5 261.5t275.5 135.5v193h146v-191q102 -8 189 -42.5t124 -67.5l37 -31l-92 -168q-14 14 -42 34.5 t-111 55.5t-165 35q-115 0 -188.5 -61.5t-73.5 -149.5q0 -57 39 -103t101.5 -79t138 -63.5t151.5 -68.5t138.5 -85t101.5 -121t39 -168q0 -158 -104.5 -270.5t-282.5 -132.5v-189h-146v189q-231 23 -389 170z" />
+<glyph unicode="%" horiz-adv-x="1558" d="M98 1167q0 125 90.5 214t219.5 89t220 -89t91 -214t-91 -214t-220 -89t-219.5 88t-90.5 215zM129 0l1106 1446h192l-1105 -1446h-193zM256 1167q0 -66 44 -108.5t107.5 -42.5t107.5 43t44 108q0 63 -44 108.5t-107.5 45.5t-107.5 -45.5t-44 -108.5zM840 279q0 125 91 214 t220 89q127 0 219 -89.5t92 -214t-92 -214t-219 -89.5q-131 0 -221 88.5t-90 215.5zM999 279q0 -66 43 -109t109 -43q63 0 107.5 44t44.5 107.5t-44.5 108.5t-108 45t-107.5 -45t-44 -108z" />
+<glyph unicode="&#x26;" horiz-adv-x="1400" d="M111 406q0 123 68.5 227t185.5 143v4q-8 2 -20.5 8.5t-45.5 31t-58.5 57t-46 92t-20.5 129.5q0 176 124 274t320 98q35 0 79 -6t71 -10l27 -6l-52 -162q-59 12 -108 12q-111 0 -183.5 -59t-72.5 -162q0 -39 11 -74.5t38 -72.5t82 -58.5t135 -21.5h268v197h199v-197h193 v-176h-193v-193q0 -240 -133 -373t-367 -133q-223 0 -362 123.5t-139 307.5zM317 416q0 -106 82 -180t213 -74q143 0 222 81t79 246v185h-276q-154 0 -237 -67.5t-83 -190.5z" />
+<glyph unicode="'" horiz-adv-x="415" d="M129 1085v385h158v-385h-158z" />
+<glyph unicode="(" horiz-adv-x="618" d="M150 696q0 430 237 809h174q-231 -387 -231 -811q0 -469 231 -889h-174q-237 395 -237 891z" />
+<glyph unicode=")" horiz-adv-x="618" d="M57 -195q231 420 232 889q0 424 -232 811h174q238 -379 238 -809q0 -496 -238 -891h-174z" />
+<glyph unicode="*" horiz-adv-x="956" d="M74 1085l53 172l272 -102l-14 291h186l-16 -291l274 102l56 -172l-281 -75v-4l180 -226l-145 -106l-158 241h-4l-160 -241l-147 106l182 226v4z" />
+<glyph unicode="+" horiz-adv-x="1398" d="M158 504v160h458v503h168v-503h457v-160h-457v-504h-168v504h-458z" />
+<glyph unicode="," horiz-adv-x="522" d="M55 -207l127 422h203l-172 -422h-158z" />
+<glyph unicode="-" horiz-adv-x="966" d="M184 496v176h598v-176h-598z" />
+<glyph unicode="." horiz-adv-x="520" d="M156 0v211h209v-211h-209z" />
+<glyph unicode="/" horiz-adv-x="827" d="M74 -86l520 1610h176l-520 -1610h-176z" />
+<glyph unicode="0" horiz-adv-x="1280" d="M129 725q0 745 510 745q512 0 512 -745q0 -750 -512 -750q-510 0 -510 750zM336 725q0 -563 303 -563q305 0 305 563q0 559 -305 559q-303 0 -303 -559z" />
+<glyph unicode="1" horiz-adv-x="1001" d="M104 1110l347 336h180v-1270h315v-176h-831v176h319v934l2 90h-4q-16 -33 -70 -84l-135 -133z" />
+<glyph unicode="2" horiz-adv-x="1171" d="M113 111q0 121 52 224t131 170.5t171 135.5t171 122t131 127t52 150q0 106 -72.5 173t-187.5 67q-53 0 -103 -19.5t-83 -46t-58.5 -53t-37.5 -47.5l-11 -18l-149 100q6 10 16 29.5t50 66.5t88.5 83t129 65.5t172.5 29.5q201 0 329 -114.5t128 -300.5q0 -96 -38 -180 t-99 -144.5t-135 -116t-147.5 -104.5t-135 -98.5t-100.5 -109.5t-39 -126h717v-176h-932q-10 66 -10 111z" />
+<glyph unicode="3" horiz-adv-x="1161" d="M82 172l111 154q16 -18 44.5 -44t121 -70t184.5 -44q123 0 209 74.5t86 189.5q0 127 -96.5 196.5t-239.5 69.5h-101l-47 109l316 371l90 94v4q-43 -6 -123 -6h-490v176h865v-129l-394 -453q168 -18 296 -124.5t128 -299t-137 -329t-354 -136.5q-82 0 -161 20.5t-132 49.5 t-95 57.5t-61 49.5z" />
+<glyph unicode="4" horiz-adv-x="1241" d="M63 387v127l668 932h232v-887h196v-172h-196v-387h-199v387h-701zM287 559h477v526l8 144h-4q-33 -68 -72 -119l-409 -547v-4z" />
+<glyph unicode="5" horiz-adv-x="1153" d="M98 176l113 148q4 -6 13 -16.5t40 -38t64.5 -48t88 -37t111.5 -16.5q131 0 224.5 82t93.5 211t-94.5 213t-235.5 84q-63 0 -123.5 -18.5t-89.5 -34.5l-31 -19l-116 43l71 717h729v-176h-553l-34 -305l-11 -76h4q80 45 187 45q223 0 363.5 -136t140.5 -335 q0 -209 -146.5 -348.5t-365.5 -139.5q-248 0 -414 168z" />
+<glyph unicode="6" horiz-adv-x="1226" d="M121 657q0 143 40 283.5t116.5 261.5t204.5 194.5t290 73.5q76 0 145.5 -14t102.5 -31l33 -14l-66 -174q-92 47 -207 47q-186 0 -296.5 -142.5t-137.5 -342.5h4q45 61 134 99t186 38q203 0 329.5 -136t126.5 -341q0 -213 -131 -348.5t-333 -135.5q-236 0 -388.5 188.5 t-152.5 493.5zM334 561q0 -147 96 -273t229 -126q121 0 194 84t73 213q0 135 -81 220t-216 85q-121 0 -208 -61.5t-87 -141.5z" />
+<glyph unicode="7" horiz-adv-x="1083" d="M72 1270v176h966v-139l-653 -1307h-209l563 1139q18 37 39 69.5t33 48.5l12 15v4q-33 -6 -106 -6h-645z" />
+<glyph unicode="8" horiz-adv-x="1243" d="M117 418q0 76 28.5 146.5t74.5 120.5t74 74.5t54 43.5q-162 117 -162 289q0 156 117 267t334 111q203 0 329 -105t126 -282q0 -186 -172 -376q197 -121 196 -308q0 -174 -138 -299t-357.5 -125t-361.5 124t-142 319zM324 430q0 -121 88 -196.5t209 -75.5 q117 0 201.5 69.5t84.5 178.5q0 37 -18.5 70.5t-43 57t-71.5 51t-83 44t-97.5 44t-95.5 44.5q-174 -121 -174 -287zM387 1087q0 -29 10.5 -55t21.5 -46.5t39.5 -43t47 -35t59.5 -33t61.5 -29.5t71 -29.5t68.5 -29.5q127 127 127 285q0 98 -71.5 157.5t-186.5 59.5 q-117 0 -182.5 -57.5t-65.5 -143.5z" />
+<glyph unicode="9" horiz-adv-x="1226" d="M100 987q0 213 131 348t334 135q233 0 387 -188t154 -494q0 -143 -40 -283t-117 -261t-205 -195t-289 -74q-76 0 -146.5 14.5t-103.5 30.5l-31 15l66 176q92 -49 206 -49q186 0 297 142t138 343h-4q-43 -61 -133.5 -98t-186.5 -37q-203 0 -330 135t-127 340zM301 987 q0 -135 80 -220t217 -85q121 0 208 62.5t87 140.5q0 147 -96.5 273t-229.5 126q-123 0 -194.5 -84t-71.5 -213z" />
+<glyph unicode=":" horiz-adv-x="598" d="M195 0v211h208v-211h-208zM195 825v211h208v-211h-208z" />
+<glyph unicode=";" horiz-adv-x="600" d="M96 -207l109 422h205l-154 -422h-160zM207 825v211h209v-211h-209z" />
+<glyph unicode="&#x3c;" horiz-adv-x="1142" d="M68 516v135l954 426v-182l-733 -309v-4l733 -310v-182z" />
+<glyph unicode="=" horiz-adv-x="1370" d="M197 309v160h977v-160h-977zM197 696v160h977v-160h-977z" />
+<glyph unicode="&#x3e;" horiz-adv-x="1142" d="M121 90v182l731 310v4l-731 309v182l954 -426v-135z" />
+<glyph unicode="?" horiz-adv-x="1001" d="M66 1343q14 14 42.5 36t123 59t192.5 37q178 0 303 -104.5t125 -270.5q0 -94 -37 -169t-90 -125t-107.5 -96t-91.5 -103.5t-37 -125.5v-84h-194v97q0 86 36 156.5t87 119.5t102 94t87 101.5t36 119.5q0 86 -66.5 144.5t-166.5 58.5q-57 0 -115.5 -21.5t-89.5 -41.5 l-29 -23zM291 0v199h203v-199h-203z" />
+<glyph unicode="@" d="M121 493.5q0 317.5 217 537.5t530 220q276 0 404.5 -117.5t128.5 -297.5v-580h147v-150h-559q-186 0 -305 114t-119 274q0 158 118 270.5t306 112.5h221q-4 92 -91 151t-240 59q-236 0 -398 -175t-162 -418q0 -248 163 -418t419 -170v-162q-340 0 -560 216t-220 533.5z M766 496q0 -100 67.5 -170t170.5 -70h206v483h-202q-106 0 -174 -70.5t-68 -172.5z" />
+<glyph unicode="A" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205z" />
+<glyph unicode="B" horiz-adv-x="1298" d="M197 0v1446h505q186 0 303 -98.5t117 -270.5q0 -104 -48 -186t-132 -125v-4q111 -33 174.5 -129t63.5 -221q0 -197 -132.5 -304.5t-332.5 -107.5h-518zM399 176h326q115 0 181.5 66.5t66.5 179.5q0 111 -68.5 179.5t-181.5 68.5h-324v-494zM399 838h303q96 0 154.5 61.5 t58.5 157.5t-57 154.5t-160 58.5h-299v-432z" />
+<glyph unicode="C" horiz-adv-x="1478" d="M98 731q0 315 210 527t526 212q98 0 188 -19t148.5 -47t103.5 -56.5t65 -49.5l21 -18l-100 -152q-18 18 -53.5 44t-145 70t-219.5 44q-238 0 -386.5 -158.5t-148.5 -394.5q0 -238 150.5 -404.5t386.5 -166.5q121 0 232.5 47t162.5 94l51 47l109 -145q-8 -10 -23.5 -25.5 t-70 -54.5t-115 -69.5t-155.5 -55.5t-197 -25q-322 0 -531 217t-209 539z" />
+<glyph unicode="D" horiz-adv-x="1515" d="M197 0v1446h479q336 0 534.5 -191.5t198.5 -529.5q0 -340 -198.5 -532.5t-534.5 -192.5h-479zM399 176h263q248 0 393 143.5t145 405.5q0 260 -145.5 402.5t-392.5 142.5h-263v-1094z" />
+<glyph unicode="E" horiz-adv-x="1173" d="M197 0v1446h839v-176h-637v-453h519v-176h-519v-465h672v-176h-874z" />
+<glyph unicode="F" horiz-adv-x="1067" d="M197 0v1446h796v-176h-594v-475h506v-177h-506v-618h-202z" />
+<glyph unicode="G" horiz-adv-x="1556" d="M100 725q0 315 211 530t527 215q96 0 186 -18t149.5 -43t104.5 -50.5t65 -43.5l21 -19l-102 -151q-18 16 -52 39.5t-140.5 62.5t-215.5 39q-248 0 -396.5 -158.5t-148.5 -398.5q0 -250 151.5 -408.5t381.5 -158.5q111 0 213 45t149 90l47 45v209h-235v176h420v-727h-179 v90l3 62h-5l-18 -19q-12 -12 -55 -43t-90.5 -53.5t-124 -42t-156.5 -19.5q-297 0 -504 212t-207 538z" />
+<glyph unicode="H" horiz-adv-x="1548" d="M197 0v1446h202v-635h750v635h203v-1446h-203v635h-750v-635h-202z" />
+<glyph unicode="I" horiz-adv-x="595" d="M197 0v1446h202v-1446h-202z" />
+<glyph unicode="J" horiz-adv-x="1099" d="M61 487h201v-61q0 -137 66.5 -200.5t163 -63.5t161 61.5t64.5 194.5v852h-365v176h568v-1030q0 -219 -127 -330t-303.5 -111t-302.5 112t-126 329v71z" />
+<glyph unicode="K" horiz-adv-x="1275" d="M197 0v1446h202v-608h215l365 608h223l-420 -686v-4l447 -756h-230l-385 664h-215v-664h-202z" />
+<glyph unicode="L" horiz-adv-x="1083" d="M197 0v1446h202v-1270h648v-176h-850z" />
+<glyph unicode="M" horiz-adv-x="1773" d="M152 0l116 1446h213l332 -782l72 -195h4q39 115 72 195l331 782h213l117 -1446h-201l-71 911l-2 213h-5q-43 -133 -77 -213l-289 -651h-180l-287 651q-33 78 -78 217h-4q2 -129 -4 -217l-70 -911h-202z" />
+<glyph unicode="N" horiz-adv-x="1550" d="M197 0v1446h200l643 -940q25 -35 54.5 -87t48.5 -87l18 -35h4q-14 129 -14 209v940h203v-1446h-199l-645 938q-53 80 -121 211h-4q14 -129 14 -211v-938h-202z" />
+<glyph unicode="O" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5z" />
+<glyph unicode="P" horiz-adv-x="1243" d="M197 0v1446h528q201 0 328 -124t127 -329t-128 -331.5t-327 -126.5h-326v-535h-202zM399 711h293q131 0 206 75.5t75 206.5q0 129 -75 203t-204 74h-295v-559z" />
+<glyph unicode="Q" horiz-adv-x="1705" d="M100 731q0 313 214 526t528 213q315 0 529 -213t214 -526q0 -270 -170 -477l172 -164l-119 -127l-168 168q-195 -156 -458 -156q-313 0 -527.5 219.5t-214.5 536.5zM309 731q0 -242 153.5 -405.5t379.5 -163.5q180 0 313 106l-170 166l119 127l166 -168q106 147 106 338 q0 238 -153.5 396.5t-380.5 158.5q-225 0 -379 -158.5t-154 -396.5z" />
+<glyph unicode="R" horiz-adv-x="1312" d="M197 0v1446h442q182 0 270 -33q113 -41 178.5 -145.5t65.5 -245.5q0 -139 -70.5 -245.5t-189.5 -145.5v-4q16 -18 43 -66l307 -561h-229l-305 575h-310v-575h-202zM399 752h291q119 0 187.5 70.5t68.5 191.5q0 160 -115 223q-61 33 -198 33h-234v-518z" />
+<glyph unicode="S" horiz-adv-x="1118" d="M86 166l115 153q6 -6 17 -16t50 -37.5t79 -48t101.5 -37t120.5 -16.5q106 0 178 57.5t72 155.5q0 63 -39 112.5t-100.5 84t-136 66.5t-149.5 68.5t-136 82t-100 116t-39 160.5q0 170 132 286.5t335 116.5q119 0 221 -36.5t145 -73.5l43 -35l-92 -168q-14 14 -41.5 34.5 t-110.5 55.5t-165 35q-113 0 -187.5 -61.5t-74.5 -149.5q0 -82 71.5 -139.5t175 -98t207 -90t175 -140.5t71.5 -220q0 -174 -125 -291t-334 -117q-86 0 -167 19.5t-135 47.5t-96 56.5t-61 48.5z" />
+<glyph unicode="T" horiz-adv-x="1214" d="M10 1270v176h1194v-176h-495v-1270h-203v1270h-496z" />
+<glyph unicode="U" horiz-adv-x="1490" d="M176 512v934h203v-934q0 -164 98 -257t266 -93q170 0 269.5 93t99.5 261v930h203v-934q0 -240 -158 -388.5t-411.5 -148.5t-411.5 148.5t-158 388.5z" />
+<glyph unicode="V" horiz-adv-x="1294" d="M12 1446h219l359 -1022l55 -199h4q29 121 56 199l362 1022h215l-532 -1446h-203z" />
+<glyph unicode="W" horiz-adv-x="1941" d="M68 1446h208l256 -1061q18 -78 27 -154h4q10 74 31 154l283 1061h180l282 -1061l31 -154h4q6 76 27 154l266 1061h209l-379 -1446h-235l-250 938q-25 92 -43 205h-4q-18 -113 -43 -205l-250 -938h-236z" />
+<glyph unicode="X" horiz-adv-x="1253" d="M45 0l457 745l-428 701h233l228 -391l92 -172h4q41 92 88 172l227 391h234l-428 -701l456 -745h-229l-262 444l-92 166h-4q-39 -86 -86 -166l-263 -444h-227z" />
+<glyph unicode="Y" horiz-adv-x="1204" d="M16 1446h230l268 -475l88 -183h4q43 100 88 183l264 475h230l-483 -834v-612h-203v612z" />
+<glyph unicode="Z" horiz-adv-x="1243" d="M84 0v135l696 1004q25 37 50.5 69.5t39.5 48.5l15 15v4q-39 -6 -109 -6h-655v176h1016v-133l-697 -1006q-25 -35 -51.5 -67.5t-40.5 -46.5l-12 -17v-4q39 4 108 4h701v-176h-1061z" />
+<glyph unicode="[" horiz-adv-x="616" d="M207 -195v1700h338v-149h-164v-1399h164v-152h-338z" />
+<glyph unicode="\" horiz-adv-x="827" d="M57 1524h176l521 -1610h-176z" />
+<glyph unicode="]" horiz-adv-x="618" d="M72 -43h166v1399h-166v149h340v-1700h-340v152z" />
+<glyph unicode="^" horiz-adv-x="1255" d="M141 506l410 940h129l407 -940h-178l-295 721l-292 -721h-181z" />
+<glyph unicode="_" horiz-adv-x="1216" d="M57 0h1102v-160h-1102v160z" />
+<glyph unicode="`" horiz-adv-x="1021" d="M330 1806h213l149 -260h-168z" />
+<glyph unicode="a" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197z" />
+<glyph unicode="b" horiz-adv-x="1228" d="M156 0v1446h198v-473l-4 -88h4q4 6 11.5 18t36 43t62.5 53.5t94 42t128 19.5q207 0 331 -149.5t124 -393.5t-132 -393.5t-339 -149.5q-66 0 -123.5 18.5t-92 45.5t-61 52.5t-37.5 43.5l-12 19h-4q4 -33 4 -78v-76h-188zM348 514q0 -150 77 -259.5t216 -109.5 q127 0 213 99.5t86 271.5q0 168 -81 269.5t-212 101.5q-127 0 -213 -93.5t-86 -279.5z" />
+<glyph unicode="c" horiz-adv-x="1120" d="M82 518q0 231 156.5 387t398.5 156q115 0 212 -38t138 -77l39 -37l-94 -139q-12 12 -36 32.5t-98.5 53.5t-152.5 33q-156 0 -258 -104.5t-102 -264.5t103.5 -266.5t262.5 -106.5q86 0 166 35t117 70l37 35l80 -146l-18 -17q-11 -11 -50 -40t-84 -50.5t-115.5 -40 t-146.5 -18.5q-244 0 -399.5 153.5t-155.5 389.5z" />
+<glyph unicode="d" horiz-adv-x="1230" d="M88 518q0 246 131 394.5t338 148.5q68 0 125 -16.5t91 -41t59.5 -49t35.5 -41.5l9 -16h4q-4 31 -4 70v479h198v-1446h-188v98l2 70h-4q-4 -8 -11.5 -20.5t-35 -46t-63.5 -59.5t-97.5 -46.5t-132.5 -20.5q-209 0 -333 149.5t-124 393.5zM291 518q0 -168 81 -269.5 t212 -101.5q127 0 213 93.5t86 279.5q0 150 -77 259.5t-216 109.5q-127 0 -213 -99.5t-86 -271.5z" />
+<glyph unicode="e" horiz-adv-x="1136" d="M84 518q0 244 146.5 393.5t371.5 149.5q211 0 330 -137.5t119 -348.5l-7 -86h-755q8 -164 109.5 -253t246.5 -89q164 0 299 115l8 6l82 -145q-16 -16 -49 -41t-137.5 -66t-214.5 -41q-242 0 -395.5 155t-153.5 388zM295 639h553q-4 129 -75 196.5t-175 67.5 q-117 0 -200 -69.5t-103 -194.5z" />
+<glyph unicode="f" horiz-adv-x="688" d="M82 862v160h129v49q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5t-59 -67.5t-22.5 -115v-45h245v-160h-245v-862h-197v862h-129z" />
+<glyph unicode="g" horiz-adv-x="1214" d="M88 542.5q0 229.5 121 374t332 144.5q213 0 311 -131l14 -23h4q-2 14 -2 33v96h191v-993q0 -123 -44 -217t-120 -148.5t-166 -81t-192 -26.5q-186 0 -355 86l66 156q129 -70 284 -70q147 0 237.5 70.5t90.5 220.5v76l2 65h-4q-96 -162 -307 -162t-337 150.5t-126 380z M289 547q0 -164 81 -263.5t220 -99.5q121 0 197.5 84t76.5 273q0 348 -293 348q-133 0 -207.5 -91t-74.5 -251z" />
+<glyph unicode="h" horiz-adv-x="1234" d="M156 1446h198v-531l-4 -86h4q41 90 141.5 161t241.5 71q356 0 357 -397v-664h-199v618q0 125 -41 193t-155.5 68t-205 -72t-122.5 -184q-16 -55 -17 -138v-485h-198v1446z" />
+<glyph unicode="i" horiz-adv-x="509" d="M154 1243v203h200v-203h-200zM156 0v1036h198v-1036h-198z" />
+<glyph unicode="j" horiz-adv-x="507" d="M-113 -248q18 -2 45 -2q35 0 68 8.5t71 28.5t61.5 69.5t23.5 120.5v1059h196v-1071q0 -121 -42 -205t-109.5 -119.5t-125 -49t-118.5 -13.5l-70 4v170zM154 1243v203h200v-203h-200z" />
+<glyph unicode="k" horiz-adv-x="1077" d="M156 0v1446h198v-791h146l282 381h226l-344 -456v-5l383 -575h-232l-311 487h-150v-487h-198z" />
+<glyph unicode="l" horiz-adv-x="542" d="M143 283v1163h199v-1129q0 -86 28.5 -116.5t82.5 -30.5l34 2v-176q-31 -4 -65 -4q-279 0 -279 291z" />
+<glyph unicode="m" horiz-adv-x="1871" d="M156 1036h192v-137l-4 -76h4q39 96 139.5 167t217.5 71q258 0 311 -236h4q45 98 146.5 167t222.5 69q342 0 342 -397v-664h-199v621q0 125 -38 192.5t-146 67.5q-104 0 -183.5 -76t-107.5 -189q-14 -59 -15 -143v-473h-198v621q0 123 -36 191.5t-144.5 68.5t-187.5 -78 t-109 -195q-12 -49 -13 -135v-473h-198v1036z" />
+<glyph unicode="n" horiz-adv-x="1234" d="M156 1036h192v-137l-4 -76h4q41 88 139.5 163t249.5 75q356 0 357 -397v-664h-199v618q0 125 -41 193t-156 68q-117 0 -206 -71t-121 -183q-16 -55 -17 -140v-485h-198v1036z" />
+<glyph unicode="o" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5z" />
+<glyph unicode="p" horiz-adv-x="1228" d="M156 1036h182v-88l-4 -76h4q4 8 11 20.5t37 45.5t65.5 57.5t98 45t136.5 20.5q207 0 331 -149.5t124 -393.5t-132 -393.5t-337 -149.5q-63 0 -119.5 17.5t-91.5 43t-60.5 50.5t-35.5 41l-11 18h-4q4 -37 4 -90v-465h-198v1446zM348 514q0 -150 79 -259.5t214 -109.5 q127 0 213 99.5t86 271.5q0 168 -81 269.5t-212 101.5q-127 0 -213 -93.5t-86 -279.5z" />
+<glyph unicode="q" horiz-adv-x="1230" d="M88 518q0 246 131 394.5t338 148.5q68 0 126 -18.5t93 -43t61.5 -50t36.5 -44.5l11 -18h4q-2 31 -2 71v78h188v-1446h-198v473l4 91h-4q-4 -8 -11.5 -19.5t-35 -42.5t-62.5 -54.5t-94.5 -43t-128.5 -19.5q-209 0 -333 149.5t-124 393.5zM291 518q0 -168 81 -269.5 t212 -101.5q127 0 213 93.5t86 279.5q0 150 -77 259.5t-216 109.5q-127 0 -213 -99.5t-86 -271.5z" />
+<glyph unicode="r" horiz-adv-x="768" d="M156 0v1036h192v-180l-4 -78h4q37 119 124 195t204 76l51 -5v-196q-27 6 -57 6q-96 0 -176 -65.5t-115 -178.5q-25 -80 -25 -186v-424h-198z" />
+<glyph unicode="s" horiz-adv-x="917" d="M72 127l96 141q12 -14 36.5 -33.5t102.5 -53.5t158 -34q70 0 121 35t51 94q0 51 -55.5 90.5t-133 69t-155.5 65.5t-133.5 103.5t-55.5 161.5q0 137 106.5 216t268.5 79q100 0 184.5 -28.5t116.5 -57.5l33 -29l-80 -149q-10 10 -29.5 25.5t-86 41t-140.5 25.5 q-72 0 -121 -32t-49 -95q0 -51 55.5 -88t133 -66.5t155.5 -65.5t133.5 -103.5t55.5 -162.5q0 -131 -103.5 -216t-271.5 -85q-113 0 -211 38t-139 77z" />
+<glyph unicode="t" horiz-adv-x="733" d="M63 862v160h142v299h192v-299h250v-160h-250v-461q0 -59 16.5 -103t40 -68.5t55.5 -39t57.5 -18.5t51.5 -4l48 4v-176q-29 -4 -70 -4q-49 0 -94 6t-102.5 30.5t-99.5 64.5t-71.5 114t-29.5 172v483h-136z" />
+<glyph unicode="u" horiz-adv-x="1224" d="M141 373v663h199v-618q0 -125 40 -191.5t155 -66.5q152 0 243.5 114.5t91.5 276.5v485h199v-1036h-192v137l4 76h-4q-39 -90 -140.5 -164t-240.5 -74q-355 1 -355 398z" />
+<glyph unicode="v" horiz-adv-x="1028" d="M14 1036h211l252 -700q8 -25 16.5 -60.5t14.5 -58.5l4 -22h4l4 22q6 23 15.5 58.5t17.5 60.5l252 700h209l-383 -1036h-230z" />
+<glyph unicode="w" horiz-adv-x="1667" d="M35 1036h211l215 -727q6 -23 13 -51.5t9 -44.5l4 -14h5q10 57 26 110l225 725h183l223 -725l29 -110h4q8 57 24 110l217 727h209l-334 -1036h-219l-215 666l-28 112h-5q-12 -59 -28 -112l-213 -666h-221z" />
+<glyph unicode="x" horiz-adv-x="1040" d="M45 0l352 532l-334 504h228l192 -315l35 -62h4q18 35 35 62l193 315h227l-334 -504l352 -532h-225l-217 346l-31 57h-4q-16 -33 -31 -57l-217 -346h-225z" />
+<glyph unicode="y" horiz-adv-x="1044" d="M4 1036h223l260 -678l39 -125h4q16 70 35 123l252 680h215l-485 -1222q-47 -117 -136 -180.5t-200 -63.5q-51 0 -101.5 16.5t-74.5 32.5l-25 14l70 152q57 -43 121 -43q123 0 186 152l51 118z" />
+<glyph unicode="z" horiz-adv-x="1058" d="M80 0v115l522 655l86 96v4q-33 -4 -100 -4h-486v170h854v-114l-522 -658l-88 -94v-4q35 4 103 4h526v-170h-895z" />
+<glyph unicode="{" horiz-adv-x="716" d="M100 578v176q6 0 18.5 2t42 16t53.5 36.5t42 68t18 104.5v172q0 92 26 160.5t61.5 104.5t86 58.5t86 27.5t72.5 5l47 -2v-151h-28q-27 0 -50.5 -7.5t-55.5 -26.5t-51 -65.5t-19 -115.5v-211q0 -57 -17.5 -104.5t-42 -75t-48.5 -47t-42 -27.5l-16 -6v-4q6 -2 17 -6.5 t40 -25t50.5 -47t39.5 -74.5q19 -47 19 -107v-236q0 -70 19 -116t51 -65.5t55.5 -26.5t50.5 -7h28v-152q-18 -4 -47 -4q-37 0 -72.5 5.5t-86 28t-86 58t-61.5 105.5t-26 162v196q0 59 -18 103.5t-43 66t-50.5 34.5t-43.5 15z" />
+<glyph unicode="|" horiz-adv-x="579" d="M203 -326v1948h174v-1948h-174z" />
+<glyph unicode="}" horiz-adv-x="716" d="M63 -45h29q27 0 50.5 7t55 26.5t51 65.5t19.5 116v235q0 94 42 159t83 83l41 19v4q-6 2 -17 7t-40 25.5t-50.5 47t-40 74.5t-18.5 106v211q0 70 -19.5 116t-51 65t-55 26.5t-50.5 7.5h-29v151q18 2 48 2q37 0 72.5 -5t85.5 -27.5t86 -58.5t61.5 -104.5t25.5 -160.5v-172 q0 -172 138 -219l36 -8v-176q-6 0 -18 -2.5t-42 -16.5t-53.5 -35.5t-42 -65.5t-18.5 -104v-196q0 -92 -25.5 -162t-61.5 -105.5t-86 -58t-86 -28t-72 -5.5l-48 4v152z" />
+<glyph unicode="~" horiz-adv-x="1245" d="M137 418q0 174 75 260t212 86q72 0 130 -32t89 -68.5t76 -68.5t96 -32q74 0 105.5 57.5t31.5 135.5h162q0 -346 -285 -346q-72 0 -130 30.5t-88.5 68.5t-77 68.5t-97.5 30.5q-72 0 -104.5 -57t-32.5 -133h-162z" />
+<glyph unicode="&#xa1;" horiz-adv-x="591" d="M193 -410l14 1049h178l12 -1049h-204zM193 838v198h202v-198h-202z" />
+<glyph unicode="&#xa2;" horiz-adv-x="1179" d="M109 723q0 227 116.5 388t315.5 187v172h145v-172q133 -20 232.5 -103t152.5 -214l-180 -70q-90 203 -273 203q-143 0 -225 -109.5t-82 -281.5q0 -176 80 -282.5t227 -106.5q184 0 273 203l180 -72q-55 -125 -152.5 -213t-232.5 -102v-177h-145v177q-199 27 -315.5 187.5 t-116.5 385.5z" />
+<glyph unicode="&#xa3;" horiz-adv-x="1210" d="M115 0v176h125v477h-90v144h90v278q0 170 126 282.5t318 112.5q186 0 332 -120l10 -11l-117 -141q-98 88 -223 88q-111 0 -176.5 -62.5t-65.5 -156.5v-270h377v-144h-377v-477h666v-176h-995z" />
+<glyph unicode="&#xa5;" horiz-adv-x="1243" d="M57 1446h232l241 -451l88 -209h5q43 113 88 209l243 451h232l-340 -606h209v-129h-277l-55 -99v-75h332v-129h-332v-408h-205v408h-334v129h334v75l-55 99h-279v129h211z" />
+<glyph unicode="&#xa7;" horiz-adv-x="905" d="M98 -23l90 138q84 -76 199 -76q94 0 155.5 56.5t61.5 158.5q0 41 -12 92l-135 770h161l144 -799q10 -55 10 -92q0 -156 -104.5 -254t-280.5 -98q-80 0 -151.5 26.5t-104.5 51.5zM129 1120q0 154 104.5 252t282.5 98q78 0 150.5 -26.5t105.5 -50.5l33 -27l-94 -131 q-82 70 -195 70q-96 0 -157.5 -53.5t-61.5 -153.5q0 -37 12 -82l140 -789h-164l-144 799q-12 47 -12 94z" />
+<glyph unicode="&#xa8;" horiz-adv-x="1021" d="M258 1599v207h164v-207h-164zM600 1599v207h164v-207h-164z" />
+<glyph unicode="&#xa9;" d="M111 723q0 311 212 529t515 218q305 0 519 -218t214 -529t-214 -529.5t-519 -218.5q-303 0 -515 218.5t-212 529.5zM260 723q0 -256 167 -432t411 -176q248 0 415.5 176t167.5 432t-168 432t-415 176q-244 0 -411 -176t-167 -432zM449 721q0 168 111.5 288.5t291.5 120.5 q195 0 311 -165l23 -37l-125 -68q-8 14 -23.5 36t-67.5 57.5t-112 35.5q-117 0 -185.5 -79t-68.5 -189q0 -115 67.5 -191.5t186.5 -76.5q59 0 110.5 32.5t71.5 63.5l21 33l125 -68q-4 -8 -12.5 -21.5t-38 -49t-64.5 -62.5t-94 -48.5t-125 -21.5q-180 0 -291.5 120 t-111.5 290z" />
+<glyph unicode="&#xaa;" horiz-adv-x="864" d="M150 543v116h563v-116h-563zM152 981q0 225 385 225h20v13q0 129 -131 129q-39 0 -82 -14.5t-65 -28.5l-23 -15l-59 101q92 76 247 75q127 0 194 -66.5t67 -191.5v-411h-140v94h-4q-6 -12 -19.5 -30.5t-61.5 -48.5t-107 -30q-88 0 -154.5 53.5t-66.5 145.5zM299 991 q0 -37 27.5 -62.5t76.5 -25.5q68 0 111 56.5t43 125.5v17h-25q-233 0 -233 -111z" />
+<glyph unicode="&#xab;" horiz-adv-x="1138" d="M90 578l336 421h199l-336 -421l336 -420h-199zM502 578l336 421h198l-336 -421l336 -420h-198z" />
+<glyph unicode="&#xac;" horiz-adv-x="1257" d="M123 696v160h977v-547h-166v387h-811z" />
+<glyph unicode="&#xad;" horiz-adv-x="882" d="M143 496v176h598v-176h-598z" />
+<glyph unicode="&#xae;" d="M111 723q0 311 212 529t515 218q305 0 519 -218t214 -529t-214 -529.5t-519 -218.5q-303 0 -515 218.5t-212 529.5zM260 723q0 -256 167 -432t411 -176q248 0 415.5 176t167.5 432t-168 432t-415 176q-244 0 -411 -176t-167 -432zM588 340v772h297q111 0 177 -64.5 t66 -170.5q0 -82 -43 -136.5t-98 -68.5v-4q8 -8 27 -43l147 -285h-160l-143 299h-125v-299h-145zM733 745h123q57 0 91 35t34 97q0 59 -34 91.5t-91 32.5h-123v-256z" />
+<glyph unicode="&#xaf;" horiz-adv-x="1021" d="M250 1606v143h522v-143h-522z" />
+<glyph unicode="&#xb0;" horiz-adv-x="796" d="M88 1167q0 125 90 214t219 89t220.5 -89t91.5 -214t-91.5 -214t-220.5 -89t-219 88t-90 215zM246 1167.5q0 -63.5 44 -107.5t107.5 -44t107.5 44t44 107.5t-44 108.5t-107.5 45t-107.5 -45t-44 -108.5z" />
+<glyph unicode="&#xb1;" horiz-adv-x="1394" d="M156 504v160h458v503h168v-503h457v-160h-457v-504h-168v504h-458zM188 -195h1018v-159h-1018v159z" />
+<glyph unicode="&#xb2;" horiz-adv-x="796" d="M96 940q0 96 45 171t108.5 121t127 86t108.5 87t45 102q0 57 -42 95t-105 38q-96 -4 -172 -98l-100 92l11 16.5t32.5 35t56.5 44t79 36t101 16.5q127 0 211 -75t84 -194q0 -82 -42 -147.5t-103.5 -107t-123 -78.5t-105.5 -81t-48 -98h436v-135h-598q0 8 -2 23.5t-3 28 t-1 22.5z" />
+<glyph unicode="&#xb3;" horiz-adv-x="796" d="M82 981l86 109q8 -12 24.5 -29t70.5 -45.5t114 -28.5q68 0 119 45t51 111q0 68 -54.5 106.5t-127.5 38.5h-70l-33 78l182 211l50 49v4q-39 -6 -74 -6h-289v137h555v-98l-223 -258q102 -14 170.5 -81t68.5 -181q0 -121 -91 -209t-228 -88q-92 0 -167 33.5t-105 66.5z" />
+<glyph unicode="&#xb4;" horiz-adv-x="1021" d="M330 1546l149 260h213l-196 -260h-166z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1267" d="M170 -410v1446h199v-618q0 -125 40 -191.5t152 -66.5q154 0 246 114.5t92 276.5v485h199v-1036h-193v141l4 72h-6q-4 -10 -12 -25.5t-40 -56.5t-72 -72.5t-108.5 -57.5t-148.5 -26q-131 2 -186 64h-4q14 -100 14 -160v-289h-176z" />
+<glyph unicode="&#x3bc;" horiz-adv-x="1267" d="M170 -410v1446h199v-618q0 -125 40 -191.5t152 -66.5q154 0 246 114.5t92 276.5v485h199v-1036h-193v141l4 72h-6q-4 -10 -12 -25.5t-40 -56.5t-72 -72.5t-108.5 -57.5t-148.5 -26q-131 2 -186 64h-4q14 -100 14 -160v-289h-176z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1208" d="M88 970.5q0 200.5 142.5 338t340.5 137.5h557v-176h-401v-1372h-154v596q-199 0 -342 138t-143 338.5zM854 -102v1255h152v-1255h-152z" />
+<glyph unicode="&#xb7;" horiz-adv-x="563" d="M180 489v211h203v-211h-203z" />
+<glyph unicode="&#xb8;" horiz-adv-x="1021" d="M350 -291q41 -14 86 -14q98 0 98.5 63.5t-108.5 63.5l-37 -2l60 227l100 -20v-17l-25 -112q66 -8 107 -47t41 -103q0 -88 -60.5 -130t-148.5 -42l-113 14v119z" />
+<glyph unicode="&#xb9;" horiz-adv-x="796" d="M133 1550l217 211h139v-760h187v-135h-531v135h191v510l4 54h-4q-8 -18 -37 -45l-72 -70z" />
+<glyph unicode="&#xba;" horiz-adv-x="956" d="M127 1130q0 145 101.5 241.5t246.5 96.5q147 0 249.5 -96t102.5 -242q0 -150 -101 -247t-248.5 -97t-249 97t-101.5 247zM160 543v116h639v-116h-639zM274 1130q0 -92 58.5 -152t144.5 -60q84 0 142.5 60t58.5 152q0 90 -58.5 148.5t-142.5 58.5q-86 0 -144.5 -58.5 t-58.5 -148.5z" />
+<glyph unicode="&#xbb;" horiz-adv-x="1140" d="M102 158l336 420l-336 421h199l336 -421l-336 -420h-199zM516 158l336 420l-336 421h199l336 -421l-336 -420h-199z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1980" d="M109 1235l217 211h139v-760h186v-135h-530v135h190v510l4 53h-4q-8 -18 -37 -45l-71 -69zM535 0l688 1446h153l-688 -1446h-153zM1167 219v103l412 573h166v-541h125v-135h-125v-219h-152v219h-426zM1335 354h258v252l6 119h-4q-29 -55 -59 -98l-201 -269v-4z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1968" d="M109 1235l217 211h139v-760h186v-135h-530v135h190v510l4 53h-4q-8 -18 -37 -45l-71 -69zM539 0l688 1446h153l-688 -1446h-153zM1229 74q0 96 45 170.5t108.5 121t127 86.5t108.5 87t45 102q0 57 -42 95t-105 38q-96 -4 -173 -98l-100 92q4 6 11.5 16.5t33 35t56 44 t78.5 35.5t102 16q127 0 211 -74.5t84 -193.5q0 -82 -42 -147.5t-103.5 -107.5t-123 -79t-105.5 -81t-48 -97h436v-135h-598q0 8 -2 23.5t-3 28t-1 22.5z" />
+<glyph unicode="&#xbe;" horiz-adv-x="2004" d="M82 666l86 108q8 -12 24.5 -28.5t70.5 -45t114 -28.5q68 0 119 45t51 110q0 68 -54.5 107t-127.5 39h-70l-33 78l182 211l50 49v4q-39 -6 -74 -6h-289v137h555v-98l-223 -258q102 -14 170.5 -81t68.5 -182q0 -121 -91 -209t-228 -88q-92 0 -167 34t-105 67zM559 0 l688 1446h154l-688 -1446h-154zM1192 219v103l412 573h165v-541h125v-135h-125v-219h-151v219h-426zM1360 354h258v252l6 119h-4q-29 -55 -59 -98l-201 -269v-4z" />
+<glyph unicode="&#xbf;" horiz-adv-x="921" d="M80 -57q0 94 37 168.5t90 125t107.5 96.5t91 104.5t36.5 125.5v76h193v-88q0 -86 -36 -157.5t-86 -120t-101.5 -93.5t-87 -101t-35.5 -120q0 -86 66.5 -145.5t166.5 -59.5q57 0 115.5 22.5t87.5 43.5l31 22l108 -141q-6 -6 -16 -14.5t-45 -31t-74 -39.5t-98.5 -31.5 t-122.5 -14.5q-178 0 -303 103.5t-125 269.5zM438 838v198h203v-198h-203z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM369 1806h213l149 -260h-168zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205zM553 1546l149 260h213l-196 -260h-166z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM358 1546l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM299 1548q0 260 209 260q59 0 104 -34.5t82 -69.5t72 -35q41 0 60.5 40t19.5 93h143q0 -260 -209 -260q-59 0 -104 35t-82 69.5t-72 34.5q-80 0 -80 -133h-143zM422 584h438l-160 458l-55 205h-4 q-33 -131 -57 -205z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM391 1599v207h164v-207h-164zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205zM733 1599v207h164v-207h-164z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205zM469 1673q0 70 51 112t123 42t123 -42t51 -112q0 -68 -51 -109.5t-123 -41.5t-123 41.5t-51 109.5zM575 1673q0 -29 18.5 -48t49.5 -19 q29 0 48.5 19.5t19.5 47.5q0 33 -19.5 52.5t-48.5 19.5q-31 0 -49.5 -19.5t-18.5 -52.5z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1798" d="M8 0l598 1446h1057v-176h-639v-453h520v-176h-520v-465h674v-176h-875v643h-346l-258 -643h-211zM545 811h278v459h-94z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1482" d="M102 731q0 315 210 527t526 212q98 0 188 -19t148.5 -47t103.5 -56.5t65 -49.5l21 -18l-100 -152q-18 18 -53 44t-145 70t-220 44q-238 0 -386.5 -158.5t-148.5 -394.5q0 -238 150.5 -404.5t386.5 -166.5q121 0 232.5 47t162.5 94l51 47l109 -145q-8 -8 -22.5 -23.5 t-65.5 -52.5t-108.5 -66.5t-147.5 -56t-187 -31.5l-16 -77q66 -8 107 -47t41 -103q0 -88 -60.5 -130t-148.5 -42l-113 14v119q41 -14 86 -14q98 0 98 63.5t-108 63.5l-37 -2l41 160q-291 27 -475.5 238.5t-184.5 512.5z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1173" d="M197 0v1446h839v-176h-637v-453h519v-176h-519v-465h672v-176h-874zM365 1806h213l149 -260h-168z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1173" d="M197 0v1446h839v-176h-637v-453h519v-176h-519v-465h672v-176h-874zM551 1546l149 260h213l-196 -260h-166z" />
+<glyph unicode="&#xca;" horiz-adv-x="1173" d="M197 0v1446h839v-176h-637v-453h519v-176h-519v-465h672v-176h-874zM356 1546l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1173" d="M197 0v1446h839v-176h-637v-453h519v-176h-519v-465h672v-176h-874zM387 1599v207h164v-207h-164zM729 1599v207h164v-207h-164z" />
+<glyph unicode="&#xcc;" horiz-adv-x="595" d="M25 1806h213l149 -260h-168zM197 0v1446h202v-1446h-202z" />
+<glyph unicode="&#xcd;" horiz-adv-x="595" d="M197 0v1446h202v-1446h-202zM211 1546l149 260h213l-196 -260h-166z" />
+<glyph unicode="&#xce;" horiz-adv-x="595" d="M14 1546l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174zM197 0v1446h202v-1446h-202z" />
+<glyph unicode="&#xcf;" horiz-adv-x="595" d="M47 1599v207h164v-207h-164zM197 0v1446h202v-1446h-202zM389 1599v207h164v-207h-164z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1554" d="M115 639v168h121v639h479q336 0 534.5 -191.5t198.5 -529.5q0 -340 -198.5 -532.5t-534.5 -192.5h-479v639h-121zM438 176h262q248 0 393.5 143.5t145.5 405.5q0 260 -145.5 402.5t-393.5 142.5h-262v-463h305v-168h-305v-463z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1550" d="M197 0v1446h200l643 -940q25 -35 54.5 -87t48.5 -87l18 -35h4q-14 129 -14 209v940h203v-1446h-199l-645 938q-53 80 -121 211h-4q14 -129 14 -211v-938h-202zM430 1548q0 260 209 260q59 0 104 -34.5t82 -69.5t72 -35q41 0 60.5 40t19.5 93h143q0 -260 -209 -260 q-59 0 -104 35t-82 69.5t-72 34.5q-80 0 -80 -133h-143z" />
+<glyph unicode="&#xd2;" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5zM567 1806h213l150 -260h-168z " />
+<glyph unicode="&#xd3;" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5zM754 1546l149 260h213 l-196 -260h-166z" />
+<glyph unicode="&#xd4;" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5zM557 1546l180 260h207 l180 -260h-174l-108 164h-4l-107 -164h-174z" />
+<glyph unicode="&#xd5;" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5zM498 1548q0 260 209 260 q59 0 104 -34.5t82 -69.5t72 -35q41 0 60 40t19 93h144q0 -260 -209 -260q-59 0 -104.5 35t-82 69.5t-71.5 34.5q-80 0 -80 -133h-143z" />
+<glyph unicode="&#xd6;" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5zM590 1599v207h164v-207h-164z M932 1599v207h164v-207h-164z" />
+<glyph unicode="&#xd7;" horiz-adv-x="1320" d="M129 113l422 471l-422 471l113 112l417 -467l420 467l113 -112l-424 -471l424 -471l-113 -113l-420 465l-417 -465z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1687" d="M102 733q0 311 215 524t529 213q205 0 379 -100l94 129l100 -69l-94 -132q123 -102 192.5 -248.5t69.5 -316.5q0 -319 -214 -538.5t-527 -219.5q-217 0 -393 109l-97 -135l-102 69l100 142q-119 104 -185.5 252.5t-66.5 320.5zM311 733q0 -246 160 -411l641 890 q-121 74 -266 74q-223 0 -379 -158.5t-156 -394.5zM567 242q125 -80 279 -80q223 0 377.5 165t154.5 406q0 248 -168 406z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1490" d="M176 512v934h203v-934q0 -164 98 -257t266 -93q170 0 269.5 93t99.5 261v930h203v-934q0 -240 -158 -388.5t-411.5 -148.5t-411.5 148.5t-158 388.5zM471 1806h213l150 -260h-168z" />
+<glyph unicode="&#xda;" horiz-adv-x="1490" d="M176 512v934h203v-934q0 -164 98 -257t266 -93q170 0 269.5 93t99.5 261v930h203v-934q0 -240 -158 -388.5t-411.5 -148.5t-411.5 148.5t-158 388.5zM655 1546l150 260h213l-197 -260h-166z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1490" d="M176 512v934h203v-934q0 -164 98 -257t266 -93q170 0 269.5 93t99.5 261v930h203v-934q0 -240 -158 -388.5t-411.5 -148.5t-411.5 148.5t-158 388.5zM461 1546l180 260h207l180 -260h-174l-109 164h-4l-106 -164h-174z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1490" d="M176 512v934h203v-934q0 -164 98 -257t266 -93q170 0 269.5 93t99.5 261v930h203v-934q0 -240 -158 -388.5t-411.5 -148.5t-411.5 148.5t-158 388.5zM494 1599v207h163v-207h-163zM836 1599v207h163v-207h-163z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1204" d="M16 1446h230l268 -475l88 -183h4q43 100 88 183l264 475h230l-483 -834v-612h-203v612zM514 1546l150 260h213l-197 -260h-166z" />
+<glyph unicode="&#xde;" horiz-adv-x="1243" d="M197 1446h200v-246h328q201 0 327 -124t126 -328.5t-127 -331.5t-328 -127h-326v-289h-200v1446zM397 465h295q131 0 206 75.5t75 207.5q0 129 -75 202.5t-204 73.5h-297v-559z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1204" d="M156 0v1085q0 180 131 282.5t311 102.5q168 0 278.5 -95t110.5 -234q0 -68 -31.5 -126.5t-70.5 -93t-71 -77.5t-32 -84q0 -35 38 -72t92.5 -73.5t107.5 -78.5t91 -104.5t38 -134.5q0 -147 -102.5 -229t-247.5 -82q-84 0 -157 14t-103 29l-31 16v176q115 -63 266 -63 q74 0 123 36.5t49 110.5q0 55 -57.5 109.5t-126 94.5t-125.5 105.5t-57 139.5q0 57 32.5 110.5t70.5 89t70.5 86t32.5 99.5q0 66 -51 112.5t-143 46.5q-98 0 -168 -59t-70 -168v-1071h-198z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M264 1446h213l150 -260h-168zM272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197zM446 1186l150 260h213l-197 -260h-166z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M252 1186l180 260h207l180 -260h-174l-108 164h-5l-106 -164h-174zM272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M193 1188q0 260 208 260q59 0 104.5 -35t82.5 -69.5t71 -34.5q41 0 60.5 40t19.5 93h144q0 -260 -209 -260q-59 0 -104.5 34.5t-82 69.5t-71.5 35q-80 0 -80 -133h-143zM272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197zM285 1239v207h164v-207h-164zM627 1239v207h164v-207h-164z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197zM362 1313q0 70 51.5 111.5t123 41.5t123 -42t51.5 -111q0 -68 -51.5 -110t-123 -42t-123 42t-51.5 110zM469 1313q0 -29 18.5 -48.5t49.5 -19.5q29 0 48 19.5t19 48.5 q0 33 -19.5 52t-47.5 19q-31 0 -49.5 -19t-18.5 -52z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1769" d="M74 291q0 92 45 160.5t109.5 104.5t155.5 58.5t160.5 27.5t147.5 5h51v19q0 227 -233 227q-70 0 -140.5 -24.5t-107.5 -49.5l-37 -26l-80 145q6 4 17.5 13.5t48.5 29.5t78 36.5t105.5 30t129.5 13.5q260 0 344 -182h4q123 182 379 182q203 0 317.5 -142.5t114.5 -361.5 l-4 -59h-743q8 -170 103.5 -260.5t240.5 -90.5q80 0 156.5 30t113.5 61l37 28l82 -143q-16 -16 -49 -41t-137.5 -66t-212.5 -41q-154 0 -268.5 69t-178.5 192h-4q-10 -29 -32.5 -65t-67.5 -84t-121 -80t-170 -32q-150 0 -252 85.5t-102 230.5zM276 301q0 -70 50.5 -118 t144.5 -48q121 0 197.5 103.5t76.5 228.5v31h-96q-373 0 -373 -197zM944 647h539q-4 125 -74 190.5t-172 65.5q-117 0 -195 -64.5t-98 -191.5z" />
+<glyph unicode="&#xe7;" horiz-adv-x="1122" d="M84 518q0 231 156.5 387t398.5 156q115 0 212 -38t136 -77l41 -37l-94 -139q-12 12 -36 32.5t-98.5 53.5t-152.5 33q-156 0 -258 -104.5t-102 -264.5t103.5 -266.5t262.5 -106.5q86 0 166 35t117 70l37 35l80 -146l-17 -16q-10 -10 -47 -38t-79 -49.5t-108.5 -41 t-137.5 -21.5l-17 -77q66 -8 107 -47t41 -103q0 -88 -60.5 -130t-148.5 -42l-113 14v119q41 -14 86 -14q98 0 98 63.5t-108 63.5l-37 -2l41 162q-209 29 -339 176t-130 360z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1136" d="M84 518q0 244 146.5 393.5t371.5 149.5q211 0 330 -137.5t119 -348.5l-7 -86h-755q8 -164 109.5 -253t246.5 -89q164 0 299 115l8 6l82 -145q-16 -16 -49 -41t-137.5 -66t-214.5 -41q-242 0 -395.5 155t-153.5 388zM295 639h553q-4 129 -75 196.5t-175 67.5 q-117 0 -200 -69.5t-103 -194.5zM330 1446h213l149 -260h-168z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1136" d="M84 518q0 244 146.5 393.5t371.5 149.5q211 0 330 -137.5t119 -348.5l-7 -86h-755q8 -164 109.5 -253t246.5 -89q164 0 299 115l8 6l82 -145q-16 -16 -49 -41t-137.5 -66t-214.5 -41q-242 0 -395.5 155t-153.5 388zM295 639h553q-4 129 -75 196.5t-175 67.5 q-117 0 -200 -69.5t-103 -194.5zM514 1186l150 260h213l-197 -260h-166z" />
+<glyph unicode="&#xea;" horiz-adv-x="1136" d="M84 518q0 244 146.5 393.5t371.5 149.5q211 0 330 -137.5t119 -348.5l-7 -86h-755q8 -164 109.5 -253t246.5 -89q164 0 299 115l8 6l82 -145q-16 -16 -49 -41t-137.5 -66t-214.5 -41q-242 0 -395.5 155t-153.5 388zM295 639h553q-4 129 -75 196.5t-175 67.5 q-117 0 -200 -69.5t-103 -194.5zM317 1186l181 260h207l180 -260h-174l-109 164h-4l-106 -164h-175z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1136" d="M84 518q0 244 146.5 393.5t371.5 149.5q211 0 330 -137.5t119 -348.5l-7 -86h-755q8 -164 109.5 -253t246.5 -89q164 0 299 115l8 6l82 -145q-16 -16 -49 -41t-137.5 -66t-214.5 -41q-242 0 -395.5 155t-153.5 388zM295 639h553q-4 129 -75 196.5t-175 67.5 q-117 0 -200 -69.5t-103 -194.5zM350 1239v207h164v-207h-164zM692 1239v207h164v-207h-164z" />
+<glyph unicode="&#xec;" horiz-adv-x="509" d="M-18 1446h213l149 -260h-168zM156 0v1036h198v-1036h-198z" />
+<glyph unicode="&#xed;" horiz-adv-x="509" d="M156 0v1036h198v-1036h-198zM168 1186l149 260h213l-196 -260h-166z" />
+<glyph unicode="&#xee;" horiz-adv-x="509" d="M-27 1186l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174zM156 0v1036h198v-1036h-198z" />
+<glyph unicode="&#xef;" horiz-adv-x="509" d="M4 1239v207h164v-207h-164zM156 0v1036h198v-1036h-198zM346 1239v207h164v-207h-164z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1206" d="M88 481q0 193 130 333t355 140q158 -2 252 -86h4q-61 164 -223 273l-370 -164l-21 127l254 113q-125 63 -264 94l55 162q238 -53 424 -164l285 125l18 -125l-188 -86q295 -246 295 -660q0 -109 -30 -209t-89.5 -187t-163.5 -139.5t-238 -52.5q-223 0 -354 150.5 t-131 355.5zM289 477q0 -135 76.5 -232.5t212.5 -97.5q80 0 142 34t98 91.5t54.5 122t18.5 133.5q0 117 -79 192t-210 75q-150 0 -231.5 -93.5t-81.5 -224.5z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1234" d="M156 1036h192v-137l-4 -76h4q41 88 139.5 163t249.5 75q356 0 357 -397v-664h-199v618q0 125 -41 193t-156 68q-117 0 -206 -71t-121 -183q-16 -55 -17 -140v-485h-198v1036zM297 1188q0 260 209 260q59 0 104 -35t82 -69.5t72 -34.5q41 0 60.5 40t19.5 93h143 q0 -260 -209 -260q-59 0 -104 34.5t-82 69.5t-72 35q-80 0 -80 -133h-143z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5zM365 1446h213 l149 -260h-168z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5zM551 1186 l149 260h213l-196 -260h-166z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5zM356 1186 l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5zM295 1188 q0 260 209 260q59 0 104 -35t82 -69.5t72 -34.5q41 0 60.5 40t19.5 93h143q0 -260 -209 -260q-59 0 -104 34.5t-82 69.5t-72 35q-80 0 -80 -133h-143z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5zM387 1239v207 h164v-207h-164zM729 1239v207h164v-207h-164z" />
+<glyph unicode="&#xf7;" horiz-adv-x="1300" d="M133 504v160h1034v-160h-1034zM553 90v186h192v-186h-192zM553 891v186h192v-186h-192z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1277" d="M80 520q0 233 161.5 387t397.5 154q147 0 276 -68l82 113l97 -70l-80 -110q184 -158 184 -406q0 -233 -163 -389t-396 -156q-137 0 -262 60l-80 -113l-98 72l75 106q-194 158 -194 420zM283 520q0 -160 102 -266l426 592q-82 43 -172 43q-147 0 -251.5 -104.5 t-104.5 -264.5zM483 182q74 -35 156 -35q150 0 253 105.5t103 267.5q0 147 -92 250z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1224" d="M141 373v663h199v-618q0 -125 40 -191.5t155 -66.5q152 0 243.5 114.5t91.5 276.5v485h199v-1036h-192v137l4 76h-4q-39 -90 -140.5 -164t-240.5 -74q-355 1 -355 398zM332 1446h213l149 -260h-168z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1224" d="M141 373v663h199v-618q0 -125 40 -191.5t155 -66.5q152 0 243.5 114.5t91.5 276.5v485h199v-1036h-192v137l4 76h-4q-39 -90 -140.5 -164t-240.5 -74q-355 1 -355 398zM516 1186l150 260h213l-197 -260h-166z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1224" d="M141 373v663h199v-618q0 -125 40 -191.5t155 -66.5q152 0 243.5 114.5t91.5 276.5v485h199v-1036h-192v137l4 76h-4q-39 -90 -140.5 -164t-240.5 -74q-355 1 -355 398zM322 1186l180 260h207l180 -260h-174l-109 164h-4l-106 -164h-174z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1224" d="M141 373v663h199v-618q0 -125 40 -191.5t155 -66.5q152 0 243.5 114.5t91.5 276.5v485h199v-1036h-192v137l4 76h-4q-39 -90 -140.5 -164t-240.5 -74q-355 1 -355 398zM354 1239v207h164v-207h-164zM696 1239v207h164v-207h-164z" />
+<glyph unicode="&#xfd;" horiz-adv-x="1044" d="M4 1036h223l260 -678l39 -125h4q16 70 35 123l252 680h215l-485 -1222q-47 -117 -136 -180.5t-200 -63.5q-51 0 -101.5 16.5t-74.5 32.5l-25 14l70 152q57 -43 121 -43q123 0 186 152l51 118zM440 1186l150 260h213l-197 -260h-166z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1228" d="M156 -410v1856h198v-471l-2 -86h4q2 2 18.5 22.5t30 36t43 38t60.5 37.5t77 26.5t97 11.5q209 0 335 -151.5t126 -391t-130 -391.5t-337 -152q-66 0 -124 17.5t-93 43t-59.5 50.5t-34.5 41l-11 18h-4q4 -37 4 -90v-465h-198zM348 516q0 -162 81 -265.5t216 -103.5 q127 0 211 102.5t84 268.5q0 164 -80 267.5t-211 103.5q-129 0 -215 -92.5t-86 -280.5z" />
+<glyph unicode="&#xff;" horiz-adv-x="1044" d="M4 1036h223l260 -678l39 -125h4q16 70 35 123l252 680h215l-485 -1222q-47 -117 -136 -180.5t-200 -63.5q-51 0 -101.5 16.5t-74.5 32.5l-25 14l70 152q57 -43 121 -43q123 0 186 152l51 118zM276 1239v207h164v-207h-164zM618 1239v207h164v-207h-164z" />
+<glyph unicode="&#x152;" horiz-adv-x="1966" d="M98 725q0 313 214 526t534 213q53 0 136 -9t116 -9h733v-176h-639v-453h520v-176h-520v-465h676v-176h-768q-33 0 -117 -9t-137 -9q-317 0 -532.5 214t-215.5 529zM307 725q0 -242 151.5 -404.5t387.5 -162.5q37 0 72.5 3t54.5 7l18 4v1102q-63 16 -145 16 q-236 0 -387.5 -162.5t-151.5 -402.5z" />
+<glyph unicode="&#x153;" horiz-adv-x="2048" d="M82 516q0 240 160.5 392.5t392.5 152.5q301 0 448 -246h4q131 246 426 246q211 0 330 -137.5t119 -348.5l-6 -86h-756q12 -164 112.5 -253t243.5 -89q164 0 299 115l9 6l82 -145q-16 -16 -49 -41t-137.5 -66t-215.5 -41q-313 0 -452 252h-5q-145 -252 -452 -252 q-231 0 -392 150.5t-161 390.5zM285 516q0 -164 102 -266.5t251.5 -102.5t253 103.5t103.5 271.5q0 162 -104.5 264.5t-251.5 102.5t-250.5 -103.5t-103.5 -269.5zM1206 639h553q-4 127 -73.5 195.5t-174.5 68.5q-119 0 -202 -69.5t-103 -194.5z" />
+<glyph unicode="&#x178;" horiz-adv-x="1204" d="M16 1446h230l268 -475l88 -183h4q43 100 88 183l264 475h230l-483 -834v-612h-203v612zM344 1599v207h164v-207h-164zM686 1599v207h164v-207h-164z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="1021" d="M227 1546l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="1021" d="M166 1548q0 260 209 260q59 0 104 -34.5t82 -69.5t72 -35q41 0 60.5 40t19.5 93h143q0 -260 -209 -260q-59 0 -104 35t-82 69.5t-72 34.5q-80 0 -80 -133h-143z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1445" d="M184 504v160h1078v-160h-1078z" />
+<glyph unicode="&#x2014;" horiz-adv-x="1855" d="M184 504v160h1487v-160h-1487z" />
+<glyph unicode="&#x2018;" horiz-adv-x="464" d="M100 1069l136 399h145l-88 -399h-193z" />
+<glyph unicode="&#x2019;" horiz-adv-x="448" d="M104 1071l89 399h192l-133 -399h-148z" />
+<glyph unicode="&#x201a;" horiz-adv-x="499" d="M86 -184l88 399h186l-133 -399h-141z" />
+<glyph unicode="&#x201c;" horiz-adv-x="755" d="M100 1069l136 399h147l-88 -399h-195zM389 1069l135 399h148l-88 -399h-195z" />
+<glyph unicode="&#x201d;" horiz-adv-x="737" d="M104 1071l89 399h194l-135 -399h-148zM393 1071l88 399h195l-133 -399h-150z" />
+<glyph unicode="&#x201e;" horiz-adv-x="784" d="M86 -184l88 399h186l-133 -399h-141zM369 -184l88 399h188l-133 -399h-143z" />
+<glyph unicode="&#x2022;" horiz-adv-x="841" d="M104 596q0 133 93.5 225t224.5 92t223 -93t92 -224t-92 -224t-223 -93t-224.5 92t-93.5 225z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1576" d="M156 0v211h202v-211h-202zM686 0v211h205v-211h-205zM1219 0v211h202v-211h-202z" />
+<glyph unicode="&#x2039;" horiz-adv-x="727" d="M90 578l336 421h199l-336 -421l336 -420h-199z" />
+<glyph unicode="&#x203a;" horiz-adv-x="727" d="M102 158l336 420l-336 421h199l336 -421l-336 -420h-199z" />
+<glyph unicode="&#x20ac;" horiz-adv-x="1210" d="M78 528v129h112q-8 82 0 148h-112v131h137q61 236 251.5 385t440.5 149q51 0 102.5 -6t77.5 -12l27 -6l-49 -186q-76 23 -162 22q-170 0 -296 -94t-177 -252h576l-27 -131h-578q-12 -68 -2 -148h553l-26 -129h-492q47 -162 177 -261t300 -99q45 0 92.5 6t69.5 14l25 7 l39 -185q-98 -35 -230 -35q-258 0 -447.5 153t-246.5 400h-135z" />
+<glyph unicode="&#x2122;" horiz-adv-x="1925" d="M47 1309v137h778v-137h-311v-764h-156v764h-311zM891 545l72 901h141l213 -471l29 -86h4q12 49 26 86l213 471h144l69 -901h-153l-43 538l2 62h-4l-195 -434h-125l-194 434h-5l2 -62l-43 -538h-153z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1035" d="M0 1035h1035v-1035h-1035v1035z" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1198" d="M82 877v159h129v35q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5t-59 -67.5t-22.5 -115v-31h634v-1036h-198v877h-436v-877h-197v877h-129zM842 1243v203h200v-203h-200z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="1230" d="M82 862v160h129v49q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5t-59 -67.5t-22.5 -115v-45h245v-160h-245v-862h-197v862h-129zM831 283v1163h199v-1129q0 -86 28.5 -116.5t82.5 -30.5l35 2v-176q-31 -4 -66 -4 q-279 0 -279 291z" />
+<glyph unicode="&#xfb03;" horiz-adv-x="1886" d="M82 877v159h129v35q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5t-59 -67.5t-22.5 -115v-31h491v35q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5 t-59 -67.5t-22.5 -115v-31h635v-1036h-199v877h-436v-877h-197v877h-491v-877h-197v877h-129zM1530 1243v203h201v-203h-201z" />
+<glyph unicode="&#xfb04;" horiz-adv-x="1918" d="M82 877v159h129v35q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5t-59 -67.5t-22.5 -115v-31h491v35q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5 t-59 -67.5t-22.5 -115v-31h245v-159h-245v-877h-197v877h-491v-877h-197v877h-129zM1520 283v1163h198v-1129q0 -86 29 -116.5t82 -30.5l35 2v-176q-31 -4 -66 -4q-278 0 -278 291z" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/phonegap/www/fonts/MuseoSans_500-webfont.ttf b/phonegap/www/fonts/MuseoSans_500-webfont.ttf
new file mode 100755
index 000000000..d23f991ce
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_500-webfont.ttf
Binary files differ
diff --git a/phonegap/www/fonts/MuseoSans_500-webfont.woff b/phonegap/www/fonts/MuseoSans_500-webfont.woff
new file mode 100755
index 000000000..c1f85a061
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_500-webfont.woff
Binary files differ
diff --git a/phonegap/www/fonts/MuseoSans_500_Italic-webfont.eot b/phonegap/www/fonts/MuseoSans_500_Italic-webfont.eot
new file mode 100755
index 000000000..e60c7e02e
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_500_Italic-webfont.eot
Binary files differ
diff --git a/phonegap/www/fonts/MuseoSans_500_Italic-webfont.svg b/phonegap/www/fonts/MuseoSans_500_Italic-webfont.svg
new file mode 100755
index 000000000..28df57c2f
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_500_Italic-webfont.svg
@@ -0,0 +1,227 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>
+This is a custom SVG webfont generated by Fontspring.
+</metadata>
+<defs>
+<font id="MuseoSans500Italic" horiz-adv-x="1073" >
+<font-face units-per-em="2048" ascent="1536" descent="-512" />
+<missing-glyph horiz-adv-x="526" />
+<glyph unicode=" " horiz-adv-x="526" />
+<glyph unicode="&#x09;" horiz-adv-x="526" />
+<glyph unicode="&#xa0;" horiz-adv-x="526" />
+<glyph unicode="!" horiz-adv-x="643" d="M100 0l41 201h205l-39 -201h-207zM190 397l191 1049h207l-219 -1049h-179z" />
+<glyph unicode="&#x22;" horiz-adv-x="694" d="M217 1085l74 385h155l-73 -385h-156zM504 1085l76 385h155l-76 -385h-155z" />
+<glyph unicode="#" horiz-adv-x="1462" d="M43 391l53 152h264l129 344h-262l56 149h260l151 410h170l-151 -410h319l152 410h170l-152 -410h262l-55 -149h-262l-129 -344h262l-55 -152h-262l-144 -391h-170l144 391h-318l-143 -391h-170l143 391h-262zM530 543h318l129 344h-318z" />
+<glyph unicode="$" horiz-adv-x="1159" d="M27 166l129 143q14 -16 40.5 -40.5t118 -64.5t191.5 -40q115 0 206 68.5t91 181.5q0 70 -60.5 124t-145.5 96t-171 90t-146.5 128t-60.5 186q0 168 135 291t330 139l37 189h143l-37 -193q201 -25 316 -135l6 -6l-115 -149q-12 12 -36.5 30.5t-103.5 48t-163 29.5 q-125 0 -216 -73.5t-91 -170.5q0 -63 60.5 -114.5t146.5 -93.5t171 -90t145.5 -132t60.5 -194q0 -172 -134.5 -299t-334.5 -138l-37 -186h-144l35 193q-221 31 -354 168z" />
+<glyph unicode="%" horiz-adv-x="1570" d="M25 0l1366 1446h202l-1366 -1446h-202zM199 1133q0 129 109.5 233t246.5 104q123 0 199.5 -75.5t76.5 -194.5q0 -131 -109.5 -233.5t-246.5 -102.5q-125 0 -200.5 74t-75.5 195zM360 1137q0 -53 35 -87t94 -34q72 0 126.5 53t54.5 127q0 55 -36 90t-93 35 q-70 0 -125.5 -55t-55.5 -129zM784 244q0 129 108.5 233.5t246.5 104.5q123 0 199.5 -76t76.5 -195q0 -131 -109.5 -233.5t-244.5 -102.5q-125 0 -201 74t-76 195zM944 248q0 -53 36 -87t95 -34q70 0 125 54.5t55 125.5q0 55 -35.5 90t-93.5 35q-70 0 -126 -56t-56 -128z " />
+<glyph unicode="&#x26;" horiz-adv-x="1394" d="M63 356q0 139 96.5 260t243.5 162v4q-6 2 -15 7.5t-33.5 25t-43 44t-34 70.5t-15.5 101q0 201 147.5 320.5t356.5 119.5q43 0 91 -7t73 -13l26 -8l-79 -156q-57 12 -107 12q-123 0 -214 -74.5t-91 -197.5q0 -176 227 -176h269l38 197h199l-37 -197h191l-35 -176h-191 l-39 -193q-100 -506 -565 -506q-215 0 -337 105.5t-122 275.5zM276 369q0 -92 67 -149.5t183 -57.5q299 0 365 327l37 185h-277q-154 0 -264.5 -79t-110.5 -226z" />
+<glyph unicode="'" horiz-adv-x="409" d="M217 1085l74 385h160l-76 -385h-158z" />
+<glyph unicode="(" horiz-adv-x="612" d="M131 354q0 655 424 1151h180q-426 -532 -426 -1155q0 -287 94 -545h-165q-107 268 -107 549z" />
+<glyph unicode=")" horiz-adv-x="614" d="M-109 -195q426 537 426 1156q0 287 -94 544h166q106 -264 107 -549q0 -651 -424 -1151h-181z" />
+<glyph unicode="*" horiz-adv-x="948" d="M160 1090l88 167l252 -102l41 291h186l-74 -291l295 102l25 -174l-301 -79l-2 -5l135 -221l-156 -106l-117 243h-4l-204 -241l-134 108l228 230v4z" />
+<glyph unicode="+" horiz-adv-x="1376" d="M127 504l31 160h456l101 503h168l-101 -503h457l-29 -160h-456l-99 -504h-168l99 504h-459z" />
+<glyph unicode="," horiz-adv-x="528" d="M-100 -207l209 422h210l-258 -422h-161z" />
+<glyph unicode="-" horiz-adv-x="956" d="M156 496l32 176h598l-32 -176h-598z" />
+<glyph unicode="." horiz-adv-x="512" d="M35 0l41 215h213l-41 -215h-213z" />
+<glyph unicode="/" horiz-adv-x="825" d="M-68 -86l832 1610h188l-833 -1610h-187z" />
+<glyph unicode="0" horiz-adv-x="1288" d="M123 453q0 119 20.5 248.5t69.5 269t122 249t188.5 180t256.5 70.5q428 0 428 -477q0 -119 -20.5 -249t-69.5 -269t-121.5 -248.5t-188.5 -180.5t-259 -71q-426 1 -426 478zM332 457q0 -295 225 -295q92 0 169 58.5t126 148.5t83 202.5t48 217t14 196.5q0 299 -223 299 q-111 0 -200 -83t-139 -213t-76.5 -267t-26.5 -264z" />
+<glyph unicode="1" horiz-adv-x="995" d="M2 0l31 176h319l180 918l19 88h-4q-23 -33 -84 -84l-158 -129l-106 139l417 338h183l-248 -1270h313l-33 -176h-829z" />
+<glyph unicode="2" horiz-adv-x="1171" d="M10 0q2 129 52.5 237.5t130 185.5t176 143.5t192.5 125t175 115.5t128 129t49 151q0 88 -59 140.5t-158 52.5q-55 0 -109.5 -19.5t-92 -46t-68.5 -53t-45 -47.5l-16 -18l-144 112q8 10 22.5 27.5t64.5 64t104.5 80t137.5 62t169 28.5q184 0 297.5 -99t113.5 -263 q0 -139 -81.5 -255t-201.5 -197t-243 -151.5t-220 -154.5t-118 -174h707l-33 -176h-930z" />
+<glyph unicode="3" horiz-adv-x="1159" d="M-8 172l127 141q4 -6 12 -15t40 -34.5t66.5 -45t94 -35t123.5 -15.5q137 0 243.5 92t106.5 223q0 106 -82 160.5t-211 54.5h-104l-25 109l379 371l108 94v4q-43 -6 -122 -6h-478l35 176h864l-26 -129l-477 -459q57 -6 113.5 -27.5t110.5 -62.5t88 -112.5t34 -163.5 q0 -207 -160 -362t-393 -155q-92 0 -173 20.5t-132.5 49.5t-90 57.5t-55.5 49.5z" />
+<glyph unicode="4" horiz-adv-x="1243" d="M20 387l25 127l832 932h249l-174 -887h197l-33 -172h-196l-76 -387h-199l74 387h-699zM295 559h459l102 526l35 144h-4q-47 -66 -94 -119l-498 -549v-2z" />
+<glyph unicode="5" horiz-adv-x="1159" d="M16 176l131 137q4 -6 11.5 -15t35 -34.5t59.5 -45t85 -35t113 -15.5q143 0 258.5 101.5t115.5 248.5q0 106 -76.5 173t-201.5 67q-66 0 -130.5 -18.5t-97.5 -34.5l-30 -19l-115 45l213 715h735l-35 -176h-555l-92 -301l-24 -76h4q82 41 186 41q188 0 309 -114.5 t121 -291.5q0 -229 -175 -391t-408 -162q-264 0 -408 164z" />
+<glyph unicode="6" horiz-adv-x="1228" d="M113 504q0 143 54 307t150.5 313.5t253 247.5t340.5 98q84 0 158 -15t107 -30l30 -16l-92 -166q-86 41 -201 41q-186 0 -325 -142.5t-205 -342.5h4q55 61 145.5 99t178.5 38q184 0 289.5 -109.5t105.5 -287.5q0 -215 -149.5 -389.5t-381.5 -174.5q-211 0 -336.5 142.5 t-125.5 386.5zM317 485q0 -131 71 -227t185 -96q139 0 234.5 108.5t95.5 261.5q0 106 -64.5 169t-183.5 63q-121 0 -229.5 -81t-108.5 -198z" />
+<glyph unicode="7" horiz-adv-x="1085" d="M39 0l784 1139q59 84 111 133v4q-33 -6 -105 -6h-632l34 176h967l-27 -139l-907 -1307h-225z" />
+<glyph unicode="8" horiz-adv-x="1249" d="M76 369q0 86 40 166.5t102.5 139t100 88.5t70.5 48q-123 102 -123 240q0 166 138.5 292.5t363.5 126.5q195 0 306.5 -90t111.5 -250q0 -72 -32 -147.5t-81 -136t-80.5 -93t-58.5 -55.5q154 -106 153 -260q0 -188 -160.5 -325.5t-391.5 -137.5q-209 0 -334 107t-125 287z M289 379q0 -100 71.5 -160.5t178.5 -60.5q133 0 236.5 77.5t103.5 200.5q0 39 -17.5 71t-60.5 63.5t-72 48t-100 52.5l-97 48q-33 -18 -67.5 -45t-77.5 -71t-70.5 -102.5t-27.5 -121.5zM471 1053q0 -29 9 -54.5t30.5 -49t39 -40t54.5 -37t56.5 -31t64.5 -32t61 -29.5 q193 166 193 336q0 80 -58.5 126t-160.5 46q-127 0 -208 -68.5t-81 -166.5z" />
+<glyph unicode="9" horiz-adv-x="1230" d="M66 37l92 166q88 -41 202 -41q186 0 324.5 142t204.5 343h-4q-45 -55 -135.5 -95t-186.5 -40q-186 0 -290.5 108.5t-104.5 286.5q0 215 150.5 389t381.5 174q211 0 336 -142t125 -386q0 -113 -32.5 -242t-101.5 -257t-161 -232.5t-224 -170t-280 -65.5q-185 1 -296 62z M369 913q0 -104 64.5 -167.5t180.5 -63.5q121 0 230.5 82t109.5 199q0 131 -69.5 226t-186.5 95q-139 0 -234 -108.5t-95 -262.5z" />
+<glyph unicode=":" horiz-adv-x="595" d="M72 0l41 215h215l-43 -215h-213zM231 821l43 215h213l-41 -215h-215z" />
+<glyph unicode=";" horiz-adv-x="606" d="M-74 -207l209 422h211l-256 -422h-164zM252 821l41 215h209l-41 -215h-209z" />
+<glyph unicode="&#x3c;" horiz-adv-x="1171" d="M59 516v135l955 426v-182l-733 -309v-4l733 -310v-182z" />
+<glyph unicode="=" horiz-adv-x="1376" d="M190 309v160h977v-160h-977zM190 696v160h977v-160h-977z" />
+<glyph unicode="&#x3e;" horiz-adv-x="1165" d="M141 90v182l731 310v4l-731 309v182l955 -426v-135z" />
+<glyph unicode="?" horiz-adv-x="989" d="M168 0l41 201h205l-39 -201h-207zM199 1356q18 12 51 32.5t128 53.5t185 33q166 0 273.5 -89.5t107.5 -238.5q0 -100 -45 -184t-111.5 -140.5t-135 -105.5t-124 -109.5t-67.5 -126.5l-19 -84h-192l18 97q18 90 72.5 165.5t119 126t127 99.5t104.5 108.5t42 128.5 q0 74 -53 120t-143 46q-131 -2 -250 -86z" />
+<glyph unicode="@" horiz-adv-x="1658" d="M84 358q0 176 73.5 341t195.5 286t285 193.5t333 72.5q252 0 364.5 -95t112.5 -255q0 -49 -12 -110l-103 -535h146l-29 -150h-537q-174 0 -275 95.5t-101 240.5q0 170 140 302.5t343 132.5h242q4 20 4 32q0 80 -77 129t-216 49q-274 0 -482 -220t-208 -498 q0 -205 129 -336t352 -131l-31 -158q-283 0 -466 174t-183 440zM737 446q0 -84 54.5 -137t144.5 -53h205l94 483h-201q-121 0 -209 -88t-88 -205z" />
+<glyph unicode="A" horiz-adv-x="1282" d="M-98 0l792 1446h226l235 -1446h-203l-63 416h-545l-225 -416h-217zM428 584h440l-71 458l-21 205h-4q-55 -131 -94 -205z" />
+<glyph unicode="B" horiz-adv-x="1302" d="M78 0l282 1446h465q125 0 197 -27q92 -35 143.5 -109.5t51.5 -179.5q0 -123 -67 -221t-177 -145v-4q84 -31 131 -106.5t47 -178.5q0 -156 -84 -270.5t-221 -167.5q-94 -37 -213 -37h-555zM315 176h326q78 0 135 29q76 37 121 109.5t45 164.5q0 88 -54 139.5t-153 51.5 h-323zM442 838h306q111 0 186.5 77.5t75.5 192.5q0 76 -46 119t-135 43h-301z" />
+<glyph unicode="C" horiz-adv-x="1480" d="M111 602q0 231 118.5 433t316 318.5t421.5 116.5q102 0 193 -19t148.5 -48t100.5 -57.5t61 -47.5l19 -20l-121 -139q-16 16 -47 40.5t-133.5 64.5t-214.5 40q-270 0 -462 -201.5t-192 -470.5q0 -197 118 -323.5t323 -126.5q236 0 452 164l29 22l88 -160q-10 -8 -28.5 -22 t-78 -51t-123 -66t-159.5 -51.5t-190 -22.5q-293 0 -466 174t-173 453z" />
+<glyph unicode="D" horiz-adv-x="1513" d="M80 0l280 1446h447q299 0 469 -147.5t170 -415.5q0 -242 -107.5 -442.5t-304 -320.5t-442.5 -120h-512zM315 176h263q289 0 475 197.5t186 492.5q0 195 -119 299.5t-327 104.5h-265z" />
+<glyph unicode="E" horiz-adv-x="1171" d="M78 0l284 1446h838l-35 -176h-637l-88 -453h518l-34 -176h-518l-91 -465h672l-33 -176h-876z" />
+<glyph unicode="F" horiz-adv-x="1069" d="M78 0l282 1446h795l-35 -176h-594l-92 -475h504l-33 -177h-506l-120 -618h-201z" />
+<glyph unicode="G" horiz-adv-x="1556" d="M111 590q0 358 258 619t610 261q299 0 489 -147l29 -25l-123 -141q-6 6 -17 14.5t-49 30t-80 38.5t-108.5 30.5t-136.5 13.5q-281 0 -471 -205t-190 -479q0 -201 119.5 -319.5t312.5 -118.5q219 0 422 168l26 22l39 199h-233l32 176h420l-141 -727h-176l16 90l15 62h-5 q-6 -6 -19 -18.5t-58 -43.5t-94.5 -53.5t-125 -42t-153.5 -19.5q-260 0 -434 170.5t-174 444.5z" />
+<glyph unicode="H" horiz-adv-x="1546" d="M78 0l282 1446h201l-125 -637h752l125 637h200l-282 -1446h-201l123 635h-752l-122 -635h-201z" />
+<glyph unicode="I" horiz-adv-x="595" d="M78 0l282 1446h201l-280 -1446h-203z" />
+<glyph unicode="J" horiz-adv-x="1089" d="M10 317q0 55 10 107l13 63h200l-10 -59q-8 -53 -8 -82q0 -184 182 -184q94 0 171 62.5t104 193.5l166 852h-363l35 176h563l-203 -1047q-29 -145 -105.5 -243.5t-169.5 -139.5t-202 -41q-164 0 -273.5 87t-109.5 255z" />
+<glyph unicode="K" horiz-adv-x="1275" d="M78 0l282 1446h201l-119 -608h207l492 608h235l-565 -694v-4l299 -748h-215l-258 664h-229l-129 -664h-201z" />
+<glyph unicode="L" horiz-adv-x="1071" d="M78 0l282 1446h203l-248 -1270h648l-37 -176h-848z" />
+<glyph unicode="M" horiz-adv-x="1771" d="M31 0l395 1446h211l180 -782l33 -195h4q61 113 111 195l485 782h217l-166 -1446h-198l108 911q10 88 37 213h-4q-70 -135 -119 -213l-414 -651h-182l-162 651l-37 217h-4q-18 -129 -43 -217l-250 -911h-202z" />
+<glyph unicode="N" horiz-adv-x="1536" d="M78 0l282 1446h187l463 -940q37 -76 77 -209h5q10 129 26 209l182 940h203l-282 -1446h-187l-463 938q-39 80 -79 211h-5q-10 -129 -26 -211l-182 -938h-201z" />
+<glyph unicode="O" horiz-adv-x="1677" d="M109 606q0 227 122.5 429t322.5 318.5t417 116.5q289 0 467 -172t178 -442q0 -231 -125 -437t-324.5 -325t-414.5 -119q-289 0 -466 177.5t-177 453.5zM315 614q0 -201 123 -326.5t316 -125.5q250 0 451.5 203.5t201.5 480.5q0 195 -122 316.5t-316 121.5 q-252 0 -453 -199t-201 -471z" />
+<glyph unicode="P" horiz-adv-x="1245" d="M78 0l282 1446h496q137 0 225 -47q86 -45 134.5 -129t48.5 -193q0 -170 -87 -304t-229 -195q-100 -43 -215 -43h-348l-104 -535h-203zM418 711h295q88 0 153 32q86 41 137.5 125t51.5 195q0 98 -60.5 152.5t-173.5 54.5h-293z" />
+<glyph unicode="Q" horiz-adv-x="1699" d="M109 606q0 227 122.5 429t322.5 318.5t417 116.5q287 0 465 -172t178 -442q0 -350 -268 -614l133 -160l-129 -119l-136 170q-209 -158 -462 -158q-289 0 -466 177.5t-177 453.5zM315 614q0 -201 122 -326.5t317 -125.5q178 0 342 114l-140 170l129 119l138 -174 q182 199 182 455q0 195 -122 316.5t-314 121.5q-252 0 -453 -199t-201 -471z" />
+<glyph unicode="R" horiz-adv-x="1306" d="M78 0l282 1446h492q125 0 205 -37q184 -86 184 -303q0 -164 -94 -298t-254 -179v-4q10 -20 27 -66l200 -559h-215l-198 575h-316l-110 -575h-203zM426 752h285q135 0 228 90t93 235q0 90 -57 141.5t-158 51.5h-291z" />
+<glyph unicode="S" horiz-adv-x="1120" d="M6 166l127 143q4 -6 14.5 -15t44 -35t71.5 -45t98.5 -34.5t123.5 -15.5q115 0 205 68.5t90 181.5q0 70 -60.5 124t-145.5 96t-170 90t-145 128t-60 186q0 180 151.5 306t362.5 126q127 0 230.5 -36.5t143.5 -73.5l41 -37l-114 -149q-12 12 -37 30.5t-103.5 48 t-162.5 29.5q-125 0 -217.5 -73.5t-92.5 -170.5q0 -63 60.5 -114.5t146.5 -93.5t172 -90t146.5 -132t60.5 -194q0 -178 -145.5 -308.5t-360.5 -130.5q-272 0 -444 160z" />
+<glyph unicode="T" horiz-adv-x="1206" d="M131 1270l33 176h1194l-33 -176h-498l-245 -1270h-203l248 1270h-496z" />
+<glyph unicode="U" horiz-adv-x="1488" d="M147 403q0 55 13 117l180 926h201l-181 -932q-8 -39 -8 -86q0 -127 80 -196.5t225 -69.5q168 0 285 94t150 262l182 928h201l-185 -944q-47 -242 -219 -384.5t-418 -142.5q-225 0 -365.5 113.5t-140.5 314.5z" />
+<glyph unicode="V" horiz-adv-x="1290" d="M166 1446h211l160 -1022q12 -78 16 -199h4q53 121 94 199l559 1022h228l-809 -1446h-217z" />
+<glyph unicode="W" horiz-adv-x="1951" d="M225 1446h207l53 -1061v-154h4q27 74 64 154l500 1061h184l63 -1061v-154h5q27 78 59 154l461 1061h221l-651 -1446h-238l-63 938v205h-4q-43 -111 -86 -203l-449 -940h-233z" />
+<glyph unicode="X" horiz-adv-x="1239" d="M-74 0l598 754l-291 692h220l153 -385l62 -172h4q55 88 119 168l303 389h239l-571 -709l317 -737h-215l-182 438l-59 166h-5q-55 -82 -116 -162l-346 -442h-230z" />
+<glyph unicode="Y" horiz-adv-x="1185" d="M164 1446h217l174 -475q29 -80 53 -183h4q61 98 123 181l355 477h243l-651 -840l-119 -606h-201l121 612z" />
+<glyph unicode="Z" horiz-adv-x="1232" d="M-37 0l27 135l874 1004q33 37 66 69l49 49l16 15v4q-37 -6 -106 -6h-643l35 176h1013l-26 -133l-877 -1006q-33 -37 -65.5 -69.5t-49.5 -47.5l-16 -14v-4q37 4 107 4h686l-33 -176h-1057z" />
+<glyph unicode="[" horiz-adv-x="612" d="M43 -195l332 1700h340l-31 -149h-166l-270 -1399h166l-31 -152h-340z" />
+<glyph unicode="\" horiz-adv-x="806" d="M229 1524h168l207 -1610h-168z" />
+<glyph unicode="]" horiz-adv-x="602" d="M-94 -195l31 152h163l271 1399h-164l29 149h339l-329 -1700h-340z" />
+<glyph unicode="^" horiz-adv-x="1255" d="M23 506l409 940h129l408 -940h-178l-295 721l-293 -721h-180z" />
+<glyph unicode="_" horiz-adv-x="1204" d="M-96 -160l28 160h1102l-30 -160h-1100z" />
+<glyph unicode="`" horiz-adv-x="1021" d="M248 1806h205l96 -260h-158z" />
+<glyph unicode="a" d="M0 238q0 119 66.5 204.5t176 127.5t219 59.5t228.5 17.5h51q8 41 9 84q0 162 -187 162q-72 0 -148.5 -24.5t-119.5 -49.5l-41 -24l-53 157q18 12 53 30.5t137.5 48.5t200.5 30q162 0 261 -75t99 -232q0 -57 -12 -115l-125 -639h-184l20 104q14 82 23 82h-4 q2 0 -13.5 -21.5t-46 -52t-71.5 -62.5t-102.5 -53.5t-127.5 -21.5q-129 0 -219 71t-90 192zM203 270q0 -57 42 -96t124 -39q117 0 213 101.5t127 226.5l8 35h-51q-463 -1 -463 -228z" />
+<glyph unicode="b" horiz-adv-x="1226" d="M35 0l280 1446h199l-90 -469l-27 -94h4q55 80 149.5 129t194.5 49q184 0 287 -115t103 -311q0 -285 -171 -472.5t-397 -187.5q-109 0 -193.5 49.5t-121.5 139.5h-4q0 -39 -8 -84l-17 -80h-188zM317 410q0 -115 58.5 -189t173.5 -74q145 0 264 131.5t119 342.5 q0 125 -62.5 195.5t-171.5 70.5q-158 0 -269.5 -143.5t-111.5 -333.5z" />
+<glyph unicode="c" horiz-adv-x="1118" d="M53 426q0 262 190.5 448.5t448.5 186.5q236 0 373 -131l18 -19l-110 -129q-10 12 -31.5 29.5t-92.5 47.5t-147 30q-178 0 -312 -132t-134 -317q0 -131 83 -212t220 -81q86 0 173 35t132 70l43 35l56 -158q-18 -16 -53.5 -42t-146 -69t-222.5 -43q-223 0 -355.5 125 t-132.5 326z" />
+<glyph unicode="d" horiz-adv-x="1228" d="M55 399q0 287 171 474.5t403 187.5q100 0 184 -44t119 -130h4q0 39 8 76l94 483h199l-281 -1446h-190l20 98l19 76h-4q-57 -86 -149.5 -142.5t-205.5 -56.5q-184 0 -287.5 113.5t-103.5 310.5zM258 414q0 -125 63.5 -196t172.5 -71q158 0 268 146.5t110 331.5 q0 115 -58 188.5t-173 73.5q-145 0 -264 -131t-119 -342z" />
+<glyph unicode="e" horiz-adv-x="1128" d="M55 418q0 262 173 452.5t429 190.5q195 0 295.5 -104.5t100.5 -278.5q0 -37 -8.5 -84t-16.5 -76l-8 -29h-756q-6 -31 -6 -61q0 -121 78 -201t217 -80q80 0 162 31t125 60l43 30l57 -157q-18 -14 -53 -37t-139.5 -61t-202.5 -38q-223 0 -356.5 123t-133.5 320zM297 639 h553q4 23 4 55q0 100 -55.5 154.5t-145.5 54.5q-115 0 -212 -71.5t-144 -192.5z" />
+<glyph unicode="f" horiz-adv-x="686" d="M92 0l168 864h-129l31 162h129l10 49q18 96 60 169t89.5 112t107.5 63.5t104.5 30.5t87.5 6l90 -6l-37 -170q-16 4 -47 4q-217 0 -258 -217l-9 -41h244l-31 -162h-243l-168 -864h-199z" />
+<glyph unicode="g" horiz-adv-x="1210" d="M-2 -338l86 148q113 -68 276 -68q145 0 250 71.5t133 219.5l17 76l18 71h-2q-123 -168 -319 -168q-186 0 -291 116t-105 304q0 150 61.5 291t189.5 239.5t296 98.5q248 0 316 -164h4q0 23 4 43l18 96h189l-195 -1007q-47 -238 -206.5 -348.5t-366.5 -110.5t-373 92z M264 446q0 -123 62.5 -192.5t179.5 -69.5q166 0 261 151.5t95 330.5q0 223 -237 223q-164 0 -262.5 -133.5t-98.5 -309.5z" />
+<glyph unicode="h" horiz-adv-x="1230" d="M35 0l280 1446h199l-102 -531l-23 -92h4q49 88 164 163t254 75q143 0 224 -68.5t81 -206.5q0 -55 -16 -131l-127 -655h-199l119 612q14 76 14 117q0 150 -153 150q-152 0 -275 -120t-153 -286l-93 -473h-198z" />
+<glyph unicode="i" horiz-adv-x="507" d="M35 0l203 1036h198l-203 -1036h-198zM274 1243l39 203h205l-41 -203h-203z" />
+<glyph unicode="j" horiz-adv-x="507" d="M-311 -418l32 170q18 -2 46 -2q35 0 68.5 8.5t76.5 28.5t74.5 69.5t46.5 120.5l205 1059h198l-209 -1069q-18 -98 -60 -173t-88 -114.5t-105.5 -64.5t-102.5 -31t-88 -6zM274 1243l39 203h205l-39 -203h-205z" />
+<glyph unicode="k" d="M35 0l282 1446h199l-156 -789h142l358 379h240l-443 -465v-4l269 -567h-215l-219 485h-164l-95 -485h-198z" />
+<glyph unicode="l" horiz-adv-x="540" d="M72 209q0 33 10 88l223 1149h199l-215 -1114q-10 -47 -10 -78q0 -84 92 -84l32 2l-36 -176q-29 -4 -60 -4q-98 0 -166.5 49t-68.5 168z" />
+<glyph unicode="m" horiz-adv-x="1867" d="M37 0l201 1036h194l-26 -133l-25 -86h4q57 100 167 172t230 72q250 0 273 -236h4q61 100 171.5 168t231.5 68q141 0 216 -68.5t75 -206.5q0 -57 -16 -139l-125 -647h-199l121 616q12 68 12 113q0 152 -147 152q-137 0 -244.5 -124t-138.5 -284l-92 -473h-197l119 616 q12 68 12 117q0 147 -143 148q-135 0 -246 -124t-141 -286l-92 -471h-199z" />
+<glyph unicode="n" horiz-adv-x="1232" d="M37 0l201 1036h194l-22 -121l-29 -98h4q49 90 168 167t260 77q143 0 223 -68.5t80 -206.5q0 -49 -14 -131l-127 -655h-199l119 612q14 76 14 117q0 150 -153.5 150t-275.5 -119t-154 -287l-90 -473h-199z" />
+<glyph unicode="o" horiz-adv-x="1273" d="M53 432q0 260 195.5 444.5t445.5 184.5q217 0 354.5 -126t137.5 -327q0 -262 -195.5 -447.5t-443.5 -185.5q-219 0 -356.5 127t-137.5 330zM256 440q0 -131 82 -212t211 -81q166 0 300 132.5t134 318.5q0 129 -82 210t-209 81q-170 0 -303 -131.5t-133 -317.5z" />
+<glyph unicode="p" horiz-adv-x="1226" d="M-43 -410l281 1446h184l-16 -88l-23 -82h4q57 86 150.5 140.5t210.5 54.5q184 0 286.5 -115t102.5 -311q0 -285 -170 -472.5t-394 -187.5q-106 0 -189 46.5t-120 134.5h-4q-4 -43 -14 -97l-90 -469h-199zM319 414q0 -117 59.5 -192t172.5 -75q145 0 264 131.5t119 342.5 q0 125 -62.5 195.5t-171.5 70.5q-156 0 -268.5 -144.5t-112.5 -328.5z" />
+<glyph unicode="q" horiz-adv-x="1228" d="M55 397q0 287 171 475.5t403 188.5q233 0 309 -180h4q2 31 10 71l15 84h190l-280 -1446h-199l90 473l27 97h-4q-49 -76 -139.5 -130.5t-207.5 -54.5q-184 0 -286.5 113.5t-102.5 308.5zM258 414q0 -125 63.5 -196t172.5 -71q158 0 268 146.5t110 331.5q0 115 -58 188.5 t-173 73.5q-145 0 -264 -131t-119 -342z" />
+<glyph unicode="r" horiz-adv-x="765" d="M37 0l201 1036h192l-37 -180l-20 -84h2q55 117 156.5 197t218.5 80q37 0 61 -5l-39 -196q-23 6 -55 6q-137 0 -255 -144.5t-155 -332.5l-71 -377h-199z" />
+<glyph unicode="s" horiz-adv-x="909" d="M-23 125l109 131q12 -12 33.5 -30.5t96.5 -50.5t157 -32q80 0 144.5 41t64.5 113q0 43 -47.5 77t-114 62.5t-133 63.5t-113.5 96t-47 145q0 145 120 232.5t277 87.5q205 0 330 -107l8 -8l-98 -137q-8 10 -25.5 23.5t-80 37t-136.5 23.5q-78 0 -142.5 -38t-64.5 -112 q0 -43 47.5 -76.5t115 -62.5t134 -63.5t113.5 -97t47 -146.5q0 -141 -115.5 -231.5t-283.5 -90.5q-72 0 -139.5 15.5t-111.5 37t-78 44t-50 39.5z" />
+<glyph unicode="t" horiz-adv-x="722" d="M111 864l30 162h140l59 295h192l-59 -295h250l-31 -162h-250l-86 -452q-8 -41 -8 -82q0 -162 170 -162l60 4l-35 -176q-33 -4 -66 -4q-334 0 -334 303q0 45 13 104l90 465h-135z" />
+<glyph unicode="u" horiz-adv-x="1220" d="M80 250q0 49 14 131l127 655h199l-119 -610q-12 -68 -12 -119q0 -72 35.5 -109.5t119.5 -37.5q150 0 266.5 123t147.5 282l92 471h199l-201 -1036h-194l24 121l27 98h-4q-53 -92 -166 -168t-254 -76q-133 0 -217 67t-84 208z" />
+<glyph unicode="v" horiz-adv-x="1009" d="M86 1036h197l112 -704l11 -142h4q35 84 65 142l387 704h213l-586 -1036h-219z" />
+<glyph unicode="w" horiz-adv-x="1658" d="M115 1036h198l74 -731l4 -110h4q25 59 49 110l365 729h184l80 -729l6 -110h4q20 57 47 110l361 731h213l-535 -1036h-219l-86 670l-6 110h-4q-25 -57 -51 -110l-342 -670h-215z" />
+<glyph unicode="x" horiz-adv-x="1032" d="M-76 0l465 539l-250 497h213l144 -309l22 -65h4q23 35 43 61l254 313h236l-439 -512l261 -524h-209l-160 340l-25 61h-4q-18 -33 -39 -57l-282 -344h-234z" />
+<glyph unicode="y" horiz-adv-x="1042" d="M-188 -362l92 141q43 -37 112 -37q129 0 220 149l75 123l-237 1022h207l139 -700l16 -123h2q31 68 60 119l389 704h223l-727 -1226q-143 -240 -358 -240q-125 0 -213 68z" />
+<glyph unicode="z" horiz-adv-x="1046" d="M-41 0l21 115l641 655l102 96v4q-31 -4 -98 -4h-478l33 170h852l-20 -114l-643 -658l-105 -94v-4q33 4 101 4h516l-33 -170h-889z" />
+<glyph unicode="{" horiz-adv-x="714" d="M90 578l35 176q6 0 18.5 2t45 16t60 36.5t54.5 68t39 104.5l37 184q68 344 399 344q10 0 21.5 -1t17.5 -1h8l-30 -151h-27q-176 0 -219 -215l-45 -226q-33 -170 -185 -235l-32 -12v-4l13 -6.5t29.5 -22t37 -40t30 -60t13.5 -82.5q0 -27 -7 -60l-45 -223q-8 -41 -8 -72 q0 -143 146 -143h28l-30 -152q-20 -4 -50 -4q-27 0 -55.5 5.5t-69 21.5t-71.5 44t-52.5 78t-21.5 118q0 49 12 104l35 184q6 35 6 60q0 127 -114 159z" />
+<glyph unicode="|" horiz-adv-x="651" d="M244 -326v1948h174v-1948h-174z" />
+<glyph unicode="}" horiz-adv-x="706" d="M-100 -197l28 152h27q180 0 221 215l47 244q12 59 39 107t56.5 74t57 43t46.5 24l18 6v4q-14 6 -33.5 18t-53.5 64.5t-34 122.5q0 29 7 61l39 203q8 35 8 71q0 143 -146 144h-26l28 151q23 4 49.5 4t55 -5t69.5 -21.5t72 -44t53.5 -77.5t22.5 -118q0 -31 -12 -104 l-31 -164q-6 -35 -6 -59q0 -68 33.5 -109t66.5 -47l35 -8l-33 -176q-8 0 -20.5 -2.5t-45 -16.5t-59 -36.5t-54.5 -67.5t-40 -105l-39 -205q-66 -346 -401 -346z" />
+<glyph unicode="~" horiz-adv-x="1210" d="M113 418q0 174 74.5 260t211.5 86q72 0 130.5 -32t89 -68.5t75.5 -68.5t97 -32q74 0 105.5 57.5t31.5 135.5h162q0 -346 -285 -346q-72 0 -130.5 30.5t-89 68.5t-76.5 68.5t-97 30.5q-72 0 -105 -57t-33 -133h-161z" />
+<glyph unicode="&#xa1;" horiz-adv-x="585" d="M-8 -410l219 1049h178l-190 -1049h-207zM231 836l41 200h207l-41 -200h-207z" />
+<glyph unicode="&#xa2;" horiz-adv-x="1181" d="M117 602q0 172 73.5 327.5t202.5 256t283 114.5l33 170h145l-35 -178q78 -14 139.5 -51t93 -80t53 -85t28.5 -68l6 -27l-181 -68q-2 8 -5 21.5t-19 48.5t-40 61.5t-70 48t-105 21.5q-170 0 -283.5 -150.5t-113.5 -361.5q0 -125 62 -196.5t183 -71.5q90 0 170 50t115 99 l33 49l176 -73q-6 -12 -18.5 -31.5t-56.5 -71t-94 -92.5t-130 -76.5t-166 -42.5l-33 -172h-145l35 181q-154 31 -245 148.5t-91 299.5z" />
+<glyph unicode="&#xa3;" horiz-adv-x="1193" d="M-6 0l35 176h121l92 477h-90l28 144h90l58 293q31 164 169 272t320 108q197 0 328 -124l12 -15l-133 -127q-8 8 -25.5 22.5t-73 37t-112.5 22.5q-111 0 -188.5 -62.5t-96.5 -156.5l-53 -270h379l-29 -144h-379l-92 -477h668l-35 -176h-993z" />
+<glyph unicode="&#xa5;" horiz-adv-x="1239" d="M139 408l25 129h334l16 75l-37 99h-278l24 129h211l-221 606h221l154 -451q33 -94 55 -209h4q57 113 125 207l328 453h241l-456 -606h209l-27 -129h-276l-72 -99l-17 -75h332l-24 -129h-332l-80 -408h-205l80 408h-334z" />
+<glyph unicode="&#xa7;" horiz-adv-x="894" d="M-23 -16l109 120q70 -63 186 -63q123 0 191.5 80t71.5 207l14 788h162l-15 -797q-4 -186 -116.5 -316t-309.5 -130q-170 0 -286 104zM207 227l14 799q4 186 116 315t310 129q170 0 287 -104l6 -6l-109 -119q-70 63 -184 64q-125 0 -193.5 -81t-70.5 -208l-14 -789h-162z " />
+<glyph unicode="&#xa8;" horiz-adv-x="1021" d="M131 1599l41 207h164l-41 -207h-164zM475 1599l39 207h164l-41 -207h-162z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1697" d="M137 723q0 311 212 529t515 218q305 0 519 -218t214 -529t-214 -529.5t-519 -218.5q-303 0 -515 218.5t-212 529.5zM287 723q0 -256 167 -432t410 -176q248 0 416 176t168 432t-168 432t-416 176q-244 0 -410.5 -176t-166.5 -432zM475 721q0 168 111.5 288.5t292.5 120.5 q195 0 311 -165l22 -37l-125 -68q-8 14 -23 36t-67.5 57.5t-111.5 35.5q-117 0 -185.5 -79t-68.5 -189q0 -115 67.5 -191.5t186.5 -76.5q59 0 110.5 32.5t71.5 63.5l20 33l125 -68q-4 -8 -12 -21.5t-37.5 -49t-64.5 -62.5t-94.5 -48.5t-124.5 -21.5q-180 0 -292 120 t-112 290z" />
+<glyph unicode="&#xaa;" horiz-adv-x="856" d="M131 543l23 116h563l-25 -116h-561zM213 956q0 250 420 250h35q6 35 6 51q0 90 -109 91q-41 0 -87 -14.5t-72 -26.5l-25 -15l-41 105q106 70 258 69q223 0 223 -198q0 -39 -10 -86l-76 -385h-139l18 94h-4q-8 -12 -24.5 -30.5t-69.5 -48.5t-113 -30q-76 0 -133 46 t-57 128zM367 973q0 -31 22.5 -50.5t65.5 -19.5q66 0 121 60.5t67 119.5l4 19h-24q-256 0 -256 -129z" />
+<glyph unicode="&#xab;" horiz-adv-x="1134" d="M76 582l391 417h209l-410 -430l262 -411h-188zM483 582l424 417h213l-446 -430l262 -411h-188z" />
+<glyph unicode="&#xac;" horiz-adv-x="1290" d="M143 696v160h977v-547h-166v387h-811z" />
+<glyph unicode="&#xad;" horiz-adv-x="882" d="M6 496l33 176h598l-33 -176h-598z" />
+<glyph unicode="&#xae;" horiz-adv-x="1697" d="M137 723q0 311 212 529t515 218q305 0 519 -218t214 -529t-214 -529.5t-519 -218.5q-303 0 -515 218.5t-212 529.5zM287 723q0 -256 167 -432t410 -176q248 0 416 176t168 432t-168 432t-416 176q-244 0 -410.5 -176t-166.5 -432zM614 340v772h297q111 0 177.5 -64.5 t66.5 -170.5q0 -82 -43 -136.5t-98 -68.5v-4q8 -8 26 -43l148 -285h-160l-143 299h-125v-299h-146zM760 745h123q57 0 91 35t34 97q0 59 -34 91.5t-91 32.5h-123v-256z" />
+<glyph unicode="&#xaf;" horiz-adv-x="1021" d="M131 1606l27 143h520l-27 -143h-520z" />
+<glyph unicode="&#xb0;" horiz-adv-x="792" d="M186 1130q0 133 107.5 236.5t241.5 103.5q123 0 201.5 -75.5t78.5 -190.5q0 -135 -108.5 -237.5t-239.5 -102.5q-123 0 -202 74.5t-79 191.5zM346 1139q0 -55 35 -89t94 -34q70 0 125 53t55 125q0 55 -35.5 91t-93.5 36q-72 0 -126 -55t-54 -127z" />
+<glyph unicode="&#xb1;" horiz-adv-x="1433" d="M145 504v160h459v503h168v-503h457v-160h-457v-504h-168v504h-459zM178 -195h1018v-159h-1018v159z" />
+<glyph unicode="&#xb2;" horiz-adv-x="796" d="M-8 866q2 119 60.5 209t139 143.5t161.5 98.5t137.5 99t56.5 118q0 47 -34 76.5t-89 29.5q-45 0 -93 -24.5t-73 -48.5l-27 -25l-90 100q14 16 40 39t102.5 62t150.5 39q121 0 197 -64.5t76 -171.5q0 -88 -48.5 -157.5t-119 -115.5t-143 -85t-133 -86t-77.5 -101h430 l-26 -135h-598z" />
+<glyph unicode="&#xb3;" horiz-adv-x="796" d="M8 981l96 100q8 -10 23.5 -25.5t71 -42t116.5 -26.5q78 0 135.5 52.5t57.5 127.5q0 55 -46 88t-110 33h-69l-25 78l221 211l60 49v4q-39 -6 -74 -6h-283l25 137h557l-19 -98l-274 -258q76 -14 135.5 -73.5t59.5 -162.5q0 -127 -101.5 -225t-251.5 -98q-88 0 -164.5 33.5 t-107.5 66.5z" />
+<glyph unicode="&#xb4;" horiz-adv-x="1021" d="M186 1546l201 260h223l-245 -260h-179z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1265" d="M-29 -410l281 1446h199l-119 -610q-12 -68 -13 -119q0 -72 36 -109.5t120 -37.5q150 0 266.5 123t147.5 282l92 471h199l-201 -1036h-195l25 121l27 98h-5q-53 -92 -165.5 -168t-253.5 -76q-125 0 -185 68h-4q-6 -104 -18 -164l-58 -289h-176z" />
+<glyph unicode="&#x3bc;" horiz-adv-x="1265" d="M-29 -410l281 1446h199l-119 -610q-12 -68 -13 -119q0 -72 36 -109.5t120 -37.5q150 0 266.5 123t147.5 282l92 471h199l-201 -1036h-195l25 121l27 98h-5q-53 -92 -165.5 -168t-253.5 -76q-125 0 -185 68h-4q-6 -104 -18 -164l-58 -289h-176z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1210" d="M147 909q0 215 173.5 376t388.5 161h581l-33 -176h-403l-266 -1372h-154l115 596q-162 0 -282 119.5t-120 295.5zM715 -102l241 1255h154l-244 -1255h-151z" />
+<glyph unicode="&#xb7;" horiz-adv-x="552" d="M147 485l41 215h207l-41 -215h-207z" />
+<glyph unicode="&#xb8;" horiz-adv-x="1021" d="M184 -410l23 117q39 -12 84 -12t77.5 17.5t32.5 56.5q0 53 -96 53l-37 -2l103 227l96 -20l-2 -17l-47 -112q51 -8 87 -42t36 -92q0 -94 -73 -141t-163 -47q-33 0 -62.5 3t-43.5 7z" />
+<glyph unicode="&#xb9;" horiz-adv-x="796" d="M43 866l25 135h190l96 500l17 53h-4q-12 -16 -45 -45l-82 -65l-78 106l260 211h137l-147 -760h188l-27 -135h-530z" />
+<glyph unicode="&#xba;" horiz-adv-x="950" d="M141 543l23 116h641l-23 -116h-641zM217 1071q0 164 124 280.5t280 116.5q135 0 221 -79.5t86 -206.5q0 -164 -124 -280t-282 -116q-133 0 -219 80t-86 205zM367 1083q0 -76 46 -120.5t119 -44.5q94 0 170 74.5t76 181.5q0 72 -46 117.5t-118 45.5q-96 0 -171.5 -75 t-75.5 -179z" />
+<glyph unicode="&#xbb;" horiz-adv-x="1134" d="M2 158l447 430l-263 411h189l264 -424l-426 -417h-211zM446 158l410 430l-262 411h188l265 -424l-392 -417h-209z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1966" d="M104 551l25 135h190l97 500l16 53h-4q-12 -16 -45 -45l-82 -66l-78 107l260 211h138l-148 -760h189l-27 -135h-531zM410 0l966 1446h164l-967 -1446h-163zM1087 219l19 103l516 573h176l-106 -541h127l-25 -135h-127l-43 -219h-151l43 219h-429zM1290 354h250l49 252 l31 119h-4q-37 -55 -78 -98l-248 -269v-4z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1947" d="M104 551l25 135h190l97 500l16 53h-4q-12 -16 -45 -45l-82 -66l-78 107l260 211h138l-148 -760h189l-27 -135h-531zM414 0l966 1446h164l-966 -1446h-164zM1112 0q2 119 60.5 209t139.5 143t161.5 98.5t137 99.5t56.5 118q0 47 -34 76.5t-89 29.5q-45 0 -93 -24.5 t-75 -49.5l-24 -24l-90 100q14 16 39.5 39t102.5 61.5t150 38.5q121 0 197 -64.5t76 -170.5q0 -88 -48 -157.5t-119 -116t-143.5 -85t-133 -86t-76.5 -100.5h430l-27 -135h-598z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1984" d="M84 666l96 100q8 -10 23.5 -25.5t71 -42t116.5 -26.5q78 0 135.5 52t57.5 128q0 55 -46 88t-110 33h-70l-24 78l221 211l59 49v4q-39 -6 -73 -6h-283l25 137h557l-19 -98l-274 -258q76 -14 135 -74t59 -162q0 -127 -101 -225.5t-251 -98.5q-88 0 -165 34t-109 67zM428 0 l967 1446h164l-967 -1446h-164zM1106 219l18 103l516 573h177l-107 -541h127l-25 -135h-126l-44 -219h-151l43 219h-428zM1309 354h250l49 252l30 119h-4q-37 -55 -78 -98l-247 -269v-4z" />
+<glyph unicode="&#xbf;" horiz-adv-x="923" d="M-51 -102q0 100 45 183t111.5 139t135 106.5t124 111t67.5 125.5l17 76h194l-18 -88q-18 -90 -72.5 -166t-120 -127t-127 -99t-103.5 -107.5t-42 -129.5q0 -74 53 -121t143 -47q59 0 122 22.5t95 43.5l33 22l88 -153q-18 -12 -51 -33t-128 -53.5t-185 -32.5 q-166 0 -273.5 89t-107.5 239zM477 836l41 200h205l-39 -200h-207z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1282" d="M-98 0l792 1446h226l235 -1446h-203l-63 416h-545l-225 -416h-217zM428 584h440l-71 458l-21 205h-4q-55 -131 -94 -205zM598 1806h205l96 -260h-158z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1282" d="M-98 0l792 1446h226l235 -1446h-203l-63 416h-545l-225 -416h-217zM428 584h440l-71 458l-21 205h-4q-55 -131 -94 -205zM733 1546l201 260h223l-246 -260h-178z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1282" d="M-98 0l792 1446h226l235 -1446h-203l-63 416h-545l-225 -416h-217zM428 584h440l-71 458l-21 205h-4q-55 -131 -94 -205zM537 1546l231 260h207l129 -260h-168l-74 164h-4l-139 -164h-182z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1282" d="M-98 0l792 1446h226l235 -1446h-203l-63 416h-545l-225 -416h-217zM428 584h440l-71 458l-21 205h-4q-55 -131 -94 -205zM498 1548q49 260 243 260q55 0 94.5 -34.5t68 -69.5t61.5 -35q78 0 100 133h145q-51 -260 -243 -260q-53 0 -92 35t-70 69.5t-64 34.5 q-72 0 -98 -133h-145z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1282" d="M-98 0l792 1446h226l235 -1446h-203l-63 416h-545l-225 -416h-217zM428 584h440l-71 458l-21 205h-4q-55 -131 -94 -205zM588 1599l41 207h164l-41 -207h-164zM932 1599l39 207h164l-41 -207h-162z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1282" d="M-98 0l792 1446h226l235 -1446h-203l-63 416h-545l-225 -416h-217zM428 584h440l-71 458l-21 205h-4q-55 -131 -94 -205zM678 1655q0 76 59.5 124t132.5 48q72 0 116 -36t44 -99q0 -74 -60.5 -122t-133.5 -48q-70 0 -114 35t-44 98zM784 1657q0 -51 58 -51 q33 0 57.5 24.5t24.5 59.5q0 25 -15.5 40t-42.5 15q-33 0 -57.5 -25.5t-24.5 -62.5z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1816" d="M-102 0l874 1446h1075l-35 -176h-638l-89 -453h519l-35 -176h-518l-90 -465h671l-35 -176h-872l125 643h-344l-383 -643h-225zM606 811h277l88 459h-92z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1484" d="M115 602q0 231 118.5 433t316.5 318.5t421 116.5q102 0 193 -19t148.5 -48t100.5 -57.5t62 -47.5l18 -20l-121 -139q-16 16 -47 40.5t-133 64.5t-215 40q-270 0 -461.5 -201.5t-191.5 -470.5q0 -197 117.5 -323.5t322.5 -126.5q236 0 453 164l28 22l88 -160 q-10 -8 -28.5 -22t-78 -51t-123 -66t-159.5 -51.5t-190 -22.5h-2l-33 -77q51 -8 87 -42t36 -92q0 -94 -73 -141t-163 -47q-33 0 -62.5 3t-43.5 7l-15 4l23 117q39 -12 84 -12t77.5 17.5t32.5 56.5q0 53 -96 53l-37 -2l74 164q-246 33 -387 200.5t-141 417.5z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1171" d="M78 0l284 1446h838l-35 -176h-637l-88 -453h518l-34 -176h-518l-91 -465h672l-33 -176h-876zM592 1806h205l96 -260h-158z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1171" d="M78 0l284 1446h838l-35 -176h-637l-88 -453h518l-34 -176h-518l-91 -465h672l-33 -176h-876zM727 1546l201 260h223l-246 -260h-178z" />
+<glyph unicode="&#xca;" horiz-adv-x="1171" d="M78 0l284 1446h838l-35 -176h-637l-88 -453h518l-34 -176h-518l-91 -465h672l-33 -176h-876zM530 1546l232 260h207l129 -260h-168l-74 164h-4l-139 -164h-183z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1171" d="M78 0l284 1446h838l-35 -176h-637l-88 -453h518l-34 -176h-518l-91 -465h672l-33 -176h-876zM580 1599l41 207h163l-41 -207h-163zM924 1599l39 207h163l-41 -207h-161z" />
+<glyph unicode="&#xcc;" horiz-adv-x="595" d="M78 0l282 1446h201l-280 -1446h-203zM252 1806h205l96 -260h-158z" />
+<glyph unicode="&#xcd;" horiz-adv-x="595" d="M78 0l282 1446h201l-280 -1446h-203zM385 1546l201 260h223l-246 -260h-178z" />
+<glyph unicode="&#xce;" horiz-adv-x="595" d="M78 0l282 1446h201l-280 -1446h-203zM190 1546l232 260h207l129 -260h-168l-74 164h-4l-139 -164h-183z" />
+<glyph unicode="&#xcf;" horiz-adv-x="595" d="M78 0l282 1446h201l-280 -1446h-203zM242 1599l41 207h163l-40 -207h-164zM586 1599l39 207h163l-40 -207h-162z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1550" d="M115 0l123 639h-119l33 168h118l125 639h447q299 0 469 -147.5t170 -415.5q0 -242 -107.5 -442.5t-304.5 -320.5t-442 -120h-512zM348 176h264q287 0 473.5 197.5t186.5 492.5q0 195 -119 299.5t-328 104.5h-262l-92 -463h309l-32 -168h-310z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1536" d="M78 0l282 1446h187l463 -940q37 -76 77 -209h5q10 129 26 209l182 940h203l-282 -1446h-187l-463 938q-39 80 -79 211h-5q-10 -129 -26 -211l-182 -938h-201zM618 1548q49 260 244 260q55 0 94 -34.5t68 -69.5t61 -35q78 0 101 133h145q-51 -260 -244 -260q-53 0 -92 35 t-69.5 69.5t-63.5 34.5q-72 0 -98 -133h-146z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1677" d="M109 606q0 227 122.5 429t322.5 318.5t417 116.5q289 0 467 -172t178 -442q0 -231 -125 -437t-324.5 -325t-414.5 -119q-289 0 -466 177.5t-177 453.5zM315 614q0 -201 123 -326.5t316 -125.5q250 0 451.5 203.5t201.5 480.5q0 195 -122 316.5t-316 121.5 q-252 0 -453 -199t-201 -471zM786 1806h205l96 -260h-157z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1677" d="M109 606q0 227 122.5 429t322.5 318.5t417 116.5q289 0 467 -172t178 -442q0 -231 -125 -437t-324.5 -325t-414.5 -119q-289 0 -466 177.5t-177 453.5zM315 614q0 -201 123 -326.5t316 -125.5q250 0 451.5 203.5t201.5 480.5q0 195 -122 316.5t-316 121.5 q-252 0 -453 -199t-201 -471zM922 1546l200 260h224l-246 -260h-178z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1677" d="M109 606q0 227 122.5 429t322.5 318.5t417 116.5q289 0 467 -172t178 -442q0 -231 -125 -437t-324.5 -325t-414.5 -119q-289 0 -466 177.5t-177 453.5zM315 614q0 -201 123 -326.5t316 -125.5q250 0 451.5 203.5t201.5 480.5q0 195 -122 316.5t-316 121.5 q-252 0 -453 -199t-201 -471zM725 1546l231 260h207l129 -260h-168l-73 164h-4l-140 -164h-182z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1677" d="M109 606q0 227 122.5 429t322.5 318.5t417 116.5q289 0 467 -172t178 -442q0 -231 -125 -437t-324.5 -325t-414.5 -119q-289 0 -466 177.5t-177 453.5zM315 614q0 -201 123 -326.5t316 -125.5q250 0 451.5 203.5t201.5 480.5q0 195 -122 316.5t-316 121.5 q-252 0 -453 -199t-201 -471zM686 1548q49 260 244 260q55 0 94 -34.5t67.5 -69.5t61.5 -35q78 0 100 133h146q-51 -260 -244 -260q-53 0 -92 35t-69.5 69.5t-63.5 34.5q-72 0 -99 -133h-145z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1677" d="M109 606q0 227 122.5 429t322.5 318.5t417 116.5q289 0 467 -172t178 -442q0 -231 -125 -437t-324.5 -325t-414.5 -119q-289 0 -466 177.5t-177 453.5zM315 614q0 -201 123 -326.5t316 -125.5q250 0 451.5 203.5t201.5 480.5q0 195 -122 316.5t-316 121.5 q-252 0 -453 -199t-201 -471zM776 1599l41 207h164l-41 -207h-164zM1120 1599l39 207h164l-41 -207h-162z" />
+<glyph unicode="&#xd7;" horiz-adv-x="1409" d="M170 113l422 471l-422 471l113 112l417 -467l420 467l113 -112l-424 -471l424 -471l-113 -113l-420 465l-417 -465z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1681" d="M113 606q0 227 122.5 429t322.5 318.5t417 116.5q221 0 385 -108l127 137l94 -78l-127 -137q164 -170 164 -428q0 -231 -124 -437t-323.5 -325t-414.5 -119q-229 0 -398 119l-133 -145l-94 76l137 149q-155 172 -155 432zM319 614q0 -172 89 -288l817 886 q-111 72 -252 72q-252 0 -453 -199t-201 -471zM496 242q109 -80 262 -80q248 0 449.5 203.5t201.5 480.5q0 168 -94 284z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1488" d="M147 403q0 55 13 117l180 926h201l-181 -932q-8 -39 -8 -86q0 -127 80 -196.5t225 -69.5q168 0 285 94t150 262l182 928h201l-185 -944q-47 -242 -219 -384.5t-418 -142.5q-225 0 -365.5 113.5t-140.5 314.5zM696 1806h205l96 -260h-157z" />
+<glyph unicode="&#xda;" horiz-adv-x="1488" d="M147 403q0 55 13 117l180 926h201l-181 -932q-8 -39 -8 -86q0 -127 80 -196.5t225 -69.5q168 0 285 94t150 262l182 928h201l-185 -944q-47 -242 -219 -384.5t-418 -142.5q-225 0 -365.5 113.5t-140.5 314.5zM831 1546l201 260h223l-245 -260h-179z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1488" d="M147 403q0 55 13 117l180 926h201l-181 -932q-8 -39 -8 -86q0 -127 80 -196.5t225 -69.5q168 0 285 94t150 262l182 928h201l-185 -944q-47 -242 -219 -384.5t-418 -142.5q-225 0 -365.5 113.5t-140.5 314.5zM635 1546l231 260h207l129 -260h-168l-73 164h-5l-139 -164 h-182z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1488" d="M147 403q0 55 13 117l180 926h201l-181 -932q-8 -39 -8 -86q0 -127 80 -196.5t225 -69.5q168 0 285 94t150 262l182 928h201l-185 -944q-47 -242 -219 -384.5t-418 -142.5q-225 0 -365.5 113.5t-140.5 314.5zM684 1599l41 207h164l-41 -207h-164zM1028 1599l39 207h164 l-41 -207h-162z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1185" d="M164 1446h217l174 -475q29 -80 53 -183h4q61 98 123 181l355 477h243l-651 -840l-119 -606h-201l121 612zM670 1546l200 260h224l-246 -260h-178z" />
+<glyph unicode="&#xde;" horiz-adv-x="1247" d="M78 0l282 1446h203l-49 -246h295q135 0 227 -47q180 -94 181 -322q0 -170 -87.5 -304t-228.5 -195q-102 -43 -215 -43h-348l-57 -289h-203zM371 465h295q88 0 153 33q86 41 137.5 124t51.5 195q0 98 -60.5 152.5t-171.5 54.5h-297z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1200" d="M37 0l213 1102q33 172 174 270t309 98q164 0 263.5 -80.5t99.5 -207.5q0 -82 -45 -151.5t-98.5 -107.5t-98.5 -86.5t-45 -91.5q0 -41 44 -89t97.5 -87t97.5 -104.5t44 -136.5q0 -141 -118 -241.5t-272 -100.5q-86 0 -161.5 14t-108.5 29l-33 16l35 172q100 -59 254 -59 q76 0 138.5 43t62.5 127q0 43 -30 84t-72 75.5t-82.5 69.5t-70.5 81t-30 95q0 70 45 132.5t99.5 102.5t99.5 92t45 103q0 57 -43 96t-125 39q-98 0 -178 -59t-103 -168l-208 -1071h-199z" />
+<glyph unicode="&#xe0;" d="M0 238q0 119 66.5 204.5t176 127.5t219 59.5t228.5 17.5h51q8 41 9 84q0 162 -187 162q-72 0 -148.5 -24.5t-119.5 -49.5l-41 -24l-53 157q18 12 53 30.5t137.5 48.5t200.5 30q162 0 261 -75t99 -232q0 -57 -12 -115l-125 -639h-184l20 104q14 82 23 82h-4 q2 0 -13.5 -21.5t-46 -52t-71.5 -62.5t-102.5 -53.5t-127.5 -21.5q-129 0 -219 71t-90 192zM203 270q0 -57 42 -96t124 -39q117 0 213 101.5t127 226.5l8 35h-51q-463 -1 -463 -228zM410 1446h204l97 -260h-158z" />
+<glyph unicode="&#xe1;" d="M0 238q0 119 66.5 204.5t176 127.5t219 59.5t228.5 17.5h51q8 41 9 84q0 162 -187 162q-72 0 -148.5 -24.5t-119.5 -49.5l-41 -24l-53 157q18 12 53 30.5t137.5 48.5t200.5 30q162 0 261 -75t99 -232q0 -57 -12 -115l-125 -639h-184l20 104q14 82 23 82h-4 q2 0 -13.5 -21.5t-46 -52t-71.5 -62.5t-102.5 -53.5t-127.5 -21.5q-129 0 -219 71t-90 192zM203 270q0 -57 42 -96t124 -39q117 0 213 101.5t127 226.5l8 35h-51q-463 -1 -463 -228zM545 1186l200 260h224l-246 -260h-178z" />
+<glyph unicode="&#xe2;" d="M0 238q0 119 66.5 204.5t176 127.5t219 59.5t228.5 17.5h51q8 41 9 84q0 162 -187 162q-72 0 -148.5 -24.5t-119.5 -49.5l-41 -24l-53 157q18 12 53 30.5t137.5 48.5t200.5 30q162 0 261 -75t99 -232q0 -57 -12 -115l-125 -639h-184l20 104q14 82 23 82h-4 q2 0 -13.5 -21.5t-46 -52t-71.5 -62.5t-102.5 -53.5t-127.5 -21.5q-129 0 -219 71t-90 192zM203 270q0 -57 42 -96t124 -39q117 0 213 101.5t127 226.5l8 35h-51q-463 -1 -463 -228zM348 1186l232 260h206l129 -260h-167l-74 164h-4l-140 -164h-182z" />
+<glyph unicode="&#xe3;" d="M0 238q0 119 66.5 204.5t176 127.5t219 59.5t228.5 17.5h51q8 41 9 84q0 162 -187 162q-72 0 -148.5 -24.5t-119.5 -49.5l-41 -24l-53 157q18 12 53 30.5t137.5 48.5t200.5 30q162 0 261 -75t99 -232q0 -57 -12 -115l-125 -639h-184l20 104q14 82 23 82h-4 q2 0 -13.5 -21.5t-46 -52t-71.5 -62.5t-102.5 -53.5t-127.5 -21.5q-129 0 -219 71t-90 192zM203 270q0 -57 42 -96t124 -39q117 0 213 101.5t127 226.5l8 35h-51q-463 -1 -463 -228zM309 1188q49 260 244 260q55 0 94 -35t67.5 -69.5t61.5 -34.5q78 0 101 133h145 q-51 -260 -244 -260q-53 0 -92 34.5t-69.5 69.5t-63.5 35q-72 0 -98 -133h-146z" />
+<glyph unicode="&#xe4;" d="M0 238q0 119 66.5 204.5t176 127.5t219 59.5t228.5 17.5h51q8 41 9 84q0 162 -187 162q-72 0 -148.5 -24.5t-119.5 -49.5l-41 -24l-53 157q18 12 53 30.5t137.5 48.5t200.5 30q162 0 261 -75t99 -232q0 -57 -12 -115l-125 -639h-184l20 104q14 82 23 82h-4 q2 0 -13.5 -21.5t-46 -52t-71.5 -62.5t-102.5 -53.5t-127.5 -21.5q-129 0 -219 71t-90 192zM203 270q0 -57 42 -96t124 -39q117 0 213 101.5t127 226.5l8 35h-51q-463 -1 -463 -228zM397 1239l41 207h164l-41 -207h-164zM741 1239l39 207h164l-41 -207h-162z" />
+<glyph unicode="&#xe5;" d="M0 238q0 119 66.5 204.5t176 127.5t219 59.5t228.5 17.5h51q8 41 9 84q0 162 -187 162q-72 0 -148.5 -24.5t-119.5 -49.5l-41 -24l-53 157q18 12 53 30.5t137.5 48.5t200.5 30q162 0 261 -75t99 -232q0 -57 -12 -115l-125 -639h-184l20 104q14 82 23 82h-4 q2 0 -13.5 -21.5t-46 -52t-71.5 -62.5t-102.5 -53.5t-127.5 -21.5q-129 0 -219 71t-90 192zM203 270q0 -57 42 -96t124 -39q117 0 213 101.5t127 226.5l8 35h-51q-463 -1 -463 -228zM487 1294q0 76 59.5 124t133.5 48q72 0 116 -35.5t44 -99.5q0 -74 -60.5 -122t-134.5 -48 q-70 0 -114 35t-44 98zM594 1296q0 -51 57 -51q33 0 57.5 24.5t24.5 59.5q0 25 -15.5 40t-41.5 15q-33 0 -57.5 -25.5t-24.5 -62.5z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1761" d="M2 238q0 121 63.5 204.5t172 124.5t217 57.5t233.5 16.5h53q10 66 11 88q0 164 -193 164q-147 -2 -303 -98l-53 157q20 12 54 30.5t135.5 48.5t195.5 30q248 0 311 -174h4q154 174 385 174q195 0 296.5 -103.5t101.5 -281.5q0 -35 -7.5 -80t-15.5 -74l-8 -28h-746 q-6 -37 -6 -68q0 -125 74 -202t209 -77q80 0 162 31t125 60l43 30l57 -157q-18 -14 -53 -37t-139.5 -61t-202.5 -38q-160 0 -272.5 69t-155.5 187h-5q-12 -27 -38.5 -61.5t-76.5 -82.5t-131 -80t-175 -32q-137 0 -229.5 70t-92.5 193zM205 270q0 -59 43 -97t123 -38 q119 0 214 102.5t124 227.5l6 27h-94q-416 -1 -416 -222zM946 643h537q4 33 4 53q0 100 -56.5 153.5t-144.5 53.5q-115 0 -205 -68.5t-135 -191.5z" />
+<glyph unicode="&#xe7;" horiz-adv-x="1120" d="M55 426q0 262 190.5 448.5t448.5 186.5q236 0 373 -131l18 -19l-110 -129q-10 12 -31.5 29.5t-92.5 47.5t-146 30q-178 0 -312.5 -132t-134.5 -317q0 -131 83 -212t220 -81q86 0 173 35t130 70l45 35l56 -158q-18 -16 -53 -42t-146 -69t-223 -43h-4l-33 -77q51 -8 87 -42 t36 -92q0 -94 -73 -141t-163 -47q-33 0 -62.5 3t-43.5 7l-15 4l23 117q39 -12 84 -12t77.5 17.5t32.5 56.5q0 53 -96 53l-37 -2l74 166q-174 29 -274.5 147.5t-100.5 292.5z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1128" d="M55 418q0 262 173 452.5t429 190.5q195 0 295.5 -104.5t100.5 -278.5q0 -37 -8.5 -84t-16.5 -76l-8 -29h-756q-6 -31 -6 -61q0 -121 78 -201t217 -80q80 0 162 31t125 60l43 30l57 -157q-18 -14 -53 -37t-139.5 -61t-202.5 -38q-223 0 -356.5 123t-133.5 320zM297 639 h553q4 23 4 55q0 100 -55.5 154.5t-145.5 54.5q-115 0 -212 -71.5t-144 -192.5zM479 1446h205l96 -260h-157z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1128" d="M55 418q0 262 173 452.5t429 190.5q195 0 295.5 -104.5t100.5 -278.5q0 -37 -8.5 -84t-16.5 -76l-8 -29h-756q-6 -31 -6 -61q0 -121 78 -201t217 -80q80 0 162 31t125 60l43 30l57 -157q-18 -14 -53 -37t-139.5 -61t-202.5 -38q-223 0 -356.5 123t-133.5 320zM297 639 h553q4 23 4 55q0 100 -55.5 154.5t-145.5 54.5q-115 0 -212 -71.5t-144 -192.5zM614 1186l201 260h223l-245 -260h-179z" />
+<glyph unicode="&#xea;" horiz-adv-x="1128" d="M55 418q0 262 173 452.5t429 190.5q195 0 295.5 -104.5t100.5 -278.5q0 -37 -8.5 -84t-16.5 -76l-8 -29h-756q-6 -31 -6 -61q0 -121 78 -201t217 -80q80 0 162 31t125 60l43 30l57 -157q-18 -14 -53 -37t-139.5 -61t-202.5 -38q-223 0 -356.5 123t-133.5 320zM297 639 h553q4 23 4 55q0 100 -55.5 154.5t-145.5 54.5q-115 0 -212 -71.5t-144 -192.5zM418 1186l231 260h207l129 -260h-168l-74 164h-4l-139 -164h-182z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1128" d="M55 418q0 262 173 452.5t429 190.5q195 0 295.5 -104.5t100.5 -278.5q0 -37 -8.5 -84t-16.5 -76l-8 -29h-756q-6 -31 -6 -61q0 -121 78 -201t217 -80q80 0 162 31t125 60l43 30l57 -157q-18 -14 -53 -37t-139.5 -61t-202.5 -38q-223 0 -356.5 123t-133.5 320zM297 639 h553q4 23 4 55q0 100 -55.5 154.5t-145.5 54.5q-115 0 -212 -71.5t-144 -192.5zM469 1239l41 207h164l-41 -207h-164zM813 1239l39 207h164l-41 -207h-162z" />
+<glyph unicode="&#xec;" horiz-adv-x="507" d="M37 0l201 1036h198l-200 -1036h-199zM137 1446h205l96 -260h-157z" />
+<glyph unicode="&#xed;" horiz-adv-x="507" d="M37 0l201 1036h198l-200 -1036h-199zM272 1186l201 260h223l-245 -260h-179z" />
+<glyph unicode="&#xee;" horiz-adv-x="507" d="M37 0l201 1036h198l-200 -1036h-199zM76 1186l231 260h207l129 -260h-168l-74 164h-4l-139 -164h-182z" />
+<glyph unicode="&#xef;" horiz-adv-x="507" d="M37 0l201 1036h198l-200 -1036h-199zM125 1239l41 207h164l-41 -207h-164zM469 1239l39 207h164l-41 -207h-162z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1202" d="M51 391q0 217 161 390t417 173q76 0 139 -23.5t88 -45.5l27 -25h4q-35 164 -174 283l-406 -162l4 129l285 115q-111 63 -250 100l82 148q217 -55 373 -166l325 131l-2 -129l-221 -88q199 -203 199 -502q0 -90 -21.5 -187.5t-69.5 -198t-117 -179t-175.5 -129 t-231.5 -50.5q-209 0 -322.5 119t-113.5 297zM254 395q0 -109 60.5 -178.5t174.5 -69.5q166 0 279 141.5t113 295.5q0 94 -65.5 152.5t-178.5 58.5q-162 0 -272.5 -119t-110.5 -281z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1232" d="M37 0l201 1036h194l-22 -121l-29 -98h4q49 90 168 167t260 77q143 0 223 -68.5t80 -206.5q0 -49 -14 -131l-127 -655h-199l119 612q14 76 14 117q0 150 -153.5 150t-275.5 -119t-154 -287l-90 -473h-199zM422 1188q49 260 244 260q55 0 94 -35t67.5 -69.5t61.5 -34.5 q78 0 100 133h146q-51 -260 -244 -260q-53 0 -92 34.5t-70 69.5t-63 35q-72 0 -99 -133h-145z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1273" d="M53 432q0 260 195.5 444.5t445.5 184.5q217 0 354.5 -126t137.5 -327q0 -262 -195.5 -447.5t-443.5 -185.5q-219 0 -356.5 127t-137.5 330zM256 440q0 -131 82 -212t211 -81q166 0 300 132.5t134 318.5q0 129 -82 210t-209 81q-170 0 -303 -131.5t-133 -317.5zM520 1446 h205l96 -260h-157z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1273" d="M53 432q0 260 195.5 444.5t445.5 184.5q217 0 354.5 -126t137.5 -327q0 -262 -195.5 -447.5t-443.5 -185.5q-219 0 -356.5 127t-137.5 330zM256 440q0 -131 82 -212t211 -81q166 0 300 132.5t134 318.5q0 129 -82 210t-209 81q-170 0 -303 -131.5t-133 -317.5zM655 1186 l201 260h223l-245 -260h-179z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1273" d="M53 432q0 260 195.5 444.5t445.5 184.5q217 0 354.5 -126t137.5 -327q0 -262 -195.5 -447.5t-443.5 -185.5q-219 0 -356.5 127t-137.5 330zM256 440q0 -131 82 -212t211 -81q166 0 300 132.5t134 318.5q0 129 -82 210t-209 81q-170 0 -303 -131.5t-133 -317.5zM459 1186 l231 260h207l129 -260h-168l-74 164h-4l-139 -164h-182z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1273" d="M53 432q0 260 195.5 444.5t445.5 184.5q217 0 354.5 -126t137.5 -327q0 -262 -195.5 -447.5t-443.5 -185.5q-219 0 -356.5 127t-137.5 330zM256 440q0 -131 82 -212t211 -81q166 0 300 132.5t134 318.5q0 129 -82 210t-209 81q-170 0 -303 -131.5t-133 -317.5zM418 1188 q49 260 244 260q55 0 94 -35t67.5 -69.5t61.5 -34.5q78 0 100 133h145q-51 -260 -243 -260q-53 0 -92 34.5t-70 69.5t-63 35q-72 0 -99 -133h-145z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1273" d="M53 432q0 260 195.5 444.5t445.5 184.5q217 0 354.5 -126t137.5 -327q0 -262 -195.5 -447.5t-443.5 -185.5q-219 0 -356.5 127t-137.5 330zM256 440q0 -131 82 -212t211 -81q166 0 300 132.5t134 318.5q0 129 -82 210t-209 81q-170 0 -303 -131.5t-133 -317.5zM508 1239 l41 207h164l-41 -207h-164zM852 1239l39 207h164l-41 -207h-162z" />
+<glyph unicode="&#xf7;" horiz-adv-x="1292" d="M123 504v160h1034v-160h-1034zM543 90v186h192v-186h-192zM543 891v186h192v-186h-192z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1273" d="M53 432q0 260 195.5 444.5t445.5 184.5q164 0 287 -76l111 121l92 -76l-111 -121q113 -123 113 -301q0 -262 -195.5 -447.5t-443.5 -185.5q-152 0 -275 68l-110 -121l-90 78l106 115q-125 124 -125 317zM256 440q0 -109 55 -182l541 588q-74 43 -160 43 q-170 0 -303 -131.5t-133 -317.5zM401 182q63 -35 148 -35q166 0 300 132.5t134 318.5q0 92 -45 166z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1220" d="M80 250q0 49 14 131l127 655h199l-119 -610q-12 -68 -12 -119q0 -72 35.5 -109.5t119.5 -37.5q150 0 266.5 123t147.5 282l92 471h199l-201 -1036h-194l24 121l27 98h-4q-53 -92 -166 -168t-254 -76q-133 0 -217 67t-84 208zM483 1446h205l96 -260h-157z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1220" d="M80 250q0 49 14 131l127 655h199l-119 -610q-12 -68 -12 -119q0 -72 35.5 -109.5t119.5 -37.5q150 0 266.5 123t147.5 282l92 471h199l-201 -1036h-194l24 121l27 98h-4q-53 -92 -166 -168t-254 -76q-133 0 -217 67t-84 208zM618 1186l201 260h223l-245 -260h-179z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1220" d="M80 250q0 49 14 131l127 655h199l-119 -610q-12 -68 -12 -119q0 -72 35.5 -109.5t119.5 -37.5q150 0 266.5 123t147.5 282l92 471h199l-201 -1036h-194l24 121l27 98h-4q-53 -92 -166 -168t-254 -76q-133 0 -217 67t-84 208zM422 1186l231 260h207l129 -260h-168l-73 164 h-5l-139 -164h-182z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1220" d="M80 250q0 49 14 131l127 655h199l-119 -610q-12 -68 -12 -119q0 -72 35.5 -109.5t119.5 -37.5q150 0 266.5 123t147.5 282l92 471h199l-201 -1036h-194l24 121l27 98h-4q-53 -92 -166 -168t-254 -76q-133 0 -217 67t-84 208zM473 1239l41 207h164l-41 -207h-164z M817 1239l39 207h164l-41 -207h-162z" />
+<glyph unicode="&#xfd;" horiz-adv-x="1042" d="M-188 -362l92 141q43 -37 112 -37q129 0 220 149l75 123l-237 1022h207l139 -700l16 -123h2q31 68 60 119l389 704h223l-727 -1226q-143 -240 -358 -240q-125 0 -213 68zM532 1186l201 260h223l-245 -260h-179z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1226" d="M-43 -410l358 1856h197l-94 -481l-21 -82h4q55 78 146.5 128t200.5 50q182 0 284.5 -115t102.5 -311q0 -285 -170 -472.5t-394 -187.5q-102 0 -187 46.5t-122 134.5h-4q-2 -43 -12 -97l-92 -469h-197zM319 414q0 -117 58.5 -192t173.5 -75q145 0 263 131.5t118 342.5 q0 125 -62.5 195.5t-171.5 70.5q-156 0 -267.5 -144.5t-111.5 -328.5z" />
+<glyph unicode="&#xff;" horiz-adv-x="1042" d="M-188 -362l92 141q43 -37 112 -37q129 0 220 149l75 123l-237 1022h207l139 -700l16 -123h2q31 68 60 119l389 704h223l-727 -1226q-143 -240 -358 -240q-125 0 -213 68zM387 1239l41 207h164l-41 -207h-164zM731 1239l39 207h164l-41 -207h-162z" />
+<glyph unicode="&#x152;" horiz-adv-x="1964" d="M109 598q0 229 120.5 431t319.5 318.5t422 116.5q63 0 156.5 -9t132.5 -9h735l-35 -176h-639l-88 -453h518l-35 -176h-518l-90 -465h674l-35 -176h-743q-31 0 -116 -9t-138 -9q-289 0 -465 173t-176 443zM315 598q0 -193 121 -314.5t324 -121.5q37 0 73.5 4t55.5 8l18 4 l211 1092q-59 14 -141 14q-268 0 -465 -202.5t-197 -483.5z" />
+<glyph unicode="&#x153;" horiz-adv-x="2039" d="M53 432q0 260 194.5 444.5t444.5 184.5q145 0 254 -65.5t162 -180.5h4q80 115 199 180.5t258 65.5q195 0 295 -104.5t100 -278.5q0 -37 -8 -84t-17 -76l-8 -29h-753q-6 -35 -7 -63q0 -127 82 -203t213 -76q78 0 161 31t126 60l43 30l55 -157q-18 -14 -53 -37t-139.5 -61 t-202.5 -38q-154 0 -264.5 67t-161.5 185h-4q-88 -117 -216 -184.5t-265 -67.5q-219 0 -355.5 127t-136.5 330zM256 440q0 -131 81 -212t210 -81q166 0 300 132.5t134 318.5q0 129 -81 210t-210 81q-168 0 -301 -131.5t-133 -317.5zM1210 639h551q6 27 6 55q0 100 -55 154.5 t-145 54.5q-117 0 -213.5 -70.5t-143.5 -193.5z" />
+<glyph unicode="&#x178;" horiz-adv-x="1185" d="M164 1446h217l174 -475q29 -80 53 -183h4q61 98 123 181l355 477h243l-651 -840l-119 -606h-201l121 612zM522 1599l41 207h164l-41 -207h-164zM866 1599l39 207h164l-41 -207h-162z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="1021" d="M82 1546l231 260h207l129 -260h-168l-73 164h-5l-139 -164h-182z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="1021" d="M39 1548q49 260 244 260q55 0 94 -34.5t67.5 -69.5t61.5 -35q78 0 100 133h146q-51 -260 -244 -260q-53 0 -92 35t-70 69.5t-63 34.5q-72 0 -99 -133h-145z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1435" d="M158 504l30 160h1078l-31 -160h-1077z" />
+<glyph unicode="&#x2014;" horiz-adv-x="1845" d="M158 504l30 160h1487l-30 -160h-1487z" />
+<glyph unicode="&#x2018;" horiz-adv-x="464" d="M182 1071l211 397h154l-164 -397h-201z" />
+<glyph unicode="&#x2019;" horiz-adv-x="452" d="M188 1071l164 397h201l-211 -397h-154z" />
+<glyph unicode="&#x201a;" horiz-adv-x="509" d="M-66 -184l164 399h201l-211 -399h-154z" />
+<glyph unicode="&#x201c;" horiz-adv-x="753" d="M182 1071l211 397h154l-164 -397h-201zM471 1071l211 397h154l-164 -397h-201z" />
+<glyph unicode="&#x201d;" horiz-adv-x="741" d="M188 1071l166 397h199l-209 -397h-156zM477 1071l166 397h199l-209 -397h-156z" />
+<glyph unicode="&#x201e;" horiz-adv-x="798" d="M-66 -184l164 399h201l-209 -399h-156zM223 -184l166 399h199l-209 -399h-156z" />
+<glyph unicode="&#x2022;" horiz-adv-x="837" d="M98 596q0 133 92.5 225t225.5 92q131 0 223 -93t92 -224t-92 -224t-223 -93q-133 0 -225.5 92t-92.5 225z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1568" d="M35 0l41 215h209l-43 -215h-207zM565 0l43 215h207l-41 -215h-209zM1098 0l41 215h209l-43 -215h-207z" />
+<glyph unicode="&#x2039;" horiz-adv-x="708" d="M76 582l391 417h209l-410 -430l262 -411h-188z" />
+<glyph unicode="&#x203a;" horiz-adv-x="708" d="M18 158l410 430l-260 411h188l265 -424l-394 -417h-209z" />
+<glyph unicode="&#x20ac;" horiz-adv-x="1202" d="M57 528l25 129h113q6 76 24 148h-108l24 131h127q102 236 314 385t456 149q61 0 120.5 -8t88.5 -16l29 -8l-82 -176q-72 20 -158 20q-168 0 -315.5 -95t-229.5 -251h578l-51 -131h-580q-23 -76 -29 -148h551l-49 -129h-489q18 -160 121.5 -260t281.5 -100q47 0 95.5 6 t72.5 14l25 7l4 -189q-92 -31 -207 -31q-258 0 -424 152t-186 401h-142z" />
+<glyph unicode="&#x2122;" horiz-adv-x="2041" d="M176 1309v137h778v-137h-311v-764h-156v764h-311zM1020 545l72 901h141l213 -471l29 -86h4q12 49 26 86l213 471h144l69 -901h-153l-43 538l2 62h-4l-195 -434h-125l-194 434h-5l3 -62l-43 -538h-154z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1035" d="M0 1035h1035v-1035h-1035v1035z" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1193" d="M92 0l170 874h-129l31 162h129l8 39q18 96 60 169t89.5 112t107.5 63.5t104.5 30.5t87.5 6l90 -6l-37 -170q-16 4 -47 4q-217 0 -258 -217l-6 -31h630l-202 -1036h-199l170 874h-430l-170 -874h-199zM961 1243l38 203h205l-41 -203h-202z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="1226" d="M92 0l168 864h-129l31 162h129l10 49q18 96 60 169t89.5 112t107.5 63.5t104.5 30.5t87.5 6l90 -6l-37 -170q-16 4 -47 4q-217 0 -258 -217l-9 -41h244l-31 -162h-243l-168 -864h-199zM758 209q0 33 10 88l223 1149h199l-215 -1114q-10 -47 -10 -78q0 -84 92 -84l33 2 l-37 -176q-29 -4 -60 -4q-98 0 -166.5 49t-68.5 168z" />
+<glyph unicode="&#xfb03;" horiz-adv-x="1880" d="M92 0l170 874h-129l31 162h129l8 39q18 96 60 169t89.5 112t107.5 63.5t104.5 30.5t87.5 6l90 -6l-37 -170q-16 4 -47 4q-217 0 -258 -217l-6 -31h487l8 39q18 96 60.5 169t89.5 112t107.5 63.5t104.5 30.5t87 6l90 -6l-37 -170q-16 4 -47 4q-217 0 -258 -217l-6 -31h630 l-202 -1036h-199l170 874h-430l-170 -874h-199l170 874h-487l-170 -874h-199zM1647 1243l39 203h204l-41 -203h-202z" />
+<glyph unicode="&#xfb04;" horiz-adv-x="1912" d="M92 0l170 874h-129l31 162h129l8 39q18 96 60 169t89.5 112t107.5 63.5t104.5 30.5t87.5 6l90 -6l-37 -170q-16 4 -47 4q-217 0 -258 -217l-6 -31h487l8 39q18 96 60.5 169t89.5 112t107.5 63.5t104.5 30.5t87 6l90 -6l-37 -170q-16 4 -47 4q-217 0 -258 -217l-6 -31h243 l-30 -162h-244l-170 -874h-199l170 874h-487l-170 -874h-199zM1444 209q0 33 10 88l223 1149h199l-215 -1114q-10 -47 -10 -78q0 -84 92 -84l33 2l-37 -176q-29 -4 -60 -4q-98 0 -166.5 49t-68.5 168z" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/phonegap/www/fonts/MuseoSans_500_Italic-webfont.ttf b/phonegap/www/fonts/MuseoSans_500_Italic-webfont.ttf
new file mode 100755
index 000000000..445af3ac1
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_500_Italic-webfont.ttf
Binary files differ
diff --git a/phonegap/www/fonts/MuseoSans_500_Italic-webfont.woff b/phonegap/www/fonts/MuseoSans_500_Italic-webfont.woff
new file mode 100755
index 000000000..453194a98
--- /dev/null
+++ b/phonegap/www/fonts/MuseoSans_500_Italic-webfont.woff
Binary files differ
diff --git a/phonegap/www/i/arrow-east.gif b/phonegap/www/i/arrow-east.gif
new file mode 100644
index 000000000..132bd9346
--- /dev/null
+++ b/phonegap/www/i/arrow-east.gif
Binary files differ
diff --git a/phonegap/www/i/arrow-north.gif b/phonegap/www/i/arrow-north.gif
new file mode 100644
index 000000000..2e0422f52
--- /dev/null
+++ b/phonegap/www/i/arrow-north.gif
Binary files differ
diff --git a/phonegap/www/i/arrow-northeast.gif b/phonegap/www/i/arrow-northeast.gif
new file mode 100644
index 000000000..08546cc25
--- /dev/null
+++ b/phonegap/www/i/arrow-northeast.gif
Binary files differ
diff --git a/phonegap/www/i/arrow-northwest.gif b/phonegap/www/i/arrow-northwest.gif
new file mode 100644
index 000000000..d682da8d2
--- /dev/null
+++ b/phonegap/www/i/arrow-northwest.gif
Binary files differ
diff --git a/phonegap/www/i/arrow-south.gif b/phonegap/www/i/arrow-south.gif
new file mode 100644
index 000000000..1c3f281f8
--- /dev/null
+++ b/phonegap/www/i/arrow-south.gif
Binary files differ
diff --git a/phonegap/www/i/arrow-southeast.gif b/phonegap/www/i/arrow-southeast.gif
new file mode 100644
index 000000000..11af4752d
--- /dev/null
+++ b/phonegap/www/i/arrow-southeast.gif
Binary files differ
diff --git a/phonegap/www/i/arrow-southwest.gif b/phonegap/www/i/arrow-southwest.gif
new file mode 100644
index 000000000..41e483150
--- /dev/null
+++ b/phonegap/www/i/arrow-southwest.gif
Binary files differ
diff --git a/phonegap/www/i/arrow-west.gif b/phonegap/www/i/arrow-west.gif
new file mode 100644
index 000000000..12a335b12
--- /dev/null
+++ b/phonegap/www/i/arrow-west.gif
Binary files differ
diff --git a/phonegap/www/i/email.png b/phonegap/www/i/email.png
new file mode 100644
index 000000000..030eafde6
--- /dev/null
+++ b/phonegap/www/i/email.png
Binary files differ
diff --git a/phonegap/www/i/flower.gif b/phonegap/www/i/flower.gif
new file mode 100644
index 000000000..7e8f22a77
--- /dev/null
+++ b/phonegap/www/i/flower.gif
Binary files differ
diff --git a/phonegap/www/i/grey.gif b/phonegap/www/i/grey.gif
new file mode 100644
index 000000000..98eee7d12
--- /dev/null
+++ b/phonegap/www/i/grey.gif
Binary files differ
diff --git a/phonegap/www/i/moj.png b/phonegap/www/i/moj.png
new file mode 100644
index 000000000..2f9adb986
--- /dev/null
+++ b/phonegap/www/i/moj.png
Binary files differ
diff --git a/phonegap/www/i/mysociety-dark.png b/phonegap/www/i/mysociety-dark.png
new file mode 100644
index 000000000..2bf260495
--- /dev/null
+++ b/phonegap/www/i/mysociety-dark.png
Binary files differ
diff --git a/phonegap/www/i/mysociety-on-white.gif b/phonegap/www/i/mysociety-on-white.gif
new file mode 100644
index 000000000..0f8a10296
--- /dev/null
+++ b/phonegap/www/i/mysociety-on-white.gif
Binary files differ
diff --git a/phonegap/www/i/new.png b/phonegap/www/i/new.png
new file mode 100644
index 000000000..5889d8256
--- /dev/null
+++ b/phonegap/www/i/new.png
Binary files differ
diff --git a/phonegap/www/i/pin-green.png b/phonegap/www/i/pin-green.png
new file mode 100644
index 000000000..8b64d5160
--- /dev/null
+++ b/phonegap/www/i/pin-green.png
Binary files differ
diff --git a/phonegap/www/i/pin-red.png b/phonegap/www/i/pin-red.png
new file mode 100644
index 000000000..9b754e42e
--- /dev/null
+++ b/phonegap/www/i/pin-red.png
Binary files differ
diff --git a/phonegap/www/i/pin-shadow-big.png b/phonegap/www/i/pin-shadow-big.png
new file mode 100644
index 000000000..113184b94
--- /dev/null
+++ b/phonegap/www/i/pin-shadow-big.png
Binary files differ
diff --git a/phonegap/www/i/pin-shadow.png b/phonegap/www/i/pin-shadow.png
new file mode 100644
index 000000000..8b470592a
--- /dev/null
+++ b/phonegap/www/i/pin-shadow.png
Binary files differ
diff --git a/phonegap/www/i/pin-yellow-big.png b/phonegap/www/i/pin-yellow-big.png
new file mode 100644
index 000000000..59ed29dbd
--- /dev/null
+++ b/phonegap/www/i/pin-yellow-big.png
Binary files differ
diff --git a/phonegap/www/i/pin-yellow.png b/phonegap/www/i/pin-yellow.png
new file mode 100644
index 000000000..f9359b0b3
--- /dev/null
+++ b/phonegap/www/i/pin-yellow.png
Binary files differ
diff --git a/phonegap/www/i/rose.gif b/phonegap/www/i/rose.gif
new file mode 100644
index 000000000..cceaaad7b
--- /dev/null
+++ b/phonegap/www/i/rose.gif
Binary files differ
diff --git a/phonegap/www/i/zoomin.gif b/phonegap/www/i/zoomin.gif
new file mode 100644
index 000000000..32ced670b
--- /dev/null
+++ b/phonegap/www/i/zoomin.gif
Binary files differ
diff --git a/phonegap/www/i/zoomout.gif b/phonegap/www/i/zoomout.gif
new file mode 100644
index 000000000..8de898bb2
--- /dev/null
+++ b/phonegap/www/i/zoomout.gif
Binary files differ
diff --git a/phonegap/www/images/ie_fixed.gif b/phonegap/www/images/ie_fixed.gif
new file mode 100644
index 000000000..438bd6894
--- /dev/null
+++ b/phonegap/www/images/ie_fixed.gif
Binary files differ
diff --git a/phonegap/www/images/ie_front_logo.gif b/phonegap/www/images/ie_front_logo.gif
new file mode 100644
index 000000000..34277ea74
--- /dev/null
+++ b/phonegap/www/images/ie_front_logo.gif
Binary files differ
diff --git a/phonegap/www/images/ie_green_chevron.gif b/phonegap/www/images/ie_green_chevron.gif
new file mode 100644
index 000000000..341ac1eeb
--- /dev/null
+++ b/phonegap/www/images/ie_green_chevron.gif
Binary files differ
diff --git a/phonegap/www/images/ie_key_tools_sprite.gif b/phonegap/www/images/ie_key_tools_sprite.gif
new file mode 100644
index 000000000..aed0bafa3
--- /dev/null
+++ b/phonegap/www/images/ie_key_tools_sprite.gif
Binary files differ
diff --git a/phonegap/www/images/ie_key_tools_sprite_dark.gif b/phonegap/www/images/ie_key_tools_sprite_dark.gif
new file mode 100644
index 000000000..0b2fd5741
--- /dev/null
+++ b/phonegap/www/images/ie_key_tools_sprite_dark.gif
Binary files differ
diff --git a/phonegap/www/images/ie_logo.gif b/phonegap/www/images/ie_logo.gif
new file mode 100644
index 000000000..17c9f59b8
--- /dev/null
+++ b/phonegap/www/images/ie_logo.gif
Binary files differ
diff --git a/phonegap/www/images/ie_mobileapps.gif b/phonegap/www/images/ie_mobileapps.gif
new file mode 100644
index 000000000..604efc101
--- /dev/null
+++ b/phonegap/www/images/ie_mobileapps.gif
Binary files differ
diff --git a/phonegap/www/images/ie_mysoc_logo.gif b/phonegap/www/images/ie_mysoc_logo.gif
new file mode 100644
index 000000000..8df76b210
--- /dev/null
+++ b/phonegap/www/images/ie_mysoc_logo.gif
Binary files differ
diff --git a/phonegap/www/images/ie_sub_map_links_sprite.gif b/phonegap/www/images/ie_sub_map_links_sprite.gif
new file mode 100644
index 000000000..1afd136e7
--- /dev/null
+++ b/phonegap/www/images/ie_sub_map_links_sprite.gif
Binary files differ
diff --git a/phonegap/www/images/spinner-black-333.gif b/phonegap/www/images/spinner-black-333.gif
new file mode 100644
index 000000000..63b3a9d08
--- /dev/null
+++ b/phonegap/www/images/spinner-black-333.gif
Binary files differ
diff --git a/phonegap/www/images/spinner-black.gif b/phonegap/www/images/spinner-black.gif
new file mode 100644
index 000000000..763c98d35
--- /dev/null
+++ b/phonegap/www/images/spinner-black.gif
Binary files differ
diff --git a/phonegap/www/images/spinner-yellow.gif b/phonegap/www/images/spinner-yellow.gif
new file mode 100644
index 000000000..56eed1541
--- /dev/null
+++ b/phonegap/www/images/spinner-yellow.gif
Binary files differ
diff --git a/phonegap/www/images/sprite.png b/phonegap/www/images/sprite.png
new file mode 100644
index 000000000..61c27b32a
--- /dev/null
+++ b/phonegap/www/images/sprite.png
Binary files differ
diff --git a/phonegap/www/images/tile.jpg b/phonegap/www/images/tile.jpg
new file mode 100644
index 000000000..b412774e4
--- /dev/null
+++ b/phonegap/www/images/tile.jpg
Binary files differ
diff --git a/phonegap/www/index.html b/phonegap/www/index.html
new file mode 100644
index 000000000..77de47165
--- /dev/null
+++ b/phonegap/www/index.html
@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title></title>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
+ <meta charset="utf-8">
+
+ <link rel="stylesheet" href="css/base.css">
+ <link rel="stylesheet" href="css/mobile.css">
+ <script type="text/javascript" src="js/json2.js"></script>
+ <script type="text/javascript" src="js/config.js"></script>
+ <script type="text/javascript" charset="utf-8" src="cordova-1.8.0.js"></script>
+ <script type="text/javascript" src="js/jquery-1.7.0.min.js"></script>
+ <script src="js/jquery.validate.min.js" type="text/javascript" charset="utf-8"></script>
+
+ <script type="text/javascript" src="js/geo.min.js"></script>
+ <script type="text/javascript" src="js/fixmystreet.js"></script>
+ <script type="text/javascript" src="js/mobile.js"></script>
+
+ <script type="text/javascript">
+ validation_strings = {
+ update: 'Please enter a message',
+ title: 'Please enter a subject',
+ detail: 'Please enter some details',
+ name: {
+ required: 'Please enter your name',
+ validName: 'Please enter your full name, councils need this information – if you do not wish your name to be shown on the site, untick the box below'
+ },
+ category: 'Please choose a category',
+ rznvy: {
+ required: 'Please enter your email',
+ email: 'Please enter a valid email'
+ },
+ email: {
+ required: 'Please enter your email',
+ email: 'Please enter a valid email'
+ }
+ };
+ </script>
+ </head>
+ <body id="container" class="frontpage fullwidthpage" ontouchmove="touchmove(event);">
+
+ <div class="wrapper">
+ <div class="table-cell">
+ <header id="site-header" role="banner">
+ <div class="container">
+ <span id="site-logo"></span>
+ </div>
+ </header>
+
+ <div id="user-meta" class="hidden"></div>
+
+ <div class="container">
+ <div class="content" role="main">
+ <div id="front-main">
+ <div id="front-main-container">
+ <form action="" method="get" name="postcodeForm" id="postcodeForm">
+ <label for="pc">Enter a nearby GB postcode, or street name and area:</label>
+ <div>
+ <input type="text" name="pc" value="" id="pc" size="10" maxlength="200" placeholder="e.g. ‘B2 4QA’ or ‘Tib St, Manchester’">
+ <input type="submit" value="Go" id="submit">
+ </div>
+ </form>
+ </div>
+ </div>
+
+ <div class="tablewrapper">
+ <div id="front-howto">
+ <h2>How to report a problem</h2>
+
+ <ol class="big-numbers">
+ <li>Enter a nearby GB postcode, or street name and area</li>
+ <li>Locate the problem on a map of the area</li>
+ <li>Enter details of the problem</li>
+ <li>We send it to the council on your behalf</li>
+ </ol>
+ </div>
+
+ </div>
+ </div><!-- .content role=main -->
+ </div><!-- .container -->
+ </div><!-- .table-cell -->
+
+ <div class="mobile-info">
+ <a href="about.html">i</a>
+ </div>
+
+ <div class="big-green-banner mobile-map-banner mobile-sign-in-banner">
+ <a id="sign_in" href="sign_in.html">Sign In</a><a id="sign_out" href="#" onclick="sign_out();">Sign Out</a>
+ </div>
+ </div> <!-- .wrapper -->
+
+ <div class="spinner" id="loadingSpinner">
+ <div class="bar1"></div>
+ <div class="bar2"></div>
+ <div class="bar3"></div>
+ <div class="bar4"></div>
+ <div class="bar5"></div>
+ <div class="bar6"></div>
+ <div class="bar7"></div>
+ <div class="bar8"></div>
+ <div class="bar9"></div>
+ <div class="bar10"></div>
+ <div class="bar11"></div>
+ <div class="bar12"></div>
+ </div>
+ </body>
+</html>
+</html>
diff --git a/phonegap/www/js/OpenLayers.Projection.OrdnanceSurvey.js b/phonegap/www/js/OpenLayers.Projection.OrdnanceSurvey.js
new file mode 100644
index 000000000..bb596d3bf
--- /dev/null
+++ b/phonegap/www/js/OpenLayers.Projection.OrdnanceSurvey.js
@@ -0,0 +1,489 @@
+/**
+ * OpenLayers OSGB Grid Projection Transformations
+ *
+ * Conversion to OpenLayers by Thomas Wood (grand.edgemaster@gmail.com)
+ *
+ * this program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * this program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * ---------------------------------------------------------------------------
+ *
+ * PLEASE DO NOT HOTLINK THIS, save this onto your own server
+ * - I cannot guarantee this file will remain here forever.
+ *
+ * ---------------------------------------------------------------------------
+ *
+ * Credits:
+ * Based from the geotools js library by Paul Dixon
+ * GeoTools javascript coordinate transformations
+ * http://files.dixo.net/geotools.html
+ *
+ * Portions of this file copyright (c)2005 Paul Dixon (paul@elphin.com)
+ *
+ * The algorithm used by the script for WGS84-OSGB36 conversions is derived
+ * from an OSGB spreadsheet (www.gps.gov.uk) with permission. This has been
+ * adapted into Perl by Ian Harris, and into PHP by Barry Hunter. Conversion
+ * accuracy is in the order of 7m for 90% of Great Britain, and should be
+ * be similar to the conversion made by a typical GPSr
+ *
+ */
+
+OpenLayers.Projection.OS = {
+
+ /**
+ * Method: projectForwardBritish
+ * Given an object with x and y properties in EPSG:4326, modify the x,y
+ * properties on the object to be the OSGB36 (transverse 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.
+ */
+ projectForwardBritish: function(point) {
+ var x1 = OpenLayers.Projection.OS.Lat_Long_H_to_X(point.y,point.x,0,6378137.00,6356752.313);
+ var y1 = OpenLayers.Projection.OS.Lat_Long_H_to_Y(point.y,point.x,0,6378137.00,6356752.313);
+ var z1 = OpenLayers.Projection.OS.Lat_H_to_Z (point.y, 0,6378137.00,6356752.313);
+
+ var x2 = OpenLayers.Projection.OS.Helmert_X(x1,y1,z1,-446.448,-0.2470,-0.8421,20.4894);
+ var y2 = OpenLayers.Projection.OS.Helmert_Y(x1,y1,z1, 125.157,-0.1502,-0.8421,20.4894);
+ var z2 = OpenLayers.Projection.OS.Helmert_Z(x1,y1,z1,-542.060,-0.1502,-0.2470,20.4894);
+
+ var lat2 = OpenLayers.Projection.OS.XYZ_to_Lat (x2,y2,z2,6377563.396,6356256.910);
+ var lon2 = OpenLayers.Projection.OS.XYZ_to_Long(x2,y2);
+
+ point.x = OpenLayers.Projection.OS.Lat_Long_to_East (lat2,lon2,6377563.396,6356256.910,400000,0.999601272,49.00000,-2.00000);
+ point.y = OpenLayers.Projection.OS.Lat_Long_to_North(lat2,lon2,6377563.396,6356256.910,400000,-100000,0.999601272,49.00000,-2.00000);
+
+ return point;
+ },
+
+ /**
+ * Method: projectInverseBritish
+ * Given an object with x and y properties in OSGB36 (transverse 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
+ * OSGB36 to unprojected coordinates..
+ */
+ projectInverseBritish: function(point) {
+ var lat1 = OpenLayers.Projection.OS.E_N_to_Lat (point.x,point.y,6377563.396,6356256.910,400000,-100000,0.999601272,49.00000,-2.00000);
+ var lon1 = OpenLayers.Projection.OS.E_N_to_Long(point.x,point.y,6377563.396,6356256.910,400000,-100000,0.999601272,49.00000,-2.00000);
+
+ var x1 = OpenLayers.Projection.OS.Lat_Long_H_to_X(lat1,lon1,0,6377563.396,6356256.910);
+ var y1 = OpenLayers.Projection.OS.Lat_Long_H_to_Y(lat1,lon1,0,6377563.396,6356256.910);
+ var z1 = OpenLayers.Projection.OS.Lat_H_to_Z (lat1, 0,6377563.396,6356256.910);
+
+ var x2 = OpenLayers.Projection.OS.Helmert_X(x1,y1,z1,446.448 ,0.2470,0.8421,-20.4894);
+ var y2 = OpenLayers.Projection.OS.Helmert_Y(x1,y1,z1,-125.157,0.1502,0.8421,-20.4894);
+ var z2 = OpenLayers.Projection.OS.Helmert_Z(x1,y1,z1,542.060 ,0.1502,0.2470,-20.4894);
+
+ var lat = OpenLayers.Projection.OS.XYZ_to_Lat(x2,y2,z2,6378137.000,6356752.313);
+ var lon = OpenLayers.Projection.OS.XYZ_to_Long(x2,y2);
+
+ point.x = lon;
+ point.y = lat;
+ return point;
+ },
+
+ goog2osgb: function(point) {
+ return OpenLayers.Projection.OS.projectForwardBritish(OpenLayers.Layer.SphericalMercator.projectInverse(point));
+ },
+
+ osgb2goog: function(point) {
+ return OpenLayers.Layer.SphericalMercator.projectForward(OpenLayers.Projection.OS.projectInverseBritish(point));
+ },
+
+ /*****
+ * Mathematical functions
+ *****/
+ E_N_to_Lat: function(East, North, a, b, e0, n0, f0, PHI0, LAM0) {
+ //Un-project Transverse Mercator eastings and northings back to latitude.
+ //eastings (East) and northings (North) in meters; _
+ //ellipsoid axis dimensions (a & b) in meters; _
+ //eastings (e0) and northings (n0) of false origin in meters; _
+ //central meridian scale factor (f0) and _
+ //latitude (PHI0) and longitude (LAM0) of false origin in decimal degrees.
+
+ //Convert angle measures to radians
+ var Pi = 3.14159265358979;
+ var RadPHI0 = PHI0 * (Pi / 180);
+ var RadLAM0 = LAM0 * (Pi / 180);
+
+ //Compute af0, bf0, e squared (e2), n and Et
+ var af0 = a * f0;
+ var bf0 = b * f0;
+ var e2 = (Math.pow(af0,2) - Math.pow(bf0,2)) / Math.pow(af0,2);
+ var n = (af0 - bf0) / (af0 + bf0);
+ var Et = East - e0;
+
+ //Compute initial value for latitude (PHI) in radians
+ var PHId = OpenLayers.Projection.OS.InitialLat(North, n0, af0, RadPHI0, n, bf0);
+
+ //Compute nu, rho and eta2 using value for PHId
+ var nu = af0 / (Math.sqrt(1 - (e2 * ( Math.pow(Math.sin(PHId),2)))));
+ var rho = (nu * (1 - e2)) / (1 - (e2 * Math.pow(Math.sin(PHId),2)));
+ var eta2 = (nu / rho) - 1;
+
+ //Compute Latitude
+ var VII = (Math.tan(PHId)) / (2 * rho * nu);
+ var VIII = ((Math.tan(PHId)) / (24 * rho * Math.pow(nu,3))) * (5 + (3 * (Math.pow(Math.tan(PHId),2))) + eta2 - (9 * eta2 * (Math.pow(Math.tan(PHId),2))));
+ var IX = ((Math.tan(PHId)) / (720 * rho * Math.pow(nu,5))) * (61 + (90 * ((Math.tan(PHId)) ^ 2)) + (45 * (Math.pow(Math.tan(PHId),4))));
+
+ var E_N_to_Lat = (180 / Pi) * (PHId - (Math.pow(Et,2) * VII) + (Math.pow(Et,4) * VIII) - ((Et ^ 6) * IX));
+
+ return (E_N_to_Lat);
+ },
+
+ E_N_to_Long: function(East, North, a, b, e0, n0, f0, PHI0, LAM0) {
+ //Un-project Transverse Mercator eastings and northings back to longitude.
+ //eastings (East) and northings (North) in meters; _
+ //ellipsoid axis dimensions (a & b) in meters; _
+ //eastings (e0) and northings (n0) of false origin in meters; _
+ //central meridian scale factor (f0) and _
+ //latitude (PHI0) and longitude (LAM0) of false origin in decimal degrees.
+
+ //Convert angle measures to radians
+ var Pi = 3.14159265358979;
+ var RadPHI0 = PHI0 * (Pi / 180);
+ var RadLAM0 = LAM0 * (Pi / 180);
+
+ //Compute af0, bf0, e squared (e2), n and Et
+ var af0 = a * f0;
+ var bf0 = b * f0;
+ var e2 = (Math.pow(af0,2) - Math.pow(bf0,2)) / Math.pow(af0,2);
+ var n = (af0 - bf0) / (af0 + bf0);
+ var Et = East - e0;
+
+ //Compute initial value for latitude (PHI) in radians
+ var PHId = OpenLayers.Projection.OS.InitialLat(North, n0, af0, RadPHI0, n, bf0);
+
+ //Compute nu, rho and eta2 using value for PHId
+ var nu = af0 / (Math.sqrt(1 - (e2 * (Math.pow(Math.sin(PHId),2)))));
+ var rho = (nu * (1 - e2)) / (1 - (e2 * Math.pow(Math.sin(PHId),2)));
+ var eta2 = (nu / rho) - 1;
+
+ //Compute Longitude
+ var X = (Math.pow(Math.cos(PHId),-1)) / nu;
+ var XI = ((Math.pow(Math.cos(PHId),-1)) / (6 * Math.pow(nu,3))) * ((nu / rho) + (2 * (Math.pow(Math.tan(PHId),2))));
+ var XII = ((Math.pow(Math.cos(PHId),-1)) / (120 * Math.pow(nu,5))) * (5 + (28 * (Math.pow(Math.tan(PHId),2))) + (24 * (Math.pow(Math.tan(PHId),4))));
+ var XIIA = ((Math.pow(Math.cos(PHId),-1)) / (5040 * Math.pow(nu,7))) * (61 + (662 * (Math.pow(Math.tan(PHId),2))) + (1320 * (Math.pow(Math.tan(PHId),4))) + (720 * (Math.pow(Math.tan(PHId),6))));
+
+ var E_N_to_Long = (180 / Pi) * (RadLAM0 + (Et * X) - (Math.pow(Et,3) * XI) + (Math.pow(Et,5) * XII) - (Math.pow(Et,7) * XIIA));
+
+ return E_N_to_Long;
+ },
+
+ InitialLat: function(North, n0, afo, PHI0, n, bfo) {
+ //Compute initial value for Latitude (PHI) IN RADIANS.
+ //northing of point (North) and northing of false origin (n0) in meters; _
+ //semi major axis multiplied by central meridian scale factor (af0) in meters; _
+ //latitude of false origin (PHI0) IN RADIANS; _
+ //n (computed from a, b and f0) and _
+ //ellipsoid semi major axis multiplied by central meridian scale factor (bf0) in meters.
+
+ //First PHI value (PHI1)
+ var PHI1 = ((North - n0) / afo) + PHI0;
+
+ //Calculate M
+ var M = OpenLayers.Projection.OS.Marc(bfo, n, PHI0, PHI1);
+
+ //Calculate new PHI value (PHI2)
+ var PHI2 = ((North - n0 - M) / afo) + PHI1;
+
+ //Iterate to get final value for InitialLat
+ while (Math.abs(North - n0 - M) > 0.00001)
+ {
+ PHI2 = ((North - n0 - M) / afo) + PHI1;
+ M = OpenLayers.Projection.OS.Marc(bfo, n, PHI0, PHI2);
+ PHI1 = PHI2;
+ }
+ return PHI2;
+ },
+
+ Lat_Long_H_to_X: function(PHI, LAM, H, a, b) {
+ // Convert geodetic coords lat (PHI), long (LAM) and height (H) to cartesian X coordinate.
+ // Input: - _
+ // Latitude (PHI)& Longitude (LAM) both in decimal degrees; _
+ // Ellipsoidal height (H) and ellipsoid axis dimensions (a & b) all in meters.
+
+ // Convert angle measures to radians
+ var Pi = 3.14159265358979;
+ var RadPHI = PHI * (Pi / 180);
+ var RadLAM = LAM * (Pi / 180);
+
+ // Compute eccentricity squared and nu
+ var e2 = (Math.pow(a,2) - Math.pow(b,2)) / Math.pow(a,2);
+ var V = a / (Math.sqrt(1 - (e2 * ( Math.pow(Math.sin(RadPHI),2)))));
+
+ // Compute X
+ return (V + H) * (Math.cos(RadPHI)) * (Math.cos(RadLAM));
+ },
+
+
+ Lat_Long_H_to_Y: function(PHI, LAM, H, a, b) {
+ // Convert geodetic coords lat (PHI), long (LAM) and height (H) to cartesian Y coordinate.
+ // Input: - _
+ // Latitude (PHI)& Longitude (LAM) both in decimal degrees; _
+ // Ellipsoidal height (H) and ellipsoid axis dimensions (a & b) all in meters.
+
+ // Convert angle measures to radians
+ var Pi = 3.14159265358979;
+ var RadPHI = PHI * (Pi / 180);
+ var RadLAM = LAM * (Pi / 180);
+
+ // Compute eccentricity squared and nu
+ var e2 = (Math.pow(a,2) - Math.pow(b,2)) / Math.pow(a,2);
+ var V = a / (Math.sqrt(1 - (e2 * ( Math.pow(Math.sin(RadPHI),2))) ));
+
+ // Compute Y
+ return (V + H) * (Math.cos(RadPHI)) * (Math.sin(RadLAM));
+ },
+
+
+ Lat_H_to_Z: function(PHI, H, a, b) {
+ // Convert geodetic coord components latitude (PHI) and height (H) to cartesian Z coordinate.
+ // Input: - _
+ // Latitude (PHI) decimal degrees; _
+ // Ellipsoidal height (H) and ellipsoid axis dimensions (a & b) all in meters.
+
+ // Convert angle measures to radians
+ var Pi = 3.14159265358979;
+ var RadPHI = PHI * (Pi / 180);
+
+ // Compute eccentricity squared and nu
+ var e2 = (Math.pow(a,2) - Math.pow(b,2)) / Math.pow(a,2);
+ var V = a / (Math.sqrt(1 - (e2 * ( Math.pow(Math.sin(RadPHI),2)) )));
+
+ // Compute X
+ return ((V * (1 - e2)) + H) * (Math.sin(RadPHI));
+ },
+
+
+ Helmert_X: function(X,Y,Z,DX,Y_Rot,Z_Rot,s) {
+
+ // (X, Y, Z, DX, Y_Rot, Z_Rot, s)
+ // Computed Helmert transformed X coordinate.
+ // Input: - _
+ // cartesian XYZ coords (X,Y,Z), X translation (DX) all in meters ; _
+ // Y and Z rotations in seconds of arc (Y_Rot, Z_Rot) and scale in ppm (s).
+
+ // Convert rotations to radians and ppm scale to a factor
+ var Pi = 3.14159265358979;
+ var sfactor = s * 0.000001;
+
+ var RadY_Rot = (Y_Rot / 3600) * (Pi / 180);
+
+ var RadZ_Rot = (Z_Rot / 3600) * (Pi / 180);
+
+ //Compute transformed X coord
+ return (X + (X * sfactor) - (Y * RadZ_Rot) + (Z * RadY_Rot) + DX);
+ },
+
+
+ Helmert_Y: function(X,Y,Z,DY,X_Rot,Z_Rot,s) {
+ // Computed Helmert transformed Y coordinate.
+ // Input: - _
+ // cartesian XYZ coords (X,Y,Z), Y translation (DY) all in meters ; _
+ // X and Z rotations in seconds of arc (X_Rot, Z_Rot) and scale in ppm (s).
+
+ // Convert rotations to radians and ppm scale to a factor
+ var Pi = 3.14159265358979;
+ var sfactor = s * 0.000001;
+ var RadX_Rot = (X_Rot / 3600) * (Pi / 180);
+ var RadZ_Rot = (Z_Rot / 3600) * (Pi / 180);
+
+ // Compute transformed Y coord
+ return (X * RadZ_Rot) + Y + (Y * sfactor) - (Z * RadX_Rot) + DY;
+ },
+
+
+
+ Helmert_Z: function(X, Y, Z, DZ, X_Rot, Y_Rot, s) {
+ // Computed Helmert transformed Z coordinate.
+ // Input: - _
+ // cartesian XYZ coords (X,Y,Z), Z translation (DZ) all in meters ; _
+ // X and Y rotations in seconds of arc (X_Rot, Y_Rot) and scale in ppm (s).
+ //
+ // Convert rotations to radians and ppm scale to a factor
+ var Pi = 3.14159265358979;
+ var sfactor = s * 0.000001;
+ var RadX_Rot = (X_Rot / 3600) * (Pi / 180);
+ var RadY_Rot = (Y_Rot / 3600) * (Pi / 180);
+
+ // Compute transformed Z coord
+ return (-1 * X * RadY_Rot) + (Y * RadX_Rot) + Z + (Z * sfactor) + DZ;
+ } ,
+
+ XYZ_to_Lat: function(X, Y, Z, a, b) {
+ // Convert XYZ to Latitude (PHI) in Dec Degrees.
+ // Input: - _
+ // XYZ cartesian coords (X,Y,Z) and ellipsoid axis dimensions (a & b), all in meters.
+
+ // this FUNCTION REQUIRES THE "Iterate_XYZ_to_Lat" FUNCTION
+ // this FUNCTION IS CALLED BY THE "XYZ_to_H" FUNCTION
+
+ var RootXYSqr = Math.sqrt(Math.pow(X,2) + Math.pow(Y,2));
+ var e2 = (Math.pow(a,2) - Math.pow(b,2)) / Math.pow(a,2);
+ var PHI1 = Math.atan2(Z , (RootXYSqr * (1 - e2)) );
+
+ var PHI = OpenLayers.Projection.OS.Iterate_XYZ_to_Lat(a, e2, PHI1, Z, RootXYSqr);
+
+ var Pi = 3.14159265358979;
+
+ return PHI * (180 / Pi);
+ },
+
+
+ Iterate_XYZ_to_Lat: function(a, e2, PHI1, Z, RootXYSqr) {
+ // Iteratively computes Latitude (PHI).
+ // Input: - _
+ // ellipsoid semi major axis (a) in meters; _
+ // eta squared (e2); _
+ // estimated value for latitude (PHI1) in radians; _
+ // cartesian Z coordinate (Z) in meters; _
+ // RootXYSqr computed from X & Y in meters.
+
+ // this FUNCTION IS CALLED BY THE "XYZ_to_PHI" FUNCTION
+ // this FUNCTION IS ALSO USED ON IT'S OWN IN THE _
+ // "Projection and Transformation Calculations.xls" SPREADSHEET
+
+
+ var V = a / (Math.sqrt(1 - (e2 * Math.pow(Math.sin(PHI1),2))));
+ var PHI2 = Math.atan2((Z + (e2 * V * (Math.sin(PHI1)))) , RootXYSqr);
+
+ while (Math.abs(PHI1 - PHI2) > 0.000000001) {
+ PHI1 = PHI2;
+ V = a / (Math.sqrt(1 - (e2 * Math.pow(Math.sin(PHI1),2))));
+ PHI2 = Math.atan2((Z + (e2 * V * (Math.sin(PHI1)))) , RootXYSqr);
+ }
+
+ return PHI2;
+ },
+
+
+ XYZ_to_Long: function (X, Y) {
+ // Convert XYZ to Longitude (LAM) in Dec Degrees.
+ // Input: - _
+ // X and Y cartesian coords in meters.
+
+ var Pi = 3.14159265358979;
+ return Math.atan2(Y , X) * (180 / Pi);
+ },
+
+ Marc: function (bf0, n, PHI0, PHI) {
+ //Compute meridional arc.
+ //Input: - _
+ // ellipsoid semi major axis multiplied by central meridian scale factor (bf0) in meters; _
+ // n (computed from a, b and f0); _
+ // lat of false origin (PHI0) and initial or final latitude of point (PHI) IN RADIANS.
+
+ //this FUNCTION IS CALLED BY THE - _
+ // "Lat_Long_to_North" and "InitialLat" FUNCTIONS
+ // this FUNCTION IS ALSO USED ON IT'S OWN IN THE "Projection and Transformation Calculations.xls" SPREADSHEET
+
+ return bf0 * (((1 + n + ((5 / 4) * Math.pow(n,2)) + ((5 / 4) * Math.pow(n,3))) * (PHI - PHI0)) - (((3 * n) + (3 * Math.pow(n,2)) + ((21 / 8) * Math.pow(n,3))) * (Math.sin(PHI - PHI0)) * (Math.cos(PHI + PHI0))) + ((((15 / 8
+ ) * Math.pow(n,2)) + ((15 / 8) * Math.pow(n,3))) * (Math.sin(2 * (PHI - PHI0))) * (Math.cos(2 * (PHI + PHI0)))) - (((35 / 24) * Math.pow(n,3)) * (Math.sin(3 * (PHI - PHI0))) * (Math.cos(3 * (PHI + PHI0)))));
+ },
+
+ Lat_Long_to_East: function (PHI, LAM, a, b, e0, f0, PHI0, LAM0) {
+ //Project Latitude and longitude to Transverse Mercator eastings.
+ //Input: - _
+ // Latitude (PHI) and Longitude (LAM) in decimal degrees; _
+ // ellipsoid axis dimensions (a & b) in meters; _
+ // eastings of false origin (e0) in meters; _
+ // central meridian scale factor (f0); _
+ // latitude (PHI0) and longitude (LAM0) of false origin in decimal degrees.
+
+ // Convert angle measures to radians
+ var Pi = 3.14159265358979;
+ var RadPHI = PHI * (Pi / 180);
+ var RadLAM = LAM * (Pi / 180);
+ var RadPHI0 = PHI0 * (Pi / 180);
+ var RadLAM0 = LAM0 * (Pi / 180);
+
+ var af0 = a * f0;
+ var bf0 = b * f0;
+ var e2 = (Math.pow(af0,2) - Math.pow(bf0,2)) / Math.pow(af0,2);
+ var n = (af0 - bf0) / (af0 + bf0);
+ var nu = af0 / (Math.sqrt(1 - (e2 * Math.pow(Math.sin(RadPHI),2) )));
+ var rho = (nu * (1 - e2)) / (1 - (e2 * Math.pow(Math.sin(RadPHI),2) ));
+ var eta2 = (nu / rho) - 1;
+ var p = RadLAM - RadLAM0;
+
+ var IV = nu * (Math.cos(RadPHI));
+ var V = (nu / 6) * ( Math.pow(Math.cos(RadPHI),3)) * ((nu / rho) - (Math.pow(Math.tan(RadPHI),2)));
+ var VI = (nu / 120) * (Math.pow(Math.cos(RadPHI),5)) * (5 - (18 * (Math.pow(Math.tan(RadPHI),2))) + (Math.pow(Math.tan(RadPHI),4)) + (14 * eta2) - (58 * (Math.pow(Math.tan(RadPHI),2)) * eta2));
+
+ return e0 + (p * IV) + (Math.pow(p,3) * V) + (Math.pow(p,5) * VI);
+ },
+
+ Lat_Long_to_North: function (PHI, LAM, a, b, e0, n0, f0, PHI0, LAM0) {
+ // Project Latitude and longitude to Transverse Mercator northings
+ // Input: - _
+ // Latitude (PHI) and Longitude (LAM) in decimal degrees; _
+ // ellipsoid axis dimensions (a & b) in meters; _
+ // eastings (e0) and northings (n0) of false origin in meters; _
+ // central meridian scale factor (f0); _
+ // latitude (PHI0) and longitude (LAM0) of false origin in decimal degrees.
+
+ // REQUIRES THE "Marc" FUNCTION
+
+ // Convert angle measures to radians
+ var Pi = 3.14159265358979;
+ var RadPHI = PHI * (Pi / 180);
+ var RadLAM = LAM * (Pi / 180);
+ var RadPHI0 = PHI0 * (Pi / 180);
+ var RadLAM0 = LAM0 * (Pi / 180);
+
+ var af0 = a * f0;
+ var bf0 = b * f0;
+ var e2 = (Math.pow(af0,2) - Math.pow(bf0,2)) / Math.pow(af0,2);
+ var n = (af0 - bf0) / (af0 + bf0);
+ var nu = af0 / (Math.sqrt(1 - (e2 * Math.pow(Math.sin(RadPHI),2))));
+ var rho = (nu * (1 - e2)) / (1 - (e2 * Math.pow(Math.sin(RadPHI),2)));
+ var eta2 = (nu / rho) - 1;
+ var p = RadLAM - RadLAM0;
+ var M = OpenLayers.Projection.OS.Marc(bf0, n, RadPHI0, RadPHI);
+
+ var I = M + n0;
+ var II = (nu / 2) * (Math.sin(RadPHI)) * (Math.cos(RadPHI));
+ var III = ((nu / 24) * (Math.sin(RadPHI)) * (Math.pow(Math.cos(RadPHI),3))) * (5 - (Math.pow(Math.tan(RadPHI),2)) + (9 * eta2));
+ var IIIA = ((nu / 720) * (Math.sin(RadPHI)) * (Math.pow(Math.cos(RadPHI),5))) * (61 - (58 * (Math.pow(Math.tan(RadPHI),2))) + (Math.pow(Math.tan(RadPHI),4)));
+
+ return I + (Math.pow(p,2) * II) + (Math.pow(p,4) * III) + (Math.pow(p,6) * IIIA);
+ }
+
+};
+
+/**
+ * Note: Two transforms declared
+ * Transforms from EPSG:4326 to EPSG:27700 and from EPSG:27700 to EPSG:4326
+ * are set by this class.
+ */
+OpenLayers.Projection.addTransform("EPSG:4326", "EPSG:27700",
+ OpenLayers.Projection.OS.projectForwardBritish);
+OpenLayers.Projection.addTransform("EPSG:27700", "EPSG:4326",
+ OpenLayers.Projection.OS.projectInverseBritish);
+OpenLayers.Projection.addTransform("EPSG:900913", "EPSG:27700",
+ OpenLayers.Projection.OS.goog2osgb);
+OpenLayers.Projection.addTransform("EPSG:27700", "EPSG:900913",
+ OpenLayers.Projection.OS.osgb2goog);
diff --git a/phonegap/www/js/OpenLayers.fixmystreet.js b/phonegap/www/js/OpenLayers.fixmystreet.js
new file mode 100644
index 000000000..a3466a1a9
--- /dev/null
+++ b/phonegap/www/js/OpenLayers.fixmystreet.js
@@ -0,0 +1,1269 @@
+/*
+
+ OpenLayers.js -- OpenLayers Map Viewer Library
+
+ Copyright 2005-2011 OpenLayers Contributors, released under the FreeBSD
+ 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 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
+ */
+
+/**
+ * OpenLayers.Util.pagePosition is based on Yahoo's getXY method, which is
+ * Copyright (c) 2006, Yahoo! Inc. All rights reserved.
+ * Code licensed under the BSD License:
+ * http://developer.yahoo.com/yui/license.html
+ */
+var OpenLayers={VERSION_NUMBER:"Release 2.11",singleFile:true,_getScriptLocation:function(){ return "jslib/OpenLayers-2.10/";
+}};OpenLayers.Class=function(){var len=arguments.length;var P=arguments[0];var F=arguments[len-1];var C=typeof F.initialize=="function"?F.initialize:function(){P.prototype.initialize.apply(this,arguments);};if(len>1){var newArgs=[C,P].concat(Array.prototype.slice.call(arguments).slice(1,len-1),F);OpenLayers.inherit.apply(null,newArgs);}else{C.prototype=F;}
+return C;};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(P){var C=function(){P.call(this);};var newArgs=[C].concat(Array.prototype.slice.call(arguments));OpenLayers.inherit.apply(null,newArgs);return C.prototype;};OpenLayers.inherit=function(C,P){var F=function(){};F.prototype=P.prototype;C.prototype=new F;var i,l,o;for(i=2,l=arguments.length;i<l;i++){o=arguments[i];if(typeof o==="function"){o=o.prototype;}
+OpenLayers.Util.extend(C.prototype,o);}};OpenLayers.Util=OpenLayers.Util||{};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.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.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.BROWSER_NAME=="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&&dictionary[key];if(!message){message=key;}
+if(context){message=OpenLayers.String.format(message,context);}
+return message;}};OpenLayers.i18n=OpenLayers.Lang.translate;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;},Void:function(){}};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.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[this.left,this.bottom,this.right,this.top].join(",");},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,reverseAxisOrder){var bounds=str.split(",");return OpenLayers.Bounds.fromArray(bounds,reverseAxisOrder);};OpenLayers.Bounds.fromArray=function(bbox,reverseAxisOrder){return reverseAxisOrder===true?new OpenLayers.Bounds(parseFloat(bbox[1]),parseFloat(bbox[0]),parseFloat(bbox[3]),parseFloat(bbox[2])):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.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(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"element.style.display = 'none';"}));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(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{newMethod:"element.style.display = '';"}));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.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.LonLat.fromArray=function(arr){var gotArr=OpenLayers.Util.isArray(arr),lon=gotArr&&arr[0],lat=gotArr&&arr[1];return new OpenLayers.LonLat(lon,lat);};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;},distanceTo:function(px){return Math.sqrt(Math.pow(this.x-px.x,2)+
+Math.pow(this.y-px.y,2));},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.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.Util=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);};OpenLayers.Util.isArray=function(a){return(Object.prototype.toString.call(a)==='[object Array]');};if(typeof window.$==="undefined"){window.$=OpenLayers.Util.getElement;}
+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&&OpenLayers.Util.isArray(urls)&&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.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;}
+if(typeof number!=="number"){number=parseFloat(number);}
+return precision===0?number:parseFloat(number.toPrecision(precision));};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===null||url===undefined)?window.location.href:url;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=keyValue[0];try{key=decodeURIComponent(key);}catch(err){key=unescape(key);}
+var value=(keyValue[1]||'').replace(/\+/g," ");try{value=decodeURIComponent(value);}catch(err){value=unescape(value);}
+value=value.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 pos=[0,0];var viewportElement=OpenLayers.Util.getViewportElement();if(!forElement||forElement==window||forElement==viewportElement){return pos;}
+var BUGGY_GECKO_BOX_OBJECT=OpenLayers.IS_GECKO&&document.getBoxObjectFor&&OpenLayers.Element.getStyle(forElement,'position')=='absolute'&&(forElement.style.top==''||forElement.style.left=='');var parent=null;var box;if(forElement.getBoundingClientRect){box=forElement.getBoundingClientRect();var scrollTop=viewportElement.scrollTop;var scrollLeft=viewportElement.scrollLeft;pos[0]=box.left+scrollLeft;pos[1]=box.top+scrollTop;}else if(document.getBoxObjectFor&&!BUGGY_GECKO_BOX_OBJECT){box=document.getBoxObjectFor(forElement);var vpBox=document.getBoxObjectFor(viewportElement);pos[0]=box.screenX-vpBox.screenX;pos[1]=box.screenY-vpBox.screenY;}else{pos[0]=forElement.offsetLeft;pos[1]=forElement.offsetTop;parent=forElement.offsetParent;if(parent!=forElement){while(parent){pos[0]+=parent.offsetLeft;pos[1]+=parent.offsetTop;parent=parent.offsetParent;}}
+var browser=OpenLayers.BROWSER_NAME;if(browser=="opera"||(browser=="safari"&&OpenLayers.Element.getStyle(forElement,'position')=='absolute')){pos[1]-=document.body.offsetTop;}
+parent=forElement.offsetParent;while(parent&&parent!=document.body){pos[0]-=parent.scrollLeft;if(browser!="opera"||parent.tagName!='TR'){pos[1]-=parent.scrollTop;}
+parent=parent.offsetParent;}}
+return pos;};OpenLayers.Util.getViewportElement=function(){var viewportElement=arguments.callee.viewportElement;if(viewportElement==undefined){viewportElement=(OpenLayers.BROWSER_NAME=="msie"&&document.compatMode!='CSS1Compat')?document.body:document.documentElement;arguments.callee.viewportElement=viewportElement;}
+return viewportElement;};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.IS_GECKO=(function(){var ua=navigator.userAgent.toLowerCase();return ua.indexOf("webkit")==-1&&ua.indexOf("gecko")!=-1;})();OpenLayers.BROWSER_NAME=(function(){var name="";var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("opera")!=-1){name="opera";}else if(ua.indexOf("msie")!=-1){name="msie";}else if(ua.indexOf("safari")!=-1){name="safari";}else if(ua.indexOf("mozilla")!=-1){if(ua.indexOf("firefox")!=-1){name="firefox";}else{name="mozilla";}}
+return name;})();OpenLayers.Util.getBrowserName=function(){return OpenLayers.BROWSER_NAME;};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';}
+coordinate=(coordinate+540)%360-180;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(coordinateseconds>=60){coordinateseconds-=60;coordinateminutes+=1;if(coordinateminutes>=60){coordinateminutes-=60;coordinatedegrees+=1;}}
+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.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.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:null,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){if(!this.popup){var anchor=(this.marker)?this.marker.icon:null;var popupClass=this.popupClass?this.popupClass:OpenLayers.Popup.AnchoredBubble;this.popup=new popupClass(this.id+"_popup",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.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",modified:null,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;this.modified=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 undefined;}
+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.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;wkt=wkt.replace(/[\n\r]/g," ");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;pieces.push(this.extractGeometry(geometry));}
+if(isCollection){pieces.push(')');}
+return pieces.join('');},extractGeometry:function(geometry){var 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);}
+var wktType=type=='collection'?'GEOMETRYCOLLECTION':type.toUpperCase();var data=wktType+'('+this.extract[type].apply(this,[geometry])+')';return data;},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(',');},'collection':function(collection){var array=[];for(var i=0,len=collection.components.length;i<len;++i){array.push(this.extractGeometry.apply(this,[collection.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(',');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.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(OpenLayers.Util.isArray(result)){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.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;var bounds=new OpenLayers.Bounds();var components=this.components;if(components){for(var i=0,len=components.length;i<len;i++){bounds.extend(components[i].getBounds());}}
+if(bounds.left!=null&&bounds.bottom!=null&&bounds.right!=null&&bounds.top!=null){this.setBounds(bounds);}},addComponents:function(components){if(!(OpenLayers.Util.isArray(components))){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){var removed=false;if(!(OpenLayers.Util.isArray(components))){components=[components];}
+for(var i=components.length-1;i>=0;--i){removed=this.removeComponent(components[i])||removed;}
+return removed;},removeComponent:function(component){OpenLayers.Util.removeItem(this.components,component);this.clearBounds();return true;},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(!(OpenLayers.Util.isArray(geometry.components))||(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.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.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.Geometry.LineString=OpenLayers.Class(OpenLayers.Geometry.Curve,{initialize:function(points){OpenLayers.Geometry.Curve.prototype.initialize.apply(this,arguments);},removeComponent:function(point){var removed=this.components&&(this.components.length>2);if(removed){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);}
+return removed;},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;},simplify:function(tolerance){if(this&&this!==null){var points=this.getVertices();if(points.length<3){return this;}
+var compareNumbers=function(a,b){return(a-b);};var douglasPeuckerReduction=function(points,firstPoint,lastPoint,tolerance){var maxDistance=0;var indexFarthest=0;for(var index=firstPoint,distance;index<lastPoint;index++){distance=perpendicularDistance(points[firstPoint],points[lastPoint],points[index]);if(distance>maxDistance){maxDistance=distance;indexFarthest=index;}}
+if(maxDistance>tolerance&&indexFarthest!=firstPoint){pointIndexsToKeep.push(indexFarthest);douglasPeuckerReduction(points,firstPoint,indexFarthest,tolerance);douglasPeuckerReduction(points,indexFarthest,lastPoint,tolerance);}};var perpendicularDistance=function(point1,point2,point){var area=Math.abs(0.5*(point1.x*point2.y+point2.x*point.y+point.x*point1.y-point2.x*point1.y-point.x*point2.y-point1.x*point.y));var bottom=Math.sqrt(Math.pow(point1.x-point2.x,2)+Math.pow(point1.y-point2.y,2));var height=area/bottom*2;return height;};var firstPoint=0;var lastPoint=points.length-1;var pointIndexsToKeep=[];pointIndexsToKeep.push(firstPoint);pointIndexsToKeep.push(lastPoint);while(points[firstPoint].equals(points[lastPoint])){lastPoint--;pointIndexsToKeep.push(lastPoint);}
+douglasPeuckerReduction(points,firstPoint,lastPoint,tolerance);var returnPoints=[];pointIndexsToKeep.sort(compareNumbers);for(var index=0;index<pointIndexsToKeep.length;index++){returnPoints.push(points[pointIndexsToKeep[index]]);}
+return new OpenLayers.Geometry.LineString(returnPoints);}
+else{return this;}},CLASS_NAME:"OpenLayers.Geometry.LineString"});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){var removed=this.components&&(this.components.length>3);if(removed){this.components.pop();OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint]);}
+return removed;},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.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);OpenLayers.Util.extend(this,options);},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){var xOffset=isNaN(style.labelXOffset)?0:style.labelXOffset;var 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(!(OpenLayers.Util.isArray(features))){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.Renderer.Canvas=OpenLayers.Class(OpenLayers.Renderer,{hitDetection:true,hitOverflow:0,canvas:null,features:null,pendingRedraw:false,initialize:function(containerID,options){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={};if(this.hitDetection){this.hitCanvas=document.createElement("canvas");this.hitContext=this.hitCanvas.getContext("2d");}},eraseGeometry:function(geometry,featureId){this.eraseFeatures(this.features[featureId][0]);},supported:function(){var canvas=document.createElement("canvas");return!!canvas.getContext;},setSize:function(size){this.size=size.clone();var root=this.root;root.style.width=size.w+"px";root.style.height=size.h+"px";root.width=size.w;root.height=size.h;this.resolution=null;if(this.hitDetection){var hitCanvas=this.hitCanvas;hitCanvas.style.width=size.w+"px";hitCanvas.style.height=size.h+"px";hitCanvas.width=size.w;hitCanvas.height=size.h;}},drawFeature:function(feature,style){var rendered;if(feature.geometry){style=this.applyDefaultSymbolizer(style||feature.style);var bounds=feature.geometry.getBounds();rendered=(style.display!=="none")&&!!bounds&&bounds.intersectsBounds(this.extent);if(rendered){this.features[feature.id]=[feature,style];}
+else{delete(this.features[feature.id]);}
+this.pendingRedraw=true;}
+if(this.pendingRedraw&&!this.locked){this.redraw();this.pendingRedraw=false;}
+return rendered;},drawGeometry:function(geometry,style,featureId){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,featureId);}
+return;}
+switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":this.drawPoint(geometry,style,featureId);break;case"OpenLayers.Geometry.LineString":this.drawLineString(geometry,style,featureId);break;case"OpenLayers.Geometry.LinearRing":this.drawLinearRing(geometry,style,featureId);break;case"OpenLayers.Geometry.Polygon":this.drawPolygon(geometry,style,featureId);break;default:break;}},drawExternalGraphic:function(geometry,style,featureId){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 opacity=style.graphicOpacity||style.fillOpacity;var onLoad=function(){if(!this.features[featureId]){return;}
+var pt=this.getLocalXY(geometry);var p0=pt[0];var p1=pt[1];if(!isNaN(p0)&&!isNaN(p1)){var x=(p0+xOffset)|0;var y=(p1+yOffset)|0;var canvas=this.canvas;canvas.globalAlpha=opacity;var factor=OpenLayers.Renderer.Canvas.drawImageScaleFactor||(OpenLayers.Renderer.Canvas.drawImageScaleFactor=/android 2.1/.test(navigator.userAgent.toLowerCase())?320/window.screen.width:1);canvas.drawImage(img,x*factor,y*factor,width*factor,height*factor);if(this.hitDetection){this.setHitContextStyle("fill",featureId);this.hitContext.fillRect(x,y,width,height);}}};img.onload=OpenLayers.Function.bind(onLoad,this);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;}},featureIdToHex:function(featureId){var id=Number(featureId.split("_").pop())+1;if(id>=16777216){this.hitOverflow=id-16777215;id=id%16777216+1;}
+var hex="000000"+id.toString(16);var len=hex.length;hex="#"+hex.substring(len-6,len);return hex;},setHitContextStyle:function(type,featureId,symbolizer){var hex=this.featureIdToHex(featureId);if(type=="fill"){this.hitContext.globalAlpha=1.0;this.hitContext.fillStyle=hex;}else if(type=="stroke"){this.hitContext.globalAlpha=1.0;this.hitContext.strokeStyle=hex;this.hitContext.lineWidth=symbolizer.strokeWidth+2;}else{this.hitContext.globalAlpha=0;this.hitContext.lineWidth=1;}},drawPoint:function(geometry,style,featureId){if(style.graphic!==false){if(style.externalGraphic){this.drawExternalGraphic(geometry,style,featureId);}else{var pt=this.getLocalXY(geometry);var p0=pt[0];var p1=pt[1];if(!isNaN(p0)&&!isNaN(p1)){var twoPi=Math.PI*2;var radius=style.pointRadius;if(style.fill!==false){this.setCanvasStyle("fill",style);this.canvas.beginPath();this.canvas.arc(p0,p1,radius,0,twoPi,true);this.canvas.fill();if(this.hitDetection){this.setHitContextStyle("fill",featureId,style);this.hitContext.beginPath();this.hitContext.arc(p0,p1,radius,0,twoPi,true);this.hitContext.fill();}}
+if(style.stroke!==false){this.setCanvasStyle("stroke",style);this.canvas.beginPath();this.canvas.arc(p0,p1,radius,0,twoPi,true);this.canvas.stroke();if(this.hitDetection){this.setHitContextStyle("stroke",featureId,style);this.hitContext.beginPath();this.hitContext.arc(p0,p1,radius,0,twoPi,true);this.hitContext.stroke();}
+this.setCanvasStyle("reset");}}}}},drawLineString:function(geometry,style,featureId){style=OpenLayers.Util.applyDefaults({fill:false},style);this.drawLinearRing(geometry,style,featureId);},drawLinearRing:function(geometry,style,featureId){if(style.fill!==false){this.setCanvasStyle("fill",style);this.renderPath(this.canvas,geometry,style,featureId,"fill");if(this.hitDetection){this.setHitContextStyle("fill",featureId,style);this.renderPath(this.hitContext,geometry,style,featureId,"fill");}}
+if(style.stroke!==false){this.setCanvasStyle("stroke",style);this.renderPath(this.canvas,geometry,style,featureId,"stroke");if(this.hitDetection){this.setHitContextStyle("stroke",featureId,style);this.renderPath(this.hitContext,geometry,style,featureId,"stroke");}}
+this.setCanvasStyle("reset");},renderPath:function(context,geometry,style,featureId,type){var components=geometry.components;var len=components.length;context.beginPath();var start=this.getLocalXY(components[0]);var x=start[0];var y=start[1];if(!isNaN(x)&&!isNaN(y)){context.moveTo(start[0],start[1]);for(var i=1;i<len;++i){var pt=this.getLocalXY(components[i]);context.lineTo(pt[0],pt[1]);}
+if(type==="fill"){context.fill();}else{context.stroke();}}},drawPolygon:function(geometry,style,featureId){var components=geometry.components;var len=components.length;this.drawLinearRing(components[0],style,featureId);for(var i=1;i<len;++i){this.canvas.globalCompositeOperation="destination-out";if(this.hitDetection){this.hitContext.globalCompositeOperation="destination-out";}
+this.drawLinearRing(components[i],OpenLayers.Util.applyDefaults({stroke:false,fillOpacity:1.0},style),featureId);this.canvas.globalCompositeOperation="source-over";if(this.hitDetection){this.hitContext.globalCompositeOperation="source-over";}
+this.drawLinearRing(components[i],OpenLayers.Util.applyDefaults({fill:false},style),featureId);}},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.fontStyle?style.fontStyle:"normal","normal",style.fontWeight?style.fontWeight:"normal",style.fontSize?style.fontSize:"1em",style.fontFamily?style.fontFamily:"sans-serif"].join(" ");var labelRows=style.label.split('\n');var numRows=labelRows.length;if(this.canvas.fillText){this.canvas.font=fontStyle;this.canvas.textAlign=OpenLayers.Renderer.Canvas.LABEL_ALIGN[style.labelAlign[0]]||"center";this.canvas.textBaseline=OpenLayers.Renderer.Canvas.LABEL_ALIGN[style.labelAlign[1]]||"middle";var vfactor=OpenLayers.Renderer.Canvas.LABEL_FACTOR[style.labelAlign[1]];if(vfactor==null){vfactor=-.5;}
+var lineHeight=this.canvas.measureText('Mg').height||this.canvas.measureText('xx').width;pt[1]+=lineHeight*vfactor*(numRows-1);for(var i=0;i<numRows;i++){this.canvas.fillText(labelRows[i],pt[0],pt[1]+(lineHeight*i));}}else if(this.canvas.mozDrawText){this.canvas.mozTextStyle=fontStyle;var hfactor=OpenLayers.Renderer.Canvas.LABEL_FACTOR[style.labelAlign[0]];if(hfactor==null){hfactor=-.5;}
+var vfactor=OpenLayers.Renderer.Canvas.LABEL_FACTOR[style.labelAlign[1]];if(vfactor==null){vfactor=-.5;}
+var lineHeight=this.canvas.mozMeasureText('xx');pt[1]+=lineHeight*(1+(vfactor*numRows));for(var i=0;i<numRows;i++){var x=pt[0]+(hfactor*this.canvas.mozMeasureText(labelRows[i]));var y=pt[1]+(i*lineHeight);this.canvas.translate(x,y);this.canvas.mozDrawText(labelRows[i]);this.canvas.translate(-x,-y);}}
+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(){var height=this.root.height;var width=this.root.width;this.canvas.clearRect(0,0,width,height);this.features={};if(this.hitDetection){this.hitContext.clearRect(0,0,width,height);}},getFeatureIdFromEvent:function(evt){var feature=null;if(this.hitDetection){if(!this.map.dragging){var xy=evt.xy;var x=xy.x|0;var y=xy.y|0;var data=this.hitContext.getImageData(x,y,1,1).data;if(data[3]===255){var id=data[2]+(256*(data[1]+(256*data[0])));if(id){feature=this.features["OpenLayers.Feature.Vector_"+(id-1+this.hitOverflow)][0];}}}}
+return feature;},eraseFeatures:function(features){if(!(OpenLayers.Util.isArray(features))){features=[features];}
+for(var i=0;i<features.length;++i){delete this.features[features[i].id];}
+this.redraw();},redraw:function(){if(!this.locked){var height=this.root.height;var width=this.root.width;this.canvas.clearRect(0,0,width,height);if(this.hitDetection){this.hitContext.clearRect(0,0,width,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];this.drawGeometry(feature.geometry,style,feature.id);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","t":"top","b":"bottom"};OpenLayers.Renderer.Canvas.LABEL_FACTOR={"l":0,"r":-1,"t":0,"b":-1};OpenLayers.Renderer.Canvas.drawImageScaleFactor=null;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;},isSingleTouch:function(event){return event.touches&&event.touches.length==1;},isMultiTouch:function(event){return event.touches&&event.touches.length>1;},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","touchstart","touchmove","touchend"],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 undefined;}
+if(evt==null){evt={};}
+evt.object=this.object;evt.element=this.element;if(!evt.type){evt.type=type;}
+listeners=listeners.slice();var 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){var type=evt.type,listeners=this.listeners[type];if(!listeners||listeners.length==0){return;}
+var touches=evt.touches;if(touches&&touches[0]){var x=0;var y=0;var num=touches.length;var touch;for(var i=0;i<num;++i){touch=touches[i];x+=touch.clientX;y+=touch.clientY;}
+evt.clientX=x/num;evt.clientY=y/num;}
+if(this.includeXY){evt.xy=this.getMousePosition(evt);}
+this.triggerEvent(type,evt);},clearMouseCache:function(){this.element.scrolls=null;this.element.lefttop=null;var body=document.body;if(body&&!((body.scrollTop!=0||body.scrollLeft!=0)&&navigator.userAgent.match(/iPhone/i))){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){var viewportElement=OpenLayers.Util.getViewportElement();this.element.scrolls=[viewportElement.scrollLeft,viewportElement.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);}
+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.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.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.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.Symbolizer.Raster=OpenLayers.Class(OpenLayers.Symbolizer,{initialize:function(config){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Symbolizer.Raster"});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,options){this.layer=layer;this.position=position.clone();this.bounds=bounds.clone();this.url=url;if(size){this.size=size.clone();}
+this.id=OpenLayers.Util.createUniqueID("Tile_");this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES);OpenLayers.Util.extend(this,options);},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.Tile.Image=OpenLayers.Class(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,layerAlphaHack:null,isBackBuffer:false,isFirstDraw:true,backBufferTile:null,maxGetUrlLength:null,initialize:function(layer,position,bounds,url,size,options){OpenLayers.Tile.prototype.initialize.apply(this,arguments);if(this.maxGetUrlLength!=null){OpenLayers.Util.extend(this,OpenLayers.Tile.Image.IFrame);}
+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){this.removeImgDiv();}
+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.layer.async){this.initImgDiv();this.layer.getURLasync(this.bounds,this,"url",this.positionImage);}else{this.url=this.layer.getURL(this.bounds);this.initImgDiv();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(){if(this.imgDiv==null){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);}
+if(OpenLayers.Util.isArray(this.layer.url)){this.imgDiv.urls=this.layer.url.slice();}
+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));}
+this.imgDiv.viewRequestID=this.layer.map.viewRequestID;},removeImgDiv:function(){OpenLayers.Event.stopObservingElement(this.imgDiv);if(this.imgDiv.parentNode==this.frame){this.frame.removeChild(this.imgDiv);this.imgDiv.map=null;}
+this.imgDiv.urls=null;var child=this.imgDiv.firstChild;if(child){OpenLayers.Event.stopObservingElement(child);this.imgDiv.removeChild(child);delete child;}else{this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif";}},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!=1){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();}}},show:function(){this.frame.style.display='';if(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1){if(OpenLayers.IS_GECKO===true){this.frame.scrollLeft=this.frame.scrollLeft;}}},hide:function(){this.frame.style.display='none';},CLASS_NAME:"OpenLayers.Tile.Image"});OpenLayers.Tile.Image.useBlankTile=(OpenLayers.BROWSER_NAME=="safari"||OpenLayers.BROWSER_NAME=="opera");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.clear();},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;var removeBackground=false;if(style.display!="none"){if(style.backgroundGraphic){this.redrawBackgroundNode(geometry.id,geometry,style,featureId);}else{removeBackground=true;}
+rendered=this.redrawNode(geometry.id,geometry,style,featureId);}
+if(rendered==false){var node=document.getElementById(geometry.id);if(node){if(node._style.backgroundGraphic){removeBackground=true;}
+node.parentNode.removeChild(node);}}
+if(removeBackground){var node=document.getElementById(geometry.id+this.BACKGROUND_ID_SUFFIX);if(node){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.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;}
+this.div=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.Control.ArgParser=OpenLayers.Class(OpenLayers.Control,{center:null,zoom:null,layers:null,displayProjection:null,getParameters:function(url){url=url||window.location.href;var parameters=OpenLayers.Util.getParameters(url);var index=url.indexOf('#');if(index>0){url='?'+url.substring(index+1,url.length);OpenLayers.Util.extend(parameters,OpenLayers.Util.getParameters(url));}
+return parameters;},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=this.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.Permalink=OpenLayers.Class(OpenLayers.Control,{argParserClass:OpenLayers.Control.ArgParser,element:null,anchor:false,base:'',displayProjection:null,initialize:function(element,base,options){if(element!==null&&typeof element=='object'&&!OpenLayers.Util.isElement(element)){options=element;this.base=document.location.href;OpenLayers.Control.prototype.initialize.apply(this,[options]);if(this.element!=null){this.element=OpenLayers.Util.getElement(this.element);}}
+else{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.anchor){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 separator=this.anchor?'#':'?';var href=this.base;if(href.indexOf(separator)!=-1){href=href.substring(0,href.indexOf(separator));}
+href+=separator+OpenLayers.Util.getParameterString(this.createParams());if(this.anchor&&!this.element){window.location.href=href;}
+else{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.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.Strategy.Fixed=OpenLayers.Class(OpenLayers.Strategy,{preload:false,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){var layer=this.layer;layer.events.triggerEvent("loadstart");layer.protocol.read(OpenLayers.Util.applyDefaults({callback:OpenLayers.Function.bind(this.merge,this,layer.map.getProjectionObject()),filter:layer.filter},options));layer.events.un({"visibilitychanged":this.load,scope:this});},merge:function(mapProjection,resp){var layer=this.layer;layer.destroyFeatures();var features=resp.features;if(features&&features.length>0){if(!mapProjection.equals(layer.projection)){var geom;for(var i=0,len=features.length;i<len;++i){geom=features[i].geometry;if(geom){geom.transform(layer.projection,mapProjection);}}}
+layer.addFeatures(features);}
+layer.events.triggerEvent("loadend");},CLASS_NAME:"OpenLayers.Strategy.Fixed"});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 match=str.match(/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))?$/);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],10)||0;var offset=-1000*(60*(hoursOffset*60)+minutesOffset*60);date=new Date(date.getTime()+offset);}}}else{date=new Date("invalid");}
+return date;}};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;},getXMLDoc:function(){if(!OpenLayers.Format.XML.document&&!this.xmldom){if(document.implementation&&document.implementation.createDocument){OpenLayers.Format.XML.document=document.implementation.createDocument("","",null);}else if(!this.xmldom&&window.ActiveXObject){this.xmldom=new ActiveXObject("Microsoft.XMLDOM");}}
+return OpenLayers.Format.XML.document||this.xmldom;},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.Format.XML.document=null;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.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},URL_SPLIT_REGEX:/([^:]*:)\/\/([^:]*:?[^@]*@)?([^:\/\?]*):?([^\/\?]*)/,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=OpenLayers.Util.urlAppend(config.url,OpenLayers.Util.getParameterString(config.params||{}));var sameOrigin=!(url.indexOf("http")==0);var urlParts=!sameOrigin&&url.match(this.URL_SPLIT_REGEX);if(urlParts){var location=window.location;sameOrigin=urlParts[1]==location.protocol&&urlParts[3]==location.hostname;var uPort=urlParts[4],lPort=location.port;if(uPort!=80&&uPort!=""||lPort!="80"&&lPort!=""){sameOrigin=sameOrigin&&uPort==lPort;}}
+if(!sameOrigin){if(config.proxy){if(typeof config.proxy=="function"){url=config.proxy(url);}else{url=config.proxy+encodeURIComponent(url);}}else{OpenLayers.Console.warn(OpenLayers.i18n("proxyNeeded"),{url: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.readyState!==0){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;}
+if(OpenLayers.Util.createUrlObject(config.url).protocol=="file:"&&request.responseText){request.status=200;}
+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);}};(function(){var oXMLHttpRequest=window.XMLHttpRequest;var bGecko=!!window.controllers,bIE=window.document.all&&!window.opera,bIE7=bIE&&window.navigator.userAgent.match(/MSIE 7.0/);function fXMLHttpRequest(){this._object=oXMLHttpRequest&&!bIE7?new oXMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");this._listeners=[];};function cXMLHttpRequest(){return new fXMLHttpRequest;};cXMLHttpRequest.prototype=fXMLHttpRequest.prototype;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.priority="NORMAL";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);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){delete oRequest._data;fCleanTransport(oRequest);if(bIE&&bAsync)
+window.detachEvent("onunload",fOnUnload);}
+if(nState!=oRequest.readyState)
+fReadyStateChange(oRequest);nState=oRequest.readyState;}};function fXMLHttpRequest_send(oRequest){oRequest._object.send(oRequest._data);if(bGecko&&!oRequest._async){oRequest.readyState=cXMLHttpRequest.OPENED;fSynchronizeValues(oRequest);while(oRequest.readyState<cXMLHttpRequest.DONE){oRequest.readyState++;fReadyStateChange(oRequest);if(oRequest._aborted)
+return;}}};cXMLHttpRequest.prototype.send=function(vData){if(cXMLHttpRequest.onsend)
+cXMLHttpRequest.onsend.apply(this,arguments);if(!arguments.length)
+vData=null;if(vData&&vData.nodeType){vData=window.XMLSerializer?new window.XMLSerializer().serializeToString(vData):vData.xml;if(!oRequest._headers["Content-Type"])
+oRequest._object.setRequestHeader("Content-Type","application/xml");}
+this._data=vData;fXMLHttpRequest_send(this);};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);this.readyState=cXMLHttpRequest.UNSENT;delete this._data;};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.Projection=OpenLayers.Class({proj:null,projCode:null,titleRegEx:/\+title=[^\+]*/,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){var p=projection,equals=false;if(p){if(window.Proj4js&&this.proj.defData&&p.proj.defData){equals=this.proj.defData.replace(this.titleRegEx,"")==p.proj.defData.replace(this.titleRegEx,"");}else if(p.getCode){var source=this.getCode(),target=p.getCode();equals=source==target||!!OpenLayers.Projection.transforms[source]&&OpenLayers.Projection.transforms[source][target]===OpenLayers.Projection.nullTransform;}}
+return equals;},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.Projection.nullTransform=function(point){return point;};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,styleTypeNode,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(!(OpenLayers.Util.isArray(features))){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){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]=this.buildCoordinates(point);}
+path=parts.join(" ");}else{path=this.buildCoordinates(geometry);}
+var txtNode=this.createTextNode(path);coordinatesNode.appendChild(txtNode);return coordinatesNode;},buildCoordinates:function(point){if(this.internalProjection&&this.externalProjection){point=point.clone();point.transform(this.internalProjection,this.externalProjection);}
+return point.x+","+point.y;},CLASS_NAME:"OpenLayers.Format.KML"});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";}
+if(style.label&&typeof style.label!=="string"){style.label=String(style.label);}
+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.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.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.Strategy.BBOX=OpenLayers.Class(OpenLayers.Strategy,{bounds:null,resolution:null,ratio:2,resFactor:null,response:null,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});if(this.layer.visibility===true&&this.layer.inRange===true){this.update();}else{this.layer.events.on({"visibilitychanged":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,"refresh":this.update,"visibilitychanged":this.update,scope:this});}
+return deactivated;},update:function(options){var mapBounds=this.getMapBounds();if(mapBounds!==null&&((options&&options.force)||this.invalidBounds(mapBounds))){this.calculateBounds(mapBounds);this.resolution=this.layer.map.getResolution();this.triggerRead(options);}},getMapBounds:function(){if(this.layer.map===null){return null;}
+var bounds=this.layer.map.getExtent();if(bounds&&!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(options){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(OpenLayers.Util.applyDefaults({filter:this.createFilter(),callback:this.merge,scope:this},options));},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.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},'touchstart':{'in':'click','out':'clickout'}},feature:null,lastFeature:null,down:null,up:null,touch:false,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;},touchstart:function(evt){if(!this.touch){this.touch=true;this.map.events.un({mousedown:this.mousedown,mouseup:this.mouseup,mousemove:this.mousemove,click:this.click,dblclick:this.dblclick,scope:this});}
+return OpenLayers.Event.isMultiTouch(evt)?true:this.mousedown(evt);},touchmove:function(evt){OpenLayers.Event.stop(evt);},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"||type=="touchstart");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){if(type==="touchstart"){OpenLayers.Event.stop(evt);}
+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.touch=false;this.map.events.un({"removelayer":this.handleMapEvents,"changelayer":this.handleMapEvents,scope:this});deactivated=true;}
+return deactivated;},handleMapEvents:function(evt){if(evt.type=="removelayer"||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.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.Map=OpenLayers.Class({Z_INDEX_BASE:{BaseLayer:100,Overlay:325,Feature:725,Popup:750,Control:1000},EVENT_TYPES:["preaddlayer","addlayer","preremovelayer","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,minPx:null,maxPx: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);var eventsDiv=document.createElement("div");eventsDiv.id=this.id+"_events";eventsDiv.style.position="absolute";eventsDiv.style.width="100%";eventsDiv.style.height="100%";eventsDiv.style.zIndex=this.Z_INDEX_BASE.Control-1;this.viewPortDiv.appendChild(eventsDiv);this.eventsDiv=eventsDiv;this.events=new OpenLayers.Events(this,this.eventsDiv,this.EVENT_TYPES,this.fallThrough,{includeXY:true});id=this.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(id);this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE['Popup']-1;this.eventsDiv.appendChild(this.layerContainerDiv);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){delete this.center;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.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){var updatePxExtent=this.minPx&&options.restrictedExtent!=this.restrictedExtent;OpenLayers.Util.extend(this,options);updatePxExtent&&this.moveTo(this.getCachedCenter(),this.zoom,{forceZoomChange:true});},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.events.triggerEvent("preaddlayer",{layer:layer})===false){return;}
+if(this.allOverlays){layer.isBaseLayer=false;}
+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.events.triggerEvent("added",{map:this,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(this.events.triggerEvent("preremovelayer",{layer:layer})===false){return;}
+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});layer.events.triggerEvent("removed",{map:this,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.getCachedCenter();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.getCachedCenter();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.getCachedCenter();}
+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;var cachedCenter=this.getCachedCenter();if(cachedCenter){center=cachedCenter.clone();}
+return center;},getCachedCenter:function(){if(!this.center&&this.size){this.center=this.getLonLatFromViewPortPx(new OpenLayers.Pixel(this.size.w/2,this.size.h/2));}
+return this.center;},getZoom:function(){return this.zoom;},pan:function(dx,dy,options){options=OpenLayers.Util.applyDefaults(options,{animate:true,dragging:false});if(options.dragging){if(dx!=0||dy!=0){this.moveByPx(dx,dy);}}else{var centerPx=this.getViewPortPxFromLonLat(this.getCachedCenter());var newCenterPx=centerPx.add(dx,dy);if(this.dragging||!newCenterPx.equals(centerPx)){var newCenterLonLat=this.getLonLatFromViewPortPx(newCenterPx);if(options.animate){this.panTo(newCenterLonLat);}else{this.moveTo(newCenterLonLat);this.dragging=false;this.events.triggerEvent("moveend");}}}},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.getCachedCenter();if(lonlat.equals(center)){return;}
+var from=this.getPixelFromLonLat(center);var to=this.getPixelFromLonLat(lonlat);var vector={x:to.x-from.x,y:to.y-from.y};var last={x:0,y:0};this.panTween.start({x:0,y:0},vector,this.panDuration,{callbacks:{eachStep:OpenLayers.Function.bind(function(px){var x=px.x-last.x,y=px.y-last.y;this.moveByPx(x,y);last.x=Math.round(px.x);last.y=Math.round(px.y);},this),done:OpenLayers.Function.bind(function(px){this.moveTo(lonlat);this.dragging=false;this.events.triggerEvent("moveend");},this)}});}else{this.setCenter(lonlat);}},setCenter:function(lonlat,zoom,dragging,forceZoomChange){this.panTween&&this.panTween.stop();this.moveTo(lonlat,zoom,{'dragging':dragging,'forceZoomChange':forceZoomChange});},moveByPx:function(dx,dy){var hw=this.size.w/2;var hh=this.size.h/2;var x=hw+dx;var y=hh+dy;var wrapDateLine=this.baseLayer.wrapDateLine;var xRestriction=0;var yRestriction=0;if(this.restrictedExtent){xRestriction=hw;yRestriction=hh;wrapDateLine=false;}
+dx=wrapDateLine||x<=this.maxPx.x-xRestriction&&x>=this.minPx.x+xRestriction?Math.round(dx):0;dy=y<=this.maxPx.y-yRestriction&&y>=this.minPx.y+yRestriction?Math.round(dy):0;var minX=this.minPx.x,maxX=this.maxPx.x;if(dx||dy){if(!this.dragging){this.dragging=true;this.events.triggerEvent("movestart");}
+this.center=null;if(dx){this.layerContainerDiv.style.left=parseInt(this.layerContainerDiv.style.left)-dx+"px";this.minPx.x-=dx;this.maxPx.x-=dx;if(wrapDateLine){if(this.maxPx.x>maxX){this.maxPx.x-=(maxX-minX);}
+if(this.minPx.x<minX){this.minPx.x+=(maxX-minX);}}}
+if(dy){this.layerContainerDiv.style.top=parseInt(this.layerContainerDiv.style.top)-dy+"px";this.minPx.y-=dy;this.maxPx.y-=dy;}
+var layer,i,len;for(i=0,len=this.layers.length;i<len;++i){layer=this.layers[i];if(layer.visibility&&(layer===this.baseLayer||layer.inRange)){layer.moveByPx(dx,dy);layer.events.triggerEvent("move");}}
+this.events.triggerEvent("move");}},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||this.dragging;var forceZoomChange=options.forceZoomChange;if(!this.getCachedCenter()&&!this.isValidLonLat(lonlat)){lonlat=this.maxExtent.getCenterLonLat();this.center=lonlat.clone();}
+if(this.restrictedExtent!=null){if(lonlat==null){lonlat=this.center;}
+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){dragging||this.events.triggerEvent("movestart");if(centerChanged){if(!zoomChanged&&this.center){this.centerLayerContainer(lonlat);}
+this.center=lonlat.clone();}
+var res=zoomChanged?this.getResolutionForZoom(zoom):this.getResolution();if(zoomChanged||this.layerContainerOrigin==null){this.layerContainerOrigin=this.getCachedCenter();this.layerContainerDiv.style.left="0px";this.layerContainerDiv.style.top="0px";var maxExtent=this.getMaxExtent({restricted:true});var maxExtentCenter=maxExtent.getCenterLonLat();var lonDelta=this.center.lon-maxExtentCenter.lon;var latDelta=maxExtentCenter.lat-this.center.lat;var extentWidth=Math.round(maxExtent.getWidth()/res);var extentHeight=Math.round(maxExtent.getHeight()/res);var left=(this.size.w-extentWidth)/2-lonDelta/res;var top=(this.size.h-extentHeight)/2-latDelta/res;this.minPx=new OpenLayers.Pixel(left,top);this.maxPx=new OpenLayers.Pixel(left+extentWidth,top+extentHeight);}
+if(zoomChanged){this.zoom=zoom;this.resolution=res;this.viewRequestID++;}
+var bounds=this.getExtent();if(this.baseLayer.visibility){this.baseLayer.moveTo(bounds,zoomChanged,options.dragging);options.dragging||this.baseLayer.events.triggerEvent("moveend",{zoomChanged:zoomChanged});}
+bounds=this.baseLayer.getExtent();for(var i=this.layers.length-1;i>=0;--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,options.dragging);options.dragging||layer.events.triggerEvent("moveend",{zoomChanged:zoomChanged});}}}
+this.events.triggerEvent("move");dragging||this.events.triggerEvent("moveend");if(zoomChanged){for(var i=0,len=this.popups.length;i<len;i++){this.popups[i].updatePosition();}
+this.events.triggerEvent("zoomend");}}},centerLayerContainer:function(lonlat){var originPx=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var newPx=this.getViewPortPxFromLonLat(lonlat);if((originPx!=null)&&(newPx!=null)){var oldLeft=parseInt(this.layerContainerDiv.style.left);var oldTop=parseInt(this.layerContainerDiv.style.top);var newLeft=Math.round(originPx.x-newPx.x);var newTop=Math.round(originPx.y-newPx.y);this.layerContainerDiv.style.left=newLeft+"px";this.layerContainerDiv.style.top=newTop+"px";var dx=oldLeft-newLeft;var dy=oldTop-newTop;this.minPx.x-=dx;this.maxPx.x-=dx;this.minPx.y-=dy;this.maxPx.y-=dy;}},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.getCachedCenter();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.getCachedCenter()||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.Layer=OpenLayers.Class({id:null,name:null,div:null,opacity:null,alwaysInRange:null,EVENT_TYPES:["loadstart","loadend","loadcancel","visibilitychanged","move","moveend","added","removed"],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,reinitialize){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 resolution=this.map.getResolution();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();if(reinitialize&&this.map.baseLayer===this){this.map.setCenter(this.map.getCenter(),this.map.getZoomForResolution(resolution),false,true);this.map.events.triggerEvent("changebaselayer",{layer:this});}
+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);},moveByPx:function(dx,dy){},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,p;var props={},alwaysInRange=true;for(i=0,len=this.RESOLUTION_PROPERTIES.length;i<len;i++){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++){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 viewSize,wRes,hRes;var maxResolution=props.maxResolution;if(props.minScale!=null){maxResolution=OpenLayers.Util.getResolutionFromScale(props.minScale,this.units);}else if(maxResolution=="auto"&&this.maxExtent!=null){viewSize=this.map.getSize();wRes=this.maxExtent.getWidth()/viewSize.w;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){viewSize=this.map.getSize();wRes=this.minExtent.getWidth()/viewSize.w;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,i,len;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(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(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;var map=this.map;if(viewPortPx!=null&&map.minPx){var res=map.getResolution();var maxExtent=map.getMaxExtent({restricted:true});var lon=(viewPortPx.x-map.minPx.x)*res+maxExtent.left;var lat=(map.minPx.y-viewPortPx.y)*res+maxExtent.top;lonlat=new OpenLayers.LonLat(lon,lat);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(),'leftTolerance':this.getResolution()};bounds=bounds.wrapDateLine(this.maxExtent,wrappingOptions);}
+return bounds;},CLASS_NAME:"OpenLayers.Layer"});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.Layer.Vector=OpenLayers.Class(OpenLayers.Layer,{EVENT_TYPES:["beforefeatureadded","beforefeaturesadded","featureadded","featuresadded","beforefeatureremoved","beforefeaturesremoved","featureremoved","featuresremoved","beforefeatureselected","featureselected","featureunselected","beforefeaturemodified","featuremodified","afterfeaturemodified","vertexmodified","vertexremoved","sketchstarted","sketchmodified","sketchcomplete","refresh"],isBaseLayer:false,isFixed:false,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 ng=(OpenLayers.Renderer.NG&&this.renderer instanceof OpenLayers.Renderer.NG);if(ng){dragging||this.renderer.updateDimensions(zoomChanged);}else{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(OpenLayers.IS_GECKO===true){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||(!ng&&(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);}}},redraw:function(){if(OpenLayers.Renderer.NG&&this.renderer instanceof OpenLayers.Renderer.NG){this.drawn=false;}
+return OpenLayers.Layer.prototype.redraw.apply(this,arguments);},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(!(OpenLayers.Util.isArray(features))){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(!(OpenLayers.Util.isArray(features))){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);}}
+var drawn=this.renderer.drawFeature(feature,style);if(drawn===false||drawn===null){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 feature=null;var featureId=this.renderer.getFeatureIdFromEvent(evt);if(featureId){if(typeof featureId==="string"){feature=this.getFeatureById(featureId);}else{feature=featureId;}}
+return feature;},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);},getFeaturesByAttribute:function(attrName,attrValue){var i,feature,len=this.features.length,foundFeatures=[];for(i=0;i<len;i++){feature=this.features[i];if(feature&&feature.attributes){if(feature.attributes[attrName]===attrValue){foundFeatures.push(feature);}}}
+return foundFeatures;},onFeatureInsert:function(feature){},preFeatureInsert:function(feature){},getDataExtent:function(){var maxExtent=null;var features=this.features;if(features&&(features.length>0)){var geometry=null;for(var i=0,len=features.length;i<len;i++){geometry=features[i].geometry;if(geometry){if(maxExtent===null){maxExtent=new OpenLayers.Bounds();}
+maxExtent.extend(geometry.getBounds());}}}
+return maxExtent;},CLASS_NAME:"OpenLayers.Layer.Vector"});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.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(OpenLayers.Util.isArray(layers)){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;if(feature._prevHighlighter==undefined){delete feature._lastHighlighter;}else if(feature._prevHighlighter==this.id){delete feature._prevHighlighter;}else{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.Control.Attribution=OpenLayers.Class(OpenLayers.Control,{separator:", ",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.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){var i,len;switch(this.type){case OpenLayers.Filter.Logical.AND:for(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(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));}
+return undefined;},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.Handler.Drag=OpenLayers.Class(OpenLayers.Handler,{started:false,stopDown:true,dragging:false,touch:false,last:null,start:null,lastMoveEvt:null,oldOnselectstart:null,interval:0,timeoutId:null,documentDrag:false,documentEvents:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);if(this.documentDrag===true){var me=this;this._docMove=function(evt){me.mousemove({xy:{x:evt.clientX,y:evt.clientY},element:document});};this._docUp=function(evt){me.mouseup({xy:{x:evt.clientX,y:evt.clientY}});};}},dragstart:function(evt){var propagate=true;this.dragging=false;if(this.checkModifiers(evt)&&(OpenLayers.Event.isLeftClick(evt)||OpenLayers.Event.isSingleTouch(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;},dragmove:function(evt){this.lastMoveEvt=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.removeDocumentEvents();}}
+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=evt.xy;}
+return true;},dragend:function(evt){if(this.started){if(this.documentDrag===true&&this.documentEvents){this.adjustXY(evt);this.removeDocumentEvents();}
+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;},down:function(evt){},move:function(evt){},up:function(evt){},out:function(evt){},mousedown:function(evt){return this.dragstart(evt);},touchstart:function(evt){if(!this.touch){this.touch=true;this.map.events.un({mousedown:this.mousedown,mouseup:this.mouseup,mousemove:this.mousemove,click:this.click,scope:this});}
+return this.dragstart(evt);},mousemove:function(evt){return this.dragmove(evt);},touchmove:function(evt){return this.dragmove(evt);},removeTimeout:function(){this.timeoutId=null;if(this.dragging){this.mousemove(this.lastMoveEvt);}},mouseup:function(evt){return this.dragend(evt);},touchend:function(evt){evt.xy=this.last;return this.dragend(evt);},mouseout:function(evt){if(this.started&&OpenLayers.Util.mouseLeft(evt,this.map.eventsDiv)){if(this.documentDrag===true){this.addDocumentEvents();}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.touch=false;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.viewPortDiv);evt.xy.x-=pos[0];evt.xy.y-=pos[1];},addDocumentEvents:function(){OpenLayers.Element.addClass(document.body,"olDragDown");this.documentEvents=true;OpenLayers.Event.observe(document,"mousemove",this._docMove);OpenLayers.Event.observe(document,"mouseup",this._docUp);},removeDocumentEvents:function(){OpenLayers.Element.removeClass(document.body,"olDragDown");this.documentEvents=false;OpenLayers.Event.stopObserving(document,"mousemove",this._docMove);OpenLayers.Event.stopObserving(document,"mouseup",this._docUp);},CLASS_NAME:"OpenLayers.Handler.Drag"});OpenLayers.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,boxDivClassName:'olHandlerBoxZoomBox',boxOffsets:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.dragHandler=new OpenLayers.Handler.Drag(this,{down:this.startBox,move:this.moveBox,out:this.removeBox,up:this.endBox},{keyMask:this.keyMask});},destroy:function(){OpenLayers.Handler.prototype.destroy.apply(this,arguments);if(this.dragHandler){this.dragHandler.destroy();this.dragHandler=null;}},setMap:function(map){OpenLayers.Handler.prototype.setMap.apply(this,arguments);if(this.dragHandler){this.dragHandler.setMap(map);}},startBox:function(xy){this.callback("start",[]);this.zoomBox=OpenLayers.Util.createDiv('zoomBox',new OpenLayers.Pixel(-9999,-9999));this.zoomBox.className=this.boxDivClassName;this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.eventsDiv.appendChild(this.zoomBox);OpenLayers.Element.addClass(this.map.eventsDiv,"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);var offset=this.getBoxOffsets();this.zoomBox.style.width=(deltaX+offset.width+1)+"px";this.zoomBox.style.height=(deltaY+offset.height+1)+"px";this.zoomBox.style.left=(xy.x<startX?startX-deltaX-offset.left:startX-offset.left)+"px";this.zoomBox.style.top=(xy.y<startY?startY-deltaY-offset.top:startY-offset.top)+"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.eventsDiv.removeChild(this.zoomBox);this.zoomBox=null;this.boxOffsets=null;OpenLayers.Element.removeClass(this.map.eventsDiv,"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)){if(this.dragHandler.deactivate()){if(this.zoomBox){this.removeBox();}}
+return true;}else{return false;}},getBoxOffsets:function(){if(!this.boxOffsets){var testDiv=document.createElement("div");testDiv.style.position="absolute";testDiv.style.border="1px solid black";testDiv.style.width="3px";document.body.appendChild(testDiv);var w3cBoxModel=testDiv.clientWidth==3;document.body.removeChild(testDiv);var left=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-left-width"));var right=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-right-width"));var top=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-top-width"));var bottom=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-bottom-width"));this.boxOffsets={left:left,right:right,top:top,bottom:bottom,width:w3cBoxModel===false?left+right:0,height:w3cBoxModel===false?top+bottom:0};}
+return this.boxOffsets;},CLASS_NAME:"OpenLayers.Handler.Box"});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.Control.DragPan=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,panned:false,interval:1,documentDrag:false,kinetic:null,enableKinetic:false,kineticInterval:10,draw:function(){if(this.enableKinetic){var config={interval:this.kineticInterval};if(typeof this.enableKinetic==="object"){config=OpenLayers.Util.extend(config,this.enableKinetic);}
+this.kinetic=new OpenLayers.Kinetic(config);}
+this.handler=new OpenLayers.Handler.Drag(this,{"move":this.panMap,"done":this.panMapDone,"down":this.panMapStart},{interval:this.interval,documentDrag:this.documentDrag});},panMapStart:function(){if(this.kinetic){this.kinetic.begin();}},panMap:function(xy){if(this.kinetic){this.kinetic.update(xy);}
+this.panned=true;this.map.pan(this.handler.last.x-xy.x,this.handler.last.y-xy.y,{dragging:true,animate:false});},panMapDone:function(xy){if(this.panned){var res=null;if(this.kinetic){res=this.kinetic.end(xy);}
+this.map.pan(this.handler.last.x-xy.x,this.handler.last.y-xy.y,{dragging:!!res,animate:false});if(res){var self=this;this.kinetic.move(res,function(x,y,end){self.map.pan(x,y,{dragging:!end,animate:false});});}
+this.panned=false;}},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.Handler.Click=OpenLayers.Class(OpenLayers.Handler,{delay:300,single:true,'double':false,pixelTolerance:0,dblclickTolerance:13,stopSingle:false,stopDouble:false,timerId:null,touch:false,down:null,last:null,first:null,rightclickTimerId:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);},touchstart:function(evt){if(!this.touch){this.unregisterMouseListeners();this.touch=true;}
+this.down=this.getEventInfo(evt);this.last=this.getEventInfo(evt);return true;},touchmove:function(evt){this.last=this.getEventInfo(evt);return true;},touchend:function(evt){if(this.down){evt.xy=this.last.xy;evt.lastTouches=this.last.touches;this.handleSingle(evt);this.down=null;}
+return true;},unregisterMouseListeners:function(){this.map.events.un({mousedown:this.mousedown,mouseup:this.mouseup,click:this.click,dblclick:this.dblclick,scope:this});},mousedown:function(evt){this.down=this.getEventInfo(evt);this.last=this.getEventInfo(evt);return true;},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]);}},click:function(evt){if(!this.last){this.last=this.getEventInfo(evt);}
+this.handleSingle(evt);return!this.stopSingle;},dblclick:function(evt){this.handleDouble(evt);return!this.stopDouble;},handleDouble:function(evt){if(this["double"]&&this.passesDblclickTolerance(evt)){this.callback("dblclick",[evt]);}},handleSingle:function(evt){if(this.passesTolerance(evt)){if(this.timerId!=null){if(this.last.touches&&this.last.touches.length===1){if(this["double"]){OpenLayers.Event.stop(evt);}
+this.handleDouble(evt);}
+if(!this.last.touches||this.last.touches.length!==2){this.clearTimer();}}else{this.first=this.getEventInfo(evt);var clickEvent=this.single?OpenLayers.Util.extend({},evt):null;this.queuePotentialClick(clickEvent);}}},queuePotentialClick:function(evt){this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,evt),this.delay);},passesTolerance:function(evt){var passes=true;if(this.pixelTolerance!=null&&this.down&&this.down.xy){passes=this.pixelTolerance>=this.down.xy.distanceTo(evt.xy);if(passes&&this.touch&&this.down.touches.length===this.last.touches.length){for(var i=0,ii=this.down.touches.length;i<ii;++i){if(this.getTouchDistance(this.down.touches[i],this.last.touches[i])>this.pixelTolerance){passes=false;break;}}}}
+return passes;},getTouchDistance:function(from,to){return Math.sqrt(Math.pow(from.clientX-to.clientX,2)+
+Math.pow(from.clientY-to.clientY,2));},passesDblclickTolerance:function(evt){var passes=true;if(this.down&&this.first){passes=this.down.xy.distanceTo(this.first.xy)<=this.dblclickTolerance;}
+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]);}},getEventInfo:function(evt){var touches;if(evt.touches){var len=evt.touches.length;touches=new Array(len);var touch;for(var i=0;i<len;i++){touch=evt.touches[i];touches[i]={clientX:touch.clientX,clientY:touch.clientY};}}
+return{xy:evt.xy,touches:touches};},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.clearTimer();this.down=null;this.first=null;this.last=null;this.touch=false;deactivated=true;}
+return deactivated;},CLASS_NAME:"OpenLayers.Handler.Click"});OpenLayers.Control.Navigation=OpenLayers.Class(OpenLayers.Control,{dragPan:null,dragPanOptions:null,pinchZoom:null,pinchZoomOptions: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;if(this.pinchZoom){this.pinchZoom.destroy();}
+this.pinchZoom=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();}
+if(this.pinchZoom){this.pinchZoom.activate();}
+return OpenLayers.Control.prototype.activate.apply(this,arguments);},deactivate:function(){if(this.pinchZoom){this.pinchZoom.deactivate();}
+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={'click':this.defaultClick,'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);if(OpenLayers.Control.PinchZoom){this.pinchZoom=new OpenLayers.Control.PinchZoom(OpenLayers.Util.extend({map:this.map},this.pinchZoomOptions));}},defaultClick:function(evt){if(evt.lastTouches&&evt.lastTouches.length==2){this.map.zoomOut();}},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.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){OpenLayers.Layer.prototype.initialize.apply(this,[name,options]);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(OpenLayers.Util.isArray(url)){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.Grid=OpenLayers.Class(OpenLayers.Layer.HTTPRequest,{tileSize:null,tileOriginCorner:"bl",tileOrigin:null,tileOptions:null,grid:null,singleTile:false,ratio:1.5,buffer:0,numLoadingTiles:0,tileLoadingDelay:100,timerId:null,initialize:function(name,url,params,options){OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this,arguments);this.events.addEventType("tileloaded");this.grid=[];this._moveGriddedTiles=OpenLayers.Function.bind(this.moveGriddedTiles,this);},removeMap:function(map){if(this.timerId!=null){window.clearTimeout(this.timerId);this.timerId=null;}},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.scheduleMoveGriddedTiles();}}}},moveByPx:function(dx,dy){if(!this.singleTile){this.scheduleMoveGriddedTiles();}},scheduleMoveGriddedTiles:function(){if(this.timerId!=null){window.clearTimeout(this.timerId);}
+this.timerId=window.setTimeout(this._moveGriddedTiles,this.tileLoadingDelay);},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,origin,resolution){var tilelon=resolution*this.tileSize.w;var tilelat=resolution*this.tileSize.h;var offsetlon=bounds.left-origin.lon;var tilecol=Math.floor(offsetlon/tilelon)-this.buffer;var tilecolremain=offsetlon/tilelon-tilecol;var tileoffsetx=-tilecolremain*this.tileSize.w;var tileoffsetlon=origin.lon+tilecol*tilelon;var offsetlat=bounds.top-(origin.lat+tilelat);var tilerow=Math.ceil(offsetlat/tilelat)+this.buffer;var tilerowremain=tilerow-offsetlat/tilelat;var tileoffsety=-tilerowremain*this.tileSize.h;var tileoffsetlat=origin.lat+tilerow*tilelat;return{tilelon:tilelon,tilelat:tilelat,tileoffsetlon:tileoffsetlon,tileoffsetlat:tileoffsetlat,tileoffsetx:tileoffsetx,tileoffsety:tileoffsety};},getTileOrigin:function(){var origin=this.tileOrigin;if(!origin){var extent=this.getMaxExtent();var edges=({"tl":["left","top"],"tr":["right","top"],"bl":["left","bottom"],"br":["right","bottom"]})[this.tileOriginCorner];origin=new OpenLayers.LonLat(extent[edges[0]],extent[edges[1]]);}
+return origin;},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 origin=this.getTileOrigin();var resolution=this.map.getResolution();var tileLayout=this.calculateGridLayout(bounds,origin,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){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize,this.tileOptions);},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(){var shifted=true;var buffer=this.buffer||1;var tlLayer=this.grid[0][0].position;var offsetX=parseInt(this.map.layerContainerDiv.style.left);var offsetY=parseInt(this.map.layerContainerDiv.style.top);var tlViewPort=tlLayer.add(offsetX,offsetY);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{shifted=false;}
+if(shifted){this.timerId=window.setTimeout(this._moveGriddedTiles,0);}},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.XYZ=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,sphericalMercator:false,zoomOffset:0,serverResolutions:null,initialize:function(name,url,options){if(options&&options.sphericalMercator||this.sphericalMercator){options=OpenLayers.Util.extend({maxExtent:new OpenLayers.Bounds(-128*156543.03390625,-128*156543.03390625,128*156543.03390625,128*156543.03390625),maxResolution:156543.03390625,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 xyz=this.getXYZ(bounds);var url=this.url;if(OpenLayers.Util.isArray(url)){var s=''+xyz.x+xyz.y+xyz.z;url=this.selectUrl(s,url);}
+return OpenLayers.String.format(url,xyz);},getXYZ: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.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,res):this.map.getZoom()+this.zoomOffset;var limit=Math.pow(2,z);if(this.wrapDateLine)
+{x=((x%limit)+limit)%limit;}
+return{'x':x,'y':y,'z':z};},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;},wrapDateLine:true,CLASS_NAME:"OpenLayers.Layer.OSM"});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,initialize:function(containerID){if(!this.supported()){return;}
+OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);this.translationParameters={x:0,y:0};this.symbolMetrics={};},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="svg";}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);var label=this.nodeFactory(null,"title");label.textContent=style.graphicTitle;node.appendChild(label);}
+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);node.onclick=OpenLayers.Renderer.SVG.preventDefault;}else if(this.isComplexSymbol(style.graphicName)){var offset=style.pointRadius*3;var size=offset*2;var src=this.importSymbol(style.graphicName);pos=this.getPosition(node);widthFactor=this.symbolMetrics[src.id][0]*3/size;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);}
+node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));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[src.id];node.firstChild.setAttributeNS(null,"transform","rotate("
++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");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.fontStyle){label.setAttributeNS(null,"font-style",style.fontStyle);}
+if(style.labelSelect===true){label.setAttributeNS(null,"pointer-events","visible");label._featureId=featureId;}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(OpenLayers.IS_GECKO===true){label.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]]||"central");}
+var labelRows=style.label.split('\n');var numRows=labelRows.length;while(label.childNodes.length>numRows){label.removeChild(label.lastChild);}
+for(var i=0;i<numRows;i++){var tspan=this.nodeFactory(featureId+this.LABEL_ID_SUFFIX+"_tspan_"+i,"tspan");if(style.labelSelect===true){tspan._featureId=featureId;tspan._geometry=location;tspan._geometryClass=location.CLASS_NAME;}
+if(OpenLayers.IS_GECKO===false){tspan.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[align[1]]||"-35%");}
+tspan.setAttribute("x",x);if(i==0){var vfactor=OpenLayers.Renderer.SVG.LABEL_VFACTOR[align[1]];if(vfactor==null){vfactor=-.5;}
+tspan.setAttribute("dy",(vfactor*(numRows-1))+"em");}else{tspan.setAttribute("dy","1em");}
+tspan.textContent=(labelRows[i]==='')?' ':labelRows[i];if(!tspan.parentNode){label.appendChild(tspan);}}
+if(!label.parentNode){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;var existing=document.getElementById(id)
+if(existing!=null){return existing;}
+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;},getFeatureIdFromEvent:function(evt){var featureId=OpenLayers.Renderer.Elements.prototype.getFeatureIdFromEvent.apply(this,arguments);if(!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.SVG.LABEL_VFACTOR={"t":0,"b":-1};OpenLayers.Renderer.SVG.preventDefault=function(e){e.preventDefault&&e.preventDefault();};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(){this.removeButtons();this.buttons=null;this.position=null;OpenLayers.Control.prototype.destroy.apply(this,arguments);},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");btn.style.cursor="pointer";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.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.BROWSER_NAME=='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(){this.div.style.display='';if(this.panMapIfOutOfView){this.panIntoView();}},hide:function(){this.div.style.display='none';},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.BROWSER_NAME=="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,"touchend",OpenLayers.Function.bindAsEventListener(closePopup,this));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);function onTouchstart(evt){OpenLayers.Event.stop(evt,true);}
+this.events.on({"mousedown":this.onmousedown,"mousemove":this.onmousemove,"mouseup":this.onmouseup,"click":this.onclick,"mouseout":this.onmouseout,"dblclick":this.ondblclick,"touchstart":onTouchstart,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.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;var left=(this.relativePosition.charAt(1)=='l');newPx.x+=(left)?-size.w:this.anchor.size.w;return newPx;},CLASS_NAME:"OpenLayers.Popup.Anchored"});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.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.03390625;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;}};(function(){var codes=["EPSG:900913","EPSG:3857","EPSG:102113","EPSG:102100"];var add=OpenLayers.Projection.addTransform;var merc=OpenLayers.Layer.SphericalMercator;var same=OpenLayers.Projection.nullTransform;var i,len,code,other,j;for(i=0,len=codes.length;i<len;++i){code=codes[i];add("EPSG:4326",code,merc.projectForward);add(code,"EPSG:4326",merc.projectInverse);for(j=i+1;j<len;++j){other=codes[j];add(code,other,same);add(other,code,same);}}})();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.Symbolizer.Point=OpenLayers.Class(OpenLayers.Symbolizer,{initialize:function(config){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Symbolizer.Point"});OpenLayers.Symbolizer.Line=OpenLayers.Class(OpenLayers.Symbolizer,{initialize:function(config){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Symbolizer.Line"});OpenLayers.Symbolizer.Polygon=OpenLayers.Class(OpenLayers.Symbolizer,{initialize:function(config){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Symbolizer.Polygon"});OpenLayers.Symbolizer.Text=OpenLayers.Class(OpenLayers.Symbolizer,{initialize:function(config){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Symbolizer.Text"});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.Handler.Pinch=OpenLayers.Class(OpenLayers.Handler,{started:false,stopDown:false,pinching:false,last:null,start:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);},touchstart:function(evt){var propagate=true;this.pinching=false;if(OpenLayers.Event.isMultiTouch(evt)){this.started=true;this.last=this.start={distance:this.getDistance(evt.touches),delta:0,scale:1};this.callback("start",[evt,this.start]);propagate=!this.stopDown;}else{this.started=false;this.start=null;this.last=null;}
+OpenLayers.Event.stop(evt);return propagate;},touchmove:function(evt){if(this.started&&OpenLayers.Event.isMultiTouch(evt)){this.pinching=true;var current=this.getPinchData(evt);this.callback("move",[evt,current]);this.last=current;OpenLayers.Event.stop(evt);}
+return true;},touchend:function(evt){if(this.started){this.started=false;this.pinching=false;this.callback("done",[evt,this.start,this.last]);this.start=null;this.last=null;}
+return true;},activate:function(){var activated=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.pinching=false;activated=true;}
+return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.started=false;this.pinching=false;this.start=null;this.last=null;deactivated=true;}
+return deactivated;},getDistance:function(touches){var t0=touches[0];var t1=touches[1];return Math.sqrt(Math.pow(t0.clientX-t1.clientX,2)+
+Math.pow(t0.clientY-t1.clientY,2));},getPinchData:function(evt){var distance=this.getDistance(evt.touches);var scale=distance/this.start.distance;return{distance:distance,delta:this.last.distance-distance,scale:scale};},CLASS_NAME:"OpenLayers.Handler.Pinch"});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]);if(this.type===OpenLayers.Filter.Comparison.LIKE&&options.matchCase===undefined){this.matchCase=null;}},evaluate:function(context){if(context instanceof OpenLayers.Feature.Vector){context=context.attributes;}
+var result=false;var got=context[this.property];var exp;switch(this.type){case OpenLayers.Filter.Comparison.EQUAL_TO: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: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.Format.QueryStringFilter=(function(){var cmpToStr={};cmpToStr[OpenLayers.Filter.Comparison.EQUAL_TO]="eq";cmpToStr[OpenLayers.Filter.Comparison.NOT_EQUAL_TO]="ne";cmpToStr[OpenLayers.Filter.Comparison.LESS_THAN]="lt";cmpToStr[OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO]="lte";cmpToStr[OpenLayers.Filter.Comparison.GREATER_THAN]="gt";cmpToStr[OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO]="gte";cmpToStr[OpenLayers.Filter.Comparison.LIKE]="ilike";function regex2value(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;}
+return OpenLayers.Class(OpenLayers.Format,{wildcarded:false,srsInBBOX:false,write: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();if(this.srsInBBOX&&filter.projection){params.bbox.push(filter.projection.getCode());}
+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=cmpToStr[filter.type];if(op!==undefined){var value=filter.value;if(filter.type==OpenLayers.Filter.Comparison.LIKE){value=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.write(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;},CLASS_NAME:"OpenLayers.Format.QueryStringFilter"});})();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);},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){options.isFilled=true;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 j,jj,points,area,first,second,i,ii,comp,pathComp,x,y;for(j=0,jj=geometry.components.length;j<jj;j++){path.push("m");points=geometry.components[j].components;area=(j===0);first=null;second=null;for(i=0,ii=points.length;i<ii;i++){comp=points[i];x=(comp.x/resolution-this.offset.x)|0;y=(comp.y/resolution-this.offset.y)|0;pathComp=" "+x+","+y;path.push(pathComp);if(i==0){path.push(" l");}
+if(!area){if(!first){first=pathComp;}else if(first!=pathComp){if(!second){second=pathComp;}else if(second!=pathComp){area=true;}}}}
+path.push(area?" 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.cursor!="inherit"&&style.cursor!=null){textbox.style.cursor=style.cursor;}
+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.fontStyle){textbox.style.fontStyle=style.fontStyle;}
+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.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,error: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.Protocol.HTTP=OpenLayers.Class(OpenLayers.Protocol,{url:null,headers:null,params:null,callback:null,scope:null,readWithPOST:false,wildcarded:false,srsInBBOX:false,initialize:function(options){options=options||{};this.params={};this.headers={};OpenLayers.Protocol.prototype.initialize.apply(this,arguments);if(!this.filterToParams&&OpenLayers.Format.QueryStringFilter){var format=new OpenLayers.Format.QueryStringFilter({wildcarded:this.wildcarded,srsInBBOX:this.srsInBBOX});this.filterToParams=function(filter,params){return format.write(filter,params);}}},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=options||{};options.params=OpenLayers.Util.applyDefaults(options.params,this.options.params);options=OpenLayers.Util.applyDefaults(options,this.options);if(options.filter&&this.filterToParams){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);},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"});OpenLayers.Format.JSON=OpenLayers.Class(OpenLayers.Format,{indent:" ",space:" ",newline:"\n",level:0,pretty:false,nativeJSON:(function(){return!!(window.JSON&&typeof JSON.parse=="function"&&typeof JSON.stringify=="function");})(),read:function(json,filter){var object;if(this.nativeJSON){object=JSON.parse(json,filter);}else try{if(/^[\],:{}\s]*$/.test(json.replace(/\\["\\\/bfnrtu]/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){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);}}}catch(e){}
+if(this.keepData){this.data=object;}
+return object;},write:function(value,pretty){this.pretty=!!pretty;var json=null;var type=typeof value;if(this.serialize[type]){try{json=(!this.pretty&&this.nativeJSON)?JSON.stringify(value):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.Control.DragFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,onStart:function(feature,pixel){},onDrag:function(feature,pixel){},onComplete:function(feature,pixel){},onEnter:function(feature){},onLeave:function(feature){},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({click:this.clickFeature,clickout:this.clickoutFeature,over:this.overFeature,out:this.outFeature},this.featureCallbacks),{geometryTypes:this.geometryTypes})};},clickFeature:function(feature){if(this.handlers.feature.touch&&!this.over&&this.overFeature(feature)){this.handlers.drag.dragstart(this.handlers.feature.evt);this.handlers.drag.stopDown=false;}},clickoutFeature:function(feature){if(this.handlers.feature.touch&&this.over){this.outFeature(feature);this.handlers.drag.stopDown=true;}},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){var activated=false;if(!this.handlers.drag.dragging){this.feature=feature;this.handlers.drag.activate();activated=true;this.over=true;OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass+"Over");this.onEnter(feature);}else{if(this.feature.id==feature.id){this.over=true;}else{this.over=false;}}
+return activated;},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.onLeave(feature);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.PinchZoom=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,containerOrigin:null,pinchOrigin:null,currentCenter:null,autoActivate:true,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.handler=new OpenLayers.Handler.Pinch(this,{start:this.pinchStart,move:this.pinchMove,done:this.pinchDone},this.handlerOptions);},activate:function(){var activated=OpenLayers.Control.prototype.activate.apply(this,arguments);if(activated){this.map.events.on({moveend:this.updateContainerOrigin,scope:this});this.updateContainerOrigin();}
+return activated;},deactivate:function(){var deactivated=OpenLayers.Control.prototype.deactivate.apply(this,arguments);if(this.map&&this.map.events){this.map.events.un({moveend:this.updateContainerOrigin,scope:this});}
+return deactivated;},updateContainerOrigin:function(){var container=this.map.layerContainerDiv;this.containerOrigin={x:parseInt(container.style.left,10),y:parseInt(container.style.top,10)};},pinchStart:function(evt,pinchData){this.pinchOrigin=evt.xy;this.currentCenter=evt.xy;},pinchMove:function(evt,pinchData){var scale=pinchData.scale;var containerOrigin=this.containerOrigin;var pinchOrigin=this.pinchOrigin;var current=evt.xy;var dx=Math.round((current.x-pinchOrigin.x)+(scale-1)*(containerOrigin.x-pinchOrigin.x));var dy=Math.round((current.y-pinchOrigin.y)+(scale-1)*(containerOrigin.y-pinchOrigin.y));this.applyTransform("translate("+dx+"px, "+dy+"px) scale("+scale+")");this.currentCenter=current;},applyTransform:function(transform){var style=this.map.layerContainerDiv.style;style['-webkit-transform']=transform;style['-moz-transform']=transform;},pinchDone:function(evt,start,last){this.applyTransform("");var zoom=this.map.getZoomForResolution(this.map.getResolution()/last.scale,true);if(zoom!==this.map.getZoom()||!this.currentCenter.equals(this.pinchOrigin)){var resolution=this.map.getResolutionForZoom(zoom);var location=this.map.getLonLatFromPixel(this.pinchOrigin);var zoomPixel=this.currentCenter;var size=this.map.getSize();location.lon+=resolution*((size.w/2)-zoomPixel.x);location.lat-=resolution*((size.h/2)-zoomPixel.y);this.map.setCenter(location,zoom);}},CLASS_NAME:"OpenLayers.Control.PinchZoom"});
diff --git a/phonegap/www/js/config.js-example b/phonegap/www/js/config.js-example
new file mode 100644
index 000000000..c81c2c381
--- /dev/null
+++ b/phonegap/www/js/config.js-example
@@ -0,0 +1,5 @@
+var CONFIG = {
+ FMS_URL: '',
+ MAPIT_URL: '',
+ BING_API_KEY: ''
+};
diff --git a/phonegap/www/js/fixmystreet.js b/phonegap/www/js/fixmystreet.js
new file mode 100644
index 000000000..ce7921488
--- /dev/null
+++ b/phonegap/www/js/fixmystreet.js
@@ -0,0 +1,572 @@
+/*
+ * fixmystreet.js
+ * FixMyStreet JavaScript
+ */
+
+function form_category_onchange() {
+ var cat = $('#form_category');
+ var args = {
+ category: cat.val()
+ };
+
+ if ( typeof fixmystreet !== 'undefined' ) {
+ args.latitude = fixmystreet.latitude;
+ args.longitude = fixmystreet.longitude;
+ } else {
+ args.latitude = $('input[name="latitude"]').val();
+ args.longitude = $('input[name="longitude"]').val();
+ }
+
+ $.getJSON( CONFIG.FMS_URL + 'report/new/category_extras', args, function(data) {
+ if ( data.category_extra ) {
+ if ( $('#category_meta').size() ) {
+ $('#category_meta').html( data.category_extra);
+ } else {
+ $('#form_category_row').after( data.category_extra );
+ }
+ } else {
+ $('#category_meta').empty();
+ }
+ });
+}
+
+/*
+ * general height fixing function
+ *
+ * elem1: element to check against
+ * elem2: target element
+ * offset: this will be added (if present) to the final value, useful for height errors
+ */
+function heightFix(elem1, elem2, offset){
+ var h1 = $(elem1).height(),
+ h2 = $(elem2).height();
+ if(offset === undefined){
+ offset = 0;
+ }
+ if(h1 > h2){
+ $(elem2).css({'min-height':h1+offset});
+ }
+}
+
+
+/*
+ * very simple tab function
+ *
+ * elem: trigger element, must have an href attribute (so probably needs to be an <a>)
+ */
+function tabs(elem, indirect) {
+ var href = elem.attr('href');
+ //stupid IE sometimes adds the full uri into the href attr, so trim
+ var start = href.indexOf('#'),
+ target = href.slice(start, href.length);
+
+ if (indirect) {
+ elem = $(target + '_tab');
+ }
+
+ if(!$(target).hasClass('open'))
+ {
+ //toggle class on nav
+ $('.tab-nav .active').removeClass('active');
+ elem.addClass('active');
+
+ //hide / show the right tab
+ $('.tab.open').hide().removeClass('open');
+ $(target).show().addClass('open');
+ }
+}
+
+
+$(function(){
+ var $html = $('html');
+
+ $html.removeClass('no-js').addClass('js');
+
+
+ // Preload the new report pin
+ document.createElement('img').src = '../i/pin-green.png';
+
+ var last_type;
+ $(window).resize(function(){
+ var type = $('#site-header').css('borderTopWidth');
+ if (type == '4px') { type = 'mobile'; }
+ else if (type == '0px') { type = 'desktop'; }
+ else { return; }
+ if (last_type == type) { return; }
+ if (type == 'mobile') {
+ $html.addClass('mobile');
+ $('#map_box').prependTo('.content').css({
+ zIndex: '', position: '',
+ top: '', left: '', right: '', bottom: '',
+ width: '', height: '10em',
+ margin: ''
+ });
+ if (typeof fixmystreet !== 'undefined') {
+ fixmystreet.state_map = ''; // XXX
+ }
+ if (typeof fixmystreet !== 'undefined' && fixmystreet.page == 'around') {
+ // Immediately go full screen map if on around page
+ $('#site-header').hide();
+ $('#map_box').prependTo('.wrapper').css({
+ position: 'absolute',
+ top: 0, left: 0, right: 0, bottom: 0,
+ height: 'auto',
+ margin: 0
+ });
+ $('#fms_pan_zoom').css({ top: '2.75em !important' });
+ $('.big-green-banner')
+ .addClass('mobile-map-banner')
+ .appendTo('#map_box')
+ .text('Place pin on map')
+ .prepend('<a href="index.html">home</a>');
+ }
+ $('span.report-a-problem-btn').on('click.reportBtn', function(){
+ $('html, body').animate({scrollTop:0}, 500);
+ }).css({ cursor:'pointer' }).on('hover.reportBtn', function(){
+ $(this).toggleClass('hover');
+ });
+ } else {
+ // Make map full screen on non-mobile sizes.
+ $html.removeClass('mobile');
+ var map_pos = 'fixed', map_height = '100%';
+ if ($html.hasClass('ie6')) {
+ map_pos = 'absolute';
+ map_height = $(window).height();
+ }
+ $('#map_box').prependTo('.wrapper').css({
+ zIndex: 0, position: map_pos,
+ top: 0, left: 0, right: 0, bottom: 0,
+ width: '100%', height: map_height,
+ margin: 0
+ });
+ if (typeof fixmystreet !== 'undefined') {
+ fixmystreet.state_map = 'full';
+ }
+ if (typeof fixmystreet !== 'undefined' && fixmystreet.page == 'around') {
+ // Remove full-screen-ness
+ $('#site-header').show();
+ $('#fms_pan_zoom').css({ top: '4.75em !important' });
+ $('.big-green-banner')
+ .removeClass('mobile-map-banner')
+ .prependTo('#side')
+ .text('Click map to report a problem');
+ }
+ $('span.report-a-problem-btn').css({ cursor:'' }).off('.reportBtn');
+ }
+ last_type = type;
+ });
+
+ //add mobile class if small screen
+ $(window).resize();
+
+ $('#pc').focus();
+
+ $('input[type=submit]').removeAttr('disabled');
+ /*
+ $('#mapForm').submit(function() {
+ if (this.submit_problem) {
+ $('input[type=submit]', this).prop("disabled", true);
+ }
+ return true;
+ });
+ */
+
+ if (!$('#been_fixed_no').prop('checked') && !$('#been_fixed_unknown').prop('checked')) {
+ $('#another_qn').hide();
+ }
+ $('#been_fixed_no').click(function() {
+ $('#another_qn').show('fast');
+ });
+ $('#been_fixed_unknown').click(function() {
+ $('#another_qn').show('fast');
+ });
+ $('#been_fixed_yes').click(function() {
+ $('#another_qn').hide('fast');
+ });
+
+ // FIXME - needs to use translated string
+ jQuery.validator.addMethod('validCategory', function(value, element) {
+ return this.optional(element) || value != '-- Pick a category --'; }, validation_strings.category );
+
+ jQuery.validator.addMethod('validName', function(value, element) {
+ var validNamePat = /\ba\s*n+on+((y|o)mo?u?s)?(ly)?\b/i;
+ return this.optional(element) || value.length > 5 && value.match( /\S/ ) && !value.match( validNamePat ); }, validation_strings.category );
+
+ var form_submitted = 0;
+ var submitted = false;
+
+ $("form.validate").validate({
+ rules: {
+ title: { required: true },
+ detail: { required: true },
+ email: { required: true },
+ update: { required: true },
+ rznvy: { required: true }
+ },
+ messages: validation_strings,
+ onkeyup: false,
+ onfocusout: false,
+ errorElement: 'div',
+ errorClass: 'form-error',
+ // we do this to stop things jumping around on blur
+ success: function (err) { if ( form_submitted ) { err.addClass('label-valid').removeClass('label-valid-hidden').html( '&nbsp;' ); } else { err.addClass('label-valid-hidden'); } },
+ errorPlacement: function( error, element ) {
+ element.before( error );
+ },
+ submitHandler: function(form) {
+ if (form.submit_problem) {
+ $('input[type=submit]', form).prop("disabled", true);
+ }
+
+ // this needs to be disabled otherwise it submits the form normally rather than
+ // over AJAX. This comment is to make this more likely to happen when updating
+ // this code.
+ //form.submit();
+ },
+ // make sure we can see the error message when we focus on invalid elements
+ showErrors: function( errorMap, errorList ) {
+ if ( submitted && errorList.length ) {
+ $(window).scrollTop( $(errorList[0].element).offset().top - 120 );
+ }
+ this.defaultShowErrors();
+ submitted = false;
+ },
+ invalidHandler: function(form, validator) { submitted = true; }
+ });
+
+ $('input[type=submit]').click( function(e) { form_submitted = 1; } );
+
+ /* set correct required status depending on what we submit
+ * NB: need to add things to form_category as the JS updating
+ * of this we do after a map click removes them */
+ $('#submit_sign_in').click( function(e) {
+ $('#form_category').addClass('required validCategory').removeClass('valid');
+ $('#form_name').removeClass();
+ } );
+
+ $('#submit_register').click( function(e) {
+ $('#form_category').addClass('required validCategory').removeClass('valid');
+ $('#form_name').addClass('required validName');
+ } );
+
+ $('#problem_submit > input[type="submit"]').click( function(e) {
+ $('#form_category').addClass('required validCategory').removeClass('valid');
+ $('#form_name').addClass('required validName');
+ } );
+
+ $('#update_post').click( function(e) {
+ $('#form_name').addClass('required').removeClass('valid');
+ } );
+
+ $('#form_category').change( form_category_onchange );
+
+ // Geolocation
+ if (geo_position_js.init()) {
+ $('#postcodeForm').after('<a href="#" id="geolocate_link">&hellip; or locate me automatically</a>');
+ $('#geolocate_link').click(getPosition);
+ }
+
+ /*
+ * Report a problem page
+ */
+ //desktop
+ if ($('#report-a-problem-sidebar').is(':visible')) {
+ heightFix('#report-a-problem-sidebar', '.content', 26);
+ }
+
+ //show/hide notes on mobile
+ $('.mobile #report-a-problem-sidebar').after('<a href="#" class="rap-notes-trigger button-right">How to send successful reports</a>').hide();
+ $('.rap-notes-trigger').click(function(e){
+ e.preventDefault();
+ //check if we've already moved the notes
+ if($('.rap-notes').length > 0){
+ //if we have, show and hide .content
+ $('.content').hide();
+ $('.rap-notes').show();
+ }else{
+ //if not, move them and show, hiding .content
+ $('.content').after('<div class="content rap-notes"></div>').hide();
+ $('#report-a-problem-sidebar').appendTo('.rap-notes').show().after('<a href="#" class="rap-notes-close button-left">Back</a>');
+ }
+ $('html, body').scrollTop($('#report-a-problem-sidebar').offset().top);
+ location.hash = 'rap-notes';
+ });
+ $('.mobile').on('click', '.rap-notes-close', function(e){
+ e.preventDefault();
+ //hide notes, show .content
+ $('.content').show();
+ $('.rap-notes').hide();
+ $('html, body').scrollTop($('#mob_ok').offset().top);
+ location.hash = 'report';
+ });
+
+ //move 'skip this step' link on mobile
+ $('.mobile #skip-this-step').hide();
+ $('.mobile #skip-this-step a').addClass('chevron').wrap('<li>').appendTo('#key-tools');
+
+ /*
+ * Tabs
+ */
+ //make initial tab active
+ $('.tab-nav a').first().addClass('active');
+ $('.tab').first().addClass('open');
+
+ //hide other tabs
+ $('.tab').not('.open').hide();
+
+ //set up click event
+ $(".tab-nav").on('click', 'a', function(e){
+ e.preventDefault();
+ tabs($(this));
+ });
+ $('.tab_link').click(function(e) {
+ e.preventDefault();
+ tabs($(this), 1);
+ });
+
+ /*
+ * Skip to nav on mobile
+ */
+ $('.mobile').on('click', '#nav-link', function(e){
+ e.preventDefault();
+ var offset = $('#main-nav').offset().top;
+ $('html, body').animate({scrollTop:offset}, 1000);
+ });
+
+
+ /*
+ * Show stuff on input focus
+ */
+ $('.form-focus-hidden').hide();
+ $('.form-focus-trigger').on('focus', function(){
+ $('.form-focus-hidden').fadeIn(500);
+ });
+
+ /*
+ * Show on click - pretty generic
+ */
+ $('.hideshow-trigger').on('click', function(e){
+ e.preventDefault();
+ var href = $(this).attr('href'),
+ //stupid IE sometimes adds the full uri into the href attr, so trim
+ start = href.indexOf('#'),
+ target = href.slice(start, href.length);
+
+ $(target).removeClass('hidden-js');
+
+ $(this).hide();
+ });
+
+ /*
+ * nicetable - on mobile shift 'name' col to be a row
+ */
+ $('.mobile .nicetable th.title').remove();
+ $('.mobile .nicetable td.title').each(function(i){
+ $(this).attr('colspan', 5).insertBefore($(this).parent('tr')).wrap('<tr class="heading" />');
+ });
+ // $('.mobile .nicetable tr.heading > td.title').css({'min-width':'300px'});
+ // $('.mobile .nicetable tr > td.data').css({'max-width':'12%'});
+
+ /*
+ * Map controls prettiness
+ */
+ //add links container (if its not there)
+ if($('#sub_map_links').length === 0){
+ $('<p id="sub_map_links" />').insertAfter($('#map'));
+ }
+
+// A sliding drawer from the bottom of the page, small version
+// that doesn't change the main content at all.
+$.fn.small_drawer = function(id) {
+ this.toggle(function(){
+ var $this = $(this), d = $('#' + id);
+ if (!$this.addClass('hover').data('setup')) {
+ d.hide().removeClass('hidden-js').css({
+ padding: '1em',
+ background: '#fff'
+ });
+ $this.data('setup', true);
+ }
+ d.slideDown();
+ }, function(e){
+ var $this = $(this), d = $('#' + id);
+ $this.removeClass('hover');
+ d.slideUp();
+ });
+};
+
+// A sliding drawer from the bottom of the page, large version
+$.fn.drawer = function(id, ajax) {
+ // IE7 positions the fixed tool bar 1em to the left unless it comes after
+ // the full-width section, ho-hum. Move it to where it would be after an
+ // open/close anyway
+ if ($('html.ie7').length) {
+ var $sw = $('.shadow-wrap'), $content = $('.content[role="main"]');
+ $sw.appendTo($content);
+ }
+ this.toggle(function(){
+ var $this = $(this), d = $('#' + id), $content = $('.content[role="main"]');
+ if (!$this.addClass('hover').data('setup')) {
+ // make a drawer div with an innerDiv
+ if (!d.length) {
+ d = $('<div id="' + id + '">');
+ }
+ var innerDiv = $('<div>');
+ d.wrapInner(innerDiv);
+
+ // if ajax, load it with a spinner
+ if (ajax) {
+ var href = $this.attr('href') + ';ajax=1';
+ $this.prepend(' <img class="spinner" src="/cobrands/fixmystreet/images/spinner-black-333.gif" style="margin-right:2em;">');
+ innerDiv.load(href, function(){
+ $('.spinner').remove();
+ });
+ }
+
+ // Tall drawer - put after .content for scrolling to work okay.
+ // position over the top of the main .content in precisely the right location
+ d.insertAfter($content).addClass('content').css({
+ position: 'absolute',
+ zIndex: '1100',
+ marginTop: $('html.ie6, html.ie7').length ? '-3em' : 0, // IE6/7 otherwise include the 3em padding and stay too low
+ left: 0,
+ top: $(window).height() - $content.offset().top
+ }).removeClass('hidden-js').find('h2').css({ marginTop: 0 });
+ $this.data('setup', true);
+ }
+
+ //do the animation
+ $('.shadow-wrap').prependTo(d).addClass('static');
+ d.show().animate({top:'3em'}, 1000, function(){
+ $content.fadeOut(function() {
+ d.css({ position: 'relative' });
+ });
+ });
+ }, function(e){
+ var $this = $(this), d = $('#' + id), $sw = $('.shadow-wrap'),
+ $content = $('.content[role="main"]'),
+ tot_height = $(window).height() - d.offset().top;
+ $this.removeClass('hover');
+ d.css({ position: 'absolute' }).animate({ top: tot_height }, 1000, function(){
+ d.hide();
+ $sw.appendTo($content).removeClass('static');
+ });
+ $content.show();
+ });
+};
+
+ if ($('html.mobile').length) {
+ $('#council_wards').hide().removeClass('hidden-js').find('h2').hide();
+ $('#key-tool-wards').click(function(e){
+ e.preventDefault();
+ $('#council_wards').slideToggle('800', function(){
+ $('#key-tool-wards').toggleClass('active');
+ });
+ });
+ } else {
+ $('#key-tool-wards').drawer('council_wards', false);
+ $('#key-tool-around-updates').drawer('updates_ajax', true);
+ }
+ $('#key-tool-report-updates').small_drawer('report-updates-data');
+
+ // Go directly to RSS feed if RSS button clicked on alert page
+ // (due to not wanting around form to submit, though good thing anyway)
+ $('.container').on('click', '#alert_rss_button', function(e){
+ e.preventDefault();
+ var feed = $('input[name=feed][type=radio]:checked').nextAll('a').attr('href');
+ window.location.href = feed;
+ });
+ $('.container').on('click', '#alert_email_button', function(e){
+ e.preventDefault();
+ var form = $('<form/>').attr({ method:'post', action:"/alert/subscribe" });
+ form.append($('<input name="alert" value="Subscribe me to an email alert" type="hidden" />'));
+ $('#alerts input[type=text], #alerts input[type=hidden], #alerts input[type=radio]:checked').each(function() {
+ var $v = $(this);
+ $('<input/>').attr({ name:$v.attr('name'), value:$v.val(), type:'hidden' }).appendTo(form);
+ });
+ form.submit();
+ });
+
+ //add permalink on desktop, force hide on mobile
+ $('#sub_map_links').append('<a href="#" id="map_permalink">Permalink</a>');
+ if($('.mobile').length){
+ $('#map_permalink').hide();
+ $('#key-tools a.feed').appendTo('#sub_map_links');
+ $('#key-tools li:empty').remove();
+ $('#report-updates-data').insertAfter($('#map_box'));
+ }
+ //add open/close toggle button on desk
+ $('#sub_map_links').prepend('<span id="map_links_toggle">&nbsp;</span>');
+
+ //set up map_links_toggle click event
+ $('#map_links_toggle').on('click', function(){
+ var maplinks_width = $('#sub_map_links').width();
+
+ if($(this).hasClass('closed')){
+ $(this).removeClass('closed');
+ $('#sub_map_links').animate({'right':'0'}, 1200);
+ }else{
+ $(this).addClass('closed');
+ $('#sub_map_links').animate({'right':-maplinks_width}, 1200);
+ }
+ });
+
+
+ /*
+ * Add close buttons for .promo's
+ */
+ if($('.promo').length){
+ $('.promo').append('<a href="#" class="close-promo">x</a>');
+ }
+ //only close its own parent
+ $('.promo').on('click', '.close-promo', function(e){
+ e.preventDefault();
+ $(this).parent('.promo').animate({
+ 'height':0,
+ 'margin-bottom':0,
+ 'padding-top':0,
+ 'padding-bottom':0
+ },{
+ duration:500,
+ queue:false
+ }).fadeOut(500);
+ });
+
+
+
+ /*
+ * Fancybox fullscreen images
+ */
+ if (typeof $.fancybox == 'function') {
+ $('a[rel=fancy]').fancybox({
+ 'overlayColor': '#000000'
+ });
+ }
+
+ /*
+ * heightfix the desktop .content div
+ *
+ * this must be kept near the end so that the
+ * rendered height is used after any page manipulation (such as tabs)
+ */
+ if (!$('html.mobile').length) {
+ if (!($('body').hasClass('frontpage'))){
+ heightFix(window, '.content', -176);
+ }
+ }
+
+});
+
+/*
+XXX Disabled because jerky on Android and makes map URL bar height too small on iPhone.
+// Hide URL bar
+$(window).load(function(){
+ window.setTimeout(function(){
+ var s = window.pageYOffset || document.compatMode === "CSS1Compat" && document.documentElement.scrollTop || document.body.scrollTop || 0;
+ if (s < 20 && !location.hash) {
+ window.scrollTo(0, 1);
+ }
+ }, 0);
+});
+*/
+
diff --git a/phonegap/www/js/geo.min.js b/phonegap/www/js/geo.min.js
new file mode 100644
index 000000000..4f44b30ca
--- /dev/null
+++ b/phonegap/www/js/geo.min.js
@@ -0,0 +1,85 @@
+// geo-location-javascript v0.4.8 http://code.google.com/p/geo-location-javascript/ Copyright (c) 2009 Stan Wiechers. Licensed under the MIT licenses.
+
+var bb_success;var bb_error;var bb_blackberryTimeout_id=-1;function handleBlackBerryLocationTimeout()
+{if(bb_blackberryTimeout_id!=-1)
+{bb_error({message:"Timeout error",code:3});}}
+function handleBlackBerryLocation()
+{clearTimeout(bb_blackberryTimeout_id);bb_blackberryTimeout_id=-1;if(bb_success&&bb_error)
+{if(blackberry.location.latitude==0&&blackberry.location.longitude==0)
+{bb_error({message:"Position unavailable",code:2});}
+else
+{var timestamp=null;if(blackberry.location.timestamp)
+{timestamp=new Date(blackberry.location.timestamp);}
+bb_success({timestamp:timestamp,coords:{latitude:blackberry.location.latitude,longitude:blackberry.location.longitude}});}
+bb_success=null;bb_error=null;}}
+var geo_position_js=function(){var pub={};var provider=null;var u="undefined";pub.showMap=function(latitude,longitude)
+{if(typeof(blackberry)!=u)
+{blackberry.launch.newMap({"latitude":latitude*100000,"longitude":-longitude*100000});}
+else
+{window.location="http://maps.google.com/maps?q=loc:"+latitude+","+longitude;}}
+pub.getCurrentPosition=function(success,error,opts)
+{provider.getCurrentPosition(success,error,opts);}
+pub.init=function()
+{try
+{if(typeof(geo_position_js_simulator)!=u)
+{provider=geo_position_js_simulator;}
+else if(typeof(bondi)!=u&&typeof(bondi.geolocation)!=u)
+{provider=bondi.geolocation;}
+else if(typeof(navigator.geolocation)!=u)
+{provider=navigator.geolocation;pub.getCurrentPosition=function(success,error,opts)
+{function _success(p)
+{if(typeof(p.latitude)!=u)
+{success({timestamp:p.timestamp,coords:{latitude:p.latitude,longitude:p.longitude}});}
+else
+{success(p);}}
+provider.getCurrentPosition(_success,error,opts);}}
+else if(typeof(window.blackberry)!=u&&blackberry.location.GPSSupported)
+{if(typeof(blackberry.location.setAidMode)==u)
+{return false;}
+blackberry.location.setAidMode(2);pub.getCurrentPosition=function(success,error,opts)
+{bb_success=success;bb_error=error;if(opts['timeout'])
+{bb_blackberryTimeout_id=setTimeout("handleBlackBerryLocationTimeout()",opts['timeout']);}
+else
+{bb_blackberryTimeout_id=setTimeout("handleBlackBerryLocationTimeout()",60000);}
+blackberry.location.onLocationUpdate("handleBlackBerryLocation()");blackberry.location.refreshLocation();}
+provider=blackberry.location;}
+else if(typeof(window.google)!="undefined"&&typeof(google.gears)!="undefined")
+{provider=google.gears.factory.create('beta.geolocation');pub.getCurrentPosition=function(successCallback,errorCallback,options)
+{function _successCallback(p)
+{if(typeof(p.latitude)!="undefined")
+{successCallback({timestamp:p.timestamp,coords:{latitude:p.latitude,longitude:p.longitude}});}
+else
+{successCallback(p);}}
+provider.getCurrentPosition(_successCallback,errorCallback,options);}}
+else if(typeof(Mojo)!=u&&typeof(Mojo.Service.Request)!="Mojo.Service.Request")
+{provider=true;pub.getCurrentPosition=function(success,error,opts)
+{parameters={};if(opts)
+{if(opts.enableHighAccuracy&&opts.enableHighAccuracy==true)
+{parameters.accuracy=1;}
+if(opts.maximumAge)
+{parameters.maximumAge=opts.maximumAge;}
+if(opts.responseTime)
+{if(opts.responseTime<5)
+{parameters.responseTime=1;}
+else if(opts.responseTime<20)
+{parameters.responseTime=2;}
+else
+{parameters.timeout=3;}}}
+r=new Mojo.Service.Request('palm://com.palm.location',{method:"getCurrentPosition",parameters:parameters,onSuccess:function(p){success({timestamp:p.timestamp,coords:{latitude:p.latitude,longitude:p.longitude,heading:p.heading}});},onFailure:function(e){if(e.errorCode==1)
+{error({code:3,message:"Timeout"});}
+else if(e.errorCode==2)
+{error({code:2,message:"Position unavailable"});}
+else
+{error({code:0,message:"Unknown Error: webOS-code"+errorCode});}}});}}
+else if(typeof(device)!=u&&typeof(device.getServiceObject)!=u)
+{provider=device.getServiceObject("Service.Location","ILocation");pub.getCurrentPosition=function(success,error,opts)
+{function callback(transId,eventCode,result){if(eventCode==4)
+{error({message:"Position unavailable",code:2});}
+else
+{success({timestamp:null,coords:{latitude:result.ReturnValue.Latitude,longitude:result.ReturnValue.Longitude,altitude:result.ReturnValue.Altitude,heading:result.ReturnValue.Heading}});}}
+var criteria=new Object();criteria.LocationInformationClass="BasicLocationInformation";provider.ILocation.GetLocation(criteria,callback);}}}
+catch(e){if(typeof(console)!=u)
+{console.log(e);}
+return false;}
+return provider!=null;}
+return pub;}(); \ No newline at end of file
diff --git a/phonegap/www/js/jquery-1.7.0.min.js b/phonegap/www/js/jquery-1.7.0.min.js
new file mode 100644
index 000000000..3ca5e0f5d
--- /dev/null
+++ b/phonegap/www/js/jquery-1.7.0.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.7 jquery.com | jquery.org/license */
+(function(a,b){function cA(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cx(a){if(!cm[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cn||(cn=c.createElement("iframe"),cn.frameBorder=cn.width=cn.height=0),b.appendChild(cn);if(!co||!cn.createElement)co=(cn.contentWindow||cn.contentDocument).document,co.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),co.close();d=co.createElement(a),co.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cn)}cm[a]=e}return cm[a]}function cw(a,b){var c={};f.each(cs.concat.apply([],cs.slice(0,b)),function(){c[this]=a});return c}function cv(){ct=b}function cu(){setTimeout(cv,0);return ct=f.now()}function cl(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ck(){try{return new a.XMLHttpRequest}catch(b){}}function ce(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cd(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function cc(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bG.test(a)?d(a,e):cc(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)cc(a+"["+e+"]",b[e],c,d);else d(a,b)}function cb(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function ca(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bV,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=ca(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=ca(a,c,d,e,"*",g));return l}function b_(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bR),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bE(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bz:bA;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bB(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function br(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bi,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bq(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bp(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bp)}function bp(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bo(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bn(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bm(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bl(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function X(a){var b=Y.split(" "),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function W(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(R.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(){return!0}function M(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.add(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return a!=null&&m.test(a)&&!isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(I)return I.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())}),typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return e});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){return i.done.apply(i,arguments).fail.apply(i,arguments)},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,unknownElems:!!a.getElementsByTagName("nav").length,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",enctype:!!c.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.lastChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-999px",top:"-999px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;f(function(){var a,b,d,e,g,h,i=1,j="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",l="visibility:hidden;border:0;",n="style='"+j+"border:5px solid #000;padding:0;'",p="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>";m=c.getElementsByTagName("body")[0];!m||(a=c.createElement("div"),a.style.cssText=l+"width:0;height:0;position:static;top:0;margin-top:"+i+"px",m.insertBefore(a,m.firstChild),o=c.createElement("div"),o.style.cssText=j+l,o.innerHTML=p,a.appendChild(o),b=o.firstChild,d=b.firstChild,g=b.nextSibling.firstChild.firstChild,h={doesNotAddBorder:d.offsetTop!==5,doesAddBorderForTableAndCells:g.offsetTop===5},d.style.position="fixed",d.style.top="20px",h.fixedPosition=d.offsetTop===20||d.offsetTop===15,d.style.position=d.style.top="",b.style.overflow="hidden",b.style.position="relative",h.subtractsBorderForOverflowNotVisible=d.offsetTop===-5,h.doesNotIncludeMarginInBodyOffset=m.offsetTop!==i,m.removeChild(a),o=a=null,f.extend(k,h))}),o.innerHTML="",n.removeChild(o),o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[f.expando]:a[f.expando]&&f.expando,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[f.expando]=n=++f.uuid:n=f.expando),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[f.expando]:f.expando;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)?b=b:b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" "));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}return b}e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!a||j===3||j===8||j===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g},removeAttr:function(a,b){var c,d,e,g,h=0;if(a.nodeType===1){d=(b||"").split(p),g=d.length;for(;h<g;h++)e=d[h].toLowerCase(),c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1)}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return b;h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/\.(.*)$/,A=/^(?:textarea|input|select)$/i,B=/\./g,C=/ /g,D=/[^\w\s.|`]/g,E=/^([^\.]*)?(?:\.(.+))?$/,F=/\bhover(\.\S+)?/,G=/^key/,H=/^(?:mouse|contextmenu)|click/,I=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,J=function(a){var b=I.exec(a);b&&
+(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},K=function(a,b){return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||a.id===b[2])&&(!b[3]||b[3].test(a.className))},L=function(a){return f.event.special.hover?a:a.replace(F,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=L(c).split(" ");for(k=0;k<c.length;k++){l=E.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,namespace:n.join(".")},p),g&&(o.quick=J(g),!o.quick&&f.expr.match.POS.test(g)&&(o.isPositional=!0)),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d){var e=f.hasData(a)&&f._data(a),g,h,i,j,k,l,m,n,o,p,q;if(!!e&&!!(m=e.events)){b=L(b||"").split(" ");for(g=0;g<b.length;g++){h=E.exec(b[g])||[],i=h[1],j=h[2];if(!i){j=j?"."+j:"";for(l in m)f.event.remove(a,l+j,c,d);return}n=f.event.special[i]||{},i=(d?n.delegateType:n.bindType)||i,p=m[i]||[],k=p.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;if(c||j||d||n.remove)for(l=0;l<p.length;l++){q=p[l];if(!c||c.guid===q.guid)if(!j||j.test(q.namespace))if(!d||d===q.selector||d==="**"&&q.selector)p.splice(l--,1),q.selector&&p.delegateCount--,n.remove&&n.remove.call(a,q)}else p.length=0;p.length===0&&k!==p.length&&((!n.teardown||n.teardown.call(a,j)===!1)&&f.removeEvent(a,i,e.handle),delete m[i])}f.isEmptyObject(m)&&(o=e.handle,o&&(o.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"",(g||!e)&&c.preventDefault();if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,n=null;for(m=e.parentNode;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length;l++){m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d);if(c.isPropagationStopped())break}c.type=h,c.isDefaultPrevented()||(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=(f.event.special[c.type]||{}).handle,j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click"))for(m=c.target;m!=this;m=m.parentNode||this){o={},q=[];for(k=0;k<e;k++)r=d[k],s=r.selector,t=o[s],r.isPositional?t=(t||(o[s]=f(s))).index(m)>=0:t===b&&(t=o[s]=r.quick?K(m,r.quick):f(m).is(s)),t&&q.push(r);q.length&&j.push({elem:m,matches:q})}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){p=j[k],c.currentTarget=p.elem;for(l=0;l<p.matches.length&&!c.isImmediatePropagationStopped();l++){r=p.matches[l];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=(i||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},focus:{delegateType:"focusin",noBubble:!0},blur:{delegateType:"focusout",noBubble:!0},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?N:M):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=N;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=N;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=N,this.stopPropagation()},isDefaultPrevented:M,isPropagationStopped:M,isImmediatePropagationStopped:M},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]=f.event.special[b]={delegateType:b,bindType:b,handle:function(a){var b=this,c=a.relatedTarget,d=a.handleObj,e=d.selector,g,h;if(!c||d.origType===a.type||c!==b&&!f.contains(b,c))g=a.type,a.type=d.origType,h=d.handler.apply(this,arguments),a.type=g;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(A.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;A.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return A.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=M;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=M);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),G.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),H.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw"Syntax error, unrecognized expression: "+a};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?T.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",Z=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,_=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,ba=/<([\w:]+)/,bb=/<tbody/i,bc=/<|&#?\w+;/,bd=/<(?:script|style)/i,be=/<(?:script|object|embed|option|style)/i,bf=new RegExp("<(?:"+Y.replace(" ","|")+")","i"),bg=/checked\s*(?:[^=]|=\s*.checked.)/i,bh=/\/(java|ecma)script/i,bi=/^\s*<!(?:\[CDATA\[|\-\-)/,bj={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bk=X(c);bj.optgroup=bj.option,bj.tbody=bj.tfoot=bj.colgroup=bj.caption=bj.thead,bj.th=bj.td,f.support.htmlSerialize||(bj._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after"
+,arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Z,""):null;if(typeof a=="string"&&!bd.test(a)&&(f.support.leadingWhitespace||!$.test(a))&&!bj[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(_,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bg.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bl(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,br)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!be.test(j)&&(f.support.checkClone||!bg.test(j))&&!f.support.unknownElems&&bf.test(j)&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bn(a,d),e=bo(a),g=bo(d);for(h=0;e[h];++h)g[h]&&bn(e[h],g[h])}if(b){bm(a,d);if(c){e=bo(a),g=bo(d);for(h=0;e[h];++h)bm(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bc.test(k))k=b.createTextNode(k);else{k=k.replace(_,"<$1></$2>");var l=(ba.exec(k)||["",""])[1].toLowerCase(),m=bj[l]||bj._default,n=m[0],o=b.createElement("div");b===c?bk.appendChild(o):X(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=bb.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&$.test(k)&&o.insertBefore(b.createTextNode($.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bq(k[i]);else bq(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bh.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bs=/alpha\([^)]*\)/i,bt=/opacity=([^)]*)/,bu=/([A-Z]|^ms)/g,bv=/^-?\d+(?:px)?$/i,bw=/^-?\d/,bx=/^([\-+])=([\-+.\de]+)/,by={position:"absolute",visibility:"hidden",display:"block"},bz=["Left","Right"],bA=["Top","Bottom"],bB,bC,bD;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bB(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bx.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bB)return bB(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bE(a,b,d);f.swap(a,by,function(){e=bE(a,b,d)});return e}},set:function(a,b){if(!bv.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bt.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bs,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bs.test(g)?g.replace(bs,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bB(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bC=function(a,c){var d,e,g;c=c.replace(bu,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bD=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bv.test(f)&&bw.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bB=bC||bD,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bF=/%20/g,bG=/\[\]$/,bH=/\r?\n/g,bI=/#.*$/,bJ=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bK=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bL=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bM=/^(?:GET|HEAD)$/,bN=/^\/\//,bO=/\?/,bP=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bQ=/^(?:select|textarea)/i,bR=/\s+/,bS=/([?&])_=[^&]*/,bT=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bU=f.fn.load,bV={},bW={},bX,bY,bZ=["*/"]+["*"];try{bX=e.href}catch(b$){bX=c.createElement("a"),bX.href="",bX=bX.href}bY=bT.exec(bX.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bU)return bU.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bP,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bQ.test(this.nodeName)||bK.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bH,"\r\n")}}):{name:b.name,value:c.replace(bH,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?cb(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),cb(a,b);return a},ajaxSettings:{url:bX,isLocal:bL.test(bY[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bZ},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:b_(bV),ajaxTransport:b_(bW),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cd(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=ce(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bJ.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bI,"").replace(bN,bY[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bR),d.crossDomain==null&&(r=bT.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bY[1]&&r[2]==bY[2]&&(r[3]||(r[1]==="http:"?80:443))==(bY[3]||(bY[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),ca(bV,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bM.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bO.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bS,"$1_="+x);d.url=y+(y===d.url?(bO.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bZ+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=ca(bW,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)cc(g,a[g],c,e);return d.join("&").replace(bF,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cf=f.now(),cg=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cf++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cg.test(b.url)||e&&cg.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cg,l),b.url===j&&(e&&(k=k.replace(cg,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ch=a.ActiveXObject?function(){for(var a in cj)cj[a](0,1)}:!1,ci=0,cj;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ck()||cl()}:ck,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ch&&delete cj[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++ci,ch&&(cj||(cj={},f(a).unload(ch)),cj[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cm={},cn,co,cp=/^(?:toggle|show|hide)$/,cq=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cr,cs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],ct;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cw("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cx(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cw("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cw("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cx(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cp.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=cq.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cw("show",1),slideUp:cw("hide",1),slideToggle:cw("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=ct||cu(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cr&&(cr=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=ct||cu(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cr),cr=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now))}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cy=/^t(?:able|d|h)$/i,cz=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cA(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cy.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cz.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cz.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cA(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cA(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file
diff --git a/phonegap/www/js/jquery.ba-hashchange.min.js b/phonegap/www/js/jquery.ba-hashchange.min.js
new file mode 100644
index 000000000..3c607bae3
--- /dev/null
+++ b/phonegap/www/js/jquery.ba-hashchange.min.js
@@ -0,0 +1,9 @@
+/*
+ * jQuery hashchange event - v1.3 - 7/21/2010
+ * http://benalman.com/projects/jquery-hashchange-plugin/
+ *
+ * Copyright (c) 2010 "Cowboy" Ben Alman
+ * Dual licensed under the MIT and GPL licenses.
+ * http://benalman.com/about/license/
+ */
+(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s){}}}};j.stop=k;o=function(){return a(q.location.href)};l=function(v,s){var u=q.document,t=$.fn[c].domain;if(v!==s){u.title=h.title;u.open();t&&u.write('<script>document.domain="'+t+'"<\/script>');u.close();q.location.hash=v}}})();return j})()})(jQuery,this); \ No newline at end of file
diff --git a/phonegap/www/js/jquery.validate.js b/phonegap/www/js/jquery.validate.js
new file mode 100644
index 000000000..b7ed45b4a
--- /dev/null
+++ b/phonegap/www/js/jquery.validate.js
@@ -0,0 +1,1188 @@
+/**
+ * jQuery Validation Plugin 1.9.0
+ *
+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
+ * http://docs.jquery.com/Plugins/Validation
+ *
+ * Copyright (c) 2006 - 2011 Jörn Zaefferer
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ */
+
+(function($) {
+
+$.extend($.fn, {
+ // http://docs.jquery.com/Plugins/Validation/validate
+ validate: function( options ) {
+
+ // if nothing is selected, return nothing; can't chain anyway
+ if (!this.length) {
+ options && options.debug && window.console && console.warn( "nothing selected, can't validate, returning nothing" );
+ return;
+ }
+
+ // check if a validator for this form was already created
+ var validator = $.data(this[0], 'validator');
+ if ( validator ) {
+ return validator;
+ }
+
+ // Add novalidate tag if HTML5.
+ this.attr('novalidate', 'novalidate');
+
+ validator = new $.validator( options, this[0] );
+ $.data(this[0], 'validator', validator);
+
+ if ( validator.settings.onsubmit ) {
+
+ var inputsAndButtons = this.find("input, button");
+
+ // allow suppresing validation by adding a cancel class to the submit button
+ inputsAndButtons.filter(".cancel").click(function () {
+ validator.cancelSubmit = true;
+ });
+
+ // when a submitHandler is used, capture the submitting button
+ if (validator.settings.submitHandler) {
+ inputsAndButtons.filter(":submit").click(function () {
+ validator.submitButton = this;
+ });
+ }
+
+ // validate the form on submit
+ this.submit( function( event ) {
+ if ( validator.settings.debug )
+ // prevent form submit to be able to see console output
+ event.preventDefault();
+
+ function handle() {
+ if ( validator.settings.submitHandler ) {
+ if (validator.submitButton) {
+ // insert a hidden input as a replacement for the missing submit button
+ var hidden = $("<input type='hidden'/>").attr("name", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);
+ }
+ validator.settings.submitHandler.call( validator, validator.currentForm );
+ if (validator.submitButton) {
+ // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ hidden.remove();
+ }
+ return false;
+ }
+ return true;
+ }
+
+ // prevent submit for invalid forms or custom submit handlers
+ if ( validator.cancelSubmit ) {
+ validator.cancelSubmit = false;
+ return handle();
+ }
+ if ( validator.form() ) {
+ if ( validator.pendingRequest ) {
+ validator.formSubmitted = true;
+ return false;
+ }
+ return handle();
+ } else {
+ validator.focusInvalid();
+ return false;
+ }
+ });
+ }
+
+ return validator;
+ },
+ // http://docs.jquery.com/Plugins/Validation/valid
+ valid: function() {
+ if ( $(this[0]).is('form')) {
+ return this.validate().form();
+ } else {
+ var valid = true;
+ var validator = $(this[0].form).validate();
+ this.each(function() {
+ valid &= validator.element(this);
+ });
+ return valid;
+ }
+ },
+ // attributes: space seperated list of attributes to retrieve and remove
+ removeAttrs: function(attributes) {
+ var result = {},
+ $element = this;
+ $.each(attributes.split(/\s/), function(index, value) {
+ result[value] = $element.attr(value);
+ $element.removeAttr(value);
+ });
+ return result;
+ },
+ // http://docs.jquery.com/Plugins/Validation/rules
+ rules: function(command, argument) {
+ var element = this[0];
+
+ if (command) {
+ var settings = $.data(element.form, 'validator').settings;
+ var staticRules = settings.rules;
+ var existingRules = $.validator.staticRules(element);
+ switch(command) {
+ case "add":
+ $.extend(existingRules, $.validator.normalizeRule(argument));
+ staticRules[element.name] = existingRules;
+ if (argument.messages)
+ settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );
+ break;
+ case "remove":
+ if (!argument) {
+ delete staticRules[element.name];
+ return existingRules;
+ }
+ var filtered = {};
+ $.each(argument.split(/\s/), function(index, method) {
+ filtered[method] = existingRules[method];
+ delete existingRules[method];
+ });
+ return filtered;
+ }
+ }
+
+ var data = $.validator.normalizeRules(
+ $.extend(
+ {},
+ $.validator.metadataRules(element),
+ $.validator.classRules(element),
+ $.validator.attributeRules(element),
+ $.validator.staticRules(element)
+ ), element);
+
+ // make sure required is at front
+ if (data.required) {
+ var param = data.required;
+ delete data.required;
+ data = $.extend({required: param}, data);
+ }
+
+ return data;
+ }
+});
+
+// Custom selectors
+$.extend($.expr[":"], {
+ // http://docs.jquery.com/Plugins/Validation/blank
+ blank: function(a) {return !$.trim("" + a.value);},
+ // http://docs.jquery.com/Plugins/Validation/filled
+ filled: function(a) {return !!$.trim("" + a.value);},
+ // http://docs.jquery.com/Plugins/Validation/unchecked
+ unchecked: function(a) {return !a.checked;}
+});
+
+// constructor for validator
+$.validator = function( options, form ) {
+ this.settings = $.extend( true, {}, $.validator.defaults, options );
+ this.currentForm = form;
+ this.init();
+};
+
+$.validator.format = function(source, params) {
+ if ( arguments.length == 1 )
+ return function() {
+ var args = $.makeArray(arguments);
+ args.unshift(source);
+ return $.validator.format.apply( this, args );
+ };
+ if ( arguments.length > 2 && params.constructor != Array ) {
+ params = $.makeArray(arguments).slice(1);
+ }
+ if ( params.constructor != Array ) {
+ params = [ params ];
+ }
+ $.each(params, function(i, n) {
+ source = source.replace(new RegExp("\\{" + i + "\\}", "g"), n);
+ });
+ return source;
+};
+
+$.extend($.validator, {
+
+ defaults: {
+ messages: {},
+ groups: {},
+ rules: {},
+ errorClass: "error",
+ validClass: "valid",
+ errorElement: "label",
+ focusInvalid: true,
+ errorContainer: $( [] ),
+ errorLabelContainer: $( [] ),
+ onsubmit: true,
+ ignore: ":hidden",
+ ignoreTitle: false,
+ onfocusin: function(element, event) {
+ this.lastActive = element;
+
+ // hide error label and remove error class on focus if enabled
+ if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
+ this.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
+ this.addWrapper(this.errorsFor(element)).hide();
+ }
+ },
+ onfocusout: function(element, event) {
+ if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {
+ this.element(element);
+ }
+ },
+ onkeyup: function(element, event) {
+ if ( element.name in this.submitted || element == this.lastElement ) {
+ this.element(element);
+ }
+ },
+ onclick: function(element, event) {
+ // click on selects, radiobuttons and checkboxes
+ if ( element.name in this.submitted )
+ this.element(element);
+ // or option elements, check parent select in that case
+ else if (element.parentNode.name in this.submitted)
+ this.element(element.parentNode);
+ },
+ highlight: function(element, errorClass, validClass) {
+ if (element.type === 'radio') {
+ this.findByName(element.name).addClass(errorClass).removeClass(validClass);
+ } else {
+ $(element).addClass(errorClass).removeClass(validClass);
+ }
+ },
+ unhighlight: function(element, errorClass, validClass) {
+ if (element.type === 'radio') {
+ this.findByName(element.name).removeClass(errorClass).addClass(validClass);
+ } else {
+ $(element).removeClass(errorClass).addClass(validClass);
+ }
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/setDefaults
+ setDefaults: function(settings) {
+ $.extend( $.validator.defaults, settings );
+ },
+
+ messages: {
+ required: "This field is required.",
+ remote: "Please fix this field.",
+ email: "Please enter a valid email address.",
+ url: "Please enter a valid URL.",
+ date: "Please enter a valid date.",
+ dateISO: "Please enter a valid date (ISO).",
+ number: "Please enter a valid number.",
+ digits: "Please enter only digits.",
+ creditcard: "Please enter a valid credit card number.",
+ equalTo: "Please enter the same value again.",
+ accept: "Please enter a value with a valid extension.",
+ maxlength: $.validator.format("Please enter no more than {0} characters."),
+ minlength: $.validator.format("Please enter at least {0} characters."),
+ rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
+ range: $.validator.format("Please enter a value between {0} and {1}."),
+ max: $.validator.format("Please enter a value less than or equal to {0}."),
+ min: $.validator.format("Please enter a value greater than or equal to {0}.")
+ },
+
+ autoCreateRanges: false,
+
+ prototype: {
+
+ init: function() {
+ this.labelContainer = $(this.settings.errorLabelContainer);
+ this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
+ this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );
+ this.submitted = {};
+ this.valueCache = {};
+ this.pendingRequest = 0;
+ this.pending = {};
+ this.invalid = {};
+ this.reset();
+
+ var groups = (this.groups = {});
+ $.each(this.settings.groups, function(key, value) {
+ $.each(value.split(/\s/), function(index, name) {
+ groups[name] = key;
+ });
+ });
+ var rules = this.settings.rules;
+ $.each(rules, function(key, value) {
+ rules[key] = $.validator.normalizeRule(value);
+ });
+
+ function delegate(event) {
+ var validator = $.data(this[0].form, "validator"),
+ eventType = "on" + event.type.replace(/^validate/, "");
+ validator.settings[eventType] && validator.settings[eventType].call(validator, this[0], event);
+ }
+ $(this.currentForm)
+ .validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, " +
+ "[type='number'], [type='search'] ,[type='tel'], [type='url'], " +
+ "[type='email'], [type='datetime'], [type='date'], [type='month'], " +
+ "[type='week'], [type='time'], [type='datetime-local'], " +
+ "[type='range'], [type='color'] ",
+ "focusin focusout keyup", delegate)
+ .validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", delegate);
+
+ if (this.settings.invalidHandler)
+ $(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/form
+ form: function() {
+ this.checkForm();
+ $.extend(this.submitted, this.errorMap);
+ this.invalid = $.extend({}, this.errorMap);
+ if (!this.valid())
+ $(this.currentForm).triggerHandler("invalid-form", [this]);
+ this.showErrors();
+ return this.valid();
+ },
+
+ checkForm: function() {
+ this.prepareForm();
+ for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
+ this.check( elements[i] );
+ }
+ return this.valid();
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/element
+ element: function( element ) {
+ element = this.validationTargetFor( this.clean( element ) );
+ this.lastElement = element;
+ this.prepareElement( element );
+ this.currentElements = $(element);
+ var result = this.check( element );
+ if ( result ) {
+ delete this.invalid[element.name];
+ } else {
+ this.invalid[element.name] = true;
+ }
+ if ( !this.numberOfInvalids() ) {
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+ return result;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/showErrors
+ showErrors: function(errors) {
+ if(errors) {
+ // add items to error list and map
+ $.extend( this.errorMap, errors );
+ this.errorList = [];
+ for ( var name in errors ) {
+ this.errorList.push({
+ message: errors[name],
+ element: this.findByName(name)[0]
+ });
+ }
+ // remove items from success list
+ this.successList = $.grep( this.successList, function(element) {
+ return !(element.name in errors);
+ });
+ }
+ this.settings.showErrors
+ ? this.settings.showErrors.call( this, this.errorMap, this.errorList )
+ : this.defaultShowErrors();
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/resetForm
+ resetForm: function() {
+ if ( $.fn.resetForm )
+ $( this.currentForm ).resetForm();
+ this.submitted = {};
+ this.lastElement = null;
+ this.prepareForm();
+ this.hideErrors();
+ this.elements().removeClass( this.settings.errorClass );
+ },
+
+ numberOfInvalids: function() {
+ return this.objectLength(this.invalid);
+ },
+
+ objectLength: function( obj ) {
+ var count = 0;
+ for ( var i in obj )
+ count++;
+ return count;
+ },
+
+ hideErrors: function() {
+ this.addWrapper( this.toHide ).hide();
+ },
+
+ valid: function() {
+ return this.size() == 0;
+ },
+
+ size: function() {
+ return this.errorList.length;
+ },
+
+ focusInvalid: function() {
+ if( this.settings.focusInvalid ) {
+ try {
+ $(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])
+ .filter(":visible")
+ .focus()
+ // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger("focusin");
+ } catch(e) {
+ // ignore IE throwing errors when focusing hidden elements
+ }
+ }
+ },
+
+ findLastActive: function() {
+ var lastActive = this.lastActive;
+ return lastActive && $.grep(this.errorList, function(n) {
+ return n.element.name == lastActive.name;
+ }).length == 1 && lastActive;
+ },
+
+ elements: function() {
+ var validator = this,
+ rulesCache = {};
+
+ // select all valid inputs inside the form (no submit or reset buttons)
+ return $(this.currentForm)
+ .find("input, select, textarea")
+ .not(":submit, :reset, :image, [disabled]")
+ .not( this.settings.ignore )
+ .filter(function() {
+ !this.name && validator.settings.debug && window.console && console.error( "%o has no name assigned", this);
+
+ // select only the first element for each name, and only those with rules specified
+ if ( this.name in rulesCache || !validator.objectLength($(this).rules()) )
+ return false;
+
+ rulesCache[this.name] = true;
+ return true;
+ });
+ },
+
+ clean: function( selector ) {
+ return $( selector )[0];
+ },
+
+ errors: function() {
+ return $( this.settings.errorElement + "." + this.settings.errorClass, this.errorContext );
+ },
+
+ reset: function() {
+ this.successList = [];
+ this.errorList = [];
+ this.errorMap = {};
+ this.toShow = $([]);
+ this.toHide = $([]);
+ this.currentElements = $([]);
+ },
+
+ prepareForm: function() {
+ this.reset();
+ this.toHide = this.errors().add( this.containers );
+ },
+
+ prepareElement: function( element ) {
+ this.reset();
+ this.toHide = this.errorsFor(element);
+ },
+
+ check: function( element ) {
+ element = this.validationTargetFor( this.clean( element ) );
+
+ var rules = $(element).rules();
+ var dependencyMismatch = false;
+ for (var method in rules ) {
+ var rule = { method: method, parameters: rules[method] };
+ try {
+ var result = $.validator.methods[method].call( this, element.value.replace(/\r/g, ""), element, rule.parameters );
+
+ // if a method indicates that the field is optional and therefore valid,
+ // don't mark it as valid when there are no other rules
+ if ( result == "dependency-mismatch" ) {
+ dependencyMismatch = true;
+ continue;
+ }
+ dependencyMismatch = false;
+
+ if ( result == "pending" ) {
+ this.toHide = this.toHide.not( this.errorsFor(element) );
+ return;
+ }
+
+ if( !result ) {
+ this.formatAndAdd( element, rule );
+ return false;
+ }
+ } catch(e) {
+ this.settings.debug && window.console && console.log("exception occured when checking element " + element.id
+ + ", check the '" + rule.method + "' method", e);
+ throw e;
+ }
+ }
+ if (dependencyMismatch)
+ return;
+ if ( this.objectLength(rules) )
+ this.successList.push(element);
+ return true;
+ },
+
+ // return the custom message for the given element and validation method
+ // specified in the element's "messages" metadata
+ customMetaMessage: function(element, method) {
+ if (!$.metadata)
+ return;
+
+ var meta = this.settings.meta
+ ? $(element).metadata()[this.settings.meta]
+ : $(element).metadata();
+
+ return meta && meta.messages && meta.messages[method];
+ },
+
+ // return the custom message for the given element name and validation method
+ customMessage: function( name, method ) {
+ var m = this.settings.messages[name];
+ return m && (m.constructor == String
+ ? m
+ : m[method]);
+ },
+
+ // return the first defined argument, allowing empty strings
+ findDefined: function() {
+ for(var i = 0; i < arguments.length; i++) {
+ if (arguments[i] !== undefined)
+ return arguments[i];
+ }
+ return undefined;
+ },
+
+ defaultMessage: function( element, method) {
+ return this.findDefined(
+ this.customMessage( element.name, method ),
+ this.customMetaMessage( element, method ),
+ // title is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[method],
+ "<strong>Warning: No message defined for " + element.name + "</strong>"
+ );
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule.method ),
+ theregex = /\$?\{(\d+)\}/g;
+ if ( typeof message == "function" ) {
+ message = message.call(this, rule.parameters, element);
+ } else if (theregex.test(message)) {
+ message = jQuery.format(message.replace(theregex, '{$1}'), rule.parameters);
+ }
+ this.errorList.push({
+ message: message,
+ element: element
+ });
+
+ this.errorMap[element.name] = message;
+ this.submitted[element.name] = message;
+ },
+
+ addWrapper: function(toToggle) {
+ if ( this.settings.wrapper )
+ toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );
+ return toToggle;
+ },
+
+ defaultShowErrors: function() {
+ for ( var i = 0; this.errorList[i]; i++ ) {
+ var error = this.errorList[i];
+ this.settings.highlight && this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );
+ this.showLabel( error.element, error.message );
+ }
+ if( this.errorList.length ) {
+ this.toShow = this.toShow.add( this.containers );
+ }
+ if (this.settings.success) {
+ for ( var i = 0; this.successList[i]; i++ ) {
+ this.showLabel( this.successList[i] );
+ }
+ }
+ if (this.settings.unhighlight) {
+ for ( var i = 0, elements = this.validElements(); elements[i]; i++ ) {
+ this.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );
+ }
+ }
+ this.toHide = this.toHide.not( this.toShow );
+ this.hideErrors();
+ this.addWrapper( this.toShow ).show();
+ },
+
+ validElements: function() {
+ return this.currentElements.not(this.invalidElements());
+ },
+
+ invalidElements: function() {
+ return $(this.errorList).map(function() {
+ return this.element;
+ });
+ },
+
+ showLabel: function(element, message) {
+ var label = this.errorsFor( element );
+ if ( label.length ) {
+ // refresh error/success class
+ label.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
+
+ // check if we have a generated label, replace the message then
+ label.attr("generated") && label.html(message);
+ } else {
+ // create label
+ label = $("<" + this.settings.errorElement + "/>")
+ .attr({"for": this.idOrName(element), generated: true})
+ .addClass(this.settings.errorClass)
+ .html(message || "");
+ if ( this.settings.wrapper ) {
+ // make sure the element is visible, even in IE
+ // actually showing the wrapped element is handled elsewhere
+ label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
+ }
+ if ( !this.labelContainer.append(label).length )
+ this.settings.errorPlacement
+ ? this.settings.errorPlacement(label, $(element) )
+ : label.insertAfter(element);
+ }
+ if ( !message && this.settings.success ) {
+ label.text("");
+ typeof this.settings.success == "string"
+ ? label.addClass( this.settings.success )
+ : this.settings.success( label );
+ }
+ this.toShow = this.toShow.add(label);
+ },
+
+ errorsFor: function(element) {
+ var name = this.idOrName(element);
+ return this.errors().filter(function() {
+ return $(this).attr('for') == name;
+ });
+ },
+
+ idOrName: function(element) {
+ return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
+ },
+
+ validationTargetFor: function(element) {
+ // if radio/checkbox, validate first element in group instead
+ if (this.checkable(element)) {
+ element = this.findByName( element.name ).not(this.settings.ignore)[0];
+ }
+ return element;
+ },
+
+ checkable: function( element ) {
+ return /radio|checkbox/i.test(element.type);
+ },
+
+ findByName: function( name ) {
+ // select by name and filter by form for performance over form.find("[name=...]")
+ var form = this.currentForm;
+ return $(document.getElementsByName(name)).map(function(index, element) {
+ return element.form == form && element.name == name && element || null;
+ });
+ },
+
+ getLength: function(value, element) {
+ switch( element.nodeName.toLowerCase() ) {
+ case 'select':
+ return $("option:selected", element).length;
+ case 'input':
+ if( this.checkable( element) )
+ return this.findByName(element.name).filter(':checked').length;
+ }
+ return value.length;
+ },
+
+ depend: function(param, element) {
+ return this.dependTypes[typeof param]
+ ? this.dependTypes[typeof param](param, element)
+ : true;
+ },
+
+ dependTypes: {
+ "boolean": function(param, element) {
+ return param;
+ },
+ "string": function(param, element) {
+ return !!$(param, element.form).length;
+ },
+ "function": function(param, element) {
+ return param(element);
+ }
+ },
+
+ optional: function(element) {
+ return !$.validator.methods.required.call(this, $.trim(element.value), element) && "dependency-mismatch";
+ },
+
+ startRequest: function(element) {
+ if (!this.pending[element.name]) {
+ this.pendingRequest++;
+ this.pending[element.name] = true;
+ }
+ },
+
+ stopRequest: function(element, valid) {
+ this.pendingRequest--;
+ // sometimes synchronization fails, make sure pendingRequest is never < 0
+ if (this.pendingRequest < 0)
+ this.pendingRequest = 0;
+ delete this.pending[element.name];
+ if ( valid && this.pendingRequest == 0 && this.formSubmitted && this.form() ) {
+ $(this.currentForm).submit();
+ this.formSubmitted = false;
+ } else if (!valid && this.pendingRequest == 0 && this.formSubmitted) {
+ $(this.currentForm).triggerHandler("invalid-form", [this]);
+ this.formSubmitted = false;
+ }
+ },
+
+ previousValue: function(element) {
+ return $.data(element, "previousValue") || $.data(element, "previousValue", {
+ old: null,
+ valid: true,
+ message: this.defaultMessage( element, "remote" )
+ });
+ }
+
+ },
+
+ classRuleSettings: {
+ required: {required: true},
+ email: {email: true},
+ url: {url: true},
+ date: {date: true},
+ dateISO: {dateISO: true},
+ dateDE: {dateDE: true},
+ number: {number: true},
+ numberDE: {numberDE: true},
+ digits: {digits: true},
+ creditcard: {creditcard: true}
+ },
+
+ addClassRules: function(className, rules) {
+ className.constructor == String ?
+ this.classRuleSettings[className] = rules :
+ $.extend(this.classRuleSettings, className);
+ },
+
+ classRules: function(element) {
+ var rules = {};
+ var classes = $(element).attr('class');
+ classes && $.each(classes.split(' '), function() {
+ if (this in $.validator.classRuleSettings) {
+ $.extend(rules, $.validator.classRuleSettings[this]);
+ }
+ });
+ return rules;
+ },
+
+ attributeRules: function(element) {
+ var rules = {};
+ var $element = $(element);
+
+ for (var method in $.validator.methods) {
+ var value;
+ // If .prop exists (jQuery >= 1.6), use it to get true/false for required
+ if (method === 'required' && typeof $.fn.prop === 'function') {
+ value = $element.prop(method);
+ } else {
+ value = $element.attr(method);
+ }
+ if (value) {
+ rules[method] = value;
+ } else if ($element[0].getAttribute("type") === method) {
+ rules[method] = true;
+ }
+ }
+
+ // maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
+ if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {
+ delete rules.maxlength;
+ }
+
+ return rules;
+ },
+
+ metadataRules: function(element) {
+ if (!$.metadata) return {};
+
+ var meta = $.data(element.form, 'validator').settings.meta;
+ return meta ?
+ $(element).metadata()[meta] :
+ $(element).metadata();
+ },
+
+ staticRules: function(element) {
+ var rules = {};
+ var validator = $.data(element.form, 'validator');
+ if (validator.settings.rules) {
+ rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
+ }
+ return rules;
+ },
+
+ normalizeRules: function(rules, element) {
+ // handle dependency check
+ $.each(rules, function(prop, val) {
+ // ignore rule when param is explicitly false, eg. required:false
+ if (val === false) {
+ delete rules[prop];
+ return;
+ }
+ if (val.param || val.depends) {
+ var keepRule = true;
+ switch (typeof val.depends) {
+ case "string":
+ keepRule = !!$(val.depends, element.form).length;
+ break;
+ case "function":
+ keepRule = val.depends.call(element, element);
+ break;
+ }
+ if (keepRule) {
+ rules[prop] = val.param !== undefined ? val.param : true;
+ } else {
+ delete rules[prop];
+ }
+ }
+ });
+
+ // evaluate parameters
+ $.each(rules, function(rule, parameter) {
+ rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
+ });
+
+ // clean number parameters
+ $.each(['minlength', 'maxlength', 'min', 'max'], function() {
+ if (rules[this]) {
+ rules[this] = Number(rules[this]);
+ }
+ });
+ $.each(['rangelength', 'range'], function() {
+ if (rules[this]) {
+ rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
+ }
+ });
+
+ if ($.validator.autoCreateRanges) {
+ // auto-create ranges
+ if (rules.min && rules.max) {
+ rules.range = [rules.min, rules.max];
+ delete rules.min;
+ delete rules.max;
+ }
+ if (rules.minlength && rules.maxlength) {
+ rules.rangelength = [rules.minlength, rules.maxlength];
+ delete rules.minlength;
+ delete rules.maxlength;
+ }
+ }
+
+ // To support custom messages in metadata ignore rule methods titled "messages"
+ if (rules.messages) {
+ delete rules.messages;
+ }
+
+ return rules;
+ },
+
+ // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
+ normalizeRule: function(data) {
+ if( typeof data == "string" ) {
+ var transformed = {};
+ $.each(data.split(/\s/), function() {
+ transformed[this] = true;
+ });
+ data = transformed;
+ }
+ return data;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/addMethod
+ addMethod: function(name, method, message) {
+ $.validator.methods[name] = method;
+ $.validator.messages[name] = message != undefined ? message : $.validator.messages[name];
+ if (method.length < 3) {
+ $.validator.addClassRules(name, $.validator.normalizeRule(name));
+ }
+ },
+
+ methods: {
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/required
+ required: function(value, element, param) {
+ // check if dependency is met
+ if ( !this.depend(param, element) )
+ return "dependency-mismatch";
+ switch( element.nodeName.toLowerCase() ) {
+ case 'select':
+ // could be an array for select-multiple or a string, both are fine this way
+ var val = $(element).val();
+ return val && val.length > 0;
+ case 'input':
+ if ( this.checkable(element) )
+ return this.getLength(value, element) > 0;
+ default:
+ return $.trim(value).length > 0;
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/remote
+ remote: function(value, element, param) {
+ if ( this.optional(element) )
+ return "dependency-mismatch";
+
+ var previous = this.previousValue(element);
+ if (!this.settings.messages[element.name] )
+ this.settings.messages[element.name] = {};
+ previous.originalMessage = this.settings.messages[element.name].remote;
+ this.settings.messages[element.name].remote = previous.message;
+
+ param = typeof param == "string" && {url:param} || param;
+
+ if ( this.pending[element.name] ) {
+ return "pending";
+ }
+ if ( previous.old === value ) {
+ return previous.valid;
+ }
+
+ previous.old = value;
+ var validator = this;
+ this.startRequest(element);
+ var data = {};
+ data[element.name] = value;
+ $.ajax($.extend(true, {
+ url: param,
+ mode: "abort",
+ port: "validate" + element.name,
+ dataType: "json",
+ data: data,
+ success: function(response) {
+ validator.settings.messages[element.name].remote = previous.originalMessage;
+ var valid = response === true;
+ if ( valid ) {
+ var submitted = validator.formSubmitted;
+ validator.prepareElement(element);
+ validator.formSubmitted = submitted;
+ validator.successList.push(element);
+ validator.showErrors();
+ } else {
+ var errors = {};
+ var message = response || validator.defaultMessage( element, "remote" );
+ errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;
+ validator.showErrors(errors);
+ }
+ previous.valid = valid;
+ validator.stopRequest(element, valid);
+ }
+ }, param));
+ return "pending";
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/minlength
+ minlength: function(value, element, param) {
+ return this.optional(element) || this.getLength($.trim(value), element) >= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/maxlength
+ maxlength: function(value, element, param) {
+ return this.optional(element) || this.getLength($.trim(value), element) <= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/rangelength
+ rangelength: function(value, element, param) {
+ var length = this.getLength($.trim(value), element);
+ return this.optional(element) || ( length >= param[0] && length <= param[1] );
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/min
+ min: function( value, element, param ) {
+ return this.optional(element) || value >= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/max
+ max: function( value, element, param ) {
+ return this.optional(element) || value <= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/range
+ range: function( value, element, param ) {
+ return this.optional(element) || ( value >= param[0] && value <= param[1] );
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/email
+ email: function(value, element) {
+ // contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
+ return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/url
+ url: function(value, element) {
+ // contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
+ return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/date
+ date: function(value, element) {
+ return this.optional(element) || !/Invalid|NaN/.test(new Date(value));
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/dateISO
+ dateISO: function(value, element) {
+ return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/number
+ number: function(value, element) {
+ return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/digits
+ digits: function(value, element) {
+ return this.optional(element) || /^\d+$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/creditcard
+ // based on http://en.wikipedia.org/wiki/Luhn
+ creditcard: function(value, element) {
+ if ( this.optional(element) )
+ return "dependency-mismatch";
+ // accept only spaces, digits and dashes
+ if (/[^0-9 -]+/.test(value))
+ return false;
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false;
+
+ value = value.replace(/\D/g, "");
+
+ for (var n = value.length - 1; n >= 0; n--) {
+ var cDigit = value.charAt(n);
+ var nDigit = parseInt(cDigit, 10);
+ if (bEven) {
+ if ((nDigit *= 2) > 9)
+ nDigit -= 9;
+ }
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return (nCheck % 10) == 0;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/accept
+ accept: function(value, element, param) {
+ param = typeof param == "string" ? param.replace(/,/g, '|') : "png|jpe?g|gif";
+ return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i"));
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/equalTo
+ equalTo: function(value, element, param) {
+ // bind to the blur event of the target in order to revalidate whenever the target field is updated
+ // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+ var target = $(param).unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
+ $(element).valid();
+ });
+ return value == target.val();
+ }
+
+ }
+
+});
+
+// deprecated, use $.validator.format instead
+$.format = $.validator.format;
+
+})(jQuery);
+
+// ajax mode: abort
+// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
+// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
+;(function($) {
+ var pendingRequests = {};
+ // Use a prefilter if available (1.5+)
+ if ( $.ajaxPrefilter ) {
+ $.ajaxPrefilter(function(settings, _, xhr) {
+ var port = settings.port;
+ if (settings.mode == "abort") {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ }
+ pendingRequests[port] = xhr;
+ }
+ });
+ } else {
+ // Proxy ajax
+ var ajax = $.ajax;
+ $.ajax = function(settings) {
+ var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
+ port = ( "port" in settings ? settings : $.ajaxSettings ).port;
+ if (mode == "abort") {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ }
+ return (pendingRequests[port] = ajax.apply(this, arguments));
+ }
+ return ajax.apply(this, arguments);
+ };
+ }
+})(jQuery);
+
+// provides cross-browser focusin and focusout events
+// IE has native support, in other browsers, use event caputuring (neither bubbles)
+
+// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
+// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
+;(function($) {
+ // only implement if not provided by jQuery core (since 1.4)
+ // TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs
+ if (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) {
+ $.each({
+ focus: 'focusin',
+ blur: 'focusout'
+ }, function( original, fix ){
+ $.event.special[fix] = {
+ setup:function() {
+ this.addEventListener( original, handler, true );
+ },
+ teardown:function() {
+ this.removeEventListener( original, handler, true );
+ },
+ handler: function(e) {
+ arguments[0] = $.event.fix(e);
+ arguments[0].type = fix;
+ return $.event.handle.apply(this, arguments);
+ }
+ };
+ function handler(e) {
+ e = $.event.fix(e);
+ e.type = fix;
+ return $.event.handle.call(this, e);
+ }
+ });
+ };
+ $.extend($.fn, {
+ validateDelegate: function(delegate, type, handler) {
+ return this.bind(type, function(event) {
+ var target = $(event.target);
+ if (target.is(delegate)) {
+ return handler.apply(target, arguments);
+ }
+ });
+ }
+ });
+})(jQuery);
diff --git a/phonegap/www/js/jquery.validate.min.js b/phonegap/www/js/jquery.validate.min.js
new file mode 100644
index 000000000..edd645255
--- /dev/null
+++ b/phonegap/www/js/jquery.validate.min.js
@@ -0,0 +1,51 @@
+/**
+ * jQuery Validation Plugin 1.9.0
+ *
+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
+ * http://docs.jquery.com/Plugins/Validation
+ *
+ * Copyright (c) 2006 - 2011 Jörn Zaefferer
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ */
+(function(c){c.extend(c.fn,{validate:function(a){if(this.length){var b=c.data(this[0],"validator");if(b)return b;this.attr("novalidate","novalidate");b=new c.validator(a,this[0]);c.data(this[0],"validator",b);if(b.settings.onsubmit){a=this.find("input, button");a.filter(".cancel").click(function(){b.cancelSubmit=true});b.settings.submitHandler&&a.filter(":submit").click(function(){b.submitButton=this});this.submit(function(d){function e(){if(b.settings.submitHandler){if(b.submitButton)var f=c("<input type='hidden'/>").attr("name",
+b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm);b.settings.submitHandler.call(b,b.currentForm);b.submitButton&&f.remove();return false}return true}b.settings.debug&&d.preventDefault();if(b.cancelSubmit){b.cancelSubmit=false;return e()}if(b.form()){if(b.pendingRequest){b.formSubmitted=true;return false}return e()}else{b.focusInvalid();return false}})}return b}else a&&a.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(c(this[0]).is("form"))return this.validate().form();
+else{var a=true,b=c(this[0].form).validate();this.each(function(){a&=b.element(this)});return a}},removeAttrs:function(a){var b={},d=this;c.each(a.split(/\s/),function(e,f){b[f]=d.attr(f);d.removeAttr(f)});return b},rules:function(a,b){var d=this[0];if(a){var e=c.data(d.form,"validator").settings,f=e.rules,g=c.validator.staticRules(d);switch(a){case "add":c.extend(g,c.validator.normalizeRule(b));f[d.name]=g;if(b.messages)e.messages[d.name]=c.extend(e.messages[d.name],b.messages);break;case "remove":if(!b){delete f[d.name];
+return g}var h={};c.each(b.split(/\s/),function(j,i){h[i]=g[i];delete g[i]});return h}}d=c.validator.normalizeRules(c.extend({},c.validator.metadataRules(d),c.validator.classRules(d),c.validator.attributeRules(d),c.validator.staticRules(d)),d);if(d.required){e=d.required;delete d.required;d=c.extend({required:e},d)}return d}});c.extend(c.expr[":"],{blank:function(a){return!c.trim(""+a.value)},filled:function(a){return!!c.trim(""+a.value)},unchecked:function(a){return!a.checked}});c.validator=function(a,
+b){this.settings=c.extend(true,{},c.validator.defaults,a);this.currentForm=b;this.init()};c.validator.format=function(a,b){if(arguments.length==1)return function(){var d=c.makeArray(arguments);d.unshift(a);return c.validator.format.apply(this,d)};if(arguments.length>2&&b.constructor!=Array)b=c.makeArray(arguments).slice(1);if(b.constructor!=Array)b=[b];c.each(b,function(d,e){a=a.replace(RegExp("\\{"+d+"\\}","g"),e)});return a};c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",
+validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(a){this.lastActive=a;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(a)).hide()}},onfocusout:function(a){if(!this.checkable(a)&&(a.name in this.submitted||!this.optional(a)))this.element(a)},
+onkeyup:function(a){if(a.name in this.submitted||a==this.lastElement)this.element(a)},onclick:function(a){if(a.name in this.submitted)this.element(a);else a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).addClass(b).removeClass(d):c(a).addClass(b).removeClass(d)},unhighlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).removeClass(b).addClass(d):c(a).removeClass(b).addClass(d)}},setDefaults:function(a){c.extend(c.validator.defaults,
+a)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:c.validator.format("Please enter no more than {0} characters."),
+minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(e){var f=c.data(this[0].form,"validator"),g="on"+e.type.replace(/^validate/,
+"");f.settings[g]&&f.settings[g].call(f,this[0],e)}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=this.groups={};c.each(this.settings.groups,function(e,f){c.each(f.split(/\s/),function(g,h){b[h]=e})});var d=
+this.settings.rules;c.each(d,function(e,f){d[e]=c.validator.normalizeRule(f)});c(this.currentForm).validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",a).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",
+a);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(a){this.lastElement=
+a=this.validationTargetFor(this.clean(a));this.prepareElement(a);this.currentElements=c(a);var b=this.check(a);if(b)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return b},showErrors:function(a){if(a){c.extend(this.errorMap,a);this.errorList=[];for(var b in a)this.errorList.push({message:a[b],element:this.findByName(b)[0]});this.successList=c.grep(this.successList,function(d){return!(d.name in a)})}this.settings.showErrors?
+this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b=0,d;for(d in a)b++;return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==
+0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&c.grep(this.errorList,function(b){return b.element.name==a.name}).length==1&&a},elements:function(){var a=this,b={};return c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&
+a.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!a.objectLength(c(this).rules()))return false;return b[this.name]=true})},clean:function(a){return c(a)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},
+prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(a){a=this.validationTargetFor(this.clean(a));var b=c(a).rules(),d=false,e;for(e in b){var f={method:e,parameters:b[e]};try{var g=c.validator.methods[e].call(this,a.value.replace(/\r/g,""),a,f.parameters);if(g=="dependency-mismatch")d=true;else{d=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!g){this.formatAndAdd(a,f);return false}}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+
+a.id+", check the '"+f.method+"' method",h);throw h;}}if(!d){this.objectLength(b)&&this.successList.push(a);return true}},customMetaMessage:function(a,b){if(c.metadata){var d=this.settings.meta?c(a).metadata()[this.settings.meta]:c(a).metadata();return d&&d.messages&&d.messages[b]}},customMessage:function(a,b){var d=this.settings.messages[a];return d&&(d.constructor==String?d:d[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(arguments[a]!==undefined)return arguments[a]},defaultMessage:function(a,
+b){return this.findDefined(this.customMessage(a.name,b),this.customMetaMessage(a,b),!this.settings.ignoreTitle&&a.title||undefined,c.validator.messages[b],"<strong>Warning: No message defined for "+a.name+"</strong>")},formatAndAdd:function(a,b){var d=this.defaultMessage(a,b.method),e=/\$?\{(\d+)\}/g;if(typeof d=="function")d=d.call(this,b.parameters,a);else if(e.test(d))d=jQuery.format(d.replace(e,"{$1}"),b.parameters);this.errorList.push({message:d,element:a});this.errorMap[a.name]=d;this.submitted[a.name]=
+d},addWrapper:function(a){if(this.settings.wrapper)a=a.add(a.parent(this.settings.wrapper));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var b=this.errorList[a];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);
+if(this.settings.unhighlight){a=0;for(b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return c(this.errorList).map(function(){return this.element})},showLabel:function(a,b){var d=this.errorsFor(a);if(d.length){d.removeClass(this.settings.validClass).addClass(this.settings.errorClass);
+d.attr("generated")&&d.html(b)}else{d=c("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(b||"");if(this.settings.wrapper)d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,c(a)):d.insertAfter(a))}if(!b&&this.settings.success){d.text("");typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow=
+this.toShow.add(d)},errorsFor:function(a){var b=this.idOrName(a);return this.errors().filter(function(){return c(this).attr("for")==b})},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(a){if(this.checkable(a))a=this.findByName(a.name).not(this.settings.ignore)[0];return a},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(a){var b=this.currentForm;return c(document.getElementsByName(a)).map(function(d,
+e){return e.form==b&&e.name==a&&e||null})},getLength:function(a,b){switch(b.nodeName.toLowerCase()){case "select":return c("option:selected",b).length;case "input":if(this.checkable(b))return this.findByName(b.name).filter(":checked").length}return a.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):true},dependTypes:{"boolean":function(a){return a},string:function(a,b){return!!c(a,b.form).length},"function":function(a,b){return a(b)}},optional:function(a){return!c.validator.methods.required.call(this,
+c.trim(a.value),a)&&"dependency-mismatch"},startRequest:function(a){if(!this.pending[a.name]){this.pendingRequest++;this.pending[a.name]=true}},stopRequest:function(a,b){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[a.name];if(b&&this.pendingRequest==0&&this.formSubmitted&&this.form()){c(this.currentForm).submit();this.formSubmitted=false}else if(!b&&this.pendingRequest==0&&this.formSubmitted){c(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=
+false}},previousValue:function(a){return c.data(a,"previousValue")||c.data(a,"previousValue",{old:null,valid:true,message:this.defaultMessage(a,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(a,b){a.constructor==String?this.classRuleSettings[a]=b:c.extend(this.classRuleSettings,
+a)},classRules:function(a){var b={};(a=c(a).attr("class"))&&c.each(a.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(b,c.validator.classRuleSettings[this])});return b},attributeRules:function(a){var b={};a=c(a);for(var d in c.validator.methods){var e;if(e=d==="required"&&typeof c.fn.prop==="function"?a.prop(d):a.attr(d))b[d]=e;else if(a[0].getAttribute("type")===d)b[d]=true}b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)&&delete b.maxlength;return b},metadataRules:function(a){if(!c.metadata)return{};
+var b=c.data(a.form,"validator").settings.meta;return b?c(a).metadata()[b]:c(a).metadata()},staticRules:function(a){var b={},d=c.data(a.form,"validator");if(d.settings.rules)b=c.validator.normalizeRule(d.settings.rules[a.name])||{};return b},normalizeRules:function(a,b){c.each(a,function(d,e){if(e===false)delete a[d];else if(e.param||e.depends){var f=true;switch(typeof e.depends){case "string":f=!!c(e.depends,b.form).length;break;case "function":f=e.depends.call(b,b)}if(f)a[d]=e.param!==undefined?
+e.param:true;else delete a[d]}});c.each(a,function(d,e){a[d]=c.isFunction(e)?e(b):e});c.each(["minlength","maxlength","min","max"],function(){if(a[this])a[this]=Number(a[this])});c.each(["rangelength","range"],function(){if(a[this])a[this]=[Number(a[this][0]),Number(a[this][1])]});if(c.validator.autoCreateRanges){if(a.min&&a.max){a.range=[a.min,a.max];delete a.min;delete a.max}if(a.minlength&&a.maxlength){a.rangelength=[a.minlength,a.maxlength];delete a.minlength;delete a.maxlength}}a.messages&&delete a.messages;
+return a},normalizeRule:function(a){if(typeof a=="string"){var b={};c.each(a.split(/\s/),function(){b[this]=true});a=b}return a},addMethod:function(a,b,d){c.validator.methods[a]=b;c.validator.messages[a]=d!=undefined?d:c.validator.messages[a];b.length<3&&c.validator.addClassRules(a,c.validator.normalizeRule(a))},methods:{required:function(a,b,d){if(!this.depend(d,b))return"dependency-mismatch";switch(b.nodeName.toLowerCase()){case "select":return(a=c(b).val())&&a.length>0;case "input":if(this.checkable(b))return this.getLength(a,
+b)>0;default:return c.trim(a).length>0}},remote:function(a,b,d){if(this.optional(b))return"dependency-mismatch";var e=this.previousValue(b);this.settings.messages[b.name]||(this.settings.messages[b.name]={});e.originalMessage=this.settings.messages[b.name].remote;this.settings.messages[b.name].remote=e.message;d=typeof d=="string"&&{url:d}||d;if(this.pending[b.name])return"pending";if(e.old===a)return e.valid;e.old=a;var f=this;this.startRequest(b);var g={};g[b.name]=a;c.ajax(c.extend(true,{url:d,
+mode:"abort",port:"validate"+b.name,dataType:"json",data:g,success:function(h){f.settings.messages[b.name].remote=e.originalMessage;var j=h===true;if(j){var i=f.formSubmitted;f.prepareElement(b);f.formSubmitted=i;f.successList.push(b);f.showErrors()}else{i={};h=h||f.defaultMessage(b,"remote");i[b.name]=e.message=c.isFunction(h)?h(a):h;f.showErrors(i)}e.valid=j;f.stopRequest(b,j)}},d));return"pending"},minlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)>=d},maxlength:function(a,
+b,d){return this.optional(b)||this.getLength(c.trim(a),b)<=d},rangelength:function(a,b,d){a=this.getLength(c.trim(a),b);return this.optional(b)||a>=d[0]&&a<=d[1]},min:function(a,b,d){return this.optional(b)||a>=d},max:function(a,b,d){return this.optional(b)||a<=d},range:function(a,b,d){return this.optional(b)||a>=d[0]&&a<=d[1]},email:function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(a)},
+url:function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},
+date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 -]+/.test(a))return false;var d=0,e=0,f=false;a=a.replace(/\D/g,"");for(var g=a.length-1;g>=
+0;g--){e=a.charAt(g);e=parseInt(e,10);if(f)if((e*=2)>9)e-=9;d+=e;f=!f}return d%10==0},accept:function(a,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||a.match(RegExp(".("+d+")$","i"))},equalTo:function(a,b,d){d=c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){c(b).valid()});return a==d.val()}}});c.format=c.validator.format})(jQuery);
+(function(c){var a={};if(c.ajaxPrefilter)c.ajaxPrefilter(function(d,e,f){e=d.port;if(d.mode=="abort"){a[e]&&a[e].abort();a[e]=f}});else{var b=c.ajax;c.ajax=function(d){var e=("port"in d?d:c.ajaxSettings).port;if(("mode"in d?d:c.ajaxSettings).mode=="abort"){a[e]&&a[e].abort();return a[e]=b.apply(this,arguments)}return b.apply(this,arguments)}}})(jQuery);
+(function(c){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.handle.call(this,e)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)},handler:function(e){arguments[0]=c.event.fix(e);arguments[0].type=b;return c.event.handle.apply(this,arguments)}}});c.extend(c.fn,{validateDelegate:function(a,
+b,d){return this.bind(b,function(e){var f=c(e.target);if(f.is(a))return d.apply(f,arguments)})}})})(jQuery);
diff --git a/phonegap/www/js/json2.js b/phonegap/www/js/json2.js
new file mode 100644
index 000000000..3b0c872d1
--- /dev/null
+++ b/phonegap/www/js/json2.js
@@ -0,0 +1,487 @@
+/*
+ json2.js
+ 2011-10-19
+
+ Public Domain.
+
+ NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+
+ See http://www.JSON.org/js.html
+
+
+ This code should be minified before deployment.
+ See http://javascript.crockford.com/jsmin.html
+
+ USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
+ NOT CONTROL.
+
+
+ This file creates a global JSON object containing two methods: stringify
+ and parse.
+
+ JSON.stringify(value, replacer, space)
+ value any JavaScript value, usually an object or array.
+
+ replacer an optional parameter that determines how object
+ values are stringified for objects. It can be a
+ function or an array of strings.
+
+ space an optional parameter that specifies the indentation
+ of nested structures. If it is omitted, the text will
+ be packed without extra whitespace. If it is a number,
+ it will specify the number of spaces to indent at each
+ level. If it is a string (such as '\t' or '&nbsp;'),
+ it contains the characters used to indent at each level.
+
+ This method produces a JSON text from a JavaScript value.
+
+ When an object value is found, if the object contains a toJSON
+ method, its toJSON method will be called and the result will be
+ stringified. A toJSON method does not serialize: it returns the
+ value represented by the name/value pair that should be serialized,
+ or undefined if nothing should be serialized. The toJSON method
+ will be passed the key associated with the value, and this will be
+ bound to the value
+
+ For example, this would serialize Dates as ISO strings.
+
+ Date.prototype.toJSON = function (key) {
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10 ? '0' + n : n;
+ }
+
+ return this.getUTCFullYear() + '-' +
+ f(this.getUTCMonth() + 1) + '-' +
+ f(this.getUTCDate()) + 'T' +
+ f(this.getUTCHours()) + ':' +
+ f(this.getUTCMinutes()) + ':' +
+ f(this.getUTCSeconds()) + 'Z';
+ };
+
+ You can provide an optional replacer method. It will be passed the
+ key and value of each member, with this bound to the containing
+ object. The value that is returned from your method will be
+ serialized. If your method returns undefined, then the member will
+ be excluded from the serialization.
+
+ If the replacer parameter is an array of strings, then it will be
+ used to select the members to be serialized. It filters the results
+ such that only members with keys listed in the replacer array are
+ stringified.
+
+ Values that do not have JSON representations, such as undefined or
+ functions, will not be serialized. Such values in objects will be
+ dropped; in arrays they will be replaced with null. You can use
+ a replacer function to replace those with JSON values.
+ JSON.stringify(undefined) returns undefined.
+
+ The optional space parameter produces a stringification of the
+ value that is filled with line breaks and indentation to make it
+ easier to read.
+
+ If the space parameter is a non-empty string, then that string will
+ be used for indentation. If the space parameter is a number, then
+ the indentation will be that many spaces.
+
+ Example:
+
+ text = JSON.stringify(['e', {pluribus: 'unum'}]);
+ // text is '["e",{"pluribus":"unum"}]'
+
+
+ text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
+ // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
+
+ text = JSON.stringify([new Date()], function (key, value) {
+ return this[key] instanceof Date ?
+ 'Date(' + this[key] + ')' : value;
+ });
+ // text is '["Date(---current time---)"]'
+
+
+ JSON.parse(text, reviver)
+ This method parses a JSON text to produce an object or array.
+ It can throw a SyntaxError exception.
+
+ The optional reviver parameter is a function that can filter and
+ transform the results. It receives each of the keys and values,
+ and its return value is used instead of the original value.
+ If it returns what it received, then the structure is not modified.
+ If it returns undefined then the member is deleted.
+
+ Example:
+
+ // Parse the text. Values that look like ISO date strings will
+ // be converted to Date objects.
+
+ myData = JSON.parse(text, function (key, value) {
+ var a;
+ if (typeof value === 'string') {
+ a =
+/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
+ if (a) {
+ return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
+ +a[5], +a[6]));
+ }
+ }
+ return value;
+ });
+
+ myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
+ var d;
+ if (typeof value === 'string' &&
+ value.slice(0, 5) === 'Date(' &&
+ value.slice(-1) === ')') {
+ d = new Date(value.slice(5, -1));
+ if (d) {
+ return d;
+ }
+ }
+ return value;
+ });
+
+
+ This is a reference implementation. You are free to copy, modify, or
+ redistribute.
+*/
+
+/*jslint evil: true, regexp: true */
+
+/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
+ call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
+ getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
+ lastIndex, length, parse, prototype, push, replace, slice, stringify,
+ test, toJSON, toString, valueOf
+*/
+
+
+// Create a JSON object only if one does not already exist. We create the
+// methods in a closure to avoid creating global variables.
+
+var JSON;
+if (!JSON) {
+ JSON = {};
+}
+
+(function () {
+ 'use strict';
+
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10 ? '0' + n : n;
+ }
+
+ if (typeof Date.prototype.toJSON !== 'function') {
+
+ Date.prototype.toJSON = function (key) {
+
+ return isFinite(this.valueOf())
+ ? this.getUTCFullYear() + '-' +
+ f(this.getUTCMonth() + 1) + '-' +
+ f(this.getUTCDate()) + 'T' +
+ f(this.getUTCHours()) + ':' +
+ f(this.getUTCMinutes()) + ':' +
+ f(this.getUTCSeconds()) + 'Z'
+ : null;
+ };
+
+ String.prototype.toJSON =
+ Number.prototype.toJSON =
+ Boolean.prototype.toJSON = function (key) {
+ return this.valueOf();
+ };
+ }
+
+ var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ gap,
+ indent,
+ meta = { // table of character substitutions
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"' : '\\"',
+ '\\': '\\\\'
+ },
+ rep;
+
+
+ function quote(string) {
+
+// If the string contains no control characters, no quote characters, and no
+// backslash characters, then we can safely slap some quotes around it.
+// Otherwise we must also replace the offending characters with safe escape
+// sequences.
+
+ escapable.lastIndex = 0;
+ return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
+ var c = meta[a];
+ return typeof c === 'string'
+ ? c
+ : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ }) + '"' : '"' + string + '"';
+ }
+
+
+ function str(key, holder) {
+
+// Produce a string from holder[key].
+
+ var i, // The loop counter.
+ k, // The member key.
+ v, // The member value.
+ length,
+ mind = gap,
+ partial,
+ value = holder[key];
+
+// If the value has a toJSON method, call it to obtain a replacement value.
+
+ if (value && typeof value === 'object' &&
+ typeof value.toJSON === 'function') {
+ value = value.toJSON(key);
+ }
+
+// If we were called with a replacer function, then call the replacer to
+// obtain a replacement value.
+
+ if (typeof rep === 'function') {
+ value = rep.call(holder, key, value);
+ }
+
+// What happens next depends on the value's type.
+
+ switch (typeof value) {
+ case 'string':
+ return quote(value);
+
+ case 'number':
+
+// JSON numbers must be finite. Encode non-finite numbers as null.
+
+ return isFinite(value) ? String(value) : 'null';
+
+ case 'boolean':
+ case 'null':
+
+// If the value is a boolean or null, convert it to a string. Note:
+// typeof null does not produce 'null'. The case is included here in
+// the remote chance that this gets fixed someday.
+
+ return String(value);
+
+// If the type is 'object', we might be dealing with an object or an array or
+// null.
+
+ case 'object':
+
+// Due to a specification blunder in ECMAScript, typeof null is 'object',
+// so watch out for that case.
+
+ if (!value) {
+ return 'null';
+ }
+
+// Make an array to hold the partial results of stringifying this object value.
+
+ gap += indent;
+ partial = [];
+
+// Is the value an array?
+
+ if (Object.prototype.toString.apply(value) === '[object Array]') {
+
+// The value is an array. Stringify every element. Use null as a placeholder
+// for non-JSON values.
+
+ length = value.length;
+ for (i = 0; i < length; i += 1) {
+ partial[i] = str(i, value) || 'null';
+ }
+
+// Join all of the elements together, separated with commas, and wrap them in
+// brackets.
+
+ v = partial.length === 0
+ ? '[]'
+ : gap
+ ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
+ : '[' + partial.join(',') + ']';
+ gap = mind;
+ return v;
+ }
+
+// If the replacer is an array, use it to select the members to be stringified.
+
+ if (rep && typeof rep === 'object') {
+ length = rep.length;
+ for (i = 0; i < length; i += 1) {
+ if (typeof rep[i] === 'string') {
+ k = rep[i];
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ } else {
+
+// Otherwise, iterate through all of the keys in the object.
+
+ for (k in value) {
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ }
+
+// Join all of the member texts together, separated with commas,
+// and wrap them in braces.
+
+ v = partial.length === 0
+ ? '{}'
+ : gap
+ ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
+ : '{' + partial.join(',') + '}';
+ gap = mind;
+ return v;
+ }
+ }
+
+// If the JSON object does not yet have a stringify method, give it one.
+
+ if (typeof JSON.stringify !== 'function') {
+ JSON.stringify = function (value, replacer, space) {
+
+// The stringify method takes a value and an optional replacer, and an optional
+// space parameter, and returns a JSON text. The replacer can be a function
+// that can replace values, or an array of strings that will select the keys.
+// A default replacer method can be provided. Use of the space parameter can
+// produce text that is more easily readable.
+
+ var i;
+ gap = '';
+ indent = '';
+
+// If the space parameter is a number, make an indent string containing that
+// many spaces.
+
+ if (typeof space === 'number') {
+ for (i = 0; i < space; i += 1) {
+ indent += ' ';
+ }
+
+// If the space parameter is a string, it will be used as the indent string.
+
+ } else if (typeof space === 'string') {
+ indent = space;
+ }
+
+// If there is a replacer, it must be a function or an array.
+// Otherwise, throw an error.
+
+ rep = replacer;
+ if (replacer && typeof replacer !== 'function' &&
+ (typeof replacer !== 'object' ||
+ typeof replacer.length !== 'number')) {
+ throw new Error('JSON.stringify');
+ }
+
+// Make a fake root object containing our value under the key of ''.
+// Return the result of stringifying the value.
+
+ return str('', {'': value});
+ };
+ }
+
+
+// If the JSON object does not yet have a parse method, give it one.
+
+ if (typeof JSON.parse !== 'function') {
+ JSON.parse = function (text, reviver) {
+
+// The parse method takes a text and an optional reviver function, and returns
+// a JavaScript value if the text is a valid JSON text.
+
+ var j;
+
+ function walk(holder, key) {
+
+// The walk method is used to recursively walk the resulting structure so
+// that modifications can be made.
+
+ var k, v, value = holder[key];
+ if (value && typeof value === 'object') {
+ for (k in value) {
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
+ v = walk(value, k);
+ if (v !== undefined) {
+ value[k] = v;
+ } else {
+ delete value[k];
+ }
+ }
+ }
+ }
+ return reviver.call(holder, key, value);
+ }
+
+
+// Parsing happens in four stages. In the first stage, we replace certain
+// Unicode characters with escape sequences. JavaScript handles many characters
+// incorrectly, either silently deleting them, or treating them as line endings.
+
+ text = String(text);
+ cx.lastIndex = 0;
+ if (cx.test(text)) {
+ text = text.replace(cx, function (a) {
+ return '\\u' +
+ ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ });
+ }
+
+// In the second stage, we run the text against regular expressions that look
+// for non-JSON patterns. We are especially concerned with '()' and 'new'
+// because they can cause invocation, and '=' because it can cause mutation.
+// But just to be safe, we want to reject all unexpected forms.
+
+// We split the second stage into 4 regexp operations in order to work around
+// crippling inefficiencies in IE's and Safari's regexp engines. First we
+// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
+// replace all simple value tokens with ']' characters. Third, we delete all
+// open brackets that follow a colon or comma or that begin the text. Finally,
+// we look to see that the remaining characters are only whitespace or ']' or
+// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
+
+ if (/^[\],:{}\s]*$/
+ .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
+ .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
+ .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
+
+// In the third 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.
+
+ j = eval('(' + text + ')');
+
+// In the optional fourth stage, we recursively walk the new structure, passing
+// each name/value pair to a reviver function for possible transformation.
+
+ return typeof reviver === 'function'
+ ? walk({'': j}, '')
+ : j;
+ }
+
+// If the text is not JSON parseable, then a SyntaxError is thrown.
+
+ throw new SyntaxError('JSON.parse');
+ };
+ }
+}());
diff --git a/phonegap/www/js/map-OpenLayers.js b/phonegap/www/js/map-OpenLayers.js
new file mode 100644
index 000000000..c46284987
--- /dev/null
+++ b/phonegap/www/js/map-OpenLayers.js
@@ -0,0 +1,522 @@
+// This function might be passed either an OpenLayers.LonLat (so has
+// lon and lat) or an OpenLayers.Geometry.Point (so has x and y)
+function fixmystreet_update_pin(lonlat) {
+ lonlat.transform(
+ fixmystreet.map.getProjectionObject(),
+ new OpenLayers.Projection("EPSG:4326")
+ );
+ document.getElementById('fixmystreet.latitude').value = lonlat.lat || lonlat.y;
+ document.getElementById('fixmystreet.longitude').value = lonlat.lon || lonlat.x;
+}
+
+function fixmystreet_activate_drag() {
+ fixmystreet.drag = new OpenLayers.Control.DragFeature( fixmystreet.markers, {
+ onComplete: function(feature, e) {
+ fixmystreet_update_pin( feature.geometry.clone() );
+ }
+ } );
+ fixmystreet.map.addControl( fixmystreet.drag );
+ fixmystreet.drag.activate();
+}
+
+function fms_markers_list(pins, transform) {
+ var markers = [];
+ for (var i=0; i<pins.length; i++) {
+ var pin = pins[i];
+ var loc = new OpenLayers.Geometry.Point(pin[1], pin[0]);
+ if (transform) {
+ // The Strategy does this for us, so don't do it in that case.
+ loc.transform(
+ new OpenLayers.Projection("EPSG:4326"),
+ fixmystreet.map.getProjectionObject()
+ );
+ }
+ var marker = new OpenLayers.Feature.Vector(loc, {
+ colour: pin[2],
+ size: pin[5] || 'normal',
+ id: pin[3],
+ title: pin[4] || ''
+ });
+ markers.push( marker );
+ }
+ return markers;
+}
+
+function fixmystreet_onload() {
+ if ( fixmystreet.area ) {
+ var area = new OpenLayers.Layer.Vector("KML", {
+ strategies: [ new OpenLayers.Strategy.Fixed() ],
+ protocol: new OpenLayers.Protocol.HTTP({
+ url: CONFIG.FMS_URL + "/mapit/area/" + fixmystreet.area + ".kml?simplify_tolerance=0.0001",
+ format: new OpenLayers.Format.KML()
+ })
+ });
+ fixmystreet.map.addLayer(area);
+ area.events.register('loadend', null, function(a,b,c) {
+ var bounds = area.getDataExtent();
+ if (bounds) {
+ var center = bounds.getCenterLonLat();
+ fixmystreet.map.setCenter(center, fixmystreet.map.getZoomForExtent(bounds), false, true);
+ }
+ });
+ }
+
+ var pin_layer_style_map = new OpenLayers.StyleMap({
+ 'default': new OpenLayers.Style({
+ graphicTitle: "${title}",
+ graphicOpacity: 1,
+ graphicZIndex: 11,
+ backgroundGraphicZIndex: 10
+ })
+ });
+ pin_layer_style_map.addUniqueValueRules('default', 'size', {
+ 'normal': {
+ externalGraphic: "i/pin-${colour}.png",
+ graphicWidth: 48,
+ graphicHeight: 64,
+ graphicXOffset: -24,
+ graphicYOffset: -64,
+ backgroundGraphic: "i/pin-shadow.png",
+ backgroundWidth: 60,
+ backgroundHeight: 30,
+ backgroundXOffset: -7,
+ backgroundYOffset: -30
+ },
+ 'big': {
+ externalGraphic: "i/pin-${colour}-big.png",
+ graphicWidth: 78,
+ graphicHeight: 105,
+ graphicXOffset: -39,
+ graphicYOffset: -105,
+ backgroundGraphic: "i/pin-shadow-big.png",
+ backgroundWidth: 88,
+ backgroundHeight: 40,
+ backgroundXOffset: -10,
+ backgroundYOffset: -35
+ }
+ });
+ var pin_layer_options = {
+ rendererOptions: {
+ yOrdering: true
+ },
+ styleMap: pin_layer_style_map
+ };
+ if (fixmystreet.page == 'around') {
+ fixmystreet.bbox_strategy = new OpenLayers.Strategy.BBOX({ ratio: 1 });
+ pin_layer_options.strategies = [ fixmystreet.bbox_strategy ];
+ pin_layer_options.protocol = new OpenLayers.Protocol.HTTP({
+ url: CONFIG.FMS_URL + '/ajax',
+ params: fixmystreet.all_pins ? { all_pins: 1 } : { },
+ format: new OpenLayers.Format.FixMyStreet()
+ });
+ }
+ fixmystreet.markers = new OpenLayers.Layer.Vector("Pins", pin_layer_options);
+ fixmystreet.markers.events.register( 'loadend', fixmystreet.markers, function(evt) {
+ if (fixmystreet.map.popups.length) fixmystreet.map.removePopup(fixmystreet.map.popups[0]);
+ });
+
+ var markers = fms_markers_list( fixmystreet.pins, true );
+ fixmystreet.markers.addFeatures( markers );
+ if (fixmystreet.page == 'around' || fixmystreet.page == 'reports' || fixmystreet.page == 'my') {
+ fixmystreet.select_feature = new OpenLayers.Control.SelectFeature( fixmystreet.markers );
+ var selectedFeature;
+ function onPopupClose(evt) {
+ fixmystreet.select_feature.unselect(selectedFeature);
+ OpenLayers.Event.stop(evt);
+ }
+ fixmystreet.markers.events.register( 'featureunselected', fixmystreet.markers, function(evt) {
+ var feature = evt.feature, popup = feature.popup;
+ fixmystreet.map.removePopup(popup);
+ popup.destroy();
+ feature.popup = null;
+ });
+ fixmystreet.markers.events.register( 'featureselected', fixmystreet.markers, function(evt) {
+ var feature = evt.feature;
+ selectedFeature = feature;
+ var popup = new OpenLayers.Popup.FramedCloud("popup",
+ feature.geometry.getBounds().getCenterLonLat(),
+ null,
+ feature.attributes.title + "<br><a href=" + CONFIG.FMS_URL + "/report/" + feature.attributes.id + ">More details</a>",
+ { size: new OpenLayers.Size(0,0), offset: new OpenLayers.Pixel(0,-40) },
+ true, onPopupClose);
+ feature.popup = popup;
+ fixmystreet.map.addPopup(popup);
+ });
+ fixmystreet.map.addControl( fixmystreet.select_feature );
+ fixmystreet.select_feature.activate();
+ } else if (fixmystreet.page == 'new') {
+ fixmystreet_activate_drag();
+ }
+ fixmystreet.map.addLayer(fixmystreet.markers);
+
+ if ( fixmystreet.zoomToBounds ) {
+ var bounds = fixmystreet.markers.getDataExtent();
+ if (bounds) { fixmystreet.map.zoomToExtent( bounds ); }
+ }
+
+ $('#hide_pins_link').click(function(e) {
+ e.preventDefault();
+ var showhide = [
+ 'Show pins', 'Hide pins',
+ 'Dangos pinnau', 'Cuddio pinnau',
+ "Vis nåler", "Gjem nåler"
+ ];
+ for (var i=0; i<showhide.length; i+=2) {
+ if (this.innerHTML == showhide[i]) {
+ fixmystreet.markers.setVisibility(true);
+ fixmystreet.select_feature.activate();
+ this.innerHTML = showhide[i+1];
+ } else if (this.innerHTML == showhide[i+1]) {
+ fixmystreet.markers.setVisibility(false);
+ fixmystreet.select_feature.deactivate();
+ this.innerHTML = showhide[i];
+ }
+ }
+ });
+
+ $('#all_pins_link').click(function(e) {
+ e.preventDefault();
+ fixmystreet.markers.setVisibility(true);
+ var texts = [
+ 'en', 'Show old', 'Hide old',
+ 'nb', 'Inkluder utdaterte problemer', 'Skjul utdaterte rapporter',
+ 'cy', 'Cynnwys hen adroddiadau', 'Cuddio hen adroddiadau'
+ ];
+ for (var i=0; i<texts.length; i+=3) {
+ if (this.innerHTML == texts[i+1]) {
+ this.innerHTML = texts[i+2];
+ fixmystreet.markers.protocol.options.params = { all_pins: 1 };
+ fixmystreet.markers.refresh( { force: true } );
+ lang = texts[i];
+ } else if (this.innerHTML == texts[i+2]) {
+ this.innerHTML = texts[i+1];
+ fixmystreet.markers.protocol.options.params = { };
+ fixmystreet.markers.refresh( { force: true } );
+ lang = texts[i];
+ }
+ }
+ if (lang == 'cy') {
+ document.getElementById('hide_pins_link').innerHTML = 'Cuddio pinnau';
+ } else if (lang == 'nb') {
+ document.getElementById('hide_pins_link').innerHTML = 'Gjem nåler';
+ } else {
+ document.getElementById('hide_pins_link').innerHTML = 'Hide pins';
+ }
+ });
+
+}
+
+$(function(){
+
+ set_map_config();
+
+ fixmystreet.map = new OpenLayers.Map("map", {
+ controls: fixmystreet.controls,
+ displayProjection: new OpenLayers.Projection("EPSG:4326")
+ });
+
+ if ($('html').hasClass('mobile') && fixmystreet.page == 'around') {
+ $('#fms_pan_zoom').css({ top: '2.75em !important' });
+ }
+
+ fixmystreet.layer_options = OpenLayers.Util.extend({
+ zoomOffset: fixmystreet.zoomOffset,
+ transitionEffect: 'resize',
+ numZoomLevels: fixmystreet.numZoomLevels
+ }, fixmystreet.layer_options);
+ var layer = new fixmystreet.map_type("", fixmystreet.layer_options);
+ fixmystreet.map.addLayer(layer);
+
+ if (!fixmystreet.map.getCenter()) {
+ var centre = new OpenLayers.LonLat( fixmystreet.longitude, fixmystreet.latitude );
+ centre.transform(
+ new OpenLayers.Projection("EPSG:4326"),
+ fixmystreet.map.getProjectionObject()
+ );
+ fixmystreet.map.setCenter(centre, fixmystreet.zoom || 3);
+ }
+
+ if (fixmystreet.state_map && fixmystreet.state_map == 'full') {
+ // TODO Work better with window resizing, this is pretty 'set up' only at present
+ var $content = $('.content'),
+ q = ( $content.offset().left + $content.width() ) / 2;
+ // Need to try and fake the 'centre' being 75% from the left
+ fixmystreet.map.pan(-q, -25, { animate: false });
+ fixmystreet.map.events.register("movestart", null, function(e){
+ fixmystreet.map.moveStart = { zoom: this.getZoom(), center: this.getCenter() };
+ });
+ fixmystreet.map.events.register("zoomend", null, function(e){
+ if ( fixmystreet.map.moveStart && !fixmystreet.map.moveStart.zoom && fixmystreet.map.moveStart.zoom !== 0 ) {
+ return true; // getZoom() on Firefox appears to return null at first?
+ }
+ if ( !fixmystreet.map.moveStart || !this.getCenter().equals(fixmystreet.map.moveStart.center) ) {
+ // Centre has moved, e.g. by double-click. Same whether zoom in or out
+ fixmystreet.map.pan(-q, -25, { animate: false });
+ return;
+ }
+ var zoom_change = this.getZoom() - fixmystreet.map.moveStart.zoom;
+ if (zoom_change == -1) {
+ // Zoomed out, need to re'centre'
+ fixmystreet.map.pan(-q/2, 0, { animate: false });
+ } else if (zoom_change == 1) {
+ // Using a zoom button
+ fixmystreet.map.pan(q, 0, { animate: false });
+ }
+ });
+ }
+
+ if (document.getElementById('mapForm')) {
+ var click = new OpenLayers.Control.Click();
+ fixmystreet.map.addControl(click);
+ click.activate();
+ }
+
+ $(window).hashchange(function(){
+ if (location.hash == '#report' && $('.rap-notes').is(':visible')) {
+ $('.rap-notes-close').click();
+ return;
+ }
+
+ if (location.hash && location.hash != '#') {
+ return;
+ }
+
+ // Okay, back to around view.
+ fixmystreet.bbox_strategy.activate();
+ fixmystreet.markers.refresh( { force: true } );
+ if ( fixmystreet.state_pins_were_hidden ) {
+ // If we had pins hidden when we clicked map (which had to show the pin layer as I'm doing it in one layer), hide them again.
+ $('#hide_pins_link').click();
+ }
+ fixmystreet.drag.deactivate();
+ $('#side-form').hide();
+ $('#side').show();
+ $('#sub_map_links').show();
+ //only on mobile
+ $('#mob_sub_map_links').remove();
+ $('.mobile-map-banner').text('Place pin on map')
+ .prepend('<a href="index.html">home</a>');
+ fixmystreet.page = 'around';
+ });
+
+ // Vector layers must be added onload as IE sucks
+ if ($.browser.msie) {
+ $(window).load(fixmystreet_onload);
+ } else {
+ fixmystreet_onload();
+ }
+});
+
+/* Overridding the buttonDown function of PanZoom so that it does
+ zoomTo(0) rather than zoomToMaxExtent()
+*/
+OpenLayers.Control.PanZoomFMS = OpenLayers.Class(OpenLayers.Control.PanZoom, {
+ 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.zoomTo(0);
+ break;
+ }
+
+ OpenLayers.Event.stop(evt);
+ }
+});
+
+/* Overriding Permalink so that it can pass the correct zoom to OSM */
+OpenLayers.Control.PermalinkFMS = OpenLayers.Class(OpenLayers.Control.Permalink, {
+ updateLink: function() {
+ var separator = this.anchor ? '#' : '?';
+ var href = this.base;
+ if (href.indexOf(separator) != -1) {
+ href = href.substring( 0, href.indexOf(separator) );
+ }
+
+ href += separator + OpenLayers.Util.getParameterString(this.createParams(null, this.map.getZoom()+fixmystreet.zoomOffset));
+ // Could use mlat/mlon here as well if we are on a page with a marker
+ if (this.anchor && !this.element) {
+ window.location.href = href;
+ }
+ else {
+ this.element.href = href;
+ }
+ }
+});
+
+/* Pan data handler */
+OpenLayers.Format.FixMyStreet = OpenLayers.Class(OpenLayers.Format.JSON, {
+ read: function(json, filter) {
+ if (typeof json == 'string') {
+ obj = OpenLayers.Format.JSON.prototype.read.apply(this, [json, filter]);
+ } else {
+ obj = json;
+ }
+ var current, current_near;
+ if (typeof(obj.current) != 'undefined' && (current = document.getElementById('current'))) {
+ current.innerHTML = obj.current;
+ }
+ if (typeof(obj.current_near) != 'undefined' && (current_near = document.getElementById('current_near'))) {
+ current_near.innerHTML = obj.current_near;
+ }
+ var markers = fms_markers_list( obj.pins, false );
+ return markers;
+ },
+ CLASS_NAME: "OpenLayers.Format.FixMyStreet"
+});
+
+/* Click handler */
+OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
+ defaultHandlerOptions: {
+ 'single': true,
+ 'double': false,
+ 'pixelTolerance': 0,
+ 'stopSingle': false,
+ 'stopDouble': false
+ },
+
+ initialize: function(options) {
+ this.handlerOptions = OpenLayers.Util.extend(
+ {}, this.defaultHandlerOptions);
+ OpenLayers.Control.prototype.initialize.apply(
+ this, arguments
+ );
+ this.handler = new OpenLayers.Handler.Click(
+ this, {
+ 'click': this.trigger
+ }, this.handlerOptions);
+ },
+
+ trigger: function(e) {
+ if (typeof fixmystreet.nav_control != 'undefined') {
+ fixmystreet.nav_control.disableZoomWheel();
+ }
+ var lonlat = fixmystreet.map.getLonLatFromViewPortPx(e.xy);
+ if (fixmystreet.page == 'new') {
+ /* Already have a pin */
+ fixmystreet.markers.features[0].move(lonlat);
+ } else {
+ var markers = fms_markers_list( [ [ lonlat.lat, lonlat.lon, 'green' ] ], false );
+ fixmystreet.bbox_strategy.deactivate();
+ fixmystreet.markers.removeAllFeatures();
+ fixmystreet.markers.addFeatures( markers );
+ fixmystreet_activate_drag();
+ }
+ fixmystreet_update_pin(lonlat);
+ // check to see if markers are visible. We click the
+ // link so that it updates the text in case they go
+ // back
+ if ( ! fixmystreet.markers.getVisibility() ) {
+ fixmystreet.state_pins_were_hidden = true;
+ $('#hide_pins_link').click();
+ }
+ if (fixmystreet.page == 'new') {
+ return;
+ }
+ $.getJSON( CONFIG.FMS_URL + 'report/new/ajax', {
+ latitude: $('#fixmystreet\\.latitude').val(),
+ longitude: $('#fixmystreet\\.longitude').val()
+ }, function(data) {
+ if (data.error) {
+ // XXX If they then click back and click somewhere in the area, this error will still show.
+ $('#side-form').html('<h1>Reporting a problem</h1><p>' + data.error + '</p>');
+ return;
+ }
+ $('#councils_text').html(data.councils_text);
+ $('#form_category_row').html(data.category);
+ });
+
+ $('#side-form, #site-logo').show();
+ fixmystreet.map.updateSize(); // might have done, and otherwise Firefox gets confused.
+ /* For some reason on IOS5 if you use the jQuery show method it
+ * doesn't display the JS validation error messages unless you do this
+ * or you cause a screen redraw by changing the phone orientation.
+ * NB: This has to happen after the call to show() */
+ if ( navigator.userAgent.match(/like Mac OS X/i)) {
+ document.getElementById('side-form').style.display = 'block';
+ }
+ $('#side').hide();
+ if (typeof heightFix !== 'undefined') {
+ heightFix('#report-a-problem-sidebar', '.content', 26);
+ }
+
+ // If we clicked the map somewhere inconvenient
+ var sidebar = $('#report-a-problem-sidebar');
+ if (sidebar.css('position') == 'absolute') {
+ var w = sidebar.width(), h = sidebar.height(),
+ o = sidebar.offset(),
+ $map_box = $('#map_box'), bo = $map_box.offset();
+ // e.xy is relative to top left of map, which might not be top left of page
+ e.xy.x += bo.left;
+ e.xy.y += bo.top;
+ if (e.xy.y <= o.top || (e.xy.x >= o.left && e.xy.x <= o.left + w + 24 && e.xy.y >= o.top && e.xy.y <= o.top + h + 64)) {
+ // top of the page, pin hidden by header;
+ // or underneath where the new sidebar will appear
+ lonlat.transform(
+ new OpenLayers.Projection("EPSG:4326"),
+ fixmystreet.map.getProjectionObject()
+ );
+ var p = fixmystreet.map.getViewPortPxFromLonLat(lonlat);
+ p.x -= ( o.left + w ) / 2;
+ lonlat = fixmystreet.map.getLonLatFromViewPortPx(p);
+ fixmystreet.map.panTo(lonlat);
+ }
+ }
+
+ $('#sub_map_links').hide();
+ if ($('html').hasClass('mobile')) {
+ var $map_box = $('#map_box'),
+ width = $map_box.width(),
+ height = $map_box.height();
+ $map_box.append(
+ '<p id="mob_sub_map_links">' +
+ '<a href="#" id="try_again">Try again</a>' +
+ '<a href="#ok" id="mob_ok">OK</a>' +
+ '</p>'
+ ).css({ position: 'relative', width: width, height: height, marginBottom: '1em' });
+ // Making it relative here makes it much easier to do the scrolling later
+
+ $('.mobile-map-banner').text('Right place?').prepend('<a href="index.html">home</a>');
+
+ // mobile user clicks 'ok' on map
+ $('#mob_ok').toggle(function(){
+ //scroll the height of the map box instead of the offset
+ //of the #side-form or whatever as we will probably want
+ //to do this on other pages where #side-form might not be
+ $('html, body').animate({ scrollTop: height-60 }, 1000, function(){
+ $('#mob_sub_map_links').addClass('map_complete');
+ $('#mob_ok').text('MAP');
+ });
+ }, function(){
+ $('html, body').animate({ scrollTop: 0 }, 1000, function(){
+ $('#mob_sub_map_links').removeClass('map_complete');
+ $('#mob_ok').text('OK');
+ });
+ });
+ }
+
+ fixmystreet.page = 'new';
+ location.hash = 'report';
+ }
+});
+
diff --git a/phonegap/www/js/map-OpenStreetMap.js b/phonegap/www/js/map-OpenStreetMap.js
new file mode 100644
index 000000000..50f159635
--- /dev/null
+++ b/phonegap/www/js/map-OpenStreetMap.js
@@ -0,0 +1,140 @@
+function set_map_config(perm) {
+ var permalink_id;
+ if ($('#map_permalink').length) {
+ permalink_id = 'map_permalink';
+ }
+ fixmystreet.controls = [
+ new OpenLayers.Control.ArgParser(),
+ //new OpenLayers.Control.LayerSwitcher(),
+ new OpenLayers.Control.Navigation(),
+ new OpenLayers.Control.Permalink(permalink_id),
+ new OpenLayers.Control.PermalinkFMS('osm_link', 'http://www.openstreetmap.org/'),
+ new OpenLayers.Control.PanZoomFMS({id: 'fms_pan_zoom' })
+ ];
+}
+
+// http://www.openstreetmap.org/openlayers/OpenStreetMap.js (added maxResolution)
+
+/**
+ * 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 = "http://www.openstreetmap.org/openlayers/img/404.png";
+
+/**
+ * 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.tile.openstreetmap.org/${z}/${x}/${y}.png",
+ "http://b.tile.openstreetmap.org/${z}/${x}/${y}.png",
+ "http://c.tile.openstreetmap.org/${z}/${x}/${y}.png"
+ ];
+ options = OpenLayers.Util.extend({
+ /* Below line added to OSM's file in order to allow minimum zoom level */
+ maxResolution: 156543.0339/Math.pow(2, options.zoomOffset || 0),
+ numZoomLevels: 19,
+ buffer: 0
+ }, options);
+ var newArguments = [name, url, options];
+ OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
+ },
+
+ CLASS_NAME: "OpenLayers.Layer.OSM.Mapnik"
+});
+
+/**
+ * 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, buffer: 0 }, 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.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png",
+ "http://b.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png",
+ "http://c.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png"
+ ];
+ options = OpenLayers.Util.extend({
+ /* Below line added to OSM's file in order to allow minimum zoom level */
+ maxResolution: 156543.0339/Math.pow(2, options.zoomOffset || 0),
+ numZoomLevels: 19,
+ buffer: 0
+ }, options);
+ var newArguments = [name, url, options];
+ OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
+ },
+
+ CLASS_NAME: "OpenLayers.Layer.OSM.CycleMap"
+});
diff --git a/phonegap/www/js/map-bing-ol.js b/phonegap/www/js/map-bing-ol.js
new file mode 100644
index 000000000..9e9354df3
--- /dev/null
+++ b/phonegap/www/js/map-bing-ol.js
@@ -0,0 +1,122 @@
+function set_map_config(perm) {
+ var permalink_id;
+ if ($('#map_permalink').length) {
+ permalink_id = 'map_permalink';
+ }
+
+ var nav_opts = { zoomWheelEnabled: false };
+ //if (fixmystreet.page == 'around' && $('html').hasClass('mobile')) {
+ nav_opts = {};
+ //}
+ fixmystreet.nav_control = new OpenLayers.Control.Navigation(nav_opts);
+
+ fixmystreet.controls = [
+ new OpenLayers.Control.Attribution(),
+ new OpenLayers.Control.ArgParser(),
+ fixmystreet.nav_control,
+ new OpenLayers.Control.Permalink(permalink_id),
+ new OpenLayers.Control.PanZoomFMS({id: 'fms_pan_zoom' })
+ ];
+ fixmystreet.map_type = OpenLayers.Layer.Bing;
+}
+
+OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
+ attributionTemplate: '${logo}${copyrights}',
+
+ setMap: function() {
+ OpenLayers.Layer.XYZ.prototype.setMap.apply(this, arguments);
+ this.updateAttribution();
+ this.map.events.register("moveend", this, this.updateAttribution);
+ },
+
+ updateAttribution: function() {
+ var z = this.map.getZoom() + this.zoomOffset;
+ var copyrights;
+ var logo = '';
+ if (z >= 16) {
+ copyrights = 'Contains Ordnance Survey data &copy; Crown copyright and database right 2010';
+ } else {
+ logo = '<a href="http://www.bing.com/maps/"><img border=0 src="http://dev.virtualearth.net/Branding/logo_powered_by.png"></a>';
+ copyrights = '&copy; 2011 <a href="http://www.bing.com/maps/">Microsoft</a>. &copy; AND, Navteq, Ordnance Survey';
+ }
+ this.attribution = OpenLayers.String.format(this.attributionTemplate, {
+ logo: logo,
+ copyrights: copyrights
+ });
+ if (this.map) {
+ this.map.events.triggerEvent("changelayer", {
+ layer: this,
+ property: "attribution"
+ });
+ }
+ },
+
+ initialize: function(name, options) {
+ var url = [];
+ options = OpenLayers.Util.extend({
+ /* Below line added to OSM's file in order to allow minimum zoom level */
+ maxResolution: 156543.0339/Math.pow(2, options.zoomOffset || 0),
+ numZoomLevels: 18,
+ transitionEffect: "resize",
+ sphericalMercator: true,
+ buffer: 0
+ //attribution: "© Microsoft / OS 2010"
+ }, options);
+ var newArguments = [name, url, options];
+ OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments);
+ },
+
+ get_quadkey: function(x, y, level) {
+ var key = '';
+ for (var i = level; i > 0; i--) {
+ var digit = 0;
+ var mask = 1 << (i - 1);
+ if ((x & mask) !== 0) {
+ digit++;
+ }
+ if ((y & mask) !== 0) {
+ digit += 2;
+ }
+ key += digit;
+ }
+ return key;
+ },
+
+ 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.serverResolutions !== null ?
+ OpenLayers.Util.indexOf(this.serverResolutions, res) :
+ this.map.getZoom() + this.zoomOffset;
+
+ var url;
+ if (z >= 16) {
+ url = [
+ "http://tilma.mysociety.org/sv/${z}/${x}/${y}.png",
+ "http://a.tilma.mysociety.org/sv/${z}/${x}/${y}.png",
+ "http://b.tilma.mysociety.org/sv/${z}/${x}/${y}.png",
+ "http://c.tilma.mysociety.org/sv/${z}/${x}/${y}.png"
+ ];
+ } else {
+ var type = '';
+ if (z > 10) { type = '&productSet=mmOS'; }
+ url = [
+ "http://ecn.t0.tiles.virtualearth.net/tiles/r${id}.png?g=701" + type,
+ "http://ecn.t1.tiles.virtualearth.net/tiles/r${id}.png?g=701" + type,
+ "http://ecn.t2.tiles.virtualearth.net/tiles/r${id}.png?g=701" + type,
+ "http://ecn.t3.tiles.virtualearth.net/tiles/r${id}.png?g=701" + type
+ ];
+ }
+ var s = '' + x + y + z;
+ url = this.selectUrl(s, url);
+
+ var id = this.get_quadkey(x, y, z);
+ var path = OpenLayers.String.format(url, {'id': id, 'x': x, 'y': y, 'z': z});
+ return path;
+ },
+
+ CLASS_NAME: "OpenLayers.Layer.Bing"
+});
diff --git a/phonegap/www/js/map-bing.js b/phonegap/www/js/map-bing.js
new file mode 100644
index 000000000..715a8efc9
--- /dev/null
+++ b/phonegap/www/js/map-bing.js
@@ -0,0 +1,22 @@
+$(function(){
+ var centre = new Microsoft.Maps.Location( fixmystreet.latitude, fixmystreet.longitude );
+ var map = new Microsoft.Maps.Map(document.getElementById("map"), {
+ credentials: fixmystreet.key,
+ mapTypeId: Microsoft.Maps.MapTypeId.ordnanceSurvey,
+ center: centre,
+ zoom: 15,
+ enableClickableLogo: false,
+ enableSearchLogo: false,
+ showCopyright: false,
+ showDashboard: true,
+ showLogo: false,
+ showScalebar: false
+ });
+ //minZoomLevel: 14,
+ //numZoomLevels: 4
+
+ Microsoft.Maps.Events.addHandler(map, "viewchangestart", function(e) {
+ /* Doesn't work */
+ if (map.getTargetZoom() < 12) { return false; }
+ });
+});
diff --git a/phonegap/www/js/map-google.js b/phonegap/www/js/map-google.js
new file mode 100644
index 000000000..7da21ba09
--- /dev/null
+++ b/phonegap/www/js/map-google.js
@@ -0,0 +1,22 @@
+$(function(){
+ var centre = new google.maps.LatLng( fixmystreet.latitude, fixmystreet.longitude );
+ var map = new google.maps.Map(document.getElementById("map"), {
+ mapTypeId: google.maps.MapTypeId.ROADMAP,
+ center: centre,
+ zoom: 16,
+ disableDefaultUI: true,
+ navigationControl: true,
+ navigationControlOptions: {
+ style: google.maps.NavigationControlStyle.SMALL
+ },
+ mapTypeControl: true,
+ mapTypeControlOptions: {
+ style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
+ }
+ });
+
+ google.maps.event.addListener(map, "zoom_changed", function() {
+ if (map.getZoom() < 13) { map.setZoom(13); }
+ if (map.getZoom() > 17) { map.setZoom(17); }
+ });
+});
diff --git a/phonegap/www/js/map-streetview.js b/phonegap/www/js/map-streetview.js
new file mode 100644
index 000000000..b1ba3664d
--- /dev/null
+++ b/phonegap/www/js/map-streetview.js
@@ -0,0 +1,76 @@
+function set_map_config(perm) {
+ fixmystreet.controls = [
+ new OpenLayers.Control.ArgParser(),
+ //new OpenLayers.Control.LayerSwitcher(),
+ new OpenLayers.Control.Navigation(),
+ new OpenLayers.Control.Permalink(),
+ new OpenLayers.Control.PanZoomFMS()
+ ];
+ fixmystreet.map_type = OpenLayers.Layer.StreetView;
+}
+
+// http://os.openstreetmap.org/openlayers/OS.js (added one line)
+
+/**
+ * Namespace: Util.OS
+ */
+OpenLayers.Util.OS = {};
+
+/**
+ * Constant: MISSING_TILE_URL
+ * {String} URL of image to display for missing tiles
+ */
+OpenLayers.Util.OS.MISSING_TILE_URL = "http://openstreetmap.org/openlayers/img/404.png";
+
+/**
+ * Property: originalOnImageLoadError
+ * {Function} Original onImageLoadError function.
+ */
+OpenLayers.Util.OS.originalOnImageLoadError = OpenLayers.Util.onImageLoadError;
+
+/**
+ * Function: onImageLoadError
+ */
+OpenLayers.Util.onImageLoadError = function() {
+ OpenLayers.Util.OS.originalOnImageLoadError();
+};
+
+/**
+ * @requires OpenLayers/Layer/XYZ.js
+ *
+ * Class: OpenLayers.Layer.StreetView
+ *
+ * Inherits from:
+ * - <OpenLayers.Layer.XYZ>
+ */
+OpenLayers.Layer.StreetView = OpenLayers.Class(OpenLayers.Layer.XYZ, {
+ attribution: 'Map contains Ordnance Survey data &copy; Crown copyright and database right 2010.',
+
+ /**
+ * Constructor: OpenLayers.Layer.StreetView
+ *
+ * Parameters:
+ * name - {String}
+ * url - {String}
+ * options - {Object} Hashtable of extra options to tag onto the layer
+ */
+ initialize: function(name, options) {
+ var url = [
+ "http://a.os.openstreetmap.org/sv/${z}/${x}/${y}.png",
+ "http://b.os.openstreetmap.org/sv/${z}/${x}/${y}.png",
+ "http://c.os.openstreetmap.org/sv/${z}/${x}/${y}.png"
+ ];
+ options = OpenLayers.Util.extend({
+ /* Below line added to OSM's file in order to allow minimum zoom level */
+ maxResolution: 156543.0339/Math.pow(2, options.zoomOffset || 0),
+ numZoomLevels: 18,
+ transitionEffect: "resize",
+ sphericalMercator: true,
+ attribution: "Contains Ordnance Survey data © Crown copyright and database right 2010"
+ }, options);
+ var newArguments = [name, url, options];
+ OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments);
+ },
+
+ CLASS_NAME: "OpenLayers.Layer.StreetView"
+});
diff --git a/phonegap/www/js/mobile.js b/phonegap/www/js/mobile.js
new file mode 100644
index 000000000..07d973315
--- /dev/null
+++ b/phonegap/www/js/mobile.js
@@ -0,0 +1,487 @@
+function touchmove(e) {
+ e.preventDefault();
+}
+
+function loadingSpinner(method){
+ if (method == "on") {
+ //Adjust to screen size
+ var pHeight = window.innerHeight;
+ var pWidth = window.innerWidth;
+ var sH = parseInt($('#loadingSpinner').css('height'),10);
+ var sW = parseInt($('#loadingSpinner').css('width'),10);
+ $('#loadingSpinner').css('top',(pHeight-sH)/2+$('body').scrollTop());
+ $('#loadingSpinner').css('left',(pWidth-sW)/2);
+ $('#loadingSpinner').css('z-index',1000);
+ //Show
+ $('#loadingSpinner').show();
+ } else if (method == 'off'){
+ $('#loadingSpinner').hide();
+ }
+}
+
+function showBusy( title, msg ) {
+ if ( navigator && navigator.notification && typeof navigator.notification.activityStart !== "undefined") {
+ navigator.notification.activityStart( title, msg );
+ } else {
+ loadingSpinner('on');
+ }
+}
+
+function hideBusy() {
+ if ( navigator && navigator.notification && navigator.notification.activityStop) {
+ navigator.notification.activityStop();
+ } else {
+ loadingSpinner('off');
+ }
+}
+
+function show_around( lat, long ) {
+ pc = $('#pc').val();
+ localStorage.latitude = lat;
+ localStorage.longitude = long;
+ localStorage.pc = pc;
+ hideBusy();
+ window.location='around.html';
+ return false;
+}
+
+function valid_postcode(pc) {
+ var out_pattern = '[A-PR-UWYZ]([0-9]{1,2}|([A-HIK-Y][0-9](|[0-9]|[ABEHMNPRVWXY]))|[0-9][A-HJKSTUW])';
+ var in_pattern = '[0-9][ABD-HJLNP-UW-Z]{2}';
+ var full_pattern = '^' + out_pattern + in_pattern + '$';
+ var postcode_regex = new RegExp(full_pattern);
+
+ pc = pc.toUpperCase().replace(/\s+/, '');
+ if ( postcode_regex.test(pc) ) {
+ return true;
+ }
+
+ return false;
+}
+
+function checkConnection() {
+ var networkState = navigator.network.connection.type;
+ if ( networkState == Connection.NONE || networkState == Connection.UNKNOWN ) {
+ $('#main').hide();
+ $('#noconnection').show();
+ }
+}
+
+function use_lat_long( lat, long ) {
+ show_around( lat, long );
+}
+
+function location_error( msg ) {
+ hideBusy();
+ if ( msg === '' ) {
+ $('#location_error').remove();
+ return;
+ }
+
+ alert(msg);
+
+ if ( !$('#location_error') ) {
+ $('#postcodeForm').after('<p id="location_error"></p>');
+ }
+
+ $('#location_error').text( msg );
+}
+
+function lookup_string(q) {
+ q = q.toLowerCase();
+ q = q.replace(/[^\-&\w ']/, ' ');
+ q = q.replace(/\s+/, ' ');
+
+ if (!q) {
+ hideBusy();
+ location_error("Please enter location");
+ return false;
+ }
+
+ var url = "http://dev.virtualearth.net/REST/v1/Locations?q=" + escape(q);
+ url += '&c=en-GB&key=' + CONFIG.BING_API_KEY;
+ var x = jQuery.get( url, function(data, status) {
+ if ( status == 'success' ) {
+ var valid_locations = 0;
+ var latitude = 0;
+ var longitude = 0;
+ var multiple = [];
+
+ for ( i = 0; i < data.resourceSets[0].resources.length; i++ ) {
+ var details = data.resourceSets[0].resources[i];
+ if ( details.address.countryRegion != 'United Kingdom' ) { continue; }
+ var address = details.name;
+
+ latitude = details.point.coordinates[0];
+ longitude = details.point.coordinates[1];
+ latitude = latitude.toPrecision(6);
+ longitude = longitude.toPrecision(6);
+
+ multiple.push( { 'address': address, 'latitude': latitude, 'longitude': longitude } );
+ valid_locations += 1;
+ }
+
+ if ( valid_locations == 1 ) {
+ show_around( latitude, longitude );
+ } else if ( valid_locations === 0 ) {
+ location_error('Location not found');
+ $('#pc').select();
+ } else {
+ location_error('');
+ $('#multiple').remove();
+ var multiple_html = '<ul id="multiple"><li>Multiple locations found, please select one:';
+ for ( i = 0; i < multiple.length; i++ ) {
+ multiple_html += '<li><a href="#" onclick="use_lat_long( ' + multiple[i].latitude + ',' + multiple[i].longitude +')">' + multiple[i].address + '</a></li>';
+ }
+ multiple_html += '</ul>';
+ $('#front-howto').hide();
+ $('#postcodeForm').after( multiple_html );
+ }
+ } else {
+ location_error("Could not find your location");
+ }
+ hideBusy();
+ });
+ return false;
+}
+
+function locate() {
+ $("#multiple").remove();
+ var pc = $('#pc').val();
+
+ if (!pc) {
+ location_error( "Please enter your location" );
+ return false;
+ }
+
+ showBusy('Locating', 'Looking up location');
+
+ if ( valid_postcode( pc ) ) {
+ jQuery.get( CONFIG.MAPIT_URL + 'postcode/' + pc + '.json', function(data, status) {
+ if ( status == 'success' ) {
+ //activityStop();
+ show_around( data.wgs84_lat, data.wgs84_lon );
+ } else {
+ activityStop();
+ alert('Could not locate postcode');
+ }
+ });
+ } else {
+ lookup_string(pc);
+ }
+ return false;
+}
+
+function foundLocation(myLocation) {
+ var lat = myLocation.coords.latitude;
+ var long = myLocation.coords.longitude;
+
+ show_around( lat, long );
+}
+
+function notFoundLocation() { location_error( 'Could not find location' ); }
+
+function getPosition() {
+ showBusy( 'Locating', 'Looking up location' );
+
+ navigator.geolocation.getCurrentPosition(foundLocation, notFoundLocation);
+}
+
+
+function takePhotoSuccess(imageURI) {
+ $('#form_photo').val(imageURI);
+ $('#photo').attr('src', imageURI );
+ $('#add_photo').hide();
+ $('#display_photo').show();
+}
+
+function delPhoto() {
+ $('#form_photo').val('');
+ $('#photo').attr('src', '' );
+ $('#display_photo').hide();
+ $('#add_photo').show();
+}
+
+function takePhotoFail(message) {
+ alert('There was a problem taking your photo');
+ console.log('error taking picture: ' + message);
+}
+
+function takePhoto(type) {
+ navigator.camera.getPicture(takePhotoSuccess, takePhotoFail, { quality: 50, destinationType: Camera.DestinationType.FILE_URI, sourceType: type });
+}
+
+function check_name( name, msg ) {
+ $('#email_label').hide();
+ $('#form_email').hide();
+ $('#now_submit').hide();
+ $('#have_password').hide();
+ $('#form_sign_in_yes').hide();
+ $('#let_me_confirm').hide();
+ $('#password_register').hide();
+ $('#password_surround').hide();
+ $('#providing_password').hide();
+ $('#form_name').val( name );
+ if ( msg ) {
+ $('#form_name').focus();
+ $('#form_name').before('<div class="form-error">' + msg + '</div>' );
+ }
+}
+
+function fileUploadSuccess(r) {
+ if ( r.response ) {
+ var data;
+ try {
+ data = JSON.parse( decodeURIComponent(r.response) );
+ }
+ catch(err) {
+ data = {};
+ }
+ if ( data.success ) {
+ if ( data.report ) {
+ localStorage.report = data.report;
+ hideBusy();
+ window.location = 'report_created.html';
+ } else {
+ hideBusy();
+ window.location = 'email_sent.html';
+ }
+ } else {
+ if ( data.check_name ) {
+ check_name( data.check_name, data.errors.name );
+ } else {
+ alert('Could not submit report');
+ }
+ $('input[type=submit]').prop("disabled", false);
+ }
+ } else {
+ hideBusy();
+ alert('Could not submit report');
+ $('input[type=submit]').prop("disabled", false);
+ }
+}
+
+function fileUploadFail() {
+ hideBusy();
+ alert('Could not submit report');
+ $('input[type=submit]').prop("disabled", false);
+}
+
+
+var submit_clicked = null;
+
+function postReport(e) {
+ e.preventDefault();
+
+ // the .stopImmediatePropogation call in invalidHandler should render this
+ // redundant but it doesn't seem to work so belt and braces :(
+ if ( !$('#mapForm').valid() ) { return; }
+
+ var params = {
+ service: 'iphone',
+ title: $('#form_title').val(),
+ detail: $('#form_detail').val(),
+ name: $('#form_name').val(),
+ may_show_name: $('#form_may_show_name').attr('checked') ? 1 : 0,
+ email: $('#form_email').val(),
+ category: $('#form_category').val(),
+ lat: $('#fixmystreet\\.latitude').val(),
+ lon: $('#fixmystreet\\.longitude').val(),
+ password_sign_in: $('#password_sign_in').val(),
+ phone: $('#form_phone').val(),
+ pc: $('#pc').val()
+ };
+
+ if ( submit_clicked.attr('id') == 'submit_sign_in' ) {
+ params.submit_sign_in = 1;
+ } else {
+ params.submit_register = 1;
+ }
+
+ showBusy( 'Sending Report', 'Please wait while your report is sent' );
+ if ( $('#form_photo').val() !== '' ) {
+ fileURI = $('#form_photo').val();
+
+ var options = new FileUploadOptions();
+ options.fileKey="photo";
+ options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
+ options.mimeType="image/jpeg";
+ options.params = params;
+ options.chunkedMode = false;
+
+ var ft = new FileTransfer();
+ ft.upload(fileURI, CONFIG.FMS_URL + "report/new/mobile", fileUploadSuccess, fileUploadFail, options);
+ } else {
+ jQuery.ajax( {
+ url: CONFIG.FMS_URL + "report/new/mobile",
+ type: 'POST',
+ data: params,
+ timeout: 30000,
+ success: function(data) {
+ if ( data.success ) {
+ localStorage.pc = null;
+ localStorage.lat = null;
+ localStorage.long = null;
+ if ( data.report ) {
+ localStorage.report = data.report;
+ hideBusy();
+ window.location = 'report_created.html';
+ } else {
+ hideBusy();
+ window.location = 'email_sent.html';
+ }
+ } else {
+ if ( data.check_name ) {
+ check_name( data.check_name, data.errors.name );
+ }
+ $('input[type=submit]').prop("disabled", false);
+ hideBusy();
+ }
+ },
+ error: function (data, status, errorThrown ) {
+ hideBusy();
+ alert( 'There was a problem submitting your report, please try again (' + status + '): ' + JSON.stringify(data), function(){}, 'Submit report' );
+ $('input[type=submit]').prop("disabled", false);
+ }
+ } );
+ }
+ return false;
+}
+
+function sign_in() {
+ showBusy( 'Signing In', 'Please wait while you are signed in' );
+ jQuery.ajax( {
+ url: CONFIG.FMS_URL + "auth/ajax/sign_in",
+ type: 'POST',
+ data: {
+ email: $('#form_email').val(),
+ password_sign_in: $('#password_sign_in').val(),
+ remember_me: 1
+ },
+ success: function(data) {
+ console.log(data);
+ if ( data.name ) {
+ localStorage.name = data.name;
+ hideBusy();
+ window.location = 'signed_in.html';
+ $('#sign_out').show();
+ $('#sign_in').hide();
+ } else {
+ hideBusy();
+ $('#form_email').before('<div class="form-error">There was a problem with your email/password combination.</div>');
+ }
+ }
+ } );
+
+}
+
+function display_signed_out_msg() {
+ if ( localStorage.signed_out == 1 ) {
+ $('#user-meta').html('<p>You&rsquo;ve been signed out.</p>');
+ localStorage.signed_out = null;
+ }
+}
+
+function sign_out() {
+ jQuery.ajax( {
+ url: CONFIG.FMS_URL + "auth/ajax/sign_out?" + new Date().getTime(),
+ type: 'GET',
+ success: function(data) {
+ if ( data.signed_out ) {
+ localStorage.signed_out = 1;
+ localStorage.name = null;
+ hideBusy();
+ document.location = 'sign_in.html';
+ }
+ }
+ } );
+}
+
+function sign_out_around() {
+ jQuery.ajax( {
+ url: CONFIG.FMS_URL + "auth/ajax/sign_out?" + new Date().getTime(),
+ type: 'GET',
+ success: function(data) {
+ $('#user-meta').html('');
+ $('#email_label').show();
+ $('#form_email').show();
+ $('#now_submit').show();
+ $('#have_password').show();
+ $('#form_sign_in_yes').show();
+ $('#let_me_confirm').show();
+ $('#password_register').show();
+ $('#password_surround').show();
+ $('#providing_password').show();
+ $('#form_name').val( '' );
+ $('.form-focus-hidden').hide();
+ }
+ } );
+}
+
+function check_auth() {
+ if ( $('#user-meta').length && localStorage.signed_out != 1 ) {
+ var sign_out_function = sign_out;
+ if ( $('body').hasClass('mappage') ) {
+ sign_out_function = sign_out_around;
+ }
+ jQuery.ajax( {
+ url: CONFIG.FMS_URL + "auth/ajax/check_auth?" + new Date().getTime() ,
+ type: 'GET',
+ statusCode: {
+ 200: function(data) {
+ localStorage.name = data.name;
+ $('#user-meta').html('<p>Hi ' + localStorage.name + '<a href="#" id="meta_sign_out">Sign out</a></p>');
+ $('#meta_sign_out').on('click', sign_out_function );
+ $('.mobile-sign-in-banner').show();
+ $('#sign_in').hide();
+ $('#sign_out').show();
+ },
+ 401: function() {
+ $('#user-meta').html('');
+ localStorage.name = '';
+ $('.mobile-sign-in-banner').show();
+ $('#sign_out').hide();
+ $('#sign_in').show();
+ $('#user-meta').html('');
+ }
+ }
+ } );
+ }
+}
+
+function signed_in() {
+ if ( localStorage.name ) {
+ if ( $('body').hasClass('signed-in-page') ) {
+ var sign_out_function = sign_out;
+ if ( $('body').hasClass('mappage') ) {
+ sign_out_function = sign_out_around;
+ }
+ $('#user-meta').html('<p>Hi ' + localStorage.name + '<a href="#" id="meta_sign_out">Sign out</a></p>');
+ $('#meta_sign_out').on('click', sign_out_function );
+ }
+
+ if ( $('#form_sign_in').length ) {
+ check_name( localStorage.name );
+ $('.form-focus-hidden').show();
+ }
+ }
+}
+
+function onDeviceReady() {
+ var location = document.location + '';
+ if ( location.indexOf('no_connection.html') < 0 && (
+ navigator.network.connection.type == Connection.NONE ||
+ navigator.network.connection.type == Connection.UNKNOWN ) ) {
+ document.location = 'no_connection.html';
+ }
+ $('#postcodeForm').submit(locate);
+ $('#mapForm').submit(postReport);
+ $('#signInForm').submit(sign_in);
+ $('#ffo').click(getPosition);
+ $('#mapForm :input[type=submit]').on('click', function() { submit_clicked = $(this); });
+ check_auth();
+ signed_in();
+ hideBusy();
+}
+
+document.addEventListener("deviceready", onDeviceReady, false);
diff --git a/phonegap/www/js/southampton.js b/phonegap/www/js/southampton.js
new file mode 100644
index 000000000..e7af4fcaf
--- /dev/null
+++ b/phonegap/www/js/southampton.js
@@ -0,0 +1,50 @@
+/*
+ * southampton.js
+ * FixMyStreet JavaScript for Southampton
+ */
+
+
+$(function(){
+
+ $('[placeholder]').focus(function(){
+ var input = $(this);
+ if (input.val() == input.attr('placeholder')) {
+ input.val('');
+ input.removeClass('placeholder');
+ input.css({ 'color': '#000000' });
+ }
+ }).blur(function(){
+ var input = $(this);
+ if (input.val() === '' || input.val() == input.attr('placeholder')) {
+ input.css({ 'color': '#999999' });
+ input.val(input.attr('placeholder'));
+ }
+ }).blur();
+
+ $('#form_category').change(function(){
+ var category = $(this).val();
+ if ('Potholes' == category) {
+ if (!$('#potholes_extra').length) {
+ var qns = '<div id="potholes_extra" style="margin:0; display:none;">' +
+ '<div class="form-field"><label for="form_size">Size:</label>' +
+ '<select name="detail_size"><option>-- Please select --<option>Unknown' +
+ '<option>Small: No larger than a dinner plate (up to 30cm/12inches)' +
+ '<option>Medium: No larger than a dustbin lid (up to 60cm/24inches)' +
+ '<option>Large: Larger than a dustbin lid (over 60cm/24inches)' +
+ '</select></div>' +
+ '<div class="form-field"><label for="form_depth">Depth:</label>' +
+ '<select name="detail_depth"><option>-- Please select --<option>Unknown' +
+ '<option>No deeper than a golf ball (up to 4cm/1.5inches)' +
+ '<option>No deeper than a tennis ball (up to 6.5cm/2.5inches)' +
+ '<option>Deeper than a tennis ball' +
+ '</select></div></div>';
+ $('#form_title').closest('div.form-field').after(qns);
+ }
+ $('#potholes_extra').show('fast');
+ } else {
+ $('#potholes_extra').hide('fast');
+ }
+ }).change();
+
+});
+
diff --git a/phonegap/www/jslib/OpenLayers-2.10/OpenLayers.js b/phonegap/www/jslib/OpenLayers-2.10/OpenLayers.js
new file mode 100644
index 000000000..43e67e819
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/OpenLayers.js
@@ -0,0 +1,2553 @@
+/*
+
+ 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"}); \ No newline at end of file
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/blank.gif b/phonegap/www/jslib/OpenLayers-2.10/img/blank.gif
new file mode 100644
index 000000000..4bcc753a1
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/blank.gif
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/cloud-popup-relative.png b/phonegap/www/jslib/OpenLayers-2.10/img/cloud-popup-relative.png
new file mode 100755
index 000000000..1215a3618
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/cloud-popup-relative.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/drag-rectangle-off.png b/phonegap/www/jslib/OpenLayers-2.10/img/drag-rectangle-off.png
new file mode 100644
index 000000000..fc6daf4dc
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/drag-rectangle-off.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/drag-rectangle-on.png b/phonegap/www/jslib/OpenLayers-2.10/img/drag-rectangle-on.png
new file mode 100644
index 000000000..7f783ce13
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/drag-rectangle-on.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/east-mini.png b/phonegap/www/jslib/OpenLayers-2.10/img/east-mini.png
new file mode 100644
index 000000000..0707567a7
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/east-mini.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/layer-switcher-maximize.png b/phonegap/www/jslib/OpenLayers-2.10/img/layer-switcher-maximize.png
new file mode 100644
index 000000000..8d7bb167b
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/layer-switcher-maximize.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/layer-switcher-minimize.png b/phonegap/www/jslib/OpenLayers-2.10/img/layer-switcher-minimize.png
new file mode 100644
index 000000000..e80bf213f
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/layer-switcher-minimize.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/marker-blue.png b/phonegap/www/jslib/OpenLayers-2.10/img/marker-blue.png
new file mode 100644
index 000000000..83a90b4c8
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/marker-blue.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/marker-gold.png b/phonegap/www/jslib/OpenLayers-2.10/img/marker-gold.png
new file mode 100644
index 000000000..2ff9ec528
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/marker-gold.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/marker-green.png b/phonegap/www/jslib/OpenLayers-2.10/img/marker-green.png
new file mode 100644
index 000000000..17168f1b9
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/marker-green.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/marker.png b/phonegap/www/jslib/OpenLayers-2.10/img/marker.png
new file mode 100644
index 000000000..ccd191367
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/marker.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/measuring-stick-off.png b/phonegap/www/jslib/OpenLayers-2.10/img/measuring-stick-off.png
new file mode 100644
index 000000000..70c2dffb1
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/measuring-stick-off.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/measuring-stick-on.png b/phonegap/www/jslib/OpenLayers-2.10/img/measuring-stick-on.png
new file mode 100644
index 000000000..cdb8f345b
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/measuring-stick-on.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/north-mini.png b/phonegap/www/jslib/OpenLayers-2.10/img/north-mini.png
new file mode 100644
index 000000000..a8a0b4033
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/north-mini.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/panning-hand-off.png b/phonegap/www/jslib/OpenLayers-2.10/img/panning-hand-off.png
new file mode 100644
index 000000000..4c912aca6
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/panning-hand-off.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/panning-hand-on.png b/phonegap/www/jslib/OpenLayers-2.10/img/panning-hand-on.png
new file mode 100644
index 000000000..6094c64e7
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/panning-hand-on.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/slider.png b/phonegap/www/jslib/OpenLayers-2.10/img/slider.png
new file mode 100644
index 000000000..23afd573b
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/slider.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/south-mini.png b/phonegap/www/jslib/OpenLayers-2.10/img/south-mini.png
new file mode 100644
index 000000000..6c4ac8a0f
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/south-mini.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/west-mini.png b/phonegap/www/jslib/OpenLayers-2.10/img/west-mini.png
new file mode 100644
index 000000000..db5f420ca
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/west-mini.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/zoom-minus-mini.png b/phonegap/www/jslib/OpenLayers-2.10/img/zoom-minus-mini.png
new file mode 100644
index 000000000..f9b63aba0
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/zoom-minus-mini.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/zoom-plus-mini.png b/phonegap/www/jslib/OpenLayers-2.10/img/zoom-plus-mini.png
new file mode 100644
index 000000000..eecf2eb4b
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/zoom-plus-mini.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/zoom-world-mini.png b/phonegap/www/jslib/OpenLayers-2.10/img/zoom-world-mini.png
new file mode 100644
index 000000000..2159dde7b
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/zoom-world-mini.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/img/zoombar.png b/phonegap/www/jslib/OpenLayers-2.10/img/zoombar.png
new file mode 100644
index 000000000..959f01a93
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/img/zoombar.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/license.txt b/phonegap/www/jslib/OpenLayers-2.10/license.txt
new file mode 100644
index 000000000..598af50ef
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/license.txt
@@ -0,0 +1,38 @@
+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.
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/framedCloud.css b/phonegap/www/jslib/OpenLayers-2.10/theme/default/framedCloud.css
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/framedCloud.css
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/google.css b/phonegap/www/jslib/OpenLayers-2.10/theme/default/google.css
new file mode 100644
index 000000000..3c1c1872a
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/google.css
@@ -0,0 +1,10 @@
+.olLayerGoogleCopyright {
+ right: 3px;
+ bottom: 2px;
+ left: auto;
+}
+.olLayerGooglePoweredBy {
+ left: 2px;
+ bottom: 2px;
+}
+
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/ie6-style.css b/phonegap/www/jslib/OpenLayers-2.10/theme/default/ie6-style.css
new file mode 100644
index 000000000..65f6b192c
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/ie6-style.css
@@ -0,0 +1,7 @@
+.olControlZoomPanel div {
+ background-image: url(img/zoom-panel-NOALPHA.png);
+}
+.olControlPanPanel div {
+ background-image: url(img/pan-panel-NOALPHA.png);
+}
+
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/add_point_off.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/add_point_off.png
new file mode 100644
index 000000000..aefd09cf3
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/add_point_off.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/add_point_on.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/add_point_on.png
new file mode 100644
index 000000000..1294a2c16
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/add_point_on.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/blank.gif b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/blank.gif
new file mode 100644
index 000000000..4bcc753a1
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/blank.gif
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/close.gif b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/close.gif
new file mode 100644
index 000000000..a8958de9b
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/close.gif
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/drag-rectangle-off.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/drag-rectangle-off.png
new file mode 100644
index 000000000..fc6daf4dc
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/drag-rectangle-off.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/drag-rectangle-on.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/drag-rectangle-on.png
new file mode 100644
index 000000000..7f783ce13
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/drag-rectangle-on.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_line_off.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_line_off.png
new file mode 100644
index 000000000..7f1561254
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_line_off.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_line_on.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_line_on.png
new file mode 100644
index 000000000..ba09186c7
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_line_on.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_point_off.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_point_off.png
new file mode 100644
index 000000000..fde94bde2
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_point_off.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_point_on.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_point_on.png
new file mode 100644
index 000000000..880422185
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_point_on.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_polygon_off.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_polygon_off.png
new file mode 100644
index 000000000..53ce9d786
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_polygon_off.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_polygon_on.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_polygon_on.png
new file mode 100644
index 000000000..2a3337614
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_polygon_on.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/editing_tool_bar.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/editing_tool_bar.png
new file mode 100644
index 000000000..464340efb
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/editing_tool_bar.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/move_feature_off.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/move_feature_off.png
new file mode 100644
index 000000000..9f588dbb2
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/move_feature_off.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/move_feature_on.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/move_feature_on.png
new file mode 100644
index 000000000..072f066c3
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/move_feature_on.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/navigation_history.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/navigation_history.png
new file mode 100644
index 000000000..053d1e0d2
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/navigation_history.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/overview_replacement.gif b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/overview_replacement.gif
new file mode 100644
index 000000000..a82cf5fc5
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/overview_replacement.gif
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan-panel-NOALPHA.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan-panel-NOALPHA.png
new file mode 100644
index 000000000..2740d8baf
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan-panel-NOALPHA.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan-panel.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan-panel.png
new file mode 100644
index 000000000..99101219c
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan-panel.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan_off.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan_off.png
new file mode 100644
index 000000000..30b2aed4d
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan_off.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan_on.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan_on.png
new file mode 100644
index 000000000..d73e7ddd7
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan_on.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/panning-hand-off.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/panning-hand-off.png
new file mode 100644
index 000000000..4c912aca6
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/panning-hand-off.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/panning-hand-on.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/panning-hand-on.png
new file mode 100644
index 000000000..6094c64e7
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/panning-hand-on.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/remove_point_off.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/remove_point_off.png
new file mode 100644
index 000000000..76c8606f5
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/remove_point_off.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/remove_point_on.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/remove_point_on.png
new file mode 100644
index 000000000..0ff28fc71
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/remove_point_on.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/ruler.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/ruler.png
new file mode 100644
index 000000000..aa4883bcd
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/ruler.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/save_features_off.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/save_features_off.png
new file mode 100644
index 000000000..2bf290676
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/save_features_off.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/save_features_on.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/save_features_on.png
new file mode 100644
index 000000000..93c8f080b
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/save_features_on.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_next_off.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_next_off.png
new file mode 100644
index 000000000..23c5ac1fe
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_next_off.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_next_on.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_next_on.png
new file mode 100644
index 000000000..e41fb7bdd
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_next_on.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_previous_off.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_previous_off.png
new file mode 100644
index 000000000..b9c230f74
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_previous_off.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_previous_on.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_previous_on.png
new file mode 100644
index 000000000..c009c255e
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_previous_on.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/zoom-panel-NOALPHA.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/zoom-panel-NOALPHA.png
new file mode 100644
index 000000000..cdde6fc7e
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/zoom-panel-NOALPHA.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/zoom-panel.png b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/zoom-panel.png
new file mode 100644
index 000000000..f2c7c518d
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/img/zoom-panel.png
Binary files differ
diff --git a/phonegap/www/jslib/OpenLayers-2.10/theme/default/style.css b/phonegap/www/jslib/OpenLayers-2.10/theme/default/style.css
new file mode 100644
index 000000000..0627f0e15
--- /dev/null
+++ b/phonegap/www/jslib/OpenLayers-2.10/theme/default/style.css
@@ -0,0 +1,397 @@
+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;
+}
diff --git a/phonegap/www/no_connection.html b/phonegap/www/no_connection.html
new file mode 100644
index 000000000..8a77d9c26
--- /dev/null
+++ b/phonegap/www/no_connection.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title></title>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
+ <meta charset="utf-8">
+
+ <link rel="stylesheet" href="css/base.css">
+ <link rel="stylesheet" href="css/mobile.css">
+ <script type="text/javascript" src="js/json2.js"></script>
+ <script type="text/javascript" src="js/config.js"></script>
+ <script type="text/javascript" charset="utf-8" src="cordova-1.8.0.js"></script>
+ <script type="text/javascript" src="js/jquery-1.7.0.min.js"></script>
+ <script src="js/jquery.validate.min.js" type="text/javascript" charset="utf-8"></script>
+
+ <script type="text/javascript" src="js/geo.min.js"></script>
+ <script type="text/javascript" src="js/fixmystreet.js"></script>
+ <script type="text/javascript" src="js/mobile.js"></script>
+
+ <script type="text/javascript">
+ validation_strings = {
+ update: 'Please enter a message',
+ title: 'Please enter a subject',
+ detail: 'Please enter some details',
+ name: {
+ required: 'Please enter your name',
+ validName: 'Please enter your full name, councils need this information – if you do not wish your name to be shown on the site, untick the box below'
+ },
+ category: 'Please choose a category',
+ rznvy: {
+ required: 'Please enter your email',
+ email: 'Please enter a valid email'
+ },
+ email: {
+ required: 'Please enter your email',
+ email: 'Please enter a valid email'
+ }
+ };
+ </script>
+ </head>
+ <body id="container" class="frontpage fullwidthpage mobile-header" ontouchmove="touchmove(event);">
+
+ <div class="wrapper">
+ <div class="table-cell">
+ <header id="site-header" role="banner">
+ <div class="container">
+ <span id="site-logo"></span>
+ </div>
+ </header>
+
+ <div class="container">
+ <div class="content" role="main">
+ <div class="tablewrapper">
+ <h2>No Internet connection</h2>
+
+ <p>
+ There is no connection to the internet available which means
+ you can't report a problem at the moment. Please try again when
+ you have a connection.
+ </p>
+ </div>
+ </div><!-- .content role=main -->
+ </div><!-- .container -->
+ </div><!-- .table-cell -->
+
+ <div class="mobile-info">
+ <a href="about.html">i</a>
+ </div>
+
+ <div class="big-green-banner mobile-map-banner mobile-nav-banner">
+ <a href="index.html">Home</a>
+ No connection
+ </div>
+ </div> <!-- .wrapper -->
+ </body>
+</html>
+</html>
diff --git a/phonegap/www/report_created.html b/phonegap/www/report_created.html
new file mode 100644
index 000000000..6810ac60e
--- /dev/null
+++ b/phonegap/www/report_created.html
@@ -0,0 +1,59 @@
+<!doctype html>
+ <head>
+ <meta name="viewport" content="initial-scale=1.0">
+
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
+ <meta name="HandHeldFriendly" content="true">
+ <meta name="mobileoptimized" content="0">
+
+ <link rel="stylesheet" href="css/base.css">
+ <link rel="stylesheet" href="css/mobile.css">
+ <link rel="stylesheet" href="css/layout.css" media="(min-width:48em)">
+
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <script type="text/javascript" src="js/config.js"></script>
+ <script type="text/javascript" charset="utf-8" src="cordova-1.8.0.js"></script>
+ <script type="text/javascript" src="js/jquery-1.7.0.min.js"></script>
+ <script type="text/javascript" src="js/mobile.js"></script>
+
+ <script type="text/javascript">
+ $(function() {
+ var uri = CONFIG.FMS_URL + 'report/' + localStorage.report;
+ $('#report_url').html( '<a href="' + uri + '">' + uri + '</a>' );
+ });
+ </script>
+
+
+ <title> Report Created :: FixMyStreet </title>
+
+ </head>
+ <body class="mobile-header" id="container" ontouchmove="touchmove(event);">
+
+ <div class="wrapper">
+ <div class="table-cell">
+ <header id="site-header" role="banner">
+ <div class="container">
+ <span id="site-logo"></span>
+ </div>
+ </header>
+
+ <div class="container">
+ <div class="content" role="main">
+ <h1>Your report has been created</h1>
+
+ <p>You can view it on the site at <span id="report_url"></span></p>
+ </div><!-- .content role=main -->
+ </div><!-- .container -->
+ </div><!-- .table-cell -->
+
+ <div class="big-green-banner mobile-map-banner mobile-nav-banner">
+ <a href="index.html">home</a>
+ Report Created
+ </div>
+ <div class="mobile-info">
+ <a href="about.html">i</a>
+ </div>
+
+ </div> <!-- .wrapper -->
+</body>
+</html>
diff --git a/phonegap/www/sign_in.html b/phonegap/www/sign_in.html
new file mode 100644
index 000000000..0a4658e5a
--- /dev/null
+++ b/phonegap/www/sign_in.html
@@ -0,0 +1,105 @@
+<!doctype html>
+<html class="no-js" lang="en-gb">
+ <head>
+ <meta name="viewport" content="initial-scale=1.0">
+
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
+ <meta name="HandHeldFriendly" content="true">
+ <meta name="mobileoptimized" content="0">
+
+ <link rel="stylesheet" href="css/base.css">
+ <link rel="stylesheet" href="css/mobile.css">
+ <link rel="stylesheet" href="css/layout.css" media="(min-width:48em)">
+
+ <script type="text/javascript" src="js/config.js"></script>
+
+ <script type="text/javascript" charset="utf-8" src="cordova-1.8.0.js"></script>
+
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <script type="text/javascript" src="js/jquery-1.7.0.min.js"></script>
+
+ <script src="js/jquery.validate.min.js" type="text/javascript" charset="utf-8"></script>
+
+ <script type="text/javascript" src="js/json2.js"></script>
+ <script type="text/javascript" src="js/geo.min.js"></script>
+ <script type="text/javascript" src="js/fixmystreet.js"></script>
+ <script type="text/javascript" src="js/mobile.js"></script>
+
+ <script type="text/javascript">
+ validation_strings = {
+ update: 'Please enter a message',
+ title: 'Please enter a subject',
+ detail: 'Please enter some details',
+ name: {
+ required: 'Please enter your name',
+ validName: 'Please enter your full name, councils need this information – if you do not wish your name to be shown on the site, untick the box below'
+ },
+ category: 'Please choose a category',
+ rznvy: {
+ required: 'Please enter your email',
+ email: 'Please enter a valid email'
+ },
+ email: {
+ required: 'Please enter your email',
+ email: 'Please enter a valid email'
+ }
+ };
+ </script>
+ <title> Viewing a location :: FixMyStreet </title>
+ </head>
+
+ <body class="mobile-header" id="container" onload="display_signed_out_msg();">
+
+ <div class="wrapper">
+ <div class="table-cell">
+ <header id="site-header" role="banner">
+ <div class="container">
+ <span id="site-logo"></span>
+ </div>
+ </header>
+
+ <div id="user-meta">
+
+ </div>
+
+ <div class="container">
+ <div class="content" role="main">
+ <form action="" method="post" name="signInForm" id="signInForm" enctype="multipart/form-data" class="validate">
+ <div id="form_sign_in_only">
+ <div id="form_sign_in_yes" class="form-box">
+ <label for="form_email" id="email_label">Email</label>
+ <input type="email" value="" name="email" id="form_email" placeholder="Please enter your email address" required>
+
+ <div class="form-txt-submit-box">
+ <label for="password_sign_in" id="passsword_sign_in_label">Password</label>
+ <input type="password" name="password_sign_in" id="password_sign_in" placeholder="Your password" value="">
+ <input class="green-btn" type="submit" id="submit_sign_in" name="submit_sign_in" value="Sign in">
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div><!-- .table-cell -->
+
+ <div class="big-green-banner mobile-map-banner mobile-nav-banner">
+ <a href="index.html">home</a>
+ Sign In
+ </div>
+ </div> <!-- .wrapper -->
+ <div class="spinner" id="loadingSpinner">
+ <div class="bar1"></div>
+ <div class="bar2"></div>
+ <div class="bar3"></div>
+ <div class="bar4"></div>
+ <div class="bar5"></div>
+ <div class="bar6"></div>
+ <div class="bar7"></div>
+ <div class="bar8"></div>
+ <div class="bar9"></div>
+ <div class="bar10"></div>
+ <div class="bar11"></div>
+ <div class="bar12"></div>
+ </div>
+</body>
+</html>
diff --git a/phonegap/www/signed_in.html b/phonegap/www/signed_in.html
new file mode 100644
index 000000000..1ef6e284f
--- /dev/null
+++ b/phonegap/www/signed_in.html
@@ -0,0 +1,83 @@
+<!doctype html>
+<html class="no-js" lang="en-gb">
+ <head>
+ <meta name="viewport" content="initial-scale=1.0">
+
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
+ <meta name="HandHeldFriendly" content="true">
+ <meta name="mobileoptimized" content="0">
+
+ <link rel="stylesheet" href="css/base.css">
+ <link rel="stylesheet" href="css/mobile.css">
+ <link rel="stylesheet" href="css/layout.css" media="(min-width:48em)">
+
+ <script type="text/javascript" src="js/config.js"></script>
+
+ <script type="text/javascript" charset="utf-8" src="cordova-1.8.0.js"></script>
+
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <script type="text/javascript" src="js/jquery-1.7.0.min.js"></script>
+
+ <script src="js/jquery.validate.min.js" type="text/javascript" charset="utf-8"></script>
+
+ <script type="text/javascript" src="js/json2.js"></script>
+ <script type="text/javascript" src="js/geo.min.js"></script>
+ <script type="text/javascript" src="js/fixmystreet.js"></script>
+ <script type="text/javascript" src="js/mobile.js"></script>
+ <script type="text/javascript" src="js/OpenLayers.fixmystreet.js"></script>
+ <script type="text/javascript" src="js/map-OpenLayers.js"></script>
+ <script type="text/javascript" src="js/map-bing-ol.js"></script>
+ <script type="text/javascript" src="js/jquery.ba-hashchange.min.js"></script>
+
+ <script type="text/javascript">
+ validation_strings = {
+ update: 'Please enter a message',
+ title: 'Please enter a subject',
+ detail: 'Please enter some details',
+ name: {
+ required: 'Please enter your name',
+ validName: 'Please enter your full name, councils need this information – if you do not wish your name to be shown on the site, untick the box below'
+ },
+ category: 'Please choose a category',
+ rznvy: {
+ required: 'Please enter your email',
+ email: 'Please enter a valid email'
+ },
+ email: {
+ required: 'Please enter your email',
+ email: 'Please enter a valid email'
+ }
+ };
+ </script>
+ <title> Viewing a location :: FixMyStreet </title>
+ </head>
+
+ <body class="mobile-header signed-in-page" id="container">
+
+ <div class="wrapper">
+ <div class="table-cell">
+ <header id="site-header" role="banner">
+ <div class="container">
+ <span id="site-logo"></span>
+ </div>
+ </header>
+
+ <div id="user-meta">
+
+ </div>
+
+ <div class="container">
+ <div class="content" role="main">
+
+ </div><!-- .content role=main -->
+ </div><!-- .container -->
+ </div><!-- .table-cell -->
+
+ <div class="big-green-banner mobile-map-banner mobile-nav-banner">
+ <a href="index.html">home</a>
+ Signed In
+ </div>
+
+ </div> <!-- .wrapper -->
+</body>
+</html>
diff --git a/t/app/controller/dashboard.t b/t/app/controller/dashboard.t
new file mode 100644
index 000000000..472c6d9bd
--- /dev/null
+++ b/t/app/controller/dashboard.t
@@ -0,0 +1,641 @@
+use strict;
+use warnings;
+use Test::More;
+
+use FixMyStreet::TestMech;
+use Web::Scraper;
+
+my $mech = FixMyStreet::TestMech->new;
+
+my $test_user = 'council_user@example.com';
+my $test_pass = 'password';
+my $test_council = 2651;
+my $test_ward = 20723;
+
+$mech->delete_user( $test_user );
+my $user = FixMyStreet::App->model('DB::User')->create( {
+ email => $test_user,
+ password => $test_pass,
+} );
+
+my $p_user = FixMyStreet::App->model('DB::User')->find_or_create( {
+ email => 'p_user@example.com'
+} );
+
+$mech->not_logged_in_ok;
+$mech->get_ok('/dashboard');
+
+$mech->content_contains( 'sign in' );
+
+$mech->submit_form(
+ with_fields => { email => $test_user, password_sign_in => $test_pass }
+);
+
+is $mech->status, '404', 'If not council user get 404';
+
+$user->from_council( $test_council );
+$user->update;
+
+$mech->log_out_ok;
+$mech->get_ok('/dashboard');
+$mech->submit_form_ok( {
+ with_fields => { email => $test_user, password_sign_in => $test_pass }
+} );
+
+$mech->content_contains( 'Summary Statistics for City of Edinburgh' );
+
+FixMyStreet::App->model('DB::Contact')->search( { area_id => $test_council } )
+ ->delete;
+
+delete_problems();
+
+my @cats = qw( Grafitti Litter Potholes );
+for my $contact ( @cats ) {
+ FixMyStreet::App->model('DB::Contact')->create(
+ {
+ area_id => $test_council,
+ category => $contact,
+ email => "$contact\@example.org",
+ confirmed => 1,
+ whenedited => DateTime->now,
+ deleted => 0,
+ editor => 'test',
+ note => 'test',
+ }
+ );
+}
+
+$mech->get_ok('/dashboard');
+
+my $categories = scraper {
+ process "select[name=category] > option", 'cats[]' => 'TEXT',
+ process "select[name=ward] > option", 'wards[]' => 'TEXT',
+ process "table[id=overview] > tr", 'rows[]' => scraper {
+ process 'td', 'cols[]' => 'TEXT'
+ },
+ process "tr[id=total] > td", 'totals[]' => 'TEXT',
+ process "tr[id=fixed_council] > td", 'council[]' => 'TEXT',
+ process "tr[id=fixed_user] > td", 'user[]' => 'TEXT',
+ process "tr[id=total_fixed] > td", 'total_fixed[]' => 'TEXT',
+ process "tr[id=in_progress] > td", 'in_progress[]' => 'TEXT',
+ process "tr[id=planned] > td", 'planned[]' => 'TEXT',
+ process "tr[id=investigating] > td", 'investigating[]' => 'TEXT',
+ process "tr[id=marked] > td", 'marked[]' => 'TEXT',
+ process "tr[id=avg_marked] > td", 'avg_marked[]' => 'TEXT',
+ process "tr[id=avg_fixed] > td", 'avg_fixed[]' => 'TEXT',
+ process "tr[id=not_marked] > td", 'not_marked[]' => 'TEXT',
+ process "tr[id=closed] > td", 'closed[]' => 'TEXT',
+ process "table[id=reports] > tr > td", 'report_lists[]' => scraper {
+ process 'ul > li', 'reports[]' => 'TEXT'
+ },
+};
+
+my $expected_cats = [ 'All', '-- Pick a category --', @cats, 'Other' ];
+my $res = $categories->scrape( $mech->content );
+is_deeply( $res->{cats}, $expected_cats, 'correct list of categories' );
+
+foreach my $row ( @{ $res->{rows} }[1 .. 11] ) {
+ foreach my $col ( @{ $row->{cols} } ) {
+ is $col, 0;
+ }
+}
+
+for my $reports ( @{ $res->{report_lists} } ) {
+ is_deeply $reports, {}, 'No reports';
+}
+
+foreach my $test (
+ {
+ desc => 'confirmed today with no state',
+ dt => DateTime->now,
+ counts => [1,1,1,1],
+ report_counts => [1, 0, 0],
+ },
+ {
+ desc => 'confirmed last 7 days with no state',
+ dt => DateTime->now->subtract( days => 6, hours => 23 ),
+ counts => [1,2,2,2],
+ report_counts => [2, 0, 0],
+ },
+ {
+ desc => 'confirmed last 8 days with no state',
+ dt => DateTime->now->subtract( days => 8 ),
+ counts => [1,2,3,3],
+ report_counts => [2, 1, 0],
+ },
+ {
+ desc => 'confirmed last 4 weeks with no state',
+ dt => DateTime->now->subtract( weeks => 2 ),
+ counts => [1,2,4,4],
+ report_counts => [2, 1, 1],
+ },
+ {
+ desc => 'confirmed this year with no state',
+ dt => DateTime->now->subtract( weeks => 7 ),
+ counts => [1,2,4,5],
+ report_counts => [2, 1, 1],
+ },
+) {
+ subtest $test->{desc} => sub {
+ make_problem( { state => 'confirmed', conf_dt => $test->{dt} } );
+
+ $mech->get_ok('/dashboard');
+ $res = $categories->scrape( $mech->content );
+
+ check_row( $res, 'totals', $test->{counts} );
+ check_row( $res, 'not_marked', $test->{counts} );
+
+ check_report_counts( $res, $test->{report_counts} );
+ };
+}
+
+delete_problems();
+
+my $is_monday = DateTime->now->day_of_week == 1 ? 1 : 0;
+
+foreach my $test (
+ {
+ desc => 'user fixed today',
+ confirm_dt => DateTime->now->subtract( days => 1 ),
+ mark_dt => DateTime->now,
+ state => 'fixed - user',
+ counts => {
+ totals => $is_monday ? [0,1,1,1] : [1,1,1,1],
+ user => [1,1,1,1],
+ council => [0,0,0,0],
+ avg_fixed => [0,0,0,0],
+ total_fixed => [1,1,1,1],
+ }
+ },
+ {
+ desc => 'council fixed today',
+ confirm_dt => DateTime->now->subtract( days => 1 ),
+ mark_dt => DateTime->now,
+ state => 'fixed - council',
+ counts => {
+ totals => $is_monday ? [0,2,2,2] : [2,2,2,2],
+ user => [1,1,1,1],
+ council => [1,1,1,1],
+ avg_fixed => [1,1,1,1],
+ total_fixed => [2,2,2,2],
+ }
+ },
+ {
+ desc => 'marked investigating today',
+ confirm_dt => DateTime->now->subtract( days => 1 ),
+ mark_dt => DateTime->now,
+ state => 'investigating',
+ counts => {
+ totals => $is_monday ? [0,3,3,3] : [3,3,3,3],
+ user => [1,1,1,1],
+ council => [1,1,1,1],
+ total_fixed => [2,2,2,2],
+ avg_marked => [1,1,1,1],
+ investigating => [1,1,1,1],
+ marked => [1,1,1,1]
+ }
+ },
+ {
+ desc => 'marked in progress today',
+ confirm_dt => DateTime->now->subtract( days => 1 ),
+ mark_dt => DateTime->now,
+ state => 'in progress',
+ counts => {
+ totals => $is_monday ? [0,4,4,4] : [4,4,4,4],
+ user => [1,1,1,1],
+ council => [1,1,1,1],
+ total_fixed => [2,2,2,2],
+ avg_marked => [1,1,1,1],
+ investigating => [1,1,1,1],
+ in_progress => [1,1,1,1],
+ marked => [2,2,2,2]
+ }
+ },
+ {
+ desc => 'marked as planned today',
+ confirm_dt => DateTime->now->subtract( days => 1 ),
+ mark_dt => DateTime->now,
+ state => 'planned',
+ counts => {
+ totals => $is_monday ? [ 0,5,5,5] : [5,5,5,5],
+ user => [1,1,1,1],
+ council => [1,1,1,1],
+ total_fixed => [2,2,2,2],
+ avg_marked => [1,1,1,1],
+ investigating => [1,1,1,1],
+ in_progress => [1,1,1,1],
+ planned => [1,1,1,1],
+ marked => [3,3,3,3]
+ }
+ },
+ {
+ desc => 'marked as planned today, confirmed a week ago',
+ confirm_dt => DateTime->now->subtract( days => 8 ),
+ mark_dt => DateTime->now,
+ state => 'planned',
+ counts => {
+ totals => $is_monday ? [0,5,6,6] : [5,5,6,6],
+ user => [1,1,1,1],
+ council => [1,1,1,1],
+ total_fixed => [2,2,2,2],
+ avg_marked => [3,3,3,3],
+ investigating => [1,1,1,1],
+ in_progress => [1,1,1,1],
+ planned => [2,2,2,2],
+ marked => [4,4,4,4]
+ }
+ },
+ {
+ desc => 'marked as council fixed today, confirmed a week ago',
+ confirm_dt => DateTime->now->subtract( days => 8 ),
+ mark_dt => DateTime->now,
+ state => 'fixed - council',
+ counts => {
+ totals => $is_monday ? [0,5,7,7] : [5,5,7,7],
+ user => [1,1,1,1],
+ council => [2,2,2,2],
+ total_fixed => [3,3,3,3],
+ avg_fixed => [5,5,5,5],
+ avg_marked => [3,3,3,3],
+ investigating => [1,1,1,1],
+ in_progress => [1,1,1,1],
+ planned => [2,2,2,2],
+ marked => [4,4,4,4]
+ }
+ },
+ {
+ desc => 'marked as council fixed a week ago, confirmed 3 weeks ago',
+ confirm_dt => DateTime->now->subtract( days => 21),
+ mark_dt => DateTime->now->subtract( days => 8 ),
+ state => 'fixed - council',
+ counts => {
+ totals => $is_monday ? [0,5,8,8] : [5,5,8,8],
+ user => [1,1,1,1],
+ council => [2,2,3,3],
+ total_fixed => [3,3,4,4],
+ avg_fixed => [5,5,7,7],
+ avg_marked => [3,3,3,3],
+ investigating => [1,1,1,1],
+ in_progress => [1,1,1,1],
+ planned => [2,2,2,2],
+ marked => [4,4,4,4]
+ }
+ },
+ {
+ desc => 'marked as user fixed 6 weeks ago, confirmed 7 weeks ago',
+ confirm_dt => DateTime->now->subtract( weeks => 6 ),
+ mark_dt => DateTime->now->subtract( weeks => 7 ),
+ state => 'fixed - user',
+ counts => {
+ totals => $is_monday ? [0,5,8,9] : [5,5,8,9],
+ user => [1,1,1,2],
+ council => [2,2,3,3],
+ total_fixed => [3,3,4,5],
+ avg_fixed => [5,5,7,7],
+ avg_marked => [3,3,3,3],
+ investigating => [1,1,1,1],
+ in_progress => [1,1,1,1],
+ planned => [2,2,2,2],
+ marked => [4,4,4,4]
+ }
+ },
+ {
+ desc => 'marked as closed',
+ confirm_dt => DateTime->now->subtract( days => 1 ),
+ mark_dt => DateTime->now,
+ state => 'closed',
+ counts => {
+ totals => $is_monday ? [0,6,9,10] : [6,6,9,10],
+ user => [1,1,1,2],
+ council => [2,2,3,3],
+ total_fixed => [3,3,4,5],
+ avg_fixed => [5,5,7,7],
+ avg_marked => [2,2,2,2],
+ investigating => [1,1,1,1],
+ in_progress => [1,1,1,1],
+ planned => [2,2,2,2],
+ closed => [1,1,1,1],
+ marked => [5,5,5,5]
+ }
+ },
+) {
+ subtest $test->{desc} => sub {
+ make_problem(
+ {
+ state => $test->{state},
+ conf_dt => $test->{confirm_dt},
+ mark_dt => $test->{mark_dt},
+ }
+ );
+
+ $mech->get_ok('/dashboard');
+ $res = $categories->scrape( $mech->content );
+
+ foreach my $row ( keys %{ $test->{counts} } ) {
+ check_row( $res, $row, $test->{counts}->{$row} );
+ }
+ };
+}
+
+delete_problems();
+
+for my $test (
+ {
+ desc => 'Selecting no category does nothing',
+ p1 => {
+ state => 'confirmed',
+ conf_dt => DateTime->now(),
+ category => 'Potholes',
+ },
+ p2 => {
+ state => 'confirmed',
+ conf_dt => DateTime->now(),
+ category => 'Litter',
+ },
+ category => '',
+ counts => {
+ totals => [2,2,2,2],
+ },
+ counts_after => {
+ totals => [2,2,2,2],
+ },
+ report_counts => [2,0,0],
+ report_counts_after => [2,0,0],
+ },
+ {
+ desc => 'Limit display by category',
+ category => 'Potholes',
+ counts => {
+ totals => [2,2,2,2],
+ },
+ counts_after => {
+ totals => [1,1,1,1],
+ },
+ report_counts => [2,0,0],
+ report_counts_after => [1,0,0],
+ },
+ {
+ desc => 'Limit display for category with no entries',
+ category => 'Grafitti',
+ counts => {
+ totals => [2,2,2,2],
+ },
+ counts_after => {
+ totals => [0,0,0,0],
+ },
+ report_counts => [2,0,0],
+ report_counts_after => [0,0,0],
+ },
+ {
+ desc => 'Limit display by category for council fixed',
+ p1 => {
+ state => 'fixed - council',
+ conf_dt => DateTime->now()->subtract( weeks => 1 ),
+ mark_dt => DateTime->now()->subtract( weeks => 1 ),
+ category => 'Potholes',
+ },
+ p2 => {
+ state => 'fixed - council',
+ conf_dt => DateTime->now()->subtract( weeks => 1 ),
+ mark_dt => DateTime->now()->subtract( weeks => 1 ),
+ category => 'Litter',
+ },
+ category => 'Potholes',
+ counts => {
+ council => [0,0,2,2],
+ totals => [2,2,4,4],
+ },
+ counts_after => {
+ council => [0,0,1,1],
+ totals => [1,1,2,2],
+ },
+ report_counts => [2,2,0],
+ report_counts_after => [1,1,0],
+ },
+ {
+ desc => 'Limit display by category for user fixed',
+ p1 => {
+ state => 'fixed - user',
+ conf_dt => DateTime->now()->subtract( weeks => 1 ),
+ mark_dt => DateTime->now()->subtract( weeks => 1 ),
+ category => 'Potholes',
+ },
+ p2 => {
+ state => 'fixed - user',
+ conf_dt => DateTime->now()->subtract( weeks => 1 ),
+ mark_dt => DateTime->now()->subtract( weeks => 1 ),
+ category => 'Litter',
+ },
+ category => 'Potholes',
+ counts => {
+ user => [0,0,2,2],
+ council => [0,0,2,2],
+ totals => [2,2,6,6],
+ },
+ counts_after => {
+ user => [0,0,1,1],
+ council => [0,0,1,1],
+ totals => [1,1,3,3],
+ },
+ report_counts => [2,4,0],
+ report_counts_after => [1,2,0],
+ },
+ {
+ desc => 'Limit display by ward',
+ p1 => {
+ state => 'confirmed',
+ conf_dt => DateTime->now()->subtract( weeks => 1 ),
+ category => 'Potholes',
+ # in real life it has commas around it and the search
+ # uses them
+ areas => ',20720,',
+ },
+ p2 => {
+ state => 'fixed - council',
+ conf_dt => DateTime->now()->subtract( weeks => 1 ),
+ mark_dt => DateTime->now()->subtract( weeks => 1 ),
+ category => 'Litter',
+ areas => ',20720,',
+ },
+ ward => 20720,
+ counts => {
+ user => [0,0,2,2],
+ council => [0,0,3,3],
+ totals => [2,2,8,8],
+ },
+ counts_after => {
+ user => [0,0,0,0],
+ council => [0,0,1,1],
+ totals => [0,0,2,2],
+ },
+ report_counts => [2,6,0],
+ report_counts_after => [0,2,0],
+ },
+) {
+ subtest $test->{desc} => sub {
+ make_problem( $test->{p1} ) if $test->{p1};
+ make_problem( $test->{p2} ) if $test->{p2};
+
+ $mech->get_ok('/dashboard');
+
+ $res = $categories->scrape( $mech->content );
+
+ foreach my $row ( keys %{ $test->{counts} } ) {
+ check_row( $res, $row, $test->{counts}->{$row} );
+ }
+
+ check_report_counts( $res, $test->{report_counts} );
+
+ $mech->submit_form_ok( {
+ with_fields => {
+ category => $test->{category},
+ ward => $test->{ward},
+ }
+ } );
+
+ $res = $categories->scrape( $mech->content );
+
+ foreach my $row ( keys %{ $test->{counts_after} } ) {
+ check_row( $res, $row, $test->{counts_after}->{$row} );
+ }
+ check_report_counts( $res, $test->{report_counts_after} );
+ };
+}
+
+delete_problems();
+
+for my $test (
+ {
+ desc => 'Selecting no state does nothing',
+ p1 => {
+ state => 'fixed - user',
+ conf_dt => DateTime->now(),
+ category => 'Potholes',
+ },
+ p2 => {
+ state => 'confirmed',
+ conf_dt => DateTime->now(),
+ category => 'Litter',
+ },
+ state => '',
+ report_counts => [2,0,0],
+ report_counts_after => [2,0,0],
+ },
+ {
+ desc => 'limit by state works',
+ state => 'fixed',
+ report_counts => [2,0,0],
+ report_counts_after => [1,0,0],
+ },
+ {
+ desc => 'All fixed states count as fixed',
+ p1 => {
+ state => 'fixed - council',
+ conf_dt => DateTime->now(),
+ category => 'Potholes',
+ },
+ p2 => {
+ state => 'fixed',
+ conf_dt => DateTime->now(),
+ category => 'Potholes',
+ },
+ state => 'fixed',
+ report_counts => [4,0,0],
+ report_counts_after => [3,0,0],
+ },
+) {
+ subtest $test->{desc} => sub {
+ make_problem( $test->{p1} ) if $test->{p1};
+ make_problem( $test->{p2} ) if $test->{p2};
+
+ $mech->get_ok('/dashboard');
+
+ $res = $categories->scrape( $mech->content );
+
+ check_report_counts( $res, $test->{report_counts} );
+
+ $mech->submit_form_ok( {
+ with_fields => {
+ state => $test->{state},
+ }
+ } );
+
+ $res = $categories->scrape( $mech->content );
+
+ check_report_counts( $res, $test->{report_counts_after} );
+ };
+}
+
+sub make_problem {
+ my $args = shift;
+
+ my $p = FixMyStreet::App->model('DB::Problem')->create( {
+ title => 'a problem',
+ name => 'a user',
+ anonymous => 1,
+ detail => 'some detail',
+ state => $args->{state},
+ confirmed => $args->{conf_dt},
+ whensent => $args->{conf_dt},
+ lastupdate => $args->{mark_dt} || $args->{conf_dt},
+ council => $test_council,
+ postcode => 'EH99 1SP',
+ latitude => '51',
+ longitude => '1',
+ areas => $args->{areas} || $test_ward,
+ used_map => 0,
+ user_id => $p_user->id,
+ category => $args->{category} || 'Other',
+ } );
+
+ if ( $args->{state} ne 'confirmed' ) {
+ my $c = FixMyStreet::App->model('DB::Comment')->create( {
+ problem => $p,
+ user_id => $p_user->id,
+ state => 'confirmed',
+ problem_state => $args->{state} =~ /^fixed - user|fixed$/ ? undef : $args->{state},
+ confirmed => $args->{mark_dt},
+ text => 'an update',
+ mark_fixed => $args->{state} =~ /fixed/ ? 1 : 0,
+ anonymous => 1,
+ } );
+ }
+}
+
+sub check_row {
+ my $res = shift;
+ my $row = shift;
+ my $totals = shift;
+
+ is $res->{ $row }->[0], $totals->[0], "Correct count in $row for WTD";
+ is $res->{ $row }->[1], $totals->[1], "Correct count in $row for last 7 days";
+ is $res->{ $row }->[2], $totals->[2], "Correct count in $row for last 4 weeks";
+ is $res->{ $row }->[3], $totals->[3], "Correct count in $row for YTD";
+}
+
+sub check_report_counts {
+ my $res = shift;
+ my $counts = shift;
+
+ for my $i ( 0 .. 2 ) {
+ if ( $counts->[$i] == 0 ) {
+ is_deeply $res->{report_lists}->[$i], {}, "No reports for column $i";
+ } else {
+ if ( ref( $res->{report_lists}->[$i]->{reports} ) eq 'ARRAY' ) {
+ is scalar @{ $res->{report_lists}->[$i]->{reports} }, $counts->[$i], "Correct report count for column $i";
+ } else {
+ fail "Correct report count for column $i ( no reports )";
+ }
+ }
+ }
+}
+
+sub delete_problems {
+ FixMyStreet::App->model('DB::Comment')
+ ->search( { 'problem.council' => $test_council }, { join => 'problem' } )
+ ->delete;
+ FixMyStreet::App->model('DB::Problem')
+ ->search( { council => $test_council } )->delete();
+}
+
+done_testing;
diff --git a/t/app/model/alert_type.t b/t/app/model/alert_type.t
index 67ddc10aa..c23252de6 100644
--- a/t/app/model/alert_type.t
+++ b/t/app/model/alert_type.t
@@ -347,6 +347,150 @@ foreach my $test (
};
}
+my $ward_alert = FixMyStreet::App->model('DB::Alert')->find_or_create(
+ {
+ user => $user,
+ parameter => 7117,
+ alert_type => 'area_problems',
+ whensubscribed => $dt->ymd . ' ' . $dt->hms,
+ confirmed => 1,
+ cobrand => 'lichfielddc',
+ }
+);
+
+my $report_to_council = FixMyStreet::App->model('DB::Problem')->find_or_create(
+ {
+ postcode => 'WS13 6YY',
+ council => '2434',
+ areas => ',105255,11806,11828,2247,2504,7117,',
+ category => 'Other',
+ title => 'council report',
+ detail => 'Test 2 Detail',
+ used_map => 't',
+ name => 'Test User',
+ anonymous => 'f',
+ state => 'closed',
+ confirmed => $now->ymd . ' ' . $now->hms,
+ lang => 'en-gb',
+ service => '',
+ cobrand => 'default',
+ cobrand_data => '',
+ send_questionnaire => 't',
+ latitude => '52.727588',
+ longitude => '-1.731322',
+ user_id => $user2->id,
+ }
+);
+
+my $report_to_county_council = FixMyStreet::App->model('DB::Problem')->find_or_create(
+ {
+ postcode => 'WS13 6YY',
+ council => '2240',
+ areas => ',105255,11806,11828,2247,2504,7117,',
+ category => 'Other',
+ title => 'county report',
+ detail => 'Test 2 Detail',
+ used_map => 't',
+ name => 'Test User',
+ anonymous => 'f',
+ state => 'closed',
+ confirmed => $now->ymd . ' ' . $now->hms,
+ lang => 'en-gb',
+ service => '',
+ cobrand => 'default',
+ cobrand_data => '',
+ send_questionnaire => 't',
+ latitude => '52.727588',
+ longitude => '-1.731322',
+ user_id => $user2->id,
+ }
+);
+
+my $report_outside_district = FixMyStreet::App->model('DB::Problem')->find_or_create(
+ {
+ postcode => 'WS13 6YY',
+ council => '2221',
+ areas => ',105255,11806,11828,2247,2504,7117,',
+ category => 'Other',
+ title => 'outside district report',
+ detail => 'Test 2 Detail',
+ used_map => 't',
+ name => 'Test User',
+ anonymous => 'f',
+ state => 'closed',
+ confirmed => $now->ymd . ' ' . $now->hms,
+ lang => 'en-gb',
+ service => '',
+ cobrand => 'default',
+ cobrand_data => '',
+ send_questionnaire => 't',
+ latitude => '52.7352866189',
+ longitude => '-1.69540489214',
+ user_id => $user2->id,
+ }
+);
+
+subtest "check alerts from cobrand send main site url for alerts for different council" => sub {
+ $mech->clear_emails_ok;
+
+ my $sent = FixMyStreet::App->model('DB::AlertSent')->search(
+ {
+ alert_id => $ward_alert->id,
+ }
+ )->delete;
+
+ FixMyStreet::App->model('DB::AlertType')->email_alerts();
+
+ $mech->email_count_is( 1 );
+ my $email = $mech->get_email;
+ my $body = $email->body;
+
+ my $expected1 = mySociety::Config::get('BASE_URL') . '/report/' . $report_to_county_council->id;
+ my $expected3 = mySociety::Config::get('BASE_URL') . '/report/' . $report_outside_district->id;
+ my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker('lichfielddc')->new();
+ my $expected2 = $cobrand->base_url_for_emails . '/report/' . $report_to_council->id;
+
+ like $body, qr#$expected1#, 'non cobrand area report point to fixmystreet.com';
+ like $body, qr#$expected2#, 'cobrand area report point to cobrand url';
+ like $body, qr#$expected3#, 'report outside district report point to fixmystreet.com';
+};
+
+
+my $local_alert = FixMyStreet::App->model('DB::Alert')->find_or_create(
+ {
+ user => $user,
+ parameter => -1.731322,
+ parameter2 => 52.727588,
+ alert_type => 'local_problems',
+ whensubscribed => $dt->ymd . ' ' . $dt->hms,
+ cobrand => 'lichfielddc',
+ confirmed => 1,
+ }
+);
+
+subtest "check local alerts from cobrand send main site url for alerts for different council" => sub {
+ $mech->clear_emails_ok;
+
+ my $sent = FixMyStreet::App->model('DB::AlertSent')->search(
+ {
+ alert_id => $local_alert->id,
+ }
+ )->delete;
+
+ FixMyStreet::App->model('DB::AlertType')->email_alerts();
+
+ $mech->email_count_is( 1 );
+ my $email = $mech->get_email;
+ my $body = $email->body;
+
+ my $expected1 = mySociety::Config::get('BASE_URL') . '/report/' . $report_to_county_council->id;
+ my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker('lichfielddc')->new();
+ my $expected2 = $cobrand->base_url_for_emails . '/report/' . $report_to_council->id;
+
+ like $body, qr#$expected1#, 'non cobrand area report point to fixmystreet.com';
+ like $body, qr#$expected2#, 'cobrand area report point to cobrand url';
+};
+
$report->comments->delete();
$report->delete();
done_testing();
diff --git a/t/open311/getservicerequestupdates.t b/t/open311/getservicerequestupdates.t
index 92d03e385..7ec8d5ae0 100644
--- a/t/open311/getservicerequestupdates.t
+++ b/t/open311/getservicerequestupdates.t
@@ -113,6 +113,7 @@ for my $test (
close_comment => 0,
mark_fixed=> 0,
mark_open => 0,
+ problem_state => undef,
end_state => 'confirmed',
},
{
@@ -122,8 +123,9 @@ for my $test (
external_id => 638344,
start_state => 'confirmed',
close_comment => 1,
- mark_fixed=> 1,
+ mark_fixed=> 0,
mark_open => 0,
+ problem_state => 'fixed - council',
end_state => 'fixed - council',
},
{
@@ -134,7 +136,8 @@ for my $test (
start_state => 'fixed - user',
close_comment => 0,
mark_fixed => 0,
- mark_open => 1,
+ mark_open => 0,
+ problem_state => 'confirmed',
end_state => 'confirmed',
},
{
@@ -145,7 +148,8 @@ for my $test (
start_state => 'closed',
close_comment => 0,
mark_fixed => 0,
- mark_open => 1,
+ mark_open => 0,
+ problem_state => 'confirmed',
end_state => 'confirmed',
},
{
@@ -185,6 +189,7 @@ for my $test (
ok $c, 'comment exists';
is $c->text, $test->{description}, 'text correct';
is $c->mark_fixed, $test->{mark_fixed}, 'mark_closed correct';
+ is $c->problem_state, $test->{problem_state}, 'problem_state correct';
is $c->mark_open, $test->{mark_open}, 'mark_open correct';
is $problem->state, $test->{end_state}, 'correct problem state';
};
diff --git a/templates/email/bromley/questionnaire.txt b/templates/email/bromley/questionnaire.txt
index 7cdc10131..4328479e1 100644
--- a/templates/email/bromley/questionnaire.txt
+++ b/templates/email/bromley/questionnaire.txt
@@ -11,9 +11,7 @@ updating the status of your problem:
This email has been sent automatically from an unmonitored
mailbox, please do not reply.
-Customer Service Centre
-London Borough of Bromley
-Email: csc@bromley.gov.uk
+[% INCLUDE 'signature.txt' %]
Your problem was as follows:
diff --git a/templates/email/bromley/signature.txt b/templates/email/bromley/signature.txt
new file mode 100644
index 000000000..776ba3527
--- /dev/null
+++ b/templates/email/bromley/signature.txt
@@ -0,0 +1,3 @@
+Customer Service Centre
+London Borough of Bromley
+Email: csc@bromley.gov.uk
diff --git a/templates/email/default/alert-confirm.txt b/templates/email/default/alert-confirm.txt
index fae3f2963..abf7801f5 100644
--- a/templates/email/default/alert-confirm.txt
+++ b/templates/email/default/alert-confirm.txt
@@ -1,14 +1,13 @@
-Subject: Confirm your alert on FixMyStreet
+Subject: Confirm your alert on [% c.cobrand.site_name %]
Hi,
Please click on the link below to confirm the alert you just
-asked to subscribe to on FixMyStreet:
+asked to subscribe to on [% c.cobrand.site_name %]:
[% token_url %]
If you can't click the link, please copy and paste it to the
address bar of your web browser.
-Yours,
-The FixMyStreet team
+[% INCLUDE 'signature.txt' %]
diff --git a/templates/email/default/alert-problem-area.txt b/templates/email/default/alert-problem-area.txt
index 8c41aaf5e..3696c87d4 100644
--- a/templates/email/default/alert-problem-area.txt
+++ b/templates/email/default/alert-problem-area.txt
@@ -5,8 +5,7 @@ The following new problems have been added within
<?=$values['data']?>
-Yours,
-The FixMyStreet team
+<?=$values['signature']?>
To stop receiving emails when there are new problems in
<?=$values['area_name']?>, please follow this link:
diff --git a/templates/email/default/alert-problem-council.txt b/templates/email/default/alert-problem-council.txt
index 572e057a6..5544a2043 100644
--- a/templates/email/default/alert-problem-council.txt
+++ b/templates/email/default/alert-problem-council.txt
@@ -4,8 +4,7 @@ The following new problems have been reported to <?=$values['area_name']?>:
<?=$values['data']?>
-Yours,
-The FixMyStreet team
+<?=$values['signature']?>
To stop receiving emails when there are new problems reported to
<?=$values['area_name']?>, please follow this link:
diff --git a/templates/email/default/alert-problem-nearby.txt b/templates/email/default/alert-problem-nearby.txt
index 0bf8483a7..0c88dab5a 100644
--- a/templates/email/default/alert-problem-nearby.txt
+++ b/templates/email/default/alert-problem-nearby.txt
@@ -4,8 +4,7 @@ The following nearby problems have been added:
<?=$values['data']?>
-Yours,
-The FixMyStreet team
+<?=$values['signature']?>
To stop receiving emails when there are nearby problems,
please follow this link: <?=$values['unsubscribe_url']?>
diff --git a/templates/email/default/alert-problem-ward.txt b/templates/email/default/alert-problem-ward.txt
index efcf15993..9793bcdac 100644
--- a/templates/email/default/alert-problem-ward.txt
+++ b/templates/email/default/alert-problem-ward.txt
@@ -5,8 +5,7 @@ within <?=$values['ward_name']?>:
<?=$values['data']?>
-Yours,
-The FixMyStreet team
+<?=$values['signature']?>
To stop receiving emails when there are new problems reported to
<?=$values['area_name']?> within <?=$values['ward_name']?>,
diff --git a/templates/email/default/alert-problem.txt b/templates/email/default/alert-problem.txt
index 8369b8e28..01e184e0a 100644
--- a/templates/email/default/alert-problem.txt
+++ b/templates/email/default/alert-problem.txt
@@ -4,8 +4,7 @@ The following new problems have been added:
<?=$values['data']?>
-Yours,
-The FixMyStreet team
+<?=$values['signature']?>
To stop receiving emails when there are new problems,
please follow this link: <?=$values['unsubscribe_url']?>
diff --git a/templates/email/default/alert-update.txt b/templates/email/default/alert-update.txt
index ac0ddd50a..1140de1fa 100644
--- a/templates/email/default/alert-update.txt
+++ b/templates/email/default/alert-update.txt
@@ -11,8 +11,7 @@ To view or reply to these updates, please visit the following URL:
You cannot contact anyone by replying to this email.
-Yours,
-The FixMyStreet team
+<?=$values['signature']?>
To stop receiving emails when there are new updates on this problem,
please follow this link: <?=$values['unsubscribe_url']?>
diff --git a/templates/email/default/login.txt b/templates/email/default/login.txt
index d24f1cc4f..608d99ee9 100644
--- a/templates/email/default/login.txt
+++ b/templates/email/default/login.txt
@@ -5,6 +5,5 @@ able to view your problem reports and manage them more easily.
[% c.uri_for_action( 'auth/token', token ) %]
-Yours,
-The FixMyStreet.com team
+[% INCLUDE 'signature.txt' %]
diff --git a/templates/email/default/partial.txt b/templates/email/default/partial.txt
index 279d76ea0..82bc0cf0e 100644
--- a/templates/email/default/partial.txt
+++ b/templates/email/default/partial.txt
@@ -10,5 +10,4 @@ please visit the following URL:
Thanks!
-Yours,
-The FixMyStreet team
+[% INCLUDE 'signature.txt' %]
diff --git a/templates/email/default/problem-confirm.txt b/templates/email/default/problem-confirm.txt
index 58c1c75d1..5f5bd511a 100644
--- a/templates/email/default/problem-confirm.txt
+++ b/templates/email/default/problem-confirm.txt
@@ -1,9 +1,9 @@
-Subject: Confirm your problem on FixMyStreet
+Subject: Confirm your problem on [% c.cobrand.site_name %]
Hi [% report.name %],
Please click on the link below to confirm the problem you just
-added to FixMyStreet:
+added to [% c.cobrand.site_name %]:
[% token_url %]
@@ -16,5 +16,4 @@ Your problem had the title:
And details:
[% report.detail %]
-Yours,
-The FixMyStreet team
+[% INCLUDE 'signature.txt' %]
diff --git a/templates/email/default/questionnaire.txt b/templates/email/default/questionnaire.txt
index 7ff184c41..88d4cc1b5 100644
--- a/templates/email/default/questionnaire.txt
+++ b/templates/email/default/questionnaire.txt
@@ -13,8 +13,7 @@ updating the status of your problem:
Please do not reply to this email; there is a public comment
box on the questionnaire.
-Yours,
-The FixMyStreet team
+<?=$values['signature']?>
Your problem was as follows:
diff --git a/templates/email/default/reply-autoresponse b/templates/email/default/reply-autoresponse
index 672c1f3c9..f984c66b0 100644
--- a/templates/email/default/reply-autoresponse
+++ b/templates/email/default/reply-autoresponse
@@ -19,5 +19,5 @@ unsubscribe link at the bottom of the email.
If you have a question or comment about the site, please send your
email to team@fixmystreet.com
-Yours,
+Yours,
The FixMyStreet team
diff --git a/templates/email/default/signature.txt b/templates/email/default/signature.txt
new file mode 100644
index 000000000..69ee38767
--- /dev/null
+++ b/templates/email/default/signature.txt
@@ -0,0 +1,2 @@
+Yours,
+The FixMyStreet team
diff --git a/templates/email/default/submit-brent.txt b/templates/email/default/submit-brent.txt
index 4b3e20968..c94e6e1e4 100644
--- a/templates/email/default/submit-brent.txt
+++ b/templates/email/default/submit-brent.txt
@@ -29,8 +29,7 @@ Longitude: <?=$values['longitude']?>
Replies to this email will go to the user who submitted the problem.
-Yours,
-The FixMyStreet team
+<?=$values['signature']?>
This message was sent via FixMyStreet, a project of UKCOD, registered charity
number 1076346. If there is a more appropriate email address for messages about
@@ -40,5 +39,5 @@ also welcome any other feedback you may have.
FixMyStreet is now available for full integration into council
websites, making life easier for both you and your residents.
-Read more here: http://www.fixmystreet.com/for-councils
+Read more here: http://www.mysociety.org/for-councils/fixmystreet/
diff --git a/templates/email/default/submit-example.txt b/templates/email/default/submit-example.txt
index 6d1815cd1..4956a7a93 100644
--- a/templates/email/default/submit-example.txt
+++ b/templates/email/default/submit-example.txt
@@ -57,5 +57,5 @@ feedback you may have.
FixMyStreet is now available for full integration into council
websites, making life easier for both you and your residents.
-Read more here: http://www.fixmystreet.com/for-councils
+Read more here: http://www.mysociety.org/for-councils/fixmystreet/
diff --git a/templates/email/default/submit.txt b/templates/email/default/submit.txt
index 20fa17096..a956b4add 100644
--- a/templates/email/default/submit.txt
+++ b/templates/email/default/submit.txt
@@ -29,8 +29,7 @@ Longitude: <?=$values['longitude']?>
Replies to this email will go to the user who submitted the problem.
-Yours,
-The FixMyStreet team
+<?=$values['signature']?>
This message was sent via FixMyStreet, a project of UKCOD, registered charity
number 1076346. If there is a more appropriate email address for messages about
@@ -40,5 +39,5 @@ also welcome any other feedback you may have.
FixMyStreet is now available for full integration into council
websites, making life easier for both you and your residents.
-Read more here: http://www.fixmystreet.com/for-councils
+Read more here: http://www.mysociety.org/for-councils/fixmystreet/
diff --git a/templates/email/default/update-confirm.txt b/templates/email/default/update-confirm.txt
index c7571e76c..fdcd68edb 100644
--- a/templates/email/default/update-confirm.txt
+++ b/templates/email/default/update-confirm.txt
@@ -1,4 +1,4 @@
-Subject: Confirm your update on FixMyStreet
+Subject: Confirm your update on [% c.cobrand.site_name %]
Hi [% update.name %],
@@ -14,5 +14,4 @@ Your update reads:
[% update.text %]
-Yours,
-The FixMyStreet team
+[% INCLUDE 'signature.txt' %]
diff --git a/templates/web/barnet/faq/faq-en-gb.html b/templates/web/barnet/faq/faq-en-gb.html
new file mode 100755
index 000000000..126a03314
--- /dev/null
+++ b/templates/web/barnet/faq/faq-en-gb.html
@@ -0,0 +1,103 @@
+[% INCLUDE 'header.html', title = 'Help', bodyclass = 'twothirdswidthpage' %]
+
+<h1>Frequently Asked Questions</h1>
+
+<p>These pages are for reporting things which are broken or dirty or damaged or dumped, and need fixing, cleaning or clearing, such as:</p>
+ <ul><li>abandoned vehicles
+ <li>flyposting or graffiti
+ <li>flytipping or litter
+ <li>streetcleaning, such as broken glass in a cycle lane
+ <li>unlit lamposts
+ <li>broken playground equipment
+ <li>potholes
+ </ul>
+
+<dl>
+ <dt>What issues can&rsquo;t be reported here?</dt>
+ <dd><p>It is not a way of reporting all issues. Problems such as:</p>
+ <ul>
+ <li>missed rubbish or recycling collections
+ <li>anti-social behaviour
+ <li>noise pollution or barking dogs
+ <li>fires and smoke/smell pollution
+ <li>proposals for speed bumps/ CCTV/ pedestrian crossings/ new road layouts/ etc.
+ <li>complaining about your neighbours
+ <li>complaining or commenting about the council
+ </ul>
+ </dd>
+
+ <dt>How do I report a problem here?</dt>
+ <dd>After entering a postcode or location, you are shown
+a map of that area. You can view problems already reported in that area,
+or report ones of your own by clicking on the map at the location of
+the problem.</dd>
+ <dt>How are the problems solved?</dt>
+ <dd>They are reported directly to us so we can then resolve the problem.
+ You can also discuss the problem on the website with others if you wish.</dd>
+
+ <dt>Do you remove silly or illegal content?</dt>
+ <dd>Barnet Council and FixMyStreet are not responsible for the content and accuracy
+of material submitted by their users. We reserve the right to edit or remove any
+problems or updates which we consider to be inappropriate upon being informed
+by a user of the site.</dd>
+
+ <dt>Can I use FixMyStreet on my mobile?</dt>
+ <dd>Yes a special mobile friendly version is available to report problem in Barnet’s streets or parks.
+ </dd>
+
+ <dt>Can I use these pages to report problems outside of the London Borough of Barnet?</dd>
+ <dd>No, please visit the main FixMyStreet site at <a href="http://www.fixmystreet.com/">http://www.fixmystreet.com/</a> to report problem outside the borough.</dd>
+
+ <dt>Who built FixMyStreet?</dt>
+ <dd>FixMyStreet was built by <a href="http://www.mysociety.org/">mySociety</a>, in conjunction with the <a href="http://www.youngfoundation.org.uk/">Young Foundation</a>.
+mySociety is the project of a registered charity which has grown out of the community of
+volunteers who built sites like <a href="http://www.theyworkforyou.com/">TheyWorkForYou</a>.
+mySociety&rsquo;s primary mission is to build Internet projects which give people simple, tangible
+benefits in the civic and community aspects of their lives. Our first project
+was <a href="http://www.writetothem.com/">WriteToThem</a>, where you can write to any of your
+elected representatives, for free. The charity is called UK Citizens Online Democracy and is charity number 1076346. mySociety
+can be contacted by email at <a href="mailto:hello&#64;mysociety.org">hello&#64;mysociety.org</a>,
+or by post at: mySociety, 483 Green Lanes, London, N13 4BS, UK.</dd>
+
+ <dt>Why does the site use kilometres for measurements?</dt>
+ <dd>The British national
+ grid reference system, devised by Ordnance Survey (the British national
+ mapping agency) around the time of the second world war, uses eastings and
+ northings measured in metres and kilometres; the maps we use are from
+ Ordnance Survey and so this is what we use to display distances.
+ There you have it: not everything British is in miles!</dd>
+
+ <dt>Why can&rsquo;t I zoom out more on the reporting map?</dt>
+ <dd>We want to keep reports locally focused, so we restrict the ability to
+ move radically between areas. The map on <a href="/my">Your Reports</a> will let you see all
+ the reports you&rsquo;ve made, wherever they are.</dd>
+
+ <dt>Who gets to see my email address?</dt>
+ <dd>If you submit a problem, your details, and details
+ of the problem, will be submitted to Barnet Council.
+Other than the council, only people we authorise to view the FixMyStreet administration interface
+will be able to see your email address and they will never use it for anything other than
+to help administer FixMyStreet. We will never give or sell your email address to anyone else,
+unless we are obliged to by law. Your name will not be published anywhere unless you let us.</dd>
+
+ <dt>What emails will you send to me?</dt>
+ <dd>We will email you if someone leaves an update on a
+problem you&rsquo;ve reported, and send you a questionnaire email four weeks
+after you submit a problem, asking for a status update; we&rsquo;ll only ever
+send you emails in relation to your problem.</dd>
+
+ <dt>I&rsquo;d like a site like this for my own location/ where&rsquo;s the "source code" to this site?</dt>
+ <dd>
+The software behind this site is open source, and available
+to you mainly under the GNU Affero GPL software license. You can <a
+href="http://github.com/mysociety/fixmystreet">download the
+source code</a> and help us develop it.
+You&rsquo;re welcome to use it in your own projects, although you must also
+make available the source code to any such projects.
+<a href="http://www.fiksgatami.no/">Fiksgatami</a> is an example of our code
+being used in a Norwegian version of this site.
+</dd>
+
+ </dl>
+
+[% INCLUDE 'footer.html' pagefooter = 'yes' %]
diff --git a/templates/web/barnet/footer.html b/templates/web/barnet/footer.html
index 32c6b5f7b..7982ad530 100644
--- a/templates/web/barnet/footer.html
+++ b/templates/web/barnet/footer.html
@@ -1,7 +1,37 @@
- </div>
- <!-- end of content, start of footer -->
- </div>
- </div>
+ <p id="barnet-powered-by" class="desk-only">
+ <a href="http://www.fixmystreet.com/">Powered by <img src="/cobrands/barnet/img/fms-logo.png" style="height:20px;"></a>
+ </p>
+ </div><!-- .content role=main -->
+ </div><!-- .container -->
+ </div><!-- .table-cell -->
+
+ <div class="nav-wrapper">
+ <div class="nav-wrapper-2">
+ <div id="main-nav" role="navigation">
+ <ul id="mysoc-menu">
+ <li><a href="http://www.fixmystreet.com/">Powered by <img src="/cobrands/barnet/img/fms-logo.png" style="height:20px;"></a></li>
+ </ul>
+ <ul id="main-menu">
+ <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn"
+ >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/my' %]span[% ELSE %]a href="/my"[% END
+ %]>[% loc("Your reports") %]</[% c.req.uri.path == '/my' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/reports/Barnet' %]span[% ELSE %]a href="/reports/Barnet"[% END
+ %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END
+ %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END
+ %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+
+ </div> <!-- .wrapper -->
+</div>
+</div>
+</div>
+
<!-- googleoff: index -->
<div id="column_nav">
<div class="navigation active">
@@ -44,8 +74,7 @@
</div>
</div>
<!-- googleon: index -->
- </div>
- </div>
- </div>
+</div>
+</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/templates/web/barnet/header.html b/templates/web/barnet/header.html
index 955473090..5c6a19d89 100644
--- a/templates/web/barnet/header.html
+++ b/templates/web/barnet/header.html
@@ -1,60 +1,94 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
- <head>
- <link rel="stylesheet" type="text/css" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/styles/standard.css" media="screen" />
-<!--[if lte IE 6]>
- <link rel="stylesheet" type="text/css" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/styles/generic/ie-six.css" media="screen" />
- <link rel="stylesheet" type="text/css" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/styles/generic/ie-six-print.css" media="print" />
-<![endif]-->
-<!--[if IE 7]>
- <link rel="stylesheet" type="text/css" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/styles/generic/ie-seven.css" media="screen" />
-<![endif]-->
-<!--[if IE 8]>
- <link rel="stylesheet" type="text/css" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/styles/generic/ie-eight.css" media="screen" />
-<![endif]-->
- <link rel="stylesheet" type="text/css" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/styles/generic/print.css" media="print" />
- <link rel="stylesheet" type="text/css" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/styles/generic/handheld.css" media="handheld" />
- <link rel="Shortcut Icon" type="image/x-icon" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/favicon.ico" />
+<!doctype html>
+<!--[if lt IE 7]><html class="no-js ie6 oldie" lang="[% lang_code %]"><![endif]-->
+<!--[if IE 7]> <html class="no-js ie7 oldie" lang="[% lang_code %]"><![endif]-->
+<!--[if IE 8]> <html class="no-js ie8 oldie" lang="[% lang_code %]"><![endif]-->
+<!--[if IE 9]> <html class="no-js ie9 oldie" lang="[% lang_code %]"><![endif]-->
+<!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]-->
+ <head>
+ <meta name="viewport" content="initial-scale=1.0">
+
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
+ <meta name="HandHeldFriendly" content="true">
+ <meta name="mobileoptimized" content="0">
+
<link rel="ToC" href="http://www.barnet.gov.uk/site_map" />
<meta name="Keywords" content="fixmystreet barnet pothole streetlights report street problem" />
<meta name="Description" content="FixMyStreet Barnet: report problems in Barnet like graffiti, fly tipping, broken paving slabs, or street lighting" />
- <link rel="stylesheet" type="text/css" href="[% version('/css/core.css') %]">
- <link rel="stylesheet" type="text/css" href="/cobrands/barnet/css/layout.css">
-
- [% INCLUDE 'common_header_tags.html' %]
-
- </head>
- <body>
- <div id="wrapper">
- <div id="ie_wrapper">
-<!-- googleoff: index -->
- <div id="mobile_name">London Borough of Barnet</div>
- <div id="mast">
- <div class="pseudoH1">
- <a href="http://www.barnet.gov.uk/"><span>London Borough of Barnet</span> <img src="http://pledgebank.barnet.gov.uk/microsites/barnet/site/images/blank.gif" alt="London Borough of Barnet logo" /></a>
- </div>
- <ul id="skip" class="hidden">
- <li><a href="#content" rel="nofollow">Skip to content</a></li>
- <li><a href="#column_nav" rel="nofollow">Skip to main navigation</a></li>
- </ul>
- <div class="mast_links"></div>
- <span class="clear"></span>
- <div id="search"></div>
- <div class="clear"></div>
- </div>
-<!-- googleon: index -->
- <div id="page_wrap">
- <div id="page">
- <div id="breadcrumb">
-<!-- googleoff:all -->
- <ul>
- <li><a href="/">FixMyStreet Home</a></li>
- <li class="bc_end"><span>[% c.req.uri.path == '/'? 'Report a problem' : "$title" | html %]</span></li>
- </ul>
-<!-- googleon:all -->
- </div>
- <div id="content" class="withWidth fullWidth">
- <div id="mysociety">
-
- <!-- end of header --> \ No newline at end of file
+ <link rel="Shortcut Icon" type="image/x-icon" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/favicon.ico" />
+
+ <link rel="stylesheet" href="[% version('/cobrands/barnet/base.css') %]">
+ <link rel="stylesheet" href="[% version('/cobrands/barnet/layout.css') %]" media="(min-width:48em)">
+ <link rel="stylesheet" href="[% version('/js/fancybox/jquery.fancybox-1.3.4.css') %]">
+ <!--[if (lt IE 9) & (!IEMobile)]>
+ <link rel="stylesheet" href="[% version('/cobrands/barnet/layout.css') %]">
+ <![endif]-->
+ <link rel="stylesheet" href="[% version('/cobrands/barnet/barnet.css') %]" media="(min-width:48em)">
+ <!--[if (lt IE 9) & (!IEMobile)]>
+ <link rel="stylesheet" href="[% version('/cobrands/barnet/barnet.css') %]">
+ <![endif]-->
+
+ <script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script>
+ <script src="[% version('/cobrands/barnet/position_map.js') %]" charset="utf-8"></script>
+ [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %]
+ <script src="[% version('/js/fancybox/jquery.fancybox-1.3.4.pack.js') %]" charset="utf-8"></script>
+
+ </head>
+ <body class="[% bodyclass | html IF bodyclass %]">
+ <div id="barnet-wrapper">
+ <div id="ie_wrapper">
+ <div id="mast">
+ <div class="pseudoH1">
+ <a href="http://www.barnet.gov.uk/"><span>London Borough of Barnet</span> <img src="http://pledgebank.barnet.gov.uk/microsites/barnet/site/images/blank.gif" alt="London Borough of Barnet logo" /></a>
+ </div>
+ <ul id="skip" class="hidden">
+ <li><a href="#content" rel="nofollow">Skip to content</a></li>
+ <li><a href="#column_nav" rel="nofollow">Skip to main navigation</a></li>
+ </ul>
+ <div class="mast_links"></div>
+ <span class="clear"></span>
+ <div id="search"></div>
+ <div class="clear"></div>
+ </div>
+ <div id="page_wrap">
+ <div id="page">
+ <div id="breadcrumb">
+ <!-- googleoff:all -->
+ <ul>
+ <li><a href="http://www.barnet.gov.uk/">Home</a></li>
+ <li><a href="/">FixMyStreet</a></li>
+ <li class="bc_end"><span>
+ [% IF c.req.uri.path == '/' %]Report a problem[% ELSE %][% title %][% END %]
+ </span></li>
+ </ul>
+ <!-- googleon:all -->
+ </div>
+ <div id="content" class="withWidth fullWidth">
+ <div id="user-meta">
+ [% IF c.user_exists %]
+ <p>
+ [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %]
+ <a href="/auth/sign_out">[% loc('sign out') %]</a>
+ </p>
+ [% END %]
+ </div>
+
+ <h1 id="page-title">
+ <span>FixMyStreet</span>
+ </h1>
+
+ <div class="wrapper">
+ <div class="table-cell">
+ <header id="site-header" role="banner">
+ <div class="container">
+ <a href="/" id="site-logo">FixMyStreet</a>
+ <a href="#main-nav" id="nav-link">Main Navigation</a>
+ </div>
+ </header>
+
+ [% pre_container_extra %]
+
+ <div class="container">
+ <div class="content[% " $mainclass" | html IF mainclass %]" role="main">
+
+ <!-- end of header -->
diff --git a/templates/web/barnet/index.html b/templates/web/barnet/index.html
new file mode 100644
index 000000000..82600625e
--- /dev/null
+++ b/templates/web/barnet/index.html
@@ -0,0 +1,100 @@
+[%# Assumes fixmystreet cobrand is using FMS map template - for bonus points preload all the right map elements. %]
+[% map_js = BLOCK %]
+<script>
+yepnope.addPrefix( 'preload', function ( resource ) {
+ resource.noexec = true;
+ return resource;
+});
+Modernizr.load({
+ load: [
+ "preload![% version('/js/OpenLayers.fixmystreet.js') %]",
+ "preload![% version('/js/map-OpenLayers.js') %]",
+ "preload![% version('/js/map-bing-ol.js') %]",
+ "preload![% version('/js/jquery.ba-hashchange.min.js') %]"
+ ]
+});
+</script>
+[% END %]
+
+[% pre_container_extra = BLOCK %]
+<div id="front-main">
+ <div id="front-main-container">
+ <h1>[% loc('Report, view, or discuss local problems') %]</h1>
+
+ <h2>[% loc('(like graffiti, fly tipping, broken paving slabs, or street lighting)') %]</h2>
+
+ [%
+ question
+ = c.cobrand.enter_postcode_text()
+ || loc("Enter a nearby GB postcode, or street name and area");
+ %]
+
+ <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm">
+ <label for="pc">[% question %]:</label>
+ <div>
+ <input type="text" name="pc" value="" id="pc" size="10" maxlength="200" placeholder="[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]">
+ <input type="submit" value="[% loc('Go') %]" id="submit">
+ </div>
+ </form>
+ </div>
+</div>
+[% END %]
+
+[% INCLUDE 'header.html', title => '' , bodyclass => 'frontpage fullwidthpage' %]
+
+[% IF error %]
+ <p class="error">[% error %]</p>
+[% END %]
+
+<div class="tablewrapper">
+ <div id="front-howto">
+ <h2>[% loc('How to report a problem') %]</h2>
+
+ <ol class="big-numbers">
+ <li>[% question %]</li>
+ <li>[% loc('Locate the problem on a map of the area') %]</li>
+ <li>[% loc('Enter details of the problem') %]</li>
+ </ol>
+
+ <section class="full-width">
+ [% INCLUDE "front/stats.html" %]
+ [% TRY %][% INCLUDE "front/tips.html" %][% CATCH file %][% END %]
+ </section>
+ </div>
+
+
+ [%
+ recent_photos = c.cobrand.recent_photos('front', 5);
+ %]
+
+ [% IF recent_photos.size %]
+ <div id="front-recently">
+ <h2>[% loc('Recently reported problems') %]</h2>
+
+ <section class="full-width">
+ <ul class="issue-list-a">
+ [% FOREACH p IN recent_photos %]
+ <li>
+ <a href="/report/[% p.id %]">
+ <div class="text">
+ <h4>[% p.title | html %]</h4>
+ <small>[% prettify_epoch( p.confirmed_local.epoch, 1 ) %]</small>
+ </div>
+ <div class="img">
+ <img alt="[% p.title | html %]" title="[% p.title | html %]" height="60" width="90" src="/photo/[% p.id %].fp.jpeg">
+ </div>
+ </a>
+ </li>
+ [% END %]
+ </ul>
+ </section>
+
+ </div>
+ [% END %]
+</div>
+
+
+<!-- [% TRY %][% INCLUDE 'front/news.html' %][% CATCH file %][% END %] -->
+
+
+[% INCLUDE 'footer.html' pagefooter = 'yes' %]
diff --git a/templates/web/barnet/report/new/councils_text_all.html b/templates/web/barnet/report/new/councils_text_all.html
new file mode 100644
index 000000000..20152928b
--- /dev/null
+++ b/templates/web/barnet/report/new/councils_text_all.html
@@ -0,0 +1,4 @@
+<p>
+All the information you provide here will be sent to the <strong>relevant department</strong>.
+[% loc('The subject and details of the problem will be public, plus your name if you give us permission.') %]
+</p>
diff --git a/templates/web/barnet/report/updates-sidebar-notes.html b/templates/web/barnet/report/updates-sidebar-notes.html
new file mode 100644
index 000000000..9fff322a1
--- /dev/null
+++ b/templates/web/barnet/report/updates-sidebar-notes.html
@@ -0,0 +1 @@
+ <p>[% loc( 'Please note that updates are not sent to the relevant department. If you leave your name it will be public. Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a>' ) %]</p>
diff --git a/templates/web/bromley/faq/faq-en-gb.html b/templates/web/bromley/faq/faq-en-gb.html
index ae418de37..f0b5e1a7e 100755
--- a/templates/web/bromley/faq/faq-en-gb.html
+++ b/templates/web/bromley/faq/faq-en-gb.html
@@ -87,7 +87,7 @@ being used in a Norwegian version of this site.
</dl>
- <h2>Privacy Questions</h2>
+ <h2><a name="privacy"></a>Privacy Questions</h2>
<dl>
<dt>Who gets to see my email address?</dt>
diff --git a/templates/web/bromley/header.html b/templates/web/bromley/header.html
index eea690c7d..69a595923 100644
--- a/templates/web/bromley/header.html
+++ b/templates/web/bromley/header.html
@@ -12,15 +12,16 @@
<link rel="stylesheet" href="[% version('/cobrands/bromley/base.css') %]">
<link rel="stylesheet" href="[% version('/cobrands/bromley/layout.css') %]" media="(min-width:48em)">
- <link rel="stylesheet" href="[% version('/js/fancybox/jquery.fancybox-1.3.4.css') %]">
<link rel="stylesheet" href="[% version('/cobrands/bromley/bromley.css') %]">
+ [% extra_css %]
<!--[if (lt IE 9) & (!IEMobile)]>
<link rel="stylesheet" href="[% version('/cobrands/bromley/layout.css') %]">
<![endif]-->
<script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script>
+ <script src="[% version('/cobrands/bromley/position_map.js') %]" charset="utf-8"></script>
[% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %]
- <script src="[% version('/js/fancybox/jquery.fancybox-1.3.4.pack.js') %]" charset="utf-8"></script>
+ [% extra_js %]
<link rel="Shortcut Icon" type="image/x-icon" href="/cobrands/bromley/favicon.ico">
diff --git a/templates/web/bromley/report/display.html b/templates/web/bromley/report/display.html
index 131416bb2..89b74277f 100644
--- a/templates/web/bromley/report/display.html
+++ b/templates/web/bromley/report/display.html
@@ -1,4 +1,5 @@
[%
+ PROCESS "report/photo-js.html";
PROCESS "maps/${map.type}.html";
problem_title = problem.title _ ' - ' _ loc('Viewing a problem');
@@ -185,10 +186,7 @@
[% INCLUDE 'footer.html' %]
[% BLOCK name %]
- [% IF problem.council == '2482' %]
- [% extra_name_info = 1 %]
- [% INCLUDE 'report/new/extra_name.html' %]
- [% END %]
+ [% INCLUDE 'report/new/extra_name.html' %]
[% IF c.user_exists %]
[% names = c.user.split_name %]
diff --git a/templates/web/bromley/tokens/confirm_problem.html b/templates/web/bromley/tokens/confirm_problem.html
deleted file mode 100644
index d002cc262..000000000
--- a/templates/web/bromley/tokens/confirm_problem.html
+++ /dev/null
@@ -1,13 +0,0 @@
-[% INCLUDE 'header.html', title = loc('Confirmation') %]
-
-<h1>[% loc('Confirmation') %]</h1>
-
-<p class="confirmed">
-Thank you. You have successfully confirmed your report
-and this will now be investigated by the council.
-You can <a href="[% c.uri_for( '/report', problem.id ) %]">view the problem on this site</a>.
-</p>
-
-<p>Your reference for this problem is [% problem.id %], please quote it in any enquiries.</p>
-
-[% INCLUDE 'footer.html' %]
diff --git a/templates/web/default/dashboard/index.html b/templates/web/default/dashboard/index.html
index a0ef7b911..308042d0d 100644
--- a/templates/web/default/dashboard/index.html
+++ b/templates/web/default/dashboard/index.html
@@ -9,6 +9,7 @@
th[scope=row] { text-align: left; }
tr.subtotal { background-color: #eee; }
#overview tr:nth-child(2) { background-color: #fee; }
+ select { width: auto; }
</style>
<form>
@@ -18,16 +19,16 @@
<option value="[% w.id %]"[% ' selected' IF w.id == ward %]>[% w.name %]</option>
[% END %]
</select>
-<input type="submit" value="Look up">
-
-<h2>Performance Overview</h2>
<p>Report category: <select name="category"><option value=''>All</option>
[% FOR cat_op IN category_options %]
<option value='[% cat_op | html %]'[% ' selected' IF category == cat_op %]>[% cat_op | html %]</option>
[% END %]
</select>
-<input type="submit" value="Look up">
+
+<p><input type="submit" value="Look up">
+
+<h2>Summary Statistics for [% council.name %]</h2>
<table width="100%" id="overview">
<tr>
@@ -45,7 +46,7 @@
'2' => [ "fixed_user", "User has marked as fixed" ]
};
FOR row IN rows %]
- <tr>
+ <tr id="[% row.value.0.replace('[^\w]+', '_' ) %]">
<th scope="row">[% row.value.1 %]</th>
<td>[% problems.wtd.${row.value.0} %]</td>
<td>[% problems.week.${row.value.0} %]</td>
@@ -54,7 +55,7 @@
</tr>
[% END %]
- <tr class='subtotal'>
+ <tr class='subtotal' id="total_fixed">
<th scope="row">Total marked as fixed</th>
<td>[% problems.wtd.${"fixed - council"} + problems.wtd.fixed_user %]</td>
<td>[% problems.week.${"fixed - council"} + problems.week.fixed_user %]</td>
@@ -67,10 +68,11 @@
'0' => [ "in progress", "Council has marked as in progress" ]
'1' => [ "planned", "Council has marked as planned" ]
'2' => [ "investigating", "Council has marked as investigating" ]
+ '3' => [ "closed", "Council has marked as closed" ]
};
wtd = 0, week = 0, weeks = 0, ytd = 0;
FOR row IN rows %]
- <tr>
+ <tr id="[% row.value.0.replace('[^\w]+', '_' ) %]">
<th scope="row">[% row.value.1 %]</th>
<td>[% problems.wtd.${row.value.0} %]</td>
<td>[% problems.week.${row.value.0} %]</td>
@@ -79,36 +81,36 @@
</tr>
[% END %]
- <tr class='subtotal'>
+ <tr class='subtotal' id="marked">
<th scope="row">Total marked</th>
- <td>[% problems.wtd.${"in progress"} + problems.wtd.planned + problems.wtd.investigating %]</td>
- <td>[% problems.week.${"in progress"} + problems.week.planned + problems.week.investigating %]</td>
- <td>[% problems.weeks.${"in progress"} + problems.weeks.planned + problems.weeks.investigating %]</td>
- <td>[% problems.ytd.${"in progress"} + problems.ytd.planned + problems.ytd.investigating %]</td>
+ <td>[% problems.wtd.${"in progress"} + problems.wtd.planned + problems.wtd.investigating + problems.wtd.closed %]</td>
+ <td>[% problems.week.${"in progress"} + problems.week.planned + problems.week.investigating + problems.wtd.closed %]</td>
+ <td>[% problems.weeks.${"in progress"} + problems.weeks.planned + problems.weeks.investigating + problems.wtd.closed %]</td>
+ <td>[% problems.ytd.${"in progress"} + problems.ytd.planned + problems.ytd.investigating + problems.wtd.closed %]</td>
</tr>
- <tr>
- <th scope="row">Average time to fix</th>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
+ <tr id="avg_fixed">
+ <th scope="row">Average time to council marking fixed (days)</th>
+ <td>[% problems.wtd.time_to_fix %]</td>
+ <td>[% problems.week.time_to_fix %]</td>
+ <td>[% problems.weeks.time_to_fix %]</td>
+ <td>[% problems.ytd.time_to_fix %]</td>
</tr>
- <tr>
- <th scope="row">Average time to mark</th>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
+ <tr id="avg_marked">
+ <th scope="row">Average time to first council state change (days)</th>
+ <td>[% problems.wtd.time_to_mark %]</td>
+ <td>[% problems.week.time_to_mark %]</td>
+ <td>[% problems.weeks.time_to_mark %]</td>
+ <td>[% problems.ytd.time_to_mark %]</td>
</tr>
- <tr class='subtotal'>
+ <tr class='subtotal' id="not_marked">
<th scope="row">Total not marked</th>
- <td>-</td>
- <td>-</td>
- <td>-</td>
- <td>-</td>
+ <td>[% problems.wtd.not_marked %]</td>
+ <td>[% problems.week.not_marked %]</td>
+ <td>[% problems.weeks.not_marked %]</td>
+ <td>[% problems.ytd.not_marked %]</td>
</tr>
</table>
@@ -126,21 +128,25 @@
</select>
<input type="submit" value="Look up">
-<table width="100%">
+<table width="100%" id="reports">
<tr>
<th scope="col">Less than 7 days old</th>
<th scope="col">7-14 days old</th>
<th scope="col">14-30 days old</th>
- <th scope="col">30+ days old</th>
</tr>
<tr>
- <td><ul><li></li></ul></td>
- <td><ul><li></li></ul></td>
- <td><ul><li></li></ul></td>
- <td><ul><li></li></ul></td>
+ <td width="34%"><ul>[% INCLUDE list, list = lists.1 %]</ul></td>
+ <td width="33%"><ul>[% INCLUDE list, list = lists.2 %]</ul></td>
+ <td width="33%"><ul>[% INCLUDE list, list = lists.3 %]</ul></td>
</tr>
</table>
</form>
[% INCLUDE 'footer.html' %]
+
+[% BLOCK list %]
+[% FOR p IN list %]
+<li><a href="/report/[% p.id %]">[% p.title | html %]</a></li>
+[% END %]
+[% END %]
diff --git a/templates/web/default/faq/faq-en-gb.html b/templates/web/default/faq/faq-en-gb.html
index 2c1c43799..1e52cc3b0 100755
--- a/templates/web/default/faq/faq-en-gb.html
+++ b/templates/web/default/faq/faq-en-gb.html
@@ -25,11 +25,11 @@ or clearing</strong>, such as:
</dd>
<dt>What isn&rsquo;t FixMyStreet for?</dt>
- <dd>FixMyStreet is not a way of getting in touch with [% c.cobrand.moniker == 'southampton' ? 'the' : 'your' %] council for all
+ <dd>FixMyStreet is not a way of getting in touch with [% c.cobrand.is_council ? 'the' : 'your' %] council for all
issues &ndash; please use FixMyStreet only for problems such as the above. We
often route problem reports via cleansing services or highways and so using
FixMyStreet for other matters may result in a delay in your report getting
- to the right department. <strong>You will need to contact [% c.cobrand.moniker == 'southampton' ? 'the' : 'your' %] council
+ to the right department. <strong>You will need to contact [% c.cobrand.is_council ? 'the' : 'your' %] council
directly for problems such as</strong>:
<ul><li>Anti-social behaviour
@@ -51,7 +51,7 @@ with a map of that area. You can view problems already reported in that area,
or report ones of your own simply by clicking on the map at the location of
the problem.</dd>
<dt>How are the problems solved?</dt>
- <dd>They are reported to the [% IF c.cobrand.moniker != 'southampton' %]relevant[% END %] council by email. The
+ <dd>They are reported to the [% IF !c.cobrand.is_council %]relevant[% END %] council by email. The
council can then resolve the problem the way they normally would.
Alternatively, you can discuss the problem on the website with others[% IF c.cobrand.moniker != 'southampton' %], and
then together lobby the council to fix it, or fix it directly yourselves[% END %].</dd>
@@ -92,7 +92,7 @@ to find out where reports go at the moment. Also <a href="/contact">contact us</
to update the address or addresses we use.</dd>
<dt>I&rsquo;m from a council, can we have FixMyStreet on our website?</dt>
<dd>Yes you can! We offer branded, hosted versions of FixMyStreet for local council websites.
- <a href="http://www.fixmystreet.com/for-councils">Full details</a>.</dd>
+ <a href="http://www.mysociety.org/for-councils/fixmystreet/">Full details</a>.</dd>
<dt>Do you remove silly or illegal content?</dt>
<dd>FixMyStreet is not responsible for the content and accuracy
of material submitted by its users. We reserve the right to edit or remove any
diff --git a/templates/web/default/report/new/extra_name.html b/templates/web/default/report/new/extra_name.html
index e8c2cadaf..dede1000c 100644
--- a/templates/web/default/report/new/extra_name.html
+++ b/templates/web/default/report/new/extra_name.html
@@ -6,7 +6,7 @@
[% title = '' %]
[% IF fms_extra_title %][% title = fms_extra_title | upper %]
[% ELSIF c.user && c.user.title %][% title = c.user.title | upper %][% END %]
-<select class="form-focus-trigger" id="form_fms_extra_title"
+<select class="form-focus-trigger required" id="form_fms_extra_title"
name="fms_extra_title">
<option></option>
<option value="MR"[% ' selected' IF title == 'MR' %]>Mr</option>
diff --git a/templates/web/default/report/updates.html b/templates/web/default/report/updates.html
index 7a17adbc7..2a65a3e3e 100644
--- a/templates/web/default/report/updates.html
+++ b/templates/web/default/report/updates.html
@@ -15,7 +15,7 @@
[%- ELSIF update.user.from_council;
user_name = update.user.name | html;
council = update.user.council;
- IF c.cobrand.moniker == 'bromley';
+ IF council == 'Bromley Council';
council = "$council <img src='/cobrands/bromley/favicon.png' alt=''>";
END %]
[% tprintf( loc( 'Posted by %s (<strong>%s</strong>) at %s' ), user_name, council, prettify_epoch( update.confirmed_local.epoch ) ) -%]
diff --git a/templates/web/default/reports/council.html b/templates/web/default/reports/council.html
index d1c2241c7..b837bcee9 100755
--- a/templates/web/default/reports/council.html
+++ b/templates/web/default/reports/council.html
@@ -14,6 +14,12 @@
%]
[% END %]
+[% IF c.cobrand.is_council %]
+ [% ward_text = loc( 'View reports by ward' ) %]
+[% ELSE %]
+ [% ward_text = loc( 'Wards of this council' ) %]
+[% END %]
+
[%
PROCESS "maps/${map.type}.html";
INCLUDE 'header.html',
@@ -25,8 +31,8 @@
[% map_html %]
-[% IF style != 'new' AND children.size %]
-<h2 style="clear:right">[% loc('Wards of this council') %]</h2>
+[% IF c.cobrand.all_reports_style != 'detailed' AND children.size %]
+<h2 style="clear:right">[% ward_text %]</h2>
<p>[% loc('Follow a ward link to view only reports within that ward.') %]</p>
<ul>
[% FOR child IN children.values.sort('name') %]
@@ -72,7 +78,7 @@ Its area is now covered by <a href="/reports/Bedford">Bedford Borough Council</a
<a href="/reports/Central+Bedfordshire">Central Bedfordshire Council</a>.
[% END %]
</p>
-[% ELSIF style == 'new' %]
+[% ELSIF c.cobrand.all_reports_style == 'detailed' %]
<div class="shadow-wrap">
<ul id="key-tools"[% IF NOT children.size %] class="singleton"[% END %]>
<li><a rel="nofollow" id="key-tool-updates-area" class="feed" href="[% rss_url %]">[%
@@ -80,18 +86,14 @@ Its area is now covered by <a href="/reports/Bedford">Bedford Borough Council</a
'Get updates of reports in Bromley';
ELSIF c.cobrand.moniker == 'bromley';
'Get updates of reports in this ward';
+ ELSIF c.cobrand.is_council;
+ tprintf(loc('Get updates of %s problems'), thing);
ELSE;
tprintf(loc('Get updates of problems in this %s'), thing);
END
%]</a></li>
[% IF children.size %]
- <li><a href="#council_wards" id="key-tool-wards" class="chevron">[%
- IF c.cobrand.moniker == 'bromley';
- 'View reports by ward';
- ELSE;
- loc('Wards of this council');
- END
- %]</a></li>
+ <li><a href="#council_wards" id="key-tool-wards" class="chevron">[% ward_text %]</a></li>
[% END %]
</ul>
</div>
@@ -101,9 +103,9 @@ Its area is now covered by <a href="/reports/Bedford">Bedford Borough Council</a
[% TRY %][% INCLUDE 'reports/cobrand_stats.html' %][% CATCH file %][% END %]
-[% IF style == 'new' AND children.size %]
+[% IF c.cobrand.all_reports_style == 'detailed' AND children.size %]
<section id="council_wards" class="hidden-js">
- <h2>[% loc('Wards of this council') %]</h2>
+<h2>[% ward_text %]</h2>
<p>[% loc('Follow a ward link to view only reports within that ward.') %]</p>
<ul class="issue-list-a full-width">
[% FOR child IN children.values.sort('name') %]
@@ -116,7 +118,7 @@ Its area is now covered by <a href="/reports/Bedford">Bedford Borough Council</a
[% IF c.cobrand.moniker == 'fixmystreet' %]
<p class="promo">
FixMyStreet is now available for local council websites.
- <a href="/for-councils">Find&nbsp;out&nbsp;more</a>.
+ <a href="http://www.mysociety.org/for-councils/fixmystreet/">Find&nbsp;out&nbsp;more</a>.
</p>
[% END %]
@@ -137,7 +139,7 @@ Its area is now covered by <a href="/reports/Bedford">Bedford Borough Council</a
[% IF problems %]
<ul class="issue-list-a">
-[% IF style == 'new' %]
+[% IF c.cobrand.all_reports_style == 'detailed' %]
[% FOREACH problem IN problems %]
<li>
diff --git a/templates/web/default/tokens/confirm_problem.html b/templates/web/default/tokens/confirm_problem.html
index 756958380..1e3c6c535 100644
--- a/templates/web/default/tokens/confirm_problem.html
+++ b/templates/web/default/tokens/confirm_problem.html
@@ -1,8 +1,16 @@
-[% INCLUDE 'header.html', title => loc('Confirmation') %]
+[% INCLUDE 'header.html', title = loc('Confirmation') %]
<h1>[% loc('Confirmation') %]</h1>
<p class="confirmed">
+[% IF c.cobrand.is_council %]
+Thank you. You have successfully confirmed your report
+and this will now be investigated by the council.
+You can <a href="[% c.uri_for( '/report', problem.id ) %]">view the problem on this site</a>.
+</p>
+
+<p>Your reference for this problem is [% problem.id %], please quote it in any enquiries.
+[% ELSE %]
[%
loc('You have successfully confirmed your problem');
@@ -15,6 +23,7 @@
c.uri_for( '/report', problem.id )
);
%]
+[% END %]
</p>
[% display_crosssell_advert( problem.user.email, problem.name ) %]
diff --git a/templates/web/fixmystreet/alert/_list.html b/templates/web/fixmystreet/alert/_list.html
index e9f877466..e14d394f2 100644
--- a/templates/web/fixmystreet/alert/_list.html
+++ b/templates/web/fixmystreet/alert/_list.html
@@ -30,7 +30,11 @@
</p>
<p>
+ [% IF c.cobrand.is_council %]
+ Or you can subscribe to an alert for all council problems or one based upon what ward you&rsquo;re in:
+ [% ELSE %]
[% loc("Or you can subscribe to an alert based upon what ward or council you&rsquo;re in:") %]
+ [% END %]
</p>
[% IF reported_to_options %]
diff --git a/templates/web/fixmystreet/faq/faq-en-gb.html b/templates/web/fixmystreet/faq/faq-en-gb.html
index 1e676d9f2..123de7c37 100755
--- a/templates/web/fixmystreet/faq/faq-en-gb.html
+++ b/templates/web/fixmystreet/faq/faq-en-gb.html
@@ -36,11 +36,11 @@ or clearing</strong>, such as:
</dd>
<dt>What isn&rsquo;t FixMyStreet for?</dt>
- <dd>FixMyStreet is not a way of getting in touch with [% c.cobrand.moniker == 'southampton' ? 'the' : 'your' %] council for all
+ <dd>FixMyStreet is not a way of getting in touch with [% c.cobrand.is_council ? 'the' : 'your' %] council for all
issues &ndash; please use FixMyStreet only for problems such as the above. We
often route problem reports via cleansing services or highways and so using
FixMyStreet for other matters may result in a delay in your report getting
- to the right department. <strong>You will need to contact [% c.cobrand.moniker == 'southampton' ? 'the' : 'your' %] council
+ to the right department. <strong>You will need to contact [% c.cobrand.is_council ? 'the' : 'your' %] council
directly for problems such as</strong>:
<ul><li>Anti-social behaviour
@@ -62,7 +62,7 @@ with a map of that area. You can view problems already reported in that area,
or report ones of your own simply by clicking on the map at the location of
the problem.</dd>
<dt>How are the problems solved?</dt>
- <dd>They are reported to the [% IF c.cobrand.moniker != 'southampton' %]relevant[% END %] council by email. The
+ <dd>They are reported to the [% IF !c.cobrand.is_council %]relevant[% END %] council by email. The
council can then resolve the problem the way they normally would.
Alternatively, you can discuss the problem on the website with others[% IF c.cobrand.moniker != 'southampton' %], and
then together lobby the council to fix it, or fix it directly yourselves[% END %].</dd>
@@ -102,7 +102,7 @@ href="https://secure.mysociety.org/donate/">please do</a>.</dd>
to find out where reports go at the moment. Also <a href="/contact">contact us</a>
to update the address or addresses we use.</dd>
<dt>I&rsquo;m from a council, can we have FixMyStreet on our website?</dt>
- <dd>Yes you can! We offer branded, hosted versions of FixMyStreet for local council websites. <a href="/for-councils">Full details</a>.</dd>
+ <dd>Yes you can! We offer branded, hosted versions of FixMyStreet for local council websites. <a href="http://www.mysociety.org/for-councils/fixmystreet/">Full details</a>.</dd>
<dt>Do you remove silly or illegal content?</dt>
<dd>FixMyStreet is not responsible for the content and accuracy
of material submitted by its users. We reserve the right to edit or remove any
diff --git a/templates/web/fixmystreet/footer.html b/templates/web/fixmystreet/footer.html
index 903d8c73d..c45c3c536 100644
--- a/templates/web/fixmystreet/footer.html
+++ b/templates/web/fixmystreet/footer.html
@@ -19,7 +19,7 @@
</li>
<li>
<h4>[% loc('Are you from a council?') %]</h4>
- <p>[% loc('Would you like better integration with FixMyStreet? <a href="/for-councils">Find out about FixMyStreet for councils</a>.') %]</p>
+ <p>[% loc('Would you like better integration with FixMyStreet? <a href="http://www.mysociety.org/for-councils/fixmystreet/">Find out about FixMyStreet for councils</a>.') %]</p>
</li>
</ul>
</div>
diff --git a/templates/web/fixmystreet/header.html b/templates/web/fixmystreet/header.html
index 1c9dfdcbf..163925dcf 100644
--- a/templates/web/fixmystreet/header.html
+++ b/templates/web/fixmystreet/header.html
@@ -19,6 +19,7 @@
<![endif]-->
<script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script>
+ <script src="[% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script>
[% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %]
[% extra_js %]
diff --git a/templates/web/fixmystreet/report/display.html b/templates/web/fixmystreet/report/display.html
index 260ebc95a..fdfd9765c 100644
--- a/templates/web/fixmystreet/report/display.html
+++ b/templates/web/fixmystreet/report/display.html
@@ -60,7 +60,7 @@
[% IF c.cobrand.moniker != 'emptyhomes' %]
<div class="general-sidebar-notes">
- <p>[% loc( 'Please note that updates are not sent to the council. If you leave your name it will be public. Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a>' ) %]</p>
+ [% INCLUDE 'report/updates-sidebar-notes.html' %]
</div>
[% END %]
@@ -182,15 +182,12 @@
[% INCLUDE 'footer.html' %]
[% BLOCK name %]
- [% IF problem.council == '2482' %]
- [% extra_name_info = 1 %]
- [% INCLUDE 'report/new/extra_name.html' %]
- [% END %]
+ [% INCLUDE 'report/new/extra_name.html' %]
<label for="form_name">[% loc('Name') %]</label>
[% IF field_errors.name %]
<p class='form-error'>[% field_errors.name %]</p>
[% END %]
- <input type="text" name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]">
+ <input type="text" [% IF problem.council == '2482' %]class="validName" [% END %]name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]">
<div class="checkbox-group">
<input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' UNLESS update.anonymous %]>
diff --git a/templates/web/fixmystreet/report/new/notes.html b/templates/web/fixmystreet/report/new/notes.html
index 289520be3..aa73f0694 100644
--- a/templates/web/fixmystreet/report/new/notes.html
+++ b/templates/web/fixmystreet/report/new/notes.html
@@ -1,7 +1,7 @@
<p>[% loc("Please note:") %]</p>
<ul class="plain-list">
- <li>[% loc("We will only use your personal information in accordance with our <a href=\"/faq#privacy\">privacy policy.</a>") %]</li>
+ <li>[% loc("We will only use your personal information in accordance with our <a href=\"/privacy\">privacy policy.</a>") %]</li>
<li>[% loc("Please be polite, concise and to the point.") %]</li>
<li>[% loc("Please do not be abusive &mdash; abusing your council devalues the service for all users.") %]</li>
<li>[% loc("Writing your message entirely in block capitals makes it hard to read, as does a lack of punctuation.") %]</li>
diff --git a/templates/web/fixmystreet/report/updates-sidebar-notes.html b/templates/web/fixmystreet/report/updates-sidebar-notes.html
new file mode 100644
index 000000000..1bd07b765
--- /dev/null
+++ b/templates/web/fixmystreet/report/updates-sidebar-notes.html
@@ -0,0 +1,5 @@
+ <p>
+ [% IF problem.council != '2482' OR problem.send_method_used != 'Open311' %]
+ [% loc( 'Please note that updates are not sent to the council.' ) %]
+ [% END %]
+ [% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %]</p>
diff --git a/templates/web/fixmystreet/static/for_councils.html b/templates/web/fixmystreet/static/for_councils.html
deleted file mode 100644
index 1e1789df7..000000000
--- a/templates/web/fixmystreet/static/for_councils.html
+++ /dev/null
@@ -1,44 +0,0 @@
-[% INCLUDE 'header.html', title = loc('FixMyStreet for Councils'), bodyclass = 'twothirdswidthpage' %]
-
-<div class="sticky-sidebar">
- <aside>
- <ul class="plain-list">
- <li><strong>FixMyStreet for Councils</strong></li>
- <li>Summary</li>
- <li><a href="/for-councils/faq">Questions and Answers</a></li>
- <li><i>Email us at <a href="mailto:hello&#64;mysociety.org">hello&#64;mysociety.org</a></i></li>
- </ul>
- </aside>
-</div>
-
-<h1>Shift your problem reporting online: FixMyStreet for Councils</h1>
-
-<p>Councils everywhere are looking to move street issue reporting online, to make
-savings and improve services for their residents. <strong>FixMyStreet for
-Councils</strong> is explicitly designed to support the shift to digital.
-
-<p>FixMyStreet is the most popular online street issue reporting application in
-the UK. It’s known for prioritising usability and accessibility &ndash; and people
-love to use it. With very little cost and effort, your staff and your website’s
-users can enjoy its simple yet powerful features.
-
-<p>Embedding FixMyStreet in your council’s website is simple. As a cloud-based
-service, it requires no development work from your team. We will match your
-site’s look and feel seamlessly, and provide robust technical support and free
-training to council users. We also offer a mobile web version of the product
-as well as iPhone and Android apps branded for councils.
-
-<p>We can also integrate FixMyStreet with your CRM or customer management system,
-to ensure automatic two-way updates, saving you even more time and money.
-
-<img src="/cobrands/fixmystreet/barnet.png" alt="" style="float: right; padding: 0.25em; border: solid 1px #ccc; margin: 1em;">
-
-<p>mySociety, the non-profit behind FixMyStreet, is a software provider to over
-forty local authorities in the UK. We understand the challenges that councils
-face in channel shift, and will bring our passion and expertise to support your
-journey.
-
-<p>Have questions? Read our <a href="/for-councils/faq">Questions and Answers for Councils</a>
-or get in touch at <a href="mailto:hello&#64;mysociety.org">hello&#64;mysociety.org</a>.
-
-[% INCLUDE 'footer.html' pagefooter = 'yes' %]
diff --git a/templates/web/fixmystreet/static/for_councils_faq.html b/templates/web/fixmystreet/static/for_councils_faq.html
deleted file mode 100644
index d45166ed1..000000000
--- a/templates/web/fixmystreet/static/for_councils_faq.html
+++ /dev/null
@@ -1,366 +0,0 @@
-[% INCLUDE 'header.html', title = loc('Questions and Answers :: FixMyStreet for Councils'), bodyclass = 'twothirdswidthpage' %]
-
-<div class="sticky-sidebar">
- <aside>
- <ul class="plain-list">
- <li><strong>FixMyStreet for Councils</strong></li>
- <li><a href="/for-councils">Summary</a></li>
- <li>Questions and Answers <ul>
- <li><a href="#general">General information</a></li>
- <li><a href="#implementing">Implementing FixMyStreet for Councils</a></li>
- <li><a href="#reporting">Problem reporting</a></li>
- <li><a href="#best">Getting the best out of FixMyStreet</a></li>
- </ul> </li>
- <li><i>Email us at <a href="mailto:hello&#64;mysociety.org">hello&#64;mysociety.org</a></i></li>
- </ul>
- </aside>
-</div>
-
-<h1>Questions about FixMyStreet for Councils</h1>
-
-<h2 id="general">General information</h2>
-
-<dl>
-
-<dt>What is FixMyStreet For Councils?</dt>
-
-<dd>
-<p>FixMyStreet is a street issue-reporting and mapping application
-designed specifically for local authority websites.
-
-<p>It integrates seamlessly with council websites, fully reflecting their look
-and feel. All copy, categories, information, reporting fields and links can be
-customised to the specific needs of the council. FixMyStreet can also be
-connected to a CRM or fault management system for automatic two-way updates.
-
-<p>The software is open source and is based on mySociety’s award-winning
-FixMyStreet.com platform, which has been operating for five years. It is the
-most widely-used street issue web application in the UK, sending over 5,000
-reports to local authorities each month.
-</dd>
-
-<dt>Who built it?</dt>
-
-<dd>
-FixMyStreet for Councils was built by mySociety Ltd, a company registered in
-England and Wales, company number 03277032. mySociety Ltd is wholly owned by
-the charity UK Citizens Online Democracy (charity number 1076346). All profits
-are returned to the charity.
-</dd>
-
-<dt>What are the benefits for councils?</dt>
-
-<dd>
-<p>FixMyStreet for Councils will save you and your residents time. It will reduce duplicate reports and encourage the shift of street issue reporting to the web.
-
-<p>It also places a highly usable, attractive application on your website, and a very simple channel for responding to your residents if you wish to do so.
-
-<p>Most councils get a high volume of telephone calls to report street issues - by moving even a small proportion of that online, you can make significant savings over time.
-</dd>
-
-<dt>Why is FixMyStreet more effective than standard reporting forms?</dt>
-
-<dd>
-<p>As a rule, people do not enjoy filling in onerous forms on the web. They
-often span several pages and require a lot of personal information &ndash; so many
-people resort to calling instead.
-
-<p>Reporting on FixMyStreet is extremely simple and quick. The user pinpoints
-the location of the problem on a map, provides a description and a photo if
-they have one, and their email address. You’ll receive the email address with
-the problem report, so your officers can get in touch if they need to.
-
-<p>Using a map as a way to locate an issue is very useful &ndash; people often don’t
-know the exact nearest address, but they can show where it is on a map.
-
-<p>Finally, FixMyStreet allows you to comment on a report or update its status
-&ndash; your update will be available for everyone interested to see on the website,
-further reducing avoidable contact.
-</dd>
-
-<dt>What is the difference between FixMyStreet.com and FixMyStreet for Councils?</dt>
-
-<dd>
-<p>FixMyStreet.com is a national street issue reporting website that enables
-anyone anywhere in Great Britain to report a problem to their council. The
-reports are delivered to councils by email.
-
-<p>FixMyStreet for Councils is a product for council websites to enable their
-residents to report issues to them. It becomes a natural part of the council’s
-site, can be included in the list of top tasks, integrates council-relevant
-information, and can be linked with council’s backoffice.
-
-<p>It uses the same software platform as the FixMyStreet.com site; issues
-reported to a council on its own website are also shown on FixMyStreet.com, and
-vice-versa. Read the Implementation FAQ above to learn why this approach really
-works.
-
-</dd>
-
-<dt>Which councils already have FixMyStreet?</dt>
-
-<dd>
-The London Borough of Bromley will soon be launching our upgraded FixMyStreet
-for Councils product. For existing implementations, have a look at the
-<a href="http://barnet.fixmystreet.com/">London Borough of Barnet’s website</a>
-or <a href="http://southampton.fixmystreet.com/">Southampton City Council’s
-website</a>. Meanwhile, West Berkshire Council is an example of a back-office
-integration - they receive problems reported on FixMyStreet directly into their
-CRM.
-</dd>
-
-<dt>Is there a mobile version of the FixMyStreet for Councils product?</dt>
-
-<dd>
-<p>As more and more people use their smartphones for online tasks, we make it
-easy for councils to enable mobile street issue reporting. We offer two
-products:
-<ul>
-<li>A mobile web version of FixMyStreet &ndash; this presents users with a
-mobile-optimised version of a council FixMyStreet web app, and enables mobile
-reporting by simply entering a URL of the council’s web reporting page in their
-mobile browser
-<li>Mobile Apps - some users do prefer to use downlodable apps, so we are
-currently developing iPhone and Android Apps with the capability to include
-council branding. If you are interested, <a
-href="mailto:hello&#64;mysociety.org">let us know</a>.
-</ul>
-</dd>
-
-<dt>What is the cost to councils?</dt>
-
-<dd>
-<ul>
-<li>The front end product costs £3,500 in year one, reducing to £2,000 per annum in future years.
-<li>Web and mobile-optimised site together cost £5,500 in year one and £3,000 per annum subsequently.
-<li>Web, mobile-optimised site, and iPhone and Android apps cost £9,500 in year one, then £4,000 per annum.
-</ul>
-
-<p>We also offer fixed price for integration with Microsoft, Oracle and
-Lagan CRM systems, at £5,500 in year one, then £2,000 per annum
-thereafter. Integration with other CRM or back-office systems costs
-£6,500 in year one,
-
-<p>These prices exclude VAT and assume standard FixMyStreet for councils
-product - if you need further customisations please get in touch with
-us for a quote.
-
-<p>The prices are all-inclusive, covering installation, updates, unlimited
-problem reports and user training. There are no hidden fees.
-
-<p>There’s no commitment beyond the first 12 months, so you won’t be locked
-into a lengthy contract.
-
-</dl>
-<h2 id="implementing">Implementing FixMyStreet for Councils</h2>
-<dl>
-
-<dt>How easy is it to implement FixMyStreet on a council website?</dt>
-
-<dd>
-Extremely easy. Because we run FixMyStreet as a cloud service, all you need to do is to provide details of your website’s colour scheme, fonts, and any customised links or information you’d like to include. We will do all the work in setting up your issue reporting application. The implementation can take as little as a week, and requires minimal work from your web team.
-</dd>
-
-<dt>Can we integrate FixMyStreet with the council’s CRM or fault management system?</dt>
-
-<dd>
-<p>Absolutely. Integrating with your back-office system ensures maximum efficiencies - all reports go straight into your database. When their status changes, updates can be automatically pushed out onto your website as well as to FixMyStreet.com. We are able to integrate with any back-office system.
-
-<p>We understand that each council has its own processes which have evolved over time. We will work with you to find the best integration solution to ensure minimum disruption to your work, while helping make your processes simpler and more streamlined.
-
-<p>If you’d like us to advise on the best integration options for you, get in touch. Our advice is completely free - we are always keen to talk to councils and learn about your needs.
-</dd>
-
-<dt>What is the technical architecture of FixMyStreet?</dt>
-
-<dd>
-<p>FixMyStreet for councils uses the same <a
-href="https://github.com/mysociety/fixmystreet">open source code base</a> and
-runs on the same servers as the national FixMyStreet site. At the same time it
-has been designed to allow customisation of both design and functionality.
-Using the URL of the site visited the code determines which version of
-FixMyStreet to display and loads the appropriate design and customisations.
-
-<p>If you have back end integration then new reports to your council will be
-sent to your CRM through the agreed mechanism ( e.g. Open311 ). If we cannot
-send a report to you then it will be put back on the queue and we will try
-again later so you won’t miss any reports.
-</dd>
-
-<dt>Why is linking FixMyStreet for Councils with the national FixMyStreet.com website a good idea?</dt>
-
-<dd>
-
-<p>There are three key benefits. First, by using the same underlying platform we can spread the cost of maintaining and hosting the system across the national site and different council users. This helps to keep prices low. Plus, we carry out all the technical maintenance and support, so you don’t need to.
-
-<p>Second, issues reported on FixMyStreet.com are also shown on your Council’s website, avoiding duplicate reports by different residents.
-
-<p>Third, the customised features on your own FixMyStreet (such as categories, information you gather from customers, additional details on issues the council is not responsible for, etc) will also be reflected on FixMyStreet.com. So wherever your residents report issues, they will get the right features and information from the council.
-</dd>
-
-<dt>Do you offer training?</dt>
-
-<dd>
-Yes. We offer a free two-hour remote training session to your users. If your location is within two hours’ travel from one of our FixMyStreet team members, we will provide training in person.
-</dd>
-
-<dt>What level of support do you provide after implementation?</dt>
-
-<dd>
-<p>We will provide technical support, address any questions, and make tweaks to your system if required. We will also go out of our way to help you with non-technical issues based on our significant experience with online problem reporting.
-
-<p>Throughout our contract with you, we will always be available by email or on the phone, and will get back to you quickly.
-
-</dl>
-<h2 id="reporting">Problem reporting</h2>
-<dl>
-
-<dt>Can we customise report categories and information requested?</dt>
-
-<dd>
-<p>Yes. You can add the categories most relevant to your council, and remove ones that are not. Your customised categories will appear on both your website’s FixMyStreet implementation, and on the national FixMystreet.com website.
-
-<p>You can also customise information requested for each issue type - for example, Southampton council asks its customers to report the approximate pothole size, to help prioritise its work.
-</dd>
-
-<dt>How can we deal with issues that the council is not responsible for?</dt>
-
-<dd>
-Most councils already get residents phoning up or emailing them about problems not within their remit. FixMyStreet can help reduce this in two ways:
-We can include the most commonly misreported issues in the categories list so when a users selects these, we can give them alternative contact information. If there are known geographical areas that council is not responsible for, we can alert users to that when they click on the map, provided you have given us this information.
-Alternatively, if you have contact details in relevant organisations, we can instead email reports to them, while telling the user that these are not the council’s responsibility.
-</dd>
-
-<dt>How are reports delivered to the council?</dt>
-
-<dd>
-<p>If your FixMyStreet is not integrated with your CRM or back-office system, you will receive reports by email to email addresses that you specify. Different type of problems can be sent to different addresses if you wish.
-
-<p>With back-office integration, reports will go straight into your CRM or fault management system.
-</dd>
-
-<dt>What information is provided in a problem report?</dt>
-
-<dd>
-<p>You will receive the following information:
-<ul>
-<li>Issue category
-<li>Precise location reported (in both latitude/longitude and easting/northing)
-<li>Subject and issue description (we encourage users to give as much detail as possible)
-<li>Link to a photo of the problem if the user has added one (we don’t send the actual photos so that we don’t clog your system)
-<li>The user’s verified email address and phone number if given, so you can contact them directly if you wish
-<li>A link to the issue on FixMyStreet for you to update the issue if required.
-</ul>
-</dd>
-
-<dt>How precise is location information provided in FixMyStreet?</dt>
-
-<dd>
-<p>Very. The user clicks on a map that includes useful information for
-reporting, such as building positions and footpaths, so they can tell you the
-location as precisely as they can.
-
-<p>This approach also helps capture superior location data even when the user
-does not know the exact address.
-
-<p>We will send you the co-ordinates for the point clicked on the map, as well
-as the nearest street address as an additional data point. You can also view
-the map directly on the issue report page.
-</dd>
-
-<dt>Can we reflect more granular report statuses than just open and fixed?</dt>
-
-<dd>
-Yes. As a client council you get a selection of problem statuses, including:
-Investigating, Planned, In Progress, Fixed and Closed.
-</dd>
-
-</dl>
-<h2 id="best">Getting the best out of FixMyStreet</h2>
-<dl>
-
-<dt>Can we add photos showing that council has dealt with an issue?</dt>
-
-<dd>
-Yes - you can easily post a photo as an update to a report on your website. These will also be shown on the national FixMyStreet.com site.
-</dd>
-
-<dt>What can we do to help shift users to online reporting instead of calling us up?</dt>
-
-<dd>
-Online reporting is better for you and your residents, as it’s quick, effective and cheap. Good technology will certainly encourage the shift, but to make it fully effective you could do a a few things to help.
-Direct residents to report issues on your website when they are in the telephone queue
-When someone reports an issue to your call centre, tell them that next time they can do it much quicker online
-Encourage council employees or other relevant organisations to report issues online
-Respond to problem reports online, so that your residents know you engage well through this channel.
-</dd>
-
-<dt>How can a council respond to issue reports?</dt>
-
-<dd>
-<p>If you choose the back-office integration option, when an issue status
-changes in your CRM or fault management system, it can also automatically
-update on both your website and the national FixMyStreet website. This assumes
-that your system can support automatic updates (most systems can).
-
-<p>If your back-office is not integrated, you can still easily respond by
-changing the status manually on the website, or adding a few words of
-commentary. This simple process is much quicker than a telephone call or email.
-</dd>
-
-<dt>How can we contact the person submitting the report if we need more information?</dt>
-
-<dd>
-Our software encourages users to submit as much information as possible, along with photographs. If you do need additional details, you can either post your question as an update to the issue online, or email the user directly (you will get their email address with the issue report).
-</dd>
-
-<dt>We are unable to fix every problem, in particular in the current budget environment. How do we deal with this?</dt>
-
-<dd>
-<p>Whether reported online or not, there are some issues that a council will
-decide not to fix because it needs to prioritise more important problems.
-
-<p>Our online reporting application gives you a direct channel to explain to
-your residents why certain problems cannot be addressed. This will lead to a
-more open, constructive relationship. This may be a big culture change - we are
-happy to support you with our experience in this area.
-
-<p>When deciding not to deal with a problem, you can close it so that it does
-not show as an open problem.
-</dd>
-
-<dt>We are worried about being swamped with high volume of online reports. What can we do?</dt>
-
-<dd>
-While the volume of online reporting is likely to increase (a good thing, as it
-replaces phone calls and alerts you to issues you didn’t know about), it
-usually happens gradually, giving you plenty of time to adjust. We can stage
-the introduction of your new reporting app to make the process even smoother.
-</dd>
-
-<dt>Does FixMyStreet for Councils offer reporting functionality?</dt>
-
-<dd>
-<p>We are currently working on a new reporting dashboard for councils,
-accessible through a separate council log-in. This will have detailed reporting
-on issue categories, timelines, statuses and help you identify emerging
-hotspots.
-
-<p>Any new council implementation from April 2012 will have this new
-functionality. Please get in touch if you’d like more detail.
-</dd>
-
-<dt>I’d like to discuss options for my council. What do I do?</dt>
-
-<dd>
-<p>Just drop us a line to <a
-href="mailto:hello&#64;mysociety.org">hello&#64;mysociety.org</a> and we will get back
-to you as soon as possible.
-
-<p>We will be happy to advise you on the options, and recommend an
-implementation approach to fit your needs based on our experience.
-</dd>
-
-</dl>
-
-[% INCLUDE 'footer.html' pagefooter = 'yes' %]
diff --git a/templates/web/fixmystreet/static/privacy.html b/templates/web/fixmystreet/static/privacy.html
index 933afe1e5..92e096ef4 100755
--- a/templates/web/fixmystreet/static/privacy.html
+++ b/templates/web/fixmystreet/static/privacy.html
@@ -30,11 +30,15 @@ other companies, you can adjust your usage or install opt-out browser plugins.
<dt>Who gets to see my email address?</dt>
<dd>If you submit a problem, we pass on your details, and details
of the problem, to the council contact or contacts responsible for the
-area where you located the problem. Other than the council, who obviously get your
+area where you located the problem, or other relevant body (for example, in
+most of London we send reports via the central London Report-It service, who
+may also publish the public details of your report). Other than the council, who obviously get your
email address, only people we authorise to view the FixMyStreet administration interface
will be able to see your email address and they will never use it for anything other than
to help administer FixMyStreet. Similarly with email addresses from updates. We will never give or sell your email address to anyone else,
-unless we are obliged to by law. Your name will not be published anywhere unless you let us.</dd>
+unless we are obliged to by law. Your name, given in the name field, will not
+be published anywhere unless you let us (if you give your name elsewhere, e.g.
+in the public details section, it will be publicly available).</dd>
<dt>Will you send nasty, brutish spam to my email address?</dt>
<dd>Never. We will email you if someone leaves an update on a
problem you&rsquo;ve reported, and send you a questionnaire email four weeks
diff --git a/web/cobrands/barnet/_colours.scss b/web/cobrands/barnet/_colours.scss
new file mode 100644
index 000000000..2f5ccc42b
--- /dev/null
+++ b/web/cobrands/barnet/_colours.scss
@@ -0,0 +1,9 @@
+/* COLOURS */
+
+$primary: #E9E9EA;
+$primary_b: #000000;
+$primary_text: #3E3D44;
+
+$contrast1: #E1E3E4;
+$contrast1_dark: darken(#E1E3E4, 10%);
+$contrast2: #AA8D11;
diff --git a/web/cobrands/barnet/barnet.scss b/web/cobrands/barnet/barnet.scss
new file mode 100644
index 000000000..a6feb018f
--- /dev/null
+++ b/web/cobrands/barnet/barnet.scss
@@ -0,0 +1,115 @@
+/* Parts of barnet's main CSS needed for its header/footer and adjusted (see
+ * bottom) to not be affected by main FixMyStreet CSS. Not very sustainable;
+ * perhaps we should wrap all council CSS within a SCSS #council ID? Hmm.
+ */
+
+@import "compass";
+
+#column_nav li { list-style: none ;}
+
+#content ol.big-numbers li {
+ padding: 0 0 0 2.5em;
+}
+
+#barnet-wrapper {
+ width: 100%;
+ display: table;
+ caption-side: bottom;
+}
+
+#barnet-powered-by {
+ clear: both;
+}
+
+body {font-size: 75%; font-family: Arial, Helvetica, sans-serif; color: #3e3d44; padding: 0; margin: 0; line-height: 1.5; background: #e9e9ea;}
+body > html {font-size: 12px;}
+
+#barnet-wrapper {padding: 0; margin: 20px auto; width: 960px; background: #fff;}
+#ie_wrapper {display: block; padding: 20px 25px 25px;}
+#page {float: left; width: 100%;}
+
+#mast {clear: both;}
+
+#mast .pseudoH1 {margin: 0 0 0 -3px; padding: 0; background: url(img/barnet-logo.gif) no-repeat top left; width: 240px; height: 38px; float: left;}
+#mast .pseudoH1 a, #mast .pseudoH1 a:link, #mast .pseudoH1 a:visited, #mast .pseudoH1 a:hover, #mast .pseudoH1 a:active {display: block; width: 240px; height: 38px; padding: 0; background: url(img/barnet-logo.gif) no-repeat top left;}
+#mast .pseudoH1 span {position: absolute; margin-top: -13000px; top: -13000px;}
+
+#mast .mast_links {float: right; display: inline; margin: 0; padding: 10px 0 0; list-style: none; overflow: hidden;}
+
+#mast #search {clear: both; float: right; margin: 8px 0 0; background: #e1e3e4; border-top: 6px solid #bddadc; border-bottom: 2px solid #c8cacb; width: 100%; padding: 3px 0 2px; height: 21px;}
+
+/* ############################################################## */
+
+#content {margin: 0; width: 910px; overflow: hidden; min-height: 350px;}
+#content.withWidth {margin: 0 0 0 232px; width: 446px; overflow: hidden; float: left; display: inline;}
+#content.fullWidth {width: 678px;}
+#content.home {margin-top: 18px;}
+
+.mappage {
+ #content.withWidth {margin: 0 0 0 0px; width: auto; overflow: hidden; float: left; display: inline;}
+ #content.fullWidth {width: 900px;}
+}
+
+/* IE6 ignore the second #foo.bar rule so we have to fudge it another way */
+.ie6 {
+ .mappage {
+ #content {
+ margin: 0 0 0 0px;
+ overflow: hidden;
+ float: left;
+ display: inline;
+ width: 900px;
+ }
+ }
+}
+
+#breadcrumb {font-size: .9em; color: #5c6267; padding: 6px 0; margin: 0 0 0 232px;}
+#breadcrumb.full {margin: 0;}
+#breadcrumb ul {margin: 0; padding: 0; list-style: none;}
+#breadcrumb ul li {margin: 0; padding: 0 4px 0 0; display: inline;}
+#breadcrumb ul li a:link, #breadcrumb ul li a:visited, #breadcrumb ul li a:hover, #breadcrumb ul li a:active {color: #5c6267; background: url(img/bcArrow.gif) no-repeat right center; padding: 0 10px 0 0; font-weight: normal;}
+#breadcrumb ul li span {font-weight: normal; color: #5c6267;}
+
+/* ############################################################## */
+
+#column_nav {width: 214px; float: left; display: inline; padding: 0; margin: -35px 0 0 -910px; border-right: 3px solid #fff;}
+
+.ie6 #column_nav {
+ float: none;
+ position: absolute;
+ top: 85px;
+ margin: 0 0 0 0px;
+}
+
+body.mappage #column_nav { display: none; }
+
+#content h1 {margin: 0 0 20px; font-size: 1.8em; border-bottom: 6px solid #bed9dd; font-family: Georgia, Times, 'Times New Roman', serif; color: #5d6167;}
+#content h1 span {padding: 6px 7px 3px; border: 1px solid #eff1f2; border-bottom: 0 none; display: block;}
+#content h1#reports_heading span { display: none; }
+
+#column_nav .navigation {background: #fff; margin: 0 0 4px;}
+#column_nav h2 {font-size: 1.2em; padding: 0; height: 29px; margin: 0; border-radius: 0 0 3px 3px; background: url(img/nav-bg-active.gif) left bottom repeat-x; border-top: 6px solid #bddadc;}
+#column_nav #nav1 h2 {border-radius: 0 0 0 3px;}
+#column_nav h2 a {color: #fff; padding: 3px 10px 0 26px; display: block; background: url(img/nav-arrow.gif) 8px 7px no-repeat;}
+#column_nav .active h2 a {background: url(img/nav-arrow-active.gif) 8px 8px no-repeat;}
+#column_nav ul {margin: 0 0 0 4px; padding: 8px 7px 4px; border-width: 0 1px 1px; border-color: #e1e1e1; border-style: solid; border-radius: 3px; list-style: none; background: #fff; background: -moz-linear-gradient(top, #ffffff 0%, #f7f9f8 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#f7f9f8)); background: -webkit-linear-gradient(top, #ffffff 0%,#f7f9f8 100%); background: -o-linear-gradient(top, #ffffff 0%,#f7f9f8 100%); background: -ms-linear-gradient(top, #ffffff 0%,#f7f9f8 100%); background: linear-gradient(top, #ffffff 0%,#f7f9f8 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f7f9f8',GradientType=0);}
+#column_nav ul li {margin: 0; padding: 2px 4px; border-bottom: 1px solid #bfc0c1; color: #333; font-size: .9em;}
+#column_nav ul li.lastItem {border-bottom: none;}
+#column_nav ul li a:link, #column_nav ul li a:visited, #column_nav ul li a:hover, #column_nav ul li a:active {display: block; color: #333; font-weight: normal;}
+#column_nav ul li a:hover, #column_nav ul li a:active {text-decoration: none; color: #0090a2;}
+
+/* ############################################################## */
+
+#footer {clear: both; margin: 10px 0 0; padding: 15px 0 0; text-align: left;}
+#footer p {border-top: 1px solid #dadadb; border-bottom: 1px solid #dadadb; margin: 0 0 5px; color: #5d6167; float: left; display: inline; height: 24px; padding: 8px 0 2px; width: 551px;}
+#footer p a {color: #5d6167; font-weight: normal; padding: 0 2px;}
+#footer p.assocLinks {float: right; display: inline; padding: 5px 0; width: 359px;}
+#footer p.assocLinks a {float: left; display: inline; margin: 0 0 0 8px; padding: 0; background-position: center top; background-repeat: no-repeat; width: 24px; height: 24px;}
+#footer p.assocLinks a:active, #footer p.assocLinks a:hover, #footer p.assocLinks a:focus {background-position: center bottom;}
+#footer a#goto_browsealoud {background-image: url(img/browsealoud.gif); width: 95px; height: 25px; margin-top: 1px;}
+#footer a#goto_directgov {background-image: url(img/directgov.gif); width: 90px; margin: 0 0 0 22px;}
+#footer a#share_facebook {background-image: url(img/social1-facebook.gif); margin: 0 0 0 24px;}
+#footer a#share_twitter {background-image: url(img/social2-twitter.gif);}
+#footer a#share_youtube {background-image: url(img/social3-youtube.gif);}
+#footer a#share_flickr {background-image: url(img/social4-flickr.gif);}
+#bottomBar {background: url(img/barnet-footer-logo.gif) 771px 12px no-repeat #21aaaa; display: block; width: 100%; height: 56px; border-top: 6px solid #bddadc;}
diff --git a/web/cobrands/barnet/base.scss b/web/cobrands/barnet/base.scss
new file mode 100644
index 000000000..0447c6779
--- /dev/null
+++ b/web/cobrands/barnet/base.scss
@@ -0,0 +1,39 @@
+@import "../fixmystreet/_h5bp";
+@import "./_colours";
+@import "../fixmystreet/_mixins";
+@import "compass";
+
+@import "../fixmystreet/_base";
+
+#mast,
+#breadcrumb,
+#page-title,
+#column_nav,
+#footer,
+#bottomBar
+{ display: none }
+
+#site-header{
+ @include background(none);
+ background-color: white;
+}
+#site-logo {
+ width: 235px;
+ background: url('/cobrands/barnet/img/barnet-logo.gif') -3px -3px no-repeat;
+}
+#nav-link {
+ right: 1em;
+ background: url('/cobrands/barnet/img/barnet-skipnav.png') no-repeat;
+}
+
+#front-main #postcodeForm div input#submit,
+.green-btn,
+button.green-btn,
+input.green-btn,
+.red-btn,
+button.red-btn,
+input.red-btn{
+ @include button-reset;
+ background: #5D6167;
+ color: white;
+}
diff --git a/web/cobrands/barnet/config.rb b/web/cobrands/barnet/config.rb
new file mode 100644
index 000000000..cab97b18f
--- /dev/null
+++ b/web/cobrands/barnet/config.rb
@@ -0,0 +1,25 @@
+# Require any additional compass plugins here.
+
+# Set this to the root of your project when deployed:
+http_path = "/"
+css_dir = ""
+sass_dir = ""
+images_dir = ""
+javascripts_dir = ""
+
+# You can select your preferred output style here (can be overridden via the command line):
+# output_style = :expanded or :nested or :compact or :compressed
+
+# To enable relative paths to assets via compass helper functions. Uncomment:
+# relative_assets = true
+
+# To disable debugging comments that display the original location of your selectors. Uncomment:
+# line_comments = false
+
+# If you prefer the indented syntax, you might want to regenerate this
+# project again passing --syntax sass, or you can uncomment this:
+# preferred_syntax = :sass
+# and then run:
+# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
+
+line_comments = false # by Compass.app
diff --git a/web/cobrands/barnet/img/barnet-footer-logo.gif b/web/cobrands/barnet/img/barnet-footer-logo.gif
new file mode 100644
index 000000000..afba1cca2
--- /dev/null
+++ b/web/cobrands/barnet/img/barnet-footer-logo.gif
Binary files differ
diff --git a/web/cobrands/barnet/img/barnet-logo.gif b/web/cobrands/barnet/img/barnet-logo.gif
new file mode 100644
index 000000000..86e0f4ee8
--- /dev/null
+++ b/web/cobrands/barnet/img/barnet-logo.gif
Binary files differ
diff --git a/web/cobrands/barnet/img/barnet-skipnav.png b/web/cobrands/barnet/img/barnet-skipnav.png
new file mode 100644
index 000000000..21efe0f67
--- /dev/null
+++ b/web/cobrands/barnet/img/barnet-skipnav.png
Binary files differ
diff --git a/web/cobrands/barnet/img/bcArrow.gif b/web/cobrands/barnet/img/bcArrow.gif
new file mode 100644
index 000000000..4e7c1848e
--- /dev/null
+++ b/web/cobrands/barnet/img/bcArrow.gif
Binary files differ
diff --git a/web/cobrands/barnet/img/browsealoud.gif b/web/cobrands/barnet/img/browsealoud.gif
new file mode 100644
index 000000000..4fbb3eded
--- /dev/null
+++ b/web/cobrands/barnet/img/browsealoud.gif
Binary files differ
diff --git a/web/cobrands/barnet/img/directgov.gif b/web/cobrands/barnet/img/directgov.gif
new file mode 100644
index 000000000..1c9dd22e2
--- /dev/null
+++ b/web/cobrands/barnet/img/directgov.gif
Binary files differ
diff --git a/web/cobrands/barnet/img/fms-logo.png b/web/cobrands/barnet/img/fms-logo.png
new file mode 100644
index 000000000..23bea6b0f
--- /dev/null
+++ b/web/cobrands/barnet/img/fms-logo.png
Binary files differ
diff --git a/web/cobrands/barnet/img/nav-arrow-active.gif b/web/cobrands/barnet/img/nav-arrow-active.gif
new file mode 100644
index 000000000..89ff9d0b3
--- /dev/null
+++ b/web/cobrands/barnet/img/nav-arrow-active.gif
Binary files differ
diff --git a/web/cobrands/barnet/img/nav-bg-active.gif b/web/cobrands/barnet/img/nav-bg-active.gif
new file mode 100644
index 000000000..0d2ec9873
--- /dev/null
+++ b/web/cobrands/barnet/img/nav-bg-active.gif
Binary files differ
diff --git a/web/cobrands/barnet/img/social1-facebook.gif b/web/cobrands/barnet/img/social1-facebook.gif
new file mode 100644
index 000000000..41b404df0
--- /dev/null
+++ b/web/cobrands/barnet/img/social1-facebook.gif
Binary files differ
diff --git a/web/cobrands/barnet/img/social2-twitter.gif b/web/cobrands/barnet/img/social2-twitter.gif
new file mode 100644
index 000000000..17f368536
--- /dev/null
+++ b/web/cobrands/barnet/img/social2-twitter.gif
Binary files differ
diff --git a/web/cobrands/barnet/img/social3-youtube.gif b/web/cobrands/barnet/img/social3-youtube.gif
new file mode 100644
index 000000000..eeb6ba356
--- /dev/null
+++ b/web/cobrands/barnet/img/social3-youtube.gif
Binary files differ
diff --git a/web/cobrands/barnet/img/social4-flickr.gif b/web/cobrands/barnet/img/social4-flickr.gif
new file mode 100644
index 000000000..300e75da0
--- /dev/null
+++ b/web/cobrands/barnet/img/social4-flickr.gif
Binary files differ
diff --git a/web/cobrands/barnet/layout.scss b/web/cobrands/barnet/layout.scss
new file mode 100644
index 000000000..97b27cfff
--- /dev/null
+++ b/web/cobrands/barnet/layout.scss
@@ -0,0 +1,260 @@
+@import "_colours";
+@import "../fixmystreet/_layout";
+
+#mast,
+#breadcrumb,
+#page-title,
+#column_nav,
+#footer,
+#bottomBar {
+ display: block;
+}
+
+// So that map appears underneath the header
+.wrapper {
+ position: relative;
+}
+.ie6, .ie7 {
+ .wrapper {
+ padding-top: 1em;
+ }
+}
+
+#front-main {
+ background: $primary;
+ @include border-radius(1em 1em 0 0);
+ margin-bottom: 1em;
+ padding-top: 0;
+ width: 678px;
+ // layout sets this because base has it slightly lighter
+ h2 {
+ color: $primary_text;
+ }
+ #front-main-container {
+ padding: 1em;
+ }
+}
+
+#front_intro {
+ float: left;
+ margin-right: 3em;
+}
+
+#front_recent {
+ margin-left: 3em;
+}
+
+body.fullwidthpage {
+ .content {
+ width: 52em;
+ }
+}
+.ie6 {
+ body.fullwidthpage {
+ #front-main {
+ margin-top: -4em;
+ }
+ #front-howto,
+ #front-recently {
+ width: 26em;
+ }
+ .container {
+ padding: 0;
+ }
+ .content {
+ margin-left: 0px;
+ width: 55em;
+ }
+ div.img {
+ margin-top: -3.3em;
+ }
+ }
+}
+
+body.twothirdswidthpage {
+ .content {
+ @include box-shadow(none);
+ width: 640px;
+ margin-top: 0;
+ .sticky-sidebar {
+ display: none;
+ aside {
+ top: 25em;
+ }
+ }
+ }
+}
+
+.nav-wrapper {
+ display: none;
+}
+
+.mappage {
+ #breadcrumb {
+ margin-left: 0px;
+ }
+}
+
+.frontpage .content {
+ margin: 0;
+ @include box-shadow(none);
+}
+.ie6, .ie7, .ie8 {
+ .frontpage .content {
+ border: none;
+ }
+}
+
+#content .container h1 {
+ border-bottom: none;
+ font-size: 2em;
+ margin-bottom: 0.5em;
+}
+
+.shadow-wrap {
+ position: static;
+ padding-top: 0;
+ margin-bottom: 1em;
+ ul#key-tools {
+ border-top: none;
+ border-bottom: 1px solid $primary;
+ li {
+ a.chevron {
+ background-position: right -3230px;
+ }
+ a.feed {
+ background-position: right -3080px;
+ }
+ a.abuse {
+ background-position: right -2940px;
+ }
+ }
+ }
+ ul#key-tools.singleton {
+ li a {
+ padding-right: 4em;
+ }
+ }
+}
+
+#content h1.big-green-banner {
+ font-size: 1.4em;
+ margin-left: -2em;
+ background: #e1e3e4 url(/cobrands/fixmystreet/images/sprite.png) right -2192px no-repeat
+}
+
+body.frontpage {
+ #user-meta {
+ p {
+ top: 1em;
+ color: $primary_text;
+ a {
+ background: none;
+ }
+ }
+ }
+}
+#user-meta {
+ float: right;
+ p {
+ @include box-shadow(none);
+ color: $primary_text;
+ position: relative;
+ background: none;
+ a {
+ color: $primary_text;
+ background: none;
+ }
+ a:hover {
+ background: $primary;
+ }
+ }
+}
+.ie6 {
+ #user-meta {
+ float: none;
+ p {
+ position: absolute;
+ margin-top: 35px;
+ margin-right: 20px;
+ right: 0px;
+ left: auto;
+ }
+
+ }
+ .mappage {
+ #user-meta {
+ p {
+ margin-right: -100px;
+ }
+ }
+ }
+}
+
+/* barnet styles */
+
+.clear {
+ clear: both;
+}
+
+.container {
+ padding: 0 1em;
+}
+
+#site-header,
+#site-logo {
+ display: none !important;
+}
+
+
+#report-a-problem-sidebar {
+ left: 30em;
+ top: 4em;
+ width: 17em;
+ .sidebar-tips,
+ .sidebar-notes {
+ font-size: 0.9em;
+ }
+}
+.ie6 {
+ #report-a-problem-sidebar {
+ margin-top: -4em;
+ left: 30em;
+ .sidebar-notes {
+ padding-bottom: 0.5em;
+ }
+ p {
+ margin-bottom: 0.4em;
+ }
+ }
+}
+
+
+.general-sidebar-notes {
+ left: 25em;
+ width: 14em;
+ font-size: 1.2em;
+ p {
+ margin-bottom: 0 !important;
+ }
+}
+
+#front-howto #front_stats div big,
+ol.big-numbers > li::before {
+ color: #C0E8E8;
+}
+
+.banner {
+ p {
+ top: -2em;
+ }
+ p#fixed {
+ padding-top: 4em;
+ background: #00BD08;
+ }
+}
+
+
+#map_box {
+ border: 1px solid black;
+}
diff --git a/web/cobrands/barnet/position_map.js b/web/cobrands/barnet/position_map.js
new file mode 100644
index 000000000..465d852ec
--- /dev/null
+++ b/web/cobrands/barnet/position_map.js
@@ -0,0 +1,25 @@
+function position_map_box() {
+ var map_pos = 'absolute', map_height = $('.wrapper').height();
+ // on the all reports page the height of the wrapper leads to a very
+ // large map so we set a maximum size
+ if ( map_height > 600 ) {
+ map_height = 600;
+ }
+ $('#map_box').prependTo('.wrapper').css({
+ zIndex: 0, position: map_pos,
+ top: 1, left: $('.wrapper').left,
+ right: 0, bottom: $('.wrapper').bottom + 1,
+ width: '898px', height: map_height,
+ margin: 0
+ });
+}
+
+function map_fix() {
+ var height = $('.wrapper').height() - 3;
+ if ( height > 600 ) {
+ height = 600;
+ }
+ $('#map_box').height(height);
+}
+
+var slide_wards_down = 1;
diff --git a/web/cobrands/bromley/position_map.js b/web/cobrands/bromley/position_map.js
new file mode 100644
index 000000000..dddef3def
--- /dev/null
+++ b/web/cobrands/bromley/position_map.js
@@ -0,0 +1,19 @@
+function position_map_box() {
+ var $html = $('html');
+ var bromley_right;
+ if ($html.hasClass('ie6') || $html.hasClass('ie7')) {
+ bromley_right = '-480px';
+ } else {
+ bromley_right = '0em';
+ }
+ // Do the same as CSS (in case resized from mobile).
+ $('#map_box').prependTo('.content').css({
+ zIndex: 1, position: 'absolute',
+ top: '1em', left: '', right: bromley_right, bottom: '',
+ width: '464px', height: '464px',
+ margin: 0
+ });
+}
+
+function map_fix() {}
+var slide_wards_down = 1;
diff --git a/web/cobrands/fixmystreet/_layout.scss b/web/cobrands/fixmystreet/_layout.scss
index cdd7a41e2..0973e645d 100644
--- a/web/cobrands/fixmystreet/_layout.scss
+++ b/web/cobrands/fixmystreet/_layout.scss
@@ -293,7 +293,6 @@ body.fullwidthpage {
}
// two thirds width page, also has option for a sidebar which can be sticky or not
body.twothirdswidthpage {
- @extend .fullwidthpage;
.content {
width:40em;
position: relative;
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 09dbc46a7..c8ed8ae51 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -103,35 +103,7 @@ $(function(){
} else {
// Make map full screen on non-mobile sizes.
$html.removeClass('mobile');
- if (cobrand == 'bromley') {
- var bromley_right;
- if ($html.hasClass('ie6') || $html.hasClass('ie7')) {
- bromley_right = '-480px';
- } else {
- bromley_right = '0em';
- }
- // Do the same as CSS (in case resized from mobile).
- $('#map_box').prependTo('.content').css({
- zIndex: 1, position: 'absolute',
- top: '1em', left: '', right: bromley_right, bottom: '',
- width: '464px', height: '464px',
- margin: 0
- });
- } else if ($html.hasClass('ie6')) {
- $('#map_box').prependTo('.wrapper').css({
- zIndex: 0, position: 'absolute',
- top: 0, left: 0, right: 0, bottom: 0,
- width: '100%', height: $(window).height(),
- margin: 0
- });
- } else {
- $('#map_box').prependTo('.wrapper').css({
- zIndex: 0, position: 'fixed',
- top: 0, left: 0, right: 0, bottom: 0,
- width: '100%', height: '100%',
- margin: 0
- });
- }
+ position_map_box();
if (typeof fixmystreet !== 'undefined') {
if (cobrand == 'bromley') {
//$('#bromley-footer').hide();
@@ -353,7 +325,7 @@ $.fn.drawer = function(id, ajax) {
});
};
- if ($('html.mobile').length || cobrand == 'bromley') {
+ if ($('html.mobile').length || slide_wards_down ) {
$('#council_wards').hide().removeClass('hidden-js').find('h2').hide();
$('#key-tool-wards').click(function(e){
e.preventDefault();
@@ -382,6 +354,7 @@ $.fn.drawer = function(id, ajax) {
var $v = $(this);
$('<input/>').attr({ name:$v.attr('name'), value:$v.val(), type:'hidden' }).appendTo(form);
});
+ $('body').append(form);
form.submit();
});
@@ -454,6 +427,8 @@ $.fn.drawer = function(id, ajax) {
offset = -110;
}
heightFix(window, '.content', offset);
+ // in case we have a map that isn't full screen
+ map_fix();
}
}
diff --git a/web/cobrands/fixmystreet/position_map.js b/web/cobrands/fixmystreet/position_map.js
new file mode 100644
index 000000000..4a18d9f9a
--- /dev/null
+++ b/web/cobrands/fixmystreet/position_map.js
@@ -0,0 +1,21 @@
+function position_map_box() {
+ var $html = $('html');
+ if ($html.hasClass('ie6')) {
+ $('#map_box').prependTo('.wrapper').css({
+ zIndex: 0, position: 'absolute',
+ top: 0, left: 0, right: 0, bottom: 0,
+ width: '100%', height: $(window).height(),
+ margin: 0
+ });
+ } else {
+ $('#map_box').prependTo('.wrapper').css({
+ zIndex: 0, position: 'fixed',
+ top: 0, left: 0, right: 0, bottom: 0,
+ width: '100%', height: '100%',
+ margin: 0
+ });
+ }
+}
+
+function map_fix() {}
+var slide_wards_down = 0;
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index 36d47b5b2..b689d501c 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -47,7 +47,7 @@ $(function(){
jQuery.validator.addMethod('validName', function(value, element) {
var validNamePat = /\ba\s*n+on+((y|o)mo?u?s)?(ly)?\b/i;
- return this.optional(element) || value.length > 5 && value.match( /\S/ ) && !value.match( validNamePat ); }, validation_strings.category );
+ return this.optional(element) || value.length > 5 && value.match( /\S/ ) && value.match( /\s/ ) && !value.match( validNamePat ); }, validation_strings.category );
var form_submitted = 0;
var submitted = false;
@@ -108,7 +108,10 @@ $(function(){
$('#submit_register').click( function(e) {
$('#form_category').addClass('required validCategory').removeClass('valid');
- $('#form_name').addClass('required validName');
+ $('#form_name').addClass('required');
+ if ( $('#mapForm').length ) {
+ $('#form_name').addClass('validName');
+ }
$('#form_first_name').addClass('required');
$('#form_last_name').addClass('required');
$('#form_fms_extra_title').addClass('required');
@@ -116,7 +119,10 @@ $(function(){
$('#problem_submit > input[type="submit"]').click( function(e) {
$('#form_category').addClass('required validCategory').removeClass('valid');
- $('#form_name').addClass('required validName');
+ $('#form_name').addClass('required');
+ if ( $('#mapForm').length ) {
+ $('#form_name').addClass('validName');
+ }
$('#form_first_name').addClass('required');
$('#form_last_name').addClass('required');
$('#form_fms_extra_title').addClass('required');
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index cf873edd6..eca1fc074 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -504,6 +504,8 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
// e.xy is relative to top left of map, which might not be top left of page
e.xy.x += bo.left;
e.xy.y += bo.top;
+
+ // 24 and 64 is the width and height of the marker pin
if (e.xy.y <= o.top || (e.xy.x >= o.left && e.xy.x <= o.left + w + 24 && e.xy.y >= o.top && e.xy.y <= o.top + h + 64)) {
// top of the page, pin hidden by header;
// or underneath where the new sidebar will appear
diff --git a/web/js/southampton.js b/web/js/southampton.js
index c0fa48b06..af090d89b 100644
--- a/web/js/southampton.js
+++ b/web/js/southampton.js
@@ -3,6 +3,37 @@
* FixMyStreet JavaScript for Southampton
*/
+function update_category_extra(msg) {
+ var content = '<div style="margin: 1em 0em 1em 6.5em"><strong>' + msg + '</strong></div>';
+ var el = $('#category_extra');
+ if ( el.length ) {
+ el.html( content );
+ } else {
+ var cat_extra = '<div id="category_extra" style="margin:0; display_none;">' +
+ content +
+ '</div>';
+ $('#form_title').closest('div.form-field').after(cat_extra);
+ }
+ $('#category_extra').show('fast');
+}
+
+function check_depth() {
+ var depth = $(this).val();
+ if ('Deeper than a tennis ball' == depth) {
+ var content = '<div style="margin: 1em 0em 1em 6.5em"><strong>' +
+ 'Please contact Actionline on 0800 5 19 19 19 so your report can be dealt with urgently' +
+ '</strong></div>';
+ var depth_extra = $('#depth_extra');
+ if ( depth_extra.length ) {
+ depth_extra.html( content );
+ depth_extra.show('fast');
+ } else {
+ $('#form_depth').after( '<div id="depth_extra">' + content + '</div>' );
+ }
+ } else {
+ $('#depth_extra').hide('fast');
+ }
+}
$(function(){
@@ -20,15 +51,19 @@ $(function(){
input.val(input.attr('placeholder'));
}
}).blur();
-
+
// use on() here because the #form_category may be replaced
// during the page's lifetime
$("#problem_form").on("change.southampton", "select#form_category",
- function() {
+ function() {
+ $('#form_sign_in').show('fast');
+ $('#problem_submit').show('fast');
+ $('#street_light_report').hide('fast');
+ $('#depth_extra').hide('fast');
+ $('#category_extra').hide('fast');
var category = $(this).val();
if ('Potholes' == category) {
- if (!$('#potholes_extra').length) {
- var qns = '<div id="potholes_extra" style="margin:0; display:none;">' +
+ var content =
'<div class="form-field"><label for="form_size">Size:</label>' +
'<select name="detail_size"><option>-- Please select --<option>Unknown' +
'<option>Small: No larger than a dinner plate (up to 30cm/12inches)' +
@@ -36,17 +71,59 @@ $(function(){
'<option>Large: Larger than a dustbin lid (over 60cm/24inches)' +
'</select></div>' +
'<div class="form-field"><label for="form_depth">Depth:</label>' +
- '<select name="detail_depth"><option>-- Please select --<option>Unknown' +
+ '<select id="form_depth" name="detail_depth"><option>-- Please select --<option>Unknown' +
'<option>No deeper than a golf ball (up to 4cm/1.5inches)' +
'<option>No deeper than a tennis ball (up to 6.5cm/2.5inches)' +
'<option>Deeper than a tennis ball' +
- '</select></div></div>';
+ '</select></div>';
+ if (!$('#category_extra').length) {
+ var qns = '<div id="category_extra" style="margin:0; display:none;">' +
+ content +
+ '</div>';
$('#form_title').closest('div.form-field').after(qns);
- }
- $('#potholes_extra').show('fast');
+ } else {
+ $('#category_extra').html( content );
+ }
+ $('#category_extra').show('fast');
+ $('#form_depth').on('change', check_depth );
+ } else if ('Fly Tipping' == category) {
+ update_category_extra( 'Please list/detail items fly-tipped in the description box &amp; if it has been left on council or private property (if you know).' );
+ } else if ('Litter' == category) {
+ update_category_extra( 'Please detail the type of litter. If you are reporting broken glass, syringes, oil spills or human excrement, please contact Actionline on 0800 5 19 19 19 so your report can be dealt with.' );
+ } else if ('Leaves' == category) {
+ update_category_extra( 'Please give as much information as you can, e.g. approximate quantity in bin bags. Thank you' );
+ } else if ('Dead animals' == category) {
+ update_category_extra( 'Please give as much information as you can, e.g. which animal, on road or pavement. Thank you' );
+ } else if ('Shopping trolleys' == category) {
+ update_category_extra( 'Please give as much information as you can, e.g. which supermarket. Thank you' );
+ } else if ('Bollards' == category) {
+ update_category_extra( 'Please give as much information as you can, e.g. are they lit, metal or concrete. Thank you' );
+ } else if ('Overhanging vegetation' == category) {
+ update_category_extra( 'Please give as much information as you can, e.g. is it coming from a private property or open area. Thank you' );
+ } else if ('Graffiti' == category) {
+ var graffiti_content =
+ '<div class="form-field"><label for="form_offensive">Is it racist/ offensive:</label>' +
+ '<select name="detail_offensive"><option>-- Please select --' +
+ '<option>Yes<option>No</select></div>';
+ if (!$('#category_extra').length) {
+ var graffiti_qns = '<div id="category_extra" style="margin:0; display:none;">' +
+ graffiti_content +
+ '</div>';
+ $('#form_title').closest('div.form-field').after(graffiti_qns);
+ } else {
+ $('#category_extra').html( graffiti_content );
+ }
+ $('#category_extra').show('fast');
+ } else if ('Street lighting' == category) {
+ $('#form_sign_in').hide('fast');
+ $('#problem_submit').hide('fast');
+ $('#category_extra').hide('fast');
+ var lighting_content =
+ '<div id="street_light_report" style="margin: 1em 0em 1em 6.5em">Please report Street light problems using the Southampton Street Lighting site at: <a href="http://www.lightsoninsouthampton.co.uk/Public/ReportFault.aspx">http://www.lightsoninsouthampton.co.uk/Public/ReportFault.aspx</a></div>';
+ $('#form_category_row').after(lighting_content);
} else {
- $('#potholes_extra').hide('fast');
- }
+ $('#category_extra').hide('fast');
+ }
}
).change(); // change called to trigger (in case we've come in with potholes selected)