summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-05-08 22:59:04 +0100
committerComment <tim@gray.(none)>2013-05-08 22:59:04 +0100
commit4f81e9399051cc90ccddeb69b785d7422a28a1ff (patch)
treeea5187184ed61114b9315371e5c2d709bdf26c4f
initial commit
-rwxr-xr-xconfig.php21
-rwxr-xr-xfixTable.php15
-rwxr-xr-xhttpexists-proxy.php20
-rwxr-xr-ximg/_notes/dwsync.xml19
-rwxr-xr-ximg/icon_accessible_parking.pngbin0 -> 3311 bytes
-rwxr-xr-ximg/icon_accessible_toilet.pngbin0 -> 3425 bytes
-rwxr-xr-ximg/icon_entrance.pngbin0 -> 3349 bytes
-rwxr-xr-ximg/icon_loop.pngbin0 -> 3331 bytes
-rwxr-xr-ximg/icon_parking.pngbin0 -> 3218 bytes
-rwxr-xr-ximg/icon_ramp.pngbin0 -> 3374 bytes
-rwxr-xr-ximg/map-look-icon.gifbin0 -> 9271 bytes
-rwxr-xr-ximg/map.jpgbin0 -> 157723 bytes
-rwxr-xr-ximg/marker_accessible_parking.pngbin0 -> 3798 bytes
-rwxr-xr-ximg/marker_accessible_toilet.pngbin0 -> 4010 bytes
-rwxr-xr-ximg/marker_entrance.pngbin0 -> 3684 bytes
-rwxr-xr-ximg/marker_loop.pngbin0 -> 3832 bytes
-rwxr-xr-ximg/marker_parking.pngbin0 -> 3571 bytes
-rwxr-xr-ximg/marker_ramp.pngbin0 -> 3914 bytes
-rwxr-xr-ximg/marker_shadow.pngbin0 -> 765 bytes
-rwxr-xr-ximg/vanilla-test-image.jpgbin0 -> 8030 bytes
-rwxr-xr-xindex.php184
-rwxr-xr-xinfobubble.js1775
-rwxr-xr-xloadTable.php30
-rwxr-xr-xmap.js682
-rwxr-xr-xmap.php116
-rwxr-xr-xmap_prepare.php19
-rwxr-xr-xmapedit.php26
-rwxr-xr-xmaps-extra.js165
-rwxr-xr-xphotos/1.jpgbin0 -> 136842 bytes
-rwxr-xr-xphotos/12.jpgbin0 -> 174046 bytes
-rwxr-xr-xphotos/124.jpgbin0 -> 169965 bytes
-rwxr-xr-xphotos/13.jpgbin0 -> 160630 bytes
-rwxr-xr-xphotos/14.jpgbin0 -> 177614 bytes
-rwxr-xr-xphotos/15.jpgbin0 -> 153752 bytes
-rwxr-xr-xphotos/16.jpgbin0 -> 153853 bytes
-rwxr-xr-xphotos/17.jpgbin0 -> 155486 bytes
-rwxr-xr-xphotos/18.jpgbin0 -> 158791 bytes
-rwxr-xr-xphotos/181.jpgbin0 -> 177321 bytes
-rwxr-xr-xphotos/19.jpgbin0 -> 141372 bytes
-rwxr-xr-xphotos/194.jpgbin0 -> 124415 bytes
-rwxr-xr-xphotos/198.jpgbin0 -> 94426 bytes
-rwxr-xr-xphotos/199.jpgbin0 -> 147090 bytes
-rwxr-xr-xphotos/200.jpgbin0 -> 108962 bytes
-rwxr-xr-xphotos/211.jpgbin0 -> 134307 bytes
-rwxr-xr-xphotos/22.jpgbin0 -> 158279 bytes
-rwxr-xr-xphotos/23.jpgbin0 -> 171454 bytes
-rwxr-xr-xphotos/233.jpgbin0 -> 82294 bytes
-rwxr-xr-xphotos/243.jpgbin0 -> 154957 bytes
-rwxr-xr-xphotos/246.jpgbin0 -> 124825 bytes
-rwxr-xr-xphotos/249.jpgbin0 -> 113689 bytes
-rwxr-xr-xphotos/250.jpgbin0 -> 118309 bytes
-rwxr-xr-xphotos/253.jpgbin0 -> 169789 bytes
-rwxr-xr-xphotos/254.jpgbin0 -> 134468 bytes
-rwxr-xr-xphotos/32.jpgbin0 -> 213867 bytes
-rwxr-xr-xphotos/40.jpgbin0 -> 135515 bytes
-rwxr-xr-xphotos/54.jpgbin0 -> 119346 bytes
-rwxr-xr-xphotos/55.jpgbin0 -> 100414 bytes
-rwxr-xr-xphotos/56.jpgbin0 -> 149654 bytes
-rwxr-xr-xphotos/57.jpgbin0 -> 144272 bytes
-rwxr-xr-xphotos/58.jpgbin0 -> 127977 bytes
-rwxr-xr-xphotos/59.jpgbin0 -> 132663 bytes
-rwxr-xr-xphotos/61.jpgbin0 -> 198761 bytes
-rwxr-xr-xphotos/67.jpgbin0 -> 129908 bytes
-rwxr-xr-xphotos/68.jpgbin0 -> 173323 bytes
-rwxr-xr-xphotos/7.jpgbin0 -> 147163 bytes
-rwxr-xr-xphotos/70.jpgbin0 -> 107314 bytes
-rwxr-xr-xphotos/71.jpgbin0 -> 168932 bytes
-rwxr-xr-xphotos/73.jpgbin0 -> 156843 bytes
-rwxr-xr-xphotos/74.jpgbin0 -> 208427 bytes
-rwxr-xr-xphotos/75.jpgbin0 -> 146605 bytes
-rwxr-xr-xphotos/8.jpgbin0 -> 121366 bytes
-rwxr-xr-xphotos/81.jpgbin0 -> 135385 bytes
-rwxr-xr-xphotos/82.jpgbin0 -> 116536 bytes
-rwxr-xr-xphotos/83.jpgbin0 -> 177139 bytes
-rwxr-xr-xphotos/9.jpgbin0 -> 153636 bytes
-rwxr-xr-xphotos/_notes/dwsync.xml50
-rwxr-xr-xphotos/small/1.jpgbin0 -> 17975 bytes
-rwxr-xr-xphotos/small/12.jpgbin0 -> 23944 bytes
-rwxr-xr-xphotos/small/124.jpgbin0 -> 22371 bytes
-rwxr-xr-xphotos/small/13.jpgbin0 -> 18394 bytes
-rwxr-xr-xphotos/small/14.jpgbin0 -> 20944 bytes
-rwxr-xr-xphotos/small/15.jpgbin0 -> 18944 bytes
-rwxr-xr-xphotos/small/16.jpgbin0 -> 18581 bytes
-rwxr-xr-xphotos/small/17.jpgbin0 -> 18494 bytes
-rwxr-xr-xphotos/small/18.jpgbin0 -> 19807 bytes
-rwxr-xr-xphotos/small/181.jpgbin0 -> 23165 bytes
-rwxr-xr-xphotos/small/19.jpgbin0 -> 18724 bytes
-rwxr-xr-xphotos/small/194.jpgbin0 -> 17031 bytes
-rwxr-xr-xphotos/small/198.jpgbin0 -> 13086 bytes
-rwxr-xr-xphotos/small/199.jpgbin0 -> 19141 bytes
-rwxr-xr-xphotos/small/200.jpgbin0 -> 14277 bytes
-rwxr-xr-xphotos/small/211.jpgbin0 -> 18160 bytes
-rwxr-xr-xphotos/small/22.jpgbin0 -> 20617 bytes
-rwxr-xr-xphotos/small/23.jpgbin0 -> 23067 bytes
-rwxr-xr-xphotos/small/233.jpgbin0 -> 12337 bytes
-rwxr-xr-xphotos/small/243.jpgbin0 -> 22131 bytes
-rwxr-xr-xphotos/small/246.jpgbin0 -> 15444 bytes
-rwxr-xr-xphotos/small/249.jpgbin0 -> 14776 bytes
-rwxr-xr-xphotos/small/250.jpgbin0 -> 14624 bytes
-rwxr-xr-xphotos/small/253.jpgbin0 -> 20911 bytes
-rwxr-xr-xphotos/small/254.jpgbin0 -> 17887 bytes
-rwxr-xr-xphotos/small/32.jpgbin0 -> 21866 bytes
-rwxr-xr-xphotos/small/40.jpgbin0 -> 18725 bytes
-rwxr-xr-xphotos/small/54.jpgbin0 -> 15704 bytes
-rwxr-xr-xphotos/small/55.jpgbin0 -> 14439 bytes
-rwxr-xr-xphotos/small/56.jpgbin0 -> 19683 bytes
-rwxr-xr-xphotos/small/57.jpgbin0 -> 19592 bytes
-rwxr-xr-xphotos/small/58.jpgbin0 -> 19233 bytes
-rwxr-xr-xphotos/small/59.jpgbin0 -> 18907 bytes
-rwxr-xr-xphotos/small/61.jpgbin0 -> 21987 bytes
-rwxr-xr-xphotos/small/67.jpgbin0 -> 16520 bytes
-rwxr-xr-xphotos/small/68.jpgbin0 -> 22080 bytes
-rwxr-xr-xphotos/small/7.jpgbin0 -> 19929 bytes
-rwxr-xr-xphotos/small/70.jpgbin0 -> 15656 bytes
-rwxr-xr-xphotos/small/71.jpgbin0 -> 24992 bytes
-rwxr-xr-xphotos/small/73.jpgbin0 -> 19684 bytes
-rwxr-xr-xphotos/small/74.jpgbin0 -> 24497 bytes
-rwxr-xr-xphotos/small/75.jpgbin0 -> 19608 bytes
-rwxr-xr-xphotos/small/8.jpgbin0 -> 14443 bytes
-rwxr-xr-xphotos/small/81.jpgbin0 -> 16902 bytes
-rwxr-xr-xphotos/small/82.jpgbin0 -> 13788 bytes
-rwxr-xr-xphotos/small/83.jpgbin0 -> 22166 bytes
-rwxr-xr-xphotos/small/9.jpgbin0 -> 17914 bytes
-rwxr-xr-xphotos/small/_notes/dwsync.xml50
-rwxr-xr-xphotos/thumbs/1.jpgbin0 -> 10889 bytes
-rwxr-xr-xphotos/thumbs/12.jpgbin0 -> 14162 bytes
-rwxr-xr-xphotos/thumbs/124.jpgbin0 -> 13520 bytes
-rwxr-xr-xphotos/thumbs/13.jpgbin0 -> 12067 bytes
-rwxr-xr-xphotos/thumbs/14.jpgbin0 -> 13857 bytes
-rwxr-xr-xphotos/thumbs/15.jpgbin0 -> 12529 bytes
-rwxr-xr-xphotos/thumbs/16.jpgbin0 -> 12415 bytes
-rwxr-xr-xphotos/thumbs/17.jpgbin0 -> 12458 bytes
-rwxr-xr-xphotos/thumbs/18.jpgbin0 -> 13759 bytes
-rwxr-xr-xphotos/thumbs/181.jpgbin0 -> 13997 bytes
-rwxr-xr-xphotos/thumbs/19.jpgbin0 -> 11458 bytes
-rwxr-xr-xphotos/thumbs/194.jpgbin0 -> 10438 bytes
-rwxr-xr-xphotos/thumbs/198.jpgbin0 -> 9032 bytes
-rwxr-xr-xphotos/thumbs/199.jpgbin0 -> 12236 bytes
-rwxr-xr-xphotos/thumbs/200.jpgbin0 -> 9216 bytes
-rwxr-xr-xphotos/thumbs/211.jpgbin0 -> 12047 bytes
-rwxr-xr-xphotos/thumbs/22.jpgbin0 -> 13423 bytes
-rwxr-xr-xphotos/thumbs/23.jpgbin0 -> 13849 bytes
-rwxr-xr-xphotos/thumbs/233.jpgbin0 -> 7882 bytes
-rwxr-xr-xphotos/thumbs/243.jpgbin0 -> 14361 bytes
-rwxr-xr-xphotos/thumbs/246.jpgbin0 -> 10861 bytes
-rwxr-xr-xphotos/thumbs/249.jpgbin0 -> 10164 bytes
-rwxr-xr-xphotos/thumbs/250.jpgbin0 -> 9803 bytes
-rwxr-xr-xphotos/thumbs/253.jpgbin0 -> 14201 bytes
-rwxr-xr-xphotos/thumbs/254.jpgbin0 -> 12827 bytes
-rwxr-xr-xphotos/thumbs/32.jpgbin0 -> 14749 bytes
-rwxr-xr-xphotos/thumbs/40.jpgbin0 -> 12703 bytes
-rwxr-xr-xphotos/thumbs/54.jpgbin0 -> 10846 bytes
-rwxr-xr-xphotos/thumbs/55.jpgbin0 -> 9190 bytes
-rwxr-xr-xphotos/thumbs/56.jpgbin0 -> 12245 bytes
-rwxr-xr-xphotos/thumbs/57.jpgbin0 -> 11784 bytes
-rwxr-xr-xphotos/thumbs/58.jpgbin0 -> 12064 bytes
-rwxr-xr-xphotos/thumbs/59.jpgbin0 -> 11362 bytes
-rwxr-xr-xphotos/thumbs/61.jpgbin0 -> 14450 bytes
-rwxr-xr-xphotos/thumbs/67.jpgbin0 -> 11376 bytes
-rwxr-xr-xphotos/thumbs/68.jpgbin0 -> 13655 bytes
-rwxr-xr-xphotos/thumbs/7.jpgbin0 -> 13500 bytes
-rwxr-xr-xphotos/thumbs/70.jpgbin0 -> 9941 bytes
-rwxr-xr-xphotos/thumbs/71.jpgbin0 -> 14600 bytes
-rwxr-xr-xphotos/thumbs/73.jpgbin0 -> 13561 bytes
-rwxr-xr-xphotos/thumbs/74.jpgbin0 -> 16768 bytes
-rwxr-xr-xphotos/thumbs/75.jpgbin0 -> 13702 bytes
-rwxr-xr-xphotos/thumbs/8.jpgbin0 -> 9913 bytes
-rwxr-xr-xphotos/thumbs/81.jpgbin0 -> 11474 bytes
-rwxr-xr-xphotos/thumbs/82.jpgbin0 -> 8381 bytes
-rwxr-xr-xphotos/thumbs/83.jpgbin0 -> 13315 bytes
-rwxr-xr-xphotos/thumbs/9.jpgbin0 -> 12035 bytes
-rwxr-xr-xphotos/thumbs/_notes/dwsync.xml50
-rwxr-xr-xsetMarkerPos.php17
-rwxr-xr-xstyles-working.css83
-rw-r--r--tableKML.php32
175 files changed, 3354 insertions, 0 deletions
diff --git a/config.php b/config.php
new file mode 100755
index 0000000..b0fe6ed
--- /dev/null
+++ b/config.php
@@ -0,0 +1,21 @@
+<?php
+
+$host="localhost";
+$login="tcdmaps";
+$pword="tcdmaps";
+$db="googlemaps_db";
+
+/*
+$host="internal-db.s65888.gridserver.com";
+$login="db65888_tcd";
+$pword="3K4DumV3";
+$db="db65888_tcdmaps";
+ */
+$key="AIzaSyADLTH2csWlgn92BHVOuN6cRYsd_uKJowk&sensor=true";
+
+$startlat=53.3442;
+$startlng=-6.256;
+
+$editable="false";
+$debug="false";
+?> \ No newline at end of file
diff --git a/fixTable.php b/fixTable.php
new file mode 100755
index 0000000..c726ad9
--- /dev/null
+++ b/fixTable.php
@@ -0,0 +1,15 @@
+<?php
+include 'config.php';
+
+mysql_connect($host, $login, $pword) or die(mysql_error());
+mysql_select_db($db) or die(mysql_error());
+
+$table= $_GET["table"];
+$col=$_GET["col"];
+
+$query="UPDATE ".$table." SET ".$col."=REPLACE(".$col.", '\\\', '')";
+echo $query."<br>";
+echo mysql_query($query);
+mysql_close();
+
+?>
diff --git a/httpexists-proxy.php b/httpexists-proxy.php
new file mode 100755
index 0000000..adc4df4
--- /dev/null
+++ b/httpexists-proxy.php
@@ -0,0 +1,20 @@
+<?php
+// Rough proxy to help map.js check for photos.
+// Reason being that requests similar to http://www.tcd.ie/Maps/photos/small/100.jpg
+// were being redirected to http://www.tcd.ie/Maps/photos/small/200.jpg or similar.
+// Because the web server is set up to permenantly redirect 301 to files with a similar name.
+// JavaScript cannot check for redirects (30x) as they are completed before the JavaScript runs.
+// Hence maps.js always got a 200 OK response for redirected photos.
+if (!empty($_GET['httpexistsurl'])) {
+ if (file_exists(dirname($_SERVER['SCRIPT_FILENAME']).'/'.$_GET['httpexistsurl'])) {
+ // all good
+ }
+ else {
+ header("HTTP/1.0 404 Not Found");
+ }
+}
+else {
+ header("HTTP/1.0 404 Not Found");
+}
+
+?> \ No newline at end of file
diff --git a/img/_notes/dwsync.xml b/img/_notes/dwsync.xml
new file mode 100755
index 0000000..644d085
--- /dev/null
+++ b/img/_notes/dwsync.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<dwsync>
+<file name="map-look-icon.gif" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+<file name="map.jpg" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+<file name="vanilla-test-image.jpg" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+<file name="icon_accessible_parking.png" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+<file name="icon_accessible_toilet.png" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+<file name="icon_entrance.png" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+<file name="icon_loop.png" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+<file name="icon_parking.png" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+<file name="icon_ramp.png" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+<file name="marker_accessible_parking.png" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+<file name="marker_accessible_toilet.png" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+<file name="marker_entrance.png" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+<file name="marker_loop.png" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+<file name="marker_parking.png" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+<file name="marker_ramp.png" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+<file name="marker_shadow.png" server="www.tcd.ie//www.tcd.ie/" local="129685121150000000" remote="129685121150000000" />
+</dwsync> \ No newline at end of file
diff --git a/img/icon_accessible_parking.png b/img/icon_accessible_parking.png
new file mode 100755
index 0000000..3910870
--- /dev/null
+++ b/img/icon_accessible_parking.png
Binary files differ
diff --git a/img/icon_accessible_toilet.png b/img/icon_accessible_toilet.png
new file mode 100755
index 0000000..5660146
--- /dev/null
+++ b/img/icon_accessible_toilet.png
Binary files differ
diff --git a/img/icon_entrance.png b/img/icon_entrance.png
new file mode 100755
index 0000000..1dfbcae
--- /dev/null
+++ b/img/icon_entrance.png
Binary files differ
diff --git a/img/icon_loop.png b/img/icon_loop.png
new file mode 100755
index 0000000..51e6bb8
--- /dev/null
+++ b/img/icon_loop.png
Binary files differ
diff --git a/img/icon_parking.png b/img/icon_parking.png
new file mode 100755
index 0000000..b300fcc
--- /dev/null
+++ b/img/icon_parking.png
Binary files differ
diff --git a/img/icon_ramp.png b/img/icon_ramp.png
new file mode 100755
index 0000000..f308283
--- /dev/null
+++ b/img/icon_ramp.png
Binary files differ
diff --git a/img/map-look-icon.gif b/img/map-look-icon.gif
new file mode 100755
index 0000000..10b4b7d
--- /dev/null
+++ b/img/map-look-icon.gif
Binary files differ
diff --git a/img/map.jpg b/img/map.jpg
new file mode 100755
index 0000000..7a462f9
--- /dev/null
+++ b/img/map.jpg
Binary files differ
diff --git a/img/marker_accessible_parking.png b/img/marker_accessible_parking.png
new file mode 100755
index 0000000..1539170
--- /dev/null
+++ b/img/marker_accessible_parking.png
Binary files differ
diff --git a/img/marker_accessible_toilet.png b/img/marker_accessible_toilet.png
new file mode 100755
index 0000000..326bb26
--- /dev/null
+++ b/img/marker_accessible_toilet.png
Binary files differ
diff --git a/img/marker_entrance.png b/img/marker_entrance.png
new file mode 100755
index 0000000..3b025fd
--- /dev/null
+++ b/img/marker_entrance.png
Binary files differ
diff --git a/img/marker_loop.png b/img/marker_loop.png
new file mode 100755
index 0000000..9ab312c
--- /dev/null
+++ b/img/marker_loop.png
Binary files differ
diff --git a/img/marker_parking.png b/img/marker_parking.png
new file mode 100755
index 0000000..6367918
--- /dev/null
+++ b/img/marker_parking.png
Binary files differ
diff --git a/img/marker_ramp.png b/img/marker_ramp.png
new file mode 100755
index 0000000..244125f
--- /dev/null
+++ b/img/marker_ramp.png
Binary files differ
diff --git a/img/marker_shadow.png b/img/marker_shadow.png
new file mode 100755
index 0000000..de0463b
--- /dev/null
+++ b/img/marker_shadow.png
Binary files differ
diff --git a/img/vanilla-test-image.jpg b/img/vanilla-test-image.jpg
new file mode 100755
index 0000000..3243b9f
--- /dev/null
+++ b/img/vanilla-test-image.jpg
Binary files differ
diff --git a/index.php b/index.php
new file mode 100755
index 0000000..d6e383d
--- /dev/null
+++ b/index.php
@@ -0,0 +1,184 @@
+<!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" lang="en">
+<head>
+<title>College Maps : Trinity College Dublin</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<meta http-equiv="Content-Language" content="en" />
+<meta name="author" content="College Maps, Trinity College Dublin" />
+<meta name="copyright" content="&copy; 2007 Trinity College Dublin" />
+<meta name="date" content="2011-02-01T15:03:39P" />
+<meta name="description" content="College Maps" />
+<meta name="keywords" content="map,university,ireland,irish,universities,tcd,national,university of dublin,research,academic,study,studying,undergraduate,postgraduate" />
+<meta name="robots" content="all" />
+<link rel="Start" href="http://www.tcd.ie/Maps" title="Home" />
+<link rel="Author" href="mailto:richard.cotterell@tcd.ie." title="Author (College Maps)" />
+<link rel="Search" type="text/html" href="http://search.tcd.ie/search" title="Search Trinity College" />
+<link rel="Index" type="text/html" href="http://www.tcd.ie/az" title="A-Z of Trinity College" />
+<link rel="Shortcut Icon" href="http://www.tcd.ie/tms/m/styles/favicon.ico" type="image/x-icon" />
+<!--[if lt IE 8]><link rel="Stylesheet" type="text/css" href="http://www.tcd.ie/tms/m/styles/ie-lt-8-pre.css" media="screen" /><![endif]-->
+<link rel="Stylesheet" type="text/css" href="http://www.tcd.ie/tms/m/styles/master.css" media="screen" />
+<link rel="Stylesheet" type="text/css" href="http://www.tcd.ie/tms/m/styles/print.css" media="print" />
+<link rel="Stylesheet" type="text/css" href="http://www.tcd.ie/tms/t/college-maps-2/styles-college-maps-2.css" media="screen" />
+<!--[if lt IE 7]><link rel="Stylesheet" type="text/css" href="http://www.tcd.ie/tms/m/styles/ie-lt-8.css" media="screen" /><![endif]-->
+<!--[if lt IE 7]><script src="http://www.tcd.ie/tms/m/scripts/ie7/IE8.js" type="text/javascript"></script><![endif]-->
+<script type="text/javascript" src="http://www.tcd.ie/tms/m/scripts/jquery/jquery-1.2.3.min.js"></script>
+<script type="text/javascript" src="http://www.tcd.ie/tms/m/scripts/jquery/lowpro/lowpro.jquery.js"></script>
+<script type="text/javascript">
+<!--
+function MM_jumpMenu(targ,selObj,restore){ //v3.0
+ eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
+ if (restore) selObj.selectedIndex=0;
+}
+//-->
+</script>
+
+<?php include '/www.tcd.ie/tms/m/a.php'; // Master content to go before the end of the head element. ?>
+</head>
+<body class="t-home"">
+<div class="wrap">
+ <div class="core-header">
+ <h1><a href="http://www.tcd.ie">Trinity College Dublin</a></h1>
+ <p class="cloak"><a href="#main-content">Skip to main content</a>.</p>
+ <form class="core-search" method="get" action="http://search.tcd.ie/search">
+ <fieldset>
+ <legend><span class="accelerator-key">S</span>earch TCD</legend>
+ <label for="search" class="cloak">Your query: </label>
+ <input accesskey="s" type="text" name="q" id="search" value="Search TCD" onfocus="if(this.value=='Search TCD'){this.value='';this.style.color='#54575e';this.style.background='#ffffff';}else{this.select();}" onblur="if(this.value==''){this.value='Search TCD';this.style.color='#54575e';this.style.background='#EDF1F8';}" />
+ <input type="image" src="http://www.tcd.ie/tms/m/styles/img/go.gif" class="submit" alt="Go" value="go" />
+ <input type="hidden" name="entqr" value="0" />
+ <input type="hidden" name="ud" value="1" />
+ <input type="hidden" name="sort" value="date:D:L:d1" />
+ <input type="hidden" name="output" value="xml_no_dtd" />
+ <input type="hidden" name="oe" value="UTF-8" />
+ <input type="hidden" name="ie" value="UTF-8" />
+ <input type="hidden" name="client" value="default_frontend" />
+ <input type="hidden" name="proxystylesheet" value="default_frontend" />
+ <input type="hidden" name="site" value="default_collection" />
+ </fieldset>
+ </form>
+ <h2 class="cloak">Core links</h2>
+ <div class="core-tabs">
+ <ul>
+ <li><a href="http://www.tcd.ie/" class="core-tab" title="TCD Home"><span>TCD Home</span></a></li>
+ <li><a href="http://www.tcd.ie/structure" title="Visit Faculties &amp; Schools"><span>Faculties &amp; Schools</span></a></li>
+ <li id="current"><a href="http://www.tcd.ie/courses/undegraduate/faculty" title="Browse TCD Courses"><span>Courses</span></a></li>
+ <li><a href="http://www.tcd.ie/research" title="Find out more about our Research"><span>Research</span></a></li>
+ <li><a href="http://www.tcd.ie/services" title="TCD Services"><span>Services</span></a></li>
+ <li><a href="http://www.tcd.ie/contacts" title="Contact Details"><span>Contact</span></a></li>
+ <li><a href="http://www.tcd.ie/az" title="TCD A-Z Listings"><span>A - Z</span></a></li>
+ </ul>
+ </div>
+ </div>
+ <!-- HEADER STARTS-->
+ <div class="h" id="main-content">
+ <div id="hcontainerdropdowns">
+ <h1><a href="/Maps/">College Maps</a></h1>
+ <!-- <div id="facilities"></div>-->
+ <!--<div id="features"></div>-->
+ <form id="headerform" action="map.php" method="get">
+ <!-- The TCD header search also has an input element anchored with id="search". A conflict may occur with this form. -->
+ <div>
+ <label for="query">Query:</label>
+ <input type="text" id="query" name="q" title="Search the map" size="20" maxlength="2048" value="" />
+ <input type="submit" id="button" value="Go" />
+ </div>
+ </form>
+ <div id="quicklinkswrap"></div>
+ <div class="cb"></div>
+ </div>
+ <div id="searchoptions"></div>
+ </div>
+ <!-- HEADER ENDS-->
+ <div class="wrap-content">
+ <div class="wrap-content-inner">
+ <div class="m">
+ <div class="m-inner">
+ <div class="intro-wrap">
+ <div class="intro">
+ <h2><a href="map.php">Interactive Map</a></h2>
+ <p>Our new <a href="map.php"><em>searchable interactive college map</em></a> is a great resource for finding your way around the Trinity campus. Future releases of this website will include building imagery and details. Missing or incorrect information can be reported by emailing <a href="mailto:webdes@tcd.ie">webdes@tcd.ie</a>.</p>
+ </div>
+ <div class="interactive-map">
+ <p>The website also includes information on college facilities along with directions to Trinity and printable versions of the maps.</p>
+ </div>
+ <div class="cb"></div>
+ </div>
+ <div class="quicklinks">
+ <div class="quicklinks-inner">
+ <h2><span><a href="facilities.php">Facilities</a></span></h2>
+ <ul>
+ <li>The 3 links below provide extra information about gate access times, lecture theatres and computer rooms which is currently not in the map. However, you can use the map to find out the location of these rooms by searching or using the drop down menu above.</li>
+ <li><a href="access-times.php">Gate Access Times</a></li>
+ <li><a href="facilities.php#rooms">Major Lecture Theatres</a></li>
+ <li><a href="facilities.php#pacr">Public Access Computer Rooms (PACRs)</a></li>
+ </ul>
+ </div>
+ </div>
+
+ <div class="columthree">
+
+ <div class="printable-maps">
+ <div class="printable-maps-inner">
+ <h2><span>Printable maps</span></h2>
+ <ul>
+ <li><a href="assets/pdf/tcd-main-campus.pdf">Trinity College Campus 1 (PDF&nbsp;491&nbsp;KB)</a></li>
+ <li><a href="assets/pdf/tcd-campus.pdf">Trinity College Campus 2 (PDF&nbsp;873&nbsp;KB)</a></li>
+ <li><a href="assets/pdf/pdf_city.pdf">Dublin City Centre (PDF&nbsp;394&nbsp;KB)</a></li>
+ <li><a href="assets/pdf/tcd-outer-dublin.pdf">Outer Dublin (PDF&nbsp;214&nbsp;KB)</a></li>
+ <li><a href="http://isservices.tcd.ie/assets/img/network/wireless_map_printable.pdf">Wireless Network Locations (PDF&nbsp;11.9&nbsp;MB)</a></li>
+ </ul>
+ </div>
+ </div>
+ <a href="http://www.tcd.ie/virtualtour/"><img src="//www.tcd.ie/tms/t/college-maps-2/img/virtualtour-ad.jpg" alt="Take Trinity College&rsquo;s virtual tour of 360 degree photographs" width="304" height="134" style="border:0; padding: 7px 0 0 0; margin:0"></a>
+ <!--<div class="virtualtours">
+ <div class="virtualtours-inner">
+ <h2><span>Virtual Tours</span></h2>
+ <ul>
+ <li><a href="http://www.tcd.ie/virtualtour/">Take the TCD Virtual Tour</a></li>
+ </ul>
+ </div>
+ </div>-->
+
+ </div>
+
+
+ <div class="directions">
+ <div class="directions-inner">
+ <h2><span><a href="directions.php">Directions</a></span></h2>
+ <ul>
+ <li><a href="directions.php#by-dublin-bus">By Dublin Bus</a></li>
+ <li><a href="directions.php#from-busarus">From Busarus</a></li>
+ <li><a href="directions.php#from-connolly-station">From Connolly Station</a></li>
+ <li><a href="directions.php#from-dublin-airport">From Dublin Airport</a></li>
+ <li><a href="directions.php#from-dublin-port">From Dublin Port</a></li>
+ <li><a href="directions.php#from-dun-laoghaire-harbour">From Dun Laoghaire Harbour</a></li>
+ <li><a href="directions.php#from-heuston-station">From Heuston Station</a></li>
+ <li><a href="directions.php#from-the-south">From the South</a></li>
+ <li><a href="directions.php#from-the-north">From the North</a></li>
+ <li><a href="directions.php#from-the-west">From the West</a></li>
+ </ul>
+ </div>
+ </div>
+ <div class="cb"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="f">
+ <hr class="cloak" />
+ <p><span class="cloak">Last updated </span><span class="date-modified" title="Last update">19 Feb 2009</span><span class="cloak"> by </span><span class="author" title="Author"><a href="mailto:webdes@tcd.ie">College Maps</a></span><span class="cloak">.</span></p>
+ </div>
+ <div class="core-footer">
+ <address>
+ Trinity College Dublin, College Green, Dublin 2
+ </address>
+ <ul>
+ <li><a href="http://www.tcd.ie/accessibility">Accessibility</a></li>
+ <li><a href="http://www.tcd.ie/privacy">Privacy</a></li>
+ <li><a href="http://www.tcd.ie/disclaim">Disclaimer</a></li>
+ <li><a href="http://www.tcd.ie/contacts">Contact</a></li>
+ </ul>
+ </div>
+</div>
+</body>
+</html>
diff --git a/infobubble.js b/infobubble.js
new file mode 100755
index 0000000..06c3744
--- /dev/null
+++ b/infobubble.js
@@ -0,0 +1,1775 @@
+// ==ClosureCompiler==
+// @compilation_level ADVANCED_OPTIMIZATIONS
+// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3.js
+// ==/ClosureCompiler==
+
+/**
+ * @name CSS3 InfoBubble with tabs for Google Maps API V3
+ * @version 0.8
+ * @author Luke Mahe
+ * @fileoverview
+ * This library is a CSS Infobubble with tabs. It uses css3 rounded corners and
+ * drop shadows and animations. It also allows tabs
+ */
+
+/*
+ * 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.
+ */
+
+
+/**
+ * A CSS3 InfoBubble v0.8
+ * @param {Object.<string, *>=} opt_options Optional properties to set.
+ * @extends {google.maps.OverlayView}
+ * @constructor
+ */
+function InfoBubble(opt_options) {
+ this.extend(InfoBubble, google.maps.OverlayView);
+ this.tabs_ = [];
+ this.activeTab_ = null;
+ this.baseZIndex_ = 100;
+ this.isOpen_ = false;
+
+ var options = opt_options || {};
+
+ if (options['backgroundColor'] == undefined) {
+ options['backgroundColor'] = this.BACKGROUND_COLOR_;
+ }
+
+ if (options['borderColor'] == undefined) {
+ options['borderColor'] = this.BORDER_COLOR_;
+ }
+
+ if (options['borderRadius'] == undefined) {
+ options['borderRadius'] = this.BORDER_RADIUS_;
+ }
+
+ if (options['borderWidth'] == undefined) {
+ options['borderWidth'] = this.BORDER_WIDTH_;
+ }
+
+ if (options['padding'] == undefined) {
+ options['padding'] = this.PADDING_;
+ }
+
+ if (options['arrowPosition'] == undefined) {
+ options['arrowPosition'] = this.ARROW_POSITION_;
+ }
+
+ if (options['disableAutoPan'] == undefined) {
+ options['disableAutoPan'] = false;
+ }
+
+ if (options['disableAnimation'] == undefined) {
+ options['disableAnimation'] = false;
+ }
+
+ if (options['minWidth'] == undefined) {
+ options['minWidth'] = this.MIN_WIDTH_;
+ }
+
+ if (options['shadowStyle'] == undefined) {
+ options['shadowStyle'] = this.SHADOW_STYLE_;
+ }
+
+ if (options['arrowSize'] == undefined) {
+ options['arrowSize'] = this.ARROW_SIZE_;
+ }
+
+ if (options['arrowStyle'] == undefined) {
+ options['arrowStyle'] = this.ARROW_STYLE_;
+ }
+
+ this.buildDom_();
+
+ this.setValues(options);
+}
+window['InfoBubble'] = InfoBubble;
+
+
+/**
+ * Default arrow size
+ * @const
+ * @private
+ */
+InfoBubble.prototype.ARROW_SIZE_ = 15;
+
+
+/**
+ * Default arrow style
+ * @const
+ * @private
+ */
+InfoBubble.prototype.ARROW_STYLE_ = 0;
+
+
+/**
+ * Default shadow style
+ * @const
+ * @private
+ */
+InfoBubble.prototype.SHADOW_STYLE_ = 1;
+
+
+/**
+ * Default min width
+ * @const
+ * @private
+ */
+InfoBubble.prototype.MIN_WIDTH_ = 50;
+
+
+/**
+ * Default arrow position
+ * @const
+ * @private
+ */
+InfoBubble.prototype.ARROW_POSITION_ = 50;
+
+
+/**
+ * Default padding
+ * @const
+ * @private
+ */
+InfoBubble.prototype.PADDING_ = 10;
+
+
+/**
+ * Default border width
+ * @const
+ * @private
+ */
+InfoBubble.prototype.BORDER_WIDTH_ = 1;
+
+
+/**
+ * Default border color
+ * @const
+ * @private
+ */
+InfoBubble.prototype.BORDER_COLOR_ = '#ccc';
+
+
+/**
+ * Default border radius
+ * @const
+ * @private
+ */
+InfoBubble.prototype.BORDER_RADIUS_ = 10;
+
+
+/**
+ * Default background color
+ * @const
+ * @private
+ */
+InfoBubble.prototype.BACKGROUND_COLOR_ = '#fff';
+
+
+/**
+ * Extends a objects prototype by anothers.
+ *
+ * @param {Object} obj1 The object to be extended.
+ * @param {Object} obj2 The object to extend with.
+ * @return {Object} The new extended object.
+ * @ignore
+ */
+InfoBubble.prototype.extend = function(obj1, obj2) {
+ return (function(object) {
+ for (var property in object.prototype) {
+ this.prototype[property] = object.prototype[property];
+ }
+ return this;
+ }).apply(obj1, [obj2]);
+};
+
+
+/**
+ * Builds the InfoBubble dom
+ * @private
+ */
+InfoBubble.prototype.buildDom_ = function() {
+ var bubble = this.bubble_ = document.createElement('DIV');
+ bubble.style['position'] = 'absolute';
+ bubble.style['zIndex'] = this.baseZIndex_;
+
+ var tabsContainer = this.tabsContainer_ = document.createElement('DIV');
+ tabsContainer.style['position'] = 'relative';
+
+ // Close button
+ var close = this.close_ = document.createElement('IMG');
+ close.style['position'] = 'absolute';
+ close.style['width'] = this.px(12);
+ close.style['height'] = this.px(12);
+ close.style['border'] = 0;
+ close.style['zIndex'] = this.baseZIndex_ + 1;
+ close.style['cursor'] = 'pointer';
+ close.src = 'http://maps.gstatic.com/intl/en_us/mapfiles/iw_close.gif';
+
+ var that = this;
+ google.maps.event.addDomListener(close, 'click', function() {
+ that.close();
+ google.maps.event.trigger(that, 'closeclick');
+ });
+
+ // Content area
+ var contentContainer = this.contentContainer_ = document.createElement('DIV');
+ contentContainer.style['overflowX'] = 'auto';
+ contentContainer.style['overflowY'] = 'auto';
+ contentContainer.style['cursor'] = 'default';
+ contentContainer.style['clear'] = 'both';
+ contentContainer.style['position'] = 'relative';
+
+ var content = this.content_ = document.createElement('DIV');
+ contentContainer.appendChild(content);
+
+ // Arrow
+ var arrow = this.arrow_ = document.createElement('DIV');
+ arrow.style['position'] = 'relative';
+
+ var arrowOuter = this.arrowOuter_ = document.createElement('DIV');
+ var arrowInner = this.arrowInner_ = document.createElement('DIV');
+
+ var arrowSize = this.getArrowSize_();
+
+ arrowOuter.style['position'] = arrowInner.style['position'] = 'absolute';
+ arrowOuter.style['left'] = arrowInner.style['left'] = '50%';
+ arrowOuter.style['height'] = arrowInner.style['height'] = '0';
+ arrowOuter.style['width'] = arrowInner.style['width'] = '0';
+ arrowOuter.style['marginLeft'] = this.px(-arrowSize);
+ arrowOuter.style['borderWidth'] = this.px(arrowSize);
+ arrowOuter.style['borderBottomWidth'] = 0;
+
+ // Shadow
+ var bubbleShadow = this.bubbleShadow_ = document.createElement('DIV');
+ bubbleShadow.style['position'] = 'absolute';
+
+ // Hide the InfoBubble by default
+ bubble.style['display'] = bubbleShadow.style['display'] = 'none';
+
+ bubble.appendChild(this.tabsContainer_);
+ bubble.appendChild(close);
+ bubble.appendChild(contentContainer);
+ arrow.appendChild(arrowOuter);
+ arrow.appendChild(arrowInner);
+ bubble.appendChild(arrow);
+
+ var stylesheet = document.createElement('style');
+ stylesheet.setAttribute('type', 'text/css');
+
+ /**
+ * The animation for the infobubble
+ * @type {string}
+ */
+ this.animationName_ = '_ibani_' + Math.round(Math.random() * 10000);
+
+ var css = '.' + this.animationName_ + '{-webkit-animation-name:' +
+ this.animationName_ + ';-webkit-animation-duration:0.5s;' +
+ '-webkit-animation-iteration-count:1;}' +
+ '@-webkit-keyframes ' + this.animationName_ + ' {from {' +
+ '-webkit-transform: scale(0)}50% {-webkit-transform: scale(1.2)}90% ' +
+ '{-webkit-transform: scale(0.95)}to {-webkit-transform: scale(1)}}';
+
+ stylesheet.textContent = css;
+ document.getElementsByTagName('head')[0].appendChild(stylesheet);
+};
+
+
+/**
+ * Sets the background class name
+ *
+ * @param {string} className The class name to set.
+ */
+InfoBubble.prototype.setBackgroundClassName = function(className) {
+ this.set('backgroundClassName', className);
+};
+InfoBubble.prototype['setBackgroundClassName'] =
+ InfoBubble.prototype.setBackgroundClassName;
+
+
+/**
+ * changed MVC callback
+ */
+InfoBubble.prototype.backgroundClassName_changed = function() {
+ this.content_.className = this.get('backgroundClassName');
+};
+InfoBubble.prototype['backgroundClassName_changed'] =
+ InfoBubble.prototype.backgroundClassName_changed;
+
+
+/**
+ * Sets the class of the tab
+ *
+ * @param {string} className the class name to set.
+ */
+InfoBubble.prototype.setTabClassName = function(className) {
+ this.set('tabClassName', className);
+};
+InfoBubble.prototype['setTabClassName'] =
+ InfoBubble.prototype.setTabClassName;
+
+
+/**
+ * tabClassName changed MVC callback
+ */
+InfoBubble.prototype.tabClassName_changed = function() {
+ this.updateTabStyles_();
+};
+InfoBubble.prototype['tabClassName_changed'] =
+ InfoBubble.prototype.tabClassName_changed;
+
+
+/**
+ * Gets the style of the arrow
+ *
+ * @private
+ * @return {number} The style of the arrow.
+ */
+InfoBubble.prototype.getArrowStyle_ = function() {
+ return parseInt(this.get('arrowStyle'), 10) || 0;
+};
+
+
+/**
+ * Sets the style of the arrow
+ *
+ * @param {number} style The style of the arrow.
+ */
+InfoBubble.prototype.setArrowStyle = function(style) {
+ this.set('arrowStyle', style);
+};
+InfoBubble.prototype['setArrowStyle'] =
+ InfoBubble.prototype.setArrowStyle;
+
+
+/**
+ * Arrow style changed MVC callback
+ */
+InfoBubble.prototype.arrowStyle_changed = function() {
+ this.arrowSize_changed();
+};
+InfoBubble.prototype['arrowStyle_changed'] =
+ InfoBubble.prototype.arrowStyle_changed;
+
+
+/**
+ * Gets the size of the arrow
+ *
+ * @private
+ * @return {number} The size of the arrow.
+ */
+InfoBubble.prototype.getArrowSize_ = function() {
+ return parseInt(this.get('arrowSize'), 10) || 0;
+};
+
+
+/**
+ * Sets the size of the arrow
+ *
+ * @param {number} size The size of the arrow.
+ */
+InfoBubble.prototype.setArrowSize = function(size) {
+ this.set('arrowSize', size);
+};
+InfoBubble.prototype['setArrowSize'] =
+ InfoBubble.prototype.setArrowSize;
+
+
+/**
+ * Arrow size changed MVC callback
+ */
+InfoBubble.prototype.arrowSize_changed = function() {
+ this.borderWidth_changed();
+};
+InfoBubble.prototype['arrowSize_changed'] =
+ InfoBubble.prototype.arrowSize_changed;
+
+
+/**
+ * Set the position of the InfoBubble arrow
+ *
+ * @param {number} pos The position to set.
+ */
+InfoBubble.prototype.setArrowPosition = function(pos) {
+ this.set('arrowPosition', pos);
+};
+InfoBubble.prototype['setArrowPosition'] =
+ InfoBubble.prototype.setArrowPosition;
+
+
+/**
+ * Get the position of the InfoBubble arrow
+ *
+ * @private
+ * @return {number} The position..
+ */
+InfoBubble.prototype.getArrowPosition_ = function() {
+ return parseInt(this.get('arrowPosition'), 10) || 0;
+};
+
+
+/**
+ * arrowPosition changed MVC callback
+ */
+InfoBubble.prototype.arrowPosition_changed = function() {
+ var pos = this.getArrowPosition_();
+ this.arrowOuter_.style['left'] = this.arrowInner_.style['left'] = pos + '%';
+
+ this.redraw_();
+};
+InfoBubble.prototype['arrowPosition_changed'] =
+ InfoBubble.prototype.arrowPosition_changed;
+
+
+/**
+ * Set the zIndex of the InfoBubble
+ *
+ * @param {number} zIndex The zIndex to set.
+ */
+InfoBubble.prototype.setZIndex = function(zIndex) {
+ this.set('zIndex', zIndex);
+};
+InfoBubble.prototype['setZIndex'] = InfoBubble.prototype.setZIndex;
+
+
+/**
+ * Get the zIndex of the InfoBubble
+ *
+ * @return {number} The zIndex to set.
+ */
+InfoBubble.prototype.getZIndex = function() {
+ return parseInt(this.get('zIndex'), 10) || this.baseZIndex_;
+};
+
+
+/**
+ * zIndex changed MVC callback
+ */
+InfoBubble.prototype.zIndex_changed = function() {
+ var zIndex = this.getZIndex();
+
+ this.bubble_.style['zIndex'] = this.baseZIndex_ = zIndex;
+ this.close_.style['zIndex'] = zIndex + 1;
+};
+InfoBubble.prototype['zIndex_changed'] = InfoBubble.prototype.zIndex_changed;
+
+
+/**
+ * Set the style of the shadow
+ *
+ * @param {number} shadowStyle The style of the shadow.
+ */
+InfoBubble.prototype.setShadowStyle = function(shadowStyle) {
+ this.set('shadowStyle', shadowStyle);
+};
+InfoBubble.prototype['setShadowStyle'] = InfoBubble.prototype.setShadowStyle;
+
+
+/**
+ * Get the style of the shadow
+ *
+ * @private
+ * @return {number} The style of the shadow.
+ */
+InfoBubble.prototype.getShadowStyle_ = function() {
+ return parseInt(this.get('shadowStyle'), 10) || 0;
+};
+
+
+/**
+ * shadowStyle changed MVC callback
+ */
+InfoBubble.prototype.shadowStyle_changed = function() {
+ var shadowStyle = this.getShadowStyle_();
+
+ var display = '';
+ var shadow = '';
+ var backgroundColor = '';
+ switch (shadowStyle) {
+ case 0:
+ display = 'none';
+ break;
+ case 1:
+ shadow = '40px 15px 10px rgba(33,33,33,0.3)';
+ backgroundColor = 'transparent';
+ break;
+ case 2:
+ shadow = '0 0 2px rgba(33,33,33,0.3)';
+ backgroundColor = 'rgba(33,33,33,0.35)';
+ break;
+ }
+ this.bubbleShadow_.style['boxShadow'] =
+ this.bubbleShadow_.style['webkitBoxShadow'] =
+ this.bubbleShadow_.style['MozBoxShadow'] = shadow;
+ this.bubbleShadow_.style['backgroundColor'] = backgroundColor;
+ if (this.isOpen_) {
+ this.bubbleShadow_.style['display'] = display;
+ this.draw();
+ }
+};
+InfoBubble.prototype['shadowStyle_changed'] =
+ InfoBubble.prototype.shadowStyle_changed;
+
+
+/**
+ * Show the close button
+ */
+InfoBubble.prototype.showCloseButton = function() {
+ this.set('hideCloseButton', false);
+};
+InfoBubble.prototype['showCloseButton'] = InfoBubble.prototype.showCloseButton;
+
+
+/**
+ * Hide the close button
+ */
+InfoBubble.prototype.hideCloseButton = function() {
+ this.set('hideCloseButton', true);
+};
+InfoBubble.prototype['hideCloseButton'] = InfoBubble.prototype.hideCloseButton;
+
+
+/**
+ * hideCloseButton changed MVC callback
+ */
+InfoBubble.prototype.hideCloseButton_changed = function() {
+ this.close_.style['display'] = this.get('hideCloseButton') ? 'none' : '';
+};
+InfoBubble.prototype['hideCloseButton_changed'] =
+ InfoBubble.prototype.hideCloseButton_changed;
+
+
+/**
+ * Set the background color
+ *
+ * @param {string} color The color to set.
+ */
+InfoBubble.prototype.setBackgroundColor = function(color) {
+ if (color) {
+ this.set('backgroundColor', color);
+ }
+};
+InfoBubble.prototype['setBackgroundColor'] =
+ InfoBubble.prototype.setBackgroundColor;
+
+
+/**
+ * backgroundColor changed MVC callback
+ */
+InfoBubble.prototype.backgroundColor_changed = function() {
+ var backgroundColor = this.get('backgroundColor');
+ this.contentContainer_.style['backgroundColor'] = backgroundColor;
+
+ this.arrowInner_.style['borderColor'] = backgroundColor +
+ ' transparent transparent';
+ this.updateTabStyles_();
+};
+InfoBubble.prototype['backgroundColor_changed'] =
+ InfoBubble.prototype.backgroundColor_changed;
+
+
+/**
+ * Set the border color
+ *
+ * @param {string} color The border color.
+ */
+InfoBubble.prototype.setBorderColor = function(color) {
+ if (color) {
+ this.set('borderColor', color);
+ }
+};
+InfoBubble.prototype['setBorderColor'] = InfoBubble.prototype.setBorderColor;
+
+
+/**
+ * borderColor changed MVC callback
+ */
+InfoBubble.prototype.borderColor_changed = function() {
+ var borderColor = this.get('borderColor');
+
+ var contentContainer = this.contentContainer_;
+ var arrowOuter = this.arrowOuter_;
+ contentContainer.style['borderColor'] = borderColor;
+
+ arrowOuter.style['borderColor'] = borderColor +
+ ' transparent transparent';
+
+ contentContainer.style['borderStyle'] =
+ arrowOuter.style['borderStyle'] =
+ this.arrowInner_.style['borderStyle'] = 'solid';
+
+ this.updateTabStyles_();
+};
+InfoBubble.prototype['borderColor_changed'] =
+ InfoBubble.prototype.borderColor_changed;
+
+
+/**
+ * Set the radius of the border
+ *
+ * @param {number} radius The radius of the border.
+ */
+InfoBubble.prototype.setBorderRadius = function(radius) {
+ this.set('borderRadius', radius);
+};
+InfoBubble.prototype['setBorderRadius'] = InfoBubble.prototype.setBorderRadius;
+
+
+/**
+ * Get the radius of the border
+ *
+ * @private
+ * @return {number} The radius of the border.
+ */
+InfoBubble.prototype.getBorderRadius_ = function() {
+ return parseInt(this.get('borderRadius'), 10) || 0;
+};
+
+
+/**
+ * borderRadius changed MVC callback
+ */
+InfoBubble.prototype.borderRadius_changed = function() {
+ var borderRadius = this.getBorderRadius_();
+ var borderWidth = this.getBorderWidth_();
+
+ this.contentContainer_.style['borderRadius'] =
+ this.contentContainer_.style['MozBorderRadius'] =
+ this.contentContainer_.style['webkitBorderRadius'] =
+ this.bubbleShadow_.style['borderRadius'] =
+ this.bubbleShadow_.style['MozBorderRadius'] =
+ this.bubbleShadow_.style['webkitBorderRadius'] = this.px(borderRadius);
+
+ this.tabsContainer_.style['paddingLeft'] =
+ this.tabsContainer_.style['paddingRight'] =
+ this.px(borderRadius + borderWidth);
+
+ this.redraw_();
+};
+InfoBubble.prototype['borderRadius_changed'] =
+ InfoBubble.prototype.borderRadius_changed;
+
+
+/**
+ * Get the width of the border
+ *
+ * @private
+ * @return {number} width The width of the border.
+ */
+InfoBubble.prototype.getBorderWidth_ = function() {
+ return parseInt(this.get('borderWidth'), 10) || 0;
+};
+
+
+/**
+ * Set the width of the border
+ *
+ * @param {number} width The width of the border.
+ */
+InfoBubble.prototype.setBorderWidth = function(width) {
+ this.set('borderWidth', width);
+};
+InfoBubble.prototype['setBorderWidth'] = InfoBubble.prototype.setBorderWidth;
+
+
+/**
+ * borderWidth change MVC callback
+ */
+InfoBubble.prototype.borderWidth_changed = function() {
+ var borderWidth = this.getBorderWidth_();
+
+ this.contentContainer_.style['borderWidth'] = this.px(borderWidth);
+ this.tabsContainer_.style['top'] = this.px(borderWidth);
+
+ this.updateArrowStyle_();
+ this.updateTabStyles_();
+ this.borderRadius_changed();
+ this.redraw_();
+};
+InfoBubble.prototype['borderWidth_changed'] =
+ InfoBubble.prototype.borderWidth_changed;
+
+
+/**
+ * Update the arrow style
+ * @private
+ */
+InfoBubble.prototype.updateArrowStyle_ = function() {
+ var borderWidth = this.getBorderWidth_();
+ var arrowSize = this.getArrowSize_();
+ var arrowStyle = this.getArrowStyle_();
+ var arrowOuterSizePx = this.px(arrowSize);
+ var arrowInnerSizePx = this.px(Math.max(0, arrowSize - borderWidth));
+
+ var outer = this.arrowOuter_;
+ var inner = this.arrowInner_;
+
+ this.arrow_.style['marginTop'] = this.px(-borderWidth);
+ outer.style['borderTopWidth'] = arrowOuterSizePx;
+ inner.style['borderTopWidth'] = arrowInnerSizePx;
+
+ // Full arrow or arrow pointing to the left
+ if (arrowStyle == 0 || arrowStyle == 1) {
+ outer.style['borderLeftWidth'] = arrowOuterSizePx;
+ inner.style['borderLeftWidth'] = arrowInnerSizePx;
+ } else {
+ outer.style['borderLeftWidth'] = inner.style['borderLeftWidth'] = 0;
+ }
+
+ // Full arrow or arrow pointing to the right
+ if (arrowStyle == 0 || arrowStyle == 2) {
+ outer.style['borderRightWidth'] = arrowOuterSizePx;
+ inner.style['borderRightWidth'] = arrowInnerSizePx;
+ } else {
+ outer.style['borderRightWidth'] = inner.style['borderRightWidth'] = 0;
+ }
+
+ if (arrowStyle < 2) {
+ outer.style['marginLeft'] = this.px(-(arrowSize));
+ inner.style['marginLeft'] = this.px(-(arrowSize - borderWidth));
+ } else {
+ outer.style['marginLeft'] = inner.style['marginLeft'] = 0;
+ }
+
+ // If there is no border then don't show thw outer arrow
+ if (borderWidth == 0) {
+ outer.style['display'] = 'none';
+ } else {
+ outer.style['display'] = '';
+ }
+};
+
+
+/**
+ * Set the padding of the InfoBubble
+ *
+ * @param {number} padding The padding to apply.
+ */
+InfoBubble.prototype.setPadding = function(padding) {
+ this.set('padding', padding);
+};
+InfoBubble.prototype['setPadding'] = InfoBubble.prototype.setPadding;
+
+
+/**
+ * Set the padding of the InfoBubble
+ *
+ * @private
+ * @return {number} padding The padding to apply.
+ */
+InfoBubble.prototype.getPadding_ = function() {
+ return parseInt(this.get('padding'), 10) || 0;
+};
+
+
+/**
+ * padding changed MVC callback
+ */
+InfoBubble.prototype.padding_changed = function() {
+ var padding = this.getPadding_();
+ this.contentContainer_.style['padding'] = this.px(padding);
+ this.updateTabStyles_();
+
+ this.redraw_();
+};
+InfoBubble.prototype['padding_changed'] = InfoBubble.prototype.padding_changed;
+
+
+/**
+ * Add px extention to the number
+ *
+ * @param {number} num The number to wrap.
+ * @return {string|number} A wrapped number.
+ */
+InfoBubble.prototype.px = function(num) {
+ if (num) {
+ // 0 doesn't need to be wrapped
+ return num + 'px';
+ }
+ return num;
+};
+
+
+/**
+ * Add events to stop propagation
+ * @private
+ */
+InfoBubble.prototype.addEvents_ = function() {
+ // We want to cancel all the events so they do not go to the map
+ var events = ['mousedown', 'mousemove', 'mouseover', 'mouseout', 'mouseup',
+ 'mousewheel', 'DOMMouseScroll', 'touchstart', 'touchend', 'touchmove',
+ 'dblclick', 'contextmenu', 'click'];
+
+ var bubble = this.bubble_;
+ this.listeners_ = [];
+ for (var i = 0, event; event = events[i]; i++) {
+ this.listeners_.push(
+ google.maps.event.addDomListener(bubble, event, function(e) {
+ e.cancelBubble = true;
+ if (e.stopPropagation) {
+ e.stopPropagation();
+ }
+ })
+ );
+ }
+};
+
+
+/**
+ * On Adding the InfoBubble to a map
+ * Implementing the OverlayView interface
+ */
+InfoBubble.prototype.onAdd = function() {
+ if (!this.bubble_) {
+ this.buildDom_();
+ }
+
+ this.addEvents_();
+
+ var panes = this.getPanes();
+ if (panes) {
+ panes.floatPane.appendChild(this.bubble_);
+ panes.floatShadow.appendChild(this.bubbleShadow_);
+ }
+};
+InfoBubble.prototype['onAdd'] = InfoBubble.prototype.onAdd;
+
+
+/**
+ * Draw the InfoBubble
+ * Implementing the OverlayView interface
+ */
+InfoBubble.prototype.draw = function() {
+ var projection = this.getProjection();
+
+ if (!projection) {
+ // The map projection is not ready yet so do nothing
+ return;
+ }
+
+ var latLng = /** @type {google.maps.LatLng} */ (this.get('position'));
+
+ if (!latLng) {
+ this.close();
+ return;
+ }
+
+ var tabHeight = 0;
+
+ if (this.activeTab_) {
+ tabHeight = this.activeTab_.offsetHeight;
+ }
+
+ var anchorHeight = this.getAnchorHeight_();
+ var arrowSize = this.getArrowSize_();
+ var arrowPosition = this.getArrowPosition_();
+
+ arrowPosition = arrowPosition / 100;
+
+ var pos = projection.fromLatLngToDivPixel(latLng);
+ var width = this.contentContainer_.offsetWidth;
+ var height = this.bubble_.offsetHeight;
+
+ if (!width) {
+ return;
+ }
+
+ // Adjust for the height of the info bubble
+ var top = pos.y - (height + arrowSize);
+
+ if (anchorHeight) {
+ // If there is an anchor then include the height
+ top -= anchorHeight;
+ }
+
+ var left = pos.x - (width * arrowPosition);
+
+ this.bubble_.style['top'] = this.px(top);
+ this.bubble_.style['left'] = this.px(left);
+
+ var shadowStyle = parseInt(this.get('shadowStyle'), 10);
+
+ switch (shadowStyle) {
+ case 1:
+ // Shadow is behind
+ this.bubbleShadow_.style['top'] = this.px(top + tabHeight - 1);
+ this.bubbleShadow_.style['left'] = this.px(left);
+ this.bubbleShadow_.style['width'] = this.px(width);
+ this.bubbleShadow_.style['height'] =
+ this.px(this.contentContainer_.offsetHeight - arrowSize);
+ break;
+ case 2:
+ // Shadow is below
+ width = width * 0.8;
+ if (anchorHeight) {
+ this.bubbleShadow_.style['top'] = this.px(pos.y);
+ } else {
+ this.bubbleShadow_.style['top'] = this.px(pos.y + arrowSize);
+ }
+ this.bubbleShadow_.style['left'] = this.px(pos.x - width * arrowPosition);
+
+ this.bubbleShadow_.style['width'] = this.px(width);
+ this.bubbleShadow_.style['height'] = this.px(2);
+ break;
+ }
+};
+InfoBubble.prototype['draw'] = InfoBubble.prototype.draw;
+
+
+/**
+ * Removing the InfoBubble from a map
+ */
+InfoBubble.prototype.onRemove = function() {
+ if (this.bubble_ && this.bubble_.parentNode) {
+ this.bubble_.parentNode.removeChild(this.bubble_);
+ }
+ if (this.bubbleShadow_ && this.bubbleShadow_.parentNode) {
+ this.bubbleShadow_.parentNode.removeChild(this.bubbleShadow_);
+ }
+
+ for (var i = 0, listener; listener = this.listeners_[i]; i++) {
+ google.maps.event.removeListener(listener);
+ }
+};
+InfoBubble.prototype['onRemove'] = InfoBubble.prototype.onRemove;
+
+
+/**
+ * Is the InfoBubble open
+ *
+ * @return {boolean} If the InfoBubble is open.
+ */
+InfoBubble.prototype.isOpen = function() {
+ return this.isOpen_;
+};
+InfoBubble.prototype['isOpen'] = InfoBubble.prototype.isOpen;
+
+
+/**
+ * Close the InfoBubble
+ */
+InfoBubble.prototype.close = function() {
+ if (this.bubble_) {
+ this.bubble_.style['display'] = 'none';
+ // Remove the animation so we next time it opens it will animate again
+ this.bubble_.className =
+ this.bubble_.className.replace(this.animationName_, '');
+ }
+
+ if (this.bubbleShadow_) {
+ this.bubbleShadow_.style['display'] = 'none';
+ this.bubbleShadow_.className =
+ this.bubbleShadow_.className.replace(this.animationName_, '');
+ }
+ this.isOpen_ = false;
+};
+InfoBubble.prototype['close'] = InfoBubble.prototype.close;
+
+
+/**
+ * Open the InfoBubble (asynchronous).
+ *
+ * @param {google.maps.Map=} opt_map Optional map to open on.
+ * @param {google.maps.MVCObject=} opt_anchor Optional anchor to position at.
+ */
+InfoBubble.prototype.open = function(opt_map, opt_anchor) {
+ var that = this;
+ window.setTimeout(function() {
+ that.open_(opt_map, opt_anchor);
+ }, 0);
+};
+
+/**
+ * Open the InfoBubble
+ * @private
+ * @param {google.maps.Map=} opt_map Optional map to open on.
+ * @param {google.maps.MVCObject=} opt_anchor Optional anchor to position at.
+ */
+InfoBubble.prototype.open_ = function(opt_map, opt_anchor) {
+ this.updateContent_();
+
+ if (opt_map) {
+ this.setMap(opt_map);
+ }
+
+ if (opt_anchor) {
+ this.set('anchor', opt_anchor);
+ this.bindTo('anchorPoint', opt_anchor);
+ this.bindTo('position', opt_anchor);
+ }
+
+ // Show the bubble and the show
+ this.bubble_.style['display'] = this.bubbleShadow_.style['display'] = '';
+ var animation = !this.get('disableAnimation');
+
+ if (animation) {
+ // Add the animation
+ this.bubble_.className += ' ' + this.animationName_;
+ this.bubbleShadow_.className += ' ' + this.animationName_;
+ }
+
+ this.redraw_();
+ this.isOpen_ = true;
+
+ var pan = !this.get('disableAutoPan');
+ if (pan) {
+ var that = this;
+ window.setTimeout(function() {
+ // Pan into view, done in a time out to make it feel nicer :)
+ that.panToView();
+ }, 200);
+ }
+};
+InfoBubble.prototype['open'] = InfoBubble.prototype.open;
+
+
+/**
+ * Set the position of the InfoBubble
+ *
+ * @param {google.maps.LatLng} position The position to set.
+ */
+InfoBubble.prototype.setPosition = function(position) {
+ if (position) {
+ this.set('position', position);
+ }
+};
+InfoBubble.prototype['setPosition'] = InfoBubble.prototype.setPosition;
+
+
+/**
+ * Returns the position of the InfoBubble
+ *
+ * @return {google.maps.LatLng} the position.
+ */
+InfoBubble.prototype.getPosition = function() {
+ return /** @type {google.maps.LatLng} */ (this.get('position'));
+};
+InfoBubble.prototype['getPosition'] = InfoBubble.prototype.getPosition;
+
+
+/**
+ * position changed MVC callback
+ */
+InfoBubble.prototype.position_changed = function() {
+ this.draw();
+};
+InfoBubble.prototype['position_changed'] =
+ InfoBubble.prototype.position_changed;
+
+
+/**
+ * Pan the InfoBubble into view
+ */
+InfoBubble.prototype.panToView = function() {
+ var projection = this.getProjection();
+
+ if (!projection) {
+ // The map projection is not ready yet so do nothing
+ return;
+ }
+
+ if (!this.bubble_) {
+ // No Bubble yet so do nothing
+ return;
+ }
+
+ var anchorHeight = this.getAnchorHeight_();
+ var height = this.bubble_.offsetHeight + anchorHeight;
+ var map = this.get('map');
+ var mapDiv = map.getDiv();
+ var mapHeight = mapDiv.offsetHeight;
+
+ var latLng = this.getPosition();
+ var centerPos = projection.fromLatLngToContainerPixel(map.getCenter());
+ var pos = projection.fromLatLngToContainerPixel(latLng);
+
+ // Find out how much space at the top is free
+ var spaceTop = centerPos.y - height;
+
+ // Fine out how much space at the bottom is free
+ var spaceBottom = mapHeight - centerPos.y;
+
+ var needsTop = spaceTop < 0;
+ var deltaY = 0;
+
+ if (needsTop) {
+ spaceTop *= -1;
+ deltaY = (spaceTop + spaceBottom) / 2;
+ }
+
+ pos.y -= deltaY;
+ latLng = projection.fromContainerPixelToLatLng(pos);
+
+ if (map.getCenter() != latLng) {
+ map.panTo(latLng);
+ }
+};
+InfoBubble.prototype['panToView'] = InfoBubble.prototype.panToView;
+
+
+/**
+ * Converts a HTML string to a document fragment.
+ *
+ * @param {string} htmlString The HTML string to convert.
+ * @return {Node} A HTML document fragment.
+ * @private
+ */
+InfoBubble.prototype.htmlToDocumentFragment_ = function(htmlString) {
+ htmlString = htmlString.replace(/^\s*([\S\s]*)\b\s*$/, '$1');
+ var tempDiv = document.createElement('DIV');
+ tempDiv.innerHTML = htmlString;
+ if (tempDiv.childNodes.length == 1) {
+ return /** @type {!Node} */ (tempDiv.removeChild(tempDiv.firstChild));
+ } else {
+ var fragment = document.createDocumentFragment();
+ while (tempDiv.firstChild) {
+ fragment.appendChild(tempDiv.firstChild);
+ }
+ return fragment;
+ }
+};
+
+
+/**
+ * Removes all children from the node.
+ *
+ * @param {Node} node The node to remove all children from.
+ * @private
+ */
+InfoBubble.prototype.removeChildren_ = function(node) {
+ if (!node) {
+ return;
+ }
+
+ var child;
+ while (child = node.firstChild) {
+ node.removeChild(child);
+ }
+};
+
+
+/**
+ * Sets the content of the infobubble.
+ *
+ * @param {string|Node} content The content to set.
+ */
+InfoBubble.prototype.setContent = function(content) {
+ this.set('content', content);
+};
+InfoBubble.prototype['setContent'] = InfoBubble.prototype.setContent;
+
+
+/**
+ * Get the content of the infobubble.
+ *
+ * @return {string|Node} The marker content.
+ */
+InfoBubble.prototype.getContent = function() {
+ return /** @type {Node|string} */ (this.get('content'));
+};
+InfoBubble.prototype['getContent'] = InfoBubble.prototype.getContent;
+
+
+/**
+ * Sets the marker content and adds loading events to images
+ */
+InfoBubble.prototype.updateContent_ = function() {
+ if (!this.content_) {
+ // The Content area doesnt exist.
+ return;
+ }
+
+ this.removeChildren_(this.content_);
+ var content = this.getContent();
+ if (content) {
+ if (typeof content == 'string') {
+ content = this.htmlToDocumentFragment_(content);
+ }
+ this.content_.appendChild(content);
+
+ var that = this;
+ var images = this.content_.getElementsByTagName('IMG');
+ for (var i = 0, image; image = images[i]; i++) {
+ // Because we don't know the size of an image till it loads, add a
+ // listener to the image load so the marker can resize and reposition
+ // itself to be the correct height.
+ google.maps.event.addDomListener(image, 'load', function() {
+ that.imageLoaded_();
+ });
+ }
+ google.maps.event.trigger(this, 'domready');
+ }
+ this.redraw_();
+};
+
+/**
+ * Image loaded
+ * @private
+ */
+InfoBubble.prototype.imageLoaded_ = function() {
+ var pan = !this.get('disableAutoPan');
+ this.redraw_();
+ if (pan && (this.tabs_.length == 0 || this.activeTab_.index == 0)) {
+ this.panToView();
+ }
+};
+
+/**
+ * Updates the styles of the tabs
+ * @private
+ */
+InfoBubble.prototype.updateTabStyles_ = function() {
+ if (this.tabs_ && this.tabs_.length) {
+ for (var i = 0, tab; tab = this.tabs_[i]; i++) {
+ this.setTabStyle_(tab.tab);
+ }
+ this.activeTab_.style['zIndex'] = this.baseZIndex_;
+ var borderWidth = this.getBorderWidth_();
+ var padding = this.getPadding_() / 2;
+ this.activeTab_.style['borderBottomWidth'] = 0;
+ this.activeTab_.style['paddingBottom'] = this.px(padding + borderWidth);
+ }
+};
+
+
+/**
+ * Sets the style of a tab
+ * @private
+ * @param {Element} tab The tab to style.
+ */
+InfoBubble.prototype.setTabStyle_ = function(tab) {
+ var backgroundColor = this.get('backgroundColor');
+ var borderColor = this.get('borderColor');
+ var borderRadius = this.getBorderRadius_();
+ var borderWidth = this.getBorderWidth_();
+ var padding = this.getPadding_();
+
+ var marginRight = this.px(-(Math.max(padding, borderRadius)));
+ var borderRadiusPx = this.px(borderRadius);
+
+ var index = this.baseZIndex_;
+ if (tab.index) {
+ index -= tab.index;
+ }
+
+ // The styles for the tab
+ var styles = {
+ 'cssFloat': 'left',
+ 'position': 'relative',
+ 'cursor': 'pointer',
+ 'backgroundColor': backgroundColor,
+ 'border': this.px(borderWidth) + ' solid ' + borderColor,
+ 'padding': this.px(padding / 2) + ' ' + this.px(padding),
+ 'marginRight': marginRight,
+ 'whiteSpace': 'nowrap',
+ 'borderRadiusTopLeft': borderRadiusPx,
+ 'MozBorderRadiusTopleft': borderRadiusPx,
+ 'webkitBorderTopLeftRadius': borderRadiusPx,
+ 'borderRadiusTopRight': borderRadiusPx,
+ 'MozBorderRadiusTopright': borderRadiusPx,
+ 'webkitBorderTopRightRadius': borderRadiusPx,
+ 'zIndex': index,
+ 'display': 'inline'
+ };
+
+ for (var style in styles) {
+ tab.style[style] = styles[style];
+ }
+
+ var className = this.get('tabClassName');
+ if (className != undefined) {
+ tab.className += ' ' + className;
+ }
+};
+
+
+/**
+ * Add user actions to a tab
+ * @private
+ * @param {Object} tab The tab to add the actions to.
+ */
+InfoBubble.prototype.addTabActions_ = function(tab) {
+ var that = this;
+ tab.listener_ = google.maps.event.addDomListener(tab, 'click', function() {
+ that.setTabActive_(this);
+ });
+};
+
+
+/**
+ * Set a tab at a index to be active
+ *
+ * @param {number} index The index of the tab.
+ */
+InfoBubble.prototype.setTabActive = function(index) {
+ var tab = this.tabs_[index - 1];
+
+ if (tab) {
+ this.setTabActive_(tab.tab);
+ }
+};
+InfoBubble.prototype['setTabActive'] = InfoBubble.prototype.setTabActive;
+
+
+/**
+ * Set a tab to be active
+ * @private
+ * @param {Object} tab The tab to set active.
+ */
+InfoBubble.prototype.setTabActive_ = function(tab) {
+ if (!tab) {
+ this.setContent('');
+ this.updateContent_();
+ return;
+ }
+
+ var padding = this.getPadding_() / 2;
+ var borderWidth = this.getBorderWidth_();
+
+ if (this.activeTab_) {
+ var activeTab = this.activeTab_;
+ activeTab.style['zIndex'] = this.baseZIndex_ - activeTab.index;
+ activeTab.style['paddingBottom'] = this.px(padding);
+ activeTab.style['borderBottomWidth'] = this.px(borderWidth);
+ }
+
+ tab.style['zIndex'] = this.baseZIndex_;
+ tab.style['borderBottomWidth'] = 0;
+ tab.style['marginBottomWidth'] = '-10px';
+ tab.style['paddingBottom'] = this.px(padding + borderWidth);
+
+ this.setContent(this.tabs_[tab.index].content);
+ this.updateContent_();
+
+ this.activeTab_ = tab;
+
+ this.redraw_();
+};
+
+
+/**
+ * Set the max width of the InfoBubble
+ *
+ * @param {number} width The max width.
+ */
+InfoBubble.prototype.setMaxWidth = function(width) {
+ this.set('maxWidth', width);
+};
+InfoBubble.prototype['setMaxWidth'] = InfoBubble.prototype.setMaxWidth;
+
+
+/**
+ * maxWidth changed MVC callback
+ */
+InfoBubble.prototype.maxWidth_changed = function() {
+ this.redraw_();
+};
+InfoBubble.prototype['maxWidth_changed'] =
+ InfoBubble.prototype.maxWidth_changed;
+
+
+/**
+ * Set the max height of the InfoBubble
+ *
+ * @param {number} height The max height.
+ */
+InfoBubble.prototype.setMaxHeight = function(height) {
+ this.set('maxHeight', height);
+};
+InfoBubble.prototype['setMaxHeight'] = InfoBubble.prototype.setMaxHeight;
+
+
+/**
+ * maxHeight changed MVC callback
+ */
+InfoBubble.prototype.maxHeight_changed = function() {
+ this.redraw_();
+};
+InfoBubble.prototype['maxHeight_changed'] =
+ InfoBubble.prototype.maxHeight_changed;
+
+
+/**
+ * Set the min width of the InfoBubble
+ *
+ * @param {number} width The min width.
+ */
+InfoBubble.prototype.setMinWidth = function(width) {
+ this.set('minWidth', width);
+};
+InfoBubble.prototype['setMinWidth'] = InfoBubble.prototype.setMinWidth;
+
+
+/**
+ * minWidth changed MVC callback
+ */
+InfoBubble.prototype.minWidth_changed = function() {
+ this.redraw_();
+};
+InfoBubble.prototype['minWidth_changed'] =
+ InfoBubble.prototype.minWidth_changed;
+
+
+/**
+ * Set the min height of the InfoBubble
+ *
+ * @param {number} height The min height.
+ */
+InfoBubble.prototype.setMinHeight = function(height) {
+ this.set('minHeight', height);
+};
+InfoBubble.prototype['setMinHeight'] = InfoBubble.prototype.setMinHeight;
+
+
+/**
+ * minHeight changed MVC callback
+ */
+InfoBubble.prototype.minHeight_changed = function() {
+ this.redraw_();
+};
+InfoBubble.prototype['minHeight_changed'] =
+ InfoBubble.prototype.minHeight_changed;
+
+
+/**
+ * Add a tab
+ *
+ * @param {string} label The label of the tab.
+ * @param {string|Element} content The content of the tab.
+ */
+InfoBubble.prototype.addTab = function(label, content) {
+ var tab = document.createElement('DIV');
+ tab.innerHTML = label;
+
+ this.setTabStyle_(tab);
+ this.addTabActions_(tab);
+
+ this.tabsContainer_.appendChild(tab);
+
+ this.tabs_.push({
+ label: label,
+ content: content,
+ tab: tab
+ });
+
+ tab.index = this.tabs_.length - 1;
+ tab.style['zIndex'] = this.baseZIndex_ - tab.index;
+
+ if (!this.activeTab_) {
+ this.setTabActive_(tab);
+ }
+
+ tab.className = tab.className; // + ' ' + this.animationName_; get rid of annoying animation on tabs
+
+ this.redraw_();
+};
+InfoBubble.prototype['addTab'] = InfoBubble.prototype.addTab;
+
+/**
+ * Update a tab at a speicifc index
+ *
+ * @param {number} index The index of the tab.
+ * @param {?string} opt_label The label to change to.
+ * @param {?string} opt_content The content to update to.
+ */
+InfoBubble.prototype.updateTab = function(index, opt_label, opt_content) {
+ if (!this.tabs_.length || index < 0 || index >= this.tabs_.length) {
+ return;
+ }
+
+ var tab = this.tabs_[index];
+ if (opt_label != undefined) {
+ tab.tab.innerHTML = tab.label = opt_label;
+ }
+
+ if (opt_content != undefined) {
+ tab.content = opt_content;
+ }
+
+ if (this.activeTab_ == tab.tab) {
+ this.setContent(tab.content);
+ this.updateContent_();
+ }
+ this.redraw_();
+};
+InfoBubble.prototype['updateTab'] = InfoBubble.prototype.updateTab;
+
+
+/**
+ * Remove a tab at a specific index
+ *
+ * @param {number} index The index of the tab to remove.
+ */
+InfoBubble.prototype.removeTab = function(index) {
+ if (!this.tabs_.length || index < 0 || index >= this.tabs_.length) {
+ return;
+ }
+
+ var tab = this.tabs_[index];
+ tab.tab.parentNode.removeChild(tab.tab);
+
+ google.maps.event.removeListener(tab.tab.listener_);
+
+ this.tabs_.splice(index, 1);
+
+ delete tab;
+
+ for (var i = 0, t; t = this.tabs_[i]; i++) {
+ t.tab.index = i;
+ }
+
+ if (tab.tab == this.activeTab_) {
+ // Removing the current active tab
+ if (this.tabs_[index]) {
+ // Show the tab to the right
+ this.activeTab_ = this.tabs_[index].tab;
+ } else if (this.tabs_[index - 1]) {
+ // Show a tab to the left
+ this.activeTab_ = this.tabs_[index - 1].tab;
+ } else {
+ // No tabs left to sho
+ this.activeTab_ = undefined;
+ }
+
+ this.setTabActive_(this.activeTab_);
+ }
+
+ this.redraw_();
+};
+InfoBubble.prototype['removeTab'] = InfoBubble.prototype.removeTab;
+
+
+/**
+ * Get the size of an element
+ * @private
+ * @param {Node|string} element The element to size.
+ * @param {number=} opt_maxWidth Optional max width of the element.
+ * @param {number=} opt_maxHeight Optional max height of the element.
+ * @return {google.maps.Size} The size of the element.
+ */
+InfoBubble.prototype.getElementSize_ = function(element, opt_maxWidth,
+ opt_maxHeight) {
+ var sizer = document.createElement('DIV');
+ sizer.style['display'] = 'inline';
+ sizer.style['position'] = 'absolute';
+ sizer.style['visibility'] = 'hidden';
+
+ if (typeof element == 'string') {
+ sizer.innerHTML = element;
+ } else {
+ sizer.appendChild(element.cloneNode(true));
+ }
+
+ document.body.appendChild(sizer);
+ var size = new google.maps.Size(sizer.offsetWidth, sizer.offsetHeight);
+
+ // If the width is bigger than the max width then set the width and size again
+ if (opt_maxWidth && size.width > opt_maxWidth) {
+ sizer.style['width'] = this.px(opt_maxWidth);
+ size = new google.maps.Size(sizer.offsetWidth, sizer.offsetHeight);
+ }
+
+ // If the height is bigger than the max height then set the height and size
+ // again
+ if (opt_maxHeight && size.height > opt_maxHeight) {
+ sizer.style['height'] = this.px(opt_maxHeight);
+ size = new google.maps.Size(sizer.offsetWidth, sizer.offsetHeight);
+ }
+
+ document.body.removeChild(sizer);
+ delete sizer;
+ return size;
+};
+
+
+/**
+ * Redraw the InfoBubble
+ * @private
+ */
+InfoBubble.prototype.redraw_ = function() {
+ this.figureOutSize_();
+ this.positionCloseButton_();
+ this.draw();
+};
+
+
+/**
+ * Figure out the optimum size of the InfoBubble
+ * @private
+ */
+InfoBubble.prototype.figureOutSize_ = function() {
+ var map = this.get('map');
+
+ if (!map) {
+ return;
+ }
+
+ var padding = this.getPadding_();
+ var borderWidth = this.getBorderWidth_();
+ var borderRadius = this.getBorderRadius_();
+ var arrowSize = this.getArrowSize_();
+
+ var mapDiv = map.getDiv();
+ var gutter = arrowSize * 2;
+ var mapWidth = mapDiv.offsetWidth - gutter;
+ var mapHeight = mapDiv.offsetHeight - gutter - this.getAnchorHeight_();
+ var tabHeight = 0;
+ var width = /** @type {number} */ (this.get('minWidth') || 0);
+ var height = /** @type {number} */ (this.get('minHeight') || 0);
+ var maxWidth = /** @type {number} */ (this.get('maxWidth') || 0);
+ var maxHeight = /** @type {number} */ (this.get('maxHeight') || 0);
+
+ maxWidth = Math.min(mapWidth, maxWidth);
+ maxHeight = Math.min(mapHeight, maxHeight);
+
+ var tabWidth = 0;
+ if (this.tabs_.length) {
+ // If there are tabs then you need to check the size of each tab's content
+ for (var i = 0, tab; tab = this.tabs_[i]; i++) {
+ var tabSize = this.getElementSize_(tab.tab, maxWidth, maxHeight);
+ var contentSize = this.getElementSize_(tab.content, maxWidth, maxHeight);
+
+ if (width < tabSize.width) {
+ width = tabSize.width;
+ }
+
+ // Add up all the tab widths because they might end up being wider than
+ // the content
+ tabWidth += tabSize.width;
+
+ if (height < tabSize.height) {
+ height = tabSize.height;
+ }
+
+ if (tabSize.height > tabHeight) {
+ tabHeight = tabSize.height;
+ }
+
+ if (width < contentSize.width) {
+ width = contentSize.width;
+ }
+
+ if (height < contentSize.height) {
+ height = contentSize.height;
+ }
+ }
+ } else {
+ var content = /** @type {string|Node} */ (this.get('content'));
+ if (typeof content == 'string') {
+ content = this.htmlToDocumentFragment_(content);
+ }
+ if (content) {
+ var contentSize = this.getElementSize_(content, maxWidth, maxHeight);
+
+ if (width < contentSize.width) {
+ width = contentSize.width;
+ }
+
+ if (height < contentSize.height) {
+ height = contentSize.height;
+ }
+ }
+ }
+
+ if (maxWidth) {
+ width = Math.min(width, maxWidth);
+ }
+
+ if (maxHeight) {
+ height = Math.min(height, maxHeight);
+ }
+
+ width = Math.max(width, tabWidth);
+
+ if (width == tabWidth) {
+ width = width + 2 * padding;
+ }
+
+ arrowSize = arrowSize * 2;
+ width = Math.max(width, arrowSize);
+
+ // Maybe add this as a option so they can go bigger than the map if the user
+ // wants
+ if (width > mapWidth) {
+ width = mapWidth;
+ }
+
+ if (height > mapHeight) {
+ height = mapHeight - tabHeight;
+ }
+
+ if (this.tabsContainer_) {
+ this.tabHeight_ = tabHeight;
+ this.tabsContainer_.style['width'] = this.px(tabWidth);
+ }
+
+ this.contentContainer_.style['width'] = this.px(width);
+ this.contentContainer_.style['height'] = this.px(height);
+};
+
+
+/**
+ * Get the height of the anchor
+ *
+ * This function is a hack for now and doesn't really work that good, need to
+ * wait for pixelBounds to be correctly exposed.
+ * @private
+ * @return {number} The height of the anchor.
+ */
+InfoBubble.prototype.getAnchorHeight_ = function() {
+ var anchor = this.get('anchor');
+ if (anchor) {
+ var anchorPoint = /** @type google.maps.Point */(this.get('anchorPoint'));
+
+ if (anchorPoint) {
+ return -1 * anchorPoint.y;
+ }
+ }
+ return 0;
+};
+
+InfoBubble.prototype.anchorPoint_changed = function() {
+ this.draw();
+};
+InfoBubble.prototype['anchorPoint_changed'] = InfoBubble.prototype.anchorPoint_changed;
+
+
+/**
+ * Position the close button in the right spot.
+ * @private
+ */
+InfoBubble.prototype.positionCloseButton_ = function() {
+ var br = this.getBorderRadius_();
+ var bw = this.getBorderWidth_();
+
+ var right = 2;
+ var top = 2;
+
+ if (this.tabs_.length && this.tabHeight_) {
+ top += this.tabHeight_;
+ }
+
+ top += bw;
+ right += bw;
+
+ var c = this.contentContainer_;
+ if (c && c.clientHeight < c.scrollHeight) {
+ // If there are scrollbars then move the cross in so it is not over
+ // scrollbar
+ right += 15;
+ }
+
+ this.close_.style['right'] = this.px(right);
+ this.close_.style['top'] = this.px(top);
+};
diff --git a/loadTable.php b/loadTable.php
new file mode 100755
index 0000000..5497522
--- /dev/null
+++ b/loadTable.php
@@ -0,0 +1,30 @@
+<?php
+include 'config.php';
+
+mysql_connect($host, $login, $pword) or die(mysql_error());
+mysql_select_db($db) or die(mysql_error());
+
+$table= $_GET["table"];
+
+$query="SELECT * FROM ".$table;
+$result = mysql_query($query);
+
+#http://stackoverflow.com/questions/1567758/best-way-to-use-jquerys-ajax-function-retrieve-variables-from-a-php-script
+
+$n=mysql_numrows($result);
+$i=0;
+$markers=array();
+while ($i < $n) {
+ $T=mysql_fetch_array($result, MYSQL_ASSOC);
+ if (array_key_exists("id",$T)) {
+ $markers[$table][$T["id"]]=$T;
+ }
+ else {
+ $markers[$table][$i]=$T;
+ }
+ $i+=1;
+}
+mysql_close();
+
+echo(json_encode($markers));
+?>
diff --git a/map.js b/map.js
new file mode 100755
index 0000000..748e9ae
--- /dev/null
+++ b/map.js
@@ -0,0 +1,682 @@
+//tool to update dataase: display markers and edit positions
+//http://docs.jquery.com/Ajax/jQuery.getJSON#urldatacallback
+//nb in google maps it says "DIT" in the middle of the provost's stables
+/*
+showPlaces(type)
+showPlace(index)
+
+
+
+*/
+//------------------------------------------------------------------------globals
+var http = getHTTPObject(); //old ajax method
+var markers=[];
+var markertypes=['Building','Parking','Entrances']; //--lat/lng based tables to create markers
+var tables=[];
+var tablenames=['AZ','Lecture_theatres','Pacr','Libraries','Loops','Enabled_toilets']; //--tables reference building table
+var tablescreennames={'Lecture_theatres':"Lecture theatres",'Pacr':"Public access computer rooms",'Libraries':"Libraries",'Loops':"Hearing aid looops",'Enabled_toilets':"Enabled toilets"};
+var icontypes=['Loops','Enabled_toilets'];
+var places=[];
+var placetypes=new Array('Lecture_theatres','Libraries','Pacr');
+var screenplacetypes=new Array('Lecture theatres','Libraries','Public access computer rooms');
+for (i=0;i<placetypes.length;i++) {
+ places[placetypes[i]]=[];
+ places[placetypes[i]].screenname=screenplacetypes[i];
+}
+var popularplaces=[56,59,198];
+var popularnames=["Old Library","Campanile","Samuel Beckett Theatre"];
+var mainCampus=new G.LatLngBounds(new G.LatLng(53.34,-6.26),new G.LatLng(53.346,-6.2499));
+var show_parking_warning=true;
+var InfoWindow; //points to created infowindows
+
+var directionsService;
+var directionsDisplay;
+
+var do_menu_flag = false;
+//------------------------------------------------------------------------classes
+function place(name,building,info) {
+ //represents an entity that can appear in a menu
+ this.name=name;
+ this.building=building;
+ this.info=info;
+}
+//------------------------------------------------------------------------startup
+//NB alert doesn't work within a jquery callback but console.log does
+function onLoad() {
+ if(document.getElementById("map")) {
+ var mapOptions = {
+ center: STARTPOS,
+ zoom: 17,
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ };
+ map = new G.Map(document.getElementById("map"),mapOptions);
+ directionsService = new G.DirectionsService();
+ directionsDisplay = new G.DirectionsRenderer({Map:map});
+ //load data via ajax - chaining other loading functions
+ loadTables(tablenames);
+
+ }
+}
+function loadTables(t) {
+ t.forEach(function(table) {
+ $.getJSON("./loadTable.php","table="+table,function(d) {
+ $.each(d, function(idx,v) {
+ tables[idx]=[];
+ for (i in v) {
+ tables[idx].push(v[i]);
+ }
+ if (DEBUG) console.log("loaded table "+Object.keys(tables).length+":"+idx+","+tables[idx].length+" items");
+ if (Object.keys(tables).length==tablenames.length) loadMarkers(markertypes);
+ });
+ });
+ });
+}
+//how to know when everything is loaded via ajax and data can be processed
+function loadMarkers(m) { //---------build customised markers from a database table
+ m.forEach(function(marker) {
+ $.getJSON("./loadTable.php","table="+marker,function(d) {
+ $.each(d, function(idx,v) {
+ markers[idx]=[];
+ for (i in v) {
+ markers[idx][i]=makeMarker(v[i],idx);
+ //console.log("making "+i+": "+
+ }
+ markers[idx].visible=false;
+ if (DEBUG) console.log("loaded markers "+Object.keys(markers).length+":"+idx+","+markers[idx].length+" items");
+ if (Object.keys(markers).length==markertypes.length) {
+ prepareData();
+ do_menuchoices();
+ console.log("search:"+search_posted);
+ if (search_posted!="") onsearch(search_posted);
+ }
+ });
+ });
+ });
+}
+function makeMarker(data,type) {
+ if (DEBUG) console.log(type+":"+data['lat']+","+data['lng']); //alert doesn't work within a jquery callback but console.log does
+ var m=new G.Marker({position:new G.LatLng(data['lat'],data['lng']),map:null,draggable:EDITABLE});
+ m["type"]=type;
+ for (j in data) m[j]=data[j];
+ m.places=[];
+ m.tabVisible=false;
+ m.visible=false;
+ if (EDITABLE){
+ G.event.addListener(m,"dragend",setMarkerPosition);
+ G.event.addListener(m,"click",displayMarkerInfo);
+ if (type=="Building"&&m.google_coords==1) {
+ m.setIcon(new G.MarkerImage("http://maps.google.com/mapfiles/marker_orange.png"));
+ }
+ }
+ switch (type) {
+ case "Parking":
+ m.setIcon(new G.MarkerImage("img/marker_parking.png"));
+ break;
+ case 'Entrances':
+ m.setIcon(new G.MarkerImage("img/marker_entrance.png"));
+ break;
+ case 'Loops':
+ m.setIcon(new G.MarkerImage("img/marker_loop.png"));
+ break;
+ case 'Enabled_toilets':
+ m.setIcon(new G.MarkerImage("img/marker_accessible_toilet.png"));
+ break;
+ case 'Ramps':
+ m.setIcon(new G.MarkerImage("img/marker_ramp.png"));
+ break;
+ default:
+ break;
+ }
+ m.setShadow(new G.MarkerImage("img/marker_shadow.png",new G.Size(30,30),new G.Point(0,0),new G.Point(6,29)));
+ if (type=="Building") {
+ m.sortPlaces=function() {m.places.sort(function(a,b) {if (a.name<b.name) return -1; else return 1; }); }
+ m.show = function (tab){
+ if (!this.visible) {
+ this.dispphoto=httpexists("./photos/small/"+this.id+".jpg");
+ if (this.places.length>1||this.description) { //multi-tab
+ this.showtab = function() {
+ purgeInfoWindow();
+ InfoWindow=new InfoBubble({disableAnimation:true});
+ InfoWindow.addTab('Building',this.getPlacesTab());
+ InfoWindow.addTab('More',this.getInfoTab());
+ InfoWindow.open(map,this);
+ this.tabVisible=true;
+ }
+ } //single tab
+ else {
+ this.showtab = function() {
+ purgeInfoWindow();
+ InfoWindow=new InfoBubble({content:this.getPlacesTab(),disableAnimation:true});;
+ InfoWindow.open(map,this);
+ this.tabVisible=true;
+ }
+ }
+ G.event.addListener(this,"click",this.showtab);
+ this.setMap(map);
+ var boundscheck=map.getBounds();
+ if ((!boundscheck.contains(this.getPosition()))&&this.type=="Building") //only zoom to accomodate buildings
+ {
+ boundscheck.extend(this.getPosition());
+ var newzoom = getZoomByBounds( map, boundscheck );
+ map.setZoom(newzoom);
+ map.setCenter(boundscheck.getCenter());
+
+ }
+ this.visible=true;
+ }
+ if (tab) this.showtab();
+ }
+ }
+ if (type=="Entrances") { //construct tabs
+ m.show = function (tab){
+ this.showtab = function() {
+ purgeInfoWindow();
+ InfoWindow=new InfoBubble({content:this.getEntranceTab(),disableAnimation:true});
+ InfoWindow.open(map,this);
+ this.tabVisible=true;
+ }
+ G.event.addListener(this,"click",this.showtab);
+ this.setMap(map);
+ var boundscheck=map.getBounds();
+ if ((!boundscheck.contains(this.getPosition()))&&this.type=="Building") //only zoom to accomodate buildings
+ {
+ boundscheck.extend(this.getPosition());
+ var newzoom = getZoomByBounds( map, boundscheck );
+ if (newzoom<15) map.setMapType(G_NORMAL_MAP);
+ map.setZoom(newzoom);
+ map.setCenter(boundscheck.getCenter());
+ }
+ this.visible=true;
+ if (tab) this.showtab();
+ }
+ }
+ if (type=="Enabled_toilets") { //construct tabs
+ m.show = function (tab){
+ if (this.data !="") {
+ this.showtab = function() {
+ purgeInfoWindow();
+ InfoWindow=new InfoBubble({content:this.getToiletTab(),disableAnimation:true});
+ InfoWindow.open(map,this);
+ this.tabVisible=true;
+ }
+ }
+ G.event.addListener(this,"click",this.showtab);
+ this.setMap(map);
+ var boundscheck=map.getBounds();
+ if ((!boundscheck.contains(this.getPosition()))&&this.type=="Building") //only zoom to accomodate buildings
+ {
+ boundscheck.extend(this.getPosition());
+ var newzoom = getZoomByBounds( map, boundscheck );
+ if (newzoom<15) map.setMapType(G_NORMAL_MAP);
+ map.setZoom(newzoom);
+ map.setCenter(boundscheck.getCenter());
+ }
+ this.visible=true;
+ if (tab) this.showtab();
+ }
+ }
+ if (type=="Loops"||type=="Parking") {
+ m.show = function (tab){
+ this.setMap(map);
+ var boundscheck=map.getBounds();
+ if ((!boundscheck.contains(this.getPosition()))&&this.type=="Building") //only zoom to accomodate buildings
+ {
+ boundscheck.extend(this.getPosition());
+ var newzoom = getZoomByBounds( map, boundscheck );
+ if (newzoom<15) map.setMapType(G_NORMAL_MAP);
+ map.setZoom(newzoom);
+ map.setCenter(boundscheck.getCenter());
+ }
+ this.visible=true;
+ }
+ }
+ m.hide = function() {
+ if (!(this.type=="Loops"||this.type=="Parking")) {
+ G.event.clearListeners(this,"click");
+ }
+ if (this.tabVisible) {
+ purgeInfoWindow();
+ this.tabVisible=false;
+ }
+ this.visible=false;
+ this.setMap(null);
+ }
+ m.getPlacesTab=getPlacesTab;
+ m.getInfoTab=getInfoTab;
+ m.getEntranceTab=getEntranceTab;
+ m.getToiletTab=getToiletTab;
+ return m;
+}
+//----------------------------------------------------------------------------------functions to populate tabs called from marker
+function getPlacesTab() {
+ var popup="<div id='map_building'><h4>"+this.name+"</h4>";
+ popup+="<div id='map_building_inner'>";
+ if (this.dispphoto) {
+ popup+="<div id='map_building_photo'>";
+ popup+="<a href='javascript:shadowbox("+this.id+")'><img src='./photos/small/"+this.id+".jpg' style='display:block'; width='40%'; height='40%'></a>";
+ popup+="</div>";
+ }
+ if (this.opening_hours) {
+ popup+="<div id='map_building_opening_hours'>";
+ popup +='<h5>Building Opening Hours:</h5>';
+ popup +='<div>'+this.opening_hours+"</div>";
+ popup+="</div>";
+ }
+ if ((this.accessibility)||(this.accessibility_url)) {
+ popup+="<div id='map_building_access'>";
+ if (this.accessibility) {
+ popup+="<h5>Accessibility: </h5><div>"+this.accessibility+" ";
+ if (this.accessibility_url) popup+="(<a href='http://www.tcd.ie/disability/accessibility/Building-check/"+this.accessibility_url+"'>more&nbsp;info</a>)</div>";
+
+ }
+ else if (this.accessibility_url) popup+="<div><a href='http://www.tcd.ie/disability/accessibility/Building-check/"+this.accessibility_url+"'>Accessibility&nbsp;info</a></div>";
+ popup+="</div>";
+ }
+ popup+="</div>";
+
+ popup+="<div id='map_building_permalink'>";
+ var linkname;
+ linkname=this.name;
+ popup+="<a href='map.php?q="+urlencode(linkname)+"' >Permalink</a>";
+ lat=this.getPosition().lat();
+ lng=this.getPosition().lng();
+
+ if (!mainCampus.contains(this.getPosition())) {
+ bd='"'+urlencode(this.name)+'"';
+ popup+=" <a href='javascript:directions("+lat+","+lng+","+bd+")'>Directions</a> ";
+ }
+ popup+="</div>";
+
+ return popup;
+}
+function getInfoTab() {
+ popup="";
+ popup+="<div id='map_info'>";
+ popup+="<div id='map_info_inner'><bd>"; //<div id='map_popup_inner'>";
+ var placeoffset=0;
+ if (this.places.length-placeoffset) {
+ popup+="<h4>Also in this building</h4><ul>";
+ for (i=0;i<this.places.length;i++) {
+ if (this.places[i].name) {
+ if (this.places[i].info.match(/^\s*http/)) {
+ popup +="<li><a href='"+this.places[i].info+"'>"+this.places[i].name+"</a></li>";
+ }
+ else {
+ popup +="<li>"+this.places[i].name+"</li>";
+ }
+ }
+ }
+ popup+="</ul>";
+ }
+ if (this.description) popup+="<h4>Info</h4>"+this.description;
+ popup+="</bd></div></div>";
+ return popup;
+}
+function getToiletTab() {
+ popup="";
+ popup+="<div id='map_toilettab'>";
+ popup+="<div id='map_toilettab_inner'><bd>";
+ popup+="<h4>Enabled toilet</h4>"
+ popup+="<br>"+this.data;
+ popup+="</bd></div></div>";
+ return popup;
+}
+function getEntranceTab() {
+ popup="";
+ popup+="<div id='map_entrancetab'>";
+ popup+="<div id='map_entrancetab_inner'><bd>";
+ popup+="<h4>Entrance</h4>"
+ popup+="<br> "+this.data;
+ popup+="</bd></div></div>";
+ return popup;
+}
+//----------------------------------------------------------------------------------Setting up data structures while loading
+function prepareData() {
+ //create markers for ref tables
+ for (i in icontypes) {
+ markers[icontypes[i]]=[];
+ for (t in tables[icontypes[i]]) {
+ //console.log("building "+tables[icontypes[i]][t].building+":"+markers["Building"][tables[icontypes[i]][t].building].name);
+ tables[icontypes[i]][t].lat=markers["Building"][tables[icontypes[i]][t].building].lat;
+ tables[icontypes[i]][t].lng=markers["Building"][tables[icontypes[i]][t].building].lng;
+ tables[icontypes[i]][t].id=tables[icontypes[i]][t].building;
+ markers[icontypes[i]].push(makeMarker(tables[icontypes[i]][t],icontypes[i]));
+ }
+
+ markers[icontypes[i]].visible=false;
+ }
+ //process Building and AZ tables
+ //create AZ -- is causing problems now for some reason WHERE THERE ARE NO ITEMS
+ for (var i=0;i<26;i++) {
+ tables[String.fromCharCode(i+65)]=[];
+ tables[String.fromCharCode(i+65)].screenname=String.fromCharCode(i+65);
+ }
+ //Create alphabetical lists of places including exceptions
+ for (var i=0;i<tables["AZ"].length;i++)
+ {
+ if (tables["AZ"][i].info=="") tables["AZ"][i].info=tables["AZ"][i].name;
+
+ var j=0;
+ var startlet=0;
+
+ while (tables["AZ"][i].name.charCodeAt(j) <64) j++; //find 1st non-number
+
+ startlet=tables["AZ"][i].name.charCodeAt(j) -65;
+ if (startlet>25) startlet-=32; //select small letters (which shouldn't even be there)
+
+ if ((startlet==96)||(startlet==128)) startlet=0; //catch Á
+ if (startlet==104) startlet=4; //catch É
+ if (startlet==108) startlet=8; //catch Í
+
+ //find array number of building index as buildingindex number can be non-consecutive
+ var bb=tables["AZ"][i].building;
+ for (j in markers['Building'])
+ {
+ if (markers['Building'][j].id==bb) {
+ numplaces=tables[String.fromCharCode(startlet+65)].length;
+ tables[String.fromCharCode(startlet+65)].push(tables["AZ"][i]); //add reference to place
+ tables[String.fromCharCode(startlet+65)][numplaces].building=j; //resolve reference to building array
+ tables[String.fromCharCode(startlet+65)][numplaces].index=i; //resolve reference to AZ array
+ markers['Building'][j].places.push(tables["AZ"][i]);
+ }
+ }
+
+ if (tables["AZ"][i].name.slice(0,3)=="St.")
+ {
+ startlet=tables["AZ"][i].name.charCodeAt(4) -65;
+ if (startlet>25) startlet-=32; //select small letters
+ //we know its doesn't start with ÁÉÍ
+ for (j in markers['Building'])
+ {
+ if (markers['Building'][j].id==bb) {
+ numplaces=tables[String.fromCharCode(startlet+65)].length;
+ tables[String.fromCharCode(startlet+65)].push(tables["AZ"][i]); //add reference to place
+ tables[String.fromCharCode(startlet+65)][numplaces].building=j; //resolve reference to building array
+ markers['Building'][j].places.push(tables["AZ"][i]);
+ }
+ }
+ }
+ }
+ //add buildings
+ for (i in markers['Building'])
+ {
+ if (markers['Building'][i].name) { //trap added 'visible' property
+ var j=0;
+ var startlet=0;
+
+ while (markers['Building'][i].name.charCodeAt(j) <64) j++; //find 1st non-number
+
+ startlet=markers['Building'][i].name.charCodeAt(j) -65;
+ if (startlet>25) startlet-=32; //select small letters (which shouldn't even be there)
+
+ if ((startlet==96)||(startlet==128)) startlet=0; //catch Á
+ if (startlet==104) startlet=4; //catch É
+ if (startlet==108) startlet=8; //catch Í
+
+ numplaces=tables[String.fromCharCode(startlet+65)].length;
+ tables[String.fromCharCode(startlet+65)].push(new place(markers['Building'][i].name,i,markers['Building'][i].info));
+ tables[String.fromCharCode(startlet+65)][numplaces].building=i; //resolve reference to building array
+ }
+
+ }
+ //sort results alphabetically
+ for (i=0;i<26;i++) {
+ letter=String.fromCharCode(i+65);
+ tables[letter].sort(function(a,b) { if (a.name<b.name) return -1; else return 1;});
+ }
+ //resolve other tables references
+ places.forEach(function(placetable) {
+ for (j=0;j<placetable.length;j++) {
+ for (k=0; k<markers['Building'].length;k++)
+ if (placetable[j].building==markers['Building'][k].num) {
+ placetable[j].building=k; //resolve reference to building array
+ break;
+ }
+ }
+ placetable.sort(function(a,b) {if (a.name<b.name) return -1; else return 1; });
+
+ });
+ //create html popups
+ for (i in markers['Building']) {
+ if (markers['Building'][i].name) {
+ markers['Building'][i].sortPlaces();
+ }
+ }
+ for (t in tables) tables[t].screenname=tablescreennames[t];
+}
+function do_menuchoices() {
+ var menu="<ul>";
+ for (var i=0;i<26;i++) {
+ letter=String.fromCharCode(i+65);
+ menu+="<li><a href='javascript:do_menu(\""+letter+"\");'>"+letter+" </a></li>";
+ }
+ menu+="</ul>";
+ document.getElementById("searchoptions").innerHTML=menu;
+ //action='map.php'
+ menu="<form id='form' method='POST' action='javascript:void(0);' onsubmit='quicklink(this.childNodes[0].childNodes[1]);return false'><div><label for='quicklinks'>Quicklinks: </label><select name='quicklinks' id='quicklinks'><option selected='selected'>Search for lectures, libraries, pacr...</option>";
+ for (i=0;i<placetypes.length;i++) menu+="<option value='"+placetypes[i]+"'>"+screenplacetypes[i]+"</option>";
+ menu+="</select> <input type='submit' value='Go' /></form>";
+ document.getElementById("quicklinkswrap").innerHTML=menu;
+}
+//----------------------------------------------------------------------------------Editing markers while authoring
+function setMarkerPosition() {
+ if (this.type=="Building") {
+ $.ajax({
+ url:"setMarkerPos.php",
+ data: "table="+this.type+"&id="+this.id+"&lat="+this.getPosition().lat()+"&lng="+this.getPosition().lng()+"&google_coords=1"
+ });
+ this.setIcon(new G.MarkerImage("http://maps.google.com/mapfiles/marker_orange.png") );
+ }
+ else {
+ $.ajax({
+ url:"setMarkerPos.php",
+ data: "table="+this.type+"&id="+this.id+"&lat="+this.getPosition().lat()+"&lng="+this.getPosition().lng()
+ });
+ }
+}
+function displayMarkerInfo(){
+ if (this.type=="Building") document.getElementById("info").innerHTML=this.id+": "+this.name;
+ else document.getElementById("info").innerHTML=this.id;
+}
+//----------------------------------------------------------------------------------Interaction handlers
+function shadowbox(n) {
+ Shadowbox.open({content:"./photos/"+n+".jpg",player: "img",title:markers['Building'][n].name});
+}
+function onsearch(query) {
+ tables["search"]=[];
+ var foundbuildings=new Array();
+ fb=0;
+ for (var i=0;i<26;i++) {
+ //console.log("checking "+String.fromCharCode(i+65));
+ for (j in tables[String.fromCharCode(i+65)]) {
+
+
+ if (tables[String.fromCharCode(i+65)][j]!=undefined) {
+ //console.log("checking "+j+": "+tables[String.fromCharCode(i+65)][j].name);
+
+ if ("name" in tables[String.fromCharCode(i+65)][j]) {
+ if (tables[String.fromCharCode(i+65)][j].name.toLowerCase().indexOf(query.toLowerCase())>-1) {
+ tables["search"].push(tables[String.fromCharCode(i+65)][j]);
+ if (foundbuildings[tables[String.fromCharCode(i+65)][j].building]!="1") fb++;
+ foundbuildings[tables[String.fromCharCode(i+65)][j].building]="1";
+ }
+ }
+
+ }
+
+ }
+ }
+ //auto-open if 1 search result
+ if (fb==1) {
+ clearmarkers();
+ markers["Building"][tables["search"][0].building].show(true,tables["search"][0]);
+ }
+ tables["search"].screenname=query;
+ tables["search"].sort(function(a,b) {if (a.name<b.name) return -1; else return 1; });
+ do_menu("search");
+}
+function show_markers(type) {
+ if (DEBUG) console.log("showing "+type);
+ if (!markers[type].visible) {
+ for(i in markers[type]) {
+ if (markers[type][i].id) {
+ markers[type][i].show();
+ }
+ }
+ }
+ else {
+ for(i in markers[type]) {
+ if (markers[type][i].id) {
+ markers[type][i].hide();
+ }
+ }
+ }
+
+ markers[type].visible=!markers[type].visible;
+}
+function show_place(type,index) {
+ show_building(tables[type][index].building);
+}
+function show_building(index) { //funnel through here
+ markers['Building'][index].show(true);
+}
+function quicklink(owner) {
+ name=owner.options[owner.selectedIndex].value;
+ for (i=1;i<markertypes.length;i++) if (name==markertypes[i]) show_markers(name);
+ for (i=0;i<placetypes.length;i++) if (name==placetypes[i]) do_menu(name);
+ resize_map_and_results();
+}
+function do_menu(type) {
+ var title="<h1>"+tables[type].length+" results for ";
+ if (type.length==1) title+="letter ";
+ if (tables[type].screenname) {
+ title+=tables[type].screenname;
+ }
+ else {
+ title+=type;
+ }
+ title+="</h1>";
+ if (DEBUG) console.log("doing menu: "+type);
+ if (DEBUG) console.log(tables[type].length+" items");
+ if(document.getElementById("searchresulttitle")) {
+ document.getElementById("searchresulttitle").innerHTML=title;
+ var content="<ul>";
+ for(var i=0;i<tables[type].length;i++) {
+ content+="<li><a href='javascript:show_place(\""+type+"\","+i+"); '>"+tables[type][i].name+"</a></li>";
+ }
+ content+="</ul>";
+ document.getElementById("searchresults").innerHTML=content;
+ if(do_menu_flag) {
+ resize_map_and_results();
+ }
+ else {
+ do_menu_flag = true;
+ }
+ if (DEBUG) alert(content);
+ }
+}
+function purgeInfoWindow() {
+ if (InfoWindow) {
+ //console.log("closing infowindow");
+ InfoWindow.close();
+ InfoWindow=undefined;
+ }
+}
+function clearmarkers() {
+ for (i in markers) {
+ for (j in markers[i]) {
+ if (markers[i][j].name) markers[i][j].hide;
+ }
+ }
+}
+function directions(lat,lng,place){
+ document.getElementById("searchresulttitle").innerHTML="<h1>From Trinity College to "+place+"</h1>";
+ document.getElementById("searchresults").innerHTML="";
+ var request = {
+ origin:new G.LatLng(53.3445,-6.259),
+ destination:new G.LatLng(lat,lng),
+ travelMode: google.maps.DirectionsTravelMode.DRIVING
+ };
+ directionsDisplay.setPanel(document.getElementById("searchresults"));
+ directionsService.route(request, function(response, status) {
+ if (status == G.DirectionsStatus.OK) {
+ directionsDisplay.setDirections(response);
+ }
+ });
+}
+//----------------------------------------------------------------------------------misc utils, legacy ajax stuff to bypass TCD fuzzy filename filter
+//Equivalent of getBoundsZoomLevel() in gmaps api 3
+/**
+* Returns the zoom level at which the given rectangular region fits in the map view.
+* The zoom level is computed for the currently selected map type.
+* @param {google.maps.Map} map
+* @param {google.maps.LatLngBounds} bounds
+* @return {Number} zoom level
+**/
+function getZoomByBounds( map, bounds ){
+ var MAX_ZOOM = map.mapTypes.get( map.getMapTypeId() ).maxZoom || 21 ;
+ var MIN_ZOOM = map.mapTypes.get( map.getMapTypeId() ).minZoom || 0 ;
+
+ var ne= map.getProjection().fromLatLngToPoint( bounds.getNorthEast() );
+ var sw= map.getProjection().fromLatLngToPoint( bounds.getSouthWest() );
+
+ var worldCoordWidth = Math.abs(ne.x-sw.x);
+ var worldCoordHeight = Math.abs(ne.y-sw.y);
+
+ //Fit padding in pixels
+ var FIT_PAD = 40;
+
+ for( var zoom = MAX_ZOOM; zoom >= MIN_ZOOM; --zoom ){
+ if( worldCoordWidth*(1<<zoom)+2*FIT_PAD < $(map.getDiv()).width() &&
+ worldCoordHeight*(1<<zoom)+2*FIT_PAD < $(map.getDiv()).height() )
+ return zoom;
+ }
+ return 0;
+}
+function urlencode (string) {
+ string = string.replace(/\r\n/g,"\n");
+ var utftext = "";
+
+ for (var n = 0; n < string.length; n++) {
+
+ var c = string.charCodeAt(n);
+
+ if (c < 128) {
+ utftext += String.fromCharCode(c);
+ }
+ else if((c > 127) && (c < 2048)) {
+ utftext += String.fromCharCode((c >> 6) | 192);
+ utftext += String.fromCharCode((c & 63) | 128);
+ }
+ else {
+ utftext += String.fromCharCode((c >> 12) | 224);
+ utftext += String.fromCharCode(((c >> 6) & 63) | 128);
+ utftext += String.fromCharCode((c & 63) | 128);
+ }
+
+ }
+
+ return escape(utftext);
+}
+function httpexists(url) {
+ exists=false;
+ http.open("GET",'httpexists-proxy.php?httpexistsurl=' + url, false);
+ //http.open("GET", url, false);
+ http.send(null);
+ if (http.status == 200) {
+ exists=true;
+ }
+ return exists;
+}
+function getHTTPObject() {
+ var xmlhttp;
+ if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
+ try {
+ xmlhttp = new XMLHttpRequest();
+ } catch (e) {
+ xmlhttp = false;
+ }
+ }
+ return xmlhttp;
+}
+
diff --git a/map.php b/map.php
new file mode 100755
index 0000000..d10ae24
--- /dev/null
+++ b/map.php
@@ -0,0 +1,116 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<title>College Maps : Trinity College Dublin</title>
+<meta charset="iso-8859-1" />
+<meta name="author" content="College Maps, Trinity College Dublin" />
+<meta name="copyright" content="&copy; 2007 Trinity College Dublin" />
+<meta name="description" content="College Maps" />
+<meta name="keywords" content="map,university,ireland,irish,universities,tcd,national,university of dublin,research,academic,study,studying,undergraduate,postgraduate" />
+<meta name="robots" content="all" />
+<link rel="Start" href="http://www.tcd.ie/Maps" title="Home" />
+<link rel="Author" href="mailto:richard.cotterell@tcd.ie." title="Author (College Maps)" />
+<link rel="Search" type="text/html" href="http://search.tcd.ie/search" title="Search Trinity College" />
+<link rel="Index" type="text/html" href="http://www.tcd.ie/az" title="A-Z of Trinity College" />
+<link rel="Shortcut Icon" href="//www.tcd.ie/tms/m/styles/favicon.ico" type="image/x-icon" />
+<!--[if lt IE 8]><link rel="Stylesheet" type="text/css" href="//www.tcd.ie/tms/m/styles/ie-lt-8-pre.css" media="screen" /><![endif]-->
+<link rel="Stylesheet" type="text/css" href="//www.tcd.ie/tms/m/styles/master.css" media="screen" />
+<link rel="Stylesheet" type="text/css" href="//www.tcd.ie/tms/m/styles/print.css" media="print" />
+<link rel="Stylesheet" type="text/css" href="//www.tcd.ie/tms/t/college-maps-2/styles-college-maps-2.css" media="screen" />
+<!--[if lt IE 7]><link rel="Stylesheet" type="text/css" href="//www.tcd.ie/tms/m/styles/ie-lt-8.css" media="screen" /><![endif]-->
+<!--[if lt IE 7]><script src="//www.tcd.ie/tms/m/scripts/ie7/IE8.js" type="text/javascript"></script><![endif]-->
+<link rel="Stylesheet" type="text/css" href="./styles-working.css" media="screen" />
+<link rel="stylesheet" type="text/css" href="//www.tcd.ie/tms/m/scripts/jquery/shadowbox/build-3.0b/shadowbox.css" />
+<script type="text/javascript" src="//www.tcd.ie/tms/m/scripts/jquery/jquery-1.7.1.min.js"></script>
+<script type="text/javascript" src="//www.tcd.ie/tms/m/scripts/jquery/shadowbox/build-3.0b/shadowbox.js"></script>
+<?php include "config.php"; ?>
+<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=<?php echo $key;?>"></script>
+<?php include "map_prepare.php"; ?>
+<script src="infobubble.js" type="text/javascript"></script>
+<script src="maps-extra.js" type="text/javascript"></script>
+<script src="map.js" type="text/javascript"></script>
+<?php include '/www.tcd.ie/tms/m/a.php'; // Master content to go before the end of the head element. ?>
+</head>
+<body class="t-default " onload="onLoad();callback_for_resizing();" onunload="GUnload()">
+<div class="wrap">
+ <div class="core-header">
+ <h1><a href="http://www.tcd.ie">Trinity College Dublin</a></h1>
+ <p class="cloak"><a href="#main-content">Skip to main content</a>.</p>
+ <form class="core-search" method="get" action="http://search.tcd.ie/search">
+ <fieldset>
+ <legend><span class="accelerator-key">S</span>earch TCD</legend>
+ <label for="search" class="cloak">Your query: </label>
+ <input accesskey="s" type="text" name="q" id="search" value="Search TCD" onfocus="if(this.value=='Search TCD'){this.value='';this.style.color='#54575e';this.style.background='#ffffff';}else{this.select();}" onblur="if(this.value==''){this.value='Search TCD';this.style.color='#54575e';this.style.background='#EDF1F8';}" />
+ <input type="image" src="http://www.tcd.ie/tms/m/styles/img/go.gif" class="submit" alt="Go" value="go" />
+ <input type="hidden" name="entqr" value="0" />
+ <input type="hidden" name="ud" value="1" />
+ <input type="hidden" name="sort" value="date:D:L:d1" />
+ <input type="hidden" name="output" value="xml_no_dtd" />
+ <input type="hidden" name="oe" value="UTF-8" />
+ <input type="hidden" name="ie" value="UTF-8" />
+ <input type="hidden" name="client" value="default_frontend" />
+ <input type="hidden" name="proxystylesheet" value="default_frontend" />
+ <input type="hidden" name="site" value="default_collection" />
+ </fieldset>
+ </form>
+ <h2 class="cloak">Core links</h2>
+ <div class="core-tabs">
+ <ul>
+ <li><a href="http://www.tcd.ie/" class="core-tab" title="TCD Home"><span>TCD Home</span></a></li>
+ <li><a href="http://www.tcd.ie/structure" title="Visit Faculties &amp; Schools"><span>Faculties &amp; Schools</span></a></li>
+ <li><a href="http://www.tcd.ie/courses/undegraduate/faculty" title="Browse TCD Courses"><span>Courses</span></a></li>
+ <li><a href="http://www.tcd.ie/research" title="Find out more about our Research"><span>Research</span></a></li>
+ <li><a href="http://www.tcd.ie/services" title="TCD Services"><span>Services</span></a></li>
+ <li><a href="http://www.tcd.ie/contacts" title="Contact Details"><span>Contact</span></a></li>
+ <li><a href="http://www.tcd.ie/az" title="TCD A-Z Listings"><span>A - Z</span></a></li>
+ </ul>
+ </div>
+ </div>
+ <!-- HEADER STARTS-->
+ <div class="h" id="main-content">
+ <div id="hcontainerdropdowns">
+ <h1><a href="/Maps/">College Maps</a></h1>
+ <!-- <div id="facilities"></div>-->
+ <!--<div id="features"></div>-->
+ <form id="headerform" action='javascript:void(0);' onsubmit='onsearch(this.value);return false;'>
+ <div>
+ <label for="query">Query:</label> <input type="text" id="query" name="q" title="Search the map" size="20" maxlength="2048" />
+ <input type="submit" id="button" value="Go" />
+ </div>
+ </form>
+ <div id="quicklinkswrap"></div>
+ <div class="cb"></div>
+ </div>
+ <div id="searchoptions"></div>
+ </div>
+ <!-- HEADER ENDS-->
+ <div class="wrap-content"><div class="wrap-content-inner">
+ <div class="m"><div class="m-inner">
+ <div class="building-information"><?php echo $building_information; ?></div>
+ <div id="searchresultwrap">
+ <div id="searchresulttitle"><?php echo $search_title; ?></div>
+ <div id="searchresults"><?php echo $search_results; ?></div>
+ </div>
+ <div id="mapwrap">
+ <div id="mapicons"></div>
+ <div id="map"></div>
+ </div>
+ </div></div>
+ <div class="cb"></div>
+ </div></div>
+ <div class="f">
+ <hr class="cloak" />
+ <p><span class="cloak">Last updated </span><span class="date-modified" title="Last update">25 November 2009</span><span class="cloak"> by </span><span class="author" title="Author"><a href="mailto:webdes@tcd.ie">College Maps</a></span><span class="cloak">.</span></p>
+ </div>
+ <div class="core-footer">
+ <address>Trinity College Dublin, College Green, Dublin 2</address>
+ <ul>
+ <li><a href="http://www.tcd.ie/accessibility">Accessibility</a></li>
+ <li><a href="http://www.tcd.ie/privacy">Privacy</a></li>
+ <li><a href="http://www.tcd.ie/disclaim">Disclaimer</a></li>
+ <li><a href="http://www.tcd.ie/contacts">Contact</a></li>
+ </ul>
+ </div>
+</div>
+</body>
+</html>
diff --git a/map_prepare.php b/map_prepare.php
new file mode 100755
index 0000000..288f104
--- /dev/null
+++ b/map_prepare.php
@@ -0,0 +1,19 @@
+
+
+
+<script type="text/javascript">
+ var G=google.maps;
+ <?php echo"startsearch='".$search."';\n";?>
+ <?php echo"startmenu='".$menu."';\n";?>
+ <?php echo"startmarkers='".$markers."';\n";?>
+
+
+ //security flags for js
+ <?php echo "EDITABLE=".$editable."\n";?>
+ <?php echo "DEBUG=".$debug."\n";?>
+ <?php echo "STARTPOS=new G.LatLng(".$startlat.",".$startlng.")\n";?>
+ // Pass any POST variables to Javascript, which are then used in maps-extra.js
+ var search_posted = '<?php echo $_GET['q']; ?>';
+ var quicklinks_posted = '<?php echo $quicklinks_posted; ?>';
+ var submit_the_query_form = false;
+</script> \ No newline at end of file
diff --git a/mapedit.php b/mapedit.php
new file mode 100755
index 0000000..4f268b7
--- /dev/null
+++ b/mapedit.php
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+ html { height: 100% }
+ body { height: 100%; margin: 0; padding: 0 }
+</style>
+<?php include "config.php"; ?>
+<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
+<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyADLTH2csWlgn92BHVOuN6cRYsd_uKJowk&sensor=true"></script>
+<script type="text/javascript">
+ <?php
+ #prefs
+ echo "G = google.maps;\n";
+ echo "EDITABLE=".$editable."\n";
+ echo "DEBUG=".$debug."\n";
+ echo "STARTPOS=new G.LatLng(".$startlat.",".$startlng.")\n";
+ ?>
+</script>
+<script src="map.js" type="text/javascript"></script>
+</head>
+<body onload="onLoad()" style="width:100%; height:100%">
+ <div id="map" style="width:100%; height:90%"></div>>
+ <div id="info" style="width:100%; height:10%"></div>>
+</body>
+</html>
diff --git a/maps-extra.js b/maps-extra.js
new file mode 100755
index 0000000..e6cc7e1
--- /dev/null
+++ b/maps-extra.js
@@ -0,0 +1,165 @@
+// Version 1.3 20081218.1405
+
+//var show_parking_warning=true;
+
+// Start up Shadowbox.
+Shadowbox.init({
+ players: ['img', 'qt','html'] // See http://www.shadowbox-js.com/options.html#players for more players.
+});
+
+$(document).ready(function() {
+
+ // Set the default message to be displayed in the search box.
+ var search_query_message = 'Search the map'
+ // The following is the mechanics for the search box to show and hide the default message.
+ if ($('#query').attr('value') != search_query_message)
+ {
+ if (search_posted != '')
+ {
+ $('#query').attr('value', search_posted);
+ }
+ else
+ {
+ $('#query').attr('value', search_query_message);
+ }
+ }
+ $('#query').focus(function() {
+ if ($(this).attr('value') == search_query_message)
+ {
+ $(this).attr('value', '');
+ }
+ });
+ $('#query').blur(function() {
+ if (!$(this).attr('value') || $(this).attr('value').replace(/^\s*/, "").replace(/\s*$/, "") == '')
+ {
+ $(this).attr('value', search_query_message);
+ }
+ });
+ // Set the action when the search box form is submitted.
+ if ($('#headerform')) {
+ $('#headerform').submit(function() {
+ var el = document.getElementById('query');
+ onsearch(el.value);
+ return submit_the_query_form;
+ });
+ };
+ // Set the default height for the map.
+ if ($('#map') && parseInt($('#map').css('height'), 10) < 201) {
+ $('#map').css('height', '200px');
+ };
+
+
+});
+//
+function callback_for_resizing() {
+
+ // Chuck the map icons in and prepare the events.
+ if ($('#mapicons'))
+ {
+ // Display the map icon buttons. <li id="Parking" title="Toggle parking areas"><a href="#Parking">Parking</a></li>
+ $('#mapicons').html('<h3>Map toggles</h3><ul><li id="Parking" title="Toggle enabled parking"><a href="#Parking">Enabled parking</a></li><li id="Entrances" title="Toggle entrances"><a href="#Entrances">Entrances</a></li><li id="Loops" title="Toggle hearing aid loops"><a href="#Loops">Hearing aid loops</a></li><li id="Enabled_toilets" title="Toggle enabled toilets"><a href="#Enabled_toilets">Enabled toilets</a></li></ul><div class="clear-right"></div>');
+ // Set the click event.
+ $('#mapicons li').click(function() {
+ if ($(this).attr('id')=="Parking"&&show_parking_warning) {
+ Shadowbox.open({
+ content: "<div id='parking-msg'>There is no public parking available in Trinity; parking is permit or by arrangement only. <br><br>The icons displayed show the locations of enabled parking for those with a permit or prior arrangement to park on the grounds.</div>",
+ player: "html",
+ title: "Parking Notice",
+ height: 350,
+ width: 360
+ });
+ show_parking_warning=false;
+ }
+ show_markers($(this).attr('id'));
+ if (markers[$(this).attr('id')].visible)
+ {
+ $(this).attr('class', 'selected');
+ }
+ else
+ {
+ $(this).attr('class', '');
+ }
+ return false;
+ });
+ // Set the key event.
+ $('#mapicons li').keyup(function(event) {
+ if (event.keyCode == 13 || event.keyCode == 32) // Return/enter or space.
+ {
+ show_markers($(this).attr('id'));
+ if (markers[$(this).attr('id')].visible)
+ {
+ $(this).attr('class', 'selected');
+ }
+ else
+ {
+ $(this).attr('class', '');
+ }
+ return false;
+ }
+ });
+ }
+ // Get the element mapwrap and apply the class js_active. This will give a means for different styles to be applied when Javascript is off.
+ var mapwrap = $('.wrap');
+ mapwrap[0].className = mapwrap[0].className + ' js_active';
+ // Do the same but with the searchoptions element.
+ //var mapwrap = document.getElementById('searchoptions');
+ //mapwrap.parentNode.className += ' js_active';
+ resize_map_and_results();
+ $(window).resize(function() {
+ resize_map_and_results();
+ });
+ // Check if the POST search variable was passed to Javascript.
+ if (search_posted != '')
+ {
+ // Update the search results.
+ onsearch(search_posted);
+ }
+ // Check if the POST quicklinks variable was passed to Javascript.
+ if (quicklinks_posted != '')
+ {
+ // Update the search results.
+ do_menu(quicklinks_posted);
+ }
+}
+function resize_map_and_results() {
+ // Fix mapicons and searchresulttitle so that they have the same height by adding padding to the top.
+ if ($('#searchresulttitle') && $('#map') && $('#mapicons'))
+ {
+ var diff = $('#searchresults').offset().top - $('#map').offset().top;
+ var searchresulttitle_padding = parseFloat($('#searchresulttitle').css('padding-top'), 10);
+ var mapicons_padding = parseFloat($('#mapicons').css('padding-top'), 10);
+ if (diff > 0)
+ {
+ // Increase the height of mapicons by adding padding to the top.
+ mapicons_padding = mapicons_padding + diff;
+ }
+ else if (diff < 0)
+ {
+ searchresulttitle_padding = searchresulttitle_padding - diff;
+ }
+ diff = 0;
+ if (searchresulttitle_padding > 0 && mapicons_padding > 0)
+ {
+ diff = Math.min(searchresulttitle_padding, mapicons_padding);
+ }
+ $('#mapicons').css('padding-top', mapicons_padding - diff + 'px');
+ $('#searchresulttitle').css('padding-top', searchresulttitle_padding - diff + 'px');
+ }
+ // Fix the vertical dimensions of the map.
+ if ($('#searchresults') && $('#map'))
+ {
+ var diff = Math.abs($(window).height() - $('#map').offset().top - 10); // The 10 is the base padding value used throughout the design.
+ if (diff < 400) {
+ diff = 400;
+ }
+ $('#map').css('height', diff + 'px');
+ $('#searchresults').css('height', diff + 2 + 'px'); // The 2 is a bit random but adjusts the bottom of the results to match the map.
+ }
+
+ map.setCenter(STARTPOS, 17);
+}
+function MM_jumpMenu(targ,selObj,restore){ //v3.0
+ eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
+ if (restore) selObj.selectedIndex=0;
+}
+
diff --git a/photos/1.jpg b/photos/1.jpg
new file mode 100755
index 0000000..6edcd93
--- /dev/null
+++ b/photos/1.jpg
Binary files differ
diff --git a/photos/12.jpg b/photos/12.jpg
new file mode 100755
index 0000000..f656477
--- /dev/null
+++ b/photos/12.jpg
Binary files differ
diff --git a/photos/124.jpg b/photos/124.jpg
new file mode 100755
index 0000000..b61cea1
--- /dev/null
+++ b/photos/124.jpg
Binary files differ
diff --git a/photos/13.jpg b/photos/13.jpg
new file mode 100755
index 0000000..4a9ed73
--- /dev/null
+++ b/photos/13.jpg
Binary files differ
diff --git a/photos/14.jpg b/photos/14.jpg
new file mode 100755
index 0000000..40cf346
--- /dev/null
+++ b/photos/14.jpg
Binary files differ
diff --git a/photos/15.jpg b/photos/15.jpg
new file mode 100755
index 0000000..40608a5
--- /dev/null
+++ b/photos/15.jpg
Binary files differ
diff --git a/photos/16.jpg b/photos/16.jpg
new file mode 100755
index 0000000..d93a413
--- /dev/null
+++ b/photos/16.jpg
Binary files differ
diff --git a/photos/17.jpg b/photos/17.jpg
new file mode 100755
index 0000000..7121ea0
--- /dev/null
+++ b/photos/17.jpg
Binary files differ
diff --git a/photos/18.jpg b/photos/18.jpg
new file mode 100755
index 0000000..44bcfe0
--- /dev/null
+++ b/photos/18.jpg
Binary files differ
diff --git a/photos/181.jpg b/photos/181.jpg
new file mode 100755
index 0000000..11a934e
--- /dev/null
+++ b/photos/181.jpg
Binary files differ
diff --git a/photos/19.jpg b/photos/19.jpg
new file mode 100755
index 0000000..855f646
--- /dev/null
+++ b/photos/19.jpg
Binary files differ
diff --git a/photos/194.jpg b/photos/194.jpg
new file mode 100755
index 0000000..5904da4
--- /dev/null
+++ b/photos/194.jpg
Binary files differ
diff --git a/photos/198.jpg b/photos/198.jpg
new file mode 100755
index 0000000..2da5aca
--- /dev/null
+++ b/photos/198.jpg
Binary files differ
diff --git a/photos/199.jpg b/photos/199.jpg
new file mode 100755
index 0000000..d771043
--- /dev/null
+++ b/photos/199.jpg
Binary files differ
diff --git a/photos/200.jpg b/photos/200.jpg
new file mode 100755
index 0000000..99f2c7f
--- /dev/null
+++ b/photos/200.jpg
Binary files differ
diff --git a/photos/211.jpg b/photos/211.jpg
new file mode 100755
index 0000000..3793493
--- /dev/null
+++ b/photos/211.jpg
Binary files differ
diff --git a/photos/22.jpg b/photos/22.jpg
new file mode 100755
index 0000000..8ada302
--- /dev/null
+++ b/photos/22.jpg
Binary files differ
diff --git a/photos/23.jpg b/photos/23.jpg
new file mode 100755
index 0000000..393634e
--- /dev/null
+++ b/photos/23.jpg
Binary files differ
diff --git a/photos/233.jpg b/photos/233.jpg
new file mode 100755
index 0000000..73b4711
--- /dev/null
+++ b/photos/233.jpg
Binary files differ
diff --git a/photos/243.jpg b/photos/243.jpg
new file mode 100755
index 0000000..8c19902
--- /dev/null
+++ b/photos/243.jpg
Binary files differ
diff --git a/photos/246.jpg b/photos/246.jpg
new file mode 100755
index 0000000..2f7d10f
--- /dev/null
+++ b/photos/246.jpg
Binary files differ
diff --git a/photos/249.jpg b/photos/249.jpg
new file mode 100755
index 0000000..4eea705
--- /dev/null
+++ b/photos/249.jpg
Binary files differ
diff --git a/photos/250.jpg b/photos/250.jpg
new file mode 100755
index 0000000..07969a3
--- /dev/null
+++ b/photos/250.jpg
Binary files differ
diff --git a/photos/253.jpg b/photos/253.jpg
new file mode 100755
index 0000000..829fc31
--- /dev/null
+++ b/photos/253.jpg
Binary files differ
diff --git a/photos/254.jpg b/photos/254.jpg
new file mode 100755
index 0000000..11b9b01
--- /dev/null
+++ b/photos/254.jpg
Binary files differ
diff --git a/photos/32.jpg b/photos/32.jpg
new file mode 100755
index 0000000..1460a66
--- /dev/null
+++ b/photos/32.jpg
Binary files differ
diff --git a/photos/40.jpg b/photos/40.jpg
new file mode 100755
index 0000000..19e1805
--- /dev/null
+++ b/photos/40.jpg
Binary files differ
diff --git a/photos/54.jpg b/photos/54.jpg
new file mode 100755
index 0000000..e166ed8
--- /dev/null
+++ b/photos/54.jpg
Binary files differ
diff --git a/photos/55.jpg b/photos/55.jpg
new file mode 100755
index 0000000..c73a787
--- /dev/null
+++ b/photos/55.jpg
Binary files differ
diff --git a/photos/56.jpg b/photos/56.jpg
new file mode 100755
index 0000000..ca2c4d7
--- /dev/null
+++ b/photos/56.jpg
Binary files differ
diff --git a/photos/57.jpg b/photos/57.jpg
new file mode 100755
index 0000000..129611d
--- /dev/null
+++ b/photos/57.jpg
Binary files differ
diff --git a/photos/58.jpg b/photos/58.jpg
new file mode 100755
index 0000000..bc89f0c
--- /dev/null
+++ b/photos/58.jpg
Binary files differ
diff --git a/photos/59.jpg b/photos/59.jpg
new file mode 100755
index 0000000..7f419f2
--- /dev/null
+++ b/photos/59.jpg
Binary files differ
diff --git a/photos/61.jpg b/photos/61.jpg
new file mode 100755
index 0000000..8257824
--- /dev/null
+++ b/photos/61.jpg
Binary files differ
diff --git a/photos/67.jpg b/photos/67.jpg
new file mode 100755
index 0000000..06a5a10
--- /dev/null
+++ b/photos/67.jpg
Binary files differ
diff --git a/photos/68.jpg b/photos/68.jpg
new file mode 100755
index 0000000..2d0cb7d
--- /dev/null
+++ b/photos/68.jpg
Binary files differ
diff --git a/photos/7.jpg b/photos/7.jpg
new file mode 100755
index 0000000..23fa39d
--- /dev/null
+++ b/photos/7.jpg
Binary files differ
diff --git a/photos/70.jpg b/photos/70.jpg
new file mode 100755
index 0000000..5348ab8
--- /dev/null
+++ b/photos/70.jpg
Binary files differ
diff --git a/photos/71.jpg b/photos/71.jpg
new file mode 100755
index 0000000..604ed00
--- /dev/null
+++ b/photos/71.jpg
Binary files differ
diff --git a/photos/73.jpg b/photos/73.jpg
new file mode 100755
index 0000000..7b934ef
--- /dev/null
+++ b/photos/73.jpg
Binary files differ
diff --git a/photos/74.jpg b/photos/74.jpg
new file mode 100755
index 0000000..f8d6fa7
--- /dev/null
+++ b/photos/74.jpg
Binary files differ
diff --git a/photos/75.jpg b/photos/75.jpg
new file mode 100755
index 0000000..9cb561a
--- /dev/null
+++ b/photos/75.jpg
Binary files differ
diff --git a/photos/8.jpg b/photos/8.jpg
new file mode 100755
index 0000000..a1a8011
--- /dev/null
+++ b/photos/8.jpg
Binary files differ
diff --git a/photos/81.jpg b/photos/81.jpg
new file mode 100755
index 0000000..df407be
--- /dev/null
+++ b/photos/81.jpg
Binary files differ
diff --git a/photos/82.jpg b/photos/82.jpg
new file mode 100755
index 0000000..5040981
--- /dev/null
+++ b/photos/82.jpg
Binary files differ
diff --git a/photos/83.jpg b/photos/83.jpg
new file mode 100755
index 0000000..afea5dc
--- /dev/null
+++ b/photos/83.jpg
Binary files differ
diff --git a/photos/9.jpg b/photos/9.jpg
new file mode 100755
index 0000000..cf2618b
--- /dev/null
+++ b/photos/9.jpg
Binary files differ
diff --git a/photos/_notes/dwsync.xml b/photos/_notes/dwsync.xml
new file mode 100755
index 0000000..aa4ef9a
--- /dev/null
+++ b/photos/_notes/dwsync.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<dwsync>
+<file name="1.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905890000000" remote="129031905890000000" />
+<file name="12.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905890000000" remote="129031905890000000" />
+<file name="124.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905890000000" remote="129031905890000000" />
+<file name="13.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905890000000" remote="129031905890000000" />
+<file name="14.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905890000000" remote="129031905890000000" />
+<file name="15.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905890000000" remote="129031905890000000" />
+<file name="16.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905890000000" remote="129031905890000000" />
+<file name="17.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905890000000" remote="129031905890000000" />
+<file name="18.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905890000000" remote="129031905890000000" />
+<file name="181.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905890000000" remote="129031905890000000" />
+<file name="19.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905890000000" remote="129031905890000000" />
+<file name="194.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905890000000" remote="129031905890000000" />
+<file name="198.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905890000000" remote="129031905890000000" />
+<file name="199.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905890000000" remote="129031905890000000" />
+<file name="200.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905890000000" remote="129031905890000000" />
+<file name="211.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="22.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="23.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="233.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="243.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="246.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="249.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="250.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="253.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="254.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="32.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="40.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="54.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="55.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="56.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="57.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="58.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="59.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="61.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="67.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="68.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="7.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="70.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905900000000" remote="129031905900000000" />
+<file name="71.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="73.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="74.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="75.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="8.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="81.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="82.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="83.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="9.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+</dwsync> \ No newline at end of file
diff --git a/photos/small/1.jpg b/photos/small/1.jpg
new file mode 100755
index 0000000..472d4cc
--- /dev/null
+++ b/photos/small/1.jpg
Binary files differ
diff --git a/photos/small/12.jpg b/photos/small/12.jpg
new file mode 100755
index 0000000..aa638ec
--- /dev/null
+++ b/photos/small/12.jpg
Binary files differ
diff --git a/photos/small/124.jpg b/photos/small/124.jpg
new file mode 100755
index 0000000..2366cce
--- /dev/null
+++ b/photos/small/124.jpg
Binary files differ
diff --git a/photos/small/13.jpg b/photos/small/13.jpg
new file mode 100755
index 0000000..8a27eff
--- /dev/null
+++ b/photos/small/13.jpg
Binary files differ
diff --git a/photos/small/14.jpg b/photos/small/14.jpg
new file mode 100755
index 0000000..4abba50
--- /dev/null
+++ b/photos/small/14.jpg
Binary files differ
diff --git a/photos/small/15.jpg b/photos/small/15.jpg
new file mode 100755
index 0000000..c2bbcea
--- /dev/null
+++ b/photos/small/15.jpg
Binary files differ
diff --git a/photos/small/16.jpg b/photos/small/16.jpg
new file mode 100755
index 0000000..d08d6b5
--- /dev/null
+++ b/photos/small/16.jpg
Binary files differ
diff --git a/photos/small/17.jpg b/photos/small/17.jpg
new file mode 100755
index 0000000..9bb4c7b
--- /dev/null
+++ b/photos/small/17.jpg
Binary files differ
diff --git a/photos/small/18.jpg b/photos/small/18.jpg
new file mode 100755
index 0000000..3f5acf5
--- /dev/null
+++ b/photos/small/18.jpg
Binary files differ
diff --git a/photos/small/181.jpg b/photos/small/181.jpg
new file mode 100755
index 0000000..2e8ca01
--- /dev/null
+++ b/photos/small/181.jpg
Binary files differ
diff --git a/photos/small/19.jpg b/photos/small/19.jpg
new file mode 100755
index 0000000..d9ad351
--- /dev/null
+++ b/photos/small/19.jpg
Binary files differ
diff --git a/photos/small/194.jpg b/photos/small/194.jpg
new file mode 100755
index 0000000..3833e6c
--- /dev/null
+++ b/photos/small/194.jpg
Binary files differ
diff --git a/photos/small/198.jpg b/photos/small/198.jpg
new file mode 100755
index 0000000..451812a
--- /dev/null
+++ b/photos/small/198.jpg
Binary files differ
diff --git a/photos/small/199.jpg b/photos/small/199.jpg
new file mode 100755
index 0000000..1f396ac
--- /dev/null
+++ b/photos/small/199.jpg
Binary files differ
diff --git a/photos/small/200.jpg b/photos/small/200.jpg
new file mode 100755
index 0000000..cb7f2f1
--- /dev/null
+++ b/photos/small/200.jpg
Binary files differ
diff --git a/photos/small/211.jpg b/photos/small/211.jpg
new file mode 100755
index 0000000..a9dcff9
--- /dev/null
+++ b/photos/small/211.jpg
Binary files differ
diff --git a/photos/small/22.jpg b/photos/small/22.jpg
new file mode 100755
index 0000000..a570afe
--- /dev/null
+++ b/photos/small/22.jpg
Binary files differ
diff --git a/photos/small/23.jpg b/photos/small/23.jpg
new file mode 100755
index 0000000..1ffb543
--- /dev/null
+++ b/photos/small/23.jpg
Binary files differ
diff --git a/photos/small/233.jpg b/photos/small/233.jpg
new file mode 100755
index 0000000..ba72d72
--- /dev/null
+++ b/photos/small/233.jpg
Binary files differ
diff --git a/photos/small/243.jpg b/photos/small/243.jpg
new file mode 100755
index 0000000..ef4dd1d
--- /dev/null
+++ b/photos/small/243.jpg
Binary files differ
diff --git a/photos/small/246.jpg b/photos/small/246.jpg
new file mode 100755
index 0000000..3f4cf08
--- /dev/null
+++ b/photos/small/246.jpg
Binary files differ
diff --git a/photos/small/249.jpg b/photos/small/249.jpg
new file mode 100755
index 0000000..09ca872
--- /dev/null
+++ b/photos/small/249.jpg
Binary files differ
diff --git a/photos/small/250.jpg b/photos/small/250.jpg
new file mode 100755
index 0000000..07a1d98
--- /dev/null
+++ b/photos/small/250.jpg
Binary files differ
diff --git a/photos/small/253.jpg b/photos/small/253.jpg
new file mode 100755
index 0000000..fb10a60
--- /dev/null
+++ b/photos/small/253.jpg
Binary files differ
diff --git a/photos/small/254.jpg b/photos/small/254.jpg
new file mode 100755
index 0000000..3820916
--- /dev/null
+++ b/photos/small/254.jpg
Binary files differ
diff --git a/photos/small/32.jpg b/photos/small/32.jpg
new file mode 100755
index 0000000..9e6f977
--- /dev/null
+++ b/photos/small/32.jpg
Binary files differ
diff --git a/photos/small/40.jpg b/photos/small/40.jpg
new file mode 100755
index 0000000..8fdd805
--- /dev/null
+++ b/photos/small/40.jpg
Binary files differ
diff --git a/photos/small/54.jpg b/photos/small/54.jpg
new file mode 100755
index 0000000..977c38e
--- /dev/null
+++ b/photos/small/54.jpg
Binary files differ
diff --git a/photos/small/55.jpg b/photos/small/55.jpg
new file mode 100755
index 0000000..c26f273
--- /dev/null
+++ b/photos/small/55.jpg
Binary files differ
diff --git a/photos/small/56.jpg b/photos/small/56.jpg
new file mode 100755
index 0000000..ab270c3
--- /dev/null
+++ b/photos/small/56.jpg
Binary files differ
diff --git a/photos/small/57.jpg b/photos/small/57.jpg
new file mode 100755
index 0000000..86bad06
--- /dev/null
+++ b/photos/small/57.jpg
Binary files differ
diff --git a/photos/small/58.jpg b/photos/small/58.jpg
new file mode 100755
index 0000000..d6d85f4
--- /dev/null
+++ b/photos/small/58.jpg
Binary files differ
diff --git a/photos/small/59.jpg b/photos/small/59.jpg
new file mode 100755
index 0000000..d7cb5e1
--- /dev/null
+++ b/photos/small/59.jpg
Binary files differ
diff --git a/photos/small/61.jpg b/photos/small/61.jpg
new file mode 100755
index 0000000..6f07e8e
--- /dev/null
+++ b/photos/small/61.jpg
Binary files differ
diff --git a/photos/small/67.jpg b/photos/small/67.jpg
new file mode 100755
index 0000000..056f9d6
--- /dev/null
+++ b/photos/small/67.jpg
Binary files differ
diff --git a/photos/small/68.jpg b/photos/small/68.jpg
new file mode 100755
index 0000000..33c46f7
--- /dev/null
+++ b/photos/small/68.jpg
Binary files differ
diff --git a/photos/small/7.jpg b/photos/small/7.jpg
new file mode 100755
index 0000000..bf2997a
--- /dev/null
+++ b/photos/small/7.jpg
Binary files differ
diff --git a/photos/small/70.jpg b/photos/small/70.jpg
new file mode 100755
index 0000000..cc62666
--- /dev/null
+++ b/photos/small/70.jpg
Binary files differ
diff --git a/photos/small/71.jpg b/photos/small/71.jpg
new file mode 100755
index 0000000..50dbbfb
--- /dev/null
+++ b/photos/small/71.jpg
Binary files differ
diff --git a/photos/small/73.jpg b/photos/small/73.jpg
new file mode 100755
index 0000000..49acfea
--- /dev/null
+++ b/photos/small/73.jpg
Binary files differ
diff --git a/photos/small/74.jpg b/photos/small/74.jpg
new file mode 100755
index 0000000..44444a7
--- /dev/null
+++ b/photos/small/74.jpg
Binary files differ
diff --git a/photos/small/75.jpg b/photos/small/75.jpg
new file mode 100755
index 0000000..279852c
--- /dev/null
+++ b/photos/small/75.jpg
Binary files differ
diff --git a/photos/small/8.jpg b/photos/small/8.jpg
new file mode 100755
index 0000000..65c0e6e
--- /dev/null
+++ b/photos/small/8.jpg
Binary files differ
diff --git a/photos/small/81.jpg b/photos/small/81.jpg
new file mode 100755
index 0000000..c32fad3
--- /dev/null
+++ b/photos/small/81.jpg
Binary files differ
diff --git a/photos/small/82.jpg b/photos/small/82.jpg
new file mode 100755
index 0000000..cf05026
--- /dev/null
+++ b/photos/small/82.jpg
Binary files differ
diff --git a/photos/small/83.jpg b/photos/small/83.jpg
new file mode 100755
index 0000000..c9e7398
--- /dev/null
+++ b/photos/small/83.jpg
Binary files differ
diff --git a/photos/small/9.jpg b/photos/small/9.jpg
new file mode 100755
index 0000000..edff912
--- /dev/null
+++ b/photos/small/9.jpg
Binary files differ
diff --git a/photos/small/_notes/dwsync.xml b/photos/small/_notes/dwsync.xml
new file mode 100755
index 0000000..ec5b039
--- /dev/null
+++ b/photos/small/_notes/dwsync.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<dwsync>
+<file name="1.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="12.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="124.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="13.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="14.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="15.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="16.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="17.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="18.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="181.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="19.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="194.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="198.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="199.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="200.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="211.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="22.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="23.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="233.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905910000000" remote="129031905910000000" />
+<file name="243.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="246.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="249.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="250.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="253.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="254.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="32.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="40.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="54.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="55.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="56.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="57.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="58.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="59.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="61.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="67.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="68.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="7.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="70.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="71.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="73.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="74.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="75.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="8.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="81.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="82.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="83.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="9.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+</dwsync> \ No newline at end of file
diff --git a/photos/thumbs/1.jpg b/photos/thumbs/1.jpg
new file mode 100755
index 0000000..3d89d9f
--- /dev/null
+++ b/photos/thumbs/1.jpg
Binary files differ
diff --git a/photos/thumbs/12.jpg b/photos/thumbs/12.jpg
new file mode 100755
index 0000000..d460b98
--- /dev/null
+++ b/photos/thumbs/12.jpg
Binary files differ
diff --git a/photos/thumbs/124.jpg b/photos/thumbs/124.jpg
new file mode 100755
index 0000000..22c0c90
--- /dev/null
+++ b/photos/thumbs/124.jpg
Binary files differ
diff --git a/photos/thumbs/13.jpg b/photos/thumbs/13.jpg
new file mode 100755
index 0000000..0d5b4ae
--- /dev/null
+++ b/photos/thumbs/13.jpg
Binary files differ
diff --git a/photos/thumbs/14.jpg b/photos/thumbs/14.jpg
new file mode 100755
index 0000000..8a346d8
--- /dev/null
+++ b/photos/thumbs/14.jpg
Binary files differ
diff --git a/photos/thumbs/15.jpg b/photos/thumbs/15.jpg
new file mode 100755
index 0000000..8200e24
--- /dev/null
+++ b/photos/thumbs/15.jpg
Binary files differ
diff --git a/photos/thumbs/16.jpg b/photos/thumbs/16.jpg
new file mode 100755
index 0000000..d0fee4b
--- /dev/null
+++ b/photos/thumbs/16.jpg
Binary files differ
diff --git a/photos/thumbs/17.jpg b/photos/thumbs/17.jpg
new file mode 100755
index 0000000..0722e93
--- /dev/null
+++ b/photos/thumbs/17.jpg
Binary files differ
diff --git a/photos/thumbs/18.jpg b/photos/thumbs/18.jpg
new file mode 100755
index 0000000..496dbc8
--- /dev/null
+++ b/photos/thumbs/18.jpg
Binary files differ
diff --git a/photos/thumbs/181.jpg b/photos/thumbs/181.jpg
new file mode 100755
index 0000000..7585a97
--- /dev/null
+++ b/photos/thumbs/181.jpg
Binary files differ
diff --git a/photos/thumbs/19.jpg b/photos/thumbs/19.jpg
new file mode 100755
index 0000000..4a15bc8
--- /dev/null
+++ b/photos/thumbs/19.jpg
Binary files differ
diff --git a/photos/thumbs/194.jpg b/photos/thumbs/194.jpg
new file mode 100755
index 0000000..6336264
--- /dev/null
+++ b/photos/thumbs/194.jpg
Binary files differ
diff --git a/photos/thumbs/198.jpg b/photos/thumbs/198.jpg
new file mode 100755
index 0000000..89f00e3
--- /dev/null
+++ b/photos/thumbs/198.jpg
Binary files differ
diff --git a/photos/thumbs/199.jpg b/photos/thumbs/199.jpg
new file mode 100755
index 0000000..6c2b91c
--- /dev/null
+++ b/photos/thumbs/199.jpg
Binary files differ
diff --git a/photos/thumbs/200.jpg b/photos/thumbs/200.jpg
new file mode 100755
index 0000000..c0afdfc
--- /dev/null
+++ b/photos/thumbs/200.jpg
Binary files differ
diff --git a/photos/thumbs/211.jpg b/photos/thumbs/211.jpg
new file mode 100755
index 0000000..11d9e26
--- /dev/null
+++ b/photos/thumbs/211.jpg
Binary files differ
diff --git a/photos/thumbs/22.jpg b/photos/thumbs/22.jpg
new file mode 100755
index 0000000..407f1c2
--- /dev/null
+++ b/photos/thumbs/22.jpg
Binary files differ
diff --git a/photos/thumbs/23.jpg b/photos/thumbs/23.jpg
new file mode 100755
index 0000000..f66113c
--- /dev/null
+++ b/photos/thumbs/23.jpg
Binary files differ
diff --git a/photos/thumbs/233.jpg b/photos/thumbs/233.jpg
new file mode 100755
index 0000000..107876d
--- /dev/null
+++ b/photos/thumbs/233.jpg
Binary files differ
diff --git a/photos/thumbs/243.jpg b/photos/thumbs/243.jpg
new file mode 100755
index 0000000..8e8e6a3
--- /dev/null
+++ b/photos/thumbs/243.jpg
Binary files differ
diff --git a/photos/thumbs/246.jpg b/photos/thumbs/246.jpg
new file mode 100755
index 0000000..70ba95c
--- /dev/null
+++ b/photos/thumbs/246.jpg
Binary files differ
diff --git a/photos/thumbs/249.jpg b/photos/thumbs/249.jpg
new file mode 100755
index 0000000..939bc2b
--- /dev/null
+++ b/photos/thumbs/249.jpg
Binary files differ
diff --git a/photos/thumbs/250.jpg b/photos/thumbs/250.jpg
new file mode 100755
index 0000000..689a950
--- /dev/null
+++ b/photos/thumbs/250.jpg
Binary files differ
diff --git a/photos/thumbs/253.jpg b/photos/thumbs/253.jpg
new file mode 100755
index 0000000..4ea3b04
--- /dev/null
+++ b/photos/thumbs/253.jpg
Binary files differ
diff --git a/photos/thumbs/254.jpg b/photos/thumbs/254.jpg
new file mode 100755
index 0000000..02709f7
--- /dev/null
+++ b/photos/thumbs/254.jpg
Binary files differ
diff --git a/photos/thumbs/32.jpg b/photos/thumbs/32.jpg
new file mode 100755
index 0000000..d52d4e6
--- /dev/null
+++ b/photos/thumbs/32.jpg
Binary files differ
diff --git a/photos/thumbs/40.jpg b/photos/thumbs/40.jpg
new file mode 100755
index 0000000..28fda86
--- /dev/null
+++ b/photos/thumbs/40.jpg
Binary files differ
diff --git a/photos/thumbs/54.jpg b/photos/thumbs/54.jpg
new file mode 100755
index 0000000..a2f18f6
--- /dev/null
+++ b/photos/thumbs/54.jpg
Binary files differ
diff --git a/photos/thumbs/55.jpg b/photos/thumbs/55.jpg
new file mode 100755
index 0000000..be2e846
--- /dev/null
+++ b/photos/thumbs/55.jpg
Binary files differ
diff --git a/photos/thumbs/56.jpg b/photos/thumbs/56.jpg
new file mode 100755
index 0000000..7dde0c3
--- /dev/null
+++ b/photos/thumbs/56.jpg
Binary files differ
diff --git a/photos/thumbs/57.jpg b/photos/thumbs/57.jpg
new file mode 100755
index 0000000..e5d72c1
--- /dev/null
+++ b/photos/thumbs/57.jpg
Binary files differ
diff --git a/photos/thumbs/58.jpg b/photos/thumbs/58.jpg
new file mode 100755
index 0000000..b952c26
--- /dev/null
+++ b/photos/thumbs/58.jpg
Binary files differ
diff --git a/photos/thumbs/59.jpg b/photos/thumbs/59.jpg
new file mode 100755
index 0000000..f8a8c08
--- /dev/null
+++ b/photos/thumbs/59.jpg
Binary files differ
diff --git a/photos/thumbs/61.jpg b/photos/thumbs/61.jpg
new file mode 100755
index 0000000..d9a8377
--- /dev/null
+++ b/photos/thumbs/61.jpg
Binary files differ
diff --git a/photos/thumbs/67.jpg b/photos/thumbs/67.jpg
new file mode 100755
index 0000000..aa1cd86
--- /dev/null
+++ b/photos/thumbs/67.jpg
Binary files differ
diff --git a/photos/thumbs/68.jpg b/photos/thumbs/68.jpg
new file mode 100755
index 0000000..0c29d3d
--- /dev/null
+++ b/photos/thumbs/68.jpg
Binary files differ
diff --git a/photos/thumbs/7.jpg b/photos/thumbs/7.jpg
new file mode 100755
index 0000000..3b6df29
--- /dev/null
+++ b/photos/thumbs/7.jpg
Binary files differ
diff --git a/photos/thumbs/70.jpg b/photos/thumbs/70.jpg
new file mode 100755
index 0000000..a2c7a2a
--- /dev/null
+++ b/photos/thumbs/70.jpg
Binary files differ
diff --git a/photos/thumbs/71.jpg b/photos/thumbs/71.jpg
new file mode 100755
index 0000000..138a31b
--- /dev/null
+++ b/photos/thumbs/71.jpg
Binary files differ
diff --git a/photos/thumbs/73.jpg b/photos/thumbs/73.jpg
new file mode 100755
index 0000000..cf0b031
--- /dev/null
+++ b/photos/thumbs/73.jpg
Binary files differ
diff --git a/photos/thumbs/74.jpg b/photos/thumbs/74.jpg
new file mode 100755
index 0000000..3eef42b
--- /dev/null
+++ b/photos/thumbs/74.jpg
Binary files differ
diff --git a/photos/thumbs/75.jpg b/photos/thumbs/75.jpg
new file mode 100755
index 0000000..97fb219
--- /dev/null
+++ b/photos/thumbs/75.jpg
Binary files differ
diff --git a/photos/thumbs/8.jpg b/photos/thumbs/8.jpg
new file mode 100755
index 0000000..eb9db6f
--- /dev/null
+++ b/photos/thumbs/8.jpg
Binary files differ
diff --git a/photos/thumbs/81.jpg b/photos/thumbs/81.jpg
new file mode 100755
index 0000000..ec0f2ff
--- /dev/null
+++ b/photos/thumbs/81.jpg
Binary files differ
diff --git a/photos/thumbs/82.jpg b/photos/thumbs/82.jpg
new file mode 100755
index 0000000..14a378e
--- /dev/null
+++ b/photos/thumbs/82.jpg
Binary files differ
diff --git a/photos/thumbs/83.jpg b/photos/thumbs/83.jpg
new file mode 100755
index 0000000..948ddc8
--- /dev/null
+++ b/photos/thumbs/83.jpg
Binary files differ
diff --git a/photos/thumbs/9.jpg b/photos/thumbs/9.jpg
new file mode 100755
index 0000000..fb054e8
--- /dev/null
+++ b/photos/thumbs/9.jpg
Binary files differ
diff --git a/photos/thumbs/_notes/dwsync.xml b/photos/thumbs/_notes/dwsync.xml
new file mode 100755
index 0000000..d47f7b0
--- /dev/null
+++ b/photos/thumbs/_notes/dwsync.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<dwsync>
+<file name="1.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="12.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="124.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="13.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="14.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="15.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905920000000" remote="129031905920000000" />
+<file name="16.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="17.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="18.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="181.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="19.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="194.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="198.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="199.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="200.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="211.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="22.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="23.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="233.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="243.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="246.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="249.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="250.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="253.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="254.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="32.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="40.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="54.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="55.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="56.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="57.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="58.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="59.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="61.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="67.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="68.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="7.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="70.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905930000000" remote="129031905930000000" />
+<file name="71.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905940000000" remote="129031905940000000" />
+<file name="73.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905940000000" remote="129031905940000000" />
+<file name="74.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905940000000" remote="129031905940000000" />
+<file name="75.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905940000000" remote="129031905940000000" />
+<file name="8.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905940000000" remote="129031905940000000" />
+<file name="81.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905940000000" remote="129031905940000000" />
+<file name="82.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905940000000" remote="129031905940000000" />
+<file name="83.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905940000000" remote="129031905940000000" />
+<file name="9.jpg" server="www.tcd.ie//www.tcd.ie/" local="129031905940000000" remote="129031905940000000" />
+</dwsync> \ No newline at end of file
diff --git a/setMarkerPos.php b/setMarkerPos.php
new file mode 100755
index 0000000..7ac21df
--- /dev/null
+++ b/setMarkerPos.php
@@ -0,0 +1,17 @@
+<?php
+include "config.php";
+
+$table= $_GET["table"];
+$lat= $_GET["lat"];
+$lng= $_GET["lng"];
+$index= $_GET["id"];
+$Google_coords= $_GET["google_coords"];
+
+mysql_connect($host, $login, $pword) or die(mysql_error());
+mysql_select_db($db) or die(mysql_error());
+$query="UPDATE $table SET lat=$lat, lng=$lng, Google_coords=$google_coords WHERE id=$index";
+$result=mysql_query($query);
+echo $result;
+mysql_close();
+
+?> \ No newline at end of file
diff --git a/styles-working.css b/styles-working.css
new file mode 100755
index 0000000..95902e6
--- /dev/null
+++ b/styles-working.css
@@ -0,0 +1,83 @@
+#map_info {font-size: 0.9em;width: 330px;}
+#map_info img {padding:0;}
+
+#map_info h4 {font-size: 1.2em;font-weight: bold;font-family: Arial, Helvetica, sans-serif;background-color: #29a7c2;color: #FFFFFF;margin:0 0 0 0;padding:0 3px 2px 4px;}
+#map_info h4 a {display:block;color:#fff;}
+
+#map_building {font-size: 0.9em;width: 330px;height:auto!important;min-height:170px;height:170px;}
+
+#map_building h4 {font-size: 1.2em;text-transform: uppercase;font-weight: bold;font-family: Arial, Helvetica, sans-serif;background-color: #29a7c2;color: #FFFFFF;margin:0 16px 3px 0;padding:3px 3px 1px 4px;}
+#map_building h5 {font-size: 1.1em;font-weight: bold;font-style:normal;font-family: Arial, Helvetica, sans-serif;background-color: #FFFFFF;color: #000000;margin:0;padding:0;}
+#map_building h6 {font-size: 1.2em;font-weight: normal;font-style:oblique;font-family: Arial, Helvetica, sans-serif;background-color: #FFFFFF;color: #000000;margin:0 0 0 0;padding:0 3px 1px 3px;}
+#map_building h7 {font-size: 1.2em;font-weight: normal;font-family: Arial, Helvetica, sans-serif;background-color: #FFFFFF;color: #000000;margin:0 0 0 0;padding:0 3px 1px 3px;}
+
+#map_building_inner {margin:0px 16px 0 0;padding:0 0 6px 0;height: 110px;display: block;overflow: auto;overflow-x: hidden;/*(hide horizontal scroll bar)position: absolute;top: 140px;right: 10px;*/}
+#map_building_inner ul {list-style-type:none;padding-left:0;margin:0;}
+#map_building_inner li {margin:0px 0 4px 0;}
+#map_building_inner ul li {padding-left:24px;line-height: 1.15em;}
+#map_building_inner ul li {background:transparent url(img/dash-list.gif) no-repeat 5px 2px;}
+#map_building_inner ul li li {background:transparent url(img/dash-list.gif) no-repeat 5px 1px;}
+
+
+#map_building_permalink {margin:12px 16px 0 0px;text-align:left;font-size: 1.2em;}
+#map_building_photo img{float:right;}
+
+#map_info_inner {margin:0 12px 0 0;padding:0 6px 6px 0;height: 156px;display: block;overflow: auto;overflow-x: hidden;/*(hide horizontal scroll bar)position: absolute;top: 140px;right: 10px;*/}
+
+#map_info_inner bd {font-size:1.0em;line-height:1.2em;}
+#map_info_inner ul {list-style-type:none;padding-left:0;margin:0;}
+#map_info_inner li {margin:0px 0 4px 0;}
+#map_info_inner ul li {padding-left:24px;line-height: 1.15em;}
+#map_info_inner ul li {background:transparent url(img/dash-list.gif) no-repeat 5px 2px;}
+#map_info_inner ul li li {background:transparent url(img/dash-list.gif) no-repeat 5px 1px;}
+
+#map_entrancetab {font-size: 0.9em;width: 230px;}
+#map_entrancetab img {padding:0;}
+#map_entrancetab h4 {font-size: 1.2em;font-weight: bold;font-family: Arial, Helvetica, sans-serif;background-color: #29a7c2;color: #FFFFFF;margin:0 0 0 0;padding:0 3px 1px 3px;}
+#map_entrancetab h4 a {display:block;color:#fff;}
+#map_entrancetab_inner {margin:0 12px 0 0;padding:0 6px 6px 0;height: 60px;display: block;overflow: auto;overflow-x: hidden;/*(hide horizontal scroll bar)position: absolute;top: 140px;right: 10px;*/}
+#map_entrancetab_inner bd {font-size:1.0em;line-height:1.2em;}
+#map_entrancetab_inner ul {list-style-type:none;padding-left:0;margin:0;}
+#map_entrancetab_inner li {margin:0px 0 4px 0;}
+#map_entrancetab_inner ul li {padding-left:24px;line-height: 1.15em;}
+#map_entrancetab_inner ul li {background:transparent url(img/dash-list.gif) no-repeat 5px 2px;}
+#map_entrancetab_inner ul li li {background:transparent url(img/dash-list.gif) no-repeat 5px 1px;}
+
+#map_building_opening_hours,
+#map_building_access {margin-bottom:6px;}
+
+#map_building_opening_hours p {margin:0 0 6px 0;}
+#map_building_opening_hours strong {display:block;font-weight:normal;}
+
+#map_building_in_this {margin-bottom:6px;}
+#map_building_in_this p {margin:0 0 6px 0;}
+#map_building_in_this strong {display:block;font-weight:normal;}
+
+
+
+
+#mapicons #Parking{width:10.25em;}
+#mapicons #Entrances{width:7.25em;}
+#mapicons #Loops{width:11em;}
+#mapicons #Enabled_toilets{width:9.75em;}
+#mapicons #Ramps{width:12.5em}
+
+#mapicons #Parking a{background:url(img/icon_accessible_parking.png) no-repeat 5px 3px;padding-left:26px;}
+#mapicons #Entrances a{background:url(img/icon_entrance.png) no-repeat 5px 3px;padding-left:26px;}
+#mapicons #Loops a{background:url(img/icon_loop.png) no-repeat 5px 3px;padding-left:26px;}
+#mapicons #Enabled_toilets a{background:url(img/icon_accessible_toilet.png) no-repeat 5px 3px;padding-left:26px;}
+#mapicons #Ramps a{background:url(img/icon_ramp.png) no-repeat 5px 3px;padding-left:26px;}
+
+#map_toilettab {font-size: 0.9em;width: 230px;}
+#map_toilettab img {padding:0;}
+#map_toilettab h4 {font-size: 1.2em;text-transform: uppercase;font-weight: bold;font-family: Arial, Helvetica, sans-serif;background-color: #29a7c2;color: #FFFFFF;margin:0 16px 0 0;padding:0 3px 1px 3px;}
+#map_toilettab h4 a {display:block;color:#fff;}
+#map_toilettab_inner {margin:0 12px 0 0;padding:0 6px 6px 0;height: 60px;display: block;overflow: auto;overflow-x: hidden;/*(hide horizontal scroll bar)position: absolute;top: 140px;right: 10px;*/}
+#map_toilettab_inner bd {font-size:1.0em;line-height:1.2em;}
+#map_toilettab_inner ul {list-style-type:none;padding-left:0;margin:0;}
+#map_toilettab_inner li {margin:0px 0 4px 0;}
+#map_toilettab_inner ul li {padding-left:24px;line-height: 1.15em;}
+#map_toilettab_inner ul li {background:transparent url(img/dash-list.gif) no-repeat 5px 2px;}
+#map_toilettab_inner ul li li {background:transparent url(img/dash-list.gif) no-repeat 5px 1px;}
+
+#parking-msg {font-size: 1.5em;font-weight: bold;font-family: Arial, Helvetica, sans-serif;color: #FFFFFF;margin:40px 40px 40px 40px;padding:0 3px 1px 3px;}
diff --git a/tableKML.php b/tableKML.php
new file mode 100644
index 0000000..d0daaae
--- /dev/null
+++ b/tableKML.php
@@ -0,0 +1,32 @@
+<?php
+include 'config.php';
+
+mysql_connect($host, $login, $pword) or die(mysql_error());
+mysql_select_db($db) or die(mysql_error());
+
+$table= $_GET['table'];
+
+$query='SELECT * FROM '.$table;
+$result = mysql_query($query);
+
+#http://stackoverflow.com/questions/1567758/best-way-to-use-jquerys-ajax-function-retrieve-variables-from-a-php-script
+
+echo "<?xml version='1.0' encoding='UTF-8'?>\n";
+echo "<kml xmlns=\'http://www.opengis.net/kml/2.2\'>\n";
+
+$n=mysql_numrows($result);
+$i=0;
+while ($i < $n) {
+ $T=mysql_fetch_array($result, MYSQL_ASSOC);
+ echo "<Placemark>\n";
+ echo "<name>".$T[name]."</name>\n";
+ echo "<Point>\n";
+ echo "<coordinates>".$T[lat].",".$T[lng].",0</coordinates>\n";
+ echo "</Point>\n";
+ echo "</Placemark>\n";
+ $i+=1;
+}
+mysql_close();
+
+echo "</kml>\n";
+?>