<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}

h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}

.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}

.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}

.tabSelected{color:[[ColorPalette::PrimaryDark]];
	background:[[ColorPalette::TertiaryPale]];
	border-left:1px solid [[ColorPalette::TertiaryLight]];
	border-top:1px solid [[ColorPalette::TertiaryLight]];
	border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}

#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}

.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
	border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
	border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}

.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#80ff80;}
.wizard .changedServer {background:#8080ff;}
.wizard .changedBoth {background:#ff8080;}
.wizard .notFound {background:#ffff80;}
.wizard .putToServer {background:#ff80ff;}
.wizard .gotFromServer {background:#80ffff;}

#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}

.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}

.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}

.tiddler .defaultCommand {font-weight:bold;}

.shadow .title {color:[[ColorPalette::TertiaryDark]];}

.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}

.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}

.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}

.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}

.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}

.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}

.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}

.imageLink, #displayArea .imageLink {background:transparent;}

.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}

.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}

.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}

.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}

.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}

.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}

#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity=60)';}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}

body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}

h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}

.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}

/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}

#mainMenu .tiddlyLinkExisting,
	#mainMenu .tiddlyLinkNonExisting,
	#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0 1em 1em; left:0px; top:0px;}

.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}

#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}

#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 0.3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

.wizard {padding:0.1em 1em 0 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0 0; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0;}
.wizardFooter .status {padding:0 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em;}

#messageArea {position:fixed; top:2em; right:0; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em;}
#messageArea a {text-decoration:underline;}

.tiddlerPopupButton {padding:0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em; margin:0;}

.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}

.tabset {padding:1em 0 0 0.5em;}
.tab {margin:0 0 0 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}

#contentWrapper {display:block;}
#splashScreen {display:none;}

#displayArea {margin:1em 17em 0 14em;}

.toolbar {text-align:right; font-size:.9em;}

.tiddler {padding:1em 1em 0;}

.missing .viewer,.missing .title {font-style:italic;}

.title {font-size:1.6em; font-weight:bold;}

.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}

.tiddler .button {padding:0.2em 0.4em;}

.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}

.footer {font-size:.9em;}
.footer li {display:inline;}

.annotation {padding:0.5em; margin:0.5em;}

* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0 0.25em; padding:0 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}

.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}

.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}

.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}

.fieldsetFix {border:0; padding:0; margin:1px 0px;}

.sparkline {line-height:1em;}
.sparktick {outline:0;}

.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}

* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0; right:0;}
#backstageButton a {padding:0.1em 0.4em; margin:0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin-left:3em; padding:1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none !important;}
#displayArea {margin: 1em 1em 0em;}
noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
}
/*}}}*/
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div>
<!--}}}-->
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* [[MainMenu]]: The menu (usually on the left)
* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
These [[InterfaceOptions]] for customising [[TiddlyWiki]] are saved in your browser

Your username for signing your edits. Write it as a [[WikiWord]] (eg [[JoeBloggs]])

<<option txtUserName>>
<<option chkSaveBackups>> [[SaveBackups]]
<<option chkAutoSave>> [[AutoSave]]
<<option chkRegExpSearch>> [[RegExpSearch]]
<<option chkCaseSensitiveSearch>> [[CaseSensitiveSearch]]
<<option chkAnimate>> [[EnableAnimations]]

----
Also see [[AdvancedOptions]]
<<importTiddlers>>
To use this please download to your local machine by right clicking and saving on [[this link|index.html]].
The following tool will allow you to calculate your carbon offset for a given meeting. Simply let us know the participants who will be attending the meeting, where they are coming from and where the meeting is and the tool will tell you how naughty you are being.

Locations are found using Google's local search api. For greatest accuracy you should use a postcode. If you do not know the postcode include the country name and county, eg. for Swindon set your location as "Swindon, Wiltshire, England"

<<CarbonFootprintForm>>

To give you an idea of the relative importance of One Kg of CO2, the total UK emissions for today will correspond to about 25 Kg of CO2 per person per day. By 2050 this will need to have been reduced to 5 Kg of CO2 per person per day, to meet UK climate change reduction targets.
[[How is this calculated?]]
It's not rocket science.
We work out the distance as the crow flies and depending on your type of transport multiply it by a magic number
for car:0.114kg co2 per km,
for train:0.052kg co2 per km
.title {background-color:rgb(0,240,60);color:white;padding:5px;}
body {font-family:Verdana;}
h1,h2,h3,h4,h5 {color:black;}
.codeLink {font-size:20px;}
.shareArea {font-size:12px;}
#displayArea {width:830px;}
.calculator {width:820px;position:relative;background-color:rgb(220,220,220);border:2px solid rgb(170,170,170);}
.calculator .footer {float:right;}
.calculator select {width:200px;}
.carbonFootprintTable {width:770px;}
.carbonFootprintTable .total {background-color:black;color:white;}
.top {padding:5px;}
.bottom {width:800px;margin:10px;padding-bottom:10px;}
.bottom .innerFrame {padding:10px;background-color:rgb(230,230,230);}
.bottom .addPartipant {float:right;}
.resultsBox {font-size:40px;height:80px;}
.resultScreen {border-bottom:20px solid rgb(0,240,60);-moz-border-radius:5px;-webkit-border-radius:5px;position:relative;background-color:rgb(200,250,180);color:black;font-size:30px;padding:5px;text-align:center;width:790px;margin-left:5px;}
.generator {border:medium none;
height:120px;background-color:rgb(190,190,190);
margin-top:20px;
position:absolute;
right:14px;
width:150px;}
.calculator .bottom input {width:100px;}
.viewer {line-height:normal;}
.addParticipant, .addJourneyLeg, .generator {background-color:#BEBEBE;
border-bottom-color:black;
border-bottom-style:solid;
border-bottom-width:2px;
border-left:none;border-right:none;border-top:none;
padding:5px;
}
.loadData {background-color:white;
bottom:40px;*bottom:10px;padding:10px;
position:absolute;
right:15px;}
.bottom form {padding-bottom:20px;}
.bottom .innerFrame {border-bottom:4px solid rgb(120,120,120);border-right:3px solid rgb(190,190,190);}
.summaryBox {
font-size:12px;
position:relative;
margin-top:10px;
z-index:20;}
#sidebarOptions .sliderPanel {background-color:white;}

.twtable tr {border:1px solid black;}
h1, h2, h3 {border-bottom:none;}
/*
.top {padding:5px;-moz-border-radius:20px;-webkit-border-radius:20px;}
.resultScreen {-moz-border-radius:5px;-webkit-border-radius:5px;position:relative;background-color:lavender;color:black;font-size:30px;padding:5px;text-align:center;width:600px;}
.generator {border:none;-moz-border-radius:20px;-webkit-border-radius:20px;position:absolute;right:0;top:0;height:150px;width:150px;}
.calculator {position:relative;background-color:rgb(220,220,220);-moz-border-radius:20px;-webkit-border-radius:20px;}
.bottom {width:100%;margin:10px;padding-bottom:10px;-moz-border-radius:20px;-webkit-border-radius:20px;}
.bottom .innerFrame {padding:10px;background-color:rgb(230,230,230);-moz-border-radius:20px;-webkit-border-radius:20px;}
*/
[[CarbonFootprintCalculator]]
[[Calculator|CarbonFootprintCalculator]]
[[About]]
<!--{{{-->
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
Carbon Footprint Calculator
!How to use
To use it simply provide the details of where your meeting is (the postcode or the full address), then list where all the participant are coming from. You can also enter the name of the participants but this is purely optional - you won't generate extra carbon just because you have a long name.

Hit the calculate button at the top right and click allow to the internet security pop up that appears, this will roughly calculate the carbon footprint of your trip and will provide a summary of how the carbon was calculated.

If you want to share the trip with a friend who also has the tool, click on 'load from code'.

!How it was made
This is a tool created using [[TiddlyWiki|http://www.tiddlywiki.com]] by [[Jon Robson|http://www.jonrobson.me.uk]]. It was first blogged about it [[here|http://www.jonrobson.me.uk/posts/Carbon Footprint Calculator]].
It uses the google local search api to get lookup longitude/latitude coordinates of the destinations you put in and there's a bit of Maths we do to work out roughly how far apart the two locations are into kms.
<<slider chkSliderOptionsPanel SideBarTabs "advanced »" "Investigate this TiddlyWiki">>
<<search>>
<<closeAll>>
<<permaview>>
<<newTiddler>>
<<newJournal "DD MMM YYYY" "journal">>
<<saveChanges>>
<<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">>

<<tabs txtMainTab "Timeline" "Timeline" TabTimeline "All" "All tiddlers" TabAll "Tags" "All tags" TabTags "More" "More lists" TabMore>>
!How to use
To use it simply provide the details of where your meeting is (the postcode or the full address), then list where all the participant are coming from. You can also enter the name of the participants but this is purely optional - you won't generate extra carbon just because you have a long name.

Hit the calculate button at the top right and click allow to the internet security pop up that appears, this will roughly calculate the carbon footprint of your trip and will provide a summary of how the carbon was calculated.

If you want to share the trip with a friend who also has the tool, click on 'load from code'.

!How it was made
This is a tool created using [[TiddlyWiki|http://www.tiddlywiki.com]] by [[Jon Robson|http://www.jonrobson.me.uk]]. It was first blogged about it [[here|http://www.jonrobson.me.uk/posts/Carbon Footprint Calculator]].
It uses the google local search api to get lookup longitude/latitude coordinates of the destinations you put in and there's a bit of Maths we do to work out roughly how far apart the two locations are into kms.
|~ViewToolbar|closeTiddler closeOthers editTiddler > fields syncing permalink references jump|
|~EditToolbar|+saveTiddler -cancelTiddler deleteTiddler|
/***
|''Name''|CarbonFootprint Plugin|
|''Description''|Allows you to check your carbon footprint against your travel.|
|''Author''|Jon Robson|
|''Version''|0.8|
|''Date''|Nov 2008|
|''Status''|@@experimental@@;|
|''License''|BSD|
|''CoreVersion''|<...>|
|''Documentation''|<...>|
|''Keywords''|carbon footprint|travel|

***/

config.macros.CarbonFootprintForm ={
  kgco2perkm:{
    "car (unknown fuel)":0.2028,
    "plane (domestic)": 0.1710,
    "plane (short-haul international)": 0.0983,
    "plane (long-haul international)":0.1122,
    "plane (other)": 0.12716,
    "train (national rail)":0.0577,
    "train (international eg.Eurostar)": 0.0177,
    "train (light rail and tram)": 0.0834,
    "tube (eg. London Underground)":0.0780,
    "train (other)": 0.0592 
  }
  ,thesameco2couldhavebeenused:{
    "breaths":{prefix:"... could have produced the same amount through breathing ", kgMultiplier:1/0.000982, suffix: " times",decimals:0}, //http://wiki.answers.com/Q/How_much_co2_is_emitted_per_breath
    "kettle": {prefix:"... could have boiled ", kgMultiplier: 1/0.0015, suffix:" kettles",decimals:0},//http://technology.timesonline.co.uk/tol/news/tech_and_web/article5489134.ece
    "google": {prefix:"... could have performed ", kgMultiplier: 1/0.0002, suffix:" google searches", reference:'http://googleblog.blogspot.com/2009/01/powering-google-search.html',decimals:0},
    "pc": {prefix: "... could have run a PC for ", kgMultiplier:1/(0.06*24), suffix: " hours",decimals:0 },
    "circumnavigate": {prefix:"... could have circumnavigated the globe in a plane ",kgMultiplier:1/4496.43295, suffix:" times."}, //world is 40,075.16 kilometers in a plane 0.1122kg co2 per km
    
   
    "co2today":{prefix:"... have contributed the same amount as ", kgMultiplier:1/25,suffix:" people will today (the total UK emissions today will correspond to about 25kg of Co2 per person)"},
    "co2_2050":{prefix:"... have contributed the same amount as ", kgMultiplier:1/5,suffix:" people will in 2050 to meet UK climate change reduction targets"}
  }
  
  ,poundsperkm:{
    "car (unknown fuel)":.09,
    "plane (domestic)": .12,
    "plane (short-haul international)": .12,
    "plane (long-haul international)":.12,
    "plane (other)": .12,
    "train (national rail)":.21,
    "train (international eg.Eurostar)": .21,
    "train (light rail and tram)": .21,
    "tube (eg. London Underground)":.21,
    "train (other)":.21
  }
  ,codemsg: "Copy and paste the code below and then you will be able to retrieve your trip by clicking on the 'load from code' link in the bottom right of the calculator."
  ,_transportHTML: ""
  ,_generateTransportHTML: function(){
      var transportData = config.macros.CarbonFootprintForm.kgco2perkm;
      var transportOptionsHtml = "";
      for(var i in transportData){
        transportOptionsHtml += "<option value=\""+ i+"\">"+ i +" ("+transportData[i]+" kg co2 per km)</option>";
      }
      this._transportHTML = transportOptionsHtml;
  }
  ,addJourneyLeg: function(place,location,transport){
    var options = this._transportHTML;
    jQuery(".journeyLegArea",place).append("<span class='journey'> to (postcode) <input type='text' name='via'/> by <select name='viaTransport'>"+options+"</select></span>");
    var journeys =jQuery(".journey",place);
    var lastJourney =journeys[journeys.length-1];
    

    if(location)jQuery("input[name=via]",lastJourney).val(location);
    if(transport)jQuery("select[name=viaTransport]",lastJourney).val(transport);
      

  }
  ,addParticipant: function(place){
    var transportOptionsHtml = this._transportHTML;
  
    var html = "<li class='participant'>name: <input type='text' name='participant'/> is travelling from (postcode): <input type='text' name='location'/> by: <select name='transport'>"+transportOptionsHtml+"</select><span class='journeyLegArea'></span> to the meeting <input type='button' class='addJourneyLeg' value='add details'/></li>";
    jQuery(".participantArea",place).append(html);
    jQuery(".addJourneyLeg").click(function(e){
      var participant = jQuery(this).parent();
      config.macros.CarbonFootprintForm.addJourneyLeg(participant);
    })
  }
  ,constructForm: function(place){
    var html ="<div class='calculator'>"+
    "<div class='top'>"+
      "<div class='resultScreen'>"+
        "<div class='resultsBox'></div>"+
        "<div class='summaryBox'></div>"+
        "<div class='shareArea'>"+
          "<a href='#' class='codeLink' style='display:none'>Share</a>"+
          "<div class='codeArea' style='display:none'>" +config.macros.CarbonFootprintForm.codemsg +" <br\><textarea class='code' ></textarea>"+
        "</div>"+
      "</div>"+
    "</div>"+
    "<input type='button' class='generator' value='CALCULATE'></div>"+
    "<div class='bottom'>"+
      "<div class='innerFrame'>"+
        "<form>"+
          "<h1>Meeting</h1>"+
          "Where is the meeting? (postcode) <input type='text' name='meeting_location'/><br\>"+
          "<br/>"+
          "<h1>participants</h1>"+
          "<ul class='participantArea'></ul>"+
          "<input type='button' class='addParticipant' value='add participant'/>"+
          "<div class='footer'><a href='#' class='loadData'>Load from code</a></div>"+
        "</form>"+
      "</div>"+
    "</div>"+
    "</div>";
    jQuery(place).append(html);
    //alert(html);
  }
  ,handler: function(place,macroName,params,wikifier,paramString,tiddler){
    this._generateTransportHTML();
    config.macros.CarbonFootprintForm.constructForm(place);
    config.macros.CarbonFootprintForm.addParticipant(place);
    var options = {url:"http://ajax.googleapis.com/ajax/services/search/local?v=1.0&q="};
    jQuery(".loadData",place).click(function(e){
      config.macros.CarbonFootprintForm.loadData(place,options);
    })
    
    
    jQuery(".addParticipant",place).click(function(){config.macros.CarbonFootprintForm.addParticipant(place);});
    jQuery(".generator",place).click(function(){config.macros.CarbonFootprintForm.calculate(place,options);});
  }
  ,calculate:function(place,options){
    var startLocation = jQuery("input[name=meeting_location]",place).val();
    //jQuery(".resultScreen",place).html("please wait...");
    jQuery(".resultsBox",place).html("please wait...");
    ajaxReq({url:options.url+startLocation, success:function(r){
      var data = eval("("+r+")");
      var topResult = data["responseData"].results[0];
      if(!topResult){
        alert("Couldn't find "+ startLocation + " check this is a valid postcode.");
      }
      var lon = topResult.lng
      var lat = topResult.lat;
      config.macros.CarbonFootprintForm.calculateDistances(place,lon,lat,startLocation);
  
    }});
  }
  ,generateSummary: function(place,result){
    var codeString = result.codeString;
    var totalKms = result.totalKms;
    var carbonCalculator = config.macros.CarbonFootprintForm.kgco2perkm;
    var costCalculator = config.macros.CarbonFootprintForm.poundsperkm;
    var resultHtml= "<h2>Journey Summary</h2> <table class='carbonFootprintTable'><tr><td>Mode Transport</td><td>Kms</td><td>carbon footprint (kg co2)</td><td>journey cost (£)</td></tr>";
    var grandTotalKms = 0;
    var totalcft = 0;
    var totalcost = 0;
    

    
    for(var modeTransport in totalKms){
        var transportKms = totalKms[modeTransport];
        grandTotalKms += transportKms;
        var cft = carbonCalculator[modeTransport] * transportKms;
        var journey_cost = costCalculator[modeTransport] * transportKms;
        totalcft+= cft;
        totalcost += journey_cost;
        resultHtml += "<td>"+modeTransport+"</td><td>"+transportKms.toFixed(2) +"</td><td>"+cft.toFixed(3)+"</td><td>"+journey_cost.toFixed(2)+"</td></tr>";
    }
  
    var facts =config.macros.CarbonFootprintForm.thesameco2couldhavebeenused;
    var prefix = "<h2>Meeting footprint</h2> with this amount of co2 you...<br/>";
    for(i in facts){
      var fact = facts[i];
      var damage = fact.kgMultiplier * totalcft;
      var decimals = fact.decimals || 2;
      if(fact.decimals ===0) decimals = 0;
      var damage=damage.toFixed(decimals);
      if(damage != 0)prefix += "<div class='fact'>"+ fact.prefix + damage + fact.suffix+"</div>";
    }
    resultHtml += "<tr class='total'><td>*</td><td>"+grandTotalKms.toFixed(3)+"</td><td>"+totalcft.toFixed(3)+"</td><td>"+totalcost.toFixed(2)+"</td></tr></table>";
    
    jQuery(".summaryBox",place).html(prefix +resultHtml);
    jQuery(".resultsBox",place).html(totalcft.toFixed(3) + " kg co2");
    var link = jQuery(".codeLink",place);
    link.css({"display":""});
    var codePopUp = function(){
      //console.log(result.codeString);
      var codeStringEncoded = jQuery.encoding.strToBe32s(result.codeString).join("?");
      jQuery(".shareArea textarea").val(codeStringEncoded);
      jQuery(".codeArea").css({"display":""});
    }
    link.click(codePopUp);
  }
  ,generateReport: function(place,name,transport,remaining_legs,destLat,destLng,result){
    //return;
      var codeString = result.codeString;
      var totalKms = result.totalKms;

      if(remaining_legs.length==0) {
        config.macros.CarbonFootprintForm.generateSummary(place,result)
        return;
      }
      var postcode = remaining_legs[remaining_legs.length-1];
      if(!postcode) return;
      if(!transport[transport.length-1]) return;
      //console.log("params",transport,remaining_legs);
      ajaxReq({params:{transport:transport,name:name,legs:remaining_legs,destLat:destLat,destLng:destLng},url:"http://ajax.googleapis.com/ajax/services/search/local?v=1.0&q="+postcode, success:function(r){

        
        var transports = this.params['transport'];
        var remaining_legs =this.params.legs;
        var postcode = remaining_legs[remaining_legs.length-1];
        
        var transport = transports[transports.length-1]
        //console.log("Calculating distance from",postcode,"to",destLat,destLng,"by",transport);
        remaining_legs =remaining_legs.slice(0,remaining_legs.length-1);
        var remaining_transport = transports.slice(0,transports.length-1);
        
        var nameParticipant = this.params['name'];      
        var data = eval("("+r+")");
        var topResult = data["responseData"].results[0];
        if(!topResult){
          alert("Couldn't find "+ postcode + " check this is a valid postcode.");
        }
        var lng = topResult.lng
        var lat = topResult.lat;
        var kmTravelled = config.macros.CarbonFootprintForm.calculateKm(this.params.destLat,this.params.destLng,lat,lng);
      
        if(!totalKms[transport])totalKms[transport]= 0;
        totalKms[transport] += kmTravelled;



        config.macros.CarbonFootprintForm.generateReport(place,name,remaining_transport,remaining_legs,lat,lng,result); //calculate remaining legs.
      //jQuery(".codeString",place).val();
      //jQuery(".codeStringPlace",place).css({display:"block"});
      //console.log(result);
      },fail:function(){alert("something went wrong.. make sure you are connected to the internet..");}});
    
  }
  ,loadData: function(place,options){
    var macro =config.macros.CarbonFootprintForm;
    var p = prompt("Please paste your unique code into the box below.");
    p = jQuery.encoding.be32sToStr(p.split("?"));
    jQuery(".journeyLegArea").html("");
    //console.log(p);
    var linesData = p.split("::");
    var rows = linesData.length;
    var actualRows = jQuery(".participant",place).length;
    var neededRows =rows- actualRows-1;
    for(var i=0; i < neededRows;i++){
      config.macros.CarbonFootprintForm.addParticipant(place);
    }
    
    actualRows = jQuery(".participant",place);
    for(var i=0; i < rows-1; i++){
      var lineData =linesData[i].split("||");
      var name = lineData[0];
      var location = lineData[1];
      var transport = lineData[2];
      var row =actualRows[i];
      jQuery("input[name=participant]",row).val(name);
      jQuery("input[name=location]",row).val(location);
      jQuery("option[value="+transport+"]",row).attr("selected", "selected");
      
      var legIndex = 3;
      while(lineData[legIndex]){
        var location =lineData[legIndex];
        var transport = lineData[legIndex+1];
        macro.addJourneyLeg(row,location,transport);
        legIndex += 2;
      }
      
    }
    jQuery("input[name=meeting_location]").val(linesData[linesData.length-1]);
    macro.calculate(place,options);
  }
  
  ,calculateDistances: function(place,fromLng,fromLat,startLocation){
    var participants = jQuery(".participant",place);
    var result ={totalKms:{},codeString:startLocation};
    var totalKms = {};
    var codeString=result.codeString;
  
    for(var i=0; i < participants.length; i++){
      var participant = participants[i];
      var name = jQuery("input[name=participant]",participant).val();
      var postcode = jQuery("input[name=location]",participant).val();
      var transport = jQuery("select[name=transport]",participant).val();
      var legs = jQuery("input[name=via]",participant);
      var transportlegs = jQuery("select[name=viaTransport]",participant);
      var thisCodeString =  name+"||"+postcode+"||"+transport;
      var legs_to_destination = [];
      var transport_to_destination= [];
      transport_to_destination.push(transport);
      legs_to_destination.push(postcode);
      for(var j=0; j < legs.length;j++){
        var leg = jQuery(legs[j]).val();
        var transportLeg = jQuery(transportlegs[j]).val();
        if(leg){
          legs_to_destination.push(leg);
          thisCodeString += "||"+leg + "||"+transportLeg;
          transport_to_destination.push(transportLeg);
        }
      }
      
      
      codeString = thisCodeString + "::"+ codeString;
      result.codeString = codeString;
      if(postcode){
        config.macros.CarbonFootprintForm.generateReport(place,name,transport_to_destination,legs_to_destination,fromLat,fromLng,result)
      }
    }
    
    //console.log(codeString);
    
    
  }
  ,calculateKm: function(fromLat,fromLng, lat,lng){
    if(fromLat == lat && fromLng == lng) return 0;
    var a1 = Math.PI /180 * (fromLat);
    var b1 = Math.PI /180 * (fromLng);
    var a2 = Math.PI /180 * (lat);
    var b2 = Math.PI /180 * (lng);
    var radius =  6378; //in km
    return Math.acos(Math.cos(a1)*Math.cos(b1)*Math.cos(a2)*Math.cos(b2) + Math.cos(a1)*Math.sin(b1)*Math.cos(a2)*Math.sin(b2) + Math.sin(a1)*Math.sin(a2)) * radius;
  }
};