Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association

    <!--{{{-->
    <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:7em; font-size:1.3em;}

    #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 0em 1em 1em; left:-1px; top:-1px;}
    .headerForeground {position:absolute; padding:4.5em 0em 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:0em 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 .3em 0;}
    #sidebarTabs .tabContents {width:15em; overflow:hidden;}

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

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

    .tiddlerPopupButton {padding:0.2em 0.2em 0.2em 0.2em;}
    .popupTiddler {position: absolute; z-index:300; padding:1em 1em 1em 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 0em;}
    .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 0em 0em 0.5em;}
    .tab {margin:0em 0em 0em 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 0em 14em;}

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

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

    .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:0em 0.25em; padding:0em 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 0em; font-size:.9em;}
    .editorFooter .button {padding-top:0px; padding-bottom:0px;}

    .fieldsetFix {border:0; padding:0; margin:1px 0px 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 0.3em 0.5em;}
    #backstageToolbar {position:relative;}
    #backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em 0.3em 0.5em;}
    #backstageButton {display:none; position:absolute; z-index:175; top:0em; right:0em;}
    #backstageButton a {padding:0.1em 0.4em 0.1em 0.4em; margin:0.1em 0.1em 0.1em 0.1em;}
    #backstage {position:relative; width:100%; z-index:50;}
    #backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin:0em 3em 0em 3em; padding:1em 1em 1em 1em;}
    .backstagePanelFooter {padding-top:0.2em; float:right;}
    .backstagePanelFooter a {padding:0.2em 0.4em 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 1em;}
    /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
    noscript {display:none;}
    }
    /*}}}*/

    <!--{{{-->
    <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'></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>>

    //only for generate an <<tag Menu>> item

    Copyright (c) 2010, Thomas Linden (http://www.daemon.de)

    Copyright (c) 2005-2008, BidiX (http://BidiX.info)

    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 BidiX 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.

    Contact : [[BidiX @ bidix . info|mailto:BidiX@BidiX.info]]
    URL : [[BidiX.info|http://BidiX.info/]]
    Donation : [[Donation via Paypal|https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=BidiX%40bidix%2einfo&item_name=TiddlyWikiHacking%20Donations&item_number=Donations&no_shipping=2&no_note=1&tax=0&currency_code=EUR&bn=PP%2dDonationsBF&charset=UTF%2d8]]

    <<newTiddler>>

    <<upload>>

    PC Browser only: <<saveChanges>>

    ----

    ImportTiddlers

    ExportTiddlers

    [[Indexes]]

    Home

    <!--{{{-->
    <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'></span></div>
    <span macro='autosizeEditor'></span>
    <!--}}}-->

    <<exportTiddlers inline>>

    /***
    |Name|ExportTiddlersPlugin|
    |Source|http://www.TiddlyTools.com/#ExportTiddlersPlugin|
    |Documentation|http://www.TiddlyTools.com/#ExportTiddlersPluginInfo|
    |Version|2.9.5|
    |Author|Eric Shulman|
    |License|http://www.TiddlyTools.com/#LegalStatements|
    |~CoreVersion|2.1|
    |Type|plugin|
    |Description|interactively select/export tiddlers to a separate file|
    !!!!!Documentation
    >see [[ExportTiddlersPluginInfo]]
    !!!!!Inline control panel (live):
    ><<exportTiddlers inline>>
    !!!!!Revisions
    <<<
    2010.02.25 2.9.5 added merge checkbox option and improved 'merge' status message
    |please see [[ExportTiddlersPluginInfo]] for additional revision details|
    2005.10.09 0.0.0 development started
    <<<
    !!!!!Code
    ***/
    //{{{
    // version
    version.extensions.ExportTiddlersPlugin= {major: 2, minor: 9, revision: 5, date: new Date(2010,2,25)};

    // default shadow definition
    config.shadowTiddlers.ExportTiddlers='<<exportTiddlers inline>>';

    // add 'export' backstage task (following built-in import task)
    if (config.tasks) { // TW2.2 or above
    	config.tasks.exportTask = {
    		text:'export',
    		tooltip:'Export selected tiddlers to another file',
    		content:'<<exportTiddlers inline>>'
    	}
    	config.backstageTasks.splice(config.backstageTasks.indexOf('importTask')+1,0,'exportTask');
    }

    config.macros.exportTiddlers = {
    	$: function(id) { return document.getElementById(id); }, // abbreviation
    	label: 'export tiddlers',
    	prompt: 'Copy selected tiddlers to an export document',
    	okmsg: '%0 tiddler%1 written to %2',
    	failmsg: 'An error occurred while creating %1',
    	overwriteprompt: '%0\ncontains %1 tiddler%2 that will be discarded or replaced',
    	mergestatus: '%0 tiddler%1 added, %2 tiddler%3 updated, %4 tiddler%5 unchanged',
    	statusmsg: '%0 tiddler%1 - %2 selected for export',
    	newdefault: 'export.html',
    	datetimefmt: '0MM/0DD/YYYY 0hh:0mm:0ss',  // for 'filter date/time' edit fields
    	type_TW: "tw", type_PS: "ps", type_TX: "tx", type_CS: "cs", type_NF: "nf", // file type tokens
    	type_map: { // maps type param to token values
    		tiddlywiki:"tw", tw:"tw", wiki: "tw",
    		purestore: "ps", ps:"ps", store:"ps",
    		plaintext: "tx", tx:"tx", text: "tx",
    		comma:     "cs", cs:"cs", csv:  "cs",
    		newsfeed:  "nf", nf:"nf", xml:  "nf", rss:"nf"
    	},
    	handler: function(place,macroName,params) {
    		if (params[0]!='inline')
    			{ createTiddlyButton(place,this.label,this.prompt,this.togglePanel); return; }
    		var panel=this.createPanel(place);
    		panel.style.position='static';
    		panel.style.display='block';
    	},
    	createPanel: function(place) {
    		var panel=this.$('exportPanel');
    		if (panel) { panel.parentNode.removeChild(panel); }
    		setStylesheet(store.getTiddlerText('ExportTiddlersPlugin##css',''),'exportTiddlers');
    		panel=createTiddlyElement(place,'span','exportPanel',null,null)
    		panel.innerHTML=store.getTiddlerText('ExportTiddlersPlugin##html','');
    		this.initFilter();
    		this.refreshList(0);
    		var fn=this.$('exportFilename');
    		if (window.location.protocol=='file:' && !fn.value.length) {
    			// get new target path/filename
    			var newPath=getLocalPath(window.location.href);
    			var slashpos=newPath.lastIndexOf('/'); if (slashpos==-1) slashpos=newPath.lastIndexOf('\\');
    			if (slashpos!=-1) newPath=newPath.substr(0,slashpos+1); // trim filename
    			fn.value=newPath+this.newdefault;
    		}
    		return panel;
    	},
    	togglePanel: function(e) { var e=e||window.event;
    		var cme=config.macros.exportTiddlers; // abbrev
    		var parent=resolveTarget(e).parentNode;
    		var panel=cme.$('exportPanel');
    		if (panel==undefined || panel.parentNode!=parent)
    			panel=cme.createPanel(parent);
    		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' ;
    		if (panel.style.display!='none') {
    			cme.refreshList(0);
    			cme.$('exportFilename').focus();
    			cme.$('exportFilename').select();
    		}
    		e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); return(false);
    	},
    	process: function(which) { // process panel control interactions
    		var theList=this.$('exportList'); if (!theList) return false;
    		var count = 0;
    		var total = store.getTiddlers('title').length;
    		switch (which.id) {
    			case 'exportFilter':
    				count=this.filterExportList();
    				var panel=this.$('exportFilterPanel');
    				if (count==-1) { panel.style.display='block'; break; }
    				this.$('exportStart').disabled=(count==0);
    				this.$('exportDelete').disabled=(count==0);
    				this.displayStatus(count,total);
    				if (count==0) { alert('No tiddlers were selected'); panel.style.display='block'; }
    				break;
    			case 'exportStart':
    				this.go();
    				break;
    			case 'exportDelete':
    				this.deleteTiddlers();
    				break;
    			case 'exportHideFilter':
    			case 'exportToggleFilter':
    				var panel=this.$('exportFilterPanel')
    				panel.style.display=(panel.style.display=='block')?'none':'block';
    				break;
    			case 'exportSelectChanges':
    				var lastmod=new Date(document.lastModified);
    				for (var t = 0; t < theList.options.length; t++) {
    					if (theList.options[t].value=='') continue;
    					var tiddler=store.getTiddler(theList.options[t].value); if (!tiddler) continue;
    					theList.options[t].selected=(tiddler.modified>lastmod);
    					count += (tiddler.modified>lastmod)?1:0;
    				}
    				this.$('exportStart').disabled=(count==0);
    				this.$('exportDelete').disabled=(count==0);
    				this.displayStatus(count,total);
    				if (count==0) alert('There are no unsaved changes');
    				break;
    			case 'exportSelectAll':
    				for (var t = 0; t < theList.options.length; t++) {
    					if (theList.options[t].value=='') continue;
    					theList.options[t].selected=true;
    					count += 1;
    				}
    				this.$('exportStart').disabled=(count==0);
    				this.$('exportDelete').disabled=(count==0);
    				this.displayStatus(count,count);
    				break;
    			case 'exportSelectOpened':
    				for (var t=0; t<theList.options.length; t++) theList.options[t].selected=false;
    				var tiddlerDisplay=this.$('tiddlerDisplay');
    				for (var t=0; t<tiddlerDisplay.childNodes.length;t++) {
    					var tiddler=tiddlerDisplay.childNodes[t].id.substr(7);
    					for (var i=0; i<theList.options.length; i++) {
    						if (theList.options[i].value!=tiddler) continue;
    						theList.options[i].selected=true; count++; break;
    					}
    				}
    				this.$('exportStart').disabled=(count==0);
    				this.$('exportDelete').disabled=(count==0);
    				this.displayStatus(count,total);
    				if (count==0) alert('There are no tiddlers currently opened');
    				break;
    			case 'exportSelectRelated':
    				// recursively build list of related tiddlers
    				function getRelatedTiddlers(tid,tids) {
    					var t=store.getTiddler(tid); if (!t || tids.contains(tid)) return tids;
    					tids.push(t.title);
    					if (!t.linksUpdated) t.changed();
    					for (var i=0; i<t.links.length; i++)
    						if (t.links[i]!=tid) tids=getRelatedTiddlers(t.links[i],tids);
    					return tids;
    				}
    				// for all currently selected tiddlers, gather up the related tiddlers (including self) and select them as well
    				var tids=[];
    				for (var i=0; i<theList.options.length; i++)
    					if (theList.options[i].selected) tids=getRelatedTiddlers(theList.options[i].value,tids);
    				// select related tiddlers (includes original selected tiddlers)
    				for (var i=0; i<theList.options.length; i++)
    					theList.options[i].selected=tids.contains(theList.options[i].value);
    				this.displayStatus(tids.length,total);
    				break;
    			case 'exportListSmaller':	// decrease current listbox size
    				var min=5;
    				theList.size-=(theList.size>min)?1:0;
    				break;
    			case 'exportListLarger':	// increase current listbox size
    				var max=(theList.options.length>25)?theList.options.length:25;
    				theList.size+=(theList.size<max)?1:0;
    				break;
    			case 'exportClose':
    				this.$('exportPanel').style.display='none';
    				break;
    		}
    		return false;
    	},
    	displayStatus: function(count,total) {
    		var txt=this.statusmsg.format([total,total!=1?'s':'',!count?'none':count==total?'all':count]);
    		clearMessage();	displayMessage(txt);
    		return txt;
    	},
    	refreshList: function(selectedIndex) {
    		var theList = this.$('exportList'); if (!theList) return;
    		// get the sort order
    		var sort;
    		if (!selectedIndex)   selectedIndex=0;
    		if (selectedIndex==0) sort='modified';
    		if (selectedIndex==1) sort='title';
    		if (selectedIndex==2) sort='modified';
    		if (selectedIndex==3) sort='modifier';
    		if (selectedIndex==4) sort='tags';

    		// unselect headings and count number of tiddlers actually selected
    		var count=0;
    		for (var t=5; t < theList.options.length; t++) {
    			if (!theList.options[t].selected) continue;
    			if (theList.options[t].value!='')
    				count++;
    			else { // if heading is selected, deselect it, and then select and count all in section
    				theList.options[t].selected=false;
    				for ( t++; t<theList.options.length && theList.options[t].value!=''; t++) {
    					theList.options[t].selected=true;
    					count++;
    				}
    			}
    		}

    		// disable 'export' and 'delete' buttons if no tiddlers selected
    		this.$('exportStart').disabled=(count==0);
    		this.$('exportDelete').disabled=(count==0);

    		// show selection count
    		var tiddlers = store.getTiddlers('title');
    		if (theList.options.length) this.displayStatus(count,tiddlers.length);

    		// if a [command] item, reload list... otherwise, no further refresh needed
    		if (selectedIndex>4) return;

    		// clear current list contents
    		while (theList.length > 0) { theList.options[0] = null; }
    		// add heading and control items to list
    		var i=0;
    		var indent=String.fromCharCode(160)+String.fromCharCode(160);
    		theList.options[i++]=
    			new Option(tiddlers.length+' tiddlers in document', '',false,false);
    		theList.options[i++]=
    			new Option(((sort=='title'   )?'>':indent)+' [by title]', '',false,false);
    		theList.options[i++]=
    			new Option(((sort=='modified')?'>':indent)+' [by date]', '',false,false);
    		theList.options[i++]=
    			new Option(((sort=='modifier')?'>':indent)+' [by author]', '',false,false);
    		theList.options[i++]=
    			new Option(((sort=='tags'    )?'>':indent)+' [by tags]', '',false,false);

    		// output the tiddler list
    		switch(sort) {
    			case 'title':
    				for(var t = 0; t < tiddlers.length; t++)
    					theList.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title,false,false);
    				break;
    			case 'modifier':
    			case 'modified':
    				var tiddlers = store.getTiddlers(sort);
    				// sort descending for newest date first
    				tiddlers.sort(function (a,b) {if(a[sort] == b[sort]) return(0); else return (a[sort] > b[sort]) ? -1 : +1; });
    				var lastSection = '';
    				for(var t = 0; t < tiddlers.length; t++) {
    					var tiddler = tiddlers[t];
    					var theSection = '';
    					if (sort=='modified') theSection=tiddler.modified.toLocaleDateString();
    					if (sort=='modifier') theSection=tiddler.modifier;
    					if (theSection != lastSection) {
    						theList.options[i++] = new Option(theSection,'',false,false);
    						lastSection = theSection;
    					}
    					theList.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title,false,false);
    				}
    				break;
    			case 'tags':
    				var theTitles = {}; // all tiddler titles, hash indexed by tag value
    				var theTags = new Array();
    				for(var t=0; t<tiddlers.length; t++) {
    					var title=tiddlers[t].title;
    					var tags=tiddlers[t].tags;
    					if (!tags || !tags.length) {
    						if (theTitles['untagged']==undefined) { theTags.push('untagged'); theTitles['untagged']=new Array(); }
    						theTitles['untagged'].push(title);
    					}
    					else for(var s=0; s<tags.length; s++) {
    						if (theTitles[tags[s]]==undefined) { theTags.push(tags[s]); theTitles[tags[s]]=new Array(); }
    						theTitles[tags[s]].push(title);
    					}
    				}
    				theTags.sort();
    				for(var tagindex=0; tagindex<theTags.length; tagindex++) {
    					var theTag=theTags[tagindex];
    					theList.options[i++]=new Option(theTag,'',false,false);
    					for(var t=0; t<theTitles[theTag].length; t++)
    						theList.options[i++]=new Option(indent+indent+theTitles[theTag][t],theTitles[theTag][t],false,false);
    				}
    				break;
    			}
    		theList.selectedIndex=selectedIndex; // select current control item
    		this.$('exportStart').disabled=true;
    		this.$('exportDelete').disabled=true;
    		this.displayStatus(0,tiddlers.length);
    	},
    	askForFilename: function(here) {
    		var msg=here.title; // use tooltip as dialog box message
    		var path=getLocalPath(document.location.href);
    		var slashpos=path.lastIndexOf('/'); if (slashpos==-1) slashpos=path.lastIndexOf('\\');
    		if (slashpos!=-1) path = path.substr(0,slashpos+1); // remove filename from path, leave the trailing slash
    		var filetype=this.$('exportFormat').value.toLowerCase();
    		var defext='html';
    		if (filetype==this.type_TX) defext='txt';
    		if (filetype==this.type_CS) defext='csv';
    		if (filetype==this.type_NF) defext='xml';
    		var file=this.newdefault.replace(/html$/,defext);
    		var result='';
    		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=defext;
    				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 { // XPSP2 IE only
    				var s = new ActiveXObject('UserAccounts.CommonDialog');
    				s.Filter='All files|*.*|Text files|*.txt|HTML files|*.htm;*.html|XML files|*.xml|';
    				s.FilterIndex=defext=='txt'?2:'html'?3:'xml'?4:1;
    				s.InitialDir=path;
    				s.FileName=file;
    				if (s.showOpen()) var result=s.FileName;
    			}
    			catch(e) {  // fallback
    				var result=prompt(msg,path+file);
    			}
    		}
    		return result;
    	},
    	initFilter: function() {
    		this.$('exportFilterStart').checked=false; this.$('exportStartDate').value='';
    		this.$('exportFilterEnd').checked=false;  this.$('exportEndDate').value='';
    		this.$('exportFilterTags').checked=false; this.$('exportTags').value='';
    		this.$('exportFilterText').checked=false; this.$('exportText').value='';
    		this.showFilterFields();
    	},
    	showFilterFields: function(which) {
    		var show=this.$('exportFilterStart').checked;
    		this.$('exportFilterStartBy').style.display=show?'block':'none';
    		this.$('exportStartDate').style.display=show?'block':'none';
    		var val=this.$('exportFilterStartBy').value;
    		this.$('exportStartDate').value
    			=this.getFilterDate(val,'exportStartDate').formatString(this.datetimefmt);
    		if (which && (which.id=='exportFilterStartBy') && (val=='other'))
    			this.$('exportStartDate').focus();

    		var show=this.$('exportFilterEnd').checked;
    		this.$('exportFilterEndBy').style.display=show?'block':'none';
    		this.$('exportEndDate').style.display=show?'block':'none';
    		var val=this.$('exportFilterEndBy').value;
    		this.$('exportEndDate').value
    			=this.getFilterDate(val,'exportEndDate').formatString(this.datetimefmt);
    		 if (which && (which.id=='exportFilterEndBy') && (val=='other'))
    			this.$('exportEndDate').focus();

    		var show=this.$('exportFilterTags').checked;
    		this.$('exportTags').style.display=show?'block':'none';

    		var show=this.$('exportFilterText').checked;
    		this.$('exportText').style.display=show?'block':'none';
    	},
    	getFilterDate: function(val,id) {
    		var result=0;
    		switch (val) {
    			case 'file':
    				result=new Date(document.lastModified);
    				break;
    			case 'other':
    				result=new Date(this.$(id).value);
    				break;
    			default: // today=0, yesterday=1, one week=7, two weeks=14, a month=31
    				var now=new Date(); var tz=now.getTimezoneOffset()*60000; now-=tz;
    				var oneday=86400000;
    				if (id=='exportStartDate')
    					result=new Date((Math.floor(now/oneday)-val)*oneday+tz);
    				else
    					result=new Date((Math.floor(now/oneday)-val+1)*oneday+tz-1);
    				break;
    		}
    		return result;
    	},
    	filterExportList: function() {
    		var theList  = this.$('exportList'); if (!theList) return -1;
    		var filterStart=this.$('exportFilterStart').checked;
    		var val=this.$('exportFilterStartBy').value;
    		var startDate=config.macros.exportTiddlers.getFilterDate(val,'exportStartDate');
    		var filterEnd=this.$('exportFilterEnd').checked;
    		var val=this.$('exportFilterEndBy').value;
    		var endDate=config.macros.exportTiddlers.getFilterDate(val,'exportEndDate');
    		var filterTags=this.$('exportFilterTags').checked;
    		var tags=this.$('exportTags').value;
    		var filterText=this.$('exportFilterText').checked;
    		var text=this.$('exportText').value;
    		if (!(filterStart||filterEnd||filterTags||filterText)) {
    			alert('Please set the selection filter');
    			this.$('exportFilterPanel').style.display='block';
    			return -1;
    		}
    		if (filterStart&&filterEnd&&(startDate>endDate)) {
    			var msg='starting date/time:\n'
    			msg+=startDate.toLocaleString()+'\n';
    			msg+='is later than ending date/time:\n'
    			msg+=endDate.toLocaleString()
    			alert(msg);
    			return -1;
    		}
    		// if filter by tags, get list of matching tiddlers
    		// use getMatchingTiddlers() (if MatchTagsPlugin is installed) for full boolean expressions
    		// otherwise use getTaggedTiddlers() for simple tag matching
    		if (filterTags) {
    			var fn=store.getMatchingTiddlers||store.getTaggedTiddlers;
    			var t=fn.apply(store,[tags]);
    			var tagged=[];
    			for (var i=0; i<t.length; i++) tagged.push(t[i].title);
    		}
    		// scan list and select tiddlers that match all applicable criteria
    		var total=0;
    		var count=0;
    		for (var i=0; i<theList.options.length; i++) {
    			// get item, skip non-tiddler list items (section headings)
    			var opt=theList.options[i]; if (opt.value=='') continue;
    			// get tiddler, skip missing tiddlers (this should NOT happen)
    			var tiddler=store.getTiddler(opt.value); if (!tiddler) continue;
    			var sel=true;
    			if ( (filterStart && tiddler.modified<startDate)
    			|| (filterEnd && tiddler.modified>endDate)
    			|| (filterTags && !tagged.contains(tiddler.title))
    			|| (filterText && (tiddler.text.indexOf(text)==-1) && (tiddler.title.indexOf(text)==-1)))
    				sel=false;
    			opt.selected=sel;
    			count+=sel?1:0;
    			total++;
    		}
    		return count;
    	},
    	deleteTiddlers: function() {
    		var list=this.$('exportList'); if (!list) return;
    		var tids=[];
    		for (i=0;i<list.length;i++)
    			if (list.options[i].selected && list.options[i].value.length)
    				tids.push(list.options[i].value);
    		if (!confirm('Are you sure you want to delete these tiddlers:\n\n'+tids.join(', '))) return;
    		store.suspendNotifications();
    		for (t=0;t<tids.length;t++) {
    			var tid=store.getTiddler(tids[t]); if (!tid) continue;
    			var msg="'"+tid.title+"' is tagged with 'systemConfig'.\n\n";
    			msg+='Removing this tiddler may cause unexpected results.  Are you sure?'
    			if (tid.tags.contains('systemConfig') && !confirm(msg)) continue;
    			store.removeTiddler(tid.title);
    			story.closeTiddler(tid.title);
    		}
    		store.resumeNotifications();
    		alert(tids.length+' tiddlers deleted');
    		this.refreshList(0); // reload listbox
    		store.notifyAll(); // update page display
    	},
    	go: function() {
    		if (window.location.protocol!='file:') // make sure we are local
    			{ displayMessage(config.messages.notFileUrlError); return; }
    		// get selected tidders, target filename, target type, and notes
    		var list=this.$('exportList'); if (!list) return;
    		var tids=[]; for (var i=0; i<list.options.length; i++) {
    			var opt=list.options[i]; if (!opt.selected||!opt.value.length) continue;
    			var tid=store.getTiddler(opt.value); if (!tid) continue;
    			tids.push(tid);
    		}
    		if (!tids.length) return; // no tiddlers selected
    		var target=this.$('exportFilename').value.trim();
    		if (!target.length) {
    			displayMessage('A local target path/filename is required',target);
    			return;
    		}
    		var merge=this.$('exportMerge').checked;
    		var filetype=this.$('exportFormat').value.toLowerCase();
    		var notes=this.$('exportNotes').value.replace(/\n/g,'<br>');
    		var total={val:0};
    		var out=this.assembleFile(target,filetype,tids,notes,total,merge);
    		if (!total.val) return; // cancelled file overwrite
    		var link='file:///'+target.replace(/\\/g,'/');
    		var samefile=link==decodeURIComponent(window.location.href);
    		var p=getLocalPath(document.location.href);
    		if (samefile) {
    			if (config.options.chkSaveBackups) { var t=loadOriginal(p);if(t)saveBackup(p,t); }
    			if (config.options.chkGenerateAnRssFeed && saveRss instanceof Function) saveRss(p);
    		}
    		var ok=saveFile(target,out);
    		displayMessage((ok?this.okmsg:this.failmsg).format([total.val,total.val!=1?'s':'',target]),link);
    	},
    	plainTextHeader:
    		 'Source:\n\t%0\n'
    		+'Title:\n\t%1\n'
    		+'Subtitle:\n\t%2\n'
    		+'Created:\n\t%3 by %4\n'
    		+'Application:\n\tTiddlyWiki %5 / %6 %7\n\n',
    	plainTextTiddler:
    		'- - - - - - - - - - - - - - -\n'
    		+'|     title: %0\n'
    		+'|   created: %1\n'
    		+'|  modified: %2\n'
    		+'| edited by: %3\n'
    		+'|      tags: %4\n'
    		+'- - - - - - - - - - - - - - -\n'
    		+'%5\n',
    	plainTextFooter:
    		'',
    	newsFeedHeader:
    		 '<'+'?xml version="1.0"?'+'>\n'
    		+'<rss version="2.0">\n'
    		+'<channel>\n'
    		+'<title>%1</title>\n'
    		+'<link>%0</link>\n'
    		+'<description>%2</description>\n'
    		+'<language>en-us</language>\n'
    		+'<copyright>Copyright '+(new Date().getFullYear())+' %4</copyright>\n'
    		+'<pubDate>%3</pubDate>\n'
    		+'<lastBuildDate>%3</lastBuildDate>\n'
    		+'<docs>http://blogs.law.harvard.edu/tech/rss</docs>\n'
    		+'<generator>TiddlyWiki %5 / %6 %7</generator>\n',
    	newsFeedTiddler:
    		'\n%0\n',
    	newsFeedFooter:
    		'</channel></rss>',
    	pureStoreHeader:
    		 '<html><body>'
    		+'<style type="text/css">'
    		+'	#storeArea {display:block;margin:1em;}'
    		+'	#storeArea div {padding:0.5em;margin:1em;border:2px solid black;height:10em;overflow:auto;}'
    		+'	#pureStoreHeading {width:100%;text-align:left;background-color:#eeeeee;padding:1em;}'
    		+'</style>'
    		+'<div id="pureStoreHeading">'
    		+'	TiddlyWiki "PureStore" export file<br>'
    		+'	Source'+': <b>%0</b><br>'
    		+'	Title: <b>%1</b><br>'
    		+'	Subtitle: <b>%2</b><br>'
    		+'	Created: <b>%3</b> by <b>%4</b><br>'
    		+'	TiddlyWiki %5 / %6 %7<br>'
    		+'	Notes:<hr><pre>%8</pre>'
    		+'</div>'
    		+'<div id="storeArea">',
    	pureStoreTiddler:
    		'%0\n%1',
    	pureStoreFooter:
    		'</div><!--POST-BODY-START-->\n<!--POST-BODY-END--></body></html>',
    	assembleFile: function(target,filetype,tids,notes,total,merge) {
    		var revised='';
    		var now = new Date().toLocaleString();
    		var src=convertUnicodeToUTF8(document.location.href);
    		var title = convertUnicodeToUTF8(wikifyPlain('SiteTitle').htmlEncode());
    		var subtitle = convertUnicodeToUTF8(wikifyPlain('SiteSubtitle').htmlEncode());
    		var user = convertUnicodeToUTF8(config.options.txtUserName.htmlEncode());
    		var twver = version.major+'.'+version.minor+'.'+version.revision;
    		var v=version.extensions.ExportTiddlersPlugin; var pver = v.major+'.'+v.minor+'.'+v.revision;
    		var headerargs=[src,title,subtitle,now,user,twver,'ExportTiddlersPlugin',pver,notes];
    		switch (filetype) {
    			case this.type_TX: // plain text
    				var header=this.plainTextHeader.format(headerargs);
    				var footer=this.plainTextFooter;
    				break;
    			case this.type_CS: // comma-separated
    				var fields={};
    				for (var i=0; i<tids.length; i++) for (var f in tids[i].fields) fields[f]=f;
    				var names=['title','created','modified','modifier','tags','text'];
    				for (var f in fields) names.push(f);
    				var header=names.join(',')+'\n';
    				var footer='';
    				break;
    			case this.type_NF: // news feed (XML)
    				headerargs[0]=store.getTiddlerText('SiteUrl','');
    				var header=this.newsFeedHeader.format(headerargs);
    				var footer=this.newsFeedFooter;
    				break;
    			case this.type_PS: // PureStore (no code)
    				var header=this.pureStoreHeader.format(headerargs);
    				var footer=this.pureStoreFooter;
    				break;
    			case this.type_TW: // full TiddlyWiki
    			default:
    				var currPath=getLocalPath(window.location.href);
    				var original=loadFile(currPath);
    				if (!original) { displayMessage(config.messages.cantSaveError); return; }
    				var posDiv = locateStoreArea(original);
    				if (!posDiv) { displayMessage(config.messages.invalidFileError.format([currPath])); return; }
    				var header = original.substr(0,posDiv[0]+startSaveArea.length)+'\n';
    				var footer = '\n'+original.substr(posDiv[1]);
    				break;
    		}
    		var out=this.getData(target,filetype,tids,fields,merge);
    		var revised = header+convertUnicodeToUTF8(out.join('\n'))+footer;
    		// if full TW, insert page title and language attr, and reset all MARKUP blocks...
    		if (filetype==this.type_TW) {
    			var newSiteTitle=convertUnicodeToUTF8(getPageTitle()).htmlEncode();
    			revised=revised.replaceChunk('<title'+'>','</title'+'>',' ' + newSiteTitle + ' ');
    			revised=updateLanguageAttribute(revised);
    			var titles=[]; for (var i=0; i<tids.length; i++) titles.push(tids[i].title);
    			revised=updateMarkupBlock(revised,'PRE-HEAD',
    				titles.contains('MarkupPreHead')? 'MarkupPreHead' :null);
    			revised=updateMarkupBlock(revised,'POST-HEAD',
    				titles.contains('MarkupPostHead')?'MarkupPostHead':null);
    			revised=updateMarkupBlock(revised,'PRE-BODY',
    				titles.contains('MarkupPreBody')? 'MarkupPreBody' :null);
    			revised=updateMarkupBlock(revised,'POST-SCRIPT',
    				titles.contains('MarkupPostBody')?'MarkupPostBody':null);
    		}
    		total.val=out.length;
    		return revised;
    	},
    	getData: function(target,filetype,tids,fields,merge) {
    		// output selected tiddlers and gather list of titles (for use with merge)
    		var out=[]; var titles=[];
    		var url=store.getTiddlerText('SiteUrl','');
    		for (var i=0; i<tids.length; i++) {
    			out.push(this.formatItem(store,filetype,tids[i],url,fields));
    			titles.push(tids[i].title);
    		}
    		// if TW or PureStore format, ask to merge with existing tiddlers (if any)
    		if (filetype==this.type_TW || filetype==this.type_PS) {
    			var txt=loadFile(target);
    			if (txt && txt.length) {
    				var remoteStore=new TiddlyWiki();
    				if (version.major+version.minor*.1+version.revision*.01<2.52) txt=convertUTF8ToUnicode(txt);
    				if (remoteStore.importTiddlyWiki(txt)) {
    					var existing=remoteStore.getTiddlers('title');
    					var msg=this.overwriteprompt.format([target,existing.length,existing.length!=1?'s':'']);
    					if (merge) {
    						var added=titles.length; var updated=0; var kept=0;
    						for (var i=0; i<existing.length; i++)
    							if (titles.contains(existing[i].title)) {
    								added--; updated++;
    							} else {
    								out.push(this.formatItem(remoteStore,filetype,existing[i],url));
    								kept++;
    							}
    						displayMessage(this.mergestatus.format(
    							[added,added!=1?'s':'',updated,updated!=1?'s':'',kept,kept!=1?'s':'',]));
    					}
    					else if (!confirm(msg)) out=[]; // empty the list = don't write file
    				}
    			}
    		}
    		return out;
    	},
    	formatItem: function(s,f,t,u,fields) {
    		if (f==this.type_TW)
    			var r=s.getSaver().externalizeTiddler(s,t);
    		if (f==this.type_PS)
    			var r=this.pureStoreTiddler.format([t.title,s.getSaver().externalizeTiddler(s,t)]);
    		if (f==this.type_NF)
    			var r=this.newsFeedTiddler.format([t.saveToRss(u)]);
    		if (f==this.type_TX)
    			var r=this.plainTextTiddler.format([t.title, t.created.toLocaleString(), t.modified.toLocaleString(),
    				t.modifier, String.encodeTiddlyLinkList(t.tags), t.text]);
    		if (f==this.type_CS) {
    			function toCSV(t) { return '"'+t.replace(/"/g,'""')+'"'; } // always encode CSV
    			var out=[ toCSV(t.title), toCSV(t.created.toLocaleString()), toCSV(t.modified.toLocaleString()),
    				toCSV(t.modifier), toCSV(String.encodeTiddlyLinkList(t.tags)), toCSV(t.text) ];
    			for (var f in fields) out.push(toCSV(t.fields[f]||''));
    			var r=out.join(',');
    		}
    		return r||"";
    	}
    }
    //}}}
    /***
    !!!Control panel CSS
    //{{{
    !css
    #exportPanel {
    	display: none; position:absolute; z-index:12; width:35em; right:105%; top:6em;
    	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;
    }
    #exportPanel a, #exportPanel td a { color:#009; display:inline; margin:0px; padding:1px; }
    #exportPanel table {
    	width:100%; border:0px; padding:0px; margin:0px;
    	font-size:8pt; line-height:110%; background:transparent;
    }
    #exportPanel tr { border:0px;padding:0px;margin:0px; background:transparent; }
    #exportPanel td { color:#000; border:0px;padding:0px;margin:0px; background:transparent; }
    #exportPanel select { width:98%;margin:0px;font-size:8pt;line-height:110%;}
    #exportPanel input  { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%; }
    #exportPanel textarea  { width:98%;padding:0px;margin:0px;overflow:auto;font-size:8pt; }
    #exportPanel .box {
    	border:1px solid black; padding:3px; margin-bottom:5px;
    	background:#f8f8f8; -moz-border-radius:5px;-webkit-border-radius:5px; }
    #exportPanel .topline { border-top:2px solid black; padding-top:3px; margin-bottom:5px; }
    #exportPanel .rad { width:auto;border:0 }
    #exportPanel .chk { width:auto;border:0 }
    #exportPanel .btn { width:auto; }
    #exportPanel .btn1 { width:98%; }
    #exportPanel .btn2 { width:48%; }
    #exportPanel .btn3 { width:32%; }
    #exportPanel .btn4 { width:24%; }
    #exportPanel .btn5 { width:19%; }
    !end
    //}}}
    !!!Control panel HTML
    //{{{
    !html
    <!-- target path/file  -->
    <div>
    <div style="float:right;padding-right:.5em">
    <input type="checkbox" style="width:auto" id="exportMerge" CHECKED
    	title="combine selected tiddlers with existing tiddlers (if any) in export file"> merge
    </div>
    export to:<br>
    <input type="text" id="exportFilename" size=40 style="width:93%"><input
    	type="button" id="exportBrowse" value="..." title="select or enter a local folder/file..." style="width:5%"
    	onclick="var fn=config.macros.exportTiddlers.askForFilename(this); if (fn.length) this.previousSibling.value=fn; ">
    </div>

    <!-- output format -->
    <div>
    format:
    <select id="exportFormat" size=1>
    	<option value="TW">TiddlyWiki HTML document (includes core code)</option>
    	<option value="PS">TiddlyWiki "PureStore" HTML file (tiddler data only)</option>
    	<option value="TX">TiddlyWiki plain text TXT file (tiddler source listing)</option>
    	<option value="CS">Comma-Separated Value (CSV) data file</option>
    	<option value="NF">RSS NewsFeed XML file</option>
    </select>
    </div>

    <!-- notes -->
    <div>
    notes:<br>
    <textarea id="exportNotes" rows=3 cols=40 style="height:4em;margin-bottom:5px;" onfocus="this.select()"></textarea>
    </div>

    <!-- list of tiddlers -->
    <table><tr align="left"><td>
    	select:
    	<a href="JavaScript:;" id="exportSelectAll"
    		onclick="return config.macros.exportTiddlers.process(this)" title="select all tiddlers">
    		&nbsp;all&nbsp;</a>
    	<a href="JavaScript:;" id="exportSelectChanges"
    		onclick="return config.macros.exportTiddlers.process(this)" title="select tiddlers changed since last save">
    		&nbsp;changes&nbsp;</a>
    	<a href="JavaScript:;" id="exportSelectOpened"
    		onclick="return config.macros.exportTiddlers.process(this)" title="select tiddlers currently being displayed">
    		&nbsp;opened&nbsp;</a>
    	<a href="JavaScript:;" id="exportSelectRelated"
    		onclick="return config.macros.exportTiddlers.process(this)" title="select tiddlers related to the currently selected tiddlers">
    		&nbsp;related&nbsp;</a>
    	<a href="JavaScript:;" id="exportToggleFilter"
    		onclick="return config.macros.exportTiddlers.process(this)" title="show/hide selection filter">
    		&nbsp;filter&nbsp;</a>
    </td><td align="right">
    	<a href="JavaScript:;" id="exportListSmaller"
    		onclick="return config.macros.exportTiddlers.process(this)" title="reduce list size">
    		&nbsp;&#150;&nbsp;</a>
    	<a href="JavaScript:;" id="exportListLarger"
    		onclick="return config.macros.exportTiddlers.process(this)" title="increase list size">
    		&nbsp;+&nbsp;</a>
    </td></tr></table>
    <select id="exportList" multiple size="10" style="margin-bottom:5px;"
    	onchange="config.macros.exportTiddlers.refreshList(this.selectedIndex)">
    </select><br>

    <!-- selection filter -->
    <div id="exportFilterPanel" style="display:none">
    <table><tr align="left"><td>
    	selection filter
    </td><td align="right">
    	<a href="JavaScript:;" id="exportHideFilter"
    		onclick="return config.macros.exportTiddlers.process(this)" title="hide selection filter">hide</a>
    </td></tr></table>
    <div class="box">

    <input type="checkbox" class="chk" id="exportFilterStart" value="1"
    	onclick="config.macros.exportTiddlers.showFilterFields(this)"> starting date/time<br>
    <table cellpadding="0" cellspacing="0"><tr valign="center"><td width="50%">
    	<select size=1 id="exportFilterStartBy"
    		onchange="config.macros.exportTiddlers.showFilterFields(this);">
    		<option value="0">today</option>
    		<option value="1">yesterday</option>
    		<option value="7">a week ago</option>
    		<option value="30">a month ago</option>
    		<option value="file">file date</option>
    		<option value="other">other (mm/dd/yyyy hh:mm)</option>
    	</select>
    </td><td width="50%">
    	<input type="text" id="exportStartDate" onfocus="this.select()"
    		onchange="config.macros.exportTiddlers.$('exportFilterStartBy').value='other';">
    </td></tr></table>

    <input type="checkbox" class="chk" id="exportFilterEnd" value="1"
    	onclick="config.macros.exportTiddlers.showFilterFields(this)"> ending date/time<br>
    <table cellpadding="0" cellspacing="0"><tr valign="center"><td width="50%">
    	<select size=1 id="exportFilterEndBy"
    		onchange="config.macros.exportTiddlers.showFilterFields(this);">
    		<option value="0">today</option>
    		<option value="1">yesterday</option>
    		<option value="7">a week ago</option>
    		<option value="30">a month ago</option>
    		<option value="file">file date</option>
    		<option value="other">other (mm/dd/yyyy hh:mm)</option>
    	</select>
    </td><td width="50%">
    	<input type="text" id="exportEndDate" onfocus="this.select()"
    		onchange="config.macros.exportTiddlers.$('exportFilterEndBy').value='other';">
    </td></tr></table>

    <input type="checkbox" class="chk" id=exportFilterTags value="1"
    	onclick="config.macros.exportTiddlers.showFilterFields(this)"> match tags<br>
    <input type="text" id="exportTags" onfocus="this.select()">

    <input type="checkbox" class="chk" id=exportFilterText value="1"
    	onclick="config.macros.exportTiddlers.showFilterFields(this)"> match titles/tiddler text<br>
    <input type="text" id="exportText" onfocus="this.select()">

    </div> <!--box-->
    </div> <!--panel-->

    <!-- action buttons -->
    <div style="text-align:center">
    <input type=button class="btn4" onclick="config.macros.exportTiddlers.process(this)"
    	id="exportFilter" value="apply filter">
    <input type=button class="btn4" onclick="config.macros.exportTiddlers.process(this)"
    	id="exportStart" value="export tiddlers">
    <input type=button class="btn4" onclick="config.macros.exportTiddlers.process(this)"
    	id="exportDelete" value="delete tiddlers">
    <input type=button class="btn4" onclick="config.macros.exportTiddlers.process(this)"
    	id="exportClose" value="close">
    </div><!--center-->
    !end
    //}}}
    ***/

    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)
    * SiteUrl: The home URL of the site (used in the RSSFeed)
    * Set [[Options]] and [[iTWTweaks]]
    * Tiddlers tagged [[Menu]] are displayed in <<tag Menu>>
    * Tiddlers tagged with [[Home]] are displayed in the Home page when the TiddlyWiki is opened.

    *This wiki is based on http://itw.bidix.info/ by BidiX
    *For additionnal informations : http://www.daemon.de/PalmPreTiddlyWiki
    *Licensed under the terms of the [[BSD Open Source License]]. Feel free to send comments and suggestions to [[Thomas Linden|ThomasLinden]]

    /***
    |Name|GotoPlugin|
    |Source|http://www.TiddlyTools.com/#GotoPlugin|
    |Version|1.4.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||
    |Description|view any tiddler by entering it's title - displays list of possible matches|

    ''View a tiddler by typing its title and pressing //enter//.''  Input just enough to uniquely match a single tiddler title and ''press //enter// to auto-complete the title for you!!''  If multiple titles match your input, a list 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//'' being displayed, press //escape// to clear the current text input and start over.

    Note: ''At any time, you can move the focus directly to the text input field by using the ~ALT-G keyboard shortcut.''
    !!!!!Examples
    <<<
    | //IMPORTANT NOTE:// ''As of version 1.4.0 (2007.04.25),<br>to avoid conflict with javascript reserved keywords<br>the {{{<<goto>>}}} macro has been renamed to {{{<<gotoTiddler>>}}}'' |
    syntax: {{{<<gotoTiddler quiet insert inputstyle liststyle>>}}}
    All parameters are optional.
    * ''quiet'' prevents //automatic// display of the list as each character is typed.  To view the list when ''quiet'', use //down// or //enter//.
    * ''insert'' causes the selected tiddler title to be inserted into the tiddler source currently being edited (use with EditTemplate)
    * ''inputstyle'' and ''liststyle'' are CSS declarations that modify the default input and listbox styles.  Note: styles containing spaces must be surrounded by ({{{"..."}}} or {{{'...'}}}) or ({{{[[...]]}}}).
    {{{<<gotoTiddler>>}}}
    <<gotoTiddler>>
    {{{<<gotoTiddler quiet>>}}}
    <<gotoTiddler quiet>>
    {{{<<goto width:20em width:20em>>}}}
    <<gotoTiddler width:20em width:20em>>

    You can also invoke the macro with the "insert" keyword.  When used in the [[EditTemplate]], like this:
    {{{
    <span macro="gotoTiddler insert"></span>
    }}}
    it allows you to type/select a tiddler title, and instantly insert a link to that title (e.g. {{{[[TiddlerName]]}}}) into the tiddler source being edited.
    <<<
    !!!!!Configuration
    <<<
    You can create a tiddler tagged with <<tag systemConfig>> to control the maximum height of the listbox of tiddlers/shadows/tags. //The default values are shown below://
    //{{{
    config.macros.gotoTiddler.listMaxSize=10;
    //}}}
    <<<
    !!!!!Installation
    <<<
    import (or copy/paste) the following tiddlers into your document:
    ''GotoPlugin'' (tagged with <<tag systemConfig>>)
    <<<
    !!!!!Revisions
    <<<
    ''2007.10.31 [1.4.3]'' removed extra trailing comma on last property of config.macros.gotoTiddler object.  This fixes an error under InternetExplorer that was introduced 6 days ago... sure, I should have found it sooner, but... ''WHY DON'T PEOPLE TELL ME WHEN THINGS ARE BROKEN!!!!''
    ''2007.10.25 [1.4.2]'' added onclick handler for input field, so that clicking in field hides the listbox.
    ''2007.10.25 [1.4.1]'' re-wrote getItems() to cache list of tiddlers/shadows/tags and use case-folded simple text match instead of regular expression to find matching tiddlers.  This *vastly* reduces processing overhead between keystrokes, especially for documents with many (>1000) tiddlers.  Also, removed local definition of replaceSelection(), now supported directly by the TW2.2+ core, as well as via backward-compatible plugin (see [[CoreTweaksArchive]]).
    ''2007.04.25 [1.4.0]'' renamed macro from "goto" to "gotoTiddler".  This was necessary to avoid a fatal syntax error in Opera (and other browsers) that require strict adherence to ECMAScript 1.5 standards which defines the identifier "goto" as "reserved for FUTURE USE"... *sigh*
    ''2007.04.21 [1.3.2]'' in html definition, removed DIV around droplist (see 1.2.6 below).  It created more layout problems then it solved. :-(
    ''2007.04.01 [1.3.1]'' in processItem(), ensure that correct textarea field is found by checking for edit=="text" attribute
    ''2007.03.30 [1.3.0]'' tweak SideBarOptions shadow to automatically add {{{<<goto>>}}} when using default sidebar content
    ''2007.03.30 [1.2.6]'' in html definition, added DIV around droplist to fix IE problem where list appears next to input field instead of below it.
    ''2007.03.28 [1.2.5]'' in processItem(), set focus to text area before setting selection (needed for IE to get correct selection 'range')
    ''2007.03.28 [1.2.4]'' added prompt for 'pretty text' when inserting a link into tiddler content
    ''2007.03.28 [1.2.3]'' added local copy of core replaceSelection() and modified for different replace logic
    ''2007.03.27 [1.2.2]'' in processItem(), use story.getTiddlerField() to retrieve textarea control
    ''2007.03.26 [1.2.1]'' in html, use either 'onkeydown' (IE) or 'onkeypress' (Moz) event to process <esc> key sooner, to prevent <esc> from 'bubbling up' to the tiddler (which will close the current editor).
    ''2007.03.26 [1.2.0]'' added support for optional "insert" keyword param. When used in [[EditTemplate]], (e.g. {{{<span macro="goto insert"></span>}}}) it triggers alternative processing: instead of displaying the selected tiddler, that tiddler's title is inserted into a tiddler's textarea edit field surrounded by {{{[[...]]}}}.
    ''2006.05.10 [1.1.2]'' when filling listbox, set selection to 'heading' item... auto-select first tiddler title when down/enter moves focus into listbox
    ''2006.05.08 [1.1.1]'' added accesskey ("G") to input field html (also set when field gets focus).  Also, inputKeyHandler() skips non-printing/non-editing keys.
    ''2006.05.08 [1.1.0]'' added heading to listbox for better feedback (also avoids problems with 1-line droplist)
    ''2006.05.07 [1.0.0]'' list matches against tiddlers/shadows/tags.  input field auto-completion... 1st enter=complete matching input (or show list)... 2nd enter=view tiddler.  optional "quiet" param controls when listbox appears.
    ''2006.05.06 [0.5.0]'' added handling for enter (13), escape(27), and down(40) keys.   Change 'ondblclick' to 'onclick' for list handler to view tiddlers (suggested by Florian Cauvin - prevents unintended trigger of tiddler editor).  shadow titles inserted into list instead of appended to the end.
    ''2006.05.05 [0.0.0]'' started
    <<<
    !!!!!Credits
    >This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]
    !!!!!Code
    ***/
    //{{{
    version.extensions.gotoTiddler = {major: 1, minor: 4, revision: 3, date: new Date(2007,10,31)};

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

    config.macros.gotoTiddler= {
    	handler:
    	function(place,macroName,params) {
    		var quiet=(params[0] && params[0]=="quiet"); if (quiet) params.shift();
    		var insert=(params[0] && params[0]=="insert"); if (insert) params.shift();
    		var instyle=params.shift(); if (!instyle) instyle="";
    		var liststyle=params.shift(); if (!liststyle) liststyle="";
    		var keyevent=window.event?"onkeydown":"onkeypress";
    		createTiddlyElement(place,"span").innerHTML
    			=this.html.replace(/%keyevent%/g,keyevent).replace(/%insert%/g,insert).replace(/%quiet%/g,quiet).replace(/%instyle%/g,instyle).replace(/%liststyle%/g,liststyle);
    	},

    	html:
    	'<form onsubmit="return false" style="display:inline;margin:0;padding:0">\
    		<input name=gotoTiddler type=text autocomplete="off" accesskey="G" class="txtOptionInput"\
    			title="enter a tiddler title"\
    			onclick="this.form.list.style.display=\'none\';"\
    			onfocus="this.select(); this.setAttribute(\'accesskey\',\'G\');"\
    			%keyevent%="return config.macros.gotoTiddler.inputEscKeyHandler(event,this,this.form.list);"\
    			onkeyup="return config.macros.gotoTiddler.inputKeyHandler(event,this,this.form.list,%quiet%,%insert%);">\
    		<select name=list style="%liststyle%;display:none;position:absolute"\
    			onchange="if (!this.selectedIndex) this.selectedIndex=1;"\
    			onblur="this.style.display=\'none\';"\
    			%keyevent%="return config.macros.gotoTiddler.selectKeyHandler(event,this,this.form.gotoTiddler,%insert%);"\
    			onclick="return config.macros.gotoTiddler.processItem(this.value,this.form.gotoTiddler,this,%insert%);">\
    		</select>\
    	</form>',

    	getItems:
    	function(val) {
    		if (!this.items.length || val.length<2) { // starting new search, refresh cached list of tiddlers/shadows/tags
    			this.items=new Array();
    			var tiddlers=store.getTiddlers("title","excludeLists");
    			for(var t=0; t<tiddlers.length; t++) this.items.push(tiddlers[t].title);
    			for (var t in config.shadowTiddlers) this.items.pushUnique(t);
    			var tags=store.getTags();
    			for(var t=0; t<tags.length; t++) this.items.pushUnique(tags[t][0]);
    		}
    		var found = [];
    		var match=val.toLowerCase();
    		for(var i=0; i<this.items.length; i++)
    			if (this.items[i].toLowerCase().indexOf(match)!=-1) found.push(this.items[i]);
    		return found;
    	},
    	items: [], // cached list of tiddlers/shadows/tags

    	getItemSuffix:
    	function(t) {
    		if (store.tiddlerExists(t)) return "";  // tiddler
    		if (store.isShadowTiddler(t)) return " (shadow)"; // shadow
    		return " (tag)"; // tag
    	},

    	keyProcessed:
    	function(ev) { // utility function: exits handler and prevents browser from processing the keystroke
    		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) {
    		var key=event.keyCode;
    		// escape... hide list (2nd esc=clears input)
    		if (key==27) {
    			if (list.style.display=="none")
    				here.value=here.defaultValue;
    			list.style.display="none";
    			return this.keyProcessed(event);
    		}
    		return true; // key bubbles up
    	},

    	inputKeyHandler:
    	function(event,here,list,quiet,insert) {
    		var key=event.keyCode;
    		// non-printing chars... bubble up, except: backspace=8, enter=13, space=32, down=40, delete=46
    		if (key<48) switch(key) { case 8: case 13: case 32: case 40: case 46: break; default: return true; }
    		// blank input... if down/enter... fall through (list all)... else, and hide list
    		if (!here.value.length && !(key==40 || key==13))
    			{ list.style.display="none"; return this.keyProcessed(event); }
    		// find matching items...
    		var found = this.getItems(here.value);
    		// matched one item using enter key, but not an *exact* match... autocomplete input field
    		if (found.length==1 && quiet && key==13 && here.value!=found[0])
    			{ list.style.display="none"; here.value=found[0]; return this.keyProcessed(event); }
    		// no match or exact match using enter key, create/show tiddler
    		if (found.length<2 && key==13)
    			return this.processItem(found.length?found[0]:here.value,here,list,insert);
    		// quiet/no match, make sure list is hidden
    		list.style.display=(!quiet && found.length)?"block":"none";
    		// no matches, key bubbles up
    		if (!found.length) return true;
    		// using down/enter key shows/moves to list...
    		if (key==40 || key==13)  { list.style.display="block"; list.focus(); }
    		// finally, if list is showing, fill it with found results...
    		if (list.style.display!="none") {
    			while (list.length > 0) list.options[0]=null; // clear list
    			found.sort(); // alpha by title
    			var hdr=found.length==1?this.listMatchMsg:this.listHeading.format([found.length]); // list 'heading'
    			list.options[0]=new Option(hdr,"",false,false);
    			for (var t=0; t<found.length; t++)  // fill list...
    				list.options[list.length]=new Option(found[t]+this.getItemSuffix(found[t]),found[t],false,false);
    			list.size=(found.length<this.listMaxSize?found.length:this.listMaxSize)+1; // resize list...
    			list.selectedIndex=(key==40 || key==13)?1:0;
    		}
    		return true; // key bubbles up
    	},
    	listMaxSize: 100,
    	listHeading: 'Found %0 matching titles:',
    	listMatchMsg: 'Press enter to open tiddler...',

    	selectKeyHandler:
    	function(event,list,editfield,insert) {
    		if (event.keyCode==27) // escape... hide list, move to edit field
    			{ editfield.focus(); list.style.display="none"; return this.keyProcessed(event); }
    		if (event.keyCode==13 && list.value.length) // enter... view selected item
    			{ this.processItem(list.value,editfield,list,insert); return this.keyProcessed(event); }
    		return true; // key bubbles up
    	},

    	processItem:
    	function(title,here,list,insert) {
    		if (!title.length) return; here.value=title; list.style.display='none';
    		if (insert) {
    			var tidElem=story.findContainingTiddler(here); if (!tidElem) { here.focus(); return false; }
    			var e=story.getTiddlerField(tidElem.getAttribute("tiddler"),"text");
    			if (!e||e.getAttribute("edit")!="text") return false;
    			var txt=prompt(this.askForText,title); if (!txt||!txt.length) { here.focus(); return false; }
    			e.focus(); // put focus on target field before setting selection
    			replaceSelection(e,"[["+txt+"|"+title+"]]"); // insert selected tiddler as a PrettyLink
    		}
    		else
    			story.displayTiddler(null,title); // show selected tiddler
    		return false;
    	},
    	askForText: "Enter the text to display for this link"
    }
    //}}}

    TiddlyWiki provides various ways to format your tiddlers. On this tiddler we'll show you, what can be done along with examples.

    !Header

    {{{
    !Header Level 1
    !!Header Level 2
    !!!Header Level 3
    !!!!Header Level 4
    !!!!!Header Level 5
    }}}

    !Header Level 1
    !!Header Level 2
    !!!Header Level 3
    !!!!Header Level 4
    !!!!!Header Level 5

    !Insert Images

    {{{
    [img[Caption|icon.png]]
    }}}

    [img[Caption|icon.png]]

    !Include of other pages (Tiddlers)

    {{{
    <<tiddler NameOfTiddler>>
    }}}

    !Lists

    {{{
    * first item of the list
    * second item of the list
    ** an item in second list layer
    * last list item
    }}}

    * first Item of the list
    * second Item of the list
    ** an item in second list layer
    * last list item

    !Numbered Lists

    {{{
    #Item 1
    #Item 2
    ##Item 2.1
    ##Item 2.2
    ##Item 2.3
    #Item 3
    ##Item 3.1
    ###Item 3.1.1
    ###Item 3.1.2
    }}}

    #Item 1
    #Item 2
    ##Item 2.1
    ##Item 2.2
    ##Item 2.3
    #Item 3
    ##Item 3.1
    ###Item 3.1.1
    ###Item 3.1.2

    !Quoting

    {{{
    >Level 1, Item 1
    >>Level 2, Item 1
    >>Level 2, Item 2
    >>Level 2, Item 3
    >>>Level 3, Item 1
    >>>Level 3, Item 2
    >>Level 2, Item 4
    >>Level 2, Item 5
    >Level 1, Item 2
    }}}

    >Level 1, Item 1
    >>Level 2, Item 1
    >>Level 2, Item 2
    >>Level 2, Item 3
    >>>Level 3, Item 1
    >>>Level 3, Item 2
    >>Level 2, Item 4
    >>Level 2, Item 5
    >Level 1, Item 2

    !PRE Formatted Text (Code)

    {{{
    {{{ if($a == NULL} { exit; } }}}
    }}}

    {{{ if($a == NULL} { exit; } }}}

    !Font Formating

    {{{
    ''bold''
    ==strike==
    __underlined__
    //italic//
    ^^sup^^
    ~sub~~
    @@highlight@@
    @@color(green):green font@@
    @@bgcolor(#ff0000):color(#ffffff):red background, white font@@
    }}}

    ''bold''
    ==strike==
    __underlined__
    //italic//
    ^^sup^^
    ~sub~~
    @@highlight@@
    @@color(green):green font@@
    @@bgcolor(#ff0000):color(#ffffff):red background, white font@@

    !Comments

    {{{
    /% This is a comment %/
    }}}

    Will not be visible

    !Tables

    Simple table:

    {{{
    |!Column 1|!Column 2|!Column 3|
    |Cell 1/1|Cell 1/2|Cell 1/3|
    |Cell 2/1|Cell 2/2|Cell 2/3|
    }}}

    |!Column 1|!Column 2|!Column 3|
    |Cell 1/1|Cell 1/2|Cell 1/3|
    |Cell 2/1|Cell 2/2|Cell 2/3|

    /***
    |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);
    	}}

    });

    //}}}

    /***
    |''Name:''|HistoryPlugin|
    |''Description:''|Limits to only one tiddler open. Manages an history stack and provides macro to navigate in this history (<<history>><<back>><<forward>>).|
    |''Version:''|1.0.0|
    |''Date:''|2008-03-23|
    |''Source:''|http://tiddlywiki.bidix.info/#HistoryPlugin|
    |''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.3.0|
    ***/
    //{{{
    	Story.prototype.tiddlerHistory = [];
    	Story.prototype.historyCurrentPos = -1;
    	Story.prototype.currentTiddler = null;
    	Story.prototype.maxPos = 11;

    	Story.prototype.old_history_displayTiddler = Story.prototype.displayTiddler;
    	Story.prototype.displayTiddler = function(srcElement,title,template,animate,slowly)
    	{
    		title = ((typeof title === "string") ? title : title.title);
    		//SinglePageMode
    		if (this.currentTiddler) this.closeTiddler(this.currentTiddler);
    		if (template == 2) {
    			//switch to Edit mode : don't manage
    			story.old_history_displayTiddler(null,title,template,animate,slowly);
    			return;
    		}
    		// if same tiddler no change
    		if (this.tiddlerHistory[this.historyCurrentPos] == title) {
    			this.currentTiddler = title;
    			story.old_history_displayTiddler(null,title,template,animate,slowly);
    			return;
    		}
    		if (this.historyCurrentPos == this.tiddlerHistory.length -1) {
    			// bottom of stack
    	    	this.tiddlerHistory.push(title);
    		   	if (this.tiddlerHistory.length > 11) {
    	                 this.tiddlerHistory.shift();
    	       	} else {
    		    this.historyCurrentPos += 1;
    	            }

    		} else {
    			// middle of stack
    		    this.historyCurrentPos += 1;
    			if (this.tiddlerHistory[this.historyCurrentPos] != title) {
    				// path change => cut history
    				this.tiddlerHistory[this.historyCurrentPos] = title;
    				var a = [];
    				for(var i = 0; i <= this.historyCurrentPos;i++) {
    					a[i] = this.tiddlerHistory[i];
    				}
    				this.tiddlerHistory = a;
    			}
    		}
    		this.currentTiddler = title;
    		story.old_history_displayTiddler(null,title,template,animate,true);
    	        scrollTo(0, 1);
    	}

    	Story.prototype.old_history_closeTiddler = Story.prototype.closeTiddler;
    	Story.prototype.closeTiddler = function(title,animate,slowly)
    	{
    		this.currentTiddler = null;
    	    story.old_history_closeTiddler.apply(this,arguments);
    	}

    	config.macros.history = {};
    	config.macros.history.action = function(event) {
    	var popup = Popup.create(this);
    		if(popup)
    			{
    	        if (!story.tiddlerHistory.length)
    	            createTiddlyText(popup,"No history");
    	        else
    	           {
    	           var c = story.tiddlerHistory.length;
    			   for (i=0; i<c;i++ )
    	               {
    					var elmt = createTiddlyElement(popup,"li");
    				   	var btn = createTiddlyButton(elmt,story.tiddlerHistory[i],story.tiddlerHistory[i],config.macros.history.onClick);
    					btn.setAttribute("historyPos",i);
    			       }
    	           }
    	        }
    		Popup.show(popup,false);
    		event.cancelBubble = true;
    		if (event.stopPropagation) event.stopPropagation();
    		return false;
    	}
    	config.macros.history.handler = function(place,macroName,params)
    	{
    		createTiddlyButton(place, 'history', 'history', config.macros.history.action);
    	}

    	config.macros.history.onClick = function(ev)
    	{
    		var e = ev ? ev : window.event;
    		var historyPos = this.getAttribute("historyPos");
    		story.historyCurrentPos = historyPos -1;
    		story.displayTiddler(null,story.tiddlerHistory[historyPos]);
    		return false;
    	};

    	config.macros.back = {};
    	config.macros.back.action = function() {
    	       if (story.historyCurrentPos > 0) {
    				if (story.currentTiddler) story.closeTiddler(story.currentTiddler);
    				story.historyCurrentPos = story.historyCurrentPos -2;
    				story.displayTiddler(null,story.tiddlerHistory[story.historyCurrentPos+1]);
    			} else {
    				//if (story.currentTiddler) story.old_history_displayTiddler(null,story.currentTiddler);
    				};
    		return false;
    	}
    	config.macros.back.handler = function(place,macroName,params)
    	{
    		createTiddlyButton(place, ' < ', 'back', config.macros.back.action,"backButton");
    	}

    	config.macros.forward = {};
    	config.macros.forward.action = function() {
    	       if (story.historyCurrentPos < story.tiddlerHistory.length -1) {
    				if (story.currentTiddler) story.closeTiddler(story.currentTiddler);
    				//story.historyCurrentPos = story.historyCurrentPos;
    				story.displayTiddler(null,story.tiddlerHistory[story.historyCurrentPos+1]);
    			} else {
    				//if (story.currentTiddler) story.old_history_displayTiddler(null,story.currentTiddler);
    			}
    		return false;
    	}
    	config.macros.forward.handler = function(place,macroName,params)
    	{
    		createTiddlyButton(place, ' > ', 'forward', config.macros.forward.action, "ibutton");
    	}
    //}}}

    {{homeTitle{[img[Caption|icon.png]]Tiddlywiki for webOS}}}

    <<tabs txtMainTab "Timeline" "Timeline" TabTimeline "All" "All tiddlers" TabAll "Tags" "All tags" TabTags "More" "More lists" TabMore>>

    //{{{
    /*
     * ListByTag
     */

    Array.prototype.tiddlerList = function(listFormat,max) {
    		var output = "";
    		if (!listFormat)
    			listFormat = "'\\n{{tiddlerListItem{{{tiddlerListItemTitle{[[' + tiddler.title + ']]}}} - ' + tiddler.created.formatString('0DD/0MM/YY') + ' - ' + tiddler.modifier + '\\n{{tiddlerExcerpt{' + text + ' ... \\n}}}}}}'";
    		if (!max)
    			max = this.length;
    		if (this.length > 0 && this[0] instanceof Tiddler) {
    			for (var i=0;i<max;i++) {
    				var tiddler = this[i];
    				var text = "{{{"+wikifyPlain(tiddler.title, store, 100)+"}}}";
    				output += eval(listFormat);
    			}
    		}
    		output += "\n----\n";
    		return output;
    	};

    // tag, sorted, listformat, max(0), noReverse(true)
    config.macros.listByTag = {};
    config.macros.listByTag.handler = function(place,macroName,params,wikifier,paramString,tiddler)
    {
        	params[0]  = (params[0] ? params[0] : tiddler.title);
        	var tiddlers = store.getTaggedTiddlers(params[0],params[1]);
        	if (params[3] == 0) params[3] = null;
        	if (! params[4])
        	    	tiddlers = tiddlers.reverse();
     	wikify(tiddlers.tiddlerList(params[2],params[3]),place,null,tiddler.tiddler);

    	var tiddlerElem = document.getElementById(story.idPrefix + tiddler.title);
    	var e = null;
    	if(tiddlerElem != null) {
    		var children = tiddlerElem.getElementsByTagName("span");
    		for(var t=0; t<children.length; t++) {
    			var c = children[t];
    			if(c.className == 'tiddlerListItem') {
    				c.addEventListener('mousedown', function(event) {
    					var tiddlyLink = event.currentTarget.firstChild.firstChild;
    					var tiddlerTitle = tiddlyLink.getAttribute("tiddlyLink");
    					story.displayTiddler(null, tiddlerTitle);
    					event.preventDefault();
    				}, true);
    			}
    		}
    	}

    };
    //}}}

    /***
    |''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);
    }
    //}}}

    <!--{{{-->
    <link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'/>
    <link rel="shortcut icon" href="data:;base64, " type="image/vnd.microsoft.icon" />
    <link rel="icon" href="data:;base64, " type="image/vnd.microsoft.icon" />
    <link rel="apple-touch-icon" href="data:image/png;base64, "/>
    <meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
    <!--}}}-->

    !Basic
    These Interface Options for customising TiddlyWiki are saved in your browser

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

    UserName: <<option txtUserName>>
    <<option chkAutoSave>> AutoSave
    <<option chkRegExpSearch>> RegExpSearch
    <<option chkCaseSensitiveSearch>> CaseSensitiveSearch
    !Upload
    UploadUserName : <<option txtUploadUserName>>
    UploadPassword : <<option pasUploadPassword>>
    UploadFilename : <<option txtUploadFilename>>
    UploadStoreUrl :<<option txtUploadStoreUrl>>
    UploadDir :<<option txtUploadDir>>
    UploadFilename : <<option txtUploadFilename>>
    UploadBackupDir : <<option txtUploadBackupDir>>
    UploadLog : <<option chkUploadLog>>
    UploadLogMaxLine : <<option txtUploadLogMaxLine>>
    !~UploadTiddler
    UploadTiddler: <<option chkUploadTiddler>>
    UploadTiddlerStoreUrl : <<option txtUploadTiddlerStoreUrl>>

    ----
    see also AdvancedOptions and [[iTWTweaks]]

    <!--{{{-->
    <div id='displayArea'>
    <div id='topMenu' refresh='content' tiddler='TopMenu'></div>
    <div id='messageArea'></div>
    <div id='tiddlerDisplay'></div>
    </div>
    <!--}}}-->

    /***
    |''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"
    	});
    */
    //}}}

    proxy.php?url=

    /*{{{*/
    body {font-size:12px; font-family:arial,helvetica; margin:0; padding:0;	min-height: 418px; width: 100%}
    #messageArea {position:fixed; top:28px; right:0em; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
    #displayArea {margin:0em 0em 0em 0em;}
    #backstageButton {display:none; position:absolute; z-index:175; top:0em; left:0em;}

    #topMenu {
     positon:relative;
     padding-top:0.5em;
     padding-left:0.5em;
     }

    #topMenu br {display:none; }

    #topMenu {
    	background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAArCAIAAAA2QHWOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFJJREFUeNpcjjsOgDAMQy3f/2qMzAwMbOwg6pCPSisGy8+2FAXLunE/TgJGmUvl1jkl78Q2Z/f2ceyYevG6n7wxhLr5y52jjx9G747akYxXgAEA9FZw6HEbDVoAAAAASUVORK5CYII=) #6d84a2 repeat-x;
    	box-sizing: border-box;
    	border-bottom: 1px solid #2d3642;
    	margin: 0;
    	line-height: 20px;
            height: 30px;
    	font-size: 12px;
    	font-weight: bold;
    	padding: 1px 10px 10px 10px;
    	text-align: center;
    	color: #FFFFFF;
    	text-shadow: rgba(0, 0, 0, 0.6) 0px -1px 0;
    	text-overflow: ellipsis;
    	box-sizing: border-box;
    	overflow: hidden;
    	white-space: nowrap;

    }

    .backButton, .ibutton, #topMenu .button, .toolbar .button {
    	top: 6px;
    	-webkit-border-radius: 0;
    	padding: 0 1px 2px 1px;
    	height: 28px;
    	line-height: 28px;
    	font-weight: bold;
    	color: #FFFFFF;
    	text-shadow: rgba(0, 0, 0, 0.6) 0px -1px 0;
    	text-decoration: none;
    	background: #4A6C9B;
    	border-color: #4A6C9B;
    }

     #topMenu .backButton {
    	position: absolute;
    	left: 6px;
    	right: auto;
    	font-size: 20px;
    	-webkit-border-image: url(data:image/png;base64, ) 0 8 0 14;
    	border-width: 0 8px 0 14px;
    }

     #topMenu .backButton .pressed {
    	-webkit-border-image: url(data:image/png;base64, ) 0 8 0 14;
    }
     #topMenu .ibutton{
    	position: absolute;
    	padding : 0px 7px 2px 6px;
    	right: 6px;
    	-webkit-border-image: url(data:image/png;base64, ) 0 5 0 5;
    	border-width: 0 5px 0 5px;
    }

    #topMenu .button {
    	position: relative;
    	// height: 28px;
            padding : 8px 8px 8px 8px;
            // margin-top: 16px;
    	// line-height: 28px;
    	-webkit-border-image: url(data:image/png;base64, ) 0 5 0 5;
    	border-width: 0 5px 0 5px;
    }

    .toolbar .button {
    	position: relative;
    	height: 28px;
            padding : 8px 8px 8px 8px;
            margin-top: 16px;
    	line-height: 28px;
    	-webkit-border-image: url(data:image/png;base64, ) 0 5 0 5;
    	border-width: 0 5px 0 5px;
    }

    #topMenu .txtOptionInput  {
    vertical-align: baseline;
    }

    .popup li a {display:block; padding:1em; font-weight:bold; cursor:pointer;}
    .toolbar {height: 34px;}
    .selected .toolbar a {color:#FFF;}
    .selected .toolbar a:hover {color:#FFF;}

    .tagged { float:left; }
    .tagged li { display:inline; }
    .tagged { background:transparent  !important; border:0  !important; }
    .tagged .button {color: [[ColorPalette::TiertiaryPale]] !important; }
    .tiddler {padding:0em 1em 0em 1em;}

    .tiddlerListItem .tiddlerListItemTitle, .tiddlerListItem  .tiddlerListItemTitle a {
    line-height: 28px;
        font-size: 1.35em;
        color: #000;
        background: #FFF;
        text-decoration: none;
    }

    .tiddlerListItem {
       display: block;
       background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAUCAYAAAB4d5a9AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1woZERcgh0frmgAAALVJREFUeNrt1TEKAjEQheH/qZWNxd7GSmQX8QpewDN5BS8ggoiVt9nCZkufTXaJCxbirIU41YTAfCSZJLLN0DHiC/GjiKRSUhmNTHIAqFKO7dMQKxlneSVpGY7YPgLnbG4VBT2dSYIuPWgR3l22Dz1o/Sn0qoWvQJON55KmYYikGbAF2qI3YGe7ibonLVD0gDpku4YCOkTSCNgMAXSI7TuwT8VDAQDl/4mkIqF15Nul/6f1TjwAO6BGddCkxQkAAAAASUVORK5CYII=) no-repeat right center;
       padding-right: 24px;
       border:0;
       border-top:dashed 1px [[ColorPalette::TertiaryDark]];
    }

    .tiddlerListItem a, .tiddlerListItem code {
        font-family: Arial;
        font-size: 1em;
        color: #333;
        background: #FFF;
        text-decoration: none;
    }

    .homeTitle {
        line-height: 28px;
        font-family: Arial;
        font-size: 2em;
        font-weight: bold;
        color:[[ColorPalette::SecondaryDark]];
        background: #FFF;
        text-decoration: none;
    }

    /*}}}*/
    /*{{{*/
    @media print {
       #topMenu {display: none ! important;}
    }
    /*}}}*/

    <<sync>>

    {{{
    // Create a button for a tag with a popup listing all the tiddlers that it tags
    //# title and tooltip arguments are optional
    createTagButton  = function(place,tag,excludeTiddler,title,tooltip)
    {
    	if (tag == "Menu")
    		var onClick = onClickMenuTag;
    	else
    		var onClick = onClickTag;
    	var btn = createTiddlyButton(place,title||tag,(tooltip||config.views.wikified.tag.tooltip).format([tag]), onClick);
    	btn.setAttribute("tag",tag);
    	if(excludeTiddler)
    		btn.setAttribute("tiddler",excludeTiddler);
    	return btn;
    }

    // Event handler for clicking on a tiddler tag
    function onClickMenuTag(ev)
    {
    	var e = ev || window.event;
    	var popup = Popup.create(this);
    	var tag = this.getAttribute("tag");
    	var title = this.getAttribute("tiddler");
    	if(popup && tag) {
    		var tagged = store.getTaggedTiddlers(tag);
    		var titles = [];
    		var li,r;
    		for(r=0;r<tagged.length;r++) {
    			if(tagged[r].title != title)
    				titles.push(tagged[r].title);
    		}
    		var lingo = config.views.wikified.tag;
    		if(titles.length > 0) {
    			for(r=0; r<titles.length; r++) {
    				//function(place,title,params,label,prompt,accessKey,newFocus,isJournal)
    				if (titles[r] == "<<newTiddler>>")
    					config.macros.newTiddler.createNewTiddlerButton(createTiddlyElement(popup,"li"),"New Tiddler ","","New Tiddler", "create a new tiddler");
    				else
    					createTiddlyLink(createTiddlyElement(popup,"li"),titles[r],true);
    			}

    		} else {
    			createTiddlyText(createTiddlyElement(popup,"li",null,"disabled"),lingo.popupNone.format([tag]));
    		}
    	}
    	Popup.show();
    	e.cancelBubble = true;
    	if(e.stopPropagation) e.stopPropagation();
    	return false;
    }

    }}}

    Test

    /***
    |Name|TextAreaPlugin|
    |Source|http://www.TiddlyTools.com/#TextAreaPlugin|
    |Documentation|http://www.TiddlyTools.com/#TextAreaPluginInfo|
    |Version|2.2.1|
    |Author|Eric Shulman|
    |License|http://www.TiddlyTools.com/#LegalStatements|
    |~CoreVersion|2.1|
    |Type|plugin|
    |Description|Adds Find/Again keyboard search, autosize, and 'stretch bar' resize for textarea controls|
    !!!!!Documentation
    >see [[TextAreaPluginInfo]]
    !!!!!Configuration
    <<<
    <<option chkTextAreaExtensions>> use control-f (find), control-g (find again) inside text area
    <<option chkDisableAutoSelect>> place cursor at start of textarea instead of pre-selecting content
    <<option chkResizeEditor>> modify shadow EditTemplate to add resizeable text area (and autosize command)
    <<<
    !!!!!Revisions
    <<<
    2009.04.08 [2.2.1] added autosizeEditor macro to enable automatic autosizing without using toolbar command
    2009.04.06 [2.2.0] added resizeListbox macro definition and adjusted dragbar width calculation.
    |please see [[TextAreaPluginInfo]] for additional revision details|
    2006.01.22 [1.0.0] Moved from temporary "System Tweaks" tiddler into 'real' TextAreaPlugin tiddler.
    <<<
    !!!!!Code
    ***/
    //{{{
    version.extensions.TextAreaPlugin= {major: 2, minor: 2, revision: 1, date: new Date(2009,4,8)};

    if (config.options.chkTextAreaExtensions===undefined) config.options.chkTextAreaExtensions=true;
    if (config.options.chkDisableAutoSelect===undefined) config.options.chkDisableAutoSelect=true;
    if (config.options.chkResizeEditor===undefined) config.options.chkResizeEditor=true;

    // automatically tweak shadow EditTemplate to add "autosizeEditor" toolbar command
    if (config.options.chkResizeEditor)
    	config.shadowTiddlers.EditTemplate=config.shadowTiddlers.EditTemplate.replace(/deleteTiddler/,"deleteTiddler autosizeEditor");
    // automatically tweak shadow EditTemplate to add "resizeEditor" macro
    if (config.options.chkResizeEditor)
    	config.shadowTiddlers.EditTemplate+="<span macro='resizeEditor'></span>";

    // Put focus in a specified tiddler field
    Story.prototype.TextAreaExtensions_focusTiddler=Story.prototype.focusTiddler;
    Story.prototype.focusTiddler = function(title,field)
    {
    	this.TextAreaExtensions_focusTiddler.apply(this,arguments); // first call core
    	var e = this.getTiddlerField(title,field);
    	if (e && config.options.chkDisableAutoSelect) {
    		if (e.setSelectionRange) // FF
    			e.setSelectionRange(0,0);
    		else if (e.createTextRange) // IE
    			{ var r=e.createTextRange(); r.collapse(true); r.select(); }
    	}
    	if (e && config.options.chkTextAreaExtensions) addKeyDownHandlers(e);
    }
    //}}}

    //{{{
    function addKeyDownHandlers(e)
    {
    	// exit if not textarea or element doesn't allow selections
    	if (e.tagName.toLowerCase()!="textarea"||!e.setSelectionRange||e.initialized) return;

    	// utility function: exits keydown handler and prevents browser from processing the keystroke
    	var processed=function(ev) {
    		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;
    	}
    	// capture keydown in edit field
    	e.saved_onkeydown=e.onkeydown; // save current keydown handler (if any)
    	e.onkeydown=function(ev) { if (!ev) var ev=window.event;
    		var key=ev.keyCode;
    		if (!key) {
    			var char=event.which?event.which:event.charCode;
    			if (char==102) key=70;
    			if (char==103) key=71;
    		}
    		// process CTRL-F (find matching text) or CTRL-G (find next match)
    		if (ev.ctrlKey && (key==70||key==71)) {

    			// prompt for text to find
    			var defFind=e.findText?e.findText:e.value.substring(e.selectionStart,e.selectionEnd);
    			if (key==70||!e.findText||!e.findText.length) // ctrl-f or no saved search text
    				{ var f=prompt("find:", defFind); e.focus(); if (f) e.findText=f; }
    			if (!e.findText||!e.findText.length) return processed(ev); //  if no search text, exit

    			// do case-insensitive match with 'wraparound'...  if not found, alert and exit
    			var newstart=e.value.toLowerCase().indexOf(e.findText.toLowerCase(),e.selectionStart+1);
    			if (newstart==-1) newstart=e.value.toLowerCase().indexOf(e.findText.toLowerCase());
    			if (newstart==-1) { alert("'"+e.findText+"' not found"); e.focus(); return processed(ev); }

    			// set new selection, scroll it into view, and report line position in status bar
    			e.setSelectionRange(newstart,newstart+e.findText.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);
    			window.status="line: "+thisline+"/"+linecount;
    			return processed(ev);
    		}
    		if (e.saved_onkeydown) // call previous keydown handler (if any)
    			e.saved_onkeydown(ev);
    	}
    	e.initialized=true;
    }
    //}}}

    // // 'autosize' toolbar command
    //{{{
    config.commands.autosizeEditor = {
    	text: 'autosize',
    	tooltip: 'automatically adjust the editor height to fit the contents',
    	text_alt: '\u221Aautosize',
    	hideReadOnly: false,
    	handler: function(event,src,title) {
    		var here=story.findContainingTiddler(src); if (!here) return;
    		var ta=here.getElementsByTagName('textarea'); if (!ta) return;
    		for (i=0;i<ta.length;i++) {
    			// only autosize textareas actually used to edit tiddler fields
    			if (ta[i].getAttribute("edit")==undefined) continue;
    			ta[i].button=src;
    			if (!ta[i].maxed)
    				config.commands.autosizeEditor.on(ta[i]);
    			else
    				config.commands.autosizeEditor.off(ta[i],true);
    		}
    		return false;
    	},
    	on: function(e) {
    		if (e.maxed) return; // already autosizing!
    		if (e.savedheight==undefined)
    			e.savedheight=e.style.height;
    		if (e.savedkeyup==undefined) {
    			e.savedkeyup=e.onkeyup;
    			e.onkeyup=function(ev) {
    				if (!ev) var ev=window.event; var e=resolveTarget(ev);
    				e.style.height=e.scrollHeight+'px';
    				if (e.savedkeyup) e.savedkeyup();
    			}
    		}
    		// IE reports error: "not implemented" for onkeypress
    		if (!config.browser.isIE && e.savedkeypress==undefined) {
    			e.savedkeypress=e.onkeypress;
    			e.onkeypress=function(ev) {
    				if (!ev) var ev=window.event; var e=resolveTarget(ev);
    				if (ev.keyCode==33) { // PGUP
    					if (window.scrollByPages) window.scrollByPages(-1);
    					return false;
    				}
    				if (ev.keyCode==34) { // PGDN
    					if (window.scrollByPages) window.scrollByPages(1);
    					return false;
    				}
    				if (e.savedkeypress) e.savedkeypress();
    			}
    		}
    		e.style.height=e.scrollHeight+'px';
    		if (e.button) e.button.innerHTML=config.commands.autosizeEditor.text_alt;
    		e.maxed=true;
    	},
    	off: function(e,resetHeight) {
    		if (resetHeight) e.style.height=e.savedheight;
    		e.onkeyup=e.savedkeyup;
    		// IE reports error: "not implemented" for onkeypress
    		if (!config.browser.isIE) e.onkeypress=e.savedkeypress;
    		if (e.button) e.button.innerHTML=config.commands.autosizeEditor.text;
    		e.maxed=false;
    	}
    };

    config.macros.autosizeEditor={
    	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
    		var here=story.findContainingTiddler(place); if (!here) return;
    		var ta=here.getElementsByTagName('textarea'); if (!ta) return;
    		for (i=0;i<ta.length;i++) {
    			// only autosize textareas actually used to edit tiddler fields
    			if (ta[i].getAttribute("edit")==undefined) continue;
    			config.commands.autosizeEditor.on(ta[i]);
    		}
    		return false;
    	}
    }
    //}}}

    // // grab-and-stretch handle
    //{{{
    config.macros.resizeEditor = { // add stretch bar to editor textarea
    	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
    		var here=story.findContainingTiddler(place); if (!here) return;
    		var ta=here.getElementsByTagName('textarea');
    		if (ta) for (i=0;i<ta.length;i++) {
    			// only resize tiddler editor textareas
    			if (ta[i].getAttribute("edit")==undefined) continue;
    			new window.TextAreaResizer(ta[i]);
    		}
    	}
    }

    config.macros.resizeTiddler = { // add stretch bar to tiddler viewer element
    	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
    		var here=story.findContainingTiddler(place); if (!here) return;
    		var elems=here.getElementsByTagName('div');
    		if (elems) for (i=0;i<elems.length;i++) if (hasClass(elems[i],'viewer')) break;
    		if (i<elems.length) new window.TextAreaResizer(elems[i]);
    	}
    }

    config.macros.resizeFrame = { // add stretch bar to iframes
    	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
    		var here=story.findContainingTiddler(place); if (!here) return;
    		var fr=here.getElementsByTagName('iframe');
    		if (fr) for (i=0;i<fr.length;i++) new window.TextAreaResizer(fr[i]);
    	}
    }

    config.macros.resizeListbox = { // add stretch bar to listbox controls
    	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
    		var here=story.findContainingTiddler(place); if (!here) here=place;
    		var fr=here.getElementsByTagName('select');
    		if (fr) for (i=0;i<fr.length;i++) new window.TextAreaResizer(fr[i]);
    	}
    }

    // TextAreaResizer script by Jason Johnston (jj@lojjic.net)
    // Created August 2003.  Use freely, but give me credit.
    // adds a handle below textareas that the user can drag with the mouse to resize the textarea.
    // MODIFIED by ELS for use with TW

    window.TextAreaResizer = function(elt) {
    	this.element = elt;
    	this.create();
    }
    window.TextAreaResizer.prototype = {
    	create : function() {
    		var elt = this.element;
    		var thisRef = this;
    		var h = this.handle = document.createElement("div");
    		h.style.height = "3px"; // was 4px... looked too fat!
    		h.style.overflow = "hidden"; // ELS: force IE to trim height to < 1em
    		var adjust=elt.nodeName=='textarea'?4:0;  // 4 pixels for textarea border edge
    //		h.style.width=(elt.offsetWidth-adjust)+"px";
    		h.style.width="auto";
    		h.style.backgroundColor = "#999"; // ELS: standard mid-tone (dark) gray
    		h.style.cursor = "s-resize";
    		h.title = "Drag to resize text box";
    		h.onmousedown=function(evt){thisRef.dragStart(evt)};
    		elt.parentNode.insertBefore(h, elt.nextSibling);
    	},
    	dragStart : function(evt) {
    		if (!evt) var evt=window.event;
    		this.dragStop(evt); // ELS: stop any current drag processing first
    		var thisRef = this;
    		this.dragStartY = evt.clientY;
    		this.dragStartH = this.element.offsetHeight;
    		document.savedmousemove=document.onmousemove;
    		document.onmousemove=this.dragMoveHdlr=function(evt){thisRef.dragMove(evt)};
    		document.savedmouseup=document.onmouseup;
    		document.onmouseup=this.dragStopHdlr=function(evt){thisRef.dragStop(evt)};
    	},
    	dragMove : function(evt) {
    		if (!evt) var evt=window.event;
    		// ELS: make sure height is at least 10px
    		var h=this.dragStartH+evt.clientY-this.dragStartY;
    		if (h<10) h=10; this.element.style.height=h+"px";
    		// ELS: match handle to textarea width (which may have changed due to document scrollbars)
    //		var adjust=this.element.nodeName.toLowerCase()=='textarea'?4:0; // 4 pixels for textarea
    //		this.handle.style.width=(this.element.offsetWidth-adjust)+"px";
    		// ELS: when manually resizing, disable autoresizing (without restoring saved height)
    		if (this.element.maxed!=undefined && this.element.maxed)
    			config.commands.autosizeEditor.off(this.element,false);
    	},
    	dragStop : function(evt) {
    		if (!evt) var evt=window.event;
    		document.onmousemove=(document.savedmousemove!=undefined)?document.savedmousemove:null;
    		document.onmousemove=(document.savedmouseup!=undefined)?document.savedmouseup:null;
    	},
    	destroy : function() {
    		var elt = this.element;
    		elt.parentNode.removeChild(this.handle);
    		elt.style.height = "";
    	}
    };
    //}}}

    Contact : [[debilater @ sinkbox . org|mailto:debilater@sinkbox.org]]
    URL : [[daemon.de|http://www.daemon.de/]]
    Donation : [[Donation via Paypal|https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=10505897]]

    TiddlyWiki is a powerful [[wiki|http://en.wikipedia.org/wiki/Wiki]] in a single html file which possesses all the features needed to manage and to outline personal notes in an efficient way.

    No facility is required. You only need to download an empty TiddlyWiki on your desktop to start to use it. It can be stored on USB stick. To send it  just attached it to mail. You can also upload it on web server to publish a whole site.

    TiddlyWiki was created by Jeremy Ruston. TiddlyWiki is distributed under a BSD Open Source License (see the source of this page).

    For details visit [[www.TiddlyWiki.com|http://www.tiddlywiki.com]].

    Current Version: <<version>>

    <<back>>
    <<tag Menu>>
    <<upload>>
    <<forward>>
    <<gotoTiddler>>

    /***
    |''Name:''|UploadPlugin|
    |''Description:''|Save to web a TiddlyWiki|
    |''Version:''|4.1.4|
    |''Date:''|2008-08-11|
    |''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: 4,
    	date: new Date("2008-08-11"),
    	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: "Save and Upload this TiddlyWiki with UploadOptions",
    	promptParamMacro: "Save and Upload this TiddlyWiki in %0",
    	saveLabel: "save to web",
    	saveToDisk: "save to disk",
    	uploadLabel: "Save"
    };

    config.macros.upload.messages = {
    	noStoreUrl: "No store URL in parmeters or options",
    	usernameOrPasswordMissing: "Username or password missing"
    };

    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)) {
    		/* ok for us, we're on localhost
    			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 with options",
    	step1Title: "These options are saved in cookies in your browser",
    	step1Html: "<input type='hidden' name='markList'></input><br>",
    	cancelButton: "Cancel",
    	cancelButtonPrompt: "Cancel prompt",
    	listViewTemplate: {
    		columns: [
    			{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
    			{name: 'Option', field: 'option', title: "Option", type: 'String'},
    			{name: 'Name', field: 'name', title: "Name", type: 'String'}
    			],
    		rowClasses: [
    			{className: 'lowlight', field: 'lowlight'}
    			]}
    };

    //
    // upload functions
    //

    if (!bidix.upload) bidix.upload = {};

    if (!bidix.upload.messages) bidix.upload.messages = {
    	//from saving
    	invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
    	backupSaved: "Backup saved",
    	backupFailed: "Failed to upload backup file",
    	rssSaved: "RSS feed uploaded",
    	rssFailed: "Failed to upload RSS feed file",
    	emptySaved: "Empty template uploaded",
    	emptyFailed: "Failed to upload empty template file",
    	mainSaved: "Main TiddlyWiki file uploaded",
    	mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
    	//specific upload
    	loadOriginalHttpPostError: "Can't get original file",
    	aboutToSaveOnHttpPost: 'About to upload on %0 ...',
    	storePhpNotFound: "The store script '%0' was not found."
    };

    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 ?
    	/* nope
    	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");

    //}}}

    /***
    |''Name:''|UploadTiddlerPlugin|
    |''Description:''|Upload a tiddler and Update a remote TiddlyWiki |
    |''Version:''|1.2.1|
    |''Date:''|2008-08-19|
    |''Source:''|http://tiddlywiki.bidix.info/#UploadTiddlerPlugin|
    |''Usage:''|Uses {{{uploadOptions>>}}}<br>with those UploadTiddler Options : <br>chkUploadTiddler: <<option chkUploadTiddler>><br>txtUploadTiddlerStoreUrl: <<option txtUploadTiddlerStoreUrl>>|
    |''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.3.0|
    ***/
    //{{{
    version.extensions.UploadTiddlerPlugin = {
    	major: 1, minor: 2, revision: 1,
    	date: new Date("2008-08-11"),
    	source: 'http://tiddlywiki.bidix.info/#UploadTiddlerPlugin',
    	author: 'BidiX (BidiX (at) bidix (dot) info',
    	coreVersion: '2.3.0'
    };

    if (!window.bidix) window.bidix = {}; // bidix namespace
    bidix.debugMode = false;
    bidix.uploadTiddler = {
    	messages: {
    		aboutToSaveTiddler: "About to update tiddler '%0'...",
    		storeTiddlerNotFound: "Script store tiddler '%0' not found",
    		tiddlerSaved: "Tiddler '%0' updated in '%1'"
    	},
    	upload: function(title,tiddler,oldTitle) {
    		var callback = function(status,params,responseText,url,xhr) {
    			if (xhr.status == 404) {
    				alert(bidix.uploadTiddler.messages.storeTiddlerNotFound.format([url]));
    				return;
    			}
    			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);
    			else
    				displayMessage(bidix.uploadTiddler.messages.tiddlerSaved.format([params[0], params[1]]));
    				store.setDirty(false);
    			}

    		if ((config.options['chkUploadTiddler']) && (document.location.toString().substr(0,4) == "http")){
    			displayMessage(bidix.uploadTiddler.messages.aboutToSaveTiddler.format([title]));
    			var ExtTiddler = null;
    			var html = null;
    			if (tiddler) {
    				ExtTiddler = store.getSaver().externalizeTiddler(store,tiddler);
    				html = wikifyStatic(tiddler.text,null,tiddler).htmlEncode();
    			}
    			var form = "title="+encodeURIComponent(title);
    			form = form + "&tiddler="+(ExtTiddler?encodeURIComponent(ExtTiddler):'');
    			form = form + "&html="+(html?encodeURIComponent(html):'');
    			var filename = (config.options['txtUploadFilename']?config.options['txtUploadFilename']:'index.html');
    			form = form +"&oldTitle="+encodeURIComponent(oldTitle);
    			form = form +"&fileName="+encodeURIComponent(filename);
    			form = form +"&backupDir="+encodeURIComponent(config.options['txtUploadBackupDir']);
    			form = form +"&user="+encodeURIComponent(config.options['txtUploadUserName']);
    			form = form +"&password="+encodeURIComponent(config.options['pasUploadPassword']);
    			form = form +"&uploadir="+encodeURIComponent(config.options['txtUploadDir']);
    			form = form +"&debug="+encodeURIComponent(0);
    			var storeScript = (config.options.txtUploadTiddlerStoreUrl
    								? config.options.txtUploadTiddlerStoreUrl : 'storeTiddler.php');
    			var r = doHttp("POST",storeScript,form+"\n",'application/x-www-form-urlencoded',
    				config.options['txtUploadUserName'],config.options['pasUploadPassword'],callback,Array(title,filename),null);
    		}
    	}
    }
    TiddlyWiki.prototype.saveTiddler_bidix = TiddlyWiki.prototype.saveTiddler;
    TiddlyWiki.prototype.saveTiddler = function(oldTitle,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created) {
    	var tiddler = TiddlyWiki.prototype.saveTiddler_bidix.apply(this,arguments);
    	var title = (newTitle?newTitle:oldTitle);
    	if (oldTitle == title)
    		oldTitle = '';
    	bidix.uploadTiddler.upload(title, tiddler, oldTitle);
    }
    TiddlyWiki.prototype.removeTiddler_bidix =TiddlyWiki.prototype.removeTiddler;
    TiddlyWiki.prototype.removeTiddler = function(title) {
    	TiddlyWiki.prototype.removeTiddler_bidix.apply(this,arguments);
    	bidix.uploadTiddler.upload(title, null);
    }

    //
    // Initializations
    //

    bidix.initOption = function(name,value) {
    	if (!config.options[name])
    		config.options[name] = value;
    };

    // styleSheet
    setStylesheet('.txtUploadTiddlerStoreUrl {width: 22em;}',"uploadTiddlerPluginStyles");

    //optionsDesc
    merge(config.optionsDesc,{
    	txtUploadTiddlerStoreUrl: "Url of the UploadTiddlerService script (default: storeTiddler.php)",
    	chkUploadTiddler: "Do per Tiddler upload using txtUploadTiddlerStoreUrl (default: false)"
    });

    // Options Initializations
    bidix.initOption('txtUploadTiddlerStoreUrl','');
    bidix.initOption('chkUploadTiddler','');

    // add options in backstage UploadOptions
    if (config.macros.uploadOptions) {
    	if (config.macros.uploadOptions.options) {
    		config.macros.uploadOptions.options.push("txtUploadTiddlerStoreUrl","chkUploadTiddler");
    	}
    }

    //}}}

    <!--{{{-->
    <div class='toolbar' macro='toolbar +editTiddler > closeTiddler permalink references'></div>
    <div macro="hideWhenTaggedAny noTitle">
        <div class='title' macro='view title'></div>
    </div>
    <div macro="hideWhenTaggedAny systemTool systemList">
        <div class='tagged' macro='tags'></div>
    </div>
    <div class='tagClear'></div>
    <div class='viewer' macro='view text wikified'></div>
    <div macro="showWhenTagged [[systemList]]">
    <div class='viewer' macro="listByTag '' modified  ''"></div>
    </div>
    <div class='tagClear'></div>
    <!--}}}-->

    |''Type:''|file|
    |''URL:''|http://itw.bidix.info/iTWRepository/index.html|
    |''Workspace:''|(default)|

    //// iTW specific tweaks :

    //// This settings always overwrite core defaults or previous cookies,
    //// but they can be changed temporarily using [[Options]] or AdvancedOptions
    //// Edit this to fix your default values for this iTW

    //{{{

    // UserName :
    config.options.txtUserName = "YourName";

    // save policy
    config.options.chkAutosave = true;
    config.options.chkSaveBackups = true;
    config.options.txtBackupFolder = "backup";

    // upload policy
    config.options.txtUploadUserName = "";
    config.options.txtUploadPassword = "";
    config.options.txtUploadFilename = "itw.html";
    config.options.txtUploadStoreUrl = "http://localhost/savetiddlywiki.cgi";
    config.options.txtUploadDir = ".";
    config.options.txtUploadBackupDir = "";
    config.options.chkUploadLog = true;
    config.options.txtUploadLogMaxLine = 3;
    config.options. chkUploadTiddler = true;
    config.options.txtUploadTiddlerStoreUrl = "";

    // Always editable
    config.options.chkHttpReadOnly = false;
    readOnly = false;

    // no backstage
    showBackstage = false;
    backstage.init = {};
    //}}}
    ////iTW presentation tweaks
    //{{{
    // some label tweaks
    merge(config.views.wikified.tag,{
     labelNoTags: "",
     labelTags: ""});
    config.macros.search.label = "";
    config.macros.toolbar.moreLabel = "+";

    // some shadow initializations
    merge(config.shadowTiddlers,{
    	SiteTitle: "TiddlyWiki",
    	SiteSubtitle: "a Tiddlywiki for webOS",
    	SiteUrl: "http://www.daemon.de/PalmPreTiddlyWiki",
    	});

    //}}}