Vin-dictation is loading ...

Requires Javascript.
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]];}

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

.tiddlerPopupButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::PrimaryPale]]; border: 1px solid [[ColorPalette::PrimaryLight]];}
.tiddlerPopupButton:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
.tiddlerPopupButton:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]];}
.tiddlerPopupButton.highlight {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.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]];}

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

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

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

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

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

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

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

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

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

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

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

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

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

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

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 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:absolute; top:2em; right:0em; margin:0.5em; padding:0.5em; z-index:200;}
*[id='messageArea'] {position:fixed !important; z-index:200;}
.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;}

table {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer 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; 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:50; 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 use a logographic writing system and 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;}

.htmlarea .toolbarHA table {border:1px solid ButtonFace; margin:0em 0em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar {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='storyDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar closeTiddler closeOthers +editTiddler > fields syncing permalink references jump'></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 +saveTiddler -cancelTiddler deleteTiddler'></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
I'm just a humble lover of red wines.

This site (if you want to call it that) is running from a single file.  It is a wiki called [[tiddlywiki|http://tiddlywiki.com]].  There is no database or fancy server side code.
/***
|Name|AutoOpenTiddlersPlugin|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#AutoOpenTiddlersPlugin|
|Version|0.21|
|Requires|~TW2.x|
!!!Description:
Open a user defined number of recent tiddlers automatically when the TW loads.
You can also specify a tag and only load tiddlers that have that tag.
To change the number of tiddlers automatically opened, or define a tag to use, ed the config.autoOpenTiddlers part of the code below.

!!!To Do
*add an option to exclude tiddlers with a particular tag

!!!Code
***/
//{{{
//edit this section to change the default settings
config.autoOpenTiddlers = 
{
 count: 5, //number of tiddlers opened.
 tag: 'DefaultTiddlers' //change if you want to open tiddlers with a specific tag, eg: 'DefaultTiddlers'
}


config.autoOpenTiddlers.handler = function()
{
 if (this.tag == undefined)
 var newTiddlers = store.getTiddlers("modified");
 else
 var newTiddlers = store.getTaggedTiddlers(this.tag,"modified");
 var newTiddlers = newTiddlers.reverse();
 var max = Math.min(this.count,newTiddlers.length-1);
 for (var i=max; i>=0; i--)
 { story.displayTiddler(null,newTiddlers[i].title);} 
}

window.old_lewcid_autoOpenTiddlers_restart = restart;
restart = function ()
{
 window.old_lewcid_autoOpenTiddlers_restart();
 config.autoOpenTiddlers.handler();
}
//}}}
Bergevin Lane Vineyards is located in Walla Walla, Washington.
The Bergevin Lane family is dedicated to the art of creating and enjoying fine Walla Walla wines. Our winemaking vision is to create elegant styled wines that reflect harmony between fruit and oak. Stylistically, we make wines that reflect the unique Washington terroir attributes, while maintaining integrity to the varietal characteristics. Some of our favorite adjectives for our wines include: food friendly, fruit-driven, balanced… simply put -wines that you can enjoy for any occasion. Memorable moments bind people together; therefore, we raise our glass of wine in thanks to the dream that we share and the journey we now enjoy. We invite you to experience our interpretation of Washington wines.

On the web: [[Bergavin Lane Vineyard|http://www.bergevinlane.com]]
/***
|Name|BetterTimelineMacro|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#BetterTimelineMacro|
|Version|0.5 beta|
|Requires|~TW2.x|
!!!Description:
A replacement for the core timeline macro that offers more features:
*list tiddlers with only specfic tag
*exclude tiddlers with a particular tag
*limit entries to any number of days, for example one week
*specify a start date for the timeline, only tiddlers after that date will be listed.

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

!!!Syntax:
{{{<<timeline better:true>>}}}
''the param better:true enables the advanced features, without it you will get the old timeline behaviour.''

additonal params:
(use only the ones you want)
{{{<<timeline better:true onlyTag:Tag1 excludeTag:Tag2 sortBy:modified/created firstDay:YYYYMMDD maxDays:7 maxEntries:30>>}}}

''explanation of syntax:''
onlyTag: only tiddlers with this tag will be listed. Default is to list all tiddlers.
excludeTag: tiddlers with this tag will not be listed.
sortBy: sort tiddlers by date modified or date created. Possible values are modified or created.
firstDay: useful for starting timeline from a specific date. Example: 20060701 for 1st of July, 2006
maxDays: limits timeline to include only tiddlers from the specified number of days. If you use a value of 7 for example, only tiddlers from the last 7 days will be listed.
maxEntries: limit the total number of entries in the timeline.


!!!History:
*28-07-06: ver 0.5 beta, first release

!!!Code
***/
//{{{
// Return the tiddlers as a sorted array
TiddlyWiki.prototype.getTiddlers = function(field,excludeTag,includeTag)
{
 var results = [];
 this.forEachTiddler(function(title,tiddler)
 {
 if(excludeTag == undefined || tiddler.tags.find(excludeTag) == null)
 if(includeTag == undefined || tiddler.tags.find(includeTag)!=null)
 results.push(tiddler);
 });
 if(field)
 results.sort(function (a,b) {if(a[field] == b[field]) return(0); else return (a[field] < b[field]) ? -1 : +1; });
 return results;
}



//this function by Udo
function getParam(params, name, defaultValue)
{
 if (!params)
 return defaultValue;
 var p = params[0][name];
 return p ? p[0] : defaultValue;
}

window.old_timeline_handler= config.macros.timeline.handler;
config.macros.timeline.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
 var args = paramString.parseParams("list",null,true);
 var betterMode = getParam(args, "better", "false");
 if (betterMode == 'true')
 {
 var sortBy = getParam(args,"sortBy","modified");
 var excludeTag = getParam(args,"excludeTag",undefined);
 var includeTag = getParam(args,"onlyTag",undefined);
 var tiddlers = store.getTiddlers(sortBy,excludeTag,includeTag);
 var firstDayParam = getParam(args,"firstDay",undefined);
 var firstDay = (firstDayParam!=undefined)? firstDayParam: "00010101";
 var lastDay = "";
 var field= sortBy;
 var maxDaysParam = getParam(args,"maxDays",undefined);
 var maxDays = (maxDaysParam!=undefined)? maxDaysParam*24*60*60*1000: (new Date()).getTime() ;
 var maxEntries = getParam(args,"maxEntries",undefined);
 var last = (maxEntries!=undefined) ? tiddlers.length-Math.min(tiddlers.length,parseInt(maxEntries)) : 0;
 for(var t=tiddlers.length-1; t>=last; t--)
 {
 var tiddler = tiddlers[t];
 var theDay = tiddler[field].convertToLocalYYYYMMDDHHMM().substr(0,8);
 if ((theDay>=firstDay)&& (tiddler[field].getTime()> (new Date()).getTime() - maxDays))
 {
 if(theDay != lastDay)
 {
 var theDateList = document.createElement("ul");
 place.appendChild(theDateList);
 createTiddlyElement(theDateList,"li",null,"listTitle",tiddler[field].formatString(this.dateFormat));
 lastDay = theDay;
 }
 var theDateListItem = createTiddlyElement(theDateList,"li",null,"listLink",null);
 theDateListItem.appendChild(createTiddlyLink(place,tiddler.title,true));
 }
 }
 }

 else
 {
 window.old_timeline_handler.apply(this,arguments);
 }
}
//}}}
/***
|''Name:''|BreadCrumbsPlugin|
|''Version:''|2.0.10 (28-Apr-2006)|
|''Author:''|AlanHecht|
|''Adapted By:''|[[Jack]]|
|''Type:''|Plugin|
!Description
This plugin creates an area at the top of the tiddler area that displays "breadcrumbs" of where you've been. This is especially useful for ~TWs using ~SinglePageMode by Eric Schulman.
!Usage
Just install the plugin and tag with systemConfig. Optionally position the following div in your PageTemplate to control the positioning of the breadcrumbs menu:
{{{
<div id='breadCrumbs'></div>
}}}
!Revision History
* Original by AlanHecht
* 2.0 Made 2.0.x compatible by [[Jack]]
* Made 2.0.10 compatible (onstart paramifier)
!Code
***/

// // Use the following line to set the number of breadcrumbs to display before rotating them off the list.
//{{{
version.extensions.breadCrumbs = {major: 2, minor: 0, revision: 10, date: new Date("Apr 28, 2006")};
var crumbsToShow = 7;
var breadCrumbs = [];

var onClickTiddlerLink_orig_breadCrumbs = onClickTiddlerLink;
onClickTiddlerLink = function(e){
 onClickTiddlerLink_orig_breadCrumbs(e);
 breadcrumbsAdd(e);
}

var restart_orig_breadCrumbs = restart;
restart = function() {
 restart_orig_breadCrumbs()
 breadCrumbs = [];
 breadcrumbsRefresh();
}

function breadcrumbsAdd(e) {
 var uniqueCrumb = true;
 var crumbIndex = 0;
 if (!e) var e = window.event;
 var target = resolveTarget(e);
 var thisCrumb="[["+resolveTarget(e).getAttribute("tiddlyLink")+"]]";
 var lastInactiveCrumb = breadCrumbs.length -(breadCrumbs.length < crumbsToShow ? breadCrumbs.length : crumbsToShow);
 for(t=lastInactiveCrumb; t<breadCrumbs.length; t++)
 if(breadCrumbs[t] == thisCrumb) {
 uniqueCrumb = false;
 crumbIndex = t+1;
 }
 if(uniqueCrumb)
 breadCrumbs.push(thisCrumb);
 else
 breadCrumbs = breadCrumbs.slice(0,crumbIndex);
 breadcrumbsRefresh(); 
}

function breadcrumbsRefresh() {
 
 if (!document.getElementById("breadCrumbs")) {
 // Create breadCrumbs div
 var ca = document.createElement("div");
 ca.id = "breadCrumbs";
 ca.style.visibility= "hidden";
 var targetArea = document.getElementById("tiddlerDisplay");
 targetArea.parentNode.insertBefore(ca,targetArea);
 }

 var crumbArea = document.getElementById("breadCrumbs");
 crumbArea.style.visibility = "visible";
 removeChildren(crumbArea);
 createTiddlyButton(crumbArea,"Home",null,restart);
// crumbArea.appendChild(document.createTextNode(" > "));
 
 var crumbLine = "";
 var crumbCount = breadCrumbs.length;
 var firstCrumb = crumbCount -(crumbCount < crumbsToShow ? crumbCount : crumbsToShow);
 for(t=firstCrumb; t<crumbCount; t++) {
 crumbLine += " > ";
 crumbLine += breadCrumbs[t];
 }
 wikify(crumbLine,crumbArea)
}


//}}}
''Year'': 2004
''Variety'': Red table wine
''Vintner'': Hedges Winery
''Region'': Yakima Valley, Washington
''Price'': $x.xx
''Grape(s)'':
* Cabernet Sauvignon
* Merlot
* Syrah
''Brian's Review'': 4.5 out of 5
Nice blended red, with cabernet sauvignon, merlot and syrah grapes. A strong and bold red with a hint of oak. Good match for lamb or a quality cut of beef.
Cabernet Franc is a red wine grape variety similar to and a parent of Cabernet Sauvignon. A cross of it with Sauvignon blanc resulted in Cabernet Sauvignon. It is one of the major grapes of Bordeaux.

Citation: [[Wikipedia|http://en.wikipedia.org/wiki/Cabernet_Franc]]
Cabernet Sauvignon is a variety of red grape mainly used for wine production, and is, along with Chardonnay, one of the most widely-planted of the world's grape varieties.

The principal grape in many Bordeaux wines, Cabernet Sauvignon is grown in most of the world's wine regions, although it requires a long growing season to ripen properly and gives low yields. Many of the red wines regarded as among the world's greatest, such as Red Bordeaux, are predominantly made from Cabernet Sauvignon grapes. World-class examples can improve for decades and remain drinkable for a century.

The particularly thick skin of the Cabernet Sauvignon grape results in wines that can be high in tannin which provides both structure and ageability. This varietal, while frequently aromatic and with an attractive finish, also tends to lack mid-palate richness and so is often blended with lower tannin, but "fleshy" tasting grapes, particularly Merlot and, especially in Australia, Shiraz / Syrah. Cabernet Franc is often used in blends with Cabernet Sauvignon to add aromatics. As a group, Cabernet Sauvignon wines are generally full-flavored, with a stronger flavor than Merlot for instance, and with a smooth and lingering "finish".

Cabernet Sauvignon, like all noble wine grape varieties, is of the species Vitis vinifera, and genetic studies in the 1997 indicated it is the result of a cross between [[Cabernet Franc]] and Sauvignon Blanc.

Citation: [[Wikipedia|http://en.wikipedia.org/wiki/Cabernet_Sauvignon]]
''Year'': 2004
''Variety'': Red wine
''Vintner'': Bergevin Lane Vineyards
''Region'': Walla Walla, Washington
''Price'': $x.xx
''Grape(s)'':
* Cabernet Sauvignon
* Merlot
* Syrah
* Zinfandel
* Cabernet Franc
''Brian's Review'': 5 out of 5
This superb blend is an absolute gem.  By far my favorite blend, it is robust yet playful.  Good.  Period.
Carignane (in American English; Spanish Cariñena, Italian Carignano, French Carignan, Catalan Carinyena) is a Spanish variety of grape that originated in Cariñena, Aragon and was later transplanted to Sardinia, elsewhere in Italy, France, Algeria, and much of the New World.

Carignane is responsible for huge quantities of mediocre or poor wine; nevertheless, when it is grown on a slope, to lower the yield, as is done in Sardinia, or grown on very old, low-yielding vines, as in parts of California, it can produce a wine with good body, color, and character with a characteristic harshness and astringency that diminishes with age. In California, the grape is not often used to make varietal wines, but producers such as Ravenswood, Cline and Mayo Family Winery make notable varietals from old vines.

It is often blended with Cinsaut, Grenache, Syrah, Cabernet Sauvignon, Cabernet Franc, Mourvèdre, Merlot, and/or many other grapes, especially in the Languedoc region of France, where it is very widely planted but now on the decline. It has an upright growth habit and can be grown without a trellis. It was crossed to Cabernet Sauvignon to give Ruby Cabernet.

Citation: [[Wikipedia|http://en.wikipedia.org/wiki/Carignane]]
The Carménère grape is a wine grape variety originally planted in the Médoc region of Bordeaux, France, where it was used to produce deep red wines and occasionally used for blending purposes in the same manner as Petit Verdot.

A member of the Cabernet family of grapes, the name "Carménère" originates from the French word for crimson (carmin) after the hue of the grape in fall. The grape is also known as Grand Vidure, a historic Bordeaux synonym, although current European Union regulations prohibit Chilean imports under this name into the EU. Along with Cabernet sauvignon, Cabernet franc, Merlot, Malbec and Petit verdot, Carménère is considered part of original six noble grapes of Bordeaux, France.

Now rarely found in France, the world's largest area planted with this variety is in Chile in South America, with more than 4,000 Hectares (2006) cultivated in the Central Valley. As such, Chile produces the vast majority of Carménère wines available today and as the Chilean wine industry grows, more experimentation is being carried out on Carménère's potential as a blending grape, especially with Cabernet Sauvignon.

Carménère is also grown in Italy's Eastern Veneto and Friuli-Venezia Giulia regions and in smaller quantities in the California and Walla Walla regions of the United States.

Citation: [[Wikipedia|http://en.wikipedia.org/wiki/Carmenere]]
/***
| Name:|CloseOnCancelPlugin|
| Description:|Closes the tiddler if you click new tiddler then cancel. Default behaviour is to leave it open|
| Version:|6.9.3|
| Date:|30-Sep-2006|
| Source:|http://mptw.tiddlyspot.com/#CloseOnCancelPlugin|
| Author:|Simon Baird <simon.baird@gmail.com>|
| CoreVersion:|2.1.x|
***/
//{{{
merge(config.commands.cancelTiddler,{

 handler_orig_closeUnsaved: config.commands.cancelTiddler.handler,

 handler: function(event,src,title) {
 this.handler_orig_closeUnsaved(event,src,title);
 if (!store.tiddlerExists(title) && !store.isShadowTiddler(title))
 story.closeTiddler(title,true);
 return false;
 }

});

//}}}

//{{{
config.options.chkHttpReadOnly = false; // means web visitors can experiment with your site by clicking edit
config.options.chkInsertTabs = true;    // tab inserts a tab when editing a tiddler
config.views.wikified.defaultText = ""; // don't need message when a tiddler doesn't exist
config.views.editor.defaultText = "";   // don't need message when creating a new tiddler 
//}}}
''Year'': 2004
''Variety'': Red wine
''Vintner'': Vin du Lac of Chelan (Chelan Wine Company)
''Region'': Columbia, Washington
''Price'': $x.xx
''Grape(s)'':
* Merlot (50%)
* Cabernet Sauvignon (30%)
* Syrah (20%)
''Brian's Review'': 4 out of 5
A very mellow blend.  It continues the trend of red wine blends that have a larger part Merlot, resulting in a very smooth and subtle red.  It isn't terribly strong in tannins and a has hint of smokiness.  Very nice sip. 
[[Wines by Vintner]]
/***
|''Name:''|Definition Macro|
|''Version:''|0.1|
|''Source''|http://jackparke.googlepages.com/jtw.html#DefinitionMacro ([[del.icio.us|http://del.icio.us/post?url=http://jackparke.googlepages.com/jtw.html%23DefinitionMacro]])|
|''Author:''|[[Jack]]|
|''Type:''|Macro|
!Description
Allow definitions of glossary terms to be easily visible via mouseover
!Usage
{{{<<def MyTermTiddler>>}}}
!Revision History
* Original by [[Jack]] 24 May 2006

!Code
***/
//{{{
version.extensions.def = {major: 0, minor: 1, revision: 0, date: new Date("May 24, 2006")};

config.macros.def = {};
config.macros.def.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 var text = store.getTiddlerText(params[0]);
 var wrapper = createTiddlyButton(place,params[0],text?"":"No definition available.",onClickTiddlerLink,"definition")
 var e = createTiddlyElement(wrapper,"span",null,null,text)
 wrapper.setAttribute("tiddlyLink", params[0])
}
config.macros.def.editMe = function(e) {
 var title = this.getAttribute("tiddlyLink");
 clearMessage();
 story.displayTiddler(null,title,DEFAULT_VIEW_TEMPLATE);
 story.focusTiddler(title,"text");
}
setStylesheet("a.definition {position:relative; z-index:24;} a.definition:hover {z-index:25;} a.definition span{display:none;} a.definition:hover span{display:block; position:absolute; top:2em; left:2em; width:15em; border:1px solid #ffd; background-color:#ffd; color:#000; text-align: center}");

//}}}
/***
| Name:|''dropTagging''|
| Created by:|SaqImtiaz|
| Location:|http://lewcid.googlepages.com/lewcid.html|
| Version:|0.1 (06-Apr-2006)|
| Requires:|~TW2.07|

!About
*provides a drop down list of tiddlers tagged with the specified tag, a replacement for the core tagging macro.

!Demonstration
*<<dropTagging Saq>>
''I recommend using either TaggerPlugin or monkeyTagger, with dropTags and dropTagging in the toolbar:''


!Usage
{{{<<dropTagging>>}}} for tiddlers tagged by current tiddler/tag
{{{<<dropTagging 'Saq'>>}}} for tiddlers tagged by the tag 'Saq' <<dropTagging 'Saq'>>
{{{<<dropTagging 'Saq' 'custom label'>>}}} for tiddlers tagged by the tag 'Saq' with a custom label. <<dropTagging 'Saq' 'custom label'>>

!Installation:
*Copy this tiddler to your TW with the systemConfig tag
* copy the following to your ViewTemplate:
#either {{{<div class='tagging' macro='dropTagging'></div>}}} to add next to or replace tagging macro, or
#{{{<div class='toolbar' >
<span style="padding-right:1.75em;" macro='dropTagging''></span>
<span macro='toolbar -closeTiddler closeOthers +editTiddler permalink references jump'></span>
</div>}}}(adjust padding to taste)

!To Do
*tweak popup css to optimize placement and colors.
*''optimize code to use core onClickTag function, can cut code size by half!''

!Code
***/
//{{{
config.macros.dropTagging={};
config.macros.dropTagging.dropdownchar = (document.all?"▼":"▾"); // the fat one is the only one that works in IE
config.macros.dropTagging.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
 var arrow=': '+ config.macros.dropTagging.dropdownchar;
 if(params[0] && store.tiddlerExists(params[0]))
 tiddler = store.getTiddler(params[0]);



 var droptagginglabel= (params[1] && params[1] !='.')? params[1]: 'tagging'+arrow;
 var droptaggingtooltip="tiddlers tagged with '"+tiddler.title+"'";
 
 if(params[0] && store.tiddlerExists(params[0]))
 tiddler = store.getTiddler(params[0]);
 var tagged = store.getTaggedTiddlers(tiddler.title);

 if(tagged.length==0)
 return false; 
 
 var droptagging = function(e)
 { if (!e) var e = window.event;
 var popup = Popup.create(this);
 


 for(var t=0; t<tagged.length; t++)
 createTiddlyLink(createTiddlyElement(popup,"li"),tagged[t].title,true);

 Popup.show(popup,false);
 e.cancelBubble = true;
 if (e.stopPropagation)
 e.stopPropagation();
 return(false);
 };
 
var createdropperButton = function(place){
var sp = createTiddlyElement(place,"span",null,"taggingdropbutton");
var theDropDownBtn = createTiddlyButton(sp,droptagginglabel,droptaggingtooltip,droptagging);
 };
createdropperButton(place);
};

setStylesheet(
 ".toolbar .taggingdropbutton {margin-right:0em; border:0px solid #eee; padding:0px; padding-right:0px; padding-left:0px; }\n"+
 ".taggingdropbutton a.button {padding:2px; padding-left:2px; padding-right:2px;}\n"+
// ".taggingdropbutton {font-size:150%;}\n"+
".popup .highlight{background: #fe8; color:#000;}\n"+
 "",
"DropTaggingStyles");

//}}}
/***
|''Name:''|''dropTags''|
|''Version:''|0.5 (12-May-2006)|
|''Created by:''|SaqImtiaz|
|''Location:''|http://lewcid.googlepages.com/lewcid.html#DropTagsMacro|
|''Description:''|provides a drop down list of tags in the current tiddler,<<br>> a replacement for the core tags macro.|
|''Documentation:''|DropTagsMacroDocumentation |
|''Source Code:''|[[DropTagsMacroSource|DropTagsMacroDocumentation]] |
|''Requires:''|~TW2.07|

***/
// /%
config.macros.dropTags={};config.macros.dropTags.dropdownchar=(document.all?"▼":"▾");config.macros.dropTags.handler=function(_1,_2,_3,_4,_5,_6){var _7=config.macros.dropTags.dropdownchar;var _8=(_3[0]&&_3[0]!=".")?_3[0]+_7:"tags"+_7;var _9="current tags for this tiddler";var _a=function(e){if(!e){var e=window.event;}var _d=Popup.create(this);var _e=config.views.wikified.tag;if(_6.tags.length==0){createTiddlyElement(_d,"li",null,"listTitle",_e.labelNoTags);}else{for(var t=0;t<_6.tags.length;t++){createTagButton(createTiddlyElement(_d,"li"),_6.tags[t],_6.title);}}if(version.extensions.IntelliTaggerPlugin){createTiddlyElement(createTiddlyElement(_d,"li"),"hr");abego.IntelliTagger.createEditTagsButton(_6,createTiddlyElement(_d,"li"),"[IntelliEdit]","Edit tags with Intellitagger");}Popup.show(_d,false);e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}return (false);};createTiddlyButton(_1,_8,_8,_a,"button","dropTagBtn");};setStylesheet(".popup .highlight{background: #fe8; color:#000;}\n"+"#nestedtagger {background:#2E5ADF; border: 1px solid #0331BF;}\n"+"","DropTagsStyles");if(!config.macros.tagger){window.onClickTag=function(e){if(!e){var e=window.event;}var _12=resolveTarget(e);var _13=(!isNested(_12));if((Popup.stack.length>1)&&(_13==true)){Popup.removeFrom(1);}else{if(Popup.stack.length>0&&_13==false){Popup.removeFrom(0);}}var _14=(_13==false)?"popup":"nestedtagger";var _15=createTiddlyElement(document.body,"ol",_14,"popup",null);Popup.stack.push({root:this,popup:_15});var tag=this.getAttribute("tag");var _17=this.getAttribute("tiddler");if(_15&&tag){var _18=store.getTaggedTiddlers(tag);var _19=[];var li,r;for(r=0;r<_18.length;r++){if(_18[r].title!=_17){_19.push(_18[r].title);}}var _1b=config.views.wikified.tag;if(_19.length>0){var _1c=createTiddlyButton(createTiddlyElement(_15,"li"),_1b.openAllText.format([tag]),_1b.openAllTooltip,onClickTagOpenAll);_1c.setAttribute("tag",tag);createTiddlyElement(createTiddlyElement(_15,"li"),"hr");for(r=0;r<_19.length;r++){createTiddlyLink(createTiddlyElement(_15,"li"),_19[r],true);}}else{createTiddlyText(createTiddlyElement(_15,"li",null,"disabled"),_1b.popupNone.format([tag]));}createTiddlyElement(createTiddlyElement(_15,"li"),"hr");var h=createTiddlyLink(createTiddlyElement(_15,"li"),tag,false);createTiddlyText(h,_1b.openTag.format([tag]));}Popup.show(_15,false);e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}return (false);};}if(!window.isNested){window.isNested=function(e){while(e!=null){var _1f=document.getElementById("contentWrapper");if(_1f==e){return true;}e=e.parentNode;}return false;};};config.shadowTiddlers.DropTagsMacroDocumentation="The documentation is available [[here.|http://lewcid.googlepages.com/lewcid.html#DropTagsMacroDocumentation]]";config.shadowTiddlers.DropTagsMacroSource="The documentation is available [[here.|http://lewcid.googlepages.com/lewcid.html#DropTagsMacroDocumentation]]";
// %/
// // Excludes any tiddlers from timeline that have been tagged with ''excludeTimeline''
/*{{{*/
config.macros.timeline.handler = function(place,macroName,params)
{
 var field = params[0] ? params[0] : "modified";
 var tiddlers = store.reverseLookup("tags","excludeTimeline",false,field);
 var lastDay = "";
 var last = params[1] ? tiddlers.length-Math.min(tiddlers.length,parseInt(params[1])) : 0;
 for(var t=tiddlers.length-1; t>=last; t--)
 {
 var tiddler = tiddlers[t];
 var theDay = tiddler[field].convertToLocalYYYYMMDDHHMM().substr(0,8);
 if(theDay != lastDay)
 {
 var theDateList = document.createElement("ul");
 place.appendChild(theDateList);
 createTiddlyElement(theDateList,"li",null,"listTitle",tiddler[field].formatString(this.dateFormat));
 lastDay = theDay;
 }
 var theDateListItem = createTiddlyElement(theDateList,"li",null,"listLink");
 theDateListItem.appendChild(createTiddlyLink(place,tiddler.title,true));
 }
}
/*}}}*/
/***
| Name:|ExtentTagButtonPlugin|
| Description:|Adds a New tiddler button in the tag drop down|
| Version:|3.0 ($Rev: 1845 $)|
| Date:|$Date: 2007-03-16 15:19:22 +1000 (Fri, 16 Mar 2007) $|
| Source:|http://mptw.tiddlyspot.com/#ExtendTagButtonPlugin|
| Author:|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{

// can't hijack a click handler. must redefine this entirely.
// would be good to refactor in the core...
// this version copied from 2.1.3 core

// Event handler for clicking on a tiddler tag
function onClickTag(e)
{
	if (!e) var e = window.event;
	var theTarget = resolveTarget(e);
	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;

		wikify("<<newTiddler label:'New tiddler' tag:"+tag+">>",createTiddlyElement(popup,"li")); // <---- the only modification

		if(titles.length > 0)
			{
			var openAll = createTiddlyButton(createTiddlyElement(popup,"li"),lingo.openAllText.format([tag]),lingo.openAllTooltip,onClickTagOpenAll);
			openAll.setAttribute("tag",tag);
			createTiddlyElement(createTiddlyElement(popup,"li",null,"listBreak"),"div");
			for(r=0; r<titles.length; r++)
				{
				createTiddlyLink(createTiddlyElement(popup,"li"),titles[r],true);
				}
			}
		else
			createTiddlyText(createTiddlyElement(popup,"li",null,"disabled"),lingo.popupNone.format([tag]));
		createTiddlyElement(createTiddlyElement(popup,"li",null,"listBreak"),"div");
		var h = createTiddlyLink(createTiddlyElement(popup,"li"),tag,false);
		createTiddlyText(h,lingo.openTag.format([tag]));
		}
	Popup.show(popup,false);
	e.cancelBubble = true;
	if (e.stopPropagation) e.stopPropagation();
	return(false);
}

//}}}

''Year'': 2005
''Variety'': Red table wine
''Vintner'': Tamarack Cellars
''Region'': Columbia Valley, Washington
''Price'': $x.xx
''Grape(s)'':
* Cabernet Sauvignon (51%)
* Syrah (30%)
* Merlot (24%)
* Cabernet Franc (11%)
* Sangiovese (2%)
* Carmenere (1%)
* Malbec (1%)
''Brian's Review'': 4 out of 5
This blend is complex.  It has the most varietals of any blend I've tasted.  It is very bold, had a stronger tanin finish that most of the table reds.  Not for light fare.
/***
|''Name:''|ForEachTiddlerPlugin|
|''Version:''|1.0.5 (2006-02-05)|
|''Source:''|http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license]]|
|''Macros:''|[[ForEachTiddlerMacro]] v1.0.5|
|''TiddlyWiki:''|1.2.38+, 2.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
!Description

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

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

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

!Revision history
* v1.0.5
** Pass tiddler containing the macro with wikify, context object also holds reference to tiddler containing the macro ("inTiddler"). Thanks to SimonBaird.
** Support Firefox 1.5.0.1
** Internal
*** Make "JSLint" conform
*** "Only install once"
* v1.0.4 (2006-01-06)
** Support TiddlyWiki 2.0
* v1.0.3 (2005-12-22)
** Features: 
*** Write output to a file supports multi-byte environments (Thanks to Bram Chen) 
*** Provide API to access the forEachTiddler functionality directly through JavaScript (see getTiddlers and performMacro)
** Enhancements:
*** Improved error messages on InternetExplorer.
* v1.0.2 (2005-12-10)
** Features: 
*** context object also holds reference to store (TiddlyWiki)
** Fixed Bugs: 
*** ForEachTiddler 1.0.1 has broken support on win32 Opera 8.51 (Thanks to BrunoSabin for reporting)
* v1.0.1 (2005-12-08)
** Features: 
*** Access tiddlers stored in separated TiddlyWikis through the "in" option. I.e. you are no longer limited to only work on the "current TiddlyWiki".
*** Write output to an external file using the "toFile" option of the "write" action. With this option you may write your customized tiddler exports.
*** Use the "script" section to define "helper" JavaScript functions etc. to be used in the various JavaScript expressions (whereClause, sortClause, action arguments,...).
*** Access and store context information for the current forEachTiddler invocation (through the build-in "context" object) .
*** Improved script evaluation (for where/sort clause and write scripts).
* v1.0.0 (2005-11-20)
** initial version

!Code
***/
//{{{

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

 // Perform the action.
 var func = config.macros.forEachTiddler.getEvalTiddlerFunction(textExpression, context);
 var count = tiddlers.length;
 var text = "";
 for (var i = 0; i < count; i++) {
 var tiddler = tiddlers[i];
 text += func(tiddler, context, count, i);
 }
 
 if (filename) {
 if (lineSeparator !== undefined) {
 lineSeparator = lineSeparator.replace(/\\n/mg, "\n").replace(/\\r/mg, "\r");
 text = text.replace(/\n/mg,lineSeparator);
 }
 saveFile(filename, convertUnicodeToUTF8(text));
 } else {
 var wrapper = createTiddlyElement(place, "span");
 wikify(text, wrapper, null/* highlightRegExp */, context.inTiddler);
 }
};


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

// Internal.
//
config.macros.forEachTiddler.createContext = function(placeParam, whereClauseParam, sortClauseParam, sortAscendingParam, actionNameParam, actionParameterParam, scriptText, tiddlyWikiPathParam, inTiddlerParam) {
 return {
 place : placeParam, 
 whereClause : whereClauseParam, 
 sortClause : sortClauseParam, 
 sortAscending : sortAscendingParam, 
 script : scriptText,
 actionName : actionNameParam, 
 actionParameter : actionParameterParam,
 tiddlyWikiPath : tiddlyWikiPathParam,
 inTiddler : inTiddlerParam
 };
};

// Internal.
//
// Returns a TiddlyWiki with the tiddlers loaded from the TiddlyWiki of 
// the given path.
//
config.macros.forEachTiddler.loadTiddlyWiki = function(path, idPrefix) {
 if (!idPrefix) {
 idPrefix = "store";
 }
 var lenPrefix = idPrefix.length;
 
 // Read the content of the given file
 var content = loadFile(this.getLocalPath(path));
 if(content === null) {
 throw "TiddlyWiki '"+path+"' not found.";
 }
 
 // Locate the storeArea div's
 var posOpeningDiv = content.indexOf(startSaveArea);
 var posClosingDiv = content.lastIndexOf(endSaveArea);
 if((posOpeningDiv == -1) || (posClosingDiv == -1)) {
 throw "File '"+path+"' is not a TiddlyWiki.";
 }
 var storageText = content.substr(posOpeningDiv + startSaveArea.length, posClosingDiv);
 
 // Create a "div" element that contains the storage text
 var myStorageDiv = document.createElement("div");
 myStorageDiv.innerHTML = storageText;
 myStorageDiv.normalize();
 
 // Create all tiddlers in a new TiddlyWiki
 // (following code is modified copy of TiddlyWiki.prototype.loadFromDiv)
 var tiddlyWiki = new TiddlyWiki();
 var store = myStorageDiv.childNodes;
 for(var t = 0; t < store.length; t++) {
 var e = store[t];
 var title = null;
 if(e.getAttribute)
 title = e.getAttribute("tiddler");
 if(!title && e.id && e.id.substr(0,lenPrefix) == idPrefix)
 title = e.id.substr(lenPrefix);
 if(title && title !== "") {
 var tiddler = tiddlyWiki.createTiddler(title);
 tiddler.loadFromDiv(e,title);
 }
 }
 tiddlyWiki.dirty = false;

 return tiddlyWiki;
};


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

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

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

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

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

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

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

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


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

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


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

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

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

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

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

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


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



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


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

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

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

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


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


} // of "install only once"

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


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

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

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

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

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

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

Grenache (pronounced //gren-ash//) is probably the most widely planted variety of red wine grape in the world. It ripens late, so needs hot, dry conditions such as those found in Spain and in the south of France.  It is generally spicy, berry-flavoured and soft on the palate with a relatively high alcohol content, but it needs careful control of yields for best results. It tends to lack acid, tannin and colour, and is usually blended with other varieties such as Syrah, Carignan and Cinsaut.

Grenache is the dominant variety in most Southern Rhône wines, especially in Châteauneuf-du-Pape where it is typically over 80% of the blend. In Australia it is typically blended in "GSM" blends with Syrah and Mourvèdre.

Grenache is also used to make rosé wines in France and Spain, notably those of the Tavel district in the Côtes du Rhône. And the high sugar levels of Grenache have led to extensive use in fortified wines, including the red vins doux naturels of Roussillon such as Banyuls, and as the basis of most Australian 'port'.

Citation: [[Wikipedia|http://en.wikipedia.org/wiki/Grenache]]
Grey Wolf Cellars is located on highway 46 West, 2.5 miles off of highway 101 in beautiful Paso Robles, California.  Family owned and operated, the winery facility and tasting room lie on approximately 12 acres of land overlooking rolling hills, pastures, and oak studded meadows, formerly known as Green Valley.

The Barton family preserved and converted a 60 year-old farmhouse into the Grey Wolf tasting room, open daily from 11:00 - 5:30.  Grey Wolf specializes in red wine varietals including the Barton Family Reserve Zinfandel,  Alpha Cabernet and Meritage.

Halfway between San Francisco and Los Angeles, Paso Robles is a the perfect destination for anyone looking for a quick getaway.  Here, a day of wine touring  begins with a scenic drive along uncrowded rural country roads.   Visitors discover small family-owned wineries, chat with the winemaker, enjoy a picnic on winery grounds, and sample finely-crafted, award-winning wines.  You'll soon discover why Paso Robles wine region is attracting so much admiring attention. 

On the web: [[Grey Wolf Cellars|http://www.greywolfcellars.com]]
It was 1986 when Washington native Tom Hedges found his first employment in the wine industry marketing American wines in Taiwan. From that humble beginning, Hedges Cellars, then a "virtual" winery, found its first customer: the government of Sweden. Tom and his wife Anne-Marie marketed their Cabernet/Merlot blend to foreign buyers exclusively for two years before going domestic and opening up North American distribution. Still without their own winery, they took a chance buying acreage on an obscure little hill called Red Mountain.

The Hedges have concentrated their efforts on Cabernet Sauvignon and Merlot, and the concept of terroir since their first vintage in 1987. With Anne-Marie Hedges' roots and childhood in the Champagne region of France, it was only natural that a French-style chateau would be built on the slopes of Red Mountain amongst their vines.

Brother Pete Hedges joined the winery as General Manager, becoming head Winemaker in 2002. Son Christophe and his wife Maggie began working for the winery soon thereafter and Hedges Cellars became Hedges Family Estate.

On the web: [[Hedges Family Estate|http://www.hedgescellars.com]]
/***
| Name:|HideWhenPlugin|
| Description:|Allows conditional inclusion/exclusion in templates|
| Version:|6.1.2|
| Date:|20-Oct-2006|
| Source:|http://mptw.tiddlyspot.com/#HideWhenPlugin|
| Author:|Simon Baird <simon.baird@gmail.com>|
For use in ViewTemplate and EditTemplate. Eg
{{{<div macro="showWhenTagged Task">[[TaskToolbar]]</div>}}}
{{{<div macro="showWhen tiddler.modifier == 'BartSimpson'"><img src="bart.gif"/></div>}}}
***/
//{{{

window.removeElementWhen = function(test,place) {
 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);
 }},

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

});

//}}}

Silvan Ridge/Hinman Vineyards was established in 1979 and is maintained in the tradition of a small European winery. Located just fifteen minutes from Eugene, our beautifully landscaped property provides the perfect backdrop for an afternoon picnic, or an evening under the stars.  

Our newly remodeled facilities are beautifully decorated, creating a formal, yet relaxing atmosphere. From our intimate dining room to our ever-popular banquet and tasting rooms, every aspect of our facility is decorated in a European vintage style. 

We welcome daily visitors to stop in and sample our award-winning varietals. Relax near our cozy fireplace, immerse yourself in the elegant beauty of our tasting room, or enjoy a picnic on our patio for a lazy afternoon. At Silvan Ridge/Hinman Vineyards, you are always welcome.  

On the web: [[Hinman Vineyards|http://www.hinmanvineyards.com/]]
/***
|Name|JumpMacro|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#JumpMacro|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Macro version of the core jump command, that also provides an optional 'jump to top' button.

!Demo:
click the 'j' button in the hoverMenu on the right.

!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.

!Usage
{{{<<jump>>}}}<<jump>>
{{{<<jump customlabel customtooltip top>>}}} <<jump customlabel customtooltip top>>
Note: passing the third parameter as top, enables the 'top' button in the dropdown.

!History:
27-07-06, ver1.0

!Code
***/

//{{{
config.macros.jump= {};
config.macros.jump.handler = function (place,macroName,params,wikifier,paramString,tiddler)
{
 var label = (params[0] && params[0]!=".")? params[0]: 'jump';
 var tooltip = (params[1] && params[1]!=".")? params[1]: 'jump to an open tiddler';
 var top = (params[2] && params[2]=='top') ? true: false; 

 var btn =createTiddlyButton(place,label,tooltip,this.onclick);
 if (top==true)
 btn.setAttribute("top","true")
}

config.macros.jump.onclick = function(e)
{
 if (!e) var e = window.event;
 var theTarget = resolveTarget(e);
 var top = theTarget.getAttribute("top");
 var popup = Popup.create(this);
 if(popup)
 {
 if(top=="true")
 {createTiddlyButton(createTiddlyElement(popup,"li"),'Top ?','Top of TW',config.macros.jump.top);
 createTiddlyElement(popup,"hr");}
 
 story.forEachTiddler(function(title,element) {
 createTiddlyLink(createTiddlyElement(popup,"li"),title,true);
 });
 }
 Popup.show(popup,false);
 e.cancelBubble = true;
 if (e.stopPropagation) e.stopPropagation();
 return false;
}

config.macros.jump.top = function()
{
 window.scrollTo(0,0);
}
//}}}
/***
|Name|JumpToTopMacro|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#JumpToTopMacro|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Provides a toolbar command and a macro, that create a button for quickly jumping to the top of your TW.
Handy to place in the tiddler toolbar (edit the ViewTemplate)

Note: You can add an extra toolbar to the bottom of tiddlers as well with buttons of your choice, to allow easy access to the buttons/commands in it.

!Demo:
{{{<<top>>}}}<<top>>

!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.

!History:
*23-07-06: ver 1.0

!Code
***/
//{{{
config.macros.top={};
config.macros.top.handler=function(place,macroName)
{
 createTiddlyButton(place,"^","jump to top",this.onclick);
}
config.macros.top.onclick=function()
{
 window.scrollTo(0,0);
};

config.commands.top =
{
 text:" ^ ",
 tooltip:"jump to top"
};

config.commands.top.handler = function(event,src,title)
{
 window.scrollTo(0,0);
}
//}}}
function OnKeyPress(event)
{
if ((event==null) && (!window.event)) { return; }
if ((event!=null) && (window.event)) { return; }
if(!event)var event = window.event;

var KeyCode = event.keyCode ? event.keyCode : event.which;


if ((KeyCode == 83 || KeyCode == 115) && event.ctrlKey && !event.shiftKey)
{
saveChanges();
killEvent(event);
}

else if ((KeyCode == 117 || KeyCode == 85) && event.ctrlKey && !event.shiftKey)
{
config.macros.top.onclick();
killEvent(event);
}

else if ((KeyCode == 110 || KeyCode == 78) && event.ctrlKey && !event.shiftKey)
{
config.macros.newTiddler.onClick();
killEvent(event);
}

else if ((KeyCode == 122 || KeyCode == 90) && event.ctrlKey && !event.shiftKey)
{
config.macros.toggleSideBar.onToggleSideBar();
return false;
killEvent(event);
}


else if ((KeyCode == 114 || KeyCode == 82) && event.ctrlKey && !event.shiftKey)
{
config.macros.saveAndReload.onclick();
return false;
killEvent(event);
}

else if (KeyCode == 121|| KeyCode == 40)
{
config.commands.fullscreen.handler();
return false;
killEvent(event);
}


}

function killEvent(event){
try{
 event.keyCode = 0;
}
catch(e)
{
}
if(window.event){
 event.returnValue = false;
 event.cancelBubble = true; 
}
if(event.preventDefault)
{
 event.preventDefault();
}
if(event.stopPropagation)
{
 event.stopPropagation();
}
}

document.onkeypress = function(event){OnKeyPress(event);};
document.onkeydown = function(){OnKeyPress()};
Latitude 46 N falls just south of the town of Walla Walla Washington and runs through the great viticultural regions of our state. Blending wine from great sites, coupled with meticulous winemaking create wines of added complexity and nuance. We produce wine in the purest expression of Washington State winegrowing

We are located in Touchet, Washington in the beautiful Walla Walla Valley minutes from highway 12.

On the web: [[Latitude 46N|http://www.latitude46.com]]
All LINDEMANS® wines contain the spirit and passion of its founder, Dr Henry J Lindeman, whose single minded philosophy was that  “the one purpose of wine is to bring happiness...”.

LINDEMANS® Winemaking Team of nine is spread across Victoria and South Australia. Wayne Falkenberg and his team at the LINDEMANS® Karadoc Winery produce wines for the Cawarra, Bin Series and Premier Selection labels, whilst the team based in the Coonawarra produce the Reserve and Coonawarra Trio wines.

On the web: [[Lindemans Wine|http://www.lindemans.com]]
[[Wines by Vintner]] [[Wines by Varietal]] [[Wines by Year]] [[Wines by Region]] [[About]]
Malbec is a black, mellow grape variety originally grown in France, in the Loire Valley and Cahors. Long known as one of the six grapes used in the blending of red Bordeaux wine, it is increasingly celebrated as an Argentine varietal wine. It is also grown in the cooler regions of California. It has an extensive listing of synonyms, currently more than two hundred.

Citation: [[Wikipedia|http://en.wikipedia.org/wiki/Malbec]]
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'/>
<!--}}}-->

<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b><i>Vin</i>-dictation</b> is loading<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>
Mourvèdre, is a variety of red wine grape grown around the world. In Portugal and the New World it is known as Mataro, whilst in some parts of France it is known as Estrangle-Chien ("dog strangler").

It produces tannic wines that can be high in alcohol, and is most successful in Rhone-style blends. It has a particular affinity for Grenache, softening it and giving it structure. Its taste varies greatly according to area, but often has a wild, gamey or earthy flavour, with soft fruit flavours of blackberry.

Citation: [[Wikipedia|http://en.wikipedia.org/wiki/Mataro_%28grape%29]]
/***

|Name|MenuEditPlugin|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#MenuEditPlugin|
|Version|0.2|
|Requires|~TW2.x|
!Description:
Adds 'doubleclick to edit source' to the MainMenu, SideBarOptions, and SideBarTabs

!History
*20-07-06: version 0.2: hijacked restart, no need to put a macro in the mainMenu anymore.
*28-04-06: version 0.1: working.

!Code
***/
//{{{

window.restart_lewcid_menuedit = restart;
window.restart = function () {
 window.restart_lewcid_menuedit();
var menus = new Array("topMenu","sidebarOptions","sidebarTabs","contentFooter","mainMenu");
for(var t=0; t<menus.length; t++){
 if (document.getElementById(menus[t]))
 {var menu = document.getElementById(menus[t]);
 menu.ondblclick = window.onMenuDblClick;}}
}



window.onMenuDblClick = function(e){
if (!e) var e = window.event;
story.displayTiddler(null,this.getAttribute("tiddler"),2,false,null)
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
return false;
}
//}}}
''Year'': 2003
''Variety'': Red wine
''Vintner'': Grey Wolf Cellars
''Region'': Paso Robles, California
''Price'': $x.xx
''Grape(s)'':
* Cabernet Sauvignon (50%)
* Petit Verdot (30%)
* Merlot (20%)
''Brian's Review'': 3.5 out of 5
An interesting and decent blend.  Drinkable, but no barn burner.
Merlot is a red wine grape that is used as both a blending grape and for varietal wines. Merlot-based wines usually have medium body with hints of berry, plum, and currant. Its softness and "fleshiness", combined with its earlier ripening, makes Merlot an ideal grape to blend with the sterner, later-ripening Cabernet Sauvignon. This flexibility has helped to make it one of the most popular red wine varietals in the United States and Chile.

Citation: [[Wikipedia|http://en.wikipedia.org/wiki/Merlot]]
/***
| Name:|''monkeyTagger''|
| Created by:|SaqImtiaz|
| Location:|http://lewcid.googlepages.com/lewcid.html|
| Version:|0.9 (08-Apr-2006)|
| Requires:|~TW2.07|

!About:
*an adaptation of TagAdderMacro for monkeyGTD and tagglytagging user, but could be useful to just about anyone!
*{{{<<monkeyTagger Project>>}}} gives a drop down list of all tags, tagged with Project.
*The list allows toggling of tags on the current tiddler.
*logging options for task management.

!Demo:
<<monkeyTagger Status>>

!Installation:
*Copy this tiddler to your TW with the systemConfig tag
*either copy the following to your ViewTemplate:
{{{<div class='tagged' macro='monkeyTagger tagToTrack'></div>}}}
or
*better yet, define your own toolbar class and add as many as you need to create a nice toolbar.
Eg:
{{{<div class='toolbar' >
<span style="padding-right:0.15em;" macro='monkeyTagger Project'></span>
<span style="padding-right:0.15em;" macro='monkeyTagger Status'></span>
<span macro='toolbar -closeTiddler closeOthers +editTiddler permalink references jump'></span>
</div>}}}
 (adjust padding to taste)

!Usage:

''Syntax:''
|>|{{{<<monkeyTagger source:"sourcetag" label:"customlabel" logging:"true/false" anchor:"anchortext" arrow:"true/false">>}}}|
|label:|quoted text to use as a customlabel|
|arrow:|add arrow to custom label, values are "true" or "false"|
|anchor:|quoted text to specify where to add logging text|
|logging:|enable logging of tags added (for task management), values are "true" or "false"|

the only parameter you ''have'' to pass is the source. When passing only one parameter, you can write either something like:
{{{<<monkeyTagger "Project">>}}} or {{{<<monkeyTagger source:"Project">>}}} for <<monkeyTagger Project>>
All other parameters are optional, and can be written in any order.

''Defaults:''
|label:|default label if not specified = source tag + arrow|
|arrow:|true |
|logging:|false |
|anchor:|none used by default, logging text added to end of tiddler |

''Examples:''
|custom label| {{{<<monkeyTagger source:"Project" label:"customlabel">>}}} |<<monkeyTagger source:"Project" label:"customlabel">>|
|custom label without arrow| {{{<<monkeyTagger source:"Project" label:"customlabel" arrow:"false">>}}} |<<monkeyTagger source:"Project" label:"customlabel" arrow:"false">>|
|logging enabled| {{{<<monkeyTagger source:"Project" logging:"true"}}} |<<monkeyTagger source:"Project" logging:"true">>|
|logging enabled with anchor text|{{{<<monkeyTagger source:"Project" logging:"true" anchor:"anchortext"}}} |<<monkeyTagger source:"Project" logging:"true" anchor:"anchortext">>|

''Tips:''
*Make sure your anchor text doesn't occur more than once in every tiddler, as the first instance will be used.
*I recommend using something like {{{/%StatusLog%/}}} as an invisible anchor.
*Use a tag based template, and add monkeyTagger macro's with logging enabled to the toolbar in just your taskmanagement templates.

!To Do:
*add sorting options if requested.
*''add exclude tag feature''!

!History
*Version 0.9: 
**changed to named parameters to make it more user friendly
**added option to disable/enable dropdown arrow in custom labels
**added logging option with anchor text.

!CODE
***/
//{{{

config.macros.monkeyTagger= {};
//config.macros.monkeyTagger.dropdownchar = (document.all?"?":"?"); // the fat one is the only one that works in IE
config.macros.monkeyTagger.dropdownchar = "?"; // uncomment previous line and comment this for smaller version in FF
config.macros.monkeyTagger.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
 var nAV = paramString.parseParams('test', null, true);

 if ((nAV[0].arrow)&&(nAV[0].arrow[0])=='false')
 var arrow=': ';
 else
 var arrow=': '+ config.macros.monkeyTagger.dropdownchar;

 if((nAV[0].source)&&(nAV[0].source[0])!='.')
 {var tagToTrack = nAV[0].source[0]}
 else if(params[0]&&(params[0]!='.'))
 {var tagToTrack = params[0]}
 else
 {return false;};
 var monkeylabel = ((nAV[0].label)&&(nAV[0].label[0])!='.')?nAV[0].label[0]+arrow: tagToTrack+arrow;
 var logmode = ((nAV[0].logging)&&(nAV[0].logging[0])!='.')?nAV[0].logging[0]: "false";
 if ((nAV[0].anchor)&&(nAV[0].anchor[0])!='.')
 var anchor = nAV[0].anchor[0];
 var monkeytooltip=tagToTrack + ' :';


 if(tiddler instanceof Tiddler)
 {var title = tiddler.title;
 
 var addcomment = function(tiddler,newTag){
 var now = new Date();
 var timeFormat= 'DD/0MM/YY 0hh:0mm';
 var formattednow= now.formatString(timeFormat);
 var txt="\n*''"+tagToTrack+"'' set as ''"+newTag+"'' on "+formattednow;
 if (anchor && anchor!='.')
 {var pos=tiddler.text.indexOf(anchor);
 if (pos!=-1) {pos=pos + anchor.length}
 else if (pos==-1) {pos=tiddler.text.length}}
 else if (!anchor){var pos = tiddler.text.length;};

 tiddler.set(null,tiddler.text.substr(0,pos)+txt+tiddler.text.substr(pos));
 story.refreshTiddler(tiddler.title,null,true);
 return false;
}

 var ontagclick = function(e) {
 if (!e) var e = window.event;
 var tag = this.getAttribute("tag");
 var t=store.getTiddler(title);
 if (!t || !t.tags) return;
 if (t.tags.find(tag)==null)
 {t.tags.push(tag)
 if (logmode=="true"){addcomment(t,tag);}}
 else
 {t.tags.splice(t.tags.find(tag),1)};
 story.saveTiddler(title);
 story.refreshTiddler(title,null,true);
 return false;
 };
 var onclick = function(e) {
 if (!e) var e = window.event;
 var popup = Popup.create(this);
 var thistiddler=store.getTiddler(title);

 var taggedarray = new Array();
 var tagslabel = new Array();

 var taggedtiddlers = store.getTaggedTiddlers(tagToTrack);
 for (var t=0; t<taggedtiddlers.length; t++){
 var taggedtitle= ((taggedtiddlers[t]).title);
 taggedarray.push(taggedtitle);}

 for (var t=0; t<taggedarray.length; t++){
 var temptag = taggedarray[t];
 if (thistiddler.tags.find(temptag)==null)
 {var temptag='[ ] '+ temptag;
 tagslabel.push(temptag);}
 else
 {var temptag ='[x] '+ temptag;
 tagslabel.push(temptag);}
 }

 if(tagslabel.length == 0)
 createTiddlyText(createTiddlyElement(popup,"li"),('no '+tagToTrack));
 for (var t=0; t<tagslabel.length; t++)
 {
 var theTag = createTiddlyButton(createTiddlyElement(popup,"li"),tagslabel[t],("toggle '"+ ([taggedarray[t]]))+"'",ontagclick);
 theTag.setAttribute("tag",taggedarray[t]);
 }
 Popup.show(popup,false);
 e.cancelBubble = true;
 if (e.stopPropagation) e.stopPropagation();
 return(false);
};
 //createTiddlyButton(place,monkeylabel,monkeylabel,onclick);

var createdropperButton = function(place){
var sp = createTiddlyElement(place,"span",null,"monkeytaggerbutton");
var theDropDownBtn = createTiddlyButton(sp,monkeylabel,monkeytooltip,onclick);
};

createdropperButton(place);
 }
};
setStylesheet(
 ".toolbar .monkeytaggerbutton {margin-right:0em; border:0px solid #fff; padding:0px; padding-right:0px; padding-left:0px;}\n"+
 ".monkeytaggerbutton a.button {padding:2px; padding-left:2px; padding-right:2px;}\n"+
// ".monkeytaggerbutton {font-size:130%;}\n"+
//".monkeytaggerbutton .button {color:#703;}\n"+
 "",
"MonkeyTaggerStyles");

//}}}
/***

|Name|NavigationMacro|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#NavigationMacro|
|Version|0.3 |
|Requires|~TW2.08+|
!Description:
*Creates Next and Prev buttons on tiddlers, to cycle through tiddlers in order.
**you can create next and previous buttons to navigate through your journals, or the tiddlers of a tutorial.
*You can exclude certain tiddlers, or navigate through tiddlers with a specific tag only.
*The tiddlers can be sorted by modified or created.
*Custom ordering will be available after the release of TW 2.1
*Needs to be added to the ViewTemplate
*Buttons are updated dynamically and are hidden if there is no next or previous tiddler.

!Usage
{{{<<navigation>>}}}
or for more options:
{{{<<navigation sort exclude tag labelPrevious labelNext >>}}}
where sort is ''created'' (default) or ''modified''
exlcude is the tag to exclude.
tag is the tag to navigate through.
labelPrevious is the label for the previous button.
labelNext is the label for the next button. 

I recommend adding it to the ViewTemplate in the viewer div:
{{{<div class='viewer'>
<span macro='view text wikified'></span>
<span macro='navigation "" "" plugin'></span></div>}}}



!Example:
The next and previous buttons at the bottom of this tiddler will cycle through all of my extensions for TW.
!History
* 25-06-06 : version 0.3, first release

!Code
***/
//{{{
window.refreshNavLink = function (e) {
 var title = e.getAttribute("here");
 var sort = e.getAttribute("sort");
 var exclude = e.getAttribute("exclude");
 if (e.getAttribute("tag")!=undefined) var tag = e.getAttribute("tag");
 var navtype = e.getAttribute("navtype");
 if (tag) {var tiddlers = store.getTaggedTiddlers(tag,sort);}
 else {var tiddlers = store.getTiddlers(sort,exclude);}
 for (var g=0; g<tiddlers.length; g++)
 {if (title==tiddlers[g].title)
 {if(navtype=="next" && !tiddlers[g+1]) 
 e.className += " navNonExisting"
 else if (navtype=="prev" && !tiddlers[g-1])
 e.className += " navNonExisting"
 else e.className = "button";}
 }
}


config.refreshers.navLink = function(e,changeList){ 
 refreshNavLink(e);
} 



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

 var sort = (params[0] && params[0]!=".")? params[0]: "created";
 var exclude =(params[1] && params[1]!=".")? params[1]: undefined;
 if (params[2])
 {var tag= params[2];
 if(tiddler.tags.contains(tag)==false)
 return false;
 }
 var labelPrev = params[3] ? params[3] : "Previous";
 var labelNext = params[4] ? params[4] : "Next";

 var next = function(e){
 if (!e) var e=window.event;
 var theTarget = resolveTarget(e);
 var navtype = theTarget.getAttribute("navtype");
 if (tag) {var tiddlers = store.getTaggedTiddlers(tag,sort);}
 else {var tiddlers = store.getTiddlers(sort,exclude);}
 for (var g=0; g<tiddlers.length; g++)
 {if (tiddler.title==tiddlers[g].title)
 {if (navtype == "next")
 story.displayTiddler(theTarget,tiddlers[g+1].title)
 else if (navtype == "prev")
 story.displayTiddler(theTarget,tiddlers[g-1].title)}
 }
 }

 var createNavBtn = function(text,theId,mode){
 var nextBtn = createTiddlyButton(place,text,text,next,null,theId);
 nextBtn.setAttribute("refresh","navLink");
 nextBtn.setAttribute("here",tiddler.title);
 nextBtn.setAttribute("sort",sort);
 nextBtn.setAttribute("exclude",exclude);
 nextBtn.setAttribute("navtype",mode);
 if (tag) nextBtn.setAttribute("tag",tag);
 refreshNavLink(nextBtn);
 }
 createNavBtn(labelNext+" ►","NavNext","next");
 createNavBtn("◄ "+labelPrev,"NavPrevious","prev");

}

setStylesheet(
"#NavNext {float:right;}\n"+
"#NavPrevious {float:left;}\n"+
".navNonExisting {display:none;}\n"+
 "",
"NavMacroStyles");
//}}}
/***
| Name:|NewHerePlugin|
| Description:|Creates the new here and new journal toolbar commands|
| Version:|6.1.6|
| Date:|06-Oct-2006|
| Source:|http://mptw.tiddlyspot.com/#NewHerePlugin|
| Author:|Simon Baird <simon.baird@gmail.com>|
| CoreVersion:|2.1.x|
To use edit your ViewTemplate and add newHere to the toolbar div, eg
{{{<div class='toolbar' macro='toolbar ... newHere'></div>}}}
Note: would be good if we could do this instead some day
{{{<<newTiddler tag:{{tiddler.title}} label:'new here'>>}}}
***/
//{{{
merge(config.commands,{

 newHere: {
 text: 'new here',
 tooltip: 'Create a new tiddler tagged as this tiddler',
 hideReadOnly: true,
 handler: function(e,src,title) {
 if (!readOnly) {
 clearMessage();
 var t=document.getElementById('tiddler'+title);
 story.displayTiddler(t,config.macros.newTiddler.title,DEFAULT_EDIT_TEMPLATE);
 story.setTiddlerTag(config.macros.newTiddler.title, title, 0);
 story.focusTiddler(config.macros.newTiddler.title,"title"); // doesn't work??
 return false;
 }
 }
 },

 newJournalHere: {
 //text: 'new journal here', // too long
 text: 'new journal',
 hideReadOnly: true,
 dataFormat: 'DD MMM YYYY', // adjust to your preference
 //dataFormat: 'YYYY-0MM-0DD', 
 tooltip: 'Create a new journal tiddler tagged as this tiddler',
 handler: function(e,src,title) {
 if (!readOnly) {
 clearMessage();
 var now = new Date();
 var t=document.getElementById('tiddler'+title);
 var newtitle = now.formatString(this.dataFormat)
 story.displayTiddler(t,newtitle,DEFAULT_EDIT_TEMPLATE);
 story.setTiddlerTag(newtitle, title, 0);
 story.focusTiddler(newtitle,"title");
 return false;
 }
 }
 }

});
//}}}
/***
|Name|OpenTiddlersMacro|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#openTiddlersMacro|
|Version|0.2 |
|Requires|~TW2.08+|
!Description:
*Allows creation of tiddlyLinks that open multiple tiddlers.
*Also useful for creating links to shadowTiddlers, which if normally created are not in bold.

!Usage
{{{<<openTiddlers text:"TextForLink" tiddlers:"Tiddler1 Tiddler2 [[Tiddler with spaces]] Tiddler4">>}}}

!Example:
{{{<<openTiddlers text:"This link opens multiple tiddlers" tiddlers:"Project Saq">>}}}
<<openTiddlers text:"This link opens multiple tiddlers" tiddlers:"Project Saq">>

!History
*30-04-06, version 0.2, modifed and rename following feedback from Eric.
*29-04-06, version 0.1, working.

!To Do:
*option to close other tiddlers
*option to open in edit template

!Code
***/
//{{{
window.onClickMultiLink= function(e){
 story.displayTiddlers(this,this.getAttribute("tiddlerstring").readBracketedList());
 return(false);
}

config.macros.openTiddlers={};
config.macros.openTiddlers.handler = function(place,macroName,params,wikifier,paramString,tiddler){
 var nAV = paramString.parseParams('test', null, true);
 var text = nAV[0].text[0];
 var tiddlerstring = nAV[0].tiddlers[0];
 var btn= createTiddlyButton(place,text,null,onClickMultiLink,"tiddlyLinkExisting");
 btn.setAttribute("tiddlerstring",tiddlerstring);
}
//}}}
/***
|Name|OpenTopPlugin|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#OpenTopPlugin|
|Version|0.1|
|Requires|~TW2.x|
!!!Description:
Open new tiddlers at the top of the screen.

!!!Code
***/
//{{{
Story.prototype.coreLewcidDisplayTiddler=Story.prototype.displayTiddler ;
Story.prototype.displayTiddler =
function(srcElement,title,template,unused1,unused2,animate,slowly)
{
 var srcElement=null;
 if (document.getElementById(this.idPrefix + title))
 {story.closeTiddler(title);}
 this.coreLewcidDisplayTiddler(srcElement,title,template,unused1,unused2,animate,slowly);
 window.scrollTo(0,0);
}
//}}}
<!--{{{-->
<div class='header'>
 <div class='gradient' macro='gradient vert #660000 #C24747'>
 <div class='titleLine' >
 <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
 <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
 </div>
<div id='topMenu' refresh='content' tiddler='MainMenu'></div>
 </div>
</div>
<div id='bodywrapper'>
<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 id='contentFooter'>Copyright (c) 2007 - Brian Gant</div>
</div>

<!--}}}-->
Petit verdot is a variety of black grape used in the production of red wine, principally in classic Bordeaux blends.

The fact that it ripens much later than most of the other varieties of grape means that it cannot successfully be grown in many of the French regions, and is only found in any quantity in the Médoc region of Bordeaux. Petit Verdot's main use is to add aroma, colour, acid and tannin to many of the regions' great red wines by adding quantities of up to 10%.

Today it is grown in larger quantities in Australia which had plantings of 1600 ha in the year 2000, compared to France which only had 400 ha in 2000. California had 360 ha in 2003 and Chile had 137 ha in 2003. It is also grown in Colorado, Texas, Washington, Virginia,New Zealand, and British Columbia, again being used as a seasoning in cabernet blends. In Australia it is being used increasingly to make varietal wines.

When young its aromas have been likened to banana and pencil shavings. Strong tones of violet and leather develop as it matures. It has good mid palate character which Cabernet Sauvignon lacks, hence Petit verdot's use in many Cabernet Sauvignon blends.

Citation: [[Wikipedia|http://en.wikipedia.org/wiki/Petit_Verdot]]
Durif (or Duriff) is a minor variety of red wine grape grown in France, California and Australia. It is one of three grapes known as Petite Sirah in the USA, and is also confused with its parent Peloursin there. It produces tannic wines with a spicy, plummy flavour.

Citation: [[Wikipedia|http://en.wikipedia.org/wiki/Petite_sirah]]
/***
|''Name:''|~PopupMacro|
|''Version:''|1.0.0 (2006-05-09)|
|''Source:''|http://lewcid.googlepages.com/lewcid.html#PopupMacro|
|''Author:''|Saq Imtiaz|
|''Description:''|Create popups with custom content|
|''Documentation:''|[[PopupMacro Documentation|PopupMacroDocs]]|
|''~Requires:''|TW Version 2.0.8 or better|
***/
// /%
{{{
config.macros.popup = {};
config.macros.popup.arrow = (document.all?"▼":"▾");
config.macros.popup.handler = function(place,macroName,params,wikifier,paramString,theTiddler) {

 if (!params[0] || !params[1]) 
 {createTiddlyError(place,'missing macro parameters','missing label or content parameter');
 return false;};
 
 var label = params[0];
 var source = (params[1]).replace(/\$\)\)/g,">>"); 
 var nestedId = params[2]? params[2]: 'nestedpopup'; 

 var onclick = function(event) {
 if(!event){var event = window.event;}
 var theTarget = resolveTarget(event);
 var nested = (!isNested(theTarget));
 
 if ((Popup.stack.length > 1)&&(nested==true)) {Popup.removeFrom(1);}
 else if(Popup.stack.length > 0 && nested==false) {Popup.removeFrom(0);};
 
 var theId = (nested==false)? "popup" : nestedId; 
 var popup = createTiddlyElement(document.body,"ol",theId,"popup",null);
 Popup.stack.push({root: button, popup: popup});

 wikify(source,popup);
 Popup.show(popup,true);
 event.cancelBubble = true;
 if (event.stopPropagation) event.stopPropagation();
 return false;
 }
 var button = createTiddlyButton(place, label+this.arrow,label, onclick, null);
};

window.isNested = function(e) {
 while (e != null) {
 var contentWrapper = document.getElementById("contentWrapper");
 if (contentWrapper == e) return true;
 e = e.parentNode;
 }
 return false;
};

setStylesheet(
".popup, .popup a, .popup a:visited {color: #fff;}\n"+
".popup a:hover {background: #014; color: #fff; border: none;}\n"+
".popup li , .popup ul, .popup ol {list-style:none !important; margin-left:0.3em !important; margin-right:0.3em; font-size:100%; padding-top:0.5px !important; padding:0px !important;}\n"+
"#nestedpopup {background:#2E5ADF; border: 1px solid #0331BF; margin-left:1em; }\n"+
"",
"CustomPopupStyles");

config.shadowTiddlers.PopupMacroDocs="The documentation is available [[here.|http://lewcid.googlepages.com/lewcid.html#PopupMacroDocs]]";
}}}
//%/
''Year:'' 2000
''Variety'': Red wine
''Vintner'': [[Lindemans Wine|http://www.lindemans.com/]]
''Region'': Coonawara, Australia
''Price'': $x.xx
''Grape(s)'':
* Cabernet Sauvignon (50%)
* Merlot (31%)
* Cabernet Franc (19%)
''Brian's Review:'' 3.5 out of 5
Very nice and smooth blend of Cabernet Sauvignon, Merlot and Cabernet Franc. The Cab Franc and Merlot temper the strength of the Cab Sauv, making it light on the palate with a smooth finish.
/***
| Name:|QuickOpenTagPlugin|
| Description:|Changes tag links to make it easier to open tags as tiddlers|
| Version:|6.1.1|
| Date:|01-Oct-2006|
| Source:|http://mptw.tiddlyspot.com/#QuickOpenTagPlugin|
| Author:|Simon Baird <simon.baird@gmail.com>|
| CoreVersion:|2.1.x|
***/
//{{{
config.quickOpenTag = {

 dropdownChar: (document.all ? "\u25bc" : "\u25be"), // the little one doesn't work in IE

 createTagButton: function(place,tag,excludeTiddler) {
 // little hack so we can to <<tag PrettyTagName|RealTagName>>
 var splitTag = tag.split("|");
 var pretty = tag;
 if (splitTag.length == 2) {
 tag = splitTag[1];
 pretty = splitTag[0];
 }
 
 var sp = createTiddlyElement(place,"span",null,"quickopentag");
 createTiddlyText(createTiddlyLink(sp,tag,false),pretty);
 
 var theTag = createTiddlyButton(sp,config.quickOpenTag.dropdownChar,
 config.views.wikified.tag.tooltip.format([tag]),onClickTag);
 theTag.setAttribute("tag",tag);
 if (excludeTiddler)
 theTag.setAttribute("tiddler",excludeTiddler);
 return(theTag);
 },

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

 allTagsHandler: function(place,macroName,params) {
 var tags = store.getTags();
 var theDateList = createTiddlyElement(place,"ul");
 if(tags.length == 0)
 createTiddlyElement(theDateList,"li",null,"listTitle",this.noTags);
 for (var t=0; t<tags.length; t++) {
 var theListItem = createTiddlyElement(theDateList,"li");
 var theLink = createTiddlyLink(theListItem,tags[t][0],true);
 var theCount = " (" + tags[t][1] + ")";
 theLink.appendChild(document.createTextNode(theCount));
 var theDropDownBtn = createTiddlyButton(theListItem," " +
 config.quickOpenTag.dropdownChar,this.tooltip.format([tags[t][0]]),onClickTag);
 theDropDownBtn.setAttribute("tag",tags[t][0]);
 }
 },

 // todo fix these up a bit
 styles: 
"/*{{{*/\n"+
"/* created by QuickOpenTagPlugin */\n"+
".tagglyTagged .quickopentag, .tagged .quickopentag \n"+
" { margin-right:1.2em; border:1px solid #eee; padding:2px; padding-right:0px; padding-left:1px; }\n"+
".quickopentag .tiddlyLink { padding:2px; padding-left:3px; }\n"+
".quickopentag a.button { padding:1px; padding-left:2px; padding-right:2px;}\n"+
"/* extra specificity to make it work right */\n"+
"#displayArea .viewer .quickopentag a.button, \n"+
"#displayArea .viewer .quickopentag a.tiddyLink, \n"+
"#mainMenu .quickopentag a.tiddyLink, \n"+
"#mainMenu .quickopentag a.tiddyLink \n"+
" { border:0px solid black; }\n"+
"#displayArea .viewer .quickopentag a.button, \n"+
"#mainMenu .quickopentag a.button \n"+
" { margin-left:0px; padding-left:2px; }\n"+
"#displayArea .viewer .quickopentag a.tiddlyLink, \n"+
"#mainMenu .quickopentag a.tiddlyLink \n"+
" { margin-right:0px; padding-right:0px; padding-left:0px; margin-left:0px; }\n"+
"a.miniTag {font-size:150%;} \n"+
"#mainMenu .quickopentag a.button \n"+
" /* looks better in right justified main menus */\n"+
" { margin-left:0px; padding-left:2px; margin-right:0px; padding-right:0px; }\n" + 
"#topMenu .quickopentag { padding:0px; margin:0px; border:0px; }\n" +
"#topMenu .quickopentag .tiddlyLink { padding-right:1px; margin-right:0px; }\n" +
"#topMenu .quickopentag .button { padding-left:1px; margin-left:0px; border:0px; }\n" +
"/*}}}*/\n"+
 "",

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

}

config.quickOpenTag.init();

//}}}
''Year'': 2003
''Variety'': Red table wine
''Vintner'': [[Hedges Winery|http://www.hedgescellars.com/ourwines/cms.php]]
''Region'': Yakima Valley, Washington
''Price'': $x.xx
''Grape(s)'':
* Cabernet Sauvignon (40%)
* Merlot (56%)
* Cabernet Franc (3%)
* Syrah (1%)
''Brian's Review'': 4 out of 5
Another nice Hedges blend. This wine is more Merlot than Cab Sauv, which lends to a bolder first taste, to a bit more sour finish. Still overall good, but the CMS is still the better.
/***
| Name:|RenameTagsPlugin|
| Description:|Allows you to easily rename or delete tags across multiple tiddlers|
| Version:|6.1.18|
| Date:|18-Oct-2006|
| Source:|http://mptw.tiddlyspot.com/#RenameTagsPlugin|
| Author:|Simon Baird <simon.baird@gmail.com>|
| CoreVersion:|2.1.x|
Rename a tag and you will be prompted to rename it in all its tagged tiddlers.
***/
//{{{
config.renameTags = {

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

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

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

	storeMethods: {

		saveTiddler_orig_renameTags: TiddlyWiki.prototype.saveTiddler,

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

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

		removeTiddler_orig_renameTags: TiddlyWiki.prototype.removeTiddler,

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

	},

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

config.renameTags.init();

//}}}

The history of Ridge Vineyards begins in 1885, when Osea Perrone, a doctor who became a prominent member of San Francisco's Italian community, bought 180 acres near the top of Monte Bello Ridge. He terraced the slopes and planted vineyards; using native limestone, he constructed the Monte Bello Winery, producing the first vintage under that name in 1892. This unique cellar, built into the mountainside on three levels, is Ridge's production facility. At 2600', it is surrounded by the "upper vineyard." In the 1940s, William Short, a theologian, bought the abandoned winery and vineyard just below the Perrone property; he replanted several parcels to cabernet sauvignon in the late 1940s. From these vines—now the "middle vineyard"—new owners Dave Bennion and his three partners, all Stanford Research Institute engineers, made a quarter-barrel of "estate" cabernet. That Monte Bello Cabernet was among California's finest wines of the era. Its quality and distinctive character, and the wines produced from these same vines in 1960 and '61, convinced the partners to re-bond the winery in time for the 1962 vintage. The first zinfandel was made in 1964, from a small nineteenth-century vineyard farther down the ridge. This was followed in 1966 by the first Geyserville zinfandel. The founding families reclaimed the Monte Bello terraces, increasing vineyard size from fifteen to forty-five acres. Working on weekends, they made wines of regional character and unprecedented intensity. By 1968, production had increased to just under three thousand cases per year, and in 1969, Paul Draper joined the partnership. A Stanford graduate in philosophy—recently returned from setting up a winery in Chile's coast range—he was a practical winemaker, not an enologist. His knowledge of fine wines and traditional methods complemented the straightforward "hands off" approach pioneered at Ridge. Under his guidance the old Perrone winery (acquired the previous year) was restored, the finest vineyard lands leased or purchased, the consistent quality and international reputation of the wines established. Cabernet and zinfandel account for most of the production; syrah, grenache, carignane, and petite sirah constitute a small percentage. Known primarily for its red wines, Ridge has also made limited amounts of chardonnay since 1962.

On the web: [[Ridge Vineyards|http://www.ridgewine.com]]
''Year'': 2003
''Variety'': Red wine
''Vintner'': Hinman Vineyards
''Region'': Eugene, Oregon
''Price'': $x.xx
''Grape(s)'':
* Merlot
* Cabernet Sauvignon
* Syrah
* Malbec
* Grenache
* Cabernet Franc
''Brian's Review'': 4 out of 5
This red blend is a mellow combination of flavors.  hints of fruit supplant the bold of the Merlot and Cav Sauv.
Sangiovese is a red wine grape variety originating in Italy. It is most famous as the main component of the Chianti blend in Tuscany, but winemakers outside Italy are starting to experiment with it. Young sangiovese has fresh fruity flavours of strawberry and a little spiciness, but it readily takes on oaky, even tarry, flavours when aged in barrels.

The name derives from sanguis Jovis, "the blood of Jove" - it is also known as Sangiovese grosso, Brunello, Morellino, Prugnolo, Prugnolo gentile, San Gioveto, Sangioveto, Tignolo, Uva brunella, Uva Canina, Uvetta.

Citation: [[Wikipedia|http://en.wikipedia.org/wiki/Sangiovese]]
/***
|Name|SaveAndReloadMacro|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#SaveAndReloadMacro|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Provides a button to save and reload TW. Useful if you are testing code and dont have AutoSave enabled.

!Demo:
{{{<<saveAndReload>>}}}<<saveAndReload>>

!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.

!History:
*24-07-06: ver 1.0

!Code
***/
//{{{
config.macros.saveAndReload={};
config.macros.saveAndReload.handler= function(place,macroName,params,wikifier,paramString,tiddler)
{
 var label = params[0]||"Save & Reload";
 var tooltip = params[1]||"Save & reload";
 createTiddlyButton(place,label,tooltip,this.onclick);
}
config.macros.saveAndReload.onclick= function()
{
 saveChanges();
 window.location.reload( false );
}
//}}}
/***
| Name|SaveCloseTiddlerPlugin|
| Description|Provides two extra toolbar commands, saveCloseTiddler and cancelCloseTiddler|
| Version|3.0 ($Rev: 1845 $)|
| Date|$Date: 2007-03-16 15:19:22 +1000 (Fri, 16 Mar 2007) $|
| Source|http://mptw.tiddlyspot.com/#SaveCloseTiddlerPlugin|
| Author|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
To use these you must add them to the tool bar in your EditTemplate
***/
//{{{
merge(config.commands,{

	saveCloseTiddler: {
		text: 'done/close',
		tooltip: 'Undo changes to this tiddler and close it',
		handler: function(e,src,title) {
			config.commands.saveTiddler.handler(e,src,title);
			config.commands.closeTiddler.handler(e,src,title);
			return false;
		}
	},

	cancelCloseTiddler: {
		text: 'cancel/close',
		tooltip: 'Save changes to this tiddler and close it',
		handler: function(e,src,title) {
			config.commands.cancelTiddler.handler(e,src,title);
			config.commands.closeTiddler.handler(e,src,title);
			return false;
		}
	}

});

//}}}

<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal 'DD MMM YYYY'>><<saveChanges>><<tiddler TspotSidebar>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>
/***
This CSS by DaveBirss.
***/
/*{{{*/


.tabSelected {
 background: #fff;
}

.tabUnselected {
 background: #eee;
}

#sidebar {
 color: #000;
 background: transparent; 
}

#sidebarOptions {
 background: #fff;
}

#sidebarOptions input {
 border: 1px solid #ccc;
}

#sidebarOptions input:hover, #sidebarOptions input:active, #sidebarOptions input:focus {
 border: 1px solid #000;
}

#sidebarOptions .button {
 color: #999;
}

#sidebarOptions .button:hover {
 color: #000;
 background: #fff;
 border-color:white;
}

#sidebarOptions .button:active {
 color: #000;
 background: #fff;
}

#sidebarOptions .sliderPanel {
 background: transparent;
}

#sidebarOptions .sliderPanel A {
 color: #999;
}

#sidebarOptions .sliderPanel A:hover {
 color: #000;
 background: #fff;
}

#sidebarOptions .sliderPanel A:active {
 color: #000;
 background: #fff;
}

.sidebarSubHeading {
 color: #000;
}

#sidebarTabs {`
 background: #fff
}

#sidebarTabs .tabSelected {
 color: #000;
 background: #fff;
 border-top: solid 1px #ccc;
 border-left: solid 1px #ccc;
 border-right: solid 1px #ccc;
 border-bottom: none;
}

#sidebarTabs .tabUnselected {
 color: #999;
 background: #eee;
 border-top: solid 1px #ccc;
 border-left: solid 1px #ccc;
 border-right: solid 1px #ccc;
 border-bottom: none;
}

#sidebarTabs .tabContents {
 background: #fff;
}


#sidebarTabs .txtMoreTab .tabSelected {
 background: #fff;
}

#sidebarTabs .txtMoreTab .tabUnselected {
 background: #eee;
}

#sidebarTabs .txtMoreTab .tabContents {
 background: #fff;
}

#sidebarTabs .tabContents .tiddlyLink {
 color: #999;
 border:none;
}

#sidebarTabs .tabContents .tiddlyLink:hover {
 background: #fff;
 color: #000;
 border:none;
}

#sidebarTabs .tabContents {
 color: #000;
}

#sidebarTabs .button {
 color: #666;
}

#sidebarTabs .tabContents .button:hover {
 color: #000;
 background: #fff;
}

#sidebar {color:#999;}
/*}}}*/
/***
|''Name:''|SinglePageModePlugin|
|''Source:''|http://www.TiddlyTools.com/#SinglePageModePlugin|
|''Author:''|Eric Shulman - ELS Design Studios|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|''~CoreVersion:''|2.0.10|

Normally, as you click on the links in TiddlyWiki, more and more tiddlers are displayed on the page. The order of this tiddler display depends upon when and where you have clicked. Some people like this non-linear method of reading the document, while others have reported that when many tiddlers have been opened, it can get somewhat confusing.

!!!!!Usage
<<<
SinglePageMode allows you to configure TiddlyWiki to navigate more like a traditional multipage web site with only one item displayed at a time. When SinglePageMode is enabled, the title of the current tiddler is automatically displayed in the browser window's titlebar and the browser's location URL is updated with a 'permalink' for the current tiddler so that it is easier to create a browser 'bookmark' for the current tiddler.

Even when SinglePageMode is disabled (i.e., displaying multiple tiddlers is permitted), you can reduce the potential for confusion by enable TopOfPageMode, which forces tiddlers to always open at the top of the page instead of being displayed following the tiddler containing the link that was clicked.
<<<
!!!!!Configuration
<<<
When installed, this plugin automatically adds checkboxes in the AdvancedOptions tiddler so you can enable/disable the plugin behavior. For convenience, these checkboxes are also included here:

<<option chkSinglePageMode>> Display one tiddler at a time
<<option chkTopOfPageMode>> Always open tiddlers at the top of the page
<<<
!!!!!Installation
<<<
import (or copy/paste) the following tiddlers into your document:
''SinglePageModePlugin'' (tagged with <<tag systemConfig>>)
^^documentation and javascript for SinglePageMode handling^^

When installed, this plugin automatically adds checkboxes in the ''shadow'' AdvancedOptions tiddler so you can enable/disable this behavior. However, if you have customized your AdvancedOptions, you will need to ''manually add these checkboxes to your customized tiddler.''
<<<
!!!!!Revision History
<<<
''2006.07.04 [2.2.1]'' in hijack for displayTiddlers(), suspend TPM as well as SPM so that DefaultTiddlers displays in the correct order.
''2006.06.01 [2.2.0]'' added chkTopOfPageMode (TPM) handling
''2006.02.04 [2.1.1]'' moved global variable declarations to config.* to avoid FireFox 1.5.0.1 crash bug when assigning to globals
''2005.12.27 [2.1.0]'' hijack displayTiddlers() so that SPM can be suspended during startup while displaying the DefaultTiddlers (or #hash list). Also, corrected initialization for undefined SPM flag to "false", so default behavior is to display multiple tiddlers
''2005.12.27 [2.0.0]'' Update for TW2.0
''2005.11.24 [1.1.2]'' When the back and forward buttons are used, the page now changes to match the URL. Based on code added by Clint Checketts
''2005.10.14 [1.1.1]'' permalink creation now calls encodeTiddlyLink() to handle tiddler titles with spaces in them
''2005.10.14 [1.1.0]'' added automatic setting of window title and location bar ('auto-permalink'). feature suggestion by David Dickens.
''2005.10.09 [1.0.1]'' combined documentation and code in a single tiddler
''2005.08.15 [1.0.0]'' Initial Release
<<<
!!!!!Credits
<<<
This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]].
Support for BACK/FORWARD buttons adapted from code developed by Clint Checketts
<<<
!!!!!Code
***/
//{{{
version.extensions.SinglePageMode= {major: 2, minor: 2, revision: 1, date: new Date(2006,7,3)};

if (config.options.chkSinglePageMode==undefined) config.options.chkSinglePageMode=false;
config.shadowTiddlers.AdvancedOptions += "\n<<option chkSinglePageMode>> Display one tiddler at a time";

if (config.options.chkTopOfPageMode==undefined) config.options.chkTopOfPageMode=false;
config.shadowTiddlers.AdvancedOptions += "\n<<option chkTopOfPageMode>> Always open tiddlers at the top of the page";

config.SPMTimer = 0;
config.lastURL = window.location.hash;
function checkLastURL()
{
 if (!config.options.chkSinglePageMode)
 { window.clearInterval(config.SPMTimer); config.SPMTimer=0; return; }
 if (config.lastURL == window.location.hash)
 return;
 var tiddlerName = convertUTF8ToUnicode(decodeURI(window.location.hash.substr(1)));
 tiddlerName=tiddlerName.replace(/\[\[/,"").replace(/\]\]/,""); // strip any [[ ]] bracketing
 if (tiddlerName.length) story.displayTiddler(null,tiddlerName,1,null,null);
}

if (Story.prototype.SPM_coreDisplayTiddler==undefined) Story.prototype.SPM_coreDisplayTiddler=Story.prototype.displayTiddler;
Story.prototype.displayTiddler = function(srcElement,title,template,animate,slowly)
{
 if (config.options.chkSinglePageMode) {
 window.location.hash = encodeURIComponent(String.encodeTiddlyLink(title));
 config.lastURL = window.location.hash;
 document.title = wikifyPlain("SiteTitle") + " - " + title;
 story.closeAllTiddlers();
 if (!config.SPMTimer) config.SPMTimer=window.setInterval(function() {checkLastURL();},1000);
 }
 if (config.options.chkTopOfPageMode) { story.closeTiddler(title); window.scrollTo(0,0); srcElement=null; }
 this.SPM_coreDisplayTiddler(srcElement,title,template,animate,slowly)
}

if (Story.prototype.SPM_coreDisplayTiddlers==undefined) Story.prototype.SPM_coreDisplayTiddlers=Story.prototype.displayTiddlers;
Story.prototype.displayTiddlers = function(srcElement,titles,template,unused1,unused2,animate,slowly)
{
 // suspend single-page mode when displaying multiple tiddlers
 var saveSPM=config.options.chkSinglePageMode; config.options.chkSinglePageMode=false;
 var saveTPM=config.options.chkTopOfPageMode; config.options.chkTopOfPageMode=false;
 this.SPM_coreDisplayTiddlers(srcElement,titles,template,unused1,unused2,animate,slowly);
 config.options.chkSinglePageMode=saveSPM; config.options.chkTopOfPageMode=saveTPM;
}
//}}}
/***
| Name:|SiteMapMacro|
| Author:|Simon Baird|
| Location:|http://simonbaird.com/mptw/#SiteMapMacro|
| Version:|1.0.3, 15-Mar-06|

!!Examples
See SiteMap and SliderSiteMap for example usage.

!!Parameters
* Name of tiddler to start at
* Max depth (a number) 
* Format (eg, nested, see formats below)
* Don't show root flag (anything other than null turns it on)
* Tags - a string containing a bracketed list of tags that we are interested in

!!History
* 1.0.3 (15-Mar-06)
** added tag filtering
* 1.0.2 (15-Mar-06)
** Added json format and dontshowroot option
* 1.0.1 (9-Mar-06)
** Added selectable formats and fixed nested slider format
* 1.0.0 (8-Mar-06)
** first release

***/
//{{{

version.extensions.SiteMapMacro = {
	major: 1,
	minor: 0,
	revision: 3,
	date: new Date(2006,3,15),
	source: "http://simonbaird.com/mptw/#SiteMapMacro"
};

config.macros.siteMap = {

	formats: {
		bullets: {
			formatString: "%0[[%1]]\n%2",
			indentString: "*"
		},

		// put this in your StyleSheet to make it look good.
		// .sliderPanel { margin-left: 2em; }

		sliders: {
			formatString: "[[%1]]+++\n%2===\n\n",
			formatStringLeaf: "[[%1]]\n"
		},

		openSliders: {
			formatString: "[[%1]]++++\n%2===\n\n",
			formatStringLeaf: "[[%1]]\n"
		},

		popups: {
			formatString: "[[%1]]+++^\n%2===\n\n",
			formatStringLeaf: "[[%1]]\n"
		},

		// these don't work too well
		openPopups: {
			formatString: "[[%1]]++++^\n%2===\n\n",
			formatStringLeaf: "[[%1]]\n"
		},
		
		// this is a little nuts but it works
		json: {
			formatString: '\n%0{"%1":[%2\n%0]}',
			formatStringLeaf: '\n%0"%1"',
			indentString: "  ",
			separatorString: ","
		}


	},

	defaultFormat: "bullets",

	treeTraverse: function(title,depth,maxdepth,format,dontshowroot,tags,excludetags) {

		var tiddler = store.getTiddler(title);
		var tagging = store.getTaggedTiddlers(title);

		if (dontshowroot)
			depth = 0;

		var indent = "";
		if (this.formats[format].indentString)
			for (var j=0;j<depth;j++)
				indent += this.formats[format].indentString;

		var childOutput = "";
		if (!maxdepth || depth < parseInt(maxdepth)) 
			for (var i=0;i<tagging.length;i++)
				if (tagging[i].title != title) {
					if (this.formats[format].separatorString && i != 0)
						childOutput += this.formats[format].separatorString;
					childOutput += this.treeTraverse(tagging[i].title,depth+1,maxdepth,format,null,tags,excludetags);
				}

		if (childOutput == "" && (
				(tags && tags != "" && !tiddler.tags.containsAll(tags.readBracketedList())) ||
				(excludetags && excludetags != "" && tiddler.tags.containsAny(excludetags.readBracketedList()))
				)
			) {
			// so prune it cos it doesn't have the right tags and neither do any of it's children
			return "";
		}

		if (dontshowroot)
			return childOutput;

		if (this.formats[format].formatStringLeaf && childOutput == "") {
			// required for nestedSliders
			return this.formats[format].formatStringLeaf.format([indent,title,childOutput]);
		}

		return this.formats[format].formatString.format([indent,title,childOutput]);
	},

	handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		wikify(this.treeTraverse(
			params[0] && params[0] != '.' ? params[0] : tiddler.title, 1, 
			params[1] && params[1] != '.' ? params[1] : null, // maxdepth
			params[2] && params[2] != '.' ? params[2] : this.defaultFormat, // format
			params[3] && params[3] != '.' ? params[3] : null, // dontshowroot
			params[4] && params[4] != '.' ? params[4] : null, // tags
			params[5] && params[5] != '.' ? params[5] : null // excludetags
			),place);
	}

}

//}}}
musings and ratings of a red wine fiend
//''Vin''//-dictation
/***

''Inspired by [[TiddlyPom|http://www.warwick.ac.uk/~tuspam/tiddlypom.html]]''

|Name|SplashScreenPlugin|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#SplashScreenPlugin|
|Version|0.21 |
|Requires|~TW2.08+|
!Description:
Provides a simple splash screen that is visible while the TW is loading.

!Installation
Copy the source text of this tiddler to your TW in a new tiddler, tag it with systemConfig and save and reload. The SplashScreen will now be installed and will be visible the next time you reload your TW.

!Customizing
Once the SplashScreen has been installed and you have reloaded your TW, the splash screen html will be present in the MarkupPreHead tiddler. You can edit it and customize to your needs.

!History
* 20-07-06 : version 0.21, modified to hide contentWrapper while SplashScreen is displayed.
* 26-06-06 : version 0.2, first release

!Code
***/
//{{{
var old_lewcid_splash_restart=restart;

restart = function()
{ if (document.getElementById("SplashScreen"))
 document.getElementById("SplashScreen").style.display = "none";
 if (document.getElementById("contentWrapper"))
 document.getElementById("contentWrapper").style.display = "block";
 
 old_lewcid_splash_restart();
 
 if (splashScreenInstall)
 {if(config.options.chkAutoSave)
 {saveChanges();}
 displayMessage("TW SplashScreen has been installed, please save and refresh your TW.");
 }
}


var oldText = store.getTiddlerText("MarkupPreHead");
if (oldText.indexOf("SplashScreen")==-1)
 {var siteTitle = store.getTiddlerText("SiteTitle");
 var splasher='\n\n<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b>'+siteTitle +'</b> is loading<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>';
 if (! store.tiddlerExists("MarkupPreHead"))
 {var myTiddler = store.createTiddler("MarkupPreHead");}
 else
 {var myTiddler = store.getTiddler("MarkupPreHead");}
 myTiddler.set(myTiddler.title,oldText+splasher,config.options.txtUserName,null,null);
 store.setDirty(true);
 var splashScreenInstall = true;
}
//}}}
[[SideBarWG]]

/***
!Top Menu Styles
***/
/*{{{*/
#topMenu br {display:none; }
#topMenu { background: #000 ; color:#fff;padding: 1em 1em;}
/*}}}*/

/***
!General
***/
/*{{{*/
body {
 background: #444;
 margin: 0 auto;
}

 #contentWrapper{
 background: #fff;
 border: 0;
 margin: 0 auto;
 width: 792px;
 padding:0;
}
/*}}}*/

/***
!Header rules
***/
/*{{{*/
.titleLine{
 margin: 80px auto 0em ;
margin-left:1.7em;
margin-bottom: 40px;
 padding: 0;
 text-align: left;
 color: #fff;
}

.siteTitle {
 font-size: 2em;
 font-weight: bold;
}

.siteSubtitle {
 font-size: 1.1em;
 display: block;
 margin: .5em auto 1em;
}

.gradient {margin: 0 auto;}



.header {
 background: #fff; 
 margin: 0 auto;
 padding:0 12px;
 width: 768px;
}
/*}}}*/

/***
!Display Area
***/
/*{{{*/
#bodywrapper {margin:0 12px; padding:0;background:#fff; height:1%}

#displayArea{
 margin: 0em 16em 0em 1em;
 text-align: left;
}

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

h1,h2,h3,h4,h5 { color: #000; background: transparent; padding-bottom:2px; border-bottom: 1px dotted #666; }
.title {color:black; font-size:1.8em; border-bottom:1px solid #333; padding-bottom:0.3px;}
.subtitle { font-size:90%; color:#ccc; padding-left:0.25em; margin-top:0.1em; }

.shadow .title {
 color: #aaa;
}

.tagClear{
 clear: none; 
}

* html .viewer pre {
 margin-left: 0em;
}

* html .editor textarea, * html .editor input {
 width: 98%;
}

.tiddler {margin-bottom:1em; padding-bottom:0em;}


.toolbar .button {color:#bbb; border:none;}
.toolbar .button:hover, .toolbar .highlight, .toolbar .marked, .toolbar a.button:active {background:transparent; color:#111; border:none; text-decoration:underline;}

#sidebar .highlight, #sidebar .marked {background:transparent;}

.tagging, .tagged {
 border: 1px solid #eee;
 background-color: #F7F7F7;
}

.selected .tagging, .selected .tagged {
 background-color: #eee;
 border: 1px solid #bbb;
}

 .tagging .listTitle, .tagged .listTitle {
 color: #bbb;
}

.selected .tagging .listTitle, .selected .tagged .listTitle {
 color: #222; 
}


.tagging .button:hover, .tagged .button:hover {
 border: none; background:transparent; text-decoration:underline; color:#000;
}

.tagging .button, .tagged .button {
 color:#aaa;
}

.selected .tagging .button, .selected .tagged .button {
 color:#000;
}

.viewer blockquote {
 border-left: 3px solid #000;
}

.viewer pre, .viewer code {
 border: 1px dashed #ccc;
 background: #eee;}

.viewer hr {
 border: 0;
 border-top: solid 1px #333;
 margin: 0 8em;
 color: #333;
}

.highlight, .marked {background:transparent; color:#111; border:none; text-decoration:underline;}

.viewer .highlight, .viewer .marked {text-decoration:none;}

#sidebarTabs .highlight, #sidebarTabs .marked {color:#000; text-decoration:none;}

.tabSelected {
 color: #000;
 background: #fff;
 border-top: solid 1px #ccc;
 border-left: solid 1px #ccc;
 border-right: solid 1px #ccc;
 border-bottom: none;
}

.viewer .tabSelected:hover{color:#000;}

.viewer .tabSelected {font-weight:bold;}

.tabUnselected {
 color: #999;
 background: #eee;
 border-top: solid 1px #ccc;
 border-left: solid 1px #ccc;
 border-right: solid 1px #ccc;
 border-bottom: solid 1px #ccc;
 padding-bottom:1px;
}

.tabContents {
 background: #fff;
 color: #000;
}
/*}}}*/
/***
!!!Tables
***/
/*{{{*/
.viewer table {
 border: 1px solid #000;
}

.viewer th, thead td {
 background: #000;
 border: 1px solid #000;
 color: #fff;
}

.viewer td, .viewer tr {
 border: 1px solid #111;
}
/*}}}*/


/***
!!!Editor area
***/
/*{{{*/
.editor input, .editor textarea {
 border: 1px solid #ccc;
}

.editor {padding-top:0.3em;}

.editor textarea:focus, .editor input:focus {
 border: 1px solid #333;
}
/*}}}*/

/***
!Sidebar
***/
/*{{{*/
#sidebar{
position:relative;
float:right;
margin-bottom:1em;
display:inline;
width: 16em;
}

#sidebarOptions .sliderPanel {
 background: #eee; border:1px solid #ccc;
}

/*}}}*/

/***
!Body Footer rules
***/
/*{{{*/
#contentFooter {
 text-align: left;
 clear: both;
 color:#fff;
 background: #000;
 padding: 1em 2em;
font-weight:bold;
}

/*}}}*/
/***
!Link Styles
***/
/*{{{*/
a{
 color: #000;
}

a:hover{
 color: #660000;
 background:#fff;
}


.button {
 color: #000;
 border: 1px solid #fff;
}

.button:hover {
 color: #fff;
 background: #660000;
 border-color: #000;
}

.button:active {
 color: #fff;
 background: #660000;
 border: 1px solid #000;
}

.tiddlyLink {border-bottom: 1px dotted #000;}
.tiddlyLink:hover {border-bottom: 1px dotted #660000;} 

.titleLine a {border-bottom: 1px dotted #660000;}

.titleLine a:hover {border-bottom: 1px dotted #fff;}

.siteTitle a, .siteSubtitle a{
 color: #fff;
}

.viewer .button {border: 1px solid #660000; font-weight:bold;}
.viewer .button:hover, .viewer .marked, .viewer .highlight{background:#660000; color:#fff; font-weight:bold; border: 1px solid #000;}

#topMenu .button, #topMenu .tiddlyLink {
 margin-left:0.5em; margin-right:0.5em;
 padding-left:3px; padding-right:3px;
 color:white;
}
#topMenu .button:hover, #topMenu .tiddlyLink:hover { background:#000; color:#663333}

#topMenu a{border:none;}
/*}}}*/

/***
!Message Area /%=================================================%/
***/
/*{{{*/
#messageArea {
 border: 4px dotted #660000;
 background: #000;
 color: #fff;
 font-size:90%;
}

#messageArea .button {
 padding: 0.2em;
 color: #000;
 background: #fff;
 text-decoration:none;
 font-weight:bold;
 border:1px solid #000; 
}

#messageArea a {color:#fff;}

#messageArea a:hover {color:#660000; background:transparent;}

#messageArea .button:hover {background: #660000; color:#fff; border:1px solid #fff; }

/*}}}*/

/***
!Popup /%=================================================%/
***/
/*{{{*/
.popup {
 background: #660000;
 border: 1px solid #333;
}

.popup hr {
 color: #333;
 background: #333;
 border-bottom: 1px;
}

.popup li.disabled {
 color: #333;
}

.popup li a, .popup li a:visited {
 color: #eee;
 border: none;
}

.popup li a:hover {
 background: #660000;
 color: #fff;
 border: none;
 text-decoration:underline;
}
/*}}}*/

.blog h2, .blog h3, .blog h4{
 margin:0;
 padding:0;
border-bottom:none;
}
.blog {margin-left:1.5em;} 


.blog .excerpt {
 margin:0;
margin-top:0.3em;
 padding: 0;
 margin-left:1em;
 padding-left:1em;
 font-size:90%;
 border-left:1px solid #ddd;
}

#tiddlerWhatsNew h1, #tiddlerWhatsNew h2 {border-bottom:none;}
div[tags~="RecentUpdates"], div[tags~="lewcidExtension"] {margin-bottom: 2em;}

#hoverMenu .button, #hoverMenu .tiddlyLink {border:none; font-weight:bold; background:#660000; color:#fff; padding:0 5px; float:right; margin-bottom:4px;}
#hoverMenu .button:hover, #hoverMenu .tiddlyLink:hover {font-weight:bold; border:none; color:#660000; background:#000; padding:0 5px; float:right; margin-bottom:4px;}

#topMenu .fontResizer {float:right;}

#topMenu .fontResizer .button{border:1px solid #000;}
#topMenu .fontResizer .button:hover {border:1px solid #f37211; color:#fff;}
#sidebarTabs .txtMainTab .tiddlyLinkExisting {
 font-weight: normal;
 font-style: normal;
}

#sidebarTabs .txtMoreTab .tiddlyLinkExisting {
 font-weight: bold;
 font-style: normal;
}

.blog h2, .blog h3, .blog h4{
 margin:0;
 padding:0;
border-bottom:none;
}
.blog {margin-left:1.5em;} 


.blog .excerpt {
 margin:0;
margin-top:0.3em;
 padding: 0;
 margin-left:1em;
 padding-left:1em;
 font-size:90%;
 border-left:1px solid #ddd;
}

#tiddlerWhatsNew h1, #tiddlerWhatsNew h2 {border-bottom:none;}
div[tags~="RecentUpdates"], div[tags~="lewcidExtension"] {margin-bottom: 2em;}

#hoverMenu {background:transparent;}
#hoverMenu .button, #hoverMenu .tiddlyLink {border:none; font-weight:bold; background:#f37211; color:#fff; padding:0 5px; float:right; margin-bottom:4px;}
#hoverMenu .button:hover, #hoverMenu .tiddlyLink:hover {font-weight:bold; border:none; color:#f37211; background:#000; padding:0 5px; float:right; margin-bottom:4px;}

#topMenu .fontResizer {float:right;}

#topMenu .fontResizer .button{border:1px solid #000;}
#topMenu .fontResizer .button:hover {border:1px solid #f37211; color:#fff;}
#sidebarTabs .txtMainTab .tiddlyLinkExisting {
 font-weight: normal;
 font-style: normal;
}

#sidebarTabs .txtMoreTab .tiddlyLinkExisting {
 font-weight: bold;
 font-style: normal;
}

Shiraz, or Syrah, is a variety of grape used in wine. The names are interchangeable. It is called Syrah in France and most of the United States. In South Africa, Australia, and Canada it is known as Shiraz. In Australia it used to be called Hermitage up to the late 1980s. It should not be confused with Petite Sirah, a synonym for Durif, which is a different type of grape. Its name stems from Shiraz—the city of flowers, wine and poetry in Iran—in the heart of an ancient winemaking region. The grape also has many other synonyms that are used in various parts of the world including Antourenein Noir, Balsamina, Candive, Entournerein, Hignin Noir, Marsanne Noir, Schiras, Sirac, Syra, Syrac, Serine, and Sereine.

Citation: [[Wikipedia|http://en.wikipedia.org/wiki/Syrah]]
/***
|Name|TabEditPlugin|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#TabEditPlugin|
|Version|0.32|
|Requires|~TW2.x|

!Description
Makes editing of tabs easier.

!Usage
*Double click a tab to edit the source tiddler
*Double click outside the tabset to edit the containing tiddler. 

!Demo
TestTabs

!History
*28-04-06, v0.32 - fixed previous bug fix!
*27-04-06, v0.31 - fixed conflicts with tabs created using PartTiddler.
*26-04-06, v0.30 - first public release

***/

//{{{

//tab on double click event handler
Story.prototype.onTabDblClick = function(e){
 if (!e) var e = window.event;
 var theTarget = resolveTarget(e);
 var title= this.getAttribute("source");
 if ((version.extensions.PartTiddlerPlugin)&&(title.indexOf("/")!=-1))
 {if (!oldFetchTiddler.call(this, [title]))
 {return false;}} 
 story.displayTiddler(theTarget,title,2,false,null)
 e.cancelBubble = true;
 if (e.stopPropagation) e.stopPropagation();
 return false;
 }

config.macros.tabs.switchTab = function(tabset,tab)
{
 var cookie = tabset.getAttribute("cookie");
 var theTab = null
 var nodes = tabset.childNodes;
 for(var t=0; t<nodes.length; t++)
 if(nodes[t].getAttribute && nodes[t].getAttribute("tab") == tab)
 {
 theTab = nodes[t];
 theTab.className = "tab tabSelected";
 }
 else
 nodes[t].className = "tab tabUnselected"
 if(theTab)
 {
 if(tabset.nextSibling && tabset.nextSibling.className == "tabContents")
 tabset.parentNode.removeChild(tabset.nextSibling);
 var tabContent = createTiddlyElement(null,"div",null,"tabContents",null);
 tabset.parentNode.insertBefore(tabContent,tabset.nextSibling);
 var contentTitle = theTab.getAttribute("content");

 //set source attribute equal to title of tiddler displayed in tab
 tabContent.setAttribute("source",contentTitle);
 //add dbl click event
 tabContent.ondblclick = story.onTabDblClick;

 wikify(store.getTiddlerText(contentTitle),tabContent,null,store.getTiddler(contentTitle));
 if(cookie)
 {
 config.options[cookie] = tab;
 saveOptionCookie(cookie);
 }
 }
}

//}}}
/***
| Name:|''tagAdder''|
| Created by:|SaqImtiaz|
| Location:|http://lewcid.googlepages.com/lewcid.html|
| Version:|0.61 (07 Apr-2006)|
| Requires:|~TW2.07|
!About
*provides a drop down list for toggling tags 
*you can specify which tags to list, and have multiple drop downs with different tag lists.

!Demonstration
<<tagAdder>>
{{{<<tagAdder>>}}}

''I recommend using either tagAdder or monkeyTagger, with dropTags and dropTagging in the toolbar:''


!Installation:
*Copy this tiddler to your TW with the systemConfig tag
* copy the following to your ViewTemplate:
#either {{{
<div class='tagged' macro='tagAdder'></div>
}}} to add to next to the tags macro in the viewer area, or
#{{{<div class='toolbar' >
<span style="padding-right:1.75em;" macro='tagAdder'></span>
<span macro='toolbar -closeTiddler closeOthers +editTiddler permalink references jump'></span></div>}}} to add to the toolbar.
(adjust padding to taste)

!Usage:
*by default {{{<<tagAdder>>}}} will display drop down list of all tags, with tags present on the tiddler grouped together.
*to sort alphabetically (ignoring the [x]), use {{{<<tagAdder 'nogroup'>>}}}
*to specify what tags to list, use {{{<<tagAdder 'group/nogroup' 'tiddler'>>}}} where tiddler is a tiddler that is tagged with the tags you want to list. (use one of either group or no group, not both!)
Eg: TagDataBase is my tiddler that is tagged with the tags I want to list, so I will use {{{<<tagAdder 'group' 'TagDataBase'>>}}}
 for a list like this: <<tagAdder 'group' 'TagDataBase'>>
*you can specify a custom label by giving the macro an additional parameter.
Eg: {{{<<tagAdder 'group' 'TagDataBase' 'custom label'>>}}} gives <<tagAdder 'group' 'TagDataBase' 'custom label'>>

!Tips:
*On the tiddler you want to use as your TagsDataBase, add {{{<<tagAdder>>}}} for a drop down list of all tags, so you can easily toggle tags on it!
*You can have as many TagDataBases as you like.

!Notes:
*use css to style to taste
*tags to be removed are preceded by [x]

!To Do:
*Combine with features of normal tags drop down list.(drop tag macro)
*TagsDB manager
*''add exclude tag feature''

!History
*07 Apr-2006, version 0.61
**fixed IE bug with not returning false 

!CODE
***/
//{{{

config.macros.tagAdder= {};
//config.macros.tagAdder.dropdownchar = (document.all?"?":"?"); // the fat one is the only one that works in IE
config.macros.tagAdder.dropdownchar = "?"; // uncomment previous line and comment this for smaller version in FF
config.macros.tagAdder.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
 var arrow=': '+ config.macros.tagAdder.dropdownchar;
 var tAsort = (params[0] && params[0] !='.') ? params[0]: 'group';
 if (params[1]){var tAsource=params[1]};
 if ((tAsource)&&(!store.getTiddler(tAsource)))
 return false;
 var tAlabel= (params[2] && params[2] !='.')? params[2]: 'toggle tags'+arrow;
 var tAtooltip= (params[2] && params[2] !='.')? params[2]: 'toggle tags on this tiddler';

 if(tiddler instanceof Tiddler)
 {
 var title = tiddler.title;
 var lingo = config.views.editor.tagChooser;
 
 var ontagclick = function(e) {
 if (!e) var e = window.event;
 var tag = this.getAttribute("tag");

 var t=store.getTiddler(title);
 if (!t || !t.tags) return;
 if (t.tags.find(tag)==null)
 {t.tags.push(tag)}
 else
 {t.tags.splice(t.tags.find(tag),1)};
 story.saveTiddler(title);
 story.refreshTiddler(title,null,true);
 return false;
 };

 var onclick = function(e) {
 if (!e) var e = window.event;
 var popup = Popup.create(this);
 var t=store.getTiddler(title);
 if (!t) return false;
 var tagsarray = store.getTags();
 var tagsvalue=new Array();

 for (var i=0; i<tagsarray.length; i++){
 var thetagonly= (tagsarray[i][0]);
 tagsvalue.push(thetagonly);}

 if (tAsource)
 {var sourcetiddler=store.getTiddler(tAsource);
 var tagsvalue=sourcetiddler.tags;
 }
 var tagslabel=new Array();
 var tagssorted=new Array();

 for (var i=0;i<tagsvalue.length;i++){
 var temptag=(tagsvalue[i]);
 if (t.tags.find(temptag)==null)
 {var temptagx = '[ ] '+temptag;
 tagslabel.push(temptagx);
 tagssorted.push(temptag);
 }
 else
 {var temptagx ='[x] '+temptag;
 if (tAsort=='group'){
 tagslabel.unshift(temptagx);
 tagssorted.unshift(temptag);}
 else if (tAsort=='nogroup'){
 tagslabel.push(temptagx);
 tagssorted.push(temptag);} }
 ;}


 if(tagsvalue.length == 0)
 createTiddlyText(createTiddlyElement(popup,"li"),lingo.popupNone);
 for (var t=0; t<tagsvalue.length; t++)
 {
 var theTag = createTiddlyButton(createTiddlyElement(popup,"li"),tagslabel[t],"toggle '"+([tagssorted[t]])+"'",ontagclick);
 theTag.setAttribute("tag",tagssorted[t]);
 }
 Popup.show(popup,false);
 e.cancelBubble = true;
 if (e.stopPropagation) e.stopPropagation();
 return(false);
 };
 //createTiddlyButton(place,tAlabel,tAtooltip,onclick);
var createdropperButton = function(place){
var sp = createTiddlyElement(place,"span",null,"tagadderbutton");
var theDropDownBtn = createTiddlyButton(sp,tAlabel,tAtooltip,onclick);
};

createdropperButton(place);
}
};
setStylesheet(
 ".toolbar .tagadderbutton { margin-right:0em; border:0px solid #eee; padding:0px; padding-right:0px; padding-left:0px; }\n"+
 ".tagadderbutton a.button { padding:2px; padding-left:2px; padding-right:2px;}\n"+
// ".tagadderbutton {font-size:150%;}\n"+
 "",
"TagAdderStyles");

//}}}

/***
|''Name:''|~TaggerPlugin|
|''Version:''|1.0.1 (2006-06-01)|
|''Source:''|http://lewcid.googlepages.com/lewcid.html/#TaggerPlugin|
|''Author:''|SaqImtiaz|
|''Description:''|Provides a drop down listing current tiddler tags, and allowing toggling of tags.|
|''Documentation:''|[[TaggerPluginDocumentation]]|
|''Source Code:''|[[TaggerPluginSource]]|
|''~TiddlyWiki:''|Version 2.0.8 or better|
***/
// /%
config.tagger={defaults:{label:"Tags: ",tooltip:"Manage tiddler tags",taglist:"true",excludeTags:"",notags:"tiddler has no tags",aretags:"current tiddler tags:",toggletext:"add tags:"}};config.macros.tagger={};config.macros.tagger.arrow=(document.all?"▼":"▾");config.macros.tagger.handler=function(_1,_2,_3,_4,_5,_6){var _7=config.tagger.defaults;var _8=_5.parseParams("tagman",null,true);var _9=((_8[0].label)&&(_8[0].label[0])!=".")?_8[0].label[0]+this.arrow:_7.label+this.arrow;var _a=((_8[0].tooltip)&&(_8[0].tooltip[0])!=".")?_8[0].tooltip[0]:_7.tooltip;var _b=((_8[0].taglist)&&(_8[0].taglist[0])!=".")?_8[0].taglist[0]:_7.taglist;var _c=((_8[0].exclude)&&(_8[0].exclude[0])!=".")?(_8[0].exclude[0]).readBracketedList():_7.excludeTags.readBracketedList();if((_8[0].source)&&(_8[0].source[0])!="."){var _d=_8[0].source[0];}if(_d&&!store.getTiddler(_d)){return false;}var _e=function(e){if(!e){var e=window.event;}var _11=Popup.create(this);var _12=store.getTags();var _13=new Array();for(var i=0;i<_12.length;i++){_13.push(_12[i][0]);}if(_d){var _15=store.getTiddler(_d);_13=_15.tags.sort();}var _16=_6.tags.sort();var _17=function(_18,_19,_1a){var sp=createTiddlyElement(createTiddlyElement(_11,"li"),"span",null,"tagger");var _1c=createTiddlyButton(sp,_18,_1a+" '"+_19+"'",taggerOnToggle,"button","toggleButton");_1c.setAttribute("tiddler",_6.title);_1c.setAttribute("tag",_19);insertSpacer(sp);if(window.createTagButton_orig_mptw){createTagButton_orig_mptw(sp,_19)}else{createTagButton(sp,_19);}};createTiddlyElement(_11,"li",null,"listTitle",(_6.tags.length==0?_7.notags:_7.aretags));for(var t=0;t<_16.length;t++){_17("[x]",_16[t],"remove tag ");}createTiddlyElement(createTiddlyElement(_11,"li"),"hr");if(_b!="false"){createTiddlyElement(_11,"li",null,"listTitle",_7.toggletext);for(var i=0;i<_13.length;i++){if(!_6.tags.contains(_13[i])&&!_c.contains(_13[i])){_17("[ ]",_13[i],"add tag ");}}createTiddlyElement(createTiddlyElement(_11,"li"),"hr");}var _1f=createTiddlyButton(createTiddlyElement(_11,"li"),("Create new tag"),null,taggerOnToggle);_1f.setAttribute("tiddler",_6.title);if(_d){_1f.setAttribute("source",_d);}Popup.show(_11,false);e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}return (false);};createTiddlyButton(_1,_9,_a,_e,"button","taggerDrpBtn");};window.taggerOnToggle=function(e){var tag=this.getAttribute("tag");var _22=this.getAttribute("tiddler");var _23=store.getTiddler(_22);if(!tag){var _24=prompt("Enter new tag:","");if(_24!=""&&_24!=null){var tag=_24;if(this.getAttribute("source")){var _26=store.getTiddler(this.getAttribute("source"));_26.tags.pushUnique(_24);}}else{return false;}}if(!_23||!_23.tags){store.saveTiddler(_22,_22,"",config.options.txtUserName,new Date(),tag);}else{if(_23.tags.find(tag)==null){_23.tags.push(tag);}else{if(!_24){_23.tags.splice(_23.tags.find(tag),1);}}store.saveTiddler(_23.title,_23.title,_23.text,_23.modifier,_23.modified,_23.tags);}story.refreshTiddler(_22,null,true);if(config.options.chkAutoSave){saveChanges();}return false;};setStylesheet(".tagger a.button {font-weight: bold;display:inline; padding:0px;}\n"+".tagger #toggleButton {padding-left:2px; padding-right:2px; margin-right:1px; font-size:110%;}\n"+"#nestedtagger {background:#2E5ADF; border: 1px solid #0331BF;}\n"+".popup .listTitle {color:#000;}\n"+"","TaggerStyles");window.lewcidTiddlerSwapTag=function(_27,_28,_29){for(var i=0;i<_27.tags.length;i++){if(_27.tags[i]==_28){_27.tags[i]=_29;return true;}}return false;};window.lewcidRenameTag=function(e){var tag=this.getAttribute("tag");var _2d=prompt("Rename tag '"+tag+"' to:",tag);if((_2d==tag)||(_2d==null)){return false;}if(store.tiddlerExists(_2d)){if(confirm(config.messages.overwriteWarning.format([_2d.toString()]))){story.closeTiddler(_2d,false,false);}else{return null;}}tagged=store.getTaggedTiddlers(tag);if(tagged.length!=0){for(var j=0;j<tagged.length;j++){lewcidTiddlerSwapTag(tagged[j],tag,_2d);}}if(store.tiddlerExists(tag)){store.saveTiddler(tag,_2d);}if(document.getElementById("tiddler"+tag)){var _2f=document.getElementById(story.idPrefix+tag);var _30=story.positionTiddler(_2f);var _31=document.getElementById(story.container);story.closeTiddler(tag,false,false);story.createTiddler(_31,_30,_2d,null);story.saveTiddler(_2d);}if(config.options.chkAutoSave){saveChanges();}return false;};window.onClickTag=function(e){if(!e){var e=window.event;}var _34=resolveTarget(e);var _35=(!isNested(_34));if((Popup.stack.length>1)&&(_35==true)){Popup.removeFrom(1);}else{if(Popup.stack.length>0&&_35==false){Popup.removeFrom(0);}}var _36=(_35==false)?"popup":"nestedtagger";var _37=createTiddlyElement(document.body,"ol",_36,"popup",null);Popup.stack.push({root:this,popup:_37});var tag=this.getAttribute("tag");var _39=this.getAttribute("tiddler");if(_37&&tag){var _3a=store.getTaggedTiddlers(tag);var _3b=[];var li,r;for(r=0;r<_3a.length;r++){if(_3a[r].title!=_39){_3b.push(_3a[r].title);}}var _3d=config.views.wikified.tag;if(_3b.length>0){var _3e=createTiddlyButton(createTiddlyElement(_37,"li"),_3d.openAllText.format([tag]),_3d.openAllTooltip,onClickTagOpenAll);_3e.setAttribute("tag",tag);createTiddlyElement(createTiddlyElement(_37,"li"),"hr");for(r=0;r<_3b.length;r++){createTiddlyLink(createTiddlyElement(_37,"li"),_3b[r],true);}}else{createTiddlyText(createTiddlyElement(_37,"li",null,"disabled"),_3d.popupNone.format([tag]));}createTiddlyElement(createTiddlyElement(_37,"li"),"hr");var h=createTiddlyLink(createTiddlyElement(_37,"li"),tag,false);createTiddlyText(h,_3d.openTag.format([tag]));createTiddlyElement(createTiddlyElement(_37,"li"),"hr");var _40=createTiddlyButton(createTiddlyElement(_37,"li"),("Rename tag '"+tag+"'"),null,lewcidRenameTag);_40.setAttribute("tag",tag);}Popup.show(_37,false);e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}return (false);};if(!window.isNested){window.isNested=function(e){while(e!=null){var _42=document.getElementById("contentWrapper");if(_42==e){return true;}e=e.parentNode;}return false;};}config.shadowTiddlers.TaggerPluginDocumentation="The documentation is available [[here.|http://lewcid.googlepages.com/lewcid.html#TaggerPluginDocumentation]]";config.shadowTiddlers.TaggerPluginSource="The uncompressed source code is available [[here.|http://lewcid.googlepages.com/lewcid.html#TaggerPluginSource]]";
// %/
/***
|''Name:''|~TaggerPlugin|
|''Version:''|1.0.1 (2006-06-01)|
|''Source:''|http://lewcid.googlepages.com/lewcid.html/#TaggerPlugin|
|''Author:''|SaqImtiaz|
|''Description:''|Provides a drop down listing current tiddler tags, and allowing toggling of tags.|
|''Documentation:''|[[TaggerPluginDocumentation]]|
|''Source Code:''|[[TaggerPluginSource]]|
|''~TiddlyWiki:''|Version 2.0.8 or better|
***/
//{{{

config.tagger={
 defaults:{
 label: 'Tags: ',
 tooltip: 'Manage tiddler tags',
 taglist: 'true',
 excludeTags: '',
 notags: 'tiddler has no tags',
 aretags: 'current tiddler tags:',
 toggletext: 'add tags:'
 }
};

config.macros.tagger={};
config.macros.tagger.arrow = (document.all?"?":"?"); // the fat one is the only one that works in IE
config.macros.tagger.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 var defaults = config.tagger.defaults;
 var nAV = paramString.parseParams('tagman', null, true);
 var label = ((nAV[0].label)&&(nAV[0].label[0])!='.')?nAV[0].label[0]+this.arrow: defaults.label+this.arrow;
 var tooltip = ((nAV[0].tooltip)&&(nAV[0].tooltip[0])!='.')?nAV[0].tooltip[0]: defaults.tooltip;
 var taglist = ((nAV[0].taglist)&&(nAV[0].taglist[0])!='.')?nAV[0].taglist[0]: defaults.taglist;
 var exclude = ((nAV[0].exclude)&&(nAV[0].exclude[0])!='.')?(nAV[0].exclude[0]).readBracketedList(): defaults.excludeTags.readBracketedList();
 if ((nAV[0].source)&&(nAV[0].source[0])!='.')var source = nAV[0].source[0];
 if (source&&!store.getTiddler(source)) return false;

 var onclick = function(e) {
 if (!e) var e = window.event;
 var popup = Popup.create(this);
 var tagsarray = store.getTags();
 var tags=new Array();

 for (var i=0; i<tagsarray.length; i++){
 tags.push(tagsarray[i][0]);}

 if (source)
 {var sourcetiddler=store.getTiddler(source);
 tags=sourcetiddler.tags.sort();}

 var currentTags = tiddler.tags.sort();

 var createButtons=function(text,theTag,tooltipPrefix){
 var sp = createTiddlyElement(createTiddlyElement(popup,"li"),"span",null,"tagger");
 var theToggle = createTiddlyButton(sp,text,tooltipPrefix+" '"+theTag+"'",taggerOnToggle,"button","toggleButton");
 theToggle.setAttribute("tiddler",tiddler.title);
 theToggle.setAttribute("tag",theTag);
 insertSpacer(sp);
 if (window.createTagButton_orig_mptw)
 createTagButton_orig_mptw(sp,theTag);
 else
 createTagButton(sp,theTag);
 }

 createTiddlyElement(popup,"li",null,"listTitle",(tiddler.tags.length == 0 ? defaults.notags : defaults.aretags));

 for (var t=0; t<currentTags.length; t++){
 createButtons("[x]",currentTags[t],"remove tag ");
 }

 createTiddlyElement(createTiddlyElement(popup,"li"),"hr");

 if (taglist!='false')
 { createTiddlyElement(popup,"li",null,"listTitle",defaults.toggletext);
 for (var i=0; i<tags.length; i++){
 if (!tiddler.tags.contains(tags[i])&&!exclude.contains(tags[i]))
 {createButtons("[ ]",tags[i],"add tag ");
 }
 }
 createTiddlyElement(createTiddlyElement(popup,"li"),"hr");
 }

 var newTagButton = createTiddlyButton(createTiddlyElement(popup,"li"),("Create new tag"),null,taggerOnToggle);
 newTagButton.setAttribute("tiddler",tiddler.title);
 if (source) newTagButton.setAttribute("source",source);

 Popup.show(popup,false);
 e.cancelBubble = true;
 if (e.stopPropagation) e.stopPropagation();
 return(false);
 };

 createTiddlyButton(place,label,tooltip,onclick,"button","taggerDrpBtn");
};

window.taggerOnToggle = function(e) {
 var tag = this.getAttribute("tag");
 var title = this.getAttribute("tiddler");
 var tiddler = store.getTiddler(title);
 if (!tag)
 {
 var newtag=prompt("Enter new tag:","");
 if (newtag!=''&&newtag!=null)
 {
 var tag=newtag;
 if (this.getAttribute("source"))
 {var sourcetiddler = store.getTiddler(this.getAttribute("source"));
 sourcetiddler.tags.pushUnique(newtag);}
 }
 else
 {return false;};
 }
 if (!tiddler || !tiddler.tags)
 {store.saveTiddler(title,title,'',config.options.txtUserName,new Date(),tag);}
 else
 {if (tiddler.tags.find(tag)==null)
 {tiddler.tags.push(tag)}
 else if(!newtag)
 {tiddler.tags.splice(tiddler.tags.find(tag),1)};
 store.saveTiddler(tiddler.title,tiddler.title,tiddler.text,tiddler.modifier,tiddler.modified,tiddler.tags);};
 story.refreshTiddler(title,null,true);
 if(config.options.chkAutoSave)
 saveChanges();
 return false;
};

setStylesheet(
 ".tagger a.button {font-weight: bold;display:inline; padding:0px;}\n"+
 ".tagger #toggleButton {padding-left:2px; padding-right:2px; margin-right:1px; font-size:110%;}\n"+
 "#nestedtagger {background:#2E5ADF; border: 1px solid #0331BF;}\n"+
 ".popup .listTitle {color:#000;}\n"+
 "",
"TaggerStyles");

window.lewcidTiddlerSwapTag = function (tiddler, oldTag, newTag){
 for (var i = 0; i < tiddler.tags.length; i++)
 if (tiddler.tags[i] == oldTag) {
 tiddler.tags[i] = newTag;
 return true;}
 return false;
}

window.lewcidRenameTag = function(e) {
 var tag=this.getAttribute("tag");
 var newtag=prompt("Rename tag '"+tag+"' to:",tag);

 if ((newtag==tag)||(newtag==null)) {return false;}

 if(store.tiddlerExists(newtag))
 {if(confirm(config.messages.overwriteWarning.format([newtag.toString()])))
 story.closeTiddler(newtag,false,false);
 else
 return null;}

 tagged=store.getTaggedTiddlers(tag);
 if (tagged.length!=0){
 for (var j = 0; j < tagged.length; j++)
 lewcidTiddlerSwapTag(tagged[j],tag,newtag);}

 if (store.tiddlerExists(tag))
 {store.saveTiddler(tag,newtag);}
 if (document.getElementById("tiddler"+tag))
 {var oldTagTiddler = document.getElementById(story.idPrefix + tag);
 var before= story.positionTiddler(oldTagTiddler);
 var place = document.getElementById(story.container);
 story.closeTiddler(tag,false,false);
 story.createTiddler(place,before,newtag,null);
 story.saveTiddler(newtag);}
 if(config.options.chkAutoSave)
 saveChanges();
 return false;
}


window.onClickTag=function(e)
{
 if (!e) var e = window.event;
 var theTarget = resolveTarget(e);

 var nested = (!isNested(theTarget));
 if ((Popup.stack.length > 1)&&(nested==true)) {Popup.removeFrom(1);}
 else if(Popup.stack.length > 0 && nested==false) {Popup.removeFrom(0);};

 var theId = (nested==false)? "popup" : "nestedtagger";
 var popup = createTiddlyElement(document.body,"ol",theId,"popup",null);
 Popup.stack.push({root: this, popup: popup});

 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)
 {
 var openAll = createTiddlyButton(createTiddlyElement(popup,"li"),lingo.openAllText.format([tag]),lingo.openAllTooltip,onClickTagOpenAll);
 openAll.setAttribute("tag",tag);
 createTiddlyElement(createTiddlyElement(popup,"li"),"hr");
 for(r=0; r<titles.length; r++)
 {
 createTiddlyLink(createTiddlyElement(popup,"li"),titles[r],true);
 }
 }
 else
 createTiddlyText(createTiddlyElement(popup,"li",null,"disabled"),lingo.popupNone.format([tag]));
 createTiddlyElement(createTiddlyElement(popup,"li"),"hr");
 var h = createTiddlyLink(createTiddlyElement(popup,"li"),tag,false);
 createTiddlyText(h,lingo.openTag.format([tag]));

 createTiddlyElement(createTiddlyElement(popup,"li"),"hr");

 var renameTagButton = createTiddlyButton(createTiddlyElement(popup,"li"),("Rename tag '"+tag+"'"),null,lewcidRenameTag);
 renameTagButton.setAttribute("tag",tag)
 }
 Popup.show(popup,false);
 e.cancelBubble = true;
 if (e.stopPropagation) e.stopPropagation();
 return(false);
}

if (!window.isNested)
 window.isNested = function(e) {
 while (e != null) {
 var contentWrapper = document.getElementById("contentWrapper");
 if (contentWrapper == e) return true;
 e = e.parentNode;
 }
 return false;
 };

config.shadowTiddlers.TaggerPluginDocumentation="The documentation is available [[here.|http://lewcid.googlepages.com/lewcid.html#TaggerPluginDocumentation]]";

config.shadowTiddlers.TaggerPluginSource="The uncompressed source code is available [[here.|http://lewcid.googlepages.com/lewcid.html#TaggerPluginSource]]";
//}}}
/***
| Name:|TagglyTaggingPlugin|
| Description:|tagglyTagging macro is a replacement for the builtin tagging macro in your ViewTemplate|
| Version:|6.1.5|
| Date:|05-Oct-2006|
| Source:|http://mptw.tiddlyspot.com/#TagglyTaggingPlugin|
| Author:|Simon Baird <simon.baird@gmail.com>|
| CoreVersion:|2.1.x|
!Notes
See http://mptw.tiddlyspot.com/#TagglyTagging
***/
//{{{
config.taggly = {

 // for translations
 lingo: {
 labels: {
 asc: "\u2191", // down arrow
 desc: "\u2193", // up arrow
 title: "title",
 modified: "modified",
 created: "created",
 show: "+",
 hide: "-",
 normal: "normal",
 group: "group",
 commas: "commas",
 sitemap: "sitemap",
 numCols: "cols\u00b1", // plus minus sign
 label: "Tagged as '%0':"
 },

 tooltips: {
 title: "Click to sort by title",
 modified: "Click to sort by modified date",
 created: "Click to sort by created date",
 show: "Click to show tagging list",
 hide: "Click to hide tagging list",
 normal: "Click to show a normal ungrouped list",
 group: "Click to show list grouped by tag",
 sitemap: "Click to show a sitemap style list",
 commas: "Click to show a comma separated list",
 numCols: "Click to change number of columns"
 }
 },

 config: {
 showTaggingCounts: true,
 listOpts: {
 // the first one will be the default
 sortBy: ["title","modified","created"],
 sortOrder: ["asc","desc"],
 hideState: ["show","hide"],
 listMode: ["normal","group","sitemap","commas"],
 numCols: ["1","2","3","4","5","6"]
 },
 valuePrefix: "taggly."
 },

 getTagglyOpt: function(title,opt) {
 var val = store.getValue(title,this.config.valuePrefix+opt);
 return val ? val : this.config.listOpts[opt][0];
 },

 setTagglyOpt: function(title,opt,value) {
 if (!store.tiddlerExists(title))
 // create it silently
 store.saveTiddler(title,title,config.views.editor.defaultText.format([title]),config.options.txtUserName,new Date(),null);
 // if value is default then remove it to save space
 return store.setValue(title,
 this.config.valuePrefix+opt,
 value == this.config.listOpts[opt][0] ? null : value);
 },

 getNextValue: function(title,opt) {
 var current = this.getTagglyOpt(title,opt);
 var pos = this.config.listOpts[opt].indexOf(current);
 // a little usability enhancement. actually it doesn't work right for grouped or sitemap
 var limit = (opt == "numCols" ? store.getTaggedTiddlers(title).length : this.config.listOpts[opt].length);
 var newPos = (pos + 1) % limit;
 return this.config.listOpts[opt][newPos];
 },

 toggleTagglyOpt: function(title,opt) {
 var newVal = this.getNextValue(title,opt);
 this.setTagglyOpt(title,opt,newVal);
 }, 

 createListControl: function(place,title,type) {
 var lingo = config.taggly.lingo;
 var label;
 var tooltip;
 var onclick;

 if ((type == "title" || type == "modified" || type == "created")) {
 // "special" controls. a little tricky. derived from sortOrder and sortBy
 label = lingo.labels[type];
 tooltip = lingo.tooltips[type];

 if (this.getTagglyOpt(title,"sortBy") == type) {
 label += lingo.labels[this.getTagglyOpt(title,"sortOrder")];
 onclick = function() {
 config.taggly.toggleTagglyOpt(title,"sortOrder");
 return false;
 }
 }
 else {
 onclick = function() {
 config.taggly.setTagglyOpt(title,"sortBy",type);
 config.taggly.setTagglyOpt(title,"sortOrder",config.taggly.config.listOpts.sortOrder[0]);
 return false;
 }
 }
 }
 else {
 // "regular" controls, nice and simple
 label = lingo.labels[type == "numCols" ? type : this.getNextValue(title,type)];
 tooltip = lingo.tooltips[type == "numCols" ? type : this.getNextValue(title,type)];
 onclick = function() {
 config.taggly.toggleTagglyOpt(title,type);
 return false;
 }
 }

 // hide button because commas don't have columns
 if (!(this.getTagglyOpt(title,"listMode") == "commas" && type == "numCols"))
 createTiddlyButton(place,label,tooltip,onclick,type == "hideState" ? "hidebutton" : "button");
 },

 makeColumns: function(orig,numCols) {
 var listSize = orig.length;
 var colSize = listSize/numCols;
 var remainder = listSize % numCols;

 var upperColsize = colSize;
 var lowerColsize = colSize;

 if (colSize != Math.floor(colSize)) {
 // it's not an exact fit so..
 upperColsize = Math.floor(colSize) + 1;
 lowerColsize = Math.floor(colSize);
 }

 var output = [];
 var c = 0;
 for (var j=0;j<numCols;j++) {
 var singleCol = [];
 var thisSize = j < remainder ? upperColsize : lowerColsize;
 for (var i=0;i<thisSize;i++) 
 singleCol.push(orig[c++]);
 output.push(singleCol);
 }

 return output;
 },

 drawTable: function(place,columns,theClass) {
 var newTable = createTiddlyElement(place,"table",null,theClass);
 var newTbody = createTiddlyElement(newTable,"tbody");
 var newTr = createTiddlyElement(newTbody,"tr");
 for (var j=0;j<columns.length;j++) {
 var colOutput = "";
 for (var i=0;i<columns[j].length;i++) 
 colOutput += columns[j][i];
 var newTd = createTiddlyElement(newTr,"td",null,"tagglyTagging"); // todo should not need this class
 wikify(colOutput,newTd);
 }
 return newTable;
 },

 createTagglyList: function(place,title) {
 switch(this.getTagglyOpt(title,"listMode")) {
 case "group": return this.createTagglyListGrouped(place,title); break;
 case "normal": return this.createTagglyListNormal(place,title,false); break;
 case "commas": return this.createTagglyListNormal(place,title,true); break;
 case "sitemap":return this.createTagglyListSiteMap(place,title); break;
 }
 },

 getTaggingCount: function(title) {
 // thanks to Doug Edmunds
 if (this.config.showTaggingCounts) {
 var tagCount = store.getTaggedTiddlers(title).length;
 if (tagCount > 0)
 return " ("+tagCount+")";
 }
 return "";
 },

 // this is for normal and commas mode
 createTagglyListNormal: function(place,title,useCommas) {

 var list = store.getTaggedTiddlers(title,this.getTagglyOpt(title,"sortBy"));

 if (this.getTagglyOpt(title,"sortOrder") == "desc")
 list = list.reverse();

 var output = [];
 for (var i=0;i<list.length;i++) {
 var countString = this.getTaggingCount(list[i].title);
 if (useCommas)
 output.push((i > 0 ? ", " : "") + "[[" + list[i].title + "]]" + countString);
 else
 output.push("*[[" + list[i].title + "]]" + countString + "\n");
 }

 return this.drawTable(place,
 this.makeColumns(output,useCommas ? 1 : parseInt(this.getTagglyOpt(title,"numCols"))),
 useCommas ? "commas" : "normal");
 },

 // this is for the "grouped" mode
 createTagglyListGrouped: function(place,title) {
 var sortBy = this.getTagglyOpt(title,"sortBy");
 var sortOrder = this.getTagglyOpt(title,"sortOrder");

 var list = store.getTaggedTiddlers(title,sortBy);

 if (sortOrder == "desc")
 list = list.reverse();

 var leftOvers = []
 for (var i=0;i<list.length;i++)
 leftOvers.push(list[i].title);

 var allTagsHolder = {};
 for (var i=0;i<list.length;i++) {
 for (var j=0;j<list[i].tags.length;j++) {

 if (list[i].tags[j] != title) { // not this tiddler

 if (!allTagsHolder[list[i].tags[j]])
 allTagsHolder[list[i].tags[j]] = "";

 allTagsHolder[list[i].tags[j]] += "**[["+list[i].title+"]]"
 + this.getTaggingCount(list[i].title) + "\n";
 leftOvers.setItem(list[i].title,-1); // remove from leftovers. at the end it will contain the leftovers
 }
 }
 }

 var allTags = [];
 for (var t in allTagsHolder)
 allTags.push(t);

 var sortHelper = function(a,b) {
 if (a == b) return 0;
 if (a < b) return -1;
 return 1;
 };

 allTags.sort(function(a,b) {
 var tidA = store.getTiddler(a);
 var tidB = store.getTiddler(b);
 if (sortBy == "title") return sortHelper(a,b);
 else if (!tidA && !tidB) return 0;
 else if (!tidA) return -1;
 else if (!tidB) return +1;
 else return sortHelper(tidA[sortBy],tidB[sortBy]);
 });

 var leftOverOutput = "";
 for (var i=0;i<leftOvers.length;i++)
 leftOverOutput += "*[["+leftOvers[i]+"]]" + this.getTaggingCount(leftOvers[i]) + "\n";

 var output = [];

 if (sortOrder == "desc")
 allTags.reverse();
 else if (leftOverOutput != "")
 // leftovers first...
 output.push(leftOverOutput);

 for (var i=0;i<allTags.length;i++)
 output.push("*[["+allTags[i]+"]]" + this.getTaggingCount(leftOvers[i]) + "\n" + allTagsHolder[allTags[i]]);

 if (sortOrder == "desc" && leftOverOutput != "")
 // leftovers last...
 output.push(leftOverOutput);

 return this.drawTable(place,
 this.makeColumns(output,parseInt(this.getTagglyOpt(title,"numCols"))),
 "grouped");

 },

 // used to build site map
 treeTraverse: function(title,depth,sortBy,sortOrder) {

 var list = store.getTaggedTiddlers(title,sortBy);
 if (sortOrder == "desc")
 list.reverse();

 var indent = "";
 for (var j=0;j<depth;j++)
 indent += "*"

 var childOutput = "";
 for (var i=0;i<list.length;i++)
 if (list[i].title != title)
 childOutput += this.treeTraverse(list[i].title,depth+1,sortBy,sortOrder);

 if (depth == 0)
 return childOutput;
 else
 return indent + "[["+title+"]]" + this.getTaggingCount(title) + "\n"+childOutput;
 },

 // this if for the site map mode
 createTagglyListSiteMap: function(place,title) {
 var output = this.treeTraverse(title,0,this.getTagglyOpt(title,"sortBy"),this.getTagglyOpt(title,"sortOrder"));
 return this.drawTable(place,
 this.makeColumns(output.split(/(?=^\*\[)/m),parseInt(this.getTagglyOpt(title,"numCols"))), // regexp magic
 "sitemap"
 );
 },

 macros: {
 tagglyTagging: {
 handler: function (place,macroName,params,wikifier,paramString,tiddler) {
 var refreshContainer = createTiddlyElement(place,"div");
 // do some refresh magic to make it keep the list fresh - thanks Saq
 refreshContainer.setAttribute("refresh","macro");
 refreshContainer.setAttribute("macroName",macroName);
 refreshContainer.setAttribute("title",tiddler.title);
 this.refresh(refreshContainer);
 },

 refresh: function(place) {
 var title = place.getAttribute("title");
 removeChildren(place);
 if (store.getTaggedTiddlers(title).length > 0) {
 var lingo = config.taggly.lingo;
 config.taggly.createListControl(place,title,"hideState");
 if (config.taggly.getTagglyOpt(title,"hideState") == "show") {
 createTiddlyElement(place,"span",null,"tagglyLabel",lingo.labels.label.format([title]));
 config.taggly.createListControl(place,title,"title");
 config.taggly.createListControl(place,title,"modified");
 config.taggly.createListControl(place,title,"created");
 config.taggly.createListControl(place,title,"listMode");
 config.taggly.createListControl(place,title,"numCols");
 config.taggly.createTagglyList(place,title);
 }
 }
 }
 }
 },

 // todo fix these up a bit
 styles: 
"/*{{{*/\n"+
"/* created by TagglyTaggingPlugin */\n"+
".tagglyTagging { padding-top:0.5em; }\n"+
".tagglyTagging li.listTitle { display:none; }\n"+
".tagglyTagging ul {\n"+
" margin-top:0px; padding-top:0.5em; padding-left:2em;\n"+
" margin-bottom:0px; padding-bottom:0px;\n"+
"}\n"+
".tagglyTagging { vertical-align: top; margin:0px; padding:0px; }\n"+
".tagglyTagging table { margin:0px; padding:0px; }\n"+
".tagglyTagging .button { display:none; margin-left:3px; margin-right:3px; }\n"+
".tagglyTagging .button, .tagglyTagging .hidebutton {\n"+
" color:[[ColorPalette::TertiaryLight]]; font-size:90%;\n"+
" border:0px; padding-left:0.3em;padding-right:0.3em;\n"+
"}\n"+
".tagglyTagging .button:hover, .hidebutton:hover {\n"+
" background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]];\n"+
"}\n"+
".selected .tagglyTagging .button {\n"+
" display:inline;\n"+
"}\n"+
".tagglyTagging .hidebutton { color:[[ColorPalette::Background]]; }\n"+
".selected .tagglyTagging .hidebutton { color:[[ColorPalette::TertiaryLight]] }\n"+
".tagglyLabel { color:[[ColorPalette::TertiaryMid]]; font-size:90%; }\n"+
".tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }\n"+
".tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}\n"+
".tagglyTagging ul ul li {margin-left:0.5em; }\n"+
".editLabel { font-size:90%; padding-top:0.5em; }\n"+
".tagglyTagging .commas { padding-left:1.8em; }\n"+
"/*}}}*/\n"+
 "",

 init: function() {
 merge(config.macros,this.macros);
 config.shadowTiddlers["TagglyTaggingStyles"] = this.styles;
 if (store)
 store.addNotification("TagglyTaggingStyles",refreshStyles);
 else
 config.notifyTiddlers.push({name:"TagglyTaggingStyles", notify: refreshStyles});
 }
};

config.taggly.init();

//}}}

Founded in 1998 by Ron and Jamie Coleman, Tamarack Cellars is dedicated to the production of small lot, hand-crafted wines from select vineyards in the Walla Walla Valley, Yakima Valley, Red Mountain and Columbia Valley appellations. The winery is located in a restored WW II fire station and barracks at the Walla Walla Airport Complex.

On the web: [[Tamarack Cellars|http://www.tamarackcellars.com]]
''Year'': 2005
''Variety'': Red table wine
''Vintner'': Ridge Vineyards
''Region'': Sonoma Valley, California
''Price'': $x.xx
''Grape(s)'':
* Zinfandel (74%)
* Petite Sirah (13%)
* Carignane (8%)
* Grenache (3%)
* Mataro (2%)
''Brian's Review'': 3.5 out of 5
This is a light red, seemed to be more suitable for a desert red.  Smooth flavor and smooth finish.
/***

|Name|TiddlerWithEditPlugin|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#TiddlerWithEditPlugin|
|Version|0.2|
|Requires|~TW2.x|
!Description:
Adds 'doubleclick to edit source' capabilites to the core {{{<<tiddler>>}}} macro.

!Notes:
*because of the rewrite, only clicking on actual embedded text opens the source tiddler for editing. Clicking on any white space opens the containing tiddler for editing.

!History
*29-04-06, version 0.2, rewritten after input from Udo.
*28-04-06, version 0.1, working.

!Code
***/
//{{{
config.macros.tiddler.onTiddlerMacroDblClick = function(e){
 if (!e) var e = window.event;
 var theTarget = resolveTarget(e);
 var title= this.getAttribute("source");
 if ((version.extensions.PartTiddlerPlugin)&&(title.indexOf("/")!=-1))
 {if (!oldFetchTiddler.call(this, [title]))
 {title=title.slice(0,title.lastIndexOf("/"))}} 
 story.displayTiddler(theTarget,title,2,false,null)
 e.cancelBubble = true;
 if (e.stopPropagation) e.stopPropagation();
 return false;
 }

var oldTiddlerHandler=config.macros.tiddler.handler;
config.macros.tiddler.handler = function(place,macroName,params){
 oldTiddlerHandler.apply(this,arguments);
 place.lastChild.setAttribute("source",params[0]);
 place.lastChild.ondblclick = this.onTiddlerMacroDblClick;
}
//}}}
/***
| Name:|ToggleTagMacro|
| Description:|Makes a checkbox which toggles a tag in a tiddler|
| Version:|6.1.2|
| Date:|20-Oct-2006|
| Source:|http://tiddlyspot.com/mptw/#ToggleTagMacro|
| Author:|SimonBaird|
| License:|[[BSD open source license]]|
| CoreVersion:|2.1|
!Usage
{{{<<toggleTag }}}//{{{TagName TiddlerName LabelText}}}//{{{>>}}}
* TagName - the tag to be toggled, default value "checked"
* TiddlerName - the tiddler to toggle the tag in, default value the current tiddler
* LabelText - the text (gets wikified) to put next to the check box, default value is '{{{[[TagName]]}}}' or '{{{[[TagName]] [[TiddlerName]]}}}'
(If a parameter is '.' then the default will be used)

Examples:

|Code|Description|Example|h
|{{{<<toggleTag>>}}}|Toggles the default tag (checked) in this tiddler|<<toggleTag>>|
|{{{<<toggleTag TagName>>}}}|Toggles the TagName tag in this tiddler|<<toggleTag TagName>>|
|{{{<<toggleTag TagName TiddlerName>>}}}|Toggles the TagName tag in the TiddlerName tiddler|<<toggleTag TagName TiddlerName>>|
|{{{<<toggleTag TagName TiddlerName 'click me'>>}}}|Same but with custom label|<<toggleTag TagName TiddlerName 'click me'>>|
|{{{<<toggleTag . . 'click me'>>}}}|dot means use default value|<<toggleTag . . 'click me'>>|
(Note if TiddlerName doesn't exist it will be silently created)

!Known issues
* Doesn't smoothly handle the case where you toggle a tag in a tiddler that is current open for editing. Should it stick the tag in the edit box?

***/
//{{{

merge(config.macros,{

 toggleTag: {

 doRefreshAll: true,
 createIfRequired: true,
 shortLabel: "[[%0]]",
 longLabel: "[[%0]] [[%1]]",

 handler: function(place,macroName,params,wikifier,paramString,tiddler) {
 var tag = (params[0] && params[0] != '.') ? params[0] : "checked";
 var title = (params[1] && params[1] != '.') ? params[1] : tiddler.title;
 var defaultLabel = (title == tiddler.title ? this.shortLabel : this.longLabel);
 var label = (params[2] && params[2] != '.') ? params[2] : defaultLabel;
 var theTiddler = title == tiddler.title ? tiddler : store.getTiddler(title);
 var cb = createTiddlyCheckbox(place, label.format([tag,title]), theTiddler && theTiddler.isTagged(tag), function(e) {
 if (!store.tiddlerExists(title)) {
 if (config.macros.toggleTag.createIfRequired) {
 var content = store.getTiddlerText(title); // just in case it's a shadow
 store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);
 }
 else 
 return false;
 }
 //store.suspendNotifications(); 
 store.setTiddlerTag(title,this.checked,tag);
 //refreshDisplay(); 
 //store.resumeNotifications();
 return true;
 });
 }
 }
});

//}}}

/***
Required by Tiddlyspot
***/
//{{{

config.options.chkHttpReadOnly = false; // make it so you can by default see edit controls via http

if (window.location.protocol != "file:")
 config.options.chkGTDLazyAutoSave = false; // disable autosave in d3

config.tiddlyspotSiteId = 'vindictation';

// probably will need to redo this for TW 2.2
with (config.shadowTiddlers) {
 SiteUrl = 'http://'+config.tiddlyspotSiteId+'.tiddlyspot.com';
 SideBarOptions = SideBarOptions.replace(/(<<saveChanges>>)/,"$1<<tiddler TspotSidebar>>");
 OptionsPanel = OptionsPanel.replace(/^/,"<<tiddler TspotOptions>>");
 DefaultTiddlers = DefaultTiddlers.replace(/^/,"[[Welcome to Tiddlyspot]] ");
 MainMenu = MainMenu.replace(/^/,"[[Welcome to Tiddlyspot]] ");
}

merge(config.shadowTiddlers,{

'Welcome to Tiddlyspot':[
 "This document is a ~TiddlyWiki from tiddlyspot.com. A ~TiddlyWiki is an electronic notebook that is great for managing todo lists, personal information, and all sorts of things.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //What now?// &nbsp;&nbsp;@@ Before you can save any changes, you need to enter your password in the form below. Then configure privacy and other site settings at your [[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]] (your control panel username is //" + config.tiddlyspotSiteId + "//).",
 "<<tiddler TspotControls>>",
 "See also GettingStarted.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Working online// &nbsp;&nbsp;@@ You can edit this ~TiddlyWiki right now, and save your changes using the \"save to web\" button in the column on the right.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Working offline// &nbsp;&nbsp;@@ A fully functioning copy of this ~TiddlyWiki can be saved onto your hard drive or USB stick. You can make changes and save them locally without being connected to the Internet. When you're ready to sync up again, just click \"upload\" and your ~TiddlyWiki will be saved back to tiddlyspot.com.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Help!// &nbsp;&nbsp;@@ Find out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]]. Also visit [[TiddlyWiki Guides|http://tiddlywikiguides.org]] for documentation on learning and using ~TiddlyWiki. New users are especially welcome on the [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]], which is an excellent place to ask questions and get help. If you have a tiddlyspot related problem email [[tiddlyspot support|mailto:support@tiddlyspot.com]].",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Enjoy :)// &nbsp;&nbsp;@@ We hope you like using your tiddlyspot.com site. Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions."
].join("\n"),

'TspotControls':[
 "| tiddlyspot password:|<<option pasUploadPassword>>|",
 "| site management:|<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">>//(requires tiddlyspot password)//<<br>>[[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]], [[download (go offline)|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download]]|",
 "| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[announcements|http://announce.tiddlyspot.com/]], [[blog|http://tiddlyspot.com/blog/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|"
].join("\n"),

'TspotSidebar':[
 "<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">><html><a href='http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download' class='button'>download</a></html>"
].join("\n"),

'TspotOptions':[
 "tiddlyspot password:",
 "<<option pasUploadPassword>>",
 ""
].join("\n")

});
//}}}
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 19/4/2007 13:6:2 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 19/4/2007 13:8:36 | BrianG | [[vindictation.html|file:///C:/Documents%20and%20Settings/briang/Local%20Settings/Temp/vindictation.html]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |
| 19/4/2007 13:34:18 | BrianG | [[vindictation.html|file:///C:/Documents%20and%20Settings/briang/Local%20Settings/Temp/vindictation.html]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 19/4/2007 13:37:9 | BrianG | [[/|http://vindictation.tiddlyspot.com/#%5B%5BWelcome%20to%20Tiddlyspot%5D%5D%20GettingStarted]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |
| 19/4/2007 15:15:22 | BrianG | [[/|http://vindictation.tiddlyspot.com/#%5B%5BWelcome%20to%20Tiddlyspot%5D%5D%20GettingStarted]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |
| 19/4/2007 15:20:37 | BrianG | [[/|http://vindictation.tiddlyspot.com/#%5B%5BWelcome%20to%20Tiddlyspot%5D%5D%20GettingStarted]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 19/4/2007 15:32:41 | BrianG | [[vindictation-1.html|file:///C:/DOCUME~1/briang/LOCALS~1/Temp/vindictation-1.html]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 19/4/2007 15:56:37 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |
| 19/4/2007 16:18:42 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |
| 19/4/2007 16:19:32 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |
| 19/4/2007 16:23:33 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 19/4/2007 16:40:52 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 19/4/2007 21:10:26 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |
| 19/4/2007 21:21:51 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |
| 19/4/2007 21:26:14 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 19/4/2007 21:29:48 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 19/4/2007 21:58:42 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 20/4/2007 7:33:55 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 20/4/2007 10:47:34 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 20/4/2007 10:54:22 | BrianG | [[vindictation.html|file:///C:/DOCUME~1/briang/LOCALS~1/Temp/vindictation.html]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 20/4/2007 10:55:5 | BrianG | [[index.html|http://vindictation.tiddlyspot.com/index.html]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |
| 20/4/2007 11:4:37 | BrianG | [[index.html|http://vindictation.tiddlyspot.com/index.html#%5B%5BWines%20by%20Vintner%5D%5D]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 20/4/2007 11:8:6 | BrianG | [[index.html|http://vindictation.tiddlyspot.com/index.html#AdvancedOptions]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 20/4/2007 11:11:52 | BrianG | [[vindictation-1.html|file:///C:/DOCUME~1/briang/LOCALS~1/Temp/vindictation-1.html#%5B%5BWines%20by%20Vintner%5D%5D]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 20/4/2007 13:53:55 | BrianG | [[empty.html|file:///C:/Documents%20and%20Settings/briang/Desktop/empty.html#%5B%5BWines%20by%20Vintner%5D%5D]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 20/4/2007 17:21:55 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 23/4/2007 16:13:42 | BrianG | [[vindictation-2.html|file:///C:/DOCUME~1/briang/LOCALS~1/Temp/vindictation-2.html#About]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 23/4/2007 16:37:32 | BrianG | [[vindictation-3.html|file:///C:/DOCUME~1/briang/LOCALS~1/Temp/vindictation-3.html#PluginManager]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 2/5/2007 20:29:43 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 8/5/2007 20:56:52 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 15/5/2007 9:48:19 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 5/6/2007 21:3:8 | BrianG | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 11/2/2015 21:55:0 | Cheshyrekatt | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 11/2/2015 21:55:15 | Cheshyrekatt | [[/|http://vindictation.tiddlyspot.com/]] | [[store.cgi|http://vindictation.tiddlyspot.com/store.cgi]] | . | index.html | . |
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|3.4.5|
|''Date:''|Oct 15, 2006|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadDoc|
|''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.0.0|
|''Browser:''|Firefox 1.5; InternetExplorer 6.0; Safari|
|''Include:''|config.lib.file; config.lib.log; config.lib.options; PasswordTweak|
|''Require:''|[[UploadService|http://tiddlywiki.bidix.info/#UploadService]]|
***/
//{{{
version.extensions.UploadPlugin = {
 major: 3, minor: 4, revision: 5, 
 date: new Date(2006,9,15),
 source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
 documentation: 'http://tiddlywiki.bidix.info/#UploadDoc',
 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.0.0',
 browser: 'Firefox 1.5; InternetExplorer 6.0; Safari'
};
//}}}

////+++!![config.lib.file]

//{{{
if (!config.lib) config.lib = {};
if (!config.lib.file) config.lib.file= {
 author: 'BidiX',
 version: {major: 0, minor: 1, revision: 0}, 
 date: new Date(2006,3,9)
};
config.lib.file.dirname = function (filePath) {
 var lastpos;
 if ((lastpos = filePath.lastIndexOf("/")) != -1) {
 return filePath.substring(0, lastpos);
 } else {
 return filePath.substring(0, filePath.lastIndexOf("\\"));
 }
};
config.lib.file.basename = function (filePath) {
 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);
};
window.basename = function() {return "@@deprecated@@";};
//}}}
////===

////+++!![config.lib.log]

//{{{
if (!config.lib) config.lib = {};
if (!config.lib.log) config.lib.log= {
 author: 'BidiX',
 version: {major: 0, minor: 1, revision: 1}, 
 date: new Date(2006,8,19)
};
config.lib.Log = function(tiddlerTitle, logHeader) {
 if (version.major < 2)
 this.tiddler = store.tiddlers[tiddlerTitle];
 else
 this.tiddler = store.getTiddler(tiddlerTitle);
 if (!this.tiddler) {
 this.tiddler = new Tiddler();
 this.tiddler.title = tiddlerTitle;
 this.tiddler.text = "| !date | !user | !location |" + logHeader;
 this.tiddler.created = new Date();
 this.tiddler.modifier = config.options.txtUserName;
 this.tiddler.modified = new Date();
 if (version.major < 2)
 store.tiddlers[tiddlerTitle] = this.tiddler;
 else
 store.addTiddler(this.tiddler);
 }
 return this;
};

config.lib.Log.prototype.newLine = function (line) {
 var now = new Date();
 var newText = "| ";
 newText += now.getDate()+"/"+(now.getMonth()+1)+"/"+now.getFullYear() + " ";
 newText += now.getHours()+":"+now.getMinutes()+":"+now.getSeconds()+" | ";
 newText += config.options.txtUserName + " | ";
 var location = document.location.toString();
 var filename = config.lib.file.basename(location);
 if (!filename) filename = '/';
 newText += "[["+filename+"|"+location + "]] |";
 this.tiddler.text = this.tiddler.text + "\n" + newText;
 this.addToLine(line);
};

config.lib.Log.prototype.addToLine = function (text) {
 this.tiddler.text = this.tiddler.text + text;
 this.tiddler.modifier = config.options.txtUserName;
 this.tiddler.modified = new Date();
 if (version.major < 2)
 store.tiddlers[this.tiddler.tittle] = this.tiddler;
 else {
 store.addTiddler(this.tiddler);
 story.refreshTiddler(this.tiddler.title);
 store.notify(this.tiddler.title, true);
 }
 if (version.major < 2)
 store.notifyAll(); 
};
//}}}
////===

////+++!![config.lib.options]

//{{{
if (!config.lib) config.lib = {};
if (!config.lib.options) config.lib.options = {
 author: 'BidiX',
 version: {major: 0, minor: 1, revision: 0}, 
 date: new Date(2006,3,9)
};

config.lib.options.init = function (name, defaultValue) {
 if (!config.options[name]) {
 config.options[name] = defaultValue;
 saveOptionCookie(name);
 }
};
//}}}
////===

////+++!![PasswordTweak]

//{{{
version.extensions.PasswordTweak = {
 major: 1, minor: 0, revision: 3, date: new Date(2006,8,30),
 type: 'tweak',
 source: 'http://tiddlywiki.bidix.info/#PasswordTweak'
};
//}}}
/***
!!config.macros.option
***/
//{{{
config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordType = "password"; // password | text

config.macros.option.onChangeOption = function(e)
{
 var opt = this.getAttribute("option");
 var elementType,valueField;
 if(opt) {
 switch(opt.substr(0,3)) {
 case "txt":
 elementType = "input";
 valueField = "value";
 break;
 case "pas":
 elementType = "input";
 valueField = "value";
 break;
 case "chk":
 elementType = "input";
 valueField = "checked";
 break;
 }
 config.options[opt] = this[valueField];
 saveOptionCookie(opt);
 var nodes = document.getElementsByTagName(elementType);
 for(var t=0; t<nodes.length; t++) 
 {
 var optNode = nodes[t].getAttribute("option");
 if (opt == optNode) 
 nodes[t][valueField] = this[valueField];
 }
 }
 return(true);
};

config.macros.option.handler = function(place,macroName,params)
{
 var opt = params[0];
 if(config.options[opt] === undefined) {
 return;}
 var c;
 switch(opt.substr(0,3)) {
 case "txt":
 c = document.createElement("input");
 c.onkeyup = this.onChangeOption;
 c.setAttribute ("option",opt);
 c.className = "txtOptionInput "+opt;
 place.appendChild(c);
 c.value = config.options[opt];
 break;
 case "pas":
 // input password
 c = document.createElement ("input");
 c.setAttribute("type",config.macros.option.passwordType);
 c.onkeyup = this.onChangeOption;
 c.setAttribute("option",opt);
 c.className = "pasOptionInput "+opt;
 place.appendChild(c);
 c.value = config.options[opt];
 // checkbox link with this password "save this password on this computer"
 c = document.createElement("input");
 c.setAttribute("type","checkbox");
 c.onclick = this.onChangeOption;
 c.setAttribute("option","chk"+opt);
 c.className = "chkOptionInput "+opt;
 place.appendChild(c);
 c.checked = config.options["chk"+opt];
 // text savePasswordCheckboxLabel
 place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
 break;
 case "chk":
 c = document.createElement("input");
 c.setAttribute("type","checkbox");
 c.onclick = this.onChangeOption;
 c.setAttribute("option",opt);
 c.className = "chkOptionInput "+opt;
 place.appendChild(c);
 c.checked = config.options[opt];
 break;
 }
};
//}}}
/***
!! Option cookie stuff
***/
//{{{
window.loadOptionsCookie_orig_PasswordTweak = window.loadOptionsCookie;
window.loadOptionsCookie = function()
{
 var cookies = document.cookie.split(";");
 for(var c=0; c<cookies.length; c++) {
 var p = cookies[c].indexOf("=");
 if(p != -1) {
 var name = cookies[c].substr(0,p).trim();
 var value = cookies[c].substr(p+1).trim();
 switch(name.substr(0,3)) {
 case "txt":
 config.options[name] = unescape(value);
 break;
 case "pas":
 config.options[name] = unescape(value);
 break;
 case "chk":
 config.options[name] = value == "true";
 break;
 }
 }
 }
};

window.saveOptionCookie_orig_PasswordTweak = window.saveOptionCookie;
window.saveOptionCookie = function(name)
{
 var c = name + "=";
 switch(name.substr(0,3)) {
 case "txt":
 c += escape(config.options[name].toString());
 break;
 case "chk":
 c += config.options[name] ? "true" : "false";
 // is there an option link with this chk ?
 if (config.options[name.substr(3)]) {
 saveOptionCookie(name.substr(3));
 }
 break;
 case "pas":
 if (config.options["chk"+name]) {
 c += escape(config.options[name].toString());
 } else {
 c += "";
 }
 break;
 }
 c += "; expires=Fri, 1 Jan 2038 12:00:00 UTC; path=/";
 document.cookie = c;
};
//}}}
/***
!! Initializations
***/
//{{{
// define config.options.pasPassword
if (!config.options.pasPassword) {
 config.options.pasPassword = 'defaultPassword';
 window.saveOptionCookie('pasPassword');
}
// since loadCookies is first called befor password definition
// we need to reload cookies
window.loadOptionsCookie();
//}}}
////===

////+++!![config.macros.upload]

//{{{
config.macros.upload = {
 accessKey: "U",
 formName: "UploadPlugin",
 contentType: "text/html;charset=UTF-8",
 defaultStoreScript: "store.php"
};

// only this two configs need to be translated
config.macros.upload.messages = {
 aboutToUpload: "About to upload TiddlyWiki to %0",
 backupFileStored: "Previous file backuped in %0",
 crossDomain: "Certainly a cross-domain isue: access to an other site isn't allowed",
 errorDownloading: "Error downloading",
 errorUploadingContent: "Error uploading content",
 fileLocked: "Files is locked: You are not allowed to Upload",
 fileNotFound: "file to upload not found",
 fileNotUploaded: "File %0 NOT uploaded",
 mainFileUploaded: "Main TiddlyWiki file uploaded to %0",
 passwordEmpty: "Unable to upload, your password is empty",
 urlParamMissing: "url param missing",
 rssFileNotUploaded: "RssFile %0 NOT uploaded",
 rssFileUploaded: "Rss File uploaded to %0"
};

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: "upload" 
};

config.macros.upload.handler = function(place,macroName,params){
 // parameters initialization
 var storeUrl = params[0];
 var toFilename = params[1];
 var backupDir = params[2];
 var uploadDir = params[3];
 var username = params[4];
 var password; // for security reason no password as macro parameter
 var label;
 if (document.location.toString().substr(0,4) == "http")
 label = this.label.saveLabel;
 else
 label = this.label.uploadLabel;
 var prompt;
 if (storeUrl) {
 prompt = this.label.promptParamMacro.toString().format([this.toDirUrl(storeUrl, uploadDir, username)]);
 }
 else {
 prompt = this.label.promptOption;
 }
 createTiddlyButton(place, label, prompt, 
 function () {
 config.macros.upload.upload(storeUrl, toFilename, uploadDir, backupDir, username, password); 
 return false;}, 
 null, null, this.accessKey);
};
config.macros.upload.UploadLog = function() {
 return new config.lib.Log('UploadLog', " !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |" );
};
config.macros.upload.UploadLog.prototype = config.lib.Log.prototype;
config.macros.upload.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {
 var line = " [[" + config.lib.file.basename(storeUrl) + "|" + storeUrl + "]] | ";
 line += uploadDir + " | " + toFilename + " | " + backupDir + " |";
 this.newLine(line);
};
config.macros.upload.UploadLog.prototype.endUpload = function() {
 this.addToLine(" Ok |");
};
config.macros.upload.basename = config.lib.file.basename;
config.macros.upload.dirname = config.lib.file.dirname;
config.macros.upload.toRootUrl = function (storeUrl, username)
{
 return root = (this.dirname(storeUrl)?this.dirname(storeUrl):this.dirname(document.location.toString()));
}
config.macros.upload.toDirUrl = function (storeUrl, uploadDir, username)
{
 var root = this.toRootUrl(storeUrl, username);
 if (uploadDir && uploadDir != '.')
 root = root + '/' + uploadDir;
 return root;
}
config.macros.upload.toFileUrl = function (storeUrl, toFilename, uploadDir, username)
{
 return this.toDirUrl(storeUrl, uploadDir, username) + '/' + toFilename;
}
config.macros.upload.upload = function(storeUrl, toFilename, uploadDir, backupDir, username, password)
{
 // parameters initialization
 storeUrl = (storeUrl ? storeUrl : config.options.txtUploadStoreUrl);
 toFilename = (toFilename ? toFilename : config.options.txtUploadFilename);
 backupDir = (backupDir ? backupDir : config.options.txtUploadBackupDir);
 uploadDir = (uploadDir ? uploadDir : config.options.txtUploadDir);
 username = (username ? username : config.options.txtUploadUserName);
 password = config.options.pasUploadPassword; // for security reason no password as macro parameter
 if (!password || password === '') {
 alert(config.macros.upload.messages.passwordEmpty);
 return;
 }
 if (storeUrl === '') {
 storeUrl = config.macros.upload.defaultStoreScript;
 }
 if (config.lib.file.dirname(storeUrl) === '') {
 storeUrl = config.lib.file.dirname(document.location.toString())+'/'+storeUrl;
 }
 if (toFilename === '') {
 toFilename = config.lib.file.basename(document.location.toString());
 }

 clearMessage();
 // only for forcing the message to display
 if (version.major < 2)
 store.notifyAll();
 if (!storeUrl) {
 alert(config.macros.upload.messages.urlParamMissing);
 return;
 }
 // Check that file is not locked
 if (window.BidiX && BidiX.GroupAuthoring && BidiX.GroupAuthoring.lock) {
 if (BidiX.GroupAuthoring.lock.isLocked() && !BidiX.GroupAuthoring.lock.isMyLock()) {
 alert(config.macros.upload.messages.fileLocked);
 return;
 }
 }
 
 var log = new this.UploadLog();
 log.startUpload(storeUrl, toFilename, uploadDir, backupDir);
 if (document.location.toString().substr(0,5) == "file:") {
 saveChanges();
 }
 var toDir = config.macros.upload.toDirUrl(storeUrl, toFilename, uploadDir, username);
 displayMessage(config.macros.upload.messages.aboutToUpload.format([toDir]), toDir);
 this.uploadChanges(storeUrl, toFilename, uploadDir, backupDir, username, password);
 if(config.options.chkGenerateAnRssFeed) {
 //var rssContent = convertUnicodeToUTF8(generateRss());
 var rssContent = generateRss();
 var rssPath = toFilename.substr(0,toFilename.lastIndexOf(".")) + ".xml";
 this.uploadContent(rssContent, storeUrl, rssPath, uploadDir, '', username, password, 
 function (responseText) {
 if (responseText.substring(0,1) != '0') {
 displayMessage(config.macros.upload.messages.rssFileNotUploaded.format([rssPath]));
 }
 else {
 var toFileUrl = config.macros.upload.toFileUrl(storeUrl, rssPath, uploadDir, username);
 displayMessage(config.macros.upload.messages.rssFileUploaded.format(
 [toFileUrl]), toFileUrl);
 }
 // for debugging store.php uncomment last line
 //DEBUG alert(responseText);
 });
 }
 return;
};

config.macros.upload.uploadChanges = function(storeUrl, toFilename, uploadDir, backupDir, 
 username, password) {
 var original;
 if (document.location.toString().substr(0,4) == "http") {
 original = this.download(storeUrl, toFilename, uploadDir, backupDir, username, password);
 return;
 }
 else {
 // standard way : Local file
 
 original = loadFile(getLocalPath(document.location.toString()));
 if(window.Components) {
 // it's a mozilla browser
 try {
 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
 var converter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"]
 .createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
 converter.charset = "UTF-8";
 original = converter.ConvertToUnicode(original);
 }
 catch(e) {
 }
 }
 }
 //DEBUG alert(original);
 this.uploadChangesFrom(original, storeUrl, toFilename, uploadDir, backupDir, 
 username, password);
};

config.macros.upload.uploadChangesFrom = function(original, storeUrl, toFilename, uploadDir, backupDir, 
 username, password) {
 var startSaveArea = '<div id="' + 'storeArea">'; // Split up into two so that indexOf() of this source doesn't find it
 var endSaveArea = '</d' + 'iv>';
 // Locate the storeArea div's
 var posOpeningDiv = original.indexOf(startSaveArea);
 var posClosingDiv = original.lastIndexOf(endSaveArea);
 if((posOpeningDiv == -1) || (posClosingDiv == -1))
 {
 alert(config.messages.invalidFileError.format([document.location.toString()]));
 return;
 }
 var revised = original.substr(0,posOpeningDiv + startSaveArea.length) + 
 allTiddlersAsHtml() + "\n\t\t" +
 original.substr(posClosingDiv);
 var newSiteTitle;
 if(version.major < 2){
 newSiteTitle = (getElementText("siteTitle") + " - " + getElementText("siteSubtitle")).htmlEncode();
 } else {
 newSiteTitle = (wikifyPlain ("SiteTitle") + " - " + wikifyPlain ("SiteSubtitle")).htmlEncode();
 }

 revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
 revised = revised.replaceChunk("<!--PRE-HEAD-START--"+">","<!--PRE-HEAD-END--"+">","\n" + store.getTiddlerText("MarkupPreHead","") + "\n");
 revised = revised.replaceChunk("<!--POST-HEAD-START--"+">","<!--POST-HEAD-END--"+">","\n" + store.getTiddlerText("MarkupPostHead","") + "\n");
 revised = revised.replaceChunk("<!--PRE-BODY-START--"+">","<!--PRE-BODY-END--"+">","\n" + store.getTiddlerText("MarkupPreBody","") + "\n");
 revised = revised.replaceChunk("<!--POST-BODY-START--"+">","<!--POST-BODY-END--"+">","\n" + store.getTiddlerText("MarkupPostBody","") + "\n");

 var response = this.uploadContent(revised, storeUrl, toFilename, uploadDir, backupDir, 
 username, password, function (responseText) {
 if (responseText.substring(0,1) != '0') {
 alert(responseText);
 displayMessage(config.macros.upload.messages.fileNotUploaded.format([getLocalPath(document.location.toString())]));
 }
 else {
 if (uploadDir !== '') {
 toFilename = uploadDir + "/" + config.macros.upload.basename(toFilename);
 } else {
 toFilename = config.macros.upload.basename(toFilename);
 }
 var toFileUrl = config.macros.upload.toFileUrl(storeUrl, toFilename, uploadDir, username);
 if (responseText.indexOf("destfile:") > 0) {
 var destfile = responseText.substring(responseText.indexOf("destfile:")+9, 
 responseText.indexOf("\n", responseText.indexOf("destfile:")));
 toFileUrl = config.macros.upload.toRootUrl(storeUrl, username) + '/' + destfile;
 }
 else {
 toFileUrl = config.macros.upload.toFileUrl(storeUrl, toFilename, uploadDir, username);
 }
 displayMessage(config.macros.upload.messages.mainFileUploaded.format(
 [toFileUrl]), toFileUrl);
 if (backupDir && responseText.indexOf("backupfile:") > 0) {
 var backupFile = responseText.substring(responseText.indexOf("backupfile:")+11, 
 responseText.indexOf("\n", responseText.indexOf("backupfile:")));
 toBackupUrl = config.macros.upload.toRootUrl(storeUrl, username) + '/' + backupFile;
 displayMessage(config.macros.upload.messages.backupFileStored.format(
 [toBackupUrl]), toBackupUrl);
 }
 var log = new config.macros.upload.UploadLog();
 log.endUpload();
 store.setDirty(false);
 // erase local lock
 if (window.BidiX && BidiX.GroupAuthoring && BidiX.GroupAuthoring.lock) {
 BidiX.GroupAuthoring.lock.eraseLock();
 // change mtime with new mtime after upload
 var mtime = responseText.substr(responseText.indexOf("mtime:")+6);
 BidiX.GroupAuthoring.lock.mtime = mtime;
 }
 
 
 }
 // for debugging store.php uncomment last line
 //DEBUG alert(responseText);
 }
 );
};

config.macros.upload.uploadContent = function(content, storeUrl, toFilename, uploadDir, backupDir, 
 username, password, callbackFn) {
 var boundary = "---------------------------"+"AaB03x"; 
 var request;
 try {
 request = new XMLHttpRequest();
 } 
 catch (e) { 
 request = new ActiveXObject("Msxml2.XMLHTTP"); 
 }
 if (window.netscape){
 try {
 if (document.location.toString().substr(0,4) != "http") {
 netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');}
 }
 catch (e) {}
 } 
 //DEBUG alert("user["+config.options.txtUploadUserName+"] password[" + config.options.pasUploadPassword + "]");
 // compose headers data
 var sheader = "";
 sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
 sheader += config.macros.upload.formName +"\"\r\n\r\n";
 sheader += "backupDir="+backupDir
 +";user=" + username 
 +";password=" + password
 +";uploaddir=" + uploadDir;
 // add lock attributes to sheader
 if (window.BidiX && BidiX.GroupAuthoring && BidiX.GroupAuthoring.lock) {
 var l = BidiX.GroupAuthoring.lock.myLock;
 sheader += ";lockuser=" + l.user
 + ";mtime=" + l.mtime
 + ";locktime=" + l.locktime;
 }
 sheader += ";;\r\n"; 
 sheader += "\r\n" + "--" + boundary + "\r\n";
 sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+toFilename+"\"\r\n";
 sheader += "Content-Type: " + config.macros.upload.contentType + "\r\n";
 sheader += "Content-Length: " + content.length + "\r\n\r\n";
 // compose trailer data
 var strailer = new String();
 strailer = "\r\n--" + boundary + "--\r\n";
 //strailer = "--" + boundary + "--\r\n";
 var data;
 data = sheader + content + strailer;
 //request.open("POST", storeUrl, true, username, password);
 try {
 request.open("POST", storeUrl, true); 
 }
 catch(e) {
 alert(config.macros.upload.messages.crossDomain + "\nError:" +e);
 exit;
 }
 request.onreadystatechange = function () {
 if (request.readyState == 4) {
 if (request.status == 200)
 callbackFn(request.responseText);
 else
 alert(config.macros.upload.messages.errorUploadingContent + "\nStatus: "+request.status.statusText);
 }
 };
 request.setRequestHeader("Content-Length",data.length);
 request.setRequestHeader("Content-Type","multipart/form-data; boundary="+boundary);
 request.send(data); 
};


config.macros.upload.download = function(uploadUrl, uploadToFilename, uploadDir, uploadBackupDir, 
 username, password) {
 var request;
 try {
 request = new XMLHttpRequest();
 } 
 catch (e) { 
 request = new ActiveXObject("Msxml2.XMLHTTP"); 
 }
 try {
 if (uploadUrl.substr(0,4) == "http") {
 netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
 }
 else {
 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
 }
 } catch (e) { }
 //request.open("GET", document.location.toString(), true, username, password);
 try {
 request.open("GET", document.location.toString(), true);
 }
 catch(e) {
 alert(config.macros.upload.messages.crossDomain + "\nError:" +e);
 exit;
 }
 
 request.onreadystatechange = function () {
 if (request.readyState == 4) {
 if(request.status == 200) {
 config.macros.upload.uploadChangesFrom(request.responseText, uploadUrl, 
 uploadToFilename, uploadDir, uploadBackupDir, username, password);
 }
 else
 alert(config.macros.upload.messages.errorDownloading.format(
 [document.location.toString()]) + "\nStatus: "+request.status.statusText);
 }
 };
 request.send(null);
};

//}}}
////===

////+++!![Initializations]

//{{{
config.lib.options.init('txtUploadStoreUrl','store.php');
config.lib.options.init('txtUploadFilename','');
config.lib.options.init('txtUploadDir','');
config.lib.options.init('txtUploadBackupDir','');
config.lib.options.init('txtUploadUserName',config.options.txtUserName);
config.lib.options.init('pasUploadPassword','');
setStylesheet(
 ".pasOptionInput {width: 11em;}\n"+
 ".txtOptionInput.txtUploadStoreUrl {width: 25em;}\n"+
 ".txtOptionInput.txtUploadFilename {width: 25em;}\n"+
 ".txtOptionInput.txtUploadDir {width: 25em;}\n"+
 ".txtOptionInput.txtUploadBackupDir {width: 25em;}\n"+
 "",
 "UploadOptionsStyles");
if (document.location.toString().substr(0,4) == "http") {
 config.options.chkAutoSave = false; 
 saveOptionCookie('chkAutoSave');
}
config.shadowTiddlers.UploadDoc = "[[Full Documentation|http://tiddlywiki.bidix.info/l#UploadDoc ]]\n"; 

//}}}
////===

////+++!![Core Hijacking]

//{{{
config.macros.saveChanges.label_orig_UploadPlugin = config.macros.saveChanges.label;
config.macros.saveChanges.label = config.macros.upload.label.saveToDisk;

config.macros.saveChanges.handler_orig_UploadPlugin = config.macros.saveChanges.handler;

config.macros.saveChanges.handler = function(place)
{
 if ((!readOnly) && (document.location.toString().substr(0,4) != "http"))
 createTiddlyButton(place,this.label,this.prompt,this.onClick,null,null,this.accessKey);
};

//}}}
////===

<!--{{{-->
<div class='toolbar' macro='toolbar closeTiddler closeOthers +editTiddler permalink references jump'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date [[DD MMM YYYY]]'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date [[DD MMM YYYY]]'></span>)</div>
<div class='tagged' macro='tags'></div>
<div class='tagging' macro='tagging'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
The Vin du Lac winery sits on a hilltop rising 200 feet above Lake Chelan, with superb views of the lake, Chelan Butte, and the town of Chelan.  The grounds have been orchard land since the 1920's, and one half of the property remains working orchard.  Seven acres of vineyard were planted in the spring of 2002.
 
The winery itself is housed in two old orchard sheds that were fully remodeled and updated to serve as modern winery production facilities.  Remnants of the buildings' former character remain, including the hand-laid stone foundation of the barrel room, which bears the inscription "Sept. 1937".

On the web: [[Vin du Lac of Chelan|http://www.vindulac.com]]
''Year'': 2003
''Variety'': Red table wine
''Vintner'': Latitude 46N
''Region'': Columbia Valley, Washington
''Price'': $x.xx
''Grape(s)'':
* Merlot (70%)
* Cabernet Sauvignon (26%)
* Syrah (4%)
''Brian's Review'': 4.5 out of 5
Another excellent blend from Washington State.  The fullness and boldness of the main grape, Merlot, is offset by the rich contributions of Cab Sauv and Syrah.  I wonderful wine that can stand up to the heartiest of meals....yet is good enough for a relaxing drink after dinner.
/***
|''Name:''|WikiBar|
|''Version:''|2.0.0 beta3|
|''Source:''|[[AiddlyWiki|http://aiddlywiki.sourceforge.net]]|
|''Author:''|[[Arphen Lin|mailto:arphenlin@gmail.com]]|
|''Type:''|toolbar macro command extension|
|''Required:''|TiddlyWiki 2.0.0 beta6|
!Description
WikiBar is a toolbar that gives access to most of TiddlyWiki's formatting features with a few clicks. It's a handy tool for people who are not familiar with TiddlyWiki syntax.
Besides, with WikiBar-addons, users can extend the power of WikiBar.
!Support browser
*Firefox 1.5
!Revision history
*v2.0.0 beta3 (2005/12/30)
** remove macros (replaced by TWMacro addon)
** add wikibar command in toolbar automatically
** rename DOIT to HANDLER
** rename TIP to TOOLTIP
*v2.0.0 beta2 (2005/12/21)
** re-design Wikibar addon framework
*v2.0.0 beta1 (2005/12/14)
** Note:
*** WikiBarPlugin is renamed to WikiBar
** New Features:
*** support TiddlyWiki 2.0.0 template mechanism
*** new wikibar data structure
*** new wikibar-addon framework for developers
**** support dynamic popup menu generator
*** support most new macros added in TiddlyWiki 2.0.0
*** multi-level popup menu
*** fix wikibar tab stop
*** remove paletteSelector
** Known Bugs:
*** popup-menu and color-picker can't be closed correctly
*** some macros can't be displayed correctly in previewer
*** text in previewer will be displayed italic
*v1.2.0 (2005/11/21)
**New Features:
***User defined color palettes supported
####Get color palettes from [[ColorZilla Palettes|http://www.iosart.com/firefox/colorzilla/palettes.html]].
####Save the palette file(*.gpl) as a new tiddler and tag it with 'ColorPalettes', then you can use it in WikiBar.
***WikiBar style sheet supported
***Click on document to close current colorPicker, paletteSelector or aboutWikibar
*v1.1.1 (2005/11/03)
**Bugs fixed:
***'Not enough parameters!' message is displayed when the parameter includes '%+number', ex: 'hello%20world!'
*v1.1.0 (2005/11/01)
**Bugs fixed:
***WikiBar overruns (reported by by GeoffS <gslocock@yahoo.co.uk>)
**New features:
***Insert a color code at the cursor. (Thanks to RunningUtes <RunningUtes@gmail.com>)
***Enable gradient macro. (Thanks to RunningUtes <RunningUtes@gmail.com>)
***Insert tiddler comment tags {{{/% ... %/}}}. (new feature supported by TiddlyWiki 1.2.37)
***Insert DateFormatString for {{{<<today>>}}} macro. (new feature supported by TiddlyWiki 1.2.37)
**Enhanced:
***Allow optional parameters in syntax.
**Bugs:
***'Not enough parameters!' message is displayed when the parameter includes '%+number', ex: 'hello%20world!'
*v1.0.0 (2005/10/30)
**Initial release
!Code
***/
//{{{
config.macros.wikibar = {major: 2, minor: 0, revision: 0, beta: 3, date: new Date(2005,12,30)};
config.macros.wikibar.handler = function(place,macroName,params,wikifier,paramString,tiddler){
 if(!(tiddler instanceof Tiddler)) {return;}
 story.setDirty(tiddler.title,true);
 place.id = 'wikibar'+tiddler.title;
 place.className = 'toolbar wikibar';
};
function wikibar_install(){
 config.commands.wikibar = {
 text: 'wikibar',
 tooltip: 'wikibar on/off',
 handler: function(e,src,title) {
 if(!e){ e = window.event; }
 var theButton = resolveTarget(e);
 theButton.id = 'wikibarButton'+title;
 wikibarPopup.remove();
 wikibar_installAddons(theButton, title);
 wikibar_createWikibar(title);
 return(false);
 }
 };
 config.shadowTiddlers['EditTemplate'] = wikibar_addWikibarCommand(config.shadowTiddlers['EditTemplate']);
 var tiddler = store.getTiddler('EditTemplate');
 if(tiddler){
 tiddler.text = wikibar_addWikibarCommand(tiddler.text);
 }
}
function wikibar_installAddons(theButton, title){
 var tiddlers = store.getTaggedTiddlers('wikibarAddons');
 if(!tiddlers) { return; }
 theButton.addons=[];
 for(var i=0; i<tiddlers.length; i++){
 try{
 eval(tiddlers[i].text);
 try{
 wikibar_addonInstall(title);
 wikibar_addonInstall = null;
 theButton.addons.push({ok:true, name:tiddlers[i].title});
 }catch(ex){
 theButton.addons.push({ok:false, name:tiddlers[i].title, error:ex});
 }
 }catch(ex){
 theButton.addons.push({ok:false, name:tiddlers[i].title, error:ex});
 }
 }
}
function wikibar_addWikibarCommand(tiddlerText){
 var div = document.createElement('div');
 div.style.display = 'none';
 div.innerHTML = tiddlerText;
 for(var i=0; i<div.childNodes.length; i++){
 var o=div.childNodes[i];
 if(o.tagName==='DIV'){
 if(o.className=='toolbar'){
 var macroText = o.getAttribute('macro').trim();
 if(macroText.search('wikibar')<=0){
 macroText += ' wikibar';
 o.setAttribute('macro', macroText);
 }
 break;
 }
 }
 }
 return div.innerHTML.replace(/\"/g, "\'");
}
function wikibar_processSyntaxParams(theSyntax, params){
 try{
 var pcr = 'AplWikibarPcr';
 var rx=null;
 var allParams=null;
 if(params){
 if(typeof(params)=='object'){
 for(var i=0; i<params.length; i++){
 if(params[i]){
 params[i] = params[i].replace(new RegExp('%','g'), pcr).trim();
 rx = '(\\[%'+(i+1)+'\\])' + '|' + '(%'+(i+1)+')';
 theSyntax = theSyntax.replace(new RegExp(rx,'g'), params[i] );
 }
 }
 allParams = params.join(' ').trim();
 }else{
 allParams = params.replace(new RegExp('%','g'), pcr).trim();
 rx = /(\[%1{1}\])|(%1{1})/g;
 theSyntax = theSyntax.replace(rx, allParams);
 }
 }
 if(allParams){
 theSyntax = theSyntax.replace(new RegExp('%N{1}','g'), allParams);
 }
 rx=/\[%(([1-9]{1,}[0-9]{0,})|(N{1}))\]/g;
 theSyntax = theSyntax.replace(rx, '');
 rx=/%(([1-9]{1,}[0-9]{0,})|(N{1}))/g;
 if( theSyntax.match(rx) ){
 throw 'Not enough parameters! ' + theSyntax;
 }
 theSyntax=theSyntax.replace(new RegExp(pcr,'g'), '%');
 return theSyntax;
 } catch(ex){
 return null;
 }
}
function wikibar_resolveEditItem(tiddlerWrapper, itemName){
 if(tiddlerWrapper.hasChildNodes()){
 var c=tiddlerWrapper.childNodes;
 for(var i=0; i<c.length; i++){
 var txt=wikibar_resolveEditItem(c[i], itemName);
 if(!txt){
 continue;
 }else{
 return txt;
 }
 }
 }
 return ((tiddlerWrapper.getAttribute && tiddlerWrapper.getAttribute('edit')==itemName)? tiddlerWrapper : null);
}
function wikibar_resolveEditItemValue(tiddlerWrapper, itemName){
 var o = wikibar_resolveEditItem(tiddlerWrapper, itemName);
 return (o? o.value.replace(/\r/mg,'') : null);
}
function wikibar_resolveTiddlerEditorWrapper(obj){
 if(obj.id=='tiddlerDisplay'){return null;}
 if((obj.getAttribute && obj.getAttribute('macro')=='edit text')){return obj;}
 return wikibar_resolveTiddlerEditorWrapper(obj.parentNode);
}
function wikibar_resolveTiddlerEditor(obj){
 if(obj.hasChildNodes()){
 var c = obj.childNodes;
 for(var i=0; i<c.length; i++){
 var o=wikibar_resolveTiddlerEditor(c[i]);
 if(o){ return o;}
 }
 }
 return ((obj.getAttribute && obj.getAttribute('edit')=='text')? obj : null);
}
function wikibar_resolveTargetButton(obj){
 if(obj.id && obj.id.substring(0,7)=='wikibar'){ return null; }
 if(obj.tiddlerTitle){
 return obj;
 }else{
 return wikibar_resolveTargetButton(obj.parentNode);
 }
}
function wikibar_isValidMenuItem(tool){
 if(!tool){ return false; }
 if(tool.TYPE=='MENU' || tool.TYPE=='MAIN_MENU'){
 for(var key in tool){
 if(key.substring(0,8)=='DYNAITEM'){ return true; }
 if(wikibar_isValidMenuItem(tool[key])){ return true; }
 }
 return false;
 }else{
 return (tool.HANDLER? true : false);
 }
}
function wikibar_editFormat(param){
 var editor = param.button.editor;
 var params = param.params;
 clearMessage();
 if(!editor){ return; }
 var repText = wikibar_processSyntaxParams(this.syntax, params);
 if(repText===null){ return; }
 var st = editor.scrollTop;
 var ss = editor.selectionStart;
 var se = editor.selectionEnd;
 var frontText= '';
 var endText = '';
 var fullText = editor.value;
 if(se>ss && ss>=0){
 frontText = fullText.substring(0, ss);
 endText = fullText.substring(se, fullText.length);
 }
 else if(ss===0 && (se===0 || se == fullText.length) ){
 endText = fullText;
 }
 else if(se==ss && ss>0){
 frontText = fullText.substring(0, ss);
 endText = fullText.substring(se, fullText.length);
 }
 if(repText.indexOf('user_text')>=0 && this.hint){
 repText = repText.replace('user_text', this.hint);
 }
 editor.value = frontText + repText + endText;
 editor.selectionStart = ss;
 editor.selectionEnd = ss + repText.length;
 editor.scrollTop = st;
 editor.focus();
}
function wikibar_editFormatByWord(param){
 var editor = param.button.editor;
 var params = param.params;
 clearMessage();
 if(!editor){return;}
 var repText = wikibar_processSyntaxParams(this.syntax, params);
 if(repText===null){ return; }
 var st = editor.scrollTop;
 var ss = editor.selectionStart;
 var se = editor.selectionEnd;
 var frontText= '';
 var selText = '';
 var endText = '';
 var fullText = editor.value;
 if(se>ss && ss>=0){
 frontText = fullText.substring(0, ss);
 selText = fullText.substring(ss,se);
 endText = fullText.substring(se, fullText.length);
 }
 else if(ss===0 && (se===0 || se == fullText.length) ){
 endText = fullText;
 }
 else if(se==ss && ss>0){
 frontText = fullText.substring(0, ss);
 endText = fullText.substring(se, fullText.length);
 if(!( fullText.charAt(ss-1).match(/\W/gi) || fullText.charAt(ss).match(/\W/gi) )){
 var m = frontText.match(/\W/gi);
 if(m){
 ss = frontText.lastIndexOf(m[m.length-1])+1;
 }
 else{
 ss = 0;
 }
 m = endText.match(/\W/gi);
 if(m){
 se += endText.indexOf(m[0]);
 }
 else{
 se = fullText.length;
 }
 frontText = fullText.substring(0, ss);
 endText = fullText.substring(se, fullText.length);
 selText = fullText.substring(ss,se);
 }
 }
 if(selText.length>0){
 repText = repText.replace('user_text', selText);
 }
 if(repText.indexOf('user_text')>=0 && this.hint){
 repText = repText.replace('user_text', this.hint);
 }
 editor.value = frontText + repText + endText;
 editor.selectionStart = ss;
 editor.selectionEnd = ss + repText.length;
 editor.scrollTop = st;
 editor.focus();
}
function wikibar_editFormatByCursor(param){
 var editor = param.button.editor;
 var params = param.params;
 clearMessage();
 if(!editor){ return; }
 var repText = wikibar_processSyntaxParams(this.syntax, params);
 if(repText===null){ return; }
 var st = editor.scrollTop;
 var ss = editor.selectionStart;
 var se = editor.selectionEnd;
 var frontText= '';
 var endText = '';
 var fullText = editor.value;
 if(se>ss && ss>=0){
 frontText = fullText.substring(0, ss);
 endText = fullText.substring(se, fullText.length);
 }
 else if(ss===0 && (se===0 || se == fullText.length) ){
 endText = fullText;
 }
 else if(se==ss && ss>0){
 frontText = fullText.substring(0, ss);
 endText = fullText.substring(se, fullText.length);
 }
 if(repText.indexOf('user_text')>=0 && this.hint){
 repText = repText.replace('user_text', this.hint);
 }
 editor.value = frontText + repText + endText;
 editor.selectionStart = ss;
 editor.selectionEnd = ss + repText.length;
 editor.scrollTop = st;
 editor.focus();
}
function wikibar_editFormatByLine(param){
 var editor = param.button.editor;
 var params = param.params;
 clearMessage();
 if(!editor){ return; }
 var repText = wikibar_processSyntaxParams(this.syntax, params);
 if(repText===null){ return; }
 var st = editor.scrollTop;
 var ss = editor.selectionStart;
 var se = editor.selectionEnd;
 var frontText= '';
 var selText = '';
 var endText = '';
 var fullText = editor.value;
 if(se>ss && ss>=0){
 if(this.byBlock){
 frontText = fullText.substring(0, ss);
 selText = fullText.substring(ss,se);
 endText = fullText.substring(se, fullText.length);
 }
 else{
 se = ss;
 }
 }
 if(ss===0 && (se===0 || se == fullText.length) ){
 var m=fullText.match(/(\n|\r)/g);
 if(m){
 se = fullText.indexOf(m[0]);
 }else{
 se = fullText.length;
 }
 selText = fullText.substring(0, se);
 endText = fullText.substring(se, fullText.length);
 }
 else if(se==ss && ss>0){
 frontText = fullText.substring(0, ss);
 endText = fullText.substring(se, fullText.length);
 m = frontText.match(/(\n|\r)/g);
 if(m){
 ss = frontText.lastIndexOf(m[m.length-1])+1;
 }
 else{
 ss = 0;
 }
 m = endText.match(/(\n|\r)/g);
 if(m){
 se += endText.indexOf(m[0]);
 }
 else{
 se = fullText.length;
 }
 frontText = fullText.substring(0, ss);
 selText = fullText.substring(ss,se);
 endText = fullText.substring(se, fullText.length);
 }
 if(selText.length>0){
 repText = repText.replace('user_text', selText);
 }
 if(repText.indexOf('user_text')>=0 && this.hint){
 repText = repText.replace('user_text', this.hint);
 }
 if(this.byBlock){
 if( (frontText.charAt(frontText.length-1)!='\n') && ss>0 ){
 repText = '\n' + repText;
 }
 if( (endText.charAt(0)!='\n') || se==fullText.length){
 repText += '\n';
 }
 }
 editor.value = frontText + repText + endText;
 editor.selectionStart = ss;
 editor.selectionEnd = ss + repText.length;
 editor.scrollTop = st;
 editor.focus();
}
function wikibar_editFormatByTableCell(param){
 var editor = param.button.editor;
 var params = param.params;
 clearMessage();
 if(!editor){ return; }
 var repText = wikibar_processSyntaxParams(this.syntax, params);
 if(repText===null){ return; }
 var st = editor.scrollTop;
 var ss = editor.selectionStart;
 var se = editor.selectionEnd;
 var frontText= '';
 var selText = '';
 var endText = '';
 var fullText = editor.value;
 if(ss===0 || ss==fullText.length){
 throw 'not valid cell!';
 }
 se=ss;
 frontText = fullText.substring(0, ss);
 endText = fullText.substring(se, fullText.length);
 i=frontText.lastIndexOf('\n');
 j=frontText.lastIndexOf('|');
 if(i>j || j<0){
 throw 'not valid cell!';
 }
 ss = j+1;
 i=endText.indexOf('\n');
 j=endText.indexOf('|');
 if(i<j || j<0){
 throw 'not valid cell!';
 }
 se += j;
 frontText = fullText.substring(0, ss-1);
 selText = fullText.substring(ss,se);
 endText = fullText.substring(se+1, fullText.length);
 if(this.key.substring(0,5)=='align'){
 selText = selText.trim();
 if( selText=='>' || selText=='~' || selText.substring(0,8)=='bgcolor(') {return; }
 }
 if(selText.length>0){
 repText = repText.replace('user_text', selText);
 }
 if(repText.indexOf('user_text')>=0 && this.hint){
 repText = repText.replace('user_text', this.hint);
 }
 editor.value = frontText + repText + endText;
 editor.selectionStart = ss;
 editor.selectionEnd = ss + repText.length - 2;
 editor.scrollTop = st;
 editor.focus();
}
function wikibar_editSelectAll(param){
 var editor = param.button.editor;
 editor.selectionStart = 0;
 editor.selectionEnd = editor.value.length;
 editor.scrollTop = 0;
 editor.focus();
}
function wikibar_doPreview(param){
 var theButton = param.button;
 var editor = param.button.editor;
 var wikibar = theButton.parentNode;
 if(!wikibar) { return; }
 title = theButton.tiddlerTitle;
 var editorWrapper = wikibar_resolveTiddlerEditorWrapper(editor);
 var tiddlerWrapper = editorWrapper.parentNode;
 var previewer = document.getElementById('previewer'+title);
 if(previewer){
 previewer.parentNode.removeChild(previewer);
 editorWrapper.style.display = 'block';
 visible=true;
 }else{
 previewer = document.createElement('div');
 previewer.id = 'previewer'+title;
 previewer.className = 'viewer previewer';
 previewer.style.height = (editor.offsetHeight) + 'px';
 wikify(editor.value, previewer);
 tiddlerWrapper.insertBefore(previewer, editorWrapper);
 editorWrapper.style.display = 'none';
 visible=false;
 }
 var pv=null;
 for(var i=0; i<wikibar.childNodes.length; i++){
 try{
 var btn = wikibar.childNodes[i];
 if(btn.toolItem.key == 'preview'){ pv=btn; }
 if(btn.toolItem.key != 'preview'){
 btn.style.display = visible ? '': 'none';
 }
 }catch(ex){}
 }
 if(!pv) { return; }
 if(visible){
 pv.innerHTML = '<font face=\"verdana\">&infin;</font>';
 pv.title = 'preview current tiddler';
 }
 else{
 pv.innerHTML = '<font face=\"verdana\">&larr;</font>';
 pv.title = 'back to editor';
 }
}
function wikibar_doListAddons(param){
 clearMessage();
 var title = param.button.tiddlerTitle;
 var wikibarButton = document.getElementById('wikibarButton'+title);
 var ok=0, fail=0;
 for(var i=0; i<wikibarButton.addons.length; i++){
 var addon=wikibarButton.addons[i];
 if(addon.ok){
 displayMessage('[ o ] '+addon.name);
 ok++;
 }
 else{
 displayMessage('[ x ] '+addon.name + ': ' + addon.error);
 fail++;
 }
 }
 displayMessage('---------------------------------');
 displayMessage(ok + ' ok ; ' + fail + ' failed');
}
function wikibar_getColorCode(param){
 var cbOnPickColor = function(colorCode, param){
 param.params = colorCode;
 param.button.toolItem.doMore(param);
 };
 wikibarColorTool.openColorPicker(param.button, cbOnPickColor, param);
}
function wikibar_getLinkUrl(param){
 var url= prompt('Please enter the link target', (this.param? this.param : ''));
 if (url && url.trim().length>0){
 param.params = url;
 this.doMore(param);
 }
}
function wikibar_getTableRowCol(param){
 var rc= prompt('Please enter (rows x cols) of the table', '2 x 3');
 if (!rc || (rc.trim()).length<=0){ return; }
 var arr = rc.toUpperCase().split('X');
 if(arr.length != 2) { return; }
 for(var i=0; i<arr.length; i++){
 if(isNaN(arr[i].trim())) { return; }
 }
 var rows = parseInt(arr[0].trim(), 10);
 var cols = parseInt(arr[1].trim(), 10);
 var txtTable='';
 for(var r=0; r<rows; r++){
 for(var c=0; c<=cols; c++){
 if(c===0){
 txtTable += '|';
 }else{
 txtTable += ' |';
 }
 }
 txtTable += '\n';
 }
 if(txtTable.trim().length>0){
 param.params = txtTable.trim();
 this.doMore(param);
 }
}
function wikibar_getMacroParam(param){
 var p = prompt('Please enter the parameters of macro \"' + this.key + '\":' +
 '\nSyntax: ' + this.syntax +
 '\n\nNote: '+
 '\n%1,%2,... - parameter needed'+
 '\n[%1] - optional parameter'+
 '\n%N - more than one parameter(1~n)'+
 '\n[%N] - any number of parameters(0~n)'+
 '\n\nPS:'+
 '\n1. Parameters should be seperated with space character'+
 '\n2. Use \" to wrap the parameter that includes space character, ex: \"hello world\"'+
 '\n3. Input the word(null) for the optional parameter ignored',
 (this.param? this.param : '') );
 if(!p) { return; }
 p=p.readMacroParams();
 for(var i=0; i<p.length; i++){
 var s=p[i].trim();
 if(s.indexOf(' ')>0){ p[i]="'"+s+"'"; }
 if(s.toLowerCase()=='null'){ p[i]=null; }
 }
 param.params = p;
 this.doMore(param);
}
function wikibar_getMorePalette(unused){
 clearMessage();
 displayMessage('Get more color palettes(*.gpl) from ColorZilla Palettes site', 'http:\/\/www.iosart.com/firefox/colorzilla/palettes.html');
 displayMessage('Save it as a new tiddler with \"ColorPalettes\" tag');
}
function wikibar_createWikibar(title){
 var theWikibar = document.getElementById('wikibar' + title);
 if(theWikibar){
 if(theWikibar.hasChildNodes()){
 theWikibar.style.display = (theWikibar.style.display=='block'? 'none':'block');
 return;
 }
 }
 var tiddlerWrapper = document.getElementById('tiddler'+title);
 var theTextarea = wikibar_resolveTiddlerEditor(tiddlerWrapper);
 if(!theTextarea){
 clearMessage();
 displayMessage('WikiBar only works in tiddler edit mode now');
 return;
 }else{
 if(!theTextarea.id){ theTextarea.id = 'editor'+title; }
 if(!theTextarea.parentNode.id){ theTextarea.parentNode.id='editorWrapper'+title; }
 }
 if(theWikibar){
 theWikibar = document.getElementById('wikibar'+title);
 }else{
 var editorWrapper = wikibar_resolveTiddlerEditorWrapper(theTextarea);
 theWikibar = createTiddlyElement(tiddlerWrapper, 'div', 'wikibar'+title, 'toolbar');
 addClass(theWikibar, 'wikibar');
 var previewer = document.getElementById('previewer'+title);
 if(previewer){
 tiddlerWrapper.insertBefore(theWikibar, previewer);
 }else{
 tiddlerWrapper.insertBefore(theWikibar, editorWrapper);
 }
 }
 wikibar_createMenu(theWikibar,wikibarStore,title,theTextarea);
 if(config.options['chkWikibarSetEditorHeight'] && config.options['txtWikibarEditorRows']){
 theTextarea.rows = config.options['txtWikibarEditorRows'];
 }
 setStylesheet(
 '.wikibar{text-align:left;visibility:visible;margin:2px;padding:1px;}.previewer{overflow:auto;display:block;border:1px solid;}#colorPicker{position:absolute;display:none;z-index:10;margin:0px;padding:0px;}#colorPicker table{margin:0px;padding:0px;border:2px solid #000;border-spacing:0px;border-collapse:collapse;}#colorPicker td{margin:0px;padding:0px;border:1px solid;font-size:11px;text-align:center;cursor:auto;}#colorPicker .header{background-color:#fff;}#colorPicker .button{background-color:#fff;cursor:pointer;cursor:hand;}#colorPicker .button:hover{padding-top:3px;padding-bottom:3px;color:#fff;background-color:#136;}#colorPicker .cell{padding:4px;font-size:7px;cursor:crosshair;}#colorPicker .cell:hover{padding:10px;}.wikibarPopup{position:absolute;z-index:10;border:1px solid #014;color:#014;background-color:#cef;}.wikibarPopup table{margin:0;padding:0;border:0;border-spacing:0;border-collapse:collapse;}.wikibarPopup .button:hover{color:#eee;background-color:#014;}.wikibarPopup .disabled{color:#888;}.wikibarPopup .disabled:hover{color:#888;background-color:#cef;}.wikibarPopup tr .seperator hr{margin:0;padding:0;background-color:#cef;width:100%;border:0;border-top:1px dashed #014;}.wikibarPopup tr .icon{font-family:verdana;font-weight:bolder;}.wikibarPopup tr .marker{font-family:verdana;font-weight:bolder;}.wikibarPopup td{font-size:0.9em;padding:2px;}.wikibarPopup input{border:0;border-bottom:1px solid #014;margin:0;padding:0;font-family:arial;font-size:100%;background-color:#fff;}',
 'WikiBarStyleSheet');
}
function wikibar_createMenu(place,toolset,title,editor){
 if(!wikibar_isValidMenuItem(toolset)){return;}
 if(!(toolset.TYPE=='MAIN_MENU' || toolset.TYPE=='MENU')){ return; }
 for(var key in toolset){
 if(key.substring(0,9)=='SEPERATOR'){
 wikibar_createMenuSeperator(place);
 continue;
 }
 if(key.substring(0,8)=='DYNAITEM'){
 var dynaTools = toolset[key](title,editor);
 if(dynaTools.TYPE && dynaTools.TYPE=='MENU'){
 wikibar_createMenuItem(place,dynaTools,null,editor,title);
 }else{
 dynaTools.TYPE = 'MENU';
 wikibar_createMenu(place, dynaTools, title, editor);
 }
 continue;
 }
 if((toolset[key].TYPE!='MENU' && toolset[key].TYPE!='MAIN_MENU') && !toolset[key].HANDLER){continue;}
 wikibar_createMenuItem(place,toolset,key,editor,title);
 }
}
function wikibar_createMenuItem(place,toolset,key,editor,title){
 if(!key){
 var tool = toolset;
 }else{
 tool = toolset[key];
 tool.key = key;
 }
 if(!wikibar_isValidMenuItem(tool)){return;}
 var toolIsOnMainMenu = (toolset.TYPE=='MAIN_MENU');
 var toolIsMenu = (tool.TYPE=='MENU');
 var theButton;
 if(toolIsOnMainMenu){
 theButton = createTiddlyButton(
 place,
 '',
 (tool.TOOLTIP? tool.TOOLTIP : ''),
 (toolIsMenu? wikibar_onClickMenuItem : wikibar_onClickItem),
 'button');
 theButton.innerHTML = (tool.CAPTION? tool.CAPTION : key);
 theButton.isOnMainMenu = true;
 addClass(theButton, (toolIsMenu? 'menu' : 'item'));
 place.appendChild( document.createTextNode('\n') );
 if(!toolIsMenu){
 if(config.options['chkWikibarPopmenuOnMouseOver']){
 theButton.onmouseover = function(e){ wikibarPopup.remove(); };
 }
 }
 }else{
 theButton=createTiddlyElement(place, 'tr',key,'button');
 theButton.title = (tool.TOOLTIP? tool.TOOLTIP : '');
 theButton.onclick = (toolIsMenu? wikibar_onClickMenuItem : wikibar_onClickItem);
 var tdL = createTiddlyElement(theButton, 'td','','marker');
 var td = createTiddlyElement(theButton, 'td');
 var tdR = createTiddlyElement(theButton, 'td','','marker');
 td.innerHTML = (tool.CAPTION? tool.CAPTION : key);
 if(toolIsMenu){
 tdR.innerHTML='&nbsp;&nbsp;&rsaquo;';
 }
 if(tool.SELECTED){
 tdL.innerHTML = '&radic; ';
 addClass(theButton, 'selected');
 }
 if(tool.DISABLED){
 addClass(theButton, 'disabled');
 }
 }
 theButton.tiddlerTitle = title;
 theButton.toolItem = tool;
 theButton.editor = editor;
 theButton.tabIndex = 999;
 if(toolIsMenu){
 if(config.options['chkWikibarPopmenuOnMouseOver']){
 theButton.onmouseover = wikibar_onClickMenuItem;
 }
 }
}
function wikibar_createMenuSeperator(place){
 if(place.id.substring(0,7)=='wikibar') { return; }
 var onclickSeperator=function(e){
 if(!e){ e = window.event; }
 e.cancelBubble = true;
 if (e.stopPropagation){ e.stopPropagation(); }
 return(false);
 };
 var theButton=createTiddlyElement(place,'tr','','seperator');
 var td = createTiddlyElement(theButton, 'td','','seperator');
 td.colSpan=3;
 theButton.onclick=onclickSeperator;
 td.innerHTML = '<hr>';
}
function wikibar_genWikibarAbout(){
 var toolset={};
 toolset.version = {
 CAPTION: '<center>WikiBar ' +
 config.macros.wikibar.major + '.' +
 config.macros.wikibar.minor + '.' +
 config.macros.wikibar.revision +
 (config.macros.wikibar.beta? ' beta '+config.macros.wikibar.beta : '') +
 '</center>',
 HANDLER: function(){}
 };
 toolset.SEPERATOR = {};
 toolset.author = {
 CAPTION: '<center>Arphen Lin<br>arphenlin@gmail.com</center>',
 TOOLTIP: 'send mail to the author',
 HANDLER: function(){ window.open('mailto:arphenlin@gmail.com'); }
 };
 toolset.website = {
 CAPTION: '<center>aiddlywiki.sourceforge.net</center>',
 TOOLTIP: 'go to the web site of WikiBar',
 HANDLER: function(){ window.open('http:\/\/aiddlywiki.sourceforge.net/'); }
 };
 return toolset;
}
function wikibar_genWikibarOptions(title, editor){
 var toolset={};
 toolset.popOnMouseOver = {
 CAPTION:'popup menu on mouse over',
 SELECTED: config.options['chkWikibarPopmenuOnMouseOver'],
 HANDLER: function(param){
 config.options['chkWikibarPopmenuOnMouseOver'] = !config.options['chkWikibarPopmenuOnMouseOver'];
 saveOptionCookie('chkWikibarPopmenuOnMouseOver');
 var title = param.button.tiddlerTitle;
 var wikibar = document.getElementById('wikibar'+title);
 if(wikibar){ wikibar.parentNode.removeChild(wikibar); }
 wikibar_createWikibar(title);
 }
 };
 toolset.setEditorSize = {
 CAPTION:'set editor height: <input id=\"txtWikibarEditorRows\" type=text size=1 MAXLENGTH=3 value=\"' +
 (config.options['txtWikibarEditorRows']? config.options['txtWikibarEditorRows']:editor.rows) + '\"> ok',
 HANDLER: function(param){
 var input = document.getElementById('txtWikibarEditorRows');
 if(input){
 var rows = parseInt(input.value, 10);
 if(!isNaN(rows)){
 var editor = param.button.editor;
 editor.rows = rows;
 }else{
 rows=config.maxEditRows;
 }
 config.options['txtWikibarEditorRows'] = rows;
 saveOptionCookie('txtWikibarEditorRows');
 config.maxEditRows = rows;
 }
 }
 };
 toolset.setEditorSizeOnLoadingWikibar = {
 CAPTION:'set editor height on loading wikibar',
 SELECTED: config.options['chkWikibarSetEditorHeight'],
 HANDLER: function(param){
 config.options['chkWikibarSetEditorHeight'] = !config.options['chkWikibarSetEditorHeight'];
 saveOptionCookie('chkWikibarSetEditorHeight');
 if(config.options['chkWikibarSetEditorHeight']){
 var rows = config.options['txtWikibarEditorRows'];
 if(!isNaN(rows)){ rows = 15; }
 var editor = param.button.editor;
 editor.rows = rows;
 config.options['txtWikibarEditorRows'] = rows;
 saveOptionCookie('txtWikibarEditorRows');
 }
 }
 };
 toolset.SEPERATOR = {};
 toolset.update = {
 CAPTION: 'check for updates',
 DISABLED: true,
 HANDLER: function(){}
 };
 return toolset;
}
function wikibar_genPaletteSelector(){
 try{
 var cpTiddlers = store.getTaggedTiddlers('ColorPalettes');
 if(!cpTiddlers) { return; }
 var palettes=[];
 palettes.push(wikibarColorTool.defaultPaletteName);
 for(var i=0; i<cpTiddlers.length; i++){
 palettes.push(cpTiddlers[i].title.trim());
 }
 var toolset={};
 for(i=0; i<palettes.length; i++){
 toolset[palettes[i]] = {
 TOOLTIP: palettes[i],
 SELECTED: (palettes[i]==wikibarColorTool.paletteName),
 HANDLER: wikibar_doSelectPalette
 };
 }
 return toolset;
 }catch(ex){ return null; }
}
function wikibar_onClickItem(e){
 if(!e){ e = window.event; }
 var theTarget = resolveTarget(e);
 if(theTarget.tagName=='INPUT'){
 e.cancelBubble = true;
 if (e.stopPropagation){ e.stopPropagation(); }
 return;
 }
 var theButton = wikibar_resolveTargetButton(theTarget);
 if(!theButton){ return(false); }
 var o = theButton.toolItem;
 if(!o) { return; }
 var param = {
 event: e,
 button: theButton
 };
 if(o.HANDLER){ o.HANDLER(param); }
 if(o.DISABLED){
 e.cancelBubble = true;
 if (e.stopPropagation){ e.stopPropagation(); }
 }
 return(false);
}
function wikibar_onClickMenuItem(e){
 if(!e){ e = window.event; }
 var theButton = wikibar_resolveTargetButton(resolveTarget(e));
 if(!theButton){ return(false); }
 e.cancelBubble = true;
 if (e.stopPropagation){ e.stopPropagation(); }
 var title = theButton.tiddlerTitle;
 var editor = theButton.editor;
 var tool = theButton.toolItem;
 if(!tool) { return; }
 var popup = wikibarPopup.create(this);
 if(popup){
 wikibar_createMenu(popup,tool,title,editor);
 if(!popup.hasChildNodes()){
 wikibarPopup.remove();
 }else{
 wikibarPopup.show(popup, false);
 }
 }
 return(false);
}
var wikibarColorTool = {
 defaultPaletteName : 'default',
 defaultColumns : 16,
 defaultPalette : [
 '#FFF','#DDD','#CCC','#BBB','#AAA','#999','#666','#333','#111','#000','#FC0','#F90','#F60','#F30','#C30','#C03',
 '#9C0','#9D0','#9E0','#E90','#D90','#C90','#FC3','#FC6','#F96','#F63','#600','#900','#C00','#F00','#F36','#F03',
 '#CF0','#CF3','#330','#660','#990','#CC0','#FF0','#C93','#C63','#300','#933','#C33','#F33','#C36','#F69','#F06',
 '#9F0','#CF6','#9C3','#663','#993','#CC3','#FF3','#960','#930','#633','#C66','#F66','#903','#C39','#F6C','#F09',
 '#6F0','#9F6','#6C3','#690','#996','#CC6','#FF6','#963','#630','#966','#F99','#F39','#C06','#906','#F3C','#F0C',
 '#3F0','#6F3','#390','#6C0','#9F3','#CC9','#FF9','#C96','#C60','#C99','#F9C','#C69','#936','#603','#C09','#303',
 '#0C0','#3C0','#360','#693','#9C6','#CF9','#FFC','#FC9','#F93','#FCC','#C9C','#969','#939','#909','#636','#606',
 '#060','#3C3','#6C6','#0F0','#3F3','#6F6','#9F9','#CFC','#9CF','#FCF','#F9F','#F6F','#F3F','#F0F','#C6C','#C3C',
 '#030','#363','#090','#393','#696','#9C9','#CFF','#39F','#69C','#CCF','#C9F','#96C','#639','#306','#90C','#C0C',
 '#0F3','#0C3','#063','#396','#6C9','#9FC','#9CC','#06C','#369','#99F','#99C','#93F','#60C','#609','#C3F','#C0F',
 '#0F6','#3F6','#093','#0C6','#3F9','#9FF','#699','#036','#039','#66F','#66C','#669','#309','#93C','#C6F','#90F',
 '#0F9','#6F9','#3C6','#096','#6FF','#6CC','#366','#069','#36C','#33F','#33C','#339','#336','#63C','#96F','#60F',
 '#0FC','#6FC','#3C9','#3FF','#3CC','#399','#033','#39C','#69F','#00F','#00C','#009','#006','#003','#63F','#30F',
 '#0C9','#3FC','#0FF','#0CC','#099','#066','#3CF','#6CF','#09C','#36F','#0CF','#09F','#06F','#03F','#03C','#30C'
 ],
 colorPicker : null,
 pickColorHandler: null,
 userData: null
};
wikibarColorTool.paletteName = wikibarColorTool.defaultPaletteName;
wikibarColorTool.columns = wikibarColorTool.defaultColumns;
wikibarColorTool.palette = wikibarColorTool.defaultPalette;
wikibarColorTool.onPickColor = function(e){
 if (!e){ e = window.event; }
 var theCell = resolveTarget(e);
 if(!theCell){ return(false); }
 color = theCell.bgColor.toLowerCase();
 if(!color) { return; }
 wikibarColorTool.displayColorPicker(false);
 if(wikibarColorTool.pickColorHandler){
 wikibarColorTool.pickColorHandler(color, wikibarColorTool.userData);
 }
 return(false);
};
wikibarColorTool.onMouseOver = function(e){
 if (!e){ e = window.event; }
 var theButton = resolveTarget(e);
 if(!theButton){ return(false); }
 if(!wikibarColorTool) { return; }
 color = theButton.bgColor.toUpperCase();
 if(!color) { return; }
 td=document.getElementById('colorPickerInfo');
 if(!td) { return; }
 td.bgColor = color;
 td.innerHTML = '<span style=\"color:#000;\">'+color+'</span>&nbsp;&nbsp;&nbsp;' +
 '<span style=\"color:#fff;\">'+color+'</span>';
 e.cancelBubble = true;
 if (e.stopPropagation){ e.stopPropagation(); }
 return(false);
};
wikibarColorTool.openColorPicker = function(theTarget, pickColorHandler, userData){
 wikibarColorTool.skipClickDocumentEvent = true;
 wikibarColorTool.pickColorHandler = pickColorHandler;
 wikibarColorTool.userData = userData;
 wikibarColorTool.moveColorPicker(theTarget);
};
wikibarColorTool.convert3to6HexColor = function(c){
 c=c.trim();
 var rx=/^\#(\d|[a-f])(\d|[a-f])(\d|[a-f])$/gi;
 return (rx.test(c)? c.replace(rx, '#$1$1$2$2$3$3') : c);
};
wikibarColorTool.numToHexColor = function (n){
 if(typeof(n)=='number' && (n>=0 && n<=255)) {
 s = n.toString(16).toLowerCase();
 return ((s.length==1)? '0'+s : s);
 }else{
 return null;
 }
};
wikibarColorTool.renderColorPalette = function(){
 if(wikibarColorTool.paletteName==wikibarColorTool.defaultPaletteName){
 wikibarColorTool.palette=wikibarColorTool.defaultPalette;
 wikibarColorTool.columns=wikibarColorTool.defaultColumns;
 return;
 }
 tiddlerText = (store.getTiddlerText(wikibarColorTool.paletteName, '')).trim();
 if(tiddlerText.length<=0) { return; }
 var cpContents = tiddlerText.split('\n');
 var colors=[];
 columns = wikibarColorTool.defaultColumns;
 var tmpArray=null;
 errCount=0;
 for(var i=0; i<cpContents.length; i++){
 cpLine=cpContents[i].trim();
 if( (!cpLine) || (cpLine.length<=0) || (cpLine.charAt(0) == '#') ){ continue; }
 if(cpLine.substring(0,8).toLowerCase()=='columns:'){
 tmpArray = cpLine.split(':');
 try{
 columns = parseInt(tmpArray[1],10);
 }catch(ex){
 columns = wikibarColorTool.defaultColumns;
 }
 }else{
 tmpArray = cpLine.replace('\t', ' ').split(/[ ]{1,}/);
 try{
 color='';
 for(var j=0; j<3; j++){
 c=parseInt(tmpArray[j].trim(), 10);
 if(isNaN(c)){
 break;
 }else{
 c=wikibarColorTool.numToHexColor(c);
 if(!c) {break;}
 color+=c;
 }
 }
 if(color.length==6){
 colors.push('#'+color);
 } else {
 throw 'error';
 }
 }catch(ex){
 }
 }
 }
 if(colors.length>0){
 wikibarColorTool.palette = colors;
 wikibarColorTool.columns = columns;
 }else{
 throw 'renderColorPalette(): No color defined in the palette.';
 }
};
wikibarColorTool.displayColorPicker = function(visible){
 if(wikibarColorTool.colorPicker){
 wikibarColorTool.colorPicker.style.display = (visible? 'block' : 'none');
 }
};
wikibarColorTool.moveColorPicker = function(theTarget){
 if(!wikibarColorTool.colorPicker){
 wikibarColorTool.createColorPicker();
 }
 var cp = wikibarColorTool.colorPicker;
 var rootLeft = findPosX(theTarget);
 var rootTop = findPosY(theTarget);
 var popupLeft = rootLeft;
 var popupTop = rootTop;
 var popupWidth = cp.offsetWidth;
 var winWidth = findWindowWidth();
 if(popupLeft + popupWidth > winWidth){
 popupLeft = winWidth - popupWidth;
 }
 cp.style.left = popupLeft + 'px';
 cp.style.top = popupTop + 'px';
 wikibarColorTool.displayColorPicker(true);
};
wikibarColorTool.createColorPicker = function(unused, palette){
 if(palette){ wikibarColorTool.paletteName=palette; }
 wikibarColorTool.renderColorPalette();
 wikibarColorTool.colorPicker = document.createElement('div');
 wikibarColorTool.colorPicker.id = 'colorPicker';
 document.body.appendChild(wikibarColorTool.colorPicker);
 var theTable = document.createElement('table');
 wikibarColorTool.colorPicker.appendChild(theTable);
 var theTR = document.createElement('tr');
 theTable.appendChild(theTR);
 var theTD = document.createElement('td');
 theTD.className = 'header';
 theTD.colSpan = wikibarColorTool.columns;
 theTD.innerHTML = wikibarColorTool.paletteName;
 theTR.appendChild(theTD);
 for(var i=0; i<wikibarColorTool.palette.length; i++){
 if((i%wikibarColorTool.columns)===0){
 theTR = document.createElement('tr');
 theTable.appendChild(theTR);
 }
 theTD = document.createElement('td');
 theTD.className = 'cell';
 theTD.bgColor = wikibarColorTool.convert3to6HexColor(wikibarColorTool.palette[i]);
 theTD.onclick = wikibarColorTool.onPickColor;
 theTD.onmouseover = wikibarColorTool.onMouseOver;
 theTR.appendChild(theTD);
 }
 rest = wikibarColorTool.palette.length % wikibarColorTool.columns;
 if(rest>0){
 theTD = document.createElement('td');
 theTD.colSpan = wikibarColorTool.columns-rest;
 theTD.bgColor = '#000000';
 theTR.appendChild(theTD);
 }
 theTR = document.createElement('tr');
 theTable.appendChild(theTR);
 theTD = document.createElement('td');
 theTD.colSpan = wikibarColorTool.columns;
 theTD.id = 'colorPickerInfo';
 theTR.appendChild(theTD);
};
wikibarColorTool.onDocumentClick = function(e){
 if (!e){ e = window.event; }
 if(wikibarColorTool.skipClickDocumentEvent) {
 wikibarColorTool.skipClickDocumentEvent = false;
 return true;
 }
 if((!e.eventPhase) || e.eventPhase == Event.BUBBLING_PHASE || e.eventPhase == Event.AT_TARGET){
 wikibarColorTool.displayColorPicker(false);
 }
 return true;
};
function wikibar_doSelectPalette(param){
 clearMessage();
 var theButton = param.button;
 if(!theButton.toolItem.key) { return; }
 var palette = theButton.toolItem.key;
 var oldPaletteName = wikibarColorTool.paletteName;
 if(oldPaletteName != palette){
 try{
 wikibarColorTool.createColorPicker(theButton, palette);
 displayMessage('Palette \"'+palette+'\" ('+ wikibarColorTool.palette.length +' colors) is selected');
 }catch(ex){
 errMsg = ex;
 if(errMsg.substring(0,18)=='renderColorPalette'){
 displayMessage('Invalid palette \"' + palette + '\", please check it out!');
 wikibarColorTool.createColorPicker(theButton, oldPaletteName);
 }
 }
 }
}
var wikibarPopup = {
 skipClickDocumentEvent: false,
 stack: []
};
wikibarPopup.resolveRootPopup = function(o){
 if(o.isOnMainMenu){ return null; }
 if(o.className.substring(0,12)=='wikibarPopup'){ return o;}
 return wikibarPopup.resolveRootPopup(o.parentNode);
};
wikibarPopup.create = function(root){
 for(var i=0; i<wikibarPopup.stack.length; i++){
 var p=wikibarPopup.stack[i];
 if(p.root==root){
 wikibarPopup.removeFrom(i+1);
 return null;
 }
 }
 var rootPopup = wikibarPopup.resolveRootPopup(root);
 if(!rootPopup){
 wikibarPopup.remove();
 }else{
 wikibarPopup.removeFromRootPopup(rootPopup);
 }
 var popup = createTiddlyElement(document.body,'div','wikibarPopup'+root.toolItem.key,'wikibarPopup');
 var pop = createTiddlyElement(popup,'table','','');
 wikibarPopup.stack.push({rootPopup: rootPopup, root: root, popup: popup});
 return pop;
};
wikibarPopup.show = function(unused,slowly){
 var curr = wikibarPopup.stack[wikibarPopup.stack.length-1];
 var overlayWidth = 1;
 var rootLeft, rootTop, rootWidth, rootHeight, popupLeft, popupTop, popupWidth;
 if(curr.rootPopup){
 rootLeft = findPosX(curr.rootPopup);
 rootTop = findPosY(curr.root);
 rootWidth = curr.rootPopup.offsetWidth;
 popupLeft = rootLeft + rootWidth - overlayWidth;
 popupTop = rootTop;
 }else{
 rootLeft = findPosX(curr.root);
 rootTop = findPosY(curr.root);
 rootHeight = curr.root.offsetHeight;
 popupLeft = rootLeft;
 popupTop = rootTop + rootHeight;
 }
 var winWidth = findWindowWidth();
 popupWidth = curr.popup.offsetWidth;
 if(popupLeft + popupWidth > winWidth){
 popupLeft = rootLeft - popupWidth + overlayWidth;
 }
 curr.popup.style.left = popupLeft + 'px';
 curr.popup.style.top = popupTop + 'px';
 curr.popup.style.display = 'block';
 addClass(curr.root, 'highlight');
 if(config.options.chkAnimate){
 anim.startAnimating(new Scroller(curr.popup,slowly));
 }else{
 window.scrollTo(0,ensureVisible(curr.popup));
 }
};
wikibarPopup.remove = function(){
 if(wikibarPopup.stack.length > 0){
 wikibarPopup.removeFrom(0);
 }
};
wikibarPopup.removeFrom = function(from){
 for(var t=wikibarPopup.stack.length-1; t>=from; t--){
 var p = wikibarPopup.stack[t];
 removeClass(p.root,'highlight');
 p.popup.parentNode.removeChild(p.popup);
 }
 wikibarPopup.stack = wikibarPopup.stack.slice(0,from);
};
wikibarPopup.removeFromRootPopup = function(from){
 for(var t=0; t<wikibarPopup.stack.length; t++){
 var p = wikibarPopup.stack[t];
 if(p.rootPopup==from){
 wikibarPopup.removeFrom(t);
 break;
 }
 }
};
wikibarPopup.onDocumentClick = function(e){
 if (!e){ e = window.event; }
 if(wikibarPopup.skipClickDocumentEvent){
 wikibarPopup.skipClickDocumentEvent=false;
 return true;
 }
 if((!e.eventPhase) || e.eventPhase == Event.BUBBLING_PHASE || e.eventPhase == Event.AT_TARGET){
 wikibarPopup.remove();
 }
 return true;
};
var wikibarStore = {
 TYPE: 'MAIN_MENU',
 help:{
 TYPE:'MENU',
 CAPTION: '<font face=\"verdana\">?</font>',
 TOOLTIP: 'about WikiBar',
 options:{
 TYPE:'MENU',
 DYNAITEM: wikibar_genWikibarOptions
 },
 about:{
 TYPE:'MENU',
 DYNAITEM: wikibar_genWikibarAbout
 }
 },
 preview:{
 TOOLTIP: 'preview this tiddler',
 CAPTION: '<font face=\"verdana\">&infin;</font>',
 HANDLER: wikibar_doPreview
 },
 line:{
 TOOLTIP: 'horizontal line',
 CAPTION: '<font face=\"verdana\">&mdash;</font>',
 syntax: '\n----\n',
 HANDLER: wikibar_editFormatByCursor
 },
 crlf:{
 TOOLTIP: 'new line',
 CAPTION: '<font face=\"verdana\">&para;</font>',
 syntax: '\n',
 HANDLER: wikibar_editFormatByCursor
 },
 selectAll:{
 TOOLTIP: 'select all',
 CAPTION: '<font face=\"verdana\">&sect;</font>',
 HANDLER: wikibar_editSelectAll
 },
 deleteSelected:{
 TOOLTIP: 'delete selected',
 CAPTION: '<font face=\"verdana\">&times;</font>',
 syntax: '',
 HANDLER: wikibar_editFormat
 },
 textFormat:{
 TYPE: 'MENU',
 CAPTION: 'text',
 TOOLTIP: 'text formatters',
 ignore:{
 TOOLTIP: 'ignore wiki word',
 CAPTION: 'ignore wikiWord',
 syntax: '~user_text',
 hint: 'wiki_word',
 HANDLER: wikibar_editFormatByWord
 },
 bolder:{
 TOOLTIP: 'bolder text',
 CAPTION: '<strong>bolder</strong>',
 syntax: "''user_text''",
 hint: 'bold_text',
 HANDLER: wikibar_editFormatByWord
 },
 italic:{
 TOOLTIP: 'italic text',
 CAPTION: '<em>italic</em>',
 syntax: '\/\/user_text\/\/',
 hint: 'italic_text',
 HANDLER: wikibar_editFormatByWord
 },
 underline:{
 TOOLTIP: 'underline text',
 CAPTION: '<u>underline</u>',
 syntax: '__user_text__',
 hint: 'underline_text',
 HANDLER: wikibar_editFormatByWord
 },
 strikethrough:{
 TOOLTIP: 'strikethrough text',
 CAPTION: '<strike>strikethrough</strike>',
 syntax: '==user_text==',
 hint: 'strikethrough_text',
 HANDLER: wikibar_editFormatByWord
 },
 superscript:{
 TOOLTIP: 'superscript text',
 CAPTION: 'X<sup>superscript</sup>',
 syntax: '^^user_text^^',
 hint: 'superscript_text',
 HANDLER: wikibar_editFormatByWord
 },
 subscript:{
 TOOLTIP: 'subscript text',
 CAPTION: 'X<sub>subscript</sub>',
 syntax: '~~user_text~~',
 hint: 'subscript_text',
 HANDLER: wikibar_editFormatByWord
 },
 comment:{
 TOOLTIP: 'comment text',
 CAPTION: 'comment text',
 syntax: '/%user_text%/',
 hint: 'comment_text',
 HANDLER: wikibar_editFormatByWord
 },
 monospaced:{
 TOOLTIP: 'monospaced text',
 CAPTION: '<code>monospaced</code>',
 syntax: '{{{user_text}}}',
 hint: 'monospaced_text',
 HANDLER: wikibar_editFormatByWord
 }
 },
 paragraph:{
 TYPE: 'MENU',
 TOOLTIP: 'paragarph formatters',
 list:{
 TYPE: 'MENU',
 TOOLTIP: 'list tools',
 bullet:{
 TOOLTIP: 'bullet point',
 syntax: '*user_text',
 hint: 'bullet_text',
 HANDLER: wikibar_editFormatByLine
 },
 numbered:{
 TOOLTIP: 'numbered list',
 syntax: '#user_text',
 hint: 'numbered_text',
 HANDLER: wikibar_editFormatByLine
 }
 },
 heading:{
 TYPE: 'MENU',
 heading1:{
 CAPTION:'<h1>Heading 1</h1>',
 TOOLTIP: 'Heading 1',
 syntax: '!user_text',
 hint: 'heading_1',
 HANDLER: wikibar_editFormatByLine
 },
 heading2:{
 CAPTION:'<h2>Heading 2<h2>',
 TOOLTIP: 'Heading 2',
 syntax: '!!user_text',
 hint: 'heading_2',
 HANDLER: wikibar_editFormatByLine
 },
 heading3:{
 CAPTION:'<h3>Heading 3</h3>',
 TOOLTIP: 'Heading 3',
 syntax: '!!!user_text',
 hint: 'heading_3',
 HANDLER: wikibar_editFormatByLine
 },
 heading4:{
 CAPTION:'<h4>Heading 4</h4>',
 TOOLTIP: 'Heading 4',
 syntax: '!!!!user_text',
 hint: 'heading_4',
 HANDLER: wikibar_editFormatByLine
 },
 heading5:{
 CAPTION:'<h5>Heading 5</h5>',
 TOOLTIP: 'Heading 5',
 syntax: '!!!!!user_text',
 hint: 'heading_5',
 HANDLER: wikibar_editFormatByLine
 }
 },
 comment:{
 TYPE: 'MENU',
 commentByLine:{
 CAPTION:'comment by line',
 TOOLTIP: 'line comment',
 syntax: '/%user_text%/',
 hint: 'comment_text',
 HANDLER: wikibar_editFormatByLine
 },
 commentByBlock:{
 CAPTION:'comment by block',
 TOOLTIP: 'block comment',
 syntax: '/%\nuser_text\n%/',
 hint: 'comment_text',
 byBlock: true,
 HANDLER: wikibar_editFormatByLine
 }
 },
 monospaced:{
 TYPE: 'MENU',
 monosByLine:{
 CAPTION: 'monospaced by line',
 TOOLTIP: 'line monospaced',
 syntax: '{{{\nuser_text\n}}}',
 hint: 'monospaced_text',
 HANDLER: wikibar_editFormatByLine
 },
 monosByBlock:{
 CAPTION: 'monospaced by block',
 TOOLTIP: 'block monospaced',
 syntax: '{{{\nuser_text\n}}}',
 hint: 'monospaced_text',
 byBlock: true,
 HANDLER: wikibar_editFormatByLine
 }
 },
 quote:{
 TYPE: 'MENU',
 quoteByLine:{
 CAPTION: 'quote by line',
 TOOLTIP: 'line quote',
 syntax: '>user_text',
 hint: 'quote_text',
 HANDLER: wikibar_editFormatByLine
 },
 quoteByBlcok:{
 CAPTION: 'quote by block',
 TOOLTIP: 'block quote',
 syntax: '<<<\nuser_text\n<<<',
 hint: 'quote_text',
 byBlock: true,
 HANDLER: wikibar_editFormatByLine
 }
 },
 plugin:{
 TYPE: 'MENU',
 code:{
 CAPTION: 'code area',
 TOOLTIP: 'block monospaced for plugin',
 syntax: '\n\/\/{{{\nuser_text\n\/\/}}}\n',
 hint: 'monospaced_plugin_code',
 byBlock: true,
 HANDLER: wikibar_editFormatByLine
 },
 commentByLine:{
 CAPTION: 'comment by line',
 TOOLTIP: 'line comment',
 syntax: '\/\/user_text',
 hint: 'plugin_comment',
 HANDLER: wikibar_editFormatByLine
 },
 commentByBlock:{
 CAPTION: 'comment by block',
 TOOLTIP: 'block comment',
 syntax: '\/\***\nuser_text\n***\/',
 hint: 'plugin_comment',
 byBlock: true,
 HANDLER: wikibar_editFormatByLine
 }
 },
 css:{
 TYPE: 'MENU',
 code:{
 CAPTION: 'code area',
 TOOLTIP: 'block monospaced for css',
 syntax: '\n\nuser_text\n\n',
 hint: 'monospaced_css_code',
 byBlock: true,
 HANDLER: wikibar_editFormatByLine
 },
 commentByLine:{
 CAPTION: 'comment by line',
 TOOLTIP: 'line comment',
 syntax: '',
 hint: 'css_comment',
 HANDLER: wikibar_editFormatByLine
 },
 commentByBlock:{
 CAPTION: 'comment by block',
 TOOLTIP: 'block comment',
 syntax: '',
 hint: 'css_comment',
 byBlock: true,
 HANDLER: wikibar_editFormatByLine
 }
 }
 },
 color:{
 TYPE: 'MENU',
 TOOLTIP: 'color tools',
 highlight:{
 CAPTION:'highlight text',
 TOOLTIP: 'highlight text',
 syntax: '@@user_text@@',
 hint: 'highlight_text',
 HANDLER: wikibar_editFormatByWord
 },
 color:{
 CAPTION:'text color',
 TOOLTIP: 'text color',
 hint: 'your_text',
 syntax: '@@color(%1):user_text@@',
 HANDLER: wikibar_getColorCode,
 doMore: wikibar_editFormatByWord
 },
 bgcolor:{
 CAPTION:'background color',
 TOOLTIP: 'background color',
 hint: 'your_text',
 syntax: '@@bgcolor(%1):user_text@@',
 HANDLER: wikibar_getColorCode,
 doMore: wikibar_editFormatByWord
 },
 colorcode:{
 CAPTION:'color code',
 TOOLTIP: 'insert color code',
 syntax: '%1',
 HANDLER: wikibar_getColorCode,
 doMore: wikibar_editFormatByCursor
 },
 'color palette':{
 TYPE:'MENU',
 DYNAITEM: wikibar_genPaletteSelector,
 SEPERATOR:{},
 morePalette:{
 CAPTION:'more palettes',
 TOOLTIP:'get more palettes',
 HANDLER: wikibar_getMorePalette
 }
 }
 },
 link:{
 TYPE: 'MENU',
 TOOLTIP: 'insert link',
 wiki:{
 CAPTION:'wiki link',
 TOOLTIP: 'wiki link',
 syntax: '[[user_text]]',
 hint: 'wiki_word',
 HANDLER: wikibar_editFormatByWord
 },
 pretty:{
 CAPTION: 'pretty link',
 TOOLTIP: 'pretty link',
 syntax: '[[user_text|%1]]',
 hint: 'pretty_word',
 param: 'PrettyLink Target',
 HANDLER: wikibar_getLinkUrl,
 doMore: wikibar_editFormatByWord
 },
 url:{
 TOOLTIP: 'url link',
 syntax: '[[user_text|%1]]',
 hint: 'your_text',
 param: 'http:\/\/...',
 HANDLER: wikibar_getLinkUrl,
 doMore: wikibar_editFormatByWord
 },
 image:{
 TOOLTIP: 'image link',
 syntax: '[img[user_text|%1]]',
 hint: 'alt_text',
 param: 'image/icon.jpg',
 HANDLER: wikibar_getLinkUrl,
 doMore: wikibar_editFormatByWord
 }
 },
 macro:{},
 more:{
 TYPE: 'MENU',
 TOOLTIP: 'more tools',
 table:{
 TYPE: 'MENU',
 TOOLTIP: 'table',
 table:{
 CAPTION:'create table',
 TOOLTIP: 'create a new table',
 syntax: '\n%1\n',
 HANDLER: wikibar_getTableRowCol,
 doMore: wikibar_editFormatByWord
 },
 header:{
 TOOLTIP: 'table header text',
 syntax: '|user_text|c',
 hint: 'table_header',
 HANDLER: wikibar_editFormatByWord
 },
 cell:{
 TOOLTIP: 'create a tabel cell',
 syntax: '|user_text|',
 hint: 'your_text',
 HANDLER: wikibar_editFormatByWord
 },
 columnHeader:{
 CAPTION:'column header',
 TOOLTIP: 'create a column header cell',
 syntax: '|!user_text|',
 hint: 'column_header',
 HANDLER: wikibar_editFormatByWord
 },
 cell:{
 TYPE: 'MENU',
 CAPTION: 'cell options',
 bgcolor:{
 CAPTION: 'background color',
 TOOLTIP: 'cell bgcolor',
 syntax: '|bgcolor(%1):user_text|',
 hint: 'your_text',
 HANDLER: wikibar_getColorCode,
 doMore: wikibar_editFormatByTableCell
 },
 alignLeft:{
 CAPTION: 'align left',
 TOOLTIP: 'left align cell text',
 syntax: '|user_text|',
 hint: 'your_text',
 HANDLER: wikibar_editFormatByTableCell
 },
 alignCenter:{
 CAPTION: 'align center',
 TOOLTIP: 'center align cell text',
 syntax: '| user_text |',
 hint: 'your_text',
 HANDLER: wikibar_editFormatByTableCell
 },
 alignRight:{
 CAPTION: 'align right',
 TOOLTIP: 'right align cell text',
 syntax: '| user_text|',
 hint: 'your_text',
 HANDLER: wikibar_editFormatByTableCell
 }
 }
 },
 html:{
 TYPE: 'MENU',
 html:{
 CAPTION: '<html>',
 TOOLTIP: 'html tag',
 syntax: '<html>\nuser_text\n</html>',
 hint: 'html_content',
 byBlock: true,
 HANDLER: wikibar_editFormatByLine
 }
 }
 },
 addon:{
 TYPE: 'MENU',
 TOOLTIP:'3rd party tools',
 'about addons':{
 TOOLTIP: 'list loaded addons',
 HANDLER: wikibar_doListAddons
 },
 SEPERATOR:{}
 }
};
addEvent(document, 'click', wikibarColorTool.onDocumentClick);
addEvent(document, 'click', wikibarPopup.onDocumentClick);
wikibar_install();
//}}}
<<siteMap Washington>><<siteMap California>><<siteMap Oregon>><<siteMap Australia>>
<<siteMap Varietal>>
<<siteMap Vintners>>
<<siteMap 2000>><<siteMap 2001>><<siteMap 2002>><<siteMap 2003>><<siteMap 2004>><<siteMap 2005>>
Zinfandel (also referred to as the zinfindel, zinfandal, zeinfandall, zinfardell and Black St. Peters during the 19th century), in Europe known as Primitivo and in Croatia as Crljenak Kaštelanski, is a red-skinned wine grape. Commonly referred to as Zin, it is used to produce a popular California wine, known for its intense fruitiness, lush texture, and high alcohol content.

Citation: [[Wikipedia|http://en.wikipedia.org/wiki/Zinfandel]]
/***
{{{<<writeIt {{'[[Current TW Directory|'+getTiddlyWikiDir()+']]'}}>>}}}
<<writeIt {{'[[Current TW Directory|'+getTiddlyWikiDir()+']]'}}>>

{{{<<writeIt {{"TW Last modified: "+(new Date(document.lastModified)).formatString("DD/MM/YYYY")}}>>}}}
<<writeIt {{"TW Last modified: "+(new Date(document.lastModified)).formatString("DD/MM/YYYY")}}>>


***/
//{{{


config.macros.writeIt = {};
config.macros.writeIt.handler= function(place,macroName,params,wikifier,paramString,tiddler) {
 wikify(params[0],place);

}
//}}}

//{{{
window.getTiddlyWikiDir=getTiddlyWikiDir;
//this function written by Udo
function getTiddlyWikiDir() {
 var path = document.location.toString();
 var i = path.lastIndexOf("/");
 return (i >= 0) ? path.substr(0, i+1) : path;
}

//}}}