Vent venligst.Udtalelser hentes...
virker bedst med FireFox eller Chrome
 Udtalelser - en samling af digitale udtalelsesskabeloner----Fuld skærm---
<!--{{{-->
<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>>
done actions...

furure actions...


next actions to do...
Alt hvad der skal ske umiddelbart...
queued actions...

Actions waiting for a certain event before they are actionable...
active projects...

completed projects...


projects that may be undertaken in the future...

deferred projects...
family stuff...
related to friends...
research and such...
related to sports...
development related issues
private stuff...
work related things...
En testjournal
company contact informations...
my friends...
social contacts and organisations...
(information) technology related contacts...
work related contacts...
calls to make...
developping stuff...
get the hammer out...
go, get it...
Stuff I need to find (or research)...
where I need to go...
mail to write...
things to read...
|''URL:''|http://tiddlywiki.abego-software.de/|
|''Author:''|~UdoBorkowski|
/***
|''Name:''|AccordionMenuPlugin|
|''Description:''|Turn an unordered list into an accordion style menu|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#AccordionMenuPlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.0|
|''Date:''|03/11/2007|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.5|
((_@@color:red;modified version for tbGTD@@(''Note'': This version has been modified for tbGTD, i.e. doubleclick opening all categories.)))
!!Usage:
* put {{{<<accordion>>}}} on the line after your unordered list
!!Customizing:
* customize the css via the shadow tiddler [[StyleSheetAccordionMenu]]
* or give the list a custom class by passing the classes as parameters to the macro.
** Eg: {{{<<accordion ClassName1 ClassName2>>}}}
***/
//{{{
config.macros.accordion={
	dblClick:true, //allows doubleclick to open all
	dropchar:"", //" \u00BB",
	handler:function(place,macroName,params,wikifier,paramString,tiddler){
		list=findRelated(place.lastChild,"UL","tagName","previousSibling");
		if(!list)return;
		addClass(list,"accordion");
		if(params.length)addClass(list,paramString);
		this.fixLinks(list.childNodes);		
	},
	fixLinks:function(els){
		for(var i=0;i<els.length;i++){
			if(els[i].tagName.toLowerCase()=="li"){
				var link=findRelated(els[i].firstChild,"A","tagName","nextSibling");
				if(!link){
					var ih=els[i].firstChild.data;
					els[i].removeChild(els[i].firstChild);
					link=createTiddlyElement(null,"a",null,null,ih+this.dropchar,{href:"javascript:;"});
					els[i].insertBefore(link,els[i].firstChild);
				}
				else{
					link.firstChild.data=link.firstChild.data + this.dropchar;
					removeClass(link,"tiddlyLinkNonExisting");
				}
				link.onclick=this.show;
				addClass(link,'main');
				if(this.dblClick)link.ondblclick=this.showall;
			}
		}
	},
	showall:function(e){
		var i,u=this.parentNode.parentNode;
		for(i=0;i<u.childNodes.length;i++)u.childNodes[i].setAttribute('class','accordion-active')
	},
	show:function(e){
		var list=this.parentNode.parentNode;
		var els=list.childNodes;
		for(var i=0;i<els.length;i++){removeClass(els[i],"accordion-active");}
		addClass(this.parentNode,"accordion-active");
	}	
}
config.shadowTiddlers["StyleSheetAccordionMenu"] =
	 "ul.accordion li ul {display:none;}\n"+
	 "ul.accordion li.accordion-active ul {display:block;}\n"+
store.addNotification("StyleSheetAccordionMenu",refreshStyles);
//}}}
/***
|''Name''|ActivitiesMacro|
|''Description''|Adds a reminder macro to the current tiddler |
|''Author''|Michael Borck|
|''Version''|0.2.5|
|''Date''|4 Dec 2008|
|''Status''|@@beta@@|
|''Source''|http://schedule.tiddlyspot.com/|
|''Copyright''|2008|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]] |
|''Feedback''|borck.m@gmail.com|
|''CoreVersion''|2.4|
|''Type''|Macro|
|''Keywords''|timetable, schedule, appointments, hard landscape, macro, reminders|


!Description
This macro adds a reminder to the current tiddler and is an extension/port of the newReminder macro.  It provides an alternative tool to construct a reminder.  When used in conjunction with the schedule macro the start and end promts are used to schedule the event.   If DatePicker is installed it will use that otherwise it will use a custom date picker (the same one provided in newReminder).

!Usage
!Usage
{{{<<addActivity [buttonName]>>>}}}

Where {{{[buttonName]}}} is a name you give to the slider button created.
!!!Code
***/
//{{{
if (!version.extensions.activities) {
	version.extensions.activites = {
		major: 0,
		minor: 2,
		revision: 5,
		date: new Date(2008, 4, 12),
		source: "http://schedule.tiddlyspot.com/"
	};

	config.macros.addActivity = {
		handler: function(place, macroName, params, wikifier, paramString, tiddler) {
			if (DatePicker) // Nice calendar popup
			{
				var format = "DD MMM YYYY";
				var dateBox = 'Hvornår:<input type="text" size="15" name="dateBox" value="' + new Date().formatString(format) + '">';
			}
			else // build our own date picker
			{
				var today = new Date();
				dateBox = 'År: <select name="år"><option value="">Hvert år' + '</option>';
				for (var i = 0; i < 5; i++) {
					dateBox += '<option' + ((i == 0) ? ' selected': '') + ' value="' + (today.getFullYear() + i) + '">' + (today.getFullYear() + i) + '</option>';
				}
				dateBox += '</select>&nbsp;&nbsp;Måned:<select name="måned">' + '<option value="">Hver måned</option>';
				for (i = 0; i < 12; i++) {
					dateBox += '<option' + ((i == today.getMonth()) ? ' selected': '') + ' value="' + (i + 1) + '">' + config.messages.dates.months[i] + '</option>';
				}
				dateBox += '</select>&nbsp;&nbsp;Dag:<select name="dag">' + '<option value="">Hver dag</option>';
				for (i = 1; i < 32; i++) {
					dateBox += '<option' + ((i == (today.getDate())) ? ' selected': '') + ' value="' + i + '">' + i + '</option>';
				}
			}

			// Create form elements
			var start = 'Fra:<input type="text" size="5" name="start" value="09:00"' + 'onfocus="this.select();">';
			var end = 'til <input type="text" size="5" name="end" value="09:00"' + 'onfocus="this.select();">';
			var desc = 'Hvad:<input type="text" size="41" name="title" ' + 'value="Skriv en beskrivelse" onfocus="this.select();">';
			var btn = '<input type="button" value="tilføj" ' + 'onclick="config.macros.addActivity.addEventToTiddler(this.form)">';
			var once = '<input type="radio" name="repeat" value="eengang" checked> Een gang';
			var daily = '<input type="radio" name="repeat" value="dagligt"> Dagligt';
			var weekly = '<input type="radio" name="repeat" value="ugentligt"> Ugentligt';
			var twoWeeks = '<input type="radio" name="repeat" value="hverandenUge"> Hver anden uge';
			var fourWeeks = '<input type="radio" name="repeat" value="fireUger"> Hver fjerde uge';
			var monthly = '<input type="radio" name="repeat" value="månedligt"> Månedligt';
			var yearly = '<input type="radio" name="repeat" value="årligt"> Årligt';
			var hidden = 'Skjul: <input type="checkbox" name="hidden" value="skjult" checked>';

			var frequency = '<div>Hvor ofte:' + once + daily + weekly + twoWeeks + fourWeeks + monthly + yearly + '</div>';

			// Construct form
			var formstring = '<br><html><form>' + desc + '<br><br>' + dateBox + '&nbsp;&nbsp;' + start + '&nbsp;&nbsp;' + end + '<br><br>' + frequency + '<br>' + hidden + '<br>' + btn + '</form></html>';
			var btnName = params[0] || "Tilføj aktivitet";
			var panel = config.macros.slider.createSlider(place, null, btnName, "Åbn en formular og tilføje en ny skjult påmindelse til denne tiddler");
			wikify(formstring, panel, null, store.getTiddler(params[1]));

			// Form built, now attach calendar popup
			if (DatePicker) {
				var cb = function(el, objDate) {
					el.value = objDate.formatString(format);
				};
				var box = document.getElementsByName("dateBox")[0];
				DatePicker.create(box, new Date(), cb);
			}
		}
	};

	config.macros.addActivity.addEventToTiddler = function(form) {
		// Determine where to write the macro
		var title = window.story.findContainingTiddler(form).id.substr(7);
		var tiddler = store.getTiddler(title);

		// Determine options for reminder
		var eventDate = new Date(form.dateBox.value);
		var year = eventDate.getFullYear() || "";
		var month = eventDate.getMonth() ? (eventDate.getMonth() + 1) : "";
		var day = eventDate.getDate() || "";
		var frequency = "eengang";
		for (i = 0; i < form.repeat.length; i++) {
			if (form.repeat[i].checked) {
				frequency = form.repeat[i].value;
			}
		}
		var recurring = "";
		switch (frequency) {
		case "eengang":
			break;
		case "dagligt":
			recurring = 1;
			break;
		case "ugentligt":
			recurring = 7;
			break;
		case "hverandenweekend":
			recurring = 14;
			break;
		case "hverfjerdeweekend":
			recurring = 28;
			break;
		case "månedligt":
			måned = "";
			break
		case "årligt":
			recurring = 365;
			break
		}

		// Build reminder macro
		var txt = '\n<<reminder ';
		txt += year ? 'år:' + year + ' ': "";
		txt += month ? 'måned:' + month + ' ': "";
		txt += day ? 'dag:' + day + ' ': "";
		txt += recurring ? 'recurdays:' + recurring + ' ': "";
		txt += form.start.value ? 'titel:"' + form.start.value: ""
		txt += form.start.value && form.end.value ? '-' + form.end.value: "";
		txt += form.title.value ? ' ' + form.title.value + '" ': "";
		txt += form.hidden.checked ? ' hidden ': "";
		txt += ' >>';

		// Write the macro and refresh tiddler
		tiddler.set(null, tiddler.text + txt);
		window.story.refreshTiddler(title, 1, true);
		store.setDirty(true);
	};

}
//}}}

#Anders Lars Mårtensson:
**
**Blansvej 29 4941 Bandholm
#Katarina Anette Mårtensson:
**41132911
**Skibevej 61 4941 Bandholm
#Mårten Mattias Mårtensson:
**54445657
**61865677
**Askevænget 9 4800 Nykøbing F
#Bjarne P. Frost: 
**26 35 14 96 
**55 77 14 96 
**Nygårdsvej 132 st,4700 Næstved
<<forEachTiddler
    where
       'tiddler.tags.contains("udtalelse") && tiddler.tags.contains("afleveret")'

    sortBy
       'tiddler.title.toUpperCase()'

    write '"[[√ |Afleverede udtalelser]] [["+tiddler.title+"]] "'

        none '"//ingen \"bog\" er opgivet endnu//"'
>>
{{normal{{{invisibletable{
|<<tiddler RefreshTiddler with: opdatér>>|c
| <<tiddler AktivitetsRapport##formular>> |
| <<tiddler AktivitetsRapport##Slide>> |
| <<tiddler AktivitetsRapport##Alle>> |
}}}}}}
/%
!Alle
@@position:relative;+++^33em^[Oversigt over alle tider]...<<tiddler AktivitetsRapport##arbejdstid>>===@@
!end Alle
!formular
<<formTiddler [[Simpel formular]] >>
!end
!Slide
@@position:relative;+++^33em^[arbejdstid]
|sortable|k
|//Dato//|//Beskrivelse//|//Startet//|//Stoppet//|//Varighed//|h
|2009-12-13|A|17:21:12|17:21:16|00:00:04|
|2009-12-13|B|17:21:21|17:21:26|00:00:05|
|2009-12-13|C|17:21:30|17:21:36|00:00:06|
|<<taskTimer here>>||| tid brugt ialt:|<<columncalc sum 1 -1>>|
===@@
<data>{"timer":"99"}</data>
!end%/
/%
!Sum
//<script> 
   var out=[]; 
   var sum=0; 
   var rem="$1"; 
   var remword=""; 
   var tids=store.getTaggedTiddlers('arbejdstid'); 
      for (var i=0; i<tids.length; i++){ 
      var hr=tids[i].data("timer")*1; 
      if (isNaN(hr)) {sum = sum;} 
      else {sum=sum+hr;} 
   } 
   if (sum<$1) {rem=rem-sum; remword="tilbage.";} else {rem=sum- 
rem; remword="over.";} 
   out.push(sum+' timer brugt ialt, '+rem+' timer '+remword); 
   return out.join('\n'); 
</script>// 
!end
!arbejdstid
<<forEachTiddler where 'tiddler.tags.contains("arbejdstid")'
sortBy 'tiddler.title'
write 
 '(index < 600)? "|!"+(index+1)+"| "+tiddler.data("timer")+" t |[["+tiddler.title+"]] |\n" : ""'
              begin '"|sortable|k\n" 
+"| !antal |! <<tag arbejdstid \>\> |! tiddler |h\n"' 
end 'count+" arbejdstider\n"' none '"ingen arbejdstider \n"'>>
!end %/
<<forEachTiddler where 'tiddler.tags.contains("fag")'
sortBy 'tiddler.title'
write 
 '(index < 20)? "|!"+(index+1)+"| <<tiddler [[Alle fag##påmindelse]]with:[["+tiddler.title+"]]\>\> |[["+tiddler.title+"]] | __"+store.getValue(tiddler,"total")+"__|\n" : ""'
              begin '"|sortable|k\n" 
+"| antal | tid | [[lektier i|fag]] |ialt|h\n"' 
end 'count+" lektier i alt\n"' none '"ingen lektier \n"'>>
/%
!påmindelse
<<reminder >>
!end påmindelse
%/
text/plain
.txt .text .js .vbs .asp .cgi .pl
----
text/html
.htm .html .hta .htx .mht
----
text/comma-separated-values
.csv
----
text/javascript
.js
----
text/css
.css
----
text/xml
.xml .xsl .xslt
----
image/gif
.gif
----
image/jpeg
.jpg .jpe .jpeg
----
image/png
.png
----
image/bmp
.bmp
----
image/tiff
.tif .tiff
----
audio/basic
.au .snd
----
audio/wav
.wav
----
audio/x-pn-realaudio
.ra .rm .ram
----
audio/x-midi
.mid .midi
----
audio/mp3
.mp3
----
audio/m3u
.m3u
----
video/x-ms-asf
.asf
----
video/avi
.avi
----
video/mpeg
.mpg .mpeg
----
video/quicktime
.qt .mov .qtvr
----
application/pdf
.pdf
----
application/rtf
.rtf
----
application/postscript
.ai .eps .ps
----
application/wordperfect
.wpd
----
application/mswrite
.wri
----
application/msexcel
.xls .xls3 .xls4 .xls5 .xlw
----
application/msword
.doc
----
application/mspowerpoint
.ppt .pps
----
application/x-director
.swa
----
application/x-shockwave-flash
.swf
----
application/x-zip-compressed
.zip
----
application/x-gzip
.gz
----
application/x-rar-compressed
.rar
----
application/octet-stream
.com .exe .dll .ocx
----
application/java-archive
.jar
[[AttachFilePlugin]] reads binary data from locally-stored files (e.g., images, PDFs, mp3's, etc.) and converts it to base64-encoded text that is stored in tiddlers tagged with<<tag attachment>>. [[AttachFilePluginFormatters]] allows you to use those tiddlers in place of the external path/file references that are normally part of the image and external links wiki syntax.

[[FileDropPlugin]] and [[FileDropPluginConfig]] allow you to quickly create attachment tiddlers simply by dragging files directly from your system's desktop folder display and dropping it onto an open TiddlyWiki document.  Text files are automatically created as simple tiddlers, while binary files are automatically encoded and attached.
/***
|Name|AttachFilePlugin|
|Source|http://www.TiddlyTools.com/#AttachFilePlugin|
|Documentation|http://www.TiddlyTools.com/#AttachFilePluginInfo|
|Version|4.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Requires|AttachFilePluginFormatters, AttachFileMIMETypes|
|Description|Store binary files as base64-encoded tiddlers with fallback links for separate local and/or remote file storage|
Store or link binary files (such as jpg, gif, pdf or even mp3) within your TiddlyWiki document and then use them as images or links from within your tiddler content.
> Important note: As of version 3.6.0, in order to //render// images and other binary attachments created with this plugin, you must also install [[AttachFilePluginFormatters]], which extends the behavior of the TiddlyWiki core formatters for embedded images ({{{[img[tooltip|image]]}}}), linked embedded images ({{{[img[tooltip|image][link]]}}}), and external/"pretty" links ({{{[[label|link]]}}}), so that these formatter will process references to attachment tiddlers as if a normal file reference had been provided. |
!!!!!Documentation
>see [[AttachFilePluginInfo]]
!!!!!Inline interface (live)
>see [[AttachFile]] (shadow tiddler)
><<tiddler AttachFile>>
!!!!!Revisions
<<<
2009.06.04 [4.0.0] changed attachment storage format to use //sections// instead of embedded substring markers.
|please see [[AttachFilePluginInfo]] for additional revision details|
2005.07.20 [1.0.0] Initial Release
<<<
!!!!!Code
***/
// // version
//{{{
version.extensions.AttachFilePlugin= {major: 4, minor: 0, revision: 0, date: new Date(2009,6,4)};

// shadow tiddler
config.shadowTiddlers.AttachFile="<<attach inline>>";

// add 'attach' backstage task (insert before built-in 'importTask')
if (config.tasks) { // for TW2.2b or above
	config.tasks.attachTask = {
		text: "attach",
		tooltip: "Attach a binary file as a tiddler",
		content: "<<attach inline>>"
	}
	config.backstageTasks.splice(config.backstageTasks.indexOf("importTask"),0,"attachTask");
}

config.macros.attach = {
// // lingo
//{{{
	label: "attach file",
	tooltip: "Attach a file to this document",
	linkTooltip: "Attachment: ",

	typeList: "AttachFileMIMETypes",

	titlePrompt: " enter tiddler title...",
	MIMEPrompt: "<option value=''>select MIME type...</option><option value='editlist'>[edit list...]</option>",
	localPrompt: " enter local path/filename...",
	URLPrompt: " enter remote URL...",

	tiddlerErr: "Please enter a tiddler title",
	sourceErr: "Please enter a source path/filename",
	storageErr: "Please select a storage method: embedded, local or remote",
	MIMEErr: "Unrecognized file format.  Please select a MIME type",
	localErr: "Please enter a local path/filename",
	URLErr: "Please enter a remote URL",
	fileErr: "Invalid path/file or file not found",

	tiddlerFormat: '!usage\n{{{%0}}}\n%0\n!notes\n%1\n!type\n%2\n!file\n%3\n!url\n%4\n!data\n%5\n',

//}}}
// // macro definition
//{{{
	handler:
	function(place,macroName,params) {
		if (params && !params[0])
			{ createTiddlyButton(place,this.label,this.tooltip,this.toggleAttachPanel); return; }
		var id=params.shift();
		this.createAttachPanel(place,id+"_attachPanel",params);
		document.getElementById(id+"_attachPanel").style.position="static";
		document.getElementById(id+"_attachPanel").style.display="block";
	},
//}}}
//{{{
	createAttachPanel:
	function(place,panel_id,params) {
		if (!panel_id || !panel_id.length) var panel_id="_attachPanel";
		// remove existing panel (if any)
		var panel=document.getElementById(panel_id); if (panel) panel.parentNode.removeChild(panel);
		// set styles for this panel
		setStylesheet(this.css,"attachPanel");
		// create new panel
		var title=""; if (params && params[0]) title=params.shift();
		var types=this.MIMEPrompt+this.formatListOptions(store.getTiddlerText(this.typeList)); // get MIME types
		panel=createTiddlyElement(place,"span",panel_id,"attachPanel",null);
		var html=this.html.replace(/%id%/g,panel_id);
		html=html.replace(/%title%/g,title);
		html=html.replace(/%disabled%/g,title.length?"disabled":"");
		html=html.replace(/%IEdisabled%/g,config.browser.isIE?"disabled":"");
		html=html.replace(/%types%/g,types);
		panel.innerHTML=html;
		if (config.browser.isGecko) { // FF3 FIXUP
			document.getElementById("attachSource").style.display="none";
			document.getElementById("attachFixPanel").style.display="block";
		}
		return panel;
	},
//}}}
//{{{
	toggleAttachPanel:
	function (e) {
		if (!e) var e = window.event;
		var parent=resolveTarget(e).parentNode;
		var panel = document.getElementById("_attachPanel");
		if (panel==undefined || panel.parentNode!=parent)
			panel=config.macros.attach.createAttachPanel(parent,"_attachPanel");
		var isOpen = panel.style.display=="block";
		if(config.options.chkAnimate)
			anim.startAnimating(new Slider(panel,!isOpen,e.shiftKey || e.altKey,"none"));
		else
			panel.style.display = isOpen ? "none" : "block" ;
		e.cancelBubble = true;
		if (e.stopPropagation) e.stopPropagation();
		return(false);
	},
//}}}
//{{{
	formatListOptions:
	function(text) {
		if (!text || !text.trim().length) return "";
		// get MIME list content from text
		var parts=text.split("\n----\n");
		var out="";
		for (var p=0; p<parts.length; p++) {
			var lines=parts[p].split("\n");
			var label=lines.shift(); // 1st line=display text
			var value=lines.shift(); // 2nd line=item value
			out +='<option value="%1">%0</option>'.format([label,value]);
		}
		return out;
	},
//}}}
// // interface definition
//{{{
	css:
	".attachPanel { display: none; position:absolute; z-index:10; width:35em; right:105%; top:0em;\
		background-color: #eee; color:#000; font-size: 8pt; line-height:110%;\
		border:1px solid black; border-bottom-width: 3px; border-right-width: 3px;\
		padding: 0.5em; margin:0em; -moz-border-radius:1em;-webkit-border-radius:1em; text-align:left }\
	.attachPanel form { display:inline;border:0;padding:0;margin:0; }\
	.attachPanel select { width:99%;margin:0px;font-size:8pt;line-height:110%;}\
	.attachPanel input  { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%}\
	.attachPanel textarea { width:98%;margin:0px;height:2em;font-size:8pt;line-height:110%}\
	.attachPanel table { width:100%;border:0;margin:0;padding:0;color:inherit; }\
	.attachPanel tbody, .attachPanel tr, .attachPanel td { border:0;margin:0;padding:0;color:#000; }\
	.attachPanel .box { border:1px solid black; padding:.3em; margin:.3em 0px; background:#f8f8f8; \
		-moz-border-radius:5px;-webkit-border-radius:5px; }\
	.attachPanel .chk { width:auto;border:0; }\
	.attachPanel .btn { width:auto; }\
	.attachPanel .btn2 { width:49%; }\
	",
//}}}
//{{{
	html:
	'<form>\
		attach from source file\
		<input type="file" id="attachSource" name="source" size="56"\
			onChange="config.macros.attach.onChangeSource(this)">\
		<div id="attachFixPanel" style="display:none"><!-- FF3 FIXUP -->\
			<input type="text" id="attachFixSource" style="width:90%"\
				title="Enter a path/file to attach"\
				onChange="config.macros.attach.onChangeSource(this);">\
			<input type="button" style="width:7%" value="..."\
				title="Enter a path/file to attach"\
				onClick="config.macros.attach.askForFilename(document.getElementById(\'attachFixSource\'));">\
		</div><!--end FF3 FIXUP-->\
		<div class="box">\
		<table style="border:0"><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
			embed data <input type=checkbox class=chk name="useData" %IEdisabled% \
				onclick="if (!this.form.MIMEType.value.length)\
					this.form.MIMEType.selectedIndex=this.checked?1:0; ">&nbsp;\
		</td><td style="border:0">\
			<select size=1 name="MIMEType" \
				onchange="this.title=this.value; if (this.value==\'editlist\')\
					{ this.selectedIndex=this.form.useData.checked?1:0; story.displayTiddler(null,config.macros.attach.typeList,2); return; }">\
				<option value=""></option>\
				%types%\
			</select>\
		</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
			local link <input type=checkbox class=chk name="useLocal"\
				onclick="this.form.local.value=this.form.local.defaultValue=this.checked?config.macros.attach.localPrompt:\'\';">&nbsp;\
		</td><td style="border:0">\
			<input type=text name="local" size=15 autocomplete=off value=""\
				onchange="this.form.useLocal.checked=this.value.length" \
				onkeyup="this.form.useLocal.checked=this.value.length" \
				onfocus="if (!this.value.length) this.value=config.macros.attach.localPrompt; this.select()">\
		</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
			remote link <input type=checkbox class=chk name="useURL"\
				onclick="this.form.URL.value=this.form.URL.defaultValue=this.checked?config.macros.attach.URLPrompt:\'\';\">&nbsp;\
		</td><td style="border:0">\
			<input type=text name="URL" size=15 autocomplete=off value=""\
				onfocus="if (!this.value.length) this.value=config.macros.attach.URLPrompt; this.select()"\
				onchange="this.form.useURL.checked=this.value.length;"\
				onkeyup="this.form.useURL.checked=this.value.length;">\
		</td></tr></table>\
		</div>\
		<table style="border:0"><tr style="border:0"><td style="border:0;text-align:right;vertical-align:top;width:1%;white-space:nowrap">\
			notes&nbsp;\
		</td><td style="border:0" colspan=2>\
			<textarea name="notes" style="width:98%;height:3.5em;margin-bottom:2px"></textarea>\
		</td><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
			attach as&nbsp;\
		</td><td style="border:0" colspan=2>\
			<input type=text name="tiddlertitle" size=15 autocomplete=off value="%title%"\
				onkeyup="if (!this.value.length) { this.value=config.macros.attach.titlePrompt; this.select(); }"\
				onfocus="if (!this.value.length) this.value=config.macros.attach.titlePrompt; this.select()" %disabled%>\
		</td></tr></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
			add tags&nbsp;\
		</td><td style="border:0">\
			<input type=text name="tags" size=15 autocomplete=off value="" onfocus="this.select()">\
		</td><td style="width:40%;text-align:right;border:0">\
			<input type=button class=btn2 value="attach"\
				onclick="config.macros.attach.onClickAttach(this)"><!--\
			--><input type=button class=btn2 value="close"\
				onclick="var panel=document.getElementById(\'%id%\'); if (panel) panel.parentNode.removeChild(panel);">\
		</td></tr></table>\
	</form>',
//}}}
// // control processing
//{{{
	onChangeSource:
	function(here) {
		var form=here.form;
		var list=form.MIMEType;
		var theFilename  = here.value;
		var theExtension = theFilename.substr(theFilename.lastIndexOf('.')).toLowerCase();
		// if theFilename is in current document folder, remove path prefix and use relative reference
		var h=document.location.href; folder=getLocalPath(decodeURIComponent(h.substr(0,h.lastIndexOf("/")+1)));
		if (theFilename.substr(0,folder.length)==folder) theFilename='./'+theFilename.substr(folder.length);
		else theFilename='file:///'+theFilename; // otherwise, use absolute reference
		theFilename=theFilename.replace(/\\/g,"/"); // fixup: change \ to /
		form.useLocal.checked = true;
		form.local.value = theFilename;
		form.useData.checked = !form.useData.disabled;
		list.selectedIndex=1;
		for (var i=0; i<list.options.length; i++) // find matching MIME type
			if (list.options[i].value.indexOf(theExtension)!=-1) { list.selectedIndex = i; break; }
		if (!form.tiddlertitle.disabled)
			form.tiddlertitle.value=theFilename.substr(theFilename.lastIndexOf('/')+1); // get tiddlername from filename
	},
//}}}
//{{{
	onClickAttach:
	function (here) {
		clearMessage();
		// get input values
		var form=here.form;
		var src=form.source; if (config.browser.isGecko) src=document.getElementById("attachFixSource");
		src=src.value!=src.defaultValue?src.value:"";
		var when=(new Date()).formatString(config.macros.timeline.dateFormat);
		var title=form.tiddlertitle.value;
		var local = form.local.value!=form.local.defaultValue?form.local.value:"";
		var url = form.URL.value!=form.URL.defaultValue?form.URL.value:"";
		var notes = form.notes.value;
		var tags = "attachment excludeMissing "+form.tags.value;
		var useData=form.useData.checked;
		var useLocal=form.useLocal.checked;
		var useURL=form.useURL.checked;
		var mimetype = form.MIMEType.value.length?form.MIMEType.options[form.MIMEType.selectedIndex].text:"";
		// validate checkboxes and get filename
		if (useData) {
			if (src.length) { if (!theLocation) var theLocation=src; }
			else { alert(this.sourceErr); src.focus(); return false; }
		}
		if (useLocal) {
			if (local.length) { if (!theLocation) var theLocation = local; }
			else { alert(this.localErr); form.local.focus(); return false; }
		}
		if (useURL) {
			if (url.length) { if (!theLocation) var theLocation = url; }
			else { alert(this.URLErr); form.URL.focus(); return false; }
		}
		if (!(useData||useLocal||useURL))
			{ form.useData.focus(); alert(this.storageErr); return false; }
		if (!theLocation)
			{ src.focus(); alert(this.sourceErr); return false; }
		if (!title || !title.trim().length || title==this.titlePrompt)
			{ form.tiddlertitle.focus(); alert(this.tiddlerErr); return false; }
		// if not already selected, determine MIME type based on filename extension (if any)
		if (useData && !mimetype.length && theLocation.lastIndexOf('.')!=-1) {
			var theExt = theLocation.substr(theLocation.lastIndexOf('.')).toLowerCase();
			var theList=form.MIMEType;
			for (var i=0; i<theList.options.length; i++)
				if (theList.options[i].value.indexOf(theExt)!=-1)
					{ var mimetype=theList.options[i].text; theList.selectedIndex=i; break; }
		}
		// attach the file
		return this.createAttachmentTiddler(src, when, notes, tags, title,
			useData, useLocal, useURL, local, url, mimetype);
	},
	getMIMEType:
	function(src,def) {
		var ext = src.substr(src.lastIndexOf('.')).toLowerCase();
		var list=store.getTiddlerText(this.typeList);
		if (!list || !list.trim().length) return def;
		// get MIME list content from tiddler
		var parts=list.split("\n----\n");
		for (var p=0; p<parts.length; p++) {
			var lines=parts[p].split("\n");
			var mime=lines.shift(); // 1st line=MIME type
			var match=lines.shift(); // 2nd line=matching extensions
			if (match.indexOf(ext)!=-1) return mime;
		}
		return def;
	},
	createAttachmentTiddler:
	function (src, when, notes, tags, title, useData, useLocal, useURL, local, url, mimetype, noshow) {
		if (useData) { // encode the data
			if (!mimetype.length) {
				alert(this.MIMEErr);
				form.MIMEType.selectedIndex=1; form.MIMEType.focus();
				return false;
			}
			var d = this.readFile(src); if (!d) { return false; }
			displayMessage('encoding '+src);
			var encoded = this.encodeBase64(d);
			displayMessage('file size='+d.length+' bytes, encoded size='+encoded.length+' bytes');
		}
		var usage=(mimetype.substr(0,5)=="image"?'[img[%0]]':'[[%0|%0]]').format([title]);
		var theText=this.tiddlerFormat.format([
			usage, notes.length?notes:'//none//', mimetype,
			useLocal?local.replace(/\\/g,'/'):'', useURL?url:'',
			useData?('data:'+mimetype+';base64,'+encoded):'' ]);
		store.saveTiddler(title,title,theText,config.options.txtUserName,new Date(),tags);
		var panel=document.getElementById("attachPanel"); if (panel) panel.style.display="none";
		if (!noshow) { story.displayTiddler(null,title); story.refreshTiddler(title,null,true); }
		displayMessage('attached "'+title+'"');
		return true;
	},
//}}}
// // base64 conversion
//{{{
	encodeBase64:
	function (d) {
		if (!d) return null;
		// encode as base64
		var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
		var out="";
		var chr1,chr2,chr3="";
		var enc1,enc2,enc3,enc4="";
		for (var count=0,i=0; i<d.length; ) {
			chr1=d.charCodeAt(i++);
			chr2=d.charCodeAt(i++);
			chr3=d.charCodeAt(i++);
			enc1=chr1 >> 2;
			enc2=((chr1 & 3) << 4) | (chr2 >> 4);
			enc3=((chr2 & 15) << 2) | (chr3 >> 6);
			enc4=chr3 & 63;
			if (isNaN(chr2)) enc3=enc4=64;
			else if (isNaN(chr3)) enc4=64;
			out+=keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4);
			chr1=chr2=chr3=enc1=enc2=enc3=enc4="";
		}
		return out;
	},
	decodeBase64: function(input) {
		var out="";
		var chr1,chr2,chr3;
		var enc1,enc2,enc3,enc4;
		var i = 0;
		// remove all characters that are not A-Z, a-z, 0-9, +, /, or =
		input=input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
		do {
			enc1=keyStr.indexOf(input.charAt(i++));
			enc2=keyStr.indexOf(input.charAt(i++));
			enc3=keyStr.indexOf(input.charAt(i++));
			enc4=keyStr.indexOf(input.charAt(i++));
			chr1=(enc1 << 2) | (enc2 >> 4);
			chr2=((enc2 & 15) << 4) | (enc3 >> 2);
			chr3=((enc3 & 3) << 6) | enc4;
			out=out+String.fromCharCode(chr1);
			if (enc3!=64) out=out+String.fromCharCode(chr2);
			if (enc4!=64) out=out+String.fromCharCode(chr3);
		} while (i<input.length);
		return out;
	},
//}}}
// // I/O functions
//{{{
	readFile: // read local BINARY file data
	function(filePath) {
		if(!window.Components) { return null; }
		try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }
		catch(e) { alert("access denied: "+filePath); return null; }
		var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
		try { file.initWithPath(filePath); } catch(e) { alert("cannot read file - invalid path: "+filePath); return null; }
		if (!file.exists()) { alert("cannot read file - not found: "+filePath); return null; }
		var inputStream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
		inputStream.init(file, 0x01, 00004, null);
		var bInputStream = Components.classes["@mozilla.org/binaryinputstream;1"].createInstance(Components.interfaces.nsIBinaryInputStream);
		bInputStream.setInputStream(inputStream);
		return(bInputStream.readBytes(inputStream.available()));
	},
//}}}
//{{{
	writeFile:
	function(filepath,data) {
		// TBD: decode base64 and write BINARY data to specified local path/filename
		return(false);
	},
//}}}
//{{{
	askForFilename: // for FF3 fixup
	function(target) {
		var msg=config.messages.selectFile;
		if (target && target.title) msg=target.title; // use target field tooltip (if any) as dialog prompt text
		// get local path for current document
		var path=getLocalPath(document.location.href);
		var p=path.lastIndexOf("/"); if (p==-1) p=path.lastIndexOf("\\"); // Unix or Windows
		if (p!=-1) path=path.substr(0,p+1); // remove filename, leave trailing slash
		var file=""
		var result=window.mozAskForFilename(msg,path,file,true); // FF3 FIXUP ONLY
		if (target && result.length) // set target field and trigger handling
			{ target.value=result; target.onchange(); }
		return result; 
	}
};
//}}}
//{{{
if (window.mozAskForFilename===undefined) { // also defined by CoreTweaks (for ticket #604)
	window.mozAskForFilename=function(msg,path,file,mustExist) {
		if(!window.Components) return false;
		try {
			netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
			var nsIFilePicker = window.Components.interfaces.nsIFilePicker;
			var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
			picker.init(window, msg, mustExist?nsIFilePicker.modeOpen:nsIFilePicker.modeSave);
			var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
			thispath.initWithPath(path);
			picker.displayDirectory=thispath;
			picker.defaultExtension='';
			picker.defaultString=file;
			picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterText|nsIFilePicker.filterHTML);
			if (picker.show()!=nsIFilePicker.returnCancel)
				var result=picker.file.persistentDescriptor;
		}
		catch(ex) { displayMessage(ex.toString()); }
		return result;
	}
}
//}}}
/***
|Name|AttachFilePluginFormatters|
|Source|http://www.TiddlyTools.com/#AttachFilePluginFormatters|
|Version|4.0.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1.3|
|Type|plugin|
|Description|run-time library for displaying attachment tiddlers|
Runtime processing for //rendering// attachment tiddlers created by [[AttachFilePlugin]].   Attachment tiddlers are tagged with<<tag attachment>>and contain binary file content (e.g., jpg, gif, pdf, mp3, etc.) that has been stored directly as base64 text-encoded data or can be loaded from external files stored on a local filesystem or remote web server.  Note: after creating new attachment tiddlers, you can remove [[AttachFilePlugin]], as long as you retain //this// tiddler (so that images can be rendered later on).
!!!!!Formatters
<<<
This plugin extends the behavior of the following TiddlyWiki core "wikify()" formatters:
* embedded images: {{{[img[tooltip|image]]}}}
* linked embedded images: {{{[img[tooltip|image][link]]}}}
* external/"pretty" links: {{{[[label|link]]}}}
''Please refer to AttachFilePlugin (source: http://www.TiddlyTools.com/#AttachFilePlugin) for additional information.''
<<<
!!!!!Revisions
<<<
2009.10.10 [4.0.1] in fileExists(), check for IE to avoid hanging Chrome during startup
2009.06.04 [4.0.0] changed attachment storage format to use //sections// instead of embedded substring markers.
2008.01.08 [*.*.*] plugin size reduction: documentation moved to ...Info
2007.12.04 [*.*.*] update for TW2.3.0: replaced deprecated core functions, regexps, and macros
2007.10.29 [3.7.0] more code reduction: removed upload handling from AttachFilePlugin (saves ~7K!)
2007.10.28 [3.6.0] removed duplicate formatter code from AttachFilePlugin (saves ~10K!) and updated documentation accordingly.  This plugin ([[AttachFilePluginFormatters]]) is now //''required''// in order to display attached images/binary files within tiddler content.
2006.05.20 [3.4.0] through 2007.03.01 [3.5.3] sync with AttachFilePlugin
2006.05.13 [3.2.0] created from AttachFilePlugin v3.2.0
<<<
!!!!!Code
***/
// // version
//{{{
version.extensions.AttachFilePluginFormatters= {major: 4, minor: 0, revision: 1, date: new Date(2009,10,10)};
//}}}

//{{{
if (config.macros.attach==undefined) config.macros.attach= { };
//}}}
//{{{
if (config.macros.attach.isAttachment==undefined) config.macros.attach.isAttachment=function (title) {
	var tiddler = store.getTiddler(title);
	if (tiddler==undefined || tiddler.tags==undefined) return false;
	return (tiddler.tags.indexOf("attachment")!=-1);
}
//}}}

//{{{
// test for local file existence - returns true/false without visible error display
if (config.macros.attach.fileExists==undefined) config.macros.attach.fileExists=function(f) {
	if(window.Components) { // MOZ
		try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }
		catch(e) { return false; } // security access denied
		var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
		try { file.initWithPath(f); }
		catch(e) { return false; } // invalid directory
		return file.exists();
	}
	else if (config.browser.isIE) { // IE
		var fso = new ActiveXObject("Scripting.FileSystemObject");
		return fso.FileExists(f);
	}
	else return true; // other browsers: assume file exists
}
//}}}

//{{{
if (config.macros.attach.getAttachment==undefined) config.macros.attach.getAttachment=function(title) {

	// extract embedded data, local and remote links (if any)
	var text=store.getTiddlerText(title,'');
	var embedded=store.getTiddlerText(title+'##data','').trim();
	var locallink=store.getTiddlerText(title+'##file','').trim();
	var remotelink=store.getTiddlerText(title+'##url','').trim();

	// backward-compatibility for older attachments (pre 4.0.0)
	var startmarker="---BEGIN_DATA---\n";
	var endmarker="\n---END_DATA---";
	var pos=0; var endpos=0;
	if ((pos=text.indexOf(startmarker))!=-1 && (endpos=text.indexOf(endmarker))!=-1)
		embedded="data:"+(text.substring(pos+startmarker.length,endpos)).replace(/\n/g,'');
	if ((pos=text.indexOf("/%LOCAL_LINK%/"))!=-1)
		locallink=text.substring(text.indexOf("|",pos)+1,text.indexOf("]]",pos));
	if ((pos=text.indexOf("/%REMOTE_LINK%/"))!=-1)
		remotelink=text.substring(text.indexOf("|",pos)+1,text.indexOf("]]",pos));

	// if there is a data: URI defined (not supported by IE)
	if (embedded.length && !config.browser.isIE) return embedded;

	// document is being served remotely... use remote URL (if any)  (avoids security alert)
	if (remotelink.length && document.location.protocol!="file:")
		return remotelink;  

	// local link only... return link without checking file existence (avoids security alert)
	if (locallink.length && !remotelink.length) 
		return locallink; 

	// local link, check for file exist... use local link if found
	if (locallink.length) { 
		locallink=locallink.replace(/^\.[\/\\]/,''); // strip leading './' or '.\' (if any)
		if (this.fileExists(getLocalPath(locallink))) return locallink;
		// maybe local link is relative... add path from current document and try again
		var pathPrefix=document.location.href;  // get current document path and trim off filename
		var slashpos=pathPrefix.lastIndexOf("/"); if (slashpos==-1) slashpos=pathPrefix.lastIndexOf("\\"); 
		if (slashpos!=-1 && slashpos!=pathPrefix.length-1) pathPrefix=pathPrefix.substr(0,slashpos+1);
		if (this.fileExists(getLocalPath(pathPrefix+locallink))) return locallink;
	}

	// no embedded data, no local (or not found), fallback to remote URL (if any)
	if (remotelink.length) return remotelink;

	// attachment URL doesn't resolve, just return input as is
	return title;
}
//}}}
//{{{
if (config.macros.attach.init_formatters==undefined) config.macros.attach.init_formatters=function() {
	if (this.initialized) return;

	// find the formatter for "image" and replace the handler
	for (var i=0; i<config.formatters.length && config.formatters[i].name!="image"; i++);
	if (i<config.formatters.length)	config.formatters[i].handler=function(w) {
		this.lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart) // Simple bracketted link
			{
			var e = w.output;
			if(lookaheadMatch[5])
				{
				var link = lookaheadMatch[5];
				// ELS -------------
				var external=config.formatterHelpers.isExternalLink(link);
				if (external)
					{
					if (config.macros.attach.isAttachment(link))
						{
						e = createExternalLink(w.output,link);
						e.href=config.macros.attach.getAttachment(link);
						e.title = config.macros.attach.linkTooltip + link;
						}
					else
						e = createExternalLink(w.output,link);
					}
				else 
					e = createTiddlyLink(w.output,link,false,null,w.isStatic);
				// ELS -------------
				addClass(e,"imageLink");
				}
			var img = createTiddlyElement(e,"img");
			if(lookaheadMatch[1])
				img.align = "left";
			else if(lookaheadMatch[2])
				img.align = "right";
			if(lookaheadMatch[3])
				img.title = lookaheadMatch[3];
			img.src = lookaheadMatch[4];
			// ELS -------------
			if (config.macros.attach.isAttachment(lookaheadMatch[4]))
				img.src=config.macros.attach.getAttachment(lookaheadMatch[4]);
			// ELS -------------
			w.nextMatch = this.lookaheadRegExp.lastIndex;
		}
	}
//}}}
//{{{
	// find the formatter for "prettyLink" and replace the handler
	for (var i=0; i<config.formatters.length && config.formatters[i].name!="prettyLink"; i++);
	if (i<config.formatters.length)	{
		config.formatters[i].handler=function(w) {
			this.lookaheadRegExp.lastIndex = w.matchStart;
			var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
			if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
				var e;
				var text = lookaheadMatch[1];
				if(lookaheadMatch[3]) {
					// Pretty bracketted link
					var link = lookaheadMatch[3];
					if (config.macros.attach.isAttachment(link)) {
						e = createExternalLink(w.output,link);
						e.href=config.macros.attach.getAttachment(link);
						e.title=config.macros.attach.linkTooltip+link;
					}
					else e = (!lookaheadMatch[2] && config.formatterHelpers.isExternalLink(link))
						? createExternalLink(w.output,link)
						: createTiddlyLink(w.output,link,false,null,w.isStatic);
				} else {
					e = createTiddlyLink(w.output,text,false,null,w.isStatic);
				}
				createTiddlyText(e,text);
				w.nextMatch = this.lookaheadRegExp.lastIndex;
			}
		}
	} // if "prettyLink" formatter found
	this.initialized=true;
}
//}}}
//{{{
config.macros.attach.init_formatters(); // load time init
//}}}
//{{{
if (TiddlyWiki.prototype.coreGetRecursiveTiddlerText==undefined) {
	TiddlyWiki.prototype.coreGetRecursiveTiddlerText = TiddlyWiki.prototype.getRecursiveTiddlerText;
	TiddlyWiki.prototype.getRecursiveTiddlerText = function(title,defaultText,depth) {
		return config.macros.attach.isAttachment(title)?
			config.macros.attach.getAttachment(title):this.coreGetRecursiveTiddlerText.apply(this,arguments);
	}
}
//}}}
!usage
{{{[img[AttachFileSample]]}}}
[img[AttachFileSample]]
!notes
example of encoded data attachment
!type
image/gif
!file
./images/meow.gif
!url
http://www.TiddlyTools.com/images/meow.gif
!data
data:image/gif;base64,R0lGODlhOABQAPcAAAAACAAAEAAICAgICAgLDBAQCAQQGRAIEBgICBAQEBAQGBAYFBoOEhwUFCEYEBgYGA4cIBkgGyEcHCEhISkYGCkcHCEpHCklIRAgMRkmNSElKSEpNikeKykpKSExQiE5QjEhJTEpITEpKSkpMSkxISk1KTExITExKSktNTEpMTEpOTExMSk5MSkxOSkxQik5PTkrKTkxMTE8KTFCMTExOTExQjE5PTFCPTk3MzlCMTkxQjk5QkI0MzlGPUg9M01JNi88TTlEUkI8REJCSkZDRFBDQkY/UFA/TjNMUkNOS1JKSkpWRj1KWEpKWj9OXEVZZlhMRlVLVVpSUlReUFdSYFVhX1JSa1VfbmBbU11ia2dcV3FjXVpldWVkb2tnb3tnbGZ1ZHV6aWVwe3d5c2N4iXN3gntzgHeBiYd2dYWHeoh/jIKLkJWEfZmUh5CNlJ+VkICPn46XpZiSo5WfoJycnKaemaGcqKWlpZWnraWtqa2qoq2lrZavvKW4xK2lta2ws/8A/7WcjLWllLWlpbWlrb2tnMatnLWtpbWtrb2trbWttb2ttbWtvbW1pca1pbW1ra21va21xrW1tbW1vbW1xrW9tb21rb21tb21vb21xr29rb29tca9sca1vc69rda9ra29wa3GxrW9vbW9xq29zrHGyrPB0rXG1r29vb29xr29zr3Gvb3Gxr3Gzr3G1sa9vcbGtc7GtdbGtcbGvc7GvdbGvd7Gvca9xsa9zsbGxsbGzsbG1s7DyNbGxtbGzs7G1rjQ2MbO0sbO3sbW1s7Owc7OzsbW3sbe3s7O1s7W0tbQx+HUzNDQ29bW1tvb1ufa1sPW6dDW4dbW3trY4sni7dbk797e3tbx9N7n3ufe3t7e597n597i7+fe597s9N73++fn3ufn5+fn7+fv5+fv7+/e5+/r4vfr4ufn9+fv9+fv/+/n7+/v8/Pz7/fv9+/v/+f3++f//+/39+/3/+//9+////f37/f39/f3//f/9/f////37//39//3////9////yH5BAEAAIAALAAAAAA4AFAAQAj+AAEJHEiwoMGDCBMqXIiwiA8tXbxIgXHhgY+FICSIiCFFihIeXRgm9OKlDJMqYs506UIDRIUKD7w8kLCiAw0q0ao8WCFhwgQqDx7E+EJHm0gpUaI0ibKDBo0dXeakazEkxYUOGjRMSQOmQw874eR9IHNPXrFba5Y8CLNDyYULGlZQRVjtzJCmTnew2AGp2j19gAGTC6ctnLvDZfWR07AjCJAd4fTduxctFapbiDKTQ7gjSZcsT6PQqLmCxhA78v4GnuxOHuGzeei8kVLkh5I1b9y80XPp0q1s+lK7E3eQjSIvbqJAEiPGjR0/c9REqyavtTx9rVtn09asmJsvbMb+uLlcrFn3YsqsiRM33M3CDlkUsWMnT978cM206Y/WjH+187cEGOArqKCiCCJ00DEHHXXkIdJBEgQVlEsS1iThAwlg+EAXcNgBySiQQILKJWOM8YYy2Tyo4oqA5HELMtxxVwyLNA5UxAUxxPBWjTjGIIIWNSKUhhddUFFFU0O89BZjQ9DQwYUPVKABCEJg8cYZK5aRxRNM0JDCCimkQMUONXUAwlVOKbGDGHhAMEczgemjTV2jXeCTBqZFoZASVDDRxGildTbHX3zUgJeTZ0Cimj5kBLHDEEM0IU59cd6TDmHm7WFQNHDAwcVoT5m2Qg2tAJPYau6wY01/2ohTjDb+Z91hhiK3FMiILnkcWIw1iLlz0BuPquHEFaDWtEMVclyXWpz1pUNONdKkkkoWyEGSqyKXvYJeNtmEo6pRCEkyaX3ykMPOYOWSw41+2rDTGjndNoMMMsXoUkw05SFzXnlnFaiIikpOIIEUbrzaSit+RPFWByK4ocoordzC74iKKHLGFmm4kQciQSIkgQQIIEAAAQ+Q/IDIIieQAAFROPcHI9heUodh2ujT8c0CzcEdt8Ph7DONGgwxxs+A7BADEUT4SOMEMWyBBRYiEA2ID16oYYYZDsXwQGNOMHGFFUz4ucMFND2qRBdmeDEE0Uq0IccWSuDQwdwXXrBCkxVFKOH+VVB8UceMNHohxhVNipDCEBqkoIGUTu70AA4P3PUEYG6cEQXiM0lwwRBryKNiF1dcwYQQDK+wQxZijGYmnk+tsEIVGrgTZ6VniMHUCHZ3EAWQCWlRxe+X47BCy8UEc08GcmfVwVUxLDHFECPoE01TTWhjTRQimBBDEW64QUYTZczBhBcJCTFEFKODSkMUZcAJWDWMjDJHGW4089df3DiRBRDgwzE7YPLgji5uIQmEzIMaeHgU+nbwqCaEaFEAXI82rqOav8gDLgOzjj5c9YpbXEIR2bjHLQ5yBjdw4QxjGs0OOvA6MQSjGrNLjX2akQ1U0KEMXlACDYh0uS3M4Q3+CeoAHbKBmHuE4yBJ6EEXUveomiBuCKhwA3AqOJmypIMb+ILEH1ChhTXoIUEbqwMiXsELZThjOOEgB8cO4gYqKOEMDNxhFKjQBFmFw4IAZM25uJOKMWyhi35gxFk6WAxnqOcw5wKcQdAgJz84shrVcIMfRpEOSMqjGtGoTnVSJY78dIcRf2ADFPwgsbM0Q2LmaRVmGNKGYmzSPvYxFzsqOZ12dSsbACrlq85Sq1sQ6EBrfBAReHI1baTjUuGIhjZ0UZkC3cI89CqPeQrkBzq4IQ1nWMOCCsijoPhgBUKoQstokJUJQOkBSlADJVqRimKgghEwe4MW0KCxZvisIif+QwCUMnShkD2ABmaQAyQoMYoCXYINdCgGcKRmEAkRQAErI4DKgiIHP/wBEoy4hDvN0wxfMXRFo7CXNYh4j492TBG7VJVJV1oQKDBUCzi6WZQuUAai+UAEPvDRBWikEaTxIGo/EwIP/igFH0hARZoTwRC+8AUtFEFqPlCCFryghZtSRE8H6cIOHnABH0iBWl4wwxGgupIiKUEIPqjAqKhihSY4igYjMGcHUrCDKIS1hFKTAlVFAwIq1W19NMCnhCRQgRBAAQ28SIPP1nCGNBTDaXfZQQoq8LGgYAVSILjQBC6wAyEQAQ11SFGNuvC7P+2ACXO4i+kipNYHdIBMppn+hxteRyYqCEwCOJDCHDyqIixoQQxuleyXojA3rFxgBK57ixcmcNozAOYeeAjCGWZiN7hM4AmjUFEVmpCFJrjuSxEhE1ZAYLq7KQFS0RjU/+5xhjI0YQcauEBesKoQM2QBUp113dzm4CjFZaVM8RWCGwA4u3sAowmq1cAE8GQF+iJECXNkwg6E11kmuCEdGSATCLISlyqAwXkQSI0TuACHdBTjDh0Agwmw0EAyiWElCilCEvDrlKfsoAzC0Ecc9uI6DXDVxxPwwgjuAQc8NSEa3UiDMnghu3v8oXZ3QIYX/KCQIdCxKYGiQhei8dw5tHEIXqjCHGAImHR8QAhAuEL+FsrwP8E0QxdwVogC71JjIXShFdcJDH6sUQxFQJAccHCvE87Qh0WVJRrhCJCBFEKNK0yYgZ3NwgrcAIl0zK414qAPAPPsXQvBSR7TrNiBJKGPNyAkGsbgA1NcxwLXuQEPwrA0s9wRDms8N1XuOOYQJLCF/ESDPwOsVR7glCoSliEOZWCgapNwJDm0AoKSqc49FEGFMtyhVqhIWArWoAgF5WEPLmqDfGTXM4M8oQxXSF2kxpSFHbTADX/wS6XIBatmSKILQzAcpMIkhTSo4Q1pGGM2NqmYg1xhd2sYTQqcdAEqJMENmSywJtnBnVsoopomagMQGVSHQVziFc1AETn+qmNPg1CBCkFwQxC+RKa71bUMsnvuZDRZrmog45138HKu6FCxzGhrVdkQRzhEexAiZRMFe2nSClB3B21AsIrycNav34lDN9wiDwW6TBmdEQ720NoaCTmDGqgghnbvQA7ppt8twnKq+rwLktHIgxbaAIU1+AEVxSgGL3hRSF5tkFt3QEgsdOyGO1zUDWVgxK/1lQ53jbwsnNzOKf2giDdAgQ54zzu/aLgePi9kMqZIRzBGMYpfV6PxlaxGu7BjH3FkwxqrwvYYftDO7jxTl2dBRBsYcongkKtcs4w63AszmGaIA1ZnyTtHzaN5iQVIEXpwj0iw4Abr1OdcFKcPu/T+I/lc8rJftapYbOrAItNhQRHyyLS5CMOffb0qGvqqV949WDE63MEN2qRDbGgUg+WtQARbdnr/cUq6wAg5NwfK1H7TdAl+kAd54AYYswYJ8gpBQllcNTdj4AWMEAxyAAE+JiFKIB6jcAvBUC8jAjNugAUmQgfBVCNBAVsLVwVZwAQPYE5Q8hZ/MAqM0AonqAiDoAXioQdEFyTnVIRBoTIJoAAg0AVyYAeRACIjgghh8AaoMFI+gyEhgwAJoE9QQgBaqAAvWAaBdBmXcQd1ACdl8VE6kk8ZsoVJCFEJMGl2MAdzADOv8AYdpQ+8wFIDUTIj44VBAQgeQlC1ogvNgAouykAHFMiHCkEJqtAK0rQqjKgipWcNvyE7k6gip8QOXTeEmcgQbAAI3VByNBIQAAA7
!usage
{{{[img[AttachFileSample2]]}}}
[img[AttachFileSample2]]
!notes
example of external attachment (no embedded data)
!type
image/jpg
!file
./images/meow2.jpg
!url
http://www.TiddlyTools.com/images/meow2.jpg
!data
|''URL:''|http://tiddlywiki.bidix.info/|
|''Author:''|~BidiX|

<<tiddler UserDefinitions>>[[Redigér|Brugere]]
<<popup lærer [[<<tiddler BrugerDefinitioner##editor$))]]>>
/%
!editor
<<option txtUserName>>
!end editor
%/
<<tiddlerList tags:"elev" order:"-title" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' 'elev'$))|\n"  header:"|noborder|k">><<tiddlerList tags:"klasse" order:"-title" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' 'klasse'$))|\n"  header:"|noborder|k">><<tiddlerList tags:"lærer" order:"-title" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' 'lærer'$))|\n"  header:"|noborder|k">><<tiddlerList tags:"bruger" order:"-title" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' 'bruger'$))|\n"  header:"|noborder|k">>

/***
|Name|CalendarPlugin|
|Source|http://www.TiddlyTools.com/#CalendarPlugin|
|Version|1.5.0|
|Author|Eric Shulman|
|Original Author|SteveRumsby|
|License|unknown|
|~CoreVersion|2.1|
|Type|plugin|
|Description|display monthly and yearly calendars|
NOTE: For //enhanced// date popup display, optionally install [[DatePlugin]] and [[ReminderMacros]]
!!!Usage:
<<<
|{{{<<calendar>>}}}|full-year calendar for the current year|
|{{{<<calendar year>>}}}|full-year calendar for the specified year|
|{{{<<calendar year month>>}}}|one month calendar for the specified month and year|
|{{{<<calendar thismonth>>}}}|one month calendar for the current month|
|{{{<<calendar lastmonth>>}}}|one month calendar for last month|
|{{{<<calendar nextmonth>>}}}|one month calendar for next month|
|{{{<<calendar +n>>}}}<br>{{{<<calendar -n>>}}}|one month calendar for a month +/- 'n' months from now|
<<<
!!!Configuration:
<<<
|''First day of week:''<br>{{{config.options.txtCalFirstDay}}}|<<option txtCalFirstDay>>|(Monday = 0, Sunday = 6)|
|''First day of weekend:''<br>{{{config.options.txtCalStartOfWeekend}}}|<<option txtCalStartOfWeekend>>|(Monday = 0, Sunday = 6)|
<<option chkDisplayWeekNumbers>> Display week numbers //(note: Monday will be used as the start of the week)//
|''Week number display format:''<br>{{{config.options.txtWeekNumberDisplayFormat }}}|<<option txtWeekNumberDisplayFormat >>|
|''Week number link format:''<br>{{{config.options.txtWeekNumberLinkFormat }}}|<<option txtWeekNumberLinkFormat >>|
<<<
!!!Code
***/
//{{{
version.extensions.CalendarPlugin= { major: 1, minor: 5, revision: 0, date: new Date(2009,5,31)};
//}}}
//{{{
if(config.options.txtCalFirstDay == undefined)
	config.options.txtCalFirstDay = 0;
if(config.options.txtCalStartOfWeekend == undefined)
	config.options.txtCalStartOfWeekend = 5;
if(config.options.chkDisplayWeekNumbers == undefined)
	config.options.chkDisplayWeekNumbers = false;
if(config.options.chkDisplayWeekNumbers)
	config.options.txtCalFirstDay = 0;
if(config.options.txtWeekNumberDisplayFormat == undefined)
	config.options.txtWeekNumberDisplayFormat = 'w0WW';
if(config.options.txtWeekNumberLinkFormat == undefined)
	config.options.txtWeekNumberLinkFormat = 'YYYY-w0WW';
if(config.options.txtCalendarReminderTags == undefined)
	config.options.txtCalendarReminderTags = 'påmindelse';

config.macros.calendar = {
	monthnames:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
	daynames:['M','T','W','T','F','S','S'],
	todaybg:'#070',
	weekendbg:'#333',
	monthbg:'#111',
	holidaybg:'#093',
	journalDateFmt:'DD MMM YYYY',
	monthdays:[31,28,31,30,31,30,31,31,30,31,30,31],
	holidays:[ ] // for customization see [[CalendarPluginConfig]]
};
//}}}
//{{{
function calendarIsHoliday(date)
{
	var longHoliday = date.formatString('0DD/0MM/YYYY');
	var shortHoliday = date.formatString('0DD/0MM');
	for(var i = 0; i < config.macros.calendar.holidays.length; i++) {
		if(   config.macros.calendar.holidays[i]==longHoliday
		   || config.macros.calendar.holidays[i]==shortHoliday)
			return true;
	}
	return false;
}
//}}}
//{{{
config.macros.calendar.handler = function(place,macroName,params) {
	var calendar = createTiddlyElement(place, 'table', null, 'calendar', null);
	calendar.cellPadding="0";calendar.cellSpacing="0";
	var tbody = createTiddlyElement(calendar, 'tbody');
	var today = new Date();
	var year = today.getYear();
	if (year<1900) year+=1900;

 	// get journal format from SideBarOptions (ELS 5/29/06 - suggested by MartinBudden)
	var text = store.getTiddlerText('SideBarOptions');
	var re = new RegExp('<<(?:newJournal)([^>]*)>>','mg'); var fm = re.exec(text);
	if (fm && fm[1]!=null) { var pa=fm[1].readMacroParams(); if (pa[0]) this.journalDateFmt = pa[0]; }

	var month=-1;
	if (params[0] == 'thismonth') {
		var month=today.getMonth();
	} else if (params[0] == 'lastmonth') {
		var month = today.getMonth()-1; if (month==-1) { month=11; year--; }
	} else if (params[0] == 'nextmonth') {
		var month = today.getMonth()+1; if (month>11) { month=0; year++; }
	} else if (params[0]&&'+-'.indexOf(params[0].substr(0,1))!=-1) {
		var month = today.getMonth()+parseInt(params[0]);
		if (month>11) { year+=Math.floor(month/12); month%=12; };
		if (month<0)  { year+=Math.floor(month/12); month=12+month%12; }
	} else if (params[0]) {
		year = params[0];
		if(params[1]) month=parseInt(params[1])-1;
		if (month>11) month=11; if (month<0) month=0;
	}

	if (month!=-1) {
		cacheReminders(new Date(year, month, 1, 0, 0), 31);
		createCalendarOneMonth(tbody, year, month);
	} else {
		cacheReminders(new Date(year, 0, 1, 0, 0), 366);
		createCalendarYear(tbody, year);
	}
	window.reminderCacheForCalendar = null;
}
//}}}
//{{{
// cache used to store reminders while the calendar is being rendered
// it will be renulled after the calendar is fully rendered.
window.reminderCacheForCalendar = null;
//}}}
//{{{
function cacheReminders(date, leadtime)
{
	if (window.findTiddlersWithReminders == null) return;
	window.reminderCacheForCalendar = {};
	var leadtimeHash = [];
	leadtimeHash [0] = 0;
	leadtimeHash [1] = leadtime;
	var t = findTiddlersWithReminders(date, leadtimeHash, null, 1);
	for(var i = 0; i < t.length; i++) {
		//just tag it in the cache, so that when we're drawing days, we can bold this one.
		window.reminderCacheForCalendar[t[i]['matchedDate']] = 'påmindelse:' + t[i]['params']['title']; 
	}
}
//}}}
//{{{
function createCalendarOneMonth(calendar, year, mon)
{
	var row = createTiddlyElement(calendar, 'tr');
	createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon]+' '+year, true, year, mon);
	row = createTiddlyElement(calendar, 'tr');
	createCalendarDayHeader(row, 1);
	createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}
//{{{
function createCalendarMonth(calendar, year, mon)
{
	var row = createTiddlyElement(calendar, 'tr');
	createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon]+' '+ year, false, year, mon);
	row = createTiddlyElement(calendar, 'tr');
	createCalendarDayHeader(row, 1);
	createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}
//{{{
function createCalendarYear(calendar, year)
{
	var row;
	row = createTiddlyElement(calendar, 'tr');
	var back = createTiddlyElement(row, 'td');
	var backHandler = function() {
		removeChildren(calendar);
		createCalendarYear(calendar, parseInt(year)-1);
		return false; // consume click
	};
	createTiddlyButton(back, '<', 'Previous year', backHandler);
	back.align = 'center';
	var yearHeader = createTiddlyElement(row, 'td', null, 'calendarYear', year);
	yearHeader.align = 'center';
	yearHeader.setAttribute('colSpan',config.options.chkDisplayWeekNumbers?22:19);//wn**
	var fwd = createTiddlyElement(row, 'td');
	var fwdHandler = function() {
		removeChildren(calendar);
		createCalendarYear(calendar, parseInt(year)+1);
		return false; // consume click
	};
	createTiddlyButton(fwd, '>', 'Next year', fwdHandler);
	fwd.align = 'center';
	createCalendarMonthRow(calendar, year, 0);
	createCalendarMonthRow(calendar, year, 3);
	createCalendarMonthRow(calendar, year, 6);
	createCalendarMonthRow(calendar, year, 9);
}
//}}}
//{{{
function createCalendarMonthRow(cal, year, mon)
{
	var row = createTiddlyElement(cal, 'tr');
	createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon], false, year, mon);
	createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+1], false, year, mon);
	createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+2], false, year, mon);
	row = createTiddlyElement(cal, 'tr');
	createCalendarDayHeader(row, 3);
	createCalendarDayRows(cal, year, mon);
}
//}}}
//{{{
function createCalendarMonthHeader(cal, row, name, nav, year, mon)
{
	var month;
	if (nav) {
		var back = createTiddlyElement(row, 'td');
		back.align = 'center';
		back.style.background = config.macros.calendar.monthbg;

		var backMonHandler = function() {
			var newyear = year;
			var newmon = mon-1;
			if(newmon == -1) { newmon = 11; newyear = newyear-1;}
			removeChildren(cal);
			cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
			createCalendarOneMonth(cal, newyear, newmon);
			return false; // consume click
		};
		createTiddlyButton(back, '<', 'Previous month', backMonHandler);
		month = createTiddlyElement(row, 'td', null, 'calendarMonthname')
		createTiddlyLink(month,name,true);
		month.setAttribute('colSpan', config.options.chkDisplayWeekNumbers?6:5);//wn**
		var fwd = createTiddlyElement(row, 'td');
		fwd.align = 'center';
		fwd.style.background = config.macros.calendar.monthbg; 

		var fwdMonHandler = function() {
			var newyear = year;
			var newmon = mon+1;
			if(newmon == 12) { newmon = 0; newyear = newyear+1;}
			removeChildren(cal);
			cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
			createCalendarOneMonth(cal, newyear, newmon);
			return false; // consume click
		};
		createTiddlyButton(fwd, '>', 'Next month', fwdMonHandler);
	} else {
		month = createTiddlyElement(row, 'td', null, 'calendarMonthname', name)
		month.setAttribute('colSpan',config.options.chkDisplayWeekNumbers?8:7);//wn**
	}
	month.align = 'center';
	month.style.background = config.macros.calendar.monthbg;
}
//}}}
//{{{
function createCalendarDayHeader(row, num)
{
	var cell;
	for(var i = 0; i < num; i++) {
		if (config.options.chkDisplayWeekNumbers) createTiddlyElement(row, 'td');//wn**
		for(var j = 0; j < 7; j++) {
			var d = j + (config.options.txtCalFirstDay - 0);
			if(d > 6) d = d - 7;
			cell = createTiddlyElement(row, 'td', null, null);
			createTiddlyElement(cell,'span',null,'button',config.macros.calendar.daynames[d]);
			if(d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))
				cell.style.background = config.macros.calendar.weekendbg;
		}
	}
}
//}}}
//{{{
function createCalendarDays(row, col, first, max, year, mon) {
	var i;
	if (config.options.chkDisplayWeekNumbers){
		if (first<=max) {
			var ww = new Date(year,mon,first);
			var td=createTiddlyElement(row, 'td');//wn**
			var link=createTiddlyLink(td,ww.formatString(config.options.txtWeekNumberLinkFormat),false,"weekNo");
			link.appendChild(document.createTextNode(
				ww.formatString(config.options.txtWeekNumberDisplayFormat)));
		}
		else createTiddlyElement(row, 'td');//wn**
	}
	for(i = 0; i < col; i++)
		createTiddlyElement(row, 'td');
	var day = first;
	for(i = col; i < 7; i++) {
		var d = i + (config.options.txtCalFirstDay - 0);
		if(d > 6) d = d - 7;
		var daycell = createTiddlyElement(row, 'td');
		var isaWeekend=((d==(config.options.txtCalStartOfWeekend-0)
			|| d==(config.options.txtCalStartOfWeekend-0+1))?true:false);
		if(day > 0 && day <= max) {
			var celldate = new Date(year, mon, day);
			// ELS 10/30/05 - use <<date>> macro's showDate() function to create popup
			// ELS 05/29/06 - use journalDateFmt 
			if (window.showDate) showDate(daycell,celldate,'popup','DD',
				config.macros.calendar.journalDateFmt,true, isaWeekend);
			else {
				if(isaWeekend) daycell.style.background = config.macros.calendar.weekendbg;
				var title = celldate.formatString(config.macros.calendar.journalDateFmt);
				if(calendarIsHoliday(celldate))
					daycell.style.background = config.macros.calendar.holidaybg;
				var now=new Date();
				if ((now-celldate>=0) && (now-celldate<86400000)) // is today?
					daycell.style.background = config.macros.calendar.todaybg;
				if(window.findTiddlersWithReminders == null) {
					var link = createTiddlyLink(daycell, title, false);
					link.appendChild(document.createTextNode(day));
				} else
					var button = createTiddlyButton(daycell, day, title, onClickCalendarDate);
			}
		}
		day++;
	}
}
//}}}
//{{{
// Create a pop-up containing:
// * a link to a tiddler for this date
// * a 'new tiddler' link to add a reminder for this date
// * links to current reminders for this date
// NOTE: this code is only used if [[ReminderMacros]] is installed AND [[DatePlugin]] is //not// installed.
function onClickCalendarDate(ev) { ev=ev||window.event;
	var d=new Date(this.getAttribute('title')); var date=d.formatString(config.macros.calendar.journalDateFmt);
	var p=Popup.create(this);  if (!p) return;
	createTiddlyLink(createTiddlyElement(p,'li'),date,true);
	var rem='\\n\\<\\<reminder dag:%0 måned:%1 årr:%2 titel: \\>\\>';
	rem=rem.format([d.getDate(),d.getMonth()+1,d.getYear()+1900]);
	var cmd="<<newTiddler label:[[ny påmindelse...]] prompt:[[tilføj en ny påmindelse til '%0']]"
		+" title:[[%0]] text:{{store.getTiddlerText('%0','')+'%1'}} tag:%2>>";
	wikify(cmd.format([date,rem,config.options.txtCalendarReminderTags]),p);
	createTiddlyElement(p,'hr');
	var t=findTiddlersWithReminders(d,[0,31],null,1);
	for(var i=0; i<t.length; i++) {
		var link=createTiddlyLink(createTiddlyElement(p,'li'), t[i].tiddler, false);
		link.appendChild(document.createTextNode(t[i]['params']['title']));
	}
	Popup.show(); ev.cancelBubble=true; if (ev.stopPropagation) ev.stopPropagation(); return false;
}
//}}}
//{{{
function calendarMaxDays(year, mon)
{
	var max = config.macros.calendar.monthdays[mon];
	if(mon == 1 && (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0)) max++;
	return max;
}
//}}}
//{{{
function createCalendarDayRows(cal, year, mon)
{
	var row = createTiddlyElement(cal, 'tr');
	var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
	if(first1 < 0) first1 = first1 + 7;
	var day1 = -first1 + 1;
	var first2 = (new Date(year, mon+1, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
	if(first2 < 0) first2 = first2 + 7;
	var day2 = -first2 + 1;
	var first3 = (new Date(year, mon+2, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
	if(first3 < 0) first3 = first3 + 7;
	var day3 = -first3 + 1;

	var max1 = calendarMaxDays(year, mon);
	var max2 = calendarMaxDays(year, mon+1);
	var max3 = calendarMaxDays(year, mon+2);

	while(day1 <= max1 || day2 <= max2 || day3 <= max3) {
		row = createTiddlyElement(cal, 'tr');
		createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
		createCalendarDays(row, 0, day2, max2, year, mon+1); day2 += 7;
		createCalendarDays(row, 0, day3, max3, year, mon+2); day3 += 7;
	}
}
//}}}
//{{{
function createCalendarDayRowsSingle(cal, year, mon)
{
	var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
	if(first1 < 0) first1 = first1+ 7;
	var day1 = -first1 + 1;
	var max1 = calendarMaxDays(year, mon);
	while(day1 <= max1) {
		row = createTiddlyElement(cal, 'tr');
		createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
	}
}
//}}}
//{{{
setStylesheet('.calendar, .calendar table, .calendar th, .calendar tr, .calendar td { text-align:center; } .calendar, .calendar a { margin:0px !important; padding:0px !important; }', 'calendarStyles');
//}}}
// // override cookie settings for CalendarPlugin:
//{{{
config.options.txtCalFirstDay=6;
config.options.txtCalStartOfWeekend=5;
//}}}

// // override internal default settings for CalendarPlugin:
//{{{
config.macros.calendar.journalDateFmt="DDD MMM 0DD YYYY";
//}}}
/%
!info
|Name|CheckboxToggleTag|
|Source|http://www.TiddlyTools.com/#CheckboxToggleTag|
|Version|1.3.6|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|toggle between two tag values using an HTML checkbox (no plugins)|
Usage:
<<<
{{{
in tiddler content:
   <<tiddler CheckboxToggleTag with: tag1 tag2 TiddlerName>> label
in ViewTemplate or EditTemplate:
   <span macro='CheckboxToggleTag with: tag1 tag2 TiddlerName'></span> label
}}}
where:
*''tag1'' is the tag to use when the checkbox is set
*''tag2'' //(optional)// is the tag to use when the checkbox is cleared (default=remove ''tag1'')
*''~TiddlerName'' //(optional)// is the tiddler to be tagged (default=current tiddler)
*''label'' //(optional)// is any text you want to display next to the checkbox
//note: to specify a ''~TiddlerName'' while omitting ''tag2'', use {{{""}}} (empty quotes) as a placeholder for ''tag2''//
<<<
Examples:
<<<
{{{
<<tiddler CheckboxToggleTag with: sometag>> set/clear 'sometag'
<<tiddler CheckboxToggleTag with: tagA tagB>> toggle tagA (checked) and tagB (unchecked)
}}}
<<tiddler CheckboxToggleTag with: sometag>> set/clear 'sometag'
<<tiddler CheckboxToggleTag with: tagA tagB>> toggle tagA (checked) and tagB (unchecked)
<<<
Notes:
<<<
*Clicking a checkbox immediately changes the corresponding tag value in the tiddler. This can, in some cases, trigger additional 'side-effect' processing, such as refreshing of page elements, or autosaving of the document (if that option is enabled).
*If you are currently editing the tiddler being tagged, any //unsaved// changes you have made to the contents of the ''tags'' input field will be discarded when the checkbox is clicked.
<<<
!end info
!show
<html><input type="checkbox" onclick="
	store.suspendNotifications();
	var tid=this.getAttribute('tid');
	var ontag=this.getAttribute('onTag');
	var offtag=this.getAttribute('offTag');
	if (ontag && ontag.length)  store.setTiddlerTag(tid,this.checked,ontag);
	if (offtag && offtag.length) store.setTiddlerTag(tid,!this.checked,offtag);
	store.resumeNotifications();
	store.notify(tid,true);
	var here=story.findContainingTiddler(this);
	if (here) { /* refresh current tiddler */
		var title=here.getAttribute('tiddler');
		var template=story.chooseTemplateForTiddler(title,story.isDirty(title)?2:1);
		story.refreshTiddler(title,template,true);
	}
	return false;
"><nowiki></html><<tiddler {{
	var tid="$3";
	if (tid=="$"+"3") {
		var here=story.findContainingTiddler(place);
		if (here) tid=here.getAttribute('tiddler');
	}
	if (store.tiddlerExists(tid)) {
		var c=place.lastChild.firstChild;
		c.setAttribute('onTag','$1');
		c.setAttribute('offTag','$2'!='$'+'2'&&'$2'!='undefined'?'$2':'');
		c.setAttribute('tid',tid);
		c.checked=store.getTiddler(tid).isTagged(c.getAttribute('onTag'));
	}
'';}}>>
!end show

%/<<tiddler {{'CheckboxToggleTag##'+('$1'=='$'+'1'?'info':'show')}} with: [[$1]] [[$2]] [[$3]]>>
/***
|Name|ClickifyPlugin|
|Source|http://www.TiddlyTools.com/#ClickifyPlugin|
|Documentation|http://www.TiddlyTools.com/#ClickifyPlugin|
|Version|1.0.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|re-compute parameters when a 'command link' macro is clicked|
!!!!!Usage
<<<
Normally, when you use a //computed parameter// in a macro, it's value is determined when the macro is rendered.  The {{{<<clickify>>}}} macro can be used to force the macro parameters of an 'on-click' command link (such as created by the {{{<<newTiddler>>}}} macro) to be automatically re-computed when the command link is clicked, rather than when it is initially displayed.  This allows use of computed values that depend upon data that may change between the time the macro is rendered and when it's action is actually triggered by a click.

To apply this extended processing to any macro that creates a command link, simply insert the 'clickify' keyword in front of the usual macro name, like this:
{{{
<<clickify macroName param param param ...>>
}}}
<<<
!!!!!Example
<<<
When {{{<<newTiddler>>}}} is clicked, prompt for a title and set default text to current timestamp:
{{{
<<clickify newTiddler title:{{prompt('enter a title','NewTiddler')}} text:{{new Date()}}>>
}}}
><<clickify newTiddler title:{{prompt('enter a title','NewTiddler')}} text:{{new Date()}}>>
<<<
!!!!!Revisions
<<<
2009.02.08 [1.0.1] make sure command link has been rendered before trying to modify it
2009.01.25 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.ClickifyPlugin={major: 1, minor: 0, revision: 1, date: new Date(2009,2,8)};
config.macros.clickify={
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var cmd='<<'+paramString+'>>';
		var e=createTiddlyElement(place,'span');
		wikify(cmd.replace(/alert\(|prompt\(|confirm\(/g,'isNaN('),e);
		var b=e.getElementsByTagName('a')[0]; if (!b) return;
		b.setAttribute('cmd',cmd);
		b.onclick=function(ev) {
			var cmd=this.getAttribute('cmd');
			var e=createTiddlyElement(this.parentNode,'span');
			e.style.display='none';
			wikify(cmd,e);
			e.getElementsByTagName('a')[0].onclick();
			this.parentNode.removeChild(e);
		}
	}
}
//}}}
<<SimileTimeline ClockTimelineSpec>>
|timelineHeight:|200|

|band0.width:|15%|
|band0.intervalUnit:|SECOND|
|band0.intervalPixels:|40|
|band0.eventSourceType:|timer|
|band0.eventSourceParams:|1|

|band1.width:|15%|
|band1.intervalUnit:|MINUTE|
|band1.intervalPixels:|40|
|band1.highlight:|false|

|band2.width:|15%|
|band2.intervalUnit:|HOUR|
|band2.intervalPixels:|60|
|band2.highlight:|false|

|band3.width:|15%|
|band3.intervalUnit:|WEEK|
|band3.intervalPixels:|100|
|band3.highlight:|false|

|band4.width:|15%|
|band4.intervalUnit:|MONTH|
|band4.intervalPixels:|100|
|band4.highlight:|false|

|band5.width:|15%|
|band5.intervalUnit:|YEAR|
|band5.intervalPixels:|200|
|band5.highlight:|false|
Background: #fff
Foreground: #000
PrimaryPale: #EEE
PrimaryLight: #777
PrimaryMid: #111
PrimaryDark: #000
SecondaryPale: #EEF
SecondaryLight: #CCF
SecondaryMid: #69C
SecondaryDark: #36C
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #333
Error: #f88
/***
|Name|ColumnCalculatorPlugin|
|Source|http://www.TiddlyTools.com/#ColumnCalculatorPlugin|
|Version|0.6.2|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|calculate values from table cells in a column|
|Status| ALPHA - USE AT YOUR OWN RISK |
!!!Usage
<<<
{{{<<columncalc function startrow endrow>>}}}
where:
*''function'' is a keyword that specifies the type of calculation to perform:
** ''total'' or ''sum'' or //no param//<br>adds up values for cells above it in the column
** ''count''<br>number of non-empty cells in column
** ''average'' or ''avg''<br>average of cells in column (i.e., total/count)
* ''all'' (optional)<br>normally, only cells containing numbers or timestamps (hh:mm:ss) are included in the calculations.  The ''all'' keyword allows text or empty cells to be processed as if they contained a "0".
* ''startrow'',''endrow'' (optional)<br>specifies a ONE-based range of rows for limiting the calculation.  Use negative numbers to specify an offset from the current row (e.g., {{{<<calc sum 3 5>>}}} adds up rows 3, 4 and 5, while {{{<<calc sum 1 -1>>}}} adds up all numbers in the column excluding the current row (i.e., the same as the default if no startrow/endrow params are specified)
<<<
!!!Examples
<<<
''with numeric values...''
{{{
| foo| 3.2 |
| bar| 1.1 |
| baz| 2.9 |
| gronk| 4.3 |
| snork| non-number |
| count| <<columncalc count all 1 -1>> |
| total| <<columncalc sum all 1 -2>> |
| avg| <<columncalc average all 1 -3>> |
}}}
| foo| 3.2 |
| bar| 1.1 |
| baz| 2.9 |
| gronk| 4.3 |
| snork| non-number |
| count| <<columncalc count all 1 -1>> |
| total| <<columncalc sum all 1 -2>> |
| avg| <<columncalc average all 1 -3>> |

''with time-formatted values (hh:mm:ss)...''
{{{
| foo| 00:22:15 |
| bar| 00:03:30 |
| baz| 00:01:45 |
| count| <<columncalc count 1 -1>> |
| total| <<columncalc sum 1 -2>> |
| avg| <<columncalc average 1 -3>> |
}}}
| foo| 00:22:15 |
| bar| 00:03:30 |
| baz| 00:01:45 |
| count| <<columncalc count 1 -1>> |
| total| <<columncalc sum 1 -2>> |
| avg| <<columncalc average 1 -3>> |
<<<
!!!Revisions
<<<
2009.02.05 [0.6.2] added 'all' param to include empty/text rows in calculations.
2007.10.26 [0.6.1] in handler(), using '.textContent' instead of '.innerHTML' when reading values from table cells.  This allows use of values that are transcluded from slices in other tiddlers using the {{{<<tiddler 'TiddlerName::slicename'>>}}} syntax.
2007.06.29 [0.6.0] added support for handling values in hh:mm:ss format
2007.04.02 [0.5.0] started
<<<
!!!!!Code
***/
//{{{
version.extensions.ColumnCalculatorPlugin= {major: 0, minor: 6, revision: 1, date: new Date(2007,10,26)};
config.macros.columncalc= {
	handler:
	function(place,macroName,params,wikifier,paramString,tiddler) {

		if (place.parentNode.nodeName.toLowerCase()!='tr') return false; // not in a table
		var tbody=place.parentNode.parentNode;
		var row=tbody.childNodes.length-1; // current row #
		var col=place.parentNode.childNodes.length-1; // current column #

		var fn=params.shift();
		var allCells=(params[0]&&params[0].toLowerCase()=='all');
		if (allCells) params.shift();
		var startrow=0; var endrow=row-1;
		if (params[0]) var startrow=params.shift();
		if (startrow<0) startrow=1*startrow+row; else startrow=startrow-1;
		if (params[0]) var endrow=params.shift();
		if (endrow<0) endrow=1*endrow+row; else endrow=endrow-1;

		var count=total=0;
		for (r=startrow; r<=endrow; r++) {
			var cell=tbody.childNodes[r].childNodes[col].textContent;
			if (!cell) cell=tbody.childNodes[r].childNodes[col].innerHTML; // fallback for older browsers
			var val=cell; var hms=cell.split(':');
			if (hms.length==3) { // an hh:mm:ss time value
				var val=(hms[0]||0)*3600+(hms[1]||0)*60+(hms[2]||0)*1;
				var showTime=true; // use time formatting for results...
			}
			else if (cell.length && !isNaN(cell)) // a numeric value
				var val=eval(cell);
			else if (allCells) // an non-numeric cell (when 'all' is used)
				var val=0;
			if (!isNaN(val)) { total+=val; count++; }
		}
		switch (fn) {
			case 'count':
				var result=count;
				break;
			case 'average':
			case 'avg':
				var result=Math.floor(total/count*100)/100; // truncate to two decimal places
				break;
			case 'total':
			case 'sum':
			default:
				var result=total;
				break;
		}
		if (showTime && fn!='count') {
			var h=Math.floor(result/3600);
			var m=Math.floor((result-h*3600)/60);
			var s=Math.floor((result-h*3600-m*60)*100)/100; // truncate to two decimal places
			result=(h<10?'0':'')+h+':'+(m<10?'0':'')+m+':'+(s<10?'0':'')+s;
		}
		createTiddlyText(place,result);
	}
}
//}}}
You can create your own custom views of the tasks using the ~TeamTask Report View Plugin (TTReportViewPlugin).


The general form for calling the plugin is like this:
{{{
<<TTReportView>>
}}}


You can also specify which fields to display in your report like this:
{{{
<<TTReportView DisplayFields:"fieldName,fieldName,fieldName">>
}}}
for example:
{{{
<<TTReportView DisplayFields:"Title,Priority,Status">>
}}}


In addition, you can choose to order your results by a given field like this:
{{{
<<TTReportView OrderBy:"fieldName,[asc|desc]">>
}}}
for example:
{{{
<<TTReportView DisplayFields:"Title,Priority,Status" OrderBy:"Status,asc">>
}}}


You can also specify field values to include and exclude tasks and create filtered reports:
{{{
<<TTReportView FieldName:"value">>
}}}
{{{
<<TTReportView FieldName:"!value">>
}}}

for example:
{{{
<<TTReportView DisplayFields:"Title,Priority,Status" OrderBy:"Status,asc" Priority:"high" Status:"!closed">>
}}}
Creating a task is easy. Any tiddler that you tag with the word 'task' will become a task tiddler. When you exit edit mode of a task tiddler, you will see that it is presented as a task and has controls on it to allow you to set some of your [[pre-defined|TaskDefinitions]] values on it.

Alternatively, you can create a new task by clicking the <<newTiddler label:'new task' title:NewTask tag:task text:'Type some text and then press DONE to view the task controls'>> button in the control bar towards the top of the screen.
<<SimileTimeline CubismTimelineSpec>>
{
dateTimeFormat: 'iso8601',
wikiURL: "http://simile.mit.edu/shelf/",
wikiSection: "Simile Cubism Timeline",

events : [
        {start: '1924',
        title: 'Barfusserkirche',
        description: 'by Lyonel Feininger, American/German Painter, 1871-1956',
        image: 'http://images.allposters.com/images/AWI/NR096_b.jpg',
        link: 'http://www.allposters.com/-sp/Barfusserkirche-1924-Posters_i1116895_.htm'
        },


        {start: '1913',
        end: '1929',
        title: 'Three Figures',
        description: 'by Kasimir Malevich, Ukrainian Painter, 1878-1935',
        image: 'http://images.allposters.com/images/BRGPOD/75857_b.jpg',
        link: 'http://www.allposters.com/-sp/Three-Figures-1913-28-Posters_i1349989_.htm'
        },


        {start: '1881',
        end: '1953',
        title: 'Landschaft bei Montreuil',
        description: 'by Albert Gleizes, French Painter, 1881-1953',
        image: 'http://images.allposters.com/images/mer/1336_b.jpg',
        link: 'http://www.allposters.com/-sp/Landschaft-bei-Montreuil-Posters_i339007_.htm'
        },


        {start: '1920',
        title: 'Femme au Miroir',
        description: 'by Fernand Leger, French Painter, 1881-1955',
        image: 'http://images.allposters.com/images/AWI/GMR117_b.jpg',
        link: 'http://www.allposters.com/-sp/Femme-au-Miroir-1920-Posters_i141266_.htm'
        },


        {start: '1903',
        title: 'The Old Guitarist',
        description: 'by Pablo Picasso, Spanish Painter/Sculptor, 1881-1973',
        image: 'http://images.allposters.com/images/ESC/AP599_b.jpg',
        link: 'http://www.allposters.com/-sp/The-Old-Guitarist-c-1903-Posters_i328746_.htm'
        },


        {start: '1882',
        end: '1964',
        title: 'Jour',
        description: 'by Georges Braque, French Painter, 1882-1963',
        image: 'http://images.allposters.com/images/SHD/S1041_b.jpg',
        link: 'http://www.allposters.com/-sp/Jour-Posters_i126663_.htm'
        },


        {start: '1916',
        title: 'Still Life with a White Dish',
        description: 'by Gino Severini, Italian Painter, 1883-1966',
        image: 'http://images.allposters.com/images/MCG/FS1254_b.jpg',
        link: 'http://www.allposters.com/-sp/Still-Life-with-a-White-Dish-1916-Posters_i366823_.htm'
        },


        {start: '1885',
        end: '1941',
        title: 'Rhythm, Joie de Vivre',
        description: 'by Robert Delaunay, French Painter, 1885-1941',
        image: 'http://imagecache2.allposters.com/images/pic/adc/10053983a_b~Rhythm-Joie-de-Vivre-Posters.jpg',
        link: 'http://www.allposters.com/-sp/Rhythm-Joie-de-Vivre-Posters_i1250641_.htm'
        },


        {start: '1885',
        end: '1925',
        title: 'Castor Et Pollux',
        description: 'by Roger de la Fresnaye, French Painter, 1885-1925',
        image: 'http://images.allposters.com/images/CORPOD/IX001463_b.jpg',
        link: 'http://www.allposters.com/-sp/Castor-Et-Pollux-Posters_i831718_.htm'
        },


        {start: '1912',
        title: 'Portrait of Pablo Picasso',
        description: 'by Juan Gris, Spanish Painter/Sculptor, 1887-1927',
        image: 'http://images.allposters.com/images/BRGPOD/156514_b.jpg',
        link: 'http://www.allposters.com/-sp/Portrait-of-Pablo-Picasso-1881-1973-1912-Posters_i1344154_.htm'
        },


        {start: '1891',
        end: '1915',
        title: 'Portrait of Horace Brodsky',
        description: 'by Henri Gaudier-Brzeska, French Sculptor, 1891-1915',
        image: 'http://imagecache2.allposters.com/images/BRGPOD/102770_b.jpg',
        link: 'http://www.allposters.com/-sp/Portrait-of-Horace-Brodsky-Posters_i1584413_.htm'
        }
]
}
|timelineHeight:|300|
|bubbleWidth:|320|
|bubbleHeight:|220|

|band0.width:|100%|
|band0.intervalUnit:|DECADE|
|band0.intervalPixels:|200|
|band0.date:|1900|
|band0.eventSourceType:|tiddlerJSON|
|band0.eventSourceParams:|CubismJSON|
|timelineHeight:|150|
|bubbleWidth:|300|
|bubbleHeight:|200|

|band0.width:|100%|
|band0.intervalUnit:|DECADE|
|band0.intervalPixels:|200|
|band0.date:|1920|
|band0.eventSourceType:|tiddlerSlices|
|band0.eventSourceParams:|CubismTimeline|
/***
|''Navn:''|DanishTranslationPlugin|
|''Beskrivelse:''|Translation of TiddlyWiki into Danish|
|''Forfatter:''|MartinBudden (mjbudden (at) gmail (dot) com)|
|''Kilde:''|www.example.com |
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/association/locales/core/en/locale.en.js |
|''Version:''|0.3.7|
|''Dato:''|Jul 6, 2007|
|''Kommentarer:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''Licens:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]] |
|''~CoreVersion:''|2.4|
***/

//{{{
//--
//-- Translateable strings
//--

// Strings in "double quotes" should be translated; strings in 'single quotes' should be left alone

config.locale = "da"; // W3C language tag

if (config.options.txtUserName == 'YourName') // do not translate this line, but do translate the next line
	merge(config.options,{txtUserName: "DitNavn"});

merge(config.tasks,{
	save: {text: "gem", tooltip: "Gem dine ændringer til denne TiddlyWiki", action: saveChanges},
	sync: {text: "synk", tooltip: "Synkronisér ændringer med andre TiddlyWiki filer og servere", content: '<<sync>>'},
	importTask: {text: "importér", tooltip: "Importér tiddlers og plugins fra andre TiddlyWiki filer og servere", content: '<<importTiddlers>>'},
	tweak: {text: "Tilpas", tooltip: "Tilpas TiddlyWikis udseende og opførsel", content: '<<options>>'},
	upgrade: {text: "upgradér", tooltip: "Upgrader TiddlyWikis kerne kode", content: '<<upgrade>>'},
	plugins: {text: "udvidelser", tooltip: "Administrér installerede udvidelser", content: '<<plugins>>'}
});

// Options that can be set in the options panel and/or cookies
merge(config.optionsDesc,{
	txtUserName: "Brugernavn til signering af dine ændringer",
	chkRegExpSearch: "Avend almindelige udtryk til søgninger",
	chkCaseSensitiveSearch: "Forskel på store og små bogstaver",
	chkIncrementalSearch: "Bogstav for bogstav-søgning",
	chkAnimate: "Anvend animationer",
	chkSaveBackups: "Gem en backupfil når der gemmes ændringer",
	chkAutoSave: "Gem automatisk ændringer",
	chkGenerateAnRssFeed: "Lav et RSS feed når der gemmes ændringer",
	chkSaveEmptyTemplate: "Lav en tom skabelon når der gemmes ændringer",
	chkOpenInNewWindow: "Åben internet links i et nyt vindue",
	chkToggleLinks: "Når man klikker på et link i åbne tiddlers lukkes de",
	chkHttpReadOnly: "Skjul redigeringsværktøjer når den vises over HTTP",
	chkForceMinorUpdate: "Opdatér ikke brugernavn og dato når tiddlers bliver ændrede",
	chkConfirmDelete: "Bed om bekræftelse før tiddlers slettes",
	chkInsertTabs: "Brug tab tasten til at indsætte tab tegn istedet for at hoppe imellem felter",
	txtBackupFolder: "Navn på mappe til brug for backups",
	txtMaxEditRows: "Maximum antal af rækker i edit bokse",
	txtFileSystemCharSet: "Default tegnsæt til at gemme ændringer (Kun i Firefox/Mozilla)"});

merge(config.messages,{
	customConfigError: "Der opstod problemer ved loading af udvidelser. Se PluginManager for detaljer",
	pluginError: "Fejl: %0",
	pluginDisabled: "Ikke udført fordi det er slået fra via 'systemConfigDisable' tag",
	pluginForced: "Udført fordi det er tvunget via 'systemConfigForce' tag",
	pluginVersionError: "Ikke udført fordi denne udvidelse kræver en nyere udgave af TiddlyWiki",
	nothingSelected: "Intet er valgt. Du er nødt til at vælge en eller flere ting først",
	savedSnapshotError: "Det ser ud som om denne TiddlyWiki er blevet gemt forkert. Se venligst http://www.tiddlywiki.com/#DownloadSoftware for details",
	subtitleUnknown: "(ukendt)",
	undefinedTiddlerToolTip: "Tiddleren '%0' findes ikke endnu",
	shadowedTiddlerToolTip: "Tiddleren '%0' findes ikke endnu, men har en foruddefineret skygge værdi",
	tiddlerLinkTooltip: "%0 - %1, %2",
	externalLinkTooltip: "Internet link til %0",
	noTags: "Der er ingen taggede tiddlere",
	notFileUrlError: "Du er nødt til at gemme denne TiddlyWiki til en fil før du kan gemme ændringer",
	cantSaveError: "Det er ikke muligt at gemme ændringer. Mulige grunde indbefatter:\n- din browser understøtter det ikke (Firefox, Internet Explorer, Safari og Opera virker alle fint hvis de er konfigurerede korrekt)\n- stien til din TiddlyWiki fil indeholder ulovlige tegn\n- TiddlyWiki HTML filen er blevet flyttet eller omdøbt",
	invalidFileError: "Den originale fil '%0' lader ikke til at være en rigtig TiddlyWiki",
	backupSaved: "Backup gemt",
	backupFailed: "Det lykkedes IKKE at gemme en backup fil",
	rssSaved: "RSS feed gemt",
	rssFailed: "Det lykkedes IKKE at gemme et RSS feed",
	emptySaved: "Tom skabelon gemt",
	emptyFailed: "Det lykkedes IKKE at gemme en tom skabelon",
	mainSaved: "Hoved TiddlyWiki fil gemt",
	mainFailed: "Det lykkedes IKKE at gemme hoved TiddlyWiki filen. Dine ændringer er IKKE blevet gemt",
	macroError: "Fejl i makro <<\%0>>",
	macroErrorDetails: "Fejl ved udførsel af makro <<\%0>>:\n%1",
	missingMacro: "Ingen sådan makro",
	overwriteWarning: "En tiddler med navnet '%0' findes allerede. Vælg OK for at overskrive den",
	unsavedChangesWarning: "ADVARSEL! Der er ugemte æmdringer i TiddlyWikien\n\nVælg OK for at gemme\nVælg FORTRYD for at afvise",
	confirmExit: "--------------------------------\n\nDer er ugemte ændringer i TiddlyWikien. Hvis du fortsætter vil du miste disse ændringer\n\n--------------------------------",
	saveInstructions: "GemÆndringer",
	unsupportedTWFormat: "Ikke understøttet TiddlyWiki format '%0'",
	tiddlerSaveError: "Fejl ved forsøg på at gemme tiddler '%0'",
	tiddlerLoadError: "Fejl ved load af tiddler '%0'",
	wrongSaveFormat: "Kan ikke gemme med formatet '%0'. Bruger standard format til at gemme.",
	invalidFieldName: "Ikke tilladt feltnavn %0",
	fieldCannotBeChanged: "Felt '%0' kan ikke ændres",
	loadingMissingTiddler: "Forsøger at hente tiddleren '%0' fra '%1' serveren ved:\n\n'%2' i arbejdsområdet '%3'",
	upgradeDone: "Opgradering til version %0 er nu fuldført\n\nKlik 'OK' for at genopfriske den nyligt opgraderede TiddlyWiki"});

merge(config.messages.messageClose,{
	text: "luk",
	tooltip: "luk dette meddelelsesområde"});

config.messages.backstage = {
	open: {text: "bagscenen", tooltip: "Åben bagsceneområdet for at ændre på nogle grundlæggende indstillinger"},
	close: {text: "luk", tooltip: "Luk bagsceneområdet"},
	prompt: "bagscenen: ",
	decal: {
		edit: {text: "edit", tooltip: "Redigér tiddleren '%0'"}
	}
};

config.messages.listView = {
	tiddlerTooltip: "Klik for at se hele denne tiddlers tekst",
	previewUnavailable: "(forhåndsvisning er ikke tilgængelig)"
};

config.messages.dates.months = ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November","December"];
config.messages.dates.days = ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"];
config.messages.dates.shortMonths = ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"];
config.messages.dates.shortDays = ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"];
// suffixes for dates, eg "1ste","2den","3die"..."30te","31te"
config.messages.dates.daySuffixes = ["ste","den","die","te","te","te","te","te","te","te",
		"te","te","te","te","te","te","te","te","te","te",
		"ste","den","die","te","te","te","te","te","te","te",
		"te"];
config.messages.dates.am = "formiddag";
config.messages.dates.pm = "eftermiddag";

merge(config.messages.tiddlerPopup,{
	});

merge(config.views.wikified.tag,{
	labelNoTags: "ingen tags",
	labelTags: "tags: ",
	openTag: "Åben tag '%0'",
	tooltip: "Vis tiddlere der er taggede med '%0'",
	openAllText: "Åben alle",
	openAllTooltip: "Åben alle disse tiddlere",
	popupNone: "Ingen andre tiddlere er taggede med '%0'"});

merge(config.views.wikified,{
	defaultText: "Tiddleren '%0' findes ikke endnu. Dobbelt-klik for at lave den",
	defaultModifier: "(mangler)",
	shadowModifier: "(indbygget skygge tiddler)",
	dateFormat: "DD MMM YYYY", // use this to change the date format for your locale, eg "YYYY MMM DD", do not translate the Y, M or D
	createdPrompt: "lavet"});

merge(config.views.editor,{
	tagPrompt: "Skriv tags delt med mellemrum, [[brug 2 dobbelte firkantede klammer]] om nødvendigt, eller tilføj allerede eksisterende",
	defaultText: "Skriv teksten til '%0'"});

merge(config.views.editor.tagChooser,{
	text: "tags",
	tooltip: "Vælg eksisterende tags som tilføjelse til denne tiddler",
	popupNone: "Der er ikke defineret nogen tags",
	tagTooltip: "Tilføj tagget '%0'"});

merge(config.messages,{
	sizeTemplates:
		[
		{unit: 1024*1024*1024, template: "%0\u00a0GB"},
		{unit: 1024*1024, template: "%0\u00a0MB"},
		{unit: 1024, template: "%0\u00a0KB"},
		{unit: 1, template: "%0\u00a0B"}
		]});

merge(config.macros.search,{
	label: "søg",
	prompt: "Søg i denne TiddlyWiki",
	accessKey: "F",
	successMsg: "Der er fundet %0 tiddlere som matcher %1",
	failureMsg: "Der er ikke fundet nogen tiddlere som matcher %0"});

merge(config.macros.tagging,{
	label: "tagger: ",
	labelNotTag: "tagger ikke",
	tooltip: "Liste over tiddlere der er taggede med '%0'"});

merge(config.macros.timeline,{
	dateFormat: "DD MMM YYYY"});// use this to change the date format for your locale, eg "YYYY MMM DD", do not translate the Y, M or D

merge(config.macros.allTags,{
	tooltip: "Vis tiddlere der er taggede med '%0'",
	noTags: "Der er ingen taggede tiddlere"});

config.macros.list.all.prompt = "Alle tiddlere i alfabetisk orden";
config.macros.list.missing.prompt = "Tiddlere der linkes til men som ikke er definerede";
config.macros.list.orphans.prompt = "Tiddlere som der ikke linkes til fra nogen andre tiddlere";
config.macros.list.shadowed.prompt = "Tiddlere som er skyggede med grundlæggende indhold";
config.macros.list.touched.prompt = "Tiddlere som er blevet ændret lokalt ";

merge(config.macros.closeAll,{
	label: "luk alle",
	prompt: "Luk alle viste tiddlere (untaget dem som er ved at blive redigerede)"});

merge(config.macros.permaview,{
	label: "vis permalink",
	prompt: "Lav et link til en URL som henter alle de netop nu synlige tiddlere"});

merge(config.macros.saveChanges,{
	label: "gem ændringer",
	prompt: "Gem alle tiddlere for at lave en ny TiddlyWiki",
	accessKey: "S"});

merge(config.macros.newTiddler,{
	label: "ny tiddler",
	prompt: "Lav en ny tiddler",
	title: "Ny Tiddler",
	accessKey: "N"});

merge(config.macros.newJournal,{
	label: "ny journal",
	prompt: "Lav en ny tiddler ud fra nuværende dato og tid",
	accessKey: "J"});

merge(config.macros.options,{
	wizardTitle: "Tilpas avancerede muligheder",
	step1Title: "Disse muligheder gemmes i cookies i din browser",
	step1Html: "<input type='hidden' name='markList'></input><br><input type='checkbox' checked='false' name='chkUnknown'>Show unknown options</input>",
	unknownDescription: "//(ukendt)//",
	listViewTemplate: {
		columns: [
			{name: 'Option', field: 'option', title: "Option", type: 'String'},
			{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
			{name: 'Name', field: 'name', title: "Name", type: 'String'}
			],
		rowClasses: [
			{className: 'lowlight', field: 'lowlight'}
			]}
	});

merge(config.macros.plugins,{
	wizardTitle: "Administrer udvidelser",
	step1Title: "Aktive udvidelser",
	step1Html: "<input type='hidden' name='markList'></input>", // DO NOT TRANSLATE
	skippedText: "(Denne udvidelse er ikke blevet aktiveret fordi den først er blevet tilføjet efter start)",
	noPluginText: "Der er ikke installeret nogen udvidelser",
	confirmDeleteText: "Er du sikker på at du vil slette disse udvidelser:\n\n%0",
	removeLabel: "Fjern systemConfig tag",
	removePrompt: "Fjern systemConfig tag",
	deleteLabel: "slet",
	deletePrompt: "Slet disse tiddlere permanent",
	listViewTemplate: {
		columns: [
			{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
			{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler'},
			{name: 'Size', field: 'size', tiddlerLink: 'size', title: "Size", type: 'Size'},
			{name: 'Forced', field: 'forced', title: "Forced", tag: 'systemConfigForce', type: 'TagCheckbox'},
			{name: 'Disabled', field: 'disabled', title: "Disabled", tag: 'systemConfigDisable', type: 'TagCheckbox'},
			{name: 'Executed', field: 'executed', title: "Loaded", type: 'Boolean', trueText: "Yes", falseText: "No"},
			{name: 'Startup Time', field: 'startupTime', title: "Startup Time", type: 'String'},
			{name: 'Error', field: 'error', title: "Status", type: 'Boolean', trueText: "Error", falseText: "OK"},
			{name: 'Log', field: 'log', title: "Log", type: 'StringList'}
			],
		rowClasses: [
			{className: 'error', field: 'error'},
			{className: 'warning', field: 'warning'}
			]}
	});

merge(config.macros.toolbar,{
	moreLabel: "mere",
	morePrompt: "Vis flere muligheder"
	});

merge(config.macros.refreshDisplay,{
	label: "genopfrisk",
	prompt: "Genopfrisk hele TiddlyWikiens udseende"
	});

merge(config.macros.importTiddlers,{
	readOnlyWarning: "Du kan ikke importere til en låst TiddlyWiki fil. Prøv at åbne den fra en fil:// URL",
	wizardTitle: "Importer tiddlere fra en anden fil eller server",
	step1Title: "Trin 1: Find serveren eller TiddlyWiki filen",
	step1Html: "Vælg servertypen: <select name='selTypes'><option value=''>Choose...</option></select><br>Indskriv webadresse eller sti her: <input type='text' size=50 name='txtPath'><br>...eller søg efter en fil: <input type='file' size=50 name='txtBrowse'><br><hr>...eller vælg et forudbestemt feed: <select name='selFeeds'><option value=''>Vælg...</option></select>",
	openLabel: "åbn",
	openPrompt: "Åbn forbindelsen til denne fil eller server",
	openError: "Der var problemer med at hente tiddlywiki filen",
	statusOpenHost: "Forbinder til hosten",
	statusGetWorkspaceList: "Henter en liste over tilgængelige arbejdsområder",
	step2Title: "Trin 2: Vælg arbejdsområde",
	step2Html: "Indskriv et navn på arbejdsområdet: <input type='text' size=50 name='txtWorkspace'><br>...eller vælg et der allerede er der: <select name='selWorkspace'><option value=''>Choose...</option></select>",
	cancelLabel: "fortryd",
	cancelPrompt: "Fortryd denne import",
	statusOpenWorkspace: "Åben arbejdsområdet",
	statusGetTiddlerList: "Henter listen over tilgængelige tiddlere",
	errorGettingTiddlerList: "Fejl ved hentning af liste over tiddlere, klik Fortryd for at prøve igen",
	step3Title: "Trin 3: Vælg hvilke tiddlere der skal importeres",
	step3Html: "<input type='hidden' name='markList'></input><br><input type='checkbox' checked='true' name='chkSync'>Keep these tiddlers linked to this server so that you can synchronise subsequent changes</input><br><input type='checkbox' name='chkSave'>Save the details of this server in a 'systemServer' tiddler called:</input> <input type='text' size=25 name='txtSaveTiddler'>",
	importLabel: "importer",
	importPrompt: "Importer disse tiddlere",
	confirmOverwriteText: "Er du sikker på at du vil overskrive disse tiddlere:\n\n%0",
	step4Title: "Trin 4: Importerer %0 tiddler(e)",
	step4Html: "<input type='hidden' name='markReport'></input>", // DO NOT TRANSLATE
	doneLabel: "udført",
	donePrompt: "Luk denne wizard",
	statusDoingImport: "Importerer tiddlere",
	statusDoneImport: "Alle tiddlere er importede",
	systemServerNamePattern: "%2 on %1",
	systemServerNamePatternNoWorkspace: "%1",
	confirmOverwriteSaveTiddler: "Tiddleren '%0' findes allerede. Klik 'OK' for at overskrive den med detaljerne fra denne server, eller 'Fortryd' for at efterlade uændret",
	serverSaveTemplate: "|''Type:''|%0|\n|''URL:''|%1|\n|''Workspace:''|%2|\n\nDenne tiddler blev lavet automatisk for at skrive denne servers detaljer",
	serverSaveModifier: "(System)",
	listViewTemplate: {
		columns: [
			{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
			{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler'},
			{name: 'Size', field: 'size', tiddlerLink: 'size', title: "Size", type: 'Size'},
			{name: 'Tags', field: 'tags', title: "Tags", type: 'Tags'}
			],
		rowClasses: [
			]}
	});

merge(config.macros.upgrade,{
	wizardTitle: "Opgrader TiddlyWikis kerne kode",
	step1Title: "Opdater eller reparer denne TiddlyWiki til sidste nye udgivelse",
	step1Html: "Du er ved at opgradere til sidste nye udgave af TiddlyWikis kerne kode (from <a href='%0' class='externalLink' target='_blank'>%1</a>). Dit indhold vil blive bibeholdt under opgraderinen.<br><br>Bemærk at opgraderinger kan konfikte med gamle udvidelser. Hvis du får problemer med den opgraderede fil se her <a href='http://www.tiddlywiki.org/wiki/CoreUpgrades' class='externalLink' target='_blank'>http://www.tiddlywiki.org/wiki/CoreUpgrades</a>",
	errorCantUpgrade: "Kan ikke opgradere denne TiddlyWiki. Du kan kun opgradere en TiddlyWiki fil som er gemt lokalt på en pc",
	errorNotSaved: "Du skal gemme ændringer før du kan gennemføre en opgradering",
	step2Title: "Bekræft opgraderingsdetaljer",
	step2Html_downgrade: "Du er ved at nedgradere til TiddlyWiki version %0 fra %1.<br><br>Nedgradering til en ældre udgave af kerne koden er IKKE tilrådeligt",
	step2Html_restore: "Denne tiddlyWike bruger allerede den sidste nye kerne kode (%0).<br><br>Du kan fortsætte med opgraderingen for at sikre dig at koden ikke er blevet ødelagt",
	step2Html_upgrade: "Du er ved at opgradere til TiddlyWiki version %0 fra %1",
	upgradeLabel: "opgrader",
	upgradePrompt: "Forbered opgraderingsprocessen",
	statusPreparingBackup: "Forbereder backup",
	statusSavingBackup: "Gemmer backup fil",
	errorSavingBackup: "Der var problemer med at gemme backup filen",
	statusLoadingCore: "Loader kernekoden",
	errorLoadingCore: "Fejl ved load af kernekoden",
	errorCoreFormat: "Fejl ved den nye kernekode",
	statusSavingCore: "Gemmer den nye kernekode",
	statusReloadingCore: "Genloader den nye kernekode",
	startLabel: "start",
	startPrompt: "Start opgraderingsprocessen",
	cancelLabel: "fortryd",
	cancelPrompt: "Fortryd opgraderingsprocessen",
	step3Title: "Opgradering afbrudt",
	step3Html: "Du har afbrudt opgraderingsprocessen"
	});

merge(config.macros.sync,{
	listViewTemplate: {
		columns: [
			{name: 'Selected', field: 'selected', rowName: 'title', type: 'Selector'},
			{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler'},
			{name: 'Server Type', field: 'serverType', title: "Server type", type: 'String'},
			{name: 'Server Host', field: 'serverHost', title: "Server host", type: 'String'},
			{name: 'Server Workspace', field: 'serverWorkspace', title: "Server workspace", type: 'String'},
			{name: 'Status', field: 'status', title: "Synchronisation status", type: 'String'},
			{name: 'Server URL', field: 'serverUrl', title: "Server URL", text: "View", type: 'Link'}
			],
		rowClasses: [
			],
		buttons: [
			{caption: "Synkronisér disse tiddlere", name: 'sync'}
			]},
	wizardTitle: "Synkroniser med internet servere og filer",
	step1Title: "Vælg hvilke tiddlere du vil synkronisere",
	step1Html: "<input type='hidden' name='markList'></input>", // DO NOT TRANSLATE
	syncLabel: "synk",
	syncPrompt: "Synkronisér disse tiddlere",
	hasChanged: "Ændret imens den var koblet fra",
	hasNotChanged: "Uændret imens den var koblet fra",
	syncStatusList: {
		none: {text: "...", color: "gennemsigtig", display:null},
		changedServer: {text: "Ændret på serveren", color: '#8080ff', display:null},
		changedLocally: {text: "Ændret imens den var koblet fra", color: '#80ff80', display:null},
		changedBoth: {text: "ændret imens den var koblet fra også på serveren", color: '#ff8080', display:null},
		notFound: {text: "Ikke fundet på serveren", color: '#ffff80', display:null},
		putToServer: {text: "Gemt update på serveren", color: '#ff80ff', display:null},
		gotFromServer: {text: "Hentet update fra serveren", color: '#80ffff', display:null}
		}
	});

merge(config.commands.closeTiddler,{
	text: "luk",
	tooltip: "Luk denne tiddler"});

merge(config.commands.closeOthers,{
	text: "luk andre",
	tooltip: "Luk alle andre tiddlere"});

merge(config.commands.editTiddler,{
	text: "redigér",
	tooltip: "Redigér denne tiddler",
	readOnlyText: "se",
	readOnlyTooltip: "Se denne tiddlers kilde"});

merge(config.commands.saveTiddler,{
	text: "færdig",
	tooltip: "Gem ændringer til denne tiddler"});

merge(config.commands.cancelTiddler,{
	text: "fortryd",
	tooltip: "Fortryd ændringer til denne tiddler",
	warning: "Er du sikker på at du vil fortryde dine ændringer til  '%0'?",
	readOnlyText: "færdig",
	readOnlyTooltip: "Se tiddlere normalt"});

merge(config.commands.deleteTiddler,{
	text: "slet",
	tooltip: "Slet denne tiddler",
	warning: "Er du sikker på at du vil slette '%0'?"});

merge(config.commands.permalink,{
	text: "permalink",
	tooltip: "Permalink til denne tiddler"});

merge(config.commands.references,{
	text: "referencer",
	tooltip: "Vis tiddlere som linker til denne tiddler",
	popupNone: "Ingen referencer"});

merge(config.commands.jump,{
	text: "spring",
	tooltip: "Spring til en anden tiddler"});

merge(config.commands.syncing,{
	text: "synkroniserer",
	tooltip: "Kontroller synkronisering af denne tiddler med en server eller en fil",
	currentlySyncing: "<div>Currently syncing via <span class='popupHighlight'>'%0'</span> to:</"+"div><div>host: <span class='popupHighlight'>%1</span></"+"div><div>workspace: <span class='popupHighlight'>%2</span></"+"div>", // Note escaping of closing <div> tag
	notCurrentlySyncing: "Sykroniserer ikke lige nu",
	captionUnSync: "Stop synkronisering af denne tiddler",
	chooseServer: "Synkronisér denne tiddler med en anden server:",
	currServerMarker: "\u25cf ",
	notCurrServerMarker: "  "});

merge(config.commands.fields,{
	text: "felter",
	tooltip: "Vis denne tiddlers udvidede felter",
	emptyText: "Der er ingen udvidede felter til rådighed for denne tiddler",
	listViewTemplate: {
		columns: [
			{name: 'Field', field: 'field', title: "Field", type: 'String'},
			{name: 'Value', field: 'value', title: "Value", type: 'String'}
			],
		rowClasses: [
			],
		buttons: [
			]}});

merge(config.shadowTiddlers,{
	DefaultTiddlers: "[[TranslatedGettingStarted]]",
	MainMenu: "[[TranslatedGettingStarted]]\n\n\n^^~TiddlyWiki version <<version>>\n© 2007 [[UnaMesa|http://www.unamesa.org/]]^^",
	TranslatedGettingStarted: "For at komme i gang med denne tomme tiddlywiki, skal du ændre på de følgende tiddlere:\n* SiteTitle & SiteSubtitle: Sidens titel og undertitel, som vist øverst (efter de er gemt, vil de også vise sig i browserens titelmenu)\n* MainMenu: er hovedmenuen (er oftest placeret til venstre)\n* DefaultTiddlers: Indeholder navnene på de tiddlere du vilhave skal starte op når du åbner TiddlyWiki\nDu skal også skrive dit brugernavn for at signere dine redigeringer: <<option txtUserName>>",
	SiteTitle: "Min TiddlyWiki",
	SiteSubtitle: "en genbrugelig ikke-liniær personlig web notesbog",
	SiteUrl: "http://www.tiddlywiki.com/",
	OptionsPanel: "Disse muligheder for at ændre på TiddlyWiki bliver gemt i din browser\n\nDit brugernavn til at signere dine ændringer. Skriv det som et WikiOrd (f.eks. PerPoulsen)\n<<option txtUserName>>\n\n<<option chkSaveBackups>> Save backups\n<<option chkAutoSave>> Auto save\n<<option chkRegExpSearch>> Regexp search\n<<option chkCaseSensitiveSearch>> Case sensitive search\n<<option chkAnimate>> Enable animations\n\n----\nAlso see [[TranslatedAdvancedOptions|AdvancedOptions]]",
	SideBarOptions: '<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "DD MMM YYYY" "journal">><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "muligheder \u00bb" "Ændre på TiddlyWikis avancerede muligheder">>',
	SideBarTabs: '<<tabs txtMainTab "Tidslinie" "Tidslinie" TabTimeline "Alle" "Alle tiddlere" TabAll "Tags" "Alle tags" TabTags "Flere" "Flere lister" TabMore>>',
	TabMore: '<<tabs txtMoreTab "Manglende" "Manglende tiddlere" TabMoreMissing "Uden tilknytning" "Tiddlere" TabMoreOrphans "Skyggede" "Skyggede tiddlere" TabMoreShadowed>>'
	});

merge(config.annotations,{
	AdvancedOptions: "Denne skygge tiddler giver adgang til flere avancerede muligheder",
	ColorPalette: "Disse værdier i denne skyggetiddler bestemmer hvilket farveskema, der bliver brugt til ~TiddlyWikis brugerflade",
	DefaultTiddlers: "Tiddlere som er listede i denne skyggetiddler vil automatisk blive vist når ~TiddlyWiki starter op",
	EditTemplate: "HTML skabelonen i denne skyggetiddler bestemmer hvordan tiddlere ser ud når de bliver redigerede",
	GettingStarted: "Denne skyggetiddler giver instruktioner om grundlæggende anvendelse",
	ImportTiddlers: "Denne skyggetiddler giver mulighed for at importere tiddlere",
	MainMenu: "Denne tiddler bliver brugt til at definere indholdet af hoved menuen i venstre side af skærmen",
	MarkupPreHead: "Denne tiddler bliver indsat i toppen af <head> sektionen på TiddlyWiki HTML filen",
	MarkupPostHead: "Denne tiddler bliver indsat i bunden af <head> sektionen på TiddlyWiki HTML filen",
	MarkupPreBody: "Denne tiddler bliver indsat i toppen af<body> sektionen på TiddlyWiki HTML filen",
	MarkupPostBody: "Denne tiddler bliver indsat i slutningen af  <body> sektionen på TiddlyWiki HTML filen umiddelbart efter script blokken",
	OptionsPanel: "Denne skyggetiddler bliver brugt til indholdet af muligheder skydepanelet i højre side",
	PageTemplate: "HTML skabelonen i denne skyggetiddler bestemmer det overordnede ~TiddlyWiki layout",
	PluginManager: "Denne skyggetiddler giver adgang til udvidelsesadministrationen",
	SideBarOptions: "Denne skyggetiddler bruges til indholdet af muligheder panelet i højre sidemenu",
	SideBarTabs: "Denne skyggetiddler bruges til indholdet af fanebladspanelet i højre sidemenu",
	SiteSubtitle: "Denne skyggetiddler bruges som anden del af sidens titel",
	SiteTitle: "Denne skyggetiddler bruges som første del af sidens titel",
	SiteUrl: "Denne skyggetiddler bør sættes til den fulde mål-URL til publikation",
	StyleSheetColors: "Denne skyggetiddler indeholder CSS definitionerne der bestemmer farverne på side elementerne. ''REDIGÉR IKKE DENNE TIDDLER'', lav i stedet dine ændringer i StyleSheet skyggetiddleren",
	StyleSheet: "Denne tiddler kan indeholde specialle CSS definitioner",
	StyleSheetLayout: "Denne skyggetiddler indeholder CSS definitioner der bestemmer layoutet på side elementer. ''REDIGÉR IKKE DENNE TIDDLER'', lav i stedet dine ændringer i StyleSheet skyggetiddleren",
	StyleSheetLocale: "Denne skyggetiddler indeholder CSS definitioner relateret til lokale oversættelser",
	StyleSheetPrint: "Denne skyggetiddler indeholder CSS definitioner til print",
	TabAll: "Denne skyggetiddler indeholder hvad der er i 'Alle' fanen i højre sidemenu",
	TabMore: "Denne skyggetiddler indeholder  hvad der er i 'Flere' fanen i højre sidemenu",
	TabMoreMissing: "Denne skyggetiddler indeholder  hvad der er i 'Mangler' fanen i højre sidemenu",
	TabMoreOrphans: "Denne skyggetiddler indeholder  hvad der er i  'Mangler tilknytning' fanen i højre sidemenu",
	TabMoreShadowed: "Denne skyggetiddler indeholder  hvad der er i 'Skyggede' fanen i højre sidemenu",
	TabTags: "Denne skyggetiddler indeholder  hvad der er i 'Tags' fanen i højre sidemenu",
	TabTimeline: "Denne skyggetiddler indeholder hvad der er i 'Tidslinie' fanen i højre sidemenu",
	ToolbarCommands: "Denne skyggetiddler bestemmer hvilke værktøjer der vises i tiddleres værktøjslinier",
	ViewTemplate: "HTML skabelonen i denne skyggetiddler bestemmer hvordan tiddlere ser ud"
	});

//}}}
/***
|''Name:''|DataTiddlerPlugin|
|''Version:''|1.0.6 (2006-08-26)|
|''Source:''|http://tiddlywiki.abego-software.de/#DataTiddlerPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license]]|
|''TiddlyWiki:''|1.2.38+, 2.0|
|''Browser:''|Firefox 1.0.4+; InternetExplorer 6.0|
!Description
Enhance your tiddlers with structured data (such as strings, booleans, numbers, or even arrays and compound objects) that can be easily accessed and modified through named fields (in JavaScript code).

Such tiddler data can be used in various applications. E.g. you may create tables that collect data from various tiddlers. 

''//Example: "Table with all December Expenses"//''
{{{
<<forEachTiddler
    where
        'tiddler.tags.contains("expense") && tiddler.data("month") == "Dec"'
    write
        '"|[["+tiddler.title+"]]|"+tiddler.data("descr")+"| "+tiddler.data("amount")+"|\n"'
>>
}}}
//(This assumes that expenses are stored in tiddlers tagged with "expense".)//
<<forEachTiddler
    where
        'tiddler.tags.contains("expense") && tiddler.data("month") == "Dec"'
    write
        '"|[["+tiddler.title+"]]|"+tiddler.data("descr")+"| "+tiddler.data("amount")+"|\n"'
>>
For other examples see DataTiddlerExamples.




''Access and Modify Tiddler Data''

You can "attach" data to every tiddler by assigning a JavaScript value (such as a string, boolean, number, or even arrays and compound objects) to named fields. 

These values can be accessed and modified through the following Tiddler methods:
|!Method|!Example|!Description|
|{{{data(field)}}}|{{{t.data("age")}}}|Returns the value of the given data field of the tiddler. When no such field is defined or its value is undefined {{{undefined}}} is returned.|
|{{{data(field,defaultValue)}}}|{{{t.data("isVIP",false)}}}|Returns the value of the given data field of the tiddler. When no such field is defined or its value is undefined the defaultValue is returned.|
|{{{data()}}}|{{{t.data()}}}|Returns the data object of the tiddler, with a property for every field. The properties of the returned data object may only be read and not be modified. To modify the data use DataTiddler.setData(...) or the corresponding Tiddler method.|
|{{{setData(field,value)}}}|{{{t.setData("age",42)}}}|Sets the value of the given data field of the tiddler to the value. When the value is {{{undefined}}} the field is removed.|
|{{{setData(field,value,defaultValue)}}}|{{{t.setData("isVIP",flag,false)}}}|Sets the value of the given data field of the tiddler to the value. When the value is equal to the defaultValue no value is set (and the field is removed).|

Alternatively you may use the following functions to access and modify the data. In this case the tiddler argument is either a tiddler or the name of a tiddler.
|!Method|!Description|
|{{{DataTiddler.getData(tiddler,field)}}}|Returns the value of the given data field of the tiddler. When no such field is defined or its value is undefined {{{undefined}}} is returned.|
|{{{DataTiddler.getData(tiddler,field,defaultValue)}}}|Returns the value of the given data field of the tiddler. When no such field is defined or its value is undefined the defaultValue is returned.|
|{{{DataTiddler.getDataObject(tiddler)}}}|Returns the data object of the tiddler, with a property for every field. The properties of the returned data object may only be read and not be modified. To modify the data use DataTiddler.setData(...) or the corresponding Tiddler method.|
|{{{DataTiddler.setData(tiddler,field,value)}}}|Sets the value of the given data field of the tiddler to the value. When the value is {{{undefined}}} the field is removed.|
|{{{DataTiddler.setData(tiddler,field,value,defaultValue)}}}|Sets the value of the given data field of the tiddler to the value. When the value is equal to the defaultValue no value is set (and the field is removed).|
//(For details on the various functions see the detailed comments in the source code.)//


''Data Representation in a Tiddler''

The data of a tiddler is stored as plain text in the tiddler's content/text, inside a "data" section that is framed by a {{{<data>...</data>}}} block. Inside the data section the information is stored in the [[JSON format|http://www.crockford.com/JSON/index.html]]. 

//''Data Section Example:''//
{{{
<data>{"isVIP":true,"user":"John Brown","age":34}</data>
}}}

The data section is not displayed when viewing the tiddler (see also "The showData Macro").

Beside the data section a tiddler may have all kind of other content.

Typically you will not access the data section text directly but use the methods given above. Nevertheless you may retrieve the text of the data section's content through the {{{DataTiddler.getDataText(tiddler)}}} function.


''Saving Changes''

The "setData" methods respect the "ForceMinorUpdate" and "AutoSave" configuration values. I.e. when "ForceMinorUpdate" is true changing a value using setData will not affect the "modifier" and "modified" attributes. With "AutoSave" set to true every setData will directly save the changes after a setData.


''Notifications''

No notifications are sent when a tiddler's data value is changed through the "setData" methods. 

''Escape Data Section''
In case that you want to use the text {{{<data>}}} or {{{</data>}}} in a tiddler text you must prefix the text with a tilde ('~'). Otherwise it may be wrongly considered as the data section. The tiddler text {{{~<data>}}} is displayed as {{{<data>}}}.


''The showData Macro''

By default the data of a tiddler (that is stored in the {{{<data>...</data>}}} section of the tiddler) is not displayed. If you want to display this data you may used the {{{<<showData ...>>}}} macro:

''Syntax:'' 
|>|{{{<<}}}''showData '' [''JSON''] [//tiddlerName//] {{{>>}}}|
|''JSON''|By default the data is rendered as a table with a "Name" and "Value" column. When defining ''JSON'' the data is rendered in JSON format|
|//tiddlerName//|Defines the tiddler holding the data to be displayed. When no tiddler is given the tiddler containing the showData macro is used. When the tiddler name contains spaces you must quote the name (or use the {{{[[...]]}}} syntax.)|
|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. 'or' means that exactly one of the two alternatives must exist.~~|


!Revision history
* v1.0.6 (2006-08-26) 
** Removed misleading comment
* v1.0.5 (2006-02-27) (Internal Release Only)
** Internal
*** Make "JSLint" conform
* v1.0.4 (2006-02-05)
** Bugfix: showData fails in TiddlyWiki 2.0
* v1.0.3 (2006-01-06)
** Support TiddlyWiki 2.0
* v1.0.2 (2005-12-22)
** Enhancements:
*** Handle texts "<data>" or "</data>" more robust when used in a tiddler text or as a field value.
*** Improved (JSON) error messages.
** Bugs fixed: 
*** References are not updated when using the DataTiddler.
*** Changes to compound objects are not always saved.
*** "~</data>" is not rendered correctly (expected "</data>")
* v1.0.1 (2005-12-13)
** Features: 
*** The showData macro supports an optional "tiddlername" argument to specify the tiddler containing the data to be displayed
** Bugs fixed: 
*** A script immediately following a data section is deleted when the data is changed. (Thanks to GeoffS for reporting.)
* v1.0.0 (2005-12-12)
** initial version

!Code
***/
//{{{
//============================================================================
//============================================================================
//                           DataTiddlerPlugin
//============================================================================
//============================================================================

// Ensure that the DataTiddler Plugin is only installed once.
//
if (!version.extensions.DataTiddlerPlugin) {



version.extensions.DataTiddlerPlugin = {
    major: 1, minor: 0, revision: 6,
    date: new Date(2006, 7, 26), 
    type: 'plugin',
    source: "http://tiddlywiki.abego-software.de/#DataTiddlerPlugin"
};

// For backward compatibility with v1.2.x
//
if (!window.story) window.story=window; 
if (!TiddlyWiki.prototype.getTiddler) {
	TiddlyWiki.prototype.getTiddler = function(title) { 
		var t = this.tiddlers[title]; 
		return (t !== undefined && t instanceof Tiddler) ? t : null; 
	};
}

//============================================================================
// DataTiddler Class
//============================================================================

// ---------------------------------------------------------------------------
// Configurations and constants 
// ---------------------------------------------------------------------------

function DataTiddler() {
}

DataTiddler = {
    // Function to stringify a JavaScript value, producing the text for the data section content.
    // (Must match the implementation of DataTiddler.parse.)
    //
    stringify : null,
    

    // Function to parse the text for the data section content, producing a JavaScript value.
    // (Must match the implementation of DataTiddler.stringify.)
    //
    parse : null
};

// Ensure access for IE
window.DataTiddler = DataTiddler;

// ---------------------------------------------------------------------------
// Data Accessor and Mutator
// ---------------------------------------------------------------------------


// Returns the value of the given data field of the tiddler.
// When no such field is defined or its value is undefined
// the defaultValue is returned.
// 
// @param tiddler either a tiddler name or a tiddler
//
DataTiddler.getData = function(tiddler, field, defaultValue) {
    var t = (typeof tiddler == "string") ? store.getTiddler(tiddler) : tiddler;
    if (!(t instanceof Tiddler)) {
        throw "Tiddler expected. Got "+tiddler;
    }

    return DataTiddler.getTiddlerDataValue(t, field, defaultValue);
};


// Sets the value of the given data field of the tiddler to
// the value. When the value is equal to the defaultValue
// no value is set (and the field is removed)
//
// Changing data of a tiddler will not trigger notifications.
// 
// @param tiddler either a tiddler name or a tiddler
//
DataTiddler.setData = function(tiddler, field, value, defaultValue) {
    var t = (typeof tiddler == "string") ? store.getTiddler(tiddler) : tiddler;
    if (!(t instanceof Tiddler)) {
        throw "Tiddler expected. Got "+tiddler+ "("+t+")";
    }

    DataTiddler.setTiddlerDataValue(t, field, value, defaultValue);
};


// Returns the data object of the tiddler, with a property for every field.
//
// The properties of the returned data object may only be read and
// not be modified. To modify the data use DataTiddler.setData(...) 
// or the corresponding Tiddler method.
//
// If no data section is defined a new (empty) object is returned.
//
// @param tiddler either a tiddler name or a Tiddler
//
DataTiddler.getDataObject = function(tiddler) {
    var t = (typeof tiddler == "string") ? store.getTiddler(tiddler) : tiddler;
    if (!(t instanceof Tiddler)) {
        throw "Tiddler expected. Got "+tiddler;
    }

    return DataTiddler.getTiddlerDataObject(t);
};

// Returns the text of the content of the data section of the tiddler.
//
// When no data section is defined for the tiddler null is returned 
//
// @param tiddler either a tiddler name or a Tiddler
// @return [may be null]
//
DataTiddler.getDataText = function(tiddler) {
    var t = (typeof tiddler == "string") ? store.getTiddler(tiddler) : tiddler;
    if (!(t instanceof Tiddler)) {
        throw "Tiddler expected. Got "+tiddler;
    }

    return DataTiddler.readDataSectionText(t);
};


// ---------------------------------------------------------------------------
// Internal helper methods (must not be used by code from outside this plugin)
// ---------------------------------------------------------------------------

// Internal.
//
// The original JSONError is not very user friendly, 
// especially it does not define a toString() method
// Therefore we extend it here.
//
DataTiddler.extendJSONError = function(ex) {
	if (ex.name == 'JSONError') {
        ex.toString = function() {
			return ex.name + ": "+ex.message+" ("+ex.text+")";
		};
	}
	return ex;
};

// Internal.
//
// @param t a Tiddler
//
DataTiddler.getTiddlerDataObject = function(t) {
    if (t.dataObject === undefined) {
        var data = DataTiddler.readData(t);
        t.dataObject = (data) ? data : {};
    }
    
    return t.dataObject;
};


// Internal.
//
// @param tiddler a Tiddler
//
DataTiddler.getTiddlerDataValue = function(tiddler, field, defaultValue) {
    var value = DataTiddler.getTiddlerDataObject(tiddler)[field];
    return (value === undefined) ? defaultValue : value;
};


// Internal.
//
// @param tiddler a Tiddler
//
DataTiddler.setTiddlerDataValue = function(tiddler, field, value, defaultValue) {
    var data = DataTiddler.getTiddlerDataObject(tiddler);
    var oldValue = data[field];
	
    if (value == defaultValue) {
        if (oldValue !== undefined) {
            delete data[field];
            DataTiddler.save(tiddler);
        }
        return;
    }
    data[field] = value;
    DataTiddler.save(tiddler);
};

// Internal.
//
// Reads the data section from the tiddler's content and returns its text
// (as a String).
//
// Returns null when no data is defined.
//
// @param tiddler a Tiddler
// @return [may be null]
//
DataTiddler.readDataSectionText = function(tiddler) {
    var matches = DataTiddler.getDataTiddlerMatches(tiddler);
    if (matches === null || !matches[2]) {
        return null;
    }
    return matches[2];
};

// Internal.
//
// Reads the data section from the tiddler's content and returns it
// (as an internalized object).
//
// Returns null when no data is defined.
//
// @param tiddler a Tiddler
// @return [may be null]
//
DataTiddler.readData = function(tiddler) {
    var text = DataTiddler.readDataSectionText(tiddler);
	try {
	    return text ? DataTiddler.parse(text) : null;
	} catch(ex) {
		throw DataTiddler.extendJSONError(ex);
	}
};

// Internal.
// 
// Returns the serialized text of the data of the given tiddler, as it
// should be stored in the data section.
//
// @param tiddler a Tiddler
//
DataTiddler.getDataTextOfTiddler = function(tiddler) {
    var data = DataTiddler.getTiddlerDataObject(tiddler);
    return DataTiddler.stringify(data);
};


// Internal.
// 
DataTiddler.indexOfNonEscapedText = function(s, subString, startIndex) {
	var index = s.indexOf(subString, startIndex);
	while ((index > 0) && (s[index-1] == '~')) { 
		index = s.indexOf(subString, index+1);
	}
	return index;
};

// Internal.
//
DataTiddler.getDataSectionInfo = function(text) {
	// Special care must be taken to handle "<data>" and "</data>" texts inside
	// a data section. 
	// Also take care not to use an escaped <data> (i.e. "~<data>") as the start 
	// of a data section. (Same for </data>)

    // NOTE: we are explicitly searching for a data section that contains a JSON
    // string, i.e. framed with braces. This way we are little bit more robust in
    // case the tiddler contains unescaped texts "<data>" or "</data>". This must
    // be changed when using a different stringifier.

	var startTagText = "<data>{";
	var endTagText = "}</data>";

	var startPos = 0;

	// Find the first not escaped "<data>".
	var startDataTagIndex = DataTiddler.indexOfNonEscapedText(text, startTagText, 0);
	if (startDataTagIndex < 0) {
		return null;
	}

	// Find the *last* not escaped "</data>".
	var endDataTagIndex = text.indexOf(endTagText, startDataTagIndex);
	if (endDataTagIndex < 0) {
		return null;
	}
	var nextEndDataTagIndex;
	while ((nextEndDataTagIndex = text.indexOf(endTagText, endDataTagIndex+1)) >= 0) {
		endDataTagIndex = nextEndDataTagIndex;
	}

	return {
		prefixEnd: startDataTagIndex, 
		dataStart: startDataTagIndex+(startTagText.length)-1, 
		dataEnd: endDataTagIndex, 
		suffixStart: endDataTagIndex+(endTagText.length)
	};
};

// Internal.
// 
// Returns the "matches" of a content of a DataTiddler on the
// "data" regular expression. Return null when no data is defined
// in the tiddler content.
//
// Group 1: text before data section (prefix)
// Group 2: content of data section
// Group 3: text behind data section (suffix)
//
// @param tiddler a Tiddler
// @return [may be null] null when the tiddler contains no data section, otherwise see above.
//
DataTiddler.getDataTiddlerMatches = function(tiddler) {
	var text = tiddler.text;
	var info = DataTiddler.getDataSectionInfo(text);
	if (!info) {
		return null;
	}

	var prefix = text.substr(0,info.prefixEnd);
	var data = text.substr(info.dataStart, info.dataEnd-info.dataStart+1);
	var suffix = text.substr(info.suffixStart);
	
	return [text, prefix, data, suffix];
};


// Internal.
//
// Saves the data in a <data> block of the given tiddler (as a minor change). 
//
// The "chkAutoSave" and "chkForceMinorUpdate" options are respected. 
// I.e. the TiddlyWiki *file* is only saved when AutoSave is on.
//
// Notifications are not send. 
//
// This method should only be called when the data really has changed. 
//
// @param tiddler
//             the tiddler to be saved.
//
DataTiddler.save = function(tiddler) {

    var matches = DataTiddler.getDataTiddlerMatches(tiddler);

    var prefix;
    var suffix;
    if (matches === null) {
        prefix = tiddler.text;
        suffix = "";
    } else {
        prefix = matches[1];
        suffix = matches[3];
    }

    var dataText = DataTiddler.getDataTextOfTiddler(tiddler);
    var newText = 
            (dataText !== null) 
                ? prefix + "<data>" + dataText + "</data>" + suffix
                : prefix + suffix;
    if (newText != tiddler.text) {
        // make the change in the tiddlers text
        
        // ... see DataTiddler.MyTiddlerChangedFunction
        tiddler.isDataTiddlerChange = true;
        
        // ... do the action change
        tiddler.set(
                tiddler.title,
                newText,
                config.options.txtUserName, 
                config.options.chkForceMinorUpdate? undefined : new Date(),
                tiddler.tags);

        // ... see DataTiddler.MyTiddlerChangedFunction
        delete tiddler.isDataTiddlerChange;

        // Mark the store as dirty.
        store.dirty = true;
 
        // AutoSave if option is selected
        if(config.options.chkAutoSave) {
           saveChanges();
        }
    }
};

// Internal.
//
DataTiddler.MyTiddlerChangedFunction = function() {
    // Remove the data object from the tiddler when the tiddler is changed
    // by code other than DataTiddler code. 
    //
    // This is necessary since the data object is just a "cached version" 
    // of the data defined in the data section of the tiddler and the 
    // "external" change may have changed the content of the data section.
    // Thus we are not sure if the data object reflects the data section 
    // contents. 
    // 
    // By deleting the data object we ensure that the data object is 
    // reconstructed the next time it is needed, with the data defined by
    // the data section in the tiddler's text.
    
    // To indicate that a change is a "DataTiddler change" a temporary
    // property "isDataTiddlerChange" is added to the tiddler.
    if (this.dataObject && !this.isDataTiddlerChange) {
        delete this.dataObject;
    }
    
    // call the original code.
	DataTiddler.originalTiddlerChangedFunction.apply(this, arguments);
};


//============================================================================
// Formatters
//============================================================================

// This formatter ensures that "~<data>" is rendered as "<data>". This is used to 
// escape the "<data>" of a data section, just in case someone really wants to use
// "<data>" as a text in a tiddler and not start a data section.
//
// Same for </data>.
//
config.formatters.push( {
    name: "data-escape",
    match: "~<\\/?data>",

    handler: function(w) {
            w.outputText(w.output,w.matchStart + 1,w.nextMatch);
    }
} );


// This formatter ensures that <data>...</data> sections are not rendered.
//
config.formatters.push( {
    name: "data",
    match: "<data>",

    handler: function(w) {
		var info = DataTiddler.getDataSectionInfo(w.source);
		if (info && info.prefixEnd == w.matchStart) {
            w.nextMatch = info.suffixStart;
		} else {
			w.outputText(w.output,w.matchStart,w.nextMatch);
		}
    }
} );


//============================================================================
// Tiddler Class Extension
//============================================================================

// "Hijack" the changed method ---------------------------------------------------

DataTiddler.originalTiddlerChangedFunction = Tiddler.prototype.changed;
Tiddler.prototype.changed = DataTiddler.MyTiddlerChangedFunction;

// Define accessor methods -------------------------------------------------------

// Returns the value of the given data field of the tiddler. When no such field 
// is defined or its value is undefined the defaultValue is returned.
//
// When field is undefined (or null) the data object is returned. (See 
// DataTiddler.getDataObject.)
//
// @param field [may be null, undefined]
// @param defaultValue [may be null, undefined]
// @return [may be null, undefined]
//
Tiddler.prototype.data = function(field, defaultValue) {
    return (field) 
         ? DataTiddler.getTiddlerDataValue(this, field, defaultValue)
         : DataTiddler.getTiddlerDataObject(this);
};

// Sets the value of the given data field of the tiddler to the value. When the 
// value is equal to the defaultValue no value is set (and the field is removed).
//
// @param value [may be null, undefined]
// @param defaultValue [may be null, undefined]
//
Tiddler.prototype.setData = function(field, value, defaultValue) {
    DataTiddler.setTiddlerDataValue(this, field, value, defaultValue);
};


//============================================================================
// showData Macro
//============================================================================

config.macros.showData = {
     // Standard Properties
     label: "showData",
     prompt: "Display the values stored in the data section of the tiddler"
};

config.macros.showData.handler = function(place,macroName,params) {
    // --- Parsing ------------------------------------------

    var i = 0; // index running over the params
    // Parse the optional "JSON"
    var showInJSONFormat = false;
    if ((i < params.length) && params[i] == "JSON") {
        i++;
        showInJSONFormat = true;
    }
    
    var tiddlerName = story.findContainingTiddler(place).id.substr(7);
    if (i < params.length) {
        tiddlerName = params[i];
        i++;
    }

    // --- Processing ------------------------------------------
    try {
        if (showInJSONFormat) {
            this.renderDataInJSONFormat(place, tiddlerName);
        } else {
            this.renderDataAsTable(place, tiddlerName);
        }
    } catch (e) {
        this.createErrorElement(place, e);
    }
};

config.macros.showData.renderDataInJSONFormat = function(place,tiddlerName) {
    var text = DataTiddler.getDataText(tiddlerName);
    if (text) {
        createTiddlyElement(place,"pre",null,null,text);
    }
};

config.macros.showData.renderDataAsTable = function(place,tiddlerName) {
    var text = "|!Name|!Value|\n";
    var data = DataTiddler.getDataObject(tiddlerName);
    if (data) {
        for (var i in data) {
            var value = data[i];
            text += "|"+i+"|"+DataTiddler.stringify(value)+"|\n";
        }
    }
    
    wikify(text, place);
};


// Internal.
//
// Creates an element that holds an error message
// 
config.macros.showData.createErrorElement = function(place, exception) {
    var message = (exception.description) ? exception.description : exception.toString();
    return createTiddlyElement(place,"span",null,"showDataError","<<showData ...>>: "+message);
};

// ---------------------------------------------------------------------------
// Stylesheet Extensions (may be overridden by local StyleSheet)
// ---------------------------------------------------------------------------
//
setStylesheet(
    ".showDataError{color: #ffffff;background-color: #880000;}",
    "showData");


} // of "install only once"
// Used Globals (for JSLint) ==============

// ... TiddlyWiki Core
/*global 	createTiddlyElement, saveChanges, store, story, wikify */
// ... DataTiddler
/*global 	DataTiddler */
// ... JSON
/*global 	JSON */
			

/***
!JSON Code, used to serialize the data
***/
/*
Copyright (c) 2005 JSON.org

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The Software shall be used for Good, not Evil.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

/*
    The global object JSON contains two methods.

    JSON.stringify(value) takes a JavaScript value and produces a JSON text.
    The value must not be cyclical.

    JSON.parse(text) takes a JSON text and produces a JavaScript value. It will
    throw a 'JSONError' exception if there is an error.
*/
var JSON = {
    copyright: '(c)2005 JSON.org',
    license: 'http://www.crockford.com/JSON/license.html',
/*
    Stringify a JavaScript value, producing a JSON text.
*/
    stringify: function (v) {
        var a = [];

/*
    Emit a string.
*/
        function e(s) {
            a[a.length] = s;
        }

/*
    Convert a value.
*/
        function g(x) {
            var c, i, l, v;

            switch (typeof x) {
            case 'object':
                if (x) {
                    if (x instanceof Array) {
                        e('[');
                        l = a.length;
                        for (i = 0; i < x.length; i += 1) {
                            v = x[i];
                            if (typeof v != 'undefined' &&
                                    typeof v != 'function') {
                                if (l < a.length) {
                                    e(',');
                                }
                                g(v);
                            }
                        }
                        e(']');
                        return;
                    } else if (typeof x.toString != 'undefined') {
                        e('{');
                        l = a.length;
                        for (i in x) {
                            v = x[i];
                            if (x.hasOwnProperty(i) &&
                                    typeof v != 'undefined' &&
                                    typeof v != 'function') {
                                if (l < a.length) {
                                    e(',');
                                }
                                g(i);
                                e(':');
                                g(v);
                            }
                        }
                        return e('}');
                    }
                }
                e('null');
                return;
            case 'number':
                e(isFinite(x) ? +x : 'null');
                return;
            case 'string':
                l = x.length;
                e('"');
                for (i = 0; i < l; i += 1) {
                    c = x.charAt(i);
                    if (c >= ' ') {
                        if (c == '\\' || c == '"') {
                            e('\\');
                        }
                        e(c);
                    } else {
                        switch (c) {
                            case '\b':
                                e('\\b');
                                break;
                            case '\f':
                                e('\\f');
                                break;
                            case '\n':
                                e('\\n');
                                break;
                            case '\r':
                                e('\\r');
                                break;
                            case '\t':
                                e('\\t');
                                break;
                            default:
                                c = c.charCodeAt();
                                e('\\u00' + Math.floor(c / 16).toString(16) +
                                    (c % 16).toString(16));
                        }
                    }
                }
                e('"');
                return;
            case 'boolean':
                e(String(x));
                return;
            default:
                e('null');
                return;
            }
        }
        g(v);
        return a.join('');
    },
/*
    Parse a JSON text, producing a JavaScript value.
*/
    parse: function (text) {
        var p = /^\s*(([,:{}\[\]])|"(\\.|[^\x00-\x1f"\\])*"|-?\d+(\.\d*)?([eE][+-]?\d+)?|true|false|null)\s*/,
            token,
            operator;

        function error(m, t) {
            throw {
                name: 'JSONError',
                message: m,
                text: t || operator || token
            };
        }

        function next(b) {
            if (b && b != operator) {
                error("Expected '" + b + "'");
            }
            if (text) {
                var t = p.exec(text);
                if (t) {
                    if (t[2]) {
                        token = null;
                        operator = t[2];
                    } else {
                        operator = null;
                        try {
                            token = eval(t[1]);
                        } catch (e) {
                            error("Bad token", t[1]);
                        }
                    }
                    text = text.substring(t[0].length);
                } else {
                    error("Unrecognized token", text);
                }
            } else {
                token = operator = undefined;
            }
        }


        function val() {
            var k, o;
            switch (operator) {
            case '{':
                next('{');
                o = {};
                if (operator != '}') {
                    for (;;) {
                        if (operator || typeof token != 'string') {
                            error("Missing key");
                        }
                        k = token;
                        next();
                        next(':');
                        o[k] = val();
                        if (operator != ',') {
                            break;
                        }
                        next(',');
                    }
                }
                next('}');
                return o;
            case '[':
                next('[');
                o = [];
                if (operator != ']') {
                    for (;;) {
                        o.push(val());
                        if (operator != ',') {
                            break;
                        }
                        next(',');
                    }
                }
                next(']');
                return o;
            default:
                if (operator !== null) {
                    error("Missing value");
                }
                k = token;
                next();
                return k;
            }
        }
        next();
        return val();
    }
};

/***
!Setup the data serialization
***/

DataTiddler.format = "JSON";
DataTiddler.stringify = JSON.stringify;
DataTiddler.parse = JSON.parse;

//}}}

/***
|''Name:''|DatePickerLibrary|
|''Description:''|DatePicker library for use with macros|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Code Repository:''|http://svn.tiddlywiki.org/Trunk/contributors/SaqImtiaz/libraries/DatePicker.js|
|''Version:''|0.9|
|''Date:''|06/04/2007|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.3.0|
***/

// /%
//!BEGIN-PLUGIN-CODE
//{{{
function $id(n) {
	return document.getElementById(n);
}

DatePicker = {
	
	days : ['S','M','T','W','T','F','S'],
		
	cells : new Array(42),
	
	setup : function(){
		var cte = createTiddlyElement;
		var table = this.table = cte(null,"table","datePickerTable");
		table.style.display = 'none';
        document.body.appendChild(table);
		var thead = cte(table,"thead");
		var hRow = cte(thead,"tr");
		hRow.onclick = stopEvent;
		cte(hRow,"td",null,"datePickerNav","<<").onclick = DatePicker.prevm;
		cte(hRow,"td","datePickerMNS",null,null,{colSpan:"5"});
		cte(hRow,"td",null,"datePickerNav",">>",{align:"right"}).onclick=DatePicker.nextm; 
		
		var tbody = cte(table,"tbody","datePickerTableBody");
		var dayRow = cte(tbody,"tr",null,"datePickerDaysHeader");
		
		for (var i=0; i<this.days.length; i++){
			cte(dayRow,"td",null,null,this.days[i]);
		}      
	},
	
	show : function(el,dateObj,cb) {
		var me = DatePicker;
		var now = me.now = new Date();
		if (!dateObj)
			dateObj = now;
		me.root = el;
		if (cb)
			me.root.datePickerCallback = cb;
		me.scc = { m : now.getMonth(), y : now.getFullYear(), d : now.getDate() };
				
		Popup.place(el,me.table,{x:0,y:1});

		
		var cur = [dateObj.getDate(),dateObj.getMonth()+1,dateObj.getFullYear()];

		me.cc = { m : cur[1]-1, y : cur[2] };
		me.sd = { m : cur[1]-1, y : cur[2], d : cur[0] };   
		me.fillCalendar(cur[0],me.scc.d,cur[1]-1,cur[2]);
	},
	
	fillCalendar : function(hd,today,cm,cy) {
		var me = DatePicker;
		
		var sd = me.now.getDate();
		var td = new Date(cy,cm,1)
		var cd = td.getDay();

		$id('datePickerMNS').innerHTML = td.formatString('MMM YYYY')
		
		var tbody = $id('datePickerTableBody');
		removeChildren(tbody);
		var dowRow = createTiddlyElement(tbody,"tr",null,"datePickerDowRow");

		for (var d=0;d<=7;d++) {
			// dow headings
			createTiddlyElement(dowRow,"td",null,null,DatePicker.days[d]);
		}
		
		var days = (new Date(cy, cm+1, 0)).getDate();
		var day = 1;
		for (var j=1;j<=6;j++) { //rows
			var row = createTiddlyElement(tbody,"tr",null,"datePickerDayRow");
			for (var t=1; t<=7; t++) { //cells
				var d = 7 * (j-1) - (-t); //id key      
				if ( (d >= (cd -(-1))) && (d<=cd-(-(days))) ) {
					var dip = ( ((d-cd < sd) && (cm == me.scc.m) && (cy == me.scc.y)) || (cm < me.scc.m && cy == me.scc.y) || (cy < me.scc.y) );
					var htd = ( (hd != '') && (d-cd == hd) );
					var hToday = ( (today != '') && (d-cd == today) && cy == me.scc.y && cm == me.scc.m );
					if (htd)
						_class = 'highlightedDate';                
					else if (dip)
						_class = 'oldDate';
					else if (hToday && ! htd)
						_class = 'todayDate';
					else
						_class = 'defaultDate';
					if (t == 1 || t == 7) {
						// weekend
						_class += ' weekend';
					}
					var cell = createTiddlyElement(row,"td","datePickerDay"+d,_class,d-cd);
					cell.onmouseover = function(e){addClass(this,'tdover');};
					cell.onmouseout = function(e){removeClass(this,'tdover');};
					cell.onclick = me.selectDate;
					me.cells[d] = new Date(cy,cm,d-cd);
				}
				else {
					var cell = createTiddlyElement(row,"td","datePickerDay"+d,"emptyDate");
				}
				day++;
			}
			if(day > days + cd)
				break;
		} 
	},
	
	nextm : function() {
		var me = DatePicker;        
		me.cc.m += 1;
		if (me.cc.m >= 12) {
			me.cc.m = 0;
			me.cc.y++;
		}
		me.fillCalendar(me.getDayStatus(me.cc.m,me.cc.y),me.scc.d,me.cc.m,me.cc.y);
		return false;
	},
	
	prevm : function() {
		var me = DatePicker;
		me.cc.m -= 1;
		if (me.cc.m < 0) {
			me.cc.m = 11;
			me.cc.y--;
		}
		me.fillCalendar(me.getDayStatus(me.cc.m,me.cc.y),me.scc.d,me.cc.m,me.cc.y);
		return false;
	},
	
	getDayStatus : function(ccm,ccy){
		return (ccy == this.sd.y && ccm == this.sd.m)? this.sd.d : '';
	},
	
	selectDate : function(ev){
		var e = ev ? ev : window.event;
		var me = DatePicker;
		var date = me.cells[resolveTarget(e).id.substring(13,resolveTarget(e).id.length)];
		if (me.root.datePickerCallback && typeof me.root.datePickerCallback == 'function')
			me.root.datePickerCallback(me.root,date);
		$id('datePickerTable').style.display = 'none';
		return false;
	},
	
	onclick : function(ev){
		$id("datePickerTable").style.display = 'none';
		return false;
	},
	
	create : function(el,dateObj,cb){
		el.onclick = el.onfocus = function(e){DatePicker.show(el,dateObj,cb);stopEvent(e)};
	},
	
	css: "table#datePickerTable td.datePickerNav {\n"+
		"    cursor:pointer;\n"+
		"}\n"+
		"\n"+
		".datePickerDaysHeader td {\n"+
		"    text-align:center;\n"+
		"    background:#ABABAB;\n"+
		"    font:12px Arial;\n"+
		"}\n"+
		"\n"+
		".datePickerDayRow td {\n"+
		"    width:18px;\n"+
		"    height:18px;\n"+
		"}\n"+
		"\n"+
		"td#datePickerMNS, td.datePickerNav {\n"+
		"    font:bold 13px Arial;\n"+
		"}\n"+
		"\n"+
		"table#datePickerTable {\n"+
		"    position:absolute;\n"+
		"    border-collapse:collapse;\n"+
		"    background:#FFFFFF;\n"+
		"    border:1px solid #ABABAB;\n"+
		"    display:none;   \n"+
		"}\n"+
		"\n"+
		"table#datePickerTable td{\n"+
		"    padding: 3px;\n"+
		"}\n"+
		"\n"+
		"td#datePickerMNS {\n"+
		"    text-align: center;\n"+
		"}\n"+
		"\n"+
		"tr.datePickerDayRow td {\n"+
		"    background-color : #C4D3EA;\n"+
		"    cursor : pointer;\n"+
		"    border : 1px solid #6487AE;\n"+
		"    text-align : center;\n"+
		"	font : 10px Arial;\n"+
		"}\n"+
		"\n"+
		"tr.datePickerDayRow td.defaultDate {\n"+
		"	color : #333333;	\n"+
		"	text-decoration : none;   \n"+
		"}\n"+
		"\n"+
		"tr.datePickerDayRow td.emptyDate {\n"+
		"    cursor:default; \n"+
		"}\n"+
		"\n"+
		"tr.datePickerDayRow td.oldDate {\n"+
		"	color : #ABABAB;\n"+
		"    text-decoration : line-through;\n"+
		"}\n"+
		"\n"+
		"tr.datePickerDayRow td.highlightedDate {\n"+
		"    background : #FFF799;\n"+
		"	font-weight : bold;\n"+
		"	color : #333333;\n"+
		"}\n"+
		"\n"+
		"tr.datePickerDayRow td.todayDate {\n"+
		"	font-weight : bold;\n"+
		"	color : red;\n"+
		"}\n"+
		"\n"+
		"table#datePickerTable tr.datePickerDayRow td.tdover {\n"+
		"    background:#fc6;\n"+
		"}",
	
	init : function(){
		this.setup();
		addEvent(document,'click',DatePicker.onclick);
		config.shadowTiddlers['StyleSheetDatePicker'] = this.css;
		if(store)
			store.addNotification('StyleSheetDatePicker',refreshStyles);
	}
};

DatePicker.init();
//}}}
//!END-PLUGIN-CODE
// %/
/***
|Name|DatePlugin|
|Source|http://www.TiddlyTools.com/#DatePlugin|
|Documentation|http://www.TiddlyTools.com/#DatePluginInfo|
|Version|2.7.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Options|##Configuration|
|Description|formatted dates plus popup menu with 'journal' link, changes and (optional) reminders|
There are quite a few calendar generators, reminders, to-do lists, 'dated tiddlers' journals, blog-makers and GTD-like schedule managers that have been built around TW.  While they all have different purposes, and vary in format, interaction, and style, in one way or another each of these plugins displays and/or uses date-based information to make finding, accessing and managing relevant tiddlers easier.  This plugin provides a general approach to embedding dates and date-based links/menus within tiddler content.
!!!!!Documentation
>see [[DatePluginInfo]]
!!!!!Configuration
<<<
<<option chkDatePopupHideCreated>> omit 'created' section from date popups
<<option chkDatePopupHideChanged>> omit 'changed' section from date popups
<<option chkDatePopupHideTagged>> omit 'tagged' section from date popups
<<option chkDatePopupHideReminders>> omit 'reminders' section from date popups
<<option chkShowJulianDate>> display Julian day number (1-365) below current date

see [[DatePluginConfig]] for additional configuration settings, for use in calendar displays, including:
*date formats
*color-coded backgrounds
*annual fixed-date holidays
*weekends
<<<
!!!!!Revisions
<<<
2008.03.08 [2.7.0] in addModifiedsToPopup(), if a tiddler was created on the specified date, don't list it in the 'changed' section of the popup.  Based on a request from Kashgarinn.
|please see [[DatePluginInfo]] for additional revision details|
2005.10.30 [0.9.0] pre-release
<<<
!!!!!Code
***/
//{{{
version.extensions.date = {major: 2, minor: 7, revision: 0, date: new Date(2008,3,8)};

config.macros.date = {
	format: "YYYY.0MM.0DD", // default date display format
	linkformat: "YYYY.0MM.0DD", // 'dated tiddler' link format
	linkedbg: "#babb1e", // "babble"
	todaybg: "#ffab1e", // "fable"
	weekendbg: "#c0c0c0", // "cocoa"
	holidaybg: "#ffaace", // "face"
	createdbg: "#bbeeff", // "beef"
	modifiedsbg: "#bbeeff", // "beef"
	remindersbg: "#c0ffee", // "coffee"
	holidays: [ "01/01", "07/04", "07/24", "11/24" ], // NewYearsDay, IndependenceDay(US), Eric's Birthday (hooray!), Thanksgiving(US)
	weekend: [ 1,0,0,0,0,0,1 ] // [ day index values: sun=0, mon=1, tue=2, wed=3, thu=4, fri=5, sat=6 ]
};

config.macros.date.handler = function(place,macroName,params)
{
	// do we want to see a link, a popup, or just a formatted date?
	var mode="display";
	if (params[0]=="display") { mode=params[0]; params.shift(); }
	if (params[0]=="popup") { mode=params[0]; params.shift(); }
	if (params[0]=="link") { mode=params[0]; params.shift(); }
	// get the date
	var now = new Date();
	var date = now;
	if (!params[0] || params[0]=="today")
		{ params.shift(); }
	else if (params[0]=="filedate")
		{ date=new Date(document.lastModified); params.shift(); }
	else if (params[0]=="tiddler")
		{ date=store.getTiddler(story.findContainingTiddler(place).id.substr(7)).modified; params.shift(); }
	else if (params[0].substr(0,8)=="tiddler:")
		{ var t; if ((t=store.getTiddler(params[0].substr(8)))) date=t.modified; params.shift(); }
	else {
		var y = eval(params.shift().replace(/Y/ig,(now.getYear()<1900)?now.getYear()+1900:now.getYear()));
		var m = eval(params.shift().replace(/M/ig,now.getMonth()+1));
		var d = eval(params.shift().replace(/D/ig,now.getDate()+0));
		date = new Date(y,m-1,d);
	}
	// date format with optional custom override
	var format=this.format; if (params[0]) format=params.shift();
	var linkformat=this.linkformat; if (params[0]) linkformat=params.shift();
	showDate(place,date,mode,format,linkformat);
}

window.showDate=showDate;
function showDate(place,date,mode,format,linkformat,autostyle,weekend)
{
	if (!mode) mode="display";
	if (!format) format=config.macros.date.format;
	if (!linkformat) linkformat=config.macros.date.linkformat;
	if (!autostyle) autostyle=false;

	// format the date output
	var title = date.formatString(format);
	var linkto = date.formatString(linkformat);

	// just show the formatted output
	if (mode=="display") { place.appendChild(document.createTextNode(title)); return; }

	// link to a 'dated tiddler'
	var link = createTiddlyLink(place, linkto, false);
	link.appendChild(document.createTextNode(title));
	link.title = linkto;
	link.date = date;
	link.format = format;
	link.linkformat = linkformat;

	// if using a popup menu, replace click handler for dated tiddler link
	// with handler for popup and make link text non-italic (i.e., an 'existing link' look)
	if (mode=="popup") {
		link.onclick = onClickDatePopup;
		link.style.fontStyle="normal";
	}
	// format the popup link to show what kind of info it contains (for use with calendar generators)
	if (autostyle) setDateStyle(place,link,weekend);
}
//}}}

//{{{
// NOTE: This function provides default logic for setting the date style when displayed in a calendar
// To customize the date style logic, please see[[DatePluginConfig]]
function setDateStyle(place,link,weekend) {
	// alias variable names for code readability
	var date=link.date;
	var fmt=link.linkformat;
	var linkto=date.formatString(fmt);
	var cmd=config.macros.date;

	if ((weekend!==undefined?weekend:isWeekend(date))&&(cmd.weekendbg!=""))
		{ place.style.background = cmd.weekendbg; }
	if (hasModifieds(date)||hasCreateds(date)||hasTagged(date,fmt))
		{ link.style.fontStyle="normal"; link.style.fontWeight="bold"; }
	if (hasReminders(date))
		{ link.style.textDecoration="underline"; }
	if (isToday(date))
		{ link.style.border="1px solid black"; }
	if (isHoliday(date)&&(cmd.holidaybg!=""))
		{ place.style.background = cmd.holidaybg; }
	if (hasCreateds(date)&&(cmd.createdbg!=""))
		{ place.style.background = cmd.createdbg; }
	if (hasModifieds(date)&&(cmd.modifiedsbg!=""))
		{ place.style.background = cmd.modifiedsbg; }
	if ((hasTagged(date,fmt)||store.tiddlerExists(linkto))&&(cmd.linkedbg!=""))
		{ place.style.background = cmd.linkedbg; }
	if (hasReminders(date)&&(cmd.remindersbg!=""))
		{ place.style.background = cmd.remindersbg; }
	if (isToday(date)&&(cmd.todaybg!=""))
		{ place.style.background = cmd.todaybg; }
	if (config.options.chkShowJulianDate) { // optional display of Julian date numbers
		var m=[0,31,59,90,120,151,181,212,243,273,304,334];
		var d=date.getDate()+m[date.getMonth()];
		var y=date.getFullYear();
		if (date.getMonth()>1 && (y%4==0 && y%100!=0) || y%400==0)
			d++; // after February in a leap year
		wikify("@@font-size:80%;<br>"+d+"@@",place);
	}

}
//}}}

//{{{
function isToday(date) // returns true if date is today
	{ var now=new Date(); return ((now-date>=0) && (now-date<86400000)); }

function isWeekend(date) // returns true if date is a weekend
	{ return (config.macros.date.weekend[date.getDay()]); }

function isHoliday(date) // returns true if date is a holiday
{
	var longHoliday = date.formatString("0MM/0DD/YYYY");
	var shortHoliday = date.formatString("0MM/0DD");
	for(var i = 0; i < config.macros.date.holidays.length; i++) {
		var holiday=config.macros.date.holidays[i];
		if (holiday==longHoliday||holiday==shortHoliday) return true;
	}
	return false;
}
//}}}

//{{{
// Event handler for clicking on a day popup
function onClickDatePopup(e)
{
	if (!e) var e = window.event;
	var theTarget = resolveTarget(e);
	var popup = Popup.create(this);
	if(popup) {
		// always show dated tiddler link (or just date, if readOnly) at the top...
		if (!readOnly || store.tiddlerExists(this.date.formatString(this.linkformat)))
			createTiddlyLink(popup,this.date.formatString(this.linkformat),true);
		else
			createTiddlyText(popup,this.date.formatString(this.linkformat));
		if (!config.options.chkDatePopupHideCreated)
			addCreatedsToPopup(popup,this.date,this.format);
		if (!config.options.chkDatePopupHideChanged)
			addModifiedsToPopup(popup,this.date,this.format);
		if (!config.options.chkDatePopupHideTagged)
			addTaggedToPopup(popup,this.date,this.linkformat);
		if (!config.options.chkDatePopupHideReminders)
			addRemindersToPopup(popup,this.date,this.linkformat);
	}
	Popup.show(popup,false);
	e.cancelBubble = true;
	if (e.stopPropagation) e.stopPropagation();
	return(false);
}
//}}}

//{{{
function indexCreateds() // build list of tiddlers, hash indexed by creation date
{
	var createds= { };
	var tiddlers = store.getTiddlers("title","excludeLists");
	for (var t = 0; t < tiddlers.length; t++) {
		var date = tiddlers[t].created.formatString("YYYY0MM0DD")
		if (!createds[date])
			createds[date]=new Array();
		createds[date].push(tiddlers[t].title);
	}
	return createds;
}
function hasCreateds(date) // returns true if date has created tiddlers
{
	if (!config.macros.date.createds) config.macros.date.createds=indexCreateds();
	return (config.macros.date.createds[date.formatString("YYYY0MM0DD")]!=undefined);
}

function addCreatedsToPopup(popup,when,format)
{
	var force=(store.isDirty() && when.formatString("YYYY0MM0DD")==new Date().formatString("YYYY0MM0DD"));
	if (force || !config.macros.date.createds) config.macros.date.createds=indexCreateds();
	var indent=String.fromCharCode(160)+String.fromCharCode(160);
	var createds = config.macros.date.createds[when.formatString("YYYY0MM0DD")];
	if (createds) {
		createds.sort();
		var e=createTiddlyElement(popup,"div",null,null,"oprettet ("+createds.length+")");
		for(var t=0; t<createds.length; t++) {
			var link=createTiddlyLink(popup,createds[t],false);
			link.appendChild(document.createTextNode(indent+createds[t]));
			createTiddlyElement(popup,"br",null,null,null);
		}
	}
}
//}}}

//{{{
function indexModifieds() // build list of tiddlers, hash indexed by modification date
{
	var modifieds= { };
	var tiddlers = store.getTiddlers("title","excludeLists");
	for (var t = 0; t < tiddlers.length; t++) {
		var date = tiddlers[t].modified.formatString("YYYY0MM0DD")
		if (!modifieds[date])
			modifieds[date]=new Array();
		modifieds[date].push(tiddlers[t].title);
	}
	return modifieds;
}
function hasModifieds(date) // returns true if date has modified tiddlers
{
	if (!config.macros.date.modifieds) config.macros.date.modifieds = indexModifieds();
	return (config.macros.date.modifieds[date.formatString("YYYY0MM0DD")]!=undefined);
}

function addModifiedsToPopup(popup,when,format)
{
	var date=when.formatString("YYYY0MM0DD");
	var force=(store.isDirty() && date==new Date().formatString("YYYY0MM0DD"));
	if (force || !config.macros.date.modifieds) config.macros.date.modifieds=indexModifieds();
	var indent=String.fromCharCode(160)+String.fromCharCode(160);
	var mods = config.macros.date.modifieds[date];
	if (mods) {
		// if a tiddler was created on this date, don't list it in the 'changed' section
		if (config.macros.date.createds && config.macros.date.createds[date]) {
			var temp=[];
			for(var t=0; t<mods.length; t++)
				if (!config.macros.date.createds[date].contains(mods[t]))
					temp.push(mods[t]);
			mods=temp;
		}
		mods.sort();
		var e=createTiddlyElement(popup,"div",null,null,"ændret ("+mods.length+")");
		for(var t=0; t<mods.length; t++) {
			var link=createTiddlyLink(popup,mods[t],false);
			link.appendChild(document.createTextNode(indent+mods[t]));
			createTiddlyElement(popup,"br",null,null,null);
		}
	}
}
//}}}

//{{{
function hasTagged(date,format) // returns true if date is tagging other tiddlers
{
	return store.getTaggedTiddlers(date.formatString(format)).length>0;
}

function addTaggedToPopup(popup,when,format)
{
	var indent=String.fromCharCode(160)+String.fromCharCode(160);
	var tagged=store.getTaggedTiddlers(when.formatString(format));
	if (tagged.length) var e=createTiddlyElement(popup,"div",null,null,"tagget ("+tagged.length+")");
	for(var t=0; t<tagged.length; t++) {
		var link=createTiddlyLink(popup,tagged[t].title,false);
		link.appendChild(document.createTextNode(indent+tagged[t].title));
		createTiddlyElement(popup,"br",null,null,null);
	}
}
//}}}

//{{{
function indexReminders(date,leadtime) // build list of tiddlers with reminders, hash indexed by reminder date
{
	var reminders = { };
	if(window.findTiddlersWithReminders!=undefined) { // reminder plugin is installed
		// DEBUG var starttime=new Date();
		var t = findTiddlersWithReminders(date, [0,leadtime], null, null, 1);
		for(var i=0; i<t.length; i++) reminders[t[i].matchedDate]=true;
		// DEBUG var out="Fandt "+t.length+" påmindelser i "+((new Date())-starttime+1)+"ms\n";
		// DEBUG out+="startdato: "+date.toLocaleDateString()+"\n"+"tidsforløb: "+leadtime+" dage\n\n";
		// DEBUG for(var i=0; i<t.length; i++) { out+=t[i].matchedDate.toLocaleDateString()+" "+t[i].params.title+"\n"; }
		// DEBUG alert(out);
	}
	return reminders;
}

function hasReminders(date) // returns true if date has reminders
{
	if (window.reminderCacheForCalendar)
		return window.reminderCacheForCalendar[date]; // use calendar cache
	if (!config.macros.date.reminders)
		config.macros.date.reminders = indexReminders(date,90); // create a 90-day leadtime reminder cache
	return (config.macros.date.reminders[date]);
}

function addRemindersToPopup(popup,when,format)
{
	if(window.findTiddlersWithReminders==undefined) return; // reminder plugin not installed

	var indent = String.fromCharCode(160)+String.fromCharCode(160);
	var reminders=findTiddlersWithReminders(when, [0,31],null,null,1);
	createTiddlyElement(popup,"div",null,null,"påmindelser ("+(reminders.length||"none")+")");
	for(var t=0; t<reminders.length; t++) {
		link = createTiddlyLink(popup,reminders[t].tiddler,false);
		var diff=reminders[t].diff;
		diff=(diff<1)?"i dag":((diff==1)?"i morgen":diff+" dage");
		var txt=(reminders[t].params["title"])?reminders[t].params["title"]:reminders[t].tiddler;
		link.appendChild(document.createTextNode(indent+diff+" - "+txt));
		createTiddlyElement(popup,"br",null,null,null);
	}
	if (readOnly) return;	// omit "ny påmindelse..." link
	var link = createTiddlyLink(popup,indent+"ny påmindelse...",true); createTiddlyElement(popup,"br");
	var title = when.formatString(format);
	link.title="tilføj en påmindelse til '"+title+"'";
	link.onclick = function() {
		// show tiddler editor
		story.displayTiddler(null, title, 2, null, null, false, false);
		// find body 'textarea'
		var c =document.getElementById("tiddler" + title).getElementsByTagName("*");
		for (var i=0; i<c.length; i++) if ((c[i].tagName.toLowerCase()=="textarea") && (c[i].getAttribute("edit")=="text")) break;
		// append reminder macro to tiddler content
		if (i<c.length) {
			if (store.tiddlerExists(title)) c[i].value+="\n"; else c[i].value="";
			c[i].value += "<<reminder";
			c[i].value += " dag:"+when.getDate();
			c[i].value += " måned:"+(when.getMonth()+1);
			c[i].value += " år:"+when.getFullYear();
			c[i].value += ' titel:"Skriv titel" >>';
		}
	};
}
//}}}
/***
|Name|DatePluginConfig|
|Source|http://www.TiddlyTools.com/#DatePluginConfig|
|Documentation|http://www.TiddlyTools.com/#DatePluginInfo|
|Version|2.6.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|formats, background colors and other optional settings for DatePlugin|
***/
// // Default popup content display options (can be overridden by cookies)
//{{{
if (config.options.chkDatePopupHideCreated===undefined)
	config.options.chkDatePopupHideCreated=false;
if (config.options.chkDatePopupHideChanged===undefined)
	config.options.chkDatePopupHideChanged=false;
if (config.options.chkDatePopupHideTagged===undefined)
	config.options.chkDatePopupHideTagged=false;
if (config.options.chkDatePopupHideReminders===undefined)
	config.options.chkDatePopupHideReminders=false;
//}}}

// // show Julian date number below regular date
//{{{
if (config.options.chkShowJulianDate===undefined)
	config.options.chkShowJulianDate=false;
//}}}

// // fixed-date annual holidays
//{{{
config.macros.date.holidays=[
	"01/01", // NewYearsDay, 
	"07/04", // US Independence Day
	"07/24"  // Eric's Birthday (hooray!)
];
//}}}

// // weekend map (1=weekend, 0=weekday)
//{{{
config.macros.date.weekend=[ 1,0,0,0,0,0,1 ]; // day index values: sun=0, mon=1, tue=2, wed=3, thu=4, fri=5, sat=6
//}}}

// // date display/link formats
//{{{
config.macros.date.format="YYYY.0MM.0DD"; // default date display format
config.macros.date.linkformat="YYYY.0MM.0DD"; // 'dated tiddler' link format
//}}}

// // When displaying a calendar (see [[CalendarPlugin]]), you can customize the colors/styles that are applied to the calendar dates by modifying the values and/or functions below:
//{{{
// default calendar colors
config.macros.date.weekendbg="#c0c0c0";
config.macros.date.holidaybg="#ffaace";
config.macros.date.createdbg="#bbeeff";
config.macros.date.modifiedsbg="#bbeeff";
config.macros.date.linkedbg="#babb1e";
config.macros.date.remindersbg="#c0ffee";

// apply calendar styles
function setDateStyle(place,link,weekend) {
	// alias variable names for code readability
	var date=link.date;
	var fmt=link.linkformat;
	var linkto=date.formatString(fmt);
	var cmd=config.macros.date;

	if ((weekend!==undefined?weekend:isWeekend(date))&&(cmd.weekendbg!=""))
		{ place.style.background = cmd.weekendbg; }
	if (hasModifieds(date)||hasCreateds(date)||hasTagged(date,fmt))
		{ link.style.fontStyle="normal"; link.style.fontWeight="bold"; }
	if (hasReminders(date))
		{ link.style.textDecoration="underline"; }
	if (isToday(date))
		{ link.style.border="1px solid black"; }
	if (isHoliday(date)&&(cmd.holidaybg!=""))
		{ place.style.background = cmd.holidaybg; }
	if (hasCreateds(date)&&(cmd.createdbg!=""))
		{ place.style.background = cmd.createdbg; }
	if (hasModifieds(date)&&(cmd.modifiedsbg!=""))
		{ place.style.background = cmd.modifiedsbg; }
	if ((hasTagged(date,fmt)||store.tiddlerExists(linkto))&&(cmd.linkedbg!=""))
		{ place.style.background = cmd.linkedbg; }
	if (hasReminders(date)&&(cmd.remindersbg!=""))
		{ place.style.background = cmd.remindersbg; }
	if (isToday(date)&&(cmd.todaybg!=""))
		{ place.style.background = cmd.todaybg; }
	if (config.options.chkShowJulianDate) {
		var m=[0,31,59,90,120,151,181,212,243,273,304,334];
		var d=date.getDate()+m[date.getMonth()];
		var y=date.getFullYear();
		if (date.getMonth()>1 && (y%4==0 && y%100!=0) || y%400==0) d++; // after February in a leap year
		wikify("@@font-size:80%;<br>"+d+"@@",place);
	}
}
//}}}
|Name|DatePluginInfo|
|Source|http://www.TiddlyTools.com/#DatePlugin|
|Documentation|http://www.TiddlyTools.com/#DatePluginInfo|
|Version|2.7.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|documentation|
|Requires||
|Overrides||
|Description|documentation for DatePlugin|
There are quite a few calendar generators, reminders, to-do lists, 'dated tiddlers' journals, blog-makers and GTD-like schedule managers that have been built around TW.  While they all have different purposes, and vary in format, interaction, and style, in one way or another each of these plugins displays and/or uses date-based information to make finding, accessing and managing relevant tiddlers easier.  This plugin provides a general approach to embedding dates and date-based links/menus within tiddler content.
!!!!!Usage
<<<
This plugin display formatted dates, for the specified year, month, day using number values or mathematical expressions such as (Y+1) or (D+30).  Optionally, you can create a link from the formatted output to a 'dated tiddler' for quick blogging or create a popup menu that includes the dated tiddler link plus links to tiddlers that were created/changed on that date, or are tagged with that date, as well as links to any pending reminders for the coming 31 days (if the RemindersPlugin is installed).  This plugin also provides a public API for easily incorporating formatted date output (with or without the links/popups) into other plugins, such as calendar generators, etc.

This plugin defines a macro: {{{<<date [mode] [date] [format] [linkformat]>>}}}.  All of the macro parameters are optional and, in it's simplest form, {{{<<date>>}}}, it is equivalent to the ~TiddlyWiki core macro, {{{<<today>>}}}.

However, where {{{<<today>>}}} simply inserts the current date/time in a predefined format (or custom format, using {{{<<today [format]>>}}}), the {{{<<date>>}}} macro's parameters take it much further than that:
* [mode] is either ''display'', ''link'' or ''popup''.  If omitted, it defaults to ''display''.  This param let's you select between simply displaying a formatted date, or creating a link to a specific 'date titled' tiddler or a popup menu containing a dated tiddler link, plus links to changes and reminders.
* [date] lets you enter ANY date (not just today) as ''year, month, and day values or simple mathematical expressions'' using pre-defined variables, Y, M, and D for the current year, month and day, repectively.  You can display the modification date of the current tiddler by using the keyword: ''tiddler'' in place of the year, month and day parameters.  Use ''tiddler://name-of-tiddler//'' to display the modification date of a specific tiddler.  You can also use keywords ''today'' or ''filedate'' to refer to these //dynamically changing// date/time values.  
* [format] and [linkformat] uses standard ~TiddlyWiki date formatting syntax.  The default is "YYYY.0MM.0DD"
>^^''DDD'' - day of week in full (eg, "Monday"), ''DD'' - day of month, ''0DD'' - adds leading zero^^
>^^''MMM'' - month in full (eg, "July"), ''MM'' - month number, ''0MM'' - adds leading zero^^
>^^''YYYY'' - full year, ''YY'' - two digit year, ''hh'' - hours, ''mm'' - minutes, ''ss'' - seconds^^
>^^//note: use of hh, mm or ss format codes is only supported with ''tiddler'', ''today'' or ''filedate'' values//^^
* [linkformat] - specify an alternative date format so that the title of a 'dated tiddler' link can have a format that differs from the date's displayed format

In addition to the macro syntax, DatePlugin also provides a public javascript API so that other plugins that work with dates (such as calendar generators, etc.) can quickly incorporate date formatted links or popups into their output:

''{{{showDate(place, date, mode, format, linkformat, autostyle, weekend)}}}'' 

Note that in addition to the parameters provided by the macro interface, the javascript API also supports two optional true/false parameters:
* [autostyle] - when true, the font/background styles of formatted dates are automatically adjusted to show the date's status:  'today' is boxed, 'changes' are bold, 'reminders' are underlined, while weekends and holidays (as well as changes and reminders) can each have a different background color to make them more visibly distinct from each other.
* [weekend] - true indicates a weekend, false indicates a weekday.  When this parameter is omitted, the plugin uses internal defaults to automatically determine when a given date falls on a weekend.
<<<
!!!!!Examples
<<<
The current date: <<date>>
The current time: <<date today "0hh:0mm:0ss">>
Today's blog: <<date link today "DDD, MMM DDth, YYYY">>
Recent blogs/changes/reminders: <<date popup Y M D-1 "yesterday">> <<date popup today "today">> <<date popup Y M D+1 "tomorrow">>
The first day of next month will be a <<date Y M+1 1 "DDD">>
This tiddler (DatePlugin) was last updated on: <<date tiddler "DDD, MMM DDth, YYYY">>
The SiteUrl was last updated on: <<date tiddler:SiteUrl "DDD, MMM DDth, YYYY">>
This document was last saved on <<date filedate "DDD, MMM DDth, YYYY at 0hh:0mm:0ss">>
<<date 2006 07 24 "MMM DDth, YYYY">> will be a <<date 2006 07 24 "DDD">>
<<<
!!!!!Revisions
<<<
2008.03.08 [2.7.0] in addModifiedsToPopup(), if a tiddler was created on the specified date, don't list it in the 'changed' section of the popup.  Based on a request from Kashgarinn
2008.01.31 [2.6.0] refactored date style logic into separate setDateStyle() function so it can be overridden by a custom definition.  See [[DatePluginConfig]].
2008.01.11 [2.5.0] added options to selectively suppress created/changes/tagged/reminders popup content 
2008.01.08 [*.*.*] plugin size reduction: documentation moved to DatePluginInfo
2007.11.21 [2.4.0] added hasTagged() and addTaggedToPopup() to list any tiddlers that has been tagged using the title of the dated journal tiddler asa tag value (i.e., the tiddlers that will be listed in the standard "tagging" display when viewing the journal tiddler itself).  Based on a request from Coby.
2007.06.20 [2.3.1] in onClickDatePopup(), use Popup.show() instead of deprecated ScrollToTiddlerPopup().  Fixes fatal error that prevents popups from being properly displayed
2007.05.31 [2.3.0] list "created" tiddlers in date popup.  Also, force re-cache of created/modified indices when displaying current date and store.isDirty(), so that popup is kept in sync with tiddler changes.
2006.05.09 [2.2.1] added "todaybg" handling to set background color of current date.  Also, honor excludeLists tag when getting lists of tiddlers.  Based on suggestions by Mark Hulme.
2006.05.05 [2.2.0] added "linkedbg" handling to set background color when a 'dated tiddler' exists.  Based on a suggestion by Mark Hulme.
2006.03.08 [2.1.2] add 'override leadtime' flag param in call to findTiddlersWithReminders(), and add "Enter a title" default text to new reminder handler.  Thanks to Jeremy Sheeley for these additional tweaks.
2006.03.06 [2.1.0] hasReminders() nows uses window.reminderCacheForCalendar[] when present.  If calendar cache is not present, indexReminders() now uses findTiddlersWithReminders() with a 90-day look ahead to check for reminders.  Also, switched default background colors for autostyled dates: reminders are now greenish ("c0ffee") and holidays are now reddish ("ffaace").
2006.02.14 [2.0.5] when readOnly is set (by TW core), omit "new reminders..." popup menu item and, if a "dated tiddler" does not already exist, display the date as simple text instead of a link.
2006.02.05 [2.0.4] added var to variables that were unintentionally global.  Avoids FireFox 1.5.0.1 crash bug when referencing global variables
2006.01.18 [2.0.3] In 1.2.x the tiddler editor's text area control was given an element ID=("tiddlerBody"+title), so that it was easy to locate this field and programmatically modify its content.  With the addition of configuration templates in 2.x, the textarea no longer has an ID assigned.  To find this control we now look through all the child nodes of the tiddler editor to locate a "textarea" control where attribute("edit") equals "text", and then append the new reminder to the contents of that control.
2006.01.11 [2.0.2] correct 'weekend' override detection logic in showDate()
2006.01.10 [2.0.1] allow custom-defined weekend days (default defined in config.macros.date.weekend[] array)
added flag param to showDate() API to override internal weekend[] array
2005.12.27 [2.0.0] Update for TW2.0
Added parameter handling for 'linkformat'
2005.12.21 [1.2.2] FF's date.getYear() function returns 105 (for the current year, 2005).  When calculating a date value from Y M and D expressions, the plugin adds 1900 to the returned year value get the current year number.  But IE's date.getYear() already returns 2005.  As a result, plugin calculated date values on IE were incorrect (e.g., 3905 instead of 2005).  Adding +1900 is now conditional so the values will be correct on both browsers.
2005.11.07 [1.2.1] added support for "tiddler" dynamic date parameter
2005.11.06 [1.2.0] added support for "tiddler:title" dynamic date parameter
2005.11.03 [1.1.2] when a reminder doesn't have a specified title parameter, use the title of the tiddler that contains the reminder as "fallback" text in the popup menu.  Based on a suggestion from BenjaminKudria.
2005.11.03 [1.1.1] Temporarily bypass hasReminders() logic to avoid excessive overhead from generating the indexReminders() cache.  While reminders can still appear in the popup menu, they just won't be indicated by auto-styling the date number that is displayed.  This single change saves approx. 60% overhead (5 second delay reduced to under 2 seconds).
2005.11.01 [1.1.0] corrected logic in hasModifieds() and hasReminders() so caching of indexed modifieds and reminders is done just once, as intended.  This should hopefully speed up calendar generators and other plugins that render multiple dates...
2005.10.31 [1.0.1] documentation and code cleanup
2005.10.31 [1.0.0] initial public release
2005.10.30 [0.9.0] pre-release
<<<
<html><iframe src="http://www.youtube.com/v/Qo7vUdKTlhk"></iframe></html>
[[watch it on youtube...|http://www.youtube.com/watch?v=Qo7vUdKTlhk]]
<<TTReportView>>
[[M.I.S.]]
[tag[opstart]]
To make it easy to organise tasks by the appropriate projects, products or whatever sensible unit best fits your needs, you can define a set of 'Scopes' in the ScopeDefinitions tiddler. This works in the same way as [[defining users|DefineUsers]].
In TeamTasks, you can assign tasks to users. If you are using TeamTasks individually and don't need to have different users set up, you can easily remove this functionality to make things appear even simpler in the user interface.

Defining a user is really simple. All you need to do is add user's names to the UserDefinitions tiddler.  Each name should occupy a single line in the tiddler.  All of the names in the UserDefinitions tiddler will be available for you to assign a task to.
I [[Lektier & opgaver|TeamTasks]], kan du knytte opgaver til flere brugere. Hvis du kun bruger det til dig selv kan du nemt fjerne funktionen.

Det er enkelt at oprette en bruger. Du skal blot tilføje navnene til [[BrugerDefinitioner|UserDefinitions]].  Hvert navn skal have sin egen linie.  Alle navne [[her|UserDefinitions]] kan få tildelt opgaver.
/***
|''Name:''|DeliciousTaggingPlugin|
|''Version:''|0.5|
|''Source''|http://tbGTD.tiddlyspot.com|
|''Author:''|[[TobiasBeer]]|
!Description
@@color:red;Mod of Jack's [[DeliciousTaggingPlugin|http://jackparke.googlepages.com/jtw.html]] to allow...
*custom tag-chosers
*tag-exclusion
@@
Allows easy tagging in the EditTemplate by showing all tags as a list of link-buttons.
Replace your the editorFooter div in your [[EditTemplate]] with the following:
{{{<div class='editorFooter' macro='deliciousTagging'></div>}}}
!Code
***/
//{{{
version.extensions.deliciousTagging={major: 0, minor: 1, revision: 0, date: new Date("June 11, 2007")};
config.macros.deliciousTagging={
catChose:"Tag this tiddler with '%0' its sub-tags or tiddlers tagging to them",
catList:'x-tagger config##Tags',
catsMore:['archive','reference'],
exclude:['noCloud','excludeLists'],
arrow:document.all?"▼":"▾",
handler:function(place,macroName,params,wikifier,paramString,tiddler){
if(tiddler instanceof Tiddler){
	var b,c,g,t,tx,tg,tn,tgs,ex=[],x,xx=this.exclude,lng=config.views.editor.tagChooser;
	for(tx=0;tx<xx.length;tx++){
		x=store.getTaggedTiddlers(xx[tx]);
		for(t=0;t<x.length;t++)ex.pushUnique(x[t].title);
	}
	g=store.getTiddlerText(this.catList);g=g?g.readBracketedList():[];
	for(c=0;c<this.catsMore.length;c++)g.pushUnique(this.catsMore[c]);
	for(c=0;c<g.length;c++){
		if(!store.getTiddler(g[c]))continue;
		b=createTiddlyButton(place,g[c]+this.arrow,this.catChose.format([g[c]]),this.clickCat);
		b.setAttribute("tiddler",tiddler.title);b.setAttribute("tags",g[c]);
	}
	tgs=store.getTags();
	for(t=0;t<tgs.length;t++){
		tn=tgs[t][0];if(ex.contains(tn))continue;
		tg=createTiddlyButton(place,tn,lng.tagTooltip.format([tn]),config.macros.tagChooser.onTagClick);
		tg.setAttribute("tag",tn);tg.setAttribute("tiddler",tiddler.title);
		place.appendChild(document.createTextNode(" "));
	}
}
},
clickCat:function(e){
	var b,pop,t,tg,ti,tgs=[],tgt,c,cx,lng=config.views.editor.tagChooser;
	e=e||window.event;
	pop=Popup.create(this);
	t=this.getAttribute('tags');tgs.pushUnique('MAIN:'+t);
	cx=store.getTaggedTiddlers(t);
	for(c=0;c<cx.length;c++){
		ti=cx[c].title;
		tgs.pushUnique('GROUP:'+ti);
		tgt=store.getTaggedTiddlers(ti);
		for(t=0;t<tgt.length;t++)tgs.pushUnique(tgt[t].title);
	}
	for(t=0;t<tgs.length;t++){
		tg=tgs[t];
		if(tg.indexOf('MAIN:')==0)tg=ti=tg.substr(5);
		else if(tg.indexOf('GROUP:')==0){tg=tg.substr(6);ti='\u00A0\u00A0'+tg;}
		else ti='\u00A0\u00A0\u00A0\u00A0'+tg;
		b=createTiddlyButton(createTiddlyElement(pop,"li"),ti,lng.tagTooltip.format([tg]),config.macros.tagChooser.onTagClick);
		b.setAttribute("tiddler",this.getAttribute("tiddler"));b.setAttribute("tag",tg);
	}
	Popup.show();
	e.cancelBubble = true;
	if(e.stopPropagation) e.stopPropagation();
	return false;
}
}
//}}}

/%
|Name|DigitalClock|
|Source|http://www.TiddlyTools.com/#DigitalClock|
|Version|1.0.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|script|
|Requires|InlineJavascriptPlugin|
|Overrides||
|Description|display current time with automatic LIVE update|

Usage: <<tiddler DigitalClock with: format tick>>

where 'format' is any TiddlyWiki date/time formatting string
and 'tick' is the time in seconds between display updates (default=1sec)

For example, use:
   << ... "0hh:0mm" 60>>
to show hours and minutes only, updated once per minute

%/<script>
	window.DigitalClock_tick=function(id){
		var e=document.getElementById(id); if (!e) return;
		e.title='click to '+(e.paused?'RESUME':'PAUSE')+' clock display';
		if (e.paused) return;
		e.innerHTML=new Date().formatString(e.fmt);
		setTimeout('window.DigitalClock_tick('+id+')',e.tick*1000);
	}
	var e=createTiddlyElement(place,'a',new Date().getTime()+Math.random());
	e.onclick=function(){this.paused=!this.paused;window.DigitalClock_tick(this.id);}
	e.style.cursor='pointer';
	e.fmt=('$1'=='$'+'1')?'hh12:0mm:0ss am':'$1';
	e.tick=('$2'=='$'+'2')?'1':'$2';
	window.DigitalClock_tick(e.id);
</script>
<<tiddler Download##server with: {{DataTiddler.getData("Server", "titel", "")}} >>
/%
!server
[[Server]]<br>
[[Download|http://$1.tiddlyspot.com/download]]<br>
<<tiddler HentLektieKnap with: $1>>
<<accordion>>
!end server
%/
/***
|Name|EditFieldPlugin|
|Source|http://www.TiddlyTools.com/#EditFieldPlugin|
|Version|1.5.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|extend core edit macro for use in ViewTemplates or direct embedding in tiddler content|
!!!!!Usage
<<<
Normally, when a tiddler is edited, a set of input fields is displayed (as defined by the [[EditTemplate]]), and any changes you make are only saved when you press the "done" (or "cancel") command in the tiddler editor's toolbar.  However, you can also ''embed an input field directly in //viewed// tiddler content'' by writing:
{{{
<<edit fieldname numberOfLines defaultValue>>
<<edit fieldname@TiddlerName numberOfLines defaultValue>>
}}}
or in the [[ViewTemplate]] (to add it to every tiddler):
{{{
<span macro='edit fieldname numberOfLines defaultValue'></span>
<span macro='edit fieldname@TiddlerName numberOfLines defaultValue'></span>
}}}
Unfortunately, while the input field will be displayed, the "done" command item is not available when //viewing// a tiddler, so the 'save/discard' handling cannot be invoked once you have decided that your input activities are complete, and any changes you make will not stored anywhere.  To address this, the plugin extends the input field handler so that when a field is embedded in normal tiddler content and you make changes, it can automatically save/discard your changes as soon as you press ENTER or move away ('onBlur' handling) from that input field.  You can also abandon your changes to input field content by pressing ESCAPE.

The plugin also adds support for an optional 'remote field reference' syntax: "{{{fieldname@TiddlerName}}}" so you can display and edit fields stored in other tiddlers.  This allows you to create, for example, 'summary' tiddlers for reviewing/editing field values from several tiddlers at the same time.  Note: whenever a remote field reference is used (even within the [[EditTemplate]]), the automatic save/discard behavior described above will be applied to that field, so that any changes will be saved immediately, and will not be saved again when the "done" command is pressed.
<<<
!!!!!Examples
<<<
*"""<<edit foobar>>"""<br><<edit foobar>>
*"""<<edit foobar@SomeTiddler>>"""<br><<edit foobar@SomeTiddler>>
*"""<<edit tags>>"""<br><<edit tags>>
*"""<<edit text 15>>"""<br>{{editor{<<edit text 15>>}}}
<<<
!!!!!Revisions
<<<
2009.09.16 [1.5.1] fixed 'onblur' handling for local fields (fieldname@here).  Added support for  '@here' syntax
2009.09.05 [1.5.0] code refactored.  added handling for fieldname@tiddlername
2007.08.22 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.EditFieldPlugin= {major: 1, minor: 5, revision: 1, date: new Date(2009,9,16)};

config.macros.edit.editFieldPlugin_savedHandler=config.macros.edit.handler;
config.macros.edit.handler = function(place,macroName,params,wikifier,paramString,tiddler) {

	// let core render input/textarea, then get resulting element
	config.macros.edit.editFieldPlugin_savedHandler.apply(this,arguments);
	var fieldType=params[0]=="text"||params[1]?'textarea':'input';
	var elems=place.getElementsByTagName(fieldType); var e=elems[elems.length-1];

	// extended fieldname@tiddlername handling
	var parts=e.getAttribute("edit").split('@');
	var field=parts[0];
	var title=parts[1]||tiddler.title;
	if (title=='here') title=tiddler.title;
	// stop field from being saved with 'done' button
	if (parts[1]) { e.setAttribute("edit",null); e.setAttribute("field",field); }

	// save starting value and target tiddler
	e.setAttribute("currval",store.getValue(title,field)||''); // save starting value
	e.setAttribute("tiddler",title);

	// force height for textarea field
	if (fieldType=="textarea" && params[1]) e.style.height=params[1]+"em";

	// if viewing tiddler, add autosave handlers
	var here=story.findContainingTiddler(place);
	var isViewed=here&&here.getAttribute("template").indexOf("ViewTemplate")!=-1;
	if (parts[1]||isViewed) { // remote reference or view mode editing...
		story.setDirty(tiddler.title,false); // clear tiddler ("dirty") flag (set by core)
		e.onkeydown=function(ev) { // ENTER key=save (for single-line input)
			var event=ev?ev:window.event;
			this.setAttribute("keyCode",event.keyCode); // save last keyCode (for blur)
			if (event.keyCode==13 && this.nodeName.toUpperCase()!="TEXTAREA")
				this.saveField(); // save input to tiddler field
		}
		e.onblur=function(ev) { // confirm input when focus moves away
			var event=ev?ev:window.event;
			var tid=this.getAttribute("tiddler"); if (!tid || !tid.length) return;
			var field=this.getAttribute("edit")||this.getAttribute("field");
			if (this.value==this.getAttribute("currval")) return; // no change
			if (this.getAttribute("keyCode")=="27") { // if user pressed ESC
				var msg="Abandon changes to %0@%1?".format([field,tid]);
				if (confirm(msg)) this.value=this.getAttribute("currval"); // reset value
				this.id=new Date().getTime(); // set unique ID for delayed re-focus after blur
				setTimeout("document.getElementById('"+this.id+"').focus()",1);
			} else { // other focus change events
				var msg="Save changes to %0@%1?".format([field,tid]);
				if (confirm(msg)) this.saveField();
				else this.value=this.getAttribute("currval");
			}
		};
		e.saveField=function() { // unpack/validate attribs and then save the field
			var tid=this.getAttribute("tiddler"); if (!tid || !tid.length) return;
			var field=this.getAttribute("edit")||this.getAttribute("field");
			var title=(field=="title")?this.value:tid;
			if (!title.length) { // error: blank tiddler title
				this.value=this.getAttribute("currval"); // reset value
				this.id=new Date().getTime(); // set unique ID for delayed messages/refocus
				setTimeout("displayMessage('Please enter a non-blank value')",1);
				setTimeout("document.getElementById('"+this.id+"').focus()",2);
				return;
			}
			config.macros.edit.saveField(tid,title,field,this.value);
			this.setAttribute("currval",this.value); // remember new starting value
		};
	}
}
//}}}
//{{{
// save input value to tiddler field (create/touch/rename tiddler as needed)
config.macros.edit.saveField = function(tid,title,field,val) {
	var t=store.getTiddler(tid);
	store.suspendNotifications();
	var anim=config.options.chkAnimate; config.options.chkAnimate=false; // suspend animation
	var who=t&&config.options.chkForceMinorUpdate?t.modifier:config.options.txtUserName;
	var when=t&&config.options.chkForceMinorUpdate?t.modified:new Date();
	store.saveTiddler(t?tid:title,title,t?t.text:"",who,when,t?t.tags:[],t?t.fields:null);
	store.setValue(title,field,val); // save field
	if (tid!=title) // new title... show renamed tiddler in place of current one
		{ story.displayTiddler(story.getTiddler(tid),title); story.closeTiddler(tid); }
	if (field=="text") // content changed, refresh tiddler display
		{ story.refreshTiddler(title,null,true); }
	config.options.chkAnimate=anim; // resume animation
	store.resumeNotifications();
	store.notify(title,true);
}
//}}}
<!--{{{-->
<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 macro='tiddler QuickEditToolbar'></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>
<!--}}}-->
/***
|Name:|ElemPlugin|
|Description:|functions to manipulate DOM elements|
|Source:|http://tbGTD.tiddlyspot.com/#ElemPlugin|
|Info:|http://tbGTD.tiddlyspot.com/#ElemPluginInfo [[ElemPluginInfo]]|
|Author:|Tobias Beer|
|Date:|2009-10-21|
|Version:|1.0|
!Info
[[See ElemPluginInfo...|ElemPluginInfo]]
!Code
***/
//{{{
config.macros.elem={
lang:{
	err:"@@color:red;~ElemPlugin error!@@",
	errId:"Id '%1' already used in the document, wont force overwrite.",
	errStyle:"Could not apply '%1' as '%2' to the element. Invalid style property? Error: %3",
	errJQ:"jQuery('%1')[%2] is not a valid object. Wrong index?",
	errJQapply:"Could not perform jQuery('%1').%2(%3). Invalid object? Error: %4?"
},
unsafe:['displayArea','contentWrapper','tiddlerDisplay','tiddlersBar','messageArea','sidebar','mainMenu'],
lastRemoved:false,
handler:function(place,macroName,params,wikifier,paramString,tiddler){
	p=params;if(!p[0])return;
	//s=tmp im=important, sh=shift, st=style, pa=path, e=elem, et=tiddler elem in dom
	var s,im,sh,st,pa,e=place, et=story.getTiddler(tiddler.title);
	//check path for shift
	pa=p[p.length-1].split('<');sh=pa[pa.length-1]=='';
	if(sh){//if shift, get pa=path as defString
		//take param out
		p.pop();s=pa[0];
		if(s[0]=='!'){im=true;s=s.substr(1);}//check important
		var bd=s.toUpperCase()=='BODY';
		if(pa.length==3||bd){//if shifted twice -> e remains place, unless...
			if(bd)e=document.body;//e is body
			pa=pa[1]||'';
		}else{pa=s;e=e.lastChild;}//shifted once -> e is place.lastChild
		if(pa!='')e=this.getElem(e,pa,et=im?null:et);//get elem by path if any left
	}
	//element lost -> get out
	if(!e)return;
	//if styles -> get styles, take param out
	pa=p[p.length-1];if(pa){pa=pa.split('{}');if(pa[1]==''){p.pop();st=this.arrDefs(pa[0]);}}
	//apply styles
	if(st)for(var j=0;j<st.length;j++){
		try{e.style[st[j][0]]=st[j][1];}
		catch(err){this.err('errStyle,'+st[j][0]+','+st[j][1]+','+err.description);}
	}
	if(!p[0])return;else c=p[0].toUpperCase();	
	switch(c){
	case 'SHOW':
	case 'HIDE':
	case 'ELSE':this.remove(p,tiddler,e,et);break;
	default:
		if(p[1]==undefined)return;else var curr=document.getElementById(p[1]);//get current
		switch(c){
		case "ID":
			//id=p[1], get force -> set if id unassigned or force
			var p2=p[2]?p[2].toUpperCase():'';
			var f=p2.indexOf("FORCE")>-1,si=p2.indexOf("SILENT")>-1;
			if(e.id!=p[1]&&(!e.id.length||f)){
				if(curr!=null){if(!si)this.err('errId,'+p[1],place);return;}
				else e.id=p[1];
			}break;
		case 'EVAL':
			p.shift();while(p.length>0)eval(p.shift());break;
		case "MOVE":
			if(curr)e.insertBefore(curr,null);break;
		case "CLASS":
			if(!(removeClass instanceof Function)&&(addClass instanceof Function))return;
			for(var i=1;i<p.length;i++){
				a=p[i].split(':')
				switch(a[0].toUpperCase()){
				case 'REMOVEALL':e.removeAttribute('class');break;
				case 'REMOVE':removeClass(e,a[1]);break;
				case 'ADD':addClass(O,a[1]);break;
				default:addClass(e,a[0]);
				}
			}break;
		case "RENAME":
	  	//split p[1] into arr, then get new name, id & title 
	    var a=p[1].split("#");var n=a[0];var id=a[1];var ti=p[2];
	    //if given -> set name, id and title
	    var fc=e.firstChild;if(fc&&fc.data){
				if(n)e.firstChild.data=n;if(id)e.setAttribute('id',id);if(ti)e.title=ti
			};
		}
	}
},
remove:function(p,t,e,et){
	//h=hide (imply SHOW) / y=yes remove / or='ELSE'
	var h=p.shift();h=h.toUpperCase()=='HIDE';var y=true,or=!p[0];
	if(or)y=!this.lastRemoved;
	else outer: switch(p.shift().toUpperCase()){
	case 'TITLE':
		//ti=title, fi=find, c=method, i=pos
		var ti=t.title;var fi=p[1];var c=p[0].toUpperCase();var i=ti.indexOf(fi); 
		switch(c){
			case 'CONTAINS':y=i>-1;break;
			case 'STARTS':y=i==0;break;
			case 'ENDS':y=(i==(ti.length-fi.length));break;
			//case 'is'
			default:y=(fi==undefined?ti==p[0]:ti==fi);
		}break;
	case 'TAGGED':
		c=p.shift();
		y=(c.toUpperCase()=='ANY'?t.tags.containsAny(p):(p.length==0?t.tags.contains(c):t.tags.containsAll(p)));
		break;
	case 'EXISTS': //C=cases, ti=title, c=caseNum
		var c=ti=p.shift();c=['SHADOW','TIDDLER','BOTH','EITHER'].indexOf(c.toUpperCase()); //c=case
		//invalid c, use tid
		if(c<0||!p[0])y=store.tiddlerExists(ti)||store.isShadowTiddler(ti);
		while(p.length>0){//all params
			//ti=title exists or is shadow
			ti=p.shift();var tid=store.tiddlerExists(ti);var shad=store.isShadowTiddler(ti);
			//leave if no match
			if(!(c==0?shad:(c==1?tid:(c==2?tid&&shad:tid||shad)))){y=false;break;}
		}break;
	case 'EVAL':
		if(p.length==0)break;else y=!h;		
		while(p.length>0){if(!(eval(p.shift()))){y=false;break outer;}};
		y=true;break;
	case 'FIELD':
		var f,c;
		//f=field, c=current val, v=value, op=operator
		while(p.length>0){//all params
			//init, get param, split by ':::', get field and current value
			var a=v=op=null;f=p.shift();a=f.split(':::');f=a[0];c=store.getValue(t,f);
			//check op and v 
			if(a[2]==undefined)v=a[1];else{op=a[1];if(op=="=")op="==";v=a[2];}
			//turns NaN to string before eval
			var ev=function(s){return s==undefined?s:(isNaN(s)?"\""+s+"\"":s)};
			//if v, replace %current and %field and eval v if requested
			if(v!=undefined&&v.indexOf('%%')==0)
				v=eval(v.substr(2).replace(/%current/g,c).replace(/%field/g,f));
			v=ev(v);c=ev(c);
			//leave if no match
			if(!(v==undefined?c!=undefined:(op==null?c==v:eval(c+op+v)))){y=false;break;}
		}break;
	default:y=null;
	}
	h=or?y:(y==null?y:(h?y:!y));
	//check id and don't remove this tiddler, the document body or any secured DOM element id
	var id=e.getAttribute('id');this.isSafe(e,et)?e:e=null;
	if(h&&e!=undefined){removeChildren(e);e.parentNode.removeChild(e);}
	this.lastRemoved=h;
	return h;
},
//get defString as arr
arrDefs:function(p,r){//p=params, r=num required (int)
	if(!p)p=[];//return empty
	else{
		var d,i,ok,x;p=p.split(';');//init vars & split defs
		for(d=0;d<p.length;d++){//all defs
			x=p[d].split('=');//x=[def,value1,value2,...]
			ok=true;while(ok&&r>0){ok=ok&&x[r-1];r--;}//check all required 
			if(ok)p[d]=x;//ok -> reassign as subarray
			else{p.splice(d,1);d--;} //nOk -> take out
		}
	}
	return p;//array
},
//get elem by pathString, applies jQuery expressions if defined
getElem:function(e,p,et){//e=elem in DOM, p=path, et=tiddler in DOM
	p=this.arrDefs(p);//get path as array of defs
	for(var d=0;d<p.length;d++){
		//pa=parent, l=last, v=value, i=int(v), i0 for PN&PS, i1 for CN
		var tmp,pa,l,v,i,i0; v=p[d][1];i=Math.max(0,parseInt(v));i0=isNaN(i)?0:i;i=isNaN(i)?1:i;
		switch(p[d][0].toUpperCase()){
		case 'PN':while(i>0&&e&&e!=l){l=e;pa=e.parentNode;e=this.isSafe(pa,et)?pa:e;i--;}break;
		case 'PS':while(i>0&&e&&e!=l){l=e;e=e.previousSibling||e;i--;}break;
		case 'CN':
			if(e.childNodes&&e.childNodes[0]){e=e.childNodes[i0]||e.lastChild;}break;
		case 'JQ':
			i=parseInt(p[d][2]);tmp=e;
			var q=jQuery(v,jQuery(tmp));
			//if no element query asked for -> execute jQuery(p1).p2(p3), else use element
			try{
				if(isNaN(i)){q[p[d][2]](eval('('+p[d][3]+')'));}
				else if(q[i]==undefined){this.err('errJQ,'+v+','+i,tmp);return;}
				else {e=q[i];}
			}
			catch(err){this.err('errJQapply,'+v+','+p[d][2]+','+p[d][3]+','+err.description,tmp);}
			break;
		}
	}return e;//valid DOM-node!
},
isSafe:function(e,et){//check element safety
	if(et!=null){//only if DOM tiddler defined
		var id=e.getAttribute('id');// get el id
		return e&&e!=et&&e!=document.body&&!(id&&this.unsafe.contains(id));
	}return true;//you know what you do, as you used !important
},
err:function(t,where){
	wikify(this.lang.err,where);var x=t.split(',');t=this.lang[x[0]];
	if(t){for(var i=1;i<x.length;i++){t=t.replace('%'+i,x[i])};where.lastChild.title=t;}
}
}
//}}}
|Name:|ElemPlugin|
|Description:|adds functions to manipulate DOM elements|
|Source:|http://tbGTD.tiddlyspot.com/#ElemPlugin|
|Date:|2009-10-21|
|Version:|1.0|
!Description
*incl. a refactored, enhanced version of [[HideWhenPlugin|http://mptw.tiddlyspot.com/#HideWhenPlugin]] to conditionally {{{hide}}} or {{{show}}} elements in themes or templates, like ViewTemplate or EditTemplate
*incl. a modified [[DOMTweaksPlugin|http://www.TiddlyTools.com/#DOMTweaksPlugin]]
*incl. "renameButton"
!Examples
{{{<div macro="elem show eval [[tiddler.modifier=='Klaus']][[yes?true:false]]"><img src="Klaus.gif"/></div>}}}
{{{<div macro="elem hide tagged any mySecretTag anotherVerySecretTag">[[mySecretLink]]</div>}}}
{{{<div macro="elem hide exists both ViewTemplate EditTemplate">use this while lacking your own templates</div>}}}
{{{<div macro="elem show field changecount:::>:::100 wheather:::nice">go do something else</div>}}}
{{{<div macro="elem else">keep on working</div>}}}
!Params
Read {{{<div macro="elem show eval [[(Date.now()-modified)/3600>1]]">more than an hour ago</div>}}} like this...
*p[ ] is the {{{params}}} array ...the one which contains all your passed parameters
*p[0]={{{'show'}}}
*p[1]={{{'eval'}}}
*p[2]={{{'(Date.now()-modified)/3600>1'}}}
!!Options
|tabEL|k
| p[0] | p[1] | p[2..n]|...''t''=current tiddler / ''p[1]''=2nd param / ''p[1..n]''=from 2nd to last param |>|h
| {{{show}}},<br />{{{hide}}} |background:white;{{{show}}} or {{{hide}}} the containing element when the cases below evaluate to ''true''...|>|>|>|
|~| !title | !cases for p[2]|!checks if t.title... |>|
|~|~| {{{contains}}}|contains p[3] |>|
|~|~| {{{starts}}}|starts with p[3] |>|
|~|~| {{{ends}}}|ends with p[3] |>|
|~|~| {{{anyOther}}} ...e.g. {{{is}}}|equals p[3] |>|
|~|~| {{{<someTiddlerTitle>}}}|equals {{{<someTiddlerTitle>}}}|>|
|~| !tagged | !cases for p[2]|!checks if tiddler has... |!pseudo code |
|~|~| {{{<tagName>}}}|tag {{{<tagName>}}}  @@color:red; ...p[3..n] ignored!@@|{{{t.tags.contains('tagName')}}}|
|~|~| |color:red;for more than one tag, use the following...| |
|~|~| {{{all}}}|all of the tags in p[@@color:red;3@@..n]|{{{t.tags.containsAll(p[3..n])}}}|
|~|~| {{{any}}}|at least one of the tags in p[@@color:red;3@@..n]|{{{t.tags.containsAny(p[3..n])}}}|
|~|!exists|!cases for p[2]|!check if all [p3..n] are... |!pseudo code |
|~|~| {{{tiddler}}}|existing tiddlers |{{{store.tiddlerExists(t.title)}}}|
|~|~| {{{shadow}}}|shadow tiddlers |{{{store.isShadowTiddler(t.title)}}}|
|~|~| {{{both}}}|both |{{{tiddler&&shadow}}} |
|~|~| {{{either}}}|either |{{{tiddler||shadow}}} |
|~|~| {{{<someOtherTitle>}}}|either for {{{<someOtherTitle>}}} @@color:red; ...p[3..n] ignored!@@|...|
|~|!eval|!evaluates p[2] |>|>|>|
|~|~|You have access to the following variables in your eval statement...|>|>|
|~|~| !param|!value |>|>|
|~|~| {{{t}}}|the current {{{tiddler}}}|>|
|~|~| {{{h}}}|is {{{true}}} when p[0] is {{{hide}}}|>|
|~|~| {{{el}}}|the container element; corresponds to the handlers {{{place}}} param|>|
|~|~|background:#FEE;padding:3px;''Note'': You must use __escaped__ __single quotes__ to enclose strings, e.g. {{{t.title.indexOf(\'Template\')}}}. As expressions are parameters, they must be enclosed in double square brackets when they contain empty spaces... {{{[[doThis; thenThat;]]}}}|>|>|
|~| !fields | !syntax of any p[2..n]|!checks if... |!pseudo code |
|~|~| {{{field}}}|{{{field}}} exists|{{{store.getValue(t,field)!=undefined}}}|
|~|~| {{{field:::value}}}|current value of {{{field}}} is {{{value}}}|{{{store.getValue(t,field)==value}}}|
|~|~| {{{field:::operator:::value}}}|evaluates the current value of the {{{field}}} against the provided {{{value}}} on the grounds of the provided {{{operator}}}. |{{{'count:::>=:::100'}}}<br />evaluates as...<br />{{{store.getValue(t,'count')>=100}}}|
|~|~|!evaluated values|>|>|
|~|~|Prefixing {{{value}}} with {{{%%}}} will evaluate {{{value}}} before comparision. You can use the following in your {{{eval}}} statement...|>|>|
|~|~| !param|!value |!type |
|~|~| {{{%field}}}|the name of the evaluated {{{field}}}|substitution|
|~|~| {{{%current}}}|the current {{{value}}} for {{{field}}}|substitution|
|~|~| {{{t, h, el}}}|see case {{{eval}}}|variables|
|~|~|background:#FEE;padding:3px;''Example'':<br /><<tiddler ElemPluginInfo##EXAMPLE>>|>|>|
| {{{else}}} | !- |evaluates to {{{true}}} when the last macro call to {{{hide}}} or {{{hide}}} did __not__ {{{hide}}} the node|>|>|
!API
You can call {{{config.macros.elem.remove(p,t,el)}}} in your own code by passing it a...
*custom params array {{{p[]}}}
*reference to a tiddler {{{t}}}
*DOM element {{{el}}} to be removed [optional]
The function returns {{{true}}} when {{{el}}} was or would have been removed, otherwise {{{false}}}./%
!EXAMPLE
{{{
<div macro="elem show field [[template:::%%\'%field\'+t.title]]">
	show me this if a tiddler named XYZ has a field called 'template' with the value of templateXYZ
</div>
}}}
using {{{eval}}} this would read...
{{{
<div macro="elem show eval [[store.getValue(tiddler,\'template\')==\'template\'+t.title;]]">
	show the same
</div>
}}}
!END%/<<tiddler {{setStylesheet(
	'.tabEL, .tabEL thead,.tabEL th, .tabEL tr, .tabEL td,.tabEL table tr{border:1px solid #ccc !important;}'+
	'.tabEL .evenRow {background:#EEE !important;}'+
	'.tabEL .red {color:red;}','StyleSheetElemPlugin');
'';}}>>


|timelineHeight:|250|

|band0.width:|70%|
|band0.intervalUnit:|MONTH|
|band0.intervalPixels:|100|
|band0.date:|Jun 28 2006|
|band0.eventSourceType:|tiddlerSlices|
|band0.eventSourceParams:|SimileExample1Timeline|

|band1.width:|30%|
|band1.intervalUnit:|YEAR|
|band1.intervalPixels:|200|
|band1.date:|Jun 28 2006|
|band1.highlight:|true|
|band1.eventSourceType:|tiddlerSlices|
|band1.eventSourceParams:|SimileExample1Timeline|
|band1.showEventText:|false|
|band1.trackHeight:|0.5|
|band1.trackGap:|0.2|
|timelineHeight:|250|

|band0.width:|70%|
|band0.zones:|zones0|
|band0.intervalUnit:|MONTH|
|band0.intervalPixels:|100|
|band0.date:|Jun 28 2006|
|band0.eventSourceType:|tiddlerSlices|
|band0.eventSourceParams:|SimileExample2Timeline|

|band1.width:|30%|
|band1.zones:|zones1|
|band1.intervalUnit:|YEAR|
|band1.intervalPixels:|200|
|band1.date:|Jun 28 2006|
|band1.highlight:|true|
|band1.eventSourceType:|tiddlerSlices|
|band1.eventSourceParams:|SimileExample2Timeline|
|band1.showEventText:|false|
|band1.trackHeight:|0.5|
|band1.trackGap:|0.2|

zones0 = [
	{start:	"Aug 01 2006 00:00:00 GMT-0500",
	end:	"Sep 01 2006 00:00:00 GMT-0500",
	magnify:10,
	unit:	Timeline.DateTime.WEEK
	},
	{start:	"Aug 02 2006 00:00:00 GMT-0500",
	end:	"Aug 04 2006 00:00:00 GMT-0500",
	magnify:7,
	unit:	Timeline.DateTime.DAY
	},
	{start:	"Aug 02 2006 06:00:00 GMT-0500",
	end:	"Aug 02 2006 12:00:00 GMT-0500",
	magnify:5,
	unit:	Timeline.DateTime.HOUR
	}
];

zones1 = [
	{start:	"Aug 01 2006 00:00:00 GMT-0500",
	end:	"Sep 01 2006 00:00:00 GMT-0500",
	magnify:20,
	unit:	Timeline.DateTime.WEEK
	}
];
/***
|''Name:''|FE2|
|''Description:''|create, edit, view and delete commands in toolbar <<toolbar fields>>|
|''Version:''|1.0.2|
|''Date:''|Oct. 21,2009|
|''Source:''|http://tbGTD.tiddlyspot.com|
|''Author:''|Tobias Beer|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.5.3|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0, others|
!Note
This is a refactored version of [[FieldsEditorPlugin|http://visualtw.ouvaton.org/VisualTW.html#FieldsEditorPlugin]] by Pascal Collin
!Installation:
*import this tiddler, keep tagged as systemConfig, save and reload
!Code
***/
//{{{
//language settings for header, also see language options for macro.FE2 below!
config.commands.fields.lang={field:"field",actions:"actions",value:"value"};
config.commands.fields.handlePopup=function(popup,title){
	addClass(popup,'FE2');
	var tid=store.fetchTiddler(title);
	if(!tid)return;
	var t='[['+title+']]';
	var fields={};
	store.forEachField(tid,function(tid,field,v){fields[field]=v;},true);
	var list=[];
	for(var f in fields){
		var e='[['+f+']]';
		list.push({
			field:f,
			value:fields[f],
			actions:"<<FE2 "+t+" rename "+e+">> <<FE2 "+t+" delete "+e+">> <<FE2 "+t+" edit "+e+">>"
		});
	}
	list.sort(function(a,b){return a.field<b.field?-1:(a.field==b.field?0:+1);});
	list.push({field:'',value:"",actions:"<<FE2 "+t+" create>>"});
	var table=ListView.create(popup,list,{
		columns:[
			{name:'Field',field:'field',title:this.lang.field,type:'String'},
			{name: 'Actions',field:'actions',title:this.lang.actions,type: 'WikiText'},
			{name:'Value',field:'value',title:this.lang.value,type:'WikiText'}
		],
		rowClasses:[
				{field:'actions'}
		],
		buttons:[	//can't use button for selected then delete, because click on checkbox will hide the popup
		]
	});
}
config.macros.FE2={
	//language options
	lang:{
		'delete':'delete', //string since keyword!
		rename:'<rename',
		create:'Create a new field...',
		edit:'edit>',
		lineBreaks:"The field value contains linebreaks.\nEditing here will convert it to a single line!\nProceed?",
		enterName:"Enter new field name...",
		enterNewName:"Enter new name for '%1'...",
		enterVal:"Enter field value for '%1'...", 
		enterNewVal:"Enter new value for '%1'..",
		doDelete:"Delete field '%1' from tiddler '%2' ?",
		existing:"This field already exists! "
	},
	handler:function(place,macroName,params,wikifier,paramString,tiddler){
		if(!readOnly){
			var tid=params[0];
			var mode=params[1];
			var field=params[2];
			var btn=createTiddlyButton(place,this.lang[mode],this.lang[mode]+" "+field,this.clicked);
			btn.setAttribute("tiddler",tid);
			btn.setAttribute("field",field);
			btn.setAttribute("mode",mode);
		}
	},
	clicked:function(){
		var lng=config.macros.FE2.lang;
		var title=this.getAttribute("tiddler");
		var field=this.getAttribute("field");
		var mode=this.getAttribute("mode");
		var tid=store.getTiddler(title);
		if(!tid)return;
		switch(mode){
			case'create':
				var first="";
				do{
					field=prompt(first+ lng.enterName,"");
					first=lng.existing;
				}while(store.getValue(tid,field));
				if(field){
					var v=prompt(lng.enterVal.replace(/%1/,field),"");
					if(v)tid.fields[field]=v;else return;
				}else return;
				break;
			case'delete':
				if(confirm(lng.doDelete.replace(/%1/,field).replace(/%2/,title))){
					delete tid.fields[field];
				}else return;
				break;
			case'edit':
				var v=tid.fields[field]||'';
				if(!v.match(/\n/mg)||confirm(lng.lineBreaks)){
					var v=prompt(lng.enterNewVal.replace(/%1/,field),v);
					if(v||v=='')tid.fields[field]=v;else return;
				}else return;
				break;
			case'rename':
				var name=prompt(lng.enterNewName.replace(/%1/,field),field);
				if(name){
					tid.fields[name]=tid.fields[field];
					delete tid.fields[field];
				}else return;
				break;
			default:return;
		}
		store.saveTiddler(tid.title,tid.title,tid.text,tid.modifier,tid.modified,tid.tags,tid.fields);
		story.refreshTiddler(title,null,true);
		return false;
	}
}
config.shadowTiddlers.StyleSheetFE2=
	".FE2 td br{display:block;}\n"+
	".FE2 td {font-size:12px;padding:1px 3px}\n"+
	".FE2 .button {border:0;padding:0 0.2em;}\n"+
	".FE2 .twtable,.FE2 .twtable thead, .FE2 .twtable tr{border:0}\n"+
	".FE2 .twtable tr:hover{background:"+store.getTiddlerSlice('ColorPalette','TertiaryDark')+"}\n"+
	".FE2 .twtable thead{font-size:13px;}";
store.addNotification("StyleSheetFE2",refreshStyles);
//}}}
/***
|Name|FileDropPlugin|
|Source|http://www.TiddlyTools.com/#FileDropPlugin|
|Version|2.1.3|
|Author|BradleyMeck and Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|drag-and-drop files/directories to create tiddlers|
''requires FireFox or another Mozilla-compatible browser.''
!!!!!Usage
<<<
This plugin automatically creates tiddlers from files that are dropped onto an open TiddlyWiki document.  You can drop multiple selected files and/or folders to create many tiddlers at once.  New tiddler titles are created using the filename of each dropped file (i.e., omitting the path).  If a title is already in use, you are prompted to enter a new title for that file.  If you drop a folder, you will be asked if you want to create a simple 'directory list' of files in a single tiddler or create one tiddler for each file in that folder.  

By default, it is assumed that all dropped files contain text.  However, if [[AttachFilePlugin]], [[AttachFilePluginFormatters]] and [[AttachFileMIMETypes]] are installed, then you can drop ''//binary data files//'' as well as text files.  If the MIME type of a dropped file is not "text/plain", then AttachFilePlugin is used to create an 'attachment' tiddler, rather than creating a simple text tiddler.

When creating text tiddlers, you can embed a //link// to the original external file at the top of the new tiddler, in addition to (or instead of) the text content itself.  The format for this link (see Configuration, below) uses embedded ''//replacement markers//'' that allow you to generate a variety of wiki-formatted output, where:
*%0 = filename (without path)
*%1 = local """file://...""" URL
*%2 = local path and filename (OS-native format)
*%3 = relative path (if subdirectory of current document directory)
*%4 = file size
*%5 = file date
*%6 = current date
*%7 = current ~TiddlyWiki username
*\n = newline
By default, the link format uses the filename (%0) and local URL (%1), enclosed within a //hidden section// syntax, like this:
{{{
/%
!link
[[%0|%1]]
!end
%/
}}}
This permits the link to be embedded along with the text content, without changing the appearance of that content when the tiddler is viewed.  To display the link in your tiddler content, use:
{{{
<<tiddler TiddlerName##link>>
}}}
<<<
!!!!!Configuration
<<<
__FileDropPlugin options:__
<<option chkFileDropContent>>Copy file content into tiddlers if smaller than: <<option txtFileDropDataLimit>> bytes
&nbsp; //(note: excess text content will be truncated, oversized binary files will skipped, 0=no limit)//
<<option chkFileDropLink>>Generate external links to files, using this format:{{editor{<html><nowiki><textarea rows="4" onchange="
config.macros.option.propagateOption('txtFileDropLinkFormat','value',this.value.escapeLineBreaks(),'input');
"></textarea></html><<tiddler {{
	var ta=place.lastChild.getElementsByTagName('textarea')[0];
	var v=config.options.txtFileDropLinkFormat.unescapeLineBreaks();
	ta.value=v;
"";}}>>}}}<<option chkFileDropTrimFilename>>Omit file extensions from tiddler titles
<<option chkFileDropDisplay>>Automatically display newly created tiddlers
Tag newly created tiddlers with: <<option txtFileDropTags>>

__FileDropPlugin+AttachFilePlugin options:__ //(binary file data as encoded 'base64' text)//
<<option chkFileDropAttachLocalLink>> attachment includes reference to local path/filename
>Note: if the plugin does not seem to work, enter ''about:config'' in the Firefox address bar, and make sure that {{{signed.applets.codebase_principal_support}}} is set to ''true''
<<<
!!!!!Examples (custom handler functions)
<<<
Adds a single file with confirmation and prompting for title:
{{{
config.macros.fileDrop.addEventListener('application/x-moz-file',
	function(nsiFile) {
		var msg='You have dropped the file:\n'
			+nsiFile.path+'\n'
			+'onto the page, it will be imported as a tiddler. Is that ok?'
		if(confirm(msg)) {
			var newDate = new Date();
			var title = prompt('what would you like to name the tiddler?');
			store.saveTiddler(title,title,loadFile(nsiFile.path),config.options.txtUserName,newDate,[]);
		}
		return true;
	});
}}}
Adds a single file without confirmation, using path/filename as tiddler title:
{{{
config.macros.fileDrop.addEventListener('application/x-moz-file',
	function(nsiFile) {
		var newDate = new Date();
		store.saveTiddler(nsiFile.path,nsiFile.path,loadFile(nsiFile.path),config.options.txtUserName,newDate,[]);
		story.displayTiddler(null,nsiFile.path)
		return true;
	});
}}}
<<<
!!!!!Revisions
<<<
2009.10.10 2.1.3 ELS fixed IE code error
2009.10.08 2.1.2 ELS fixed chkFileDropContent bypass handling for binary attachments
2009.10.07 2.1.0 ELS added chkFileDropContent and chkFileDropLink/txtFileDropLinkFormat
2009.08.19 2.0.0 ELS fixed event listener registration for FireFox 3.5+.  Also, merged with FileDropPluginConfig, with code cleanup/reduction
2008.08.11 1.5.1 ELS added chkFileDropAttachLocalLink option to allow suppression of local path/file link
2007.xx.xx *.*.* ELS add suspend/resume of notifications to improve performance when multiple files are handled
2007.01.01 0.9.9 ELS extensions for AttachFilePlugin
2006.11.04 0.1.1 initial release by Bradley Meck
<<<
!!!!!Code
***/
//{{{
version.extensions.FileDropPlugin={major:2, minor:1, revision:3, date: new Date(2009,10,10)};

config.macros.fileDrop = {
	customDropHandlers: [],
	addEventListener: function(paramflavor,func,inFront) {
		var obj={}; obj.flavor=paramflavor; obj.handler=func;
		if (!inFront) this.customDropHandlers.push(obj);
		else this.customDropHandlers.shift(obj);
	},
	dragDropHandler: function(evt) {
		netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
		var dragService = Components.classes['@mozilla.org/widget/dragservice;1'].getService(Components.interfaces.nsIDragService);
		var dragSession = dragService.getCurrentSession();
		var transferObject = Components.classes['@mozilla.org/widget/transferable;1'].createInstance();
		transferObject = transferObject.QueryInterface(Components.interfaces.nsITransferable);
		transferObject.addDataFlavor('application/x-moz-file');
		var numItems = dragSession.numDropItems;
		if (numItems>1) {
			clearMessage();
			displayMessage('Reading '+numItems+' files...');
			store.suspendNotifications();
		}
		for (var i = 0; i < numItems; i++) {
			dragSession.getData(transferObject, i);
			var dataObj = {};
			var dropSizeObj = {};
			for(var ind=0; ind<config.macros.fileDrop.customDropHandlers.length; ind++) {
				var item = config.macros.fileDrop.customDropHandlers[ind];
				if(dragSession.isDataFlavorSupported(item.flavor)) {
					transferObject.getTransferData(item.flavor, dataObj, dropSizeObj);
					var droppedFile = dataObj.value.QueryInterface(Components.interfaces.nsIFile);
					var result = item.handler.call(item,droppedFile);
					evt.stopPropagation();
					evt.preventDefault();
					if (result) break;
				}
			}
		}
		if (numItems>1) {
			store.resumeNotifications();
			store.notifyAll();
			displayMessage(numItems+' files have been processed');
		}
	}
}
//}}}
/***
!!!!!window event handlers
***/
//{{{
if(!window.event) {
	window.addEventListener('dragdrop', config.macros.fileDrop.dragDropHandler, true); // FireFox3.1-
	window.addEventListener('drop', config.macros.fileDrop.dragDropHandler, true); // FireFox3.5+
}
//}}}
/***
!!!!!handler for files, directories and binary attachments (see [[AttachFilePlugin]])
***/
//{{{
var defaults={
	chkFileDropDisplay:		true,
	chkFileDropTrimFilename:	false,
	chkFileDropContent:		true,
	chkFileDropLink:		true,
	txtFileDropLinkFormat:		'/%\\n!link\\n[[%0|%1]]\\n!end\\n%/',
	txtFileDropDataLimit:		'32768',
	chkFileDropAttachLocalLink:	true,
	txtFileDropTags:		''
};
for (var id in defaults) if (config.options[id]===undefined)
	config.options[id]=defaults[id];

config.macros.fileDrop.addEventListener('application/x-moz-file',function(nsiFile) {
	var co=config.options; // abbrev
	var header='Index of %0\n^^(as of %1)^^\n|!filename| !size | !modified |\n';
	var item='|[[%0|%1]]| %2|%3|\n';
	var footer='Total of %0 bytes in %1 files\n';
	var now=new Date();
	var files=[nsiFile];
	if (nsiFile.isDirectory()) {
		var folder=nsiFile.directoryEntries;
		var files=[];
		while (folder.hasMoreElements()) {
			var f=folder.getNext().QueryInterface(Components.interfaces.nsILocalFile);
			if (f instanceof Components.interfaces.nsILocalFile && !f.isDirectory()) files.push(f);
		}
		var msg=nsiFile.path.replace(/\\/g,'/')+'\n\n';
		msg+='contains '+files.length+' files... ';
		msg+='select OK to attach all files or CANCEL to create a list...';
		if (!confirm(msg)) { // create a list in a tiddler
			var title=nsiFile.leafName; // tiddler name is last directory name in path
			while (title && title.length && store.tiddlerExists(title)) {
				if (confirm(config.messages.overwriteWarning.format([title]))) break;
				title=prompt('Enter a new tiddler title',nsiFile.path.replace(/\\/g,'/'));
			}
			if (!title || !title.length) return true; // cancelled
			var text=header.format([nsiFile.path.replace(/\\/g,'/'),now.toLocaleString()]);
			var total=0;
			for (var i=0; i<files.length; i++) { var f=files[i];
				var name=f.leafName;
				if (co.chkFileDropTrimFilename)
					{ var p=name.split('.'); if (p.length>1) p.pop(); name=p.join('.'); }
				var path='file:///'+f.path.replace(/\\/g,'/');
				var size=f.fileSize; total+=size;
				var when=new Date(f.lastModifiedTime).formatString('YYYY.0MM.0DD 0hh:0mm:0ss');
				text+=item.format([name,path,size,when]);
			}
			text+=footer.format([total,files.length]);
			var newtags=co.txtFileDropTags?co.txtFileDropTags.readBracketedList():[];
			store.saveTiddler(null,title,text,co.txtUserName,now,newtags);
			if (co.chkFileDropDisplay) story.displayTiddler(null,title);
			return true;
		}
	}
	if (files.length>1) store.suspendNotifications();
	for (i=0; i<files.length; i++) {
		var file=files[i];
		if (file.isDirectory()) continue; // skip over nested directories
		var type='text/plain';
		var title=file.leafName; // tiddler name is file name
		if (co.chkFileDropTrimFilename)
			{ var p=title.split('.'); if (p.length>1) p.pop(); title=p.join('.'); }
		var name=file.leafName;
		var path=file.path;
		var url='file:///'+path.replace(/\\/g,'/');
		var size=file.fileSize;
		var when=new Date(file.lastModifiedTime);
		var now=new Date();
		var who=config.options.txtUserName;
		var h=document.location.href;
		var cwd=getLocalPath(decodeURIComponent(h.substr(0,h.lastIndexOf('/')+1)));
		var relpath=path.startsWith(cwd)?'./'+path.substr(cwd.length):path;
		while (title && title.length && store.tiddlerExists(title)) {
			if (confirm(config.messages.overwriteWarning.format([title]))) break;
			title=prompt('Enter a new tiddler title',path.replace(/\\/g,'/'));
		}
		if (!title || !title.length) continue; // cancelled
		if (config.macros.attach) {
			type=config.macros.attach.getMIMEType(name,'');
			if (!type.length)
				type=prompt('Unknown file type.  Enter a MIME type','text/plain');
			if (!type||!type.length) continue; // cancelled
		}
		var newtags=co.txtFileDropTags?co.txtFileDropTags.readBracketedList():[];
		if (type=='text/plain' || !co.chkFileDropContent) {
			var txt=''; var fmt=co.txtFileDropLinkFormat.unescapeLineBreaks();
			if (co.chkFileDropLink) txt+=fmt.format([name,url,path,relpath,size,when,now,who]);
			if (co.chkFileDropContent) {
				var out=loadFile(path); var lim=co.txtFileDropDataLimit;
				txt+=co.txtFileDropDataLimit?out.substr(0,lim):out;
				if (size>lim) txt+='\n----\nfilesize ('+size+')'
					+' is larger than FileDrop limit ('+lim+')...\n'
					+'additional content has been omitted';
			}
			store.saveTiddler(null,title,txt,co.txtUserName,now,newtags);
		} else {
			var embed=co.chkFileDropContent
				&& (!co.txtFileDropDataLimit||size<co.txtFileDropDataLimit);
			newtags.push('attachment'); newtags.push('excludeMissing');
			config.macros.attach.createAttachmentTiddler(path,
				now.formatString(config.macros.timeline.dateFormat),
				'attached by FileDropPlugin', newtags, title,
				embed, co.chkFileDropAttachLocalLink, false,
				relpath, '', type,!co.chkFileDropDisplay);
		}
		if (co.chkFileDropDisplay) story.displayTiddler(null,title);
	}
	if (files.length>1) { store.resumeNotifications(); store.notifyAll(); }
	return true;
})
//}}}
//~~(Part of the [[ForEachTiddlerPlugin]])~~//

Create customizable lists, tables etc. for your selections of tiddlers. Specify the tiddlers to include and their order through a powerful language.

''Syntax:'' 
|>|{{{<<}}}''forEachTiddler'' [''in'' //tiddlyWikiPath//] [''where'' //whereCondition//] [''sortBy'' //sortExpression// [''ascending'' //or// ''descending'']] [''script'' //scriptText//] [//action// [//actionParameters//]]{{{>>}}}|
|//tiddlyWikiPath//|The filepath to the TiddlyWiki the macro should work on. When missing the current TiddlyWiki is used.|
|//whereCondition//|(quoted) JavaScript boolean expression. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|
|//sortExpression//|(quoted) JavaScript expression returning "comparable" objects (using '{{{<}}}','{{{>}}}','{{{==}}}'. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|
|//scriptText//|(quoted) JavaScript text. Typically defines JavaScript functions that are called by the various JavaScript expressions (whereClause, sortClause, action arguments,...)|
|//action//|The action that should be performed on every selected tiddler, in the given order. By default the actions [[addToList|AddToListAction]] and [[write|WriteAction]] are supported. When no action is specified [[addToList|AddToListAction]] is used.|
|//actionParameters//|(action specific) parameters the action may refer while processing the tiddlers (see action descriptions for details). <<tiddler [[JavaScript in actionParameters]]>>|
|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. 'or' means that exactly one of the two alternatives must exist.~~|


''Using JavaScript''

To give you a lot of flexibility the [[ForEachTiddlerMacro]] uses JavaScript in its arguments. Even if you are not that familiar with JavaScript you may find forEachTiddler useful. Just have a look at the various ready-to-use [[ForEachTiddlerExamples]] and adapt them to your needs.

''The Elements of the Macro''

The arguments of the ForEachTiddlerMacro consist of multiple parts, each of them being optional.

<<slider chkFETInClause [[inClause]] "inClause" "inClause">>
<<slider chkFETWhereClause [[whereClause]] "whereClause" "whereClause">>
<<slider chkFETSortClause [[sortClause]] "sortClause" "sortClause">>
<<slider chkFETScriptClause [[scriptClause]] "scriptClause" "scriptClause">>
<<slider chkFETActions [[Action Specification]] "Action Specification" "Action Specification">>

''Using Macros and ">" inside the forEachTiddler Macro''

You may use other macro calls into the expression, especially in the actionParameters. To avoid that the {{{>>}}} of such a macro call is misinterpreted as the end of the {{{<<forEachTiddler...>>}}} macro you must escape the {{{>>}}} of the inner macro with {{{$))}}} E.g. if you want to use {{{<<tiddler ...>>}}} inside the {{{forEachTiddler}}} macro you have to write {{{<<tiddler ...$))}}}.

In addition it is necessary to escape single {{{>}}} with the text {{{$)}}}.

''Using {{{<<tiddler ... with: ...>>}}} to re-use ForEachTiddler definitions''

Sometimes you may want to use a certain ForEachTiddler definition in slight variations. E.g. you may want to list either the tiddlers tagged with "ToDo" and in the other case with "Done". To do so you may use "Tiddler parameters". Here an example:

Replace the variable part of the ForEachTiddler definition with $1 ($2,... $9 are supported). E.g. you may create the tiddler "ListTaggedTiddlers" like this
{{{
<<forEachTiddler 
 where 
 'tiddler.tags.contains("$1")'
>>
}}}

Now you can use the ListTaggedTiddlers for various specific tags, using the {{{<<tiddler ...>>}}} macro:
{{{
<<tiddler ListTaggedTiddlers with: "systemConfig">>
}}}
{{{
<<tiddler ListTaggedTiddlers with: "Plugin">>
}}}


See also [[ForEachTiddlerExamples]].
/***
|''Name:''|ForEachTiddlerPlugin|
|''Version:''|1.0.8 (2007-04-12)|
|''Source:''|http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''Copyright:''|&copy; 2005-2007 [[abego Software|http://www.abego-software.de]]|
|''TiddlyWiki:''|1.2.38+, 2.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
!Description

Create customizable lists, tables etc. for your selections of tiddlers. Specify the tiddlers to include and their order through a powerful language.

''Syntax:'' 
|>|{{{<<}}}''forEachTiddler'' [''in'' //tiddlyWikiPath//] [''where'' //whereCondition//] [''sortBy'' //sortExpression// [''ascending'' //or// ''descending'']] [''script'' //scriptText//] [//action// [//actionParameters//]]{{{>>}}}|
|//tiddlyWikiPath//|The filepath to the TiddlyWiki the macro should work on. When missing the current TiddlyWiki is used.|
|//whereCondition//|(quoted) JavaScript boolean expression. May refer to the build-in variables {{{tiddler}}} and  {{{context}}}.|
|//sortExpression//|(quoted) JavaScript expression returning "comparable" objects (using '{{{<}}}','{{{>}}}','{{{==}}}'. May refer to the build-in variables {{{tiddler}}} and  {{{context}}}.|
|//scriptText//|(quoted) JavaScript text. Typically defines JavaScript functions that are called by the various JavaScript expressions (whereClause, sortClause, action arguments,...)|
|//action//|The action that should be performed on every selected tiddler, in the given order. By default the actions [[addToList|AddToListAction]] and [[write|WriteAction]] are supported. When no action is specified [[addToList|AddToListAction]]  is used.|
|//actionParameters//|(action specific) parameters the action may refer while processing the tiddlers (see action descriptions for details). <<tiddler [[JavaScript in actionParameters]]>>|
|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. 'or' means that exactly one of the two alternatives must exist.~~|

See details see [[ForEachTiddlerMacro]] and [[ForEachTiddlerExamples]].

!Revision history
* v1.0.8 (2007-04-12)
** Adapted to latest TiddlyWiki 2.2 Beta importTiddlyWiki API (introduced with changeset 2004). TiddlyWiki 2.2 Beta builds prior to changeset 2004 are no longer supported (but TiddlyWiki 2.1 and earlier, of cause)
* v1.0.7 (2007-03-28)
** Also support "pre" formatted TiddlyWikis (introduced with TW 2.2) (when using "in" clause to work on external tiddlers)
* v1.0.6 (2006-09-16)
** Context provides "viewerTiddler", i.e. the tiddler used to view the macro. Most times this is equal to the "inTiddler", but when using the "tiddler" macro both may be different.
** Support "begin", "end" and "none" expressions in "write" action
* v1.0.5 (2006-02-05)
** Pass tiddler containing the macro with wikify, context object also holds reference to tiddler containing the macro ("inTiddler"). Thanks to SimonBaird.
** Support Firefox 1.5.0.1
** Internal
*** Make "JSLint" conform
*** "Only install once"
* v1.0.4 (2006-01-06)
** Support TiddlyWiki 2.0
* v1.0.3 (2005-12-22)
** Features: 
*** Write output to a file supports multi-byte environments (Thanks to Bram Chen) 
*** Provide API to access the forEachTiddler functionality directly through JavaScript (see getTiddlers and performMacro)
** Enhancements:
*** Improved error messages on InternetExplorer.
* v1.0.2 (2005-12-10)
** Features: 
*** context object also holds reference to store (TiddlyWiki)
** Fixed Bugs: 
*** ForEachTiddler 1.0.1 has broken support on win32 Opera 8.51 (Thanks to BrunoSabin for reporting)
* v1.0.1 (2005-12-08)
** Features: 
*** Access tiddlers stored in separated TiddlyWikis through the "in" option. I.e. you are no longer limited to only work on the "current TiddlyWiki".
*** Write output to an external file using the "toFile" option of the "write" action. With this option you may write your customized tiddler exports.
*** Use the "script" section to define "helper" JavaScript functions etc. to be used in the various JavaScript expressions (whereClause, sortClause, action arguments,...).
*** Access and store context information for the current forEachTiddler invocation (through the build-in "context" object) .
*** Improved script evaluation (for where/sort clause and write scripts).
* v1.0.0 (2005-11-20)
** initial version

!Code
***/
//{{{

	
//============================================================================
//============================================================================
//		   ForEachTiddlerPlugin
//============================================================================
//============================================================================

// Only install once
if (!version.extensions.ForEachTiddlerPlugin) {

if (!window.abego) window.abego = {};

version.extensions.ForEachTiddlerPlugin = {
	major: 1, minor: 0, revision: 8, 
	date: new Date(2007,3,12), 
	source: "http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin",
	licence: "[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]",
	copyright: "Copyright (c) abego Software GmbH, 2005-2007 (www.abego-software.de)"
};

// For backward compatibility with TW 1.2.x
//
if (!TiddlyWiki.prototype.forEachTiddler) {
	TiddlyWiki.prototype.forEachTiddler = function(callback) {
		for(var t in this.tiddlers) {
			callback.call(this,t,this.tiddlers[t]);
		}
	};
}

//============================================================================
// forEachTiddler Macro
//============================================================================

version.extensions.forEachTiddler = {
	major: 1, minor: 0, revision: 8, date: new Date(2007,3,12), provider: "http://tiddlywiki.abego-software.de"};

// ---------------------------------------------------------------------------
// Configurations and constants 
// ---------------------------------------------------------------------------

config.macros.forEachTiddler = {
	 // Standard Properties
	 label: "forEachTiddler",
	 prompt: "Perform actions on a (sorted) selection of tiddlers",

	 // actions
	 actions: {
		 addToList: {},
		 write: {}
	 }
};

// ---------------------------------------------------------------------------
//  The forEachTiddler Macro Handler 
// ---------------------------------------------------------------------------

config.macros.forEachTiddler.getContainingTiddler = function(e) {
	while(e && !hasClass(e,"tiddler"))
		e = e.parentNode;
	var title = e ? e.getAttribute("tiddler") : null; 
	return title ? store.getTiddler(title) : null;
};

config.macros.forEachTiddler.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
	// config.macros.forEachTiddler.traceMacroCall(place,macroName,params,wikifier,paramString,tiddler);

	if (!tiddler) tiddler = config.macros.forEachTiddler.getContainingTiddler(place);
	// --- Parsing ------------------------------------------

	var i = 0; // index running over the params
	// Parse the "in" clause
	var tiddlyWikiPath = undefined;
	if ((i < params.length) && params[i] == "in") {
		i++;
		if (i >= params.length) {
			this.handleError(place, "TiddlyWiki path expected behind 'in'.");
			return;
		}
		tiddlyWikiPath = this.paramEncode((i < params.length) ? params[i] : "");
		i++;
	}

	// Parse the where clause
	var whereClause ="true";
	if ((i < params.length) && params[i] == "where") {
		i++;
		whereClause = this.paramEncode((i < params.length) ? params[i] : "");
		i++;
	}

	// Parse the sort stuff
	var sortClause = null;
	var sortAscending = true; 
	if ((i < params.length) && params[i] == "sortBy") {
		i++;
		if (i >= params.length) {
			this.handleError(place, "sortClause missing behind 'sortBy'.");
			return;
		}
		sortClause = this.paramEncode(params[i]);
		i++;

		if ((i < params.length) && (params[i] == "ascending" || params[i] == "descending")) {
			 sortAscending = params[i] == "ascending";
			 i++;
		}
	}

	// Parse the script
	var scriptText = null;
	if ((i < params.length) && params[i] == "script") {
		i++;
		scriptText = this.paramEncode((i < params.length) ? params[i] : "");
		i++;
	}

	// Parse the action. 
	// When we are already at the end use the default action
	var actionName = "addToList";
	if (i < params.length) {
	   if (!config.macros.forEachTiddler.actions[params[i]]) {
			this.handleError(place, "Unknown action '"+params[i]+"'.");
			return;
		} else {
			actionName = params[i]; 
			i++;
		}
	} 
	
	// Get the action parameter
	// (the parsing is done inside the individual action implementation.)
	var actionParameter = params.slice(i);


	// --- Processing ------------------------------------------
	try {
		this.performMacro({
				place: place, 
				inTiddler: tiddler,
				whereClause: whereClause, 
				sortClause: sortClause, 
				sortAscending: sortAscending, 
				actionName: actionName, 
				actionParameter: actionParameter, 
				scriptText: scriptText, 
				tiddlyWikiPath: tiddlyWikiPath});

	} catch (e) {
		this.handleError(place, e);
	}
};

// Returns an object with properties "tiddlers" and "context".
// tiddlers holds the (sorted) tiddlers selected by the parameter,
// context the context of the execution of the macro.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlersAndContext = function(parameter) {

	var context = config.macros.forEachTiddler.createContext(parameter.place, parameter.whereClause, parameter.sortClause, parameter.sortAscending, parameter.actionName, parameter.actionParameter, parameter.scriptText, parameter.tiddlyWikiPath, parameter.inTiddler);

	var tiddlyWiki = parameter.tiddlyWikiPath ? this.loadTiddlyWiki(parameter.tiddlyWikiPath) : store;
	context["tiddlyWiki"] = tiddlyWiki;
	
	// Get the tiddlers, as defined by the whereClause
	var tiddlers = this.findTiddlers(parameter.whereClause, context, tiddlyWiki);
	context["tiddlers"] = tiddlers;

	// Sort the tiddlers, when sorting is required.
	if (parameter.sortClause) {
		this.sortTiddlers(tiddlers, parameter.sortClause, parameter.sortAscending, context);
	}

	return {tiddlers: tiddlers, context: context};
};

// Returns the (sorted) tiddlers selected by the parameter.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlers = function(parameter) {
	return this.getTiddlersAndContext(parameter).tiddlers;
};

// Performs the macros with the given parameter.
//
// @param parameter holds the parameter of the macro as separate properties.
//				  The following properties are supported:
//
//						place
//						whereClause
//						sortClause
//						sortAscending
//						actionName
//						actionParameter
//						scriptText
//						tiddlyWikiPath
//
//					All properties are optional. 
//					For most actions the place property must be defined.
//
config.macros.forEachTiddler.performMacro = function(parameter) {
	var tiddlersAndContext = this.getTiddlersAndContext(parameter);

	// Perform the action
	var actionName = parameter.actionName ? parameter.actionName : "addToList";
	var action = config.macros.forEachTiddler.actions[actionName];
	if (!action) {
		this.handleError(parameter.place, "Unknown action '"+actionName+"'.");
		return;
	}

	var actionHandler = action.handler;
	actionHandler(parameter.place, tiddlersAndContext.tiddlers, parameter.actionParameter, tiddlersAndContext.context);
};

// ---------------------------------------------------------------------------
//  The actions 
// ---------------------------------------------------------------------------

// Internal.
//
// --- The addToList Action -----------------------------------------------
//
config.macros.forEachTiddler.actions.addToList.handler = function(place, tiddlers, parameter, context) {
	// Parse the parameter
	var p = 0;

	// Check for extra parameters
	if (parameter.length > p) {
		config.macros.forEachTiddler.createExtraParameterErrorElement(place, "addToList", parameter, p);
		return;
	}

	// Perform the action.
	var list = document.createElement("ul");
	place.appendChild(list);
	for (var i = 0; i < tiddlers.length; i++) {
		var tiddler = tiddlers[i];
		var listItem = document.createElement("li");
		list.appendChild(listItem);
		createTiddlyLink(listItem, tiddler.title, true);
	}
};

abego.parseNamedParameter = function(name, parameter, i) {
	var beginExpression = null;
	if ((i < parameter.length) && parameter[i] == name) {
		i++;
		if (i >= parameter.length) {
			throw "Missing text behind '%0'".format([name]);
		}
		
		return config.macros.forEachTiddler.paramEncode(parameter[i]);
	}
	return null;
}

// Internal.
//
// --- The write Action ---------------------------------------------------
//
config.macros.forEachTiddler.actions.write.handler = function(place, tiddlers, parameter, context) {
	// Parse the parameter
	var p = 0;
	if (p >= parameter.length) {
		this.handleError(place, "Missing expression behind 'write'.");
		return;
	}

	var textExpression = config.macros.forEachTiddler.paramEncode(parameter[p]);
	p++;

	// Parse the "begin" option
	var beginExpression = abego.parseNamedParameter("begin", parameter, p);
	if (beginExpression !== null) 
		p += 2;
	var endExpression = abego.parseNamedParameter("end", parameter, p);
	if (endExpression !== null) 
		p += 2;
	var noneExpression = abego.parseNamedParameter("none", parameter, p);
	if (noneExpression !== null) 
		p += 2;

	// Parse the "toFile" option
	var filename = null;
	var lineSeparator = undefined;
	if ((p < parameter.length) && parameter[p] == "toFile") {
		p++;
		if (p >= parameter.length) {
			this.handleError(place, "Filename expected behind 'toFile' of 'write' action.");
			return;
		}
		
		filename = config.macros.forEachTiddler.getLocalPath(config.macros.forEachTiddler.paramEncode(parameter[p]));
		p++;
		if ((p < parameter.length) && parameter[p] == "withLineSeparator") {
			p++;
			if (p >= parameter.length) {
				this.handleError(place, "Line separator text expected behind 'withLineSeparator' of 'write' action.");
				return;
			}
			lineSeparator = config.macros.forEachTiddler.paramEncode(parameter[p]);
			p++;
		}
	}
	
	// Check for extra parameters
	if (parameter.length > p) {
		config.macros.forEachTiddler.createExtraParameterErrorElement(place, "write", parameter, p);
		return;
	}

	// Perform the action.
	var func = config.macros.forEachTiddler.getEvalTiddlerFunction(textExpression, context);
	var count = tiddlers.length;
	var text = "";
	if (count > 0 && beginExpression)
		text += config.macros.forEachTiddler.getEvalTiddlerFunction(beginExpression, context)(undefined, context, count, undefined);
	
	for (var i = 0; i < count; i++) {
		var tiddler = tiddlers[i];
		text += func(tiddler, context, count, i);
	}
	
	if (count > 0 && endExpression)
		text += config.macros.forEachTiddler.getEvalTiddlerFunction(endExpression, context)(undefined, context, count, undefined);

	if (count == 0 && noneExpression) 
		text += config.macros.forEachTiddler.getEvalTiddlerFunction(noneExpression, context)(undefined, context, count, undefined);
		

	if (filename) {
		if (lineSeparator !== undefined) {
			lineSeparator = lineSeparator.replace(/\\n/mg, "\n").replace(/\\r/mg, "\r");
			text = text.replace(/\n/mg,lineSeparator);
		}
		saveFile(filename, convertUnicodeToUTF8(text));
	} else {
		var wrapper = createTiddlyElement(place, "span");
		wikify(text, wrapper, null/* highlightRegExp */, context.inTiddler);
	}
};


// ---------------------------------------------------------------------------
//  Helpers
// ---------------------------------------------------------------------------

// Internal.
//
config.macros.forEachTiddler.createContext = function(placeParam, whereClauseParam, sortClauseParam, sortAscendingParam, actionNameParam, actionParameterParam, scriptText, tiddlyWikiPathParam, inTiddlerParam) {
	return {
		place : placeParam, 
		whereClause : whereClauseParam, 
		sortClause : sortClauseParam, 
		sortAscending : sortAscendingParam, 
		script : scriptText,
		actionName : actionNameParam, 
		actionParameter : actionParameterParam,
		tiddlyWikiPath : tiddlyWikiPathParam,
		inTiddler : inTiddlerParam, // the tiddler containing the <<forEachTiddler ...>> macro call.
		viewerTiddler : config.macros.forEachTiddler.getContainingTiddler(placeParam) // the tiddler showing the forEachTiddler result
	};
};

// Internal.
//
// Returns a TiddlyWiki with the tiddlers loaded from the TiddlyWiki of 
// the given path.
//
config.macros.forEachTiddler.loadTiddlyWiki = function(path, idPrefix) {
	if (!idPrefix) {
		idPrefix = "store";
	}
	var lenPrefix = idPrefix.length;
	
	// Read the content of the given file
	var content = loadFile(this.getLocalPath(path));
	if(content === null) {
		throw "TiddlyWiki '"+path+"' not found.";
	}
	
	var tiddlyWiki = new TiddlyWiki();

	// Starting with TW 2.2 there is a helper function to import the tiddlers
	if (tiddlyWiki.importTiddlyWiki) {
		if (!tiddlyWiki.importTiddlyWiki(content))
			throw "File '"+path+"' is not a TiddlyWiki.";
		tiddlyWiki.dirty = false;
		return tiddlyWiki;
	}
	
	// The legacy code, for TW < 2.2
	
	// Locate the storeArea div's
	var posOpeningDiv = content.indexOf(startSaveArea);
	var posClosingDiv = content.lastIndexOf(endSaveArea);
	if((posOpeningDiv == -1) || (posClosingDiv == -1)) {
		throw "File '"+path+"' is not a TiddlyWiki.";
	}
	var storageText = content.substr(posOpeningDiv + startSaveArea.length, posClosingDiv);
	
	// Create a "div" element that contains the storage text
	var myStorageDiv = document.createElement("div");
	myStorageDiv.innerHTML = storageText;
	myStorageDiv.normalize();
	
	// Create all tiddlers in a new TiddlyWiki
	// (following code is modified copy of TiddlyWiki.prototype.loadFromDiv)
	var store = myStorageDiv.childNodes;
	for(var t = 0; t < store.length; t++) {
		var e = store[t];
		var title = null;
		if(e.getAttribute)
			title = e.getAttribute("tiddler");
		if(!title && e.id && e.id.substr(0,lenPrefix) == idPrefix)
			title = e.id.substr(lenPrefix);
		if(title && title !== "") {
			var tiddler = tiddlyWiki.createTiddler(title);
			tiddler.loadFromDiv(e,title);
		}
	}
	tiddlyWiki.dirty = false;

	return tiddlyWiki;
};


	
// Internal.
//
// Returns a function that has a function body returning the given javaScriptExpression.
// The function has the parameters:
// 
//	 (tiddler, context, count, index)
//
config.macros.forEachTiddler.getEvalTiddlerFunction = function (javaScriptExpression, context) {
	var script = context["script"];
	var functionText = "var theFunction = function(tiddler, context, count, index) { return "+javaScriptExpression+"}";
	var fullText = (script ? script+";" : "")+functionText+";theFunction;";
	return eval(fullText);
};

// Internal.
//
config.macros.forEachTiddler.findTiddlers = function(whereClause, context, tiddlyWiki) {
	var result = [];
	var func = config.macros.forEachTiddler.getEvalTiddlerFunction(whereClause, context);
	tiddlyWiki.forEachTiddler(function(title,tiddler) {
		if (func(tiddler, context, undefined, undefined)) {
			result.push(tiddler);
		}
	});
	return result;
};

// Internal.
//
config.macros.forEachTiddler.createExtraParameterErrorElement = function(place, actionName, parameter, firstUnusedIndex) {
	var message = "Extra parameter behind '"+actionName+"':";
	for (var i = firstUnusedIndex; i < parameter.length; i++) {
		message += " "+parameter[i];
	}
	this.handleError(place, message);
};

// Internal.
//
config.macros.forEachTiddler.sortAscending = function(tiddlerA, tiddlerB) {
	var result = 
		(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue) 
			? 0
			: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
			   ? -1 
			   : +1; 
	return result;
};

// Internal.
//
config.macros.forEachTiddler.sortDescending = function(tiddlerA, tiddlerB) {
	var result = 
		(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue) 
			? 0
			: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
			   ? +1 
			   : -1; 
	return result;
};

// Internal.
//
config.macros.forEachTiddler.sortTiddlers = function(tiddlers, sortClause, ascending, context) {
	// To avoid evaluating the sortClause whenever two items are compared 
	// we pre-calculate the sortValue for every item in the array and store it in a 
	// temporary property ("forEachTiddlerSortValue") of the tiddlers.
	var func = config.macros.forEachTiddler.getEvalTiddlerFunction(sortClause, context);
	var count = tiddlers.length;
	var i;
	for (i = 0; i < count; i++) {
		var tiddler = tiddlers[i];
		tiddler.forEachTiddlerSortValue = func(tiddler,context, undefined, undefined);
	}

	// Do the sorting
	tiddlers.sort(ascending ? this.sortAscending : this.sortDescending);

	// Delete the temporary property that holds the sortValue.	
	for (i = 0; i < tiddlers.length; i++) {
		delete tiddlers[i].forEachTiddlerSortValue;
	}
};


// Internal.
//
config.macros.forEachTiddler.trace = function(message) {
	displayMessage(message);
};

// Internal.
//
config.macros.forEachTiddler.traceMacroCall = function(place,macroName,params) {
	var message ="<<"+macroName;
	for (var i = 0; i < params.length; i++) {
		message += " "+params[i];
	}
	message += ">>";
	displayMessage(message);
};


// Internal.
//
// Creates an element that holds an error message
// 
config.macros.forEachTiddler.createErrorElement = function(place, exception) {
	var message = (exception.description) ? exception.description : exception.toString();
	return createTiddlyElement(place,"span",null,"forEachTiddlerError","<<forEachTiddler ...>>: "+message);
};

// Internal.
//
// @param place [may be null]
//
config.macros.forEachTiddler.handleError = function(place, exception) {
	if (place) {
		this.createErrorElement(place, exception);
	} else {
		throw exception;
	}
};

// Internal.
//
// Encodes the given string.
//
// Replaces 
//	 "$))" to ">>"
//	 "$)" to ">"
//
config.macros.forEachTiddler.paramEncode = function(s) {
	var reGTGT = new RegExp("\\$\\)\\)","mg");
	var reGT = new RegExp("\\$\\)","mg");
	return s.replace(reGTGT, ">>").replace(reGT, ">");
};

// Internal.
//
// Returns the given original path (that is a file path, starting with "file:")
// as a path to a local file, in the systems native file format.
//
// Location information in the originalPath (i.e. the "#" and stuff following)
// is stripped.
// 
config.macros.forEachTiddler.getLocalPath = function(originalPath) {
	// Remove any location part of the URL
	var hashPos = originalPath.indexOf("#");
	if(hashPos != -1)
		originalPath = originalPath.substr(0,hashPos);
	// Convert to a native file format assuming
	// "file:///x:/path/path/path..." - pc local file --> "x:\path\path\path..."
	// "file://///server/share/path/path/path..." - FireFox pc network file --> "\\server\share\path\path\path..."
	// "file:///path/path/path..." - mac/unix local file --> "/path/path/path..."
	// "file://server/share/path/path/path..." - pc network file --> "\\server\share\path\path\path..."
	var localPath;
	if(originalPath.charAt(9) == ":") // pc local file
		localPath = unescape(originalPath.substr(8)).replace(new RegExp("/","g"),"\\");
	else if(originalPath.indexOf("file://///") === 0) // FireFox pc network file
		localPath = "\\\\" + unescape(originalPath.substr(10)).replace(new RegExp("/","g"),"\\");
	else if(originalPath.indexOf("file:///") === 0) // mac/unix local file
		localPath = unescape(originalPath.substr(7));
	else if(originalPath.indexOf("file:/") === 0) // mac/unix local file
		localPath = unescape(originalPath.substr(5));
	else // pc network file
		localPath = "\\\\" + unescape(originalPath.substr(7)).replace(new RegExp("/","g"),"\\");	
	return localPath;
};

// ---------------------------------------------------------------------------
// Stylesheet Extensions (may be overridden by local StyleSheet)
// ---------------------------------------------------------------------------
//
setStylesheet(
	".forEachTiddlerError{color: #ffffff;background-color: #880000;}",
	"forEachTiddler");

//============================================================================
// End of forEachTiddler Macro
//============================================================================


//============================================================================
// String.startsWith Function
//============================================================================
//
// Returns true if the string starts with the given prefix, false otherwise.
//
version.extensions["String.startsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.startsWith = function(prefix) {
	var n =  prefix.length;
	return (this.length >= n) && (this.slice(0, n) == prefix);
};



//============================================================================
// String.endsWith Function
//============================================================================
//
// Returns true if the string ends with the given suffix, false otherwise.
//
version.extensions["String.endsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.endsWith = function(suffix) {
	var n = suffix.length;
	return (this.length >= n) && (this.right(n) == suffix);
};


//============================================================================
// String.contains Function
//============================================================================
//
// Returns true when the string contains the given substring, false otherwise.
//
version.extensions["String.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.contains = function(substring) {
	return this.indexOf(substring) >= 0;
};

//============================================================================
// Array.indexOf Function
//============================================================================
//
// Returns the index of the first occurance of the given item in the array or 
// -1 when no such item exists.
//
// @param item [may be null]
//
version.extensions["Array.indexOf"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.indexOf = function(item) {
	for (var i = 0; i < this.length; i++) {
		if (this[i] == item) {
			return i;
		}
	}
	return -1;
};

//============================================================================
// Array.contains Function
//============================================================================
//
// Returns true when the array contains the given item, otherwise false. 
//
// @param item [may be null]
//
version.extensions["Array.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.contains = function(item) {
	return (this.indexOf(item) >= 0);
};

//============================================================================
// Array.containsAny Function
//============================================================================
//
// Returns true when the array contains at least one of the elements 
// of the item. Otherwise (or when items contains no elements) false is returned.
//
version.extensions["Array.containsAny"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAny = function(items) {
	for(var i = 0; i < items.length; i++) {
		if (this.contains(items[i])) {
			return true;
		}
	}
	return false;
};


//============================================================================
// Array.containsAll Function
//============================================================================
//
// Returns true when the array contains all the items, otherwise false.
// 
// When items is null false is returned (even if the array contains a null).
//
// @param items [may be null] 
//
version.extensions["Array.containsAll"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAll = function(items) {
	for(var i = 0; i < items.length; i++) {
		if (!this.contains(items[i])) {
			return false;
		}
	}
	return true;
};


} // of "install only once"

// Used Globals (for JSLint) ==============
// ... DOM
/*global 	document */
// ... TiddlyWiki Core
/*global 	convertUnicodeToUTF8, createTiddlyElement, createTiddlyLink, 
			displayMessage, endSaveArea, hasClass, loadFile, saveFile, 
			startSaveArea, store, wikify */
//}}}


/***
!Licence and Copyright
Copyright (c) abego Software ~GmbH, 2005 ([[www.abego-software.de|http://www.abego-software.de]])

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.

Neither the name of abego Software nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
***/

/***
<<checkForDataTiddlerPlugin>>
|''Name:''|FormTiddlerPlugin|
|''Version:''|1.0.6 (2007-06-24)|
|''Source:''|http://tiddlywiki.abego-software.de/#FormTiddlerPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license]]|
|''Macros:''|formTiddler, checkForDataTiddlerPlugin, newTiddlerWithForm|
|''Requires:''|DataTiddlerPlugin|
|''TiddlyWiki:''|1.2.38+, 2.0|
|''Browser:''|Firefox 1.0.4+; InternetExplorer 6.0|
!Description
Use form-based tiddlers to enter your tiddler data using text fields, listboxes, checkboxes etc. (All standard HTML Form input elements supported).

''Syntax:'' 
|>|{{{<<}}}''formTiddler'' //tiddlerName//{{{>>}}}|
|//tiddlerName//|The name of the FormTemplate tiddler to be used to edit the data of the tiddler containing the macro.|

|>|{{{<<}}}''newTiddlerWithForm'' //formTemplateName// //buttonLabel// [//titleExpression// [''askUser'']] {{{>>}}}|
|//formTemplateName//|The name of the tiddler that defines the form the new tiddler should use.|
|//buttonLabel//|The label of the button|
|//titleExpression//|A (quoted) JavaScript String expression that defines the title (/name) of the new tiddler.|
|''askUser''|Typically the user is not asked for the title when a title is specified (and not yet used). When ''askUser'' is given the user will be asked in any case. This may be used when the calculated title is just a suggestion that must be confirmed by the user|
|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. 'or' means that exactly one of the two alternatives must exist.~~|

For details and how to use the macros see the [[introduction|FormTiddler Introduction]] and the [[examples|FormTiddler Examples]].

!Revision history
* v1.0.6 (2007-06-24)
** Fixed problem when using SELECT component in Internet Explorer (thanks to MaikBoenig for reporting)
* v1.0.5 (2006-02-24)
** Removed "debugger;" instruction
* v1.0.4 (2006-02-07)
** Bug: On IE no data is written to data section when field values changed (thanks to KenGirard for reporting)
* v1.0.3 (2006-02-05)
** Bug: {{{"No form template specified in <<formTiddler>>"}}} when using formTiddler macro on InternetExplorer (thanks to KenGirard for reporting)
* v1.0.2 (2006-01-06)
** Support TiddlyWiki 2.0
* v1.0.1 (2005-12-22)
** Features: 
*** Support InternetExplorer
*** Added newTiddlerWithForm Macro
* v1.0.0 (2005-12-14)
** initial version

!Code
***/
//{{{

//============================================================================
//============================================================================
//						FormTiddlerPlugin
//============================================================================
//============================================================================

if (!window.abego) window.abego = {};

abego.getOptionsValue = function(element,i) {
	var v = element.options[i].value;
	if (!v && element.options[i].text)
		v = element.options[i].text;
	return v;
};

version.extensions.FormTiddlerPlugin = {
	major: 1, minor: 0, revision: 5,
	date: new Date(2006, 2, 24), 
	type: 'plugin',
	source: "http://tiddlywiki.abego-software.de/#FormTiddlerPlugin"
};

// For backward compatibility with v1.2.x
//
if (!window.story) window.story=window; 
if (!TiddlyWiki.prototype.getTiddler) TiddlyWiki.prototype.getTiddler = function(title) { return t = this.tiddlers[title]; return (t != undefined && t instanceof Tiddler) ? t : null; } 

//============================================================================
// formTiddler Macro
//============================================================================

// -------------------------------------------------------------------------------
// Configurations and constants 
// -------------------------------------------------------------------------------

config.macros.formTiddler = {
	// Standard Properties
	label: "formTiddler",
	version: {major: 1, minor: 0, revision: 4, date: new Date(2006, 2, 7)},
	prompt: "Edit tiddler data using forms",

	// Define the "setters" that set the values of INPUT elements of a given type
	// (must match the corresponding "getter")
	setter: {  
		button:				function(e, value) {/*contains no data */ },
		checkbox:			function(e, value) {e.checked = value;},
		file:				function(e, value) {try {e.value = value;} catch(e) {/* ignore, possibly security error*/}},
		hidden:				function(e, value) {e.value = value;},
		password:			function(e, value) {e.value = value;},
		radio:				function(e, value) {e.checked = (e.value == value);},
		reset:				function(e, value) {/*contains no data */ },
		"select-one":		function(e, value) {config.macros.formTiddler.setSelectOneValue(e,value);},
		"select-multiple":	function(e, value) {config.macros.formTiddler.setSelectMultipleValue(e,value);},
		submit:				function(e, value) {/*contains no data */},
		text:				function(e, value) {e.value = value;},
		textarea:			function(e, value) {e.value = value;}
	},

	// Define the "getters" that return the value of INPUT elements of a given type
	// Return undefined to not store any data.
	getter: {  
		button:				function(e, value) {return undefined;},
		checkbox:			function(e, value) {return e.checked;},
		file:				function(e, value) {return e.value;},
		hidden:				function(e, value) {return e.value;},
		password:			function(e, value) {return e.value;},
		radio:				function(e, value) {return e.checked ? e.value : undefined;},
		reset:				function(e, value) {return undefined;},
		"select-one":		function(e, value) {return config.macros.formTiddler.getSelectOneValue(e);},
		"select-multiple":	function(e, value) {return config.macros.formTiddler.getSelectMultipleValue(e);},
		submit:				function(e, value) {return undefined;},
		text:				function(e, value) {return e.value;},
		textarea:			function(e, value) {return e.value;}
	}
};


// -------------------------------------------------------------------------------
// The formTiddler Macro Handler 
// -------------------------------------------------------------------------------

config.macros.formTiddler.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
	if (!config.macros.formTiddler.checkForExtensions(place, macroName)) {
		return;
	}
	// --- Parsing ------------------------------------------

	var i = 0; // index running over the params

	// get the name of the form template tiddler
	var formTemplateName = undefined;
	if (i < params.length) {
		formTemplateName = params[i];
		i++;
	}

	if (!formTemplateName) {
		config.macros.formTiddler.createErrorElement(place, "No form template specified in <<" + macroName + ">>.");
		return;
	}


	// --- Processing ------------------------------------------

	// Get the form template text. 
	// (This contains the INPUT elements for the form.)
	var formTemplateTiddler = store.getTiddler(formTemplateName);
	if (!formTemplateTiddler) {
		config.macros.formTiddler.createErrorElement(place, "Form template '" + formTemplateName + "' not found.");
		return;
	}
	var templateText = formTemplateTiddler.text;
	if(!templateText) {
		// Shortcut: when template text is empty we do nothing.
		return;
	}

	// Get the name of the tiddler containing this "formTiddler" macro
	// (i.e. the tiddler, that will be edited and that contains the data)
	var tiddlerName = config.macros.formTiddler.getContainingTiddlerName(place);

	// Append a "form" element. 
	var formName = "form"+formTemplateName+"__"+tiddlerName;
	var e = document.createElement("form");
	e.setAttribute("name", formName);
	place.appendChild(e);

	// "Embed" the elements defined by the templateText (i.e. the INPUT elements) 
	// into the "form" element we just created
	wikify(templateText, e);

	// Initialize the INPUT elements.
	config.macros.formTiddler.initValuesAndHandlersInFormElements(formName, DataTiddler.getDataObject(tiddlerName));
}


// -------------------------------------------------------------------------------
// Form Data Access 
// -------------------------------------------------------------------------------

// Internal.
//
// Initialize the INPUT elements of the form with the values of their "matching"
// data fields in the tiddler. Also setup the onChange handler to ensure that
// changes in the INPUT elements are stored in the tiddler's data.
//
config.macros.formTiddler.initValuesAndHandlersInFormElements = function(formName, data) {
	// config.macros.formTiddler.trace("initValuesAndHandlersInFormElements(formName="+formName+", data="+data+")");

	// find the form
	var form = config.macros.formTiddler.findForm(formName);
	if (!form) {
		return;
	}

	try {
		var elems = form.elements;
		for (var i = 0; i < elems.length; i++) {
			var c = elems[i];
		
			var setter = config.macros.formTiddler.setter[c.type];
			if (setter) {
				var value = data[c.name];
				if (value != null) {
					setter(c, value);
				}
				c.onchange = onFormTiddlerChange;
			} else {
				config.macros.formTiddler.displayFormTiddlerError("No setter defined for INPUT element of type '"+c.type+"'. (Element '"+c.name+"' in form '"+formName+"')");
			}
		}
	} catch(e) {
		config.macros.formTiddler.displayFormTiddlerError("Error when updating elements with new formData. "+e);
	}
}


// Internal.
//
// @return [may be null]
//
config.macros.formTiddler.findForm = function(formName) {
	// We must manually iterate through the document's forms, since
	// IE does not support the "document[formName]" approach

	var forms = window.document.forms;
	for (var i = 0; i < forms.length; i++) {
		var form = forms[i];
		if (form.name == formName) {
			return form;
		}
	}

	return null;
}


// Internal.
//
config.macros.formTiddler.setSelectOneValue = function(element,value) {
	var n = element.options.length;
	for (var i = 0; i < n; i++) {
		element.options[i].selected = abego.getOptionsValue(element,i) == value;
	}
}

// Internal.
//
config.macros.formTiddler.setSelectMultipleValue = function(element,value) {
	var values = {};
	for (var i = 0; i < value.length; i++) {
		values[value[i]] = true;
	}
	
	var n = element.length;
	for (var i = 0; i < n; i++) {
		element.options[i].selected = !(!values[abego.getOptionsValue(element,i)]);
	}
}

// Internal.
//
config.macros.formTiddler.getSelectOneValue = function(element) {
	var i = element.selectedIndex;
	return (i >= 0) ? abego.getOptionsValue(element,i) : null;
}

// Internal.
//
config.macros.formTiddler.getSelectMultipleValue = function(element) {
	var values = [];
	var n = element.length;
	for (var i = 0; i < n; i++) {
		if (element.options[i].selected) {
			values.push(abego.getOptionsValue(element,i));
		}
	}
	return values;
}



// -------------------------------------------------------------------------------
// Helpers 
// -------------------------------------------------------------------------------

// Internal.
//
config.macros.formTiddler.checkForExtensions = function(place,macroName) {
	if (!version.extensions.DataTiddlerPlugin) {
		config.macros.formTiddler.createErrorElement(place, "<<" + macroName + ">> requires the DataTiddlerPlugin. (You can get it from http://tiddlywiki.abego-software.de/#DataTiddlerPlugin)");
		return false;
	}
	return true;
}

// Internal.
//
// Displays a trace message in the "TiddlyWiki" message pane.
// (used for debugging)
//
config.macros.formTiddler.trace = function(s) {
	displayMessage("Trace: "+s);
}

// Internal.
//
// Display some error message in the "TiddlyWiki" message pane.
//
config.macros.formTiddler.displayFormTiddlerError = function(s) {
	alert("FormTiddlerPlugin Error: "+s);
}

// Internal.
//
// Creates an element that holds an error message
// 
config.macros.formTiddler.createErrorElement = function(place, message) {
	return createTiddlyElement(place,"span",null,"formTiddlerError",message);
}

// Internal.
//
// Returns the name of the tiddler containing the given element.
// 
config.macros.formTiddler.getContainingTiddlerName = function(element) {
	return story.findContainingTiddler(element).id.substr(7);
}

// -------------------------------------------------------------------------------
// Event Handlers 
// -------------------------------------------------------------------------------

// This function must be called by the INPUT elements whenever their
// data changes. Typically this is done through an "onChange" handler.
//
function onFormTiddlerChange (e) {
	// config.macros.formTiddler.trace("onFormTiddlerChange "+e);

	if (!e) var e = window.event;

	var target = resolveTarget(e);
	var tiddlerName = config.macros.formTiddler.getContainingTiddlerName(target);
	var getter = config.macros.formTiddler.getter[target.type];
	if (getter) {
		var value = getter(target);
		DataTiddler.setData(tiddlerName, target.name, value);
	} else {
		config.macros.formTiddler.displayFormTiddlerError("No getter defined for INPUT element of type '"+target.type+"'. (Element '"+target.name+"' used in tiddler '"+tiddlerName+"')");
	}
}

// ensure that the function can be used in HTML event handler
window.onFormTiddlerChange = onFormTiddlerChange;


// -------------------------------------------------------------------------------
// Stylesheet Extensions (may be overridden by local StyleSheet)
// -------------------------------------------------------------------------------

setStylesheet(
	".formTiddlerError{color: #ffffff;background-color: #880000;}",
	"formTiddler");


//============================================================================
// checkForDataTiddlerPlugin Macro
//============================================================================

config.macros.checkForDataTiddlerPlugin = {
	// Standard Properties
	label: "checkForDataTiddlerPlugin",
	version: {major: 1, minor: 0, revision: 0, date: new Date(2005, 12, 14)},
	prompt: "Check if the DataTiddlerPlugin exists"
}

config.macros.checkForDataTiddlerPlugin.handler = function(place,macroName,params) {
	config.macros.formTiddler.checkForExtensions(place, config.macros.formTiddler.label);
}



//============================================================================
// newTiddlerWithForm Macro
//============================================================================

config.macros.newTiddlerWithForm = {
	// Standard Properties
	label: "newTiddlerWithForm",
	version: {major: 1, minor: 0, revision: 1, date: new Date(2006, 1, 6)},
	prompt: "Creates a new Tiddler with a <<formTiddler ...>> macro"
}

config.macros.newTiddlerWithForm.handler = function(place,macroName,params) {
	// --- Parsing ------------------------------------------

	var i = 0; // index running over the params

	// get the name of the form template tiddler
	var formTemplateName = undefined;
	if (i < params.length) {
		formTemplateName = params[i];
		i++;
	}

	if (!formTemplateName) {
		config.macros.formTiddler.createErrorElement(place, "No form template specified in <<" + macroName + ">>.");
		return;
	}

	// get the button label
	var buttonLabel = undefined;
	if (i < params.length) {
		buttonLabel = params[i];
		i++;
	}

	if (!buttonLabel) {
		config.macros.formTiddler.createErrorElement(place, "No button label specified in <<" + macroName + ">>.");
		return;
	}

	// get the (optional) tiddlerName script and "askUser"
	var tiddlerNameScript = undefined;
	var askUser = false;
	if (i < params.length) {
		tiddlerNameScript = params[i];
		i++;

		if (i < params.length && params[i] == "askUser") {
			askUser = true;
			i++;
		}
	}

	// --- Processing ------------------------------------------

	if(!readOnly) {
		var onClick = function() {
			var tiddlerName;
			if (tiddlerNameScript) {
				try {
					tiddlerName = eval(tiddlerNameScript);
				} catch (ex) {
				}
			}
			if (!tiddlerName || askUser) {
				tiddlerName = prompt("Skriv en titel.", askUser ? tiddlerName : "");
			}
			while (tiddlerName && store.getTiddler(tiddlerName)) {
				tiddlerName = prompt("En tiddler ved navn '"+tiddlerName+"' findes allerede.\n\n"+"Skriv en titel.", tiddlerName);
			}

			// tiddlerName is either null (user canceled) or a name that is not yet in the store.
			if (tiddlerName) {
				var body = "<<formTiddler [["+formTemplateName+"]]>>";
				var tags = [];
				store.saveTiddler(tiddlerName,tiddlerName,body,config.options.txtUserName,new Date(),tags);
				story.displayTiddler(null,tiddlerName,1);
			}
		}

		createTiddlyButton(place,buttonLabel,buttonLabel,onClick);
    }
}

//}}}


/***
!Licence and Copyright
Copyright (c) abego Software ~GmbH, 2005 ([[www.abego-software.de|http://www.abego-software.de]])

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.

Neither the name of abego Software nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
***/
<<reminder dag:12 måned:2 år:2010 titel:"09:00-19:00 en test" >>

/***
|Name|FullScreenPlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#FullScreenPlugin|
|Version|1.1|
|Requires|~TW2.x|
!Description:
Toggle between viewing tiddlers fullscreen and normally. Very handy for when you need more viewing space.

!Demo:
Click the ↕ button in the toolbar for this tiddler. Click it again to turn off fullscreen.

!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.
Edit the ViewTemplate to add the fullscreen command to the toolbar.

!History:
*25-07-06: ver 1.1
*20-07-06: ver 1.0

!Code
***/
//{{{
var lewcidFullScreen = false;

config.commands.fullscreen =
{
            text:" ↕ ",
            tooltip:"Fullscreen mode"
};

config.commands.fullscreen.handler = function (event,src,title)
{
            if (lewcidFullScreen == false)
               {
                lewcidFullScreen = true;
                setStylesheet('#sidebar, .header, #mainMenu{display:none;} #displayArea{margin:0em 0 0 0 !important;}',"lewcidFullScreenStyle");
               }
            else
               {
                lewcidFullScreen = false;
                setStylesheet(' ',"lewcidFullScreenStyle");
               }
}

config.macros.fullscreen={};
config.macros.fullscreen.handler =  function(place,macroName,params,wikifier,paramString,tiddler)
{
        var label = params[0]||" ↕ ";
        var tooltip = params[1]||"Fullscreen mode";
        createTiddlyButton(place,label,tooltip,config.commands.fullscreen.handler);
}

var lewcid_fullscreen_closeTiddler = Story.prototype.closeTiddler;
Story.prototype.closeTiddler =function(title,animate,slowly)
{
           lewcid_fullscreen_closeTiddler.apply(this,arguments);
           if (story.isEmpty() && lewcidFullScreen == true)
              config.commands.fullscreen.handler();
}


Slider.prototype.lewcidStop = Slider.prototype.stop;
Slider.prototype.stop = function()
{
           this.lewcidStop();
           if (story.isEmpty() && lewcidFullScreen == true)
              config.commands.fullscreen.handler();
}
//}}}
Main GTD categories...
<html><div align="center"><iframe src="http://www.flickr.com/photos/46578721@N08/sets/72157623079189553/show/" frameborder="0" width="100%" height="600"></iframe></div></html>
+++[Barry Kaulers vurdering]...:
<html><div align="center"><iframe src="http://bkhome.org/blog/?viewDetailed=01394" frameborder="0" width="100%" height="600"></iframe></div></html>===
/***
|Name|GotoPlugin|
|Source|http://www.TiddlyTools.com/#GotoPlugin|
|Documentation|http://www.TiddlyTools.com/#GotoPluginInfo|
|Version|1.9.2|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|view any tiddler by entering it's title - displays list of possible matches|
''View a tiddler by typing its title and pressing //enter//.''  As you type, a list of possible matches is displayed.  You can scroll-and-click (or use arrows+enter) to select/view a tiddler, or press escape to close the listbox to resume typing.  When the listbox is not displayed, pressing //escape// clears the current input.
!!!Configuration
<<<
*Match titles only after {{twochar{<<option txtIncrementalSearchMin>>}}} or more characters are entered.<br>Use down-arrow to start matching with shorter input.  //Note: This option value is also set/used by [[SearchOptionsPlugin]]//.
*To set the maximum height of the listbox, you can create a tiddler tagged with <<tag systemConfig>>, containing:
//{{{
config.macros.gotoTiddler.listMaxSize=10;  // change this number
//}}}
!!!Code
***/
//{{{
version.extensions.GotoPlugin= {major: 1, minor: 9, revision: 2, date: new Date(2009,5,22)};

// automatically tweak shadow SideBarOptions to add <<gotoTiddler>> macro above <<search>>
config.shadowTiddlers.SideBarOptions=config.shadowTiddlers.SideBarOptions.replace(/<<search>>/,"{{button{goto}}}\n<<gotoTiddler>><<search>>");
if (config.options.txtIncrementalSearchMin===undefined) config.options.txtIncrementalSearchMin=2;

config.macros.gotoTiddler= { 
	listMaxSize: 10,
	listHeading: 'Fandt %0 matchende titler%1...',
	searchItem: "Søg efter '%0'...",
	handler:
	function(place,macroName,params,wikifier,paramString,tiddler) {
		var quiet	=params.contains("stille");
		var showlist	=params.contains("visliste");
		var search	=params.contains("søg");
		params = paramString.parseParams("anon",null,true,false,false);
		var instyle	=getParam(params,"inputstyle","");
		var liststyle	=getParam(params,"liststyle","");
		var filter	=getParam(params,"filter","");
		var html=this.html;
		var keyevent=window.event?"onkeydown":"onkeypress"; // IE event fixup for ESC handling
		html=html.replace(/%keyevent%/g,keyevent);
		html=html.replace(/%search%/g,search);
		html=html.replace(/%quiet%/g,quiet);
		html=html.replace(/%showlist%/g,showlist);
		html=html.replace(/%display%/g,showlist?'block':'none');
		html=html.replace(/%position%/g,showlist?'static':'absolute');
		html=html.replace(/%instyle%/g,instyle);
		html=html.replace(/%liststyle%/g,liststyle);
		html=html.replace(/%filter%/g,filter);
		//if (config.browser.isIE) html=this.IEtableFixup.format([html]);
		var span=createTiddlyElement(place,'span');
		span.innerHTML=html; var form=span.getElementsByTagName("form")[0];
		if (showlist) this.fillList(form.list,'',filter,search,0);
	},
	html:
	'<form onsubmit="return false" style="display:inline;margin:0;padding:0">\
		<input name=gotoTiddler type=text value="søg..." autocomplete="off" accesskey="G" style="%instyle%"\
			title="ENTER=søg | SHIFT+ENTER=åben | DOWN=liste"\
			onfocus="this.select(); this.setAttribute(\'accesskey\',\'G\');"\
			%keyevent%="return config.macros.gotoTiddler.inputEscKeyHandler(event,this,this.form.list,%search%,%showlist%);"\
			onkeyup="return config.macros.gotoTiddler.inputKeyHandler(event,this,%quiet%,%search%,%showlist%);">\
		<select name=list style="display:%display%;position:%position%;%liststyle%"\
			onchange="if (!this.selectedIndex) this.selectedIndex=1;"\
			onblur="this.style.display=%showlist%?\'block\':\'none\';"\
			%keyevent%="return config.macros.gotoTiddler.selectKeyHandler(event,this,this.form.gotoTiddler,%showlist%);"\
			onclick="return config.macros.gotoTiddler.processItem(this.value,this.form.gotoTiddler,this,%showlist%);">\
		</select><input name="filter" type="hidden" value="%filter%">\
	</form>',
	IEtableFixup:
	"<table style='width:100%;display:inline;padding:0;margin:0;border:0;'>\
		<tr style='padding:0;margin:0;border:0;'><td style='padding:0;margin:0;border:0;'>\
		%0</td></tr></table>",
	getItems:
	function(list,val,filter) {
		if (!list.cache || !list.cache.length || val.length<=config.options.txtIncrementalSearchMin) {
			// starting new search, fetch and cache list of tiddlers/shadows/tags
			list.cache=new Array();
			if (filter.length) {
				var fn=store.getMatchingTiddlers||store.getTaggedTiddlers;
				var tiddlers=store.sortTiddlers(fn.apply(store,[filter]),'title');
			} else 
				var tiddlers=store.reverseLookup('tags','');
			for(var t=0; t<tiddlers.length; t++) list.cache.push(tiddlers[t].title);
			if (!filter.length) {
				for (var t in config.shadowTiddlers) list.cache.pushUnique(t);
				var tags=store.getTags();
				for(var t=0; t<tags.length; t++) list.cache.pushUnique(tags[t][0]);
			}
		}
		var found = [];
		var match=val.toLowerCase();
		for(var i=0; i<list.cache.length; i++)
			if (list.cache[i].toLowerCase().indexOf(match)!=-1) found.push(list.cache[i]);
		return found;
	},
	getItemSuffix:
	function(t) {
		if (store.tiddlerExists(t)) return "";  // tiddler
		if (store.isShadowTiddler(t)) return " (shadow)"; // shadow
		return " (tag)"; // tag 
	},
	fillList:
	function(list,val,filter,search,key) {
		if (list.style.display=="none") return; // not visible... do nothing!
		var indent='\xa0\xa0\xa0';
		var found = this.getItems(list,val,filter); // find matching items...
		found.sort(); // alpha by title
		while (list.length > 0) list.options[0]=null; // clear list
		var hdr=this.listHeading.format([found.length,found.length==1?"":"s"]);
		list.options[0]=new Option(hdr,"",false,false);
		for (var t=0; t<found.length; t++) list.options[list.length]=
			new Option(indent+found[t]+this.getItemSuffix(found[t]),found[t],false,false);
		if (search)
			list.options[list.length]=new Option(this.searchItem.format([val]),"*",false,false);
		list.size=(list.length<this.listMaxSize?list.length:this.listMaxSize); // resize list...
		list.selectedIndex=key==38?list.length-1:key==40?1:0;
	},
	keyProcessed:
	function(ev) { // utility function
		ev.cancelBubble=true; // IE4+
		try{event.keyCode=0;}catch(e){}; // IE5
		if (window.event) ev.returnValue=false; // IE6
		if (ev.preventDefault) ev.preventDefault(); // moz/opera/konqueror
		if (ev.stopPropagation) ev.stopPropagation(); // all
		return false;
	},
	inputEscKeyHandler:
	function(event,here,list,search,showlist) {
		if (event.keyCode==27) {
			if (showlist) { // clear input, reset list
				here.value=here.defaultValue;
				this.fillList(list,'',here.form.filter.value,search,0);
			}
			else if (list.style.display=="none") // clear input
				here.value=here.defaultValue;
			else list.style.display="none"; // hide list
			return this.keyProcessed(event);
		}
		return true; // key bubbles up
	},
	inputKeyHandler:
	function(event,here,quiet,search,showlist) {
		var key=event.keyCode;
		var list=here.form.list;
		var filter=here.form.filter;
		// non-printing chars bubble up, except for a few:
		if (key<48) switch(key) {
			// backspace=8, enter=13, space=32, up=38, down=40, delete=46
			case 8: case 13: case 32: case 38: case 40: case 46: break; default: return true;
		}
		// blank input... if down/enter... fall through (list all)... else, and hide or reset list
		if (!here.value.length && !(key==40 || key==13)) {
			if (showlist) this.fillList(here.form.list,'',here.form.filter.value,search,0);
			else list.style.display="none";
			return this.keyProcessed(event);
		}
		// hide list if quiet, or below input minimum (and not showlist)
		list.style.display=(!showlist&&(quiet||here.value.length<config.options.txtIncrementalSearchMin))?'none':'block';
		// non-blank input... enter=show/create tiddler, SHIFT-enter=search for text
		if (key==13 && here.value.length) return this.processItem(event.shiftKey?here.value:'*',here,list,showlist);
		// up or down key, or enter with blank input... shows and moves to list...
		if (key==38 || key==40 || key==13) { list.style.display="block"; list.focus(); }
		this.fillList(list,here.value,filter.value,search,key);
		return true; // key bubbles up
	},
	selectKeyHandler:
	function(event,list,editfield,showlist) {
		if (event.keyCode==27) // escape... hide list, move to edit field
			{ editfield.focus(); list.style.display=showlist?'block':'none'; return this.keyProcessed(event); }
		if (event.keyCode==13 && list.value.length) // enter... view selected item
			{ this.processItem(list.value,editfield,list,showlist); return this.keyProcessed(event); }
		return true; // key bubbles up
	},
	processItem:
	function(title,here,list,showlist) {
		if (!title.length) return;
		list.style.display=showlist?'block':'none';
		if (title=="*")	{ story.search(here.value); return false; } // do full-text search
		if (!showlist) here.value=title;
		story.displayTiddler(null,title); // show selected tiddler
		return false;
	}
}
//}}}

/***
|Name|HTMLFormattingPlugin|
|Source|http://www.TiddlyTools.com/#HTMLFormattingPlugin|
|Documentation|http://www.TiddlyTools.com/#HTMLFormattingPluginInfo|
|Version|2.3.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|'HTML' formatter|
|Description|embed wiki syntax formatting inside of HTML content|
The ~HTMLFormatting plugin allows you to ''mix wiki-style formatting syntax within HTML formatted content'' by extending the action of the standard TiddlyWiki formatting handler.
!!!!!Documentation
>see [[HTMLFormattingPluginInfo]]
!!!!!Revisions
<<<
2008.10.02 [2.3.0] added use of {{{<nowiki>}}} marker to bypass all wikification inside a specific HTML block
2008.09.19 [2.2.0] in wikifyTextNodes(), don't wikify the contents of STYLE nodes (thanks to MorrisGray for bug report)
| see [[HTMLFormattingPluginInfo]] for additional revision details |
2005.06.26 [1.0.0] Initial Release (as code adaptation - pre-dates TiddlyWiki plugin architecture!!)
<<<
!!!!!Code
***/
//{{{
version.extensions.HTMLFormattingPlugin= {major: 2, minor: 3, revision: 0, date: new Date(2008,10,2)};

// find the formatter for HTML and replace the handler
initHTMLFormatter();
function initHTMLFormatter()
{
	for (var i=0; i<config.formatters.length && config.formatters[i].name!="html"; i++);
	if (i<config.formatters.length)	config.formatters[i].handler=function(w) {
		if (!this.lookaheadRegExp)  // fixup for TW2.0.x
			this.lookaheadRegExp = new RegExp(this.lookahead,"mg");
		this.lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
			var html=lookaheadMatch[1];
			// if <nowiki> is present, just let browser handle it!
			if (html.indexOf('<nowiki>')!=-1)
				createTiddlyElement(w.output,"span").innerHTML=html;
			else {
				// if <hide linebreaks> is present, suppress wiki-style literal handling of newlines
				if (html.indexOf('<hide linebreaks>')!=-1) html=html.replace(/\n/g,' ');
				// remove all \r's added by IE textarea and mask newlines and macro brackets
				html=html.replace(/\r/g,'').replace(/\n/g,'\\n').replace(/<</g,'%%(').replace(/>>/g,')%%');
				// create span, let browser parse HTML
				var e=createTiddlyElement(w.output,"span"); e.innerHTML=html;
				// then re-render text nodes as wiki-formatted content
				wikifyTextNodes(e);
			}
			w.nextMatch = this.lookaheadRegExp.lastIndex; // continue parsing
		}
	}
}

// wikify #text nodes that remain after HTML content is processed (pre-order recursion)
function wikifyTextNodes(theNode)
{
	function unmask(s) { return s.replace(/\%%\(/g,'<<').replace(/\)\%%/g,'>>').replace(/\\n/g,'\n'); }
	switch (theNode.nodeName.toLowerCase()) {
		case 'style': case 'option': case 'select':
			theNode.innerHTML=unmask(theNode.innerHTML);
			break;
		case 'textarea':
			theNode.value=unmask(theNode.value);
			break;
		case '#text':
			var txt=unmask(theNode.nodeValue);
			var newNode=createTiddlyElement(null,"span");
			theNode.parentNode.replaceChild(newNode,theNode);
			wikify(txt,newNode);
			break;
		default:
			for (var i=0;i<theNode.childNodes.length;i++)
				wikifyTextNodes(theNode.childNodes.item(i)); // recursion
			break;
	}
}
//}}}
<<tiddler {{'HentLektieKnap##Apply'}} with: [[$1]]>>
/%
!Apply
<<loadTiddlers "label:Hent " "tag:lektie" http://$1.tiddlyspot.com/index.html confirm noreport>>
!end Apply%/
/***
|Name:|HideWhenPlugin|
|Description:|Allows conditional inclusion/exclusion in templates|
|Version:|3.1 ($Rev: 3919 $)|
|Date:|$Date: 2008-03-13 02:03:12 +1000 (Thu, 13 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#HideWhenPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
For use in ViewTemplate and EditTemplate. Example usage:
{{{<div macro="showWhenTagged Task">[[TaskToolbar]]</div>}}}
{{{<div macro="showWhen tiddler.modifier == 'BartSimpson'"><img src="bart.gif"/></div>}}}
***/
//{{{

window.hideWhenLastTest = false;

window.removeElementWhen = function(test,place) {
	window.hideWhenLastTest = test;
	if (test) {
		removeChildren(place);
		place.parentNode.removeChild(place);
	}
};


merge(config.macros,{

	hideWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( eval(paramString), place);
	}},

	showWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !eval(paramString), place);
	}},

	hideWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( tiddler.tags.containsAll(params), place);
	}},

	showWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !tiddler.tags.containsAll(params), place);
	}},

	hideWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( tiddler.tags.containsAny(params), place);
	}},

	showWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !tiddler.tags.containsAny(params), place);
	}},

	hideWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( tiddler.tags.containsAll(params), place);
	}},

	showWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !tiddler.tags.containsAll(params), place);
	}},

	hideWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0]), place);
	}},

	showWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !(store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0])), place);
	}},

	hideWhenTitleIs: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( tiddler.title == params[0], place);
	}},

	showWhenTitleIs: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( tiddler.title != params[0], place);
	}},

	'else': { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !window.hideWhenLastTest, place);
	}}

});

//}}}
<script>
var c='$1',fl,gt,h,o='',t,ti,toc='\n!Table of contents',hx,x=place;
hx=[
	['Introduktion','intro'],
	['TiddlyWiki','tw0',[
		['Generelt','tw'],
		['Tiddler','tid'],
		['Tags','tag'],
		['Formatering','fmt']]],
	['GTD','gtd0',[
		['Metode','gtd'],
		['Arbejdsgang','flow']]],
	['tbGTD','tb0',[
		['Geneneral','tbGTD'],
		['Kategorier','cats'],
		['Tilføj noget','add'],
		['Trin','stages']]],
	['Hvordan gør man ..','how',[
		['Bogmærker','bmk'],
		['Påmindelser','remind'],
		['QuickNotes','qn'],
		['HovedMenu','menu'],
		['x-tab','xtab'],
		['x-plore','xplore'],
		['x-tag','xtag'],
		['tag-cloud','cloud'],
		['tag-choser','deli'],
		['sidebars','side']]],
	['Broken?','brk'],
	['Contact','mail']
];
gt=function(c){
	var i,s,sc,sx,tx,tab=isNaN(c);//as tabs?
	for(i=0;i<hx.length;i++){
		sc=hx[i][1];
		if(tab&&c==sc||!tab&&c==i){
			sx=hx[i][2];if(tab&&!sx)break;
			ti=hx[i][0];
			o+=tab?'@@display:block;min-height:300px;<<tabs tabHelp'+sc:'\n!'+(i+1)+'. '+ti;
			toc+="\n#''"+ti+"''";
			if(sx){
				for(s=0;s<sx.length;s++){
					ti=sx[s][0];sc=sx[s][1];
					o+=tab?" '"+ti+"' '' 'Hjælp##"+sc+"'":"\n!!"+(i+1)+'.'+String.fromCharCode(97+s)+' '+ti+"\n"+"<<tiddler Hjælp##"+sc+">>";
					toc+="\n##"+ti;
				}
				if(tab)o+='>>@@';
			}else o+="\n<<tiddler Hjælp##"+sc+">>";
		}
	}
}
switch(c){
case '$'+'1':o="{{vTabs help{<<tabs tabHelp";for(t=0;t<hx.length;t++){ti=hx[t][0];o+=" '"+ti+"' '' 'Hjælp##"+hx[t][1]+"'";}o+='>>}}}';break;
case 'all':o="{{tbHelp{TOCHELP";for(t=0;t<hx.length;t++)gt(t);o+="}}}";break;
default:gt(c);
}
if(c=='$'+'1'){
	h=createTiddlyElement(x,'div',null,'tbHelp');
	wikify(o,h);
	o="<<slider chkLayout SiteLayout SiteLayout 'Toggles the SiteLayout. You can click on any of the links to get to the tiddler responsible for that content.'>> "+
	"[[Hjælp printout|tbGTD help]]";
}
wikify((c=='all'?o.replace('TOCHELP',toc):o),x);
setStylesheet(
'.tbHelp{margin:10px 0;}'+
'.tbHelp table{border-width:1px;}'+
'.tbHelp .marked{background:#E6E6FF;}'+
'.tbHelp .tabContents{min-height:180px;}'+
'.helpInner{border:2px solid #CCC;background:#F6F6F6;display:block;padding:5px;}'+
'.vTabs .helpInner{border:0;overflow-y:scroll;}'+
'.vTabs .helpSM {height:200px;}'+
'.vTabs .helpBG {height:350px;}','GtdHelpStyles');
</script>@@display:block;height:1px;clear:both;&nbsp;@@/%
!tw0
<<tiddler Hjælp with: tw0>>
!gtd0
<<tiddler Hjælp with: gtd0>>
!tb0
<<tiddler Hjælp with: tb0>>
!how
<<tiddler Hjælp with: how>>
!intro
I det følgende vil du blive introduceret til
*hvordan dette dokument er skruet sammen
*de enkelte dele
*hvordan du kan bruge dem

''NB'': Med mindre det er et eksternt link -- betyder et __understreget__ udtryk at der er en reference til emnet i dette [[Hjælp]] dokument.

Dette dokument bygger på __~TiddlyWiki__
*med fokus på __GTD__
*designet til at hjælpe dig med at få styr på dine ideer og handlinger
*hjælpe dig med at huske
*til halvautomatisk dokumentation og organisering af viden

@@color:#C33;''NB:'' Brug dette dokument på eget ansvar.@@
!tw
<<tiddler SiteTitle>> bygger på [[TiddlyWiki]], som er...
*en utrolig @@opensource@@ [[wiki|http://en.wikipedia.org/wiki/Wiki]] platform
*integrating all of @@content@@, @@layout@@, @@style@@ and @@javascript@@ into a @@single html file@@
*actively developped and supported by a vivacious community

Learn more at...
*the main site http://www.tiddlywiki.com
*the community wiki http://www.tiddlywiki.org
*the google user group http://groups.google.com/group/TiddlyWiki
!tid
A tiddler is the basic content element of a __[[TiddlyWiki]]__. with a few basic properties...
*a @@unique name@@
*@@text-content@@ given to it
*by an @@author@@
*@@created@@ at some date or @@modified@@ later
*@@__tags__@@, which are keywords linked to a tiddler and 
*@@fields@@ providing basic information as well as extensibility

A tiddler is displayed in two basic modes...
*@@view-mode@@ displays the content, e.g. wiki-markup  of the tiddler in the __TiddlyWiki__ @@displayArea@@
*@@edit-mode@@ displays editable fields to change the tiddlers contents
**you can easily access edit-mode by double clicking on a tiddlers display area
**use keyboard-shortcuts in edit-mode
***{{{ctrl-enter}}} saves the tiddler
***{{{escape}}} leaves edit-mode ...while not saving changes

A tiddler may be or contain...
*a content item composed of
**text __formating__ using wiki-markup, possibly with embedded contents, such as...
***images
***tables
***other tiddlers ...which is called a @@transclusion@@
*pure html content wrapped in an {{{<html></html>}}}-block, like...
**iframes ...an html-file or remote website embedded into it
**an {{{embed object}}}, sometimes called a @@widget@@ or @@gadget@@
*a plugin, macro, script or transclusion
**extending a basic __TiddlyWiki__ with more functionality
*[[css|http://en.wikipedia.org/wiki/Cascading_Style_Sheets]] design rules
**a StyleSheet defining how __TiddlyWiki__ looks
*a template ...or template-collection called a @@theme@@
**that determines the presentational @@structure@@ and @@layout@@ of your TiddlyWiki and its elements
*a shadow tiddler ...or system tiddler
**a tiddler with default content that can be overwritten but will be restored when you delete your custom content
!tag
Tags are a powerful concept to relate tiddlers to one another. In addition to ~WikiLinks -- links inside your TiddlyWiki -- they allow you to categorize tiddlers, but with the added benefit of updating upon name changes. Above all, a tag is a tiddler!

Use tags to establish...
*categories
*keywords
*relations
**between parent and child elements
*indicators or switches
**to change style or behaviour of tiddlers with a certain tag

In general, tag those tiddlers on which others depend...
*a sub-element with the corresponding higher-level element
*a task with the corresponding project or contact

In the toolbar {{button{x-tab}}}{{button{x-plore}}}&{{button{x-tag}}} provide tag-related features
*see __Hvordan gør man ..__

An important plugin integrated into this wiki is called [[TagglyTagging|TagglyTaggingPlugin]].
It is displayed at the bottom of a tiddler...
*showing you a configurable view of tiddlers tagging to the current one (if there are any)
*play with the options (!)
*[[go here|http://mptw.tiddlyspot.com]] to learn more about it
!fmt
The tiddler [[formating]] provides a reference for basic and advanced @@wiki-markup@@.
{{helpInner helpBG{<<tiddler formating>>}}}
!gtd
''GTD'' stands for @@Getting Things Done@@.
[[David Allen|http://en.wikipedia.org/wiki/David_Allen_%28author%29]] coined the term as a @@method@@ in his [[book|http://en.wikipedia.org/wiki/Getting_Things_Done]].

Central to its method is that you...
*collect
*process
*organize
*review
*do
...actions and ideas that occupy your brain capacity...
*whether you chose to or not
*which you may find worthy or in need of pursuing
!flow
|font-size:90%;incoming stuff...@@font-size:120%;margin-left:30%; ''inbox''@@ {{floatright{...What is it?}}}|>|>|>|h
| !Is it actionable? |>|>|>|
|>|>| ''yes'' |vertical-align:middle; ''no'' |
|>|>|>1 actions? -- new [[$active]] project (define success)|~|
|>|>|font-size:150%; !What is the next action? |<<tiddler Hjælp##noact>>|
| !do | !delegate | !defer |~|
|if <2 minutes|<<tiddler Hjælp##wait>>|<<tiddler Hjælp##defer>>|~|
|>|>| plan, do, review actions & projects |~|
!noact
#eliminate
**@@trash@@
#incubate
**task:@@[[#queued]], [[#future]]@@
**project:@@[[$someday]], [[$maybe]]@@
#[[reference]]
**set as tags
**tag with corresponding task, project, contact, etc.
!defer
#[[#next]]
**for me @@asap@@
#[[calendar]]
**@@specific@@ time & date
#set a [[reminder]]
!wait
*use [[#waiting]]
*tag with item (if exists)
!tbGTD
Why the name ''tbGTD''?
*Plain and simple, my initials following the you-know-what.

The original can be found at http://tbGTD.tiddlyspot.com...
*the tag <<tag site>> is a collection of tiddlers that manage the design of this tiddlywiki
*on the very bottom of this tiddler you find an illustrated layout of tbGTD
**in which you can click on most any links
***to open the tiddlers responsible for the respective content

!cats
Some tags begin or end with a special character in order to facilitate recognition:

<script>var c,f,i,l,n,o,t,x;
c=['!action','context','priority','!project','stage','contact','area','realm','!archive'];
o='| prefix | category | sub-categories |h\n';f='@@background:#fcc; %0@@';
for(x=0;x<c.length;x++){
	i=c[x].substr(0,1)=='!';	n=i?c[x].substr(1):c[x];
	t=store.getTaggedTiddlers(n);l=t.map(function(t){return '[['+t.title+']] '});
	o+='| '+t[1].title.substr(0,1)+' |'+f.format(['((_*({{popBtn{<<tiddler "'+n+'">>}}})))[['+n+']]'])+' |'+(i?f.format([l]):l)+'|\n';
}return o;</script>
To assign a new item to a category, simply tag your tiddler with the corresponding category.
@@background:#fcc;padding:0 3px;These tiddlers@@ are essential and should only be modified if you know what you're doing:
*@@background:#fcc;[[desk]], [[journal]], [[calendar]], [[reminder]], [[reference]] and all tagged <<tag site>> or <<tag tbGTD>>@@

''Note:''
*type any of those prefixes in the searchbox, hit the down key and observe!
*you are not bound to using these categories
**delete or rename whatever category you don't like or need
**might require some tweaking of the [[desk]] or [[tagger|x-tagger]] or the [[HovedMenu|MainMenu]]
!add
First, learn the basics of [[TiddlyWiki|http://tiddlywiki.com]].

Du kan tilføje nye elementer via...
*{{button{+}}}knapperne på tavlen
*{{button{ny}}}popup'en i [[venstre topmenu|topMenuL]] 
*HovedMenuen til venstre
*{{button{ny}}}knappen i en tiddlers værktøjslinie

Når du tilføjer en ny tiddler, er det vigtigt t du giver den et meningsfuldt tag...
*brug evt. de givne __kategorier__

For at tilføje en ny [[næste handling|#næste]], kræver det blot at du tagger en tiddler med [[#næste]].
!stages
[[Trin|stage]] are a very powerful apporach for your project management and documentation, allowing you to...
*generate overviews of how much effort is going into which stages
*track project progress

''Tips'':
*adjust stages to suit your (different) project designs
**simply edit the corresponding stage-tiddlers or rename them
*consider using tbGTD template files for different project categories
*try to use stages with quick-add in [[QuickNotes]]!

Here is an overview of all <<tag stage>><<rB 'predefined stages...'>>
{{helpInner helpSM{<<tiddler stage>>}}}
!bmk
tbGTD is set-up such that the url always points to the current tiddler.

If you turned @@chkSinglePagePermalink@@ off...
*use the {{button{url}}}button on the toolbar of a tiddler
*you may need to click on the {{button{+}}}button
*then your browsers address bar shows a url pointing to the @@current tiddler@@

Retrieve a link to @@all displayed tiddlers@@ by clicking <<permaview>> under <<popup options [[<<tiddler topMenuR##options$))]]>>.
!remind
Add a reminder...
*by clicking on a date in the calendar
*using the {{button{remind}}}button in the tiddlers toolbar
*using [[QuickNotes]]

To delete or edit a reminder, edit the tiddler.
!qn
Use [[QuickNotes]] to quickly type away notes. It offers a powerful [[quick-add|quick-add help]] feature...
*allowing you to add even a complete project outline in one go
{{helpInner helpBG{<<tiddler 'quick-add help'>>}}}
!menu
The [[MainMenu]] on the left-hand side
*gives you quick access to all GTD categories
*allows to add new items
*indicates, which categories are actually used and let'S you open those subitems

The section @@Tags@@ in [[x-tagger config]] contains links to those tiddlers which are the categories used in the MainMenu as well as by [[x-tagger]] ...the {{button{x-tag}}}popup in the toolbar. Any tiddler tagging to these __categories__ will be displayed in either place.

''Note'':
*configure [[x-tagger]] using [[x-tagger config]]
**also accessible via {{button{edit categories...}}} under ''options'' in the {{button{x-tag}}}popup.
*change [[x-tagger config]] to your liking
**remove anything you don't want or need
*doubleclick on a tag-category in the MainMenu shows all categories
!cloud
To hide a __tag__ from the [[TagCloud]]...
*assign it the tag <<tag noCloud>>
*or use <<tag excludeLists>> to hide it from other lists too

You can also edit the macro call in [[TagCloud]] to exclude further tags, without using [[noCloud]].
!deli
To assign or remove a tag to a tiddler in edit-mode use...
*the default @@tag-choser@@ for any existing tag
*a GTD @@tag-choser@@ to quickly assign
**one of the main GTD __categories__
**its sub-tags
**any tiddlers tagging to the subtags

The tag-choser in edit-mode -- called [[DeliciousTagging]] -- by default ignores the same tags as does __~TagCloud__ ...see parameter @@exclude@@ in the sourcecode.
!side
There are two sidebars...
*@@left@@: MainMenu
*@@right@@: [[calendar|SideBarOptions]] and [[lists|SideBarTabs]]

To hide sidebars on startup...
*change the second parameter in {{{<<toggleSideBarTB left show>>}}} from {{{show}}} to {{{hide}}} in...
**[[topMenuL]] (@@left@@ sidebar)
**[[topMenuR]] (@@right@@ sidebar)
!xtab
Clicking on [[x-tab]] in the toolbar will open...
*an interface allowing you to see a crosstable of tagged items...
**providing you with @@presets@@ which you can delete, expand or edit
**preconfigured to @@detect@@ all GTD __categories__
**configurable to find what you're looking for the way you need it

Customize [[x-tab]]'s presets, tags and auto-detect in [[x-tab config]].
!xplore
Clicking on [[x-plore]] in the toolbar of the current tiddler
*opens a popup displaying the four most common tiddler relations
*in a treelike manner

Define elements to be excluded or truncated using the corresponding sections in [[x-plore]].
!xtag
The {{button{x-tag}}}popup allows you to easily assign tags to the current tiddler or remove them.
Customize [[x-tagger]] as described in __~MainMenu__ via [[x-tagger config]].
!brk
As tbGTD is based on __~TiddlyWiki__ it is facing the same browser restrictions that may come up.
It is highly recommended that you use Firefox! 

Something looks weird or doesn't work in Internet Explorer, Safari, Opera, Chrome?
*I am trying my best to make tbGTD work correctly in other browsers
*if you come accross css bugs - rather than complain - try to suggest a fix
!mail
Need more help? Drop a line here...
*[[tiddlywiki discussion group on google|http://groups.google.com/group/tiddlywiki/browse_frm/thread/bd6a9784706784f6]]
*[[contact me here|contact me]] or on [[tbGTD.tiddlyspot.com|http://tbGTD.tiddlyspot.com/#%5B%5Bcontact%20me%5D%5D]]
!end%/
{{left{<<tiddler HovedMenuLektier##menu>>}}}
/%
!menu
[[Lektier]]
[[Fag|fag]]
<<slider chkSliderOptionsPanel BrugerDefinitioner 'Hvem? »' Liste over hvem der har lektien for'>>
<<slider chkSliderOptionsPanel TaskViews 'Overblik »' 'Et udvalg af opgavelister'>>
<<slider chkSliderOptionsPanel  Download 'Download »''Skriv servernavn og hent din egen kopi'>><<popup upload [[<<tiddler Upload$))]]>>
<<accordion>>
!end menu %/

/***
|Name|ImageSizePlugin|
|Source|http://www.TiddlyTools.com/#ImageSizePlugin|
|Version|1.2.1|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin,formatter|
|Requires||
|Overrides|'image' formatter|
|Description|adds support for resizing images|
This plugin adds optional syntax to scale an image to a specified width and height and/or interactively resize the image with the mouse.
!!!!!Usage
<<<
The extended image syntax is:
{{{
[img(w+,h+)[...][...]]
}}}
where ''(w,h)'' indicates the desired width and height (in CSS units, e.g., px, em, cm, in, or %). Use ''auto'' (or a blank value) for either dimension to scale that dimension proportionally (i.e., maintain the aspect ratio). You can also calculate a CSS value 'on-the-fly' by using a //javascript expression// enclosed between """{{""" and """}}""". Appending a plus sign (+) to a dimension enables interactive resizing in that dimension (by dragging the mouse inside the image). Use ~SHIFT-click to show the full-sized (un-scaled) image. Use ~CTRL-click to restore the starting size (either scaled or full-sized).
<<<
!!!!!Examples
<<<
{{{
[img(100px+,75px+)[images/meow2.jpg]]
}}}
[img(100px+,75px+)[images/meow2.jpg]]
{{{
[<img(34%+,+)[images/meow.gif]]
[<img(21% ,+)[images/meow.gif]]
[<img(13%+, )[images/meow.gif]]
[<img( 8%+, )[images/meow.gif]]
[<img( 5% , )[images/meow.gif]]
[<img( 3% , )[images/meow.gif]]
[<img( 2% , )[images/meow.gif]]
[img(  1%+,+)[images/meow.gif]]
}}}
[<img(34%+,+)[images/meow.gif]]
[<img(21% ,+)[images/meow.gif]]
[<img(13%+, )[images/meow.gif]]
[<img( 8%+, )[images/meow.gif]]
[<img( 5% , )[images/meow.gif]]
[<img( 3% , )[images/meow.gif]]
[<img( 2% , )[images/meow.gif]]
[img(  1%+,+)[images/meow.gif]]
{{tagClear{
}}}
<<<
!!!!!Revisions
<<<
2009.02.24 [1.2.1] cleanup width/height regexp, use '+' suffix for resizing
2009.02.22 [1.2.0] added stretchable images
2008.01.19 [1.1.0] added evaluated width/height values
2008.01.18 [1.0.1] regexp for "(width,height)" now passes all CSS values to browser for validation
2008.01.17 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.ImageSizePlugin= {major: 1, minor: 2, revision: 1, date: new Date(2009,2,24)};
//}}}
//{{{
var f=config.formatters[config.formatters.findByField("name","image")];
f.match="\\[[<>]?[Ii][Mm][Gg](?:\\([^,]*,[^\\)]*\\))?\\[";
f.lookaheadRegExp=/\[([<]?)(>?)[Ii][Mm][Gg](?:\(([^,]*),([^\)]*)\))?\[(?:([^\|\]]+)\|)?([^\[\]\|]+)\](?:\[([^\]]*)\])?\]/mg;
f.handler=function(w) {
	this.lookaheadRegExp.lastIndex = w.matchStart;
	var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
	if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
		var floatLeft=lookaheadMatch[1];
		var floatRight=lookaheadMatch[2];
		var width=lookaheadMatch[3];
		var height=lookaheadMatch[4];
		var tooltip=lookaheadMatch[5];
		var src=lookaheadMatch[6];
		var link=lookaheadMatch[7];

		// Simple bracketted link
		var e = w.output;
		if(link) { // LINKED IMAGE
			if (config.formatterHelpers.isExternalLink(link)) {
				if (config.macros.attach && config.macros.attach.isAttachment(link)) {
					// see [[AttachFilePluginFormatters]]
					e = createExternalLink(w.output,link);
					e.href=config.macros.attach.getAttachment(link);
					e.title = config.macros.attach.linkTooltip + link;
				} else
					e = createExternalLink(w.output,link);
			} else 
				e = createTiddlyLink(w.output,link,false,null,w.isStatic);
			addClass(e,"imageLink");
		}

		var img = createTiddlyElement(e,"img");
		if(floatLeft) img.align="left"; else if(floatRight) img.align="right";
		if(width||height) {
			var x=width.trim(); var y=height.trim();
			var stretchW=(x.substr(x.length-1,1)=='+'); if (stretchW) x=x.substr(0,x.length-1);
			var stretchH=(y.substr(y.length-1,1)=='+'); if (stretchH) y=y.substr(0,y.length-1);
			if (x.substr(0,2)=="{{")
				{ try{x=eval(x.substr(2,x.length-4))} catch(e){displayMessage(e.description||e.toString())} }
			if (y.substr(0,2)=="{{")
				{ try{y=eval(y.substr(2,y.length-4))} catch(e){displayMessage(e.description||e.toString())} }
			img.style.width=x.trim(); img.style.height=y.trim();
			config.formatterHelpers.addStretchHandlers(img,stretchW,stretchH);
		}
		if(tooltip) img.title = tooltip;

		// GET IMAGE SOURCE
		if (config.macros.attach && config.macros.attach.isAttachment(src))
			src=config.macros.attach.getAttachment(src); // see [[AttachFilePluginFormatters]]
		else if (config.formatterHelpers.resolvePath) { // see [[ImagePathPlugin]]
			if (config.browser.isIE || config.browser.isSafari) {
				img.onerror=(function(){
					this.src=config.formatterHelpers.resolvePath(this.src,false);
					return false;
				});
			} else
				src=config.formatterHelpers.resolvePath(src,true);
		}
		img.src=src;
		w.nextMatch = this.lookaheadRegExp.lastIndex;
	}
}

config.formatterHelpers.addStretchHandlers=function(e,stretchW,stretchH) {
	e.title=((stretchW||stretchH)?'DRAG=stretch/shrink, ':'')
		+'SHIFT-CLICK=show full size, CTRL-CLICK=restore initial size';
	e.statusMsg='width=%0, height=%1';
	e.style.cursor='move';
	e.originalW=e.style.width;
	e.originalH=e.style.height;
	e.minW=Math.max(e.offsetWidth/20,10);
	e.minH=Math.max(e.offsetHeight/20,10);
	e.stretchW=stretchW;
	e.stretchH=stretchH;
	e.onmousedown=function(ev) { var ev=ev||window.event;
		this.sizing=true;
		this.startX=!config.browser.isIE?ev.pageX:(ev.clientX+findScrollX());
		this.startY=!config.browser.isIE?ev.pageY:(ev.clientY+findScrollY());
		this.startW=this.offsetWidth;
		this.startH=this.offsetHeight;
		return false;
	};
	e.onmousemove=function(ev) { var ev=ev||window.event;
		if (this.sizing) {
			var s=this.style;
			var currX=!config.browser.isIE?ev.pageX:(ev.clientX+findScrollX());
			var currY=!config.browser.isIE?ev.pageY:(ev.clientY+findScrollY());
			var newW=(currX-this.offsetLeft)/(this.startX-this.offsetLeft)*this.startW;
			var newH=(currY-this.offsetTop )/(this.startY-this.offsetTop )*this.startH;
			if (this.stretchW) s.width =Math.floor(Math.max(newW,this.minW))+'px';
			if (this.stretchH) s.height=Math.floor(Math.max(newH,this.minH))+'px';
			clearMessage(); displayMessage(this.statusMsg.format([s.width,s.height]));
		}
		return false;
	};
	e.onmouseup=function(ev) { var ev=ev||window.event;
		if (ev.shiftKey) { this.style.width=this.style.height=''; }
		if (ev.ctrlKey)  { this.style.width=this.originalW; this.style.height=this.originalH; }
		this.sizing=false;
		clearMessage();
		return false;
	};
	e.onmouseout=function(ev) { var ev=ev||window.event;
		this.sizing=false;
		clearMessage();
		return false;
	};
}
//}}}
/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.5|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Description|Insert Javascript executable code directly into your tiddler content.|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Documentation
>see [[InlineJavascriptPluginInfo]]
!!!!!Revisions
<<<
2009.04.11 [1.9.5] pass current tiddler object into wrapper code so it can be referenced from within 'onclick' scripts
2009.02.26 [1.9.4] in $(), handle leading '#' on ID for compatibility with JQuery syntax
|please see [[InlineJavascriptPluginInfo]] for additional revision details|
2005.11.08 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.InlineJavascriptPlugin= {major: 1, minor: 9, revision: 5, date: new Date(2009,4,11)};

config.formatters.push( {
	name: "inlineJavascript",
	match: "\\<script",
	lookahead: "\\<script(?: src=\\\"((?:.|\\n)*?)\\\")?(?: label=\\\"((?:.|\\n)*?)\\\")?(?: title=\\\"((?:.|\\n)*?)\\\")?(?: key=\\\"((?:.|\\n)*?)\\\")?( show)?\\>((?:.|\\n)*?)\\</script\\>",

	handler: function(w) {
		var lookaheadRegExp = new RegExp(this.lookahead,"mg");
		lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = lookaheadRegExp.exec(w.source)
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
			var src=lookaheadMatch[1];
			var label=lookaheadMatch[2];
			var tip=lookaheadMatch[3];
			var key=lookaheadMatch[4];
			var show=lookaheadMatch[5];
			var code=lookaheadMatch[6];
			if (src) { // external script library
				var script = document.createElement("script"); script.src = src;
				document.body.appendChild(script); document.body.removeChild(script);
			}
			if (code) { // inline code
				if (show) // display source in tiddler
					wikify("{{{\n"+lookaheadMatch[0]+"\n}}}\n",w.output);
				if (label) { // create 'onclick' command link
					var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",wikifyPlainText(label));
					var fixup=code.replace(/document.write\s*\(/gi,'place.bufferedHTML+=(');
					link.code="function _out(place,tiddler){"+fixup+"\n};_out(this,this.tiddler);"
					link.tiddler=w.tiddler;
					link.onclick=function(){
						this.bufferedHTML="";
						try{ var r=eval(this.code);
							if(this.bufferedHTML.length || (typeof(r)==="string")&&r.length)
								var s=this.parentNode.insertBefore(document.createElement("span"),this.nextSibling);
							if(this.bufferedHTML.length)
								s.innerHTML=this.bufferedHTML;
							if((typeof(r)==="string")&&r.length) {
								wikify(r,s,null,this.tiddler);
								return false;
							} else return r!==undefined?r:false;
						} catch(e){alert(e.description||e.toString());return false;}
					};
					link.setAttribute("title",tip||"");
					var URIcode='javascript:void(eval(decodeURIComponent(%22(function(){try{';
					URIcode+=encodeURIComponent(encodeURIComponent(code.replace(/\n/g,' ')));
					URIcode+='}catch(e){alert(e.description||e.toString())}})()%22)))';
					link.setAttribute("href",URIcode);
					link.style.cursor="pointer";
					if (key) link.accessKey=key.substr(0,1); // single character only
				}
				else { // run script immediately
					var fixup=code.replace(/document.write\s*\(/gi,'place.innerHTML+=(');
					var c="function _out(place,tiddler){"+fixup+"\n};_out(w.output,w.tiddler);";
					try	 { var out=eval(c); }
					catch(e) { out=e.description?e.description:e.toString(); }
					if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);
				}
			}
			w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
		}
	}
} )
//}}}

// // Backward-compatibility for TW2.1.x and earlier
//{{{
if (typeof(wikifyPlainText)=="undefined") window.wikifyPlainText=function(text,limit,tiddler) {
	if(limit > 0) text = text.substr(0,limit);
	var wikifier = new Wikifier(text,formatter,null,tiddler);
	return wikifier.wikifyPlain();
}
//}}}

// // GLOBAL FUNCTION: $(...) -- 'shorthand' convenience syntax for document.getElementById()
//{{{
if (typeof($)=='undefined') { function $(id) { return document.getElementById(id.replace(/^#/,'')); } }
//}}}
{{applyNow nowrap{<<tiddler Knap##Apply>>}}}
/%
!Apply
<<tiddler [[Knap##Makro]]>>
!end Apply
!Makro
<<clickify newTiddler label:'opret' title: {{ prompt('skriv en titel på den nye lektie','Ny lektie') }} 
text: {{"<<formTiddler [[LektieTemplate2]]>"+">"}} 
tag: {{ prompt('skriv fag: dansk matmatik engelsk tysk fysik etc ',':') }}  task {{(new Date()).formatString("YYYY-0MM-0DD")}} >>
!end Makro
%/
@@font-family:"Comic Sans MS"; ''Udtalelser''@@ er lavet for at du kan skrive udtalelser i formularer, få et automatisk genereret layout og skrive dem dem ud.
Du skal blot tagge din tiddler (udtalelse) med "udtalelse" og gemme -så får du en indskrivningsformular.
Ved uskrift kan du vælge "print" for den enkelte udtalelse eller "Udskrift af alle på een gang" ved at klikke på "muligheder▾" i topmenuen th.
@@font-family:"Comic Sans MS"; ''Udtalelser''@@ kan også bruges som planlægningsdokument - bestyrelse af lektier med ((mere...(<<tiddler CycleThemes with: "skift tema" "tbGTDTheme TeamTasksSkin">>
[[Lektier online|TeamTasks]] er en online lektiebog.
*[[Definere nogle brugere|UserDefinitions]]         -        [[Hvordan og hvorfor|DefinerBrugere]]
*[[Definere nogle tidsrammer|ScopeDefinitions]] - [[Forklaring|DefineScopes]]
*[[Oprette nogle lektier|CreatingTasks]] <<newTiddler label:'Ny opgave' title:NyLektie tag:lektie text:'Skriv noget tekst og klik på færdig for at se rullemenuerne'>> 
*[[Oprette prioriteter|PriorityDefinitions]]
*[[Lave opgave-rapporter|CreatingTaskReportViews]]

flere ændringer kan laves i [[OpgaveDefinition|TaskDefinitions]].

[[Mere information|About TeamTasks]] om hvilke komponenter der udgør [[Lektier online|TeamTasks]].)))

<html><div <span class='menubox' style='float:center;margin:0em'<div align="center"><iframe src="http://lektiebog.tiddlyspot.com/#txtTheme:TotallyTiddlers" frameborder="0" width="100%" height="800"></iframe></div></html>
<<forEachTiddler
 where
 'tiddler.tags.contains("lektie") && tiddler.text.contains("reminder")'
sortBy 
 'tiddler.fields["tt_alias"]'
write
'"[[fag:|"+tiddler.fields["tt_alias"]+"]](("+tiddler.fields["tt_alias"]+"(<<tiddler fag##form with: "+tiddler.fields["tt_alias"]+" \>\>)))\n lærer:[["+store.getValue(tiddler,"modifier")+"]]\n ((Sidst ændret/lavet*(Ændret: "+tiddler.modified.formatString ("DDD d. 0DD/0MM-YYYY uge WW Kl: 0hh:0mm:0ss")+"\n Oprettet: "+tiddler.created.formatString ("DDD d. 0DD/0MM-YYYY uge WW Kl: 0hh:0mm:0ss")+"))) \n [[gå til |"+tiddler.title+"]]&rarr;\n [["+tiddler.data("lektierows=\"8\"")+"|"+tiddler.title+"]]((*("+tiddler.data("kommentarerrows=\"6\"")+")))\n"' 
>>
|Lektier|c
|sortable|k
|Fag|Bog/Tekst/opgave|side|h
|Da   |                                  |       |
|Mat  |                                 |        |
|Eng  |                                |        |
|Tysk |                                |       |
|         |                                |        |
{{borderless {
|widetable|k
|font-size:20px;colour:blue;<<tiddler LektieTemplate2##form>>|
}}}
/%
!form
<html>
 <table>
 <tr>
 <td colspan="6"><sub><b>[[Lektie:|fag]]</b></sub><br>
 <textarea name=lektierows="8" cols="20" style="width:98%" ></textarea></td></tr>
 <tr>
 <td colspan="6"><sub><b>Kommentarer:</b></sub><br>
 <textarea name=kommentarerrows="6" cols="40" style="width:98%" ></textarea></td></tr>
</table>
</span>
</html>
!end form
!link
[[$1]]
!end link
%/
Denne online lektiebog kan både fungere som +++[server og klient.]... 
Dvs. 
Læreren bestyrer ((''Lektier''({{button{<<tiddler NyLektieKnap with:  -(0DD/MM-/YY.uge.0WW.kl.0hh.mm) [[Ny lektie]]>>}}}))) og elever/forældrene, kan følge med i den på nettet ELLER downloade en kopi. Den hentede kopi kan "opdateres" med nye lektier efterhånden som de oprettes af læreren på nettet. //(Fordelen ved nr.2 er at eleven kan bruge ''Lektier'' til egne noter og ændre i tiddlyswikidokumentet)//
<<<
+++[Simpel opsætning af en Lektieserver]...
Læreren downloader ''Lektier'', opretter en side på [[TiddlySpot|http://tiddlyspot.com]] og overskriver den med den downloadede kopi af Lektier. 
*Den nemmeste måde at gøre det på, er at importere ''tiddlyspotsidens tiddlere'' til ''Lektier'' via ''Import''-menupunktet på ''bagscenen'' //(øverst th)//  
**- vælg ''ja'' til overskrivning af tiddlere. 
**Klik på på ''Server'' under menupunktet ''Hent lektier eller en ny kopi »'' og indskriv titlen på ''tiddlyspotsiden''. 
**Gem og opdatér siden (F5). 
*Klik på ''Upload »'' indskriv kode og klik på ''gem til nettet''.
Serveren er oprettet!!===
+++[Brug Lektier som klient]...
*Download ''Lektier''
*Klik på ''Hent'' under menupunktet "''Hent lektier eller en ny kopi »''"
**Nye eller ændrede lektier bliver hentet ind, hver gang knappen bruges!
Husk at gemme!======
<<list filter "[tag[lektie]]">>

/***
|Name:|LessBackupsPlugin|
|Description:|Intelligently limit the number of backup files you create|
|Version:|3.0.1 ($Rev: 2320 $)|
|Date:|$Date: 2007-06-18 22:37:46 +1000 (Mon, 18 Jun 2007) $|
|Source:|http://mptw.tiddlyspot.com/#LessBackupsPlugin|
|Author:|Simon Baird|
|Email:|simon.baird@gmail.com|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Description
You end up with just backup one per year, per month, per weekday, per hour, minute, and second.  So total number won't exceed about 200 or so. Can be reduced by commenting out the seconds/minutes/hours line from modes array
!!Notes
Works in IE and Firefox only.  Algorithm by Daniel Baird. IE specific code by by Saq Imtiaz.
***/
//{{{

var MINS  = 60 * 1000;
var HOURS = 60 * MINS;
var DAYS  = 24 * HOURS;

if (!config.lessBackups) {
	config.lessBackups = {
		// comment out the ones you don't want or set config.lessBackups.modes in your 'tweaks' plugin
		modes: [
			["YYYY",  365*DAYS], // one per year for ever
			["MMM",   31*DAYS],  // one per month
			["ddd",   7*DAYS],   // one per weekday
			//["d0DD",  1*DAYS],   // one per day of month
			["h0hh",  24*HOURS], // one per hour
			//["m0mm",  1*HOURS],  // one per minute
			//["s0ss",  1*MINS],   // one per second
			["latest",0]         // always keep last version. (leave this).
		]
	};
}

window.getSpecialBackupPath = function(backupPath) {

	var now = new Date();

	var modes = config.lessBackups.modes;

	for (var i=0;i<modes.length;i++) {

		// the filename we will try
		var specialBackupPath = backupPath.replace(/(\.)([0-9]+\.[0-9]+)(\.html)$/,
				'$1'+now.formatString(modes[i][0]).toLowerCase()+'$3')

		// open the file
		try {
			if (config.browser.isIE) {
				var fsobject = new ActiveXObject("Scripting.FileSystemObject")
				var fileExists  = fsobject.FileExists(specialBackupPath);
				if (fileExists) {
					var fileObject = fsobject.GetFile(specialBackupPath);
					var modDate = new Date(fileObject.DateLastModified).valueOf();
				}
			}
			else {
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
				var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
				file.initWithPath(specialBackupPath);
				var fileExists = file.exists();
				if (fileExists) {
					var modDate = file.lastModifiedTime;
				}
			}
		}
		catch(e) {
			// give up
			return backupPath;
		}

		// expiry is used to tell if it's an 'old' one. Eg, if the month is June and there is a
		// June file on disk that's more than an month old then it must be stale so overwrite
		// note that "latest" should be always written because the expiration period is zero (see above)
		var expiry = new Date(modDate + modes[i][1]);
		if (!fileExists || now > expiry)
			return specialBackupPath;
	}
}

// hijack the core function
window.getBackupPath_mptw_orig = window.getBackupPath;
window.getBackupPath = function(localPath) {
	return getSpecialBackupPath(getBackupPath_mptw_orig(localPath));
}

//}}}
|''URL:''|http://web.archive.org/web/20080613202930/http://tw.lewcid.org/|
|''Author:''|Saq Imtiaz|
/% SPACER
KALENDER
%/{{center{{{big{
<<slider chkShowCalendar [[LilleKalender##calendarMacro]] "kalender" "vis en månedskalender">>}}}}}}/%/%
!calendarMacro
{{normal{
{{center{
<<calendar thismonth>>
<<tag kalendere>>}}}}}}
!end%/
<<tabs txtMainTab "Tidslinie" "Tidslinie" TabTimeline "A - Z" "Alle tiddlere i alfabetisk orden" TabAll "Tags" "Alle tags" TabTags "Manglende" "Manglende tiddlere" TabMoreMissing "Skyggede" "Skyggede tiddlere" TabMoreShadowed>>
/***
|''Name:''|LoadRemoteFileThroughProxy (previous LoadRemoteFileHijack)|
|''Description:''|When the TiddlyWiki file is located on the web (view over http) the content of [[SiteProxy]] tiddler is added in front of the file url. If [[SiteProxy]] does not exist "/proxy/" is added. |
|''Version:''|1.1.0|
|''Date:''|mar 17, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#LoadRemoteFileHijack|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
***/
//{{{
version.extensions.LoadRemoteFileThroughProxy = {
 major: 1, minor: 1, revision: 0, 
 date: new Date("mar 17, 2007"), 
 source: "http://tiddlywiki.bidix.info/#LoadRemoteFileThroughProxy"};

if (!window.bidix) window.bidix = {}; // bidix namespace
if (!bidix.core) bidix.core = {};

bidix.core.loadRemoteFile = loadRemoteFile;
loadRemoteFile = function(url,callback,params)
{
 if ((document.location.toString().substr(0,4) == "http") && (url.substr(0,4) == "http")){ 
 url = store.getTiddlerText("SiteProxy", "/proxy/") + url;
 }
 return bidix.core.loadRemoteFile(url,callback,params);
}
//}}}
/***
|''Name:''|LoadRemoteFileThroughProxy (previous LoadRemoteFileHijack)|
|''Description:''|When the TiddlyWiki file is located on the web (view over http) the content of [[SiteProxy]] tiddler is added in front of the file url. If [[SiteProxy]] does not exist "/proxy/" is added. |
|''Version:''|1.1.0|
|''Date:''|mar 17, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#LoadRemoteFileHijack|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
***/
//{{{
version.extensions.LoadRemoteFileThroughProxy = {
 major: 1, minor: 1, revision: 0, 
 date: new Date("mar 17, 2007"), 
 source: "http://tiddlywiki.bidix.info/#LoadRemoteFileThroughProxy"};

if (!window.bidix) window.bidix = {}; // bidix namespace
if (!bidix.core) bidix.core = {};

bidix.core.loadRemoteFile = loadRemoteFile;
loadRemoteFile = function(url,callback,params)
{
 if ((document.location.toString().substr(0,4) == "http") && (url.substr(0,4) == "http")){ 
  url = store.getTiddlerText("SiteProxy", "/proxy/") + url;
 }
 return bidix.core.loadRemoteFile(url,callback,params);
}
//}}}
/***
|Name|LoadTiddlersPlugin|
|Source|http://www.TiddlyTools.com/#LoadTiddlersPlugin|
|Documentation|http://www.TiddlyTools.com/#LoadTiddlersPluginInfo|
|Version|3.7.6|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|macro for automated updates or one-click installations of tiddlers from remote sources|
!!!!!Documentation
>see [[LoadTiddlersPluginInfo]]
!!!!!Configuration
<<<
<<option chkLoadTiddlersShowReport>>after loading tiddlers, automatically display [[ImportedTiddlers]] (if created)
__password-protected server settings //(optional, if needed)//:__
>username: <<option txtRemoteUsername>> password: <<option txtRemotePassword>>
>{{{usage: <<option txtRemoteUsername>> <<option txtRemotePassword>>}}}
>''note: these settings are also used by [[ExternalTiddlersPlugin]] and [[ImportTiddlersPlugin]]''
<<<
!!!!!Revisions
<<<
2009.09.01 [3.7.6] added config.options.chkLoadTiddlersShowReport (default=true)
|please see [[LoadTiddlersPluginInfo]] for additional revision details|
2005.07.20 [1.0.0] Initial Release
<<<
!!!!!Code
***/
//{{{
version.extensions.LoadTiddlersPlugin= {major: 3, minor: 7, revision: 6, date: new Date(2009,9,1)};

if (config.options.chkLoadTiddlersShowReport===undefined)
	config.options.chkLoadTiddlersShowReport=true;

config.macros.loadTiddlers = {
	label: '',
	tip: "add/update tiddlers from '%0'",
	lockedTag: 'noReload',	// if existing tiddler has this tag value, don't overwrite it, even if inbound tiddler is newer
	askMsg: 'Please enter a local path/filename or a remote URL',
	openMsg: 'Opening %0',
	openErrMsg: 'Could not open %0 - error=%1',
	readMsg: 'Read %0 bytes from %1',
	foundMsg: 'Found %0 tiddlers in %1',
	nochangeMsg: "'%0' is up-to-date... skipped.",
	lockedMsg: "'%0' is tagged '%1'... skipped.",
	skippedMsg: 'skipped (cancelled by user)',
	loadedMsg: 'Loaded %0 of %1 tiddlers from %2',
	reportTitle: 'ImportedTiddlers',
	warning: "Warning!!  Processing '%0' as a systemConfig (plugin) tiddler may produce unexpected results! Are you sure you want to proceed?",
	handler: function(place,macroName,params) {
		var label=(params[0] && params[0].substr(0,6)=='label:')?params.shift().substr(6):this.label;
		var tip=(params[0] && params[0].substr(0,7)=='prompt:')?params.shift().substr(7):this.tip;
		var filter='updates';
		if (params[0] && (params[0]=='all' || params[0]=='new' || params[0]=='changes' || params[0]=='updates'
			|| params[0].substr(0,8)=='tiddler:' || params[0].substr(0,4)=='tag:'))
			filter=params.shift();
		var src=params.shift(); if (!src || !src.length) return; // filename is required
		var quiet=(params[0]=='quiet'); if (quiet) params.shift();
		var ask=(params[0]=='confirm'); if (ask) params.shift();
		var force=(params[0]=='force'); if (force) params.shift();
		var init=(params[0]=='init'); if (init) params.shift();
		var nodirty=(params[0]=='nodirty'); if (nodirty) params.shift();
		var norefresh=(params[0]=='norefresh'); if (norefresh) params.shift();
		var noreport=(params[0]=='noreport'); if (noreport) params.shift();
		this.newTags=[]; if (params[0]) this.newTags=params; // any remaining params are used as 'autotags'
		if (label.trim().length) {
			// link triggers load tiddlers from another file/URL and then applies filtering rules to add/replace tiddlers in the store
			createTiddlyButton(place,label.format([src.replace(/%20/g,' ')]),tip.format([src.replace(/%20/g,' ')]), function() {
				if (src=='ask') src=prompt(this.askMsg);
				config.macros.loadTiddlers.loadFile(src,config.macros.loadTiddlers.doImport,{quiet:quiet,ask:ask,filter:filter,force:force,init:init,noreport:noreport});
				return false;
			})
		}
		else {
			// load tiddlers from another file/URL and then apply filtering rules to add/replace tiddlers in the store
			if (src=='ask') src=prompt(this.askMsg);
			config.macros.loadTiddlers.loadFile(src,config.macros.loadTiddlers.doImport,{quiet:quiet,ask:ask,filter:filter,force:force,init:init,nodirty:nodirty,norefresh:norefresh,noreport:noreport});
		}
	},
	loadFile: function(src,callback,params) {
		var quiet=params.quiet;
		if (src==undefined || !src.length) return null; // filename is required
		if (!quiet) clearMessage();
		if (!quiet) displayMessage(this.openMsg.format([src.replace(/%20/g,' ')]));
		// if working locally and src is not a URL, read from local filesystem
		if (document.location.protocol=='file:' && src.substr(0,5)!='http:' && src.substr(0,5)!='file:') {
			var txt=loadFile(src);
			if (!txt) { // file didn't load, might be relative path.. try fixup
				var pathPrefix=document.location.href;  // get current document path and trim off filename
				var slashpos=pathPrefix.lastIndexOf('/'); if (slashpos==-1) slashpos=pathPrefix.lastIndexOf('\\'); 
				if (slashpos!=-1 && slashpos!=pathPrefix.length-1) pathPrefix=pathPrefix.substr(0,slashpos+1);
				src=pathPrefix+src;
				if (pathPrefix.substr(0,5)!='http:') src=getLocalPath(src);
				var txt=loadFile(src);
			}
			if (!txt) { // file still didn't load, report error
				if (!quiet) displayMessage(this.openErrMsg.format([src.replace(/%20/g,' '),'(unknown)']));
			} else {
				if (!quiet) displayMessage(this.readMsg.format([txt.length,src.replace(/%20/g,' ')]));
				if (version.major+version.minor*.1+version.revision*.01!=2.52)
					txt=convertUTF8ToUnicode(txt);
				if (callback) callback(true,params,txt,src,null);
			}
		} else { // use XMLHttpRequest
			doHttp('GET',src,null,null,config.options.txtRemoteUsername,config.options.txtRemotePassword,callback,params,null);
		}
	},
	readTiddlersFromHTML: function(html) {
		// for TW2.2+
		if (TiddlyWiki.prototype.importTiddlyWiki!=undefined) {
			var remoteStore=new TiddlyWiki();
			remoteStore.importTiddlyWiki(html);
			return remoteStore.getTiddlers('title');	
		}
	},
	readTiddlersFromCSV: function(CSV) {
		var remoteStore=new TiddlyWiki();
		var lines=CSV.split('\n'); var names=lines[0].split(','); CSV=lines.join('\n')
		// ENCODE commas and newlines within quoted values
		var comma='!~comma~!'; var commaRE=new RegExp(comma,'g');
		var newline='!~newline~!'; var newlineRE=new RegExp(newline,'g');
		CSV=CSV.replace(/\x22((?:[^\x22]|\x22\x22)*?)\x22/g,
			function(x){ return x.substr(1,x.length-2).replace(/\,/g,comma).replace(/\n/g,newline); });
		// PARSE lines
		var lines=CSV.split('\n');
		for (var i=1; i<lines.length; i++) { if (!lines[i].length) continue;
			var values=lines[i].split(',');
			// DECODE commas, newlines and doubled-quotes within quoted values
			for (var v=0; v<values.length; v++)
				values[v]=values[v].replace(commaRE,',').replace(newlineRE,'\n').replace(/\x22\x22/g,'\x22');
			// EXTRACT tiddler values
			var title=''; var text=''; var tags=[]; var fields={};
			var created=null; var when=new Date(); var who=config.options.txtUserName;
			for (var v=0; v<values.length; v++) { var val=values[v];
				if (names[v]) switch(names[v].toLowerCase()) {
					case 'title':	title=val.replace(/\[\]\|/g,'_'); break;
					case 'created': created=new Date(val); break;
					case 'modified':when=new Date(val); break;
					case 'modifier':who=val; break;
					case 'text':	text=val; break;
					case 'tags':	tags=val.readBracketedList(); break;
					default:	fields[names[v].toLowerCase()]=val; break;
				}
			}
			// CREATE tiddler in temporary store
			if (title.length) remoteStore.saveTiddler(title,title,text,who,when,tags,fields,true,created||when);
		}
		return remoteStore.getTiddlers('title');	
	},
	doImport: function(status,params,html,src,xhr) {
		var cml=config.macros.loadTiddlers; // abbrev
		src=src.split('?')[0]; // strip off "?nocache=..."
		if (!status) {
			displayMessage(cml.openErrMsg.format([src.replace(/%20/g,' '),xhr.status]));
			return false;
		}
		var quiet=params.quiet;
		var ask=params.ask;
		var filter=params.filter;
		var force=params.force;
		var init=params.init;
		var nodirty=params.nodirty;
		var norefresh=params.norefresh;
		var noreport=params.noreport;
		var tiddlers = cml.readTiddlersFromHTML(html);
		if (!tiddlers||!tiddlers.length) tiddlers=cml.readTiddlersFromCSV(html);
		var count=tiddlers?tiddlers.length:0;
		if (!quiet) displayMessage(cml.foundMsg.format([count,src.replace(/%20/g,' ')]));
		var wasDirty=store.isDirty();
		store.suspendNotifications();
		var count=0;
		if (tiddlers) for (var t=0;t<tiddlers.length;t++) {
			var inbound = tiddlers[t];
			var theExisting = store.getTiddler(inbound.title);
			if (inbound.title==cml.reportTitle)
				continue; // skip 'ImportedTiddlers' history from the other document...
			if (theExisting && theExisting.tags.contains(cml.lockedTag)) {
				if (!quiet) displayMessage(cml.lockedMsg.format([theExisting.title,cml.lockedTag]));
				continue; // skip existing tiddler if tagged with 'noReload'
			}
			// apply the all/new/changes/updates filter (if any)
			if (filter && filter!='all') {
				if ((filter=='new') && theExisting) // skip existing tiddlers
					continue;
				if ((filter=='changes') && !theExisting) // skip new tiddlers
					continue;
				if ((filter.substr(0,4)=='tag:') && inbound.tags.indexOf(filter.substr(4))==-1) // must match specific tag value
					continue;
				if ((filter.substr(0,8)=='tiddler:') && inbound.title!=filter.substr(8)) // must match specific tiddler name
					continue;
				if (!force && store.tiddlerExists(inbound.title) && ((theExisting.modified.getTime()-inbound.modified.getTime())>=0)) {
					var msg=cml.nochangeMsg;
					if (!quiet&&msg.length) displayMessage(msg.format([inbound.title]));
					continue;
				}
			}
			// get confirmation if required
			if (ask && !confirm((theExisting?'Update':'Add')+" tiddler '"+inbound.title+"'\nfrom "+src.replace(/%20/g,' ')+'\n\nOK to proceed?'))
				{ tiddlers[t].status=cml.skippedMsg; continue; }
			// DO IT!
			var tags=new Array().concat(inbound.tags,cml.newTags);
	                store.saveTiddler(inbound.title, inbound.title, inbound.text, inbound.modifier, inbound.modified, tags, inbound.fields, true, inbound.created);
	                store.fetchTiddler(inbound.title).created = inbound.created; // force creation date to imported value - needed for TW2.1.3 or earlier
			tiddlers[t].status=theExisting?'updated':'added'
			if (init && tags.contains('systemConfig') && !tags.contains('systemConfigDisable')) {
				var ok=true;
				if (ask||!quiet) ok=confirm(cml.warning.format([inbound.title]))
				if (ok) { // run the plugin
					try { window.eval(inbound.text); tiddlers[t].status+=' (plugin initialized)'; }
					catch(ex) { displayMessage(config.messages.pluginError.format([exceptionText(ex)])); }
				}
			}
			count++;
		}
		store.resumeNotifications();
		if (count) {
			// optionally: set/clear 'unsaved changes' flag, refresh page display, and generate a report
			store.setDirty(wasDirty||!nodirty);
			if (!norefresh) {
				story.forEachTiddler(function(t,e){if(!story.isDirty(t))story.refreshTiddler(t,null,true)});
				store.notifyAll();
			}
			if (!noreport) cml.report(src,tiddlers,count,quiet);
		}
		// always show final message when tiddlers were actually loaded
		if (!quiet||count) displayMessage(cml.loadedMsg.format([count,tiddlers.length,src.replace(/%20/g,' ')]));
	},
	showReport: true,
	report: function(src,tiddlers,count,quiet) {
		var cml=config.macros.loadTiddlers; // abbrev
		// format the new report content
		var newText = 'On '+(new Date()).toLocaleString()+', ';
		newText += config.options.txtUserName+' loaded '+count+' tiddlers ';
		newText += 'from\n[['+src+'|'+src+']]:\n';
		newText += '<<<\n';
		for (var t=0; t<tiddlers.length; t++)
			if (tiddlers[t].status)
				newText += '#[['+tiddlers[t].title+']] - '+tiddlers[t].status+'\n';
		newText += '<<<\n';
		var title=cml.reportTitle;
		var currText='';
		var t=store.getTiddler(title);
		if (t) currText=(t.text.length?'\n----\n':'')+t.text;
		store.saveTiddler(title, title, newText+currText,
			config.options.txtUserName, new Date(),	t?t.tags:null, t?t.fields:null);
		if (!quiet) {
			if (config.options.chkLoadTiddlersShowReport)
				story.displayTiddler(null,title);
			story.refreshTiddler(title,null,true);
		}
	}
}
//}}}
{{desk{
|widetable|k
|width:50%;font-size:16px; [[Lektier|fag]] <<newTiddler label:"+" title:"ny næste handling" prompt:"opret en ny næste handling" focus:title tag:#næste>>[[næste|#næste]] [[handlinger|handling]]((*({{popBtn{<<tiddler handling>>}}}))) |font-size:16px; <<newTiddler label:"+" title:"ny påmindelse" prompt:"opret en ny påmindelse" focus:title tag:påmindelse text:{{var d=new Date();'<<reminder år:%0 month:%1 day:%2 title:"påmindelsestitel">\>'.format([d.getFullYear(),String.zeroPad(d.getMonth()+1,2),String.zeroPad(d.getMonth(),2)]);}}>>[[Denne uges |Næste uges skema]][[påmindelser|påmindelse]]((*(<<tiddler påmindelse##info>>))) |h
|height:20px;background-color:#eee;{{deskNew{<<newTiddler label:"+" title:"handling sat i kø" prompt:"opret en ny handling, der er sat i kø" focus:title tag:#kø>><<tag #kø>><<rB kø>><<newTiddler label:"+" title:"ny ventende handling" prompt:"opret en ny ventende handling" focus:title tag:#venter>><<tag #venter>><<rB venter>><<newTiddler label:"+" title:"ny fremtidig handling" prompt:"opret en ny fremtidig handling" focus:title tag:#fremtid>><<tag #fremtid>><<rB fremtid>><<tag #færdig>><<rB færdig>>}}}|padding-left:0.7em;{{block{<<showReminders leadtime:-3...7>>}}} |
|padding:1px;{{center {((Næste handling:(<<tiddler [[#næste]]>>)))}}}{{block{<<tiddlerList tags:"#næste" order:"-modified" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' '#næste'$))|\n"  header:"|noborder|k">>}}}{{center {((__Lektier:__(<<tiddler [[LektieOversigt]]>>)))}}}{{block{<<tiddlerList tags:"lektie" order:"-modified" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' 'lektie'$))|\n"  header:"|noborder|k">>}}} |~|
|font-size:16px; <<newTiddler label:"+" title:"nyt igangværende projekt" prompt:"opret et nyt igangværende projekt" focus:title tag:$igang>>[[igangværende|$igang]] [[projekter|projekt]]((*({{popBtn{<<tiddler projekt>>}}}))) |font-size:16px; <<newTiddler label:"+" title:"ny stjernemarkeret tiddler" prompt:"opret en ny stjernemarkeret tiddler" focus:title tag:stjerne>>[[stjernemarkerede tiddlere|stjerne]]((*(<<tiddler stjerne>>))) |h
|height:20px;background-color:#eee;{{deskNew{<<newTiddler label:"+" title:"nyt engang projekt" prompt:"opret et nyt engang projekt" focus:title tag:$engang>><<tag $engang>><<rB engang>><<newTiddler label:"+" title:"nyt måske projekt" prompt:"opret et nyt måske projekt" focus:title tag:$måske>><<tag $måske>><<rB måske>><<tag $afsluttet>><<rB afsluttet>>}}}|padding:1px;{{block{<<tiddlerList tags:"stjerne" order:"-modified" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' 'stjerne'$))|\n"  header:"|noborder|k">>}}} |
|padding:1px;{{block{<<tiddlerList tags:"$igang"  order:"-modified" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' '$igangværende'$))|\n"  header:"|noborder|k">>}}}|~|

<html><div style="width:80px;float:left;text-align:right;margin:0px 10px;">Andre:</div></html>{{view{((_*(<<tiddler sammenhæng>>)))<<tag sammenhæng>><<rB sammenhænge>>}}}{{view{((_*(<<tiddler kontakt>>)))<<tag kontakt>><<rB kontakter>>}}}{{view{((_*(<<tiddler område>>)))<<tag område>><<rB områder>>}}}{{view{((_*(<<tiddler rige>>)))<<tag rige>><<rB riger>>}}}{{view{((_*(<<tiddler trin##info>>)))<<tag trin>><<rB trin>>}}}{{view{((_*(<<tiddler prioritet>>)))<<tag prioritet>><<rB prioriteter>>}}}{{view{<<popup 'flere værktøj...' [[<<tiddler topMenuR##options$))]]>>}}}
![[Seneste artikler|journal]]
<<tiddlerList tags:"journal" top:"5" dateFormat:"mmm. 0DD" itemTemplate:"*[[%created - %title|%title]] \n" order:"-created">>
}}}
<<forEachTiddler
 where
 'tiddler.tags.contains("lektie") && tiddler.text.contains("reminder")&& tiddler.fields["tt_user"] && tiddler.fields["tt_user"].contains(context.viewerTiddler.title)'
sortBy 
 'tiddler.fields["title"]'
write
'"*[["+tiddler.title+"]] fag:[["+tiddler.fields["tt_alias"]+"]]\n"' 
>>
|''URL:''|http://mptw.tiddlyspot.com/|
|''Author:''|~SimonBaird|
{{groupbox rollover black{<<tiddler NewsManager>>}}}{{center black{+++[Menu]...<<tiddler HovedMenuLektier>>===[[Download|http://udtalelser.tiddlyspot.com/download]]}}}
[img(100%+,auto)[gelogo05-1b.png]]
/%<script>
var out='',s,t,tags=[],tids=[],ti,tgt,tpl;
var templates={
	contact:'contact template'
}
tags=store.getTiddlerText('x-tagger config##Tags').readBracketedList();
for(t=0;t<tags.length;t++){
	ti=tags[t];tgt=tids.contains(ti)?[]:store.getTaggedTiddlers(ti);
	if(tgt.length==0)tags.splice(t,1);//takes out subitems of toplevel ones, e.g. $active projects
	else for(var s=0;s<tgt.length;s++)tids.pushUnique(tgt[s].title);
}
for(t=0;t<tags.length;t++){
	ti=tags[t];tids=store.getTaggedTiddlers(ti);
	out+="*"+(tids[0]?' '+tids[0].title.substr(0,1)+' ':'')+ti+"\n";
	tpl=templates[ti]?store.getTiddlerText(templates[ti]):'';
	for(s=0;s<tids.length;s++){
		ti=tids[s].title;
		out+="**"+tbGTD.nu(ti,tpl)+"<<tag "+ti+">>\n";
	}
}
return out;
</script>
<<accordion>>
/%do all you want, but please be so kind as to leave the link to http://tbGTD.tiddlyspot.com in here%/
<html>
	<a class="noCopy" href="javascript:story.displayTiddler(null,'tweet');" title="post på twitter" style="clear:both;display:block;width:20%;padding:0 2%;float:left;text-align:center;">+</a>
	<a class="noCopy" href="javascript:story.displayTiddler(null,'my tweets');" title="se mine twitter posteringer" style="width:70%;padding:0 3%;float:right;">mine tweets</a>
	<div id="atBUTTON" style="clear:both;text-align:center;margin:0;padding:0;"><a href="http://www.addthis.com/bookmark.php?v=250&url=http://lektiebog.tiddlyspot.com&pub=Lektier&title=Lektier&desc=Et%20TiddlyWiki%20baseret%20system%20&%20Lektie%20Things%20bog" class="addthis_button noCopy" target="_blank">del</a></div>
<a class="noCopy" href="http://lektiebog.tiddlyspot.com" title="gå til den originale lektiebog" style="display:block;width:40%;padding:0 2% 0 0;float:left;text-align:center;" target="_blank">Lektier</a>
<a class="noCopy lang" href="http://tbGTD-deutsch.tiddlyspot.com" title="zur deutschen Version / Den tyske original" target="_parent"> original</a>
</html><<tiddler {{
if (!story.findContainingTiddler(place)){
addthis_localize={share_caption:"bogmærk & del"};
if(!window.atREFRESH)window.atREFRESH=function(){
var b=document.getElementById('atBUTTON');if(!b)return;
removeChildren(b);
b=createTiddlyElement(b,'a',null,'addthis_button noCopy','del');
b.title='del Lektier';
b.setAttribute('target','_blank');
b.setAttribute('href','http://www.addthis.com/bookmark.php?v=250&amp;url=http://lektiebog.tiddlyspot.com&amp;pub=Lektier&amp;title=Lektier');
b.setAttribute('addthis:url',window.location);
b.setAttribute('addthis:title',document.title);
b.setAttribute('addthis:description','Et TiddlyWiki baseret system til at få tingene gjort');
if(window.addthis)addthis.button('#atBUTTON',{
	ui_offset_top: 3,
	ui_offset_left: 3,
	ui_delay:400,
	ui_language:'en',
	ui_cobrand:'<a href="http://www.addthis.com" target="_blank" title="social bookmarking, powered by AddThis.com">?</a>'},{});
}
window.atREFRESH();
var tmp=document.getElementById('atff');//fix container bug at top
if(tmp&&tmp.parentNode.childNodes[0]==tmp)tmp.parentNode.style.display='none';
}'';}}>>%/
<!--{{{-->
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pub=beertobias"></script>
<!--}}}-->
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
<!--{{{-->
<link rel="shortcut icon" href="./gelogo05-1b.png"><style type="text/css">body {background:black;}#contentWrapper {display:none;}</style><div id="SplashScreen" style="display: block; text-align: center; width: 500px; margin: 100px auto; padding: 20px 30px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#333;color:#FFF;border: 2px solid #ddd;-moz-border-radius:5px; -webkit-border-radius:5px;"><img src="./gelogo05-1b.png" style="vertical-align:middle;margin:20px;" alt="Vent venligst." title="Vent venligst."><b>Udtalelser</b> hentes<span style="text-decoration: blink;">...</span><br/><span style="font-size: 14px; color:#FDD;">virker bedst med FireFox eller Chrome</span></div>
<!--}}}-->
//{{{
config.options.txtFadeTimer = 5000; // 5 seconds 

window.displayMessage=function(text,linkText,fadeTimer) { 
        var e = getMessageDiv(); 
        if(!e) { 
                alert(text); 
                return; 
        } 
        if(linkText) { 
                var link = createTiddlyElement(e,"a",null,null,text); 
                link.href = linkText; 
                link.target = "_blank"; 
        } else { 
                e.appendChild(document.createTextNode(text)); 
        } 
        if(config.options.txtFadeTimer > 0) { 
                setTimeout(clearMessage, config.options.txtFadeTimer); 
        } 
}
//}}}
/%
!info
|Name|MicroCalc|
|Source|http://www.TiddlyTools.com/#MicroCalc|
|Version|2.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|simple calculator using javascript eval() function|
Usage
<<<
{{{
<<tiddler MicroCalc>>
<<tiddler MicroCalc with: width>>
*''width'' (optional) is a CSS measurement (default=auto)
}}}
<<<
Example
>{{{<<tiddler MicroCalc with: 300px>>}}}
><<tiddler MicroCalc##show with: 300px>>
!end
!show
<html><nowiki>
<form action="javascript:;" style="width:$1;display:block;white-space:nowrap;margin:0;padding:0;"><!--
--><input name="input" value="0" style="width:70%;text-align:right;"
	title="INPUT: enter a JavaScript expression, function, or object/variable name"
	onfocus="this.select()"
	onkeyup="if (event.keyCode==13) {this.form.go.click(); return false;}"><!--
--><input name="go" type="button" value="=" style="width:10%"
	title="CALCULATE: evaluate input and display results"
	onclick="var i=this.form.input; var o=this.form.output; var val=i.value; var res='';
		try{res=eval(val);i.value=res}catch(e){res=e.description||e.toString()};
		o.value+=(o.value.length?'\n':'')+val+'\n='+res;
		o.style.display='block'; o.scrollTop=o.scrollHeight;
		i.select();i.focus();"><!--
--><input name="memstore" type="button" value="m" style="width:10%"
	title="MEMORY STORE: save input to temporary memory"
	onclick="var f=this.form; f.memory.value=f.input.value;
		f.memory.parentNode.style.display='block'"><!--
--><input name="clear" type="button" value="c" style="width:10%" 
	title="CLEAR: erase history and reset input"
	onclick="var i=this.form.input; var o=this.form.output;
		o.value='';o.style.display='none';
		i.value='0';i.select();i.focus();"><!--
--><div style="display:none"><!--
--><input name="memory" value="0" style="width:70%;text-align:right;"
	title="MEMORY: temporarily store input during calculations"><!--
--><input name="meminsert" type="button" value="mi" style="width:10%"
	title="MEMORY INSERT: append memory value to current input"
	onclick="var i=this.form.input;
		i.value+=this.form.memory.value; i.select();i.focus();"><!--
--><input name="memrecall" type="button" value="mr" style="width:10%"
	title="MEMORY RECALL: replace current input with memory value "
	onclick="var i=this.form.input;
		i.value=this.form.memory.value; i.select();i.focus();"><!--
--><input name="memclear" type="button" value="mc" style="width:10%"
	title="MEMORY CLEAR: clear temporary memory"
	onclick="var f=this.form; f.memory.value='0';
		f.memory.parentNode.style.display='none';
		f.input.select();f.input.focus();"><!--
--></div><!--
--><textarea name="output" rows=5 style="width:99%;display:none;text-align:right;"
	title="HISTORY: previous inputs and calculated results"></textarea><!--
--></form></html>
!end
%/<<tiddler {{tiddler&&tiddler.title=='MicroCalc'?'MicroCalc##info':'MicroCalc##show'}}
	with: {{'$1'!='$'+'1'?'$1':'auto'}}>>
+++[calc]...
<<tiddler MicroCalc with: 300px>>
===

/***
|!''Name:''|!''N.E.W.S.''|
|''Description:''|this plugin ensure that tiddlers with the chosen tag that were modified since your last visit are displayed.<br>it also lists the tiddlers it manages as new or archived in a new shadowTiddler called [[NewsManager]]|
|''Version:''|0.2.0|
|''Date:''|22/03/2007|
|''Source:''|http://yann.perrin.googlepages.com/twkd.html#N.E.W.S.|
|''Author:''|[[Yann Perrin|YannPerrin]]|
|''License:''|[[BSD open source license]]|
|''~CoreVersion:''|2.x|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
***/
//{{{
if (!window.TWkd) window.TWkd={context:{}};
if (!TWkd.News) TWkd.News = {
	tag:"journal",
	noNews:"No news since your last visit",
	noArchive:"Nothing archived yet",
	restart:window.restart,
	choose:function () {
			var defaultTiddlers = store.getTaggedTiddlers(this.tag,"modified");
			var actualNews = [];
			var archived =[]
			for (var t in defaultTiddlers) {
				var modifDate = defaultTiddlers[t].modified ? defaultTiddlers[t].modified.convertToYYYYMMDDHHMM() : "0";
				if (defaultTiddlers[t].title != undefined)  {
					if  ((config.options.txtLastVisit==undefined)||(config.options.txtLastVisit < modifDate)) {
						actualNews.push("[["+defaultTiddlers[t].title+"]]");
					} else {
						archived.push("[["+defaultTiddlers[t].title+"]]");
					}
				}
			}
			config.shadowTiddlers.News = actualNews.length ? actualNews.reverse().join("\n") : this.noNews;
			config.shadowTiddlers.Archive = archived.length ? archived.reverse().join("\n") : this.noArchive;
			config.shadowTiddlers.NewsManager ="!News <<newJournal 'DD MMM YYYY' label:'+' tag:'"+this.tag+"'>>\n<<tiddler News>>\n!Archive\n<<tiddler Archive>>";
		},
	display:function () {
			invokeParamifier(params,"onstart");
			if(window.story.isEmpty()) {
				if ((config.options.txtLastVisit != undefined)&&(config.shadowTiddlers.News!=this.noNews)) {
					var defaultParams = config.shadowTiddlers.News.parseParams("open",null,false);
					invokeParamifier(defaultParams,"onstart");
				}
			}
			store.notifyAll();
		},
	update:function () {
			config.options.txtLastVisit = new Date().convertToYYYYMMDDHHMM();
			saveOptionCookie("txtLastVisit");
		}
}
window.restart = function() {
	TWkd.News.choose();
	TWkd.News.display();
	TWkd.News.update();
	TWkd.News.restart();
}
//}}}
//{{{
TWkd.News.noNews = "Ingen journaler er blevet ændret siden dit sidste besøg";
TWkd.News.noArchive ="Ingen journaler er blevet arkiveret endnu";
//}}}
/***
|Name|NestedSlidersPlugin|
|Source|http://www.TiddlyTools.com/#NestedSlidersPlugin|
|Documentation|http://www.TiddlyTools.com/#NestedSlidersPluginInfo|
|Version|2.4.9|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Options|##Configuration|
|Description|show content in nest-able sliding/floating panels, without creating separate tiddlers for each panel's content|
!!!!!Documentation
>see [[NestedSlidersPluginInfo]]
!!!!!Configuration
<<<
<<option chkFloatingSlidersAnimate>> allow floating sliders to animate when opening/closing
>Note: This setting can cause 'clipping' problems in some versions of InternetExplorer.
>In addition, for floating slider animation to occur you must also allow animation in general (see [[AdvancedOptions]]).
<<<
!!!!!Revisions
<<<
2008.11.15 - 2.4.9 in adjustNestedSlider(), don't make adjustments if panel is marked as 'undocked' (CSS class).  In onClickNestedSlider(), SHIFT-CLICK docks panel (see [[MoveablePanelPlugin]])
|please see [[NestedSlidersPluginInfo]] for additional revision details|
2005.11.03 - 1.0.0 initial public release.  Thanks to RodneyGomes, GeoffSlocock, and PaulPetterson for suggestions and experiments.
<<<
!!!!!Code
***/
//{{{
version.extensions.NestedSlidersPlugin= {major: 2, minor: 4, revision: 9, date: new Date(2008,11,15)};

// options for deferred rendering of sliders that are not initially displayed
if (config.options.chkFloatingSlidersAnimate===undefined)
	config.options.chkFloatingSlidersAnimate=false; // avoid clipping problems in IE

// default styles for 'floating' class
setStylesheet(".floatingPanel { position:absolute; z-index:10; padding:0.5em; margin:0em; \
	background-color:#eee; color:#000; border:1px solid #000; text-align:left; }","floatingPanelStylesheet");

// if removeCookie() function is not defined by TW core, define it here.
if (window.removeCookie===undefined) {
	window.removeCookie=function(name) {
		document.cookie = name+'=; expires=Thu, 01-Jan-1970 00:00:01 UTC; path=/;'; 
	}
}

config.formatters.push( {
	name: "nestedSliders",
	match: "\\n?\\+{3}",
	terminator: "\\s*\\={3}\\n?",
	lookahead: "\\n?\\+{3}(\\+)?(\\([^\\)]*\\))?(\\!*)?(\\^(?:[^\\^\\*\\@\\[\\>]*\\^)?)?(\\*)?(\\@)?(?:\\{\\{([\\w]+[\\s\\w]*)\\{)?(\\[[^\\]]*\\])?(\\[[^\\]]*\\])?(?:\\}{3})?(\\#[^:]*\\:)?(\\>)?(\\.\\.\\.)?\\s*",
	handler: function(w)
		{
			lookaheadRegExp = new RegExp(this.lookahead,"mg");
			lookaheadRegExp.lastIndex = w.matchStart;
			var lookaheadMatch = lookaheadRegExp.exec(w.source)
			if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
			{
				var defopen=lookaheadMatch[1];
				var cookiename=lookaheadMatch[2];
				var header=lookaheadMatch[3];
				var panelwidth=lookaheadMatch[4];
				var transient=lookaheadMatch[5];
				var hover=lookaheadMatch[6];
				var buttonClass=lookaheadMatch[7];
				var label=lookaheadMatch[8];
				var openlabel=lookaheadMatch[9];
				var panelID=lookaheadMatch[10];
				var blockquote=lookaheadMatch[11];
				var deferred=lookaheadMatch[12];

				// location for rendering button and panel
				var place=w.output;

				// default to closed, no cookie, no accesskey, no alternate text/tip
				var show="none"; var cookie=""; var key="";
				var closedtext=">"; var closedtip="";
				var openedtext="<"; var openedtip="";

				// extra "+", default to open
				if (defopen) show="block";

				// cookie, use saved open/closed state
				if (cookiename) {
					cookie=cookiename.trim().slice(1,-1);
					cookie="chkSlider"+cookie;
					if (config.options[cookie]==undefined)
						{ config.options[cookie] = (show=="block") }
					show=config.options[cookie]?"block":"none";
				}

				// parse label/tooltip/accesskey: [label=X|tooltip]
				if (label) {
					var parts=label.trim().slice(1,-1).split("|");
					closedtext=parts.shift();
					if (closedtext.substr(closedtext.length-2,1)=="=")	
						{ key=closedtext.substr(closedtext.length-1,1); closedtext=closedtext.slice(0,-2); }
					openedtext=closedtext;
					if (parts.length) closedtip=openedtip=parts.join("|");
					else { closedtip="vis "+closedtext; openedtip="skjul "+closedtext; }
				}

				// parse alternate label/tooltip: [label|tooltip]
				if (openlabel) {
					var parts=openlabel.trim().slice(1,-1).split("|");
					openedtext=parts.shift();
					if (parts.length) openedtip=parts.join("|");
					else openedtip="hide "+openedtext;
				}

				var title=show=='block'?openedtext:closedtext;
				var tooltip=show=='block'?openedtip:closedtip;

				// create the button
				if (header) { // use "Hn" header format instead of button/link
					var lvl=(header.length>5)?5:header.length;
					var btn = createTiddlyElement(createTiddlyElement(place,"h"+lvl,null,null,null),"a",null,buttonClass,title);
					btn.onclick=onClickNestedSlider;
					btn.setAttribute("href","javascript:;");
					btn.setAttribute("title",tooltip);
				}
				else
					var btn = createTiddlyButton(place,title,tooltip,onClickNestedSlider,buttonClass);
				btn.innerHTML=title; // enables use of HTML entities in label

				// set extra button attributes
				btn.setAttribute("closedtext",closedtext);
				btn.setAttribute("closedtip",closedtip);
				btn.setAttribute("openedtext",openedtext);
				btn.setAttribute("openedtip",openedtip);
				btn.sliderCookie = cookie; // save the cookiename (if any) in the button object
				btn.defOpen=defopen!=null; // save default open/closed state (boolean)
				btn.keyparam=key; // save the access key letter ("" if none)
				if (key.length) {
					btn.setAttribute("accessKey",key); // init access key
					btn.onfocus=function(){this.setAttribute("accessKey",this.keyparam);}; // **reclaim** access key on focus
				}
				btn.setAttribute("hover",hover?"true":"false");
				btn.onmouseover=function(ev) {
					// optional 'open on hover' handling
					if (this.getAttribute("hover")=="true" && this.sliderPanel.style.display=='none') {
						document.onclick.call(document,ev); // close transients
						onClickNestedSlider(ev); // open this slider
					}
					// mouseover on button aligns floater position with button
					if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this,this.sliderPanel);
				}

				// create slider panel
				var panelClass=panelwidth?"floatingPanel":"sliderPanel";
				if (panelID) panelID=panelID.slice(1,-1); // trim off delimiters
				var panel=createTiddlyElement(place,"div",panelID,panelClass,null);
				panel.button = btn; // so the slider panel know which button it belongs to
				btn.sliderPanel=panel; // so the button knows which slider panel it belongs to
				panel.defaultPanelWidth=(panelwidth && panelwidth.length>2)?panelwidth.slice(1,-1):"";
				panel.setAttribute("transient",transient=="*"?"true":"false");
				panel.style.display = show;
				panel.style.width=panel.defaultPanelWidth;
				panel.onmouseover=function(event) // mouseover on panel aligns floater position with button
					{ if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this.button,this); }

				// render slider (or defer until shown) 
				w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
				if ((show=="block")||!deferred) {
					// render now if panel is supposed to be shown or NOT deferred rendering
					w.subWikify(blockquote?createTiddlyElement(panel,"blockquote"):panel,this.terminator);
					// align floater position with button
					if (window.adjustSliderPos) window.adjustSliderPos(place,btn,panel);
				}
				else {
					var src = w.source.substr(w.nextMatch);
					var endpos=findMatchingDelimiter(src,"+++","===");
					panel.setAttribute("raw",src.substr(0,endpos));
					panel.setAttribute("blockquote",blockquote?"true":"false");
					panel.setAttribute("rendered","false");
					w.nextMatch += endpos+3;
					if (w.source.substr(w.nextMatch,1)=="\n") w.nextMatch++;
				}
			}
		}
	}
)

function findMatchingDelimiter(src,starttext,endtext) {
	var startpos = 0;
	var endpos = src.indexOf(endtext);
	// check for nested delimiters
	while (src.substring(startpos,endpos-1).indexOf(starttext)!=-1) {
		// count number of nested 'starts'
		var startcount=0;
		var temp = src.substring(startpos,endpos-1);
		var pos=temp.indexOf(starttext);
		while (pos!=-1)  { startcount++; pos=temp.indexOf(starttext,pos+starttext.length); }
		// set up to check for additional 'starts' after adjusting endpos
		startpos=endpos+endtext.length;
		// find endpos for corresponding number of matching 'ends'
		while (startcount && endpos!=-1) {
			endpos = src.indexOf(endtext,endpos+endtext.length);
			startcount--;
		}
	}
	return (endpos==-1)?src.length:endpos;
}
//}}}
//{{{
window.onClickNestedSlider=function(e)
{
	if (!e) var e = window.event;
	var theTarget = resolveTarget(e);
	while (theTarget && theTarget.sliderPanel==undefined) theTarget=theTarget.parentNode;
	if (!theTarget) return false;
	var theSlider = theTarget.sliderPanel;
	var isOpen = theSlider.style.display!="none";

	// if SHIFT-CLICK, dock panel first (see [[MoveablePanelPlugin]])
	if (e.shiftKey && config.macros.moveablePanel) config.macros.moveablePanel.dock(theSlider,e);

	// toggle label
	theTarget.innerHTML=isOpen?theTarget.getAttribute("closedText"):theTarget.getAttribute("openedText");
	// toggle tooltip
	theTarget.setAttribute("title",isOpen?theTarget.getAttribute("closedTip"):theTarget.getAttribute("openedTip"));

	// deferred rendering (if needed)
	if (theSlider.getAttribute("rendered")=="false") {
		var place=theSlider;
		if (theSlider.getAttribute("blockquote")=="true")
			place=createTiddlyElement(place,"blockquote");
		wikify(theSlider.getAttribute("raw"),place);
		theSlider.setAttribute("rendered","true");
	}

	// show/hide the slider
	if(config.options.chkAnimate && (!hasClass(theSlider,'floatingPanel') || config.options.chkFloatingSlidersAnimate))
		anim.startAnimating(new Slider(theSlider,!isOpen,e.shiftKey || e.altKey,"none"));
	else
		theSlider.style.display = isOpen ? "none" : "block";

	// reset to default width (might have been changed via plugin code)
	theSlider.style.width=theSlider.defaultPanelWidth;

	// align floater panel position with target button
	if (!isOpen && window.adjustSliderPos) window.adjustSliderPos(theSlider.parentNode,theTarget,theSlider);

	// if showing panel, set focus to first 'focus-able' element in panel
	if (theSlider.style.display!="none") {
		var ctrls=theSlider.getElementsByTagName("*");
		for (var c=0; c<ctrls.length; c++) {
			var t=ctrls[c].tagName.toLowerCase();
			if ((t=="input" && ctrls[c].type!="hidden") || t=="textarea" || t=="select")
				{ try{ ctrls[c].focus(); } catch(err){;} break; }
		}
	}
	var cookie=theTarget.sliderCookie;
	if (cookie && cookie.length) {
		config.options[cookie]=!isOpen;
		if (config.options[cookie]!=theTarget.defOpen) window.saveOptionCookie(cookie);
		else window.removeCookie(cookie); // remove cookie if slider is in default display state
	}

	// prevent SHIFT-CLICK from being processed by browser (opens blank window... yuck!)
	// prevent clicks *within* a slider button from being processed by browser
	// but allow plain click to bubble up to page background (to close transients, if any)
	if (e.shiftKey || theTarget!=resolveTarget(e))
		{ e.cancelBubble=true; if (e.stopPropagation) e.stopPropagation(); }
	Popup.remove(); // close open popup (if any)
	return false;
}
//}}}
//{{{
// click in document background closes transient panels 
document.nestedSliders_savedOnClick=document.onclick;
document.onclick=function(ev) { if (!ev) var ev=window.event; var target=resolveTarget(ev);

	if (document.nestedSliders_savedOnClick)
		var retval=document.nestedSliders_savedOnClick.apply(this,arguments);
	// if click was inside a popup... leave transient panels alone
	var p=target; while (p) if (hasClass(p,"popup")) break; else p=p.parentNode;
	if (p) return retval;
	// if click was inside transient panel (or something contained by a transient panel), leave it alone
	var p=target; while (p) {
		if ((hasClass(p,"floatingPanel")||hasClass(p,"sliderPanel"))&&p.getAttribute("transient")=="true") break;
		p=p.parentNode;
	}
	if (p) return retval;
	// otherwise, find and close all transient panels...
	var all=document.all?document.all:document.getElementsByTagName("DIV");
	for (var i=0; i<all.length; i++) {
		 // if it is not a transient panel, or the click was on the button that opened this panel, don't close it.
		if (all[i].getAttribute("transient")!="true" || all[i].button==target) continue;
		// otherwise, if the panel is currently visible, close it by clicking it's button
		if (all[i].style.display!="none") window.onClickNestedSlider({target:all[i].button})
		if (!hasClass(all[i],"floatingPanel")&&!hasClass(all[i],"sliderPanel")) all[i].style.display="none";
	}
	return retval;
};
//}}}
//{{{
// adjust floating panel position based on button position
if (window.adjustSliderPos==undefined) window.adjustSliderPos=function(place,btn,panel) {
	if (hasClass(panel,"floatingPanel") && !hasClass(panel,"undocked")) {
		// see [[MoveablePanelPlugin]] for use of 'undocked'
		var rightEdge=document.body.offsetWidth-1;
		var panelWidth=panel.offsetWidth;
		var left=0;
		var top=btn.offsetHeight; 
		if (place.style.position=="relative" && findPosX(btn)+panelWidth>rightEdge) {
			left-=findPosX(btn)+panelWidth-rightEdge; // shift panel relative to button
			if (findPosX(btn)+left<0) left=-findPosX(btn); // stay within left edge
		}
		if (place.style.position!="relative") {
			var left=findPosX(btn);
			var top=findPosY(btn)+btn.offsetHeight;
			var p=place; while (p && !hasClass(p,'floatingPanel')) p=p.parentNode;
			if (p) { left-=findPosX(p); top-=findPosY(p); }
			if (left+panelWidth>rightEdge) left=rightEdge-panelWidth;
			if (left<0) left=0;
		}
		panel.style.left=left+"px"; panel.style.top=top+"px";
	}
}
//}}}
//{{{
// TW2.1 and earlier:
// hijack Slider stop handler so overflow is visible after animation has completed
Slider.prototype.coreStop = Slider.prototype.stop;
Slider.prototype.stop = function()
	{ this.coreStop.apply(this,arguments); this.element.style.overflow = "visible"; }

// TW2.2+
// hijack Morpher stop handler so sliderPanel/floatingPanel overflow is visible after animation has completed
if (version.major+.1*version.minor+.01*version.revision>=2.2) {
	Morpher.prototype.coreStop = Morpher.prototype.stop;
	Morpher.prototype.stop = function() {
		this.coreStop.apply(this,arguments);
		var e=this.element;
		if (hasClass(e,"sliderPanel")||hasClass(e,"floatingPanel")) {
			// adjust panel overflow and position after animation
			e.style.overflow = "visible";
			if (window.adjustSliderPos) window.adjustSliderPos(e.parentNode,e.button,e);
		}
	};
}
//}}}
<script>
a=function(a,b){return arguments[0]+arguments[1];}('foo','bar');
alert(a('x'));
</script>
/***
|Name:|NewHerePlugin|
|Description:|Creates the new here and new journal macros|
|Version:|3.0 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#NewHerePlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.macros, {
	newHere: {
		handler: function(place,macroName,params,wikifier,paramString,tiddler) {
			wikify("<<newTiddler "+paramString+" tag:[["+tiddler.title+"]] prompt:'Opret en ny tiddler der tagger denne tiddler'>>",place,null,tiddler);
		}
	},
	newJournalHere: {
		handler: function(place,macroName,params,wikifier,paramString,tiddler) {
			wikify("<<newJournal "+paramString+" label:'journal' tag:journal tag:[["+tiddler.title+"]] prompt:'Opret en ny journal der tagger denne tiddler'>>",place,null,tiddler);
		}
	}
});

//}}}
/***
|Name:|NewMeansNewPlugin|
|Description:|If 'New Tiddler' already exists then create 'New Tiddler (1)' and so on|
|Version:|1.1 ($Rev: 2263 $)|
|Date:|$Date: 2007-06-13 04:22:32 +1000 (Wed, 13 Jun 2007) $|
|Source:|http://mptw.tiddlyspot.com/empty.html#NewMeansNewPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Note: I think this should be in the core
***/
//{{{

String.prototype.getNextFreeName = function() {
       var numberRegExp = / \(([0-9]+)\)$/;
       var match = numberRegExp.exec(this);
       if (match) {
               var num = parseInt(match[1]) + 1;
               return this.replace(numberRegExp," ("+num+")");
       }
       else {
               return this + " (1)";
       }
}

config.macros.newTiddler.checkForUnsaved = function(newName) {
	var r = false;
	story.forEachTiddler(function(title,element) {
		if (title == newName)
			r = true;
	});
	return r;
}

config.macros.newTiddler.getName = function(newName) {
       while (store.getTiddler(newName) || config.macros.newTiddler.checkForUnsaved(newName))
               newName = newName.getNextFreeName();
       return newName;
}


config.macros.newTiddler.onClickNewTiddler = function()
{
	var title = this.getAttribute("newTitle");
	if(this.getAttribute("isJournal") == "true") {
		var now = new Date();
		title = now.formatString(title.trim());
	}

	title = config.macros.newTiddler.getName(title); // <--- only changed bit

	var params = this.getAttribute("params");
	var tags = params ? params.split("|") : [];
	var focus = this.getAttribute("newFocus");
	var template = this.getAttribute("newTemplate");
	var customFields = this.getAttribute("customFields");
	story.displayTiddler(null,title,template,false,null,null);
	var tiddlerElem = document.getElementById(story.idPrefix + title);
	if(customFields)
		story.addCustomFields(tiddlerElem,customFields);
	var text = this.getAttribute("newText");
	if(typeof text == "string")
		story.getTiddlerField(title,"text").value = text.format([title]);
	for(var t=0;t<tags.length;t++)
		story.setTiddlerTag(title,tags[t],+1);
	story.focusTiddler(title,focus);
	return false;
};

//}}}
/***
|''Name:''|NewUserWizardPlugin|
|''Description:''|Create a new user for the TeamTasks system |
|''Version:''|0.1|
|''Date:''|22 Oct, 2007|
|''Source:''|http://www.hawksworx.com/playground/TeamTasks/#NewUserWizardPlugin|
|''Author:''|PhilHawksworth (phawksworth (at) gmail (dot) com)|
|''License:''|[[BSD open source license]]|
|''CoreVersion:''|2.2|
***/

//{{{
// Ensure that this Plugin is only installed once.
if(!version.extensions.newUserWizard) 
{
	version.extensions.newUserWizard = {installed:true};
	config.macros.newUserWizard = {
	
		handler: function(place,macroName,params,wikifier,paramString,tiddler) {
			createTiddlyButton(place, 'Create user', false, this.onClickNewUser);
		},
		
		onClickNewUser : function(e) {
			
			//get data from the form
			var form = document.getElementById('createTeamTaskUserForm');
			var inputs = form.getElementsByTagName('input');
			var userData = [];
			var mandatoryFields = [];
			var f;
			for (var i=0; i < inputs.length; i++) {
				f = inputs[i];
				if(f.getAttribute('mandatory') && f.getAttribute('mandatory') =='true') mandatoryFields.push(f);
				if(f.value.length > 0) userData[f.name] = f.value;
			};
			
			// stop if we are missing anything mandatory
			var missingValues = false;
 			missingValues = config.macros.newUserWizard.checkMandatory(mandatoryFields);
			if(missingValues) return false;
		
			//build a properly formatted username
			userData['fname'] = userData['fname'].toLowerCase().substring(0,1).toUpperCase() + userData['fname'].substring(1);
			userData['lname'] = userData['lname'].toLowerCase().substring(0,1).toUpperCase() + userData['lname'].substring(1);
			userData['username'] = userData['fname'] + userData['lname'];
			
			//Check for dupes
			var existingTiddler = store.getTiddler(userData['username']);
			if(existingTiddler != null) {
				displayMessage('A user called '+ userData['username'] +' already exists');
				return false;
			}
			
			//add user to UserDefinitions
			var body = store.getTiddlerText('UserDefinitions') + '\n' + userData['username'];
			store.saveTiddler('UserDefinitions','UserDefinitions',body,config.options.txtUserName);
			
			//TODO: Replace the vCard creation from HTML insertion to nice TW DOM methods.
			//create a tiddler for the user with an hCard for the contact details.
			var homeTiddlerBody = [];
			homeTiddlerBody.push('<html>');
			homeTiddlerBody.push('<div class="vcard">');
			homeTiddlerBody.push('<a class="url fn n" href="'+ userData['blog'] +'"><span class="given-name">'+ userData['fname'] +'</span><span class="family-name">'+ userData['lname'] +'</span></a>');
			if(userData['company'])homeTiddlerBody.push('<div class="org"><span class="organization-name">'+ userData['company']  +'</span></div>');
			if(userData['email'])homeTiddlerBody.push('<div class="email"><span><a href="mailto:'+ userData['email']  +'">'+ userData['email']  +'</a></span></div>');
			if(userData['blog'])homeTiddlerBody.push('<div class="blog"><span><a href="'+ userData['blog']  +'">'+ userData['blog']  +'</a></span></div>');
			if(userData['photos'])homeTiddlerBody.push('<div class="photos"><span><a href="'+ userData['photos']  +'">'+ userData['photos']  +'</a></span></div>');
			if(userData['twitter'])homeTiddlerBody.push('<div class="twitter"><span><a href="'+ userData['twitter']  +'">'+ userData['twitter']  +'</a></span></div>');
			homeTiddlerBody.push('</div></html>');
			
			//Create some simple TaskListViews.
			//Task list index template.
			var body;
			body = store.getTiddlerText('SampleTaskListTemplate');
			homeTiddlerBody.push(body.replace(/UserName/g,userData['username']));
			
			store.saveTiddler(userData['username'],userData['username'],homeTiddlerBody.join('\n'),config.options.txtUserName);
			
			//TODO: automate the generation of these views from some templates and the index
			//create the task views
			var body_array = [];
			body_array.push('<<TaskViewBuilder UserDefinitions='+ userData['username'] +' PriorityDefinitions='+ userData['username'] +' !StatusDefinitions=Complete>>');
			store.saveTiddler(userData['username'] +'OpenTasks', userData['username'] +'OpenTasks',body_array.join('\n'),config.options.txtUserName);
			body = '<<TaskViewBuilder UserDefinitions='+ userData['username'] +' StatusDefinitions=InProgress>>';
			store.saveTiddler(userData['username'] +'InProgressTasks', userData['username'] +'InProgressTasks',body,config.options.txtUserName);
			body = '<<TaskViewBuilder UserDefinitions='+ userData['username'] +' StatusDefinitions=Next>>';
			store.saveTiddler(userData['username'] +'NextTasks', userData['username'] +'NextTasks',body,config.options.txtUserName);
			body = '<<TaskViewBuilder UserDefinitions='+ userData['username'] +' StatusDefinitions=Complete>>';
			store.saveTiddler(userData['username'] +'CompletedTasks', userData['username'] +'CompletedTasks',body,config.options.txtUserName);
			
			//open the new user tiddler
			story.displayTiddlers(this,[userData['username']]);
		},
		
		checkMandatory : function(things) {
			var flag = false;
			var v = "";
			var ele;
			for (var i=0; i < things.length; i++) {
				if(typeof(things[i])=='string') {
					ele = document.getElementById(things[i]);
				}
				else if(typeof(things[i]) == 'object') {
					ele = things[i];
				}
				else return false;
				v = ele.value;
				removeClass(ele, 'flaggedMandatory');
				if(v.length == 0){
					addClass(ele, 'flaggedMandatory');
					flag = true;
				}	
			};
			if(flag == true) return true;
			else return false;
		}
	};
}
//}}}
((tilføj(<<newJournal 'DD MMM YYYY' label:'en ny journal for idag' tag:'journal'>>)))++++[Journaler|Journaler du ikke har set siden sidst]...<<tiddler News>>===+++[Arkiv|Journaler du har set før]...<<tiddler Archive>>===

<<tiddler {{'NyLektieKnap##'+('$1'=='$'+'1'||'$2'=='$'+'2'?'Apply':'Makro')}} with: [[$1]] [[$2]]>>
/%
!Apply
<<tiddler [[NyLektieKnap##Makro]]>>
!end Apply
!Makro
<script label="$2" title="opret ny lektie">
        var tt_alias=prompt("Skriv titlen på et fag (små bogstaver)","dansk matematik tysk engelsk fysik etc");
        if (!tt_alias || !tt_alias.length) return;
        var fields={ tt_alias: tt_alias };
        var who=config.options.txtUserName;
        var when=new Date();
        var tid=prompt('Den nye lektietitel bliver:',tt_alias+who+when.formatString('$1'));
        if (!tid || !tid.length) return;
        var txt=store.getTiddlerText('NyLektieTekst'); 
        var lektie=['lektie'];
        if (!lektie) return;
        var title=[!tid];
        if (!title) return;
        var msg=config.messages.overwriteWarning.format([title]);
	if (store.tiddlerExists(title) && !confirm(msg)) return;
	var tags=prompt('Skriv tags her (indsæt mellemrum) (lektie SKAL være een af dem):',tt_alias+who+lektie);
        if (!tags || !tags.length) return;
        store.saveTiddler(tid,tid,txt,who,when,tags,fields);
        story.displayTiddler(null,tid);
</script> 
!end Makro
%/
Skriv titlen på lektien herunder - tilføj evt. en kommentar med information i nederste felt.
Klik på knappen {{button{påmind}}} for at angive hvornår lektien er til...
!form1
<<clickify newTiddler label:'Ny lektie2' title:{{ prompt('skriv en titel på den nye lektie','Titel:') }}
        text:{{"<<formTiddler [[LektieTemplate2]]>"+">"}}tag: {{ prompt('skriv fag dansk matmatik engelsk tysk fysik etc ',':') }}  tag:{{(new Date()).formatString("0DD/0MM-uge WW-YYYY")}} tag:task  >>
!end
!form2
<<newTiddlerWithForm 
 LektieTemplate2
 "Ny Lektie" 
  '"Fag: "+(new Date()).formatString("0DD/0MM-uge WW-YYYY")' askUser
>>
!end
|widetable noborder|k
|padding:10px;<<tiddler [[Næste uges skema##skema]]>><<tiddler [[Næste uges skema##Slide]]>> |vertical-align:top;padding:10px;{{{-> }}}<<popup "kalender" [[<<tiddler "SideBarOptions"$))]]>> eller [[vis en kalender over hele året|årskalender]]<<showReminders leadtime:-14...14>><<schedule type:timetable duration:7>> |
/%
!Slide
++++[arbejdstid]
|sortable|k
|//Dato//|//Beskrivelse//|//Startet//|//Stoppet//|//Varighed//|h
|2010-02-09| a|10:12:46|10:12:50|00:00:04|
|2010-02-09|B|18:13:30|18:13:38|00:00:08|
|2010-02-10|C|20:38:04|20:38:08|00:00:04|
|<<taskTimer here>>||| tid brugt ialt:|<<columncalc sum 1 -1>>|
===
!end Slide
!pop %/
<<popup "uge" [[<<tiddler "Næste uges skema##skema"$))]]>>/%
!end pop
!skema
<<tiddler [[Næste uges skema##HUapps]]>>[[Åbn|Næste uges skema]]
@@color:#900;<<schedule view:timetable shadow:off  sparklines:on span:17 hourFrom:7 detail:low eveningStart:17 dayStart:07 outOfHours:"#eaf" todayFocus:"#abc" todayOOH:"lightGrey" inPast:"Yellow" activeEvent:Red eventPast:"Blue">><<addActivity "+Aftale">><<option chkStickyPopups>><<tiddler DigitalClock with:"Nu= DDD d.DD MMM YYYY (uge:WW)  kl: 0hh:0mm:0ss">>@@
!end skema
!HUapps
@@position:relative;+++^50em^[HUapps]<html><div align="center"><iframe src="http://www.google.com/calendar/hosted/himmerlands-ungdomsskole.dk/embed?src=himmerlands-ungdomsskole.dk_3lr0lpmaeuipt0ladq9ad2asgc%40group.calendar.google.com&ctz=Europe/Copenhagen" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe></div></html>===@@
!end HUapps %/
<<reminder år:2010 måned:2 dag:8 titel:"09:00-19:00 testpåmindele"  hidden  >>
<<reminder år:2010 måned:2 dag:13 titel:"09:00-19:00 Skriv udtalelser"  hidden  >>
<<list filter [tag[subtask]]>> 
<<TTReportView>>
/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
	major: 1, minor: 0, revision: 2, 
	date: new Date("Apr 19, 2007"),
	source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
	author: 'BidiX (BidiX (at) bidix (dot) info',
	license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
	coreVersion: '2.2.0 (Beta 5)'
};

config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");

merge(config.macros.option.types, {
	'pas': {
		elementType: "input",
		valueField: "value",
		eventName: "onkeyup",
		className: "pasOptionInput",
		typeValue: config.macros.option.passwordInputType,
		create: function(place,type,opt,className,desc) {
			// password field
			config.macros.option.genericCreate(place,'pas',opt,className,desc);
			// checkbox linked with this password "save this password on this computer"
			config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);			
			// text savePasswordCheckboxLabel
			place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
		},
		onChange: config.macros.option.genericOnChange
	}
});

merge(config.optionHandlers['chk'], {
	get: function(name) {
		// is there an option linked with this chk ?
		var opt = name.substr(3);
		if (config.options[opt]) 
			saveOptionCookie(opt);
		return config.options[name] ? "true" : "false";
	}
});

merge(config.optionHandlers, {
	'pas': {
 		get: function(name) {
			if (config.options["chk"+name]) {
				return encodeCookie(config.options[name].toString());
			} else {
				return "";
			}
		},
		set: function(name,value) {config.options[name] = decodeCookie(value);}
	}
});

// need to reload options to load passwordOptions
loadOptionsCookie();

/*
if (!config.options['pasPassword'])
	config.options['pasPassword'] = '';

merge(config.optionsDesc,{
		pasPassword: "Test password"
	});
*/
//}}}
/***
|''Name:''|~PopupMacro|
|''Author:''|Saq Imtiaz (mod Tobias Beer)|
|''Version:''|1.1 (2009-11-08)|
|''Description:''|Create popups with custom content|
|''Source:''|http://tbGTD.tiddlyspor.com/#PopupMacro|
|''Documentation:''|http://tw.lewcid.org/#PopupMacroDocs|
|''Requires:''|TW Version 2.0.8 or better|
@@((mod for tbGTD(^removed styles and code cleanup)))@@
!Code
***/
//{{{
config.macros.popup={
err1:'missing macro parameters',
err2:'missing label or content parameter',
arrow:document.all?"▼":"▾",
handler:function(place,macroName,params,wikifier,paramString,theTiddler){
var cls,id,lbl,src,click;
if(!params[0]||!params[1]){createTiddlyError(place,this.err1,this.err2);return false;}
lbl=params[0];
src=(params[1]).replace(/\$\)\)/g,">>");
id=params[2]?params[2]:'nestedpopup';
cls='popup'+(params[3]?' ' +params[3]:'');
click=function(e){
	var btn,nest,p,tgt;
	e=e||window.event;
	tgt=resolveTarget(e);
	nest=!isNested(tgt);
	id=nest?id:'popup';
	if(nest&&Popup.stack.length>1)Popup.removeFrom(1);
	else if(!nest&&Popup.stack.length>0)Popup.removeFrom(0);
	p=createTiddlyElement(document.body,"ol",id,cls,null);
	Popup.stack.push({root:this,popup:p});
	wikify(src,p);
	Popup.show(p,true);e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();return false;
}
btn=createTiddlyButton(place,lbl+this.arrow,lbl,click,null);
}
}
window.isNested=function(el){
	var c=document.getElementById("contentWrapper");
	while(el!=null){if(el==c)return true;el=el.parentNode;}return false;
}
setStylesheet('#nestedpopup {margin-left:1em;}','PopupMacroStyles');
//}}}
/***
|Name:|PrettyDatesPlugin|
|Description:|Provides a new date format ('pppp') that displays times such as '2 days ago'|
|Version:|1.0 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#PrettyDatesPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Notes
* If you want to you can rename this plugin. :) Some suggestions: LastUpdatedPlugin, RelativeDatesPlugin, SmartDatesPlugin, SexyDatesPlugin.
* Inspired by http://ejohn.org/files/pretty.js
***/
//{{{
Date.prototype.prettyDate = function() {
	var diff = (((new Date()).getTime() - this.getTime()) / 1000);
	var day_diff = Math.floor(diff / 86400);

	if (isNaN(day_diff))      return "opdateret";
	else if (diff < 0)        return "i fremtiden";
	else if (diff < 60)       return "lige nu";
	else if (diff < 120)      return "for 1 minut siden";
	else if (diff < 3600)     return Math.floor(diff/60) + " minutter siden";
	else if (diff < 7200)     return "for 1 time siden";
	else if (diff < 86400)    return Math.floor(diff/3600) + " timer siden";
	else if (day_diff == 1)   return "forleden";
	else if (day_diff < 7)    return day_diff + " dage siden";
	else if (day_diff < 14)   return  "for en uge siden";
	else if (day_diff < 31)   return Math.ceil(day_diff/7) + " uger siden";
	else if (day_diff < 62)   return "en måned siden";
	else if (day_diff < 365)  return "for omkring " + Math.ceil(day_diff/31) + " måneder siden";
	else if (day_diff < 730)  return "for et år siden";
	else                      return Math.ceil(day_diff/365) + " år siden";
}

Date.prototype.formatString_orig_mptw = Date.prototype.formatString;

Date.prototype.formatString = function(template) {
	return this.formatString_orig_mptw(template).replace(/pppp/,this.prettyDate());
}

// for MPTW. otherwise edit your ViewTemplate as required.
// config.mptwDateFormat = 'pppp (DD/MM/YY)'; 
config.mptwDateFormat = 'pppp'; 

//}}}
<<TTReportView DisplayFields:"Title,Priority,Status,User,Alias">>
Høj
Middel
Lav

<<tiddler UdtalelsesSkabelonProjekt##SideHoved>>
@@font-family:"Comic Sans MS";{{center big{''Projekt evaluering – 9 kl.''}}}
 
Navn: <<wikify %0 navn>>  Emne:  <<wikify %0 overemne>>  Delemne: <<wikify %0 delemne>>   
 
Denne evaluering skal dels betragtes som en vurdering af det udførte arbejde i projektugen, dels som en hjælp til at løse forskellige opgaver af samme art.
Følgende fire hovedpunkter vil blive vurderet:
 
1.    Arbejdsprocessen
2.    Det faglige indhold
3.    Produktet
4.    Fremlæggelsen
@@
<<tiddler ProjektSkabelon>>
@@font-family:"Comic Sans MS";font-size:120%;{{ borderless{
|widetable|k
|ARBEJDSPROCESSEN |
{{span{
|<<wikify %0 proces>>|
}}}
|widetable|k
|DET FAGLIGE INDHOLD |
{{span{
|<<wikify %0 indhold>>|
}}}
|widetable|k
|PRODUKTET |
{{span{
|<<wikify %0 produkt>>|
}}}
|widetable|k
|FREMLÆGGELSEN |
{{span{
|<<wikify %0 frem>>|
}}}
|widetable|k
| Vejleder: <<wikify __%0__ vejleder>>| Karakter:  <<wikify __%0__ karakter>> |
}}}@@
This package provides a toolbar of interactive 'power tools' that you can use while editing a tiddler to quickly insert TiddlyWiki tiddler links, images, macros, etc. or common formatting sequences directly into tiddler content, as well as perform other functions (such as find/replace, sort, split, convert, etc.) that can be used to modify the current tiddler's source content in a variety of ways.

<<tiddler QuickEditToolbar with: show>>
!!!!!Installation:
<<<
Individual ~QuickEdit buttons are defined in separate tiddlers (e.g., [[QuickEdit_replace]]) that have also been //transcluded// into a single toolbar definition named [[QuickEditToolbar]].  You can edit this definition to add, remove, or rearrange the toolbar buttons to best suit your needs, and then embed the [[QuickEditToolbar]] tiddler into your document's [[EditTemplate]], like this:
{{{
<div macro='tiddler QuickEditToolbar'></div>
}}}
Next, in order to support some of the formatting 'shortcuts' provided by the toolbar, add a reference to the shortcuts CSS class definitions in your [[StyleSheet]]:
{{{
[[StyleSheetShortcuts]]
}}}
By default, the QuickEdit toolbar is hidden until you enable it by using the ''toggleQuickEdit'' command, which you can add to the ~EditToolbar definition in [[ToolbarCommands]]:
{{{
|EditToolbar|... toggleQuickEdit ...|
}}}
You can also toggle the ~QuickEdit toolbar display via a single checkbox option that can be added to [[SideBarOptions]] (or any other desired location):
{{{
<<option chkShowQuickEdit>> show QuickEdit toolbar
}}}
Note: You can 'hard-code' the ''chkShowQuickEdit'' setting, so that the toolbar will be //initially// displayed, by creating a tiddler (e.g., ConfigTweaks), tagged with <<tag systemConfig>>, containing:
{{{
config.options.chkShowQuickEdit=true;
}}}
Alternatively, if you want the toolbar to //always// be displayed, regardless of the option setting, you can add a special keyword, ''show'', to the [[EditTemplate]] syntax, like this:
{{{
<div macro='tiddler QuickEditToolbar with: show'></div>
}}}
<<<
/***
|Name|QuickEditPlugin|
|Source|http://www.TiddlyTools.com/#QuickEditPlugin|
|Documentation|http://www.TiddlyTools.com/#QuickEditPlugin|
|Version|2.4.3|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Description|Support functions for ~QuickEdit package: styles, utility functions, and 'toggleQuickEdit' command|
!!!!!Revisions
<<<
2009.06.11 [2.4.3] added keyup() function to abbreviate listbox handling for CR and ESC
2009.05.07 [2.4.2] added processed() function to abbreviate event handler code
2008.09.07 [2.4.1] added removeCookie() function for compatibility with [[CookieManagerPlugin]]
2008.05.17 [2.4.0] copied code from StickyPopupPlugin to remove dependency
2008.05.12 [2.3.0] added "toggleQuickEdit" command handler (replaces inline script command)
2008.01.11 [2.2.0] converted from inline script
2007.03.29 [1.0.0] initial release (as inline script)
<<<
!!!!!Code
***/
//{{{
version.extensions.QuickEditPlugin= {major: 2, minor: 4, revision: 3, date: new Date(2009,6,11)};

// SET STYLESHEET
setStylesheet("\
.quickEdit a { border:2px outset ButtonFace; padding:0px 3px !important; \
	-moz-border-radius:.5em; -webkit-border-radius:.5em; \
	-moz-appearance:button !important; -webkit-appearance:push-button !important; \
	background-color:ButtonFace; color:ButtonText !important;  \
	line-height:200%; font-weight:normal; } \
.quickEdit a:hover { border: 2px inset ButtonFace; background-color:ButtonFace; }\
", "quickEditStyles");

// REMOVE COOKIE
if (window.removeCookie===undefined) {
	window.removeCookie=function(name) {
		document.cookie = name+'=; expires=Thu, 01-Jan-1970 00:00:01 UTC; path=/;'; 
	}
}

// UTILITY FUNCTIONS
config.quickEdit = {
	processed: function(ev) { ev=ev||window.event;
		ev.cancelBubble=true;
		if(ev.stopPropagation) ev.stopPropagation();
		return false;
	},
	keyup: function(ev){ var k=(ev||window.event).keyCode;
		if (k==13) this.onclick();
		if (k==27) Popup.remove();
	},
	getField: function(where) {
		var here=story.findContainingTiddler(where); if (!here) return null;
		var e=story.getTiddlerField(here.getAttribute("tiddler"),"text");
		if (e&&e.getAttribute("edit")=="text") return e;
		return null;
	},
	setSelection: function(where,newtext) {
		var e=this.getField(where); if (!e) return false;
		e.focus(); replaceSelection(e,newtext);
		return false;
	},
	wrapSelection: function(where,before,after) {
		var e=this.getField(where); if (!e) return false;
		e.focus(); replaceSelection(e,before+config.quickEdit.getSelection(e)+after);
		return false;
	},
	getSelection: function(e) {
		var seltext="";
		if (e&&e.setSelectionRange)
			seltext=e.value.substr(e.selectionStart,e.selectionEnd-e.selectionStart);
		else if (document.selection) {
			var range = document.selection.createRange();
			if (range.parentElement()==e) seltext=range.text
		}
		return seltext;
	},
	promptForFilename: function(msg,path,file) {
		if(window.Components) { // moz
			try {
				netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
				var nsIFilePicker = window.Components.interfaces.nsIFilePicker;
				var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
				picker.init(window, msg, nsIFilePicker.modeOpen);
				var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
				thispath.initWithPath(path);
				picker.displayDirectory=thispath;
				picker.defaultExtension='jpg';
				picker.defaultString=file;
				picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterImages);
				if (picker.show()!=nsIFilePicker.returnCancel)
					var result="file:///"+picker.file.persistentDescriptor.replace(/\\/g,'/');
			}
			catch(e) { alert('error during local file access: '+e.toString()) }
		}
		else { // IE
			try { // XP only
				var s = new ActiveXObject('UserAccounts.CommonDialog');
				s.Filter='All files|*.*|JPG files|*.jpg|GIF files|*.gif|PNG files|*.png|';
				s.FilterIndex=1; // default to JPG
				s.InitialDir=path;
				s.FileName=file;
				if (s.showOpen()) var result=s.FileName;
			}
			catch(e) { var result=prompt(msg,path+file); } // fallback for non-XP IE
		}
		return result;
	}
}
//}}}

//{{{
if (config.options.chkShowQuickEdit===undefined) config.options.chkShowQuickEdit=false;
config.commands.toggleQuickEdit = {
	hideReadOnly: true,
	getText: function() { return config.options.chkShowQuickEdit?'\u221Aquickedit':'quickedit'; },

	tooltip: 'show QuickEdit toolbar buttons',
	handler: function(event,src,title) {
		var opt='chkShowQuickEdit';
		config.options[opt]=!config.options[opt];
		config.macros.option.propagateOption(opt,"checked", config.options[opt],"input");
		if (config.options[opt]) saveOptionCookie(opt);	else removeCookie(opt);
		src.innerHTML=config.commands.toggleQuickEdit.getText();
		story.forEachTiddler(function(t,e){if (story.isDirty(t)) refreshElements(e);});
		return false;
	}
};
//}}}

// // COPIED FROM [[StickyPopupPlugin]] TO ELIMINATE PLUGIN DEPENDENCY
//{{{
if (config.options.chkStickyPopups==undefined) config.options.chkStickyPopups=false;
Popup.stickyPopup_onDocumentClick = function(ev)
{
	// if click is in a sticky popup, ignore it so popup will remain visible
	var e = ev ? ev : window.event; var target = resolveTarget(e);
	var p=target; while (p) {
		if (hasClass(p,"popup") && (hasClass(p,"sticky")||config.options.chkStickyPopups)) break;
		else p=p.parentNode;
	}
	if (!p) // not in sticky popup (or sticky popups disabled)... use normal click handling
		Popup.onDocumentClick(ev);
	return true;
};
try{removeEvent(document,"click",Popup.onDocumentClick);}catch(e){};
try{addEvent(document,"click",Popup.stickyPopup_onDocumentClick);}catch(e){};
//}}}
/%
|Name|QuickEditToolbar|
|Source|http://www.TiddlyTools.com/#QuickEditToolbar|
|Version|2.4.3|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.2|
|Type|transclusion|
|Requires|QuickEditPlugin|
|Optional|QuickEdit_*|
|Description|format/insert TiddlyWiki content using toolbar buttons|

Usage:
* install [[QuickEditPlugin]] (runtime support functions)

* add the toolbar to [[EditTemplate]]:
	<div macro='tiddler QuickEditToolbar with: show'></div>

* 'show' (optional) forces the toolbar to always be displayed or,
  omit keyword and use <<option chkShowQuickEdit>> setting

* selected QuickEdit buttons can also be added individually to the
  regular tiddler toolbar by adding references directly in [[EditTemplate]]:
	<span class='toolbar' macro='tiddler QuickEdit_...'></span>

* see [[QuickEditPackage]] for additional installation options

%/{{hidden fine center quickEdit{
<<tiddler {{ // show/hide toolbar
	var here=story.findContainingTiddler(place); if (here) var tid=here.getAttribute('tiddler');
	var show='$1'!='$'+'1'||config.options.chkShowQuickEdit||tid=='QuickEditToolbar'; 
	place.style.display=show?'block':'none';
'';}}>>/%

TOOLBAR DEFINITION - add, remove, or re-order items as desired:
= = = = = = = = = =
%/<<tiddler QuickEdit_replace>>/%
%/<<tiddler QuickEdit_split>>/%
%/<<tiddler QuickEdit_sort>>/%
%/<<tiddler QuickEdit_convert>>/%
%/ &nbsp;/% (SPACER)
%/<<tiddler QuickEdit_link>>/%
%/<<tiddler QuickEdit_insert>>/%
%/<<tiddler QuickEdit_macro>>/%
%/<<tiddler QuickEdit_image>>/%
%/ &nbsp;/% (SPACER)
%/<<tiddler QuickEdit_format>>/%
%/<<tiddler QuickEdit_align>>/%
%/<<tiddler QuickEdit_color>>/%
%/<<tiddler QuickEdit_font>>/%
%/ &nbsp;/% (SPACER)
%/<<tiddler QuickEdit_custom>>/%
%/}}}
/%
|Name|QuickEdit_align|
|Source|http://www.TiddlyTools.com/#QuickEdit_align|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - text alignment|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="align text"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select text alignment...','');
	s.options[s.length]=new Option('left','left');
	s.options[s.length-1].title='{{left{...}}}';
	s.options[s.length]=new Option('center','center');
	s.options[s.length-1].title='{{center{...}}}';
	s.options[s.length]=new Option('right','right');
	s.options[s.length-1].title='{{right{...}}}';
	s.options[s.length]=new Option('justify','justify');
	s.options[s.length-1].title='{{justify{...}}}';
	s.options[s.length]=new Option('float left','floatleft');
	s.options[s.length-1].title='{{floatleft{...}}}';
	s.options[s.length]=new Option('float right','floatright');
	s.options[s.length-1].title='{{floatright{...}}}';
	s.size=s.length;
	s.onclick=function(){ if (!this.value.length) return;
		config.quickEdit.wrapSelection(this.button,'{{'+this.value+'{','}}}');
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s.focus();
	return config.quickEdit.processed(event);"
>align</a></html>
/%
|Name|QuickEdit_color|
|Source|http://www.TiddlyTools.com/#QuickEdit_color|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - text/background color|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="text/background color - @@color:#RGB;background-color:#RGB;...@@"
onclick="var p=Popup.create(this,null,'popup sticky smallform'); if (!p) return false;
 	p.style.padding='2px';
	function hex(d) { return '0123456789ABCDEF'.substr(d,1); }
	var fg=createTiddlyElement(p,'select'); fg.button=this;
	fg.style.width='12em';
	fg.options[0]=new Option('text color...','');
	fg.options[1]=new Option('\xa0 or enter a value','_ask');
	fg.options[2]=new Option('\xa0 or use default color','');
	for (var r=0;r<16;r+=3) for (var g=0;g<16;g+=3) for (var b=0;b<16;b+=3) {
		var label=hex(r)+hex(g)+hex(b);
		fg.options[fg.length]=new Option(label,'#'+label);
		fg.options[fg.length-1].style.color='#'+label;
	}
	fg.onchange=function(){ var val=this.value;
		if (val=='_ask') { val=prompt('Enter a CSS color value');
		if (!val||!val.length) return false; }
		this.options[0].value=val; this.options[0].text=val.length?'text: '+val:'text color...';
		var bg=this.nextSibling;
		for (var i=3;i<bg.options.length;i++) bg.options[i].style.color=val;
		var preview=this.nextSibling.nextSibling.nextSibling;
		var t=config.quickEdit.getSelection(config.quickEdit.getField(this.button));
		t=t.replace(/^@@(color\:.+;)?(background-color\:.+;)?/,'').replace(/@@$/,'');
		if (!t.length) t='~AaBbCcDdEeFfGgHhIiJj 1234567890';
		var fg=this.value; if (fg.length) fg='color:'+fg+';';
		var bg=this.nextSibling.value; if (bg.length) bg='background-color:'+bg+';';
		if (fg.length||bg.length) t='@@'+fg+bg+t+'@@';
		removeChildren(preview); wikify(t,preview);
		this.selectedIndex=0; return false;
	};
	var bg=createTiddlyElement(p,'select'); bg.button=this;
	bg.style.width='12em';
	bg.options[0]=new Option('background color...','');
	bg.options[1]=new Option('\xa0 or enter a value','_ask');
	bg.options[2]=new Option('\xa0 or use default color','');
	for (var r=0;r<16;r+=3) for (var g=0;g<16;g+=3) for (var b=0;b<16;b+=3) {
		var label=hex(15-r)+hex(15-g)+hex(15-b);
		bg.options[bg.length]=new Option(label,'#'+label);
		bg.options[bg.length-1].style.backgroundColor='#'+label;
	}
	bg.onchange=function(){ var val=this.value;
		if (val=='_ask') { val=prompt('Enter a CSS color value');
		if (!val||!val.length) return false; }
		this.options[0].value=val;
		this.options[0].text=val.length?'background: '+val:'background color...';
		var fg=this.previousSibling;
		for (var i=3;i<fg.options.length;i++) fg.options[i].style.backgroundColor=val;
		var preview=this.nextSibling.nextSibling;
		var t=config.quickEdit.getSelection(config.quickEdit.getField(this.button));
		t=t.replace(/^@@(color\:.+;)?(background-color\:.+;)?/,'').replace(/@@$/,'');
		if (!t.length) t='~AaBbCcDdEeFfGgHhIiJj 1234567890';
		var fg=this.previousSibling.value; if (fg.length) fg='color:'+fg+';';
		var bg=this.value; if (bg.length) bg='background-color:'+bg+';';
		if (fg.length||bg.length) t='@@'+fg+bg+t+'@@';
		removeChildren(preview); wikify(t,preview);
		this.selectedIndex=0; return false;
	};
	var b=createTiddlyElement(p,'input',null,null,null,{type:'button'}); b.button=this;
	b.value='ok'; b.style.width='4em';
	b.onclick=function() {
		var fg=this.previousSibling.previousSibling.value; if (fg.length) fg='color:'+fg+';';
		var bg=this.previousSibling.value; if (bg.length) bg='background-color:'+bg+';';
		var t=config.quickEdit.getSelection(config.quickEdit.getField(this.button));
		t=t.replace(/^@@(color\:.+;)?(background-color\:.+;)?/,'').replace(/@@$/,'');
		if (fg.length||bg.length) config.quickEdit.setSelection(this.button,'@@'+fg+bg+t+'@@');
		Popup.remove(); return false;
	};
	var preview=createTiddlyElement(p,'div',null,'viewer'); var s=preview.style;
	s.border='1px solid'; s.margin='2px'; s.width='24em'; s.padding='3px'; s.MozBorderRadius='3px';
	s.overflow='hidden'; s.textAlign='center'; s.whiteSpace='normal';
	var t=config.quickEdit.getSelection(config.quickEdit.getField(this));
	wikify(t.length?t:'~AaBbCcDdEeFfGgHhIiJj 1234567890',preview);
	Popup.show();
	event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>color</a></html>
/%
|Name|QuickEdit_convert|
|Source|http://www.TiddlyTools.com/#QuickEdit_convert|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - convert between comma/tab-separated and TW table format|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="convert between comma/tab-separated and TW table format"
onclick="var e=config.quickEdit.getField(this);
	if (e) e.focus(); var txt=config.quickEdit.getSelection(e);
	if (txt.indexOf(',')+txt.indexOf('\t')+txt.indexOf('|')==-3) {
		alert('Please select text containing tabs, commas, or TiddlyWiki table syntax.');
		return false;
	}
	var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select a converter...','');
	if (txt.indexOf(',')!=-1) {
		s.options[s.length]=new Option('commas -> table','commasToTable');
		s.options[s.length]=new Option('commas -> tabs','commasToTabs');
	}
	if (txt.indexOf('\t')!=-1) {
		s.options[s.length]=new Option('tabs -> table','tabsToTable');
		s.options[s.length]=new Option('tabs -> commas','tabsToCommas');
	}
	if (txt.indexOf('|')!=-1) {
		s.options[s.length]=new Option('table -> tabs','tableToTabs');
		s.options[s.length]=new Option('table -> commas','tableToCommas');
	}
	s.size=s.length;
	s.onclick=function(){ if (!this.value.length) return;
	        var e=config.quickEdit.getField(this.button); if (!e) return false;
		e.focus(); var txt=config.quickEdit.getSelection(e);
		switch(this.value) {
			case 'tabsToTable':
				txt=txt.replace(/\t/g,'|').replace(/^|$/g,'|');
				txt=txt.replace(/\n/g,'|\n|').replace(/^\|$/g,'');
				break;
			case 'tableToTabs':
				txt=txt.replace(/\t/g,' ').replace(/\|/g,'\t');
				txt=txt.replace(/^\t/g,'').replace(/\t$/g,'');
				txt=txt.replace(/\n\t/g,'\n').replace(/\t\n/g,'\n');
				break;
			case 'commasToTable':
				txt=txt.replace(/,/g,'|').replace(/^|$/g,'|');
				txt=txt.replace(/\n/g,'|\n|').replace(/^\|$/g,''); 
				break;
			case 'tableToCommas':
				txt=txt.replace(/,/g,' ').replace(/\|/g,',');
				txt=txt.replace(/^,/g,'').replace(/,$/g,''); 
				txt=txt.replace(/\n,/g,'\n').replace(/,\n/g,'\n'); 
				break;
			case 'tabsToCommas':
				txt=txt.replace(/\t/g,',');
				break;
			case 'commasToTabs':
				txt=txt.replace(/,/g,'\t');
				break;
		}
		replaceSelection(e,txt);
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s.focus();
	return config.quickEdit.processed(event);"
>convert</a></html>
/%
|Name|QuickEdit_custom|
|Source|http://www.TiddlyTools.com/#QuickEdit_custom|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - custom defined formats|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

!help
Reminders:

Custom formats are stored as an "HR-separated list" in [[QuickEdit_customList]], where the first line of each list item is the text 'label' to show in the droplist, followed by one or more lines of wiki content to be inserted into the tiddler source.

Substitution markers can be used to dynamically insert values into the formatted output: $1 inserts the tiddler editor's current selected text. $[[message|default value]] interactively prompts for a value to be inserted. $[[message|$1]] uses the selected text as the default value. $[[message|{{javascript}}]] calculates the default value using javascript code.
!end help

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" title="custom defined formats"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select a custom format...','');
	var items=store.getTiddlerText('QuickEdit_customList','').split('\n----\n');
	for (var i=0; i<items.length; i++) {
		if (!items[i].length) continue; var lines=items[i].split('\n');
		var label=lines.shift(); var val=lines.join('\n');
		s.options[s.length]=new Option(label,val); s.options[s.length-1].title=val;
	}
	s.options[s.length]=new Option('[Edit custom formats...]','_edit');
	s.options[s.length-1].title='add/change custom format definitions...';
	s.size=Math.min(s.length,15);
	s.onclick=function(){ if (!this.value.length) return;
		if (this.value=='_edit') {
			alert(store.getTiddlerText('QuickEdit_custom##help'));
			story.displayTiddler(story.findContainingTiddler(this.button),
				'QuickEdit_customList',DEFAULT_EDIT_TEMPLATE);
		} else {
		        var e=config.quickEdit.getField(this.button); if (!e) return false;
			e.focus(); var txt=config.quickEdit.getSelection(e);
			replaceSelection(e, this.value.replace(/\$\x31/g,txt)
				.replace(/\$\[\[[^\]]+\]\]/g, function(t){
					x=t.substr(3,t.length-5).split('|');
					var msg=x[0]; var def=x[1]||'';
					if (def.startsWith('{{')) {
						try{def=eval(def.substr(2,def.length-4))} catch(ex){showException(ex)}
					}
					return prompt(msg,def)||'';
				})
			);
		}
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s.focus();
	return config.quickEdit.processed(event);"
>custom</a></html>
timestamp
$[[enter a date|{{new Date().formatString('DDD, MMM DDth, YYYY hh12:0mm:0ssam')}}]]
----
scrollbox
@@display:block;height:10em;overflow:auto;$1@@@@display:block;text-align:right;^^scroll for more...^^@@
----
nested slider
+++[$1]<<tiddler $1>>===
----
big red
@@font-size:36pt;color:red;$1@@
----
wikilink
[[$1]]
----
iframe + menubox
<html><div <span class='menubox' style='float:center;margin:0em'<div align="center"><iframe src="$1" frameborder="0" width="100%" height="800"></iframe></div></html>
----
iframe
<html><div align="center"><iframe src="$1" frameborder="0" width="100%" height="600"></iframe></div></html>
----
Hurtig fET tabel
<<forEachTiddler where 'tiddler.tags.contains("$1")'
sortBy 'tiddler.title'
write 
 '(index < 600)? "|!"+(index+1)+"|[["+tiddler.title+"]] |\n" : ""'
              begin '"|sortable|k\n" 
+"| !antal | !<<tag $1\>\> |h\n"' 
end 'count+" tiddlere tagget med $1\n"' none '"ingen tiddlere tagget med $1 \n"'>>
----
fET TagTilTabs
<<forEachTiddler
    where
       'tiddler.tags.contains("$1")'

    sortBy
       'tiddler.title.toUpperCase()'

    write '" [["+tiddler.title+" ]] \"view ["+tiddler.title+"]\" [["+tiddler.title+"]] "'

        begin '"<<tabs txtMyAutoTab "'

        end '">"+">"'

        none '"//Ingen tiddlere er tagget med \"$1\"//"'
>>
----
Tiddlermakro
<<tiddler $1>>
----
Billede
[img(100%+,auto)[$1]]
----
ShowPopup
<<tiddler ShowPopup with: $1[[Klik]][[Se i popup her]] button>>
----
Ryk ned og gør til overskrift

$1h
/%
|Name|QuickEdit_font|
|Source|http://www.TiddlyTools.com/#QuickEdit_font|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - select font family|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="set font-family CSS attribute - @@font-family:facename;...@@"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('vælg en font familie...','');
	var fonts=store.getTiddlerText('QuickEdit_fontList','').split('\n');
	for (var i=0; i<fonts.length; i++) {
		if (!fonts[i].length) continue;
		s.options[s.length]=new Option(fonts[i],fonts[i]);
		s.options[s.length-1].style.fontFamily=fonts[i];
	}
	s.options[s.length]=new Option('[Redigér fontlisten...]','_edit');
	s.options[s.length-1].title='skriv fontnavne, en pr linie...';
	s.size=Math.min(s.length,15);
	s.onclick=function(){
		if (this.value=='_edit')
			story.displayTiddler(story.findContainingTiddler(this.button),'QuickEdit_fontList',DEFAULT_EDIT_TEMPLATE);			
		else
			config.quickEdit.wrapSelection(this.button,'@@font-family:\x22'+this.value+'\x22;','@@');
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s.focus();
	return config.quickEdit.processed(event);"
>font</a></html>
Arial,helvetica,sans-serif
Times New Roman,times,serif
Courier,monospaced
Comic Sans MS
/%
|Name|QuickEdit_format|
|Source|http://www.TiddlyTools.com/#QuickEdit_format|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - basic text formats, headings, blockquotes, etc.|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="plain text (remove ALL formatting)" accesskey="P" 
onclick="var e=config.quickEdit.getField(this); if (e) e.focus(); var txt=config.quickEdit.getSelection(e);
	config.quickEdit.setSelection(e,wikifyPlainText(txt)); return false;"
>&nbsp;~&nbsp;</a></html>/%

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="''bold''" accesskey="B"
onclick="config.quickEdit.wrapSelection(this,'\x27\x27','\x27\x27'); return false;"
>&nbsp;B&nbsp;</a></html>/%

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="//italics//" accesskey="I" 
onclick="config.quickEdit.wrapSelection(this,'//','//'); return false;"
>&nbsp;I&nbsp;</a></html>/%

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="__underline__" accesskey="U" 
onclick="config.quickEdit.wrapSelection(this,'__','__'); return false;"
>&nbsp;U&nbsp;</a></html>/%

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="--strikethrough--" accesskey="S" 
onclick="config.quickEdit.wrapSelection(this,'--','--'); return false;"
>&nbsp;S&nbsp;</a></html>/%

%/ &nbsp;/%  SPACER

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="format text"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select text format...','');
	s.options[s.length]=new Option('CSS class wrapper','{{$1{,}}},Enter a CSS classname');
	s.options[s.length-1].title='CSS class wrapper - {{classname classname etc{...}}}';
	s.options[s.length]=new Option('inline CSS styles','@@$1,@@,Enter CSS (attribute:value;attribute:value;...;)');
	s.options[s.length-1].title='inline CSS styles - @@attr:value;attr:value;...@@';
	s.options[s.length]=new Option('heading 1','\n!,\n');
	s.options[s.length-1].title='H1 heading - !';
	s.options[s.length]=new Option('heading 2','\n!!,\n');
	s.options[s.length-1].title='H2 heading - !!';
	s.options[s.length]=new Option('heading 3','\n!!!,\n');
	s.options[s.length-1].title='H3 heading - !!!';
	s.options[s.length]=new Option('heading 4','\n!!!!,\n');
	s.options[s.length-1].title='H4 heading - !!!!';
	s.options[s.length]=new Option('heading 5','\n!!!!!,\n');
	s.options[s.length-1].title='H5 heading - !!!!!';
	s.options[s.length]=new Option('blockquote','\n\<\<\<\n,\n\<\<\<\n');
	s.options[s.length-1].title='indented blockquote - \<\<\<';
	s.options[s.length]=new Option('monospaced','{{{,}}}');
	s.options[s.length-1].title='inline monospaced text - {{{...}}}';
	s.options[s.length]=new Option('plain text','\n{{{\n,\n}}}\n');
	s.options[s.length-1].title='multi-line monospaced text box - {{{...}}}';
	s.options[s.length]=new Option('superscript','^^,^^');
	s.options[s.length-1].title='^^superscript^^';
	s.options[s.length]=new Option('subscript','~~,~~');
	s.options[s.length-1].title='~~subscript~~';
	s.options[s.length]=new Option('HTML','<html>,<\x2fhtml>');
	s.options[s.length-1].title='HTML syntax - <html>...<\x2fhtml>';
	s.options[s.length]=new Option('comment','/%,%/');
	s.options[s.length-1].title='comment (hidden content) - /%...%/';
	s.size=s.length;
	s.onclick=function(){ if (!this.value.length) return;
		var parts=this.value.split(',');
		var prefix=parts[0]; var suffix=parts[1]; var ask=parts[2];
		if (ask) {
			var val=prompt(ask); if (!val) { Popup.remove(); return false; }
			prefix=prefix.replace(/\$1/g,val); suffix=suffix.replace(/\$1/g,val);
		}
		config.quickEdit.wrapSelection(this.button,prefix,suffix);
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s.focus();
	return config.quickEdit.processed(event);"
>format</a></html>
/%
|Name|QuickEdit_image|
|Source|http://www.TiddlyTools.com/#QuickEdit_image|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - embed an image|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
	title="embed an image (jpg/gif/png) - [img[tooltip|URL]] or [img[tooltip|path/to/file.ext]]"
	onclick="var fn=config.quickEdit.promptForFilename(
		'Enter/select an image file',getLocalPath(document.location.href),'');
	if (!fn) return false;  /* cancelled by user */
	var h=document.location.href; var p=decodeURIComponent(h.substr(0,h.lastIndexOf('/')+1));
	if (fn.startsWith(p)) fn=fn.substr(p.length); /* use RELATIVE path/filename.ext */
	var tip=prompt('Enter a tooltip for this image',''); if (!tip) tip=''; else tip+='|';
	return config.quickEdit.setSelection(this,'[img['+tip+fn+']]');"
>image</a></html>
/%
|Name|QuickEdit_insert|
|Source|http://www.TiddlyTools.com/#QuickEdit_insert|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - insert content from another tiddler or external file|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="insert content from another tiddler or external file"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';

	var s2=createTiddlyElement(p,'select'); s2.title='filter by tag';
	s2.options[0]=new Option('filter by tag...','');
	s2.options[s2.length]=new Option('[all tiddlers]','');
	var tags=store.getTags();
	for (var t=0; t<tags.length; t++) s2.options[s2.length]=new Option(tags[t][0],tags[t][0]);
	s2.onchange=function(){
		var tag=this.value;
		var tids=tag.length?store.reverseLookup('tags',tag,true):store.reverseLookup('tags','excludeLists');
		var list=this.nextSibling.nextSibling;
		while (list.length) list.options[0]=null;
		var prompt='select a tiddler or file...';
		if (tag.length) prompt='select a tagged tiddler ['+tids.length+' matches]...';
		list.options[0]=new Option(prompt,'');
		if (!tag.length) list.options[list.length]=new Option('[browse for file...]','_file');
		for (var t=0; t<tids.length; t++) {
			list.options[list.length]=new Option(tids[t].title,tids[t].title);
			list.options[list.length-1].title=tids[t].getSubtitle();
		}
		list.size=Math.min(list.length,10);
		list.selectedIndex=0; list.focus();
		this.style.width=list.offsetWidth+'px';
		if (!tag.length) this.selectedIndex=0;
	};
	createTiddlyElement(p,'br');

	var s=createTiddlyElement(p,'select'); s.button=this;
	s.title='select a tiddler or file';
	s.options[0]=new Option('select a tiddler or file...','');
	s.options[s.length]=new Option('[browse for file...]','_file');
	var tids=store.reverseLookup('tags','excludeLists');
	for (var t=0; t<tids.length; t++) {
		s.options[s.length]=new Option(tids[t].title,tids[t].title);
		s.options[s.length-1].title=tids[t].getSubtitle();
	}
	s.size=Math.min(s.length,10);
	s.onclick=function(){ if (!this.value.length) return false;
		if (this.value=='_file') {
			var fn=config.quickEdit.promptForFilename(
				'Enter/select a text file',getLocalPath(document.location.href),'');
			if (!fn) return false; /* cancelled by user */
			var txt=loadFile(getLocalPath(fn));
			if (!txt) { alert('Error: unable to read contents from \0027'+fn+'\0027'); return; }
		}
		else var txt=store.getTiddlerText(this.value);
		if (!txt) {
			displayMessage(this.value+' not found');
			this.selectedIndex=0; this.focus();
			return false;
		}
		config.quickEdit.setSelection(this.button,txt);
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s2.style.width=s.offsetWidth+'px';
	s.focus();
	return config.quickEdit.processed(event);"
>insert</a></html>
/%
|Name|QuickEdit_link|
|Source|http://www.TiddlyTools.com/#QuickEdit_link|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - link to tiddler or external file|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="add a link to a tiddler or external file - [[link text|TiddlerName]]"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';

	var s2=createTiddlyElement(p,'select'); s2.title='filter by tag';
	s2.options[0]=new Option('filter by tag...','');
	s2.options[s2.length]=new Option('[all tiddlers]','');
	var tags=store.getTags();
	for (var t=0; t<tags.length; t++) s2.options[s2.length]=new Option(tags[t][0],tags[t][0]);
	s2.onchange=function(){
		var tag=this.value;
		var tids=tag.length?store.reverseLookup('tags',tag,true):store.reverseLookup('tags','excludeLists');
		var list=this.nextSibling.nextSibling;
		while (list.length) list.options[0]=null;
		var prompt='select a tiddler or file...';
		if (tag.length) prompt='select a tagged tiddler ['+tids.length+' matches]...';
		list.options[0]=new Option(prompt,'');
		if (!tag.length) list.options[list.length]=new Option('[browse for file...]','_file');
		for (var t=0; t<tids.length; t++) {
			list.options[list.length]=new Option(tids[t].title,tids[t].title);
			list.options[list.length-1].title=tids[t].getSubtitle();
		}
		list.size=Math.min(list.length,10);
		list.selectedIndex=0; list.focus();
		this.style.width=list.offsetWidth+'px';
		if (!tag.length) this.selectedIndex=0;
	};
	createTiddlyElement(p,'br');

	var s=createTiddlyElement(p,'select'); s.button=this;
	s.title='select a tiddler or file';
	s.options[0]=new Option('select a tiddler or file...','');
	s.options[s.length]=new Option('[browse for file...]','_file');
	var tids=store.reverseLookup('tags','excludeLists');
	for (var t=0; t<tids.length; t++) {
		s.options[s.length]=new Option(tids[t].title,tids[t].title);
		s.options[s.length-1].title=tids[t].getSubtitle();
	}
	s.size=Math.min(s.length,10);
	s.onclick=function(){ if (!this.value.length) return false;
		var title=this.value; var txt=title;
		if (title=='_file') {
			title=config.quickEdit.promptForFilename('Select a file',
				getLocalPath(document.location.href),'');
			if (!title) { this.selectedIndex=0; this.focus(); return false; }
			var txt=title.substr(title.lastIndexOf('/')+1);
		}
		var txt=prompt('Enter the text to display for this link',txt);
		if (!txt) { this.selectedIndex=0; this.focus(); return false; }
		config.quickEdit.setSelection(this.button,'[['+txt+'|'+title+']]');
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s2.style.width=s.offsetWidth+'px';
	s.focus();
	return config.quickEdit.processed(event);"
>link</a></html>
/%
|Name|QuickEdit_macro|
|Source|http://www.TiddlyTools.com/#QuickEdit_macro|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - embed a macro with 'guide text'|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

Note:
Optional 'guideText' can be used to add suggested defaults/placeholders for specific macro parameters.
Add guideText to your own plugin-defined macros using:
	config.macros.macroName.guideText='guide text goes here';

%/<<tiddler {{
	/* define guide text for a few common TW core macros */
	config.macros.edit.guideText='fieldname #rows';
	config.macros.view.guideText='fieldname (link,wikified,date) format';
	config.macros.slider.guideText='cookie TiddlerName label tooltip';
	config.macros.option.guideText='(txtCookieName,chkCookieName)';
	config.macros.tiddler.guideText='TiddlerName with: params...';
	''; /* must return blank to suppress output */ }}>>/%

%/<html><hide linebreaks><a href='javascript:;' class='tiddlyLink' tabindex='-1' 
title='add a macro - \<\<macroName ...\>\>'
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select a macro...','');
	var macros=[]; for (var m in config.macros) if (config.macros[m].handler) macros.push(m); macros.sort();
	for (var i=0; i<macros.length; i++) { var m=macros[i];
		var help=config.macros[m].guideText; if (!help) help=''; else help=' '+help;
		s.options[s.length]=new Option(m,m+help);
		s.options[s.length-1].title='\<\<'+m+help+'\>\>';
	}
	s.size=Math.min(s.length,15);
	s.onclick=function(){ if (!this.value.length) return;
		config.quickEdit.setSelection(this.button,'\<\<'+this.value+'\>\>');
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s.focus();
	return config.quickEdit.processed(event);"
>macro</a></html>
/%
|Name|QuickEdit_replace|
|Source|http://www.TiddlyTools.com/#QuickEdit_replace|
|Version|2.4.4|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - find/replace selected text with replacement text|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="find/udskift valgt tekst med ny tekst"
onclick="var here=story.findContainingTiddler(this); if (!here) return false;
	var e=config.quickEdit.getField(here);
	var s=config.quickEdit.getSelection(e); 
	var p=Popup.create(this,null,'popup sticky smallform'); if (!p) return false;
	var t=createTiddlyElement(p,'input'); t.onfocus=function(){this.select()};
	t.value=s.length?s:'skriv måltekst';
	var r=createTiddlyElement(p,'input'); r.onfocus=function(){this.select()};
	r.value='skriv erstatningstekst';
	var tid=here.getAttribute('tiddler');
	var b=createTiddlyElement(p,'button',null,null,'?',{tid:tid});
	b.style.width='2em';
	b.title='FIND/FIND Næste måltekst';
	b.onclick=function(ev) { /* FIND */
		var e=story.getTiddlerField(this.getAttribute('tid'),'text');
		if (!e||e.getAttribute('edit')!='text') return;
		var t=this.previousSibling.previousSibling;
		var tv=t.value.replace(/\\t/mg,'\t').unescapeLineBreaks();
		e.focus();
		if (e.setSelectionRange) { /* MOZ */
			var newstart=e.value.indexOf(tv,e.selectionStart+1);
			if (newstart==-1) newstart=e.value.indexOf(tv); /* wrap around */
			if (newstart==-1) { alert('\u0022'+t.value+'\u0022 not found'); t.focus(); return; }
			e.setSelectionRange(newstart,newstart+tv.length);
			var linecount=e.value.split('\n').length;
			var thisline=e.value.substr(0,e.selectionStart).split('\n').length;
			e.scrollTop=Math.floor((thisline-1-e.rows/2)*e.scrollHeight/linecount);
		} else if (document.selection) { /* IE */
			var range=document.selection.createRange();
			if(range.parentElement()==e) {
				range.collapse(false);
				var found=false; try{found=range.findText(v,e.value.length,4)}catch(e){}
				if (found) range.select();
				else { alert('\u0022'+t.value+'\u0022 not found'); t.focus(); }
			}
		}
	};
	b=createTiddlyElement(p,'button',null,null,'=',{tid:tid});
	b.style.width='2em';
	b.title='ERSTAT valgt tekst';
	b.onclick=function(ev) { /* REPLACE */
		var e=story.getTiddlerField(this.getAttribute('tid'),'text');
		if (!e||e.getAttribute('edit')!='text') return;
		var t=this.previousSibling.previousSibling.previousSibling;
		var r=this.previousSibling.previousSibling;
		var rv=r.value.replace(/\\t/mg,'\t').unescapeLineBreaks();
		if (   (e.selectionStart!==undefined && e.selectionEnd==e.selectionStart)
		    || (document.selection && document.selection.createRange().text==''))
			this.previousSibling.click(); /* no selection... do FIND first */
		if (   (e.selectionStart!==undefined && e.selectionEnd==e.selectionStart)
		    || (document.selection && document.selection.createRange().text==''))
			{ t.focus(); return; } /* still no selection... goto target input */
		e.focus(); replaceSelection(e,rv);
	};
	b=createTiddlyElement(p,'button',null,null,'+',{tid:tid});
	b.style.width='2em';
	b.title='ERSTAT valgt tekst OG FIND NÆSTE måltekst';
	b.onclick=function(ev) { /* REPLACE and FIND NEXT */
		this.previousSibling.click();
		this.previousSibling.previousSibling.click();
	};
	b=createTiddlyElement(p,'button',null,null,'!',{tid:tid});
	b.style.width='2em';
	b.title='ERSTAT ALLE forekomster af måltekst';
	b.onclick=function(ev) { /* REPLACE ALL */
		var e=story.getTiddlerField(this.getAttribute('tid'),'text');
		if (!e||e.getAttribute('edit')!='text') return;
		var t=this.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling;
		var r=this.previousSibling.previousSibling.previousSibling.previousSibling;
		var tv=t.value.replace(/\\t/mg,'\t').unescapeLineBreaks();
		var rv=r.value.replace(/\\t/mg,'\t').unescapeLineBreaks();
		if (!tv.length) { alert('Please enter the target text'); t.focus(); return; }
		var m='This will replace all occurrences of:\n\n'+tv+'\n\nwith:\n\n'+rv+'\n\nAre you sure?';
		if (!confirm(m)) { r.focus(); r.select(); return; }
		e.value=e.value.replace(new RegExp(tv.escapeRegExp(),'gm'),rv);
		e.focus(); e.select(); Popup.remove();
	};
	Popup.show();
	if (!s.length) {t.focus();t.select()} else {r.focus();r.select()}
	event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>erstat</a></html>
/%
|Name|QuickEdit_sort|
|Source|http://www.TiddlyTools.com/#QuickEdit_sort|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - sort lines of text|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="sort lines of text"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select sort order...','');
	s.options[s.length]=new Option('ascending','A');
	s.options[s.length-1].title='ascending';
	s.options[s.length]=new Option('descending','D');
	s.options[s.length-1].title='descending';
	s.size=s.length;
	s.onclick=function(){ if (!this.value.length) return;
		var e=config.quickEdit.getField(this.button); if (!e) return false;
		var lines=config.quickEdit.getSelection(e).split('\n').sort();
		if (this.value=='D') lines=lines.reverse();
		replaceSelection(e,lines.join('\n'));
		e.focus();
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s.focus();
	return config.quickEdit.processed(event);"
>sort</a></html>
/%
|Name|QuickEdit_split|
|Source|http://www.TiddlyTools.com/#QuickEdit_split|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - move selection to new tiddler and insert link, embedded tiddler, or slider|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

Based on ideas originally developed by YannPerrin
(http://yann.perrin.googlepages.com/twkd.html#easySlicer)

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="move selection to new tiddler and insert link, embedded tiddler, or slider"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	p.style.whiteSpace='nowrap';
	var i=createTiddlyElement(p,'input');
	i.defaultValue='Enter a new tiddler title';
	i.onfocus=function(){this.select()};
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select type...','');
	s.options[0].title='select split type';
	s.options[1]=new Option('link','link');
	s.options[1].title='replace with [[TiddlerName]]';
	s.options[2]=new Option('embed','embed');
	s.options[2].title='replace with \<\<tiddler TiddlerName\>\>';
	s.options[3]=new Option('slider','slider');
	s.options[3].title='replace with \<\<slider \u0022\u0022 [[TiddlerName]] [[label]] [[tooltip]]\>\>';
	s.onchange=function(){
		if (s.previousSibling.value==s.previousSibling.defaultValue)
			{ alert('A tiddler title is required'); s.selectedIndex=0; s.previousSibling.focus(); return false; }
		var tid=s.previousSibling.value;
		if (store.tiddlerExists(tid) && !confirm(config.messages.overwriteWarning.format([tid])))
			{ s.previousSibling.focus(); return false; }
		switch(s.value) {
			case 'link':
				var newtxt='[['+tid+']]';
				break;
			case 'embed':
				var newtxt='\<\<tiddler [['+tid+']]\>\>';
				break;
			case 'slider':
				var label=prompt('Enter a slider label',tid);
				if (!label) { Popup.remove(); return false; }
				var tip=prompt('Enter a slider tooltip',label);
				if (!tip) { Popup.remove(); return false; }
				var newtxt='\<\<slider \u0022\u0022 [['+tid+']] [['+label+']] [['+tip+']]\>\>';
				break;
		}
		var txt=config.quickEdit.getSelection(config.quickEdit.getField(this.button));
		store.saveTiddler(tid,tid,txt,config.options.txtUserName,new Date(),[],{});
		story.displayTiddler(story.findContainingTiddler(this.button),tid);
		config.quickEdit.setSelection(this.button,newtxt);
		Popup.remove(); return false;
	};
	Popup.show();
	event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>split</a></html>
<script>if(!window.tbQA)window.tbQA={
	bigSize:'300px',//height for bigger-size textarea
	searchAll:true,//determines whether all tiddlers will be scanned to find unidentified tags in quick-add
	lingo:{//translation
		none:"Intet at tilføje! Åben kvik-tilføj for hjælp?",
		empty:"Ingen besked, intet.",
		noMatch:"Ingen match er fundet for '%0', hverken i tilføjede eller allerede eksisterende tiddlere!%1Prøv igen...",
		justAdded:"Dem du lige har tilføjet er:%0. ",
		notFound:"Intet %0tag fundet matcher '%1' for '%2'! ",
		noDefault:"Intet default %0-tag er defineret. ",
		useShort:"Brug enhver forkortelse af '%0'. ",
		usePrefix:"Alternativet, brug prefix '%0' for '%1'. ",
		enterNew:"Skriv et andet %0tag for '%1'...",
		listPrefix:"|linkTabel|k\n| type | tiddler | tags | handling |h\n"
	},
	cfg:{
	//---tbGTD quick-add configuration (stored as global object)---
	//edit to suit your needs ...changes apply only after reload!
	//all inspected prefixes (not allowed: 'fst','all'!)
	p:['#','^','$','§','@','?','&','-'],
	//definition arrays for those prefixes -> comma (!) separated strings
	//'prefix':[0='master-tag', 1='default subtag, [2='arr of allowed subitems {...for multi-level-add}']],
	'$':['project','$active',['$','§','#','?']], //only those with subitems are allowed as line-starters! 
	'#':['handling','#næste',['#','?']],
	'^':['prioritet','^1.høj'],
	'§':['trin',,['#','?']],
	'@':['sammenhæng'],
	'?':['kontakt'],
	'&':['område'],
	'-':['rige','-privat-'] //-> mind the last comma on each line, but not on the last!
	//---end of quick-add setup---
	//better not edit below
	},
	init:function(){
		var c,cat,def,pr,t,tag,tgt,tit;
		c=this.cfg;c.fst=[];c.all=[]; 
		//c=quickkad cfg, cat=category, def=definition, pr=prefix, t,tag=tag, tgt=tagged, tit=title
		for(pr=0;pr<c.p.length;pr++){
			cat=c.p[pr];def=c[cat];
			if(def){
				tag=def[0];
				if(tag){
					if(def[2])c.fst.pushUnique(cat);//arr with prefixes allowed to have subitems
					c[cat]['tags']=[];//named arr for the following prefixed(!) subtags
					tgt=store.getTaggedTiddlers(tag);
					for(t=0;t<tgt.length;t++){
						tit=tgt[t].title;
						c[cat]['tags'].pushUnique(tit);//store subtag
						c.all.pushUnique(tit);//all allowed
					}
				}
			}
		}
	},
	find:function(dt,pr,ti){//dt=tag from def, pr=prefix, ti=new title
		var c=tbQA.cfg,ct,fo='',l=tbQA.lingo,t,nd;
		//c=config, ct=check-tag, fo=return: found tag, l=lingo, t=ctrl var, nd=no default
		while(fo==''&&dt){//while invalid and tag given
			nd=false;
			if(dt.length<=1){//only prefix
				if(c[pr][1])fo=c[pr][1];//get default from cfg
				else nd=true;
			}else{//prefix+string
				for(t=0;t<c[pr]['tags'].length;t++){
					ct=c[pr]['tags'][t];//check tagged
					if(ct.indexOf(dt)==0){fo=ct;break;}//starting characters match
				}
			}
			//if not found, ask again
			if(!fo)dt=prompt((nd?l.noDefault.format([c[pr][0]]):l.notFound.format([c[pr][0]+'-',dt,ti]))+
				(c[pr][0]?l.useShort.format([c[pr]['tags']]):'')+
				(c[pr][1]?l.usePrefix.format([pr,c[pr][1]]):'')+
				l.enterNew.format([c[pr][0]+'-',ti]),pr).trim();
		}
		return fo;
	}
};
tbQA.init();//get GTD tags
config.shadowTiddlers['Recent notes']='<<tiddlerList filter:"tiddler.tags.containsAny([\'quickadd\',\'note\'])" top:"5" order:"-created" dateFormat:"pppp" itemTemplate:"!@@background:#DDD;display:block;width:98%;padding:5px 1%;%link@@\\n<<tiddler scripts##deleteTiddler with: \'%title\' \'Recent notes\' norefresh$)) (%created) @@padding-left:2em;tags: %tags@@\\n\\n%text\\n">>';
</script><html><nowiki><form id="qNotes" style="width:100%;">
<table class='borderless' cellpadding='0' cellspacing='0' style='width:100%;'>
<tr><td style='width:75%;margin-left:-5px;'>
<input name='tags' type='text' title='add tags to this note (in addition, all tags will be tagged "note")' cols='60' style='width:29.5%;float:right;border:1px solid #CCC;'>
<input  name='title' type='text' title='note title ...when blank this timestamp will be inserted: YYYY-0MM-0DD 0hh:0mm:0ss' cols='60' style='width:69.25%;float:right;border:1px solid #CCC;'>
</td><td rowspan='2' style='width:25%'>
<input type='button' class='button btn' value='liste med alle noter' id='toggleNotesArchive' title="klik for at vise eller skjule en liste over alle tiddlere tagget med 'note'" onclick="
	var show=value=='liste med alle noter';
	var el=document.getElementById('showNoteList');
	show?wikify(store.getTiddlerText('QuickNotes##archive'),el):el.innerHTML='';
	el.style.display=show?'block':'none';
	this.value=show?'hide note-list':'liste med alle noter';
	return false;">
<input type='button' class='button btn' value='større' id='toggleInputSize' title='klik for at gøre tekstområdet større' onclick="
	var big=this.value=='større';
	this.value=(big?'normal':'bigger') + ' size';
	this.form.note.style.height=(big?tbQA.bigSize:'120px');
	return false;">
<input type='button' class='button btn' value='tilføj påmindelse' title='tilføj en påmindelse til den aktuelle note' onClick='
	var d=new Date();
	this.form.note.value=this.form.note.value+"\n"+"<<reminder year:%0 month:%1 day:%2 title:\"reminder title\">>".format(
		[d.getFullYear(),
		String.zeroPad(d.getMonth()+1,2),
		String.zeroPad(d.getDate(),2)]);
	this.form.note.focus();
	return false;'>
<input type='button' class='button btn' value='kvik-tilføj hjælp' title='vis hjælp til kvik-tilføj' onclick="story.displayTiddler(null,'quick-add help');">
<input type='button' name='save' class='button btn' value='tilføj note (klik)
kvik-tilføj (ctrl+click)' style='height:55px;' title='klik for at tilføje en note | ctr-click to quick-add projects, actions, etc...' onclick="
	var arr,c,cs=0,cul,def,dt,ev,fi,fo,hr,ind,la=[],key,lash,l,len,lev,li,ll;
	//arr= tmp array, c=quickadd cfg, cs=corrected shift, cul=curr line, dt=def tag, ev=event, fi=first char, fo=found, ind=indent ftc
	//key=keycode, l=lingo, la=arr of last entries, lash=last shift value, len=arr length, lev=level, li=lines, ll=last line
	var nu,ok,out,note,ntgs,pos,pr,sh,subs,t,tag,tgs=[],tid,tids=[],ti='',txt='',who,when,x;
	//nu=new tid, ok=write tid. out=output, pr=prefix, pos=char position, ntgs=quickadd tags, sh=shift
	//t/tag=tag, tid=added tiddler title , tids=tiddlers to be created, tgs=tags, txt=tid text
	c=tbQA.cfg,l=tbQA.lingo;//get cfg, find & lingo
	ev=event||window.event;
	ok=function(ti){return !store.tiddlerExists(ti)||confirm(config.messages.overwriteWarning.format([ti]))};
	who=config.options.txtUserName;
	when=new Date();
	tgs=this.form.tags.value.readBracketedList();
	note=this.form.note.value;
	if(note==''){alert(l.empty);return;}//no empty notes
	if(ev.ctrlKey){//quickadd
		tids['add']=[];//init arr for all added tids
		tids['all']=store.getTiddlers('title');//&all existing ones too
		li=note.split('\n');//split lines
		while(true){
			ll=li.length==0;
			cul=li.shift();//get first line of rest
			if(!ll){
				sh=cul.match(/^(\.*)/)[0].length;//get shifted dots (.)
				cs=Math.min(cs+1,sh);//correct -> max one deeper 
				subs=cs>0&&la[cs-1]?c[la[cs-1][1]][2]:[];//get allowed subitems for this level from cfg
				fi=cul.substr(sh,1);//get first char
			}
			if(ll||cs==0&&c.fst.contains(fi)||(subs&&subs.contains(fi))){//valid definition prefix
				if(ti&&ok(ti)){//if new title exists yet & confirm overwrite, create & remember new tiddler
					tids['add'].pushUnique(ti);
					tids.push([ti,lash,ntgs,pr]);
					store.saveTiddler(ti,ti,txt,who,when,ntgs,{});
				}if(ll)break;//no more lines -> we're done
				cul=cul.substr(sh,cul.length);//get rest of line
				pr=fi;
				ti=txt='';//reset tid title & text
				ntgs=tgs.slice();//reset tid tags to global tags
				pos=cul.indexOf(' ');//split at first empty
				if(pos<0)continue;//only prefix -> invalid 
				dt=cul.substr(0,pos);//get category tag
				cul=cul.substr(pos+1,cul.length);//get rest
				arr=cul.split('|');//split rest by divider
				ti=arr[0].trim();//first part is new title
				fo=tbQA.find(dt,pr,ti);//find this tag
				if(fo)ntgs.push(fo);//found? -> add tag
				def=arr[1]?arr[1].readBracketedList():[];//remaining GTD tags
				while(def[0]){//loop 'em
					dt=def.shift().trim();//get next
					fi=dt.substr(0,1);
					fi=c.p.contains(fi)?fi:'';
					if(fi){
						fo=tbQA.find(dt,fi,ti);//find
						if(fo)ntgs.push(fo);//found? -> add tag
					}else{
						fo='';
						while(!fo&&dt){
							for(t=0;t<tids['add'].length;t++){
								tid=tids['add'][t];
								if(tid.indexOf(dt)==0){fo=tid;break;}
							}
							if(!fo&&tbQA.searchAll){
								for(t=0;t<tids['all'].length;t++){
									tid=tids['all'][t].title;
									if(tid.indexOf(dt)==0){fo=tid;break;}
								}
							}
							if(!fo)dt=prompt(l.noMatch.format([dt],(tids['add'].length==0?'':l.justAdded.format([tids['add']]))),dt);
							else ntgs.push(fo);//found? -> add tag
						}
					}			
				}
				if(cs>0&&store.getTiddler(la[cs-1][0]))ntgs.pushUnique(la[cs-1][0]);//subitem -> push parent tag
				la[cs]=[ti,pr];//remember new subitem title & prefix
				lash=cs;//store 'last shift' value
			}else txt+=cul+'\n';//add to content
		}
		//quick-add summary
		if(tids.length==0){
			if(confirm(l.none))story.displayTiddler(null,'quick-add help');
		}else{
			txt=l.listPrefix;
			for(t=0;t<tids.length;t++){//for all added
				nu=tids[t];
				tgs=nu[2].map(function(t){return '<<tag [['+t+']]>>'}).join(',');
				txt+='|<<tag [['+c[nu[3]][0]+']]>>|padding-right:5px;padding-left:'+(nu[1]*20+5)+'px;<<tag [['+nu[0]+']]>>|'+tgs+
					'|<<tiddler scripts##deleteTiddler with: [['+nu[0]+']] [[Recent notes]] norefresh >>|\n';
			}
			tit='quick-add '+when.formatString('YYYY-0MM-0DD 0hh:0mm');//timestamp as summary title 
			store.saveTiddler(tit,tit,txt,who,when,'quickadd',{});//save summary
		}
	}else{//regular note
		tit=this.form.title.value||when.formatString('0DD/MM-YYYY.ugeWW.kl.0hh.mm.0ss');//entered title or timestamp
		tgs.push('note');//add 'note' tag
		if(ok(tit))store.saveTiddler(tit,tit,note,who,when,tgs,{});//if ok -> save
	}
	this.form.note.focus();
	story.refreshTiddler('Recent notes',null,true);
	refreshDisplay();">
</td></tr><tr><td><textarea name='note' title='note text' rows='5' cols='60' style='height:120px;width:99%;float:right;border:1px solid #CCC;'></textarea></td><td>
</td></tr></table>
</form><div id="showNoteList" style="clear:both;width:98%;margin:2px 0 5px 0;padding:2px 1%;display:none;"></div><h1 style="padding-top:0;">Seneste noter</h1></html><<tiddler 'Recent notes'>>/%
!archive
<<tiddlerList tags:"note" order:"-modified" dateFormat:"pppp" itemTemplate:"<<tiddler scripts##deleteTiddler with:'%title' 'Recent notes' norefresh $)): %link (%created) @@padding-left:2em;tags: %tags@@\n">>
!end%/<<tiddler {{
jQuery("#qNotes .button").css({'margin':'0','padding':'0','display':'block'});
jQuery("#qNotes .btn").css({'margin':'0 0 2px 0','clear':'both','z-index':'1','width':'98%','display':'block','float':'right'});
"";}}>>
/***
|Name:|QuickOpenTagPlugin|
|Description:|Changes tag links to make it easier to open tags as tiddlers|
|Version:|3.0.1 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#QuickOpenTagPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|

@@color:red; ((modified for tbGTD(^mod by Tobias Beer ...optionally does not show ~QuickOpenTag-button if there are no tagging tiddlers)))@@

***/
//{{{
config.quickOpenTag = {
	hideIfNoneTagging:true,
	dropdownChar: "\u25be", //(document.all ? "\u25bc" : "\u25be"), // the little one doesn't work in IE?
	createTagButton: function(place,tag,excludeTiddler) {
		// little hack so we can do this: <<tag PrettyTagName|RealTagName>>
		var splitTag = tag.split("|");
		var pretty = tag;
		if (splitTag.length == 2) {
			tag = splitTag[1];
			pretty = splitTag[0];
		}
		var sp = createTiddlyElement(place,"span",null,"quickopentag");
		createTiddlyText(createTiddlyLink(sp,tag,false),pretty);

		if(config.quickOpenTag.hideIfNoneTagging&&store.getTaggedTiddlers(tag).length==0)return; //tbGTD
		var theTag = createTiddlyButton(sp,config.quickOpenTag.dropdownChar,
                        config.views.wikified.tag.tooltip.format([tag]),onClickTag);
		theTag.setAttribute("tag",tag);
		if (excludeTiddler)
			theTag.setAttribute("tiddler",excludeTiddler);
    		return(theTag);
	},

	miniTagHandler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var tid=params[0]?params[0]:tiddler;
		if (!store.getValue(tid,'nominitag')&&store.getTaggedTiddlers(tid.title).length>0) {
			var theTag = createTiddlyButton(place,config.quickOpenTag.dropdownChar,
                        	config.views.wikified.tag.tooltip.format([tid.title]),onClickTag);
			theTag.setAttribute("tag",tid.title);
			theTag.className = "miniTag";
		}
	},

	allTagsHandler: function(place,macroName,params) {
		var tags = store.getTags(params[0]);
		var filter = params[1]; // new feature
		var ul = createTiddlyElement(place,"ul");
		if(tags.length == 0)
			createTiddlyElement(ul,"li",null,"listTitle",this.noTags);
		for(var t=0; t<tags.length; t++) {
			var title = tags[t][0];
			if (!filter || (title.match(new RegExp('^'+filter)))) {
				var info = getTiddlyLinkInfo(title);
				var theListItem =createTiddlyElement(ul,"li");
				var theLink = createTiddlyLink(theListItem,tags[t][0],true);
				var theCount = " (" + tags[t][1] + ")";
				theLink.appendChild(document.createTextNode(theCount));
				var theDropDownBtn = createTiddlyButton(theListItem," " +
					config.quickOpenTag.dropdownChar,this.tooltip.format([tags[t][0]]),onClickTag);
				theDropDownBtn.setAttribute("tag",tags[t][0]);
			}
		}
	},

	// todo fix these up a bit
	styles: [
"/*{{{*/",
"/* created by QuickOpenTagPlugin */",
".tagglyTagged .quickopentag, .tagged .quickopentag {margin-right:1.2em; border:1px solid [[ColorPalette::TertiaryPale]]; padding:2px 0 2px 1px;}",
".quickopentag .tiddlyLink, .quickopentag a.button {padding:1px;margin:0;}",
".miniTag:hover {background:[[ColorPalette::SecondaryLight]]}",
"#displayArea .viewer .quickopentag a.button, ",
"#displayArea .viewer .quickopentag a.tiddyLink {border:0px solid [[ColorPalette::Foreground]];}",
"/*}}}*/",
	""].join("\n"),

	init: function() {
		// we fully replace these builtins. can't hijack them easily
		window.createTagButton = this.createTagButton;
		config.macros.allTags.handler = this.allTagsHandler;
		config.macros.miniTag = { handler: this.miniTagHandler };
		config.shadowTiddlers["QuickOpenTagStyles"] = this.styles;
		store.addNotification("QuickOpenTagStyles",refreshStyles);
	}
}

config.quickOpenTag.init();

//}}}
<<TTReportView DisplayFields:"Upload,AssignedTo,TargetDate">>
/***
|''Name:''|ReminderPlugin|
|''Version:''|2.3.11 (Oct 17, 2009)|
|''Source:''|http://remindermacros.tiddlyspot.com|
|''Author:''|Jeremy Sheeley(pop1280 [at] excite [dot] com) / Modded: Tobias Beer|
|''Licence:''|[[BSD open source license]]|
|''Macros:''|reminder, showreminders, displayTiddlersWithReminders, newReminder|
|''TiddlyWiki:''|2.0+|
|''Browser:''|Firefox 1.0.4+; InternetExplorer 6.0|
@@color:red;massively modded for tbGTD!  ...shrinked code| dateformat | list format + prefix@@
!Description
This plugin provides macros for tagging a date with a reminder. Use the {{{reminder}}} macro to do this. 
The macros {{{showReminders}}} and {{{displayTiddlersWithReminder}}} search through all available tiddlers looking for upcoming reminders.
!Code
***/
//{{{
version.extensions.ReminderPlugin={major:2,minor:3,revision:11,date:new Date(209,10,17),source:"http://remindermacros.tiddlyspot.com/"};

//========== Configuration... modify this section to change the defaults for  leadtime and display strings
config.macros["reminder"]={};
config.macros["newReminder"]={};
config.macros["showReminders"]={};
config.macros["displayTiddlersWithReminders"]={};

config.macros.reminders={
	defaultLeadTime:[0,6000],
	defaultReminderMessagePrefix:"@@padding-right:5px;color:"+store.getTiddlerSlice('ColorPalette','SecondaryMid')+";''påmindelse&#58;''@@",
	defaultReminderMessage:"DATE ANNIVERSARY @@color:"+store.getTiddlerSlice('ColorPalette','TertiaryMid')+";(DIFF)@@@@padding:0 3px;TITEL@@",
	defaultShowReminderMessagePrefix:"|noborder|k\n", //|__''hvornår''__|__''hvad''__|__''tiddler''__|\n",
	defaultShowReminderMessage:"|DATE ANNIVERSARY @@color:"+store.getTiddlerSlice('ColorPalette','TertiaryMid')+";(DIFF)@@|TITEL|TIDDLER|",
	defaultAnniversaryMessage:"(DIFF)",
	untitledReminder:"Unavngivet påmindelse",
	noReminderFound:"Kunne ikke finde et match for TITEL i de næste LEADTIMEUPPER dage.",
	todayString:"i dag",
	tomorrowString:"i morgen",
	ndaysString:"DIFF dage",
	dateFormat:"MMM. DD",
	emtpyShowRemindersString:"ingen kommende begivenheder",
	txtRemindTip:"åben en formular for at tilføje en ny påmindelse til denne tiddler",
	txtRemind:"påmind",
	txtTitle:"Skriv en titel",
	txtEachYear:"Hvert år",
	txtEachMonth:"Hver måned",
	txtEachDay:"Hver dag"
}

//========== Code... no need to edit below!
//holds the cache of reminders, so that we don't recompute the same reminder over again
var reminderCache={};
config.macros.showReminders.handler=function showReminders(place,macroName,params){
	var lead=[0,14];
	var now=new Date().getMidnight();
	var r=getParamsForReminder(params);
	var hasDate=r["år"]!=null||r["måned"]!=null||r["dag"]!=null||r["ugedag"]!=null;
	if(r["periode"]!=null){
		lead=r["periode"];
		//If they've entered a day, we need to make sure to find it
		if(hasDate)r["periode"]=[-10000,10000];
	}
	var match=now;
	if(hasDate){
		var LBound=new Date().getMidnight().addDays(r["periode"][0]);
		var UBound=new Date().getMidnight().addDays(r["periode"][1]);
		match=findDateForReminder(r,new Date().getMidnight(),LBound,UBound);
	}
	
	var arr=findTiddlersWithReminders(match,lead,r["tag"],r["limit"]);
	var el=createTiddlyElement(place,"span",null,null,null);
	var msg="";
	c=config.macros.reminders;
	if(arr.length==0)msg+=c.emtpyShowRemindersString;
	else msg+=!r["format"]||r["format"]&&!r["formatprefix"]?c.defaultShowReminderMessagePrefix:r["formatprefix"]; //tbGTD
	for(var x=0;x<arr.length;x++){
		var t=arr[x];
	  if(r["format"]!=null)t["params"]["format"]=r["format"];
	  else arr[x]["params"]["format"]=c.defaultShowReminderMessage;
	  msg+=getReminderMessageForDisplay(t["diff"],t["params"],t["matchedDate"],t["tiddler"]);
	  msg+="\n";
	}
	wikify(msg,el,null,null);
};


config.macros.displayTiddlersWithReminders.handler=function displayTiddlersWithReminders(place,macroName,params){
	var now=new Date().getMidnight();
	var lead=[0,14];
	var r=getParamsForReminder(params);
	var hasDate=r["år"]!=null||r["måned"]!=null||r["dag"]!=null||r["ugedag"]!=null;
	if(r["periode"]!=null){
		lead=r["periode"];
		//If they've entered a day, make sure to find it 
		if(hasDate)r["periode"]=[-10000,10000];
	}
	var match=now;
	if(hasDate){
		var LBound=new Date().getMidnight().addDays(r["periode"][0]);
		var UBound=new Date().getMidnight().addDays(r["periode"][1]);
		match=findDateForReminder(r,new Date().getMidnight(),LBound,UBound);
	}
	var arr=findTiddlersWithReminders(match,lead,r["tag"],r["limit"]);
	for(var x=0;x<arr.length;x++)displayTiddler(null,arr[x]["tiddler"],0,null,false,false,false);
};

config.macros.reminder.handler=function reminder(place,macroName,params){
	var set=config.macros.reminders;
	var r=getParamsForReminder(params);
	if(r["hidden"]!=null)return;
	var lead=r["periode"];
	var c=config.macros.reminders;
	if(lead==null)lead=c.defaultLeadTime;
	var LBound=new Date().getMidnight().addDays(lead[0]);
	var UBound=new Date().getMidnight().addDays(lead[1]);
	var match=findDateForReminder(r,new Date().getMidnight(),LBound,UBound);
	var tid=story.findContainingTiddler(place);if(!tid)return;
	var title=tid.getAttribute('tiddler');
	if(match!=null){
		var diff=match.getDifferenceInDays(new Date().getMidnight());
		var el=createTiddlyElement(place,"span",null,set.txtRemind,null);
		var msg=c.defaultReminderMessagePrefix+getReminderMessageForDisplay(diff,r,match,title);
		wikify(msg,el,null,null);
	}else createTiddlyElement(place,"span",null,"remind",c.noReminderFound.replace("TITEL",r["titel"]).replace("LEADTIMEUPPER",lead[1]).replace("LEADTIMELOWER",lead[0]).replace("TIDDLERNAME",title).replace("TIDDLER","[["+title+"]]"));
}

config.macros.newReminder.handler=function newReminder(place,macroName,params){
  var set=config.macros.reminders;
  var today=new Date().getMidnight();
  var out='<html><form id="addReminderForm"><select name="år"><option value="">'+set.txtEachYear+'</option>';
  for(var i=0;i<5;i++)
		out+='<option'+(i==0?' selected':'')+' value="'+(today.getFullYear()+i)+'">'+(today.getFullYear()+i)+'</option>';
		out+='</select><select name="måned"><option value="">'+set.txtEachMonth+'</option>';
  for(i=0;i<12;i++)
		out+='<option'+(i==today.getMonth()?' selected':'')+' value="'+(i+1)+'">'+config.messages.dates.months[i]+'</option>';
		out+='</select><select name="dag"><option value="">'+set.txtEachDay+'</option>';
  for(i=1;i<32;i++)
		out+='<option'+(i==today.getDate()?' selected':'')+' value="'+i+'">'+i+'</option>';
		out+='</select><input type="text" size="25" name="titel" value="'+set.txtTitle+'" onfocus="this.select();"><input type="button" value="ok" onclick="addReminderToTiddler(this.form)"></form></html>';
  var panel=config.macros.slider.createSlider(place,null,set.txtRemind,set.txtRemindTip);
  wikify(out,panel,null,store.getTiddler(params[1]));
}

// onclick: process input and insert reminder at 'marker'
window.addReminderToTiddler=function(form){
	if(!store.getTiddler)store.getTiddler=function(title){return this.tiddlers[title];};
	var title=story.findContainingTiddler(form).getAttribute('tiddler');
	var tiddler=store.getTiddler(title);
	var add='\n<<reminder ';
	if(form.year.value!="")add+='år:'+form.year.value+' ';
	if(form.month.value!="")add+='måned:'+form.month.value+' ';
	if(form.day.value!="")add+='dag:'+form.day.value+' ';
	add+='titel:"'+form.title.value+'" ';
	add+='>>';
	tiddler.set(null,tiddler.text+add);
	form.parentNode.parentNode.previousSibling.onclick(); //tbGTD: close form when done processing
	story.refreshTiddler(title,1,true);
	store.setDirty(true);
};

function hasTag(tags,filters){
	//Make sure we respond well to empty tiddlerTaglists or tagFilterlists
	if(filters.length==0||tags.length==0)return true;
	var bHasTag=false;
	var bNoPos=true;
	for(var t3=0;t3<filters.length;t3++){
		for(var t2=0;t2<tags.length;t2++){
			if(filters[t3].length>1&&filters[t3].charAt(0)=='!'){
				//If at any time a negative filter is matched, we return false
				if(tags[t2]==filters[t3].substring(1))return false;
			}else{
				//We encountered the first positive filter
				if(bNoPos)bNoPos=false;
				//A positive filter is matched. As long as no negative filter is matched, hasTag will return true
				if(tags[t2]==filters[t3])bHasTag=true;
			}
		}
	}
	return (bNoPos||bHasTag);
};

window.findTiddlersWithReminders=function findTiddlersWithReminders(base,lead,tags,limit){
	var expr=new RegExp("<<(reminder)(.*)>>","mg");
	var matches=store.search(expr,"titel","");
	var arr=[];
	var arrTags=null;
	//allows tags with spaces. thanks Robin Summerhill, 4-Oct-06.
	if(tags!=null)arrTags=tags.readBracketedList();
	for(var t=matches.length-1;t>=0;t--){
		if(arrTags!=null&&!hasTag(matches[t].tags,arrTags))continue;
		var targetText=matches[t].text;
		do{
			// Get the next formatting match
			var match=expr.exec(targetText);
			if(match&&match[1]!=null&&match[1].toLowerCase()=="reminder"){
				//Find the matching date.
				var params=match[2]!=null ? match[2].readMacroParams():{};
				var r=getParamsForReminder(params);
				if(limit!=null||r["periode"]==null){
					if(lead==null)r["periode"]=lead;
					else{
						r["periode"]=[];
						r["periode"][0]=lead[0];
						r["periode"][1]=lead[1];
					}
				}
				if(r["periode"]==null)r["periode"]=config.macros.reminders.defaultLeadTime;
				var LBound=base.addDays(r["periode"][0]);
				var UBound=base.addDays(r["periode"][1]);
				var found=findDateForReminder(r,base,LBound,UBound);
				while(found!=null){
					var tmp={};
					tmp["diff"]=found.getDifferenceInDays(base);
					tmp["matchedDate"]=new Date(found.getFullYear(),found.getMonth(),found.getDate(),0,0);
					tmp["params"]=cloneParams(r);
					tmp["tiddler"]=matches[t].title;
					tmp["tags"]=matches[t].tags;
					arr.pushUnique(tmp);
					if(r["gentagnedage"]!=null||(r["år"]==null)){
						LBound=LBound.addDays(found.getDifferenceInDays(LBound)+ 1);
						found=findDateForReminder(r,base,LBound,UBound);
					}
					else found=null;
				}
			}
		}while(match);
	}
	//Sort the array by number of days remaining
	if(arr.length>1)arr.sort(function(a,b){if(a["diff"]==b["diff"])return(0);else return a["diff"]<b["diff"]?-1:+1;});
	return arr;
};

//Takes the reminder macro parameters and generates the string that is used for display ...not intended to be called by other plugins.
window.getReminderMessageForDisplay= function getReminderMessageForDisplay(diff,params,match,tid){
	var c=config.macros.reminders;
	var anniv="";
	var reminderTitle=params["titel"];
	if(reminderTitle==null)reminderTitle=c.untitledReminder;
	if(params["firstyear"]!=null)anniv=c.defaultAnniversaryMessage.replace("DIFF",(match.getFullYear()-params["firstyear"]));
	var sDiff="";
	if(diff==0)sDiff=c.todayString;
	else if(diff==1)sDiff=c.tomorrowString;
	else sDiff=c.ndaysString.replace("DIFF",diff);
	msg=params["format"]!=null?params["format"]:c.defaultReminderMessage;
	msg=msg.replace(/TIDDLER/g,"TIDELER"); //Avoid replacing DD in TIDDLER with the date
	msg=match.formatStringDateOnly(msg);
	msg=msg.replace(/TIDELER/g,"TIDDLER");
	if(tid!=null){
		msg=msg.replace(/TIDDLERNAME/g,tid);
		msg=msg.replace(/TIDDLER/g,"[["+tid+"]]");
	}
	msg=msg.replace("DIFF",sDiff).replace("TITEL",reminderTitle).replace("DATE",match.formatString("mmm. 0DD")).replace("ANNIVERSARY",anniv);
	return msg;
};

// Parse macro params into a hashtable.  This handles the arguments for reminder, showReminders and displayTiddlersWithReminders
window.getParamsForReminder=function getParamsForReminder(params){
	var r={};
	var type="";
	var num=0;
	var title="";
	for(var p=0;p<params.length;p++){
		var split=params[p].split(":");
		type=split[0].toLowerCase();
		var value=split[1];
		for(var i=2;i<split.length;i++)value+=":"+split[i];
		if(type=="nolinks"||type=="limit"||type=="hidden")num=1;
		else if(type=="periode"){
			var leads=value.split("...");
			if(leads.length==1){leads[1]=leads[0];leads[0]=0;}
			leads[0]=parseInt(leads[0],10);
			leads[1]=parseInt(leads[1],10);
			num=leads;
		}
		else if(type=="startugedag"){
			if(value.substr(0,1)=="-"){r["negativeOffsetDayOfWeek"]=1;value=value.substr(1);}
			num=parseInt(value,10);
		}
		else if(type!="titel"&&type!="tag"&&type!="format")num=parseInt(value,10);
		else{
			p++;
			title=value;
			while(title.substr(0,1)=='"'&&title.substr(title.length-1,1)!='"'&&params[p]!=undefined)title+= " "+params[p++];
			//Trim off the leading and trailing quotes
			if(title.substr(0,1)=="\""&&title.substr(title.length-1,1)== "\""){
			  title=title.substr(1,title.length-2);
			  p--;
			}
			num=title;
		}
		r[type]=num;
	}
	//date is synonymous with day
	if(r["dag"]==null)r["dag"]=r["date"];
	return r;
};

//Finds the date specified in the reminder params; returns null if no match found; not intended for use by other plugins
window.findDateForReminder= function findDateForReminder(r,base,LBound,UBound){
	if(base==null)base=new Date().getMidnight();
	var key=base.convertToYYYYMMDDHHMM();
	for(var k in r)key+=","+k+"|"+r[k];
	key+=","+LBound.convertToYYYYMMDDHHMM();
	key+=","+UBound.convertToYYYYMMDDHHMM();
	//If we don't find a match in this run, then cache that the reminder can't be matched
	if(reminderCache[key]==null)reminderCache[key]=false;
	//We've already tried this date and failed
	else if(reminderCache[key]==false)return null;
	else return reminderCache[key];
	var bOffsetSpecified=
		r["startår"]!=null||
		r["startmåned"]!=null||
		r["startdag"]!=null||
		r["startugedag"]!=null||
		r["gentagnedage"]!=null;
	// If matching the base date for a dayofweek offset, look for the base date a little further back.
	var tmp1LBound=LBound;
	if(r["startugedag"]!=null)tmp1LBound=LBound.addDays(-6);
	var match=base.findMatch(r,tmp1LBound,UBound);
	if(match!=null){
		var newMatch=match;
		if(r["gentagnedage"]!=null)
			while(newMatch.getTime()<LBound.getTime())newMatch=newMatch.addDays(r["gentagnedage"]);
		else if(
				r["startår"]!=null||
				r["startmåned"]!=null||
				r["startdag"]!=null||
				r["startugedag"]!=null){
			var tmp=cloneParams(r);
			tmp["år"]=r["startår"];
			tmp["måned"]=r["startmåned"];
			tmp["dag"]=r["startdag"];
			tmp["ugedag"]=r["startugedag"];
			var tmpL=LBound;
			var tmpU=UBound;
			if(tmp["startugedag"]!=null){
				if(tmp["negativeOffsetDayOfWeek"]==1){
					tmpL=match.addDays(-6);
					tmpU=match;
				}else{
					tmpL=match;
					tmpU=match.addDays(6);
				}
			}
			newMatch=match.findMatch(tmp,tmpL,tmpU);
			//The offset couldn't be matched.  return null.
			if(newMatch==null)return null;
		}
		if(newMatch.isBetween(LBound,UBound)){
		  reminderCache[key]=newMatch;
		  return newMatch;
		}
	}
	return null;
};

//Does the same job as findDateForReminder, but doesn't deal with offsets or recurring reminders.
Date.prototype.findMatch=function findMatch(r,LBound,UBound){
	var Y=(r["år"]!=null);
	var M=(r["måned"]!=null);
	var D=(r["dag"]!=null);
	var W=(r["ugedag"]!=null);
	if(D&&M&&Y)return new Date(r["år"],r["måned"]-1,r["dag"],0,0);
	if(D&&M&&!Y&&!W){
		//Shortcut: first try this year... if too small, try next year
		var tmp=new Date(this.getFullYear(),r["måned"]-1,r["dag"],0,0);
		if(tmp.getTime()<LBound.getTime())tmp=new Date((this.getFullYear()+1),r["måned"]-1,r["dag"],0,0);
		if(tmp.isBetween(LBound,UBound))return tmp;
		else return null;
	}
	var newDate=LBound;
	while(newDate.isBetween(LBound,UBound)){
		var test=testDate(newDate,r,Y,M,D,W);
		if(test!=null)return test;
		newDate=newDate.addDays(1);
	}
}

function cloneParams(p){var tmp={};for(var i in p)tmp[i]=p[i];return tmp;}
function testDate(str,d,Y,M,D,W){if((!Y&&d["år"]==str.getFullYear())&&(!M&&(d["måned"]-1)==str.getMonth())&&(!D&&d["dag"]==str.getDate())&&(!W&&d["ugedag"]==str.getDay())) return str;}
//Returns true if the date is in between two given dates
Date.prototype.isBetween=function isBetween(lowerBound,upperBound){return(this.getTime()>=lowerBound.getTime()&&this.getTime()<=upperBound.getTime());}
//Return a new date, with the time set to midnight (0000)
Date.prototype.getMidnight=function getMidnight(){return new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0);}
//Add the specified number of days to a date
Date.prototype.addDays=function addDays(numberOfDays){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+numberOfDays,0,0);}
//Return the number of days between two dates
Date.prototype.getDifferenceInDays=function getDifferenceInDays(d){
	//ignores daylight savings
	var tmp=this.addDays(0);
	if(this.getTime()>d.getTime()){for(var i=0;tmp.getTime()>d.getTime();i++)tmp=tmp.addDays(-1);return i;}
	else{for(var i=0;tmp.getTime()<d.getTime();i++)tmp=tmp.addDays(1);return i*-1;}
	return 0;
}
//Substitute date components into a string
Date.prototype.formatStringDateOnly=function formatStringDateOnly(d){
	d=d.replace("YYYY",this.getFullYear());
	d=d.replace("YY",String.zeroPad(this.getFullYear()-2000,2));
	d=d.replace("MMM",config.messages.dates.months[this.getMonth()]);
	d=d.replace("0MM",String.zeroPad(this.getMonth()+1,2));
	d=d.replace("MM",this.getMonth()+1);
	d=d.replace("DDD",config.messages.dates.days[this.getDay()]);
	d=d.replace("0DD",String.zeroPad(this.getDate(),2));
	d=d.replace("DD",this.getDate());
	return d;
};

//}}}
/***
|Name:|RenameTagsPlugin|
|Description:|Allows you to easily rename or delete tags across multiple tiddlers|
|Version:|3.0 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#RenameTagsPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
Rename a tag and you will be prompted to rename it in all its tagged tiddlers.
***/
//{{{
config.renameTags = {

	prompts: {
		rename: "Rename the tag '%0' to '%1' in %2 tidder%3?",
		remove: "Remove the tag '%0' from %1 tidder%2?"
	},

	removeTag: function(tag,tiddlers) {
		store.suspendNotifications();
		for (var i=0;i<tiddlers.length;i++) {
			store.setTiddlerTag(tiddlers[i].title,false,tag);
		}
		store.resumeNotifications();
		store.notifyAll();
	},

	renameTag: function(oldTag,newTag,tiddlers) {
		store.suspendNotifications();
		for (var i=0;i<tiddlers.length;i++) {
			store.setTiddlerTag(tiddlers[i].title,false,oldTag); // remove old
			store.setTiddlerTag(tiddlers[i].title,true,newTag);  // add new
		}
		store.resumeNotifications();
		store.notifyAll();
	},

	storeMethods: {

		saveTiddler_orig_renameTags: TiddlyWiki.prototype.saveTiddler,

		saveTiddler: function(title,newTitle,newBody,modifier,modified,tags,fields) {
			if (title != newTitle) {
				var tagged = this.getTaggedTiddlers(title);
				if (tagged.length > 0) {
					// then we are renaming a tag
					if (confirm(config.renameTags.prompts.rename.format([title,newTitle,tagged.length,tagged.length>1?"s":""])))
						config.renameTags.renameTag(title,newTitle,tagged);

					if (!this.tiddlerExists(title) && newBody == "")
						// dont create unwanted tiddler
						return null;
				}
			}
			return this.saveTiddler_orig_renameTags(title,newTitle,newBody,modifier,modified,tags,fields);
		},

		removeTiddler_orig_renameTags: TiddlyWiki.prototype.removeTiddler,

		removeTiddler: function(title) {
			var tagged = this.getTaggedTiddlers(title);
			if (tagged.length > 0)
				if (confirm(config.renameTags.prompts.remove.format([title,tagged.length,tagged.length>1?"s":""])))
					config.renameTags.removeTag(title,tagged);
			return this.removeTiddler_orig_renameTags(title);
		}

	},

	init: function() {
		merge(TiddlyWiki.prototype,this.storeMethods);
	}
}

config.renameTags.init();

//}}}
/***
|''Name''|Schedule|
|''Description''| Creates a rolling schedule displayed either as a timetable or an agenda.|
|''Author''|Michael Borck|
|''Version''|0.5.3|
|''Date''|7 Dec 2008|
|''Status''|@@beta@@|
|''Source''|http://schedule.tiddlyspot.com/|
|''Copyright''|2008|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]] |
|''Requires''|ReminderMacros see http://remindermacros.tiddlyspot.com |
|''Optional''|DatePickerLibrary see http://svn.tiddlywiki.org/Trunk/contributors/SaqImtiaz/libraries/DatePicker.js <br> Sparklines
http://www.tiddlywiki.com/coreplugins.html|
|''Feedback''|borck.m@gmail.com|
|''CoreVersion''|2.4|
|''Documentation''|See [[ScheduleInfo]] for usage <br> http://schedule.tiddlyspot.com for API|
|''Type''|Macro|
|''Keywords''|timetable, schedule, appointments, hard landscape, macro|
!!!Code
***/
//{{{
if (!version.extensions.schedule) {
	version.extensions.schedule = {
		major: 0,
		minor: 5,
		revision: 3,
		date: new Date(2008, 7, 12),
		source: "http://schedule.tiddlyspot.com/"
	};

	config.macros.schedule = {
		handler: function(place, macroName, params, wikifier, paramString, tiddler) {
			var args = paramString.parseParams(null, null, true);
			switch (getParam(args, "view", "agenda")) {
			case "timetable":
				var timetable = new config.macros.schedule.Timetable(place, args);
				delete timetable;
				break;
			case "agenda":
				var agenda = new config.macros.schedule.Agenda(place, args);
				delete agenda;
				break;
			default:
				displayMessage("SchedulPlugin: error unkown schedule view");
			}
		}
	};
	config.macros.schedule.Schedule = function(place, args) {
		this.place = place;
		this.isShadow = (getParam(args, "shadow", "on") === "on");
		this.step = parseInt(getParam(args, "step", 1), 10);
		this.isSparks = getParam(args, "sparklines", undefined);
		this.duration = parseInt(getParam(args, "duration", 7), 10);
		this.span = parseInt(getParam(args, "span", 12), 10);
		this.span = this.span > 24 ? 24 : this.span; // silently change!
		this.today = new Date();
		this.epoch = new Date(getParam(args, "date", new Date()));
		this.hourFrom = parseInt(getParam(args, "hourFrom", this.today.getHours()), 10);
		if (this.duration < 0) { // from the past?
			this.epoch.addN(this.duration);
			this.duration = -this.duration;
		}
		this.date = new Date(this.epoch); // epoch changes, save for reset
		this.shading = new config.macros.schedule.Shadings(args);
		this.events = new
		config.macros.schedule.Events(getParam(args, "defTime", "09:00"));
		this.eveningStart = getParam(args, "eveningStart", "18");
		this.dayStart = getParam(args, "dayStart", "06");
		this.control = createTiddlyElement(this.place, "div");

		this.timeNow = this.today.getHHMM();
		this.isPast = this.epoch.isBefore(this.today);
		this.isToday = this.epoch.isEqual(this.today);
		this.isWeekend = this.epoch.isWeekend();

		this.nextPeriod = function(n) {
			this.epoch.addN(n);
			this.isPast = this.epoch.isBefore(this.today);
			this.isToday = this.epoch.isEqual(this.today);
			this.isWeekend = this.epoch.isWeekend();
		};

		this.isOutOfHours = function(hour) {
			return String.zeroPad(hour, 2) >= this.eveningStart || String.zeroPad(hour, 2) <= this.dayStart;
		};

		this.showSparks = function(place, sparks, colorAsToday) {
			var sparkDiv = createTiddlyElement(place, "div", "spark");
			if (config.macros.sparkline) {
				config.macros.sparkline.handler(sparkDiv, null, sparks);
				var sparkGraph = sparkDiv.getElementsByTagName("span");
				this.shading.styleBackground(sparkGraph[0], this.isWeekend, colorAsToday, false, this.isShadow);
				var ticks = sparkGraph[0].getElementsByTagName("img");
				for (var i = 0; i < ticks.length; i++) {
					this.shading.styleAsBlock(ticks[i], this.isToday, false, false);
				}
			}
			return sparkDiv;
		};

		this.addControls = function(that) {
			var adjust = function(n) {
				removeChildren(that.body);
				that.date.addN(n);
				that.epoch = new Date(that.date);
				that.isPast = that.epoch.isBefore(that.today);
				that.isToday = that.epoch.isEqual(that.today);
				that.isWeekend = that.epoch.isWeekend();
				that.make();
				return false;
			};
			var fwdDay = function() {
				return adjust(1);
			};
			var fwdDur = function() {
				return adjust(that.duration);
			};
			var backDay = function() {
				return adjust( - 1);
			};
			var backDur = function() {
				return adjust( - that.duration);
			};
			var controls = createTiddlyElement(this.control, "div");
			createTiddlyButton(controls, "<<", "-" + this.duration + " Days", backDur);
			createTiddlyButton(controls, "<", "-1 Day", backDay);
			createTiddlyButton(controls, ">", "+1 Day", fwdDay);
			createTiddlyButton(controls, ">>", "+" + this.duration + " Days", fwdDur);
		};

		this.make = function() {
			var endWant = this.hourFrom + this.span;
			var start = endWant > 24 ? 0 : this.hourFrom;
			var end = endWant > 24 ? endWant - 24 : endWant; //mod op error in TW
			this.makeSchedule(start, end);
			if (endWant > 24) { // We need a second table
				this.nextPeriod( - this.duration);
				this.makeSchedule(this.hourFrom, 24);
			}
		};
	};

	String.HHMM = function(hour, mins) {
		return String.zeroPad(hour, 2) + ":" + String.zeroPad(mins, 2);
	};

	config.macros.schedule.Agenda = function(place, args) {
		this.base = config.macros.schedule.Schedule;
		this.base(place, args);
		this.isSparks = this.isSparks ? this.isSparks === "on": true;
		this.addControls(this);
		this.body = createTiddlyElement(place, "div");
		// from CalendarPlugin (thanks)
		this.journalDateFmt = "YYYY/MMM/DD";
		var text = store.getTiddlerText("SideBarOptions");
		var re = new RegExp("<<(?:newJournal)([^>]*)>>", "mg");
		var fm = re.exec(text);
		if (fm && fm[1] !== null) {
			var pa = fm[1].readMacroParams();
			if (pa[0]) {
				this.journalDateFmt = pa[0];
			}
		}
		for (var i = 0; i < this.duration; i += this.step) {
			this.make();
			this.nextPeriod(this.step);
		}
	};

	config.macros.schedule.Agenda.prototype.makeSchedule = function(start, end) {
		this.events.cache(this.epoch);
		this.makeHeader(start, end);
		var isActive = (this.timeNow <= start);
		for (var i = 0; i < this.events.list.length; i++) {
			var event = this.events.list[i];
			if ((event.start >= String.HHMM(start, "00")) && (event.end <= String.HHMM(end, "00"))) {
				var cell = createTiddlyElement(this.body, "div");
				var link = createTiddlyLink(cell, event.tiddler, false);
				var text = event.title ? event.title: event.tiddler;
				link.appendChild(document.createTextNode(text));
				if ((event.end < this.timeNow && this.isToday) || this.isPast) {
					link.style.color = this.eventPast;
				}
				var hour = event.start.split(":")[0];
				this.shading.styleBackground(cell, this.isWeekend || this.isOutOfHours(hour), this.isToday, isActive, this.isPast, this.isShadow);
			}
		}
	};

	config.macros.schedule.Agenda.prototype.makeHeader = function(start, end) {
		var day = createTiddlyElement(this.body, "h3");
		var text = this.epoch.formatString(this.journalDateFmt);
		if (this.isSparks) {
			var sparks = this.events.count(start, end, this.detail);
			var graph = this.showSparks(day, sparks, false);
		}
		else {
			graph = createTiddlyElement(day, "div", "spark");
		}
		createTiddlyLink(graph, text, true);
	};

	config.macros.schedule.Timetable = function(place, args) {
		this.base = config.macros.schedule.Schedule;
		this.base(place, args);
		this.isSparks = this.isSparks ? (this.isSparks === "on") : false;
		this.addControls(this);
		this.table = createTiddlyElement(this.place, "table", null, "bordersOff", null);
		this.wrap = createTiddlyElement(this.table, "tbody");
		this.body = createTiddlyElement(this.wrap, "tr");
		switch (getParam(args, "detail", "medium")) {
		case "low":
			this.detail = 60;
			break;
		case "high":
			this.detail = 15;
			break;
		default:
			this.detail = 30;
		}
		this.make();
	};

	config.macros.schedule.Timetable.prototype.makeSchedule = function(start, end) {
		var cell = createTiddlyElement(this.body, "td"); // Holds 1st/only table
		var table = createTiddlyElement(cell, "table", null, "bordersOff", null);
		var body = createTiddlyElement(table, "tbody");
		var row = createTiddlyElement(body, "tr");
		this.makeHeader(row, start, end);
		for (var i = 0; i < this.duration; i += this.step) {
			row = createTiddlyElement(body, "tr");
			this.makeDay(row, start, end);
			this.nextPeriod(this.step);
		}
	};

	config.macros.schedule.Timetable.prototype.makeHeader = function(head, start, end) {
		createTiddlyElement(head, "td"); //cell above day names
		for (var h = start; h < end; h++) {
			for (var m = 0; m < 60; m += this.detail) {
				var hour = String.zeroPad(h, 2);
				var time = createTiddlyElement(head, "td", null, "bordersOff", m === 0 ? hour: "");
				if ((hour < String.zeroPad(this.dayStart, 2)) || (hour > String.zeroPad(this.eveningStart, 2))) {
					time.style.background = this.shading.outOfHours;
				}
			}
		}
	};

	config.macros.schedule.Timetable.prototype.makeDay = function(day, start, end) {
		var title = createTiddlyElement(day, "td", null, null, null);
		var text = this.epoch.getDate() + " " + this.epoch.dayName();
		createTiddlyElement(title, "p", null, null, text);
		//var isActive = (this.timeNow <= start);
		this.shading.styleBackground(title, this.isWeekend, this.isToday, true, this.isPast, this.isShadow);
		this.events.cache(this.epoch);
		this.events.sizeIndex(this.detail);
		var sparks = []
		for (var h = start; h < end; h++) {
			sparks[h - start] = 0;
			for (var m = 0; m < 60; m += this.detail) {
				var startBdry = String.HHMM(h, m);
				var mins = m + this.detail;
				var next = mins === 60 ? h + 1 : h;
				var endBdry = String.HHMM(next, (mins === 60 ? "00": mins));
				this.events.addStarting(startBdry, endBdry);
				sparks[h - start] += this.showActive(day, startBdry);
				this.events.removeEnding(startBdry, endBdry);
			}
		}
		if (this.isSparks) {
			this.showSparks(title, sparks, this.isToday);
		}
	};

	config.macros.schedule.Timetable.prototype.showActive = function(day, start) {
		var count = 0;
		var isActive = (this.timeNow <= start);
		var slot = createTiddlyElement(day, "td", null, "bordersOff", null);
		this.shading.styleBackground(slot, this.isOutOfHours(start) || this.isWeekend, this.isToday, isActive, this.isPast, this.isShadow);
		for (var i = 0; i < this.events.index.length; i++) {
			var p = createTiddlyElement(slot, "p", null, null, ".");
			if (this.events.index[i]) {
				count++;
				p.title = this.events.list[this.events.index[i] - 1].title;
				this.shading.styleAsBlock(p, this.isToday, isActive, this.isPast);
			}
			else { // fake empty entry so events 'line up'
				p.style.visibility = "hidden";
			}
		}
		return count;
	};

	config.macros.schedule.Events = function(time) {
		this.defaultTime = time;
		this.list = [];
		this.index = [];
	};

	config.macros.schedule.Events.prototype.cache = function(epoch) {
		this.list = [];
		var items = findTiddlersWithReminders(epoch, [0, 1], null, 1);
		var validTime = /(2[0-3]|[01][0-9]):[0-5][0-9]/g;
		for (var i = 0; i < items.length; i++) {
			if (items[i].diff < 1) { // today?
				var event = {};
				event.tiddler = items[i].tiddler;
				event.title = items[i].params.titel ? items[i].params.titel: items[i].tiddler;
				event.start = this.defaultTime;
				event.end = this.defaultTime;
				if (items[i].params.titel) {
					var m = items[i].params.titel.match(validTime);
					if (m) // found at least one valid time in title
					{
						event.start = m[0]; // first match is start time
						event.end = m[1] ? m[1] : m[0];
					}
				}
				this.list.push(event);
			}
		}
		this.list = this.list.sort(function byStart(a, b) {
			return a.start > b.start;
		});
	};

	config.macros.schedule.Events.prototype.sizeIndex = function(detail) {
		this.index = [];
		var max = 0;
		for (var h = 0; h < 24; h++) {
			var clashes = 0;
			for (var m = 0; m < 60; m += detail) {
				var start = String.HHMM(h, m);
				var next = ((m + detail) === 60 ? (h + 1) : h);
				var end = String.HHMM(next, ((m + detail) === 60 ? "00": m + detail));
				for (var i = 0; i < this.list.length; i++) {
					var event = this.list[i];
					if (event.start >= start && event.start < end) {
						clashes++;
						max = max < clashes ? clashes: max;
					}
					else if (event.end > start && event.end <= end) {
						clashes--;
					}
				}
			}
		}
		this.index.length = max;
	};

	config.macros.schedule.Events.prototype.addStarting = function(start, end) {
		for (var i = 0; i < this.list.length; i++) {
			if (this.list[i].start >= start && this.list[i].start < end) {
				var j = 0;
				while (j < this.index.length && !this.index.contains(i + 1)) {
					if (!this.index[j]) // non zero true
					{
						this.index[j] = i + 1; // store non-zero!
					}
					j++;
				}
			}
		}
	};

	config.macros.schedule.Events.prototype.removeEnding = function(start, end) {
		for (var i = 0; i < this.list.length; i++) {
			var eventEnd = this.list[i].end;
			var eventStart = this.list[i].start;
			if (isEnding(this.index)) {
				this.index[this.index.indexOf(i + 1)] = 0;
			}
		}

		function isEnding(index) {
			return (((eventEnd > start && eventEnd <= end) || ((eventEnd === eventStart) && (eventEnd === start)) || ((eventEnd.split(":")[0] === 23) && (eventEnd === start))) && (index.contains(i + 1)));
		};
	};

	config.macros.schedule.Events.prototype.count = function(start, end, detail) {
		var sparks = [];
		for (var h = start; h < end; h++) {
			sparks[h - start] = 0;
			for (var m = 0; m < 60; m += detail) {
				var startBdry = String.HHMM(h, m);
				var next = ((m + detail) === 60 ? (h + 1) : h);
				var endBdry = String.HHMM(next, ((m + detail) === 60 ? "00": m + detail));
				for (var i = 0; i < this.list.length; i++) {
					var event = this.list[i];
					if ((event.start >= startBdry && event.start < endBdry) || (event.start < startBdry && event.end > endBdry)) {
						sparks[h - start]++;
					}
					else if (event.endBdry > start && event.end <= endBdry) {
						sparks[h - start]--;
					}
				}
			}
		}
		return sparks;
	};

	config.macros.schedule.Shadings = function(args) {
		this.activeEvent = getParam(args, "activeEvent", "#ccf");
		this.eventPast = getParam(args, "eventPast", "#edf");
		this.outOfHours = getParam(args, "outOfHours", "#efe");
		this.todayOOH = getParam(args, "todayOOH", "#eee");
		this.todayFocus = getParam(args, "todayFocus", "#eef");
		this.inPast = getParam(args, "inPast", "#eff");
		this.inFocus = getParam(args, "inFocus", "#eef");
	};

	config.macros.schedule.Shadings.prototype.styleBackground = function(cell, isOutOfHours, isToday, isActive, isPast, isShadow) {
		cell.style.background = "white";
		if (isOutOfHours) {
			cell.style.background = this.outOfHours;
		}
		if (isToday) {
			cell.style.background = this.todayFocus;
		}
		if (isToday && isOutOfHours) {
			cell.style.background = this.todayOOH;
		}
		if (isPast || (isToday && !isActive && isShadow)) {
			cell.style.background = this.inPast;
		}
	};

	config.macros.schedule.Shadings.prototype.styleAsBlock = function(block, isToday, isActive, isPast) {
		if ((isToday && !isActive) || isPast) {
			block.style.background = this.eventPast;
			block.style.color = this.eventPast;
		}
		else // Must be an active event!
		{
			block.style.background = this.activeEvent;
			block.style.color = this.activeEvent;
		}
	};

	Date.prototype.isWeekend = function() {
		return this.getDay() === 0 || this.getDay() === 6;
	};

	Date.prototype.getHHMM = function() {
		return String.zeroPad(this.getHours(), 2) + ":" + String.zeroPad(this.getDate(), 2);
	};

	Date.prototype.dayName = function() {
		var days = ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"];
		return days[this.getDay()];
	};

	Date.prototype.isBefore = function(date) {
		return this.formatString("0DD/0MM-YYYY") < date.formatString("0DD/0MM-YYYY");
	};

	Date.prototype.isEqual = function(date) {
		return this.formatString("0DD/0MM-YYYY") === date.formatString("0DD/0MM-YYYY");
	};

	Date.prototype.addN = function(n) {
		var oneDay = (1000 * 60 * 60 * 24); // Milliseconds in a day
		this.setTime(this.getTime() + (n * oneDay));
	};

	setStylesheet(".viewer table.bordersOff, .viewer table.bordersOff * " + "{margin:1; cell-padding:0; border:0; padding:0;} .viewer " + "td.bordersOff {width: 24px; height: 24px;} .sparkline { " + "background: Yellow; } .sparktick { background: White; }", "schedule");

}
//}}}
|''Name''|ScheduleInfo|
|''Description''|Documentation for Schedule macro|
|''Author''|Michael Borck|
|''Version''|0.5.3|
|''Date''|7 Dec 2008|
|''Status''|@@beta@@|
|''Source''|http://schedule.tiddlyspot.com/|
|''Copyright''|2008|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]] |
|''Feedback''|borck.m@gmail.com|
|''Type''|Documentation|
|''Keywords''|timetable, schedule, appointments, documentation|


!Description
Creates a basic schedule in list or timetable format.   Appointments are extracted from the title field of reminders (see ReminderMacros plugin) by pattern matching time formatted as HH:MM within the title.  If no valid time pattern is found in the title it defaults to a time of 09:00 of day the reminders is triggered.   The macro produces a schedule which is dynamically updated.    You can view past or future schedules in either timetable (graphical) or a list (textual) view.   Uses shading in both views to visually indicate active and past events,  weekends and out of hours events.

!Usage
{{{<<schedule [view:list|timetable] [sparklines:on|off] [date:"DD Month YYYY"] [duration:n] [step:n] [shadow:on|off] [span:n] [hourFrom:n] [detail:low|medium|high] [eveningStart:HH] [dayStart:HH] [defaultTime:"HH:MM"] [outOfHours:color] [todayFocus:color] [todayOOH:color]  [inPast:color] [activeEvent:color] [eventPast:color]>>}}}

!!!Parameters
''NOTE:  all parameters are optional (so it is not that bad really)''
*{{{[view:list|timtable]}}} This option is used to identify the type of schedule to produce.  Acceptable 'value' are either ''list'' or ''timetable''.  This is optional and the default option is ''list''.
*{{{[sparklines:on|off]}}} This option is used to turn on a small graphical
representation of the schedule.  By default it is off for timetable and on for
agenda.
*{{{[date:"DD Month YYYY"]}}} Optional. This identifies the date from which the schedule is to be generated. The supplied value must be a date in an acceptable format. This is optional and the default option is today's date.
* {{{[duration:n]}}} Optional.  This option specifies the length of the schedule measured in days.  A negative number will offset the date by this amount and then produce the schedule form this new start date. Only whole number values make any sense. This is optional and the default value is seven days.
* {{{[step:n]}}} Optional.  This value allow you to display every n^th day.  For example this allows you to produce a schedule showing only Sundays.  Default is 1 day.
*{{{[shadow:on|off]}}}  Optional.  Provides ability to "grey" out past time slots. Default is on.
*{{{[span:n]}}} Optional.  Number of hours to display active appointments. Default is 12 hours.
*{{{[hourFrom:n]}}} Optional. Provides the starting hour for a shedule. Default value 8.
*{{{[detail:low|medium|high]}}} Optional, Size of appointment slots.  low means 60 minutes, medium means 30 minutes, high means 15 minutes.  Default to 30 mins.
*{{{[eveningStart:HH]}}} Optional, the hour your evening time begins (used for shading).  Default 06:00
*{{{[dayStart:HH]}}} Optional, the hour your day starts (used for shading).  Default 18:00
*{{{[defaultTime:"HH:MM"]}}} Optional, the 'time' apointments should appear in the schedule if not time is included in the title.  Default 09:00.
*{{{[outOfHours:color]}}} Optional, specify the shading color for out of hours periods. 
*{{{[todayOOH:color]}}} Optional, specify shading color for current day out of hours period.
*{{{[todayFocus:color]}}} Optional, specify the shading color for the current day (if present)
*{{{[inPast:color]}}} Optional, specify the shading color for time slots in the past.
*{{{[activeEvent:color]}}} Optional, specify the shading color for an active event in your schedule.
*{{{[eventPast:color]}}} Optional, specify the shading color for an event in the past.

!!!Examples
Some examples (see below for some gotchas):
* {{{<<schedule>>}}} will produce a one week schedule as a list starting from today.
* {{{<<schedule>>}}} will produce a one week schedule as a list starting from today.
* {{{<<schedule type:timetable>>}}} will produce a one week schedule as a timetable starting from today.
* {{{<<schedule duration:-7>>}}} will produce a schedule of the last seven days in list format.  That is, last week's schedule.
* {{{<<schedule date:"1 December 2008" duration:31>>}}} will produce a one month schedule as a list starting from Dec 1^st 2008.
* {{{<<schedule date:"6 December 2008" duration:28 step:7>>}}} will produce a schedule showing of only Sundays for the month of December.  Note the start date is a Sunday


!Notes
!!!Reminders
In order to be able to schedule an appointment you need specify a start time and an end time.  I opted for pattern matching for valid times in the title string.  The pattern is ''HH:MM''.  This seems cleaner that adding additional fields to reminders that may/maynot require modification of the RemindersMacro (not that I know how to do that anyway).   Pattern matching turns out to be quite flexible/expressive as time can occur anywhere in the title without apply to many structural constraints.  So event titles can be expressed in a more natural language (see examples below).  For example the following are all valid times embedded in a title.  They all end up with a start time of 12:00 and an end time of 13:00:
* 12:00-13:00 Lunch
* Lunch 12:00  -  13:00
* Lunch from 12:00 to 13:00
* Lunch @12:00 end @13:30
* Lunch 12:00-13:00
* Start 12:00 Lunch, Finish 13:00
* Lunch @12:00-13:00
* Lunch at 12:00.  Need to discuss contracts.  Should be finished by 13:00.

In timetable view, only events that occur between 08:00 and 19:00 (8:00AM - 7:00PM) will be displayed.  It is on my todo list to make this adjustable.  There are some constraints and assumptions as follows (probably more but this is all I can think of at the moment):
* Valid pattern is ''HH:MM'', leading zero is required else it will not match.
* Current times are compared as strings.
* Assumes that the ''first pattern'' match is ''start time''
* Assumes the ''second pattern'' match is ''end time''
* Ignore any other pattern matches.
* If only ''one pattern'' match, then this becomes ''start and end time''.
* If ''no pattern'' match, then ''default to 09:00'' of the day under consideration.
* Assumes that start time occurs before end time 
* Doesn't handle appointments that occur start in one day and finish in the next.  You will need to make two appointments (on my todo list).

''Compatibility with existing reminders.'' Since existing reminders may not have any time pattern in the title, these reminders will default to 09:00 of the day under consideration.  Hopfully this will allows existing reminders with no time in their title to also be displayed within the schedule.

!!!Gotchas  
The options are not checked for sane values nor are they checked for validity.  If an option is not provided then the default option is selected.   If an option is does not exist, say a typo, it is silently ignored.   
* {{{<<schedule epoch:"1 Decemeber 2088" duraton:31>>}}} This will produce a one week schedule starting from today's date.  Option 'epoch' does not exist and is ignored.  Option 'duration'  looks like a typo and will be silently ignored. So:
* {{{<<schedule date:"1 Decemebr 2088">>}}}  Invalid date.
* {{{<<schedule duration:12.5>>}}}  Strange duration, should always be in days.
* {{{<<schedule step:-2>>}}} Doesn't make sense to step backwards every two day
* {{{<<schedule step:3.3>>}}} Similarly, the step should be a whole number, measured in days.


!!!Acknowledgements
*Extracting the title field from the reminder was based on how the CalendarPlugin does the same.
*The layout of the timetable and list was inspired from textual output from the program ''wxredata'' see: http://www.duke.edu/~dgraham/wxRemind/ which uses the program remind see http://www.roaringpenguin.com/products/remind

!Installation
* Create a new tiddler in your tiddlywiki appropriately titled, say ScheduleInfo and give it the {{{pluginInfo}}} or {{{systemConfig}}} tag as appropriate.  
* Edit the appropriate source tiddler by double clicking or select "edit" form menu, and copy all the text from the tiddler's.
* Paste the text into the body of the new tiddler created in step 1.
* Save tiddler (select close form menu).
* Reload your TiddlyWiki.


!To Do
''In no particular order''
* Optionally display other dated information (tiddlers, timeline, etc)
* Remove dependancy on RemindersMacro
* Add websafe colours as default
* Add focus/highlight/shade a day clicked on in both views.
* Ability to click on vacant appointment slot in timetable and add an appointment/reminder. Is this as simple as embedding a hidden "add reminder" button? 
* Interface with Calendar (For example: click on date and view schedule for/from that date).
* Provide alternative orientation (more common) with days at the top.
* Provide ability to toggle borders on timetable.
* Sort out this CSS stuff. Where best to place is to allow user to configure? ShadowTiddler?
* Allow timetable view to link to appropriate reminder (write appropriate callback function).
* Provide ability to handle 12 and 24 hour format.
* Provide different colours for appointments, say based on tiddler title/tag.  Store all work events in/tagged "WorkEvents" and home events in/tagged "HomeEvents".
* Import/Export from/to calendar format (ICS? Even possible)

!Revisions
*v0.5.3 (Dec 7 2008)
** Fixed sparkline error incorrectly displaying in Agenda view
** Factored out make() function (moved into schedule object)
** Create makeHeader() function in Agenda
** Fixed error in determining max clashes causing incorrect index size.
*v0.5.2 (Dec 4 2008)
** Fixed date comparison bug (need to zeropad month and day)
*v0.5.1 (Dec 4 2008)
**Fixed error with negative duration
**Fixed browser display issues with navigation buttons
*v0.5.0 (Dec 4 2008)
**Added simple navigation buttons
**Added sparklines to views (useful for agenda view)
**Added guard for sparklines
**Fixed sparklines bug in Agenda day title
**Fixed sparklines display error (reset array length)
**Added forward day controls
**Fixed shading issues
**Fixed split table bug (needed to refresh object state)
**Fixed typo causing some browsers to stop macro (FooBar instead of fooBar)
*v0.4.4 (Nov 27 2008)
** Added JSDoc comments (will strip prior to uploading)
** Refactored code into object based design with multiple files.
** Remove "plugin" from documentation as this is a "Macro"
*v0.4.3 (Nov 24 2008)
** Used title field in style rather than "fake button"
** Fixed default time setting bug
** Rename options Type and defNoTime to "view" and "defaultTime"
** Renamed "list" view to "agenda"
*v0.4.2 (Nov 20 2008)
** Fixed table header shading for out of hours bug.
** Fixed width issue of day/date in row title.
** Added setting for default time a reminder show without time in title.
** Fixed a few typos in the documentation.
*v0.4.1 (Nov 20 2008)
** Initial Public Beta release.
** Fixed a event start/end display bug.
** Fixed corner cases of events ending.
** Fixed clash/count bug.
*v0.4.0 (Nov 19 2008)
** Significant restructure of code, use namespace and prototypes (easier to extend).
** Added shading and out of hours options.
** Created draft API documentation.
** Cleaned up some logic.
*v0.3.1 (Nov 17 2008)
** Use Journal format for Day/Date link in list view (similar to how CalendarPlugin does).
*v0.3.0 (Nov 17 2008)
** Configure to use namespace.  Registered functions in the config.macro.schedule namespace.
** Update documentation.
*v0.2.10 (Nov 16 2008)
** Fixed button display bug.
*v0.2.9 (Nov 16 2008)
** Added tooltip to timetable event which show reminder title.
*v0.2.8 (Nov 16 2008)
** Fixed event clash bug. Should now display correctly.
*v0.2.7 (Nov 16 2008)
** Include borderless table style within macro.
*v0.2.6 (Nov 16 2008)
** Added a "time" shadow.
** Added shading for "out or hours" and "current day".
*v0.2.5 (Nov 14 2008)
** Added ability to span hours within and across days.
** Added greying out of past appointments.
** Tidy code, still not happy but seems a little cleaner.
*V0.2.4 (Nov 11 2008)
** Added "shadow" ability in timetable and list view.
*v0.2.3 (Nov 10 2008)
** Added formatting for overlapping appointments.
** Followed http://www.tiddlywiki.org/wiki/Plugin_specs#Template (what is config.extensions()?).
*v0.2.2 (Nov 5 2008)
** Shade appointment slots in timetable when busy.
** Shade weekends in timetable.
*v0.2.1 (Nov 4 2008)
** Added ability to extract start/end time from title in reminders.
** Print a basic timetable view.
** Added step option so can display every n^th day, say so can compare/view a month of just Sundays.
** Added sanity checks.
* v0.2.0 (Oct 30 2008)
** Added interface to accept (simulated) named parameters.  This is cleaner and allows more flexible input of options.
** Added some sanity checks and display "crude" simple error message.
* v0.1.4 (Oct 29 2008)
** Display reminders for specific/trigger days.
* v0.1.3 (Oct 29 2008)
** Extract reminder titles, display all for each day.
* v0.1.2 (Oct 29 2008)
** Added ability for this week, last week, next week.
* v0.1.1 (Oct 28, 2008)
** Print list of dates starting form current date.
* v0.1.0 (Oct 28, 2008)
** Empty macro.
Akut
Et par dage
En uge
14 dage
1 måned
Hele året
Til næste år
Fremtidsplan
Januar
Februar
Marts
April
Maj
Juni
Juli
August
September
Oktober
November
December
Snart
I arbejdstiden
I fritiden
<<formTiddler [[ServerForm]]>><data>{"titel":"udtalelser"}</data>
<html><table class='borderless' style='width:10em'><tr valign='top'><td style='width:10em'>
	<div class='small'>TiddlySpotSide:</div>
	<div class='editor' <input name=titel type=text /></div></td></table></html>
{{black{
<<calendar thismonth>>
}}}/%
<<newJournal "ddd d DD. MMM YYYY"simpel journal">>%/
<<tabs txtMainTab tags "liste over tags" TagCloud seneste "liste over de senest ændrede tiddlere efter dato" SideBarTabs##recent indhold "se alle tiddlere" SideBarTabs##all mere "standard lister og mere" TabMore>>/%
!recent
{{recent{<<timeline "modified" "17" "YYYY-0MM-0DD">>
----
@@padding-left:10px;[[::fuldstændig tidslinie::|timeline]]@@}}}
!all
<<tableOfContents "label:se alle tiddlere..." sort:title width:100% size:20 date:YYYY-0MM-0DD>>
----
@@padding-left:10px;[[::alfabetisk liste::|TabAll]]@@
!end%/
/***
|''Name:''|SimileTimelineBundlePlugin|
|''Description:''|[[Simile Timelines|http://simile.mit.edu/SimileTimeline/]] |
|''Author:''|Martin Budden (mjbudden [at] gmail [dot] com)|
|''Source:''|http://www.martinswiki.com/#SimileTimelineBundlePlugin |
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/plugins/SimileTimelineBundlePlugin.js |
|''Version:''|0.1.0|
|''Date:''|Mar 4, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|BSD-style license from MIT|
|''~CoreVersion:''|2.2|
***/

/*{{{*/
// Ensure that the SimileTimelineBundlePlugin is only installed once.
if(!version.extensions.SimileTimelineBundlePlugin) {
version.extensions.SimileTimelineBundlePlugin = {installed:true};

if(version.major < 2 || (version.major == 2 && version.minor < 2))
	{alertAndThrow('SimileTimelineBundlePlugin requires TiddlyWiki 2.2 or newer.');}
	
// Following code is from Simile (Semantic Interoperability of Metadata and Information in unLike Environments).
// SIMILE is a joint project conducted by the MIT Libraries and MIT CSAIL.
// Code is released under a BSD-style license.
// See:
// http://simile.mit.edu/repository/timeline/trunk/src/webapp/api/bundle.js

var Timeline = new Object();
Timeline.Platform = new Object();
Timeline.Platform.serverLocale = "en";
Timeline.Platform.clientLocale = "en";


/* timeline.js */

Timeline.strings={};Timeline.create=function(elmt,bandInfos,orientation,unit){return new Timeline._Impl(elmt,bandInfos,orientation,unit);};Timeline.HORIZONTAL=0;Timeline.VERTICAL=1;Timeline._defaultTheme=null;Timeline.createBandInfo=function(params){var theme=("theme"in params)?params.theme:Timeline.getDefaultTheme();var eventSource=("eventSource"in params)?params.eventSource:null;var ether=new Timeline.LinearEther({centersOn:("date"in params)?params.date:new Date(),interval:Timeline.DateTime.gregorianUnitLengths[params.intervalUnit],pixelsPerInterval:params.intervalPixels});var etherPainter=new Timeline.GregorianEtherPainter({unit:params.intervalUnit,multiple:("multiple"in params)?params.multiple:1,theme:theme,align:("align"in params)?params.align:undefined});var layout=new Timeline.StaticTrackBasedLayout({eventSource:eventSource,ether:ether,showText:("showEventText"in params)?params.showEventText:true,theme:theme});var eventPainterParams={showText:("showEventText"in params)?params.showEventText:true,layout:layout,theme:theme};if("trackHeight"in params){eventPainterParams.trackHeight=params.trackHeight;}
if("trackGap"in params){eventPainterParams.trackGap=params.trackGap;}
var eventPainter=new Timeline.DurationEventPainter(eventPainterParams);return{width:params.width,eventSource:eventSource,timeZone:("timeZone"in params)?params.timeZone:0,ether:ether,etherPainter:etherPainter,eventPainter:eventPainter};};Timeline.createHotZoneBandInfo=function(params){var theme=("theme"in params)?params.theme:Timeline.getDefaultTheme();var eventSource=("eventSource"in params)?params.eventSource:null;var ether=new Timeline.HotZoneEther({centersOn:("date"in params)?params.date:new Date(),interval:Timeline.DateTime.gregorianUnitLengths[params.intervalUnit],pixelsPerInterval:params.intervalPixels,zones:params.zones});var etherPainter=new Timeline.HotZoneGregorianEtherPainter({unit:params.intervalUnit,zones:params.zones,theme:theme,align:("align"in params)?params.align:undefined});var layout=new Timeline.StaticTrackBasedLayout({eventSource:eventSource,ether:ether,theme:theme});var eventPainterParams={showText:("showEventText"in params)?params.showEventText:true,layout:layout,theme:theme};if("trackHeight"in params){eventPainterParams.trackHeight=params.trackHeight;}
if("trackGap"in params){eventPainterParams.trackGap=params.trackGap;}
var eventPainter=new Timeline.DurationEventPainter(eventPainterParams);return{width:params.width,eventSource:eventSource,timeZone:("timeZone"in params)?params.timeZone:0,ether:ether,etherPainter:etherPainter,eventPainter:eventPainter};};Timeline.getDefaultTheme=function(){if(Timeline._defaultTheme==null){Timeline._defaultTheme=Timeline.ClassicTheme.create(Timeline.Platform.getDefaultLocale());}
return Timeline._defaultTheme;};Timeline.setDefaultTheme=function(theme){Timeline._defaultTheme=theme;};Timeline.loadXML=function(url,f){var fError=function(statusText,status,xmlhttp){alert("Failed to load data xml from "+url+"\n"+statusText);};var fDone=function(xmlhttp){var xml=xmlhttp.responseXML;if(!xml.documentElement&&xmlhttp.responseStream){xml.load(xmlhttp.responseStream);}
f(xml,url);};Timeline.XmlHttp.get(url,fError,fDone);};Timeline.loadJSON=function(url,f){var fError=function(statusText,status,xmlhttp){alert("Failed to load json data from "+url+"\n"+statusText);};var fDone=function(xmlhttp){f(eval('('+xmlhttp.responseText+')'),url);};Timeline.XmlHttp.get(url,fError,fDone);};Timeline._Impl=function(elmt,bandInfos,orientation,unit){this._containerDiv=elmt;this._bandInfos=bandInfos;this._orientation=orientation==null?Timeline.HORIZONTAL:orientation;this._unit=(unit!=null)?unit:Timeline.NativeDateUnit;this._initialize();};Timeline._Impl.prototype.dispose=function(){for(var i=0;i<this._bands.length;i++){this._bands[i].dispose();}
this._bands=null;this._bandInfos=null;this._containerDiv.innerHTML="";};Timeline._Impl.prototype.getBandCount=function(){return this._bands.length;};Timeline._Impl.prototype.getBand=function(index){return this._bands[index];};Timeline._Impl.prototype.layout=function(){this._distributeWidths();};Timeline._Impl.prototype.paint=function(){for(var i=0;i<this._bands.length;i++){this._bands[i].paint();}};Timeline._Impl.prototype.getDocument=function(){return this._containerDiv.ownerDocument;};Timeline._Impl.prototype.addDiv=function(div){this._containerDiv.appendChild(div);};Timeline._Impl.prototype.removeDiv=function(div){this._containerDiv.removeChild(div);};Timeline._Impl.prototype.isHorizontal=function(){return this._orientation==Timeline.HORIZONTAL;};Timeline._Impl.prototype.isVertical=function(){return this._orientation==Timeline.VERTICAL;};Timeline._Impl.prototype.getPixelLength=function(){return this._orientation==Timeline.HORIZONTAL?this._containerDiv.offsetWidth:this._containerDiv.offsetHeight;};Timeline._Impl.prototype.getPixelWidth=function(){return this._orientation==Timeline.VERTICAL?this._containerDiv.offsetWidth:this._containerDiv.offsetHeight;};Timeline._Impl.prototype.getUnit=function(){return this._unit;};Timeline._Impl.prototype.loadXML=function(url,f){var tl=this;var fError=function(statusText,status,xmlhttp){alert("Failed to load data xml from "+url+"\n"+statusText);tl.hideLoadingMessage();};var fDone=function(xmlhttp){try{var xml=xmlhttp.responseXML;if(!xml.documentElement&&xmlhttp.responseStream){xml.load(xmlhttp.responseStream);}
f(xml,url);}finally{tl.hideLoadingMessage();}};this.showLoadingMessage();window.setTimeout(function(){Timeline.XmlHttp.get(url,fError,fDone);},0);};Timeline._Impl.prototype.loadJSON=function(url,f){var tl=this;var fError=function(statusText,status,xmlhttp){alert("Failed to load json data from "+url+"\n"+statusText);tl.hideLoadingMessage();};var fDone=function(xmlhttp){try{f(eval('('+xmlhttp.responseText+')'),url);}finally{tl.hideLoadingMessage();}};this.showLoadingMessage();window.setTimeout(function(){Timeline.XmlHttp.get(url,fError,fDone);},0);};Timeline._Impl.prototype._initialize=function(){var containerDiv=this._containerDiv;var doc=containerDiv.ownerDocument;containerDiv.className=containerDiv.className.split(" ").concat("timeline-container").join(" ");while(containerDiv.firstChild){containerDiv.removeChild(containerDiv.firstChild);}
var elmtCopyright=Timeline.Graphics.createTranslucentImage(doc,Timeline.urlPrefix+(this.isHorizontal()?"images/copyright-vertical.png":"images/copyright.png"));elmtCopyright.className="timeline-copyright";elmtCopyright.title="Timeline (c) SIMILE - http://simile.mit.edu/timeline/";Timeline.DOM.registerEvent(elmtCopyright,"click",function(){window.location="http://simile.mit.edu/timeline/";});containerDiv.appendChild(elmtCopyright);this._bands=[];for(var i=0;i<this._bandInfos.length;i++){var band=new Timeline._Band(this,this._bandInfos[i],i);this._bands.push(band);}
this._distributeWidths();for(var i=0;i<this._bandInfos.length;i++){var bandInfo=this._bandInfos[i];if("syncWith"in bandInfo){this._bands[i].setSyncWithBand(this._bands[bandInfo.syncWith],("highlight"in bandInfo)?bandInfo.highlight:false);}}
var message=Timeline.Graphics.createMessageBubble(doc);message.containerDiv.className="timeline-message-container";containerDiv.appendChild(message.containerDiv);message.contentDiv.className="timeline-message";message.contentDiv.innerHTML="<img src='"+Timeline.urlPrefix+"images/progress-running.gif' /> Loading...";this.showLoadingMessage=function(){message.containerDiv.style.display="block";};this.hideLoadingMessage=function(){message.containerDiv.style.display="none";};};Timeline._Impl.prototype._distributeWidths=function(){var length=this.getPixelLength();var width=this.getPixelWidth();var cumulativeWidth=0;for(var i=0;i<this._bands.length;i++){var band=this._bands[i];var bandInfos=this._bandInfos[i];var widthString=bandInfos.width;var x=widthString.indexOf("%");if(x>0){var percent=parseInt(widthString.substr(0,x));var bandWidth=percent*width/100;}else{var bandWidth=parseInt(widthString);}
band.setBandShiftAndWidth(cumulativeWidth,bandWidth);band.setViewLength(length);cumulativeWidth+=bandWidth;}};Timeline._Band=function(timeline,bandInfo,index){this._timeline=timeline;this._bandInfo=bandInfo;this._index=index;this._locale=("locale"in bandInfo)?bandInfo.locale:Timeline.Platform.getDefaultLocale();this._timeZone=("timeZone"in bandInfo)?bandInfo.timeZone:0;this._labeller=("labeller"in bandInfo)?bandInfo.labeller:timeline.getUnit().createLabeller(this._locale,this._timeZone);this._dragging=false;this._changing=false;this._originalScrollSpeed=5;this._scrollSpeed=this._originalScrollSpeed;this._onScrollListeners=[];var b=this;this._syncWithBand=null;this._syncWithBandHandler=function(band){b._onHighlightBandScroll();};this._selectorListener=function(band){b._onHighlightBandScroll();};var inputDiv=this._timeline.getDocument().createElement("div");inputDiv.className="timeline-band-input";this._timeline.addDiv(inputDiv);this._keyboardInput=document.createElement("input");this._keyboardInput.type="text";inputDiv.appendChild(this._keyboardInput);Timeline.DOM.registerEventWithObject(this._keyboardInput,"keydown",this,this._onKeyDown);Timeline.DOM.registerEventWithObject(this._keyboardInput,"keyup",this,this._onKeyUp);this._div=this._timeline.getDocument().createElement("div");this._div.className="timeline-band";this._timeline.addDiv(this._div);Timeline.DOM.registerEventWithObject(this._div,"mousedown",this,this._onMouseDown);Timeline.DOM.registerEventWithObject(this._div,"mousemove",this,this._onMouseMove);Timeline.DOM.registerEventWithObject(this._div,"mouseup",this,this._onMouseUp);Timeline.DOM.registerEventWithObject(this._div,"mouseout",this,this._onMouseOut);Timeline.DOM.registerEventWithObject(this._div,"dblclick",this,this._onDblClick);this._innerDiv=this._timeline.getDocument().createElement("div");this._innerDiv.className="timeline-band-inner";this._div.appendChild(this._innerDiv);this._ether=bandInfo.ether;bandInfo.ether.initialize(timeline);this._etherPainter=bandInfo.etherPainter;bandInfo.etherPainter.initialize(this,timeline);this._eventSource=bandInfo.eventSource;if(this._eventSource){this._eventListener={onAddMany:function(){b._onAddMany();},onClear:function(){b._onClear();}}
this._eventSource.addListener(this._eventListener);}
this._eventPainter=bandInfo.eventPainter;bandInfo.eventPainter.initialize(this,timeline);this._decorators=("decorators"in bandInfo)?bandInfo.decorators:[];for(var i=0;i<this._decorators.length;i++){this._decorators[i].initialize(this,timeline);}
this._bubble=null;};Timeline._Band.SCROLL_MULTIPLES=5;Timeline._Band.prototype.dispose=function(){this.closeBubble();if(this._eventSource){this._eventSource.removeListener(this._eventListener);this._eventListener=null;this._eventSource=null;}
this._timeline=null;this._bandInfo=null;this._labeller=null;this._ether=null;this._etherPainter=null;this._eventPainter=null;this._decorators=null;this._onScrollListeners=null;this._syncWithBandHandler=null;this._selectorListener=null;this._div=null;this._innerDiv=null;this._keyboardInput=null;this._bubble=null;};Timeline._Band.prototype.addOnScrollListener=function(listener){this._onScrollListeners.push(listener);};Timeline._Band.prototype.removeOnScrollListener=function(listener){for(var i=0;i<this._onScrollListeners.length;i++){if(this._onScrollListeners[i]==listener){this._onScrollListeners.splice(i,1);break;}}};Timeline._Band.prototype.setSyncWithBand=function(band,highlight){if(this._syncWithBand){this._syncWithBand.removeOnScrollListener(this._syncWithBandHandler);}
this._syncWithBand=band;this._syncWithBand.addOnScrollListener(this._syncWithBandHandler);this._highlight=highlight;this._positionHighlight();};Timeline._Band.prototype.getLocale=function(){return this._locale;};Timeline._Band.prototype.getTimeZone=function(){return this._timeZone;};Timeline._Band.prototype.getLabeller=function(){return this._labeller;};Timeline._Band.prototype.getIndex=function(){return this._index;};Timeline._Band.prototype.getEther=function(){return this._ether;};Timeline._Band.prototype.getEtherPainter=function(){return this._etherPainter;};Timeline._Band.prototype.getEventSource=function(){return this._eventSource;};Timeline._Band.prototype.getEventPainter=function(){return this._eventPainter;};Timeline._Band.prototype.layout=function(){this.paint();};Timeline._Band.prototype.paint=function(){this._etherPainter.paint();this._paintDecorators();this._paintEvents();};Timeline._Band.prototype.softLayout=function(){this.softPaint();};Timeline._Band.prototype.softPaint=function(){this._etherPainter.softPaint();this._softPaintDecorators();this._softPaintEvents();};Timeline._Band.prototype.setBandShiftAndWidth=function(shift,width){var inputDiv=this._keyboardInput.parentNode;var middle=shift+Math.floor(width/2);if(this._timeline.isHorizontal()){this._div.style.top=shift+"px";this._div.style.height=width+"px";inputDiv.style.top=middle+"px";inputDiv.style.left="-1em";}else{this._div.style.left=shift+"px";this._div.style.width=width+"px";inputDiv.style.left=middle+"px";inputDiv.style.top="-1em";}};Timeline._Band.prototype.getViewWidth=function(){if(this._timeline.isHorizontal()){return this._div.offsetHeight;}else{return this._div.offsetWidth;}};Timeline._Band.prototype.setViewLength=function(length){this._viewLength=length;this._recenterDiv();this._onChanging();};Timeline._Band.prototype.getViewLength=function(){return this._viewLength;};Timeline._Band.prototype.getTotalViewLength=function(){return Timeline._Band.SCROLL_MULTIPLES*this._viewLength;};Timeline._Band.prototype.getViewOffset=function(){return this._viewOffset;};Timeline._Band.prototype.getMinDate=function(){return this._ether.pixelOffsetToDate(this._viewOffset);};Timeline._Band.prototype.getMaxDate=function(){return this._ether.pixelOffsetToDate(this._viewOffset+Timeline._Band.SCROLL_MULTIPLES*this._viewLength);};Timeline._Band.prototype.getMinVisibleDate=function(){return this._ether.pixelOffsetToDate(0);};Timeline._Band.prototype.getMaxVisibleDate=function(){return this._ether.pixelOffsetToDate(this._viewLength);};Timeline._Band.prototype.getCenterVisibleDate=function(){return this._ether.pixelOffsetToDate(this._viewLength/2);};Timeline._Band.prototype.setMinVisibleDate=function(date){if(!this._changing){this._moveEther(Math.round(-this._ether.dateToPixelOffset(date)));}};Timeline._Band.prototype.setMaxVisibleDate=function(date){if(!this._changing){this._moveEther(Math.round(this._viewLength-this._ether.dateToPixelOffset(date)));}};Timeline._Band.prototype.setCenterVisibleDate=function(date){if(!this._changing){this._moveEther(Math.round(this._viewLength/2-this._ether.dateToPixelOffset(date)));}};Timeline._Band.prototype.dateToPixelOffset=function(date){return this._ether.dateToPixelOffset(date)-this._viewOffset;};Timeline._Band.prototype.pixelOffsetToDate=function(pixels){return this._ether.pixelOffsetToDate(pixels+this._viewOffset);};Timeline._Band.prototype.createLayerDiv=function(zIndex){var div=this._timeline.getDocument().createElement("div");div.className="timeline-band-layer";div.style.zIndex=zIndex;this._innerDiv.appendChild(div);var innerDiv=this._timeline.getDocument().createElement("div");innerDiv.className="timeline-band-layer-inner";if(Timeline.Platform.browser.isIE){innerDiv.style.cursor="move";}else{innerDiv.style.cursor="-moz-grab";}
div.appendChild(innerDiv);return innerDiv;};Timeline._Band.prototype.removeLayerDiv=function(div){this._innerDiv.removeChild(div.parentNode);};Timeline._Band.prototype.closeBubble=function(){if(this._bubble!=null){this._bubble.close();this._bubble=null;}};Timeline._Band.prototype.openBubbleForPoint=function(pageX,pageY,width,height){this.closeBubble();this._bubble=Timeline.Graphics.createBubbleForPoint(this._timeline.getDocument(),pageX,pageY,width,height);return this._bubble.content;};Timeline._Band.prototype.scrollToCenter=function(date){var pixelOffset=this._ether.dateToPixelOffset(date);if(pixelOffset<-this._viewLength/2){this.setCenterVisibleDate(this.pixelOffsetToDate(pixelOffset+this._viewLength));}else if(pixelOffset>3*this._viewLength/2){this.setCenterVisibleDate(this.pixelOffsetToDate(pixelOffset-this._viewLength));}
this._autoScroll(Math.round(this._viewLength/2-this._ether.dateToPixelOffset(date)));};Timeline._Band.prototype._onMouseDown=function(innerFrame,evt,target){this.closeBubble();this._dragging=true;this._dragX=evt.clientX;this._dragY=evt.clientY;};Timeline._Band.prototype._onMouseMove=function(innerFrame,evt,target){if(this._dragging){var diffX=evt.clientX-this._dragX;var diffY=evt.clientY-this._dragY;this._dragX=evt.clientX;this._dragY=evt.clientY;this._moveEther(this._timeline.isHorizontal()?diffX:diffY);this._positionHighlight();}};Timeline._Band.prototype._onMouseUp=function(innerFrame,evt,target){this._dragging=false;this._keyboardInput.focus();};Timeline._Band.prototype._onMouseOut=function(innerFrame,evt,target){var coords=Timeline.DOM.getEventRelativeCoordinates(evt,innerFrame);coords.x+=this._viewOffset;if(coords.x<0||coords.x>innerFrame.offsetWidth||coords.y<0||coords.y>innerFrame.offsetHeight){this._dragging=false;}};Timeline._Band.prototype._onDblClick=function(innerFrame,evt,target){var coords=Timeline.DOM.getEventRelativeCoordinates(evt,innerFrame);var distance=coords.x-(this._viewLength/2-this._viewOffset);this._autoScroll(-distance);};Timeline._Band.prototype._onKeyDown=function(keyboardInput,evt,target){if(!this._dragging){switch(evt.keyCode){case 27:break;case 37:case 38:this._scrollSpeed=Math.min(50,Math.abs(this._scrollSpeed*1.05));this._moveEther(this._scrollSpeed);break;case 39:case 40:this._scrollSpeed=-Math.min(50,Math.abs(this._scrollSpeed*1.05));this._moveEther(this._scrollSpeed);break;default:return true;}
this.closeBubble();Timeline.DOM.cancelEvent(evt);return false;}
return true;};Timeline._Band.prototype._onKeyUp=function(keyboardInput,evt,target){if(!this._dragging){this._scrollSpeed=this._originalScrollSpeed;switch(evt.keyCode){case 35:this.setCenterVisibleDate(this._eventSource.getLatestDate());break;case 36:this.setCenterVisibleDate(this._eventSource.getEarliestDate());break;case 33:this._autoScroll(this._timeline.getPixelLength());break;case 34:this._autoScroll(-this._timeline.getPixelLength());break;default:return true;}
this.closeBubble();Timeline.DOM.cancelEvent(evt);return false;}
return true;};Timeline._Band.prototype._autoScroll=function(distance){var b=this;var a=Timeline.Graphics.createAnimation(function(abs,diff){b._moveEther(diff);},0,distance,1000);a.run();};Timeline._Band.prototype._moveEther=function(shift){this.closeBubble();this._viewOffset+=shift;this._ether.shiftPixels(-shift);if(this._timeline.isHorizontal()){this._div.style.left=this._viewOffset+"px";}else{this._div.style.top=this._viewOffset+"px";}
if(this._viewOffset>-this._viewLength*0.5||this._viewOffset<-this._viewLength*(Timeline._Band.SCROLL_MULTIPLES-1.5)){this._recenterDiv();}else{this.softLayout();}
this._onChanging();}
Timeline._Band.prototype._onChanging=function(){this._changing=true;this._fireOnScroll();this._setSyncWithBandDate();this._changing=false;};Timeline._Band.prototype._fireOnScroll=function(){for(var i=0;i<this._onScrollListeners.length;i++){this._onScrollListeners[i](this);}};Timeline._Band.prototype._setSyncWithBandDate=function(){if(this._syncWithBand){var centerDate=this._ether.pixelOffsetToDate(this.getViewLength()/2);this._syncWithBand.setCenterVisibleDate(centerDate);}};Timeline._Band.prototype._onHighlightBandScroll=function(){if(this._syncWithBand){var centerDate=this._syncWithBand.getCenterVisibleDate();var centerPixelOffset=this._ether.dateToPixelOffset(centerDate);this._moveEther(Math.round(this._viewLength/2-centerPixelOffset));if(this._highlight){this._etherPainter.setHighlight(this._syncWithBand.getMinVisibleDate(),this._syncWithBand.getMaxVisibleDate());}}};Timeline._Band.prototype._onAddMany=function(){this._paintEvents();};Timeline._Band.prototype._onClear=function(){this._paintEvents();};Timeline._Band.prototype._positionHighlight=function(){if(this._syncWithBand){var startDate=this._syncWithBand.getMinVisibleDate();var endDate=this._syncWithBand.getMaxVisibleDate();if(this._highlight){this._etherPainter.setHighlight(startDate,endDate);}}};Timeline._Band.prototype._recenterDiv=function(){this._viewOffset=-this._viewLength*(Timeline._Band.SCROLL_MULTIPLES-1)/2;if(this._timeline.isHorizontal()){this._div.style.left=this._viewOffset+"px";this._div.style.width=(Timeline._Band.SCROLL_MULTIPLES*this._viewLength)+"px";}else{this._div.style.top=this._viewOffset+"px";this._div.style.height=(Timeline._Band.SCROLL_MULTIPLES*this._viewLength)+"px";}
this.layout();};Timeline._Band.prototype._paintEvents=function(){this._eventPainter.paint();};Timeline._Band.prototype._softPaintEvents=function(){this._eventPainter.softPaint();};Timeline._Band.prototype._paintDecorators=function(){for(var i=0;i<this._decorators.length;i++){this._decorators[i].paint();}};Timeline._Band.prototype._softPaintDecorators=function(){for(var i=0;i<this._decorators.length;i++){this._decorators[i].softPaint();}};

/* platform.js */

Timeline.Platform.os={isMac:false,isWin:false,isWin32:false,isUnix:false};Timeline.Platform.browser={isIE:false,isNetscape:false,isMozilla:false,isFirefox:false,isOpera:false,isSafari:false,majorVersion:0,minorVersion:0};(function(){var an=navigator.appName.toLowerCase();var ua=navigator.userAgent.toLowerCase();Timeline.Platform.os.isMac=(ua.indexOf('mac')!=-1);Timeline.Platform.os.isWin=(ua.indexOf('win')!=-1);Timeline.Platform.os.isWin32=Timeline.Platform.isWin&&(ua.indexOf('95')!=-1||ua.indexOf('98')!=-1||ua.indexOf('nt')!=-1||ua.indexOf('win32')!=-1||ua.indexOf('32bit')!=-1);Timeline.Platform.os.isUnix=(ua.indexOf('x11')!=-1);Timeline.Platform.browser.isIE=(an.indexOf("microsoft")!=-1);Timeline.Platform.browser.isNetscape=(an.indexOf("netscape")!=-1);Timeline.Platform.browser.isMozilla=(ua.indexOf("mozilla")!=-1);Timeline.Platform.browser.isFirefox=(ua.indexOf("firefox")!=-1);Timeline.Platform.browser.isOpera=(an.indexOf("opera")!=-1);var parseVersionString=function(s){var a=s.split(".");Timeline.Platform.browser.majorVersion=parseInt(a[0]);Timeline.Platform.browser.minorVersion=parseInt(a[1]);};var indexOf=function(s,sub,start){var i=s.indexOf(sub,start);return i>=0?i:s.length;};if(Timeline.Platform.browser.isMozilla){var offset=ua.indexOf("mozilla/");if(offset>=0){parseVersionString(ua.substring(offset+8,indexOf(ua," ",offset)));}}
if(Timeline.Platform.browser.isIE){var offset=ua.indexOf("msie ");if(offset>=0){parseVersionString(ua.substring(offset+5,indexOf(ua,";",offset)));}}
if(Timeline.Platform.browser.isNetscape){var offset=ua.indexOf("rv:");if(offset>=0){parseVersionString(ua.substring(offset+3,indexOf(ua,")",offset)));}}
if(Timeline.Platform.browser.isFirefox){var offset=ua.indexOf("firefox/");if(offset>=0){parseVersionString(ua.substring(offset+8,indexOf(ua," ",offset)));}}})();Timeline.Platform.getDefaultLocale=function(){return Timeline.Platform.clientLocale;};

/* data-structure.js */

Timeline.SortedArray=function(compare,initialArray){this._a=(initialArray instanceof Array)?initialArray:[];this._compare=compare;};Timeline.SortedArray.prototype.add=function(elmt){var sa=this;var index=this.find(function(elmt2){return sa._compare(elmt2,elmt);});if(index<this._a.length){this._a.splice(index,0,elmt);}else{this._a.push(elmt);}};Timeline.SortedArray.prototype.remove=function(elmt){var sa=this;var index=this.find(function(elmt2){return sa._compare(elmt2,elmt);});while(index<this._a.length&&this._compare(this._a[index],elmt)==0){if(this._a[index]==elmt){this._a.splice(index,1);return true;}else{index++;}}
return false;};Timeline.SortedArray.prototype.removeAll=function(){this._a=[];};Timeline.SortedArray.prototype.elementAt=function(index){return this._a[index];};Timeline.SortedArray.prototype.length=function(){return this._a.length;};Timeline.SortedArray.prototype.find=function(compare){var a=0;var b=this._a.length;while(a<b){var mid=Math.floor((a+b)/2);var c=compare(this._a[mid]);if(mid==a){return c<0?a+1:a;}else if(c<0){a=mid;}else{b=mid;}}
return a;};Timeline.SortedArray.prototype.getFirst=function(){return(this._a.length>0)?this._a[0]:null;};Timeline.SortedArray.prototype.getLast=function(){return(this._a.length>0)?this._a[this._a.length-1]:null;};Timeline.EventIndex=function(unit){var eventIndex=this;this._unit=(unit!=null)?unit:Timeline.NativeDateUnit;this._events=new Timeline.SortedArray(function(event1,event2){return eventIndex._unit.compare(event1.getStart(),event2.getStart());});this._indexed=true;};Timeline.EventIndex.prototype.getUnit=function(){return this._unit;};Timeline.EventIndex.prototype.add=function(evt){this._events.add(evt);this._indexed=false;};Timeline.EventIndex.prototype.removeAll=function(){this._events.removeAll();this._indexed=false;};Timeline.EventIndex.prototype.getCount=function(){return this._events.length();};Timeline.EventIndex.prototype.getIterator=function(startDate,endDate){if(!this._indexed){this._index();}
return new Timeline.EventIndex._Iterator(this._events,startDate,endDate,this._unit);};Timeline.EventIndex.prototype.getAllIterator=function(){return new Timeline.EventIndex._AllIterator(this._events);};Timeline.EventIndex.prototype.getEarliestDate=function(){var evt=this._events.getFirst();return(evt==null)?null:evt.getStart();};Timeline.EventIndex.prototype.getLatestDate=function(){var evt=this._events.getLast();if(evt==null){return null;}
if(!this._indexed){this._index();}
var index=evt._earliestOverlapIndex;var date=this._events.elementAt(index).getEnd();for(var i=index+1;i<this._events.length();i++){date=this._unit.later(date,this._events.elementAt(i).getEnd());}
return date;};Timeline.EventIndex.prototype._index=function(){var l=this._events.length();for(var i=0;i<l;i++){var evt=this._events.elementAt(i);evt._earliestOverlapIndex=i;}
var toIndex=1;for(var i=0;i<l;i++){var evt=this._events.elementAt(i);var end=evt.getEnd();toIndex=Math.max(toIndex,i+1);while(toIndex<l){var evt2=this._events.elementAt(toIndex);var start2=evt2.getStart();if(this._unit.compare(start2,end)<0){evt2._earliestOverlapIndex=i;toIndex++;}else{break;}}}
this._indexed=true;};Timeline.EventIndex._Iterator=function(events,startDate,endDate,unit){this._events=events;this._startDate=startDate;this._endDate=endDate;this._unit=unit;this._currentIndex=events.find(function(evt){return unit.compare(evt.getStart(),startDate);});if(this._currentIndex-1>=0){this._currentIndex=this._events.elementAt(this._currentIndex-1)._earliestOverlapIndex;}
this._currentIndex--;this._maxIndex=events.find(function(evt){return unit.compare(evt.getStart(),endDate);});this._hasNext=false;this._next=null;this._findNext();};Timeline.EventIndex._Iterator.prototype={hasNext:function(){return this._hasNext;},next:function(){if(this._hasNext){var next=this._next;this._findNext();return next;}else{return null;}},_findNext:function(){var unit=this._unit;while((++this._currentIndex)<this._maxIndex){var evt=this._events.elementAt(this._currentIndex);if(unit.compare(evt.getStart(),this._endDate)<0&&unit.compare(evt.getEnd(),this._startDate)>0){this._next=evt;this._hasNext=true;return;}}
this._next=null;this._hasNext=false;}};Timeline.EventIndex._AllIterator=function(events){this._events=events;this._index=0;};Timeline.EventIndex._AllIterator.prototype={hasNext:function(){return this._index<this._events.length();},next:function(){return this._index<this._events.length()?this._events.elementAt(this._index++):null;}};

/* date-time.js */

Timeline.DateTime=new Object();Timeline.DateTime.MILLISECOND=0;Timeline.DateTime.SECOND=1;Timeline.DateTime.MINUTE=2;Timeline.DateTime.HOUR=3;Timeline.DateTime.DAY=4;Timeline.DateTime.WEEK=5;Timeline.DateTime.MONTH=6;Timeline.DateTime.YEAR=7;Timeline.DateTime.DECADE=8;Timeline.DateTime.CENTURY=9;Timeline.DateTime.MILLENNIUM=10;Timeline.DateTime.EPOCH=-1;Timeline.DateTime.ERA=-2;Timeline.DateTime.gregorianUnitLengths=[];(function(){var d=Timeline.DateTime;var a=d.gregorianUnitLengths;a[d.MILLISECOND]=1;a[d.SECOND]=1000;a[d.MINUTE]=a[d.SECOND]*60;a[d.HOUR]=a[d.MINUTE]*60;a[d.DAY]=a[d.HOUR]*24;a[d.WEEK]=a[d.DAY]*7;a[d.MONTH]=a[d.DAY]*31;a[d.YEAR]=a[d.DAY]*365;a[d.DECADE]=a[d.YEAR]*10;a[d.CENTURY]=a[d.YEAR]*100;a[d.MILLENNIUM]=a[d.YEAR]*1000;})();Timeline.DateTime.parseGregorianDateTime=function(o){if(o==null){return null;}else if(o instanceof Date){return o;}
var s=o.toString();if(s.length>0&&s.length<8){var space=s.indexOf(" ");if(space>0){var year=parseInt(s.substr(0,space));var suffix=s.substr(space+1);if(suffix.toLowerCase()=="bc"){year=1-year;}}else{var year=parseInt(s);}
var d=new Date(0);d.setUTCFullYear(year);return d;}
try{return new Date(Date.parse(s));}catch(e){return null;}};Timeline.DateTime._iso8601DateRegExp="^(-?)([0-9]{4})("+["(-?([0-9]{2})(-?([0-9]{2}))?)","(-?([0-9]{3}))","(-?W([0-9]{2})(-?([1-7]))?)"].join("|")+")?$";Timeline.DateTime.setIso8601Date=function(dateObject,string){var regexp=Timeline.DateTime._iso8601DateRegExp;var d=string.match(new RegExp(regexp));if(!d){throw new Error("Invalid date string: "+string);}
var sign=(d[1]=="-")?-1:1;var year=sign*d[2];var month=d[5];var date=d[7];var dayofyear=d[9];var week=d[11];var dayofweek=(d[13])?d[13]:1;dateObject.setUTCFullYear(year);if(dayofyear){dateObject.setUTCMonth(0);dateObject.setUTCDate(Number(dayofyear));}else if(week){dateObject.setUTCMonth(0);dateObject.setUTCDate(1);var gd=dateObject.getUTCDay();var day=(gd)?gd:7;var offset=Number(dayofweek)+(7*Number(week));if(day<=4){dateObject.setUTCDate(offset+1-day);}else{dateObject.setUTCDate(offset+8-day);}}else{if(month){dateObject.setUTCDate(1);dateObject.setUTCMonth(month-1);}
if(date){dateObject.setUTCDate(date);}}
return dateObject;};Timeline.DateTime.setIso8601Time=function(dateObject,string){var timezone="Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$";var d=string.match(new RegExp(timezone));var offset=0;if(d){if(d[0]!='Z'){offset=(Number(d[3])*60)+Number(d[5]);offset*=((d[2]=='-')?1:-1);}
string=string.substr(0,string.length-d[0].length);}
var regexp="^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(\.([0-9]+))?)?)?$";var d=string.match(new RegExp(regexp));if(!d){dojo.debug("invalid time string: "+string);return false;}
var hours=d[1];var mins=Number((d[3])?d[3]:0);var secs=(d[5])?d[5]:0;var ms=d[7]?(Number("0."+d[7])*1000):0;dateObject.setUTCHours(hours);dateObject.setUTCMinutes(mins);dateObject.setUTCSeconds(secs);dateObject.setUTCMilliseconds(ms);return dateObject;};Timeline.DateTime.setIso8601=function(dateObject,string){var comps=(string.indexOf("T")==-1)?string.split(" "):string.split("T");Timeline.DateTime.setIso8601Date(dateObject,comps[0]);if(comps.length==2){Timeline.DateTime.setIso8601Time(dateObject,comps[1]);}
return dateObject;};Timeline.DateTime.parseIso8601DateTime=function(string){try{return Timeline.DateTime.setIso8601(new Date(0),string);}catch(e){return null;}};Timeline.DateTime.roundDownToInterval=function(date,intervalUnit,timeZone,multiple,firstDayOfWeek){var timeShift=timeZone*Timeline.DateTime.gregorianUnitLengths[Timeline.DateTime.HOUR];var date2=new Date(date.getTime()+timeShift);var clearInDay=function(d){d.setUTCMilliseconds(0);d.setUTCSeconds(0);d.setUTCMinutes(0);d.setUTCHours(0);};var clearInYear=function(d){clearInDay(d);d.setUTCDate(1);d.setUTCMonth(0);};switch(intervalUnit){case Timeline.DateTime.MILLISECOND:var x=date2.getUTCMilliseconds();date2.setUTCMilliseconds(x-(x%multiple));break;case Timeline.DateTime.SECOND:date2.setUTCMilliseconds(0);var x=date2.getUTCSeconds();date2.setUTCSeconds(x-(x%multiple));break;case Timeline.DateTime.MINUTE:date2.setUTCMilliseconds(0);date2.setUTCSeconds(0);var x=date2.getUTCMinutes();date2.setTime(date2.getTime()-
(x%multiple)*Timeline.DateTime.gregorianUnitLengths[Timeline.DateTime.MINUTE]);break;case Timeline.DateTime.HOUR:date2.setUTCMilliseconds(0);date2.setUTCSeconds(0);date2.setUTCMinutes(0);var x=date2.getUTCHours();date2.setUTCHours(x-(x%multiple));break;case Timeline.DateTime.DAY:clearInDay(date2);break;case Timeline.DateTime.WEEK:clearInDay(date2);var d=(date2.getUTCDay()+7-firstDayOfWeek)%7;date2.setTime(date2.getTime()-
d*Timeline.DateTime.gregorianUnitLengths[Timeline.DateTime.DAY]);break;case Timeline.DateTime.MONTH:clearInDay(date2);date2.setUTCDate(1);var x=date2.getUTCMonth();date2.setUTCMonth(x-(x%multiple));break;case Timeline.DateTime.YEAR:clearInYear(date2);var x=date2.getUTCFullYear();date2.setUTCFullYear(x-(x%multiple));break;case Timeline.DateTime.DECADE:clearInYear(date2);date2.setUTCFullYear(Math.floor(date2.getUTCFullYear()/10)*10);break;case Timeline.DateTime.CENTURY:clearInYear(date2);date2.setUTCFullYear(Math.floor(date2.getUTCFullYear()/100)*100);break;case Timeline.DateTime.MILLENNIUM:clearInYear(date2);date2.setUTCFullYear(Math.floor(date2.getUTCFullYear()/1000)*1000);break;}
date.setTime(date2.getTime()-timeShift);};Timeline.DateTime.roundUpToInterval=function(date,intervalUnit,timeZone,multiple,firstDayOfWeek){var originalTime=date.getTime();Timeline.DateTime.roundDownToInterval(date,intervalUnit,timeZone,multiple,firstDayOfWeek);if(date.getTime()<originalTime){date.setTime(date.getTime()+
Timeline.DateTime.gregorianUnitLengths[intervalUnit]*multiple);}};Timeline.DateTime.incrementByInterval=function(date,intervalUnit){switch(intervalUnit){case Timeline.DateTime.MILLISECOND:date.setTime(date.getTime()+1)
break;case Timeline.DateTime.SECOND:date.setTime(date.getTime()+1000);break;case Timeline.DateTime.MINUTE:date.setTime(date.getTime()+
Timeline.DateTime.gregorianUnitLengths[Timeline.DateTime.MINUTE]);break;case Timeline.DateTime.HOUR:date.setTime(date.getTime()+
Timeline.DateTime.gregorianUnitLengths[Timeline.DateTime.HOUR]);break;case Timeline.DateTime.DAY:date.setUTCDate(date.getUTCDate()+1);break;case Timeline.DateTime.WEEK:date.setUTCDate(date.getUTCDate()+7);break;case Timeline.DateTime.MONTH:date.setUTCMonth(date.getUTCMonth()+1);break;case Timeline.DateTime.YEAR:date.setUTCFullYear(date.getUTCFullYear()+1);break;case Timeline.DateTime.DECADE:date.setUTCFullYear(date.getUTCFullYear()+10);break;case Timeline.DateTime.CENTURY:date.setUTCFullYear(date.getUTCFullYear()+100);break;case Timeline.DateTime.MILLENNIUM:date.setUTCFullYear(date.getUTCFullYear()+1000);break;}};Timeline.DateTime.removeTimeZoneOffset=function(date,timeZone){return new Date(date.getTime()+
timeZone*Timeline.DateTime.gregorianUnitLengths[Timeline.DateTime.HOUR]);};

/* debug.js */

Timeline.Debug=new Object();Timeline.Debug.log=function(msg){};Timeline.Debug.exception=function(e){alert("Caught exception: "+(Timeline.Platform.isIE?e.message:e));};

/* dom.js */

Timeline.DOM=new Object();Timeline.DOM.registerEventWithObject=function(elmt,eventName,obj,handler){Timeline.DOM.registerEvent(elmt,eventName,function(elmt2,evt,target){return handler.call(obj,elmt2,evt,target);});};Timeline.DOM.registerEvent=function(elmt,eventName,handler){var handler2=function(evt){evt=(evt)?evt:((event)?event:null);if(evt){var target=(evt.target)?evt.target:((evt.srcElement)?evt.srcElement:null);if(target){target=(target.nodeType==1||target.nodeType==9)?target:target.parentNode;}
return handler(elmt,evt,target);}
return true;}
if(Timeline.Platform.browser.isIE){elmt.attachEvent("on"+eventName,handler2);}else{elmt.addEventListener(eventName,handler2,false);}};Timeline.DOM.getPageCoordinates=function(elmt){var left=0;var top=0;if(elmt.nodeType!=1){elmt=elmt.parentNode;}
while(elmt!=null){left+=elmt.offsetLeft;top+=elmt.offsetTop;elmt=elmt.offsetParent;}
return{left:left,top:top};};Timeline.DOM.getEventRelativeCoordinates=function(evt,elmt){if(Timeline.Platform.browser.isIE){return{x:evt.offsetX,y:evt.offsetY};}else{var coords=Timeline.DOM.getPageCoordinates(elmt);return{x:evt.pageX-coords.left,y:evt.pageY-coords.top};}};Timeline.DOM.cancelEvent=function(evt){evt.returnValue=false;evt.cancelBubble=true;if("preventDefault"in evt){evt.preventDefault();}};

/* graphics.js */

Timeline.Graphics=new Object();Timeline.Graphics.pngIsTranslucent=(!Timeline.Platform.browser.isIE)||(Timeline.Platform.browser.majorVersion>6);Timeline.Graphics.createTranslucentImage=function(doc,url,verticalAlign){var elmt;if(Timeline.Graphics.pngIsTranslucent){elmt=doc.createElement("img");elmt.setAttribute("src",url);}else{elmt=doc.createElement("img");elmt.style.display="inline";elmt.style.width="1px";elmt.style.height="1px";elmt.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"', sizingMethod='image')";}
elmt.style.verticalAlign=(verticalAlign!=null)?verticalAlign:"middle";return elmt;};Timeline.Graphics.setOpacity=function(elmt,opacity){if(Timeline.Platform.browser.isIE){elmt.style.filter="progid:DXImageTransform.Microsoft.Alpha(Style=0,Opacity="+opacity+")";}else{var o=(opacity/100).toString();elmt.style.opacity=o;elmt.style.MozOpacity=o;}};Timeline.Graphics._bubbleMargins={top:33,bottom:42,left:33,right:40}
Timeline.Graphics._arrowOffsets={top:0,bottom:9,left:1,right:8}
Timeline.Graphics._bubblePadding=15;Timeline.Graphics._bubblePointOffset=6;Timeline.Graphics._halfArrowWidth=18;Timeline.Graphics.createBubbleForPoint=function(doc,pageX,pageY,contentWidth,contentHeight){var bubble={_closed:false,_doc:doc,close:function(){if(!this._closed){this._doc.body.removeChild(this._div);this._doc=null;this._div=null;this._content=null;this._closed=true;}}};var docWidth=doc.body.offsetWidth;var docHeight=doc.body.offsetHeight;var margins=Timeline.Graphics._bubbleMargins;var bubbleWidth=margins.left+contentWidth+margins.right;var bubbleHeight=margins.top+contentHeight+margins.bottom;var pngIsTranslucent=Timeline.Graphics.pngIsTranslucent;var urlPrefix=Timeline.urlPrefix;var setImg=function(elmt,url,width,height){elmt.style.position="absolute";elmt.style.width=width+"px";elmt.style.height=height+"px";if(pngIsTranslucent){elmt.style.background="url("+url+")";}else{elmt.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"', sizingMethod='crop')";}}
var div=doc.createElement("div");div.style.width=bubbleWidth+"px";div.style.height=bubbleHeight+"px";div.style.position="absolute";div.style.zIndex=1000;bubble._div=div;var divInner=doc.createElement("div");divInner.style.width="100%";divInner.style.height="100%";divInner.style.position="relative";div.appendChild(divInner);var createImg=function(url,left,top,width,height){var divImg=doc.createElement("div");divImg.style.left=left+"px";divImg.style.top=top+"px";setImg(divImg,url,width,height);divInner.appendChild(divImg);}
createImg(urlPrefix+"images/bubble-top-left.png",0,0,margins.left,margins.top);createImg(urlPrefix+"images/bubble-top.png",margins.left,0,contentWidth,margins.top);createImg(urlPrefix+"images/bubble-top-right.png",margins.left+contentWidth,0,margins.right,margins.top);createImg(urlPrefix+"images/bubble-left.png",0,margins.top,margins.left,contentHeight);createImg(urlPrefix+"images/bubble-right.png",margins.left+contentWidth,margins.top,margins.right,contentHeight);createImg(urlPrefix+"images/bubble-bottom-left.png",0,margins.top+contentHeight,margins.left,margins.bottom);createImg(urlPrefix+"images/bubble-bottom.png",margins.left,margins.top+contentHeight,contentWidth,margins.bottom);createImg(urlPrefix+"images/bubble-bottom-right.png",margins.left+contentWidth,margins.top+contentHeight,margins.right,margins.bottom);var divClose=doc.createElement("div");divClose.style.left=(bubbleWidth-margins.right+Timeline.Graphics._bubblePadding-16-2)+"px";divClose.style.top=(margins.top-Timeline.Graphics._bubblePadding+1)+"px";divClose.style.cursor="pointer";setImg(divClose,urlPrefix+"images/close-button.png",16,16);Timeline.DOM.registerEventWithObject(divClose,"click",bubble,bubble.close);divInner.appendChild(divClose);var divContent=doc.createElement("div");divContent.style.position="absolute";divContent.style.left=margins.left+"px";divContent.style.top=margins.top+"px";divContent.style.width=contentWidth+"px";divContent.style.height=contentHeight+"px";divContent.style.overflow="auto";divContent.style.background="white";divInner.appendChild(divContent);bubble.content=divContent;(function(){if(pageX-Timeline.Graphics._halfArrowWidth-Timeline.Graphics._bubblePadding>0&&pageX+Timeline.Graphics._halfArrowWidth+Timeline.Graphics._bubblePadding<docWidth){var left=pageX-Math.round(contentWidth/2)-margins.left;left=pageX<(docWidth/2)?Math.max(left,-(margins.left-Timeline.Graphics._bubblePadding)):Math.min(left,docWidth+(margins.right-Timeline.Graphics._bubblePadding)-bubbleWidth);if(pageY-Timeline.Graphics._bubblePointOffset-bubbleHeight>0){var divImg=doc.createElement("div");divImg.style.left=(pageX-Timeline.Graphics._halfArrowWidth-left)+"px";divImg.style.top=(margins.top+contentHeight)+"px";setImg(divImg,urlPrefix+"images/bubble-bottom-arrow.png",37,margins.bottom);divInner.appendChild(divImg);div.style.left=left+"px";div.style.top=(pageY-Timeline.Graphics._bubblePointOffset-bubbleHeight+
Timeline.Graphics._arrowOffsets.bottom)+"px";return;}else if(pageY+Timeline.Graphics._bubblePointOffset+bubbleHeight<docHeight){var divImg=doc.createElement("div");divImg.style.left=(pageX-Timeline.Graphics._halfArrowWidth-left)+"px";divImg.style.top="0px";setImg(divImg,urlPrefix+"images/bubble-top-arrow.png",37,margins.top);divInner.appendChild(divImg);div.style.left=left+"px";div.style.top=(pageY+Timeline.Graphics._bubblePointOffset-
Timeline.Graphics._arrowOffsets.top)+"px";return;}}
var top=pageY-Math.round(contentHeight/2)-margins.top;top=pageY<(docHeight/2)?Math.max(top,-(margins.top-Timeline.Graphics._bubblePadding)):Math.min(top,docHeight+(margins.bottom-Timeline.Graphics._bubblePadding)-bubbleHeight);if(pageX-Timeline.Graphics._bubblePointOffset-bubbleWidth>0){var divImg=doc.createElement("div");divImg.style.left=(margins.left+contentWidth)+"px";divImg.style.top=(pageY-Timeline.Graphics._halfArrowWidth-top)+"px";setImg(divImg,urlPrefix+"images/bubble-right-arrow.png",margins.right,37);divInner.appendChild(divImg);div.style.left=(pageX-Timeline.Graphics._bubblePointOffset-bubbleWidth+
Timeline.Graphics._arrowOffsets.right)+"px";div.style.top=top+"px";}else{var divImg=doc.createElement("div");divImg.style.left="0px";divImg.style.top=(pageY-Timeline.Graphics._halfArrowWidth-top)+"px";setImg(divImg,urlPrefix+"images/bubble-left-arrow.png",margins.left,37);divInner.appendChild(divImg);div.style.left=(pageX+Timeline.Graphics._bubblePointOffset-
Timeline.Graphics._arrowOffsets.left)+"px";div.style.top=top+"px";}})();doc.body.appendChild(div);return bubble;};Timeline.Graphics.createMessageBubble=function(doc){var containerDiv=doc.createElement("div");if(Timeline.Graphics.pngIsTranslucent){var topDiv=doc.createElement("div");topDiv.style.height="33px";topDiv.style.background="url("+Timeline.urlPrefix+"images/message-top-left.png) top left no-repeat";topDiv.style.paddingLeft="44px";containerDiv.appendChild(topDiv);var topRightDiv=doc.createElement("div");topRightDiv.style.height="33px";topRightDiv.style.background="url("+Timeline.urlPrefix+"images/message-top-right.png) top right no-repeat";topDiv.appendChild(topRightDiv);var middleDiv=doc.createElement("div");middleDiv.style.background="url("+Timeline.urlPrefix+"images/message-left.png) top left repeat-y";middleDiv.style.paddingLeft="44px";containerDiv.appendChild(middleDiv);var middleRightDiv=doc.createElement("div");middleRightDiv.style.background="url("+Timeline.urlPrefix+"images/message-right.png) top right repeat-y";middleRightDiv.style.paddingRight="44px";middleDiv.appendChild(middleRightDiv);var contentDiv=doc.createElement("div");middleRightDiv.appendChild(contentDiv);var bottomDiv=doc.createElement("div");bottomDiv.style.height="55px";bottomDiv.style.background="url("+Timeline.urlPrefix+"images/message-bottom-left.png) bottom left no-repeat";bottomDiv.style.paddingLeft="44px";containerDiv.appendChild(bottomDiv);var bottomRightDiv=doc.createElement("div");bottomRightDiv.style.height="55px";bottomRightDiv.style.background="url("+Timeline.urlPrefix+"images/message-bottom-right.png) bottom right no-repeat";bottomDiv.appendChild(bottomRightDiv);}else{containerDiv.style.border="2px solid #7777AA";containerDiv.style.padding="20px";containerDiv.style.background="white";Timeline.Graphics.setOpacity(containerDiv,90);var contentDiv=doc.createElement("div");containerDiv.appendChild(contentDiv);}
return{containerDiv:containerDiv,contentDiv:contentDiv};};Timeline.Graphics.createAnimation=function(f,from,to,duration){return new Timeline.Graphics._Animation(f,from,to,duration);};Timeline.Graphics._Animation=function(f,from,to,duration){this.f=f;this.from=from;this.to=to;this.current=from;this.duration=duration;this.start=new Date().getTime();this.timePassed=0;};Timeline.Graphics._Animation.prototype.run=function(){var a=this;window.setTimeout(function(){a.step();},100);};Timeline.Graphics._Animation.prototype.step=function(){this.timePassed+=100;var timePassedFraction=this.timePassed/this.duration;var parameterFraction=-Math.cos(timePassedFraction*Math.PI)/2+0.5;var current=parameterFraction*(this.to-this.from)+this.from;try{this.f(current,current-this.current);}catch(e){}
this.current=current;if(this.timePassed<this.duration){this.run();}};

/* html.js */

Timeline.HTML=new Object();Timeline.HTML._e2uHash={};(function(){e2uHash=Timeline.HTML._e2uHash;e2uHash['nbsp']='\u00A0[space]';e2uHash['iexcl']='\u00A1';e2uHash['cent']='\u00A2';e2uHash['pound']='\u00A3';e2uHash['curren']='\u00A4';e2uHash['yen']='\u00A5';e2uHash['brvbar']='\u00A6';e2uHash['sect']='\u00A7';e2uHash['uml']='\u00A8';e2uHash['copy']='\u00A9';e2uHash['ordf']='\u00AA';e2uHash['laquo']='\u00AB';e2uHash['not']='\u00AC';e2uHash['shy']='\u00AD';e2uHash['reg']='\u00AE';e2uHash['macr']='\u00AF';e2uHash['deg']='\u00B0';e2uHash['plusmn']='\u00B1';e2uHash['sup2']='\u00B2';e2uHash['sup3']='\u00B3';e2uHash['acute']='\u00B4';e2uHash['micro']='\u00B5';e2uHash['para']='\u00B6';e2uHash['middot']='\u00B7';e2uHash['cedil']='\u00B8';e2uHash['sup1']='\u00B9';e2uHash['ordm']='\u00BA';e2uHash['raquo']='\u00BB';e2uHash['frac14']='\u00BC';e2uHash['frac12']='\u00BD';e2uHash['frac34']='\u00BE';e2uHash['iquest']='\u00BF';e2uHash['Agrave']='\u00C0';e2uHash['Aacute']='\u00C1';e2uHash['Acirc']='\u00C2';e2uHash['Atilde']='\u00C3';e2uHash['Auml']='\u00C4';e2uHash['Aring']='\u00C5';e2uHash['AElig']='\u00C6';e2uHash['Ccedil']='\u00C7';e2uHash['Egrave']='\u00C8';e2uHash['Eacute']='\u00C9';e2uHash['Ecirc']='\u00CA';e2uHash['Euml']='\u00CB';e2uHash['Igrave']='\u00CC';e2uHash['Iacute']='\u00CD';e2uHash['Icirc']='\u00CE';e2uHash['Iuml']='\u00CF';e2uHash['ETH']='\u00D0';e2uHash['Ntilde']='\u00D1';e2uHash['Ograve']='\u00D2';e2uHash['Oacute']='\u00D3';e2uHash['Ocirc']='\u00D4';e2uHash['Otilde']='\u00D5';e2uHash['Ouml']='\u00D6';e2uHash['times']='\u00D7';e2uHash['Oslash']='\u00D8';e2uHash['Ugrave']='\u00D9';e2uHash['Uacute']='\u00DA';e2uHash['Ucirc']='\u00DB';e2uHash['Uuml']='\u00DC';e2uHash['Yacute']='\u00DD';e2uHash['THORN']='\u00DE';e2uHash['szlig']='\u00DF';e2uHash['agrave']='\u00E0';e2uHash['aacute']='\u00E1';e2uHash['acirc']='\u00E2';e2uHash['atilde']='\u00E3';e2uHash['auml']='\u00E4';e2uHash['aring']='\u00E5';e2uHash['aelig']='\u00E6';e2uHash['ccedil']='\u00E7';e2uHash['egrave']='\u00E8';e2uHash['eacute']='\u00E9';e2uHash['ecirc']='\u00EA';e2uHash['euml']='\u00EB';e2uHash['igrave']='\u00EC';e2uHash['iacute']='\u00ED';e2uHash['icirc']='\u00EE';e2uHash['iuml']='\u00EF';e2uHash['eth']='\u00F0';e2uHash['ntilde']='\u00F1';e2uHash['ograve']='\u00F2';e2uHash['oacute']='\u00F3';e2uHash['ocirc']='\u00F4';e2uHash['otilde']='\u00F5';e2uHash['ouml']='\u00F6';e2uHash['divide']='\u00F7';e2uHash['oslash']='\u00F8';e2uHash['ugrave']='\u00F9';e2uHash['uacute']='\u00FA';e2uHash['ucirc']='\u00FB';e2uHash['uuml']='\u00FC';e2uHash['yacute']='\u00FD';e2uHash['thorn']='\u00FE';e2uHash['yuml']='\u00FF';e2uHash['quot']='\u0022';e2uHash['amp']='\u0026';e2uHash['lt']='\u003C';e2uHash['gt']='\u003E';e2uHash['OElig']='';e2uHash['oelig']='\u0153';e2uHash['Scaron']='\u0160';e2uHash['scaron']='\u0161';e2uHash['Yuml']='\u0178';e2uHash['circ']='\u02C6';e2uHash['tilde']='\u02DC';e2uHash['ensp']='\u2002';e2uHash['emsp']='\u2003';e2uHash['thinsp']='\u2009';e2uHash['zwnj']='\u200C';e2uHash['zwj']='\u200D';e2uHash['lrm']='\u200E';e2uHash['rlm']='\u200F';e2uHash['ndash']='\u2013';e2uHash['mdash']='\u2014';e2uHash['lsquo']='\u2018';e2uHash['rsquo']='\u2019';e2uHash['sbquo']='\u201A';e2uHash['ldquo']='\u201C';e2uHash['rdquo']='\u201D';e2uHash['bdquo']='\u201E';e2uHash['dagger']='\u2020';e2uHash['Dagger']='\u2021';e2uHash['permil']='\u2030';e2uHash['lsaquo']='\u2039';e2uHash['rsaquo']='\u203A';e2uHash['euro']='\u20AC';e2uHash['fnof']='\u0192';e2uHash['Alpha']='\u0391';e2uHash['Beta']='\u0392';e2uHash['Gamma']='\u0393';e2uHash['Delta']='\u0394';e2uHash['Epsilon']='\u0395';e2uHash['Zeta']='\u0396';e2uHash['Eta']='\u0397';e2uHash['Theta']='\u0398';e2uHash['Iota']='\u0399';e2uHash['Kappa']='\u039A';e2uHash['Lambda']='\u039B';e2uHash['Mu']='\u039C';e2uHash['Nu']='\u039D';e2uHash['Xi']='\u039E';e2uHash['Omicron']='\u039F';e2uHash['Pi']='\u03A0';e2uHash['Rho']='\u03A1';e2uHash['Sigma']='\u03A3';e2uHash['Tau']='\u03A4';e2uHash['Upsilon']='\u03A5';e2uHash['Phi']='\u03A6';e2uHash['Chi']='\u03A7';e2uHash['Psi']='\u03A8';e2uHash['Omega']='\u03A9';e2uHash['alpha']='\u03B1';e2uHash['beta']='\u03B2';e2uHash['gamma']='\u03B3';e2uHash['delta']='\u03B4';e2uHash['epsilon']='\u03B5';e2uHash['zeta']='\u03B6';e2uHash['eta']='\u03B7';e2uHash['theta']='\u03B8';e2uHash['iota']='\u03B9';e2uHash['kappa']='\u03BA';e2uHash['lambda']='\u03BB';e2uHash['mu']='\u03BC';e2uHash['nu']='\u03BD';e2uHash['xi']='\u03BE';e2uHash['omicron']='\u03BF';e2uHash['pi']='\u03C0';e2uHash['rho']='\u03C1';e2uHash['sigmaf']='\u03C2';e2uHash['sigma']='\u03C3';e2uHash['tau']='\u03C4';e2uHash['upsilon']='\u03C5';e2uHash['phi']='\u03C6';e2uHash['chi']='\u03C7';e2uHash['psi']='\u03C8';e2uHash['omega']='\u03C9';e2uHash['thetasym']='\u03D1';e2uHash['upsih']='\u03D2';e2uHash['piv']='\u03D6';e2uHash['bull']='\u2022';e2uHash['hellip']='\u2026';e2uHash['prime']='\u2032';e2uHash['Prime']='\u2033';e2uHash['oline']='\u203E';e2uHash['frasl']='\u2044';e2uHash['weierp']='\u2118';e2uHash['image']='\u2111';e2uHash['real']='\u211C';e2uHash['trade']='\u2122';e2uHash['alefsym']='\u2135';e2uHash['larr']='\u2190';e2uHash['uarr']='\u2191';e2uHash['rarr']='\u2192';e2uHash['darr']='\u2193';e2uHash['harr']='\u2194';e2uHash['crarr']='\u21B5';e2uHash['lArr']='\u21D0';e2uHash['uArr']='\u21D1';e2uHash['rArr']='\u21D2';e2uHash['dArr']='\u21D3';e2uHash['hArr']='\u21D4';e2uHash['forall']='\u2200';e2uHash['part']='\u2202';e2uHash['exist']='\u2203';e2uHash['empty']='\u2205';e2uHash['nabla']='\u2207';e2uHash['isin']='\u2208';e2uHash['notin']='\u2209';e2uHash['ni']='\u220B';e2uHash['prod']='\u220F';e2uHash['sum']='\u2211';e2uHash['minus']='\u2212';e2uHash['lowast']='\u2217';e2uHash['radic']='\u221A';e2uHash['prop']='\u221D';e2uHash['infin']='\u221E';e2uHash['ang']='\u2220';e2uHash['and']='\u2227';e2uHash['or']='\u2228';e2uHash['cap']='\u2229';e2uHash['cup']='\u222A';e2uHash['int']='\u222B';e2uHash['there4']='\u2234';e2uHash['sim']='\u223C';e2uHash['cong']='\u2245';e2uHash['asymp']='\u2248';e2uHash['ne']='\u2260';e2uHash['equiv']='\u2261';e2uHash['le']='\u2264';e2uHash['ge']='\u2265';e2uHash['sub']='\u2282';e2uHash['sup']='\u2283';e2uHash['nsub']='\u2284';e2uHash['sube']='\u2286';e2uHash['supe']='\u2287';e2uHash['oplus']='\u2295';e2uHash['otimes']='\u2297';e2uHash['perp']='\u22A5';e2uHash['sdot']='\u22C5';e2uHash['lceil']='\u2308';e2uHash['rceil']='\u2309';e2uHash['lfloor']='\u230A';e2uHash['rfloor']='\u230B';e2uHash['lang']='\u2329';e2uHash['rang']='\u232A';e2uHash['loz']='\u25CA';e2uHash['spades']='\u2660';e2uHash['clubs']='\u2663';e2uHash['hearts']='\u2665';e2uHash['diams']='\u2666';})();Timeline.HTML.deEntify=function(s){e2uHash=Timeline.HTML._e2uHash;var re=/&(\w+?);/;while(re.test(s)){var m=s.match(re);s=s.replace(re,e2uHash[m[1]]);}
return s;};

/* xmlhttp.js */

Timeline.XmlHttp=new Object();Timeline.XmlHttp._onReadyStateChange=function(xmlhttp,fError,fDone){switch(xmlhttp.readyState){case 4:try{if(xmlhttp.status==0||xmlhttp.status==200){if(fDone){fDone(xmlhttp);}}else{if(fError){fError(xmlhttp.statusText,xmlhttp.status,xmlhttp);}}}catch(e){Timeline.Debug.exception(e);}
break;}};Timeline.XmlHttp._createRequest=function(){if(Timeline.Platform.browser.isIE){var programIDs=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];for(var i=0;i<programIDs.length;i++){try{var programID=programIDs[i];var f=function(){return new ActiveXObject(programID);};var o=f();Timeline.XmlHttp._createRequest=f;return o;}catch(e){}}
throw new Error("Failed to create an XMLHttpRequest object");}else{try{var f=function(){return new XMLHttpRequest();};var o=f();Timeline.XmlHttp._createRequest=f;return o;}catch(e){throw new Error("Failed to create an XMLHttpRequest object");}}};Timeline.XmlHttp.get=function(url,fError,fDone){var xmlhttp=Timeline.XmlHttp._createRequest();xmlhttp.open("GET",url,true);xmlhttp.onreadystatechange=function(){Timeline.XmlHttp._onReadyStateChange(xmlhttp,fError,fDone);};xmlhttp.send(null);};Timeline.XmlHttp.post=function(url,body,fError,fDone){var xmlhttp=Timeline.XmlHttp._createRequest();xmlhttp.open("POST",url,true);xmlhttp.onreadystatechange=function(){Timeline.XmlHttp._onReadyStateChange(xmlhttp,fError,fDone);};xmlhttp.send(body);};Timeline.XmlHttp._forceXML=function(xmlhttp){try{xmlhttp.overrideMimeType("text/xml");}catch(e){xmlhttp.setrequestheader("Content-Type","text/xml");}};

/* decorators.js */

Timeline.SpanHighlightDecorator=function(params){this._unit=("unit"in params)?params.unit:Timeline.NativeDateUnit;this._startDate=(typeof params.startDate=="string")?this._unit.parseFromObject(params.startDate):params.startDate;this._endDate=(typeof params.endDate=="string")?this._unit.parseFromObject(params.endDate):params.endDate;this._startLabel=params.startLabel;this._endLabel=params.endLabel;this._color=params.color;this._opacity=("opacity"in params)?params.opacity:100;};Timeline.SpanHighlightDecorator.prototype.initialize=function(band,timeline){this._band=band;this._timeline=timeline;this._layerDiv=null;};Timeline.SpanHighlightDecorator.prototype.paint=function(){if(this._layerDiv!=null){this._band.removeLayerDiv(this._layerDiv);}
this._layerDiv=this._band.createLayerDiv(10);this._layerDiv.setAttribute("name","span-highlight-decorator");this._layerDiv.style.display="none";var minDate=this._band.getMinDate();var maxDate=this._band.getMaxDate();if(this._unit.compare(this._startDate,maxDate)<0&&this._unit.compare(this._endDate,minDate)>0){minDate=this._unit.later(minDate,this._startDate);maxDate=this._unit.earlier(maxDate,this._endDate);var minPixel=this._band.dateToPixelOffset(minDate);var maxPixel=this._band.dateToPixelOffset(maxDate);var doc=this._timeline.getDocument();var createTable=function(){var table=doc.createElement("table");table.insertRow(0).insertCell(0);return table;};var div=doc.createElement("div");div.style.position="absolute";div.style.overflow="hidden";div.style.background=this._color;if(this._opacity<100){Timeline.Graphics.setOpacity(div,this._opacity);}
this._layerDiv.appendChild(div);var tableStartLabel=createTable();tableStartLabel.style.position="absolute";tableStartLabel.style.overflow="hidden";tableStartLabel.style.fontSize="300%";tableStartLabel.style.fontWeight="bold";tableStartLabel.style.color=this._color;tableStartLabel.rows[0].cells[0].innerHTML=this._startLabel;this._layerDiv.appendChild(tableStartLabel);var tableEndLabel=createTable();tableEndLabel.style.position="absolute";tableEndLabel.style.overflow="hidden";tableEndLabel.style.fontSize="300%";tableEndLabel.style.fontWeight="bold";tableEndLabel.style.color=this._color;tableEndLabel.rows[0].cells[0].innerHTML=this._endLabel;this._layerDiv.appendChild(tableEndLabel);if(this._timeline.isHorizontal()){div.style.left=minPixel+"px";div.style.width=(maxPixel-minPixel)+"px";div.style.top="0px";div.style.height="100%";tableStartLabel.style.right=(this._band.getTotalViewLength()-minPixel)+"px";tableStartLabel.style.width=(this._startLabel.length)+"em";tableStartLabel.style.top="0px";tableStartLabel.style.height="100%";tableStartLabel.style.textAlign="right";tableEndLabel.style.left=maxPixel+"px";tableEndLabel.style.width=(this._endLabel.length)+"em";tableEndLabel.style.top="0px";tableEndLabel.style.height="100%";}else{div.style.top=minPixel+"px";div.style.height=(maxPixel-minPixel)+"px";div.style.left="0px";div.style.width="100%";tableStartLabel.style.bottom=minPixel+"px";tableStartLabel.style.height="1.5px";tableStartLabel.style.left="0px";tableStartLabel.style.width="100%";tableEndLabel.style.top=maxPixel+"px";tableEndLabel.style.height="1.5px";tableEndLabel.style.left="0px";tableEndLabel.style.width="100%";}}
this._layerDiv.style.display="block";};Timeline.SpanHighlightDecorator.prototype.softPaint=function(){};Timeline.PointHighlightDecorator=function(params){this._unit=("unit"in params)?params.unit:Timeline.NativeDateUnit;this._date=(typeof params.date=="string")?this._unit.parseFromObject(params.date):params.date;this._width=("width"in params)?params.width:10;this._color=params.color;this._opacity=("opacity"in params)?params.opacity:100;};Timeline.PointHighlightDecorator.prototype.initialize=function(band,timeline){this._band=band;this._timeline=timeline;this._layerDiv=null;};Timeline.PointHighlightDecorator.prototype.paint=function(){if(this._layerDiv!=null){this._band.removeLayerDiv(this._layerDiv);}
this._layerDiv=this._band.createLayerDiv(10);this._layerDiv.setAttribute("name","span-highlight-decorator");this._layerDiv.style.display="none";var minDate=this._band.getMinDate();var maxDate=this._band.getMaxDate();if(this._unit.compare(this._date,maxDate)<0&&this._unit.compare(this._date,minDate)>0){var pixel=this._band.dateToPixelOffset(this._date);var minPixel=pixel-Math.round(this._width/2);var doc=this._timeline.getDocument();var div=doc.createElement("div");div.style.position="absolute";div.style.overflow="hidden";div.style.background=this._color;if(this._opacity<100){Timeline.Graphics.setOpacity(div,this._opacity);}
this._layerDiv.appendChild(div);if(this._timeline.isHorizontal()){div.style.left=minPixel+"px";div.style.width=this._width+"px";div.style.top="0px";div.style.height="100%";}else{div.style.top=minPixel+"px";div.style.height=this._width+"px";div.style.left="0px";div.style.width="100%";}}
this._layerDiv.style.display="block";};Timeline.PointHighlightDecorator.prototype.softPaint=function(){};

/* ether-painters.js */

Timeline.GregorianEtherPainter=function(params){this._params=params;this._theme=params.theme;this._unit=params.unit;this._multiple=("multiple"in params)?params.multiple:1;};Timeline.GregorianEtherPainter.prototype.initialize=function(band,timeline){this._band=band;this._timeline=timeline;this._backgroundLayer=band.createLayerDiv(0);this._backgroundLayer.setAttribute("name","ether-background");this._backgroundLayer.style.background=this._theme.ether.backgroundColors[band.getIndex()];this._markerLayer=null;this._lineLayer=null;var align=("align"in this._params&&this._params.align!=undefined)?this._params.align:this._theme.ether.interval.marker[timeline.isHorizontal()?"hAlign":"vAlign"];var showLine=("showLine"in this._params)?this._params.showLine:this._theme.ether.interval.line.show;this._intervalMarkerLayout=new Timeline.EtherIntervalMarkerLayout(this._timeline,this._band,this._theme,align,showLine);this._highlight=new Timeline.EtherHighlight(this._timeline,this._band,this._theme,this._backgroundLayer);}
Timeline.GregorianEtherPainter.prototype.setHighlight=function(startDate,endDate){this._highlight.position(startDate,endDate);}
Timeline.GregorianEtherPainter.prototype.paint=function(){if(this._markerLayer){this._band.removeLayerDiv(this._markerLayer);}
this._markerLayer=this._band.createLayerDiv(100);this._markerLayer.setAttribute("name","ether-markers");this._markerLayer.style.display="none";if(this._lineLayer){this._band.removeLayerDiv(this._lineLayer);}
this._lineLayer=this._band.createLayerDiv(1);this._lineLayer.setAttribute("name","ether-lines");this._lineLayer.style.display="none";var minDate=this._band.getMinDate();var maxDate=this._band.getMaxDate();var timeZone=this._band.getTimeZone();var labeller=this._band.getLabeller();Timeline.DateTime.roundDownToInterval(minDate,this._unit,timeZone,1,this._theme.firstDayOfWeek);var p=this;var incrementDate=function(date){for(var i=0;i<p._multiple;i++){Timeline.DateTime.incrementByInterval(date,p._unit);}};while(minDate.getTime()<maxDate.getTime()){this._intervalMarkerLayout.createIntervalMarker(minDate,labeller,this._unit,this._markerLayer,this._lineLayer);incrementDate(minDate);}
this._markerLayer.style.display="block";this._lineLayer.style.display="block";};Timeline.GregorianEtherPainter.prototype.softPaint=function(){};Timeline.HotZoneGregorianEtherPainter=function(params){this._params=params;this._theme=params.theme;this._zones=[{startTime:Number.NEGATIVE_INFINITY,endTime:Number.POSITIVE_INFINITY,unit:params.unit,multiple:1}];for(var i=0;i<params.zones.length;i++){var zone=params.zones[i];var zoneStart=Timeline.DateTime.parseGregorianDateTime(zone.start).getTime();var zoneEnd=Timeline.DateTime.parseGregorianDateTime(zone.end).getTime();for(var j=0;j<this._zones.length&&zoneEnd>zoneStart;j++){var zone2=this._zones[j];if(zoneStart<zone2.endTime){if(zoneStart>zone2.startTime){this._zones.splice(j,0,{startTime:zone2.startTime,endTime:zoneStart,unit:zone2.unit,multiple:zone2.multiple});j++;zone2.startTime=zoneStart;}
if(zoneEnd<zone2.endTime){this._zones.splice(j,0,{startTime:zoneStart,endTime:zoneEnd,unit:zone.unit,multiple:(zone.multiple)?zone.multiple:1});j++;zone2.startTime=zoneEnd;zoneStart=zoneEnd;}else{zone2.multiple=zone.multiple;zone2.unit=zone.unit;zoneStart=zone2.endTime;}}}}};Timeline.HotZoneGregorianEtherPainter.prototype.initialize=function(band,timeline){this._band=band;this._timeline=timeline;this._backgroundLayer=band.createLayerDiv(0);this._backgroundLayer.setAttribute("name","ether-background");this._backgroundLayer.style.background=this._theme.ether.backgroundColors[band.getIndex()];this._markerLayer=null;this._lineLayer=null;var align=("align"in this._params&&this._params.align!=undefined)?this._params.align:this._theme.ether.interval.marker[timeline.isHorizontal()?"hAlign":"vAlign"];var showLine=("showLine"in this._params)?this._params.showLine:this._theme.ether.interval.line.show;this._intervalMarkerLayout=new Timeline.EtherIntervalMarkerLayout(this._timeline,this._band,this._theme,align,showLine);this._highlight=new Timeline.EtherHighlight(this._timeline,this._band,this._theme,this._backgroundLayer);}
Timeline.HotZoneGregorianEtherPainter.prototype.setHighlight=function(startDate,endDate){this._highlight.position(startDate,endDate);}
Timeline.HotZoneGregorianEtherPainter.prototype.paint=function(){if(this._markerLayer){this._band.removeLayerDiv(this._markerLayer);}
this._markerLayer=this._band.createLayerDiv(100);this._markerLayer.setAttribute("name","ether-markers");this._markerLayer.style.display="none";if(this._lineLayer){this._band.removeLayerDiv(this._lineLayer);}
this._lineLayer=this._band.createLayerDiv(1);this._lineLayer.setAttribute("name","ether-lines");this._lineLayer.style.display="none";var minDate=this._band.getMinDate();var maxDate=this._band.getMaxDate();var timeZone=this._band.getTimeZone();var labeller=this._band.getLabeller();var p=this;var incrementDate=function(date,zone){for(var i=0;i<zone.multiple;i++){Timeline.DateTime.incrementByInterval(date,zone.unit);}};var zStart=0;while(zStart<this._zones.length){if(minDate.getTime()<this._zones[zStart].endTime){break;}
zStart++;}
var zEnd=this._zones.length-1;while(zEnd>=0){if(maxDate.getTime()>this._zones[zEnd].startTime){break;}
zEnd--;}
for(var z=zStart;z<=zEnd;z++){var zone=this._zones[z];var minDate2=new Date(Math.max(minDate.getTime(),zone.startTime));var maxDate2=new Date(Math.min(maxDate.getTime(),zone.endTime));Timeline.DateTime.roundDownToInterval(minDate2,zone.unit,timeZone,zone.multiple,this._theme.firstDayOfWeek);Timeline.DateTime.roundUpToInterval(maxDate2,zone.unit,timeZone,zone.multiple,this._theme.firstDayOfWeek);while(minDate2.getTime()<maxDate2.getTime()){this._intervalMarkerLayout.createIntervalMarker(minDate2,labeller,zone.unit,this._markerLayer,this._lineLayer);incrementDate(minDate2,zone);}}
this._markerLayer.style.display="block";this._lineLayer.style.display="block";};Timeline.HotZoneGregorianEtherPainter.prototype.softPaint=function(){};Timeline.YearCountEtherPainter=function(params){this._params=params;this._theme=params.theme;this._startDate=Timeline.DateTime.parseGregorianDateTime(params.startDate);this._multiple=("multiple"in params)?params.multiple:1;};Timeline.YearCountEtherPainter.prototype.initialize=function(band,timeline){this._band=band;this._timeline=timeline;this._backgroundLayer=band.createLayerDiv(0);this._backgroundLayer.setAttribute("name","ether-background");this._backgroundLayer.style.background=this._theme.ether.backgroundColors[band.getIndex()];this._markerLayer=null;this._lineLayer=null;var align=("align"in this._params)?this._params.align:this._theme.ether.interval.marker[timeline.isHorizontal()?"hAlign":"vAlign"];var showLine=("showLine"in this._params)?this._params.showLine:this._theme.ether.interval.line.show;this._intervalMarkerLayout=new Timeline.EtherIntervalMarkerLayout(this._timeline,this._band,this._theme,align,showLine);this._highlight=new Timeline.EtherHighlight(this._timeline,this._band,this._theme,this._backgroundLayer);};Timeline.YearCountEtherPainter.prototype.setHighlight=function(startDate,endDate){this._highlight.position(startDate,endDate);};Timeline.YearCountEtherPainter.prototype.paint=function(){if(this._markerLayer){this._band.removeLayerDiv(this._markerLayer);}
this._markerLayer=this._band.createLayerDiv(100);this._markerLayer.setAttribute("name","ether-markers");this._markerLayer.style.display="none";if(this._lineLayer){this._band.removeLayerDiv(this._lineLayer);}
this._lineLayer=this._band.createLayerDiv(1);this._lineLayer.setAttribute("name","ether-lines");this._lineLayer.style.display="none";var minDate=new Date(this._startDate.getTime());var maxDate=this._band.getMaxDate();var yearDiff=this._band.getMinDate().getUTCFullYear()-this._startDate.getUTCFullYear();minDate.setUTCFullYear(this._band.getMinDate().getUTCFullYear()-yearDiff%this._multiple);var p=this;var incrementDate=function(date){for(var i=0;i<p._multiple;i++){Timeline.DateTime.incrementByInterval(date,Timeline.DateTime.YEAR);}};var labeller={labelInterval:function(date,intervalUnit){var diff=date.getUTCFullYear()-p._startDate.getUTCFullYear();return{text:diff,emphasized:diff==0};}};while(minDate.getTime()<maxDate.getTime()){this._intervalMarkerLayout.createIntervalMarker(minDate,labeller,Timeline.DateTime.YEAR,this._markerLayer,this._lineLayer);incrementDate(minDate);}
this._markerLayer.style.display="block";this._lineLayer.style.display="block";};Timeline.YearCountEtherPainter.prototype.softPaint=function(){};Timeline.QuarterlyEtherPainter=function(params){this._params=params;this._theme=params.theme;this._startDate=Timeline.DateTime.parseGregorianDateTime(params.startDate);};Timeline.QuarterlyEtherPainter.prototype.initialize=function(band,timeline){this._band=band;this._timeline=timeline;this._backgroundLayer=band.createLayerDiv(0);this._backgroundLayer.setAttribute("name","ether-background");this._backgroundLayer.style.background=this._theme.ether.backgroundColors[band.getIndex()];this._markerLayer=null;this._lineLayer=null;var align=("align"in this._params)?this._params.align:this._theme.ether.interval.marker[timeline.isHorizontal()?"hAlign":"vAlign"];var showLine=("showLine"in this._params)?this._params.showLine:this._theme.ether.interval.line.show;this._intervalMarkerLayout=new Timeline.EtherIntervalMarkerLayout(this._timeline,this._band,this._theme,align,showLine);this._highlight=new Timeline.EtherHighlight(this._timeline,this._band,this._theme,this._backgroundLayer);};Timeline.QuarterlyEtherPainter.prototype.setHighlight=function(startDate,endDate){this._highlight.position(startDate,endDate);};Timeline.QuarterlyEtherPainter.prototype.paint=function(){if(this._markerLayer){this._band.removeLayerDiv(this._markerLayer);}
this._markerLayer=this._band.createLayerDiv(100);this._markerLayer.setAttribute("name","ether-markers");this._markerLayer.style.display="none";if(this._lineLayer){this._band.removeLayerDiv(this._lineLayer);}
this._lineLayer=this._band.createLayerDiv(1);this._lineLayer.setAttribute("name","ether-lines");this._lineLayer.style.display="none";var minDate=new Date(0);var maxDate=this._band.getMaxDate();minDate.setUTCFullYear(Math.max(this._startDate.getUTCFullYear(),this._band.getMinDate().getUTCFullYear()));minDate.setUTCMonth(this._startDate.getUTCMonth());var p=this;var incrementDate=function(date){date.setUTCMonth(date.getUTCMonth()+3);};var labeller={labelInterval:function(date,intervalUnit){var quarters=(4+(date.getUTCMonth()-p._startDate.getUTCMonth())/3)%4;if(quarters!=0){return{text:"Q"+(quarters+1),emphasized:false};}else{return{text:"Y"+(date.getUTCFullYear()-p._startDate.getUTCFullYear()+1),emphasized:true};}}};while(minDate.getTime()<maxDate.getTime()){this._intervalMarkerLayout.createIntervalMarker(minDate,labeller,Timeline.DateTime.YEAR,this._markerLayer,this._lineLayer);incrementDate(minDate);}
this._markerLayer.style.display="block";this._lineLayer.style.display="block";};Timeline.QuarterlyEtherPainter.prototype.softPaint=function(){};Timeline.EtherIntervalMarkerLayout=function(timeline,band,theme,align,showLine){var horizontal=timeline.isHorizontal();if(horizontal){if(align=="Top"){this.positionDiv=function(div,offset){div.style.left=offset+"px";div.style.top="0px";};}else{this.positionDiv=function(div,offset){div.style.left=offset+"px";div.style.bottom="0px";};}}else{if(align=="Left"){this.positionDiv=function(div,offset){div.style.top=offset+"px";div.style.left="0px";};}else{this.positionDiv=function(div,offset){div.style.top=offset+"px";div.style.right="0px";};}}
var markerTheme=theme.ether.interval.marker;var lineTheme=theme.ether.interval.line;var weekendTheme=theme.ether.interval.weekend;var stylePrefix=(horizontal?"h":"v")+align;var labelStyler=markerTheme[stylePrefix+"Styler"];var emphasizedLabelStyler=markerTheme[stylePrefix+"EmphasizedStyler"];var day=Timeline.DateTime.gregorianUnitLengths[Timeline.DateTime.DAY];this.createIntervalMarker=function(date,labeller,unit,markerDiv,lineDiv){var offset=Math.round(band.dateToPixelOffset(date));if(showLine&&unit!=Timeline.DateTime.WEEK){var divLine=timeline.getDocument().createElement("div");divLine.style.position="absolute";if(lineTheme.opacity<100){Timeline.Graphics.setOpacity(divLine,lineTheme.opacity);}
if(horizontal){divLine.style.borderLeft="1px solid "+lineTheme.color;divLine.style.left=offset+"px";divLine.style.width="1px";divLine.style.top="0px";divLine.style.height="100%";}else{divLine.style.borderTop="1px solid "+lineTheme.color;divLine.style.top=offset+"px";divLine.style.height="1px";divLine.style.left="0px";divLine.style.width="100%";}
lineDiv.appendChild(divLine);}
if(unit==Timeline.DateTime.WEEK){var firstDayOfWeek=theme.firstDayOfWeek;var saturday=new Date(date.getTime()+(6-firstDayOfWeek-7)*day);var monday=new Date(saturday.getTime()+2*day);var saturdayPixel=Math.round(band.dateToPixelOffset(saturday));var mondayPixel=Math.round(band.dateToPixelOffset(monday));var length=Math.max(1,mondayPixel-saturdayPixel);var divWeekend=timeline.getDocument().createElement("div");divWeekend.style.position="absolute";divWeekend.style.background=weekendTheme.color;if(weekendTheme.opacity<100){Timeline.Graphics.setOpacity(divWeekend,weekendTheme.opacity);}
if(horizontal){divWeekend.style.left=saturdayPixel+"px";divWeekend.style.width=length+"px";divWeekend.style.top="0px";divWeekend.style.height="100%";}else{divWeekend.style.top=saturdayPixel+"px";divWeekend.style.height=length+"px";divWeekend.style.left="0px";divWeekend.style.width="100%";}
lineDiv.appendChild(divWeekend);}
var label=labeller.labelInterval(date,unit);var div=timeline.getDocument().createElement("div");div.innerHTML=label.text;div.style.position="absolute";(label.emphasized?emphasizedLabelStyler:labelStyler)(div);this.positionDiv(div,offset);markerDiv.appendChild(div);return div;};};Timeline.EtherHighlight=function(timeline,band,theme,backgroundLayer){var horizontal=timeline.isHorizontal();this._highlightDiv=null;this._createHighlightDiv=function(){if(this._highlightDiv==null){this._highlightDiv=timeline.getDocument().createElement("div");this._highlightDiv.setAttribute("name","ether-highlight");this._highlightDiv.style.position="absolute";this._highlightDiv.style.background=theme.ether.highlightColor;var opacity=theme.ether.highlightOpacity;if(opacity<100){Timeline.Graphics.setOpacity(this._highlightDiv,opacity);}
backgroundLayer.appendChild(this._highlightDiv);}}
this.position=function(startDate,endDate){this._createHighlightDiv();var startPixel=Math.round(band.dateToPixelOffset(startDate));var endPixel=Math.round(band.dateToPixelOffset(endDate));var length=Math.max(endPixel-startPixel,3);if(horizontal){this._highlightDiv.style.left=startPixel+"px";this._highlightDiv.style.width=length+"px";this._highlightDiv.style.top="2px";this._highlightDiv.style.height=(band.getViewWidth()-4)+"px";}else{this._highlightDiv.style.top=startPixel+"px";this._highlightDiv.style.height=length+"px";this._highlightDiv.style.left="2px";this._highlightDiv.style.width=(band.getViewWidth()-4)+"px";}}};

/* ethers.js */

Timeline.LinearEther=function(params){this._params=params;this._interval=params.interval;this._pixelsPerInterval=params.pixelsPerInterval;};Timeline.LinearEther.prototype.initialize=function(timeline){this._timeline=timeline;this._unit=timeline.getUnit();if("startsOn"in this._params){this._start=this._unit.parseFromObject(this._params.startsOn);}else if("endsOn"in this._params){this._start=this._unit.parseFromObject(this._params.endsOn);this.shiftPixels(-this._timeline.getPixelLength());}else if("centersOn"in this._params){this._start=this._unit.parseFromObject(this._params.centersOn);this.shiftPixels(-this._timeline.getPixelLength()/2);}else{this._start=this._unit.makeDefaultValue();this.shiftPixels(-this._timeline.getPixelLength()/2);}};Timeline.LinearEther.prototype.setDate=function(date){this._start=this._unit.cloneValue(date);};Timeline.LinearEther.prototype.shiftPixels=function(pixels){var numeric=this._interval*pixels/this._pixelsPerInterval;this._start=this._unit.change(this._start,numeric);};Timeline.LinearEther.prototype.dateToPixelOffset=function(date){var numeric=this._unit.compare(date,this._start);return this._pixelsPerInterval*numeric/this._interval;};Timeline.LinearEther.prototype.pixelOffsetToDate=function(pixels){var numeric=pixels*this._interval/this._pixelsPerInterval;return this._unit.change(this._start,numeric);};Timeline.HotZoneEther=function(params){this._params=params;this._interval=params.interval;this._pixelsPerInterval=params.pixelsPerInterval;};Timeline.HotZoneEther.prototype.initialize=function(timeline){this._timeline=timeline;this._unit=timeline.getUnit();this._zones=[{startTime:Number.NEGATIVE_INFINITY,endTime:Number.POSITIVE_INFINITY,magnify:1}];var params=this._params;for(var i=0;i<params.zones.length;i++){var zone=params.zones[i];var zoneStart=this._unit.parseFromObject(zone.start);var zoneEnd=this._unit.parseFromObject(zone.end);for(var j=0;j<this._zones.length&&this._unit.compare(zoneEnd,zoneStart)>0;j++){var zone2=this._zones[j];if(this._unit.compare(zoneStart,zone2.endTime)<0){if(this._unit.compare(zoneStart,zone2.startTime)>0){this._zones.splice(j,0,{startTime:zone2.startTime,endTime:zoneStart,magnify:zone2.magnify});j++;zone2.startTime=zoneStart;}
if(this._unit.compare(zoneEnd,zone2.endTime)<0){this._zones.splice(j,0,{startTime:zoneStart,endTime:zoneEnd,magnify:zone.magnify*zone2.magnify});j++;zone2.startTime=zoneEnd;zoneStart=zoneEnd;}else{zone2.magnify*=zone.magnify;zoneStart=zone2.endTime;}}}}
if("startsOn"in this._params){this._start=this._unit.parseFromObject(this._params.startsOn);}else if("endsOn"in this._params){this._start=this._unit.parseFromObject(this._params.endsOn);this.shiftPixels(-this._timeline.getPixelLength());}else if("centersOn"in this._params){this._start=this._unit.parseFromObject(this._params.centersOn);this.shiftPixels(-this._timeline.getPixelLength()/2);}else{this._start=this._unit.makeDefaultValue();this.shiftPixels(-this._timeline.getPixelLength()/2);}};Timeline.HotZoneEther.prototype.setDate=function(date){this._start=this._unit.cloneValue(date);};Timeline.HotZoneEther.prototype.shiftPixels=function(pixels){this._start=this.pixelOffsetToDate(pixels);};Timeline.HotZoneEther.prototype.dateToPixelOffset=function(date){return this._dateDiffToPixelOffset(this._start,date);};Timeline.HotZoneEther.prototype.pixelOffsetToDate=function(pixels){return this._pixelOffsetToDate(pixels,this._start);};Timeline.HotZoneEther.prototype._dateDiffToPixelOffset=function(fromDate,toDate){var scale=this._getScale();var fromTime=fromDate;var toTime=toDate;var pixels=0;if(this._unit.compare(fromTime,toTime)<0){var z=0;while(z<this._zones.length){if(this._unit.compare(fromTime,this._zones[z].endTime)<0){break;}
z++;}
while(this._unit.compare(fromTime,toTime)<0){var zone=this._zones[z];var toTime2=this._unit.earlier(toTime,zone.endTime);pixels+=(this._unit.compare(toTime2,fromTime)/(scale/zone.magnify));fromTime=toTime2;z++;}}else{var z=this._zones.length-1;while(z>=0){if(this._unit.compare(fromTime,this._zones[z].startTime)>0){break;}
z--;}
while(this._unit.compare(fromTime,toTime)>0){var zone=this._zones[z];var toTime2=this._unit.later(toTime,zone.startTime);pixels+=(this._unit.compare(toTime2,fromTime)/(scale/zone.magnify));fromTime=toTime2;z--;}}
return pixels;};Timeline.HotZoneEther.prototype._pixelOffsetToDate=function(pixels,fromDate){var scale=this._getScale();var time=fromDate;if(pixels>0){var z=0;while(z<this._zones.length){if(this._unit.compare(time,this._zones[z].endTime)<0){break;}
z++;}
while(pixels>0){var zone=this._zones[z];var scale2=scale/zone.magnify;if(zone.endTime==Number.POSITIVE_INFINITY){time=this._unit.change(time,pixels*scale2);pixels=0;}else{var pixels2=this._unit.compare(zone.endTime,time)/scale2;if(pixels2>pixels){time=this._unit.change(time,pixels*scale2);pixels=0;}else{time=zone.endTime;pixels-=pixels2;}}
z++;}}else{var z=this._zones.length-1;while(z>=0){if(this._unit.compare(time,this._zones[z].startTime)>0){break;}
z--;}
pixels=-pixels;while(pixels>0){var zone=this._zones[z];var scale2=scale/zone.magnify;if(zone.startTime==Number.NEGATIVE_INFINITY){time=this._unit.change(time,-pixels*scale2);pixels=0;}else{var pixels2=this._unit.compare(time,zone.startTime)/scale2;if(pixels2>pixels){time=this._unit.change(time,-pixels*scale2);pixels=0;}else{time=zone.startTime;pixels-=pixels2;}}
z--;}}
return time;};Timeline.HotZoneEther.prototype._getScale=function(){return this._interval/this._pixelsPerInterval;};

/* labellers.js */

Timeline.GregorianDateLabeller=function(locale,timeZone){this._locale=locale;this._timeZone=timeZone;};Timeline.GregorianDateLabeller.monthNames=[];Timeline.GregorianDateLabeller.dayNames=[];Timeline.GregorianDateLabeller.labelIntervalFunctions=[];Timeline.GregorianDateLabeller.getMonthName=function(month,locale){return Timeline.GregorianDateLabeller.monthNames[locale][month];};Timeline.GregorianDateLabeller.prototype.labelInterval=function(date,intervalUnit){var f=Timeline.GregorianDateLabeller.labelIntervalFunctions[this._locale];if(f==null){f=Timeline.GregorianDateLabeller.prototype.defaultLabelInterval;}
return f.call(this,date,intervalUnit);};Timeline.GregorianDateLabeller.prototype.labelPrecise=function(date){return Timeline.DateTime.removeTimeZoneOffset(date,this._timeZone).toUTCString();};Timeline.GregorianDateLabeller.prototype.defaultLabelInterval=function(date,intervalUnit){var text;var emphasized=false;date=Timeline.DateTime.removeTimeZoneOffset(date,this._timeZone);switch(intervalUnit){case Timeline.DateTime.MILLISECOND:text=date.getUTCMilliseconds();break;case Timeline.DateTime.SECOND:text=date.getUTCSeconds();break;case Timeline.DateTime.MINUTE:var m=date.getUTCMinutes();if(m==0){text=date.getUTCHours()+":00";emphasized=true;}else{text=m;}
break;case Timeline.DateTime.HOUR:text=date.getUTCHours()+"hr";break;case Timeline.DateTime.DAY:text=Timeline.GregorianDateLabeller.getMonthName(date.getUTCMonth(),this._locale)+" "+date.getUTCDate();break;case Timeline.DateTime.WEEK:text=Timeline.GregorianDateLabeller.getMonthName(date.getUTCMonth(),this._locale)+" "+date.getUTCDate();break;case Timeline.DateTime.MONTH:var m=date.getUTCMonth();if(m!=0){text=Timeline.GregorianDateLabeller.getMonthName(m,this._locale);break;}
case Timeline.DateTime.YEAR:case Timeline.DateTime.DECADE:case Timeline.DateTime.CENTURY:case Timeline.DateTime.MILLENNIUM:var y=date.getUTCFullYear();if(y>0){text=date.getUTCFullYear();}else{text=(1-y)+"BC";}
emphasized=(intervalUnit==Timeline.DateTime.MONTH)||(intervalUnit==Timeline.DateTime.DECADE&&y%100==0)||(intervalUnit==Timeline.DateTime.CENTURY&&y%1000==0);break;default:text=date.toUTCString();}
return{text:text,emphasized:emphasized};}

/* layouts.js */

Timeline.StaticTrackBasedLayout=function(params){this._eventSource=params.eventSource;this._ether=params.ether;this._theme=params.theme;this._showText=("showText"in params)?params.showText:true;this._laidout=false;var layout=this;if(this._eventSource!=null){this._eventSource.addListener({onAddMany:function(){layout._laidout=false;}});}};Timeline.StaticTrackBasedLayout.prototype.initialize=function(timeline){this._timeline=timeline;};Timeline.StaticTrackBasedLayout.prototype.getTrack=function(evt){if(!this._laidout){this._tracks=[];this._layout();this._laidout=true;}
return this._tracks[evt.getID()];};Timeline.StaticTrackBasedLayout.prototype.getTrackCount=function(){if(!this._laidout){this._tracks=[];this._layout();this._laidout=true;}
return this._trackCount;};Timeline.StaticTrackBasedLayout.prototype._layout=function(){if(this._eventSource==null){return;}
var streams=[Number.NEGATIVE_INFINITY];var layout=this;var showText=this._showText;var theme=this._theme;var eventTheme=theme.event;var layoutInstant=function(evt,startPixel,endPixel,streamOffset){var finalPixel=startPixel-1;if(evt.isImprecise()){finalPixel=endPixel;}
if(showText){finalPixel=Math.max(finalPixel,startPixel+eventTheme.label.width);}
return finalPixel;};var layoutDuration=function(evt,startPixel,endPixel,streamOffset){if(evt.isImprecise()){var startDate=evt.getStart();var endDate=evt.getEnd();var startPixel2=Math.round(layout._ether.dateToPixelOffset(startDate));var endPixel2=Math.round(layout._ether.dateToPixelOffset(endDate));}else{var startPixel2=startPixel;var endPixel2=endPixel;}
var finalPixel=endPixel2;var length=Math.max(endPixel2-startPixel2,1);if(showText){if(length<eventTheme.label.width){finalPixel=endPixel2+eventTheme.label.width;}}
return finalPixel;};var layoutEvent=function(evt){var startDate=evt.getStart();var endDate=evt.getEnd();var startPixel=Math.round(layout._ether.dateToPixelOffset(startDate));var endPixel=Math.round(layout._ether.dateToPixelOffset(endDate));var streamIndex=0;for(;streamIndex<streams.length;streamIndex++){if(streams[streamIndex]<startPixel){break;}}
if(streamIndex>=streams.length){streams.push(Number.NEGATIVE_INFINITY);}
var streamOffset=(eventTheme.track.offset+
streamIndex*(eventTheme.track.height+eventTheme.track.gap))+"em";layout._tracks[evt.getID()]=streamIndex;if(evt.isInstant()){streams[streamIndex]=layoutInstant(evt,startPixel,endPixel,streamOffset);}else{streams[streamIndex]=layoutDuration(evt,startPixel,endPixel,streamOffset);}};var iterator=this._eventSource.getAllEventIterator();while(iterator.hasNext()){var evt=iterator.next();layoutEvent(evt);}
this._trackCount=streams.length;};

/* painters.js */

Timeline.DurationEventPainter=function(params){this._params=params;this._theme=params.theme;this._layout=params.layout;this._showText=params.showText;this._showLineForNoText=("showLineForNoText"in params)?params.showLineForNoText:params.theme.event.instant.showLineForNoText;this._filterMatcher=null;this._highlightMatcher=null;};Timeline.DurationEventPainter.prototype.initialize=function(band,timeline){this._band=band;this._timeline=timeline;this._layout.initialize(band,timeline);this._eventLayer=null;this._highlightLayer=null;};Timeline.DurationEventPainter.prototype.getLayout=function(){return this._layout;};Timeline.DurationEventPainter.prototype.setLayout=function(layout){this._layout=layout;};Timeline.DurationEventPainter.prototype.getFilterMatcher=function(){return this._filterMatcher;};Timeline.DurationEventPainter.prototype.setFilterMatcher=function(filterMatcher){this._filterMatcher=filterMatcher;};Timeline.DurationEventPainter.prototype.getHighlightMatcher=function(){return this._highlightMatcher;};Timeline.DurationEventPainter.prototype.setHighlightMatcher=function(highlightMatcher){this._highlightMatcher=highlightMatcher;};Timeline.DurationEventPainter.prototype.paint=function(){var eventSource=this._band.getEventSource();if(eventSource==null){return;}
if(this._highlightLayer!=null){this._band.removeLayerDiv(this._highlightLayer);}
this._highlightLayer=this._band.createLayerDiv(105);this._highlightLayer.setAttribute("name","event-highlights");this._highlightLayer.style.display="none";if(this._eventLayer!=null){this._band.removeLayerDiv(this._eventLayer);}
this._eventLayer=this._band.createLayerDiv(110);this._eventLayer.setAttribute("name","events");this._eventLayer.style.display="none";var minDate=this._band.getMinDate();var maxDate=this._band.getMaxDate();var doc=this._timeline.getDocument();var p=this;var eventLayer=this._eventLayer;var highlightLayer=this._highlightLayer;var showText=this._showText;var theme=this._params.theme;var eventTheme=theme.event;var trackOffset=eventTheme.track.offset;var trackHeight=("trackHeight"in this._params)?this._params.trackHeight:eventTheme.track.height;var trackGap=("trackGap"in this._params)?this._params.trackGap:eventTheme.track.gap;var appendIcon=function(evt,div){var icon=evt.getIcon();var img=Timeline.Graphics.createTranslucentImage(doc,icon!=null?icon:eventTheme.instant.icon);div.appendChild(img);div.style.cursor="pointer";Timeline.DOM.registerEvent(div,"mousedown",function(elmt,domEvt,target){p._onClickInstantEvent(img,domEvt,evt);});};var createHighlightDiv=function(highlightIndex,startPixel,length,highlightOffset,highlightWidth){if(highlightIndex>=0){var color=eventTheme.highlightColors[Math.min(highlightIndex,eventTheme.highlightColors.length-1)];var div=doc.createElement("div");div.style.position="absolute";div.style.overflow="hidden";div.style.left=(startPixel-3)+"px";div.style.width=(length+6)+"px";div.style.top=highlightOffset+"em";div.style.height=highlightWidth+"em";div.style.background=color;highlightLayer.appendChild(div);}};var createInstantDiv=function(evt,startPixel,endPixel,streamOffset,highlightIndex,highlightOffset,highlightWidth){if(evt.isImprecise()){var length=Math.max(endPixel-startPixel,1);var divImprecise=doc.createElement("div");divImprecise.style.position="absolute";divImprecise.style.overflow="hidden";divImprecise.style.top=streamOffset;divImprecise.style.height=trackHeight+"em";divImprecise.style.left=startPixel+"px";divImprecise.style.width=length+"px";divImprecise.style.background=eventTheme.instant.impreciseColor;if(eventTheme.instant.impreciseOpacity<100){Timeline.Graphics.setOpacity(divImprecise,eventTheme.instant.impreciseOpacity);}
eventLayer.appendChild(divImprecise);}
var div=doc.createElement("div");div.style.position="absolute";div.style.overflow="hidden";eventLayer.appendChild(div);var foreground=evt.getTextColor();var background=evt.getColor();var realign=-8;var length=16;if(showText){div.style.width=eventTheme.label.width+"px";div.style.color=foreground!=null?foreground:eventTheme.label.outsideColor;appendIcon(evt,div);div.appendChild(doc.createTextNode(evt.getText()));}else{if(p._showLineForNoText){div.style.width="1px";div.style.borderLeft="1px solid "+(background!=null?background:eventTheme.instant.lineColor);realign=0;length=1;}else{appendIcon(evt,div);}}
div.style.top=streamOffset;div.style.height=trackHeight+"em";div.style.left=(startPixel+realign)+"px";createHighlightDiv(highlightIndex,(startPixel+realign),length,highlightOffset,highlightWidth);};var createDurationDiv=function(evt,startPixel,endPixel,streamOffset,highlightIndex,highlightOffset,highlightWidth){var attachClickEvent=function(elmt){elmt.style.cursor="pointer";Timeline.DOM.registerEvent(elmt,"mousedown",function(elmt,domEvt,target){p._onClickDurationEvent(domEvt,evt,target);});};var length=Math.max(endPixel-startPixel,1);if(evt.isImprecise()){var div=doc.createElement("div");div.style.position="absolute";div.style.overflow="hidden";div.style.top=streamOffset;div.style.height=trackHeight+"em";div.style.left=startPixel+"px";div.style.width=length+"px";div.style.background=eventTheme.duration.impreciseColor;if(eventTheme.duration.impreciseOpacity<100){Timeline.Graphics.setOpacity(div,eventTheme.duration.impreciseOpacity);}
eventLayer.appendChild(div);var startDate=evt.getLatestStart();var endDate=evt.getEarliestEnd();var startPixel2=Math.round(p._band.dateToPixelOffset(startDate));var endPixel2=Math.round(p._band.dateToPixelOffset(endDate));}else{var startPixel2=startPixel;var endPixel2=endPixel;}
var foreground=evt.getTextColor();var outside=true;if(startPixel2<=endPixel2){length=Math.max(endPixel2-startPixel2,1);outside=!(length>eventTheme.label.width);div=doc.createElement("div");div.style.position="absolute";div.style.overflow="hidden";div.style.top=streamOffset;div.style.height=trackHeight+"em";div.style.left=startPixel2+"px";div.style.width=length+"px";var background=evt.getColor();div.style.background=background!=null?background:eventTheme.duration.color;if(eventTheme.duration.opacity<100){Timeline.Graphics.setOpacity(div,eventTheme.duration.opacity);}
eventLayer.appendChild(div);}else{var temp=startPixel2;startPixel2=endPixel2;endPixel2=temp;}
if(div==null){console.log(evt);}
attachClickEvent(div);if(showText){var divLabel=doc.createElement("div");divLabel.style.position="absolute";divLabel.style.top=streamOffset;divLabel.style.height=trackHeight+"em";divLabel.style.left=((length>eventTheme.label.width)?startPixel2:endPixel2)+"px";divLabel.style.width=eventTheme.label.width+"px";divLabel.style.color=foreground!=null?foreground:(outside?eventTheme.label.outsideColor:eventTheme.label.insideColor);divLabel.style.overflow="hidden";divLabel.appendChild(doc.createTextNode(evt.getText()));eventLayer.appendChild(divLabel);attachClickEvent(divLabel);}
createHighlightDiv(highlightIndex,startPixel,endPixel-startPixel,highlightOffset,highlightWidth);};var createEventDiv=function(evt,highlightIndex){var startDate=evt.getStart();var endDate=evt.getEnd();var startPixel=Math.round(p._band.dateToPixelOffset(startDate));var endPixel=Math.round(p._band.dateToPixelOffset(endDate));var streamOffset=(trackOffset+
p._layout.getTrack(evt)*(trackHeight+trackGap));if(evt.isInstant()){createInstantDiv(evt,startPixel,endPixel,streamOffset+"em",highlightIndex,streamOffset-trackGap,trackHeight+2*trackGap);}else{createDurationDiv(evt,startPixel,endPixel,streamOffset+"em",highlightIndex,streamOffset-trackGap,trackHeight+2*trackGap);}};var filterMatcher=(this._filterMatcher!=null)?this._filterMatcher:function(evt){return true;};var highlightMatcher=(this._highlightMatcher!=null)?this._highlightMatcher:function(evt){return-1;};var iterator=eventSource.getEventIterator(minDate,maxDate);while(iterator.hasNext()){var evt=iterator.next();if(filterMatcher(evt)){createEventDiv(evt,highlightMatcher(evt));}}
this._highlightLayer.style.display="block";this._eventLayer.style.display="block";};Timeline.DurationEventPainter.prototype.softPaint=function(){};Timeline.DurationEventPainter.prototype._onClickInstantEvent=function(icon,domEvt,evt){domEvt.cancelBubble=true;var c=Timeline.DOM.getPageCoordinates(icon);this._showBubble(c.left+Math.ceil(icon.offsetWidth/2),c.top+Math.ceil(icon.offsetHeight/2),evt);};Timeline.DurationEventPainter.prototype._onClickDurationEvent=function(domEvt,evt,target){domEvt.cancelBubble=true;if("pageX"in domEvt){var x=domEvt.pageX;var y=domEvt.pageY;}else{var c=Timeline.DOM.getPageCoordinates(target);var x=domEvt.offsetX+c.left;var y=domEvt.offsetY+c.top;}
this._showBubble(x,y,evt);};Timeline.DurationEventPainter.prototype._showBubble=function(x,y,evt){var div=this._band.openBubbleForPoint(x,y,this._theme.event.bubble.width,this._theme.event.bubble.height);evt.fillInfoBubble(div,this._theme,this._band.getLabeller());};

/* sources.js */

Timeline.DefaultEventSource=function(eventIndex){this._events=(eventIndex instanceof Object)?eventIndex:new Timeline.EventIndex();this._listeners=[];};Timeline.DefaultEventSource.prototype.addListener=function(listener){this._listeners.push(listener);};Timeline.DefaultEventSource.prototype.removeListener=function(listener){for(var i=0;i<this._listeners.length;i++){if(this._listeners[i]==listener){this._listeners.splice(i,1);break;}}};Timeline.DefaultEventSource.prototype.loadXML=function(xml,url){var base=this._getBaseURL(url);var wikiURL=xml.documentElement.getAttribute("wiki-url");var wikiSection=xml.documentElement.getAttribute("wiki-section");var dateTimeFormat=xml.documentElement.getAttribute("date-time-format");var parseDateTimeFunction=this._events.getUnit().getParser(dateTimeFormat);var node=xml.documentElement.firstChild;var added=false;while(node!=null){if(node.nodeType==1){var description="";if(node.firstChild!=null&&node.firstChild.nodeType==3){description=node.firstChild.nodeValue;}
var evt=new Timeline.DefaultEventSource.Event(parseDateTimeFunction(node.getAttribute("start")),parseDateTimeFunction(node.getAttribute("end")),parseDateTimeFunction(node.getAttribute("latestStart")),parseDateTimeFunction(node.getAttribute("earliestEnd")),node.getAttribute("isDuration")!="true",node.getAttribute("title"),description,this._resolveRelativeURL(node.getAttribute("image"),base),this._resolveRelativeURL(node.getAttribute("link"),base),this._resolveRelativeURL(node.getAttribute("icon"),base),node.getAttribute("color"),node.getAttribute("textColor"));evt._node=node;evt.getProperty=function(name){return this._node.getAttribute(name);};evt.setWikiInfo(wikiURL,wikiSection);this._events.add(evt);added=true;}
node=node.nextSibling;}
if(added){this._fire("onAddMany",[]);}};Timeline.DefaultEventSource.prototype.loadJSON=function(data,url){var base=this._getBaseURL(url);var added=false;if(data&&data.events){var wikiURL=("wikiURL"in data)?data.wikiURL:null;var wikiSection=("wikiSection"in data)?data.wikiSection:null;var dateTimeFormat=("dateTimeFormat"in data)?data.dateTimeFormat:null;var parseDateTimeFunction=this._events.getUnit().getParser(dateTimeFormat);for(var i=0;i<data.events.length;i++){var event=data.events[i];var evt=new Timeline.DefaultEventSource.Event(parseDateTimeFunction(event.start),parseDateTimeFunction(event.end),parseDateTimeFunction(event.latestStart),parseDateTimeFunction(event.earliestEnd),event.isDuration||false,event.title,event.description,this._resolveRelativeURL(event.image,base),this._resolveRelativeURL(event.link,base),this._resolveRelativeURL(event.icon,base),event.color,event.textColor);evt._obj=event;evt.getProperty=function(name){return this._obj[name];};evt.setWikiInfo(wikiURL,wikiSection);this._events.add(evt);added=true;}}
if(added){this._fire("onAddMany",[]);}};Timeline.DefaultEventSource.prototype.loadSPARQL=function(xml,url){var base=this._getBaseURL(url);var dateTimeFormat='iso8601';var parseDateTimeFunction=this._events.getUnit().getParser(dateTimeFormat);if(xml==null){return;}
var node=xml.documentElement.firstChild;while(node!=null&&(node.nodeType!=1||node.nodeName!='results')){node=node.nextSibling;}
var wikiURL=null;var wikiSection=null;if(node!=null){wikiURL=node.getAttribute("wiki-url");wikiSection=node.getAttribute("wiki-section");node=node.firstChild;}
var added=false;while(node!=null){if(node.nodeType==1){var bindings={};var binding=node.firstChild;while(binding!=null){if(binding.nodeType==1&&binding.firstChild!=null&&binding.firstChild.nodeType==1&&binding.firstChild.firstChild!=null&&binding.firstChild.firstChild.nodeType==3){bindings[binding.getAttribute('name')]=binding.firstChild.firstChild.nodeValue;}
binding=binding.nextSibling;}
if(bindings["start"]==null&&bindings["date"]!=null){bindings["start"]=bindings["date"];}
var evt=new Timeline.DefaultEventSource.Event(parseDateTimeFunction(bindings["start"]),parseDateTimeFunction(bindings["end"]),parseDateTimeFunction(bindings["latestStart"]),parseDateTimeFunction(bindings["earliestEnd"]),bindings["isDuration"]!="true",bindings["title"],bindings["description"],this._resolveRelativeURL(bindings["image"],base),this._resolveRelativeURL(bindings["link"],base),this._resolveRelativeURL(bindings["icon"],base),bindings["color"],bindings["textColor"]);evt._bindings=bindings;evt.getProperty=function(name){return this._bindings[name];};evt.setWikiInfo(wikiURL,wikiSection);this._events.add(evt);added=true;}
node=node.nextSibling;}
if(added){this._fire("onAddMany",[]);}};Timeline.DefaultEventSource.prototype.add=function(evt){this._events.add(evt);this._fire("onAddOne",[evt]);};Timeline.DefaultEventSource.prototype.addMany=function(events){for(var i=0;i<events.length;i++){this._events.add(events[i]);}
this._fire("onAddMany",[]);};Timeline.DefaultEventSource.prototype.clear=function(){this._events.removeAll();this._fire("onClear",[]);};Timeline.DefaultEventSource.prototype.getEventIterator=function(startDate,endDate){return this._events.getIterator(startDate,endDate);};Timeline.DefaultEventSource.prototype.getAllEventIterator=function(){return this._events.getAllIterator();};Timeline.DefaultEventSource.prototype.getCount=function(){return this._events.getCount();};Timeline.DefaultEventSource.prototype.getEarliestDate=function(){return this._events.getEarliestDate();};Timeline.DefaultEventSource.prototype.getLatestDate=function(){return this._events.getLatestDate();};Timeline.DefaultEventSource.prototype._fire=function(handlerName,args){for(var i=0;i<this._listeners.length;i++){var listener=this._listeners[i];if(handlerName in listener){try{listener[handlerName].apply(listener,args);}catch(e){Timeline.Debug.exception(e);}}}};Timeline.DefaultEventSource.prototype._getBaseURL=function(url){if(url.indexOf("://")<0){var url2=this._getBaseURL(document.location.href);if(url.substr(0,1)=="/"){url=url2.substr(0,url2.indexOf("/",url2.indexOf("://")+3))+url;}else{url=url2+url;}}
var i=url.lastIndexOf("/");if(i<0){return"";}else{return url.substr(0,i+1);}};Timeline.DefaultEventSource.prototype._resolveRelativeURL=function(url,base){if(url==null||url==""){return url;}else if(url.indexOf("://")>0){return url;}else if(url.substr(0,1)=="/"){return base.substr(0,base.indexOf("/",base.indexOf("://")+3))+url;}else{return base+url;}};Timeline.DefaultEventSource.Event=function(start,end,latestStart,earliestEnd,instant,text,description,image,link,icon,color,textColor){this._id="e"+Math.floor(Math.random()*1000000);this._instant=instant||(end==null);this._start=start;this._end=(end!=null)?end:start;this._latestStart=(latestStart!=null)?latestStart:(instant?this._end:this._start);this._earliestEnd=(earliestEnd!=null)?earliestEnd:(instant?this._start:this._end);this._text=Timeline.HTML.deEntify(text);this._description=Timeline.HTML.deEntify(description);this._image=(image!=null&&image!="")?image:null;this._link=(link!=null&&link!="")?link:null;this._icon=(icon!=null&&icon!="")?icon:null;this._color=(color!=null&&color!="")?color:null;this._textColor=(textColor!=null&&textColor!="")?textColor:null;this._wikiURL=null;this._wikiSection=null;};Timeline.DefaultEventSource.Event.prototype={getID:function(){return this._id;},isInstant:function(){return this._instant;},isImprecise:function(){return this._start!=this._latestStart||this._end!=this._earliestEnd;},getStart:function(){return this._start;},getEnd:function(){return this._end;},getLatestStart:function(){return this._latestStart;},getEarliestEnd:function(){return this._earliestEnd;},getText:function(){return this._text;},getDescription:function(){return this._description;},getImage:function(){return this._image;},getLink:function(){return this._link;},getIcon:function(){return this._icon;},getColor:function(){return this._color;},getTextColor:function(){return this._textColor;},getProperty:function(name){return null;},getWikiURL:function(){return this._wikiURL;},getWikiSection:function(){return this._wikiSection;},setWikiInfo:function(wikiURL,wikiSection){this._wikiURL=wikiURL;this._wikiSection=wikiSection;},fillDescription:function(elmt){elmt.innerHTML=this._description;},fillWikiInfo:function(elmt){if(this._wikiURL!=null&&this._wikiSection!=null){var wikiID=this.getProperty("wikiID");if(wikiID==null||wikiID.length==0){wikiID=this.getText();}
wikiID=wikiID.replace(/\s/g,"_");var url=this._wikiURL+this._wikiSection.replace(/\s/g,"_")+"/"+wikiID;var a=document.createElement("a");a.href=url;a.target="new";a.innerHTML=Timeline.strings[Timeline.Platform.clientLocale].wikiLinkLabel;elmt.appendChild(document.createTextNode("["));elmt.appendChild(a);elmt.appendChild(document.createTextNode("]"));}else{elmt.style.display="none";}},fillTime:function(elmt,labeller){if(this._instant){if(this.isImprecise()){elmt.appendChild(elmt.ownerDocument.createTextNode(labeller.labelPrecise(this._start)));elmt.appendChild(elmt.ownerDocument.createElement("br"));elmt.appendChild(elmt.ownerDocument.createTextNode(labeller.labelPrecise(this._end)));}else{elmt.appendChild(elmt.ownerDocument.createTextNode(labeller.labelPrecise(this._start)));}}else{if(this.isImprecise()){elmt.appendChild(elmt.ownerDocument.createTextNode(labeller.labelPrecise(this._start)+" ~ "+labeller.labelPrecise(this._latestStart)));elmt.appendChild(elmt.ownerDocument.createElement("br"));elmt.appendChild(elmt.ownerDocument.createTextNode(labeller.labelPrecise(this._earliestEnd)+" ~ "+labeller.labelPrecise(this._end)));}else{elmt.appendChild(elmt.ownerDocument.createTextNode(labeller.labelPrecise(this._start)));elmt.appendChild(elmt.ownerDocument.createElement("br"));elmt.appendChild(elmt.ownerDocument.createTextNode(labeller.labelPrecise(this._end)));}}},fillInfoBubble:function(elmt,theme,labeller){var doc=elmt.ownerDocument;var title=this.getText();var link=this.getLink();var image=this.getImage();if(image!=null){var img=doc.createElement("img");img.src=image;theme.event.bubble.imageStyler(img);elmt.appendChild(img);}
var divTitle=doc.createElement("div");var textTitle=doc.createTextNode(title);if(link!=null){var a=doc.createElement("a");a.href=link;a.appendChild(textTitle);divTitle.appendChild(a);}else{divTitle.appendChild(textTitle);}
theme.event.bubble.titleStyler(divTitle);elmt.appendChild(divTitle);var divBody=doc.createElement("div");this.fillDescription(divBody);theme.event.bubble.bodyStyler(divBody);elmt.appendChild(divBody);var divTime=doc.createElement("div");this.fillTime(divTime,labeller);theme.event.bubble.timeStyler(divTime);elmt.appendChild(divTime);var divWiki=doc.createElement("div");this.fillWikiInfo(divWiki);theme.event.bubble.wikiStyler(divWiki);elmt.appendChild(divWiki);}};

/* themes.js */

Timeline.ClassicTheme=new Object();Timeline.ClassicTheme.implementations=[];Timeline.ClassicTheme.create=function(locale){if(locale==null){locale=Timeline.Platform.getDefaultLocale();}
var f=Timeline.ClassicTheme.implementations[locale];if(f==null){f=Timeline.ClassicTheme._Impl;}
return new f();};Timeline.ClassicTheme._Impl=function(){this.firstDayOfWeek=0;this.ether={backgroundColors:["#EEE","#DDD","#CCC","#AAA"],highlightColor:"white",highlightOpacity:50,interval:{line:{show:true,color:"#aaa",opacity:25},weekend:{color:"#FFFFE0",opacity:30},marker:{hAlign:"Bottom",hBottomStyler:function(elmt){elmt.className="timeline-ether-marker-bottom";},hBottomEmphasizedStyler:function(elmt){elmt.className="timeline-ether-marker-bottom-emphasized";},hTopStyler:function(elmt){elmt.className="timeline-ether-marker-top";},hTopEmphasizedStyler:function(elmt){elmt.className="timeline-ether-marker-top-emphasized";},vAlign:"Right",vRightStyler:function(elmt){elmt.className="timeline-ether-marker-right";},vRightEmphasizedStyler:function(elmt){elmt.className="timeline-ether-marker-right-emphasized";},vLeftStyler:function(elmt){elmt.className="timeline-ether-marker-left";},vLeftEmphasizedStyler:function(elmt){elmt.className="timeline-ether-marker-left-emphasized";}}}};this.event={track:{offset:0.5,height:1.5,gap:0.5},instant:{icon:Timeline.urlPrefix+"images/dull-blue-circle.png",lineColor:"#58A0DC",impreciseColor:"#58A0DC",impreciseOpacity:20,showLineForNoText:true},duration:{color:"#58A0DC",opacity:100,impreciseColor:"#58A0DC",impreciseOpacity:20},label:{insideColor:"white",outsideColor:"black",width:200},highlightColors:["#FFFF00","#FFC000","#FF0000","#0000FF"],bubble:{width:250,height:125,titleStyler:function(elmt){elmt.className="timeline-event-bubble-title";},bodyStyler:function(elmt){elmt.className="timeline-event-bubble-body";},imageStyler:function(elmt){elmt.className="timeline-event-bubble-image";},wikiStyler:function(elmt){elmt.className="timeline-event-bubble-wiki";},timeStyler:function(elmt){elmt.className="timeline-event-bubble-time";}}};};

/* units.js */

Timeline.NativeDateUnit=new Object();Timeline.NativeDateUnit.createLabeller=function(locale,timeZone){return new Timeline.GregorianDateLabeller(locale,timeZone);};Timeline.NativeDateUnit.makeDefaultValue=function(){return new Date();};Timeline.NativeDateUnit.cloneValue=function(v){return new Date(v.getTime());};Timeline.NativeDateUnit.getParser=function(format){if(typeof format=="string"){format=format.toLowerCase();}
return(format=="iso8601"||format=="iso 8601")?Timeline.DateTime.parseIso8601DateTime:Timeline.DateTime.parseGregorianDateTime;};Timeline.NativeDateUnit.parseFromObject=function(o){return Timeline.DateTime.parseGregorianDateTime(o);};Timeline.NativeDateUnit.toNumber=function(v){return v.getTime();};Timeline.NativeDateUnit.fromNumber=function(n){return new Date(n);};Timeline.NativeDateUnit.compare=function(v1,v2){var n1,n2;if(typeof v1=="object"){n1=v1.getTime();}else{n1=Number(v1);}
if(typeof v2=="object"){n2=v2.getTime();}else{n2=Number(v2);}
return n1-n2;};Timeline.NativeDateUnit.earlier=function(v1,v2){return Timeline.NativeDateUnit.compare(v1,v2)<0?v1:v2;};Timeline.NativeDateUnit.later=function(v1,v2){return Timeline.NativeDateUnit.compare(v1,v2)>0?v1:v2;};Timeline.NativeDateUnit.change=function(v,n){return new Date(v.getTime()+n);};

Timeline.GregorianDateLabeller.monthNames["en"] = ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"];
Timeline.strings["en"] = {wikiLinkLabel:"Discuss"};

} // end of 'install only once'
/*}}}*/
/***
|''Name:''|SimileTimelinePlugin|
|''Description:''|Plugin to support Simile Timelines, see http://simile.mit.edu/SimileTimeline/ |
|''Author:''|Martin Budden ( mjbudden [at] gmail [dot] com)|
|''Source:''|http://www.martinswiki.com/#SimileTimelineBundlePlugin |
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/plugins/SimileTimelinePlugin.js |
|''Version:''|0.1.6|
|''Date:''|Mar 4, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]] |
|''~CoreVersion:''|2.2|

Note that to use this pluing you also need:

1) to install SimileTimelineBundlePlugin (see http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/plugins/SimileTimelineBundlePlugin.js )
2) to include [[SimileTimelineStyleBundle]] in your StyleSheet tiddler (see http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/styles/SimileTimelineStyleBundle.css.js )

!!Todo
* fix bubble height and width
* etherpainters
* allow multiple painters per timeline
* multiple event sources per band
* multiple clocks
* JSON
* XML

***/

/*{{{*/
// Ensure that the SimileTimelinePlugin is only installed once.
if(!version.extensions.SimileTimelinePlugin) {
version.extensions.SimileTimelinePlugin = {installed:true};

if(version.major < 2 || (version.major == 2 && version.minor < 2))
	{alertAndThrow('SimileTimelineBundlePlugin requires TiddlyWiki 2.2 or newer.');}

config.macros.SimileTimeline = {};

config.macros.SimileTimeline.closeTiddler = Story.prototype.closeTiddler;
Story.prototype.closeTiddler = function(title,animate,slowly)
{
	config.macros.SimileTimeline.closeTiddler.apply(this,arguments);
	if(config.macros.SimileTimeline.tickTitle && config.macros.SimileTimeline.tickTitle==title) {
		config.macros.SimileTimeline.clearTick();
	}
};

// used for date string in bubble
Timeline.urlPrefix = 'http://martinswiki.com/timeline/'; //!! kludge for now

Timeline.GregorianDateLabeller.prototype.labelPrecise = function(date)
{
	var dt = Timeline.DateTime.removeTimeZoneOffset(date,this._timeZone);
	var template = "mmm DD, YYYY";
	return dt.formatString(template);
	//return dt.toUTCString();
};

Timeline.GregorianDateLabeller.labelIntervalWeek = function(date)
{
	var dt = Timeline.DateTime.removeTimeZoneOffset(date,this._timeZone);
	var text = '' + dt.getWeek();
	return {text:text,emphasized:false};
};

Timeline.GregorianDateLabeller.labelIntervalFunctions['en'] = function(date,intervalUnit)
{
	if(intervalUnit==Timeline.DateTime.WEEK) {
		var dt = Timeline.DateTime.removeTimeZoneOffset(date,this._timeZone);
		var text = '' + dt.getWeek();
		return {text:text,emphasized:false};
	} else {
		return this.defaultLabelInterval(date,intervalUnit);
	}
};
/*
Timeline.DefaultEventSource.Event.prototype.fillInfoBubble = function(elmt,theme,labeller)
{
	var doc = elmt.ownerDocument;

	var image = this.getImage();
	if(image) {
		var img = doc.createElement("img");
		img.src = image;
		
		theme.event.bubble.imageStyler(img);
		elmt.appendChild(img);
	}

	var divTitle = doc.createElement("div");
	var title = this.getText();
	var textTitle = doc.createTextNode(title);
	var link = this.getLink();
	if(link) {
		var a = doc.createElement("a");
		a.href = link;
		a.appendChild(textTitle);
		divTitle.appendChild(a);
	} else {
		divTitle.appendChild(textTitle);
	}
	theme.event.bubble.titleStyler(divTitle);
	elmt.appendChild(divTitle);

	var divBody = doc.createElement("div");
	this.fillDescription(divBody);
	theme.event.bubble.bodyStyler(divBody);
	elmt.appendChild(divBody);

	var divTime = doc.createElement("div");
	this.fillTime(divTime,labeller);
	theme.event.bubble.timeStyler(divTime);
	elmt.appendChild(divTime);

	var divWiki = doc.createElement("div");
	this.fillWikiInfo(divWiki);
	theme.event.bubble.wikiStyler(divWiki);
	elmt.appendChild(divWiki);
};
*/

Timeline.loadTiddlerJSON = function(title,fn)
{
	var tiddler = store.fetchTiddler(title);
	try {
		var uri = '';
		var j = eval('(' + tiddler.text + ')');
		fn(j,uri);
	} catch(ex) {
		console.log(ex);
		return exceptionText(ex);
	}
};

Timeline.loadTiddlers = function(data,fn)
{
	fn(data);
};

Timeline.DefaultEventSource.prototype.loadTiddlers = function(data)
{
	var include = true;
	var tag = data.params;
	if(data.type && data.type=='tiddlerFields') {
		if(!tag) {
			tag = 'excludeLists';
			include = false;
		}
	}
	var url = data.url ? data.url : "dummy";
	var base = this._getBaseURL(url);
	// wikiURL and wikiSection used for the "Discuss" button.
	var wikiURL = data.wikiURL;
	var wikiSection = data.wikiSection;

	var dateTimeFormat = null;
	var parseDateTimeFunction = this._events.getUnit().getParser(dateTimeFormat);

	var added = false;  
	var tiddlers = store.reverseLookup('tags',tag,include);
	for(var i=0; i<tiddlers.length; i++) {
		//var event = config.macros.SimileTimeline.getEvent(tiddlers[i].title);
		var event = tiddlers[i].getSimileTimelineEvent(data.type);
		var evt = new Timeline.DefaultEventSource.Event(
			parseDateTimeFunction(event.start),
			parseDateTimeFunction(event.end),
			parseDateTimeFunction(event.latestStart),
			parseDateTimeFunction(event.earliestEnd),
			event.isDuration || false,
			event.title,
			event.description,
			this._resolveRelativeURL(event.image,base),
			this._resolveRelativeURL(event.link,''),
			this._resolveRelativeURL(event.icon,base),
			event.color,
			event.textColor);
		evt._obj = event;
		evt.getProperty = function(name) {
			return this._obj[name];
		};
		evt.setWikiInfo(wikiURL,wikiSection);

		this._events.add(evt);
		added = true;
	}

	if (added) {
		this._fire('onAddMany',[]);
	}
};
/*
Timeline.loadXML = function(url, f) {
	var fError = function(statusText, status, xmlhttp) {
		alert("Failed to load data xml from " + url + "\n" + statusText);
	};
	var fDone = function(xmlhttp) {
		var xml = xmlhttp.responseXML;
		if (!xml.documentElement && xmlhttp.responseStream) {
			xml.load(xmlhttp.responseStream);
		}
		f(xml,url);
	};
	SimileAjax.XmlHttp.get(url, fError, fDone);
};
*/
Timeline.loadXMLRemote = function(uri,f) {
	var callback = function(status,context,responseText,uri,xhr) {
		if(status) {
			var xml = xhr.responseXML;
			if(window.Components && window.netscape && window.netscape.security && document.location.protocol.indexOf("http") == -1)
				window.netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
			if (!xml.documentElement && xhr.responseStream) {
				xml.load(xhr.responseStream);
			}
			try {
				f(xml,uri);
			} catch(ex) {
				console.log(ex);
				return exceptionText(ex);
			}
		} else {
			alert("Failed to load data xml from " + uri + "\n" + xhr.statusText);
		}
	};
	loadRemoteFile(uri,callback)
};

/*
Timeline.loadJSON = function(url, f) {
	var fError = function(statusText, status, xmlhttp) {
		alert("Failed to load json data from " + url + "\n" + statusText);
	};
	var fDone = function(xmlhttp) {
		f(eval('(' + xmlhttp.responseText + ')'), url);
	};
	SimileAjax.XmlHttp.get(url, fError, fDone);
};
*/

Timeline.loadJSONRemote = function(uri,f) {
	var callback = function(status,context,responseText,uri,xhr) {
		if(status) {
			var json = responseText;
			var data = eval('(' + json + ')');
			try {
				f(data,uri);
			} catch(ex) {
				console.log(ex);
				return exceptionText(ex);
			}
		} else {
			alert("Failed to load data xml from " + uri + "\n" + xhr.statusText);
		}
	};
	loadRemoteFile(uri,callback)
};

Timeline.loadJSONFile = function(filePath,f) {
	var json = loadFile(filePath);
	try {
		var data = eval('(' + json + ')');
		f(data, filePath);
	} catch(ex) {
		console.log(ex);
		return exceptionText(ex);
	}
};

Tiddler.prototype.getSimileTimelineEvent = function(type,eventFields)
{
	var t = this.title;
	var f = eventFields ? eventFields : config.macros.SimileTimeline.eventFields;
	var ev = {};
	if(type && type=='tiddlerFields') {
		ev.start = this.modified;
		ev.title = t;
		ev.description = this.text ? this.text : '';
		ev.link = this.fields.link;
		if(!ev.link)
			ev.link = 'javascript:story.displayTiddler(null,"' + t + '")';
	} else {
		ev.start = store.getTiddlerSlice(t,f.start);
		ev.latestStart = store.getTiddlerSlice(t,f.latestStart);
		ev.end = store.getTiddlerSlice(t,f.end);
		ev.earliestEnd = store.getTiddlerSlice(t,f.earliestEnd);
		ev.isDuration = store.getTiddlerSlice(t,f.isDuration);
		ev.title = store.getTiddlerSlice(t,f.title);
		ev.description = store.getTiddlerSlice(t,f.description);
		if(!ev.description)
			ev.description = '';
		ev.image = store.getTiddlerSlice(t,f.image);
		ev.link = store.getTiddlerSlice(t,f.link);
		if(!ev.link)
			ev.link = 'javascript:story.displayTiddler(null,"' + t + '")';
		ev.icon = store.getTiddlerSlice(t,f.icon);
		ev.color = store.getTiddlerSlice(t,f.color);
		ev.textColor = store.getTiddlerSlice(t,f.textColor);
	}
	return ev;
};

// to allow loading from tiddlers with differently named fields
config.macros.SimileTimeline.eventFields = {
	start:'start',latestStart:'latestStart',end:'end',earliestEnd:'earliestEnd',
	isDuration:'isDuration',title:'title',description:'description',image:'image',link:'link',
	icon:'icon',color:'color',textColor:'textColor'
	};

config.macros.SimileTimeline.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
	this.clearTick();
	var spec = params[0];
	var eventSource = new Timeline.DefaultEventSource();
	var theme = Timeline.ClassicTheme.create();

	var bWidth = store.getTiddlerSlice(spec,'bubbleWidth');
	if(bWidth)
		theme.event.bubble.width = bWidth;
	var bHeight = store.getTiddlerSlice(spec,'bubbleHeight');
	if(bHeight)
		theme.event.bubble.height = bHeight;

	var defaultDate = new Date();
	var eventSources = [];
	var ev = {};
	var bandInfos = [];
	var i = 0;
	var bandParams = config.macros.SimileTimeline.getBandParams(spec,'0',defaultDate);
	while(bandParams) {
		if(bandParams.ev.type && bandParams.ev.type != 'none') {
			bandParams.bp.eventSource = eventSource;
			ev = bandParams.ev;
			if(bandParams.ev.type != 'timer') {
				ev.source = eventSource;
			}
			if(eventSources.length==0)// !!!for now only deal with one eventSource
				eventSources.push(ev);
		}
		bandParams.theme = theme;
		defaultDate = bandParams.bp.date;
		bi = bandParams.bp.zones ? Timeline.createHotZoneBandInfo(bandParams.bp) : Timeline.createBandInfo(bandParams.bp);
		bandInfos.push(bi);
		if(bandParams.ep) {
			var ep = bandParams.ep;
			try {
				bandInfos[i].etherPainter = new Timeline[ep.etherPainter]({startDate:ep.startDate,multiple:ep.multiple,theme:theme});
			} catch(ex) {
			}
		}
		if(bandParams.dec) {
			var dec = bandParams.dec;
			try {
				bandInfos[i].decorators = [new Timeline[dec.decorator]({
					startDate:dec.startDate,
					endDate:dec.endDate,
					startLabel:'',//dec.startLabel,
					endLabel:'',//dec.endLabel,
					color:dec.color,
					opacity:dec.opacity,
					theme:theme})];
			} catch(ex) {
			}
		}
		if(i>0) {
			bandInfos[i].syncWith = 0;
			bandInfos[i].highlight = bandParams.highlight;
		}
		i++;
		bandParams = config.macros.SimileTimeline.getBandParams(spec,String(i),defaultDate);
	}
	var timelineElem = createTiddlyElement(place,'div',null,'simileTimeline');// simileTimeline css class
	var tHeight = store.getTiddlerSlice(spec,'timelineHeight');
	timelineElem.style['height'] = tHeight ? tHeight + 'px' : '150px';
	var tBorder = store.getTiddlerSlice(spec,'timelineBorder');
	if(tBorder)
		timelineElem.style['border'] = tBorder + 'px';
	config.macros.SimileTimeline.timeline = Timeline.create(timelineElem,bandInfos);
	var data = {};
	for(i=0;i<eventSources.length;i++) {
		ev = eventSources[i];
		if(ev.type=='timer') {
			config.macros.SimileTimeline.tickTitle = tiddler.title;//!!! temporary kludge, only support one timer
			config.macros.SimileTimeline.timerId = setTimeout('config.macros.SimileTimeline.tick()',1000);
		}
		data.type = ev.type;
		data.params = ev.params;
		if(ev.source) {
			switch(data.type) {
			case 'XML':
  				Timeline.loadXMLRemote(data.params,function(xml,url) { if(ev.source) ev.source.loadXML(xml,url); });
				break;
			case 'tiddlerJSON':
		  		Timeline.loadTiddlerJSON(data.params,function(data,url) { if(ev.source) ev.source.loadJSON(data,url); });
				break;
			case 'JSON':
		  		Timeline.loadJSONRemote(data.params,function(data,url) { if(ev.source) ev.source.loadJSON(data,url); });
				break;
			default:
				if(data.type||data.params) {
					Timeline.loadTiddlers(data,function(data,url) { if(ev.source) ev.source.loadTiddlers(data,url); });
				}
				break;
			}
		}
	}
	eventSource.addMany([]);
};

config.macros.SimileTimeline.tick = function()
{
	config.macros.SimileTimeline.timeline.getBand(0).setCenterVisibleDate(new Date());
	if(config.macros.SimileTimeline.timerId)
		config.macros.SimileTimeline.timerId = setTimeout('config.macros.SimileTimeline.tick()',1000);
};

config.macros.SimileTimeline.clearTick = function()
{
	if(config.macros.SimileTimeline.timerId)
		clearTimeout(config.macros.SimileTimeline.timerId);
	config.macros.SimileTimeline.timerId = null;
};

config.macros.SimileTimeline.getBandParams = function(title,n,defaultDate)
{
	var t = title;
	var pfx = 'band' + String(n) + '.';
	var width = store.getTiddlerSlice(t,pfx+'width');
	if(!width)
		return null;
	var bp = {};
	bp.width = width;
	var intervalUnit = store.getTiddlerSlice(t,pfx+'intervalUnit');
	switch(intervalUnit) {
	case 'MILLISECOND':
		bp.intervalUnit = 0;
		break;
	case 'SECOND':
		bp.intervalUnit = 1;
		break;
	case 'MINUTE':
		bp.intervalUnit = 2;
		break;
	case 'HOUR':
		bp.intervalUnit = 3;
		break;
	case 'DAY':
		bp.intervalUnit = 4;
		break;
	case 'WEEK':
		bp.intervalUnit = 5;
		break;
	case 'MONTH':
		bp.intervalUnit = 6;
		break;
	case 'YEAR':
		bp.intervalUnit = 7;
		break;
	case 'DECADE':
		bp.intervalUnit = 8;
		break;
	case 'CENTURY':
		bp.intervalUnit = 9;
		break;
	case 'MILLENNIUM':
		bp.intervalUnit = 10;
		break;
	case 'EPOCH':
		bp.intervalUnit = -1;
		break;
	case 'ERA':
		bp.intervalUnit = -2;
		break;
	default:
		bp.intervalUnit = 7;
		break;
	}
	var intervalPixels = store.getTiddlerSlice(t,pfx+'intervalPixels');
	bp.intervalPixels = eval(intervalPixels);
	var date = store.getTiddlerSlice(t,pfx+'date');
	bp.date = date ? Timeline.DateTime.parseGregorianDateTime(date) : defaultDate;
	var showEventText = store.getTiddlerSlice(t,pfx+'showEventText');
	bp.showEventText = showEventText ? eval(showEventText) : true;
	var trackHeight = store.getTiddlerSlice(t,pfx+'trackHeight');
	if(trackHeight)
		bp.trackHeight = eval(trackHeight);
	var trackGap = store.getTiddlerSlice(t,pfx+'trackGap');
	if(trackGap)
		bp.trackGap = eval(trackGap);
	var ret = {};
	var ev = {};
	ev.type = store.getTiddlerSlice(t,pfx+'eventSourceType');
	ev.params = store.getTiddlerSlice(t,pfx+'eventSourceParams');
	var etherPainter = store.getTiddlerSlice(t,pfx+'etherPainter');
	if(etherPainter) {
		var ep = {};
		ep.etherPainter = etherPainter;
		ep.startDate = store.getTiddlerSlice(t,pfx+'etherPainter.startDate');
		ep.multiple = store.getTiddlerSlice(t,pfx+'etherPainter.multiple');
		ret.ep = ep;
	}
	var decorator = store.getTiddlerSlice(t,'decorator');
	if(decorator) {
		var dec = {};
		var pdc = pfx + 'decorator0.';
		dec.decorator = decorator;
		dec.startDate = store.getTiddlerSlice(t,pdc+'startDate');
		dec.endDate = store.getTiddlerSlice(t,pdc+'endDate');
		dec.startLabel = store.getTiddlerSlice(t,pdc+'startLabel');
		dec.endLabel = store.getTiddlerSlice(t,pdc+'endLabel');
		dec.color = store.getTiddlerSlice(t,pdc+'color');
		dec.opacity = store.getTiddlerSlice(t,pdc+'opacity');
		ret.dec = dec;
	}
	var highlight = store.getTiddlerSlice(t,pfx+'highlight');
	ret.highlight = highlight ? eval(highlight) : false;
	ret.ev = ev;
	ret.bp = bp;
	return ret;
};
} // end of 'install only once'
/*}}}*/
/***
From:
// http://simile.mit.edu/repository/timeline/trunk/src/webapp/api/bundle.css
***/
/*{{{*/
.timeline-ether-marker-bottom {
    width:          5em; 
    height:         1.5em; 
    border-left:    1px solid #aaa; 
    padding-left:   2px; 
    color:          #aaa;
}

.timeline-ether-marker-bottom-emphasized {
    width:          5em; 
    height:         2em; 
    border-left:    1px solid #aaa; 
    padding-left:   2px; 
    color:          black;
}

.timeline-ether-marker-top {
    width:          5em; 
    height:         1.5em; 
    border-left:    1px solid #aaa; 
    padding-left:   2px; 
    color:          #aaa;
}

.timeline-ether-marker-top-emphasized {
    width:          5em; 
    height:         2em; 
    border-left:    1px solid #aaa; 
    padding-left:   2px; 
    color:          black;
}


.timeline-ether-marker-right {
    width:          5em; 
    height:         1.5em; 
    border-top:     1px solid #aaa; 
    padding-top:    2px; 
    color:          #aaa;
}

.timeline-ether-marker-right-emphasized {
    width:          7em; 
    height:         1.5em; 
    border-top:     1px solid #aaa; 
    padding-top:    2px; 
    color:          black;
}
.timeline-ether-marker-left {
    width:          5em; 
    height:         1.5em; 
    border-top:     1px solid #aaa; 
    padding-top:    2px; 
    color:          #aaa;
}

.timeline-ether-marker-left-emphasized {
    width:          7em; 
    height:         1.5em; 
    border-top:     1px solid #aaa; 
    padding-top:    2px; 
    color:          black;
}
.timeline-duration-event {
    position: absolute;
    overflow: hidden;
    border: 1px solid blue;
}

.timeline-instant-event2 {
    position: absolute;
    overflow: hidden;
    border-left: 1px solid blue;
    padding-left: 2px;
}

.timeline-instant-event {
    position: absolute;
    overflow: hidden;
}

.timeline-event-bubble-title {
    font-weight: bold;
    border-bottom: 1px solid #888;
    margin-bottom: 0.5em;
}

.timeline-event-bubble-body {
}

.timeline-event-bubble-wiki {
    margin:     0.5em;
    text-align: right;
    color:      #A0A040;
}
.timeline-event-bubble-wiki a {
    color:      #A0A040;
}

.timeline-event-bubble-time {
    color: #aaa;
}

.timeline-event-bubble-image {
    float: right;
    padding-left: 5px;
    padding-bottom: 5px;
}.timeline-container {
    position: relative;
    overflow: hidden;
}

.timeline-copyright {
    position: absolute;
    bottom: 0px;
    left: 0px;
    z-index: 1000;
    cursor: pointer;
}

.timeline-message-container {
    position:   absolute;
    top:        30%;
    left:       35%;
    right:      35%;
    z-index:    1000;
    display:    none;
}
.timeline-message {
    font-size:      120%;
    font-weight:    bold;
    text-align:     center;
}
.timeline-message img {
    vertical-align: middle;
}

.timeline-band {
    position:   absolute;
    background: #eee;
    z-index:    10;
}

.timeline-band-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.timeline-band-input {
    position:   absolute;
    width:      1em;
    height:     1em;
    overflow:   hidden;
    z-index:    0;
}
.timeline-band-input input{
    width:      0;
}

.timeline-band-layer {
    position:   absolute;
    width:      100%;
    height:     100%;
}

.timeline-band-layer-inner {
    position:   relative;
    width:      100%;
    height:     100%;
}
/*}}}*/
<html><table><td align="right" valign="top"><b>Til rådighed:</b></ td><td><span macro='edit ialt'></span></td><tr><td align="right" valign="top"><b>Timer brugt:</b></td><td><<wikify %0 {{tiddler.data("timer","Klik på knappen timer og indkriv timetal")}}>> t<br><<tag arbejdstid>><<tiddler AktivitetsRapport##Sum with: {{tiddler.fields["ialt"]}}>></td></tr></table></html>
/***
|''Name''|SimpleSearchPlugin|
|''Description''|displays search results as a simple list of matching tiddlers|
|''Authors''|FND|
|''Version''|0.4.1|
|''Status''|stable|
|''Source''|http://devpad.tiddlyspot.com/#SimpleSearchPlugin|
|''CodeRepository''|http://svn.tiddlywiki.org/Trunk/contributors/FND/plugins/SimpleSearchPlugin.js|
|''License''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Keywords''|search|
!Code
***/
//{{{
if(!version.extensions.SimpleSearchPlugin) { //# ensure that the plugin is only installed once
version.extensions.SimpleSearchPlugin = { installed: true };

if(!config.extensions) { config.extensions = {}; }

config.extensions.SimpleSearchPlugin = {
	heading: "Søgeresultater",
	containerId: "searchResults",
	btnCloseLabel: "luk",
	btnCloseTooltip: "luk søgeresultater",
	btnCloseId: "search_close",
	btnOpenLabel: "åbn alle",
	btnOpenTooltip: "åbn alle søgeresultater",
	btnOpenId: "search_open",

	displayResults: function(matches, query) {
		story.refreshAllTiddlers(true); // update highlighting within story tiddlers
		var el = document.getElementById(this.containerId);
		query = '"""' + query + '"""'; // prevent WikiLinks
		if(el) {
			removeChildren(el);
		} else { //# fallback: use displayArea as parent
			var container = document.getElementById("displayArea");
			el = document.createElement("div");
			el.id = this.containerId;
			el = container.insertBefore(el, container.firstChild);
		}
		var msg = "!" + this.heading + "\n";
		if(matches.length > 0) {
			msg += "''" + config.macros.search.successMsg.format([matches.length.toString(), query]) + ":''\n";
			this.results = [];
			for(var i = 0 ; i < matches.length; i++) {
				this.results.push(matches[i].title);
				msg += "* [[" + matches[i].title + "]]\n";
			}
		} else {
			msg += "''" + config.macros.search.failureMsg.format([query]) + "''"; // XXX: do not use bold here!?
		}
		createTiddlyButton(el, this.btnCloseLabel, this.btnCloseTooltip, config.extensions.SimpleSearchPlugin.closeResults, "button", this.btnCloseId);
		if(matches.length > 0) { // XXX: redundant!?
			createTiddlyButton(el, this.btnOpenLabel, this.btnOpenTooltip, config.extensions.SimpleSearchPlugin.openAll, "button", this.btnOpenId);
		}
		wikify(msg, el);
	},

	closeResults: function() {
		var el = document.getElementById(config.extensions.SimpleSearchPlugin.containerId);
		removeNode(el);
		config.extensions.SimpleSearchPlugin.results = null;
		highlightHack = null;
	},

	openAll: function(ev) {
		story.displayTiddlers(null, config.extensions.SimpleSearchPlugin.results);
		return false;
	}
};

// override Story.search()
Story.prototype.search = function(text, useCaseSensitive, useRegExp) {
	highlightHack = new RegExp(useRegExp ? text : text.escapeRegExp(), useCaseSensitive ? "mg" : "img");
	var matches = store.search(highlightHack, null, "excludeSearch");
	var q = useRegExp ? "/" : "'";
	config.extensions.SimpleSearchPlugin.displayResults(matches, q + text + q);
};

// override TiddlyWiki.search() to sort by relevance
TiddlyWiki.prototype.search = function(searchRegExp, sortField, excludeTag, match) {
	var candidates = this.reverseLookup("tags", excludeTag, !!match);
	var primary = [];
	var secondary = [];
	var tertiary = [];
	for(var t = 0; t < candidates.length; t++) {
		if(candidates[t].title.search(searchRegExp) != -1) {
			primary.push(candidates[t]);
		} else if(candidates[t].tags.join(" ").search(searchRegExp) != -1) {
			secondary.push(candidates[t]);
		} else if(candidates[t].text.search(searchRegExp) != -1) {
			tertiary.push(candidates[t]);
		}
	}
	var results = primary.concat(secondary).concat(tertiary);
	if(sortField) {
		results.sort(function(a, b) {
			return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);
		});
	}
	return results;
};

} //# end of "install only once"
//}}}
|tblSITE|k
|width:200px;padding:0.5em;font-size:2em;SiteTitle|>|>|>|font-size:1.1em;padding-top:1em;SiteSubtitle @@padding-left:7%;[[topMenuL]]@@@@padding-left:15%;[[topMenuR]]@@|
|{{floatleft{@@padding-left:10px;font-size:0.9em;font-weight:bold;display:inline;<<tiddler topMenuL>>@@}}}{{floatright{@@text-align:right;font-size:0.9em;font-weight:bold;display:inline;<<tiddler topMenuR>>@@}}}|>|>|>|>|
|width:10%;padding:0;text-align:left; @@font-weight:bold;font-size:1.2em;padding-left:15px;[[MainMenu]]@@<br/>@@display:block;margin-top:10px;padding:0;<<tiddler MainMenu>>@@|>|>|border-bottom:1px solid #333;background:#444;color:#111;width:60%;height:15px;padding:2px 2px 0 2px;{{tblLAYOUTMID{@@background:#eee;[[TiddlersBar|TiddlersBarPlugin]]@@}}} |width:20%; <<tiddler SiteLayout##Sidebar>> |
|~|~|background:#EEE;color:#111;height:150px;text-align:center;padding-top:10px; {{tblLAYOUTMID{<<tiddler SiteLayout##Tiddlers>>}}}|>|~|
|>|>|>|>|&nbsp;|
/%
!Tiddlers
@@display:block;position:relative;left:-40%;top:0px;Tiddler viewer@@@@display:block;position:relative;right:-22%;top:-15px; [[x-tab]] / [[x-plore]] / [[x-tag|x-tagger]] / [[ToolbarCommands]]@@
@@font-size:1.5em;color:#999;displayArea / tiddlerDisplay@@
@@display:block;margin-top:15px;font-size:2em;[[tbGtdTheme]] / <<tag site>>@@
@@display:block;margin-top:5px;font-size:1em;[[StyleSheet]] / [[StyleSheetShortcuts]]@@
!Sidebar
@@display:block;width:100%;height:50px;padding-right:0%;padding-top:10px;[[SideBarOptions]]<br/>[[calendar]]@@@@display:block;margin-top:5px;width:100%;height:150px;SideBarTabs<br /><<tiddler SiteLayout##Tabs>>@@
!Tabs
@@display:block;text-align:left;font-size:0.9em;padding:5px;background:#555;height:100px;[[tags|TagCloud]]|[[recent|TabTimeline]]|[[toc|SideBarTabs]]|[[more|TabMore]]<br>[[tags|TabTags]]|[[plug|systemConfig]]|[[miss|TabMoreMissing]]|[[orph|TabMoreOrphans]]|[[shad|TabMoreShadowed]]|[[ex|excludeLists]]<br /><br />{{medium{[[TagCloud]]}}}@@
!End%/
<<tiddler {{
var s='.tblSITE, .tblSITE thead, .tblSITE tr, .tblSITE td{border:0;color:white;background:#333;}'+
'.tblSITE a,.tblSITE a.tiddlyLink, .tblSITE a.button{color:#EEE;border-color:transparent;font-weight:bold;padding:0 3px;font-style:normal;}'+
'.tblSITE a:hover,.tblSITE a.tiddlyLink:hover, .tblSITE a.button:hover{color:#39F;border-color:transparent;background:transparent;}'+
'.tblSITE{-moz-border-radius:5px; -webkit-border-radius:5px;}'+
'.tblSITE ul, .tblSITE li{list-style-type:none;}'+
'.tblLAYOUTMID a.tiddlyLink{color:#111;}';
setStylesheet(s,'StyleSheetSiteLayout');
'';}}>>
en samling af digitale udtalelsesskabeloner@@font-family:"Comic Sans MS";{{floatright small menubox button{<<tiddler ToggleFullScreen with: "----Fuld skærm---" "----Fuld skærm---">>}}}
@@font-family:"Comic Sans MS"; &nbsp;Udtalelser@@
!!Example:
|sortable|k
|Name |Salary |Extension |Performance |File Size |Start date |h
|ZBloggs, Fred |$12000.00 |1353 |+1.2 |74.2Kb |Aug 19, 2003 21:34:00 |
|ABloggs, Fred |$12000.00 |1353 |1.2 |3350b |09/18/2003 |
|CBloggs, Fred |$12000 |1353 |1.200 |55.2Kb |August 18, 2003 |
|DBloggs, Fred |$12000.00 |1353 |1.2 |2100b |07/18/2003 |
|Bloggs, Fred |$12000.00 |1353 |01.20 |6.156Mb |08/17/2003 05:43 |
|Turvey, Kevin |$191200.00 |2342 |-33 |1b |02/05/1979 |
|Mbogo, Arnold |$32010.12 |2755 |-21.673 |1.2Gb |09/08/1998 |
|Shakespeare, Bill |�122000.00|3211 |6 |33.22Gb |12/11/1961 |
|Shakespeare, Hamlet |�9000 |9005 |-8 |3Gb |01/01/2002 |
|Fitz, Marvin |�3300.30 |5554 |+5 |4Kb |05/22/1995 |

***/
// /%
//!BEGIN-PLUGIN-CODE
config.tableSorting = {
	
	darrow: "\u2193",
	
	uarrow: "\u2191",
	
	getText : function (o) {
		var p = o.cells[SORT_INDEX];
		return p.innerText || p.textContent || '';
	},
	
	sortTable : function (o,rev) {
		SORT_INDEX = o.getAttribute("index");
		var c = config.tableSorting;
		var T = findRelated(o.parentNode,"TABLE");
		if(T.tBodies[0].rows.length<=1) 
			return;
		var itm = "";
		var i = 0;
		while (itm == "" && i < T.tBodies[0].rows.length) {
			itm = c.getText(T.tBodies[0].rows[i]).trim();
			i++;
		}
		if (itm == "") 
			return; 	
		var r = [];
		var S = o.getElementsByTagName("span")[0];		
		c.fn = c.sortAlpha; 
		if(!isNaN(Date.parse(itm)))
			c.fn = c.sortDate; 
		else if(itm.match(/^[$|�|�|\+|\-]{0,1}\d*\.{0,1}\d+$/)) 
			c.fn = c.sortNumber; 
		else if(itm.match(/^\d*\.{0,1}\d+[K|M|G]{0,1}b$/)) 
			c.fn = c.sortFile; 
		for(i=0; i<T.tBodies[0].rows.length; i++) {
			 r[i]=T.tBodies[0].rows[i]; 
		} 
		r.sort(c.reSort);
		if(S.firstChild.nodeValue==c.darrow || rev) {
			r.reverse();
			S.firstChild.nodeValue=c.uarrow;
		} 
		else 
			S.firstChild.nodeValue=c.darrow;
		var thead = T.getElementsByTagName('thead')[0]; 
		var headers = thead.rows[thead.rows.length-1].cells;
		for(var k=0; k<headers.length; k++) {
			if(!hasClass(headers[k],"nosort"))
				addClass(headers[k].getElementsByTagName("span")[0],"hidden");
		}
		removeClass(S,"hidden");
		for(i=0; i<r.length; i++) { 
			T.tBodies[0].appendChild(r[i]);
			c.stripe(r[i],i);
			for(var j=0; j<r[i].cells.length;j++){
				removeClass(r[i].cells[j],"sortedCol");
			}
			addClass(r[i].cells[SORT_INDEX],"sortedCol");
		}
	},
	
	stripe : function (e,i){
		var cl = ["oddRow","evenRow"];
		i&1? cl.reverse() : cl;
		removeClass(e,cl[1]);
		addClass(e,cl[0]);
	},
	
	sortNumber : function(v) {
		var x = parseFloat(this.getText(v).replace(/[^0-9.-]/g,''));
		return isNaN(x)? 0: x;
	},
	
	sortDate : function(v) {
		return Date.parse(this.getText(v));
	},

	sortAlpha : function(v) {
		return this.getText(v).toLowerCase();
	},
	
	sortFile : function(v) { 		
		var j, q = config.messages.sizeTemplates, s = this.getText(v);
		for (var i=0; i<q.length; i++) {
			if ((j = s.toLowerCase().indexOf(q[i].template.replace("%0\u00a0","").toLowerCase())) != -1)
				return q[i].unit * s.substr(0,j);
		}
		return parseFloat(s);
	},
	
	reSort : function(a,b){
		var c = config.tableSorting;
		var aa = c.fn(a);
		var bb = c.fn(b);
		return ((aa==bb)? 0 : ((aa<bb)? -1:1));
	}
};

Story.prototype.tSort_refreshTiddler = Story.prototype.refreshTiddler;
Story.prototype.refreshTiddler = function(title,template,force,customFields,defaultText){
	var elem = this.tSort_refreshTiddler.apply(this,arguments);
	if(elem){
		var tables = elem.getElementsByTagName("TABLE");
		var c = config.tableSorting;
		for(var i=0; i<tables.length; i++){
			if(hasClass(tables[i],"sortable")){
				var x = null, rev, table = tables[i], thead = table.getElementsByTagName('thead')[0], headers = thead.rows[thead.rows.length-1].cells;
				for (var j=0; j<headers.length; j++){
					var h = headers[j];
					if (hasClass(h,"nosort"))
						continue;
					h.setAttribute("index",j);
					h.onclick = function(){c.sortTable(this); return false;};
					h.ondblclick = stopEvent;
					if(h.getElementsByTagName("span").length == 0)
						createTiddlyElement(h,"span",null,"hidden",c.uarrow); 
					if(!x && hasClass(h,"autosort")) {
						x = j;
						rev = hasClass(h,"reverse");
					}
				}
				if(x)
					c.sortTable(headers[x],rev);		
			}
		}
	}
	return elem; 
};

setStylesheet("table.sortable span.hidden {visibility:hidden;}\n"+
	"table.sortable thead {cursor:pointer;}\n"+
	"table.sortable .nosort {cursor:default;}\n"+
	"table.sortable td.sortedCol {background:#ffc;}","TableSortingPluginStyles");

function stopEvent(e){
	var ev = e? e : window.event;
	ev.cancelBubble = true;
	if (ev.stopPropagation) ev.stopPropagation();
	return false;	
}	

config.macros.nosort={
	handler : function(place){
		addClass(place,"nosort");
	}	
};

config.macros.autosort={
	handler : function(place,m,p,w,pS){
		addClass(place,"autosort"+" "+pS);		
	}	
};
//!END-PLUGIN-CODE
// %/
/***
|Name|SnapshotPlugin|
|Source|http://www.TiddlyTools.com/#SnapshotPlugin|
|Documentation|http://www.TiddlyTools.com/#SnapshotPluginInfo|
|Version|1.3.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|save or print HTML+CSS image of rendered document content|
This plugin provides a macro as well as tiddler toolbar commands to create a file or browser window containing the //rendered// CSS-and-HTML that is currently being displayed for selected elements of the current document.
!!!!!Documentation
>see [[SnapshotPluginInfo]]
!!!!!Configuration
<<<
<<option chkSnapshotHTMLOnly>> output HTML only (omit CSS)
<<<
!!!!!Revisions
<<<
2009.10.12 1.3.0 added multi-file story snapshot
|please see [[SnapshotPluginInfo]] for additional revision details|
2008.04.21 1.0.0 initial release - derived from [[NewDocumentPlugin]] with many improvements...
<<<
!!!!!Code
***/
//{{{
version.extensions.SnapshotPlugin= {major: 1, minor: 3, revision: 0, date: new Date(2009,10,12)};

if (config.options.chkSnapshotHTMLOnly===undefined)
	config.options.chkSnapshotHTMLOnly=false;

config.macros.snapshot = {
	snapLabel: "save a snapshot",
	printLabel: "print a snapshot",
	snapPrompt: "save an HTML image",
	printPrompt: "print an HTML image",
	hereID: "here",
	viewerID: "viewer",
	storyID: "story",
	allID: "all",
	askID: "ask",
	askTiddlerID: "askTiddler",
	askDOMID: "askDOM",
	askMsg: "select an element...",
	hereItem: "tiddler: '%0'",
	viewerItem: "tiddler: '%0' (content only)",
	storyItem: "story column (one file)",
	storyFilesItem: "story column (multiple files)",
	allItem: "entire document",
	tiddlerItem: "select a tiddler...",
	IDItem: "select a DOM element by ID...",
	HTMLItem: "[%0] output HTML only (omit CSS)",
	fileMsg: "select or enter a target path/filename",
	defaultFilename: "snapshot.html",
	okmsg: "snapshot written to %0",
	failmsg: "An error occurred while creating %0",
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var printing=params[0]&&params[0]=="print"; if (printing) params.shift();
		params = paramString.parseParams("anon",null,true,false,false);
		var id=getParam(params,"id","here");
		var label=getParam(params,"label",printing?this.printLabel:this.snapLabel);
		var prompt=getParam(params,"prompt",printing?this.printPrompt:this.snapPrompt);
		var btn=createTiddlyButton(place,label,prompt, function(ev){
			this.setAttribute("snapID",this.getAttribute("startID"));
			config.macros.snapshot.go(this,ev)
		});
		btn.setAttribute("startID",id);
		btn.setAttribute("snapID",id);
		btn.setAttribute("printing",printing?"true":"false");
		btn.setAttribute("HTMLOnly",config.options.chkSnapshotHTMLOnly?"true":"false");
	},
	go: function(here,ev) {
		var cms=config.macros.snapshot; // abbreviation
		var id=here.getAttribute("snapID");
		var printing=here.getAttribute("printing")=="true";
		var HTMLOnly=here.getAttribute("HTMLOnly")=="true";

		if (id==cms.askID||id==cms.askTiddlerID||id==cms.askDOMID) {
			cms.askForID(here,ev);
		} else if (id==cms.storyID) {
			story.forEachTiddler(function(t,e) {
				var out=cms.getsnap(e,e.id,printing,HTMLOnly);
				if (printing) cms.printsnap(out);
				else cms.savesnap(out,e.getAttribute('tiddler')+'.html');
			});
		} else {
			if (id==cms.allID) id="contentWrapper";
			var snapElem=document.getElementById(id);
			if (id==cms.hereID || id==cms.viewerID)
				var snapElem=story.findContainingTiddler(here);
			if (snapElem && hasClass(snapElem,"tiddler") && (id==cms.viewerID || HTMLOnly)) {
				// find viewer class element within tiddler element
				var nodes=snapElem.getElementsByTagName("*");
				for (var i=0; i<nodes.length; i++)
					if (hasClass(nodes[i],"viewer")) { snapElem=nodes[i]; break; }
			}
			if (!snapElem) // not in a tiddler or no viewer element or unknown ID
				{ e.cancelBubble=true; if(e.stopPropagation)e.stopPropagation(); return(false); }
			// write or print snapshot
			var out=cms.getsnap(snapElem,id,printing,HTMLOnly);
			if (printing) cms.printsnap(out); else cms.savesnap(out);
		}
		return false;
	},
	askForID: function(here,ev) {
		var ev = ev ? ev : window.event; 
		var cms=config.macros.snapshot; // abbreviation
		var id=here.getAttribute("snapID");
		var indent='\xa0\xa0\xa0\xa0';
		var p=Popup.create(here); if (!p) return false; p.className+=' sticky smallform';
		var s=createTiddlyElement(p,'select'); s.button=here;
		if (id==cms.askID) {
			s.options[s.length]=new Option(cms.askMsg,cms.askID);
			var tid=story.findContainingTiddler(here);
			if(tid) { 
				var title=tid.getAttribute("tiddler");
				if (here.getAttribute("HTMLOnly")!="true")
					s.options[s.length]=new Option(indent+cms.hereItem.format([title]),cms.hereID);
				s.options[s.length]=new Option(indent+cms.viewerItem.format([title]),cms.viewerID);
			}
			s.options[s.length]=new Option(indent+cms.tiddlerItem,cms.askTiddlerID);
			s.options[s.length]=new Option(indent+cms.IDItem,cms.askDOMID);
			s.options[s.length]=new Option(indent+cms.storyItem,"tiddlerDisplay");
			s.options[s.length]=new Option(indent+cms.storyFilesItem,cms.storyID);
			s.options[s.length]=new Option(indent+cms.allItem,"contentWrapper");
		}
		if (id==cms.askDOMID) {
			s.options[s.length]=new Option(cms.IDItem,cms.askDOMID);
			var elems=document.getElementsByTagName("*");
			var ids=[];
			for (var i=0;i<elems.length;i++)
				if (elems[i].id.length && elems[i].className!="animationContainer")
					ids.push(elems[i].id);
			ids.sort();
			for (var i=0;i<ids.length;i++) s.options[s.length]=new Option(indent+ids[i],ids[i]);
		}
		if (id==cms.askTiddlerID) {
			s.options[s.length]=new Option(cms.tiddlerItem,cms.askTiddlerID);
			var elems=document.getElementsByTagName("div");
			var ids=[];
			for (var i=0;i<elems.length;i++) { var id=elems[i].id;
				if (id.length && id.substr(0,story.idPrefix.length)==story.idPrefix && id!="tiddlerDisplay")
					ids.push(id);
			}
			ids.sort();
			for (var i=0;i<ids.length;i++) s.options[s.length]=new Option(indent+ids[i].substr(story.idPrefix.length),ids[i]);
		}
		s.options[s.length]=new Option(cms.HTMLItem.format([here.getAttribute("HTMLOnly")=="true"?"\u221a":"_"]),cms.HTMLItem);
		s.onchange=function(ev){
			var ev = ev ? ev : window.event; 
			var cms=config.macros.snapshot; // abbreviation
			var here=this.button;
			if (this.value==cms.HTMLItem) {
				config.options.chkSnapshotHTMLOnly=!config.options.chkSnapshotHTMLOnly;
				here.setAttribute("HTMLOnly",config.options.chkSnapshotHTMLOnly?"true":"false");
				config.macros.option.propagateOption("chkSnapshotHTMLOnly","checked",
					config.options.chkSnapshotHTMLOnly,"input");
			} else
				here.setAttribute("snapID",this.value);
			config.macros.snapshot.go(here,ev);
			return false;
		};
		Popup.show();
		ev.cancelBubble=true;
		if(ev.stopPropagation)ev.stopPropagation();
		return false;
	},
	getpath: function() {
		// get current path
		var path=getLocalPath(window.location.href);
		var slashpos=path.lastIndexOf("/");
		if (slashpos==-1) slashpos=path.lastIndexOf("\\"); 
		if (slashpos!=-1) path=path.substr(0,slashpos+1); // trim filename
		return path;
	},
	getsnap: function(snapElem,id,printing,HTMLOnly) {
		var cms=config.macros.snapshot; // abbreviation
		var out='<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" />';
		if (printing)
			out+='<base href="file:///'+cms.getpath().replace(/\\/g,'/')+'"></base>\n';
		if (!HTMLOnly) {
			var styles=document.getElementsByTagName('style');
			var fmt='<style>\n/* stylesheet=%0 */\n%1\n\n</style>\n';
			for(var i=0; i < styles.length; i++)
				out+=fmt.format([styles[i].getAttribute('id'),styles[i].innerHTML]);
		}
		out+='</head>\n';

		var elems=snapElem.getElementsByTagName('input');
		for (var i=0; i<elems.length; i++) { var e=elems[i];
			if (e.type=='text')		e.defaultValue=e.value;
			if (e.type=='checkbox')	 	e.defaultChecked=e.checked;
			if (e.type=='radiobutton')	e.defaultChecked=e.checked;
		}
		var elems=snapElem.getElementsByTagName('textarea');
		for (var i=0; i<elems.length; i++)	elems[i].defaultValue=elems[i].value;

		var fmt='<body>\n\n<div class="%0">%1</div>\n\n</body>\n';
		out+=fmt.format([(id==cms.viewerID?'tiddler viewer':''),snapElem.innerHTML]);

		return '<html>\n'+out+'</html>';
	},
	printsnap: function(out) {
		var win=window.open("","_blank","");
		win.document.open();
		win.document.writeln(out);
		win.document.close();
		win.focus(); // bring to front
		win.print(); // trigger print dialog
	},
	savesnap: function(out,target) {
		var cms=config.macros.snapshot; // abbreviation
		// make sure we are local
		if (window.location.protocol!="file:")
			{ alert(config.messages.notFileUrlError); return; }
		var target=target||cms.askForFilename(cms.fileMsg,cms.getpath(),cms.defaultFilename);
		if (!target) return; // cancelled by user
		// if specified file does not include a path, assemble fully qualified path and filename
		var slashpos=target.lastIndexOf("/"); if (slashpos==-1) slashpos=target.lastIndexOf("\\");
		if (slashpos==-1) {
			var h=document.location.href;
			var cwd=getLocalPath(decodeURIComponent(h.substr(0,h.lastIndexOf('/')+1)));
			target=cwd+target;
		}
		var link="file:///"+target.replace(/\\/g,'/'); // link for message text
		var ok=saveFile(target,convertUnicodeToUTF8(out));
		var msg=ok?cms.okmsg.format([target]):cms.failmsg.format([target]);
		displayMessage(msg,link);
	},
	askForFilename: function(msg,path,file) {
		if(window.Components) { // moz
			try {
				netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
				var nsIFilePicker = window.Components.interfaces.nsIFilePicker;
				var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
				picker.init(window, msg, nsIFilePicker.modeSave);
				var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
				thispath.initWithPath(path);
				picker.displayDirectory=thispath;
				picker.defaultExtension='html';
				picker.defaultString=file;
				picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterText|nsIFilePicker.filterHTML);
				if (picker.show()!=nsIFilePicker.returnCancel) var result=picker.file.persistentDescriptor;
			}
			catch(e) { alert('error during local file access: '+e.toString()) }
		}
		else { // IE
			try { // XP/Vista only
				var s = new ActiveXObject('UserAccounts.CommonDialog');
				s.Filter='All files|*.*|Text files|*.txt|HTML files|*.htm;*.html|';
				s.FilterIndex=3; // default to HTML files;
				s.InitialDir=path;
				s.FileName=file;
				if (s.showOpen()) var result=s.FileName;
			}
			catch(e) { var result=prompt(msg,path+file); } // fallback for non-XP IE
		}
		return result;
	}
};
//}}}

// // TOOLBAR DEFINITIONS
//{{{
config.commands.snapshotSave = {
	text: "snap",
	tooltip: config.macros.snapshot.snapPrompt,
	handler: function(ev,src,title) {
		src.setAttribute("snapID","ask");
		src.setAttribute("printing","false");
		src.setAttribute("HTMLOnly",config.options.chkSnapshotHTMLOnly?"true":"false");
		config.macros.snapshot.go(src,ev);
		return false;
	}
};
config.commands.snapshotPrint = {
	text: "print",
	tooltip: config.macros.snapshot.printPrompt,
	handler: function(ev,src,title) {
		src.setAttribute("snapID","ask");
		src.setAttribute("printing","true");
		src.setAttribute("HTMLOnly",config.options.chkSnapshotHTMLOnly?"true":"false");
		config.macros.snapshot.go(src,ev);
		return false;
	}
};
//}}}

// // COPIED FROM [[StickyPopupPlugin]] TO ELIMINATE PLUGIN DEPENDENCY
//{{{
if (config.options.chkStickyPopups==undefined) config.options.chkStickyPopups=false;
Popup.stickyPopup_onDocumentClick = function(ev)
{
	// if click is in a sticky popup, ignore it so popup will remain visible
	var e = ev ? ev : window.event; var target = resolveTarget(e);
	var p=target; while (p) {
		if (hasClass(p,"popup") && (hasClass(p,"sticky")||config.options.chkStickyPopups)) break;
		else p=p.parentNode;
	}
	if (!p) // not in sticky popup (or sticky popups disabled)... use normal click handling
		Popup.onDocumentClick(ev);
	return true;
};
try{removeEvent(document,"click",Popup.onDocumentClick);}catch(e){};
try{addEvent(document,"click",Popup.stickyPopup_onDocumentClick);}catch(e){};
//}}}
[[i kø]]
[[i gang]]
[[Pause]]
[[Færdig]]
/***
|Name|StickyPopupPlugin|
|Source|http://www.TiddlyTools.com/#StickyPopupPlugin|
|Version|1.0.1|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|Popup.onDocumentClick|
|Options|##Configuration|
|Description|allow mouse interactions inside popups without automatically closing them|
Usually, when a TW popup is displayed, it is automatically closed whenever a click occurs //anywhere// in the document, either //inside// or //outside// the popup itself.  This plugin makes popups persistent (a.k.a, "sticky"), allowing you to perform multiple mouse interactions on content //inside// the popup (e.g., entering form fields, opening links, selecting text, etc.), remaining visible until you click //outside// the popup or perform an action that opens another popup (only one popup can be displayed at any given time).
!!!!!Configuration
<<<
You can cause popups to behave in a persistent ("sticky") manner simply by selecting the option checkbox below.  The selected popup display behavior will be applied to ALL popups in the document automatically.
><<option chkStickyPopups>> make all popups "sticky"
>{{{usage: <<option chkStickyPopups>>}}}
<<<
!!!!!Usage
<<<
If you are developing your own plugins or inline scripts that create popups programmatically using the core function:
{{{
Popup.create(this)
}}}
you can provide additional parameters that specify the desired CSS classname(s) to assign to the popup DOM element.  The default class when none is specified is simply "popup".  To create a //sticky// popup, simply enter a custom class combination like this:
{{{
Popup.create(this,null,"sticky popup")
}}}
<<<
!!!!!Revisions
<<<
2008.05.16 [1.0.1] added try..catch around addEvent/removeEvent calls to avoid error in Opera
2007.11.25 [1.0.0] initial release - moved from [[CoreTweaks]]
<<<
!!!!!Code
***/
//{{{
version.extensions.StickyPopupPlugin= {major: 1, minor: 0, revision: 1, date: new Date(2008,5,16)};

if (config.options.chkStickyPopups==undefined) config.options.chkStickyPopups=false;

Popup.stickyPopup_onDocumentClick = function(ev)
{
	// if click is in a sticky popup, ignore it so popup will remain visible
	var e = ev ? ev : window.event; var target = resolveTarget(e);
	var p=target; while (p) {
		if (hasClass(p,"popup") && (hasClass(p,"sticky")||config.options.chkStickyPopups)) break;
		else p=p.parentNode;
	}
	if (!p) // not in sticky popup (or sticky popups disabled)... use normal click handling
		Popup.onDocumentClick(ev);
	return true;
};
try{removeEvent(document,"click",Popup.onDocumentClick);}catch(e){};
try{addEvent(document,"click",Popup.stickyPopup_onDocumentClick);}catch(e){};
//}}}
[[StyleSheetShortcuts]]

/*{{{*/
#at16sas,#at-logo,.at-whatsthis{visibility:hidden;display:none;}
#at16pt span,#at15s_head{text-align:center;font-weight:normal;display:block;}
#at15s_brand a{z-index:99;color:#E93;font-size:12px;padding:0 10px 0 30px;background:transparent;}
#at15s_brand a:hover{color:#39E;background-position:0 0;}
#at16pib #at16_brand a{display:none;}
#mainMenu .addthis_button{float:left;padding:0 4%;width:50%;display:block;text-align:right;background: transparent url(http://sites.google.com/site/beertobias/share.png) no-repeat 7px -15px;}
#mainMenu .addthis_button:hover{background: #333 url(http://sites.google.com/site/beertobias/share.png) no-repeat 7px 4px;}
#mainMenu .lang{float:left;display:block;clear:both;text-align:center;background: transparent url(http://sites.google.com/site/beertobias/flag_de.gif) no-repeat 7px -14px;}
#mainMenu .lang:hover {background: transparent url(http://sites.google.com/site/beertobias/flag_de.gif) no-repeat 7px 5px;}
/*}}}*/
/***
|Name|StyleSheetShortcuts|
|Source|http://www.TiddlyTools.com/#StyleSheetShortcuts|
|Version||
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|CSS|
|Requires||
|Description|'convenience' classes for common formatting, alignment, boxes, tables, etc.|

These 'style tweaks' can be easily included in other stylesheet tiddler so they can share a baseline look-and-feel that can then be customized to create a wide variety of 'flavors'.
***/
/*{{{*/

/* text alignments */
.left
	{ display:block;text-align:left; }
.center
	{ display:block;text-align:center; }
.center table
	{ margin:auto !important; }
.right	
	{ display:block;text-align:right; }
.justify
	{ display:block;text-align:justify; }
.indent
	{ display:block;margin:0;padding:0;border:0;margin-left:2em; }
.floatleft
	{ float:left; }
.floatright
	{ float:right; }
.valignTop, .valignTop table, .valignTop tbody, .valignTop th, .valignTop tr, .valignTop td
	{ vertical-align:top; }
.valignBottom, .valignBottom table, .valignBottom tbody, .valignBottom th, .valignBottom tr, .valignBottom td
	{ vertical-align:bottom; }
.clear
	{ clear:both; }
.wrap
	{ white-space:normal; }
.nowrap
	{ white-space:nowrap; }
.hidden
	{ display:none; }
.show
	{ display:inline !important; }
.span
	{ display:span; }
.block
	{ display:block; }
.relative
	{ position:relative; }
.absolute
	{ position:absolute; }

/* font sizes */
.big
	{ font-size:14pt;line-height:120% }
.medium
	{ font-size:12pt;line-height:120% }
.normal
	{ font-size:9pt;line-height:120% }
.small
	{ font-size:8pt;line-height:120% }
.fine
	{ font-size:7pt;line-height:120% }
.tiny
	{ font-size:6pt;line-height:120% }
.larger
	{ font-size:120%; }
.smaller
	{ font-size:80%; }

/* font styles */
.bold
	{ font-weight:bold; }
.italic
	{ font-style:italic; }
.underline
	{ text-decoration:underline; }

/* plain list items (no bullets or indent) */
.nobullets li { list-style-type: none; margin-left:-2em; }

/* multi-column tiddler content (not supported in Internet Explorer) */
.twocolumns { display:block;
	-moz-column-count:2; -moz-column-gap:1em; -moz-column-width:50%; /* FireFox */
	-webkit-column-count:2; -webkit-column-gap:1em; -webkit-column-width:50%; /* Safari */
	column-count:2; column-gap:1em; column-width:50%; /* Opera */
}
.threecolumns { display:block;
	-moz-column-count:3; -moz-column-gap:1em; -moz-column-width:33%; /* FireFox */
	-webkit-column-count:3; -webkit-column-gap:1em; -webkit-column-width:33%; /* Safari */
	column-count:3; column-gap:1em; column-width:33%; /* Opera */
}
.fourcolumns { display:block;
	-moz-column-count:4; -moz-column-gap:1em; -moz-column-width:25%; /* FireFox */
	-webkit-column-count:4; -webkit-column-gap:1em; -webkit-column-width:25%; /* Safari */
	column-count:4; column-gap:1em; column-width:25%; /* Opera */
}

/* page breaks */
.breakbefore { page-break-before:always; }
.breakafter { page-break-before:always; } 

/* show/hide browser-specific content for InternetExplorer vs. non-IE ("moz") browsers */
*[class="ieOnly"]
	{ display:none; } /* hide in moz (uses CSS selector) */
* html .mozOnly, *:first-child+html .mozOnly
	{ display: none; } /* hide in IE (uses IE6/IE7 CSS hacks) */

/* borderless tables */
.borderless, .borderless table, .borderless td, .borderless tr, .borderless th, .borderless tbody
	{ border:0 !important; margin:0 !important; padding:0 !important; }
.widetable, .widetable table
	{ width:100%; }

/* thumbnail images (fixed-sized scaled images) */
.thumbnail img { height:5em !important; }

/* stretchable images (auto-size to fit tiddler) */
.stretch img { width:95%; }

/* grouped content */
.outline
	{ display:block; padding:1em; -moz-border-radius:1em;-webkit-border-radius:1em; border:1px solid; }
.menubox
	{ display:block; padding:1em; -moz-border-radius:1em;-webkit-border-radius:1em; border:1px solid; background:#fff; color:#000; }
.menubox .button, .menubox .tiddlyLinkExisting, .menubox .tiddlyLinkNonExisting
	{ color:#009 !important; }
.groupbox
	{ display:block; padding:1em; -moz-border-radius:1em;-webkit-border-radius:1em; border:1px solid; background:#ffe; color:#000; }
.groupbox a, .groupbox .button, .groupbox .tiddlyLinkExisting, .groupbox .tiddlyLinkNonExisting
	{ color:#009 !important; }
.groupbox code
	{ color:#333 !important; }
.borderleft
	{ margin:0;padding:0;border:0;margin-left:1em; border-left:1px dotted; padding-left:.5em; }
.borderright
	{ margin:0;padding:0;border:0;margin-right:1em; border-right:1px dotted; padding-right:.5em; }
.borderbottom
	{ margin:0;padding:1px 0;border:0;border-bottom:1px dotted; margin-bottom:1px; padding-bottom:1px; }
.bordertop
	{ margin:0;padding:0;border:0;border-top:1px dotted; margin-top:1px; padding-top:1px; }

/* scrolled content */
.scrollbars { overflow:auto; }
.height10em { height:10em; }
.height15em { height:15em; }
.height20em { height:20em; }
.height25em { height:25em; }
.height30em { height:30em; }
.height35em { height:35em; }
.height40em { height:40em; }

/* compact form */
.smallform
	{ white-space:nowrap; }
.smallform input, .smallform textarea, .smallform button, .smallform checkbox, .smallform radio, .smallform select
	{ font-size:8pt; }

/* stretchable edit fields and textareas (auto-size to fit tiddler) */
.stretch input { width:99%; }
.stretch textarea { width:99%; }

/* compact input fields (limited to a few characters for entering percentages and other small values) */
.onechar input   { width:1em; }
.twochar input   { width:2em; }
.threechar input { width:3em; }
.fourchar input  { width:4em; }
.fivechar input  { width:5em; }

/* text colors */
.white { color:#fff !important }
.gray  { color:#999 !important }
.black { color:#000 !important }
.red   { color:#f66 !important }
.green { color:#0c0 !important }
.blue  { color:#99f !important }

/* rollover highlighting */
.mouseover 
	{color:[[ColorPalette::TertiaryLight]] !important;}
.mouseover a
	{color:[[ColorPalette::TertiaryLight]] !important;}
.selected .mouseover
	{color:[[ColorPalette::Foreground]] !important;}
.selected .mouseover .button, .selected .mouseover a
	{color:[[ColorPalette::PrimaryDark]] !important;}

/* rollover zoom text */
.zoomover
	{ font-size:80% !important; }
.selected .zoomover
	{ font-size:100% !important; }

/* [[ColorPalette]] text colors */
.Background	{ color:[[ColorPalette::Background]];	 }
.Foreground	{ color:[[ColorPalette::Foreground]];	 }
.PrimaryPale	{ color:[[ColorPalette::PrimaryPale]];	 }
.PrimaryLight	{ color:[[ColorPalette::PrimaryLight]];	 }
.PrimaryMid	{ color:[[ColorPalette::PrimaryMid]];	 }
.PrimaryDark	{ color:[[ColorPalette::PrimaryDark]];	 }
.SecondaryPale	{ color:[[ColorPalette::SecondaryPale]]; }
.SecondaryLight	{ color:[[ColorPalette::SecondaryLight]];}
.SecondaryMid	{ color:[[ColorPalette::SecondaryMid]];	 }
.SecondaryDark	{ color:[[ColorPalette::SecondaryDark]]; }
.TertiaryPale	{ color:[[ColorPalette::TertiaryPale]];	 }
.TertiaryLight	{ color:[[ColorPalette::TertiaryLight]]; }
.TertiaryMid	{ color:[[ColorPalette::TertiaryMid]];	 }
.TertiaryDark	{ color:[[ColorPalette::TertiaryDark]];	 }
.Error		{ color:[[ColorPalette::Error]];	 }

/* [[ColorPalette]] background colors */
.BGBackground	  { background-color:[[ColorPalette::Background]];	}
.BGForeground	  { background-color:[[ColorPalette::Foreground]];	}
.BGPrimaryPale	  { background-color:[[ColorPalette::PrimaryPale]];	}
.BGPrimaryLight	  { background-color:[[ColorPalette::PrimaryLight]];	}
.BGPrimaryMid	  { background-color:[[ColorPalette::PrimaryMid]];	}
.BGPrimaryDark	  { background-color:[[ColorPalette::PrimaryDark]];	}
.BGSecondaryPale  { background-color:[[ColorPalette::SecondaryPale]]; 	}
.BGSecondaryLight { background-color:[[ColorPalette::SecondaryLight]];	}
.BGSecondaryMid	  { background-color:[[ColorPalette::SecondaryMid]];	}
.BGSecondaryDark  { background-color:[[ColorPalette::SecondaryDark]]; 	}
.BGTertiaryPale	  { background-color:[[ColorPalette::TertiaryPale]];	}
.BGTertiaryLight  { background-color:[[ColorPalette::TertiaryLight]]; 	}
.BGTertiaryMid	  { background-color:[[ColorPalette::TertiaryMid]];	}
.BGTertiaryDark	  { background-color:[[ColorPalette::TertiaryDark]];	}
.BGError	  { background-color:[[ColorPalette::Error]];	 	}
/*}}}*/
{{applyNow{{{right{<<search [[skriv søgeord]]>><<option chkUseYourSearch>>}}}}}}
/***
|''Name:''|TTMigrateTasks0304Plugin|
|''Description:''|Migrate task tiddler from TeamTasks v0.3 to TeamTasks v0.4 format|
|''Author:''|PhilHawksworth|
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/PhilHawksworth/Verticals/TeamTasks/teamtasks/plugins/TTMigrateTasks0304Plugin.js |
|''Version:''|0.1|
|''Date:''|Mar 13, 2008|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]] |
|''~CoreVersion:''|2.3|

''About this tool''
The migration tool is designed to be run once in order to update the metadata on older TeamTasks task tiddler.

After running the migration tool, the TiddlyWiki document should be saved in order to retain the modified tiddlers.

After going through this process, this migration tool need not be used again and the call to the macro should then be removed.

''Usage:''
Migrate all v0.3 tasks to the v0.4 format
{{{
<<TTMigrateTasks0304>>
}}}

***/

//{{{
if(!version.extensions.TTMigrateTasks0304Plugin) {
version.extensions.TTMigrateTasks0304Plugin = {installed:true};
	
	config.macros.TTMigrateTasks0304 = {};
	config.macros.TTMigrateTasks0304.converted = 0;
	config.macros.TTMigrateTasks0304.problemTiddlers = 0;
	config.macros.TTMigrateTasks0304.place;
	config.macros.TTMigrateTasks0304.targetMetaVersion = 0.4;
	

	config.macros.TTMigrateTasks0304.log = function(str) {
		createTiddlyElement(config.macros.TTMigrateTasks0304.place,"div",null,null,str);
	};


	config.macros.TTMigrateTasks0304.handler = function(place,macroName,params,wikifier,paramString,tiddler) {

		config.macros.TTMigrateTasks0304.place = place;
		config.macros.TTMigrateTasks0304.log("Converting tasks tiddlers...");		

		var taskTiddlers = store.getTaggedTiddlers("task");					
		for(var t=0; t<taskTiddlers.length; t++) {

			// Find the extended fields to convert.
			store.forEachField(taskTiddlers[t], config.macros.TTMigrateTasks0304.convert, true);

			// Test the result for quality assurance.
			var tt_meta_version = store.getValue(taskTiddlers[t],"tt_tasks_metadata_format_version");
			if(tt_meta_version == config.macros.TTMigrateTasks0304.targetMetaVersion) {
				config.macros.TTMigrateTasks0304.log("Converted to TeamTask v"+ config.macros.TTMigrateTasks0304.targetMetaVersion +" task format: " + taskTiddlers[t].title);
				config.macros.TTMigrateTasks0304.converted++;
			}
			else {
				config.macros.TTMigrateTasks0304.log("... Error. There was a problem converting " + taskTiddlers[t].title + " to TeamTask v"+ config.macros.TTMigrateTasks0304.targetMetaVersion +" task format.");
				config.macros.TTMigrateTasks0304.problemTiddlers++;
			}
		}

		// Brag about the success / apologise for the failure.
		config.macros.TTMigrateTasks0304.log(config.macros.TTMigrateTasks0304.converted + " task tiddlers successfully converted to TeamTask v"+ config.macros.TTMigrateTasks0304.targetMetaVersion +" task format.");	
		if(config.macros.TTMigrateTasks0304.problemTiddlers != 0) {
			config.macros.TTMigrateTasks0304.log("Uh-oh! We had a poblem converting " + config.macros.TTMigrateTasks0304.problemTiddlers + " naughty tiddlers.");
		}
		else
			config.macros.TTMigrateTasks0304.log("No problems. Everything is tickertyboo.");
	};


	config.macros.TTMigrateTasks0304.convert = function(tiddler,fieldName,value){
		// Convert the task metadatafields from the form 'fielddefinitions' to 'tt_field'
		// and add a "tt_tasks_metadata_format_version" field for easier future migrations.
		if(fieldName.substring(fieldName.length-11) == 'definitions'){
		 	var newFieldName = "tt_" + fieldName.substring(0, fieldName.length-11);
			store.setValue(tiddler,newFieldName,value);
			store.setValue(tiddler,fieldName,null);
			store.setValue(tiddler,"tt_tasks_metadata_format_version",config.macros.TTMigrateTasks0304.targetMetaVersion);
		}
	};

} //# end of 'install only once'
//}}}
/***
|''Name:''|TTReportViewPlugin|
|''Description:''|Add a messaging console with acticity monitor to a Tiddlywiki|
|''Author:''|PhilHawksworth|
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/PhilHawksworth/Verticals/TeamTasks/teamtasks/plugins/TTReportView.js |
|''Version:''|0.0.1|
|''Date:''|Jan 23, 2008|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]] |
|''~CoreVersion:''|2.3|

''Usage:''

Create a view of the task list showing default values.
{{{
<<TTReportView>>
}}}

Create a view of the task list showing specified fields in a given order and filtering the results.
{{{
<<TTReportView DisplayFields:"field1,field2,field3" OrderBy:"field1,[asc|desc]" fieldName:"filterValue" fieldName:"!filterValue" recent:"items">>
}}}

for example
{{{
<<TTReportView DisplayFields:"TaskName,AssignedTo,TargetDate" OrderBy:"TargetDate,asc" Status:"!closed" Project:"BigProject">>	
}}}


***/

//{{{
if(!version.extensions.TTReportViePlugin) {
version.extensions.TTReportViewPlugin = {installed:true};
	
	config.macros.TTReportView = {};
	config.macros.TTReportView.log = function(str) {
		if(window.console) {
			console.log(str);
			return;
		}
	};

	config.macros.TTReportView.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
				
		var container = story.findContainingTiddler(place);
		var wrapper = createTiddlyElement(place,"span");
		wrapper.setAttribute('refresh','content');
		wrapper.setAttribute('tiddler',tiddler.title);
		wrapper.setAttribute('force', 'true');
		
		var fieldPrefix = "tt_";
				
		//gather all of the parameters.
		var params = paramString.parseParams("anon",null,true,false,false);
		var fieldsString = getParam(params,"DisplayFields",'title');
		var displayFields = fieldsString.split(",");
		for(var i=0;i<displayFields.length;i++){
			displayFields[i] = displayFields[i].trim();
		}
		var orderString = getParam(params,"OrderBy",'title,asc');
		var orderField =  fieldPrefix + orderString.split(",")[0];
		var order =  orderString.split(",")[1];				
		var recentItems = getParam(params,"recent");
		var expectedParams = ['DisplayFields','OrderBy'];
	
		//interpret and store the filter values.	
		var filters = [];
		for(var p in params) {
			var name = params[p].name;
			var value = params[p].value;
			if((name && name != 'undefined') &!expectedParams.contains(name)) {
				var match = true;
				if(value.substring(0,1) == "!") {
					match = false;
					var str = value.substring(1);
				}
				else {
					var str = value;	
				}
				if(name != "recent") { // exclude "recent" parameter
					filters.push({'field':fieldPrefix + name, 'value':str, 'match':match});
				}
			}
		}
					
		//collect the pertinent tiddlers.
		var taskTiddlers = store.getTaggedTiddlers("lektie");
		var toConsider = [];
		var toDisplay = [];		
		var toExclude = [];

		// limit to recently modified tiddlers
		if(recentItems) {
			taskTiddlers.sort(function(a,b) {
				return b.modified - a.modified;
			});
			taskTiddlers = taskTiddlers.slice(0, recentItems);
		}

		// first get all the tiddlers we might want to include.
		for(var t=0; t<taskTiddlers.length; t++) {
			var consider = true;
			for(var f=0; f<filters.length; f++) {
				if(filters[f].match == true) {
					if(store.getValue(taskTiddlers[t], filters[f].field).toLowerCase() != filters[f].value.toLowerCase()){
						consider = false;
						break;
					}
				}
			}
			if(consider)
				toConsider.push(taskTiddlers[t]);
		}
		

		// now find which of our selected tiddlers we need to exclude
		for(var d=0; d<toConsider.length; d++) {
			for(var f=0; f<filters.length; f++) {
				if(filters[f].match == false) {
					if(store.getValue(toConsider[d], filters[f].field).toLowerCase() == filters[f].value.toLowerCase()) {
						toExclude.push(toConsider[d]);
					}	
				}
			}
		}
		
		// remove the excluded tiddlers.
		for (var i=0; i < toConsider.length; i++) {
			if(toExclude.contains(toConsider[i]) === false)
				toDisplay.push(toConsider[i]);
		}

		// Build a sortable table of the results.
		var tbl = createTiddlyElement(wrapper,'table',null,'sortable');
		var thead = createTiddlyElement(tbl,'thead');
		var theadr = createTiddlyElement(thead,'tr');
		for(var f=0; f<displayFields.length; f++) {
			//specifiy the sorting column if required.
			var c = null;
			if(fieldPrefix + displayFields[f].toLowerCase() == orderField.toLowerCase()) {
				var c = "autosort";
				if(order != 'asc') c += " reverse";
			}
			createTiddlyElement(theadr,'td',null,c,displayFields[f]);
		}
		var tbody = createTiddlyElement(tbl,'tbody');
		for(var d=0; d<toDisplay.length; d++) {
			var tr = createTiddlyElement(tbody,'tr');
			for(var f=0; f<displayFields.length; f++) {
				var df = displayFields[f].toLowerCase();
				if(TiddlyWiki.isStandardField(df))
					var fieldName = df;
				else
					var fieldName = fieldPrefix + df;	
				var td  = createTiddlyElement(tr,'td',null,null,null);
				var v = store.getValue(toDisplay[d], fieldName);
				if(fieldName == 'title')
					createTiddlyLink(td,v,true,null,false,false);
				else
					createTiddlyText(td,v);
			}
		}		
	};
} //# end of 'install only once'
//}}}
<<list all>>
<<allTags excludeLists>>
<<tabs txtMoreTab tags "all tags" TabTags plug "installed plugins" systemConfig miss "missing tiddlers" TabMoreMissing orph "orphaned tiddlers" TabMoreOrphans shad "shadowed tiddlers" TabMoreShadowed ex "tiddlers on excludeLists" excludeLists>>
<<list missing>>
----
[[::excludeMissing::|excludeMissing]]
{{sidebarTitle{[[all available tags:|TabTags]]}}}
{{sideBarTags{<<allTags>>}}}
/***
|Name|TableOfContentsPlugin|
|Source|http://www.TiddlyTools.com/#TableOfContentsPlugin|
|Documentation|http://www.TiddlyTools.com/#TableOfContentsPluginInfo|
|Version|2.4.3|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|replace the standard tabbed contents list with a scrolling listbox|
When there are many tiddlers in a document, the standard 'tabbed list of tiddlers' in the right-hand sidebar can become very long, occupying a lot of page space and requiring a lot scrolling in order to locate and select a tiddler.  The TableOfContentsPlugin addresses this problem by replacing the standard tabbed list display with a single listbox/droplist control that uses a very small amount of page space, regardless of the number of tiddlers in the document.
!!!!!Documentation
>see [[TableOfContentsPluginInfo]]
!!!!!Configuration
<<option chkTOCShow>> display table of contents listbox
<<option chkTOCIncludeHidden>> include tiddlers tagged with <<tag excludeLists>> in listbox
listbox shows <<option txtTOCListSize>> lines, sorted by <<option txtTOCSortBy>>
<<<
!!!!!Code
***/
//{{{
version.extensions.TableOfContentsPlugin= {major: 2, minor: 4, revision: 3, date: new Date(2008,4,9)};
//}}}

// // 1.2.x compatibility
//{{{
if (!window.story) window.story=window;
if (!store.getTiddler) store.getTiddler=function(title){return store.tiddlers[title]}
if (!store.addTiddler) store.addTiddler=function(tiddler){store.tiddlers[tiddler.title]=tiddler}
if (!store.deleteTiddler) store.deleteTiddler=function(title){delete store.tiddlers[title]}
//}}}

//{{{
// define defaults for cookie-based option values
if (config.options.txtTOCSortBy==undefined)	config.options.txtTOCSortBy="modified";
if (config.options.txtTOCListSize==undefined)	config.options.txtTOCListSize=19;
if (config.options.chkTOCShow==undefined)	config.options.chkTOCShow=true;
if (config.options.chkTOCIncludeHidden==undefined)	config.options.chkTOCIncludeHidden=false;

// define macro "tableOfContents" to render controls
config.macros.tableOfContents = { label: "contents" };
config.macros.tableOfContents.cmdMax=8; // index of maximum command item

config.macros.tableOfContents.css = '\
.TOC { padding:0.5em 1em 0.5em 1em; }\
.TOC a { padding:0em 0.25em 0em 0.25em; color:inherit; }\
.TOCList { width: 100%; font-size:8pt; margin:0em; }\
';

config.macros.tableOfContents.html = '\
<div style="text-align:right">\
	<span style="float:left">\
	<a href="JavaScript:;" id="TOCMenu" style="padding: 0em;"\
		onclick="onClickTOCMenu(this)" title="show/hide table of contents">%label%</a>\
	</span>\
	<a href="JavaScript:;" id="TOCSmaller" style="display:inline"\
		onclick="resizeTOC(this)" title="reduce list size">&#150;</a>\
	<a href="JavaScript:;" id="TOCLarger"style="display:inline"\
		onclick="resizeTOC(this)" title="increase list size">+</a>\
	<a href="JavaScript:;" id="TOCMaximize"style="display:inline"\
		onclick="resizeTOC(this)" title="maximize/restore list size">=</a>\
</div>\
';

config.macros.tableOfContents.handler = function(place,macroName,params) { 
	var parsedParams = new Array();
	parsedParams['label']=this.label;
	parsedParams['inline']=false;
	while (params.length>0) {
		if (params[0]=="label:none") parsedParams['label']="";
		else if (params[0].substr(0,6)=="label:") parsedParams['label']=params[0].substr(6);
		if (params[0].substr(0,7)=="prompt:") parsedParams['prompt']=params[0].substr(7);
		if (params[0].substr(0,8)=="padding:")parsedParams['padding']=params[0].substr(8);
		if (params[0].substr(0,7)=="margin:") parsedParams['margin']=params[0].substr(7);
		if (params[0].substr(0,5)=="sort:")   parsedParams['sortby']=params[0].substr(5);
		if (params[0].substr(0,5)=="date:")   parsedParams['date']=params[0].substr(5);
		if ((params[0]=="size:auto")||(params[0]=="size:0")) parsedParams['autosize']=true;
		else if (params[0] && (params[0].substr(0,5)=="size:")) parsedParams['requestedSize']=params[0].substr(5);
		if (params[0].substr(0,6)=="width:") parsedParams['width']=params[0].substr(6);
		if (params[0]=="hidelist") parsedParams['hidelist']=true;
		if (params[0]=="inline")   parsedParams['inline']=true;
		if (params[0]=="-title")   parsedParams['hide_title']=true;
		if (params[0]=="-date")    parsedParams['hide_date']=true;
		if (params[0]=="-author")  parsedParams['hide_author']=true;
		if (params[0]=="-creator") parsedParams['hide_creator']=true;
		if (params[0]=="-tags")    parsedParams['hide_tags']=true;
		if (params[0]=="-missing") parsedParams['hide_missing']=true;
		if (params[0]=="-orphans") parsedParams['hide_orphans']=true;
		if (params[0]=="-shadows") parsedParams['hide_shadows']=true;
		params.shift(); 
	}
	setStylesheet(config.macros.tableOfContents.css,"tableOfContents");
	var newTOC=createTiddlyElement(place,parsedParams['inline']?"span":"div",null,"TOC",null)
	if (parsedParams['margin'])	{ newTOC.style.margin=parsedParams['margin']; }
	if (parsedParams['padding'])	{ newTOC.style.padding=parsedParams['padding']; }
	if (parsedParams['label']!="") newTOC.innerHTML=config.macros.tableOfContents.html.replace(/%label%/,parsedParams['label']);
	var newTOCList=createTOCList(newTOC,parsedParams)
	refreshTOCList(newTOCList);
	store.addNotification(null,reloadTOCLists);	// reload listbox after every tiddler change
}

// IE needs explicit global scoping for functions/vars called from browser events
window.onChangeTOCList=onChangeTOCList;
window.onClickTOCList=onClickTOCList;
window.onDblClickTOCList=onDblClickTOCList;
window.reloadTOCLists=reloadTOCLists;
window.refreshTOCList=refreshTOCList;
window.onClickTOCMenu=onClickTOCMenu;
window.resizeTOC=resizeTOC;
	
function createTOCList(place,params) {
	var list = createTiddlyElement(place,"select",null,"TOCList",params['prompt'])
	list.params=params;
	list.onchange=onChangeTOCList;
	list.onclick=onClickTOCList;
	list.ondblclick=onDblClickTOCList;
	list.onkeyup=onKeyUpTOCList;
	list.style.display=config.options.chkTOCShow ? "block" : "none" ;
	list.sortBy=config.options.txtTOCSortBy;
	list.dateFormat="DD MMM YYYY";
	list.requestedSize=config.options.txtTOCListSize;
	list.expandall=false;
	list.cmdMax=config.macros.tableOfContents.cmdMax;
	if (params['hide_title'])   list.cmdMax--;
	if (params['hide_date'])    list.cmdMax--;
	if (params['hide_author'])  list.cmdMax--;
	if (params['hide_creator']) list.cmdMax--;
	if (params['hide_tags'])    list.cmdMax--;
	if (params['hide_missing']) list.cmdMax--;
	if (params['hide_orphans']) list.cmdMax--;
	if (params['hide_shadows']) list.cmdMax--;
	if (params['sortby'])       { list.sortBy=params['sortby']; list.noSortCookie=true; }
	if (params['date'])         { list.dateFormat=params['date']; }
	if (params['autosize'])     { list.autosize=true; list.noSizeCookie=true; }
	if (params['requestedSize']){ list.requestedSize=params['requestedSize']; list.noSizeCookie=true; }
	if (params['width'])        { list.style.width=params['width']; }
	if (params['hidelist'])     { list.style.display ="none" ; list.noShowCookie=true; }
	if (params['expandall'])    { list.expandall=true; }
	return list;
}

function onChangeTOCList() {
	var thisTiddler=this.options[this.selectedIndex].value;
	if ((this.size==1)&&(thisTiddler!='')&&(this.selectedIndex>this.cmdMax))
		story.displayTiddler(null,thisTiddler,1);
	refreshTOCList(this);
	return false;
}
function onClickTOCList(e) {
	if (!e) var e = window.event;
	if (this.size==1) return; // don't toggle display for droplist
	if (e.shiftKey) { this.expandall=!this.expandall; refreshTOCList(this);}
	e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();
	return true;
}
function onDblClickTOCList(e) {
	if (!e) var e = window.event;
	var thisTiddler=this.options[this.selectedIndex].value;
	if ((thisTiddler!='')&&(this.selectedIndex>this.cmdMax))
		story.displayTiddler(null,thisTiddler,1);
	e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();
	return false;
}
function onKeyUpTOCList(e) {
	if (!e) var e = window.event;
	if (e.keyCode!=13) return true;
	var thisTiddler=this.options[this.selectedIndex].value;
	if ((thisTiddler!='')&&(this.selectedIndex>this.cmdMax))
		story.displayTiddler(null,thisTiddler,1);
	e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();
	return false;
}
function reloadTOCLists() {
	var all=document.all? document.all.tags("select") : document.getElementsByTagName("select");
	for (var i=0; i<all.length; i++)
		if (all[i].className=="TOCList")
			{ all[i].selectedIndex=-1; refreshTOCList(all[i]); }
}
 
function refreshTOCList(list) {
	var selectedIndex = list.selectedIndex;
	if (selectedIndex==-1) selectedIndex=0;
	var sortBy = list.sortBy;
	var showHidden = config.options.chkTOCIncludeHidden && !(config.options.chkHttpReadOnly && readOnly);

	if (selectedIndex==0) sortBy=list.sortBy;	// "nnn tiddlers" heading - use previous sort order
	else if (selectedIndex<=list.cmdMax)sortBy=list.value;
	else { if (list.options[list.selectedIndex].value=='') expandTOC(list); return; }

	list.sortBy = sortBy; // save current sort order
	if (!list.noSortCookie) { config.options.txtTOCSortBy=sortBy; saveOptionCookie("txtTOCSortBy"); }

	// get the list of tiddlers
	var tiddlers = [];
	switch (sortBy) {
		case "missing":	tiddlers=store.getMissingLinks(); break;
		case "tags": tiddlers=store.getTags(); break;
		case "orphans":	tiddlers=store.getOrphans(); break;
		case "shadows": for (var t in config.shadowTiddlers) tiddlers.push(t); tiddlers.sort();	break;
		default: tiddlers=store.getTiddlers(sortBy=='creator'?'modifier':sortBy,showHidden?'':'excludeLists'); break;
	}

	// clear current listbox contents
	while (list.length > 0) { list.options[0] = null; }
	list.saved=null;

	// add heading and control items to list
	var i=0;
	var theHeading=tiddlers.length+' tiddlers:';
	if (sortBy=='missing') theHeading=tiddlers.length+' missing tiddlers:';
	if (sortBy=='orphans') theHeading=tiddlers.length+' orphaned tiddlers:';
	if (sortBy=='tags')    theHeading=tiddlers.length+' tags:';
	if (sortBy=='shadows') theHeading=tiddlers.length+' shadow tiddlers:';
	var indent=String.fromCharCode(160)+String.fromCharCode(160);
	var sel=">";
	list.options[i++]=new Option(theHeading,'');
	function headerOpt(txt,val) { return new Option(((sortBy==val)?sel:indent)+' ['+txt+']',val); }
	if (!list.params['hide_title'])   list.options[i++]=headerOpt('by title','title');
	if (!list.params['hide_date'])    list.options[i++]=headerOpt('by date','modified');
	if (!list.params['hide_author'])  list.options[i++]=headerOpt('by author','modifier');
	if (!list.params['hide_creator']) list.options[i++]=headerOpt('by creator','creator');
	if (!list.params['hide_tags'])    list.options[i++]=headerOpt('by tags','tags');
	if (!list.params['hide_missing']) list.options[i++]=headerOpt('missing','missing');
	if (!list.params['hide_orphans']) list.options[i++]=headerOpt('orphans','orphans');
	if (!list.params['hide_shadows']) list.options[i++]=headerOpt('shadows','shadows');
	// output the tiddler list
	switch(sortBy) {
		case "title":
			for (var t = 0; t < tiddlers.length; t++)
				list.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title);
			break;
		case "modified":
		case "modifier":
		case "creator":
			if (sortBy=="modified") tiddlers.reverse(); // show newest first
			if (sortBy=="creator") { // sort by custom field with fallback value
				tiddlers.sort(function (a,b) {
					var v1=a.fields.creator||a.modifier;
					var v2=b.fields.creator||b.modifier;
					return (v1==v2)?0:(v1>v2?1:-1);
				});
			}
			var lastSection = "";
			for (var t = 0; t < tiddlers.length; t++){
				var tiddler = tiddlers[t];
				var theSection = "";
				var m=tiddler.modified;
				if (sortBy=="modified") theSection=m.getFullYear()+'.'+(m.getMonth()+1)+'.'+m.getDate();
				if (sortBy=="modifier") theSection = tiddler.modifier;
				if (sortBy=="creator") theSection=tiddler.fields['creator']||tiddler.modifier;
				if (theSection != lastSection) {
					lastSection = theSection;
					if (sortBy=="modified") theSection = m.formatString(list.dateFormat);
					list.options[i++] = new Option('+ '+theSection,"");
				}
				list.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title);
			}
			expandTOC(list);
			break;
		case "tags":
			// tagged tiddlers, by tag
			var tagcount=0;
			var lastTag = null;
			for (var t = 0; t < tiddlers.length; t++) {  // actually a list of tags, not tiddlers... 
				var theTag = tiddlers[t][0]; var tid=store.getTiddler(theTag);
				if (tid && tid.isTagged('excludeLists')) continue; // skip excluded tags
				var temp = store.getTaggedTiddlers(theTag);
				var tagged=[]; for (var q=0; q<temp.length; q++) // hide excluded tiddlers
					if (!temp[q].isTagged('excludeLists')) tagged.push(temp[q]); 
				if (tagged.length) { tagcount++;
					list.options[i++]=new Option('+ '+theTag+" ("+tagged.length+")","");
					for(var r=0; r<tagged.length; r++)
						list.options[i++]=
							new Option(indent+indent+tagged[r].title,tagged[r].title);
				}
			}
			// count untagged tiddlers
			var temp = store.getTiddlers("title");
			var c=0; for (var r=0; r<temp.length;r++) if (!temp[r].tags.length) c++;
			// create 'pseudo-tag' listing untagged tiddlers (if any)
			if (c>0) {
				list.options[i++] = new Option("+ untagged ("+c+")","");
				for (var r=0; r<temp.length;r++) if (!temp[r].tags.length)
					list.options[i++] = new
						Option(indent+indent+temp[r].title,temp[r].title);
			}
			list.options[0].text=tagcount+' tags:';
			expandTOC(list);
			break;
		case "missing": case "orphans": case "shadows":
			for (var t = 0; t < tiddlers.length; t++)
				list.options[i++] = new Option(tiddlers[t],tiddlers[t]);
			break;
	}
	list.selectedIndex=selectedIndex; // select current control item
	list.size = (list.autosize)?list.options.length:list.requestedSize;
}

// show/hide branch of TOCList based on current selection
function expandTOC(list) {
	var selectedIndex = list.selectedIndex;
	if (selectedIndex==-1) selectedIndex=0;
	var sortBy = list.sortBy;

	// don't collapse/expand list for alpha-sorted "flatlist" TOC contents
	// or list control items
	if ((sortBy=="title")||(sortBy=="missing")||(sortBy=="orphans")||(sortBy=="shadows")) return;
	if ((selectedIndex>0)&&(selectedIndex<=list.cmdMax)) return;

	// get current selected text/value and cache the 
	// complete list.  Then clear the current list contents
	var theText = list.options[selectedIndex].text;
	var theValue = list.options[selectedIndex].value;
	if (!list.saved) {
		list.saved=new Array();
		for (var i=0;i<list.length;i++) list.saved[i]=list.options[i];
	}
	while (list.length > 0) { list.options[0] = null; }

	// put back heading items until item text matches current selected heading
	var i=0;
	for (var t=0; t<list.saved.length; t++) {
		var opt=list.saved[t];
		if (list.expandall||(opt.value=='')||(i<=list.cmdMax)) list.options[i++] = opt;
		if (opt.text==theText) break;
	}
	selectedIndex=i-1;	// this is the NEW index of the current selected heading
	// put back items with value!='' until value==''
	for ( t++; t<list.saved.length; t++) {
		var opt=list.saved[t];
		if (list.expandall||opt.value!='') list.options[i++] = opt;
		if (opt.value=='') break;
	}
	// put back remaining items with value==''
	for ( ; t<list.saved.length; t++) {
		var opt=list.saved[t];
		if (list.expandall||opt.value=='') list.options[i++] = opt;
	}
	list.selectedIndex = selectedIndex;
	list.size = (list.autosize)?list.options.length:list.requestedSize;
}

// these functions process clicks on the 'control links' that are displayed above the listbox
function getTOCListFromButton(which) {
	var list = null;
	switch (which.id) {
		case 'TOCMenu':
			var theSiblings = which.parentNode.parentNode.parentNode.childNodes;
			var thePlace=which.parentNode.parentNode.parentNode.parentNode.parentNode.id;
			break;
		case 'TOCSmaller': case 'TOCLarger': case 'TOCMaximize':
			var theSiblings = which.parentNode.parentNode.childNodes;
			var thePlace=which.parentNode.parentNode.parentNode.parentNode.id;
			break;
	}
	for (var k=0; k<theSiblings.length; k++)
		if (theSiblings[k].className=="TOCList") { list=theSiblings[k]; break; }
	return list;
}
function onClickTOCMenu(which) {
	var list=getTOCListFromButton(which); if (!list) return;
	var opening = list.style.display=="none";
	if(config.options.chkAnimate) anim.startAnimating(new Slider(list,opening,false,"none"));
	else list.style.display = opening ? "block" : "none" ;
	if (!list.noShowCookie) { config.options.chkTOCShow = opening; saveOptionCookie("chkTOCShow"); }
	return(false);
}
function resizeTOC(which) {
	var list=getTOCListFromButton(which); if (!list) return;
	var size = list.size;
	if (list.style.display=="none")	// make sure list is visible
		if(config.options.chkAnimate) anim.startAnimating(new Slider(list,true,false,"none"));
		else list.style.display = "block" ;
	switch (which.id) {
		case 'TOCSmaller':	// decrease current listbox size
			if (list.autosize) { list.autosize=false; size=config.options.txtTOCListSize; }
			if (size==1)	break;
			size -= 1;	// shrink by one line
			list.requestedSize = list.size = size;
			break;
		case 'TOCLarger':	// increase current listbox size
			if (list.autosize) { list.autosize=false; size=config.options.txtTOCListSize; }
			if (size>=list.options.length)	break;
			size += 1;	// grow by one line
			list.requestedSize = list.size = size;
			break;
		case 'TOCMaximize':	// toggle autosize
			list.autosize  = (list.size!=list.options.length);
			list.size = (list.autosize)?list.options.length:list.requestedSize;
			break;
	}
	if (!list.noSizeCookie && !list.autosize)
		{ config.options.txtTOCListSize=size; saveOptionCookie("txtTOCListSize"); }
}
//}}}
<<tagCloud excludeLists noCloud noTitle opstart reference script systemTheme systemXConfig >>
----
@@padding-left:10px;[[::sortér efter tags::|TiddlersByTags]]@@
/***
|''Plugin'' |TagCloudMacro |
|''Author'' |Clint Checketts |
|''Source URL'' |http://tiddlystyles.com |
!Usage
{{{<<tagCloud>>}}}
<<tagCloud>>
!Code
***/
//{{{
setStylesheet(".tagCloud span{height: 1.8em;margin: 3px;}.tagCloud1{font-size: 10px;}.tagCloud2{font-size:12px;}.tagCloud3{font-size: 14px;}.tagCloud4{font-size: 16px;font-weight: bold;}.tagCloud5{font-size: 20px;font-weight: bold;}","tagCloudsStyles");

version.extensions.tagCloud={major: 1, minor: 0 , revision: 0, date: new Date(2006,2,04)};
//Created by Clint Checketts, contributions by Jonny Leroy and Eric Shulman
config.macros.tagCloud={
noTags:"There are no tags.",
tooltip:"%1 tiddlers tagged with '%0'",
exclude:['excludeLists','noCloud'],
handler:function(place,macroName,params){
var el,max,p,segm,t,tg,tags,wrap;
wrap=createTiddlyElement(place,"div",null,"tagCloud",null);
tags=store.getTags();
for(t=0;t<tags.length;t++){
	tiddler=store.fetchTiddler(tags[t][0]);
	if(tiddler&&tiddler.tags.containsAny(this.exclude))tags[t][0]="";
	for(p=0;p<params.length;p++)if(tags[t][0]==params[p])tags[t][0]="";
}
if(tags.length==0)createTiddlyElement(wrap,"span",null,null,this.noTags);
max=0;//Find max num of tags
for(var t=0;t<tags.length;t++)if(tags[t][0].length>0){if(tags[t][1]>max)max=tags[t][1];}
segm=max/4;//divide max into 4 tagCloud sizes

for(t=0;t<tags.length;t++)if(tags[t][0].length>0){
	el=createTiddlyElement(wrap,"span",null,null,null);
	wrap.appendChild(document.createTextNode(" "));
	tg=createTiddlyButton(el,tags[t][0],this.tooltip.format(tags[t]),onClickTag,"tagCloudtag tagCloud"+(Math.round(tags[t][1]/segm)+1));
	tg.setAttribute("tag",tags[t][0]);
	tg.setAttribute("showOpenTag",true);
}
}
}
//}}}
#færdig###færdig###sæt status til færdiggjort######-
#kø###sæt i kø###sæt tiddleren i handlingskøen######-
$igang###er i gang###sæt status til igang (som i: "Jeg er i færd med at gøre det")######-
archived###archive###archive this task######-
/***
|Name|TaggedTemplateTweak|
|Source|http://www.TiddlyTools.com/#TaggedTemplateTweak|
|Documentation|http://www.TiddlyTools.com/#TaggedTemplateTweakInfo|
|Version|1.5.1|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|Story.prototype.chooseTemplateForTiddler()|
|Description|use alternative ViewTemplate/EditTemplate for tiddler's tagged with specific tag values|
This tweak extends story.chooseTemplateForTiddler() so that ''whenever a tiddler is marked with a specific tag value, it can be viewed and/or edited using alternatives to the standard tiddler templates.'' 
!!!!!Documentation
>see [[TaggedTemplateTweakInfo]]
!!!!!Revisions
<<<
2009.01.06 [1.5.1] reversed logic so that title-as-prefix takes precedence over tag-matched prefix
2008.12.18 [1.5.0] added handling for using tiddler //title// as prefix (e.g., {{{SomeTiddlerViewTemplate}}}) 
| please see [[TaggedTemplateTweakInfo]] for previous revision details |
2007.06.11 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.TaggedTemplateTweak= {major: 1, minor: 5, revision: 1, date: new Date(2009,1,6)};

Story.prototype.taggedTemplate_chooseTemplateForTiddler = Story.prototype.chooseTemplateForTiddler
Story.prototype.chooseTemplateForTiddler = function(title,template)
{
	// get default template from core
	var coreTemplate=this.taggedTemplate_chooseTemplateForTiddler.apply(this,arguments);

	// if the tiddler doesn't exist yet, return core result
	var tiddler=store.getTiddler(title); if (!tiddler) return coreTemplate;

	// split core template into theme prefix and template name
	var theme="";
	var template=coreTemplate;
	var parts=template.split(config.textPrimitives.sectionSeparator);
	if (parts[1]) { theme=parts[0]; template=parts[1]; }
	else theme=config.options.txtTheme||""; // fallback if theme is not specified
	theme+=config.textPrimitives.sectionSeparator;

	// look for template whose prefix matches the *title* of this tiddler
	if (!store.getTaggedTiddlers(title).length) { // if tiddler is not a tag
		if (store.getTiddlerText(theme+title+template)) { return theme+title+template; } // theme##TitleTemplate
		if (store.getTiddlerText(title+template)) 	{ return title+template; }	 // TitleTemplate
	}

	// look for template whose prefix matches a *tag* on this tiddler (if any)
	for (i=0; i<tiddler.tags.length; i++) {
		var t=tiddler.tags[i]+template; // add tag prefix to template
		var c=t.substr(0,1).toUpperCase()+t.substr(1); // capitalized for WikiWord title
		if (store.getTiddlerText(theme+t))	{ return theme+t; } // theme##tagTemplate
		if (store.getTiddlerText(theme+c))	{ return theme+c; } // theme##TagTemplate
		if (store.getTiddlerText(t)) 		{ return t; }	    // tagTemplate
		if (store.getTiddlerText(c))		{ return c; }	    // TagTemplate
	}

	// no matching tag OR title prefix... return core result
	return coreTemplate;
}
//}}}
/***
|Name:|TagglyTaggingPlugin|
|Description:|tagglyTagging macro is a replacement for the builtin tagging macro in your ~ViewTemplate|
|Version:|3.1 ($Rev: 4092 $)|
|Date:|$Date: 2008-03-24 12:32:33 +1000 (Mon, 24 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#TagglyTaggingPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Notes
See http://mptw.tiddlyspot.com/#TagglyTagging
***/
//{{{
config.taggly = {

	// for translations
	lingo: {
		labels: {
			asc:        "\u2191", // down arrow
			desc:       "\u2193", // up arrow
			title:      "title",
			modified:   "modified",
			created:    "created",
			show:       "+",
			hide:       "-",
			normal:     "normal",
			group:      "group",
			commas:     "commas",
			sitemap:    "sitemap",
			numCols:    "cols\u00b1", // plus minus sign
			label:      "Tagged as '%0':",
			excerpts:   "excerpts",
			descr:      "descr",
			slices:     "slices",
			contents:   "contents",
			sliders:    "sliders",
			noexcerpts: "title only"
		},

		tooltips: {
			title:    "Click to sort by title",
			modified: "Click to sort by modified date",
			created:  "Click to sort by created date",
			show:     "Click to show tagging list",
			hide:     "Click to hide tagging list",
			normal:   "Click to show a normal ungrouped list",
			group:    "Click to show list grouped by tag",
			sitemap:  "Click to show a sitemap style list",
			commas:   "Click to show a comma separated list",
			numCols:  "Click to change number of columns",
			excerpts: "Click to show excerpts",
			descr:    "Click to show the description slice",
			slices:    "Click to show all slices",
			contents: "Click to show entire tiddler contents",
			sliders:  "Click to show tiddler contents in sliders",
			noexcerpts: "Click to show entire title only"
		}
	},

	config: {
		showTaggingCounts: true,
		listOpts: {
			// the first one will be the default
			sortBy:     ["title","modified","created"],
			sortOrder:  ["asc","desc"],
			hideState:  ["show","hide"],
			listMode:   ["normal","group","sitemap","commas"],
			numCols:    ["1","2","3","4","5","6"],
			excerpts:   ["noexcerpts","excerpts","descr","slices","contents","sliders"]
		},
		valuePrefix: "taggly.",
		excludeTags: ['excludeTagging'],
		excerptSize: 50,
		excerptMarker: "/%"+"%/"
	},

	getTagglyOpt: function(title,opt) {
		var val = store.getValue(title,this.config.valuePrefix+opt);
		return val ? val : this.config.listOpts[opt][0];
	},

	setTagglyOpt: function(title,opt,value) {
		if (!store.tiddlerExists(title))
			// create it silently
			store.saveTiddler(title,title,config.views.editor.defaultText.format([title]),config.options.txtUserName,new Date(),"");
		// if value is default then remove it to save space
		return store.setValue(title,
			this.config.valuePrefix+opt,
			value == this.config.listOpts[opt][0] ? null : value);
	},

	getNextValue: function(title,opt) {
		var current = this.getTagglyOpt(title,opt);
		var pos = this.config.listOpts[opt].indexOf(current);
		// a little usability enhancement. actually it doesn't work right for grouped or sitemap
		var limit = (opt == "numCols" ? store.getTaggedTiddlers(title).length : this.config.listOpts[opt].length);
		var newPos = (pos + 1) % limit;
		return this.config.listOpts[opt][newPos];
	},

	toggleTagglyOpt: function(title,opt) {
		var newVal = this.getNextValue(title,opt);
		this.setTagglyOpt(title,opt,newVal);
	}, 

	createListControl: function(place,title,type) {
		var lingo = config.taggly.lingo;
		var label;
		var tooltip;
		var onclick;

		if ((type == "title" || type == "modified" || type == "created")) {
			// "special" controls. a little tricky. derived from sortOrder and sortBy
			label = lingo.labels[type];
			tooltip = lingo.tooltips[type];

			if (this.getTagglyOpt(title,"sortBy") == type) {
				label += lingo.labels[this.getTagglyOpt(title,"sortOrder")];
				onclick = function() {
					config.taggly.toggleTagglyOpt(title,"sortOrder");
					return false;
				}
			}
			else {
				onclick = function() {
					config.taggly.setTagglyOpt(title,"sortBy",type);
					config.taggly.setTagglyOpt(title,"sortOrder",config.taggly.config.listOpts.sortOrder[0]);
					return false;
				}
			}
		}
		else {
			// "regular" controls, nice and simple
			label = lingo.labels[type == "numCols" ? type : this.getNextValue(title,type)];
			tooltip = lingo.tooltips[type == "numCols" ? type : this.getNextValue(title,type)];
			onclick = function() {
				config.taggly.toggleTagglyOpt(title,type);
				return false;
			}
		}

		// hide button because commas don't have columns
		if (!(this.getTagglyOpt(title,"listMode") == "commas" && type == "numCols"))
			createTiddlyButton(place,label,tooltip,onclick,type == "hideState" ? "hidebutton" : "button");
	},

	makeColumns: function(orig,numCols) {
		var listSize = orig.length;
		var colSize = listSize/numCols;
		var remainder = listSize % numCols;

		var upperColsize = colSize;
		var lowerColsize = colSize;

		if (colSize != Math.floor(colSize)) {
			// it's not an exact fit so..
			upperColsize = Math.floor(colSize) + 1;
			lowerColsize = Math.floor(colSize);
		}

		var output = [];
		var c = 0;
		for (var j=0;j<numCols;j++) {
			var singleCol = [];
			var thisSize = j < remainder ? upperColsize : lowerColsize;
			for (var i=0;i<thisSize;i++) 
				singleCol.push(orig[c++]);
			output.push(singleCol);
		}

		return output;
	},

	drawTable: function(place,columns,theClass) {
		var newTable = createTiddlyElement(place,"table",null,theClass);
		var newTbody = createTiddlyElement(newTable,"tbody");
		var newTr = createTiddlyElement(newTbody,"tr");
		for (var j=0;j<columns.length;j++) {
			var colOutput = "";
			for (var i=0;i<columns[j].length;i++) 
				colOutput += columns[j][i];
			var newTd = createTiddlyElement(newTr,"td",null,"tagglyTagging"); // todo should not need this class
			wikify(colOutput,newTd);
		}
		return newTable;
	},

	createTagglyList: function(place,title) {
		switch(this.getTagglyOpt(title,"listMode")) {
			case "group":  return this.createTagglyListGrouped(place,title); break;
			case "normal": return this.createTagglyListNormal(place,title,false); break;
			case "commas": return this.createTagglyListNormal(place,title,true); break;
			case "sitemap":return this.createTagglyListSiteMap(place,title); break;
		}
	},

	getTaggingCount: function(title) {
		// thanks to Doug Edmunds
		if (this.config.showTaggingCounts) {
			var tagCount = store.getTaggedTiddlers(title).length;
			if (tagCount > 0)
				return " ("+tagCount+")";
		}
		return "";
	},

	getExcerpt: function(inTiddlerTitle,title,indent) {
		if (!indent)
			indent = 1;

		var displayMode = this.getTagglyOpt(inTiddlerTitle,"excerpts");
		var t = store.getTiddler(title);

		if (t && displayMode == "excerpts") {
			var text = t.text.replace(/\n/," ");
			var marker = text.indexOf(this.config.excerptMarker);
			if (marker != -1) {
				return " {{excerpt{<nowiki>" + text.substr(0,marker) + "</nowiki>}}}";
			}
			else if (text.length < this.config.excerptSize) {
				return " {{excerpt{<nowiki>" + t.text + "</nowiki>}}}";
			}
			else {
				return " {{excerpt{<nowiki>" + t.text.substr(0,this.config.excerptSize) + "..." + "</nowiki>}}}";
			}
		}
		else if (t && displayMode == "contents") {
			return "\n{{contents indent"+indent+"{\n" + t.text + "\n}}}";
		}
		else if (t && displayMode == "sliders") {
			return "<slider slide>\n{{contents{\n" + t.text + "\n}}}\n</slider>";
		}
		else if (t && displayMode == "descr") {
			var descr = store.getTiddlerSlice(title,'Description');
			return descr ? " {{excerpt{" + descr  + "}}}" : "";
		}
		else if (t && displayMode == "slices") {
			var result = "";
			var slices = store.calcAllSlices(title);
			for (var s in slices)
				result += "|%0|<nowiki>%1</nowiki>|\n".format([s,slices[s]]);
			return result ? "\n{{excerpt excerptIndent{\n" + result  + "}}}" : "";
		}
		return "";
	},

	notHidden: function(t,inTiddler) {
		if (typeof t == "string") 
			t = store.getTiddler(t);
		return (!t || !t.tags.containsAny(this.config.excludeTags) ||
				(inTiddler && this.config.excludeTags.contains(inTiddler)));
	},

	// this is for normal and commas mode
	createTagglyListNormal: function(place,title,useCommas) {

		var list = store.getTaggedTiddlers(title,this.getTagglyOpt(title,"sortBy"));

		if (this.getTagglyOpt(title,"sortOrder") == "desc")
			list = list.reverse();

		var output = [];
		var first = true;
		for (var i=0;i<list.length;i++) {
			if (this.notHidden(list[i],title)) {
				var countString = this.getTaggingCount(list[i].title);
				var excerpt = this.getExcerpt(title,list[i].title);
				if (useCommas)
					output.push((first ? "" : ", ") + "[[" + list[i].title + "]]" + countString + excerpt);
				else
					output.push("*[[" + list[i].title + "]]" + countString + excerpt + "\n");

				first = false;
			}
		}

		return this.drawTable(place,
			this.makeColumns(output,useCommas ? 1 : parseInt(this.getTagglyOpt(title,"numCols"))),
			useCommas ? "commas" : "normal");
	},

	// this is for the "grouped" mode
	createTagglyListGrouped: function(place,title) {
		var sortBy = this.getTagglyOpt(title,"sortBy");
		var sortOrder = this.getTagglyOpt(title,"sortOrder");

		var list = store.getTaggedTiddlers(title,sortBy);

		if (sortOrder == "desc")
			list = list.reverse();

		var leftOvers = []
		for (var i=0;i<list.length;i++)
			leftOvers.push(list[i].title);

		var allTagsHolder = {};
		for (var i=0;i<list.length;i++) {
			for (var j=0;j<list[i].tags.length;j++) {

				if (list[i].tags[j] != title) { // not this tiddler

					if (this.notHidden(list[i].tags[j],title)) {

						if (!allTagsHolder[list[i].tags[j]])
							allTagsHolder[list[i].tags[j]] = "";

						if (this.notHidden(list[i],title)) {
							allTagsHolder[list[i].tags[j]] += "**[["+list[i].title+"]]"
										+ this.getTaggingCount(list[i].title) + this.getExcerpt(title,list[i].title) + "\n";

							leftOvers.setItem(list[i].title,-1); // remove from leftovers. at the end it will contain the leftovers

						}
					}
				}
			}
		}

		var allTags = [];
		for (var t in allTagsHolder)
			allTags.push(t);

		var sortHelper = function(a,b) {
			if (a == b) return 0;
			if (a < b) return -1;
			return 1;
		};

		allTags.sort(function(a,b) {
			var tidA = store.getTiddler(a);
			var tidB = store.getTiddler(b);
			if (sortBy == "title") return sortHelper(a,b);
			else if (!tidA && !tidB) return 0;
			else if (!tidA) return -1;
			else if (!tidB) return +1;
			else return sortHelper(tidA[sortBy],tidB[sortBy]);
		});

		var leftOverOutput = "";
		for (var i=0;i<leftOvers.length;i++)
			if (this.notHidden(leftOvers[i],title))
				leftOverOutput += "*[["+leftOvers[i]+"]]" + this.getTaggingCount(leftOvers[i]) + this.getExcerpt(title,leftOvers[i]) + "\n";

		var output = [];

		if (sortOrder == "desc")
			allTags.reverse();
		else if (leftOverOutput != "")
			// leftovers first...
			output.push(leftOverOutput);

		for (var i=0;i<allTags.length;i++)
			if (allTagsHolder[allTags[i]] != "")
				output.push("*[["+allTags[i]+"]]" + this.getTaggingCount(allTags[i]) + this.getExcerpt(title,allTags[i]) + "\n" + allTagsHolder[allTags[i]]);

		if (sortOrder == "desc" && leftOverOutput != "")
			// leftovers last...
			output.push(leftOverOutput);

		return this.drawTable(place,
				this.makeColumns(output,parseInt(this.getTagglyOpt(title,"numCols"))),
				"grouped");

	},

	// used to build site map
	treeTraverse: function(title,depth,sortBy,sortOrder) {

		var list = store.getTaggedTiddlers(title,sortBy);
		if (sortOrder == "desc")
			list.reverse();

		var indent = "";
		for (var j=0;j<depth;j++)
			indent += "*"

		var childOutput = "";
		for (var i=0;i<list.length;i++)
			if (list[i].title != title)
				if (this.notHidden(list[i].title,this.config.inTiddler))
					childOutput += this.treeTraverse(list[i].title,depth+1,sortBy,sortOrder);

		if (depth == 0)
			return childOutput;
		else
			return indent + "[["+title+"]]" + this.getTaggingCount(title) + this.getExcerpt(this.config.inTiddler,title,depth) + "\n" + childOutput;
	},

	// this if for the site map mode
	createTagglyListSiteMap: function(place,title) {
		this.config.inTiddler = title; // nasty. should pass it in to traverse probably
		var output = this.treeTraverse(title,0,this.getTagglyOpt(title,"sortBy"),this.getTagglyOpt(title,"sortOrder"));
		return this.drawTable(place,
				this.makeColumns(output.split(/(?=^\*\[)/m),parseInt(this.getTagglyOpt(title,"numCols"))), // regexp magic
				"sitemap"
				);
	},

	macros: {
		tagglyTagging: {
			handler: function (place,macroName,params,wikifier,paramString,tiddler) {
				var refreshContainer = createTiddlyElement(place,"div");
				// do some refresh magic to make it keep the list fresh - thanks Saq
				refreshContainer.setAttribute("refresh","macro");
				refreshContainer.setAttribute("macroName",macroName);
				if (params[0])
					refreshContainer.setAttribute("title",params[0]);
				else {
        			refreshContainer.setAttribute("title",tiddler.title);
				}
				this.refresh(refreshContainer);
			},

			refresh: function(place) {
				var title = place.getAttribute("title");
				removeChildren(place);
				addClass(place,"tagglyTagging");
				if (store.getTaggedTiddlers(title).length > 0) {
					var lingo = config.taggly.lingo;
					config.taggly.createListControl(place,title,"hideState");
					if (config.taggly.getTagglyOpt(title,"hideState") == "show") {
						createTiddlyElement(place,"span",null,"tagglyLabel",lingo.labels.label.format([title]));
						config.taggly.createListControl(place,title,"title");
						config.taggly.createListControl(place,title,"modified");
						config.taggly.createListControl(place,title,"created");
						config.taggly.createListControl(place,title,"listMode");
						config.taggly.createListControl(place,title,"excerpts");
						config.taggly.createListControl(place,title,"numCols");
						config.taggly.createTagglyList(place,title);
					}
				}
			}
		}
	},

	// todo fix these up a bit
	styles: [
"/*{{{*/",
"/* created by TagglyTaggingPlugin */",
".tagglyTagging { padding-top:0.5em; }",
".tagglyTagging li.listTitle { display:none; }",
".tagglyTagging ul {",
"	margin-top:0px; padding-top:0.5em; padding-left:2em;",
"	margin-bottom:0px; padding-bottom:0px;",
"}",
".tagglyTagging { vertical-align: top; margin:0px; padding:0px; }",
".tagglyTagging table { margin:0px; padding:0px; }",
".tagglyTagging .button { visibility:hidden; margin-left:3px; margin-right:3px; }",
".tagglyTagging .button, .tagglyTagging .hidebutton {",
"	color:[[ColorPalette::TertiaryLight]]; font-size:90%;",
"	border:0px; padding-left:0.3em;padding-right:0.3em;",
"}",
".tagglyTagging .button:hover, .hidebutton:hover, ",
".tagglyTagging .button:active, .hidebutton:active  {",
"	border:0px; background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]];",
"}",
".selected .tagglyTagging .button { visibility:visible; }",
".tagglyTagging .hidebutton { color:[[ColorPalette::Background]]; }",
".selected .tagglyTagging .hidebutton { color:[[ColorPalette::TertiaryLight]] }",
".tagglyLabel { color:[[ColorPalette::TertiaryMid]]; font-size:90%; }",
".tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }",
".tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}",
".tagglyTagging ul ul li {margin-left:0.5em; }",
".editLabel { font-size:90%; padding-top:0.5em; }",
".tagglyTagging .commas { padding-left:1.8em; }",
"/* not technically tagglytagging but will put them here anyway */",
".tagglyTagged li.listTitle { display:none; }",
".tagglyTagged li { display: inline; font-size:90%; }",
".tagglyTagged ul { margin:0px; padding:0px; }",
".excerpt { color:[[ColorPalette::TertiaryDark]]; }",
".excerptIndent { margin-left:4em; }",
"div.tagglyTagging table,",
"div.tagglyTagging table tr,",
"td.tagglyTagging",
" {border-style:none!important; }",
".tagglyTagging .contents { border-bottom:2px solid [[ColorPalette::TertiaryPale]]; padding:0 1em 1em 0.5em;",
"  margin-bottom:0.5em; }",
".tagglyTagging .indent1  { margin-left:3em;  }",
".tagglyTagging .indent2  { margin-left:4em;  }",
".tagglyTagging .indent3  { margin-left:5em;  }",
".tagglyTagging .indent4  { margin-left:6em;  }",
".tagglyTagging .indent5  { margin-left:7em;  }",
".tagglyTagging .indent6  { margin-left:8em;  }",
".tagglyTagging .indent7  { margin-left:9em;  }",
".tagglyTagging .indent8  { margin-left:10em; }",
".tagglyTagging .indent9  { margin-left:11em; }",
".tagglyTagging .indent10 { margin-left:12em; }",
"/*}}}*/",
		""].join("\n"),

	init: function() {
		merge(config.macros,this.macros);
		config.shadowTiddlers["TagglyTaggingStyles"] = this.styles;
		store.addNotification("TagglyTaggingStyles",refreshStyles);
	}
};

config.taggly.init();

//}}}

/***
InlineSlidersPlugin
By Saq Imtiaz
http://tw.lewcid.org/sandbox/#InlineSlidersPlugin

// syntax adjusted to not clash with NestedSlidersPlugin
// added + syntax to start open instead of closed

***/
//{{{
config.formatters.unshift( {
	name: "inlinesliders",
	// match: "\\+\\+\\+\\+|\\<slider",
	match: "\\<slider",
	// lookaheadRegExp: /(?:\+\+\+\+|<slider) (.*?)(?:>?)\n((?:.|\n)*?)\n(?:====|<\/slider>)/mg,
	lookaheadRegExp: /(?:<slider)(\+?) (.*?)(?:>)\n((?:.|\n)*?)\n(?:<\/slider>)/mg,
	handler: function(w) {
		this.lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart ) {
			var btn = createTiddlyButton(w.output,lookaheadMatch[2] + " "+"\u00BB",lookaheadMatch[2],this.onClickSlider,"button sliderButton");
			var panel = createTiddlyElement(w.output,"div",null,"sliderPanel");
			panel.style.display = (lookaheadMatch[1] == '+' ? "block" : "none");
			wikify(lookaheadMatch[3],panel);
			w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
		}
   },
   onClickSlider : function(e) {
		if(!e) var e = window.event;
		var n = this.nextSibling;
		n.style.display = (n.style.display=="none") ? "block" : "none";
		return false;
	}
});

//}}}
ScopeDefinitions
UserDefinitions
PriorityDefinitions
StatusDefinitions
|[[Tidsramme|ScopeDefinitions]] |<<ValueSwitcher type:"dropdown" valuesSource:"ScopeDefinitions">> |
|[[priorititet|PriorityDefinitions]] |<<ValueSwitcher type:"dropdown" valuesSource:"PriorityDefinitions">> |
|[[Hvem|UserDefinitions]] |<<ValueSwitcher type:"dropdown" valuesSource:"UserDefinitions">> |
|[[status|StatusDefinitions]] |<<ValueSwitcher type:"dropdown" valuesSource:"StatusDefinitions">> |
|[[fag|Alle fag]] |<<ValueSwitcher type:"freetext" metaDataName:"alias">> |
/***
|Name|TaskTimerPluginDaModmåns|
|Source|http://www.TiddlyTools.com/#TaskTimerPlugin|
|Documentation|http://www.TiddlyTools.com/#TaskTimerPluginInfo|
|Version|1.4.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|'timer' button automatically writes start/end/elapsed time into tiddler content|
Quickly generate 'timed task' logs that can be used for status reports, billing purposes, etc.  
!!!!!Documentation
> see [[TaskTimerPluginInfo]]
!!!!!Configuration
> see [[TaskTimerPluginConfig]]
!!!!!Revisions
<<<
2008.11.10 [1.4.1] in elapsed time calculation, truncate start/stop times to nearest second (avoids 1-second 'round-down' error)
|please see [[TaskTimerPluginInfo]] for additional revision details|
2007.03.14 [0.5.0] converted from inline script
<<<
!!!!!Code
***/
//{{{
version.extensions.TaskTimerPlugin= {major: 1, minor:4, revision: 1, date: new Date(2008,11,10)};

config.macros.taskTimer = {
	label: "start timer",
	title: "tryk her for at starte opgave timeren",
	format: "|%4|%0|%1|%2|%3|\\n", // note: double-backslash-en, also date is %4 (for backward compatibility)
	defText: " ", // default description text
	todayKeyword: "today",
	todayFormat: "0MM/0DD/YYYY", // default format - superceded by CalendarPlugin, DatePlugin, or DatePluginConfig
	datestampFormat: "YYYY-0MM-0DD", // date stamp format
	buttonFormat: "%0 - %2",  // timer button formats: %0=current time, %1=start time, %2=elapsed time
	defHeader: "|//Date//|//Description//|//Started//|//Stopped//|//Elapsed//|\n",
	defTarget: "ActivityReport",
	descrMsg: "Enter a short description for this activity.  Press [cancel] to continue timer.",
	askMsg: "Enter the title of a tiddler in which to record this activity.  Press [cancel] to continue timer.",
	errMsg: "'%0' is not a valid tiddler title.  Please try again...\n\n",
	createdMsg: "'%0' has been created",
	updatedMsg: "'%0' has been updated",
	marker: "/%"+"tasktimer"+"%/",
	tag: "task",
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var target=params.shift(); // get optional target tiddler title
		if (!target) target="";
		var format=this.format; if (params[0]) format=params.shift(); // get optional output format
		var descrMsg=this.descrMsg; if (params[0]) descrMsg=params.shift(); // get optional message text
		var defText=this.defText; if (params[0]) defText=params.shift(); // get optional default text
		var onclick="config.macros.taskTimer.toggle(this,'"+target+"','"+format+"','"+descrMsg+"','"+defText+"')";
		createTiddlyElement(place,"span").innerHTML =
			'<input type="button" value="start timer" title="'+this.title+'" onclick="'+onclick+'">';
	},
	toggle: function(here,target,format,msg,defText) {
		if (!target || !target.length || target=="here") {
			var  tid=story.findContainingTiddler(here);
			target=tid?tid.getAttribute("tiddler"):"ask";
		}
		if (!here.running) { // not running... start timer...
			here.startTime=new Date();
			var now=here.startTime.formatString("0hh:0mm:0ss");
			here.title=(here.target||target)+" - started at "+now;
			here.value=this.buttonFormat.format([now,now,"00:00:00"]);
			here.id=new Date().getTime()+Math.random().toString(); // unique ID
			here.ticker=setTimeout("config.macros.taskTimer.tick('"+here.id+"')",500);
			here.running=true;
		} else {
			if (target=="ask") {
				target=prompt(this.askMsg,here.target||this.defTarget);
				while (target && !target.trim().length)
					target=prompt(this.errMsg.format([target])+this.askMsg,here.target||this.defTarget);
				if (!target) return; // user cancelled input...  continue timer
			}
			var txt=prompt(msg,defText); // get description from user
			if (!txt) return; // user cancelled input...  continue timer
			if (target==this.todayKeyword || target.substr(0,this.todayKeyword.length+1)==this.todayKeyword+":")
				target=(new Date()).formatString(this.getJournalFormat(target));
			here=document.getElementById(here.id); // RE-get button element after timer has stopped...
			clearTimeout(here.ticker);
			here.target=target;
			var before=this.defHeader;
			var after=this.marker+"\n";
			var tiddler=store.getTiddler(here.target);
			if (tiddler && tiddler.text.length) {
				var pos=tiddler.text.indexOf(this.marker);
				if (pos==-1) pos=tiddler.text.length; // no marker, append content to end
				var before=tiddler.text.substr(0,pos); // everything up to marker
				if (before.length&&before.substr(before.length-1)!="\n") before+="\n"; // start on a new line
				var after=tiddler.text.substr(pos); // marker+everything else
			}
			var now=new Date(Math.floor(new Date()/1000)*1000);
			var then=new Date(Math.floor(here.startTime/1000)*1000);
			var diff=new Date(now-then);
			var s=diff.getUTCSeconds(); if (s<10) s="0"+s;
			var m=diff.getUTCMinutes(); if (m<10) m="0"+m;
			var h=diff.getUTCHours(); if (h<10) h="0"+h;
			var start=then.formatString("0hh:0mm:0ss");
			var stop=now.formatString("0hh:0mm:0ss");
			var elapsed=h+":"+m+":"+s;
			var dateStamp=now.formatString(config.macros.taskTimer.datestampFormat);
			var newtxt=before+format.format([txt,start,stop,elapsed,dateStamp])+after;
			var newtags=(tiddler?tiddler.tags:['task']); // include 'task' tag when creating new tiddlers
			store.saveTiddler(here.target,here.target,newtxt,config.options.txtUserName,new Date(),newtags,tiddler?tiddler.fields:null);
			if (!tiddler) displayMessage(this.createdMsg.format([here.target]));
			else displayMessage(this.updatedMsg.format([here.target]));
			here.running=false;
			here.value=this.label;
			here.title=this.title;
			var  tid=story.findContainingTiddler(here);
			if (!tid || tid.getAttribute("tiddler")!=target) // display target tiddler, but only when button is not IN the target tiddler
				{ story.displayTiddler(story.findContainingTiddler(here),here.target); story.refreshTiddler(here.target,1,true); }
		}
	},
	tick: function(id) {
		var here=document.getElementById(id); if (!here) return;
		var now=new Date();
		var diff=new Date(now-here.startTime);
		var s=diff.getUTCSeconds(); if (s<10) s="0"+s;
		var m=diff.getUTCMinutes();  if (m<10) m="0"+m;
		var h=diff.getUTCHours();  if (h<10) h="0"+h;
		var elapsed=h+":"+m+":"+s;
		now=now.formatString("0hh:0mm:0ss");
		var start=here.startTime.formatString("0hh:0mm:0ss");
		here.value=this.buttonFormat.format([now,start,elapsed]);
		here.ticker=setTimeout("config.macros.taskTimer.tick('"+id+"')",500);
	},
	getJournalFormat: function(target) {
		var fmt=target.split(":"); fmt.shift(); fmt=fmt.join(":");
		if (!fmt || !fmt.length) { // if date format was not specified
			if (config.macros.date)  // if installed, use default from DatePlugin
				fmt=config.macros.date.linkformat;
			if (config.macros.calendar) { // if installed, use default from CalendarPlugin
				if (!config.macros.date) // hard-coded calendar fallback if no DatePlugin
					fmt=config.macros.calendar.tiddlerformat;
				else // journalDateFmt is set when calendar is rendered with DatePlugin
					fmt=config.macros.calendar.journalDateFmt;
			}
		}
		if (!fmt) { // if not specified and no DatePlugin/CalendarPlugin
			// get format from <<newJournal>> in SideBarOptions
			var text = store.getTiddlerText("SideBarOptions");
			var re=new RegExp("<<(?:newJournal)([^>]*)>>","mg"); var fm=re.exec(text);
			if (fm && fm[1]!=null) { var pa=fm[1].readMacroParams(); if (pa[0]) fmt = pa[0]; }
		}
		if (!fmt) var fmt=this.todayFormat; // no "newJournal"... final fallback.
		return fmt;
	}
}
//}}}
/***
|Name|TaskTimerPluginConfig|
|Source|http://www.TiddlyTools.com/#TaskTimerPluginConfig|
|Documentation|http://www.TiddlyTools.com/#TaskTimerPluginInfo|
|Version|1.3.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|formats other optional settings for TaskTimerPlugin|
***/
//{{{
// default target tiddler title (when 'ask' option is used)
config.macros.taskTimer.defTarget="AktivitetsRapport";

// table heading (when creating **new** target tiddlers only)
config.macros.taskTimer.defHeader="|sortable|k\n|//Dato//|//Beskrivelse//|//Startet//|//Stoppet//|//Varighed//|h\n";

// note: double-backslash-en, also datestamp is %4 (for backward compatibility)
config.macros.taskTimer.format="|%4|%0|%1|%2|%3|\\n";

// date stamp format (used with %4, above)
config.macros.taskTimer.datestampFormat="YYYY-0MM-0DD";

// default description text - note: do not use empty string (e.g., "")
config.macros.taskTimer.defText=" ";

// format for target tiddler title (when "today" option is used)
// otherwise, value is superceded by CalendarPlugin, DatePlugin, DatePluginConfig,
// or format from <<newJournal>> macro embedded in SideBarOptions
config.macros.taskTimer.todayFormat="0MM/0DD/YYYY";

// marker for locating 'insertion point' in target tiddler
config.macros.taskTimer.marker="|<<taskTimer here>>||| tid brugt ialt:|<<columncalc sum 1 -1>>|"; //

// default tag (when creating **new** target tiddlers only)
config.macros.taskTimer.tag="arbejdstid";
//}}}
[[Simpel oversigt|DefaultReportView]]
[[mere...|Prioritet og status]]
[[(info)|CreatingTaskReportViews]]
<<tag kalender>>

/***
|''Name:''|TeamTasksSkin |
|''Description:''|The basic TeamTasks theme |
|''Author:''|Phil Hawksworth - ph [at] osmosoft [dot] com |
|''~CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/PhilHawksworth/verticals/TeamTasks/teamtasks/TeamTasksSkin.tiddler |
|''Version:''|0.4|
|''Date:''|March 28th, 2008|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[BSD License|http://www.opensource.org/licenses/bsd-license.php]] |
|''~CoreVersion:''|2.4.0|
|''~PageTemplate:''|##PageTemplate|
|''~EditTemplate:''|##EditTemplate|
|''~taskViewTemplate:''|##taskViewTemplate|
|''~taskEditTemplate:''|##taskEditTemplate|
|''~StyleSheet:''|##StyleSheet|
***/

!PageTemplate
<!--{{{-->
<div id='messageBar'><span id='messageArea'></span></div>
<div class='header'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div id='topMenu' refresh='content' tiddler='TopMenu'></div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sideBar' refresh='content' tiddler='SideBar'></div>
<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>
<div id='displayArea'>
	<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->


!EditTemplate
<!--{{{-->
<div class="editor">
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title edit' macro='edit 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='tagged edit' macro='edit tags'></div>
<div macro='tiddler QuickEditToolbar'></div>
<div class='viewer edit' macro='edit text'></div>
<div class='tagClear'></div>
</div>
<!--}}}-->


!lektieViewTemplate
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::TaskViewToolbar]]'></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='task'>
	<table>
	<tr>
                 <td class='taskbody'><div class='viewer' macro='view text wikified'></div><div class='reminder' macro='newReminder'></div><br /></td>
		<td class='taskControls'><div class='taskControls' macro='tiddler TaskTiddlerControls'></td>
	</tr>
	</table>
</div>
<div class='tagClear'></div>
<!--}}}-->

!lektieEditTemplate
<!--{{{-->
<div class="editor">
<div class='toolbar' macro='toolbar [[ToolbarCommands::TaskEditToolbar]]'></div>
<div class='title edit' macro='edit 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 edit' macro='tags'></div>
<div class='task'>
	<table>
	<tr>
                <td class='quickedit'><div macro='tiddler QuickEditToolbar'></div></td>
		<td class='taskbody'><div class='viewer edit' macro='edit text wikified'></div></div></td>
		<td class='taskControls'><div class='taskControls' macro='tiddler TaskTiddlerControls'></td>
	</tr>
	</table>
</div>
<div class='tagClear'></div>
</div>
<!--}}}-->


!StyleSheet
/*{{{*/
[[StyleSheetTiddlersBar]]
[[StyleSheetShortcuts]]
body { color:[[TeamTasksColors::Darkest]];}
a:hover {color:[[TeamTasksColors::Accent]]; background-color:[[TeamTasksColors::LinkHover]];}
h1,h2,h3,h4,h5,h6 {color:[[TeamTasksColors::Accent]];}
/* Link textcolor */
.greenLink a, .greenLink .button, .greenLink .tiddlyLinkExisting
{ color:#390 !important; font-weight:bold !important;background-color:#fff; }
.greenLink .tiddlyLinkExisting:hover, .greenLink a:hover, .greenLink .button:hover,
{ border:1px solid #69c !important; background:#006 !important; color:#fff !important; }
/* Page Framework */
body {background-color:[[TeamTasksColors::Background]]; border-top:3px solid [[TeamTasksColors::Accent]]; }
#displayArea { display: inline-block; /* IE bugfix: give layout (hasLayout = true) */ }
#displayArea { display: block; /* restore proper behavior (see IE bugfix above) */ overflow: hidden; margin: 20px 0 0 0; padding:0; border-style:none;}
#tiddlerDisplay { margin:0 10px 20px 0; padding:0;  border:none;}
#sidebar {display:none;}
#messageArea { position:inherit;  margin:0 20px 1em 10px; padding:6px; border-style:none; }

/* message bar */
#messageBar {display:block; position:relative; width:100%; margin:0; background-color:[[TeamTasksColors::LightShade]]; height:1.6em; font-size:11px;  border-top:solid 1px [[TeamTasksColors::TiddlerBackground]];}
#messageArea { position:absolute; top:0; left:0; padding:0; margin:0; border-style:none; background-color:transparent;} 
#messageArea div { margin-left:20px; padding:3px 0 0 0;}
#messageArea div.messageToolbar { position:absolute; top:0; right:0; padding:0; margin:0;}
#messageArea a { color:[[TeamTasksColors::Dark]]; text-decoration:none; }
#messageArea a:hover { color:[[TeamTasksColors::Secondary]]; text-decoration:none; }
#messageArea .button { float:right; background-color:[[TeamTasksColors::Shade]]; color:[[TeamTasksColors::TiddlerBackground]]; margin:0 0 0 1em; padding:3px 6px; }
#messageArea .button:hover {background-color:[[TeamTasksColors::Dark]]; color:[[TeamTasksColors::TiddlerBackground]];}


/* Header */
div.header,
div.headerShadow { margin:0; padding:0; top:auto;}
div.header {height:5em; background-color:[[TeamTasksColors::Background]]; position:relative;}
div.headerShadow {position:absolute; left:20px; bottom:0; height:auto;}
div.headerShadow span.siteTitle {color::[[TeamTasksColors::Darkest]]; font-size:3em; line-height:1em; letter-spacing:-2px;}
div.headerShadow span.siteSubtitle {color:[[TeamTasksColors::Dark]]; white-space:nowrap; font-size:1em;}
div.header #topMenu { position:absolute; right:20px; bottom:0;}

/* Backstage */
#backstageArea,
#backstageToolbar { background-color:[[TeamTasksColors::TiddlerBackground]]; padding-top:0;}
#backstageToolbar a.backstageTab { background-color:transparent; color:[[TeamTasksColors::Dark]]; font-weight:normal;line-height:1.5em; }
#backstageToolbar a.backstageTab:hover { background-color:[[TeamTasksColors::Accent]]; color:[[TeamTasksColors::TiddlerBackground]];  }

/* Popup */
#popup {background-color:[[TeamTasksColors::Darkest]]; border:1px solid [[TeamTasksColors::Shade]]; border-bottom:2px solid [[TeamTasksColors::Shade]];}
#popup li a { color:[[TeamTasksColors::Accent]];}
#popup li a:hover {background-color:[[TeamTasksColors::Accent]]; color:[[TeamTasksColors::TiddlerBackground]];}
#popup li.listBreak div{ border-bottom:solid 1px [[TeamTasksColors::Darker]];}

/* Top Menu*/
#topMenu a.button { border-style:none; background-color:[[TeamTasksColors::Background]]; padding:0.3em 1em; margin:0 0 0 1px; color:[[TeamTasksColors::Accent]]; display:block; float: right;}
#topMenu a.button:hover,
#mainMenu a:hover  { border-style:none; background-color:[[TeamTasksColors::Darkest]]; color:[[TeamTasksColors::Accent]];}
#topMenu a.button:active,
#mainMenu a:active  { border-style:none; background-color:[[TeamTasksColors::Accent]]; color:[[TeamTasksColors::Background]];}

/* MainMenu */
#mainMenu { position: static; float: left; width:18em; padding: 20px 0 10px 20px; margin:0;}
#mainMenu br { display:none; }
#mainMenu a { display:block; font-size:0.94em; text-align:left; margin:0 0 1px 0; border-style:none; background-color:[[TeamTasksColors::Shade]]; padding:0.3em 1em; color:[[TeamTasksColors::Darkest]];  }
#mainMenu div {  width:auto; }
#mainMenu div a {display:block;  font-size:0.9em; text-align:right; margin:0 0 1px 0; background-color:[[TeamTasksColors::LightShade]];}
#mainMenu span.search { padding:6px 6px 6px 0px; margin-bottom:10px; display:block; background-color:[[TeamTasksColors::Darkest]]; text-align:left;}
#mainMenu span.search .searchField { padding:2px 6px; border:solid 1px [[TeamTasksColors::DarkShade]]; border-top-color:[[TeamTasksColors::Dark]];  border-bottom-color:[[TeamTasksColors::TiddlerBackground]]; background-color:[[TeamTasksColors::Background]]; }
#mainMenu span.search a.searchButton { display:inline; color:[[TeamTasksColors::Accent]]; background-color:[[TeamTasksColors::Darkest]];}
#mainMenu span.search a.searchButton:hover { color:[[TeamTasksColors::TiddlerBackground]]; }

/* MetaData section */
#mainMenu div.meta { font-size:0.9em; line-height:1.1em;}
#mainMenu div.meta span { display: block; width:20em; text-align:right;}
#mainMenu div.meta a {color:[[TeamTasksColors::DarkestShade]]; background-color:[[TeamTasksColors::LinkHover]]; margin:1.4em 1em 0.2em 3em; padding:0;}
#mainMenu div.meta a:hover {color:[[TeamTasksColors::Accent]]; background-color:[[TeamTasksColors::LinkHover]];}

/* Vanilla Tiddlers */
.tiddler { background-color:[[TeamTasksColors::TiddlerBackground]]; margin:0 1em 2em 1em; padding:0 0 1em 0; border-bottom:1px solid[[TeamTasksColors::DarkShade]]; 	}

.tiddler div.toolbar { margin:0; padding:0; height:2em; visibility:hidden;}
.tiddler div.toolbar a.button:first-child {  border-left:1px solid [[TeamTasksColors::LightShade]];}
.tiddler div.toolbar a.button { background-color:[[TeamTasksColors::TiddlerBackground]]; padding:4px 1em 4px 1em; border-style:none; border-left:1px solid [[TeamTasksColors::LightShade]]; border-bottom:1px solid [[TeamTasksColors::LightShade]];  border-top:3px solid [[TeamTasksColors::Background]]; line-height:2.3em;}
.tiddler div.toolbar a.button:hover { background-color:[[TeamTasksColors::LightestShade]]; border-bottom-color:[[TeamTasksColors::DarkShade]]; color:[[TeamTasksColors::Darkest]];}
.tiddler div.toolbar a.button:active { background-color:[[TeamTasksColors::Accent]]; border-bottom-color:[[TeamTasksColors::Accent]]; color:[[TeamTasksColors::TiddlerBackground]];}

.tiddler div.title { color:[[TeamTasksColors::Accent]]; margin:4px 20px 3px 20px;}
.tiddler div.subtitle,
.tiddler div.tagged,
.tiddler div.tagging { float:none; border-style:none; background-color:[[TeamTasksColors::TiddlerBackground]]; margin:3px 20px 0 20px; padding:0; font:italic 0.95em/1em "Lucida Sans","Lucida Grande",Verdana,"Bitstream Vera Sans",Arial,sans-serif; color:[[TeamTasksColors::DarkShade]];}
.tiddler div.tagged ul,
.tiddler div.tagging ul {margin:0; padding:0;}
.tiddler div.tagged li,
.tiddler div.tagging li {display:inline; margin:0 0.4em 0 0; color:[[TeamTasksColors::DarkShade]]; }
.tiddler div.tagged li.listTitle,
.tiddler div.tagging li.listTitle {margin:0 0.1em 0 0; }
.tiddler div.tagged a.button,
.tiddler div.tagging a.button {padding:0;}
.tiddler div.subtitle a,
.tiddler div.tagged a,
.tiddler div.tagging a {color:[[TeamTasksColors::DarkestShade]]; font-weight:normal; white-space:nowrap; border-bottom:solid 1px [[TeamTasksColors::Background]];}
.tiddler div.subtitle a:hover,
.tiddler div.tagged a:hover,
.tiddler div.tagging a:hover {color:[[TeamTasksColors::Accent]]; background-color:[[TeamTasksColors::LinkHover]];  border-bottom-color:[[TeamTasksColors::Accent]];}
.tiddler div.viewer { clear:left; margin:10px 20px; border-top:solid 1px [[TeamTasksColors::Background]];}

.viewer pre {background-color:[[TeamTasksColors::Background]]; color:[[TeamTasksColors::Darker]]; border:solid 1px [[TeamTasksColors::DarkShade]]; padding:1em 2em;}
.selected div.toolbar { visibility:visible;}

/* Task Tiddlers */
.tiddler div.task { clear:left; margin:10px 20px; border-top:solid 0px [[TeamTasksColors::Background]];}
.tiddler div.task table { width:100%; margin:0; padding:0; }
.tiddler div.task table * { vertical-align:top; }
.tiddler div.task table td.taskbody { width:100%; }
.tiddler div.task table td.taskControls { width:auto; }
.tiddler div.task div.viewer { display:block; padding:1em; margin:10px 0; border:solid 1px [[TeamTasksColors::TaskBorder]]; background-color:[[TeamTasksColors::TaskBackground]]; font:italic 1.1em/1.5em "Lucida Sans","Lucida Grande",Verdana,"Bitstream Vera Sans",Arial,sans-serif; }
.tiddler div.task div.taskControls { float:right; white-space:nowrap; margin:0 0 0 10px;}
.tiddler div.task div.taskControls table { border-style:none; margin: 10px 0;}
.tiddler div.task div.taskControls table tr { border-style:none;}
.tiddler div.task div.taskControls table tr td { border-style:none;}
.tiddler div.task div.taskControls select {width: 150px; font-size:0.9em;}
.tiddler div.task div.dependencies { padding:1em; background-color:[[TeamTasksColors::LightestShade]]; border:solid 1px [[TeamTasksColors::LightShade]]; border-top-color:[[TeamTasksColors::DarkShade]];}
.tiddler div.task .label {font-size:0.9em; color:[[TeamTasksColors::DarkestShade]]; margin-bottom:0.4em;}

/* tiddler Edit mode  */

.tiddler .edit { padding:4px; background-color:[[TeamTasksColors::TiddlerBackground]]; border:solid 1px [[TeamTasksColors::LightShade]]; border-top-color:[[TeamTasksColors::DarkShade]];}
.tiddler .edit * { background-color:[[TeamTasksColors::TiddlerBackground]]; border-style:none; }
.tiddler div.editor div.title { color:[[TeamTasksColors::Dark]]; margin:10px 20px 10px 20px;}
.tiddler div.editor div.viewer {  padding: none; background-color:[[TeamTasksColors::TiddlerBackground]];}
.tiddler div.editor textarea {font-size:0.9em; width:100%; }



/* New User Wizard */ 
#createTeamTaskUserForm { background-color:#f0f0f0; padding:1em; border:solid 1px #ccc;}
#createTeamTaskUserForm label { margin-bottom:10px; display:block; clear:left; font-size:0.9em;}
#createTeamTaskUserForm label input {float:left; border:1px solid #ddd; border-top:1px solid #999; padding:2px 4px; font-size:1em; width:30em;}

/* TT Report Views */
table.sortable { margin:0.5em 0; border-style:none; }
table.sortable tr {border-left-width:0; border-right-width:0;}
table.sortable * td {border-top:solid 1px [[TeamTasksColors::LightShade]]; border-bottom:solid 1px [[TeamTasksColors::LightShade]]; border-left-width:0; border-right-width:0;}
table.sortable thead tr td { background-color: [[TeamTasksColors::LightestShade]]; color:[[TeamTasksColors::Darkest]];}

/*TABS - see also stylesheettiddlersbar*/
.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 {background:white; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}
#tiddlerDisplay {padding: .5em;}
#tiddlerDisplay .tabContents {padding: 2em;}

/* TAB COLOR FIX */
.tabUnselected {color:#777777;}

.applyNow a, .applyNow .button, .applyNow .tiddlyLinkExisting
	{ color:#390 !important; font-weight:bold !important; font-size:150%;
		border:1px solid #999;  -moz-border-radius:.4em;
		padding:.2em .3em; background-color:#fff; }
.applyNow .tiddlyLinkExisting:hover, .applyNow a:hover, .applyNow .button:hover,
	{ border:1px solid #69c !important; background:#006 !important; color:#fff !important; }
.bubble a, .bubble .button, .bubble .tiddlyLinkExisting
	{ border:1px solid #999;  -moz-border-radius:.4em;
		padding:.1em .2em; background-color:#fff; }
.bubble .tiddlyLinkExisting:hover, .bubble a:hover, .bubble .button:hover,
	{ border:1px solid #69c !important; background:#006 !important; color:#fff !important; }

.formSignature input
	{ width:60%; font-size:90%; }
/*}}}*/
[[danskDitNavn-19/1-10 uge 3 kl. 0.6.43]]
This schedule has be setup to display 10 hours of a day, starting at 8:00AM for the next 7 days.  The first row is always the current day with a 'shadow' moving across the day.

<<schedule view:timetable hourFrom:8 span:10 shadow:on duration:7>>
/%
|''Name:''|TidTweets|
|''Description''|get tweets for users or search terms|
|''Version:''|1.0|
|''Type''|transclusion|
|''Author:''|[[TobiasBeer]]|
|''Info:''|http://tbGTD.tiddlyspot.com/#TidTweets [[TidTweetsInfo]]|
|''Source:''|http://tbGTD.tiddlyspot.com/#TidTweets [[TidTweets]]|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Inspired by:''|[[TwitterTabs|http://www.tiddlytools.com/#TwitterTabs]]|
NOTE: ONLY WORKS IN FIREFOX FOR NOW!

!users
tiddlywiki
tiddlytools
jermolene
tobibeer
maans
!format
{{tweet{[<img[%1 on twitter|%0][http://twitter.com/%1]][[%1|http://twitter.com/%1]] (posted %3)
%2}}}
!tweet
<html><iframe src="http://www.twittergadget.com/gadget.asp"></iframe></html>
!form
<html><nowiki><form>
  <select name="drop" class="button" style="padding-right:0;min-width:20%;" title="select your search method or a predefined user" onchange="
    if (this.selectedIndex<2)return;
    this.form.search.value=this.value;
    window.getTweets(this.value,true);
  ">$2</select>
  <input name="search" type="text" value="$1" title="enter your search term, select user or search in the dropdownbox to your left" class="button" style="padding:1px 2px;">
  <input type='button' value='get tweets' class="button" title="click here to get the tweets or update your current selection" onclick="
    window.getTweets(this.form.search.value,this.form.drop.selectedIndex>0);  
"><a class="button" href="javascript:story.displayTiddler(null,'tweet');" title="go post some tweets" style="padding:2px 5px;margin:0 5px;float:right;">go tweet</a></form><div id="tweetResults"></div></html><<tiddler {{
  setStylesheet("#tweetResults{margin-top:5px;}#tweetResults img {border:1px solid #CCC;-moz-border-radius:3px; -webkit-border-radius:3px;width:48px;margin:0 15px 25px 0;}.tweet {display:block;clear:both;padding:10px 5px;min-height:50px;display:block;}.tweet:hover{background:#EEF;}","tweetStyles");
  if (window.getTweets==undefined) {
    window.lastTweet={time:new Date(),text:''};
    window.getTweets=function(search,user){
      var where=document.getElementById('tweetResults');
      var last=window.lastTweet;
      var now=new Date();
      if((last.text==search&&now-last.time<10000)||where==undefined) return;
      last.text=search;
      last.time=now;
      removeChildren(where);
      var out='<<tiddler TidTweets##results with: \''+search+'\' \''+user+'\'>\>';
      wikify(out,where);
      return false;
    }
  };
  window.getTweets('$1',true);'';}}>>
!results
<<tiddler TidTweets##callback>><<tiddler {{
	place=document.getElementById('tweetResults');
	place.innerHTML='connecting to twitter.com...';
	var s=document.createElement("script");
	s.src='$2'=='$'+'2'||'$2'=='true'?'http://twitter.com/statuses/user_timeline/$1.json?callback=digestTwitterJSON':'http://search.twitter.com/search.json?q=$1&rpp=25&callback=digestTwitterJSON';
	document.body.appendChild(s);document.body.removeChild(s);
  '';}}>>
!callback
<<tiddler {{
window.digestTwitterJSON=function(data){//returned twitter.com
  var where=document.getElementById('tweetResults');
  if (where==undefined) return;
	var fmt=store.getTiddlerText('TidTweets##format');
	var search=data.results; 
	if (search) data=data.results; // for SEARCH results
	removeChildren(where);
	for (var i=0; i<data.length; i++) {
		var item=data[i];
		var img=item.user? item.user.profile_image_url : item.profile_image_url;
		var who=item.user? item.user.screen_name : item.from_user;
		var f='pppp'; //MPTW pretty format ...otherwise use... 'mmm. DD YYYY hh:mm'
		var date=new Date(item.created_at).formatString(f);
		wikify(fmt.format([img,who,item.text,date]),where);
	}
}
'';}}>>
!end%/<<tiddler TidTweets##form with:
  {{'$1'=='$'+'1'?'tiddlywiki':'$1';}}
  {{
    var out='<option value=\'search\'>search twitter...<option value=\'user\'>twitter user...';
    var users=store.getTiddlerText('TidTweets##users').split('\n');
    for(var i=0;i<users.length;i++) out+='<option value=\''+users[i]+'\'>'+users[i]+'\n';
    out;
  }}
>>
/***
|''Name:''|TiddlerListMacro|
|''Version:''|2.3 (8-Jan-2008)|
|''Source''|http://jackparke.googlepages.com/jtw.html#TiddlerListMacro ([[del.icio.us|http://del.icio.us/post?url=http://jackparke.googlepages.com/jtw.html%23TiddlerListMacro]])|
|''Author:''|[[Jack]]|
|''Type:''|Macro|
|''Documentation:''|http://jackparke.googlepages.com/jtw.html#TiddlerListMacroDoc|
!Usage
{{{<<tiddlerList parameter1:"value1" parameter2:"value2" ...>>}}}
See TiddlerListMacroDocumentation and TiddlerListMacroExamples
!Code
***/
//{{{
version.extensions.tiddlerList = {major: 2, minor: 3, revision: 0, date: new Date("Jan 08, 2008")};
// template = [header, item, separator, group, footer]
config.macros.tiddlerList={
 formats : {list:true, nlist:true, span:true, stack:true, csv:true, table:true},
 templates : {
 list : [ "%0\n", "* %0\n", "", "%group\n", "%0\n"],
 nlist : [ "%0", "# %0\n", "", "%group\n", "%0\n"],
 span : [ "%0", "%0", " ", "%group", "%0"],
 stack : [ "%0", "%0", "\n", "%group", "%0"],
 csv : [ "%0", "%0", ", ", "%0", "%0\n"],
 table : ["|!%0|\n", "|%0|\n", "", "|%group|\n", "|%0|\n"]
 },
 dateFormat : "DD MMM YYYY"
}

if (typeof gCurrentTiddler == 'undefined')
 var gCurrentTiddler;

config.macros.tiddlerList.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
 // Some globals
 var count=0, groupCount=0, theGroup="", lastGroup="", firstInGroup = false;
 var currentTiddler = tiddler;
 gCurrentTiddler = tiddler;
 var listWikiText="";
 var formats = this.formats;
 
 // SQL-Like parameters
 var parameters = paramString.parseParams("name",null,true);
 var pTags = parameters[0]["tags"]?parameters[0]["tags"][0].split(','):[];
 var pOrder = parameters[0]["order"]?parameters[0]["order"][0]:"title";
 var pTop = parameters[0]["top"]?parameters[0]["top"][0]:-1;
 var pText = parameters[0]["text"]?parameters[0]["text"][0]:"";
 var pTitle = parameters[0]["title"]?parameters[0]["title"][0]:"";
 var pSearch = parameters[0]["search"]?parameters[0]["search"][0]:"";
 var pFilter = parameters[0]["filter"]?parameters[0]["filter"][0]:"";
 var pHeader = parameters[0]["header"]?paramFormat(parameters[0]["header"][0]):"";
 var pFooter = parameters[0]["footer"]?paramFormat(parameters[0]["footer"][0]):"";
 var pGroup = parameters[0]["group"]?parameters[0]["group"][0]:"";
 var pDateFormat = parameters[0]["dateFormat"]?parameters[0]["dateFormat"][0]:this.dateFormat;
 var pCustomParameter = parameters[0]["customParameter"]?parameters[0]["customParameter"][0]:"";
 var pFormat = parameters[0]["format"]?parameters[0]["format"][0]:"list";
 pFormat = formats[pFormat]?pFormat:"list"
 
 // Separator
 var pSeparator = parameters[0]["separator"]?paramFormat(parameters[0]["separator"][0]):(parameters[0]["seperator"]?paramFormat(parameters[0]["seperator"][0]):this.templates[pFormat][2])

 // Template for group
 var pGroupTemplate = this.templates[pFormat][3];
 if (parameters[0]["groupTemplate"])
 pGroupTemplate = paramFormat(parameters[0]["groupTemplate"][0])
 pGroupTemplate = pGroupTemplate.replace(/\$\)\)/g, ">>")
 
 // Template for group footer
 var pGroupFooterTemplate = "";
 if (parameters[0]["groupFooterTemplate"])
 pGroupFooterTemplate = paramFormat(parameters[0]["groupFooterTemplate"][0]);
 pGroupFooterTemplate = pGroupFooterTemplate.replace(/\$\)\)/g, ">>");
 
 // Template for item
 var pItemTemplate = this.templates[pFormat][1];
 if (parameters[0]["itemTemplate"])
 pItemTemplate = paramFormat(parameters[0]["itemTemplate"][0])
 pItemTemplate = pItemTemplate.replace(/\$\)\)/g, ">>").replace(/%link/g, "%0").replace(/%item/g, "%1").replace(/%abstract/g, "%2").replace(/%text/g, "%3").replace(/%created/g, "%4").replace(/%modified/g, "%5").replace(/%modifier/g, "%6").replace(/%group/g, "%7").replace(/%title/g, "%8").replace(/%tags/g, "%9").replace(/%nolink/g, "%10").replace(/%custom/g, "%11")
 // Template for footer
 var pFooterTemplate = this.templates[pFormat][4].replace(/%count/g, "%1")

 // Get all tiddlers
 var tiddlers = store.reverseLookup("tags","",false);

 // Sorting
 if(!pOrder)
 pOrder = "title";
 if (pOrder.match(/^\-/i)) {
 pOrder = pOrder.substr(1)
 var sortDesc = true;
 }
 // Sorting on a standard field
 if (pOrder.match(/(title)|(text)|(modifier)|(modified)|(created)|(tags)/))
  if (sortDesc)
   tiddlers.sort(function (a,b) {if(a[pOrder] == b[pOrder]) return(0); else return (a[pOrder] > b[pOrder]) ? -1 : +1; });
  else
  tiddlers.sort(function (a,b) {if(a[pOrder] == b[pOrder]) return(0); else return (a[pOrder] < b[pOrder]) ? -1 : +1; });
 else
  if (sortDesc)
   tiddlers.sort(function (a,b) {if(a.fields[pOrder] == b.fields[pOrder]) return(0); else return (a.fields[pOrder] > b.fields[pOrder]) ? -1 : +1; });
  else
   tiddlers.sort(function (a,b) {if(a.fields[pOrder] == b.fields[pOrder]) return(0); else return (a.fields[pOrder] < b.fields[pOrder]) ? -1 : +1; });

 // Header
 if (pHeader)
 listWikiText += formatItem(this.templates[pFormat][0], [pHeader], pFormat)
 
 for(var t=0; t<tiddlers.length; t++) {
 tiddler = tiddlers[t];
 if (pText!="" && tiddler.text=="") tiddler.text=store.getValue(tiddler, 'text')
 if (pTop==-1 || count<pTop) {
 if (pText=="" || tiddler.text.match(pText)) {
 if (pTitle=="" || tiddler.title.match(pTitle)) {
 if (pSearch=="" || (tiddler.title.match(pSearch) || tiddler.text.match(pSearch))) {
 if (pFilter=="" || eval(pFilter)) {
 if (pTags.length==0 || compareArrays(tiddler.tags, pTags, "all")) {
 count++;
 if (tiddler.text=="") tiddler.text=store.getValue(tiddler, 'text')
 // Grouping
 if (pGroup) {
 theGroup = eval(pGroup);
 if(theGroup != lastGroup) {
 groupCount++;firstInGroup = true;
 if (pGroupFooterTemplate && groupCount>1)
 listWikiText += pGroupFooterTemplate.replace("%group", theGroup)
 listWikiText += pGroupTemplate.replace("%group", theGroup)
 lastGroup = theGroup;
 } else
  firstInGroup = false;
 }
 // Separators
 if (count>1 && !firstInGroup) listWikiText += pSeparator;
 //Plaintext title
 var noLink = tiddler.title.match(config.textPrimitives.wikiLink)?"~" + tiddler.title:tiddler.title;
 // Custom parameter
 if (pCustomParameter)
 var custom="";
 try {
 custom = eval(pCustomParameter)
 } catch (e) {}
 // List individual tiddler
 var strItem = formatItem(pItemTemplate,["[[" + tiddler.title + "]]",count,tiddler.text.substr(0,300),tiddler.text,tiddler.created.formatString(pDateFormat),tiddler.modified.formatString(pDateFormat),tiddler.modifier,theGroup,tiddler.title,(tiddler.tags.length>0?"[["+tiddler.tags.join("]], [[")+"]]":""),noLink,custom], pFormat)
 for (var fld in tiddler.fields) strItem = strItem.replace('%field.' + fld, tiddler.fields[fld]);
 listWikiText += strItem
 }
 }
 }
 }
 }
 }
 }
 
 // Last group footer
 if (pGroup && pGroupFooterTemplate && count>0)
 listWikiText += pGroupFooterTemplate.replace("%group", theGroup)

 // Footer
 if (pFooter) {
 pFooter = pFooter.replace("%count", count)
 listWikiText += formatItem(pFooterTemplate, [pFooter], pFormat)
 }
 
 // Render result
 if (!parameters[0]["debug"])
 wikify(listWikiText,place, null, currentTiddler)
 else
 place.innerHTML = "<textarea style=\"width:100%;\" rows=30>" + listWikiText + "</textarea>"
 
 
 // Local functions
 
 function paramFormat(param) {
 // Allow "\n" in non evalled parameters
 return param.replace(/\\n/g, "\n");
 }
 
 function formatItem(template, values, format) {
 // Fill template with values (depending on list format)
 if (format.match(/table/) && values[0].match(/\|/))
 return ("%0\n").format(values)
 else
 return template.format(values)
 }
 
 function compareArrays(array, values, logic) {
 // Compare items in array with AND("all") or OR("any") logic
 var matches=0;
 for(var v=0; v<values.length; v++) 
 if(values[v].replace(/^\s+|\s+$/g,"").match(/^\-/) && !array.contains(values[v].replace(/^\s+|\s+$/g,"").substr(1)))
 matches++;
 else if (array.contains(values[v]))
 matches++;
 return ((logic=="all" && matches==values.length) || (logic!="all" && matches>0))
 }
 
}

String.prototype.prettyTrim = function(len,prefix,postfix) {
 var result = this.trim().replace(/\r\n/g,' ').replace(/\n/g,' ');
 if (!prefix) prefix = '';
 if (!postfix) postfix = '';
 if (result.length > len - 3)
 return prefix + result.substr(0,len) + '...' + postfix;
 else if (result.length > 0)
 return prefix + result + postfix;
 else
 return result;
}

//}}}
/***
|''Name:''|TiddlersBarPlugin|
|''Description:''|A bar to switch between tiddlers through tabs (like browser tabs bar).|
|''Version:''|1.2.5|
|''Date:''|Jan 18,2008|
|''Source:''|http://visualtw.ouvaton.org/VisualTW.html|
|''Author:''|Pascal Collin|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0, others|
!Demos
On [[homepage|http://visualtw.ouvaton.org/VisualTW.html]], open several tiddlers to use the tabs bar.
!Installation
#import this tiddler from [[homepage|http://visualtw.ouvaton.org/VisualTW.html]] (tagged as systemConfig)
#save and reload
#''if you're using a custom [[PageTemplate]]'', add {{{<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>}}} before {{{<div id='tiddlerDisplay'></div>}}}
#optionally, adjust StyleSheetTiddlersBar
!Tips
*Doubleclick on the tiddlers bar (where there is no tab) create a new tiddler.
*Tabs include a button to close {{{x}}} or save {{{!}}} their tiddler.
*By default, click on the current tab close all others tiddlers.
!Configuration options 
<<option chkDisableTabsBar>> Disable the tabs bar (to print, by example).
<<option chkHideTabsBarWhenSingleTab >> Automatically hide the tabs bar when only one tiddler is displayed. 
<<option txtSelectedTiddlerTabButton>> ''selected'' tab command button.
<<option txtPreviousTabKey>> previous tab access key.
<<option txtNextTabKey>> next tab access key.
!Code
***/
//{{{
config.options.chkDisableTabsBar = config.options.chkDisableTabsBar ? config.options.chkDisableTabsBar : false;
config.options.chkHideTabsBarWhenSingleTab  = config.options.chkHideTabsBarWhenSingleTab  ? config.options.chkHideTabsBarWhenSingleTab  : false;
config.options.txtSelectedTiddlerTabButton = config.options.txtSelectedTiddlerTabButton ? config.options.txtSelectedTiddlerTabButton : "closeOthers";
config.options.txtPreviousTabKey = config.options.txtPreviousTabKey ? config.options.txtPreviousTabKey : "";
config.options.txtNextTabKey = config.options.txtNextTabKey ? config.options.txtNextTabKey : "";
config.macros.tiddlersBar = {
	tooltip : "see ",
	tooltipClose : "click here to close this tab",
	tooltipSave : "click here to save this tab",
	promptRename : "Enter tiddler new name",
	currentTiddler : "",
	previousState : false,
	previousKey : config.options.txtPreviousTabKey,
	nextKey : config.options.txtNextTabKey,	
	tabsAnimationSource : null, //use document.getElementById("tiddlerDisplay") if you need animation on tab switching.
	handler: function(place,macroName,params) {
		var previous = null;
		if (config.macros.tiddlersBar.isShown())
			story.forEachTiddler(function(title,e){
				if (title==config.macros.tiddlersBar.currentTiddler){
					var d = createTiddlyElement(null,"span",null,"tab tabSelected");
					config.macros.tiddlersBar.createActiveTabButton(d,title);
					if (previous && config.macros.tiddlersBar.previousKey) previous.setAttribute("accessKey",config.macros.tiddlersBar.nextKey);
					previous = "active";
				}
				else {
					var d = createTiddlyElement(place,"span",null,"tab tabUnselected");
					var btn = createTiddlyButton(d,title,config.macros.tiddlersBar.tooltip + title,config.macros.tiddlersBar.onSelectTab);
					btn.setAttribute("tiddler", title);
					if (previous=="active" && config.macros.tiddlersBar.nextKey) btn.setAttribute("accessKey",config.macros.tiddlersBar.previousKey);
					previous=btn;
				}
				var isDirty =story.isDirty(title);
				var c = createTiddlyButton(d,isDirty ?"!":"x",isDirty?config.macros.tiddlersBar.tooltipSave:config.macros.tiddlersBar.tooltipClose, isDirty ? config.macros.tiddlersBar.onTabSave : config.macros.tiddlersBar.onTabClose,"tabButton");
				c.setAttribute("tiddler", title);
				if (place.childNodes) {
					place.insertBefore(document.createTextNode(" "),place.firstChild); // to allow break line here when many tiddlers are open
					place.insertBefore(d,place.firstChild); 
				}
				else place.appendChild(d);
			})
	}, 
	refresh: function(place,params){
		removeChildren(place);
		config.macros.tiddlersBar.handler(place,"tiddlersBar",params);
		if (config.macros.tiddlersBar.previousState!=config.macros.tiddlersBar.isShown()) {
			story.refreshAllTiddlers();
			if (config.macros.tiddlersBar.previousState) story.forEachTiddler(function(t,e){e.style.display="";});
			config.macros.tiddlersBar.previousState = !config.macros.tiddlersBar.previousState;
		}
	},
	isShown : function(){
		if (config.options.chkDisableTabsBar) return false;
		if (!config.options.chkHideTabsBarWhenSingleTab) return true;
		var cpt=0;
		story.forEachTiddler(function(){cpt++});
		return (cpt>1);
	},
	selectNextTab : function(){  //used when the current tab is closed (to select another tab)
		var previous="";
		story.forEachTiddler(function(title){
			if (!config.macros.tiddlersBar.currentTiddler) {
				story.displayTiddler(null,title);
				return;
			}
			if (title==config.macros.tiddlersBar.currentTiddler) {
				if (previous) {
					story.displayTiddler(null,previous);
					return;
				}
				else config.macros.tiddlersBar.currentTiddler=""; 	// so next tab will be selected
			}
			else previous=title;
			});		
	},
	onSelectTab : function(e){
		var t = this.getAttribute("tiddler");
		if (t) story.displayTiddler(null,t);
		return false;
	},
	onTabClose : function(e){
		var t = this.getAttribute("tiddler");
		if (t) {
			//tbGTD Why? if(story.hasChanges(t) && !readOnly) if(!confirm(config.commands.cancelTiddler.warning.format([t]))) return false;
			story.closeTiddler(t);
		}
		return false;
	},
	onTabSave : function(e) {
		var t = this.getAttribute("tiddler");
		if (!e) e=window.event;
		if (t) config.commands.saveTiddler.handler(e,null,t);
		return false;
	},
	onSelectedTabButtonClick : function(event,src,title) {
		var t = this.getAttribute("tiddler");
		if (!event) event=window.event;
		if (t && config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton])
			config.commands[config.options.txtSelectedTiddlerTabButton].handler(event, src, t);
		return false;
	},
	onTiddlersBarAction: function(event) {
		var source = event.target ? event.target.id : event.srcElement.id; // FF uses target and IE uses srcElement;
		if (source=="tiddlersBar") story.displayTiddler(null,'New Tiddler',DEFAULT_EDIT_TEMPLATE,false,null,null);
	},
	createActiveTabButton : function(place,title) {
		if (config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton]) {
			var btn = createTiddlyButton(place, title, config.commands[config.options.txtSelectedTiddlerTabButton].tooltip ,config.macros.tiddlersBar.onSelectedTabButtonClick);
			btn.setAttribute("tiddler", title);
		}
		else
			createTiddlyText(place,title);
	}
}

story.coreCloseTiddler = story.coreCloseTiddler? story.coreCloseTiddler : story.closeTiddler;
story.coreDisplayTiddler = story.coreDisplayTiddler ? story.coreDisplayTiddler : story.displayTiddler;

story.closeTiddler = function(title,animate,unused) {
	if (title==config.macros.tiddlersBar.currentTiddler)
		config.macros.tiddlersBar.selectNextTab();
	story.coreCloseTiddler(title,false,unused); //disable animation to get it closed before calling tiddlersBar.refresh
	var e=document.getElementById("tiddlersBar");
	if (e) config.macros.tiddlersBar.refresh(e,null);
}

story.displayTiddler = function(srcElement,tiddler,template,animate,unused,customFields,toggle){
	story.coreDisplayTiddler(config.macros.tiddlersBar.tabsAnimationSource,tiddler,template,animate,unused,customFields,toggle);
	var title = (tiddler instanceof Tiddler)? tiddler.title : tiddler;  
	if (config.macros.tiddlersBar.isShown()) {
		story.forEachTiddler(function(t,e){
			if (t!=title) e.style.display="none";
			else e.style.display="";
		})
		config.macros.tiddlersBar.currentTiddler=title;
	}
	var e=document.getElementById("tiddlersBar");
	if (e){config.macros.tiddlersBar.refresh(e,null);}
	if(config.options.chkSinglePagePermalink){
		var sUrl=encodeURIComponent(String.encodeTiddlyLink(title));
		window.location.hash = sUrl;
		config.lastURL = window.location.hash;
		document.title = wikifyPlain("SiteTitle") + " - " + title;
		if(window.atREFRESH)window.atREFRESH();
	}
}

var coreRefreshPageTemplate = coreRefreshPageTemplate ? coreRefreshPageTemplate : refreshPageTemplate;
refreshPageTemplate = function(title) {
	coreRefreshPageTemplate(title);
	if (config.macros.tiddlersBar) config.macros.tiddlersBar.refresh(document.getElementById("tiddlersBar"));
}

// tb: code cleanup and different highlight for selected tab
var barStyle
barStyle = "/*{{{*/\n"
+ ".tiddler {border: 3px solid [[ColorPalette::TertiaryPale]];border-left-width:2px;border-top-width:2px;clear:both;z-index:10;}\n"
+ "#tiddlersBar {z-index:0;}\n"
+ "#tiddlersBar .tab:hover {border-color:[[ColorPalette::SecondaryMid]];}\n"
+ "#tiddlersBar .tab {display:block;float:left;margin:3px 3px 0 0;padding: 2px 4px;}\n"
+ "#tiddlersBar .tabUnselected .tabButton, #tiddlersBar .tabSelected .tabButton {padding : 0 2px; margin: 0 0 0 2px;}\n"
+ "#tiddlersBar .tab {white-space:nowrap;border:0;border-top:2px solid [[ColorPalette::TertiaryMid]];border-bottom:2px solid [[ColorPalette::TertiaryPale]];margin-bottom:-2px;background:[[ColorPalette::TertiaryMid]];}\n"
+ "#tiddlersBar .button {border:0;color:[[ColorPalette::Foreground]];}\n"
+ "#tiddlersBar {padding:0 0 0 1%;marign:0;max-width:84%;}\n"
+ "#tiddlersBar .tabButton:hover, #tiddlersBar .button:hover, #tiddlersBar .tab:hover {color:[[ColorPalette::Background]];background:[[ColorPalette::SecondaryMid]]}\n"
+ "#tiddlersBar .tabSelected {background:[[ColorPalette::Background]];border:2px solid [[ColorPalette::TertiaryPale]];border-bottom:2px solid [[ColorPalette::Background]];margin-bottom:-2px;}\n"
+ "#tiddlersBar .tabSelected .button:hover{background:transparent;color:[[ColorPalette::Background]];}\n"
+ "#tiddlersBar .tabContents {border:1px [[ColorPalette::TertiaryMid]] solid;}\n"
+ "/*}}}*/";
config.shadowTiddlers.StyleSheetTiddlersBar = barStyle;
store.addNotification("StyleSheetTiddlersBar", refreshStyles);

config.refreshers.none = function(){return true;}
config.shadowTiddlers.PageTemplate=config.shadowTiddlers.PageTemplate.replace(/<div id='tiddlerDisplay'><\/div>/m,"<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>\n<div id='tiddlerDisplay'></div>");
//}}}
/%all tiddlers tagged with tags after 'with:' will be excluded %/<<tiddler scripts##tidsByTags with: tbGTD>>
[[manage the TagCloud...|TagCloud]]
<<SimileTimeline TiddlersTimelineSpec>>
|timelineHeight:|400|

|band0.width:|80%|
|band0.intervalUnit:|MONTH|
|band0.intervalPixels:|100|
|band0.date:|Jan 1 2010|
|band0.eventSourceType:|tiddlerFields|

|band1.width:|5%|
|band1.intervalUnit:|WEEK|
|band1.intervalPixels:|100*7/31|

|band2.width:|15%|
|band2.intervalUnit:|MONTH|
|band2.intervalPixels:|25|
|band2.showEventText:|false|
|band2.eventSourceType:|tiddlerFields|
|''URL:''|http://www.tiddlytools.com/|
|''Author:''|~EricShulman|
The [[wiki|http://www.tiddlywiki.com]] that makes all this possible.
|linkTable|k
|!main|>|
|official website |http://www.tiddlywiki.com |
|development site |http://trac.tiddlywiki.org/tiddlywiki |
|themes |http://tiddlythemes.com |
|tiddlyspot |http://tiddlyspot.com |
|!plugin|>|
|loads of resources |http://tiddlyvault.tiddlyspot.com |
|plugins, macros and hacks |http://jackparke.googlepages.com/jtw.html |
|tagglytagging with mptw |http://mptw.tiddlyspot.com |
|calendar, popup tips, simple clock |http://ptw.sourceforge.net/ptwe.html|
|tabbed catalog and loads of plugins |http://www.tiddlytools.com |
|extensions for tiddlyWiki |http://tw.lewcid.org |
|wysiwyg, tabs, fields editor and encryption plugins |http://visualtw.ouvaton.org/VisualTW.html |
|plugins and showcases |http://giffmex.tiddlyspot.com |
|themeswitcher |http://www.martinswiki.com |
|!doc|>|
|google group |http://groups.google.com/group/TiddlyWiki/topics |
|tiddlywiki guides |http://tiddlywikiguides.org |
|faq on tiddlyspot |http://twfaq.tiddlyspot.com |
|tutorial for beginners |http://giffmex.org/twfortherestofus.html |
|community-based documentation |http://www.tiddlywiki.org |
|on wikipedia|http://en.wikipedia.org/wiki/TiddlyWiki|
|tips on tiddlywiki |http://tiddlywikitips.com|
|!gtd|>|
|monkeygtd |http://monkeygtd.tiddlyspot.com http://monkeygtd.tiddlyspot.com/demo3.html |
|gtdtiddlywiki |http://shared.snapgrid.com/index.html |
|kinkless gtd with d3 |http://www.dcubed.ca |
|!tools|>|
|tiddlysnip for firefox |http://trac.tiddlywiki.org/tiddlywiki/wiki/TiddlySnip |
|!misc|>|
|del.ico.us |http://del.icio.us/tag/tiddlywikiplugin?setcount=100 |
|giffmex showcase |http://www.giffmex.org/tw/tiddlywikicentral.html |

!Developper links
|linkTable|k
| abouts | link |h
| reference |>|h
|html javascript php reference |http://selfhtml.org |
| practice |>|h
|extreme (agile) programming |http://www.xprogramming.com |
| tools |>|h
|javascript code compressor |http://compressor.ebiene.de |
|javascript shell |http://www.billyreisinger.com/jash |
| notes |>|h
|unparsed content, commenting, wikilinks |http://www.tiddlywiki.org/wiki/Escaping |
|a toplist of js scripts |http://www.dustindiaz.com/top-ten-javascript |

!Bookmarklets
|!what|!external link|
|add bookmarklets to control any tiddlywiki to your browsers favourites | [[InstantBookmarklets|http://www.tiddlytools.com/#InstantBookmarklets]] |
|a great related plugin that enables things like bookmarklets |[[LoadRemotePlugin|http://www.tiddlytools.com/#LoadRemotePlugin]] |

!Syncing
;http://www.tiddlywiki.org/wiki/How_To/Synchronize_TW_files
:...has additional information on related plugins from Eric Shulman
/***
!!usage
In edit-mode, the following will be replaced when you save the tiddler
* {ts} or {t} -> timestamp
* {ds} or {d} -> datestamp
Configure ''timeFormat'' and ''dateFormat'' to your needs.
!all praises go to
[[InstantTimestampPlugin@MPTW|http://mptw.tiddlyspot.com/#InstantTimestampPlugin]]
!source
***/
//{{{
config.timeStampGTD={
	timeFormat:'YYYY-0MM-0DD 0hh:0mm',
	dateFormat:'YYYY-0MM-0DD',
	excludeTags:['systemConfig'],
	excludeTiddlers:[],
	formats:[
		[/\{ts?\}(?!\}\})/ig,"'{{ts{'+t.formatString(config.timeStampGTD.timeFormat)+'}}}'"],
		[/\{ds?\}(?!\}\})/ig,"'{{ds{'+t.formatString(config.timeStampGTD.dateFormat)+'}}}'"]
	]
}
TiddlyWiki.prototype.saveTiddler_tbGTD=TiddlyWiki.prototype.saveTiddler;
TiddlyWiki.prototype.saveTiddler=function(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created){
	var t,f,i,c=config.timeStampGTD;
	tags=tags?tags:[];tags=(typeof(tags)=="string")?tags.readBracketedList():tags;
	if(!tags.containsAny(c.excludeTags)&&!c.excludeTiddlers.contains(newTitle)){
		t=new Date();f=c.formats;
		for(var i=0;i<f.length;i++)newBody=newBody.replace(f[i][0],eval(f[i][1]));
	}
	return this.saveTiddler_tbGTD.apply(this, arguments);
}
setStylesheet(".ts,.ds {font-weight:bold;color:#666;}","TimeStampStyles");
//}}}
<<SimileTimeline CubismJSONTiddlerTimelineSpec>>
<<SimileTimeline Example1TimelineSpec>>
<<SimileTimeline Example2TimelineSpec>>
This tiddler calls the {{{<<schedule>>}}} macro twice to provide a combined view of your commitments for the next 3 days.   It uses shading to visually show "out of hours" (weekends and evenings) events, current day (which in this demo is always the first row), events past/finished.  This demo tiddler show a 24 hour period but this is configurable.  Moving the mouse over an event in the timetable should popup the title of the reminder from which the event was created.  Note also that each view functions independently, so using the navigation buttons on the timetable will have no effect on the agenda. This tiddler also show the {{{<<addActivity>>}}} macro which is a simple slider form to allow you to add a new reminder to the current tiddler.

<<addActivity "+Aktivitet">>
<<schedule duration:2 hourFrom:0 span:24 view:timetable shadow:on>>
<<schedule duration:2 hourFrom:0 span:24 view:agenda shadow:on>>
The guy who took the time to design this nice TiddlyWiki flavour...
Is the same as [[Tobias]]...
Is the same as ...[[Tobias]]
/%
!info
|Name|ToggleFullScreen|
|Original Source|http://www.TiddlyTools.com/#ToggleFullScreen|
|Version|2.0.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|Create a link that shows/hides sidebars and page headers|
|Moderation|added tiddlersBar, topMenuL, topMenuR and siteNav to be hidden as well|
|Moderator|Måns Mårtensson|
|Source|http://tw-abc.tiddlyspot.com/index.html#ToggleFullScreen|
Usage
<<<
{{{
<<tiddler ToggleFullScreen>>
<<tiddler ToggleFullScreen with: label altlabel>>
}}}
<<<
Example
<<<
{{{<<tiddler ToggleFullScreen with: fullscreen restore>>}}}
<<tiddler ToggleFullScreen##show with: fullscreen restore>>
<<<
!end

!show
<html><nowiki><a href='javascript:;' title="FULDSKÆRM: slå alle elementer bortset fra tiddleren fra"
onmouseover="
	this.href='javascript:void(eval(decodeURIComponent(%22(function(){try{('
	+encodeURIComponent(encodeURIComponent(this.onclick))
	+')()}catch(e){alert(e.description?e.description:e.toString())}})()%22)))';"
onclick="
	var co=config.options;
	co.chkFullScreen=!co.chkFullScreen;
	var showmm=!co.chkFullScreen && co.chkShowLeftSidebar!==false;
	var showsb=!co.chkFullScreen && co.chkShowRightSidebar!==false;
        var showtb=!co.chkFullScreen && co.chkDisableTabsBar!==true;
        var showsn=!co.chkFullScreen && co.chkShowSiteNav!==false;
        var showtr=!co.chkFullScreen && co.chkShowTopMenuR!==false;
        var showtl=!co.chkFullScreen && co.chkShowTopMenuL!==false;
	var showcrumbs=!co.chkFullScreen && co.chkShowBreadcrumbs!==false
	&& config.macros.breadcrumbs && config.macros.breadcrumbs.crumbs.length;
	var cw=document.getElementById('contentWrapper');
	var da=document.getElementById('displayArea');
	var mm=document.getElementById('mainMenu');
	var sb=document.getElementById('sidebar');
	var sm=document.getElementById('storyMenu');
	var bc=document.getElementById('breadCrumbs');
        var tb=document.getElementById('tiddlersBar');
        var sn=document.getElementById('siteNav');
        var tr=document.getElementById('topMenuR');
        var tl=document.getElementById('topMenuL');
	if (cw){
		var elems=cw.getElementsByTagName('*');
		for (var i=0; i<elems.length; i++) if (hasClass(elems[i],'header')) 
			{ elems[i].style.display=co.chkFullScreen?'none':'block'; break; }
	}
	if (mm) {
		mm.style.display=showmm?'block':'none';
		da.style.marginLeft=showmm?(co.txtDisplayAreaLeftMargin||''):'1em';
	}
	if (sb) {
		sb.style.display=showsb?'block':'none';
		da.style.marginRight=showsb?(co.txtDisplayAreaRightMargin||''):'1em';
	}
        if (sm) sm.style.display=!co.chkFullScreen ?'block':'none';
	if (bc) bc.style.display=showcrumbs?'block':'none';
        if (tb) tb.style.display=!co.chkFullScreen ?'block':'none';
        if (sn) sn.style.display=!co.chkFullScreen ?'block':'none';
        if (tr) tr.style.display=!co.chkFullScreen ?'block':'none';
        if (tl) tl.style.display=!co.chkFullScreen ?'block':'none';

	this.innerHTML=!co.chkFullScreen?'$1':'$2';
	var b=document.getElementById('restoreFromFullscreenButton');
	if (b) removeNode(b);
	else { 
		setStylesheet(store.getTiddlerText('ToggleFullScreen##styles'),'fullScreenStyles');
		var b=createTiddlyElement(null,'span','restoreFromFullscreenButton','selected');
		b.innerHTML='&loz;';
		b.title='RESTORE: redisplay page header, menu and sidebar';
		b.onclick=this.onclick;
		document.body.insertBefore(b,null);
	}
	return false;
">$1</a></html>
!styles
#restoreFromFullscreenButton {
	position:fixed; top:.3em; right:.3em; z-index:10001;
	cursor:pointer; font-size:8pt; color:ButtonText !important;
	border:2px outset ButtonFace; padding:0px 3px;
	background-color:ButtonFace; -moz-appearance:button;
}
!end
%/<<tiddler {{var src='ToggleFullScreen'; src+(tiddler&&tiddler.title==src?'##info':'##show');}}
with:	{{'$'+'1'!='$1'?'$1':'fullscreen'}}
	{{'$'+'2'!='$2'?'$2':'restore'}}>>
/***
|''Name:''|ToggleSideBarTB|
|''Description''|allows to toggle left and right sidebar|
|''Version:''|1.0|
|''Type''|macro|
|''Author:''|[[TobiasBeer]]|
|''Info:''|http://tbgtd.tiddlyspot.com/#ToggleSideBarTB|
|''Source:''|http://tbgtd.tiddlyspot.com/#ToggleSideBarTB|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion''|2.xx|
!Code
***/
//{{{
config.macros.toggleSideBarTB={
  settings:{
    arr1:"►",arr2:"◄",
    leftBarID:"mainMenu",leftBarLbl:"main menu",
    leftBarHide:"margin-left:1em;",leftBarShow:"margin-left:10.1em;",
    rightBarID:"sidebar",rightBarLbl:"sidebar",
    rightBarHide:"margin-right:1em;",rightBarShow:"margin-right:17.1em;"
  },
  handler:function(place,macroName,params,wikifier,paramString,tiddler){
    var l=params[0]&&params[0]=="left";
    var h=params[1]&&params[1]=="hide";
    var no=params[2]&&params[2]=="notip";
    var s=this.settings;
    var el=l?s.leftBarID:s.rightBarID;
    var btnId="ToggleSideBar"+(l?"Left":"Right");
    var arr=l?(h?s.arr1:s.arr2):(h?s.arr2:s.arr1);
    var lbl=(no?'':"toggle "+(l?s.leftBarLbl:s.rightBarLbl));
    var fct=function(){config.macros.toggleSideBarTB.toggle(btnId)};
    document.getElementById(el).setAttribute("toggle",(h?"show":"hide"));
    createTiddlyButton(place,arr,lbl,fct,"button HideSideBarButton",btnId);
  },
  toggle:function(btnId){
    var btn=document.getElementById(btnId);
    var l=btn.id=="ToggleSideBarLeft";
    var s=config.macros.toggleSideBarTB.settings;
    var bl=document.getElementById(s.leftBarID);
    var br=document.getElementById(s.rightBarID);
    var bar=(l?bl:br);
    var hl=bl.getAttribute("toggle")=='show';if(l)hl=!hl;
    var hr=br.getAttribute("toggle")=='show';if(!l)hr=!hr;
    var h=(l?hl:hr);
    setStylesheet("#contentWrapper #displayArea {"+
        (hl?s.leftBarHide:s.leftBarShow)+
        (hr?s.rightBarHide:s.rightBarShow)+
      "}","ToggleSideBarStyles");
    bar.style.display=h?"none":"block";
    bar.setAttribute("toggle",(h?"show":"hide"));
    arr1=l?s.arr2:s.arr1;arr2=l?s.arr1:s.arr2;
    btn.innerHTML=h?arr2:arr1;
  }
}
//}}}
/***

An under construction replacement for toggleTag

<<tTag mode:text text:D tag:Done>>
<<tTag mode:text text:N tag:Next>>
***/
//{{{

merge(config.macros,{

	tTag: {

		createIfRequired: true,
		shortLabel: "[[%0]]",
		longLabel: "[[%0]] [[%1]]",

		handler: function(place,macroName,params,wikifier,paramString,tiddler) {

			var parsedParams = paramString.parseParams("tags",null,true);
			
			if (!tiddler)
				tiddler = store.getTiddler(getParam(parsedParams,"title"));
			
			var tag = getParam(parsedParams,"tag","checked");
			var title = getParam(parsedParams,"title",tiddler.title);

			var refreshAll = getParam(parsedParams,"refreshAll",false);

			var defaultLabel = (title == tiddler.title ? this.shortLabel : this.longLabel);
			var label = getParam(parsedParams,"label",defaultLabel);

			var theTiddler =  title == tiddler.title ? tiddler : store.getTiddler(title);

			var mode = getParam(parsedParams,"mode","checkbox");

			var theClass = getParam(parsedParams,"class",tag+"Button");


			var currentValue = theTiddler && 
				(macroName == "tTag" ? theTiddler.isTagged(tag) : store.getValue(theTiddler,tag)=="true");

			if (mode == "checkbox") {
				// create the checkbox

				var cb = createTiddlyCheckbox(place, label.format([tag,title]), currentValue, function(e) {
					if (!store.tiddlerExists(title)) {
						if (config.macros.tTag.createIfRequired) {
							var content = store.getTiddlerText(title); // just in case it's a shadow
							store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);
						}
						else 
							return false;
					}
					//store.suspendNotifications(); 
					if (macroName == "tTag")
						store.setTiddlerTag(title,this.checked,tag);
					else // it must be tField
						store.setValue(title,tag,this.checked?"true":null);

					if (refreshAll) {
						 story.forEachTiddler(function(title,element) {
						   if (element.getAttribute("dirty") != "true") 
						     story.refreshTiddler(title,false,true);
						 });
					}

					//store.resumeNotifications();
					return true;
				});
			}
			else if (mode == "text") {
				var text = getParam(parsedParams,"text","X");

				var cl = createTiddlyButton(place, text, "Toggle "+text, function(e) {
					if(!e) var e = window.event;

					if (!store.tiddlerExists(title)) {
						if (config.macros.tTag.createIfRequired) {
							var content = store.getTiddlerText(title); // just in case it's a shadow
							store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);
						}
						else 
							return false;
					}
					//store.suspendNotifications(); 
					var currentState = this.getAttribute("state")=="true";
					var newState = !currentState;

					store.setTiddlerTag(title,newState,tag);
					if (macroName == "tTag")
						store.setTiddlerTag(title,newState,tag);
					else // it must be tField
						store.setValue(title,tag,newState?"true":null);

					// this is terrible please refactor
					if (currentState) {
						cl.setAttribute("state","false");
						removeClass(cl,"on");
						addClass(cl,"off");
					}
					else {
						cl.setAttribute("state","true");
						removeClass(cl,"off");
						addClass(cl,"on");
					}

					//refreshDisplay(); 
					if (refreshAll) {
						 story.forEachTiddler(function(title,element) {
						   if (element.getAttribute("dirty") != "true") 
						     story.refreshTiddler(title,false,true);
						 });
					}
					//store.resumeNotifications();

					e.cancelBubble = true;
					if(e.stopPropagation) e.stopPropagation();

					return false;
				});

				addClass(cl,theClass.replace(/ /g,''));

				if (currentValue) {
					cl.setAttribute("state","true");
					removeClass(cl,"off");
					addClass(cl,"on");
				}
				else {
					cl.setAttribute("state","false");
					removeClass(cl,"on");
					addClass(cl,"off");
				}
				
			}
			else if (mode == "popup") {
				var cl = createTiddlyButton(place, "zzz", "Toggle "+text, function(e) {
					// props to Saq
					if(!e) var e = window.event;
					var popup = Popup.create(this);
					createTiddlyButton(createTiddlyElement(popup,"li"),"foo","bar",function(e) {
						// under contruction
						alert(this.getAttribute("tag"));
					});
					Popup.show(popup,false);
					e.cancelBubble = true;
					if(e.stopPropagation) e.stopPropagation();
					return false ;
				});
			}

		}
	}

});

config.macros.tField = config.macros.tTag;

setStylesheet(["",
".button.off {border-style:none;background:#fff;color:#ccc;}",
".button.on {border-style:none;background:#ddd;color:#000;}",
// TODO move this css elsewhere
"#realmSelector .button.off {margin:0 0.5em;padding:0 1em;border:2px solid #aaa;background:#eee;color:#333;}", // actually reversed, ie off is "on"
"#realmSelector .button.on {margin:0 0.5em;padding:0 1em;border:2px solid #999;background:#999;color:#ccc;}", // actually reversed, ie off is "on"
""].join("\n"),"tTag");

//}}}
/%
!info
|Name|ToggleTiddlersBar|
|Source|http://a-pm.tiddlyspot.com|
|Version|0.9.0 beta|
|Author|Mario Pietsch|
|License|http://creativecommons.org/licenses/by-sa/3.0/|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|show/hide ~TiddlersBar|

Derived from: ToggleRightSidebar see [[here|http://www.TiddlyTools.com/#ToggleRightSidebar]]

Usage
<<<
{{{
<<tiddler ToggleTiddlersBar>>
<<tiddler ToggleTiddlersBar with: label tooltip>>
}}}
Try this: <<tiddler ToggleTiddlersBar##show
	with: {{config.options.chkDisableTabsBar?'show TiddlersBar':'hide TiddlersBar'}} "ToggleTiddlersBar">>
<<<
Configuration:
<<<
{{{
config.options.chkDisableTabsBar (false)
config.options.txtToggleTiddlersBarLabelShow ('▼') 
config.options.txtToggleTiddlersBarLabelHide ('▲') 
}}}
<<<
!end
!show
<<tiddler {{
	var co=config.options;
	if (co.chkDisableTabsBar===undefined) co.chkDisableTabsBar=false;
'';}}>><html><nowiki><a href='javascript:;' title="$2"
onmouseover="
	this.href='javascript:void(eval(decodeURIComponent(%22(function(){try{('
	+encodeURIComponent(encodeURIComponent(this.onclick))
	+')()}catch(e){alert(e.description?e.description:e.toString())}})()%22)))';"
onclick="
	var co=config.options;
	var opt='chkDisableTabsBar';
	var show=co[opt]=!co[opt];
	saveOptionCookie(opt);

	var labelShow=co.txtToggleTiddlersBarLabelShow||'▼';
	var labelHide=co.txtToggleTiddlersBarLabelHide||'▲';
	if (this.innerHTML==labelShow||this.innerHTML==labelHide) 
		this.innerHTML=show?labelHide:labelShow;
	this.title=(show?'show':'hide')+' tiddlers bar';	
	story.displayTiddler(null,'');
	story.closeTiddler('');
	return false;
">$1</a></nowiki></html>
!end
%/<<tiddler {{
	var src='ToggleTiddlersBar';
	src+(tiddler&&tiddler.title==src?'##info':'##show');
}} with: {{
	var co=config.options;
	var labelShow=co.txtToggleTiddlersBarLabelShow||'▼';
	var labelHide=co.txtToggleTiddlersBarLabelHide||'▲';
	'$1'!='$'+'1'?'$1':(co.chkDisableTabsBar?labelHide:labelShow);
}} {{
	var tip=(config.options.chkDisableTabsBar?'show':'hide')+' tiddlers bar';
	'$2'!='$'+'2'?'$2':tip;
}}>>
|~ViewToolbar|fullscreen refreshTiddler -closeTiddler +editTiddler deleteTiddler > syncing permalink fields <|
|~EditToolbar|-cancelTiddler +saveTiddler deleteTiddler toggleQuickEdit|
/***
|Name|TotallyTiddlers|
|Source|http://www.TiddlyTools.com/#TotallyTiddlers|
|Version||
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|CSS|
|Description|theme: hide everything but tiddler content|
|StyleSheet|TotallyTiddlers|
|PageTemplateReadOnly|PageTemplateReadOnly|
|EditTemplateReadOnly|EditTemplateReadOnly|
|Check|TotallyTiddlers##check|
|Init|TotallyTiddlers##init|
|Reset|TotallyTiddlers##reset|
!!!!!check
//{{{
return !confirm("Are you sure you want to use this theme?");
//}}}
!!!!!init
//{{{
displayMessage("TotallyTiddlers (kiosk mode) is ON");
//}}}
!!!!!reset
//{{{
displayMessage("TotallyTiddlers (kiosk mode) is OFF");
//}}}
!!!!!styles
***/

[[StyleSheetAdjustments]]
/*{{{*/
/* ==== TotallyTiddlers ==== */
body { background-color:transparent !important; }
#mainMenu, #sidebar, .toolbar, .tagged, .tagging, .subtitle, .header
	{display: none !important;}
#breadCrumbs, #siteMenu, #storyMenu
	{ display:none !important; }
#displayArea
	{ margin: 1em !important; }
noscript /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
	{ display:none; }
/*}}}*/
<<tiddler TspotControls##server with: {{DataTiddler.getData("Server", "titel", "")}} >>
/%
!server
| tiddlyspot password:|<<option pasUploadPassword>>|
| [[SideAdministration|Server]]:|<<upload http://$1.tiddlyspot.com/store.cgi index.html . .  $1>>//(kræver tiddlyspot password)//<br>[[kontrol panel|http://$1.tiddlyspot.com/controlpanel]], [[download (brug offline)|http://$1.tiddlyspot.com/download]]|
| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[blog|http://tiddlyspot.blogspot.com/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donér|http://tiddlyspot.com/?page=donate]]|
!end server
%/
/***
Description: Contains the stuff you need to use Tiddlyspot
Note, you also need UploadPlugin, PasswordOptionPlugin and LoadRemoteFileThroughProxy
from http://tiddlywiki.bidix.info for a complete working Tiddlyspot site.
***/
//{{{

// edit this if you are migrating sites or retrofitting an existing TW
config.tiddlyspotSiteId = 'udtalelser';

// make it so you can by default see edit controls via http
config.options.chkHttpReadOnly = false;
window.readOnly = false; // make sure of it (for tw 2.2)
window.showBackstage = true; // show backstage too

// disable autosave in d3
if (window.location.protocol != "file:")
	config.options.chkGTDLazyAutoSave = false;

// tweak shadow tiddlers to add upload button, password entry box etc
with (config.shadowTiddlers) {
	SiteUrl = 'http://'+config.tiddlyspotSiteId+'.tiddlyspot.com';
	SideBarOptions = SideBarOptions.replace(/(<<saveChanges>>)/,"$1<<tiddler TspotSidebar>>");
	OptionsPanel = OptionsPanel.replace(/^/,"<<tiddler TspotOptions>>");
	DefaultTiddlers = DefaultTiddlers.replace(/^/,"[[WelcomeToTiddlyspot]] ");
	MainMenu = MainMenu.replace(/^/,"[[WelcomeToTiddlyspot]] ");
}

// create some shadow tiddler content
merge(config.shadowTiddlers,{

'TspotOptions':[
 "tiddlyspot password:",
 "<<option pasUploadPassword>>",
 ""
].join("\n"),

'TspotControls':[
 "| tiddlyspot password:|<<option pasUploadPassword>>|",
 "| site management:|<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . .  " + config.tiddlyspotSiteId + ">>//(requires tiddlyspot password)//<br>[[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]], [[download (go offline)|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download]]|",
 "| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[blog|http://tiddlyspot.blogspot.com/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|"
].join("\n"),

'WelcomeToTiddlyspot':[
 "This document is a ~TiddlyWiki from tiddlyspot.com.  A ~TiddlyWiki is an electronic notebook that is great for managing todo lists, personal information, and all sorts of things.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //What now?// &nbsp;&nbsp;@@ Before you can save any changes, you need to enter your password in the form below.  Then configure privacy and other site settings at your [[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]] (your control panel username is //" + config.tiddlyspotSiteId + "//).",
 "<<tiddler TspotControls>>",
 "See also GettingStarted.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Working online// &nbsp;&nbsp;@@ You can edit this ~TiddlyWiki right now, and save your changes using the \"save to web\" button in the column on the right.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Working offline// &nbsp;&nbsp;@@ A fully functioning copy of this ~TiddlyWiki can be saved onto your hard drive or USB stick.  You can make changes and save them locally without being connected to the Internet.  When you're ready to sync up again, just click \"upload\" and your ~TiddlyWiki will be saved back to tiddlyspot.com.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Help!// &nbsp;&nbsp;@@ Find out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]].  Also visit [[TiddlyWiki.org|http://tiddlywiki.org]] for documentation on learning and using ~TiddlyWiki. New users are especially welcome on the [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]], which is an excellent place to ask questions and get help.  If you have a tiddlyspot related problem email [[tiddlyspot support|mailto:support@tiddlyspot.com]].",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Enjoy :)// &nbsp;&nbsp;@@ We hope you like using your tiddlyspot.com site.  Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions."
].join("\n"),

'TspotSidebar':[
 "<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . .  " + config.tiddlyspotSiteId + ">><html><a href='http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download' class='button'>download</a></html>"
].join("\n")

});
//}}}
++++[e-mail: haubro@himmerlands-ungdomsskole.dk|redigér indholdet af skabelonen] /%
!SideHoved
[img[http://docs.google.com/a/himmerlands-ungdomsskole.dk/File?id=dcd224mx_58gbwkvddb_b]]
@@font-family:"Comic Sans MS";{{big{''HIMMERLANDS UNGDOMSSKOLE''}}}@@
@@font-family:"Comic Sans MS";font-size:"12";Elevvej 10 - Haubro - 9600  Aars<br>Telefon 98 66 40 60  -  Telefax 98 66 40 99<br>{{normal{ <<formTiddler UdtalelsesSkabelonProjekt>>}}}
!end SideHoved
!SideHovedSlider
@@position:relative;+++^33em^[Sidehoved]...
<<tiddler UdtalelsesSkabelonProjekt##SideHoved>>
/%
=== 
!end SideHovedSlider %/
<html><table class='borderless' style='width:40%;'><tr valign='bottom'><td><div><tr><td style='width:15%'> Navn:<td><span macro='edit navn'></span><td><span macro="showWhenTagged udtalelse">[[√|Afleverede udtalelser]]</span></span><tr valign='top'><td><div> Overemne:<td><span macro='edit overemne'></span><td><tr valign='top'><td><div> Emne:<td><span macro='edit delemne'></span><td></tr></table></div></html>{{center twochar{Vejleder: <html><span macro='edit vejleder'></span></html>}}}
<html>
Udtalelsens dele:
<div class="borderleft"><table class='borderless' style='width:97%'><td><span macro="tiddler UdtalelsesSkabelon##form with: Arbejdsprocessen proces"></span> 
        <span macro="tiddler UdtalelsesSkabelonProjekt##form with: [[Arbejdsprocessen]] proces"></span>
	<span macro="tiddler UdtalelsesSkabelonProjekt##form with: [[Det faglige indhold]] indhold"></span>
	<span macro="tiddler UdtalelsesSkabelonProjekt##form with: [[Produktet]] produkt"></span>
	<span macro="tiddler UdtalelsesSkabelonProjekt##form with: [[Fremlæggelsen]] frem"></span>
        <span macro="tiddler UdtalelsesSkabelonProjekt##form with: [[Evt rapport]] rapport"></span>
	</html>{{center twochar{Karakter:  <html><span macro='edit karakter'></span></html>}}}
{{small form fourchar input{
<html><table class='borderless' style='width:40%;'><tr valign='bottom'><td style='width:15%'> Afleveret:<td><span macro='tiddler CheckboxToggleTag with: afleveret'></span><td><span macro="showWhenTagged udtalelse">[[√|Afleverede udtalelser]]</span></span><tr valign='top'><td><div> Dato:<td><span class='editor' style='width:10%;'><input name=dato type=text /></div></span></td></tr></table></div></html>}}}
/%
!form
{{normal{<<tiddler CheckboxToggleTag with: [[$1]]">>+++[$1 »|Beskriv $1 her]{{big center menubox fourchar{<html><span class='editor'style='float:center;margin:0em'macro='edit "$2karakter"'></span><div class='editor' macro='edit $2 9'></div></html>}}}===}}}
!end form %/=== /%
!form2
{{normal{<<tiddler CheckboxToggleTag with: [[$1]]">>@@position:relative;+++^60em^[$1 »|Beskriv $1 her]{{big center menubox fourchar{<html><span class='editor'style='float:center;margin:0em'macro='edit "$2karakter"'></span><div class='editor' macro='edit $2 9'></div></html>}}}===@@}}} %/
/***
|Name|UnsavedChangesPlugin|
|Source|http://www.TiddlyTools.com/#UnsavedChangesPlugin|
|Version|3.3.3|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|TiddlyWiki.prototype.setDirty,store.saveTiddler,store.removeTiddler|
|Description|show droplist of tiddlers that have changed since the last time the document was saved|
Display a list of tiddlers that have been changed since the last time the document was saved.  The list includes all new/modified tiddlers as well as those changed with "minor edits" enabled and any tiddlers that you import during the session, regardless of their modification date.
!!!!!Usage
<<<
{{{
<<unsavedChanges panel>> or <<unsavedChanges>>
}}}
{{indent{
the ''panel'' keyword displays a 'control panel' interface containing a droplist of unsaved tiddlers and a 'goto' button, along with a command link to 'save changes'.  Depending upon what other plugins are installed, several additional elements will also be displayed: When [[NestedSlidersPlugin]] is installed, the entire control panel is contained within a ''SLIDER''.  When [[LoadTiddlersPlugin]] is installed, a ''REVERT'' button is added.  When [[SaveAsPlugin]] is installed, a ''SAVE AS'' link is added.  When [[UploadPlugin]] is installed, an ''UPLOAD'' (or ''save to web'') link is added.  When [[TrashPlugin]] is installed and there are tiddlers tagged with<<tag Trash>>, an ''EMPTY TRASH'' link is added.
}}}
{{{
<<unsavedChanges list separator>>
}}}
{{indent{
the ''list'' keyword displays a simple space-separated list of unsaved tiddlers without any other command links.  You can specify an optional ''separator'' value that can be used in place of the default space character.  For example, you can specify {{{"<br>"}}} as the separator in order to display each link, one per line.
}}}
{{{
<<unsavedChanges command label tip>>
}}}
{{indent{
the ''command'' keyword displays a single 'command link' that, when clicked, displays a ~TiddlyWiki popup containing the list of unsaved tiddlers, the 'save changes' command and, depending upon what other plugins are installed, additional commands for 'save as', 'upload', and 'empty trash' (similar to the panel display described above).

You can specify optional ''label'' and ''tip'' parameters in the macro to customize the command link text and tooltip.  The default label for the command link is: "There %1 %0 unsaved tiddler%2...", where:
* %0 is automatically replaced with the number of unsaved changes
* %1 is either "er" (if changes=1) or "er" (if changes>1)
* %2 is either blank (if changes=1) or "e" (if changes>1)
resulting in the text: //"There is 1 unsaved tiddler...", "There are 2 unsaved tiddlers...", etc.//
}}}
<<<
!!!!!Examples
<<<
^^//note: the following examples will not display any output unless you have already created/modified tiddlers in the current document.//^^
{{{<<unsavedChanges>>}}}
<<unsavedChanges>>
----
{{{<<unsavedChanges command>>}}}
<<unsavedChanges command>>
----
{{{<<unsavedChanges list>>}}}
<<unsavedChanges list>>
----
{{{<<unsavedChanges list "<br>">>}}}
<<unsavedChanges list "<br>">>
<<<
!!!!!Revisions
<<<
2009.03.02 [3.3.3] fix handling for titles that contain HTML special chars (lt,gt,quot,amp)
2008.09.02 [3.3.2] cleanup popup list output generation and added timestamps/sizes to popup display
2008.08.23 [3.3.1] added optional custom 'label' and 'tip' params to 'command' mode and defined default values for mode, label, tip, and separator as object properties for I18N/L10N-readiness.
2008.08.21 [3.3.0] complete re-write of rendering and refresh processing to support multiple instances and automatic self-refresh (no longer depends upon core refresh notifications)
2008.08.21 [3.2.0] added 'command' option for link+popup as alternative to 'control panel' interface
2008.04.22 [3.1.2] use SaveAsPlugin instead of obsolete NewDocumentPlugin to add "save as" link
2007.12.22 [3.1.1] hijack removeTiddler() instead of low-level deleteTiddler() to correct tracking and refresh handling issues.  in saveTiddler(), check for 'tiddler rename' (title!=newtitle) and adjust list accordingly.
2007.12.21 [3.1.0] added support for {{{<<unsavedChanges list separator>>}}} usage to unsaved tiddlers as a simple list of links, embedded in tiddler content (e.g., [[MainMenu]])
2007.12.20 [3.0.0] rewrite to track ALL changed tiddlers, including imports and minor edits, regardless of saved modification dates.  Also, rewrote display logic to directly refresh macro output instead of triggering a page refresh.  The entire process is MUCH more efficient now.
2007.08.02 [2.0.0] converted from inline script
2007.01.01 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.UnsavedChangesPlugin= {major: 3, minor: 3, revision: 3, date: new Date(2009,3,2)};

config.macros.unsavedChanges = {
	changed: [], // list of currently unsaved tiddler titles
	defMode: "panel",
	defSep: " ",
	defLabel: "Der %1 %0 ugemt%2 tiddler%2...",
	defTip: "se en liste over ugemte tiddler ændringer",
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var wrapper=createTiddlyElement(place,"span",null,"unsavedChanges");
		wrapper.setAttribute("mode",params[0]||this.defMode);
		wrapper.setAttribute("sep",params[1]||this.defSep); // for 'list' mode
		wrapper.setAttribute("label",params[1]||this.defLabel); // for 'command' mode
		wrapper.setAttribute("tip",params[2]||this.defTip); // for 'command' mode
		this.render(wrapper);
	},
	render: function(wrapper) {
		removeChildren(wrapper); // make sure its empty
		if (!this.changed.length) return; // no changes = no output
		switch (wrapper.getAttribute("mode")) {
			case "command": this.command(wrapper); break;
			case "list": this.list(wrapper); break;
			case "panel": default: this.panel(wrapper); break;
		}
	},
	refresh: function() {
		var wrappers=document.getElementsByTagName("span");
		for (var w=0; w<wrappers.length; w++)
			if (hasClass(wrappers[w],"unsavedChanges"))
				this.render(wrappers[w]);
	},
	list: function(place) { // show simple list of unsaved tiddlers
		wikify("[["+this.changed.join("]]"+place.getAttribute("sep")+"[[")+"]]",place);
	},
	command: function(place) { // show command link with popup list
		var c=this.changed.length;
		var txt=place.getAttribute("label").format([c,c==1?'er':'er',c==1?'':'e']);
		var tip=place.getAttribute("tip");
		var action=function(ev) { if (!ev) var ev=window.event;
			var p=Popup.create(this); if (!p) return false;
			var d=createTiddlyElement(p,"div");
			d.style.whiteSpace="normal"; d.style.width="auto"; d.style.padding="2px";
			// gather pretty links for changed tiddlers
			var list=[]; var item=" &nbsp;[[%1 - %0 (%2 bytes)|%0]]&nbsp; ";
			for (var i=config.macros.unsavedChanges.changed.length-1; i>=0; i--) {
				var tid=store.getTiddler(config.macros.unsavedChanges.changed[i]);
				if (!tid) continue;
				var when=tid.modified.formatString('YYYY.0MM.0DD 0hh:0mm:0ss');
				list.push(item.format([tid.title,when,tid.text.length]));
			}
			wikify("@@white-space:nowrap;"+list.join("<br>")+"@@",d);
			if (!readOnly) {
				var t="\n----\n";
				t+="@@white-space:nowrap;display:block;text-align:center; &nbsp;";
				t+="<<saveChanges>>";
				t+=config.macros.saveAs?" | <<saveAs>>":"";
				t+=config.macros.upload?" | <<upload>>":"";
				t+=(config.macros.emptyTrash&&store.getTaggedTiddlers("Trash").length)?" | <<emptyTrash>>":"";
				t+="&nbsp; @@";
				wikify(t,d);
			}
			Popup.show(p,false);
			ev.cancelBubble=true; if(ev.stopPropagation)ev.stopPropagation();
			return(false);
		}
		createTiddlyButton(place,txt,tip,action,"button");
	},
	panel: function(place) { // show composite droplist+buttons+commands
		// gather changed tiddlers (in reverse order by date - most recent first)
		var tids=[]; for (var i=this.changed.length-1; i>=0; i--)
			{ var t=store.getTiddler(this.changed[i]); if (t) tids.push(t); }
		tids.sort(function(a,b){return a.modified<b.modified?-1:(a.modified==b.modified?0:1);});
		// generate droplist items
 		var list=[]; var item='<option value="%0">%1 - %0 (%2 bytes)</option>';
		for (var i=tids.length-1; i>=0; i--) {
			var when=tids[i].modified.formatString('YYYY.0MM.0DD 0hh:0mm:0ss');
			list.push(item.format([tids[i].title.htmlEncode(),when,tids[i].text.length]));
		}
		// display droplist, buttons, and command links
		var out=''; var c=this.changed.length;
		var NSP=config.formatters.findByField("name","nestedSliders");
		var summary=this.defLabel.format([c,c==1?'er':'er',c==1?'':'e'])
		out+=NSP?'+++(unsaved)['+summary+'|'+this.defTip+']...':(summary+"\n");
		out+='<html><form style="display:inline"><!--\
			--><select size="1" name="list" \
				title="select a tiddler to view" \
				onchange="var v=this.value; if (v.length) story.displayTiddler(null,v);"><!--\
			-->'+list.join('')+'<!--\
			--></select><!--\
			--><input type="button" value="gå til" onclick="this.form.list.onchange();">';
		if (config.macros.loadTiddlers)  {
			out+='<input type="button" value="gendan" \
				title="import the last saved version of this tiddler" \
				onclick="var v=this.form.list.value; if (!v.length) return; \
					var t=\'<\'+\'<loadTiddlers [[tiddler:\'+v+\']] \'; \
					t+=document.location.href; \
					t+=\' confirm force noreport>\'+\'>\'; \
					var e=document.getElementById(\'executeRevert\'); \
					if (e) e.parentNode.removeChild(e); \
					e=document.createElement(\'span\'); \
					e.id=\'executeRevert\'; \
					wikify(t,e);">';
		}
		out+='</form></html>';
		if (!readOnly) {
			out+='\n{{small nowrap{';
			out+="<<saveChanges>>";
			out+=config.macros.saveAs?" | <<saveAs>>":"";
			out+=config.macros.upload?" | <<upload>>":"";
			out+=(config.macros.emptyTrash&&store.getTaggedTiddlers("Trash").length)?" | <<emptyTrash>>":"";
			out+='}}}';
		}
		out+=NSP?'===':'';
		wikify(out,place);
	}
};

// hijack store.saveTiddler() to track changes to tiddlers
if (store.showUnsaved_saveTiddler==undefined) {
	store.showUnsaved_saveTiddler=store.saveTiddler;
	store.saveTiddler=function(title,newtitle) {
		if (title!=newtitle) {
			var i=config.macros.unsavedChanges.changed.indexOf(title);
			if (i!=-1) config.macros.unsavedChanges.changed.splice(i,1); // remove old from list
		} 
		var i=config.macros.unsavedChanges.changed.indexOf(newtitle);
		if (i!=-1) config.macros.unsavedChanges.changed.splice(i,1); // remove new title from list
		config.macros.unsavedChanges.changed.push(newtitle); // add new title to END of list
		var t=this.showUnsaved_saveTiddler.apply(this,arguments);
		if (!this.notificationLevel) config.macros.unsavedChanges.refresh();
		return t;
	}
}

// hijack store.removeTiddler() to track changes to tiddlers
if (store.showUnsaved_removeTiddler==undefined) {
	store.showUnsaved_removeTiddler=store.removeTiddler;
	store.removeTiddler=function(title) {
		var i=config.macros.unsavedChanges.changed.indexOf(title);
		if (i!=-1) config.macros.unsavedChanges.changed.splice(i,1); // remove from list
		this.showUnsaved_removeTiddler.apply(this,arguments);
		if (!this.notificationLevel) config.macros.unsavedChanges.refresh();
	}
}

// hijack store.setDirty() function to reset change list after file save
// note: do NOT hijack the prototype function.  This hijack should only be applied to
// the main 'store' instance only (i.e., don't refresh when loading temporary store
// as part of ImportTiddlers processing)
if (store.showUnsaved_setDirty==undefined) {
	store.showUnsaved_setDirty=store.setDirty;
	store.setDirty = function(flag) {
		var refresh=this.isDirty() && !flag; // 'dirty' to 'clean', force a refresh...
		this.showUnsaved_setDirty.apply(this,arguments); // but change the flag first.
		if (refresh) {
			config.macros.unsavedChanges.changed=[]; // clear changed list
			config.macros.unsavedChanges.refresh();
		}
	}
}
//}}}
{{blue{<<tiddler Upload##server with: {{DataTiddler.getData("Server", "titel", "")}} >>}}}
/%
!server
{{smallform{
|<<option pasUploadPassword>>|
|<<upload http://$1.tiddlyspot.com/store.cgi index.html . .  $1>> [[mere..|TspotControls]]|
}}}
!end server
!server2
<<upload http://$1.tiddlyspot.com/store.cgi index.html . .  $1>>
!end server2
!server3
<<tiddler Upload##server4 with: {{DataTiddler.getData("Server", "titel", "")}} >>
!end server3
!server4
http://$1.tiddlyspot.com/download
!end server4
%/
| 16/10/2009 02:47:21 | Tobias | [[tbgtd.html|file:///C:/xTiddle/bck_tiddlyspot/tbGTD/tbgtd.html]] | [[store.cgi|http://tbgtd.tiddlyspot.com/store.cgi]] | . | [[index.html | http://tbgtd.tiddlyspot.com/index.html]] | . |
| 10/02/2010 20:53:42 | DitNavn | [[/|http://udtalelser.tiddlyspot.com/#testudtalelse]] | [[store.cgi|http://udtalelser.tiddlyspot.com/store.cgi]] | . | [[index.html | http://udtalelser.tiddlyspot.com/index.html]] | . | ok |
| 10/02/2010 20:56:23 | DitNavn | [[/|http://udtalelser.tiddlyspot.com/#options]] | [[store.cgi|http://udtalelser.tiddlyspot.com/store.cgi]] | . | [[index.html | http://udtalelser.tiddlyspot.com/index.html]] | backup |
| 10/02/2010 20:57:59 | DitNavn | [[/|http://udtalelser.tiddlyspot.com/#M.I.S.]] | [[store.cgi|http://udtalelser.tiddlyspot.com/store.cgi]] | . | [[index.html | http://udtalelser.tiddlyspot.com/index.html]] | backup | ok | ok |
| 10/02/2010 21:01:12 | DitNavn | [[/|http://udtalelser.tiddlyspot.com/#MainMenu]] | [[store.cgi|http://udtalelser.tiddlyspot.com/store.cgi]] | . | [[index.html | http://udtalelser.tiddlyspot.com/index.html]] | backup |
| 10/02/2010 21:46:11 | DitNavn | [[udtalelser2.html|file:///mnt/home/udtalelser2.html#TspotControls]] | [[store.cgi|http://udtalelser.tiddlyspot.com/store.cgi]] | . | [[index.html | http://udtalelser.tiddlyspot.com/index.html]] | . | ok |
| 10/02/2010 21:47:56 | DitNavn | [[udtalelser2.html|file:///mnt/home/udtalelser2.html#TspotControls]] | [[store.cgi|http://udtalelser.tiddlyspot.com/store.cgi]] | . | [[index.html | http://udtalelser.tiddlyspot.com/index.html]] | backup | ok |
| 11/02/2010 23:20:13 | DitNavn | [[udtalelser2.html|file:///E:/udtalelser2.html#TspotControls]] | [[store.cgi|http://udtalelser.tiddlyspot.com/store.cgi]] | . | [[index.html | http://udtalelser.tiddlyspot.com/index.html]] | . | ok |
| 11/02/2010 23:29:52 | DitNavn | [[udtalelser2.html|file:///E:/udtalelser2.html#%5B%5BN%C3%A6ste%20uges%20skema%5D%5D]] | [[store.cgi|http://udtalelser.tiddlyspot.com/store.cgi]] | . | [[index.html | http://udtalelser.tiddlyspot.com/index.html]] | backup |
| 11/02/2010 23:37:39 | DitNavn | [[index.html|http://udtalelser.tiddlyspot.com/index.html#%5B%5BN%C3%A6ste%20uges%20skema%5D%5D]] | [[store.cgi|http://udtalelser.tiddlyspot.com/store.cgi]] | . | [[index.html | http://udtalelser.tiddlyspot.com/index.html]] | backup |
| 21/02/2010 00:07:41 | DitNavn | [[/|http://udtalelser.tiddlyspot.com/#TspotControls]] | [[store.cgi|http://udtalelser.tiddlyspot.com/store.cgi]] | . | [[index.html | http://udtalelser.tiddlyspot.com/index.html]] | . |
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.3|
|''Date:''|Feb 24, 2008|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
	major: 4, minor: 1, revision: 3,
	date: new Date("Feb 24, 2008"),
	source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
	author: 'BidiX (BidiX (at) bidix (dot) info',
	coreVersion: '2.2.0'
};

//
// Environment
//

if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false;	// true to activate both in Plugin and UploadService
	
//
// Upload Macro
//

config.macros.upload = {
// default values
	defaultBackupDir: '',	//no backup
	defaultStoreScript: "store.php",
	defaultToFilename: "index.html",
	defaultUploadDir: ".",
	authenticateUser: true	// UploadService Authenticate User
};
	
config.macros.upload.label = {
	promptOption: "Gem og Upload denne TiddlyWiki med UploadMuligheder",
	promptParamMacro: "Gem og upload denneTiddlyWiki til %0",
	saveLabel: "gem til nettet", 
	saveToDisk: "gem til disk",
	uploadLabel: "upload"	
};

config.macros.upload.messages = {
	noStoreUrl: "Ingen lagrings URL in parmetre eller muligheder",
	usernameOrPasswordMissing: "Brugernavn eller password mangler"
};

config.macros.upload.handler = function(place,macroName,params) {
	if (readOnly)
		return;
	var label;
	if (document.location.toString().substr(0,4) == "http") 
		label = this.label.saveLabel;
	else
		label = this.label.uploadLabel;
	var prompt;
	if (params[0]) {
		prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0], 
			(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
	} else {
		prompt = this.label.promptOption;
	}
	createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};

config.macros.upload.action = function(params)
{
		// for missing macro parameter set value from options
		if (!params) params = {};
		var storeUrl = params[0] ? params[0] : config.options.txtUploadStoreUrl;
		var toFilename = params[1] ? params[1] : config.options.txtUploadFilename;
		var backupDir = params[2] ? params[2] : config.options.txtUploadBackupDir;
		var uploadDir = params[3] ? params[3] : config.options.txtUploadDir;
		var username = params[4] ? params[4] : config.options.txtUploadUserName;
		var password = config.options.pasUploadPassword; // for security reason no password as macro parameter	
		// for still missing parameter set default value
		if ((!storeUrl) && (document.location.toString().substr(0,4) == "http")) 
			storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
		if (storeUrl.substr(0,4) != "http")
			storeUrl = bidix.dirname(document.location.toString()) +'/'+ storeUrl;
		if (!toFilename)
			toFilename = bidix.basename(window.location.toString());
		if (!toFilename)
			toFilename = config.macros.upload.defaultToFilename;
		if (!uploadDir)
			uploadDir = config.macros.upload.defaultUploadDir;
		if (!backupDir)
			backupDir = config.macros.upload.defaultBackupDir;
		// report error if still missing
		if (!storeUrl) {
			alert(config.macros.upload.messages.noStoreUrl);
			clearMessage();
			return false;
		}
		if (config.macros.upload.authenticateUser && (!username || !password)) {
			alert(config.macros.upload.messages.usernameOrPasswordMissing);
			clearMessage();
			return false;
		}
		bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password); 
		return false; 
};

config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir) 
{
	if (!storeUrl)
		return null;
		var dest = bidix.dirname(storeUrl);
		if (uploadDir && uploadDir != '.')
			dest = dest + '/' + uploadDir;
		dest = dest + '/' + toFilename;
	return dest;
};

//
// uploadOptions Macro
//

config.macros.uploadOptions = {
	handler: function(place,macroName,params) {
		var wizard = new Wizard();
		wizard.createWizard(place,this.wizardTitle);
		wizard.addStep(this.step1Title,this.step1Html);
		var markList = wizard.getElement("markList");
		var listWrapper = document.createElement("div");
		markList.parentNode.insertBefore(listWrapper,markList);
		wizard.setValue("listWrapper",listWrapper);
		this.refreshOptions(listWrapper,false);
		var uploadCaption;
		if (document.location.toString().substr(0,4) == "http") 
			uploadCaption = config.macros.upload.label.saveLabel;
		else
			uploadCaption = config.macros.upload.label.uploadLabel;
		
		wizard.setButtons([
				{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption, 
					onClick: config.macros.upload.action},
				{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
				
			]);
	},
	options: [
		"txtUploadUserName",
		"pasUploadPassword",
		"txtUploadStoreUrl",
		"txtUploadDir",
		"txtUploadFilename",
		"txtUploadBackupDir",
		"chkUploadLog",
		"txtUploadLogMaxLine"		
	],
	refreshOptions: function(listWrapper) {
		var opts = [];
		for(i=0; i<this.options.length; i++) {
			var opt = {};
			opts.push();
			opt.option = "";
			n = this.options[i];
			opt.name = n;
			opt.lowlight = !config.optionsDesc[n];
			opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
			opts.push(opt);
		}
		var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
		for(n=0; n<opts.length; n++) {
			var type = opts[n].name.substr(0,3);
			var h = config.macros.option.types[type];
			if (h && h.create) {
				h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
			}
		}
		
	},
	onCancel: function(e)
	{
		backstage.switchTab(null);
		return false;
	},
	
	wizardTitle: "Upload med muligheder",
	step1Title: "Disse muligheder gemmes som cookies i din browser",
	step1Html: "<input type='hidden' name='markList'></input><br>",
	cancelButton: "Fortryd",
	cancelButtonPrompt: "Fortryd prompt",
	listViewTemplate: {
		columns: [
			{name: 'Description', field: 'description', title: "Beskrivelse", type: 'WikiText'},
			{name: 'Option', field: 'option', title: "Muligheder", type: 'String'},
			{name: 'Name', field: 'name', title: "Navn", type: 'String'}
			],
		rowClasses: [
			{className: 'lowlight', field: 'lowlight'} 
			]}
};

//
// upload functions
//

if (!bidix.upload) bidix.upload = {};

if (!bidix.upload.messages) bidix.upload.messages = {
	//from saving
	invalidFileError: "Den originale fil '%0' ser ikke ud til at være en ægte TiddlyWiki",
	backupSaved: "Backup gemt",
	backupFailed: "Det lykkedes IKKE at uploade en backup fil",
	rssSaved: "RSS feed er blevet uploadet",
	rssFailed: "Det mislykkedes at uploade et RSS feed",
	emptySaved: "Et tomt template er blevet uploadet",
	emptyFailed: "Det mislykkedes at uploade en tom template fil",
	mainSaved: "Hoved TiddlyWiki fil uploadet",
	mainFailed: "Det mislykkedes at uploade hoved TiddlyWiki filen. Dine ændringer er IKKE blevet gemt",
	//specific upload
	loadOriginalHttpPostError: "Kan ikke hente den originale fil",
	aboutToSaveOnHttpPost: 'I gang med at uploade til %0 ...',
	storePhpNotFound: "Lagrings scriptet '%0' blev ikke fundet."
};

bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
	var callback = function(status,uploadParams,original,url,xhr) {
		if (!status) {
			displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
			return;
		}
		if (bidix.debugMode) 
			alert(original.substr(0,500)+"\n...");
		// Locate the storeArea div's 
		var posDiv = locateStoreArea(original);
		if((posDiv[0] == -1) || (posDiv[1] == -1)) {
			alert(config.messages.invalidFileError.format([localPath]));
			return;
		}
		bidix.upload.uploadRss(uploadParams,original,posDiv);
	};
	
	if(onlyIfDirty && !store.isDirty())
		return;
	clearMessage();
	// save on localdisk ?
	if (document.location.toString().substr(0,4) == "file") {
		var path = document.location.toString();
		var localPath = getLocalPath(path);
		saveChanges();
	}
	// get original
	var uploadParams = new Array(storeUrl,toFilename,uploadDir,backupDir,username,password);
	var originalPath = document.location.toString();
	// If url is a directory : add index.html
	if (originalPath.charAt(originalPath.length-1) == "/")
		originalPath = originalPath + "index.html";
	var dest = config.macros.upload.destFile(storeUrl,toFilename,uploadDir);
	var log = new bidix.UploadLog();
	log.startUpload(storeUrl, dest, uploadDir,  backupDir);
	displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
	if (bidix.debugMode) 
		alert("about to execute Http - GET on "+originalPath);
	var r = doHttp("GET",originalPath,null,null,username,password,callback,uploadParams,null);
	if (typeof r == "string")
		displayMessage(r);
	return r;
};

bidix.upload.uploadRss = function(uploadParams,original,posDiv) 
{
	var callback = function(status,params,responseText,url,xhr) {
		if(status) {
			var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
			displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
			bidix.upload.uploadMain(params[0],params[1],params[2]);
		} else {
			displayMessage(bidix.upload.messages.rssFailed);			
		}
	};
	// do uploadRss
	if(config.options.chkGenerateAnRssFeed) {
		var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
		var rssUploadParams = new Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
		var rssString = generateRss();
		// no UnicodeToUTF8 conversion needed when location is "file" !!!
		if (document.location.toString().substr(0,4) != "file")
			rssString = convertUnicodeToUTF8(rssString);	
		bidix.upload.httpUpload(rssUploadParams,rssString,callback,Array(uploadParams,original,posDiv));
	} else {
		bidix.upload.uploadMain(uploadParams,original,posDiv);
	}
};

bidix.upload.uploadMain = function(uploadParams,original,posDiv) 
{
	var callback = function(status,params,responseText,url,xhr) {
		var log = new bidix.UploadLog();
		if(status) {
			// if backupDir specified
			if ((params[3]) && (responseText.indexOf("backupfile:") > -1))  {
				var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
				displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
			}
			var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
			displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
			store.setDirty(false);
			log.endUpload("ok");
		} else {
			alert(bidix.upload.messages.mainFailed);
			displayMessage(bidix.upload.messages.mainFailed);
			log.endUpload("failed");			
		}
	};
	// do uploadMain
	var revised = bidix.upload.updateOriginal(original,posDiv);
	bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};

bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
	var localCallback = function(status,params,responseText,url,xhr) {
		url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
		if (xhr.status == 404)
			alert(bidix.upload.messages.storePhpNotFound.format([url]));
		if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
			alert(responseText);
			if (responseText.indexOf("Debug mode") >= 0 )
				responseText = responseText.substring(responseText.indexOf("\n\n")+2);
		} else if (responseText.charAt(0) != '0') 
			alert(responseText);
		if (responseText.charAt(0) != '0')
			status = null;
		callback(status,params,responseText,url,xhr);
	};
	// do httpUpload
	var boundary = "---------------------------"+"AaB03x";	
	var uploadFormName = "UploadPlugin";
	// compose headers data
	var sheader = "";
	sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
	sheader += uploadFormName +"\"\r\n\r\n";
	sheader += "backupDir="+uploadParams[3] +
				";user=" + uploadParams[4] +
				";password=" + uploadParams[5] +
				";uploaddir=" + uploadParams[2];
	if (bidix.debugMode)
		sheader += ";debug=1";
	sheader += ";;\r\n"; 
	sheader += "\r\n" + "--" + boundary + "\r\n";
	sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
	sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
	sheader += "Content-Length: " + data.length + "\r\n\r\n";
	// compose trailer data
	var strailer = new String();
	strailer = "\r\n--" + boundary + "--\r\n";
	data = sheader + data + strailer;
	if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
	var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; ;charset=UTF-8; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
	if (typeof r == "string")
		displayMessage(r);
	return r;
};

// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
	if (!posDiv)
		posDiv = locateStoreArea(original);
	if((posDiv[0] == -1) || (posDiv[1] == -1)) {
		alert(config.messages.invalidFileError.format([localPath]));
		return;
	}
	var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
				store.allTiddlersAsHtml() + "\n" +
				original.substr(posDiv[1]);
	var newSiteTitle = getPageTitle().htmlEncode();
	revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
	revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
	revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
	revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
	revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
	return revised;
};

//
// UploadLog
// 
// config.options.chkUploadLog :
//		false : no logging
//		true : logging
// config.options.txtUploadLogMaxLine :
//		-1 : no limit
//      0 :  no Log lines but UploadLog is still in place
//		n :  the last n lines are only kept
//		NaN : no limit (-1)

bidix.UploadLog = function() {
	if (!config.options.chkUploadLog) 
		return; // this.tiddler = null
	this.tiddler = store.getTiddler("UploadLog");
	if (!this.tiddler) {
		this.tiddler = new Tiddler();
		this.tiddler.title = "UploadLog";
		this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
		this.tiddler.created = new Date();
		this.tiddler.modifier = config.options.txtUserName;
		this.tiddler.modified = new Date();
		store.addTiddler(this.tiddler);
	}
	return this;
};

bidix.UploadLog.prototype.addText = function(text) {
	if (!this.tiddler)
		return;
	// retrieve maxLine when we need it
	var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
	if (isNaN(maxLine))
		maxLine = -1;
	// add text
	if (maxLine != 0) 
		this.tiddler.text = this.tiddler.text + text;
	// Trunck to maxLine
	if (maxLine >= 0) {
		var textArray = this.tiddler.text.split('\n');
		if (textArray.length > maxLine + 1)
			textArray.splice(1,textArray.length-1-maxLine);
			this.tiddler.text = textArray.join('\n');		
	}
	// update tiddler fields
	this.tiddler.modifier = config.options.txtUserName;
	this.tiddler.modified = new Date();
	store.addTiddler(this.tiddler);
	// refresh and notifiy for immediate update
	story.refreshTiddler(this.tiddler.title);
	store.notify(this.tiddler.title, true);
};

bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir,  backupDir) {
	if (!this.tiddler)
		return;
	var now = new Date();
	var text = "\n| ";
	var filename = bidix.basename(document.location.toString());
	if (!filename) filename = '/';
	text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
	text += config.options.txtUserName + " | ";
	text += "[["+filename+"|"+location + "]] |";
	text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
	text += uploadDir + " | ";
	text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
	text += backupDir + " |";
	this.addText(text);
};

bidix.UploadLog.prototype.endUpload = function(status) {
	if (!this.tiddler)
		return;
	this.addText(" "+status+" |");
};

//
// Utilities
// 

bidix.checkPlugin = function(plugin, major, minor, revision) {
	var ext = version.extensions[plugin];
	if (!
		(ext  && 
			((ext.major > major) || 
			((ext.major == major) && (ext.minor > minor))  ||
			((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
			// write error in PluginManager
			if (pluginInfo)
				pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
			eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
	}
};

bidix.dirname = function(filePath) {
	if (!filePath) 
		return;
	var lastpos;
	if ((lastpos = filePath.lastIndexOf("/")) != -1) {
		return filePath.substring(0, lastpos);
	} else {
		return filePath.substring(0, filePath.lastIndexOf("\\"));
	}
};

bidix.basename = function(filePath) {
	if (!filePath) 
		return;
	var lastpos;
	if ((lastpos = filePath.lastIndexOf("#")) != -1) 
		filePath = filePath.substring(0, lastpos);
	if ((lastpos = filePath.lastIndexOf("/")) != -1) {
		return filePath.substring(lastpos + 1);
	} else
		return filePath.substring(filePath.lastIndexOf("\\")+1);
};

bidix.initOption = function(name,value) {
	if (!config.options[name])
		config.options[name] = value;
};

//
// Initializations
//

// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);

// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");

//optionsDesc
merge(config.optionsDesc,{
	txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
	txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
	txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
	txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
	txtUploadUserName: "Upload Username",
	pasUploadPassword: "Upload Password",
	chkUploadLog: "do Logging in UploadLog (default: true)",
	txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});

// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');


// Backstage
merge(config.tasks,{
	uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");


//}}}

{{floatleft applyNow normal{
<<tiddler Ur##digital "Ur" "vis et ur">>}}}
/%
!digital
+++^[Ur]...{{center{<<tiddler DigitalClock>>}}}===
!end
%/
<<tiddler Brugere>>
/***
|''Name:''|ValueSwitcherPlugin|
|''Description:''|Gather values from a definition tiddler, and present the user with a UI for setting a value from those available options as an extende field |
|''Version:''|0.2|
|''Date:''|25 Sept, 2007|
|''Source:''|http://www.hawksworx.com/playground/TeamTasks/#ValueTogglerPlugin|
|''Author:''|PhilHawksworth (phawksworth (at) gmail (dot) com)|
|''License:''|[[BSD open source license]]|
|''CoreVersion:''|2.3|
***/

//{{{
// Ensure that this Plugin is only installed once.
if(!version.extensions.ValueSwitcher) 
{
	version.extensions.ValueSwitcher = {installed:true};
	config.macros.ValueSwitcher = {

		handler: function(place,macroName,params,wikifier,paramString,tiddler) {

			var fieldPrefix = "tt_";
			var taskTiddler = story.findContainingTiddler(place);
			if(!(taskTiddler && taskTiddler != 'undefined')) {
				return;
			}
			var params = paramString.parseParams("anon",null,true,false,false);
			var ctrlType = getParam(params,"type",null);
			var id = taskTiddler.id;
			var title = id.substr(7);
			var tiddler = store.getTiddler(title);

			// build a drop down control
			if(ctrlType == 'dropdown') {
				var valueSrc = getParam(params,"valuesSource", null);
				if(!valueSrc) {
					displayMessage("No definition tiddler defined for a TeamTasks dropdown.");
					return;
				}
				var fieldName = fieldPrefix + valueSrc.toLowerCase().substr(0,valueSrc.length-11);
				var selected = fieldName + '::' + store.getValue(tiddler,fieldName);
				var values = this.getDefValues(valueSrc);
				var options = [];
				options.push({'caption': 'Vælg', 'name': null});
				for (var i=0; i < values.length; i++) {
					options.push({'caption': values[i], 'name': fieldName + '::' + values[i]});				
				}
				createTiddlyDropDown(place,this.setDropDownMetaData,options,selected);
			}
			// Build a free text box.
			else if(ctrlType == 'freetext') {
				var metaDataName = getParam(params,"metaDataName", null);
				if(!metaDataName) {
					displayMessage("No metaDataName defined for a TeamTasks free text box.");
					return;
				}	
				var ttField = fieldPrefix + metaDataName;
				// var ttname = fieldPrefix + tiddler
				var text = store.getValue(tiddler,ttField);
				if(text == undefined) text = "";	
				var i = createTiddlyElement(place,"input",null,null,null,{"value":text, "type":"input", "ttname":ttField});
				i.onblur = config.macros.ValueSwitcher.changeFreetext;
			}

			/*
				TODO: Build in deadline support
			*/
		},


		//Get definition values for populating UI from definition tiddlers.
		getDefValues: function(src) {
			var text = store.getTiddlerText(src).split('\n');
			var output = [];
			for(var t=0; t<text.length; t++) {
				//support calling the old TaskViewBuilder macro to list the tasks here too.
				var blob = wikifyStatic(text[t],null,tiddler,null);				
				var linktitle = /tiddlylink="[^"]*"/mg;
				var titles = blob.match(linktitle);
				if(titles) {
					for(var n=0; n<titles.length; n++) {
						output.push(titles[n].replace(/tiddlylink="([^"]*)"/,'$1'));
					}
				}
				else {
					output.push(text[t]);
				}
			}
			return (output);	
		},


		// Ensure that changes to a dropdown field are stored as an extended field.
		setDropDownMetaData: function(ev) {
			var e = ev ? ev : window.event;
			var taskTiddler = story.findContainingTiddler(this);
			if(taskTiddler && taskTiddler != undefined) {
				var title = taskTiddler.getAttribute('tiddler');
				var tiddler =  store.getTiddler(title);
				var option = this[this.selectedIndex].value.split('::');
				var extField = option[0];
				var extFieldVal = option[1];
				store.setValue(tiddler,extField,extFieldVal);
				story.saveTiddler(title);
			}
		},


		// Ensure that changes to a free text field are stored as an extended field.
		changeFreetext: function(ev) {
			var e = ev ? ev : window.event;
			var ttField = this.getAttribute('ttname');
			var value = this.value;
			if(ttField) {
				var t = story.findContainingTiddler(this);
				var title = t.getAttribute('tiddler');
				var tiddler =  store.getTiddler(title);
				store.setValue(tiddler,ttField,value);
				story.saveTiddler(title);
			}
			return false;
		}
	};
}
//}}}
|''Type:''|file|
|''URL:''|http://visualtw.ouvaton.org/VisualTW.html|
/***
|Name|WikifyPlugin|
|Source|http://www.TiddlyTools.com/#WikifyPlugin|
|Documentation|http://www.TiddlyTools.com/#WikifyPluginInfo|
|Version|1.1.4|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|substitute fields, slices, or computed values into a wiki-syntax format string and render results dynamically|
The {{{<<wikify>>}}} macro allows you to easily retrieve values from custom tiddler fields, tiddler slices, computed values (using javascript) or just plain old literals, and assemble them into small bits of generated wiki-syntax text content that can be rendered directly into a tiddler, or used in the ViewTemplate or EditTemplate to add dynamically-generated content to each tiddler.

The {{{<<wikiCalc>>}}} macro performs the same processing as {{{<<wikify>>}}} and, in addition, passes the assembled text content through javascript's {{{eval()}}} function before rendering the results.  This allows you to, for example, construct and compute mathematical expressions that use input values extracted from tiddler fields or slices.
!!!!!Documentation
> see [[WikifyPluginInfo]]
!!!!!Revisions
<<<
2009.03.29 [1.1.4] in handler(), pass 'tiddler' value to wikify() to fix macro errors in rendered content
|please see [[WikifyPluginInfo]] for additional revision details|
2007.06.22 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.WikifyPlugin= {major: 1, minor: 1, revision: 4, date: new Date(2009,3,29)};

config.macros.wikify={
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var fmt=params.shift();
		var values=[];
		var out="";
		if (!fmt.match(/\%[0-9]/g) && params.length) // format has no markers, just join all params with spaces
			out=fmt+" "+params.join(" ");
		else { // format param has markers, get values and perform substitution
			while (p=params.shift()) values.push(this.getFieldReference(place,p));
			out=fmt.format(values);
		}
		if (macroName=="wikiCalc") out=eval(out).toString();
		wikify(out.unescapeLineBreaks(),place,null,tiddler);
	},
	getFieldReference: function(place,p) { // "slicename::tiddlername" or "fieldname@tiddlername" or "fieldname"
		if (typeof p != "string") return p; // literal non-string value... just return it...
		var parts=p.split(config.textPrimitives.sliceSeparator);
		if (parts.length==2) {// maybe a slice reference?
			var tid=parts[0]; var slice=parts[1];
			if (!tid || !tid.length || tid=="here") { // no target (or "here"), use containing tiddler
				tid=story.findContainingTiddler(place);
				if (tid) tid=tid.getAttribute("tiddler")
				else tid="SiteSlices"; // fallback for 'non-tiddler' areas (e.g, header, sidebar, etc.)
			}
			var val=store.getTiddlerSlice(tid,slice);  // get tiddler slice value
		}
		if (val==undefined) {// not a slice, or slice not found, maybe a field reference?
			var parts=p.split("@");
			var field=parts[0];
			if (!field || !field.length) field="checked"; // missing fieldname, fallback: checked@tiddlername
			var tid=parts[1];
			if (!tid || !tid.length || tid=="here") { // no target (or "here"), use containing tiddler
				tid=story.findContainingTiddler(place);
				if (tid) tid=tid.getAttribute("tiddler")
				else tid="SiteFields"; // fallback for 'non-tiddler' areas (e.g, header, sidebar, etc.)
			}
			var val=store.getValue(tid,field);
		}
		// not a slice or field, or slice/field not found... return value unchanged
		return val===undefined?p:val;
	}
}
//}}}
//{{{
// define alternative macroName for triggering pre-rendering call to eval()
config.macros.wikiCalc=config.macros.wikify;
//}}}
All high priority items tag here...
All medium priority items tag here...
All low priority items tag here...
Archived actions...
Archived contacts...
Archived projects...
Archived references...
Actions reflect that which you want or need to do...
''Ny:'' <<newTiddler label:"#næste" title:"ny næste handling" prompt:"opret en ny næste handling" focus:title tag:#next>> <<newTiddler label:"#queued" title:"new queued action" prompt:"queue an new action" focus:title tag:#queued>> <<newTiddler label:"#waiting" title:"new waiting action" prompt:"create a new waiting action" focus:title tag:#waiting>><<newTiddler label:"#future" title:"new future action" prompt:"create a new future action" focus:title tag:#future>>
!Sharing options
Although this wont be part of any release, I added sharing options via [[addthis|http:www.addthis.com]] ...see MarkupPreHead and [[topMenuR]].
''Note:'' This is not available in ie, as tiddlywiki somehow wouldn't want to load completely with the addthis script loader. If you know how to fix that, [[drop me a line|contact me]]. Feel free to figure out how it's done or to ask questions.
!Added a SiteLayout
This will definetly make it easier for you to get your hands on this site's elements

<<tiddler SiteLayout>>
!More stuff for [[references|reference]]...
*added a {{button{new reference}}}-button to the new command in [[topMenuL]]
*and a link in the footer of the [[desk]]
!Just in case you would ever have to
Why not embed your google calendar and use it offline with google gears on firefox?

<html><iframe src="http://www.google.com/calendar"></iframe></html>
Use the archive to store information you no longer need for your daily work by assigning archive-tags to tiddlers. To avoid clutter and distraction, regularly import archived items into an extra tbGTD archive-document and afterwards delete them in your main document...
Areas are contextual categories for stuff...
//{{{
//utility functions for tbGTD
window.tbGTD={
	//get type of GTD element 1=toplevel, 2=subcategory, 3=tagged, noGTD=null
	type:function(title,list){
		if(!title)return;
		var l,s,t,cats,sub=[],ti,tgt;
		if(!list)list='x-tagger';
		l=store.getTiddlerText(list);if(!l)return; 
		cats=l.readBracketedList();
		for(t=0;t<cats.length;t++){
			ti=cats[t];if(title==ti)return 1;
			tgt=store.getTaggedTiddlers(ti);
			for(var s=0;s<tgt.length;s++){
				ti=tgt[s].title;
				if(title==ti)return 2;
				sub.pushUnique(ti);}
		}
		for(t=0;t<sub.length;t++){
			ti=sub[t];
			tgt=store.getTaggedTiddlers(ti);
			for(s=0;s<tgt.length;s++)if(title==tgt[s].title)return 3;
		}
		return null;
	},
	nu:function(tg,txt){
		return '<<newTiddler label:"+" title:"ny '+tg+'" prompt:"opret en nyt tiddler, der tagger til \''+tg+'\'" focus:title text:[['+txt+']] tag:[['+tg+']]>>';
	}
}
//}}}
|widetable noborder|k
|padding:10px;<<tiddler SideBarOptions>>|vertical-align:top;padding:10px;<<showReminders leadtime:-14...7>> |
{{{-> }}}[[display calendar of the complete year|calendar year]]
{{black{<<calendar>>}}}{{tagClear{}}}
{{{-> }}}[[display calendar for this month|calendar]]
Merge [[AnnotationsPlugin|jQueryPopup]] with functionality of...
*http://tiddlytools.com/#PopupPreviewPlugin
...in order to try and replace @@all@@ standard tooltips with cool jQuery Popups (as you see on the [[desk]]).
/%
!these
tbGTD-project
UploadLog
script
x-tab info
x-plore info
!tagged
journal
tbGTD-project
reference
systemServer
!keep
formating
reference
tbGtdTheme
tbGTDServer
!show
<<tiddler {{var btn=document.getElementById('cleanBtnGTD');if(!btn)btn=createTiddlyButton(place,'clean','clean tbGTD for release',function(e){
	var c,t,tid,clean=[],tids,txs,tgs,keep;
	tgs=store.getTiddlerText('clean##these').split('\n');
	for(t=0;t<tgs.length;t++){if(store.getTiddler(tgs[t]))clean.pushUnique(tgs[t]);}
	tgs=store.getTaggedTiddlers('clean');
	for(t=0;t<tgs.length;t++){clean.pushUnique(tgs[t].title);}
	tgs=store.getTiddlerText('clean##tagged').split('\n');
	for(t=0;t<tgs.length;t++){
		tids=store.getTaggedTiddlers(tgs[t]);
		for (c=0;c<tids.length;c++){clean.pushUnique(tids[c].title);}
	}
	keep=store.getTiddlerText('clean##keep').split('\n');
	for(t=0;t<keep.length;t++){clean.remove(keep[t]);}
	if(clean.length==0)alert('Nothing to be deleted.');
	else if (!confirm('Sure you want to delete all if these?\n'+clean.join('\n')))return;
	for(c=0;c<clean.length;c++)store.removeTiddler(clean[c]);
},null,null);btn.setAttribute('id','cleanBtnGTD');
'';}}>> ...also check [[MainMenu]], [[topMenuL]], [[topMenuR]], [[MarkupPreHead]], [[MarkupPostBody]], [[StyleSheet]]... make sure all tiddlers are tagging to [[tbGTD]].
!end%/<<tiddler clean##show>>
Tag project related contacts with contact-catogories...
<html><iframe src="http://goto.bplaced.net/x/tiddlyspot/tbgtd/" style="border:0"></iframe></html>
/%<html> xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250" />
  <meta name="author" content="Tobias Beer" />
  <meta name="description" content="contact form for http://tbGTD.tiddlyspot.com" />
  <meta name="keywords" content="contact, tbGTD, Tobias, Beer, Leipzig" />
  <title>contact form for http://tbGTD.tiddlyspot.com</title>
  <script type="text/javascript" src="validate.js"></script>

  <link rel="stylesheet" type="text/css" href="tbgtd.css" />
  </head>
  <body>
    
				<div id="form">
				  <form id="contact" name="contactForm" action="sendmail.php" method="post" onsubmit="return chkForm()">

						<div>your email address</div>
					  <input id="mail" name="Email" class="formfeld" size="25" title="Please enter your email address here!" onfocus="javascript:highLight('mail',true)" onblur="javascript:highLight('mail',false)" />

					  <div>your message</div>
					  <textarea id="msg" name="Nachricht" class="formfeld" cols="40" rows="10" title="Please enter your message text here." onfocus="javascript:highLight('msg',true)" onblur="javascript:highLight('msg',false)"></textarea>
						
					  <div> confirmation code</div>
					  <input name="noSpamNum" type="hidden" value="8" />
					  <input type="hidden" name="token" value="75bedbeca5921cee93f467eb0a4c7b7c" />
					  <input id="spam" name="noSpam" class="formfeld" size="25" title="Please enter the numbers you see in the image on the right!" onfocus="javascript:highLight('spam',true)" onblur="javascript:highLight('spam',false)" />
					  <img id="noSpamImg" src="nospam/8.jpg" alt="Your contribution to spam prevention!" title="Spam protection. Please enter numbers in textfield on the left."/>

				  	<input id="send" type="submit" value="send" class="formButton" title="Click here to send your message." target="_self"/>
						<input id="address" name="Address" title="Feel free to not enter your address here" type="text" size="10"/>
					</form>
					<div>
						Discuss tbGTD on...<br>
						<a href="http://groups.google.com/group/tiddlywiki/browse_frm/thread/bd6a9784706784f6" target="_blank" title="external link to the tiddlywiki discussion group on google">the tiddlywiki discussion group...</a><br>
						<a href="http://groups.google.com/group/gtd-tiddlywiki/browse_frm/thread/cdd032c9425af8bd" target="_blank" title="external link to the tiddlywiki GTD discussion group on google">the tiddlywiki GTD discussion group...</a>

					</div>
				</div>  </body>
</html>%/
| contact |>|h
|''name''|nameHere|
|''email''|emailHere|
|''address''||
|''phone''||
!project roles
|project |role |h
|||
!notes
Contexts specify the type of activity you will do to complete an action...
/%
|Name|cycleTags|
|Source|http://lastfm.tiddlyspot.com/#cycleTags|
|Version|0.1.1|
|Author|Tobias Beer|
|License||''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
|~CoreVersion|2.5|
|Type|script|
|Requires|[[InlineJavascriptPlugin]] [[on tiddlytools|http://www.tiddlytools.com/#InlineJavascriptPlugin]]|
|Overrides||
|Description|allows to cycle through a defined list of tags|
|Discusson|[[tiddlywiki google group|http://groups.google.com/group/tiddlywiki/browse_frm/thread/de78a3e21b1a0b97]].

usage:
	<<tiddler cycleTags with: TagList Tiddler>>

where:
	TagList - (required)
		refers to a tiddler with a defined list of tags see cycleTagsInfo
	Tiddler - (optional) 
		when defined, sets the tags on the specified tiddler instead of the one calling the script

%/<script>
var tid = "$2";
if (tid!="$"+"2") {
  tid = store.getTiddler(tid);
  if (tid==null) return "@@color:red;invalid tiddler reference@@";
}
else {
  tid = store.getTiddler(story.findContainingTiddler(place).getAttribute('tiddler'));
}
if (tid == undefined) return;
var def="$1";
if (store.getTiddler(def)==undefined) return "@@color:red;invalid taglist@@";
var lines=store.getTiddlerText(def).split("\n");
var next=-1;
var i=0;
remove="";
while (next<0 && i<lines.length) {
  var parts=lines[i].split('###');
  if (tid.tags.contains(parts[0])) {
    next=i+1;
    remove=parts[0];
  }
  i++;
}

i>=lines.length?next=0:next=i;
parts=lines[next].split('###');

var tag = parts[0];
parts[1]!=undefined?text = parts[1]:text = "set "+ tag;
parts[2]!=undefined?tooltip = parts[2]:tooltip = "assign '"+ tag + "' to this tiddler";
parts[3]!=undefined?cls = parts[3]:cls = "";
parts[4]!=undefined?rbutton = parts[4]:rbutton = "";

if (remove != "" && rbutton != "") {
  var btn = createTiddlyButton(place,rbutton,"fjern tag " + remove,function(){store.setTiddlerTag(this.tid,0,this.removeTag); story.refreshTiddler(story.findContainingTiddler(this).getAttribute('tiddler'),null,true);},cls);
  btn.removeTag = remove;
  btn.tid = tid.title;
}

var btn = createTiddlyButton(place,text,tooltip,function(){store.setTiddlerTag(this.tid,1,this.switchTag);store.setTiddlerTag(this.tid,0,this.removeTag);story.refreshTiddler(story.findContainingTiddler(this).getAttribute('tiddler'),null,true);},cls);
btn.switchTag = parts[0];
btn.removeTag = remove;
btn.tid = tid.title;
</script>
<<tiddler fag##form with: dansk>>
/%
!html
Skriv titlen på lektien herunder - tilføj evt. en kommentar med information i nederste felt.
Klik på knappen {{button{påmind}}} for at angive hvornår lektien er til...
|noborder|k
|width:50%;padding:30px 40px 30px 10px;line-height:1em;font-size:2em;text-align:justify;font-family:'Verdana,sans-serif';<<tiddler download##info>>|<html><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" WIDTH="460" HEIGHT="345" id="tbGtdDownload"><PARAM NAME=movie VALUE="http://www.box.net//static/flash/box_explorer.swf?widget_hash=3l212wso4g&v=0&cl=0"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF><embed src="http://www.box.net//static/flash/box_explorer.swf?widget_hash=3l212wso4g&v=0&cl=0" width="460" height="345" wmode="transparent" type="application/x-shockwave-flash"></embed></OBJECT></html>|
/%
!info
tbGTD can now be [[downloaded from box.net|http://www.box.net/shared/3l212wso4g]]. If you feel like you are missing some important piece of information, have a look at the [[help section|help]] or [[contact me]]...

@@color:#F99;display:block;padding-top:20px;font-size:14px; Please use the clean and empty version as provided to your right, even if you could download tbGTD -- just like any other ~TiddlyWiki -- using a browser-link.@@
!%/
!!...is as simple as
<<tiddler iframe##flickr>>

This is wonderful, isn't it? See more examples for embedding content using [[iFrames...|iframe]]
{{sidebarTitle{[[tagged excludeList:|excludeLists]]}}}
<<list filter [tag[excludeLists]]>>

<<list filter [tag[excludeSearch]]>>
<<forEachTiddler where 'tiddler.tags.contains ("lektie")' write  '"|"+tiddler.title+"|<<tiddler fETnesT##nest with: [["+tiddler.title+"]][["+tiddler.data("lektierows=\"8\"")+"]] [["+tiddler.data("kommentarerrows=\"6\"")+"]]\>\>|\n"'>>
/%
!nest
+++[Click to see Field a:|of tiddler: $1]...
$2
$3
=== 
!end nest %/
<<forEachTiddler where 'tiddler.tags.contains ("lektie")' write  '"|"+tiddler.title+"| <<tiddler fETnesT##nest2 with: [["+tiddler.title+"]][["+tiddler.data("lektierows=\"8\"")+"]] [["+tiddler.data("kommentarerrows=\"6\"")+"]]\>\> |"+tiddler.data("lektierows=\"8\"")+"|"+tiddler.data("kommentarerrows=\"6\"")+"|\n"'>>
/%
!nest2
+++[a & b:|of tiddler: $1]...
+++[a|of tiddler: $1]...$2===
+++[b|of tiddler: $1]...$3===
=== 
!end nest2 %/
|widetable noborder|k
| <<formTiddler [[fagForm]]>><<tiddler NyLektieKnap with:  -(0DD/MM-/YY.uge.0WW.kl.0hh.mm) [[Ny lektie]]>> |c
|<<tiddler fag##form with: {{DataTiddler.getData("fag", "titel", "")}} "!""IKKE er">>|
|<<tiddler fag##form with: {{DataTiddler.getData("fag", "titel", "")}} """ER">>|
/%
!form
<<forEachTiddler where 'tiddler.tags.contains("lektie") && tiddler.fields["tt_alias"] && tiddler.fields["tt_alias"].contains("$1")&& $2 tiddler.tags.contains("#færdig")' 
sortBy 'tiddler.title.toUpperCase()'
script
 '
function getFirstLine(s) {
 var m = s.match(/\s*(.*)/);
 return m != null && m.length >= 1 ? m[1] : "";
 }
 ' 
write 
 '(index < 20)? "|"+(index+1)+"|[["+tiddler.fields["tt_scope"]+"]]  |[["+tiddler.fields["tt_user"]+"]] |((&larr;([["+tiddler.data("lektierows=\"8\"")+"|"+tiddler.title+"]])))[["+tiddler.title+"]]((&rarr;([["+tiddler.data("kommentarerrows=\"6\"")+"|"+tiddler.title+"]])))((*(Ændret: "+tiddler.modified.formatString ("DDD d. 0DD/0MM-YYYY uge WW Kl: 0hh:0mm:0ss")+" Oprettet: "+tiddler.created.formatString ("DDD d. 0DD/0MM-YYYY uge WW Kl: 0hh:0mm:0ss")+")))|((&rarr;(<<showReminders [[title:"+tiddler.title+"]]$)))))<<tiddler cycleTags with: TagList [["+tiddler.title+"]]\>\>|\n" : ""'
              begin '"| Oversigt over (($1lektier(-som $3 færdige))) |c\n|sortable|k\n" 
+"| $2$3 færdig | $2tid | $2hvem | $2lektie |$2påmindelser|h\n"' 
end 'count+" lektier ialt\n"' none '"ingen lektier \n"'>>
!end form
!link
"+tiddler.title+"
!end link
!beskrivelse
((*([["+tiddler.data("lektierows=\"8\"")+"|"+tiddler.title+"]])))
!end beskrivelse
%/
<data>{"titel":""}</data>
+++[fag|indskriv fag og opdatér]{{black {
<html>
 <table class='borderless' style='width:10em'><tr valign='center'>
 <tr>
 <td style='width:10em'>
	<div class='small'><span macro='tiddler fagForm##script'></span></div>
	<div class='editor' <input name=titel type=text /></div>
</td></tr></table></span></html>}}}===
/%
!script
<script label="Opdatér fag" title="opdatér tiddlerens indhold">
	var here=story.findContainingTiddler(place); if (!here) return false;
	story.refreshTiddler(here.getAttribute("tiddler"),null,true);
	return false;
</script><script>
	if ("$1"!="$"+"1") place.lastChild.innerHTML="$1";
	if ("$2"!="$"+"2") place.lastChild.title="$2";
</script> 
!end script
!form
+++[Indskriv fag]...<<formTiddler fagForm>>===
!end form %/
|!where|!what|!status|!kudos|!reference|
|TiddlersBarPlugin |DefaultTiddlers do not show up on startup ...no clue why that is <br> ''resolved'': I shouldn't have put {{{refresh='none'}}} in the tiddlersbar section of pagetemplate ...tough I don't know how and why that slipped in there |color:green;''done'' |to myself | - |
|~TaggerPluginGTD (nowaday [[x-tagger]]) |<<tiddler 'fixed stuff##taggerLineBreaks'>>|color:green;''done'' |to myself | [[StyleSheet]] |
|ReminderMacros |<<tiddler 'fixed stuff##addReminder'>>|color:green;''done'' |[[Eric Schulman|http://www.tiddlytools.com]]<br><br>[[FND|http://devpad.tiddlyspot.com/]]|[[google groups |http://groups.google.com/group/TiddlyWiki/browse_frm/thread/fa3b0aca8277d460?hl=en]]|
|PopupMacro |<<tiddler 'fixed stuff##bigPopup'>>|color:green;''done'' |myself | [[topMenuL]] |
/%
!addReminder
tried to close ''add reminder'' form once I press the ok button by adding...
{{{form.parentNode.parentNode.style.display="none";}}} at the end of...
{{{window.addReminderToTiddler}}} ...yet that didn't work
@@color:green;solution@@: add {{{form.parentNode.parentNode.previousSibling.onclick();}}}
right before refresh: {{{window.story.refreshTiddler(title,1,true);}}}
!taggerLineBreaks
popup included in ''#~ViewTemplateToolbar'' in tbGtdTheme doesn't render correctly ...too many linebreaks (buttons rendered at width=100%?)
@@color:green;solution@@: added necessary style information for tagger links (display:inline;) to StyleSheet
!bigPopup
'' 'new' popup'' and {{{<<tag tagName>>}}} popups in MainMenu and elsewhere render too large vertical margins between ''<li>'' elements in ''~IE7''
@@color:green;solution@@: somehow it doesn't seem to be a good idea
to insert a blank space right after an asterisk marking list items
therefore, I removed the asterisks and the item height of the lists now is fine
!end%/
!!Links
{{{
WikiWord
~EscapedWikiWord
[[Wiki Word With Spaces]]
[[display text|WikiWord]]
http://www.externalLink.com
[[title|URL]]
[img[my.jpg][link]]
[>img[alias|path/my.jpg][link]]

to filesystem...
[[folder/file]]         — relative path
file://///server/share  — win share
file:///c:/folder/file  — win local
file://folder/file      — unix local
}}}
!!Basics
{{{
''bold''
//italic//
__underline__
--strikethrough--
~~subscript~~
^^superscript^^
@@highlight@@
{{{monospaced}}}
{{{
multiline code
 }}}
}}}
!!Headings & lists
{{{
!h1
!!h2
!!!h3 ...
#ol1
##ol2
###ol3 ...
*ul1
**ul2
***ul3 ...
;definition title
:definition

nested example...
*bullet
*#number
*#;item
*#:definition

multiline styled contents...
#{{block{
!heading
still bullet1
 }}}
#bullet2
}}}
!!Block quotes
{{{
>indent1
>>indent2
>>>indent3 ...
<<<
	blockquoted
<<<
}}}
!!Dashes & rules
{{{
-- em dash
---- horizontal rule
}}}
!!Tables
{{{
|cssClass|k
|table caption|c
|heading|heading|h
|table|footer|f
|!heading|!heading|
|left-aligned | right-aligned|
| centered |background:blue;coloured|
|>|colspan|
|rowspan|with<br />linebreak|
|~|whatever|

|NoB|k       
.NoB,.NoB th,.NoB thead,.NoB tbody,.NoB tr,.NoB td
{border:0 !important;}   /*in StyleSheet*/
}}}
!!Escaping
{{{
"""escaped"""
/%hidden%/

/%
!section
hidden section content
!end%/
}}}
!!Markup & style
{{{
@@cssProperty:cssValue; text@@
{{{class{content styled via css class}}}
<html>valid xHTML markup</html>
linebreak: <br /> <br>
entities:  &amp; &#171;
}}}
!!Macros
{{{
tid = [[TidName]] or TidName or 'tid name'
<<tiddler tid>>
<<tiddler 'tid##section'>>
<<tiddler 'tid::slice'>>
<<tabs id label tip tid ...>>
<<slider id tid label tip>>
<<today [format]>>
<<version>>

<<timeline [date][len][format]>>
<<list [all|missing|default|
      orphans|shadowed|touched|
      filter>>
<<allTags>>
<<tag name [label] [tip]>>
<<tags [tid]>>
<<tagging [tag]>>

<<newJournal [format]>>
<<newTiddler label:tidName
    text:"text" tag:tag tag:tag
    accessKey:key focus:field>>
<<saveChanges [label] [tip]>>
<<search [term]>>
<<closeAll>>
<<permaview>>
}}}
!!Startup paramifiers
{{{
#[open:]WikiWord
#[open:]WikiWord%20WikiWord…
#start:safe
#search:text
#tag:text
#newTiddler:WikiWord
#newJournal:format
}}}
!!Date formats
{{{
YYYY MMM DDD — year month day full
YY MM DD — 2 digit nums
0MM 0DD — leading zero
mmm ddd — short names
DDth — with suffix
WW — week num
wYY with week number
hh mm ss — hours min sec
0hh 0mm 0ss — leading zero
am AM or pm PM — indicator
hh12 — hours by 12
}}}
<<tiddler {{'gChart##'+(tiddler&&tiddler.title=='gChart'?'info':'plot');}} with:
{{'$1'=='$'+'2'?'':'$1';}}
{{var a=('$2'=='$'+'2'?'':'$2').split(':::');a.length>1?a[0]:'';}}
{{var t=('$2'=='$'+'2'?'google chart':'$2').split(':::');t[t.length-1];}}
{{var l=('$3'=='$'+'3'?'#':'$3').split('<');l[l.length-1];}}
{{var t=('$3'=='$'+'3'?'#':'$3');tgt=t.split('<');t=='#'||tgt.length>1?'_self':'_blank';}}
{{'$4'=='$'+'4'?'':'$4';}}
{{'$5'=='$'+'5'?'':'$5';}}
>>/%
!plot
<html><a href='$4' target='$5'><img src='http://chart.apis.google.com/chart?$1' align='$2' title='$3' alt='$3' style='$6' class='$7' /></a></html>
!info
These parameters are available to embed [[google charts...|http://code.google.com/intl/en-en/apis/chart/basics.html]] using this transclusion...
{{{<<tiddler gChart with: '#1' '#2' '#3' '#4' '#5'>>}}}
#the chart code
#{{{title}}} or {{{align:::title}}} where align is any valid value for the HTML align attribute of images, e.g. left, right, center
#a URL opened when clicking the image, which is opened in a new window unless you prefix the URL with {{{<}}}
#css styles directly applied to the image
#css class for your image
''Note:'' You may need to enclose your parameters in ''{{{'}}}''quotes''{{{'}}}'' or - to be on the safe side - in ''{{{[[}}}''double-square brackets ''{{{]]}}}''.
!%/
<script>
var c,a,t,l,tgt,img,lnk;
var tmpOld="<html><a href='$4' target='$5'><img src='http://chart.apis.google.com/chart?$1' align='$2' title='$3' alt='$3' style='$6' class='$7' /></a></html>";
c='$1'
if(c!='$'+'1'){
	wikify("*ertertert",place);
}
</script>
!usage
{{{[img[gelogo05-1b.png]]}}}
[img[gelogo05-1b.png]]
!notes
//none//
!type
image/png
!file
./gelogo05-1b.png
!url

!data
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK4AAADkCAYAAAABzx/kAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oCAxcSHGKY8A4AACAASURBVHja7F13eFTl8p4t6Q1EEkIIhNC7gAgCUgUEG14UvXpFmt4rCCh4UfwJCChekYtiB4QAFhRR4dKREooUKdKbkADp20/Z0895f39s9pgAIUECWHaeZ55N2T179uyc+eabeecdCwAKybXJ1q1b0bVrV0voStw4sYQMNyR/RLGGLsG1ydSpU807v2bNmli0aFHIE4Q87h9D6tWrhyeeeILuv/9+UhSFtm3bRv/73/9o165dofDhegmAkF6jvvnmm/D5fAiKrutYv3497rnnHlztsTIzM58OXdPy1R66da9N0tLS8MUXX1BCQgJ5PB7SNI3i4+OpU6dORESUnp6OrKyscj1vcnIyunfvTk2bNqWdO3fOPXjwIDVr1owmTZoU8tqXkZDhXqM0btyYGjRoQAAoOjqaIiIiyOFwULVq1ah79+7UoUOHioQap//v//6PnnjiCapatSoREbndblq4cCHVrl0bFy5cCBlvyHArP9SqVq0aybJMDMNQUlIShYeHk81mI1mWqVmzZuWl0uqNGzcuecSIEURE5HK5yGq1UtWqVWncuHG0e/fu0EUOZRUqX2699RYyDI2IDIqICCNVlSkmJooURSKLBVRUVHTF12dkzP/3iBH/itV1lXw+D8XGRpOiSCTLIhEZNGjQoNBFDnncypfs7GwSBIFsNhtFRERQWFgYMQxDkZGRpGkaCYJQ5mvr16+Pzz5bRJIkkSiKZLfbSdd1ioiIIMMwyDAMSktLo+TkZBQUFITChZDHrTxp0qQpHTlyhMLCwshms5EkSWSz2cgwDCIi4jiuzNe2a9eOWrVqRZqmkd1uJ8MwSNM0qlKlCoWFhZGqqhQXF0eRkZGhCx0y3MqV+fMXWJYtW2YaLMuyFBMTQ7quk91uv6LHbd68OamqSna7nWw2m5nqEUXR9OCHDx8mSZJCFzpkuJUvy5Ytox9//JFsNhtFRUWRKIpktVrJMIwrGl1aWholJCSQ3W4nURQpIiKCrFarabiCINDXX39NoTAhZLjXRXJz8y2LFy+mwsJCiouLI7fbTeHh4SSKYpkeNyUlBampqWZmIjw8nKxWK4WFhVG1atVI0zSaN29eKEwIGe71la++WmpZtmwZaZpG4eHhREQkyzLxPH/Z59etW5fS0tKI4zjSNI2io6NJURSy2+3k8/lo8eLF9N5779H8+fND3jZkuNdXli5dSnl5eZSUlESqqhIRkSiKl31ujRo1KCkpieLi4kjTNJIkiVRVJZvNRmvXrqVJkybR2bPZIaMNGe71l23bdlhWr15LRFaKjIwmj8dXZlahb9++xVkIhWRZpejoWIqMjKb33vuAxo9/mXJz80NGGzLcGycHDhwgSZLMdNizzz572eelp6eT3W4nhmGoatWqJMsyffHFFzR79mzKyckJGW15EkIaVa62atUKZ86cga7rOHz48GXRYX379sWFCxcgiiIAQBAEfPLJJ0hLS0PoGlZMQx73N8q5c+cu6xUPHjxoOX78OAEgTdMu+9o2bdpQQkIChYWFERHRkiVLaOrUqZSdHYppQ6FCJcodd9yBJ598EgMHDkR6ejqIAnDGsp6/a9cu0jSNwsLCaOvWrfdc/P8mTZpQfHw8Wa1W+vrrr+nNN9+kvLy8kNGGQoXK0/79+2Pbtm3QNA0Mw2D16tUYMGAAhg4dWuay3rt3b/h8PuTn56NWrVrflfxfu3btkJeXBwBYtWoVWrZsaR5n4cKFoVChghq6CFfQlJSUSYcPH4Ysy5AkyexwyM7OxmuvvYaUlJTLGlpqaiqOHTsGv9+P+vXr4+JuCQD44Ycf0KVLl6Lfcl7Z2dn3hAw3ZKBlGYeld+/e93McB0VR4PP54PF44PF4TAPesGED2rRpc1njXb16NSRJKmW4KSkpOHnyJAoKCtCrVy8Uv0/ilc6jevUkdOnSDS+9NAFffbUU27btwDfffIuhQ4ejVq3aCBluSC/Rp5566jNVVSHLMtxuN3w+H3RdB8uycLvdAIBz585h4MCBlxjQ6NGjoSgK7r33XvN/7777Lniex/Dhw8s1uGbNmmHw4MHYunULCgvzAeiQZRGqKgPQ4XQWITNzM2rWrFkh423YsCFChvsX0TZt2uDs2bMwDAMA4PF44PP5wPO8+QgAOTk5mDRpUkZ2dnZa8LVDhgyBw+HA2LFjETRkp9OJmTNnXtGAkpOTMXz4cGzevBmKokCWRRiGBlWVwXEMGMYLUfRDkgRwHIPp06eXa5CdO3dGx44dQ4b7V9Jx48Zh586dCHpeSZKg67r5ezAXq6pq9pw5czJq166dAYAGDx4Mn8+H06dPY86cOXC5XNiyZQuSk5NRlsEOHDgQy5cvL5Xf9fs5sKzPVJ/PA4bxQpIEADqOHz+OK3nThg0bYtq0aejWrdufynBDHRDlyMyZMy1t27ZFjx49qE2bNvvr1auXabFYGuXn53dzOp2xiYmJlJCQQB06dEh75plnBiuKQh07dhx83333UVhYGKWkpNAzzzxDXq+XXn/9dcrP/7WU26tXL/A8T+3ataMFCxZQhw4dqEqVKgSA/H4/KYpCmqZQZGSk2R1hsVjIZrMREZGiKBQXF0eJiYllnn/37t2pevXqdOrUqT/V9xIy3ArI/v37TWObOnVq7KRJk0pBvmrXro02bdrQww8/TAMHDqSnnnqKZFmm6OhokmWZDMMgnuepY8eO9PTTTyMlJYVuvfVWGjt2LHXs2JESEhLMY/n9fuI4jsLDwyk2NpYkyWJie0sablhYGFksFioqKiKv13vZ805OTsb3339Pn3/+eakb5s8gISabSpZ//OMfmDVrFiUmJpodu5IkUc2aNU0vKUkSxcXFkSRJtHfvXpIkyfxbo0aNzOd6vV6Kjo4kRVHIMIxLOiWIiGbPfp8mTJhwWaOcOHEiRo4cSd26daOTJ0/+qQw35HErSbZu3ZrWtWvXcz/++CPl5ORQYmIiGYZBERERFB8fT4IgUFZWFuXk5NDhw4fp4MGDtH//frJYLMQwDN177720Y8cOSkhIoO7du1Pfvn2pVatWZLFYKCYmhqzWX4ucsixTXl4e5eXl0RdffEETJky45HwaN26MNWvW0I8//vinM9qQ4VaidO3a9RwRUUpKion2ql69OhER+Xw+ysjIoJkzZ1J+fr6lb9++FTpm06ZN0aJFM6pfvz4lJiaaoYIgCLRr1y5atWqN5ejRo9SrVy/88MMPpYyzdevWlJKSQlOnTqUBAwaESr4hvWLuNbt69eoo9nZgGMYs765fvx4NGjS4YTv79evXw+l0olGjRn/KIkUIZFNJ0rNnT3z88cdp8+bNI8Mw6N5776UHH3yQRo4cSf379ycAtGzZMurUqdN131Q0b94ctWrVop9++ulPGSaEPG4l6e23345169aZpeDt27dfwtRYv379rIULF+LIkSMYPHjwdfWCgwcPBsMweOGFFxAq+Yb0stq4cWNs2rQJAFBYWAhZlgEA77zzDkrgHqwAutWoUYNbsWIF8vPz8e677+KRRx4pE6hzLTpjxgwAQI8ePUKGG9JLtXbt2lizZg0AwOv1oqCgAADw2WefXVLNyszMjAyWkX/55RcAQFZWFjZu3Ihnn30Wd999d6UZ2eeffw4AuO2220KGG9LS2qhRI3z11VcAALfbjfz8fADAvn370LZtW1wBKonly5ejpPj9fixevBjt27evFEP77LPPAAD//Oc/Q4Yb0l+1RYsWmD9/PgCAYRjk5uaaHrRnz57lGktxGAGn04kLFy6YBvz111+ja9eu12xsL7/8MgzDwIEDB3D//fejTp06CBnuX1ynTJmCDz/80AwPeJ4Hy7LIzc3FP/7xjwoZyH333Qev12sCdZxOpxkb79y585qRXJ07d8bRo0cBAKIoYu3atZgxYwbGjBmDbt26VWpYEjLc3zeo3Bb8ed68eaaHZFkWPM9DkiTuhRdeWFnR49WoUQMrV64s3tAFsLaKIoHnWQA6li1biuzs7KnXcs5PPPEEzpw5Y0IyAUDTNHg8HuzevRsTJ05Ehw4dEDLcv4DOmTMHsiyD53nIsozCwkIAwJtvvnk6MzOz7dUca/jw4VAUBYahwe12wuVygGG8AHTk5eVg4MCHi671fHv37o2VK1ciOzsbuq4X43tl05AZhsEPP/yA0aNH/+HCiZBBVmwSzn2vvfZaviRJMAwDTqcTuq5D13UsWbIEdevWPX21x0xKSsKaNWugqjJ8Po8JFGdZHwAd7747C7/xXC/525133onx48fj008/xaZNm8xqHgAYhgFd13Hw4EGMGzfuD8PtEDLMCuhLL70ERVEAAGfPng0Cx6+5jNu3b1/k5l6AKPrBcQzy8nLM1pxXX30F1ytG79SpE6ZNm4bMzEwAKOWFN2zYgPvvvx8hw/2D65gxY8z+svz8fLAsCwDYv38/2rVrd81f8LvvzkJOznkAuqlHjhxCnz69rrvxJCUlYciQIVi5cqVpvKqqwuFwYObMmd/9nruJQ8ZZTttOsKu3qKgIXq8XAHD8+HE89dRTqLybYxTWrVuDo0cPY8OGdXjmmeE31OOlpKRg1KhROHDggOl5CwoKsGHDBtx1110IGe4fSEeMGIGioiLT0wqCAADIzc0tGjVq1Mbrs4y/dlONpEmTJpg2bRqcTqfZ87Zp0yY8+OCDCBnuH0Cffvpp5OTkmDtvj8cDQRCgKApmzJgx9c/++e+//35s2bLF9L6ZmZno0qULQob7O9Ynn3wCRUUFMAwNPM+aBQYA+Pjjj/FXYZFp164d3n//faiqCgA4fPjwDcUThwz3KvTRRx/B6dMnAeiQJAE8z4JhGPA8jy+//BJ/NlKN8rRmzZp48803zRt32bJlIcP9vendd/fAkSOHAOjw+TxQFAkejwsAsGnTpj90lela9a233gIQmAo/cuRIhAz3d6K9evXE3r17AOhwu53Izj4LQeChqjJOnDiB/v37/6VZFNPS0rB27VoYhoGTJ0+iefPmCBnuTdYePbphz55dAHR4vW44HIXQdRWSJIBlfZflBfsraqdOncwSdzHeN2S4N1JLctB27NjRNFpFkVBQkGfiBdxuJyZMeClktCV08eLFJuLsZndX/IU9bY/iPjEdLpcDbrfT3JTl5Jz/zViBP7P27dsXDocDuq7jo48+ChnujdbmzZvjm2++AQBwHAOfzwNR9Juwwu++W4akpOohw71I09PTsXfvXgDAL7/8giZNmiBkuDeq5aZxPaxbvxKAgvyC85BkDpouguM9AFSsXbsaTZs2DRltGfrJJ59A0zSoqop//etfN+06/aV4FerVq4tp06ZRz549ieM5qlKlCimKQk6nk2JjYmn/gf30yiuv0LFjx0KDRMqQnJwck8fs9ttvD1EwXW9JT0/HxImv0iMPP0JEIFmWiYjIarVSjaQadCHnAn388cd04MDBkNFeQfLy8kzivVatWt208/hLeNzk5GS8/PLLNGTIENINnTxeD8XGxpIsyxQTHUMGDJo+fTp9Om9hyGjLEUEQyGq1kt/vp6pVq1JqaupNofv803vcnj17YeLEiTRkyBAiClB3hoXZyW63U1xcHOXm5dIHH3xAn3wcmlJeIU9XzBoJgKKioigqKirkcStbGjVqhAcffJAeffRRCgsLI47jKCYmhiIiIkhVVYoIj6Bdu3bRf978b8hoKyjVq1cnTdMoKiqKwsPDSdf1kOFWpqSmpuKRRx6hESNGUEJCAomiSFFRUWS1Wk2WcFESKTU1lYYOexJNmzW4ZMkra+zpX1natm1LFouF7HY7uVwuSk9PDxluZYphGNSwYUPSdZ3sdjtZLBZiWZZEUSSbzUZWq5UEQaAO7TvQgvkLaP78+TRq9LNo1qyJacBXGnv6V5TGjRujTZs2ZLPZSNM0ys7Opot5eS8nixYtQkpKyr6tW7c+XWkn82fPOz777D+xe/dOADpUVYbDUWg2JBYVFcDjcYHjGBiGBkDH0aOHMWXKZHTocEcol3uRfvDBBxAEAQzDQNf1Co2qevqZIdi0eT1cLge2bNmCQYMGIVSAqKB26HAH5s2bY7Z++/0cXC4HJEmAKPrN3zmOgaYpkCQBp06dwKefzv1T0hf9Fh06dCgKCwtNgpGcnJxyuyKGDRuGCzlZkBU/dF0Fx3HYu3cv+vW7D39Iw23ZsiWaNWuGGwuuycDQoYNN7xv0uMFyL8N44fW64fN5IMsiAB2CwCM3NxeffPLJ77Zp8Eboww8/jNOnT0PTNBNUnpGRccXr0a1bt+LmSxUerwOFhflmi//ixZ//sQw3JSUFY8eOxaFDh5CdnY2VK1dWCsnb1Wjr1q3w/vuzUVCQB0AHxzGliDj8fg45Oefh8bjMqY6ADo/Hha+/XnJD2sZvJi/axX8bPXq02X937tw5AMD58+fL5R8LEvsBKvILLhRPw5SgaRrOnbuA5s2ujQL1qp6cmpqKOnXqrLxauqGgvvLKKyazYbCH/8svv7wpvUyDBw/CTz/tBqDDMDQz1lUUyQSRS5IA3u+DX2AgK35ougSXuxD/W/kdHn1swJ/aA/fu3RsffPCB2fHr8/ng8/kAoNyxrrfddhsOHz4cADHxXrg9RTAMDQ6HAyzLoqjIiRbNW19/w23UqBGmT5+OU6dO4eTJk+yXX355etCgQVdFO3T33Xfjxx9/NFkOCwsLIYoiNE3DY489dlOMoGnTxvjww/eRlXXGDB98Pg88Hpc5K1fTRcgKD473QBAZAAoABTm5Wdi2fRMeeuihP1UvWrNmzTB+/HgTBRZszw/OLf7+++/LpWnq168fWJaF3++HX2AgiCxY1mfeBEeOHENanfrX13Dr1KmDFStWgOd5qKpqBucFBQX497//jdTU1AqdQL9+/eBwOAAEiIx5njdjnueff/6mfvHDhw/F1q1bIAg8AB0M4wXL+sDzLHyME7LCQ9NF+AUffIwTgsjAgFxsxMC6deswaNCgPwzvVkmtV68eOnbsiCFDhuDDDz/EoUOHoGkagMDQbb/fb5KiHD58GN27dy/3Mz744INQVRWCIECUOPgFBl6vG6IoQtd1TJky7ZoJ/cot+T700EPUq1cvstvtxLIsxcTEEMuyVK1aNZo8eTK5XC4aNmwY5s+/csm0Zs2aFB8fTyzLmmVDwzDI7XaTYRg3NT85b958S3JyEl588UUaPnw4xcfHkyRJgfO06OZkRyIim81Guq4TwzCkKApVSahOffr0oZ49e9Lhw4fppZdewrJly+js2bMVLl7UqFEDVapUocTEREpKSqLExESqWrUqRUZGUr169chms5Hdbi913TRNI13XieM4UlWVRFEknueJ4zjieZ5EUQxUByMiKCoqimJjYykmJoZiYmKoatWqVK1aNYqPj6cVK1aYv0dERJBhGGaBJioqigzDoKpVq9LPP/9MEyZMoM2bN5f7uRRF+TVXLrKk6zrFxyeQ1Wqn/fv309KlS+dMmvTq9c3jrlr1P3MJlWURPp8HbrcTgsCDYQLExn/729/KvQsnTpwIQRCgaRoYhgHHcSZP1e+h+S6of/vb37B9+3YYhgFVVQPTylk3WM4D3u+FX/DAL7qK1QFRFMHzvBn/AcDBgwfx5ptvokWLFvvK5+9KxqxZs8DzPLKyzkAQWWi6CAMyND0QSpVUXddRWpRSGgxtRImFIDIQJRaixEKSOaiaAN2QYECGARm6EZgEHzy2JEnw+XwmAUpQVqxYgZYtW+Jq4mNFUaCqKiRJgsvlMuPk4cOHv1UZ31O5Hjd4lwend4eHh5OmaWS1Wik+Pp6IrDR8+HBq3LgxrjRTS9M002NFR0eTJElkt9tp9+7dZQ5Rvhny7bffWtLT0/HUU0/R4MGDqU6dVBJFkRRVIpvNTjablXSdyIBGdrudFCkw3TwqKopEUSRRFKlVq1YUGxtLe/bsmVPe+xUW5ltGjx6NmJgYqlWrFjGsl8LDq5CFLGQYBlksqvllGYYRiO+Kr2Og+uc3HZDFEhhYbbfbKSwsjGxWG0myRDabzYQiBj118DgWMkhVVbMaZrVazaHYx44do1mzZtGOHTvo1KlTFV5BdF0nTdPIZrORLMuk6zrpuk5LliwhwzCmVeQYw4YNxZo1qykqKoaysrIsV13y9Xg8pGkaaZpmfsBg+ZRlWVJVlfr27UsPPPDAFY/jdDrNZVZVVbJaraTrOi1fvpxyc3N/V5iArKwsi8VioX/+85+0c+duEkWREuKrUlhYOIliAMdrswZAOxEREWS1WsntdlNERATdcssttG7dOhoxYgR9//33886dOxdbGkNRBz179kIQuUZEtGbNGtq9ezeFhYVRREQE+f1+YthAKMJxPpIkPxmGShaLQUQ6GYZKqiqRLAumoUZERFBkZCRFRESQxWIhRVHIL/jNqeuqqpIsy+bNJcsyaZpGYWFhZgiRkJBAfr/fsWXLlmkvvvhi3wceeOD7xYsXk8VioXbt2mHRokWo6CouyzKpqkqRkZGUmJhIp06dokWLFtH8+fP5c+fOlfnaFi2a4eWXx6N//wdp1apV9MUXX9Bbb72F1q1b46pChfvu64eTJ48D0MGyPpOeKPh7cMO1d+9etG5ddoqja9eu4HkeoijC5XJB0zQcPXr0d7+hqVWrFqZMmYK8vJxAUUIMbNh4vxui5ENRUZG5eREEIfujjz7KqFu3bsbljvWvf/0LR44cwezZszF06NBSn3vs2LHw+znz+JLMQVH9YLhCcH4H/KILvOAEyxeB4QrBC05IiheqJkIQWTCsG25PEdyeInh9TjO88fqc4HgvFFUAoJoqK37wfh8URcGpU6eyv/nmm4zp06dnDBw4cM2iRYsSAdgaNmx4z8cffwyXy4XCwkLMmDGjQm1Nffv2hcvlgt/vN0OOcePGlfu6J574e6kCUUADsnz5ctSrVw9XlQ4bOfJZnDhxzDxYsMokSQL8fr8Zw7zyStlkxLVq1cKRI0egKEpgtymKmDBhwh9mF96pUyesWbOq+Bqo8HiLwLAu84spLCzEiy++mJGZmZl28WvvuOMOLFmyxNyt67qO77//vlT18LbbbsO2bZmQFT/8gg+SzCEnNwuqxkNWWAiiFyznhNdXCIZ1QJR80HS/WUDheRaSJEDXVTM3HcRksKwPWVlnsG/fT9iwYR0WL16I6dNfx9ixz6NXr15o3rz5Jefdvn37xB9++GFqyWjaMIxSgwfL5l97UmNZ1twnrFy58orZp4ULM/Dvf48znYOmKWAYL3JzL5hFD5ZlS1G7XsWmpT927NgGTVMA6BBFPwwjsFkIEh9nZmZecVLi7NmzzYuwdevWCqfSfk/1+pdfHg+nswiACo73mhRNl2O7qV27NiZNetXkI/P7uVJfzq5dP+Kuu36tHE6a9GqxR1QgyRwkmQPDuiGILHRDvsRj+gUGDMOgoKAAx48fx7Zt27B06VLMmjULY8eOxZAhQ9CtWze0atXqqidYjhkz5qCiKEW6rsPlcpljrc6dO1cup8KUKVNygjepw+FAnz59rvj8f/97nFnJdDqLkJeXY3ZcMwxj8hIXU0FdfeWsYcP6ePnl8Th9+iRUVYYsixAEATzPwzAM+Hy+Ky4JPXr0OCYIAs6ePYuHH34YN6JkeT20e/euWLZsKQAVq1evvqRNe+jQoRlPP/10dmDqpApFFeBjXKYRBpdx3ZCxb98BDBkyBIG2+aY4fOQAAAUc74FuSOBYEUWFbpw8cQbbt+3C1199ixlvzcKo517A438fhDvvvBNNmzat1CJIZmZmzuTJk7VgJkDXdXAcB6/XC03TMHfuXFzhtbd8//33B4Ov/c9//oPy6K8OHz4IQIfDUQi/nzNXdYejEIIgmBmb999//7cZ7q/LWkuMGTMKmzb9AJZlIYoi/H4/AODQoUPo1avsen5+fj6WLl1aaRe5efPmeOCBB/Dqq69i/PjxpeKg66l169bBY48NvKRm37JlS2RkZJjjUd2eIsiKH5LMg+U88AsMeL8PXp8TLBeIjU+ePInnnnsORIQ3pk+Bj3Fi7br/YeKklzHwkSfRrWsfpNdtkr15c2bGjVpdBg4cmBMM6YLUS8GVNS8vr8wpmPXr1+9z6NChIgA4ffo00tPTubJxI61x7NgRKIpkTh9iWR8EgTfL70H7YhjGhEQuXLjw2j9gx44dMWPGDOzbtw+SJAEAdu3ahX79+l3ywbKzs289ePAgfqtnTEurjT59emH06OcwZ87H2LYt05zLoGkaLly4gNtvv/2mhB93390D48a9gKNHD5t7AUWRwPEeUwN5YB8EkTGVYZhiYhIOU6ZMQevWrXH77bff9DJyzZo1D7799tvQdR2SJCE3N9c8V0mSMGfOHJRR2l+pqip0Xb8i78Jtt92Gn376CZIkgef54Lw4cw/EcRz8fr+5+c/MzCy1J6hURr+RI0di//79Znnw0UcfxUXosJcOHDhQ7gTGpKQkNGvWDPfeey+mTn0NixZlYMeObcjJOW9uPoIqCIKZlD937txVJcorr2jRH+vWrQHDeGEYGhRFAsN4UViYX8pog4Zb0ng9Ho+JAzh//vzvis60cePGWLp0qXl+Pt+veIP9+/ejcePGl5zr888/zwbj/pI3X3Z2tmXo0KGdgcAg7p9++sncqEpSwLN6vV4wDGNmI4Kr+M6dOy8pclX6h23QoAFmzpxpxiXjxo1Do0aNzDfdu3dvqXFEd999N5KTk9GhQweMHj0aH3zwAbZt24asrCxwHAeG8UJVZei6ClkWzdiaZX3weFxgWRaSFKgAnT9/Hm3atLlhX3yNGjUw650ZOHR4v7lp8ngd4PhAmkqUuFJGW9Jwg8Yb/MI0TcOOHTt+d8D1YcOGYdKkSThy5AgMwzCn83i93svuZzZu3AhRFC9J95XIVmDjxo2lQgC/3w9RFCHLsomFCVbcMjIyLrt6X9cd+MmTJ80c3IABA5CcnIzDhw/jtdcCQzoGDx6MvXv34vTp0+aSqqZgkwAAIABJREFUEEyhSJIESZLg93PgeRYej8tstREEHooiQVVlFBQUwOv1QlEUFBYWonPnzjfkix8yZEgxgipgsH6BQZEjD25PERRVgKZL4P2+UkZ7seH6BZ8JXgJQamnt16/fTZ03lp2dbSmNpGuKCRMmYMOGDRBFEQCwdu1aXAzIMgwDu3fvRlJSEi7tROlw35YtWyBJEjiOM0E3QRFFEcePH0dGRgYGDRqEli1blnkDXFcaz969e5sD7bKyspCRkQFBEPDzzz+jR48eePzxx80csCzLUBQFPp8PbrcbDBOI/4I8tQzjDSToBb6Y4j6QSw4OgjYMAy6X67oP2bjrrruwZMkSc0VhOTdYzg3e7zVxAX4hYLCCyFxqqBcZsiAIkCQJeXl5pWK4FStW4MiRIzeVWO5y2qJFC2RkZEDTNBQWFqJbt27m+Q0aNAi6ruPVV1/FZQpQ3TIzM7eUQlkoCnJycrB27VpMmDABPXr0QK1atSr0eW/IrLBgUK/rurkUfP3110hKSsLGjRsRzBUWFhbC5/OZE278fj8kSYDX6wbDeCFJQnHRg4Pfz4HjGIiiaN65RUVF183jpqam4v/+7/+QnZ1tLmVerxduT75ZRWNYBzzeArCcE5LMQNX4S4y3pNFyvAeSJEGWZSxYsAAluw4URYGu61i8eDFq1qz5uzLeunXr4pNPPgEAFOfmCQBt3rwZ58+fvyT27d+/P06fPm0abE5ODhYuXIgXX3wR9evX/02bdXtJ8owuXbpQixYtTB4Cj8dDXq+XJEkilmXJ5/MRwzDE87xZ6wZAsbGxZLfbTShctWrVTNjcvffeS7GxscTzvIl9qF27NvXt25eqVq1KixcvpjZt2lC1atXMMnQQExEWFkZEhgnrCwI4gsAfSZJMwEgQQxF8XmXKY489hoyMDOrWrRvZbDZiWZYkSaIqVaqQDoMsFgvpukognSIiwyg8PJxUVSXW56PYmCpksVhMUEvJUnvw0TAMWr9+PQ0ZMoSaN2+Ozz//nMLCwkiWZXr88ccpPz+fevfujQ0bNlh+L1iO9u3bo23bttS+fXvq2LEjWrZsSbNmzaKjR4+Sz+cjIqK6deti/Pjx9N1335GiKLRq1SraunUrbd++nZo1a0bz58+3vP3227/pHCwAqGfPnhg3bhz169fPNAi73V7KCEoii4KPQexmdHQ0Wa1W8zE3N5cYhqHU1FQKCwsju91OPM+T3W4nABQdHU02m42eeeYZSk1NpR49elBqaipxHEdERG632zQOv58jQRBI0zSyWCwUExNDDRs2pIYNG1JMTAxpmkFWq5ViYmKI53l65JFHaP369ZXyBdeuXRtvvfUWde7cmVJTU0lRFBJFsfiGCtxgVrtMFovFxMkGDTL4uXXNcllcSFCiIuNp37591L59ewsR0X/+8x+8/PLLxDAMERFFR0eTrus0YsQIWrBgwe8KjPTEE09g7ty55HA4qHr16hQbG0sFBQW0c+dOslgsdN9995HX66XVq1fT0qVLad26dZV3/sk1b8WBn/cAUOD2FMLlLgDLueFyF4BhXZAVHgzrAu/3QtUEsxQZxH0GuxjOnDmD5cuX48UXX0S7du3QokUL3HXXXZg/f745oVvTNLMSc+DAAXNiYZ06ddCuXTs0b968QsvG3Xf3QFb2aRhQwHEcJEmCIAjwer3lptoqolu2ZD49ZswL+06fPmOmrYLLPMd7wLAuMKwLPsZZKk97OQ0+TxAZuD2FECUWLOc2gTSqqmPy5MkIOJDuKHLkwYAMpysfBmRwfgcM+HEh5xf8bcDvazj0448/buZcNU2D1+s1y7N5eXmYPHnydcNa04cfvQuHMw+83wsf44Rf8EFWArEZy7nh8RbB63PAL/jA8R64PYXwCz4TuHzy5Em89tprZVZS/v73v5txzb59+6CqKnbt2nVN7d4LF2bg+InD0HQJDPNrnMtxHAYPHnxNF6pPnz5Yu3atmfa5nOGynLvChhs0XlEKoL5EiYXX5wDDuqDpIoqKnGa+8/PPF5sAHqcrP9A2pPrAcIUQJR9279mOOzu2w+8lx3vmzBmwLAuWZSHLspnvPXTo0HWfVGR99NFH6ZZbbiFFUSgiIoJ0XSdRFMlisVBERAQlJCSYdEVERLdUvYUiIyNpS+YWev6F56l37940efJky+7duy9ZBu655x5MmjSJzp49S6NGjaKHHnqIMjMzSZZl2rZt229eNp56arBFEAQyDMNcnoPx7W+NcRs3boyZM2dizpw51LNnT1IUxYzVLo5PzTjLUv5HCIK7S8bhAEygd2ZmJp0+fZqGDBmCAQMGEBFRREQExcTEkN1uJ1mWzc/W/o729MILL1B6vdo3nRpK13VyuVwUFxdHhmEQwzDm9UhKSqKmTZtSnTp1rt95BsEeTlcBON4LUeIgK35wvBcOZz48XgcY1g1AhQEFGzetw5ChT6Ju+pWRXZ07d8bevXshCAL+/ve/7ysxuWVfZbTrZG7dCN2QwTAMBEGALMuQZRnPPPPMVR03OTkJQ4cOxrZtmWZVrmR70sXZgKDHDWp53ja4UgVfLys8WM4N3ZAgyRzuuacf0tLScOLECQA6fjlzAorqh9tTGDiG3xHA5PIuSDIH3ZDx/gfv4PcSKgTz78Em2JL0A0eOHME777yDfv36XTU6rdysws8HDlGXLl3o1mqJ5HQ6SdP8FBMTQ0REMdFxZLfbKTw8nE6cOEFz586lNWvWOE6d+iXpSjdDp06d8Pbbb1ObNm34adOmZX755Zf3ExFt3bo11uv1Zt5yyy1t+/bte003nN/vJ6vFSjabrVTrSkW84K9o+xZ4a8ab1LNnT6qZXJNUTaXCIifFxsZSlfh4kmWZYOCSTEDwPcryxJcD6gfacALeNtilcObMGTp48CA1btyQqlevTkREiYmJ5mttNhtFRIaT1+ulyIiwwKoYHkmPPvooPffcCHzwwUc3fLPWrFkzdO3alQ4cOEB79uyh1NRUGjZsGCUmJtKGDRvo66+/pnbt2lH9+vWpQ4cO9Pzzz9Nzzz1HLpeLVq9ejTNnzpAkSSTLcmCFDCMSRZF8Ph+5XC4qLCyk3NxcOnH8F0t5XbzFVDmlJYindLlcePvtty+hTMrMzCxZZUksOYZp69atwYrZ6YvJQ959992VQdBEcnLyb74Ll37zZaBiVVzXDrKkPPvssxU+ZgCep8Av+ODxFkEQGaiaEAC/sK4Kxa/l6cUbOr/gg25I8DFOvPPuDJTsgAiMrFLhdOWb7+8XXZBVH7y+wuL2eBcAFdnZZ9G//wM31PM2bNgQn376KTRNw7p161C3bl0UV8SwYsUKfPvtt7ioUoannnoKX3zxhblpC+bxg9XCYINnsImT5dzYu28n3nv/v/jnv4aWWZAgADRgwAAsXLgQhw8fRnZ2NrKysrB27Vq899576NSpU5llt8t0yGrBm2Dv3r247bbbTheXf2NKUPOwAMAwDCZPnlzhY1+sGQvnAVDB8zz8fr+Z3Rg1alSFjvf3v/890EJUfNE0XYQkc79WtETGJAIpyyCDRlme4QbDBR/jNDdlJ04exl1dfgXUZGZmYtKkV5FfcMHE4iqqH25vLgz44fbkF2cjXBClAGZ19+6duPPOO2+I8TZt2hSLFi2C3++HqqqQZRkbNmzAr203T+DkyZNlgpw6duyId955B3l5eSZng9PphAHZzLRIMleqY9mAjLfffvuy+JOLdopNkZ5eH40aNUFKytV1Jzz77LNmVamgoACjR4++7Ovfeust827Ly8vDsGHDfpPxfjLnAwCqOd08eMwXXnih3GOlpKRg1apVAcRTsTH5GCc83qLifrKAUZbldS+ufpVnuMFWcYZ1weMtgqL6sW37psue5xvTp0BR/eD9Xnh9DigagyLnOQiiF4rqD7DCcB54vW4AOlatWnXdKaxSU1Mxb948s/qZn58PAPjuu+9KpS/37t1bbm/Z8OHDkZWVBV3X4fF44PU5IIgBxiBF9YNhXXC68uFyF8DHOMskjKkMtHz/jz76KEcURROP+8UXX5RZppw4cWIxTtULTQ8AaSZOnHjVF76YmxVutxOiGOi9AnS8/PL4co81ZswYE6Z3MXagspXl3FBUP1jOHWB18XNQFAVPP/00ym5l+be5tHIcU2LTzAd6z4obJlm+ALqu4uOPP7xuhlu7dm0sXboUiqKY8EMA2Lx58yUOJyMjA3v27Cn3XB555BETnM7xHrjcBXC5C+D1OeD1OUy6K4YN4Fh2796NSp1zdvvttx/0eDzvDxgwIDnYGr1v3z765ptvKC8v77LBtc/no7CwMAJgstoMGjSIRo4ceVWpE0mSSm2Ugo/BzVpZ0rJlS/Tv35+IyOQPuJ4SrDgCMJllTpw4QT/99FOZr5kxY4bl9ddfJ5ZlKTw8nMLsESZDjCRJpKlGcVt6OIF0euSRR2jy5Inm9UtKTKmUNFR6ejreeust6tevnzlDIy4ujnbs2EGjR4+mi9mLsrOzqUGDBlTczVGmLF261DJr1qz9WVlZFB0dTdHR0RQZGWn+HKzI2u12EgSBkpOTqX79+vf8Zir95ORklCz3ffjhh6369+9fKzEx0cayrFmP/v7778vcEQbLumFhgZo+y7JUv359euyxx6hu3boVvuA8z5NhGGaONCjh4eFXfF3//v2pc+fOJMuymZu+nhIREWGSd9jtdrLZbLR9+3Y6ePDK89RmzpxpmTFjBvG8QGFhYaSpBkmSTLGx8YEysBbIBfM8T9WqVaVRo0bR448/BiKiIkfeNWcb6tWrhzfeeIMeeughstvtxHEc3XrrrXT69GmaMWMGHTly5JL3iI6OpqpVq9Lzzz9P99xzzxW/y379+s2fOXMmFRYWkt1up8jISBIEgURRpPDwcLLb7SSKIlmtVmIYhnRdZ66ZSn/MmDEmZ2pwc8RxHI4ePYq2bduiPEI0RZEgiCxEiTPpf3ieN5sGK6JPP/10cRMfE8i3FjfZ/ec/ZdO7d+nSBceOHTPRXTciVFBUvxkqACpcLgfuu6/ijNxvvPFGcf9aoANWlAJUSm5PPgTRC4+3yDz28eNH0bXrtRNQN2/eHF988QU0TQPHcSgqKjJDq8cffxxldcAEuxqCoURFulH+NuABLF+xDAYUs3Pa7SkCy3kgiIGwZNasWdcW4zZo0AD//e9/zfaNoqKiYsysVCGWagB05513wuVyQNVEuNyFJiYTAF5//fUKX/THHnsMhmGYRhs03CtNPS/GCkMQBBiGEdjYXWfDDabAAhsNFatXr7xqw5o5c1Zxi5IKh6MQHq8DLOeG21MIVeMhyYHPYUDB6tUr0bLlby/upKenmwO6eZ43N2KCIJS54Q4SvsiybPaNXcyjm5mZaS2b2rQJpkyZjAMH9kEU/WZblq4HuqjvuOOOq49xp06dCiKi7t27Y/bs2TR27Fi69dZbiWVZio+PN5dqURRpy5Yt5S5BDMOQ2+0muy1Q2JAkiapWrUpEdFVLN8dxZhm1ZIwbGRl5ycSXIDTx3nvvNcOMYNx5I8RmswWQbLpWoWt0sRw9cnTI7NnvZ8qySrfeeivZrGEUFhZOVquNLFYUM0ka5Pfz1LdfH5owYQKdO3du3NW+T8OGDfHf//6XHn74YVIUhTRNo6SkJBIEgd59912aPXu2hYioV69el1y4lJQUc+aZKIokCAI99thj1LFjRxARde3atUxKzqNHj1smTXrNMnr08zRjxkz67rvl9PXX39DMmbNo4sSJtGfPHstvmrqTmpqK9evXl2KmFkURqqqaAIsff/yxQuj1KVOmFL333rvwCww0XTKR8IcOHcK9995bYU/RpUuXfQFGQBk8z5rctgsWfIpLy7rJWLFihVlQ8fl8JqLsentcUWKhqH4ACg4d3o/WrVtdlTdMr9uQAFC1W5JSZ89+f1lhYaHJms77feD8DhQ5z0FWWHC8C7oRaBmaPHli/tW8T5s2bbB8+XIze+DzBeiZFEXBhx9+WG6xaOTIkWAYBqqqmsTdADBjxozrkvGo0OasY8eO1LlzZ5N1MUjMpigKWa1WCg8Pp1OnTlFOTs4VNwXnzp1LmjRpUtJnn31GO3fuJL/fTzk5ObRq1Sp6/fXXadWqVRXeVEiStDKI0S0vq9CvXz+6++67zRs1yPt6NeXha8kqSJJEqqbS/v37r3rI9dmsU1QvvRG53IU5Dzxw37+/++67AkUJrBaGTgToFBcXR5Ic2MS5XC6KiY6hF8aOSR4y5Kn8irxHhw4dMGnSJHrwwQdJ07TAiljM+LhhwwZ64403KD8/31LeJjQuLs7EaickJJCmadS+fXtq1KhRpS9tFTLcunXrmru+4MlFR0cTz/MUGRlJBQUFtH79+nKPk5aWVkRE9NNP+yx397zHcmeHu6h373vo8OEjtHTp0qv6QgWB368oEgEWslhsFB4eSURWioyMvmh3XBcjRvyLoqMjieMYiomJIp5nCdDJWgnjCYNsiMFlMkjpGURQ2ayRZLdFEeMT6Ouvvv1N73E261Tw+mU/++yzNefNm0dRUTGkKBpZLZGkaxayWSNI0wyKiYkhVVMoMjKC/jtrRnLnzp2vaDT1G6Rh+ptTqXefHqRqIimqQAlVYigmJoJ279lB7777bpmpzYvRYsHHyMhIk5GzVatWFBcXV+kOwV5B72Z6qCDPrSzLAWiezUYbN26k3bt3X/WbHzt27De7PEmSSsWoDoeDatSoQVWqVCn1vKFDh1K9evVMqs0g9DFIxWm5RuO92GtfLm6Oioqi3bt30+nTpyvlS5s9e/ZDuq5/P3r0aDIQSOtFRERQeHg4CYJAPM9TVFQUxcTE0AcffEANGzbE6dOnL7nWbdq0wcKFC6lJkyYUFRlFPsYX8JbxCXTw0EEaP348bdu601IxRyKY30lkZKSZg7XZbNclX14hwz116hT5/X5KSEig/Px8slgslJCQQNHR0ZSZmUnz5s27prm3LVu2RLt27ah27doUGxtLhmGQ0+mkgoKC83v37hl18uTplSXCDUpLSyOr1drW6/WaeU3DMIIX76vgc++8884lS776jBIS4gJcsdDIYgXZ7Bay2ohUTSPbNU6FDW5OS/aQlXzUNI3Cw8Np06ZNlyUo/i2SnZ29vG7duv8EMGfU6H9RQkICqapqYqo1TSNZlik8PJxuu+02mjZtGtWqVQsleYi7d++O//u//6M7O3Qim81GDMMQ4+OoTp06lJOTQzPfnlVhow06MlmWKSEhgQRBIFmWiWEYqlq1arm59d8cg1VkYs5XX31lpjmCIJnVq1df05yyu+66C/PmzcHu3TvNkm1QNU2Bz+fh9uzZ9eW0aVPubNu2dc3SFEE19h04sM/ERgQ7ibdu3do/iFybO3duf0FkYUAxOWMDJB1ekx/2WjdfJfG6JX8O4nYFQUBWVtZ1A8N89PF78PoCqbYiRx4Y1g1VE8FyHojSrznYkkyH3bt3x6ZNm0wuA03TTF4wn893xXL0lSYzbdu2zTxGUVERRFHEsWPHrgtJS4U87g8//GC588474fP5qEmTJsRxHG3fvp2aNGlCmZmZlmJPeF9aWtqqit4ww4cPx4cffkgNGtalyIhACothvSSKIkVERFB0dDTFxEbF3nHHHfe3bdu2Ws+ePc8NHTrYvWDBwleKb7i2fr+feJ6nKlWqUGRkJDmdTtqwYUOj119/nXr16hW5fPnyRpLkJ01TyWq1UHh4GAEGAQYZhk5ElbdnuBijG+xEjoqKom3bttHOnTuvy05w396fyWYNo8GDB1PVKtWIYRgy9MASrSqBeFNRFBo1ahQNGTIEJ0+epPfee4/atWtHPM+T1Wolh8NBycnJwYodzZ0796rP9eTJk5Z//OMfiI6OprZt25qY6SVLltD+/fstN8XjXozJvNa7ZcyYMSabYcn+tmBTpiix4P2BqpDL5TCnPp45cxqjRz9nvv/OnTvMFWDjxo2lGiVXrFiRASCb5QLs4YLohSB6wfvd4HgXON6FwP+8leZ1S3ZKiBILWQmg1iqjgbO8kU8fffSRiZBjWdbkldU0zYQSnjp1Clu2bIGmaTAMAw6HAwUFRdA0A4qiYcaMmcjIWHhN53r//fdj7ty5+PbbbzF27NjrxoF8w9s97rvvPnPqYF5eHvyCz4T7sZzbnCkmiAw83iJomgKHoxAM4wWg48SJY+jVqycA0KZNP5h5xpL0os8//7w5IE6Q3BDlACDbxxaAF5wQJDd8bAE4v6NS0F9B4y1pyMHPsXPnzhsyLiA9PR1z584Fx3FmSVuWZXNWWRBtFsxlB8hWJPh5GTCAJV9+g9qp6aXOc/PmzMqkdLrxedxrlWD1rVGjRnjllVeoRYsW5Ha7zXaVYHtQgFgjkFaJioyiqlWqkt/vp6pVq5IoisQwDDVu3JiGDRtGTZs2xvHjx2nUqFE0YsQIy5kzZyxBRNOAAQMoLi6O/H4/qapqanCqTHACTWWQh1zMk3Bxk+SOHTsoOzv7uiaMk5NT6pw9e9by2mtTafny/5EsqxQYy/YrcUpERAS53W4qLCyk2NhYstlsJAgCRUeHU2bmDpo4cSKdv/DrbLYhg4dN7d69a6WdY1pa2s0NFa5FX3nlZciKvxSvgKIoKCoqKtHKEeie2LJlCw4ePGhiEHRdxZkzpwHokGURw4YNKROIDSjw+hymF/d4i8zlOxiOSDJXCjRelga9tCh7IMqB5kUfW2AOFfGxefCLLjBcIWQlwBvmchea7TXNmzf/Pjs7O/IG8trik08+MVnEgzyzXq8XQcw0y7JQVRWapuHYsWPo1KnTH24i5g3xuEREw4YNQ/PmzSk8LNxM0GuaRi6XixITE8lisdC3335LTz75JD355JOObt26WapUqdL3ySef/P67774jq9VKqamp5PV6KTw8nHr06HHJe/To0Q3du3c3Kzkl1Wazme3sQW9orUAFIiwsjCwWi9kGb7VaKSwszEyDRUREUXh4OOkayO/3mxsyQZDo8OHDeo0aNWampaVJN+o65+XlWd555x2aP38+xcbGmqnCYLEkSD1gsViooKCAJk2aRDt27PhdMeT8rjxuy5Ytcfz40WLoWqD/ysc4zdhrzZo1ZZKKtG7dCl999aU5QQbQcerUCdSsWQMlN43z588rnrngvyTmlGQOfsFnIuxL9pddGWvgA+93g2EdYFgHWM4JlnOCYR3w+gqhGRwUlYPTlQuPNzDURNdVHDlySB45cuQbN8sjNWnSBJ9++qmJBQmSMgevd3Z29hXRXr93td+oG6RKlSqUkpJCkiyRoigmj1h8fDw5nU768ssv6XKkIkREBw4ctHTqdCc6dOhAderUIZ7nKT4+3kzhEBHFxsbSHXfcQUQB7jGbzUZxcXHEcZw5wC4I5jaMwDTFimAVJEkp9tABMHjQWwVf63Z5KS4ujm6tlkggIo/HR9u3b9+7YsXKKQsWLFh9ox3R1q1bbV27dtWPHz9uSU1NRXR0NP3tb3+jhIQE8ng8VKVKFeJ5njIyMky01x9RbpjhhoeHU2RkJEklpiEGp1UePHiQduzYccXX//jjLsu3336D5ORkCg8Pp+jo6FIcBIWFhQVz584t+MeTjyff0a5dMhFRYVGhWYnTNM0s92qaRoZhlNvmEwgVwk1DDRi8Vmr8aGL1GkRExHIcbd/2Iy1ZsuSfn3/+5dwHH3zopnyhXbt21YM/5+TkWGrWrAm73U79+vWjW265hQzDoI8//phyc3PpDy03yrV36dIFLOuDogrmUGSOD0yd+fzzzyu0ZL355huQJAGAjtzcC2jb9tJJlre3u+2Zb7/7qvjYvw5mDm4Ig+99cQqr7FCBMyfl+AUGksxD1URougRNl6CoAuYvmIMePbohOzt7cslzmTxpyu9iWa1Xrx4WLlwIVVWxaNEi1KhR4w8bItzwUMHpdFJRURHVr59OwK8ekIhM5pzyJCEhgSIiIoIe1uTcLSl7f/p5LhHNffqZwZg8eTJFRkZSlSpVTCimqqpm6q0i0EZJVMzUWUxMgEaV53k6d+4c5efn03/emk7duvakTZu2XHKg16ZMuumOaerUqZ+cOXPGcscdd6CgoICWL19OBQUFFvqjy426Q6ZMmYJt2zJhQDE5AzQ9kJ7Jysoqd0ZsvXp1sWnTDwB08DyLEyeO4dFHH0GnTnehffv2aNCgwSfZ2dltsrOzPjFHErVuhp27tha3OSvwMU643AWXFA+upBzHmLO3ZFlEbu4FLFqUge7du/7hvdYfWS3Xu30lLa02Bg4cSH369KG6detSWloaFRQUUEpKCrEsS2HhgbRURkYGOZ0emvjq5Mt6g9ffmIzx48cTABIEgapWqUocz5HdFkOCIJDX66X8/HzKzc2lnJwc2rlzJ23atIlUVaQXX3yRxo0bR7fccos55TwqKooURQkgxoq9r91uD0AdLRaKjo4mlmWpSsKtZLFYKDc3l1avXk1Lliwx8Rkh+ZN63D59+mDz5o0oKMjDsmVLceHCOUiSAIbxQtdVMIy3OIWk4MzZE3hj+mtod8dtpTxZ3fRamDptIoocuQAUeLxFKHLkmgisIGl0kO8siGDz+Xw4ePAgHnjgPsTERKFdu7ZYv34tAB2qKiM/P7cU2QbHe8FyHhQ58uB0FUDVRHC8F2fOnCmTBiikN0+vax5x1apV4HkWu3fvRJ06qRg9+jlzCInL5YCmBSpcssIXt1wXYsePW/D2zOkY/9ILeHvmdOzesx2CyJjVMN7vNXm+JJkz2+PNHjKeNwn7VFUFz7OYPfsdxMXFoGrVBEyZMtkceOxyOaDrKrxeN3JzL5jTxgEd+/fvxfTpr//hBmWHDLcSwDSyHBisx/MsnnlmOFJSkrFlyyaoqgynswg+nweK6jfZDDVdNDMBghhouQ7+XOTIhdfngCRzECXW5OYSRT8EgYco+uH3c/B63XC7neakniDn7dy5nyA2NhpEhMGDB2HPnl0AdLOpLzjDARpjAAAehklEQVSyaufOnXjllVfK5YcI6Z/UcJ944oliYxAB6Dh58jjq1auLwYMHmR25bneAuj84GyzIHSWIjJmyYlgXXO4C+AUfVE0oBX/0eIvMVBXv90GUuOJ0G2f+npNz3gSpv//+bMTHx4KI0LhxQyxY8KkZZuzfvx+vvPLKTZ+hG9KbbLiPPfZY8UwAHV6vG7qu4qWX/o1bbqmCzZs3mn8PzlEoScXpY5zmjl9R/SaTnzkbTA4QwPkFn/m/oAeWZA6CyPxK6akpYFkfDEODw1GIMWNGwW63wmazIDY2Gi+8MA6DBg1GgwaNQgYbyioQ9ezZE9999x2xrI8SExMpIiKCjh07Rn369KFOnTrRggULAhxYRoDILVgGjoyMNAniiMhsgQ/ybgX/FqzG6bpOdrvdhC1GRkaSxWIxS7qGbqHw8HBiGIaSkpLo0KFD9Mwzz9DPP/9MqqoTkZ1ub3s73X777dSqVSuqW7cuWSwWcrlcdP78edrwwxo6c+ZMua33IfmTZBUaNGgAp9MJRZEgin44HIUmt5fdbsWuXT8C0M1OAY4PcKWWnKsgyRwU1W96ZVnhS3UY+BgnHM68UvyzQW9s8tPyLHiehcvlgMfjgmFomD79dRARuna9C19/9S3On8uDqgAwAF0DZEkHDMDQAz1Z//vf//Dwww9vyc7O7hbydn+BPO6ePXvQokUzslqtpGkaRUVF0fnz56lHjx7UunVrWrp0KYE0c+hdsKoVZOgLAkLi4+NNYIzNZjM7WoPeOQhRBGBOmrz4b8FJjREREXTmzBnauHEj3X333dSgQQOKCA9U4zxeD0VHR1NYWBgxDENxcXFktQQYEW02G82dOzdz7NgXu4fc3c2X64rH/eWXX8xmPavVSqqqUnp6Oj311FO0Y8cO2rx5s4nPFUWRiH4l1IiPjydN0yguLo54nidBEExDjIyMpPj4+FIorZJjo4I42+DQEKvVSoZhUHh4OIWHh1Pjxo3p4YcfpubNmpPVaqWCwgJyOB2lcMJB/l6iAB+Zruv0xBNPdPvvf9/G1KlTEDKdP7Hh7t69u5TXC5KJDBkyhKKjo+mjjz4i3s9TdHS0CT20WCyBiTrFrwt61ujoAEONKIqk67o5wSb4aC4hJWCHJQ03+DPDMKRpGlWvXp28vsCc4mrVqlFi9URKiE8IzHcLj6AqVapQfHw88TxvxstJSUn09NNPU0FB/v+3d+XxUZXn+jlzZp9JQkKwCRBCMJAE0GjYAlHC7YWCIOCV4gYtV1sRXFqquKC2Uiy1VnrrdSkoRQQEEUtRURBDIJCERCprwxKWJCQYCMnsM+fMOTNz3vvHcL4rF1DaguaG7/n9vh/zS+Z8yRyevOf93u3hzOnIxN25c+cbbrebCf8ZjUa43W707NkTDz30EDZu3IjKykoYBEO85PHsxJxIJBKXavoK8RRFYeN9dHJfisXV3Qaj0ci+HolEEIvFEA6HkeBMxOnTLVi+YgV+ev/9mDbtP/HUnDnYuPFTiGJ8fpY+L02fUDljxgwMHFjArW5HTfmWlZU59cIYfQBza2sLqWqYTp36kvr2zaXbJ42nhhNHiUilL5sbWAgsJHmZEotekqiRwjpo9dCYnqjQD3WS7GNxYT2xoYuI6NKuetaNSKXdu7+gadN+dF4orHv3rvTEE7PJ7W4jVQ1TNKpSc/NJlll79tmnefiso/acFRcXB3fs2MH8RJ/Ph86dO7Ox7E888QTWr1+PTz6JNwro0qx66MtsNkPTNNY3VlFRgTlz5uCDDz6AKIrscAaAdSfoVhqId9rqhz3dXdF92HA4DK/Pizff/DPefnv5eaGupqYvhRdffElYuXIlC885nc64BkM0iokTJ2LZsre51e2IrgIAlJWVoaWlhXUe6MRSVRWTJk3CzTffjNWrV+PznZ/DaokfglRV/d84rKaxx/WOHTuwePFiVFVVxfVtReMF/dqv+rv6GFSTyQSn08maHe12O3bt2vWNg5Zfe+01NDU1IRaLwWKxsN+tT58++O//fpkzqKMSd/PmLUJTUxOAeCG4x+NhLTQWiwW/+93vsGNHNd577z0oqsIsZzQaZQcxVVXhdDhxyy23YObMmRgzZgwsZgu8Pu83WlxJkqCqKvOZJUmKi0AbTdi7dy8OHz78tYmFw4ePCCdOnGARCf2PQJZlZGVlcQZ1VOICwKeffgZNi3c6WKwmmC0iAkEvDCJh0MBCPPbobLyx6C28vXQlUpK/h4AvCoupE2IRC6w2IyTZj0DIg779+uCF3z2Pfx9ZjKgWhkHU4HQ4cejQIXz88cdsXq8eMtMlh3Q3QSe0xWyBoiosyvFNCIZ8EI2IZ/mUEMJKCA6nFUmdnJxBHZm4W7duhcfjYa0ymhYfQKyqKhRVxty5c9GvXx5ef/11HD16HE6nE8FgECkp8S5dp9MJh8PBCOjz+eD3+5HgjI8Pff755zFlyhSsX78eRjEePQgEArDZbHEh57OzY/U4bViJRy8yMjIu6ffPzMxkugYOh4Olmr1eL2dQRyZuaWmpUFVVBVEUEQ6H2WBlPURms1nw+9//HqdPN+Ohh2ZCoyi6dEmG2+2HxWyDSbQgGtEQDEgAGdApKQVmkxVutxcOuwM33ngjhg8fjq5duzK3QRRFCILAQmy6S6HXNZjNZhQUFKC4uPhrD1g/vX8aZWdnswgMAJhNceI2NjZyBnXEcNhX19SpUykcluhMazNFYzJ5vGdYXW28Jywu7ZmQ4KDp06ef7WjQWKWX/j69xFFRg2y0kj/gotMtTaSoQfJ4z5DX10qKGiSvr5Va25rZHnLYz2oc1EiIwkqAPvroAxo6dMj6C/3O//ZvxbRn798opimsS8Lnd1E0Fqaq6nIeDrsaunxPnz6N/fv3o2DADYhGI6zHKxj0I7VzKvwBHx6YcT+8Xi/mzHkGTqcTf/jDH2AT7QiHFcRicTlRTSPIchhWqxU2mx2hUBApKSlIcMZ1BoJaEBaLhX1A3V3Q/0j1gSDBYDxjN378OEDQimfM/GnVpk2bjtTXNU0bVjS4acSIEd1fe/0V9M3rz2SstBiQkJAEr9eL99esReGQm7jl6+gWl4gQF4iOkD/gYlYzEDpDcthLcth71goG6dFHZ5HJJNLPfvYzcrnjY4101UFJ9pMakSgQ9JDH20qS7KNA0E0u92k2slQft/TVSeG61dZrd/X3661ARCrVNxyh2iM1TEWdKC6dpC9JkoiIqKKigrKzs7nF/Q6XOHfu3G/tj+Shhx6cO2jwQKSnp7FUbUyLIP5SQCgURIIzAcOKhiIUlPDWW0sQCklISEhEt27dIYpGqEoEmkYQYIBoMEJRwxBFkQ2nUxSFJRn0ijNdyE+PKuj+rx5206vXrFYr0tLSYLPaAACSLIE0gVlws9mMQ4cOYdGiRSgpKeH1uR39cKajtvaoUFJSArvNzggmCPFaAjUShtlsRiAYQIIzAb994TeYNWsW/uu/XsZzzz2HDRs2IBaLwW63s0SGIAhn3QeNVX/ZbDZWSK5n30wmE2w22zk1D3oSRBfD1vcLh8PweD1QFOWsqrcdsqwgHFZBJGD16jVYvHgxJ+3VQtyGhgYAwF/e/+DU/v2H0CmpC5SwBpPRASmkwmJ2ADBAlmWEpCBMJiOem/ss1q5dB0lSMWHC7Zg27Sc4ePAIkpKS4XQmwmAwwyCYYBBMiEYIAb+EaIQAEuGwJ8Zfn0UkEmEZM710Ul+6vKqeYNATH/GaXsDptKO1tQUPP/wg5s2by0nbDnDFB4JcCLNnz6bnnnsOAGC1icwC6tVfmqYhFArB6XTCbHKgtrYWq1atwjvvvIO2tjaMGjUK06ZNQ1FREUwmETZb/NEuyzIjoC4fZbaITEBPT/fq4Ti9bBIAS1homgar1QqrxYrWtlbIUhQrV67EunXrsHPnTk7aq5m4PXr0oEWLFmHs2LFoOXMSSUlJIIoPRjabzTAajQiH466DxexkRDt+/DhWrFiBFStWoK2tDT169MDdd9+J/Px8DBo06JzpjXrslhBlMp16iaP+fT2OrHdn6MRPSkpCfX095s2bh+3bqi6bPhnH/3PiAsDkyZNp6dKlsNpE5rPqBym95jYcDsNktCIYDIKIkJKSAqPRiPr6emzatAk7duzA+vXroWka0tPTUVRUhGHDhiE3Nxc9e/ZEWloaRPF/ORfTYkwVXPdpTSYjK6DRK786JXVCXX0dZsyYgc82nT/Mbt68efTuu+/immuuwfDhwyFJErxeL5YsWcIJ3tGJCwALFy6kB2bcx+Q09VJFvQwxTmQgMSERMS2e6jWbzXA64jUCclhGQ30jqqurUVJSgi+++AKNjY0QBAE5OTno168f8vPzkZGRgZycHPTo0QOJiYnnFpVHwzAZTfHQIAherxcOhwMmkwmLFy/G9PsfEnJycig3Nxepqam46aab0KtXL6SlpaFbt24wmUyoq6vD5MmTUVNTw4n7LcH4Xf7w119/Hdm9MzFixAg4HU54fV4mXqwPXhZFES1nTgMAkpOTYTKZ4A/4oGka7HY78vLykJeXhzvuuAMulwuNjY3Yu3cvysrKUFVVhVWrVrMetaSkJKSmpqJ79+7IysrC9773PVyb3YM1SHbr1g1du3aF2RSX8NTFk2+55RbMnz8fVquVKfaEQiGmMJ6SksJaiziuAuLW1NQId909iZKTkzFwwMD4nIWzxd56Mbnf74fD4WB1DsFgkMlLxWIxuAPx8fAOhwMOhwPp6ekYOnQopk+fDkVR0NDQiJaWFtTW1uLgwYM4evQoDh48iMrKSoTDYchhP9vvjjvuwC9+8Qv0zu6NaCzKIiFnzpxhh0av18uycbrb0alTJ9xwww2cTVeLq6Djtv8Yt3fq1KmdR4wYkZ7aOVWUZIlFAPQOYb0uFwCr9NI0DaQZ2Gj8/9tbFk/5OhCLxT+j7u+qahRnzpyBy+VCMOSC2+1GTU0NevfujXHjxsFsNmPLli24//770VD/pZCWlkYlJSXo27cvQqEQs7q6r5ycnIwFCxZg9uzZ3FW4moh7Ns5729SpU18tKirqXlhYiOuuuw5du3aFYIjPRDCK8YeDGlHZlJt48TjOiSToBBZFEUajkYXCdHLr14liXIzEKNpY1gyIC598+OGHWL58+TlzcF9++WV68MEZ0CgKVY0rk0ciEfZk2LZtG0aNHMuJe7UR96vIyckhURSRnJyMAQPz477otdciKysLaWlpzDUwikZoFINBMJwTOdDDXzpJ2Ye9wNh8izl+0ItEIqioqMDSpUuxfPn5PWh33XUXLVz4OuwOK6LReMGPLMswGAywWCzYu3cvJk68DV+ebOHk7eg+7sVQW1t7wf/8UaP+nRoaGtClSxdcc801SExMRE5uNhwOB5KTk5GSkoLk5GQkJSXB6XTCarUycT69XUgvZNctcN3xJpSWluLDDz/EzTfffEHSAsD27dtx8uRJ5Ob1YTFgvaZYEAQWZeC4iol7MZSUlF6SNVu2bCnNefpJmEwmpKWlsdP/V1UidatcX9eEkydPCg8//PDX7tnc3Cy8/fZb1K9/HlNo1OdFEBE6d+7Me9A4cf81TJt2rzBt2r2Xfd/Nmzfjzrsmw2azIRAIsO7jWCwGm9WG3r17c0Z9SzDwW3DpqKiowPHjx2E2mZnklCiKrOkyLy+P3yRO3PaHhoZGoby8PP6oOlvjoP8LAL179wYfiMeJ2y6xe/duBENBlpJmyuogpKWlYenSt/hN4sRtf9hWVon6upOw25IQjQjnCWpff/31/CZx4rY/HDlyRNizZ0/85p2dngMAsVgMZrOZh8Q4cdsvNm/ezFqD9Eo2PfuWm5vLbxAnbvtEdXU1GhoaWL8bG30pGKAPD+HgxG2X7sIXX3zBZjToRekA0LVrV6SlpfHIAidu+0RZWRlzF3R/NxKNoEuXLsjMzOQ3iBO3fWL79u04duwYLBYL+5qqqkhJSeGJCE7c9otDhw4Jx44dO7cyLRaDzWa75CmQHJy43wlWrFiBYCg+k9ditrBCd35A48Rt16irq2OvJVliQoK9e/dGnz59+AGNE7d9YtiwYazeV5/7q2ka2traEA6H+Q26gjDyW/DP4cYbb6S1a9cCAKtZiEajCPhDeOedd9DY2Mg7IbjFbR+YN28ee/zfdttt6NWrFyRJYkXlJpMJpaWlWLNmDSftFUa77Dlr7xg+fDi9+eabyMzMRDQW1yB2OBzweLy46857LrlTg4Nb3G8VU6ZMQW5uLlNl14W2//rXv3LScuK2T4wbN47GjBnDqsEURUEkEoHH48Hy5cv5DeLEbZ+47777kJGRAVmW49PMBQvstiS8/tqbKN9exa0tJ277w1133UVFRUWIRqOs8yEhIQG7d+9GVVUVv0GcuO0T06ZNQ1pa2jlawwDw7rvvorSU+7acuO0QDzzwAA0ePJjNZADiU8z//ve/Y8uWLfwGfcvgCYhLQGZmJr333nuw2+1wu90wGo3o1KkTVFXF0qVLsWvXLm5tucVtl74tCgoKoGkabDYbTKb4IOjdu3dj9erV/AZx4rY/DBgwgKZMmcLGl1qtVhiNRvj9fixevBjNzc3c2nLitj+MHDkS119/PSuiURQFgiCgtraWaz5w4v7r2LZt22Xfs6CggGY++FMQVAiGKNSIBJNJhKIoWLBgAWcPP5z96yguLgYADBkyhPLz8yFJEhoaGlBRUfFPW8WpU6eiS5cuiEQiUFUVRIDZZMWGDRtQWVnJ2fNdoiMJE//oRz+inTt3UiwWo2AwSKdOnaLHH3+8pb6+/vv/6F5Dhgyh5uZmisZkCoY81HLmJMnhALndbXT77bdzAerveHWoD/Pxxx9TNBqlcDhMXq+XVFUll8tFM2fObPlH91q8eDEREclhP4WVAHm8Z4goQuvWreWkbQerw/i4GRkZlJaWhlgsroemi0ynpKRg+vTp14wYMeKS6zdHjRpFt912G1RVRTAYRDQaRWJiIppPNePNN9/kj2l+OLt8+MEPfsAkVR0OB9N+cLvduOGGGzB58uRL3uvBBx9EamoqgLjCj8FggEEwYMuWLdiw4VMeSeDEvXxYsmSJUFJSck7YiohY79ett96KiRMnfqPVvfPOOxeMGjWKaUTY7XbYrDYcrzvOkw2cuFcG77zzDqqrq2EymZCYmAiDwYD09HS0trYiMzMTY8eO/aaQ2oB77rknx+l0QlVVyLIMj8cDAqG8vBwfr+fWlkcVrtAaPnw4ffbZZ0REFIvFyOVyUSAQICKixsZGKigouOjh6vHHHz/i8/n8wWCQFEWh5uZmUhSFamtraciQIfxQxg9nVzQRITz//PNYvXo1BEFASkoKgsEgWlpakJGRgfz8fABxLbWvXte/f38aPXp078TExARVVREIBJCUlASz2Yx169ahurqaW1tuca/8ys7OptmzZ9P+/ftJh6IoNH/+/Atazt/+9rcBRVFI0zTy+XwUDAaJiOjAgQPUv39/bm15HPfbXYWFhTRr1izavn07SZJEjY2NNGnSpHOI2KdPnwFlZWXriYgkSaJQKESRSIRkWabHHnuMk5YT97tbI0eOpIkTJ9KBAweovLycCgsLGSHLysqc991334K//OUvtHfvXlJVlYiIDh06RBkZGZy47XBddXMVrr/+enrmmWeQm5uLRx99dFdpaenA9PT0+91u9wOqqg7IysrC2LFjkZ2djT179mDZsmXct22HuCoHgnTv3p2effZZTJw4EZ9//jmysrJw8OBBrFu3jk+h4Yez9r9WrlxJ0WiUVFUlRVFIURRasmQJpaWlcfegna//N2WNxcU308iRI5GTk4O8vDyIoghZlnHqVAsaGhqwZ88e7N+//+iCBQvuLi4u3vV1rsJNN92EQYMGYezYsVBVlSnnGAyGS0pUcHBX4ZIwZcrd9NRTT+G6665jqVyLxQJFUWA2W9mMA5fLFdy3b19ZeXl57b59+0a0tbUNSElJQUpKCgoLCzFo0CD07NkTqampiEajbOnjQUVRRE1NDX74wx+ivr6euwycuP88cnJ604svvojx48eDiBAIBCCKIhITE9HS0gKr1Q4AEEURJpOJiYnoajg6wYkITU1N8Hq9CAQCSExMREFBASRJgqZpcDgcUBQFVqsVn376KdavX4+FCxdy8rZTtHtXITMzE8XFxRBFEW1tbXA6nWxel9FohNPpBBAXDgmHw7DZbDCbzQAASZLw+eef48CBAygpKcHBgwchSRKOHj0q3HvvvbRo0SLY7XYoigJRFLFq1SqcOnUK48ePx8KFC7F7927asWMHTp8+DVmWkZqaivT0dADAiRMncOLECWzevJnPwuWHs/PXuHG3kM/nIUWR6cyZ00QUI7e7jVyuVpLlEAUCAfJ6veR2u0lRFCIi8vl8tHbtWpo5cyZlZWVd8KC1ZMkSIiJqa2sjt9tNbW1tNGzYMCIiTJgwgSorK4mIKBwOkyzLJMsyRSIRloULh8Pk9/vpww8/pMmTJ/PDHE9AnLuuu64fHT58kIhi1NraQsGgn/x+LwUCPpLlEPn9forFYoxMVVVVNGfOHMrNzb0omR555BHyeDyBN95440hubu6RP//5zwG/30/f//732TWDBw9ev2bNmkAoFGJklWWZPB4P+Xw+kmWZNE0jIqKtW7dSdnY2Jy8n7rnrhRfmkyQFKRaLkNvdRuGwRJGIQsFgnLSKotDRo0fp1VdfpUGDBjEC/frXvz6PTMOGDaN9+/bRxo0b19fX1w8gIjz88MPrQ6EQTZ06lfRM2tlU8JE1a9ZQXV0daZrG2oIkSSK/309er5fC4TCFw2EaN24cJy4n7rmrW7d0WrToT+RytZKqhokoRrFYhHw+D23bto2eeuqpS7J4PXr0oNLSUnK73TR06NAF+teLiooWEBH98Y9/vOAejz32GB0+fJiRNBgMkt/vp1AoRKFQiGRZpsGDB3PicuKev/r06UOjR4+mZ555hl544QWaPn06FRcX/0NkeeWVV4iI6NVXX6X/09H7hcfjoerq6ovuN3ToUNq4cSOrMmttbWU+76pVq+jaa6/lxOXEvfzr6aefZm3rI0eOPIdk/fr1o9OnT1NzczPl5+dflIBZWVn0y1/+kurq6hiBDxw4QD/+8Y85aXnm7PJj6tSp9OKLL8JgMKC+vh4lJSXnhK9cLhdcLhdyc3MxcODAi+5TV1cnAEBRURHdeOONSEhIQHV1NbZu3crDYTyOe3kxYcIEmj9/Prp16waPx4O//e1v6N+//znvmTlzJrxeLwwGA4YOHfqNe1ZWVnKifsfoiK07ffTXw4cPp5deegn9+/eHoiiw2+0oLy8/75rFixczHd7CwkJce+21X5tOXLZs2Tnfb2ho4EziCYjLs8aMGUMVFRWkdzXIskwul4vy8vLo/KhFN9q0aRN77z333MN9Vt4s+e1j9OjR9POf/xxFRUVwu92sBmHr1q04ePDgeY95h8MBo9GIaDQKm82GESNGcIvGXYVvF0VFRc2/+tWvMGbMGPh8PqSkpCASiQAADhw4cMFrAoEAOnXqxKbfDBo0CLm5uVxykxP3yuInP7mPAODmm4vopZdeTC8sHIxIRIGmReF2u5GUlAQAqKiouOD1oigiISEBACDLMnr16oUnn3ySs4MT98piyZK3hJtuGkazZs1CQUEBVFWFy+WCw+GA0+mE0WhEW1sb/H7/RfcQRZFZXLvdjvz8fEyaNIlbXU7cK4devXrSI488ggkTJsBkMsFgMMBkMkFVVWiaBoPBgGPHjqG1tfWC1wuCAKPRCCKCqqoQBAH9+/fHzJkzkZWVxcnLiXtlMGHCBIwePRomkwmtra0gInTq1AkAEAwGAQB1dXU4fvz4BeOvFosFJpMJRARFUSBJEsxmMwoLCzFu3DjOEk7cK4PCwkJWYO5wOKCqKmKxGGw2G3v8NzU1XfT6rxafGwyGc66/++670bdvX2512xk6ROasR48eMBqNkCQJNpsNqqqe1WyIW16fz4fDhw9f9Hq73Q6r1crkoHTLazAYMGzYMPTt25czhVvcy4+Wlhbmq+qPeUEQWDZs8+bN2LFjx0Wvt1qtMJvNiMViMBgMMJvNICLEYjEIgoBevXpxpnDiXn5UVFQgGAyykBYRQRAEdO7cGX6/H6Wlpaitrb1ofYEuvqe7CHrXcCwWg6ZpSE5O5kzhxL382LDhU5SXVwIwnG1XF2G3O6EoEbzyyiv405/+9LVFMZIkwePxwGazQZZlGI1GFl3QK8o4OHEvOw4dOiT85je/wfvvvw9JkqCqKnbt2oUnn3wSb7zxxjdeX19fj127dkHTNJhMJoRCIdhsNhYi83q9nCn8cHZlUFlZKWRmZlJGRgYAwOv1oqamRnj55Ze/8dpTp04Jt956K6WmpqKgoAButxtmsxlOpxOffPIJampqOFPaGzpKtdDlmPc1YMAA+uijjygUCpGmaVRTU0Pjx4/nlWLtcP0PdB/qm4dlMe0AAAAASUVORK5CYII=
Handlinger viser hvad du har brug for eller vil have gjort...
''Ny:'' <<newTiddler label:"#næste" title:"ny næste handling" prompt:"opret en ny næste handling" focus:title tag:#næste>> <<newTiddler label:"#kø" title:"ny handling sat i kø" prompt:"ikøsæt en ny handling" focus:title tag:#kø>> <<newTiddler label:"#ventende" title:"ny ventende handling" prompt:"opret en ny ventende handling" focus:title tag:#venter>><<newTiddler label:"#fremtid" title:"ny fremtidig handling" prompt:"opret en ny fremtidig handling" focus:title tag:#fremtid>>

Delivered via overnight express, here comes [[x-tab]]. It's a neat little interface allowing you to see item relations in a table. And yes, you can define your custom presets, hurray! Here's what it looks like...
!The interface
@@display:block;border:2px solid #EEE;padding:10px 0;<<tiddler x-tab>>@@
''Note'': click on {{button{show info}}} to learn more about it.
!Further changes
I reorganized the desk... and beautified tagger to an unimaginable degree ;-)
!!!A nice flickr frame ...just amazing!
<<tiddler iframe##flickr>>

@@display:block;border:1px dotted red;padding:10px 1%;margin:0px;width:98%;background:#fdd;height:50px;This is tiddlywiki text, don't you believe me? Try to double ckick next to a textfield in the form right below, then double-click this textarea. Did you notice a difference? Try selecting all the content in this tiddler ...that didn't quite work, did it?@@
!!!A form in a non tiddlywiki page loaded in an iframe...
If you want to suggest a widget to [[widgets@tiddlyspot|http://widgets.tiddlyspot.com]],
fill out (especially the required fields marked with *) and then send this form:
<html><iframe src="http://goto.bplaced.net/x/tiddlyspot/contact/contactForm.html" name="inlineFrame2" style="border:none;width:100%;height:300px;"><p>Sorry, your browser doesn't support embedded frames!<br>get a decent one, will ya!?!</p></iframe></div></html>/%
!flickr
<html><iframe src="http://www.flickr.com/groups/hdr/pool/show/" width="100%" height="600" name="flickrFrame" scrolling="auto" frameborder="0"><p>Sorry, your browser doesn't support embedded frames!<br>get a decent one, will ya!?!</p></iframe></html>
!end%/
/***
|''Name:''|jQueryPopup|
|''Description:''|Inline annotations for tiddler text with a 'jQueryfied' popup|
|''Author:''|Tobias Beer (original AnnotationsPlugin by Saq Imtiaz)|
|''Source:''|http://tbGTD.tiddlyspot.com/#jQueryPopup|
|''Version:''|0.1|
|''Date:''|2009.10.19|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.3|
|''incompatible with!!!''|AnnotationsPlugin|

((@@color:red;background:transparent;mod of ~AnnotationsPlugin@@(^strongly modded for tbGTD<br />*added delay<br />*wikified annotated & annotation<br />*used general tw Popup<br />*jQuery magic)))
!!Usage:
*{{{((text to annotate(annotation goes here)))}}}
* To include the text being annotated, in the popup as a title, put {{{^}}} as the first letter of the annotation text.
** {{{((text to annotate(^annotation goes here)))}}}
!!Examples:
Mouse over, the text below:
* ((_banana(the best fruit in the world)))
* ((_banana(^the best fruit in the world)))
***/
//{{{
config.extensions.anno={
	show:function(id){
		var el=document.getElementById(id);
		el.timerA=false;
		
		var wrap=document.getElementById('annowrap');
		if (wrap==undefined)wrap=createTiddlyElement(document.body,"div","annowrap",null);
		else wrap.innerHTML='';
		wrap.style.display='none';
		
		var stackPosition = Popup.find(el,"popup");
		Popup.remove(stackPosition+1);
		var popup = createTiddlyElement(wrap,"ol","popup","popup");
		popup.stackPosition = stackPosition;
		Popup.stack.push({root: el, popup: popup});
		
		if(el.subject)wikify("!"+el.subject+"\n",popup);
		wikify(el.anno,popup);
		Popup.show();
		
		popup.annoId=id;
		popup.onmouseover=this.mouseover;
		popup.onmouseout=this.mouseout;
		jQuery(wrap).fadeIn('slow');
		addClass(el,"annosubover");
		el.wrap=wrap;
	},
	hide:function(id){var el=document.getElementById(id);if(el.keepAnno)return;else this.remove(id);
	},
	mouseover:function(e){
		var el=document.getElementById(this.annoId);el.keepAnno=true;if(annoHideTimer)clearTimeout(annoHideTimer);
	},
	mouseout:function(e){
		annoHideTimer=setTimeout("config.extensions.anno.remove("+this.annoId+")",200);
	},
	remove:function(id){
		var el=document.getElementById(id);
		Popup.remove();
		removeNode(el.wrap);
		el.wrap=null;
		el.keepAnno=false;		
		removeClass(el,"annosubover");
	}
}
config.formatters.unshift({
	name:"annotations",
	match:"\\(\\(",
	lookaheadRegExp:/\(\((\_{0,2})(.*?)\((\^?)((?:.|\n)*?)\)\)\)/g,
	handler:function(w){
		this.lookaheadRegExp.lastIndex=w.matchStart;
		var an=this.lookaheadRegExp.exec(w.source);
		if(an&&an.index==w.matchStart){
			var el=createTiddlyElement(w.output,"span",null,"annosub");
			if (an[1]) el=createTiddlyElement(el,"span",null,null);
			wikify('xxx'+an[2],el);
			el.innerHTML=el.innerHTML.replace(/xxx/,'',1);
			el.anno=an[4];
			if(an[3])el.subject=an[2];
			el.onmouseover=this.onmouseover;
			el.onmouseout=this.onmouseout;
			el.ondblclick=this.onmouseout;
			w.nextMatch=an.index+an[0].length;
		}
	},
	onmouseover:function(e){
		if (!this.id) this.id=new Date().getTime()+Math.random();
		if(this.timerA)return;
		this.timerA=true;
		annoTimer=setTimeout("config.extensions.anno.show("+this.id+")",300);
	},
	onmouseout:function(e){
		this.timerA=false;
		if(!this.wrap||this.keep)clearTimeout(annoTimer);
		var id=this.id;
		annoHideTimer=setTimeout("config.extensions.anno.hide("+this.id+")",200);
	}
});
setStylesheet(".anno{position:absolute;padding:0.5em;max-width:15em;z-index:101;width:expression(document.body.clientWidth > (255/12) *parseInt(document.body.currentStyle.fontSize)?'15em':'auto' );}.anno h1, .anno h2{margin-top:0;}.annosubover{cursor:text;}","AnnotationStyles");
//}}}
<<newJournal "YYYY-0MM-0DD " label:"Write a new journal entry..." focus:title prompt:"Click to create a new journal entry!" tag:journal>>
<<tiddlerList tags:"journal" dateFormat:"mmm. 0DD" itemTemplate:"*%created - %0 \n" group:"tiddler.created.formatString('YYYY, MMM')" groupTemplate:"!!!%group \n" order:"-created">>
|widetable noborder|k
|padding:10px;<<tiddler SideBarOptions>>|vertical-align:top;padding:10px;<<showReminders leadtime:-14...7>> |
{{{-> }}}[[vis en kalender over hele åretr|årskalender]]


Here's more stuff I did to [[tbGTD|http://tbGTD.tiddlyspot.com]]...
*[[next actions|#next]] and [[this weeks reminders|reminder]] are now next to each other on the desk, as both are are likely to grow more than [[active projects|$active]] or [[starred tiddlers|star]]
*modded ~TaggerPlugin into [[TaggerPluginGTD]]
**using a [[more dynamic list|x-tagger]]
***now uses @@GTD tag categories@@ - or rather the subcategories tagging to them - to generate taggers' taglist
**now allowing (silent) substitution within categories, instead of merely adding and removing tags
***...see the @@mode@@ setting in source code for options
**changed function ''onClickTag''
***removed {{button{rename tag}}} and {{button{open tag}}} from the {{{<<tag myTag>>}}}-popup ...both seemed rather redundant
*modded QuickOpenTagPlugin
**now only shows the triangle invoking the popup if indeed there are any tagging tiddlers
**relevant for MainMenu and [[Tagger|TaggerPluginGTD]]
*Added preconiguration for {{{archive management}}} to the desk
**set up underscored tags for <<tag archive>> categories
*Added [[FieldsEditorPlugin|FE2]]
**completely refactored its code
*added tag dropdowns for [[#next]], [[$active]] and [[starred tiddlers|star]] on the desk
**created a script called [[miniTag|scripts]] to retrieve them
|!where?|!what?|!how?|
|[[tbGtdTheme]] |adapted standard [[mptw|http://mptw.tiddlyspot.com]] theme |changed a lot in [[templates|tbGtdTheme]] and [[stylesheets|StyleSheet]] |
|[[TaggerPlugin|TaggerPluginGTD]] |mod for source tiddler<br/>looking for links in the tiddler<br/>instead of assigned tags |<<tiddler "my customizations##taggerPlugin">> |
|[[ReminderMacros]] |closing "add reminder" form<br/>when reminder is added |<<tiddler "my customizations##ReminderMacros">> |
/%
!ReminderMacros
in...
{{{
window.addReminderToTiddler = function(form) {
}}}
right before...
{{{
window.story.refreshTiddler(title,1,true);
}}}
added...
{{{
//tb: close form when done processing
form.parentNode.parentNode.previousSibling.onclick();
}}}
!taggerPlugin
in...
{{{
   var onclick = function(e) {}
}}}
replaced..
{{{
if (source)
   {var sourcetiddler=store.getTiddler(source);
   tags=sourcetiddler.tags.sort();}
}}}
with...
{{{
//mod tb: different method for source tiddler (using embedded wiki links)
if (source) {
   var sourcetiddler=store.getTiddler(source);
   var tids = store.filterTiddlers(store.getTiddlerText(source));
   var tags=new Array();
   for(var t=0; t<tids.length; t++) tags.push(tids[t].title);
   } 
}}}
!end%/
<<tiddler TidTweets with: maans>>
!Introducing  quick-add
I took the time and added a quick-add feature to QuickNotes. You might already be familiar with something similar from [[MonkeyGTD|monkeygtd.tiddlyspot.com]]. This one, of course, works a bit different. I kind of stuffed it with features and I hope they will serve you well!
!A few things I introduced
*the concept and implementation details are explained in [[QuickAdd help]]
*now, there's a handy {{button{+}}} button in the [[left top-menu|topMenuL]] allowing you to quickly access QuickNotes
*use {{button{add reminder}}} to add'em to your note or quick-add list
*give your textarea a {{button{bigger size}}}
*and there's a button to {{button{list all notes}}}
!Update notice
To upgrade your QuickNotes simply import it from here
!The new QuickNotes interface
This is what it currently looks like, in fact a working example...

<<tiddler QuickNotes>>
!Other new stuff
*categories in the [[MainMenu]] are now show with their respective prefix for reference
*henceforth double-clicking on a category in the [[MainMenu]] displays all categories
**single-click opens a single category while collapsing all others
Tiddlers hidden from the [[TagCloud]]...
All [[quick notes|QuickNotes]] are tagging here...

@@display:block;margin:1em 1em 0 1em; [[SiteLayout]] <<saveChanges 'gem'>><<tiddler TspotSidebar>><<slider chkTspotControls TspotControls "flere tiddlyspot muligheder »" "Vis flere tiddlyspot muligheder">><<slider chkAdvOptionsPanel AdvancedOptions "avancerede muligheder »" "Vis avancerede muligheder">>@@
|widetable|k
| mulighed | beskrivelse |h
| <<tiddler TspotOptions>>|muligheder gemmes som cookies i din browser|
| <<option txtUserName>>|brugernavn til signering af dine ændringer|
| <<option chkAnimate>>|tillad animationer|
| <<option chkAutoSave>>|gem automatisk|
| <<option chkSaveBackups>>|gem backups|
| <<option chkRegExpSearch>>|søg med almindelige udtryk|
| <<option chkCaseSensitiveSearch>>|søg - forskel på store og små bogstaver|
!Christian via email on {{ds{2009-11-24}}}
{{{I want to thank you for your great work on tbGTD. I have been seriously evaluating Tiddly GTD variants this week — I have looked extensively at d3 and Monkey GTD — and have found tbGTD to be the best so far.}}}
!Dave Parker on google groups on {{ds{2009-11-23}}}
{{{Thanks also for your tbGTD, I use that as my main TW - its very nice!}}}
!JB via email on {{ds{2009-11-14}}}
{{{Hi (from France),

I just want to tell you that your tbGTD is the best tiddlywiki GTD system I\'ve éver seen. Many thanks for that.

Congratulation.
Best regards,
JB}}}
!Morris Gray & Alex Hough on {{ds{2009-11-01}}}
http://groups.google.com/group/tiddlywiki/browse_thread/thread/c7bca94087a724c
{{{While I am at it you deserve accolades for tbGTD.  It is very
professional, well laid out and ergonomically efficient, as well as
being very attractive.

Well done and thanks again,

Morris — I second that. Alex.
}}}

Assign priorities to differentiate importance...
Group [[actions|action]] into projects by assigning projects as tags to action-tiddlers. Assign project-tags to projects to indicating their status...
''New'': <<newTiddler label:"$active" title:"new active project" prompt:"create a new active project" focus:title tag:$active>><<newTiddler label:"$someday" title:"new someday project" prompt:"create a new someday project" focus:title tag:$someday>> <<newTiddler label:"$maybe" title:"new maybe project" prompt:"create a new maybe project" focus:title tag:$maybe>>
Gruppér [[handlinger|handling]] i projekter by ved at tagge handlings tiddlere med projekter. Sæt projekt-tags til projekter for at vise deres status...
''Nyt projekt'': <<newTiddler label:"$igang" title:"nyt igangværende projekt" prompt:"opret et nyt igangværende projekt" focus:title tag:$igang>><<newTiddler label:"$engang" title:"nyt projekt engang" prompt:"opret et nyt projekt, der skal udføres engang" focus:title tag:$engang>> <<newTiddler label:"$måske" title:"nyt projekt måske" prompt:"opret et nyt projekt, som måske bliver til noget" focus:title tag:$måske>>
!Alle påmindelser...
{{block{<<showReminders periode:-356...356>>}}}
@@color:#999;(kun påmindelser indenfor +/- 1 år)@@/%
!info
Se også [[kalender]] linket i [[venstre-topmenu|topMenuL]] eller i højre [[sidepanel|SideBarOptions]] ...eller klik på disse links.
!end%/
!QuickNotes has two modes of operation
#''simple note'' -- saves a new [[note]]-tiddler with the following properties:
**a ''title'' (optional) {{{...if none provided a timestamp will be inserted}}}
**some ''tags'' (optional) {{{...all notes will be tagged with 'note'}}}
**a ''note'' (required) {{{...the text body of your note}}}
#''quick-add'' -- allows you to add multiple new GTD items:
**invoked via ''ctrl-click'' on the ''save note''-button
**define items to be added with a simple, yet powerful syntax {{{...as described below}}}
!Using 'quick-add'
Using the default settings only [[projects|project]] and [[actions|action]] can be added via quick-add.
Here's a first example of the syntax for adding actions:
>#q call Maria|@c &fa   {{{...creates the #queued action 'call Maria' tagged with context '@call' and area '&family'}}}
>!Notes {{{...this will be an actual heading of the content of the tiddler 'call Maria'}}}
>!!Things to talk about: {{{...a subheading}}}
>*foo {{{...you can even use lists}}}
>*http://bar.com {{{...could also be a WikiLink, like: [[bar]]}}}
>.#q remind her of Juans birthday|^1 {{{...creates a queued subaction tagging to 'call maria' with high priority }}}
''Note'': When using quick-add, a time-stamped summary will be created allowing you to check and quickly access all the tiddlers you just created.
!The syntax in detail
!!Basics
To create a default [[#next]] [[action]] or [[$active]] [[project]], just use the prefixes ''#'' or ''$'' by themselves followed by an empty space:
>''$'' my new active project
>''#'' my new next action
Append any unique starting letters of a category-tag to create something other than the defaults:
>''#q'' a queued action  
>''$s'' a someday project
And, of course, preceded by an empty character follows the title:
>''# my new next action title''
To add any other GTD tags use the separator ' ''|'' ' followed by GTD tags using the same nomenclature as above, separated with empty spaces:
># read the js cookbook''|@r &t''   {{{...adds a next action called 'read the js cookbook' tagged @read and &tech}}}
''Note'': As for all tags following ' ''|'' ', you can in fact use the starting characters of any items already added, even existing tiddlers. If those contain empty spaces use square brackets, e.g. {{{[[a q]]}}} to refer to some added item called {{{'a queued item'}}} or in fact any existing tiddler that starts with {{{'a q'}}}. Note that items which you just added will be preferred over other existing tiddlers. For example...
># ''d''o this
># then that|''d'' {{{...refers to 'do this' and will therefore be given it as a tag}}}
!!Dependencies
Use nesting or tagging to create action dependencies whereas...
*items used as tags are depending on those tagging to them
*high level items depend on lower level items, like a project depends on the completion of its subactions
!!Subitems
By adding dots ( ''.'' ) to the beginning of a line, items become nested subitems, being tagged with the name of the item of the next higher level:
>$s a someday project
>''.''#f some future subaction {{{...will be tagged with 'a someday project'}}}
>''.''#f another future subaction|§6  {{{...regarding some experiments}}}
>''..''#f the future on level two {{{...sub to 'another future subaction'}}}
>''.''#d already done in advance for my someday project
>$ another next project
>''.''#action xyz {{{...you guessed it, its subitem}}}
Which items allow nesting is defined at the beginning of the sourcecode of QuickNotes. Here are the defaults:
>''$''projects may contain any of the following subitems
>>''.$''subproject
>>''.§''stage
>>''.#''action
>>''.?''contact
>''§''stages may contain... {{{...not recommended, stages should rather be tags of actions}}}
>>''.#''action
>>''.?''contact
>''#''actions may contain...
>>''.#''action
>>''.?''contact
!!More tagging
Entering tags into the tag input field of QuickNotes will also add these tags to __all__ tiddlers created via quick-add! For example, if you entered...
>{{{[[your project name in brackets]]}}}
...it will be set as a tag to all subactions, in addition to any further nesting.

''Note'': If you forget the square brackets in the example above, all items will get 5 more tags instead of the one you wanted! However, you could as well use single- or double-quotes.
!!New item with content
Every line that doesn't start with ''#'' or ''$'' will be used as the tiddler content of the item defined beforehand:
>$s my private someday project|-p   {{{...is the definition line for 'my private someday project' tagged '-private-'}}}
>!Project Introduction {{{...here starts its content}}}
>*a list
>*in the project-tiddler text   {{{...and here it ends}}}
>.#n my nested next science action|&sc   {{{...another definition for an action tagged &science}}}
>See...http://w3.org   {{{...and its content}}}
>*#with a pseudo-numbered-list {{{...can't use # directly as that is a 'definition prefix'!}}}
>*#list item number two   {{{...ending here}}}
!Tips
Try not to confuse ''$ dollar'' (project) and ''§ paragraph'' (project stage).
[[quick-add|QuickNotes]] summaries...
Realms are the broadest context you can think of for your activities, assign them to projects...
*http://groups.google.com/group/tiddlywiki/msg/17f2e6399d64c5a0
**http://www.sprymedia.co.uk/article/KeyTable
Use this tag for information related to your actions, projects, contacts, etc...
!1.2x release
*new in version 1.2x: ...it's all about the x in the toolbars
*[[x-tab]]: provides a crosstable for Tags
** use [[x-tab config]] to change settings (see x-tab info on tbGTD@tiddlyspot)
* [[x-plore]]: shows the four most relevant tiddler-relations as trees 
* [[x-tag]]: (previously ~TaggerPluginGTD) tagger gone squared... allows you to more efficiently assign (GTD)-Tags
** use [[x-tagger config]] to change settings
* modded [[TagCloud]] to allow the use of a 'noCloud' tag to hide a tag form the cloud
* changed [[ReminderMacros]] to allow display of negative dateranges for up to a year ago
* put most used options into a <<popup popup [[<<tiddler topMenuR##options$))]]>>
* added [[priorities|priority]] and [[#waiting]] status for tasks
* minor bugfixes and typos
!!!spoiler warning
I just had to swap the prefixes for $[[project]] and §[[stage]], they just make so much more sense the other way around.
* pronto! ...that's it for a while now... gotta get a job ;-)
!1.1 new features
*added quick-add to [[QuickNotes]]
*introducing <<tag stage>><<rB project-stages>>
*modified handling in ~TaggerPluginGTD (now [[x-tagger]]) & [[MainMenu]]
*cleaned up [[options]]
*minor bugfixes and typos
!1.01 minor fixes && additions
* added <<tag tbGTD>> tag to all tiddlers that belong to the basic install
* added [[clean archived...]]
* added [[References|reference]] to [[desk]] & [[topMenuL]]
* corrected wrong links to create new tasks in tiddler [[task]]
* corrected [[ReminderMacros]], so that the form to add a new Reminder selects the current month 
* added [[SiteLayout]]
!1.0 initial release
*yay...
!All reminders...
{{block{<<showReminders leadtime:-356...356>>}}}
@@color:#999;(only includes reminders +/- 1 year)@@/%
!info
Find more date and reminder related information via the [[calendar]] link in the [[left-topmenu|topMenuL]] or in the right [[sidebar|SideBarOptions]] ...or click on thse links.
!end%/
Looks like reminders deserve a whole lot more attention than I was paying. So I will think about how to set up meaningful categories and listviews, etc...

<<reminder year:2009 month:11 day:8 title:"set up categories" >>
I took some time to update the design to my taste. Here are a few things I did...
*upgraded to ~TiddlyWiki version 2.53
*added
**QuickNotes
**[[TidTweets]]
**TagCloud
**[[QuickOpenTags|QuickOpenTagPlugin]] to tags shown on the [[desk]]
**[[calendar]] to right [[sidebar|SideBarOptions]]
**GotoPlugin to replace ~YourSearch
**modded and shrinked ReminderMacros
**modded [[AnnotationsPlugin|jQueryPopup]] to include a delay and some beautiful jQuery magic... @@((Hover me!(See, this is what I am talking about!)))@@
*removed
**~NestedSlidersPlugin (for now); instead using a modded AccordionMenuPlugin for the MainMenu
***allows to quickly access categories and add {{button{+}}} new elements
***shows [[quick-open-tags|QuickOpenTagPlugin]], like <<tag #next>>, in the [[MainMenu]]
**~PartTiddlerPlugin; instead using hiddens sections and the native {{{<<tiddler>>}}} macro
***example: the popups in the [[topMenu|topMenuL]]
*changed
**colors!
***dared to go black
***the secondary colors in ColorPalette now have a blueish tone
***adapted colouring of [[TiddlersBar|TiddlersBarPlugin]]
**the message-area is now centered
**toggle-sidebar-buttons moved to the sides
**wiki management is now under [[options]]
!How do you like it?

Sammenhænge angiver, hvilken type aktivitet, du vil udføre for at gennemføre en handling ...
/%
!refreshBtn
<html><a class='refresh' title="genopfrisk indholdet af $1" href="javascript:story.refreshTiddler('$1',null,true);return false;">opdatér</a></html>
!refresh
<<tiddler scripts##refreshBtn with: {{('$1'=='$'+'1')?tid=story.findContainingTiddler(place).getAttribute("tiddler"):'$1';}}>>
!tidsByTags
<script>
/***
|''Name:''|TiddlersByTags|
|''Description:''|Displays a table listing tiddlers by tags, excluding certain ones|
|''Author:''|Tobias Beer|
|''Source:''|http://tbGTD.tiddlyspot.com|
|''Version:''|1.1|
|''Date:''|2009.11.07|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Requires:''|InlineJavascriptPlugin|
***/
var ex=[],i,t,tx,xt='$1'.readBracketedList();
for(t=0;t<xt.length;t++){
	tx=store.getTaggedTiddlers(xt[t]);
	for(var i=0;i<tx.length;i++)ex.pushUnique(tx[i].title);
}
var out="|linkTable|k\n| tag | tiddlers |h\n";
var tags=store.getTags();
for (var tag=0;tag<tags.length;tag++) {
	if (ex.contains(tags[tag][0])) continue;
	var tids=store.getTaggedTiddlers(tags[tag][0]);
	out+="| [["+tags[tag][0]+"]]|";
	for (var t=0;t<tids.length;t++) out+="[["+tids[t].title+"]]";
	out+="|\n";
}
return out;
</script>
!deleteTiddler
<script label="slet" title="klik for at slette $1">
  var sTid='$1';
  var update='$2';
  var refresh='$3'!='norefresh';
  if(sTid=="$"+"1"){
    sTid=story.findContainingTiddler(place).getAttribute('tiddler');
    if (sTid=="DeleteTiddler") return;
    if (!confirm("Ønsker du at slette "+sTid+"?")) return;
    else refresh=false;
  }
  var oTid=store.getTiddler(sTid);
  if (oTid==undefined){
    alert("Kan ikke slette '$1'. Tiddleren findes ikke længere.");
    return;
  }
  store.removeTiddler(sTid);
  story.closeTiddler(sTid,true);
  if (refresh) story.refreshTiddler(story.findContainingTiddler(place).getAttribute('tiddler'),null,true);
  if (update!="$"+"2")story.refreshTiddler("$2",null,true);
  refreshDisplay();
</script>
!miniTag
<script>
var click=function(e){
	if(!e)var e=window.event;
	var popup=Popup.create(this);
	var tags=this.getAttribute('tags').readBracketedList();
	for(var t=0; t<tags.length; t++) createTiddlyLink(createTiddlyElement(popup,"li"),tags[t],true);
	Popup.show(popup,false);
	e.cancelBubble=true;
	if(e.stopPropagation)e.stopPropagation();
	return false;
}
var title="$1"!='$'+'1'?'$1':story.findContainingTiddler(place).getAttribute('tiddler');
var tid=store.getTiddler(title);
if(tid){
	var title=('$2'!='$'+'2'?'$2':'')+'\u25b6';
	var exclude=('$3'!='$'+'3'?'$3':'').readBracketedList();
	var tags=tid.tags;
	out=[];
	for(var t=0; t<tags.length; t++)if(!exclude.contains(tags[t])) out.push(tags[t]);	
	if (out.length>0){
		addClass(place,'miniTags');
		var btn=createTiddlyButton(place,title,'show tags for \''+tid.title+'\'',click);
		btn.setAttribute('tags',(out.length>1?"[["+out.join(']][[')+']]':'[['+out+']]'));
	}
}
</script>
!end%/
//{{{

config.options.chkAutoSave = false;
config.options.chkAnimate = true;
config.options.chkSaveBackups = false;
config.options.txtTheme = "TeamTasksSkin";

//}}}
Tiddlers that relate to the design of this site...
<script label="Klik her!" title="klik her for at slette alle arkiverede tiddlere.">
var t,tgt,ca,ar,clean=[];
ar=store.getTaggedTiddlers('arkiv');
for(ca=0;ca<ar.length;ca++){
	tgt=store.getTaggedTiddlers(ar[ca].title);
	for(t=0;t<tgt.length;t++)clean.pushUnique(tgt[t].title);
}
if(clean.length>0){
	if(!confirm('Ønsker du virkelig at slette '+clean.length+' arkiverede tiddlere?\n'+clean))return;
	for(t=0;t<clean.length;t++){
		store.removeTiddler(clean[t]);
		story.closeTiddler(clean[t],true);
	}
}else alert('Intet at slette.');
</script> hvis du ønsker at slette arkiverede tiddlere.
''Note'': Du vil blive bedt om at godkende tiddlere, der skal slettes.
!Think in project stages
<<tiddlerList tags:"stage" order:"title" header:'| stage | description |h' itemTemplate:"|text-align:left;!<<tag '%title'$))|<<tiddler '%title'$))|\n">>/%
!info
Use [[stages|stage]] to indicate which step in your project cycle an element relates to. See [[here|stage]] for an overview of all predefined stages and their meaning. Stages are most useful when you do specific kinds of projects on a regular basis. It is essential that stages reflect your own project flow. Therefore, do not hesitate to adjust them to suit your needs or make specific tbGTD templates for different kinds of projects.
!end%/
Tiddlers tagged with star ([[★|star]]) are currently of interest or high importance so you can retrieve them quickly. Use the star {{button{[[★|star]]}}} in the toolbar to mark a tiddler...

{{sidebarTitle{[[plugin manager:|PluginManager]]}}}
<<list filter [tag[systemConfig]]>>
disabled plugins:
<<list filter [tag[systemConfigDisable]]>>

{{desk{
|widetable|k
|width:50%;font-size:16px; <<newTiddler label:"+" title:"ny næste handling" prompt:"opret en ny næste handling" focus:title tag:#next>>[[næste|#next]] [[handlinger|action]]((*({{popBtn{<<tiddler action>>}}}))) |font-size:16px; <<newTiddler label:"+" title:"ny påmindelse" prompt:"opret en ny påmindelse" focus:title tag:reminder text:{{var d=new Date();'<<reminder year:%0 month:%1 day:%2 title:"reminder title">\>'.format([d.getFullYear(),String.zeroPad(d.getMonth()+1,2),String.zeroPad(d.getMonth(),2)]);}}>>[[Denne uges |calendar]][[påmindelser|reminder]]((*(<<tiddler reminder##info>>))) |h
|height:20px;background-color:#eee;{{deskNew{<<newTiddler label:"+" title:"queue new action" prompt:"create a new queued action" focus:title tag:#queued>><<tag #queued>><<rB queued>><<newTiddler label:"+" title:"new waiting action" prompt:"create a waiting action" focus:title tag:#waiting>><<tag #waiting>><<rB waiting>><<newTiddler label:"+" title:"new future action" prompt:"create a new future action" focus:title tag:#future>><<tag #future>><<rB future>><<tag #done>><<rB done>>}}}|padding-left:0.7em;{{block{<<showReminders leadtime:-3...7>>}}} |
|padding:1px;{{block{<<tiddlerList tags:"#next" order:"-modified" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' '#next'$))|\n"  header:"|noborder|k">>}}} |~|
|font-size:16px; <<newTiddler label:"+" title:"new active project" prompt:"create a new active project" focus:title tag:$active>>[[active|$active]] [[projects|project]]((*({{popBtn{<<tiddler project>>}}}))) |font-size:16px; <<newTiddler label:"+" title:"new starred tiddler" prompt:"create a new starred tiddler" focus:title tag:star>>[[starred tiddlers|star]]((*(<<tiddler star>>))) |h
|height:20px;background-color:#eee;{{deskNew{<<newTiddler label:"+" title:"new someday project" prompt:"create a new someday project" focus:title tag:$someday>><<tag $someday>><<rB someday>><<newTiddler label:"+" title:"new maybe project" prompt:"create a new maybe project" focus:title tag:$maybe>><<tag $maybe>><<rB maybe>><<tag $completed>><<rB completed>>}}}|padding:1px;{{block{<<tiddlerList tags:"star" order:"-modified" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' 'star'$))|\n"  header:"|noborder|k">>}}} |
|padding:1px;{{block{<<tiddlerList tags:"$active"  order:"-modified" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' '$active'$))|\n"  header:"|noborder|k">>}}}|~|

<html><div style="width:80px;float:left;text-align:right;margin:0px 10px;">more views:</div></html>{{view{((_*(<<tiddler context>>)))<<tag context>><<rB contexts>>}}}{{view{((_*(<<tiddler contact>>)))<<tag contact>><<rB contacts>>}}}{{view{((_*(<<tiddler area>>)))<<tag area>><<rB areas>>}}}{{view{((_*(<<tiddler realm>>)))<<tag realm>><<rB realms>>}}}{{view{((_*(<<tiddler stage##info>>)))<<tag stage>><<rB stages>>}}}{{view{((_*(<<tiddler priority>>)))<<tag priority>><<rB priorities>>}}}{{view{<<popup 'more tools...' [[<<tiddler topMenuR##options$))]]>>}}}
![[Latest articles|journal]]
<<tiddlerList tags:"journal" top:"5" dateFormat:"mmm. 0DD" itemTemplate:"*[[%created - %title|%title]] \n" order:"-created">>
}}}
All tiddlers powering this wiki...
<<tiddler help with: all>>
|widetable linkTable|k
| Link | Title / Comment | Date | Site | Language |h
|[[articulo|http://www.dutudu.com/tbgtd-sistema-gtd-portable/webapps/2009/10/28/]]|tbGTD, sistema GTD portable|2009-10-28|[[dutudu.com|http://www.dutudu.com]]|Spanish|
[[Download from box.net...|download]]
!The new release
*[[x-tab]] a crosstable lookup for tags ... in the toolbar for all GTD items
*revamped {{button{GTD}}}tagger, now with neat columns and headings
**go to the toolbar and check it out ...I love it!
*[[priorities|priority]] ...for when a [[ ★|star]] is not enough
*fix in [[TiddlerListMacro]] ...regexp's did only replace once
* modded [[TagCloud]] to allow the use of a <<tag noCloud>> tag to hide a tag form the cloud
* modded [[DeliciousTagging]]
** to allow for custom categories as tag-chosers
** to excludes the same tags as [[TagCloud]] by default (those tagged <<tag noCloud>>)
*for upgrading reasons all ''tbGTD core elements'' -- what I consider as such -- are now tagged <<tag tbGTD>>
*renamed ''tasks'' into <<tag action>><<rB actions>> and introduced <<tag #waiting>>
*adaptations in [[stages|stage]]-template
*[[options]] is now a <<popup options [[<<tiddler topMenuR##options$))]]>>popup
*cleaned up the [[desk]]
!Here comes the spoiler
I just had to swap the prefixes of [[project]] and [[stage]]!
*from now on, the ''$dollar''-prefix will indicate a [[project category|project]] while the ''§paragraph''-prefix indicates a [[stage]]
*the symbology just makes 10 times more sense that way
*also, you're probably accustomed to the $ key ...therefore, it's good for starters, i.e. projects
I know that this somewhat breaks backwards-compatibility and I am sorry!
''Just say'': {{{Alright then. I'ts fine... nay bother.}}}
!So here's what I recommend you should do before updating
Assign the new prefixes of [[project]]- and [[stage]]-categories for those categories in which you have items. That will take care of reassigning the new tagname in all tagging tiddlers. The MainMenu indicates which tag-categories have items. Finally, import your tiddlers into a blank tbGTD. Wasn't all that difficult, was it?
!In the future
Updating should be as simple as importing all or certain tiddlers tagged <<tag tbGTD>> into your existing document. For that I recommend you use [[ImportTiddlersPlugin|http://www.tiddlytools.com/#ImportTiddlersPlugin]] from http://www.tiddlytools.com ...which I am constantly using as what is called an [[InstantBookmarklet|http://www.tiddlytools.com/#InstantBookmarklets]]. You might, however, still need to upgrade to a new TiddlyWiki core version ...because I sure will be and be building upon whatever changes come along with it.
The project around this tiddlywiki gtd adaptation...
|''URL:''|http://tbGTD.tiddlyspot.com/|
|''Author:''|Tobias Beer|
|''Description:''|a tiddlywiki GTD system|
|Name|tbGtdTheme|
|Description|A theme based on ~MptwTheme ($Rev: 1829 $) with innumerable customizations |
|PageTemplate|##PageTemplate|
|ViewTemplate|##ViewTemplate|
|EditTemplate|##EditTemplate|
|StyleSheet|##StyleSheet|

!PageTemplate
<!--{{{-->
<div class="topMenu" id="topMenuR" refresh='content' tiddler='topMenuR'></div>
<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>
<!-- horizontal MainMenu -->
<div class='topMenu' id="topMenu" macro='gradient vert [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryMid]] [[ColorPalette::TertiaryDark]]'>
  <span id="topMenuL" refresh='content' tiddler='topMenuL'></span>
</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='mainMenu' refresh='content' force='true' tiddler='MainMenu'></div>
<div id='displayArea'>
	<div id='messageArea'></div>
	<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>
	<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
!lektieViewTemplate
<!--{{{-->
[[tbGtdTheme##Viewtemplatetoolbar]]

<div class="tagglyTagged" macro="tags"></div>
<div macro="hideWhenTaggedAny noTitle iframe">
<div class='titleContainer'>
	<span class='title' macro='view title'></span>
	<span macro="miniTag"></span>
</div>

<div class='subtitle'>
	(opdateret <span macro='view modified date {{config.options.txtPrettyDates?config.options.txtPrettyDates:"YYYY-0MM-0DD"}}'></span>&nbsp;by&nbsp;<span macro='view modifier link'></span>)
	<!--
	(<span macro='message views.wikified.createdPrompt'></span>
	<span macro='view created date {{config.options.txtPrettyDates?config.options.txtPrettyDates:"YYYY-0MM-0DD"}}'></span>)
	-->
</div></div>
<div class='task'>
	<table style='width:100%'><tr style='vertical-align:top'>
	<tr>
                 <td style='width:75%'><span class='taskbody'><div class='viewer' macro='view text wikified'></div><div macro="hideWhenTaggedAny noT not"><span macro='formTiddler LektieTemplate2'></span></div><div class='reminder' macro='newReminder'></span></div><br /></td>
		<td style='width:25%'><span class='taskControls'><div class='taskControls' macro='tiddler TaskTiddlerControls'></span></td>
	</tr>
	</table>
</div>
<div class="tagglyTagging" macro="tagglyTagging"></div>
<div class='toolbar toTop' style='line-height:100%;margin-top:.5em;'><a href="javascript:;"
	onclick="window.scrollTo(0,ensureVisible(story.findContainingTiddler(this)));return false;"
	onmouseover="this.title='scroll to top of '+story.findContainingTiddler(this).getAttribute('tiddler')">&#x25b2;</a>
</div>
<!--}}}-->

!lektieEditTemplate
<!--{{{-->
<div class="toolbar" macro="toolbar [[ToolbarCommands::EditToolbar]]"><span macro='popup [[info on formating]] [[<<tiddler formating$))]] "" helpPopup'  style='margin-right:30px;'></span></div>
<div class="title" macro="view title"></div>
<div class="editLabel">Titel</div><div class="editor" macro="edit title"></div>
<div class="editLabel">Tags</div><div class="editor" macro="edit tags"></div>
<div class='editorFooter' macro='deliciousTagging'><span class='tagChooser'title='vælg tags' macro='tagChooser'></span></div>
<div macro='annotations'></div>
<div macro='tiddler QuickEditToolbar'></div>
<div class='task'>
        <table style='width:100%'><tr style='vertical-align:top'>
                <td style='width:75%'><span  class='taskbody'><div class='viewer edit' macro='edit text wikified'></div></div></td>
                <td style='width:25%'><span class='taskControls'><div class='taskControls' macro='tiddler TaskTiddlerControls'></span></td>
        </tr></table>
</div>
<div class='tagClear'></div>
</div>
<!--}}}-->

!ViewTemplate
<!--{{{-->

[[tbGtdTheme##Viewtemplatetoolbar]]

<div class="tagglyTagged" macro="tags"></div>
<div macro="hideWhenTaggedAny noTitle iframe">
<div class='titleContainer'>
	<span class='title' macro='view title'></span>
	<span macro="miniTag"></span>
</div>

<div class='subtitle'>
	(opdateret <span macro='view modified date {{config.options.txtPrettyDates?config.options.txtPrettyDates:"YYYY-0MM-0DD"}}'></span>&nbsp;by&nbsp;<span macro='view modifier link'></span>)
	<!--
	(<span macro='message views.wikified.createdPrompt'></span>
	<span macro='view created date {{config.options.txtPrettyDates?config.options.txtPrettyDates:"YYYY-0MM-0DD"}}'></span>)
	-->
</div></div>

<div class='viewer' macro='view text wikified'></div>
<div class="tagglyTagging" macro="tagglyTagging"></div>
<div class='toolbar toTop' style='line-height:100%;margin-top:.5em;'><a href="javascript:;"
	onclick="window.scrollTo(0,ensureVisible(story.findContainingTiddler(this)));return false;"
	onmouseover="this.title='scroll to top of '+story.findContainingTiddler(this).getAttribute('tiddler')">&#x25b2;</a>
</div>
<!--}}}-->

!Viewtemplatetoolbar
<!--{{{-->
<div class='toolbar'>
	<span macro="tiddler {{var v=store.getValue(tiddler,'need');v?v:'';}}"></span>
	<span style="padding:1em;"></span>
	<span macro="tTag tag:stjerne mode:text text:★" style="padding-top:0.2em;"></span><span class='toolbar' macro='snapshot print label:print prompt:Udskriv id:viewer'></span>
        <span title="TagCycle" style="margin-right:20px;"><span macro="tiddler cycleTags with: TagList">
</span></span>
	<span macro="xtab button defaults:true position:first" style="margin:0 0 0 10px;"></span>
	<span macro="xplore button:true toolbar:true exclude:GET==x-plore##exclude truncate:GET==x-plore##truncate class:'borderless'"></span>
	<span macro="xtagger source:'x-tagger config##Tags' exclude:'' label:'x-tag' tooltip:'Set GTD related tags' more:'x-tagger config##More'" style="margin-right:20px;"></span>
	<span macro='newHere label:"ny her"'></span>
	<span macro='toolbar [[ToolbarCommands::ViewToolbar]]'></span>
	<span macro='addActivity "+Aftale"' class='reminder'></span>
</div>
<!--}}}-->

!EditTemplate
<!--{{{-->
<div class="toolbar" macro="toolbar [[ToolbarCommands::EditToolbar]]"><span macro='popup [[info on formating]] [[<<tiddler formating$))]] "" helpPopup'  style='margin-right:30px;'></span></div>
<div class="title" macro="view title"></div>
<div class="editLabel">Title</div><div class="editor" macro="edit title"></div>
<div class="editLabel">Tags</div><div class="editor" macro="edit tags"></div>
<div class='editorFooter' macro='deliciousTagging'><span class='tagChooser'  title='set tiddler tags' macro='tagChooser'></span></div>
<div macro='annotations'></div>
<div macro='tiddler QuickEditToolbar'></div>
<div class="editLabel">Indhold:</div><div class="editor" macro="edit text"></div>
<!--}}}-->

!StyleSheet
/*{{{*/
.headerShadow{
padding: 1em;
text-align: left;
}
displayArea {
margin:1em 17em 0 1em;
}
body{background: [[ColorPalette::TertiaryDark]];}
#backstageButton a{color:[[ColorPalette::TertiaryLight]];padding-left:10em;}
#backstageButton a:hover{color:[[ColorPalette::Background]];background:transparent;}
#backstageToolbar{text-align:center;}

#messageArea{position:absolute;top:0.3em;left:38%;padding:0.7em 1%;width:25%;border:2px solid [[ColorPalette::TertiaryLight]];-moz-border-radius:3px; -webkit-border-radius:3px;background:[[ColorPalette::TertiaryDark]];color:[[ColorPalette::TertiaryMid]];}
#messageArea .messageToolbar{display:block;float:right;padding:0.1em;text-align:right;width:30px;}
#messageArea a, #messageArea .button{background:transparent;text-decoration:none;color:[[ColorPalette::Background]];}
#messageArea a:hover{color:[[ColorPalette::Foreground]];}

.headerShadow{padding: 1em 1em 0;font-family: 'Baskerville, Verdana, Trebuchet MS' sans-serif;font-weight:bold;}
.headerShadow, .headerShadow .siteSubtitle, .headerShadow .tiddlyLink{color: [[ColorPalette::TertiaryPale]];}
.headerShadow .tiddlyLink:hover{color:[[ColorPalette::SecondaryMid]];}
.subtitle{padding:0px;margin:0px;padding-left:1em;font-size: 90%;color: [[ColorPalette::TertiaryMid]];}
.subtitle .tiddlyLink{color: [[ColorPalette::TertiaryMid]];}

.topMenu{background-color:transparent;color:[[ColorPalette::PrimaryPale]];}
.popup .popBtn .button, .topMenu .button, .topMenu .tiddlyLink{font-weight:bold;margin:0 0.5em;padding:3px 1px;color:[[ColorPalette::PrimaryPale]];background:transparent;font-size:115%;border:0 !important;}
.popup .popBtn .button{font-size:100%;margin:0 3px;}
.popup .popBtn .button:hover, .topMenu .button:hover, .topMenu .tiddlyLink:hover{color: [[ColorPalette::SecondaryMid]];background:transparent;}
#topMenu{width:100%;padding:0.3em 0;}
#topMenuL br, #topMenuR br{display:none;}
#topMenuL{float:left;margin-left:0.5em;height:25px;}
#topMenuR{display:block;position:absolute;right:0em;z-index:11;height:25px;color:[[ColorPalette::TertiaryMid]];min-width:10%;float:right;top:4.9em;}
#topMenuClear{clear:both;width:100%;height:1px;border:0px;margin:0px;padding:0px;}

#toggleLeftSideBar{position:absolute;top:5px;left:5px;z-index:999;left:40;color:[[ColorPalette::Background]];}
#toggleLeftSideBar a{color:[[ColorPalette::Background]];background:none;border:0;}
#toggleLeftSideBar a:hover{background:none;border:0;}

#mainMenu{padding:10px 0 0 0;margin-top:-10px; width:8.1em; background:[[ColorPalette::PrimaryMid]]; -moz-border-radius:5px; -webkit-border-radius:5px;border:0; border-right: 5px solid [[ColorPalette::PrimaryMid]]; border-bottom: 5px solid [[ColorPalette::PrimaryMid]];text-align:left;z-index:0;}
#mainMenu ul{list-style:none;padding:0;margin:0px;}
#mainMenu li{clear:both;}
#mainMenu a{padding-left:5%;width:95%;margin-top:-1px;border-bottom:1px solid [[ColorPalette::Foreground]];border-top:1px solid [[ColorPalette::Foreground]];color:[[ColorPalette::PrimaryPale]];display:block;}
#mainMenu a:hover{color:[[ColorPalette::SecondaryMid]];background:[[ColorPalette::TertiaryDark]];}
#mainMenu ul ul{margin-bottom:30px;}
#mainMenu .accordion ul li .button, #mainMenu .accordion ul li .button:hover ,
#mainMenu .accordion ul li .quickopentag .button,
#mainMenu .accordion ul li .quickopentag .button:hover  {border:0 none;float:left;padding:0 3%;text-align:center;width:10%;font-size:11px;}
.popup .quickopentag .button {border-color:transparent;}
#mainMenu .accordion ul li .quickopentag .tiddlyLink{border:0;float:left;padding:0 0 0 1%;width:67%;color:[[ColorPalette::SecondaryLight]];}
#mainMenu .accordion ul li .quickopentag .tiddlyLink:hover {text-decoration:underline;color:[[ColorPalette::SecondaryMid]];background:[[ColorPalette::Foreground]];}
#mainMenu .noCopy{color:[[ColorPalette::TertiaryDark]];border-top:none;}
#mainMenu .main{padding:1px 0 1px 5px;}

.xtagger .quickopentag .tiddlyLink:hover {text-decoration:underline;color:[[ColorPalette::SecondaryMid]];background:[[ColorPalette::Foreground]];}
.xtagger .quickopentag .tiddlyLink{font-size:110%;border:0;padding:0 0 0 1%;display:inline;color:[[ColorPalette::SecondaryLight]];}

#sidebar{margin:-10px 0 0 0;padding:14px 0 5px 0; background:[[ColorPalette::PrimaryMid]]; -moz-border-radius:5px; -webkit-border-radius:5px;border:0; border-left: 5px solid [[ColorPalette::PrimaryMid]]; border-bottom: 5px solid [[ColorPalette::PrimaryMid]];width:17.6em;right:0;}
#sidebarTabs{margin:1em 0 0 0.5em;}
#sidebar .button{border-style:none;padding:2px 8px 2px 2px;}
#sidebar .button:hover{color:[[ColorPalette::SecondaryMid]];}
#sidebar br{display:none;}
#sidebar hr{height:0;border:0;border-bottom:1px solid [[ColorPalette::Foreground]];}
#sidebar li a{display:block;}
#sidebar a{color:[[ColorPalette::TertiaryPale]];}
#sidebar .tiddlyLinkNonExisting{color:[[ColorPalette::TertiaryLight]];}
#sidebar .highlight, #sidebar .marked, #sidebar a:hover{color:[[ColorPalette::SecondaryMid]];background:[[ColorPalette::Foreground]];}
#sidebar .tabset{margin-bottom:2px;padding:0.5em 0 0 0 !important}
#sidebar .tabset .tab {padding:3px;font-size:9px;font-weight:bold;height:16px;background-color:[[ColorPalette::Foreground]];color:[[ColorPalette::TertiaryLight]];display:inline;border:0;border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
#sidebar .tabset .tab:hover{background-color:[[ColorPalette::TertiaryDark]];color:[[ColorPalette::Background]];}
#sidebar .tabset .tabSelected{color:[[ColorPalette::SecondaryMid]];background:[[ColorPalette::TertiaryDark]];}
#sidebar .tabContents{background-color:[[ColorPalette::PrimaryMid]];border:0;border-top:1px solid [[ColorPalette::TertiaryDark]];color:[[ColorPalette::Background]];}
#sidebar .tagCloudtag, #sidebar #TOCMenu{display:inline;}
#sidebar .tabContents .tabset, #sidebar .tabContents .tabContents{padding:0;margin-left:-0.5em;}
#sidebar .tabContents .tabContents {padding-top:5px;margin-left:0.2em;}
#sidebar .tabContents .sideBarTags ul .tiddlyLink{padding:1px 0;width:88%;float:right;}
#sidebar .tabContents .sideBarTags .button{width:8%;padding:1px 1%;text-align:center;float:left;}
#sidebar .sidebarTitle a{display:block;font-size:110%;border-bottom:1px solid [[ColorPalette::Foreground]];font-weight:normal;}
#sidebar .TOC{padding:0;}
#sidebar .TOCList{padding:0;margin-top:3px;display:block;}
#sidebar .TOCList, #sidebar .TOCList option{border:[[ColorPalette::PrimaryMid]];background:[[ColorPalette::PrimaryMid]];color:[[ColorPalette::Background]];}
#sidebar .TOCList option:hover{background:[[ColorPalette::Foreground]];color:[[ColorPalette::SecondaryMid]];}

#searchResults{padding:1em;border: 1px solid [[ColorPalette::TertiaryLight]];margin:0;right:0.5em;position:absolute;background:[[ColorPalette::Background]];min-width:30%;max-width:40%;z-index:1000;}
#searchResults ul{max-height:150px;overflow:auto;}
#searchResults h1{clear:both;}
#searchResults ul{margin: 0.5em;padding-left:1.5em;}
#searchResults li{list-style-type:circle;}
#search_open,
#search_close{display:block;float:right;padding:5px 10px;width:70px;margin:5px 10px 10px 0px;text-align:center;border: 1px solid [[ColorPalette::TertiaryLight]];}
#searchResults .tiddlyLink{display:block;}

#tiddlersBar{margin-top:0px;padding-top:0px;}
.toolbar{float:right;}^
.toolbar .tiddlyLinkExisting{font-weight:normal;}
.toolbar{visibility:hidden;}
.selected .toolbar{visibility:visible;}

#displayArea{margin: 0.5em 17.1em 0em 10.1em;}
.tiddler{background:[[ColorPalette::Background]];border:3px solid [[ColorPalette::Background]];-moz-border-radius:3px; -webkit-border-radius:3px;border-right: 2px [[ColorPalette::TertiaryMid]] solid;border-bottom: 2px [[ColorPalette::TertiaryMid]] solid;margin-bottom: 1em;padding:1em 2em 2em 1.5em;}
.viewer{clear:both; POSITION: relative;color:[[ColorPalette::TertiaryDark]];padding-bottom:3px;}
.title, .titleContainer .miniTag{font-size: 250%;color: [[ColorPalette::PrimaryLight]];font-family: 'Baskerville, Verdana,Trebuchet MS' sans-serif;}
.editor textarea, .editor input{font-family: 'Consolas' monospace;background-color:[[ColorPalette::TertiaryPale]];}
.editorFooter{line-height:1.6em;}
.tagChooser{font-weight:bold;font-size:120%;}
h1,h2,h3,h4,h5,h6{background-color: transparent;color: [[ColorPalette::Foreground]];}

.toTop a:hover{background:transparent;}
#addReminderForm{clear:both;}

.clearDiv{clear:both; margin:0px; padding:0px; width:100%; height:1px;}
.toolbar a.on{color:orange;background-color:[[ColorPalette::Background]];}

#popup {padding:3px;}
.popup li,.popup ul,.popup ol,.popup span li,.popup span ul,.popup span ol {list-style:none !important;margin:0px !important;padding:0px !important;}
#popup tr.fieldTableRow td{padding:1px 3px 1px 3px;}
#popup div{color:[[ColorPalette::SecondaryMid]];text-decoration:underline;}
ol.popup{border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryDark]]; -moz-border-radius:3px; -webkit-border-radius:3px;}
.popup{background:[[ColorPalette::PrimaryMid]];}
.popup br{display:none;}
.popup ul li .button{padding:0.4em;display:block;}
.popup hr{padding:0;margin:0;border:0;}
.popup a, ol.popup li a, .popup ul li .button, .popup .menuH .button, .popup li a:visited{background:transparent;color:[[ColorPalette::TertiaryPale]];}
.popup a:hover, ol.popup li a:hover{background:[[ColorPalette::TertiaryDark]];color:[[ColorPalette::SecondaryMid]];}
.popup h1, .popup h2, .popup h3, .popup hr{border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
.popup h1, .popup h2, .popup h3, .popup h4, .popup h5, .popup{background:[[ColorPalette::Foreground]];color:[[ColorPalette::Background]];}
.popup .menuH{display:block;margin:0.5em 0 0 3px;padding:0;font-size:1.4em;font-weight:bold;border-bottom:1px solid [[ColorPalette::TertiaryDark]];min-width:250px;}
.helpPopup{font-size:120%;font-family:overflow:none;overflow-y:scroll;height:400px;font-family:'Verdana,sans-serif';}

td, tr{vertical-align:top;}
.viewer table,table.twtable{margin:0;border-collapse:collapse;border:1px solid [[ColorPalette:TertiaryMid]];}
.viewer table, table.twtable, .viewer td, .viewer tr, .twtable td, .twtable tr,
.viewer th, .viewer thead td, .twtable th, .twtable thead td{border:1px solid [[ColorPalette:TertiaryMid]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td{font-weight:bold;}
.viewer th .tiddlyLink, .viewer th .tiddlyLinkExisting, .viewer th .externalLink,
.viewer thead .tiddlyLink, .viewer thead .tiddlyLinkExisting, .viewer thead .externalLink{color:[[ColorPalette::Foreground]];}
.viewer th .tiddlyLink:hover, .viewer th .tiddlyLinkExisting:hover, .viewer th .externalLink:hover,
.viewer thead .tiddlyLink:hover, .viewer thead .tiddlyLinkExisting:hover, .viewer thead .externalLink:hover{color:[[ColorPalette::Background]];}
.linkTable .quickopentag .tiddlyLinkExisting,.linkTable .quickopentag .externalLink{display:inline;}

.noborder, .noborder table, .noborder td, .noborder tr, .noborder th, .noborder tbody { border:0 !important;margin:0 !important;}
.noborder tbody td{padding:1px 4px 1px 2px;}

#sidebarOptions .black .calendar{text-align:center;margin:0 auto;}
.black{display:inline-block;color:[[ColorPalette::TertiaryMid]];}
.black table{border:0 !important;}
.viewer .black{border:10px solid [[ColorPalette::PrimaryMid]];-moz-border-radius:10px; -webkit-border-radius:10px;}
.black, .black table, .black th, .black tr, .black td{background:[[ColorPalette::PrimaryMid]];padding:0 !important;border:0;}
.black .calendar td{border:1px solid [[ColorPalette::PrimaryMid]] !important;border-collapse:collapse;}
.black .calendar .weekNo{font-style:normal;color:[[ColorPalette::TertiaryMid]];border-left:5px solid [[ColorPalette::PrimaryMid]];border-collapse:collapse;}
.black .calendar a,.black .calendar td .button{padding:2px 3px !important;margin:0;color:[[ColorPalette::TertiaryPale]];display:block;}
.black .calendar td .button{color:[[ColorPalette::TertiaryMid]];}
.black .tiddlyLinkNonExisting, .black .tiddlyLink, .black .button{background:transparent;border:transparent;fonts-style:normal;}
.black .calendarMonthname,
.black .calendarMonthname .tiddlyLink{color:[[ColorPalette::TertiaryMid]];font-style:normal;}
.black .calendarMonthname .tiddlyLink:hover, .black .tiddlyLink:hover, .black .button:hover{color:[[ColorPalette::SecondaryMid]];}
.black br{display:none;}

.viewer iframe{width:100%;height:450px;border:1px solid [[ColorPalette::TertiaryMid]];-moz-border-radius:3px; -webkit-border-radius:3px;}

.viewer .tiddlyLink, .viewer .tiddlyLinkExisting, .viewer .externalLink{border-bottom:1px solid transparent;border-top:1px solid transparent;color:[[ColorPalette::TertiaryDark]];}
.tiddlyLink:hover, .tiddlyLinkExisting:hover, .externalLink:hover{color:[[ColorPalette::SecondaryMid]];background:transparent;border-bottom-color:[[ColorPalette::SecondaryPale]];border-top-color:[[ColorPalette::SecondaryPale]];}
.block .tiddlyLink, .remind .tiddlyLink{padding: 0 3px;}
.block .tiddlyLink,
table.linkTable .tiddlyLinkExisting, table.linkTable .externalLink{display:block;padding-left:0.7em;}
table.linkTable .tiddlyLinkExisting{text-decoration:none;}
.block .tiddlyLink:hover,.remind .tiddlyLink:hover,
table.linkTable .tiddlyLinkExisting:hover, table.linkTable .externalLink:hover{}
.remind{padding:2px 5px;border:3px solid transparent;-moz-border-radius:3px; -webkit-border-radius:3px;}
.remind:hover{background:#f6f6f6;border-color:#f6f6f6;}

.vTabs .tabset {float:left;display:block;padding:0px;margin-top:5px;min-width:15%;}
.vTabs .tabset .tabset {margin-top:0px;}
.vTabs .tabset .tabSelected {color:[[ColorPalette::SecondaryDark]];background:[[ColorPalette::TertiatyMid]];font-weight:bold;text-decoration:underline;}
.vTabs .tabset .tab {display:block;text-align:right;padding:2px 5px; margin:0 1px 1px 0;background:transparent;border:0;color:[[ColorPalette::SecondaryMid]];}
.vTabs .tabset .tab:hover {background:[[ColorPalette::SecondaryMid]];color:[[ColorPalette::Background]];}
.vTabs .tabContents {margin-left:15%;max-width:85%;padding:0 10px 5px 10px;background:transparent;border:none;border-left:1px solid [[ColorPalette::TertiaryLight]];}

#annowrap {padding:0;margin:0;border:0;}
#annowrap .popup{display:block;min-width:100px;max-width:300px;font-size:100%;}
#annowrap .popup br {display:block !important;}
#annowrap .popup h1, .anno .popup h2{color:[[ColorPalette::TertiaryLight]];}
.annosub{cursor:pointer;padding:0px 1px 0px 3px;}
.annosub span{padding:0px 1px 0px 3px;}
.annosubover{color:[[ColorPalette::SecondaryDark]];cursor:pointer;}
.annosubover span{background-color:[[ColorPalette::SecondaryPale]];padding:0px 1px 0px 3px;}

.desk .annosub {color:[[ColorPalette::TertiaryDark]];}
.desk .view {display:block;float:left;padding:0 5px;}
.desk table .button{padding:1px 3px;border-color:transparent;font-weight:bold;}
.desk .block .noborder td{padding:0 1px 0 0;}
.desk .block .quickopentag .tiddlyLink{padding:1px 1%;width:92%;float:left;}
.desk .block .miniTags .button, .desk .block .quickopentag .button{width:4%;padding:1px 1%;text-align:center;float:left;font-size:14px;}
.desk .block .miniTags .button{width:96%;float:left;font-size:10px;}
.deskNew span{display:inline-block;width:75px;}
.miniTags .button{margin:0 2px;border:0;}
.topMenu .pL .button{padding-left:25px;}
.topMenu .pR .tiddlyLink{padding-right:25px;}
.viewer .marked {padding:0 2px;}
#tbHelp .tabContents{min-height:150px;}

@media print{
#topMenu, #topMenuR, #tiddlersBar{display: none ! important;}
.headerShadow{visibility: hidden ! important;}
.tiddler{border-style: none ! important;margin:0px ! important;padding:0px ! important;padding-bottom:2em ! important;}
.tagglyTagging .button, .tagglyTagging .hidebutton{display: none ! important;}
.tagglyTagged .quickopentag, .tagged .quickopentag{border-style: none ! important;}
.quickopentag a.button, .miniTag{display: none ! important;}
}

/* get user styles specified in StyleSheet */
[[StyleSheet]][[StyleSheetShortcuts]][[SimileTimelineStyleBundle]]
/*}}}*/
GTD template...
/%
!Slide
+++^[arbejdstid]
|sortable|k
|//Dato//|//Beskrivelse//|//Startet//|//Stoppet//|//Varighed//|h
|<<taskTimer here>>||| tid brugt ialt:|<<columncalc sum 1 -1>>|
===
!end%/
<<tiddler {{tiddler.title+"##Slide"}}>>
((_[[try to open the desk|desk]](doesn't open the tiddler!)))
(([img[gelogo05-1b.png]](<<tiddler topMenuL##kalender>>)))
{{black{((<<tiddler testBilledePopup##billede with: "gelogo05-1b.png">>(<<tiddler topMenuL##kalender>>)))}}}
/%
!billede
[img(95px+,auto)[$1]]
!end billede %/
/%
!Slide
+++[arbejdstid]
|sortable|k
|//Dato//|//Beskrivelse//|//Startet//|//Stoppet//|//Varighed//|h
|2010-02-09| a|10:12:46|10:12:50|00:00:04|
|<<taskTimer here>>||| tid brugt ialt:|<<columncalc sum 1 -1>>|
===
!end%/
<<tiddler {{tiddler.title+"##Slide"}}>>
|<<tiddler HentLektieKnap with: {{DataTiddler.getData("Server", "titel", "")}} >>|<<tiddler NyLektieKnap with:  -(0DD/MM-/YY.uge.0WW.kl.0hh.mm) [[Opret ny lektie]]>>|
<<tiddler TiddlersTimeline>>

|linkTable|k
|width:400px; !by modified date |width:400px; !by date created |
|vertical-align:top;padding-left:20px;<<timeline "modified">>|vertical-align:top;padding-left:20px;<<timeline "created">>|

<<toggleSideBarTB left show>>|<<popup ★ [[<<tiddler topMenuL##stjerne$))]]>>|[[tavle|M.I.S.]]|<<popup journal [[<<tiddler topMenuL##journal$))]]>>|<<popup ny [[<<tiddler topMenuL##ny$))]]>>|<<popup kalender [[<<tiddler topMenuL##kalender$))]]>>|{{pR{[[+|QuickNotes]]}}}{{tiny smallform{<<unsavedChanges command>>}}}/%
!stjerne
{{menuH{liste med stjerne tiddlere}}}
<<tiddlerList tags:"stjerne" itemTemplate:"*%0 \n" -modified">>
!kalender
{{menuH{Aktuel måneds[[kalender|kalender]] & liste over [[påmindelser|påmindelse]]}}}
<<tiddler kalender>>
!journal
<<tiddlerList tags:"journal" top:"10" dateFormat:"ddd. 0DD" itemTemplate:"*[[%created - %title|%title]] \n" group:"tiddler.created.formatString('YYYY, MMM')" groupTemplate:"!!!%group \n" order:"-created">>
{{menuH{[[journal]] muligheder}}}
*<<newJournal "YYYY-0MM-0DD" label:"skriv en ny artikel" focus:title prompt:"Skriv en ny journal for i dag" tag:journal>>
*[[se alle artikler|journal]]
!ny
{{menuH{tilføj nyt indhold...}}}
*<<newTiddler label:"ny tiddler">>
*<<tiddler NyLektieKnap with:  -(0DD/MM-/YY.uge.0WW.kl.0hh.mm) [[Opret ny lektie]]>>
*[[ny hurtig note|QuickNotes]]
*<<newTiddler label:"ny udtalelse" title:"ny udtalelse" prompt:"opret en ny udtalelse" focus:title tag:'udtalelse' text:{{store.getTiddlerText("templateNyUdtalelse")}}>>
*<<newTiddler label:"ny arbejdstid" title:"ny arbejdstid" prompt:"opret en ny arbejdstid" focus:title tag:'arbejdstid' text:{{store.getTiddlerText("templateNyArbejdstid")}}>>
*<<newTiddler label:"ny næste handling" title:"ny handling" prompt:"opret en ny næste handling" focus:title tag:#next>>
*<<newTiddler label:"nyt igangværende projekt" title:"nyt projekt" prompt:"opret et nyt igangværende projekt" focus:title tag:$igang>>
*<<newJournal "YYYY-0MM-0DD" label:"ny journal indtastning" focus:title prompt:"Skriv en ny journal artikel for idag" tag:journal>>
*<<newTiddler label:"ny påmindelse" title:"ny påmindelse" prompt:"opret en ny påmindelse" focus:title tag:påmindelse text:{{store.getTiddlerText("templateNewReminder")}}>>
----
*<<newTiddler label:"ny reference" title:"ny reference" prompt:"opret en ny reference" focus:title tag:reference>>
*<<newTiddler label:"new action type" title:"#new action type" prompt:"create an action type" focus:title tag:action>>
*<<newTiddler label:"new project type" title:"$new project type" prompt:"create a new project type" focus:title tag:project>>
*<<newTiddler label:"new project stage" title:"§new project stage" prompt:"create a new project stage" focus:title tag:stage>>
*<<newTiddler label:"new contact group" title:"?new contact group" prompt:"create a new contact group" focus:title tag:contact>>
*<<newTiddler label:"new context" title:"@new context" prompt:"create a new context" focus:title tag:context>>
*<<newTiddler label:"new area" title:"&new area" prompt:"create a new area" focus:title tag:area>>
!end%/
{{pL{<<closeAll>><<rB x>>}}}|<<popup "ugeskema" [[<<tiddler "Næste uges skema##skema"$))]]>>|[[hjælp|Hjælp]]|<<popup muligheder [[<<tiddler topMenuR##options$))]]>>&nbsp;&nbsp;<<gotoTiddler  inputstyle:"display:inline;border:1px solid #ccc;padding:0px;width:150px;z-index:0;margin-left:5px;" liststyle:"display:block;position:absolute;right:2.5em;top:1.7em;z-index:10;border:1px solid #ccc;padding:0;width:auto;display:none;">><<toggleSideBarTB right show>>/%
!skema
<<popup "ugeskema" [[<<tiddler "Næste uges skema##skema"$))]]>>[[link|Næste uges skema]]{{menuH{Næste uges skema & liste over kommende handlinger mm}}}
<<tiddlerList tags:"#næste" itemTemplate:"*%0 \n" -modified">>
!end skema
!options
*<<permaview>>
*<<tiddler ToggleTiddlersBar>><<snapshot print label:"print alle på een gang" prompt:Udskriv id:story>><<snapshot print label:"spørg efter udskrift" prompt:Udskriv id:ask>>
*<<tiddler Upload##server2 with: {{DataTiddler.getData("Server", "titel", "")}} >>
*<<saveChanges gem>>
----
*[[archive]]
*[[template]]
*[[reference]]
----
*[[quick-notes|QuickNotes]]
*[[x-tab config]]
*[[x-tagger config]]
----
*[[flere muligheder...|options]]
!end%/


<<tiddler TidTweets##tweet>>

<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div><span class='toolbar' macro='snapshot print label:print prompt:Udskriv id:viewer'></span>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span>af <span macro='view vejleder'></span>)</div>
<div class='viewer' macro='tiddler Projekt'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
@@color:#A00; This tiddler or macro is under development. Though you may find it usable as it is, the inner workings may undergo __even fundamental__ changes.
@@position:relative;++++^13em^[mere]...[[server|Server]]<<tiddler HentLektieKnap with: {{DataTiddler.getData("Server", "titel", "")}} >><<tiddler testknap>>===
Below you find a list of tiddlers updated __after__ the initial release of version 1.2x.
Just import __all tiddlers__ tagged <<tag update>> from the [[server|tbGTDServer]] using [[ImportTiddlersPlugin|http://tiddlytools.com/#ImportTiddlersPlugin]]...

@@''Note'': I integrated postscriptum all up until (and including) {{ds{2009-11-17}}} in the current version 1.2x for [[download]] on box.net.
This is a mess and I'll never do it again ;-)@@
!{{ds{2009-11-17}}}
*[[x-tab]]
**fixed ie6 specific errors ...man ie stinks!
**also concerns [[baseGTD]]
!{{ds{2009-11-13}}}
*[[x-tagger]]
**Fixed display issues esp. in ~IE6 (but now also in ~FF3.5.5)
**also concerns [[tbGtdTheme]]
!{{ds{2009-11-10}}}
*[[tbGTD help]] & [[help]]
**for those of you who are still desperate to print things out
!{{ds{2009-11-09}}}
*[[help]]
**completely redone
**''info on formatting'' now in toolbar in edit-mode
**also concerns [[tbGtdTheme]] & [[StyleSheetShortcuts]]
*[[x-plore]]
**fixed ie specific bug + minor css changes
*[[TagCloud]]
**added exclusion of tiddlers tagged <<tag noCloud>>
***concerns TagCloud and TagCloudMacro
*[[DeliciousTagging]]
**improved the interface
**by default ignores those tagged [[noCloud]] as well
*[[TiddlersBarPlugin]]
**fixed the buggy behaviour where the display would jump to top when opening a popup
<<tiddler {{t='update besked';t+'##'+(tiddler.title==t?'list':'show');}} with: {{var t;try{t=story.findContainingTiddler(place).getAttribute('tiddler');}catch(e){t='';}t;}}>>/%
!show
((@@color:#39C;font-weight:bold;Har du brug for dette?(!Har du brug for denne tiddler?
Hvis du endnu ikke har disse tiddlere i din LektieBog eller hvis du har en ældre version, kan du importere dem fra dette dokument. <<tiddler 'update notice##check' with: '$1'>>
[[Andre tiddlere du måske har brug for...|update besked]])))
!list
<script>
var out='',t,ti,tids=store.getTiddlers('title');
for(t=0;t<tids.length;t++){ti=tids[t].title;
if(store.getValue(ti,'need'))out+='\n*[['+ti+']]';}
return out==''?'':'!Tiddlere du måske ønsker at opdatere...'+out;
</script>
!check
<script>var ti,f;ti='$1';if(ti!='$'+'1'){f=store.getValue(ti,'dependson');return f?'For at denne tiddler skal virke med din LektieBog er det måske også nødvendigt at opdatere: @@display:block;margin-bottom:5px;'+f+'@@':'';}</script>
!end%/
*Compare alternatives
**http://whatfettle.com/2008/07/ThemedTiddlerPlugin
**http://tiddlytools.com#TaggedTemplateTweak
*for context sensitive ViewTemplate & EditTemplate
*especially for contacts
*cycle actions status using [[cycleTags|http://lastfm.tiddlyspot.com/#cycleTags]]
<<reminder year:2009 month:11 day:8 title:"add cycleTags" >>
!A test for google charts API
<<tiddler gChart with: 'chs=250x100&amp;chd=t:60,40&amp;cht=p3&amp;chl=Hello|World' 'right:::An example chart' 'http://code.google.com/intl/en-en/apis/chart/' 'border:2px solid #EEE;margin-top:10px;' 'myGoogleChartsImageClass'>>
''The google charts API is quite useful if you...''
*are able to rely on some connectivity to the internet
*don't want scripting overhead in your own site
*can't live without interactivity features
*can't wait for some plugin, but still want configurable charting
I have created a tiddler called [[gChart]] that when transcluded via the {{{<<tiddler gChart>>}}}-macro allows you to render [[google charts|http://code.google.com/intl/en-en/apis/chart/basics.html]] perhaps more easily, but certainly with less overhead. Of course, you could do even less using the image notation {{{[img[myimg][thisurl]]}}}. Then, however, you would have to make sure that the chartcode URL is properly encoded so that you don't break the TiddlyWiki image syntax. The example above would not work unless you turn all {{{|}}} into {{{%7C}}}.

Here's the syntax for the example from above...
{{{<<tiddler gChart with: 'chs=250x100&amp;chd=t:60,40&amp;cht=p3&amp;chl=Hello|World' 'right:::An example chart' 'http://code.google.com/intl/en-en/apis/chart/' 'border:2px solid #EEE;margin-top:10px;' 'myGoogleChartsImageClass'>>}}}

Though, this... {{{<<tiddler gChart with: 'cht=p&chs=150x150&chd=t:10,80,10&chco=FAFAFA,FFFF00,FAFAFA'>>}}}
would have been enough to render this...
<<tiddler gChart with: 'cht=p&chs=150x150&chd=t:10,80,10&chco=FAFAFA,FFFF00,FAFAFA'>>

<<tiddler gChart##info>>
!What's missing?
Right, a chart generator for the lazy bunch...
*[[clabberhead|http://www.clabberhead.com/googlechartgenerator.html]].
*[[streitenberger|http://charts.streitenberger.net/]]
*[[jonwinstanley|http://www.jonwinstanley.com/charts/]]
*[[chartpart|http://chartpart.com/]]
!Need more?
*[[50 cool things you can do with google charts|http://www.collegeathome.com/blog/2008/06/05/50-cool-things-you-can-do-with-google-charts-api/]]
*[[pacman with google charts|http://www.mattcutts.com/blog/pacman-graph-in-google-chart-api/]]
From now on tbGTD provides a stage-model for your projects, allowing you to tag actions with project stages. This is a very powerful apporach for your project-documentation and management. It allows you to generate an overview of how much effort is going into which stages of your project and to track progress. Here is an overview of all introduced [[stages...|stage]]

<<tiddlerList tags:"stage" order:"title" header:'| stage | description |h' itemTemplate:"|text-align:left;!%link|<<tiddler '%title'$))|\n">>
!Tips
*You can, of course adjust the stages to suit your project designs. Simply edit the corresponding stage-tiddlers.
*Try using stages with the new quick-add feature in QuickNotes!
/***
|''Name:''|x-plore|
|''Description''|Explore tiddler relations|
|''Version:''|0.1|
|''Type''|macro|
|''Author:''|[[TobiasBeer]]|
|''Source:''|http://tbGTD.tiddlyspot.com/#x-plore|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Note''|idea and parts of the code have their roots in [[RelatedTiddlersPlugin|http://tiddlytools.com/#RelatedTiddlersPlugin]]|
!important
<<tiddler 'under development'>>
!configuration
Use the following sections in [[x-plore]] to define elements...
*not to be explored via ''exclude''
*to be cut of via ''truncate''
!exclude
star
!truncate
excludeLists
systemConfig
TAG==site
!help
<<tiddler {{t='x-plore info';store.getTiddler(t)?t:'x-plore::helplink'}}>>/%
helplink:For more information see or import [[x-tab info]] from [[tbGTDServer]]...
%/
!source code
***/
//{{{
config.macros.xplore={
skipped:' ...',
lblBtn:'x-plore'+(document.all?"▼":"▾"),
topBtn:'Explore tiddler relations',
lblTagging:'!!tagget af',
lblTags:'!!tagger til',
lblRefs:'!!refereret til af',
lblLinks:'!!linker til',
styles:
	'#popup #xplore div {text-decoration:none;padding:7px;min-width:136px;_width:180px;}'+
	'#popup #xplore div a {padding:2px;white-space:nowrap;font-weight:normal;display:block;}'+
	'#popup #xplore blockquote {padding-left:3px;margin:0;}'+
	'#popup #xplore blockquote blockquote {border-left:1px solid #333;margin:0 0 0 10px;}'+
	'#popup #xplore blockquote a {_width:90%;}'+
	'#popup #xplore h2 {border:0;margin-top:0.5em;}'+
	'#popup #xplore td {border:1px solid transparent !important;padding: 0 5px 5px 5px !important;}'+
	'#popup #xplore td:hover{border:1px solid #333 !important;}'+
	'#popup #xplore div br {display:none;}',
handler:function(place,macroName,params,wikifier,paramString,tiddler){
	var p,btn,cls,ex,fst,min,mode,tb,tid,tit,tree,trunc,r;
	tid=story.findContainingTiddler(place);
	tit=tid?tid.getAttribute('tiddler'):'';
	p=paramString.parseParams(null,null,true);
	btn=getParam(p,'button','')=='true';
	tb=getParam(p,'toolbar','')=='true';
	if(btn&&tit){
	btn=createTiddlyButton(place,this.lblBtn,this.tipBtn,this.click,"button","xploreBtn");
	btn.setAttribute('tiddler',tit);
	btn.setAttribute('params',paramString);
	if(tb)btn.setAttribute('toolbar',true);
	return;
	}
	fst=getParam(p,'first',tit);
	cls=getParam(p,'class','');
	tree=getParam(p,'tree','true')=='true';
	var getArr=function(prm){//retrieve array from tiddler text
	var a=getParam(p,prm,'').readBracketedList(),f=a[0],i,i1,t,x,s=[];
	if(f&&f.substr(0,5).toUpperCase()=='GET=='){
	t=store.getTiddlerText(f.substr(5));
	if(s){
	a=t.readBracketedList();
	for(i=0;i<a.length;i++){
		f=a[i];
		if(f&&f.substr(0,5).toUpperCase()=='TAG=='){
			a.splice(i,1);
			x=store.getTaggedTiddlers(f.substr(5));
			for(i1=0;i1<x.length;i1++)s.pushUnique(x[i1].title);
		}
	}
	for(i=0;i<s.length;i++)a.pushUnique(s[i]);
	a.sort();
	}
	}return a;
	}
	ex=getArr('exclude');
	trunc=getArr('truncate');
	r=getParam(p,'root','')=='true';
	min=getParam(p,'minimal','')=='true';
	mode=getParam(p,'mode','');
	if(mode!=''){
	if(this['get'+mode]==undefined)mode='Tagging';
	wikify(this['lbl'+mode]+'\n'+this.list(fst,tree,trunc,ex,this['get'+mode],r,min),place);
	}else{
	wikify('|'+cls+'|k\n|||||',place);
	var tds=place.lastChild.getElementsByTagName('td');
	wikify(this.lblTagging+'\n'+this.list(fst,tree,trunc,ex,this.getTagging,r,min),tds[0]);
	wikify(this.lblTags+'\n'+this.list(fst,tree,trunc,ex,this.getTags,r,min),tds[1]);
	wikify(this.lblRefs+'\n'+this.list(fst,tree,trunc,ex,this.getRefs,r,min),tds[2]);
	wikify(this.lblLinks+'\n'+this.list(fst,tree,trunc,ex,this.getLinks,r,min),tds[3]);
	}
},
list:function(first,asTree,trunc,ex,get,r,min){
//first: tree root tid, asTree: tree <> list, trunc: [[tids]] [[limiting]] the tree
//ex: exclude tagged tids, r: display root, min: true=min spanning tree <> false=multiple pathes for 'nodes'
//get: fct getXYZ(tiddlerObj){return arrayOfTiddlerTitles;}
//    ...possibly one of getLinks, getRefs, getTags, getTagging (see below)
	var out,tids=[],tree={text:''},indent='',paths=min?undefined:[];//init sublists []
	tids=this.search(first,tids,tree,indent,trunc,ex,get,r,paths);//start recursion
	setStylesheet(this.styles,'xploreStyles');
	out= '{{xploreList{\n';
	if(asTree)out+=tree.text;//when tree return tree
	else if(tids.length>0)out+='[[' + tids.join(']][[')+']]';//when list, join as links
	return out+'}}}';
},
search: function(tid,tids,tree,indent,trunc,ex,get,r,paths,p,fst){
//trunc, ex, get, r, paths: dito
//tid: start tid, tids: searched tids[], tree: output tree 
//indent: curr indent lvl, paths: all found paths[],p: current path in paths
	var t=store.getTiddler(tid);//root tid of branch
	var ini=false;
	var b=(paths!=undefined); //multiple paths
	if(b&&p==undefined){//if so and sublist not paths
		p=0;paths[p]=[];ini=true; //init pointer, sublist and store init
	}
	if(fst==undefined)fst=tid;//check & store fst
	//return curr list, if missing, excluded via tag or already in (sub-)list
	if(!t||tid==fst&&tids.length>0||t.tags.containsAny(ex)||b&&paths[p].contains(t)||!b&&tids.contains(tid))return tids;
	//if not init of multiple paths or rootnode to be displayed... add to sublist
	if(!ini||r){
		if(b)paths[p].push(t);
		tids.push(t.title); //add tiddler to results
		var skip=trunc&&trunc.contains(tid); //skip when in truncated
		tree.text+=indent+"[["+tid+(skip?this.skipped.format([tid]):"")+"|"+tid+"]]"+"\n";
		if(skip)return tids; // branch is pruned... don't follow links
	}
	var links=get?get(t):this.getTagging(t);//get next level via get fct or links
	//init subpaths by copying the current one
	if(b)for(var i=1;i<links.length;i++)paths[p+i]=paths[p].slice(0);
	for(var i=0; i<links.length; i++)//search subnodes
	tids=this.search(links[i],tids,tree,indent+">",trunc,ex,get,r,paths,(p?p+i:p),fst);
	return tids;//return list
},
getLinks:function(t){if(!t.linksUpdated)t.changed(); return t.links;},
getRefs:function(t){
	var i,o=[],r=store.getReferringTiddlers(t.title);
	for(i=0;i<r.length;i++)if(r[i].title!=t.title)o.push(r[i].title);
	return o;
},
getTags:function(t){return t.tags;},
getTagging:function(t){
	var o=[],l=store.getTaggedTiddlers(t.title);
	for(var i=0;i<l.length;i++)if(l[i].title != t)o.push(l[i].title);
	return o;
},
click:function(e){
	e=e||window.event;
	var p=Popup.create(this);
	wikify('<<xplore first:\''+this.getAttribute('tiddler')+'\''+this.getAttribute("params")+' >>',createTiddlyElement(p,'span','xplore','xplore'));
	Popup.show(p,false);
	s=document.getElementById('sidebar');
	if(this.getAttribute('toolbar')){p.style.left='';p.style.right=(20+(s?s.offsetWidth:0))+'px';}
	e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();
	return false;
}
}
//}}}
Here's an example button <<xplore button:true>> using this code to invoke it...
*{{{<<xplore button:true>>}}}
Or you could just output a tree...
*{{{<<xplore first:star mode:tree class:'noBorder wideTable'>>}}}
<<xplore first:star mode:tree class:'noBorder wideTable'>>
/***
<<xtab defaults:true>>
|''Name''|x-tab|
|''Description''|a crosstable for tags|
|''Version''|1.0|
|''Type''|macro|
|''Author''|[[TobiasBeer]]|
|''Source''|http://tbGTD.tiddlyspot.com/#x-tab|
|''Documentation''|http://tbGTD.tiddlyspot.com/#%5B%5Bx-tab%20info%5D%5D|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
!Code
***/
//{{{
setStylesheet('.xtabBtn{cursor:pointer}'+
'.xtab{margin:5px 0 20px 0;background:#F6F6F6;padding:10px;border:5px solid #EEE;-moz-border-radius:5px;-webkit-border-radius:5px;}'+
'.xtabFrm td{vertical-align:bottom;height:30px;margin-right:10px !important;}'+
'.xtabFrm em{margin-left:10px;font-style:normal;color:#39C;font-weight:bold;font-size:90%;}'+ 
'.xtabFrm input{margin-left:10px;}.xtabFrm input,.xtabFrm span{cursor:pointer;}.xtabFrm .externalLink{margin-left:10px;}'+
'.xtabFrm select{padding-right:0 !important;width:210px;cursor:pointer;float:right;}'+
'.xtabFrm xtabToggle{display:inline-block;width:65px;text-align:center;cursor:pointer;margin-right:10px;}'+
'.xtabPrv{color:#888;margin:5px 0 10px 50px;display:block;}.xtabPrv span{color:#39C;}'+
'.xtabOut {max-width:100%;overflow-y:hidden;}'+
'.viewer .xtabOut .button{margin:0;}','StyleSheetGTDxLookup');
//}}}
//{{{
config.macros.xtab={
cfg:{
	//defaults: 0=taglist, 1=presetlist, 2=autodetect-config, 3=preset
	defaults:['x-tab config##Tags','x-tab config##Presets','x-tab config##Detect','xtab'],
	dropClass:'button',
	resultTabClass:'',
	miniTag:'<<tiddler scripts##miniTag with: [[%0]]>>',
	addNew:true,
	headerRightFrom:10,
	//preset identifiers
	pRows:'rows',
	pCols:'cols',
	pSec:'snd',
	pOps:'options',
	pOpAL:'ALLTAGS!',
	pOpSR:'1row',
	pOpSC:'1col',
	pOpTR:'transpose',
	//language
	info:'info',
	btnShow:"x-tab",
	btnHide:"hide x-tab",
	btnTip:"toggle x-tab panel",
	template:"preset template... ",
	noTags:"No valid tags provided for x-tab. ",
	nOkTags:"Invalid taglist for x-tab! '%0' could not be found.",
	nOkPresets:"Invalid presets for x-tab! '%0' could not be found.",
	nOkPreset:"Invalid x-tab preset! No option '%0' in dropdown '%1'. Check your custom fields or parameters.",
	nOkRender:"Could not render x-tab into %0. No such dom-element!",
	nOkDetect:"Invalid x-tab parameter '%0' for 'detect'!",
	nOkField:"x-tab can't find field '%0' for tiddler '%1'.",
	nDef:"undefined",
	P:["preset:","select a preset","select preset..."],
	R:["rows:","select a category tag for rows","select rows tag..."],
	C:["columns:","select a category tag for columns","select columns tag..."],
	S:["secondary:","select secondary for rows (first select a tag-category for rows)","select secondary..."],
	TR:["transpose","click to swap rows and columns"],
	SR:["1row","use the tag in 'rows' or 'secondary' directly instead of its subtags"],
	SC:["1col","use the tag in 'columns' directly instead of its subtags"],
	AL:["all tags","use all available tags for dropdowns"],
	PT:["template","provides a template which you can use to add to your list of preset definitions"]
},
handler:function(place,macroName,params,wikifier,paramString,tiddler){
	this.cfg.drop=document.all?"▼":"▾";
	var el,id,ps=paramString,b=params[0];
  id=new Date().getTime()+(''+Math.random()).substr(5);
  if(b&&b.toUpperCase().indexOf('BUTTON')==0){//button must be first!
		el=createTiddlyButton(place,this.cfg.btnShow+this.cfg.drop,this.cfg.btnTip,this.toggle,'button xtabBtn');
		jQuery(el).attr({'tiddler':b.substr(7),'params':ps,'xtabid':id});//set tiddler for button@tiddler
	}else this.create(id,ps,place);
},
toggle:function(e){
	var c,f,h=false; //h=hide, f=form, x=macro
	x=config.macros.xtab,c=x.cfg;
	f=document.getElementById('xtab'+this.getAttribute('xtabid')||'');
	if(f){//form exists -> toggle
		h=f.style.display!='none';
		f.style.display=h?'none':'block';
	}else x.create(this);
	this.innerHTML=(h?c.btnShow:c.btnHide)+c.drop;
	return false;
},
update:function(id){
	var a1,a2,al,by,c,chk,cols,d1,d2,el,f,hc,hd,hd2='',hr,nu,o,out='',pr,rows,sc,sr,snd,t,ti,t1,t2,tr,v,v1,v2,x=config.macros.xtab,c=x.cfg;
	by=function(i){return document.getElementById(i);}
	f=by('xtabFrm'+id);el=by('xtabOut'+id);pr=by('xtabPrv'+id);
	removeChildren(el);removeChildren(pr);
	sr=by('SR'+id).checked;
	sc=by('SC'+id).checked;
	tr=by('TR'+id).checked;
	al=by('AL'+id).checked;
	snd=by('snd'+id);
	cols=by('cols'+id);
	rows=by('rows'+id);
	d1=snd.selectedIndex>0?snd:by('rows'+id);
	d2=by('cols'+id);
	if(tr){v=d1;d1=d2;d2=v;}
	v1=d1.selectedIndex==0?null:d1.value;
	v2=d2.selectedIndex==0?null:d2.value;
	if(v1&&v2){
		a1=sc&&tr?[store.getTiddler(v1)]:(sr&&!tr?[store.getTiddler(v1)]:store.getTaggedTiddlers(v1));
		a2=sc&&!tr?[store.getTiddler(v2)]:(sr&&tr?[store.getTiddler(v2)]:store.getTaggedTiddlers(v2));
		hc='\u25bc'+v1;if(sc&&tr||sr&&!tr)hc='';
		hr=v2+'\u25b6';if(sr&&tr||sc&&!tr)hr='';
		hd='"""'+(hc&&hr?hc+'/ '+hr:(hc?hc:hr))+'"""';
		if(a2.length>=c.headerRightFrom){hr=hr?'\u25C0'+v2:'';hd2='"""'+(hc&&hr?hr+'/ '+hc:(hc?hc:hr))+'"""';}
		out='|'+c.resultTabClass+'|k\n| '+hd;
		for(t2=0;t2<a2.length;t2++){
			ti=a2[t2].title;
			nu=c.addNew?tbGTD.nu(ti):'';
			out+=' | '+nu+'<<tag [['+ti+']]>>';
		}out+=(hd2!=''?'|'+hd2:'')+' |h\n';
		for(t1=0;t1<a1.length;t1++){
			ti=a1[t1].title;
			nu=c.addNew?tbGTD.nu(ti):'';
			hd='<<tag [['+ti+']]>>';
			out+='| !'+nu+hd;
			for(t2=0;t2<a2.length;t2++){
				out+='|'
				tgt=store.getTaggedTiddlers(a1[t1].title);
				for(t=0;t<tgt.length;t++){
					if(tgt[t].tags.contains(a2[t2].title)){
						ti=tgt[t].title;out+='@@margin:0;<<tag [['+ti+']]>>'+c.miniTag.format([ti])+'@@<br />';
					}
				}
			}
			out+=(hd2!=''?'|'+hd+' ':'')+'|\n';
		}
  	//preset template
  	if(by('PT'+id).checked){
			chk=function(s){return s.indexOf(' ')>=0?"'"+s+"'":s;};
			o=sr||sc||tr;
			o=o?c.pOps+':'+
			(sr?c.pOpSR:'')+
			(sc?(sr?'&':'')+c.pOpSC:'')+
			(tr?(sr||sc?'&':'')+c.pOpTR:''):'';
			v=snd.value;v=snd.selectedIndex==0?'':v;v1=rows.value;v2=cols.value;
			wikify(c.template+'@@font-weight:bold;'+(al?c.pOpAL:'')+chk(v)+' '+chk(v1)+' by '+chk(v2)+'=='+
				c.pRows+':'+chk(v1)+' ' + (v?c.pSec+':'+chk(v)+' ':'') + c.pCols+':'+chk(v2)+' '+chk(o)+'@@',pr);
		}
	}
	//create output
	wikify(out,el);
},
create:function(id,ps,el,setAll){
	var a,all,at,c=this.cfg,cr,cs,d,dc,dt,f,fs,gd,i,p,pls,pos,pr,prs,rt,sp,src,t,ti,tid,tids=[],td,tds,tgs=[],tmp,tls,xel=false;
	if(typeof(id)=='object'){
		rt=id;
		tmp=id.getAttribute('tiddler');
		if(tmp=='')el=story.findContainingTiddler(id);//into this tid
		else{
			xel=tmp.toUpperCase().indexOf('ID==')==0;
			el=xel?document.getElementById(tmp.substr(4)):story.getTiddler(el);//into id or named tiddler 
		}
		if(!el)alert(c.nOkRender.format([tmp]));
		else{
			tid=el.getAttribute('tiddler');
			if(!xel)el=jQuery('.viewer',el)[0];//if tid, render in viewer
			//get attribs
			ps=id.getAttribute('params');
			id=id.getAttribute('xtabid');
		}
	}
	if(!tid){tid=story.findContainingTiddler(el);if(tid)tid=tid.getAttribute('tiddler');}
	p=ps.parseParams(null,null,true);//get params
	def=getParam(p,'defaults','').toUpperCase()=='TRUE';
	tls=getParam(p,'taglist');if(!tls&&def&&c.defaults[0])tls=c.defaults[0];
	pls=getParam(p,'presets');if(!pls&&def&&c.defaults[1])pls=c.defaults[1];
	dt=getParam(p,'detect','');if(!dt&&def&&c.defaults[2])dt=c.defaults[2];
	pr=getParam(p,'preset','');if(!pr&&def&&c.defaults[3])pr=c.defaults[3];
	pos=getParam(p,'position','').toUpperCase();
	all=pr.toUpperCase().indexOf(c.pOpAL)==0;
	if(all)pr=pr.substr(c.pOpAL.length);
	a=setAll||!tls||all&&setAll==undefined;
	if(a){//get tags
		tgs=store.getTags();
	}else{
		//init taglist
		if(tls){
			tgs=store.getTiddlerText(tls);
			if(!tgs)alert(c.nOkTags.format([tls]));
			else tgs=tgs.readBracketedList();
	  }
		if(tgs.length==0&&!a)alert(c.noTags);
	}
	//init presets
	if(pls){
		prs=store.getTiddlerText(pls);
		if(!prs)alert(c.nOkTags.format([pls]));
		else prs=prs.split('\n');
	}
	dc=c.dropClass;
	cr=createTiddlyElement;
	
	if(setAll==undefined){
		sp=document.createElement('span');//render container
		if(pos=='FIRST')el.insertBefore(sp,el.firstChild);
		else if(!xel&&rt&&pos!='LAST')el.insertBefore(sp,rt.nextSibling);
		else el.appendChild(sp);
	}else sp=el;
	el=cr(sp,'div','xtab'+id,'xtab');//div
	f=cr(el,'form','xtabFrm'+id,'xtabFrm');//form
	f.setAttribute('params',ps);
	wikify('|borderless|k\n|||>|\n||||\n',f);
	tds=f.lastChild.getElementsByTagName('td');
	
	td=tds[1];this.nuSel(tds[0],'presets',prs,c.P,'P',dc);
	cs=[['PT','tmpl'],['TR','trans'],['SR','oner'],['SC','onec'],['AL','allt',a]];
	for(i=0;i<cs.length;i++)this.nuChk(td,cs[i][0]+id,cs[i][1],c[cs[i][0]],dc,cs[i][2]);
	createExternalLink(td,store.getTiddlerSlice("x-tab","Documentation"),c.info);
	this.nuSel(tds[2],'rows',tgs,c.R,a?'A':'R',dc,id);
	this.nuSel(tds[3],'snd',[],c.S,'S',dc,id);
	this.nuSel(tds[4],'cols',tgs,c.C,a?'A':'C',dc,id);
	cr(el,'div','xtabPrv'+id,'xtabPrv');
	cr(el,'div','xtabOut'+id,'xtabOut');
	
	if(pr.indexOf(':')<=0){//preset from field(@tid)
		at=pr.indexOf('@');
		if(at>0){
			ti=pr.substr(at+1);
			tid=store.getTiddler(ti);
			pr=pr.substr(0,at);
			if(!tid)alert(c.nOkField.format([pr,ti]));
			else tid=tid.title;
		}
		pr=store.getValue(tid,pr);
	}
	if(tid&&dt&&!pr)pr=this.detect(dt,tid);//Autodetect
	this.setPreset(id,pr,setAll);
	return id;
},
nuChk:function(el,cid,n,t,cl,c){
	var bt,cb;
	cb=createTiddlyElement(el,'input',cid,null,null,{'type':'checkbox','name':n,'value':t[0]});
	cb.checked=c?c:false;
	cb.onclick=this.check;
	bt=createTiddlyElement(el,'span',null,cl+' xtabToggle',t[0],{'title':t[1],'toggle':cid});
	bt.onclick=this.check;
	return(cb);
},
check:function(e){
	var c,el,f,id,ns,p,x=config.macros.xtab,ps;
	c=document.getElementById(this.getAttribute('toggle'));
	if(c)c.checked=!c.checked;
	el=c?c:this;
	id=el.getAttribute('id').substr(2);
	if(el.name=='allt'){
		c=el.checked;f=el.form;
		el=f.parentNode;p=el.parentNode;
		ps=f.getAttribute('params');
		removeChildren(el);p.removeChild(el);
		x.create(id,ps,p,c);
	}else x.update(id);
},
nuSel:function(el,n,o,t,typ,c,id){
	createTiddlyElement(el,'em',null,null,t[0]);
	var s=createTiddlyElement(el,'select',n+id,c,null,{'name':n,'title':t[1]});
	s.onchange=this.chgSel;
	this.setOpt(s,o,null,typ,t[2]);
},
setOpt:function(el,o,val,typ,title){
	if(val&&el.getAttribute('cat')==val)return;
	var i,l,os;
	l=o?o.length:0;
	os=el.options;
	el.disabled=l==0;
	while(os.length>1)os[os.length-1]=null;
	os[0]=new Option(title,null,false,false);
	if(l){
		for(i=0;i<l;i++){
			var t=o[i];
			switch(typ){
			case 'P':t=t.split('==');n=t[0];v=t[1];break;
			case 'A':n=v=t[0];break;
			case 'S':t=t.title;
			default:n=t;v=t;
			}
			os[os.length]=new Option(n,v,false,false);
		}
	}
},
chgSel:function(e){
	var x=config.macros.xtab,id=this.form.getAttribute('id').substr(7);
	switch(this.name){
	case 'presets':if(this.selectedIndex>0)x.setPreset(id,this.value);break;
	case 'rows':x.initSecondary(id);
	default:x.update(id);
	}
},
initSecondary:function(id){
	var s,r,tgt,v;
	r=document.getElementById('rows'+id);
	v=r.value;
	s=document.getElementById('snd'+id);
	tgt=r.selectedIndex>0?store.getTaggedTiddlers(v):[];
	this.setOpt(s,tgt,v,'S',this.cfg.S[2]);
	s.setAttribute('cat',v?v:'');
},
setPreset:function(id,pr,setAll){
	var chk,f,l,ls,o,p,x,c=this.cfg,u=c.nDef;
	if(pr){
		f=document.getElementById('xtabFrm'+id);
		p=pr.parseParams(null,null,false);
		ls=[
			['rows',getParam(p,c.pRows,u),c.pRows],
			['cols',getParam(p,c.pCols,u),c.pCols],
			['snd',getParam(p,c.pSec),c.pSec]
		];
		document.getElementById('snd'+id).selectedIndex=0;
		for(l=0;l<ls.length;l++){if(ls[l][1]&&!this.chkSel(id,ls[l],f))return false;}
		o=getParam(p,c.pOps,'');
		x=function(n,s){document.getElementById(n+id).checked=o.indexOf(s)>=0};
		x('TR',c.pOpTR);x('SR',c.pOpSR);x('SC',c.pOpSC);if(setAll==undefined)x('AL',c.pOpAT);
	}
	this.update(id);
},
detect:function(t,tid){
	var a,d,l,n,ot,tgs,c=this.cfg;
	d=store.getTiddlerText(t);
	f=[c.pRows+':[[%0]] '+c.pCols+':[[%1]]',
		c.pRows+':[[%0]] '+c.pCols+':[[%1]] '+c.pSec+':[[%2]] '+c.pOps+':'+c.pOpTR+'&'+c.pOpSR,
		c.pRows+':[[%0]] '+c.pCols+':[[%1]] '+c.pSec+':[[%2]] '+c.pOps+':'+c.pOpTR];
	if(!d)alert(c.nOkDetect.format([t]));
	else{
		a=d.split('\n');
		while(a.length>0){
			l=a.shift().readBracketedList();n=l.length;
			if(tid==l[0]){
				switch(n){
				case 3:return f[2].format([l[0],l[1],l[2]]);
				case 2:
				case 4:return f[0].format([l[0],l[1]]);
				}
			}else{
				ot=store.getTiddler(tid);
				if(ot.tags.contains(l[0])){
					switch(n){
					case 3:return f[2].format([l[0],l[1],tid]);
					case 2:
					case 4:return f[1].format([l[0],l[1],tid]);
					}
				}
			}
		}
	}
},
chkSel:function(id,a,f){
	var c='',o,s,t,v;
	s=document.getElementById(a[0]+id);v=a[1];
	if(s){
		o=s.options;
		for(t=1;t<o.length;t++){c=o[t].value;if(v==c){s.selectedIndex=t;break;}}
	}
	if(v!=c){alert(this.cfg.nOkPreset.format([v,a[2]]));return false;}
	if(a[0]=='rows')this.initSecondary(id);//reset secondary
	return true;
}
}
//}}}
!Tags
[[lektie]]
[[action]]
[[priority]]
[[context]]
[[project]]
[[stage]]
[[$active]]
[[area]]
[[realm]]
[[contact]]
[[journal]]
[[star]]
!Presets
starred actions==rows:action cols:star options:1col
starred projects==rows:project cols:star options:1col
starred contacts==rows:contact cols:star options:1col
action by priority==rows:action cols:priority
action by area==rows:action cols:area
context by action==rows:context cols:action
context by priority==rows:context cols:priority
context by area==rows:context cols:area
stages by action==rows:stage cols:action
stages by priority==rows:stage cols:priority
stages by context==rows:stage cols:context
active projects by action==rows:project snd:$active cols:action options:transpose
active projects by stage==rows:project snd:$active cols:stage options:transpose
active projects by context==rows:project snd:$active cols:context options:transpose
active projects by priority==rows:project snd:$active cols:priority options:transpose
someday projects by context==rows:project snd:$someday cols:context options:transpose
someday projects by priority==rows:project snd:$someday cols:priority options:transpose
projects by realm==rows:project cols:realm
contacts by priority==rows:contact cols:priority
contacts by action==rows:contact cols:action
contacts by priority==rows:contact cols:priority
contacts by context==rows:contact cols:context
contacts by area==rows:contact cols:area
!Detect
action context
context action
priority action
project action $active
stage action §0.kickoff transpose
area action
realm project
contact action
!How to use
The easiest way to get started with [[x-tab]] is to select a ''preset'', observe and then play with the options.
!Interface options
| option | effect |h
|''rows'', ''columns''|need both to get a crosstable|
|''secondary''|allows you to go one tag further than the selected ''rows'' value and replaces that|
|''transpose''|swaps rows and columns|
|''1row'', ''1col''|will render the table based directly on the tag in ''rows'' or ''columns'' (instead of their subtags)|
|''template''|will show a template for a preset definition which you may want to add to your preset list|
|''all''|reloads the interface with all available tags in either ''rows'' and ''columns''|
!!Important
In [[tbGTD|http://tbGTD.tiddlyspot.com]] [[x-tab]] automagically detects the main [[GTD]]-tags and their sub-tags and applies a meaningful preset on startup. Try it out! Open, for example, the task status [[#next]] and click in the toolbar on the {{button{x-tab}}}button.
!Macro parameters
You can embed xtab into your documents by invoking the macro {{{<<xtab>>}}}.<<xtab>>Or you could create a button... {{{<<xtab button preset:xtab@doesntexist>>}}} <<xtab button preset:xtab@doesntexist>>

| parameter | effect |h
|''button''|Must be the first (!) parameter and renders a button, e.g. in the toolbar (see [[tbGtdTheme]]).You can specify its value...<<tiddler [[x-tab info##button]]>>|
|''taglist''|Allows you to specify a taglist to populate the ''rows'' and ''columns'' dropdowns __with valid tags__. tbGTD uses the section ''Tags'' in [[x-tab config]]...<<tiddler [[x-tab info##taglist]]>>|
|''presets''|Use a presets list to manage your presets. [[tbGTD|http://tbGTD.tiddlyspot.com]] uses the section ''presets'' in [[x-tab config]]...<<tiddler [[x-tab info##presets]]>>|
|''preset''|The ''preset'' with which you want ''xtab'' to open. You can set presets as a custom field... <<tiddler [[x-tab info##preset]]>>|
|''detect''|A tiddler or its section with definitions seperated by linebreaks depending on which xtab identifies the corresponding ''preset'' automagically|
|''defaults''|If you set {{{defauls:true}}} then {{{taglist, presets, preset and detect}}} will be taken from the defaults-array in the configuration section in the x-tab macro (__if defined__) unless you have specified them explicitly in your macro call|
|''position''|Allows you to specify where to render ''xtab''... <<tiddler [[x-tab info##position]]>>|
/%
!button
*{{{button:tiddlerName}}} renders xtab into this tiddler
*{{{button:ID==domElement}}} renders xtab into this DOM Element
!position
*{{{position:first}}} at start of the sepcified tiddler or DOM element
*{{{position:last}}} at the end of the sepcified tiddler or DOM element
*''undefined'': wherever you called the macro
!preset
*{{{preset:presetDefinition}}} ...a valid {{{presetDefinition}}} for the current configuration, only just omitting {{{preset name==}}}
*{{{preset:field}}} ...uses the value of {{{field}}} of the containing tiddler, containing a valid {{{presetDefinition}}} {{nope{
For this, open the fields-editor, which you find when you click on the {{button{+}}}button in view-mode. Add or edit a ''field'' with the name of {{{xtab}}} or whichever you defined and assign it a __valid__ preset definition ...xtab will then open with your desired preset.
}}}
*{{{preset:field@tiddler}}} ...uses the value of {{{field}}} defined at {{{tiddler}}}
!presets
*{{{presets}}} is a tiddler or tiddler-section containing __valid__ {{{preset definitions}}} for the current configuration separated by ''linebreaks''
*Here's an example preset-definition:
**''active projects by action status==rows:project cols:action snd:$active options:1col'' ...and in general:
**{{{<allModifier!><preset name>==rows:<rows value> snd:<valid subtag of cols> cols:<columns value> options:<transpose&1row&1col>}}}
***''note'': you can modify the names of the identifiers...
****{{{rows, cols, snd, options, transpose, 1col, 1row, all}}}
***...in the sourcecode for language specific adaptations of your presets
**''important'': use the ''template'' button in xtab to see what a valid preset for a given configuration looks like!
!taglist
*{{{taglist}}} is a tiddler or tiddler-section containing tag-names and can be a {{{[[bracketed]] [[list]]}}} or simply values separated by linebreaks
!end%/
/***
|''Name:''|x-tagger|
|''Version:''|1.0 (2009-11-02)|
|''Source:''|http://tbGTD.tiddlyspot.com/#x-tagger|
|''Author:''|[[TobiasBeer]]|
|''Description:''|Provides a drop down listing current tags and others to be set.|
|''~TiddlyWiki:''|Version 2.5 or better|
***/
//{{{
setStylesheet(
	".xtagger li{display:block;float:left;padding-bottom:10px !important;}"+
	".xtagger li ol li{padding:0 5px 5px 5px !important;clear:both;min-width:120px;display:inline;border:1px solid transparent;}"+
	".xtagger li ol li:hover{border:1px solid #333;}"+
	".xtagger li ol li ol li{padding:1px 0 !important;}"+
	".xtagger li ol li ol li:hover{border:1px solid transparent;}"+
	".xtagger li a{display:inline;font-weight:bold;}.xtagger .tiddlyLink:hover{background:transparent;}"+
	".xtagger .quickopentag {width:82%;display:inline-block;}"+
	".xtagger .quickopentag .tiddlyLink {display:inline;}"+
	".xtagger .quickopentag .button {display:inline;border:0;padding:0 3%;text-align:center;width:10%;font-size:11px;}"+
	".xtagger a.button{padding:0;}"+
	".xtagger a.toggleButton {display:inline;padding:0 2px;margin-right:1px; font-size:110%;}"+
	".xtagger .title {font-weight:bold;font-size:150%;color:#CCC;}","StyleSheetxTagger");
//}}}
//{{{
config.macros.xtagger={
cfg:{
	mode:1,// 0 -> ask for substitution, 1 -> substitute (silent), >1 -> always add (silent)
	horizontal:false,//all in one row
	sidebarOffset:20,//dist from sidebar
	sideWidth:'180px',//width of sides
	topMarginSides:'10px',
	newAt:16,//new block each
	archive:'archive',//archive tag
	excludeTags:'',
	list:'true',
	arrow:document.all?"▼":"▾", //only the fat works in IE

	label:'Tags: ', //language settings
	options:'muligheder',
	more:'mere...',
	tooltip:'Bestyr tiddler tags',
	notags:'ingen tags er sat...',
	aretags:'nuværende tags',
	txtRemove: 'fjern tag',
	txtEdit:"redigér katagorier...",
	txtEditTip:"redigér tiddlermed GTD tag kategorier som bruges af x-tagger",
	txtNew:"tilføj et andet tag",
	txtAdd:"sæt tag ",
	promptNew:"Indsæt et nyt tag:",
	modeAsk:"Vil du også fjerne '%1' og andre tags fra kategori '%2'?\nFortryd tilføjer blot tag '%3'."
},
handler:function(place,macroName,params,wikifier,paramString,tiddler){
	var c,click,ex,lbl,list,more,p,src,tip,x;
	x=config.macros.xtagger;c=x.cfg;
	p=paramString.parseParams('tagman',null,true);
	lbl=getParam(p,"label",c.label)+c.arrow;
	tip=getParam(p,"tooltip",c.tooltip);
	list=getParam(p,"taglist",c.list);
	ex=getParam(p,"exclude",c.excludeTags).readBracketedList();
	src=getParam(p,"source");if(src&&!store.getTiddlerText(src))return false;
	more=getParam(p,"more",'');
	click=function(e){
		e=e||window.event;
		var ar,d1,d2,i,curr,nuBtns,nuLi,m,max=nu=c.newAt,pop,s,t,tags=[],tids,tgt;		
		pop=Popup.create(this);
		addClass(pop,'xtagger');
		if(src){//mod tb:different method for source tiddler
			tids=store.getTiddlerText(src).readBracketedList();
			for(t=0;t<tids.length;t++){
				tgt=store.getTaggedTiddlers(tids[t]);
				tags.push('TAG:'+tids[t]);
				for(s=0;s<tgt.length;s++)tags.push(tgt[s].title);
			}
		}else tags=store.getTags();
		curr=tiddler.tags.sort();
		nuLi=function(p){return createTiddlyElement(createTiddlyElement(p,"li",null,null),"ol",null,null);}
		nuBtns=function(where,text,tag,pref){
			var s,t;
			s=createTiddlyElement(createTiddlyElement(where,"li"),"span",null,null);
			t=createTiddlyButton(s,text,pref+" '"+tag+"'",x.setTag,"button toggleButton", null);
			t.setAttribute("tiddler",tiddler.title);
			t.setAttribute("tag",tag);
			t.setAttribute("source",src);
			insertSpacer(s);
			if(window.createTagButton_orig_mptw)createTagButton_orig_mptw(s,tag);
			else createTagButton(s,tag);
		}
		d1=nuLi(pop);d2=nuLi(d1);if(c.topMarginSides)d1.style.marginTop=c.topMarginSides;
		createTiddlyElement(d2,"li",null,"title",(tiddler.tags.length==0?c.notags:c.aretags));
		for(t=0;t<curr.length;t++)nuBtns(d2,"[x]",curr[t],c.txtRemove);
		if(c.sideWidth)jQuery('li',d1).css('min-width',c.sideWidth);
		
		if(list!='false'){
			for(i=0;i<tags.length;i++){
				var ti=tags[i];nu++;
				if(ti.indexOf('TAG:')==0){ti=ti.substr(4);
					if(nu>max||c.horizontal){nu=0;d1=nuLi(pop);}d2=nuLi(d1);
					createTiddlyLink(createTiddlyElement(d2,"li",null,null),ti,ti,'title');
				}
				else if(!tiddler.tags.contains(ti)&&!ex.contains(ti))nuBtns(d2,"["+String.fromCharCode(160,160)+"]",ti,c.txtAdd);
			}
		}
		
		//options
		d1=nuLi(pop);d2=nuLi(d1);createTiddlyElement(d2,'li',null,'title',c.options);
		if(c.topMarginSides)d1.style.marginTop=c.topMarginSides;
		var newBtn=createTiddlyButton(createTiddlyElement(d2,"li"),(c.txtNew),null,x.setTag);
		newBtn.setAttribute("tiddler",tiddler.title);
		var edit=createTiddlyButton(createTiddlyElement(d2,"li"),c.txtEdit,c.txtEditTip,onClickTiddlerLink); 
		edit.setAttribute("tiddlyLink",src.split('##')[0]);
		
		//archive
		ti=c.archive;
		if(ti){
			d2=nuLi(d1);createTiddlyLink(createTiddlyElement(d2,"li",null,null),ti,ti,'title');
			ar=store.getTaggedTiddlers(ti);
			for(i=0;i<ar.length;i++){var ti=ar[i].title;
				if(!tiddler.tags.contains(ti)&&!ex.contains(ti))nuBtns(d2,"["+String.fromCharCode(160,160)+"]",ti,c.txtAdd);
			}
		}
		//more
		m=store.getTiddlerText(more).readBracketedList();
		if(m.length>0){
			d2=nuLi(d1);createTiddlyElement(d2,'li',null,'title',c.more);
			for(i=0;i<m.length;i++){var ti=m[i];
				if(!tiddler.tags.contains(ti)&&!ex.contains(ti))nuBtns(d2,"["+String.fromCharCode(160,160)+"]",ti,c.txtAdd);
			}
		}
		if(c.sideWidth)jQuery('li',d1).css('min-width',c.sideWidth);

		Popup.show(pop,false);
		s=document.getElementById('sidebar');
		pop.style.left='';pop.style.right=(c.sidebarOffset+(s?s.offsetWidth:0))+'px';
		e.cancelBubble=true;
		if(e.stopPropagation)e.stopPropagation();
		return false;
	}	
	createTiddlyButton(place,lbl,tip,click,"button","xtaggerDrop");
},
setTag:function(e){
	var nu,r,s,src,t,tag,ti,tid,title,c=config.macros.xtagger.cfg;
	title=this.getAttribute("tiddler");
	src=this.getAttribute("source");
	tag=this.getAttribute("tag");
	tid=store.getTiddler(title);
	if(!tag){nu=prompt(c.promptNew,"");if(!nu)return false;else tag=nu;}
	if(!tid||!tid.tags)store.saveTiddler(title,title,'',config.options.txtUserName,new Date(),tag);
	else{
		if(!tid.tags.contains(tag)){
			if(store.getTiddlerText(src)){
				if(c.mode<2){
					var cats=store.getTiddlerText(src).readBracketedList();
findTagged:	for(t=0;t<cats.length;t++){
						ti=cats[t];
						var tgt=store.getTaggedTiddlers(ti);
						for(s=0;s<tgt.length;s++){
							if(tgt[s].title==tag){
								for(r=0;r<tgt.length;r++){
									if(tid.tags.contains(tgt[r].title)){
										var ok;
										if(c.mode==0&&!ok){
											if(!confirm(c.modeAsk.replace(/%1/,tgt[r].title).replace(/%2/,ti).replace(/%3/,tag)))break findTagged;
											ok=true;
										}
										store.setTiddlerTag(title,false,tgt[r].title);
									}
								}
								break findTagged;
							}
						}
					}
				}
			}
			store.setTiddlerTag(title,true,tag);
		}
		else if(!nu)store.setTiddlerTag(title,false,tag);
		story.saveTiddler(title);
	}
}
}
window.onClickTag=function(e){
	if(!e)var e=window.event;
	var nested=true;
	var tgt=resolveTarget(e);
	var cw=document.getElementById("contentWrapper");
	while(tgt!= null){if(cw==tgt)nested=false;tgt=tgt.parentNode;}
	if((Popup.stack.length>1)&&nested)Popup.removeFrom(1);
	else if(Popup.stack.length>0 && nested==false)Popup.removeFrom(0);
	var theId=(nested==false)?"popup":"nestedtagger";
	var pop=createTiddlyElement(document.body,"ol",theId,"popup",null);
	Popup.stack.push({root:this,popup:pop});
	var tag=this.getAttribute("tag");
	var title=this.getAttribute("tiddler");
	if(pop&&tag){
		var tgt=store.getTaggedTiddlers(tag);
		var titles=[];
		for(var r=0;r<tgt.length;r++)if(tgt[r].title!=title)titles.push(tgt[r].title);
		var lingo=config.views.wikified.tag;
		if(titles.length>0){
			var openAll=createTiddlyButton(createTiddlyElement(pop,"li"),lingo.openAllText.format([tag]),lingo.openAllTooltip,onClickTagOpenAll);
			openAll.setAttribute("tag",tag);
			createTiddlyElement(createTiddlyElement(pop,"li"),"hr");
			for(r=0; r<titles.length; r++)createTiddlyLink(createTiddlyElement(pop,"li"),titles[r],true);
		}else{createTiddlyText(createTiddlyElement(pop,"li",null,"disabled"),lingo.popupNone.format([tag]));}
		if(this.getAttribute('showOpenTag')){
			createTiddlyElement(createTiddlyElement(pop,"li"),"hr");
			var h=createTiddlyLink(createTiddlyElement(pop,"li"),tag,false);
			createTiddlyText(h,lingo.openTag.format([tag]));
		}
	}
	Popup.show(pop,false);
	e.cancelBubble=true;
	if(e.stopPropagation)e.stopPropagation();
	return(false);
}
//}}}
!Notes
These sections define the categories used by [[x-tagger]] and the MainMenu. If a lower item is directly tagging to an upper item it will be ignored by the MainMenu, e.g. [[$active]]. Tags under the section ''More'' will be shown in the corresponding section in tagger. For more configuration options, look at the beginning of [[x-taggers sourcecode|x-tagger]].
!Tags
[[handling]]
[[prioritet]]
[[sammenhæng]]
[[projekt]]
[[trin]]
[[$igang]]
[[område]]
[[rige]]
[[kontakt]]
!More
[[hjælp]]
[[journal]]
[[reference]]
[[systemConfig]]
[[systemConfigDisable]]
[[excludeLists]]
[[excludeMissing]]
[[excludeSearch]]
[[noCloud]]
//{{{
//shortcuts
var c=config;
var co=c.options;
var cc=c.commands;
var cm=c.macros;
var cv=c.views;


readOnly=false;//adopted from mptwConfig
showBackstage=true;
cv.editor.tagChooser.text='tags...';
co.txtTheme='tbGtdTheme';
cv.wikified.defaultText="";//no msg when no tiddler
cv.editor.defaultText="";//no text for a new tiddler
co.chkInsertTabs=true;//tab as tab when editing
co.chkHttpReadOnly=false;//visitors can edit
co.chkSaveBackups=true;//backups in this folder
co.txtBackupFolder='twbackup';//autosave when local
/*co.chkAutoSave=(window.location.protocol=="file:");*/
co.chkHideTabsBarWhenSingleTab =true;
co.chkTOCIncludeHidden=true;
co.chkDisplayWeekNumbers=true;
co.txtPrettyDates='pppp';
co.chkAnimate=false;
co.chkSinglePagePermalink=true;
co.txtLastShared='tbGTD:::http://tbGTD.tiddlyspot.com';
merge(cm.toolbar,{moreLabel:'+',lessLabel:'-'});
merge(c.messages.backstage,{open:{text:''},close:{text:''}});
//see ViewTemplate
c.mptwDateFormat='YYYY-0MM-0DD';c.mptwJournalFormat='YYYY-0MM-0DD';

//language settings
c.glyphs.codes.star=["\u22C6","\u22C6"];
cc.syncing.text="synk";
cc.references.text="ref";
cc.permalink.text="url";
var show="Vis en URL i browerens addresselinie som ";
cc.permalink.tooltip=show+"linker til aktuelt viste tiddler";
cm.permaview.prompt=show+"viser alle de aktuelt viste tiddlere";
cm.permaview.label="permalink";
cm.list.missing.prompt="reference uden en tiddler:\n";
cm.list.orphans.prompt="tiddlere uden referencer:\n";
cm.list.shadowed.prompt="grundlæggende skyggetiddlere:\n";
cm.option.passwordCheckboxLabel="husk";

//refresh command -> for toolbar (force=true)
cc.refreshTiddler={
 text:'genopfrisk',tooltip:'Genopfrisk denne tiddler',
 handler:function(e,src,title){clearMessage();story.refreshTiddler(title,false,true);return false;}
}

//rename buttons
cm.rB={handler:function(place,macroName,params,wikifier,paramString,tiddler){
  if(place.lastChild.tagName!="BR"){
    var p1=params.shift().split("#");
    var name=p1[0];
    var id=p1[1];
    var title=params[0];
    el=place.lastChild;
    if(el.tagName.toUpperCase()!="A")el=el.firstChild;
    el.firstChild.data=name;
    if(id)el.setAttribute('id',id);
    if(title)el.title=title;
  }
}}

//shortened splashscreen code
var tbRestart=window.restart;
window.restart = function(){
	var splash=document.getElementById('SplashScreen');
	if (splash) splash.style.display = "none";
	document.getElementById('contentWrapper').style.display = "block";
	tbRestart();
}

//fix ie styles
if(jQuery.browser.msie){setStylesheet('#topMenuR{top:4.55em !important;}','ieStyles');}

//DummyTiddlerHack
config.macros.dummy={handler:function(place,macroName,params,wikifier,paramString,tiddler){var t=params.shift();if(t)place.setAttribute('tiddler',t);}}
//}}}
//{{{
config.macros.search.label=""; 
config.options.chkFullScreen= false;
config.options.chkDisableTabsBar=false;
config.options.chkHttpReadOnly = false;
config.options.chkAutoSave = false;
config.options.chkSaveBackups = true;
config.options.chkAnimate = false;
if (window.location.protocol!="file:") showBackstage=false; 
config.options.chkShowRightSidebar= false;
config.options.chkShowLeftSidebar= true;
config.options.chkSinglePageMode= false;
config.options.chkSinglePagePermalink= false;
config.options.chkSearchTitles=true;
config.options.chkSearchText=true;
config.options.chkSearchTags=true;
config.options.chkSearchFields=true;
config.options.chkSearchTitlesFirst=false;
config.options.chkSearchList=true;
config.options.chkSearchByDate=false;
config.options.chkSearchIncremental=false;
config.options.chkSearchShadows=false; 
config.options.chkShowQuickEdit=true;
//}}}
/***
!
Name: YourSearchBookmarklet
Version: 2.1.4
Source: http://tiddlywiki.abego-software.de/#YourSearchPlugin
Author: UdoBorkowski, XavierVergés
Licence: BSD open source license (abego Software)
Copyright: &copy; 2005-2008 http://www.abego-software.de
Community: http://xdexavier.googlepages.com/yoursearch.html
***/
//{{{
(function(){var a=document.createElement("script");a.src="http://tiddlywiki.abego-software.de/archive/YourSearchPlugin/YourSearchPlugin.js";a.onload=function(){refreshPageTemplate();displayMessage("YourSearch er blevet hentet")};document.getElementsByTagName("head")[0].appendChild(a)})();
//}}}
Project kick-off notes link here...
Project definitions...
*goals and (measurable !) success criteria
*the system and it's environment boundaries and interfaces
Estimates regarding project requirements for...
*people
*time
*ressources
*finances
*opportunities, threats, strengths and weaknesses (swot)
Efforts to meet prerequisites, to aquire necessary data and information to get started...
The collection of design, development and improvement efforts which pave your path to success...
|borderless widetable|k
|''Validate'' design, data, processes, components and properties as to whether or not they meet requirements.| @@color:#39C;margin-left:10px;display:block;text-align:center;background:#eee;border-bottom:1px solid #39C;padding:3px;''Do the __right__ thing!''@@|
|''Verify'' efforts numerically and logically as to whether or not they actually do what they're designed for.|  @@color:#39C;margin-left:10px;display:block;text-align:center;background:#eee;padding:3px;''Do the thing __right__!''@@|

Efforts made to check whether ideas for the desired system, improved or new, are are in fact working...
Experiment, calculate or simulate different, envisioned alternatives and scenarios...
*results and statistics...
*#gather
*#evaluate
*#compare
Analyse alternatives and __decide__ as to which ones are best suitable to meet projects goals...
The project roll-out and implementation depending on the carefully chosen path...
Assessment of how implementation meets the verified and validated model and, above all, project goals and requirements...
<<calendar>>
{{black{<<calendar>>}}}{{tagClear{}}}
{{{-> }}}[[vis en månedskalender|kalender]]