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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

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

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

----
Also see AdvancedOptions
<<importTiddlers>>
Books related to living and coping with ADHD
<<newTiddler>>
[[All Tiddlers|SideBarTabs]]
[[Alphabetical Tiddlers |AllTiddlers]]
<<saveChanges>>
[[MainMenu]]
{{cleartable{
|''A''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("A")' write '"* [["+tiddler.title+"]]\n"'>>''B''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("B")' write '"* [["+tiddler.title+"]]\n"'>>''C''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("C")' write '"* [["+tiddler.title+"]]\n"'>>''D''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("D")' write '"* [["+tiddler.title+"]]\n"'>>''E''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("E")' write '"* [["+tiddler.title+"]]\n"'>>''F''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("F")' write '"* [["+tiddler.title+"]]\n"'>>''G''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("G")' write '"* [["+tiddler.title+"]]\n"'>>''H''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("H")' write '"* [["+tiddler.title+"]]\n"'>>|''I''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("I")' write '"* [["+tiddler.title+"]]\n"'>>''J''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("J")' write '"* [["+tiddler.title+"]]\n"'>>''K''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("K")' write '"* [["+tiddler.title+"]]\n"'>>''L''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("L")' write '"* [["+tiddler.title+"]]\n"'>>''M''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("M")' write '"* [["+tiddler.title+"]]\n"'>>''N''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("N")' write '"* [["+tiddler.title+"]]\n"'>>''O''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("O")' write '"* [["+tiddler.title+"]]\n"'>>''P''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("P")' write '"* [["+tiddler.title+"]]\n"'>>|''Q''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("Q")' write '"* [["+tiddler.title+"]]\n"'>>''R''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("R")' write '"* [["+tiddler.title+"]]\n"'>>''S''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("S")' write '"* [["+tiddler.title+"]]\n"'>>''T''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("T")' write '"* [["+tiddler.title+"]]\n"'>>''U''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("U")' write '"* [["+tiddler.title+"]]\n"'>>''V''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("V")' write '"* [["+tiddler.title+"]]\n"'>>''W''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("W")' write '"* [["+tiddler.title+"]]\n"'>>''X''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("X")' write '"* [["+tiddler.title+"]]\n"'>>''Y''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("Y")' write '"* [["+tiddler.title+"]]\n"'>>''Z''<<forEachTiddler where '! tiddler.tags.containsAny(["excludeSearch"]) && tiddler.title.startsWith("Z")' write '"* [["+tiddler.title+"]]\n"'>>|
}}}
Thomas and Chess studied very young children to determine whether there were differences in children's response patterns, personalities, and styles very early in life.  The idea is that if these traits appear soon after birth, then they could not be "personality" traits but more likely genetic and biological traits.

<<notice "Child Temperament" "family/library/temperm.htm" "">> 
<<forEachTiddler 

 where 
 'tiddler.tags.contains("ArticleTag")'

 sortBy 
 'tiddler.title' 
 ascending
>>
Below are links to some of the books I've reviewed and like.
Yes - The major theories of family therapy can also be applied to couples therapy.  This handout explains how.

<<notice "Traditional Family Theory Applied to Couples" "family/library/traditional_family_therapy.htm" "">> 
<<notice "Clinical Supervision" "learning/library/advpract/supervision.html" "This article outlines seven stages of supervision and development, and three roles of supervisors.">>
/***
|Name:|CloseOnCancelPlugin|
|Description:|Closes the tiddler if you click new tiddler then cancel. Default behaviour is to leave it open|
|Version:|3.0.1 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#CloseOnCancelPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.commands.cancelTiddler,{

	handler_mptw_orig_closeUnsaved: config.commands.cancelTiddler.handler,

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

});

//}}}
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
<<notice "Strengths in Psychological Assessment" "learning/library/advpract/strengths.html" "This article includes a four-step approach to incorporating client strengths in a report or conceptualization, and reviews six strengths and some of the research on them to help, as well as a brief review of the coping literature.">> 

General therapy and counseling articles
{{books{
[<img[Couples on the Fault Line|family/images/papp.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Couples-Fault-Line-Directions-Therapists/dp/1572307056/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1221355103&sr=1-1]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=b-YcfRJKyksC&pg=PT1&dq=couples+on+the+faultline&ei=_GvrSMTpK4z0Nfrg7PUP&sig=ACfU3U0JPwK02ObIdkjUgRXNuCtQ42NdFQ]]
}}}
//by Peggy Papp, editor//
This book features thirteen chapters by numerous authors on many modern problems couples face. While it is primarily written for therapists, the book is not steeped in theory or psychobabble, and includes numerous case examples that most couples can identify with and feel some empathy for. There are some useful questions for couples to reflect on (although more would have been nice), and examples of how other couples reached compromise to resolve their conflicts.  

The book starts with an introduction by Papp. In Chapter Two, Levner redefines the typical understanding we have of families from a two-career couple (his work and her work) to a three-career couples (his work, her work, and managing a family). He discusses gender roles, how men and women view the transition to parenting and their own roles as fathers and mothers, and some of how to address the time crunch couples feel.

Chapter Four addresses time issues directly discussing "Clock's, Calendars, and Couples." the short-term scheduling is often hard for couples, especially given that 50% of workers put in more than a 40 hour week, and about 20% work more than 50 hours. However, at least these scheduling issues are discussed; the long-term plans, "personal chronologies," and deadlines for dreams often go unsaid. When business travel, long-distance relationships, and caring for elderly family members is added in, time can seem to slow down or speed up in sometime predictable but often unpredictable ways for most families.

Technology is discussed as well, both in terms of how it infringes on couples' time together (cell phones, answering machines, email, internet, pagers, faxes...), the extended work of working at home, as well as the phenomena of "online romances" and easily available pornography and their impact on the marriage.

Infertility, donor eggs, later life pregnancies, and the ethics of genetics that couples must face are also discussed in several thoughtful chapters on the conceiving of children. Other issues such as depression and how it is different for men and women are discussed, as well as ethical and treatment issues in working with couples and domestic violence. Another chapter focuses on remarriage (which is 40% of all marriages, Papp points out) and the unique strengths and weaknesses such marriages entail.

While even 10 years ago chapters on couples work with gay and with lesbian couples would have been surprising, Papp includes these and they are well done in discussing issues such as patriarchy and homophobia, as well as greater flexibility and focus on making the relationship successful in the context of family of origin and family of choice. Also included is a chapter on work with African American Couples, and the impact of racism both outside and inside the relationship, spirituality, and defining "family" and how extensive the word is. there is a chapter on older couples, as well as "mixed culture" couples and their unique challenges around issues such as religion, child rearing, and gender roles. 
Resources on Couples Therapy
Mix of all sorts of things that relate to issues associated with cultural, diversity, and minority status and stress (except for [[GLBT]]) issues.
[[Welcome]]
{{books{
[<img[Discipline Without Shouting or Spanking|bookreview/wyckoff.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Discipline-Without-Shouting-Spanking-Practical/dp/0743228545/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1221354238&sr=1-1]]
}}}
//by Jerry Wyckoff, Ph.D. and Barbara C. Unell//
This is a really good book that allows you to look up any parenting problem you are having (e.g., name calling, resisting bedtime, and refusing to eat) and review techniques for how to respond. They offer several points to consider in general though.  

<<notice "Discipline Without Shouting or Spanking" "family/library/spank2.htm" "Read a detailed review">> 
{{books{
[<img[Disciplining Your Preschooler and Feeling Good About It|bookreview/golant.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Disciplining-Your-Preschooler-Feeling-About/dp/1565658094/ref=sr_1_1?ie=UTF8&s=books&qid=1223394724&sr=1-1]]
}}}
//by Mitch and Susan Golant//
Tthe married authors of this book have together and separately published almost 20 books on parenting and family.  They write extensively about their experiences as parents, and share many of their mistakes along the way, what they did differently the next time, and what worked.  They cover childhood tantrums, family meetings, working together with your parenting partner, and even how to deal with sibling relationships.  Each chapter closes with bullet points and key issues to remember. The book is great for the parent who feels pressured to be perfect.
Articles specifically dealing with divorce.
<<notice "Divorced Fathers" "family/divorce/divorcedads.htm" "">>


Topics covered include:
* what we know about fathers and divorce
* a range of issues such as parental alienation and allegations of abuse 
* child contact
* what we know about "deadbeat dads" 
* mediation and litigation

Suggested reading:
{{books{
[<img[Be a Great Divorced Dad|family/divorce/divdad.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Great-Divorced-Dad-Kenneth-Condrell/dp/0312155492/ref=sr_1_1?ie=UTF8&s=books&qid=1223401712&sr=1-1]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=UYaQBYI2-f0C&printsec=frontcover&dq=how+to+be+a+great+divorced+dad&ei=NG3rSK_4CorWMLfZ9KMP&sig=ACfU3U1z6STrhcGxvom_FfgJbO881L47JA]]

[<img[Fathers' Rights|family/divorce/fathers.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/exec/obidos/asin/0465023622/qid=958602977/sr=1-1/103-1064376-3547855]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=XKkoNE_cncsC&printsec=frontcover&dq=father%27s+rights&ei=XW3rSIDaKZOGM9mxvRM&sig=ACfU3U156z3c7RNNR2bEq9sHQjfCTDJ13w]]
}}}
<<notice "Divorced Mothers" "family/divorce/divorcedmoms.htm" "This short review covers some of what the research has found about the experiences of divorced mothers and how they differ from fathers">> 
As we become more of a "global community" this is far more common that it used to be. Consider:

* Some couples are "monocultural" but lives in a "local society" that is different (e.g., Muslim couple in an all-white neighborhood). 
* Others are "bicultural" such as a Jewish husband and Hispanic wife who must build their own "local society." This category includes cross-ethnic, cross-faith, and cross-class marriages. Family norms and acceptance (especially parental acceptance), sex-roles, language barriers, ideas about career and money, views on child development and parenting… are all likely to differ.
* A CDC study showed mixed-ethnic relationships are more likely to end in break-up (31% same-ethnic versus 41% mixed-ethnic - that's a 33% increase in risk). Finding key common ground may be an important starting point, then work on how they may have forgotten, underestimated, or only superficially explored cultural differences may come next. Alternately, the cultural differences may become "cultural camouflage" that obscures underlying emotional issues that have been ignored for years.

<<notice "CDC Study on Marriage and Divorce" "family/mod_couples_thx/cdc.html" "This article summarizes the findings of a Center for Disease Control study on women and marriage.">>
This article summarizes a recent study which examined precursors to harsh discipline.  the researchers found that low-income parents are more likely to believe in the benefits of spanking, and to fear the consequences of child misbehavior.  When predictions about physical punishment are based on socio-economic level, they are //six times// more likely to be accurate than when based on ethnicity.

<<notice "What Do We Know About Minority Families?" "family/library/ethnic6.htm" "">>
Whether parents' arguing has a positive or negative impact on children depends largely on how they argue.

<<notice "Do parents' arguments impact the children?" "family/library/ethnic5.htm" "Summary of a journal article">> 
Gottman offers it's two weeks between feeling chest pains and seeing a cardiologist, but it's six years between realizing your marriage has problems and seeking counseling.  Given this, it makes sense that many people are seeking couples therapy when it is too late to do much about the relationship problems.  
* Jacobsen found that while 55% of couples improved after marital therapy, only 35% of couples were in the non-distressed range (put another way, 45% of couples don't get better, 20% get a little better, and only 35% are happy after therapy).
* Jacobsen found that often people in marital therapy only look better at the end of the study because the controls got so much worse.
* Jacobsen reviewed relapse studies and determined that 30-50% of improved couples relapse in two years (put another way, about 17% of couples are truly happy two years after couples therapy).
Gottman recommends that couples should seek help for relationship problems early, and see a therapist who uses a therapy method that has solid research supporting that it works.

<<notice "The Sound Marital House" "family/library/gottman.html" "Read more about Gottman's theory, based on 25 years of research, about what makes a healthy and unhealthy relationship.">>

<<notice "Emotion Focused Therapy for Couples" "family/library/eft.html" "Read more about Johnson and Greenberg's theory of couples therapy and adult attachment in healthy and unhealthy relationships.">>

<<notice "Integrative Behavioral Couples Therapy" "family/library/ibct.html" "Read more about Jacobson and Christenson's model of Couples Therapy which integrates behavioral and emotional approaches.">>

<<notice "Solution Focused Therapy" "family/library/sft.htm" "Read more about in soo Berg and de Shazer's model of Therapy, which has been applied to individuals, couples, families, and even teacher and social workers working with teens.">>
<<notice "Mutual Combat" "learning/library/assess/mutual_combat.html" "This article provides a brief outline of the differences between traditional violence and mutual combat.  It lists characteristics to look for when assessing the type of violence seen.">>
Several well-published researchers in this area discuss the research, what it tells us, and what we still don't know.

<<notice "Corporal Punishment in Children" "family/library/disc.htm" "What does it accomplish?">>

Dr. Laura attacked the American Psychological Association because of what she read in a journal they publish.  Did she understand what she read?  Did she tell her listeners and readers the truth?


<<notice "Dr. Laura and Pedophilia" "family/library/drlaura.htm" "Review of //Evil Among Us//">>





<<notice "Letter to Dr. Laura" "family/library/lettertodrlaura.htm" "asking a few questions about how to live by the Bible's tenants">>

<!--{{{-->
<div class="toolbar" macro="toolbar +saveTiddler closeOthers -cancelTiddler references deleteTiddler"></div>
<div class="title" macro="view title"></div>
<div class="editLabel">Title</div><div class="editor" macro="edit title"></div>
<div class="editLabel">Tags</div><div class="editor" macro="edit tags"></div>
<div class="editorFooter"><span macro="message views.editor.tagPrompt"></span><span macro="tagChooser"></span></div>
<div class="editor" macro="edit text"></div>
<br/>
<!--}}}-->
<<notice "Introduction and Preamble" "ethics/pfintro.html" "Read more about why we have a code, what ethics are, and why people make ethical mistakes.">>
<<notice "General Principles" "ethics/pfprinciples.html" "Read more about the aspirational goals for all Psychologists.">>
<<notice "Standard 1" "ethics/pfstand1.html" "Resolving Ethical Issues">><br><br><br>
<<notice "Standard 2" "ethics/pfstand2.html" "Competence">><br><br><br>
<<notice "Standard 3" "ethics/pfstand3.html" "Human Relations">><br><br><br>
<<notice "Standard 4" "ethics/pfstand4.html" "Privacy and Confidentiality">><br><br><br>
<<notice "Standard 5" "ethics/pfstand5.html" "Advertising and Other Public Statements">><br><br><br>
<<notice "Standard 6" "ethics/pfstand6.html" "Record Keeping and Fees">><br><br><br>
<<notice "Standard 7" "ethics/pfstand7.html" "Education and Training">><br><br><br>
<<notice "Standard 8" "ethics/pfstand8.html" "Research and Publication">><br><br><br>
<<notice "Standard 9" "ethics/pfstand9.html" "Assessment">><br><br><br>
<<notice "Standard 10" "ethics/pfstand10.html" "Therapy">><br><br><br>

/***
|Name:|ExtentTagButtonPlugin|
|Description:|Adds a New tiddler button in the tag drop down|
|Version:|3.2 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#ExtendTagButtonPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{

window.onClickTag_mptw_orig = window.onClickTag;
window.onClickTag = function(e) {
	window.onClickTag_mptw_orig.apply(this,arguments);
	var tag = this.getAttribute("tag");
	var title = this.getAttribute("tiddler");
	// Thanks Saq, you're a genius :)
	var popup = Popup.stack[Popup.stack.length-1].popup;
	createTiddlyElement(createTiddlyElement(popup,"li",null,"listBreak"),"div");
	wikify("<<newTiddler label:'New tiddler' tag:'"+tag+"'>>",createTiddlyElement(popup,"li"));
	return false;
}

//}}}
{{books{
[<img[Extraordinary Teachers|bookreview/stephenson.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Extraordinary-Teachers-Fred-Stephenson-Jr/dp/0740718606/ref=sr_1_1?ie=UTF8&s=books&qid=1221351366&sr=8-1]]
}}}
//by Fred Stephenson//
This is an excellent book with 35 short chapters from excellent teachers on what they've learned about teaching and why being a teacher is so important to them. Their experience spans grade school to graduate school, and views as a teacher, mentor, and parent. Some of it is practical advice for the beginning teacher (don't hand back assignments at the start of class), while some is about philosophy of teaching (it requires commitment, enthusiasm and warmth according to Glynn), to reaching students (Reiff asks how knowledge improves society and Sweeney uses the world as the classroom). Many chapters deal directly with the concern teachers hold today - maturity in students, critical thinking, and love of learning. If you've become jaded or burned out in your teaching after a bad semester or year, this is definitely a revitalizing read!

Read another reviewer's thoughts at [[http://en.wikibooks.org/wiki/User:Katki009|http://en.wikibooks.org/wiki/User:Katki009]]
Readings and points of interest related to family functioning
{{books{
[<img[Family Investments in Children's Potential|family/images/kalil.jpg]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Family-Investments-Childrens-Potential-Monographs/dp/0805848711/ref=sr_1_1?ie=UTF8&s=books&qid=1221352474&sr=1-1]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=FI_o3xxnOS0C&printsec=frontcover&dq=family+investments+in+children%27s+potential&ei=yGvrSKbxDqPCM6ypkIUG&sig=ACfU3U1lQSXd_uNVgC2j3IRnH0ZQGQrrcw]]
}}}
//By Ariel Kalil & Thomas C. ~DeLeire//
This book reviews research into family functioning using an economic model to understand how parents and families invest their resources to raise their children. It's a good review of some of the research, both for those interested in what it reveals and for those interested in the design of the studies. 

Kalil and ~DeLeire use an economic approach to conceptualize a bridge between parental versus community resources, and review an interesting range of family research. While the model they use is sometimes dry, speaking of mathematical formulas, indicators, and "investment strategies," their approach appears well-reasoned, and offers a thoughtful and humanizing way to integrate personal, cultural, and economic points of view to understand resources available to families, and how parents invest resources to raise their children.

Four chapters focusing on parent behaviors, with one spelling out "The Five S's" (Safety, Stimulation, Support, Structure, and Surveillance) which parents must provide to raise their children. Genetics and temperament, complications in family research, and multigenerational studies of parental resources and "family culture" round out this section. Four more chapters focus on parental investment strategies in both more common majority families (single-parent, divorced, and married two-parent families), while two focus on special families. One tackles the demands and tradeoffs faced by parents of developmentally challenged children, while the other tackles investment strategies and payoff for immigrant families. Both are well written and comprehensive.

In closing, Kalil and ~DeLeire present two detailed chapters, one reviewing the literature on the effectiveness of parent-based versus child-based interventions, and the other laying out a cross-national perspective on the investment strategies adopted by parents in other countries. Both provide research, statistics, and discussion of differing views (the family involved in a treatment program, the researcher, and the politician or administrator) of these perspectives.

Overall, a good read into family research! 

<<notice "Family Investments in Children's Potential" "family/library/brkalil.html" "read the full review">>
/***
|''Name:''|ForEachTiddlerPlugin|
|''Version:''|1.0.8 (2007-04-12)|
|''Source:''|http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''Copyright:''|&copy; 2005-2007 [[abego Software|http://www.abego-software.de]]|
|''TiddlyWiki:''|1.2.38+, 2.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
!Description

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

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

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

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

!Code
***/
//{{{

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

	return tiddlyWiki;
};


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

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

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

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

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

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

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

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


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

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


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

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

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

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

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

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


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



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


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

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

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

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


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


} // of "install only once"

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


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

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

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

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

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

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
***/
TiddlyWiki uses Wiki style markup, a way of lightly "tagging" plain text so it can be transformed into HTML. Edit this Tiddler to see samples.

!Header
!!Header
!!!Header
These were created by typing
Headers are created with an exclamation point
&#33;Header 1 
&#33;&#33;Header 2 
&#33;&#33;&#33;Header 3
----
{{cleartablethree{
|''Unordered Lists''                                                   |These were created by typing|
|* Make bulleted lists with asterisks                                |&#42; Make bulleted lists with asterisks |
|** To indent, just add more asterisks...                            |&#42;&#42;To indent, just add more asterisks...|
----
|''Links''                                                        ||
|You can include a link to                                        ||
|a [[specific file|file://c:/autoexec.bat]]            | &#91;&#91; specific file &#166; file://c:/autoexec.bat &#93;&#93; |
|a [[Windows folder|file:///c:/windows/]]              | &#91;&#91; Windows folder&#166; file:///c:/windows/ &#93;&#93; |
|a [[web site|http://google.com]] with brackets        | &#91;&#91; web site &#166; http://google.com &#93;&#93; |
----
|''Images''                                            | |
|[img[http://www.thechicagoschool.edu/resources/content/1/4/9/3/images/aba_cover_sm.jpg]]  | &#91; img &#91;http://www.thechicagoschool.edu/resources/content/1/4/9/3/images/aba_cover_sm.jpg &#93;&#93;|
----
|''Horizontal Rules''                                                |&#45;&#45;&#45;&#45; (4 dashes)|
----
|                                                                    ||
|''Other Formatting''                                                |These were created by typing|
|''Bold''                                                            |&#34;Bold&#34; (two single quotes next to each other)|
|__Underline__                                                       |&#95;&#95;Underline&#95;&#95;|
|//Italic//                                                          |&#92;&#92;Italic&#92;&#92;|
|@@highlight@@                                                       |&#64; &#64; highlight&#64; &#64; |
----
{{justifyright{
This line will be right-aligned.
}}}
|                                                                    |This was done by typing|
|                                                                    |&#123;&#123;justifyright&#123;|
|                                                                    |This line will be right-aligned.|
|                                                                    |&#125;&#125;&#125;|
----
{{boxone{
Something here
}}}
|                                                                    |&#123;&#123;boxone&#123; |
|                                                                    |Something here |
|                                                                    |&#125;&#125;&#125; |
{{boxtwo{
Something here
}}}
|                                                                    |&#123;&#123;boxtwo&#123; |
|                                                                    |Something here |
|                                                                    |&#125;&#125;&#125; |
{{boxthree{
Something here
}}}
|                                                                    |&#123;&#123;boxthree&#123; |
|                                                                    |Something here |
|                                                                    |&#125;&#125;&#125; |
{{boxfour{
Something here
}}}
|                                                                    |&#123;&#123;boxfour&#123; |
|                                                                    |Something here |
|                                                                    |&#125;&#125;&#125; |
----
Articles that relate to issues for GLBT folks
<<notice "HIPAA" "ethics/hipaa.html" "Information on The Health Insurance Portability and Accessibility Act">>
/***
|Name|HTMLFormattingPlugin|
|Source|http://www.TiddlyTools.com/#HTMLFormattingPlugin|
|Documentation|http://www.TiddlyTools.com/#HTMLFormattingPluginInfo|
|Version|2.1.5|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|'HTML' formatter|
|Description|embed wiki syntax formatting inside of HTML content|
The ~HTMLFormatting plugin allows you to ''mix wiki-style formatting syntax within HTML formatted content'' by extending the action of the standard TiddlyWiki formatting handler.
!!!!!Documentation
>see [[HTMLFormattingPluginInfo]]
!!!!!Revisions
<<<
2008.04.26 [*.*.*] plugin size reduction: more documentation moved to HTMLFormattingInfo
2008.01.08 [*.*.*] plugin size reduction: documentation moved to HTMLFormattingInfo
2007.12.04 [*.*.*] update for TW2.3.0: replaced deprecated core functions, regexps, and macros
2007.06.14 [2.1.5] in formatter, removed call to e.normalize().  Creates an INFINITE RECURSION error in Safari!!!!
| see [[HTMLFormattingPluginInfo]] for additional revision details |
2005.06.26 [1.0.0] Initial Release (as code adaptation - pre-dates TiddlyWiki plugin architecture!!)
<<<
!!!!!Code
***/
//{{{
version.extensions.HTMLFormattingPlugin= {major: 2, minor: 1, revision: 5, date: new Date(2007,6,14)};

// find the formatter for HTML and replace the handler
initHTMLFormatter();
function initHTMLFormatter()
{
	for (var i=0; i<config.formatters.length && config.formatters[i].name!="html"; i++);
	if (i<config.formatters.length)	config.formatters[i].handler=function(w) {
		if (!this.lookaheadRegExp)  // fixup for TW2.0.x
			this.lookaheadRegExp = new RegExp(this.lookahead,"mg");
		this.lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
			var html=lookaheadMatch[1];
			// optionally suppress wiki-style literal handling of newlines
			if (html.indexOf('<hide linebreaks>')!=-1) html=html.replace(/\n/g,' ');
			// remove carriage returns (\r) added by IE textarea
			html=html.replace(/\r/g,'');
			// encode newlines (\n) and macro brackets (<< and >>)
			html=html.replace(/\n/g,'\\n').replace(/<</g,'%%(').replace(/>>/g,')%%');
			// create span to hold HTML
			var e = createTiddlyElement(w.output,"span");
			// let browser parse HTML
			e.innerHTML=html;
			// walk node tree and call wikify() on each text node
			wikifyTextNodes(e);
			// continue wiki parsing
			w.nextMatch = this.lookaheadRegExp.lastIndex;
		}
	}
}

// wikify text nodes remaining after HTML content is processed (pre-order recursion)
function wikifyTextNodes(theNode)
{
	// textarea node doesn't get wikified, just decoded... 
	if (theNode.nodeName.toLowerCase()=='textarea')
		theNode.value=theNode.value.replace(/\%%\(/g,'<<').replace(/\)\%%/g,'>>').replace(/\\n/g,'\n');
	else for (var i=0;i<theNode.childNodes.length;i++) {
		var theChild=theNode.childNodes.item(i);
		if (theChild.nodeName.toLowerCase()=='option') continue;
		if (theChild.nodeName.toLowerCase()=='select') continue;
		wikifyTextNodes(theChild);
		if (theChild.nodeName=='#text') {
			var txt=theChild.nodeValue;
			// decode macro brackets and newlines
			txt=txt.replace(/\%%\(/g,'<<').replace(/\)\%%/g,'>>').replace(/\\n/g,'\n');
			// replace text node with wikified() span
			var newNode=createTiddlyElement(null,"span");
			theNode.replaceChild(newNode,theChild);
			wikify(txt,newNode);
		}
	}
}
//}}}

/***
|Name:|HideWhenPlugin|
|Description:|Allows conditional inclusion/exclusion in templates|
|Version:|3.1 ($Rev: 3919 $)|
|Date:|$Date: 2008-03-13 02:03:12 +1000 (Thu, 13 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#HideWhenPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
For use in ViewTemplate and EditTemplate. Example usage:
{{{<div macro="showWhenTagged Task">[[TaskToolbar]]</div>}}}
{{{<div macro="showWhen tiddler.modifier == 'BartSimpson'"><img src="bart.gif"/></div>}}}
***/
//{{{

window.hideWhenLastTest = false;

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


merge(config.macros,{

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

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

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

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

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

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

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

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

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

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

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

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

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

});

//}}}
<<top>>
[[See All Tiddlers|AllTiddlers]]
[[Admin]]
<<closeAll>>
[[Search|SearchPsychPage]]
/***
|Name|HoverMenuPlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#HoverMenuPlugin|
|Version|1.11|
|Requires|~TW2.x|
!Description:
Provides a hovering menu on the edge of the screen for commonly used commands, that scrolls with the page.

!Demo:
Observe the hovering menu on the right edge of the screen.

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

To customize whether the menu sticks to the right or left edge of the screen, and its start position, edit the HoverMenu configuration settings part of the code below. It's well documented, so don't be scared!

The menu has an id of hoverMenu, in case you want to style the buttons in it using css.

!Notes:
Since the default HoverMenu contains buttons for toggling the side bar and jumping to the top of the screen and to open tiddlers, the ToggleSideBarMacro, JumpMacro and the JumpToTopMacro are included in this tiddler, so you dont need to install them separately. Having them installed separately as well could lead to complications.

If you dont intend to use these three macros at all, feel free to remove those sections of code in this tiddler.

!To Do:
* rework code to allow multiple hovering menus in different positions, horizontal etc.
* incorporate code for keyboard shortcuts that correspond to the buttons in the hovermenu

!History:
*03-08-06, ver 1.1.2: compatibility fix with SelectThemePlugin
*03-08-06,  ver 1.11: fixed error with button tooltips
*27-07-06, ver 1.1 : added JumpMacro to hoverMenu
*23-07-06

!Code
***/

/***
start HoverMenu plugin code
***/
//{{{
config.hoverMenu={};
//}}}

/***
HoverMenu configuration settings
***/
//{{{
config.hoverMenu.settings={
               align: 'right',                   
               x: 10,              
               y: 50            
               };
//}}}

//{{{
//continue HoverMenu plugin code
config.hoverMenu.handler=function()
{              
               if (!document.getElementById("hoverMenu"))
               {
               var theMenu = createTiddlyElement(document.getElementById("contentWrapper"), "div","hoverMenu");
               theMenu.setAttribute("refresh","content");
               theMenu.setAttribute("tiddler","HoverMenu");
               var menuContent = store.getTiddlerText("HoverMenu");
               wikify(menuContent,theMenu);
              }

	       var Xloc = this.settings.x;
	       Yloc =this.settings.y;
	       var ns = (navigator.appName.indexOf("Netscape") != -1);
	       function SetMenu(id)
                        {
		        var GetElements=document.getElementById?document.getElementById(id):document.all?document.all[id]:document.layers[id];
		        if(document.layers)GetElements.style=GetElements;
		        GetElements.sP=function(x,y){this.style[config.hoverMenu.settings.align]=x +"px";this.style.top=y +"px";};
		        GetElements.x = Xloc;
		        GetElements.y = findScrollY();
		        GetElements.y += Yloc;
		        return GetElements;
	                }
               window.LoCate_XY=function()
                        {
		        var pY =  findScrollY();
                        ftlObj.y += (pY + Yloc - ftlObj.y)/15;
		        ftlObj.sP(ftlObj.x, ftlObj.y);
		        setTimeout("LoCate_XY()", 10);
	                }
               ftlObj = SetMenu("hoverMenu");
	       LoCate_XY();
};

window.old_lewcid_hovermenu_restart = restart;
restart = function()
{
               window.old_lewcid_hovermenu_restart();
               config.hoverMenu.handler();
};

setStylesheet();


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

               if (place.lastChild.tagName!="BR")
                     {
                      place.lastChild.firstChild.data = params[0];
                      if (params[1]) {place.lastChild.title = params[1];}
                     }
};

config.shadowTiddlers["HoverMenu"]="<<top>>\n<<toggleSideBar>><<renameButton '>' >>\n<<jump j '' top>>\n<<saveChanges>><<renameButton s 'Save TiddlyWiki'>>\n<<newTiddler>><<renameButton n>>\n";
//}}}
//end HoverMenu plugin code

//Start ToggleSideBarMacro code
//{{{
config.macros.toggleSideBar={};

config.macros.toggleSideBar.settings={
         styleHide :  "#sidebar { display: none;}\n"+"#contentWrapper #displayArea { margin-right: 1em;}\n"+"",
         styleShow : " ",
         arrow1: "«",
         arrow2: "»"
};

config.macros.toggleSideBar.handler=function (place,macroName,params,wikifier,paramString,tiddler)
{
          var tooltip= params[1]||'toggle sidebar';
          var mode = (params[2] && params[2]=="hide")? "hide":"show";
          var arrow = (mode == "hide")? this.settings.arrow1:this.settings.arrow2;
          var label= (params[0]&&params[0]!='.')?params[0]+" "+arrow:arrow;
          var theBtn = createTiddlyButton(place,label,tooltip,this.onToggleSideBar,"button HideSideBarButton");
          if (mode == "hide")
             { 
             (document.getElementById("sidebar")).setAttribute("toggle","hide");
              setStylesheet(this.settings.styleHide,"ToggleSideBarStyles");
             }
};

config.macros.toggleSideBar.onToggleSideBar = function(){
          var sidebar = document.getElementById("sidebar");
          var settings = config.macros.toggleSideBar.settings;
          if (sidebar.getAttribute("toggle")=='hide')
             {
              setStylesheet(settings.styleShow,"ToggleSideBarStyles");
              sidebar.setAttribute("toggle","show");
              this.firstChild.data= (this.firstChild.data).replace(settings.arrow1,settings.arrow2);
              }
          else
              {    
               setStylesheet(settings.styleHide,"ToggleSideBarStyles");
               sidebar.setAttribute("toggle","hide");
               this.firstChild.data= (this.firstChild.data).replace(settings.arrow2,settings.arrow1);
              }

     return false;
}

setStylesheet(".HideSideBarButton .button {font-weight:bold; padding: 0 5px;}\n","ToggleSideBarButtonStyles");
//}}}
//end ToggleSideBarMacro code

//start JumpToTopMacro code
//{{{
config.macros.top={};
config.macros.top.handler=function(place,macroName)
{
               createTiddlyButton(place,"Top","Jump to Top",this.onclick);
}
config.macros.top.onclick=function()
{
               window.scrollTo(0,0);
};

config.commands.top =
{
               text:" Top ",
               tooltip:"Jump to the top of the screen"
};

config.commands.top.handler = function(event,src,title)
{
               window.scrollTo(0,0);
}
//}}}
//end JumpToStartMacro code

//start JumpMacro 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);
}
//}}}
//end JumpMacro code

//utility functions
//{{{
Popup.show = function(unused,slowly)
{
	var curr = Popup.stack[Popup.stack.length-1];
	var rootLeft = findPosX(curr.root);
	var rootTop = findPosY(curr.root);
	var rootHeight = curr.root.offsetHeight;
	var popupLeft = rootLeft;
	var popupTop = rootTop + rootHeight;
	var popupWidth = curr.popup.offsetWidth;
	var winWidth = findWindowWidth();
        if (isChild(curr.root,'hoverMenu'))
              var x = config.hoverMenu.settings.x;
        else
              var x = 0;
	if(popupLeft + popupWidth+x > winWidth)
		popupLeft = winWidth - popupWidth -x;
        if (isChild(curr.root,'hoverMenu'))
  	        {curr.popup.style.right = x + "px";}
        else
                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));
}

window.isChild = function(e,parentId) {
        while (e != null) {
                var parent = document.getElementById(parentId);
                if (parent == e) return true;
                e = e.parentNode;
                }
        return false;
};
//}}}
Some tips from Pallesen and colleagues on managing insomnia.

<<notice "How to Get a Good Night's Sleep" "family/library/sleep.htm" "">> 
This article gives 10 tips to reduce stress.

<<notice "10 Tips to Reduce Stress" "family/library/reducestress.html" "">>
<<notice "The History of Marital Therapy" "family/library/history_of_couples_therapy.html" "This short review outlines the history of couples therapy over the last 70 years.">>
<<notice "Infidelity" "family/library/infidelity.html" "Read more about one model for addressing infidelity in couples therapy.">>
There's an intrusion into the home of technology and career. More people work from home, travel for work, and allow work intrusions (e.g., email, fax, cell phones, web searches, stock/site/news monitoring, online collaboration) into the home.  The result is that 65% of American families do not have a set "dinner time ritual". This makes time for intimacy and family harder to find, especially given that 50% of workers put in more than a 40 hour week, and about 20% work more than 50 hours.

However, at least these scheduling issues are discussed; the long-term plans, "personal chronologies," and deadlines for dreams often go unsaid. When business travel, long-distance relationships, and caring for elderly family members are added in, time can seem to slow down or speed up in sometime predictable but often unpredictable ways for most families. 

~Imber-Black offers three myths couples have:
   1) We can have it all
   2) We can fit one more thing in if we tweak it
   3) We are in control of our time

Altering excessive work routines is one of Wallerstein's (and many others') suggested ways to stabilize family, along with paid family leave and better protection for those who are willing to take family leave, and tax breaks for parents who stay home to raise children. Levner offers we need to redefine the typical understanding we have of two-career couples (his work and her work) to a three-career couple (his work, her work, and managing a family). 

(from [[Couples on the Fault Line]])
An article about work and family life balance covering
* the nature of the "balance" between them
* whether we face actual increased or the perception of increased work responsibilities
* gender differences in work and family balance
* the intrusion of work into family life, family into work life, and the response to imbalance
* changing family lifestyles
* conclusions and references

<<notice "Work and Family Balance" "family/library/work-family-balance.htm" "">> 
This article offers:
* six tips for teachers with ADHD children
* fourteen tips for parents with ADHD children
* seven issues to consider when choosing to take medication
* some outcome data for concerned parents

<<notice "ADHD and Coping" "family/library/adhd_coping.html" "">> 
What do you do to manage children's anger? To teach them to deal with it more maturely?  To keep from losing your temper with them?

Here's two tips:
* Comment on your child's behavior when it is good.
** Something like, "I like the way you handled your brother when he took your stuff." An observant and involved parent can find dozens of things they like about their child's behavior... "I like the way you come in for dinner without being reminded"... "I appreciate your hanging up your clothes even though you were in a hurry to get out to play"... "I'm glad you shared your snack with your sister"
** Teachers can do the same, offering, "I know it was difficult for you to wait your turn, and I'm pleased that you could do it"... "You were thoughtful in offering to help Marcus with his spelling"
* Ignore inappropriate behavior that you can tolerate.
**Nagging you while you're on the phone can be dealt with by praising what you liked ("Thank you for waiting while I was talking on the phone. I'm off the phone now, so what's up?") and ignoring what you don't like (ignoring a child's requests while you are on the phone).
**You may be thinking, "You don't know what they do //then//? Then they yell //louder// and you have to answer them just to have some quiet." When you respond this way, you reinforce them for yelling. Yelling gets your attention, so next time they will yell louder to make sure you respond.

<<notice "Dealing With Anger and Children" "family/library/angry.html" "Find six more tips for dealing with anger and children">> 
This article offers
* some introductory divorce statistics
* assessment of the relationship at the start of therapy
* advice to those who want to divorce
* final thoughts about the impact of divorce on the family

<<notice "Individual Reasons for Divorce" "family/library/sep_div.html" "">> 
This article covers
* Protecting younger children
* Teaching children 10-12
* Web use for children age 12 to 15
* Web use for teens
* Teaching children about the web through reasoning - "Who is Helped? Who is Hurt?"

<<notice "Protecting Children On-Line" "family/library/protect.html" "">>
<<notice "Difficult Questions Kids Ask" "family/divorce/tellingchildren.htm" "This short review discusses preparation, what to say, and how to deal with the aftermath of announcing the divorce.">>

Suggested reading:
{{books{
[<img[Difficult Questions Kids Ask (and are too afraid to ask) About Divorce by Schneider and Zuckerberg|family/divorce/questions.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/exec/obidos/asin/0684814366/qid%3d958602950/103-1064376-3547855]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=vXrSx-IywPAC&printsec=frontcover&dq=difficult+questions+kids+ask+about+divorce&ei=d23rSIr1BYqiM4TTyfIP&sig=ACfU3U3D-si2WEG3BBN9kl2jhteaeNu3zA]]
}}}
<<notice "Treatment Of Domestic Violence" "learning/library/assess/treatment.html" "This article discusses some of the preparation a professional needs to work with cases of domestic violence, as well as some of the issues and divergent opinions in the literature on the treatment of domestic violence.">>
<<notice "Children of Divorce and Adjustment" "family/divorce/childrenadjust.htm" "This short review explains how age, attachment, parenting style, and parental conflict impact a child's adjustment after divorce.">>
This article covers how to conduct a Mental Status Exam (MSE).  Psychiatrists and Emergency Room staff often conduct a MSE as part of a screening process, and base it only on an interview.  Psychologists often base the MSE findings on a multi-appointment assessment, and address changes in functioning over the period of the assessment process. 

<<notice "How to Conduct a Mental Status Exam" "learning/library/advpract/mse.htm" "This explains the four sections of a MSE, and eight questions to explore mental state and functioning when this is done only in a brief interview.">> 

<<notice "Mental Status Exam Form" "learning/library/advpract/Mental Status Exam Recording Sheet.pdf" "This is a three page form that you can use to guide and record your observations throughout the assessment.">>  
<<notice "Consequences of Parental Divorce" "family/divorce/amato_booth.htm" "This short review lays out three models for how  your parents' divorce impacts you, and can impact your future marriage and risk for divorce.">>
/***
|Name:|InstantTimestampPlugin|
|Description:|A handy way to insert timestamps in your tiddler content|
|Version:|1.0.10 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#InstantTimestampPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Usage
If you enter {ts} in your tiddler content (without the spaces) it will be replaced with a timestamp when you save the tiddler. Full list of formats:
* {ts} or {t} -> timestamp
* {ds} or {d} -> datestamp
* !ts or !t at start of line -> !!timestamp
* !ds or !d at start of line -> !!datestamp
(I added the extra ! since that's how I like it. Remove it from translations below if required)
!!Notes
* Change the timeFormat and dateFormat below to suit your preference.
* See also http://mptw2.tiddlyspot.com/#AutoCorrectPlugin
* You could invent other translations and add them to the translations array below.
***/
//{{{

config.InstantTimestamp = {

	// adjust to suit
	timeFormat: 'DD/0MM/YY 0hh:0mm',
	dateFormat: 'DD/0MM/YY',

	translations: [
		[/^!ts?$/img,  "'!!{{ts{'+now.formatString(config.InstantTimestamp.timeFormat)+'}}}'"],
		[/^!ds?$/img,  "'!!{{ds{'+now.formatString(config.InstantTimestamp.dateFormat)+'}}}'"],

		// thanks Adapted Cat
		[/\{ts?\}(?!\}\})/ig,"'{{ts{'+now.formatString(config.InstantTimestamp.timeFormat)+'}}}'"],
		[/\{ds?\}(?!\}\})/ig,"'{{ds{'+now.formatString(config.InstantTimestamp.dateFormat)+'}}}'"]
		
	],

	excludeTags: [
		"noAutoCorrect",
		"noTimestamp",
		"html",
		"CSS",
		"css",
		"systemConfig",
		"systemConfigDisabled",
		"zsystemConfig",
		"Plugins",
		"Plugin",
		"plugins",
		"plugin",
		"javascript",
		"code",
		"systemTheme",
		"systemPalette"
	],

	excludeTiddlers: [
		"StyleSheet",
		"StyleSheetLayout",
		"StyleSheetColors",
		"StyleSheetPrint"
		// more?
	]

}; 

TiddlyWiki.prototype.saveTiddler_mptw_instanttimestamp = TiddlyWiki.prototype.saveTiddler;
TiddlyWiki.prototype.saveTiddler = function(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created) {

	tags = tags ? tags : []; // just in case tags is null
	tags = (typeof(tags) == "string") ? tags.readBracketedList() : tags;
	var conf = config.InstantTimestamp;

	if ( !tags.containsAny(conf.excludeTags) && !conf.excludeTiddlers.contains(newTitle) ) {

		var now = new Date();
		var trans = conf.translations;
		for (var i=0;i<trans.length;i++) {
			newBody = newBody.replace(trans[i][0], eval(trans[i][1]));
		}
	}

	// TODO: use apply() instead of naming all args?
	return this.saveTiddler_mptw_instanttimestamp(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created);
}

// you can override these in StyleSheet 
setStylesheet(".ts,.ds { font-style:italic; }","instantTimestampStyles");

//}}}

The article discusses
* the possible benefits of therapy for adults with ADHD
* nine tips for coping with ADHD without or in addition to medication

<<notice "ADHD in Adults" "family/library/adhd_adults.html" "">> 
{{books{
[<img[I’m Not a Racist But…|bookreview/blum.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/s/ref=nb_ss_b?url=search-alias%3Dstripbooks&field-keywords=I%92m+Not+a+Racist+But%85+The+Moral+Quandary+of+Race&x=0&y=0]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=36nxBjpi4R8C&printsec=frontcover&dq=i%27m+not+a+racist+but&ei=tmrrSPW5OZjMMNLSuQg&sig=ACfU3U2N1vCbu1pK4fli3ueiFYLZpduUnQ]]
}}}
//by Lawrence Blum//
Blum’s book is an excellent guide to discussing race and racism. He writes clearly, is sensitive to the emotional reactions of the reader, and critically examines alternate points of view. While this would make any scholarly work "good," for this topic this especially important. Blum is in many ways "speaking the unspoken" when he writes of beliefs and opinions many are fearful to even raise for discussion and challenge. 

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

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

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

window.getSpecialBackupPath = function(backupPath) {

	var now = new Date();

	var modes = config.lessBackups.modes;

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

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

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

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

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

//}}}
{{books{
[<img[Lost Boys|family/images/garbarino.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Lost-Boys-Sons-Turn-Violent/dp/0385499329/ref=sr_1_1?ie=UTF8&s=books&qid=1221355442&sr=1-1]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=52KkWHaIwbAC&printsec=frontcover&dq=lost+boys&ei=_WrrSNSHCI3IMvPc9YUF&sig=ACfU3U28zeb4KjqjMYWiJdZDzWOsCZlWrg]]
}}}
//by James Garbarino, Ph.D.//
Dr. Garbarino discusses the reasons for violence in boys and teens, tracing factors from birth to adolescence to show how the inner-city African American boy is not that much different from the small-town Caucasian boy from Arkansas. He covers how attachment issues, parental abandonment, and abuse set the stage for some young men to become killers.  He discusses what is needed to stop this at individual, family and community, and social levels, and how these youth can be treated.

<<notice "Lost Boys" "family/library/garbarino.html" "Why our Sons Turn Violent and How We Can Save Them">>
{{whitelinks{[[Welcome]]}}}{{whitelinks{<<closeAll>>}}}{{whitelinks{[[Search|SearchPsychPage]]}}}{{whitelinks{<<saveChanges>>}}}


/***
|Name:|MptwConfigPlugin|
|Description:|Miscellaneous tweaks used by MPTW|
|Version:|1.0 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#MptwConfigPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#MptwConfigPlugin|
!!Note: instead of editing this you should put overrides in MptwUserConfigPlugin
***/
//{{{
var originalReadOnly = readOnly;
var originalShowBackstage = showBackstage;

config.options.chkHttpReadOnly = true; 		// means web visitors can not experiment with your site by clicking edit
readOnly = false;					// needed because the above doesn't work any
							// more post 2.1 (??)
showBackstage = false;					// show backstage for same reason

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 

config.options.chkSaveBackups = true;		// do save backups
config.options.txtBackupFolder = 'twbackup';	// put backups in a backups folder

config.mptwVersion = "2.4.5";

config.macros.mptwVersion={handler:function(place){wikify(config.mptwVersion,place);}};

// these are used by ViewTemplate
config.mptwDateFormat = 'MM/DD/YY';
config.mptwJournalFormat = 'Journal MM/DD/YY';

//}}}
/***
|Description:|A place to put your config tweaks so they aren't overwritten when you upgrade MPTW|
See http://www.tiddlywiki.org/wiki/Configuration_Options for other options you can set. In some cases where there are clashes with other plugins it might help to rename this to zzMptwUserConfigPlugin so it gets executed last.
***/
//{{{

// example: switch off autosave, switch on backups and set a backup folder
config.options.chkAutoSave = false;

//}}}
If you are a previous visitor at ~PsychPage, you'll notice some significant differences.
<html><table width="100%" cellpadding=2 cellspacing=2 border=0>
<tr><td valign="middle">[img[images/example0.gif]]</td><td><ul><li>We have <strong>a new look</strong> based on [[zenlike1.0|http://www.freecsstemplates.org/preview/zenlike]], a free  template for websites based on the Creative Commons license by [[nodethirtythree design|http://www.nodethirtythree.com]].</li></ul></td></tr>
<tr><td valign="middle">[img[images/example1.gif]]</td><td><ul><li>The new core is a [[TiddlyWiki|http://www.tiddlywiki.com/]] using the [[TagglyTagging|http://mptw.tiddlyspot.com/#TagglyTagging]] plugin.  Here's how it works:
<ul><li>In this file are //tiddlers//, sort of like old-time notecards, and each is //tagged// with a term - this helps you zero in on what you want to find.</li><li>Clicking on a tag (like BooksRead) will open everything with that tag. </li></ul></li></ul></td></tr>
<tr><td valign="middle">[img[images/example2.gif]]</td><td>
<ul><ul><li>Clicking an entry there (like [[The Nurture Assumption]]) will open that entry.  You will usually  find a ''short review'' of the issue - this makes it faster to easily see what's here.  You may also find a link to a ''detailed review'' - this shows you any detailed information available to help you find the answer to your question.</li></ul></ul></td></tr>
<tr><td valign="middle">[img[images/example3.gif]]</td><td><ul><ul><li>Detailed reviews open in a new window by default.</li><li>If you came here by going directly to one of those pages, you saw there were tabs at the top corresponding to the tags for that article.  Click one of those tabs (like HealthyRelationships or [[Family]]), and you'll come back to this page and automatically see a list everything similarly tagged.</li></ul></li></ul>
</td></tr>
</table></html>
/***
|Name|NewHereCommand|
|Source|http://simonbaird.com/mptw/#NewHereCommand|
|Version|1.0|

Code originally by ArphenLin. Small tweak by SimonBaird
http://aiddlywiki.sourceforge.net/NewHere_demo.html#NewHereCommand
To use this you must edit your ViewTemplate and add newHere to the toolbar div, eg
{{{<div class='toolbar' macro='toolbar ... newHere'></div>}}}
***/
//{{{

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");
			return false;
		}
	}
};

config.commands.newJournalHere = {
	//text: 'new journal here',  // too long
	text: 'new journal',
	hideReadOnly: true,
	dataFormat: 'YYYY-0MM-0DD 0hh:0mm', // adjust to your preference
	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:|NewHerePlugin|
|Description:|Creates the new here and new journal macros|
|Version:|3.0 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#NewHerePlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.macros, {
	newHere: {
		handler: function(place,macroName,params,wikifier,paramString,tiddler) {
			wikify("<<newTiddler "+paramString+" tag:[["+tiddler.title+"]]>>",place,null,tiddler);
		}
	},
	newJournalHere: {
		handler: function(place,macroName,params,wikifier,paramString,tiddler) {
			wikify("<<newJournal "+paramString+" tag:[["+tiddler.title+"]]>>",place,null,tiddler);
		}
	}
});

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

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

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

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


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

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

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

//}}}
<<notice "Introduction to Intimate Partner Violence" "learning/library/counseling/adultvio.html" "This article presents an updated overview of Intimate Partner Violence.">>
<!--{{{-->
<div class='header'>
 <div class='titleLine'>
 <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
 <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
 </div>
 <div class='mmenu' refresh='content' tiddler='MainMenu'>
 </div>
</div>
<div id='displayArea'>
 <div id='messageArea'></div>
 <div id='tiddlerDisplay'></div>
</div>
<div id='contentFooter'></div>
<!--}}}-->
Various book reviews, articles, and research findings related to the job of parenting.
/***
|Name:|PrettyDatesPlugin|
|Description:|Provides a new date format ('pppp') that displays times such as '2 days ago'|
|Version:|1.0 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#PrettyDatesPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Notes
* If you want to you can rename this plugin. :) Some suggestions: LastUpdatedPlugin, RelativeDatesPlugin, SmartDatesPlugin, SexyDatesPlugin.
* Inspired by http://ejohn.org/files/pretty.js
***/
//{{{
Date.prototype.prettyDate = function() {
	var diff = (((new Date()).getTime() - this.getTime()) / 1000);
	var day_diff = Math.floor(diff / 86400);

	if (isNaN(day_diff))      return "";
	else if (diff < 0)        return "in the future";
	else if (diff < 60)       return "just now";
	else if (diff < 120)      return "1 minute ago";
	else if (diff < 3600)     return Math.floor(diff/60) + " minutes ago";
	else if (diff < 7200)     return "1 hour ago";
	else if (diff < 86400)    return Math.floor(diff/3600) + " hours ago";
	else if (day_diff == 1)   return "Yesterday";
	else if (day_diff < 7)    return day_diff + " days ago";
	else if (day_diff < 14)   return  "a week ago";
	else if (day_diff < 31)   return Math.ceil(day_diff/7) + " weeks ago";
	else if (day_diff < 62)   return "a month ago";
	else if (day_diff < 365)  return "about " + Math.ceil(day_diff/31) + " months ago";
	else if (day_diff < 730)  return "a year ago";
	else                      return Math.ceil(day_diff/365) + " years ago";
}

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

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

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

//}}}
PsychPage does not collect any information about its users, including but not limited to 
*personal demographic information
*areas of interest
*email addresses
While the web server does keep record of 
* what site people come from (such as 57.7% from Google and 11.7% from Yahoo)
* what browser they use  (such as Internet Explorer is 65.9% and ~FireFox is 27.6% of visitors) and 
* which pages are the most popular ones
no personally identifying information is collected.

! Learn About:
* the NewDesign
* the WebMaster
* the [[History of PsychPage]]
* our PrivacyPolicy
/***
| Name:|QuickOpenTagPlugin|
| Purpose:|Makes tag links into a Taggly style open tag plus a normal style drop down menu|
| Creator:|SimonBaird|
| Source:|http://simonbaird.com/mptw/#QuickOpenTagPlugin|
| Requires:|TW 2.x|
| Version|1.1.1 (19-May-06)|

!History
* Version 1.1.1 (19/05/2006)
** Added a little more CSS so the tags look good in standard main menus and normal tiddlers
* Version 1.1 (07/02/2006)
** Fix Firefox 1.5.0.1 crashes
** Updated by ~BidiX[at]~BidiX.info
* Version 1.0 (?/01/2006)
** First release

***/
//{{{

//⊻ ⊽ ⋁ ▼ 

window.createTagButton_orig_mptw = createTagButton;
window.createTagButton = function(place,tag,excludeTiddler) {
 var sp = createTiddlyElement(place,"span",null,"quickopentag");
 createTiddlyLink(sp,tag,true,"button");
 var theTag = createTiddlyButton(sp,config.macros.miniTag.dropdownchar,config.views.wikified.tag.tooltip.format([tag]),onClickTag);
 theTag.setAttribute("tag",tag);
 if(excludeTiddler)
 theTag.setAttribute("tiddler",excludeTiddler);
 return(theTag);
};

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

config.macros.miniTag.dropdownchar = (document.all?"▼":"▾"); // the fat one is the only one that works in IE

config.macros.allTags.handler = function(place,macroName,params)
{
 var tags = store.getTags();
 var theDateList = createTiddlyElement(place,"ul",null,null,null);
 if(tags.length === 0)
 createTiddlyElement(theDateList,"li",null,"listTitle",this.noTags);
 for (var t=0; t<tags.length; t++)
 {
 var theListItem =createTiddlyElement(theDateList,"li",null,null,null);
 var theLink = createTiddlyLink(theListItem,tags[t][0],true);
 var theCount = " (" + tags[t][1] + ")";
 theLink.appendChild(document.createTextNode(theCount));

 var theDropDownBtn = createTiddlyButton(theListItem," "+config.macros.miniTag.dropdownchar,this.tooltip.format([tags[t][0]]),onClickTag);
 theDropDownBtn.setAttribute("tag",tags[t][0]);
 }
};


// probably could redo these styles a bit cleaner..
setStylesheet(
 ".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?
 "#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"+
    "{ margin-left:0px; padding-left:2px; margin-right:0px; padding-right:0px; }\n"+ // looks better in right justified main menus
 "",
"QuickOpenTagStyles");

//}}}

/***
<html>&#x22bb; &#x22bd; &#x22c1; &#x25bc; &#x25be;</html>
***/
"Marriage is like a pair of shears.  Oft times working in opposite directions, but punishing anyone that comes between them." 
// Sydney Smith //

"One advantage of marriage, it seems to me, is that when you fall out of love with him or he falls out of love with you it keeps you together until maybe you fall in again." 
// Judith Viorst //

"Marriage is the only war where you sleep with the enemy." 
//Gary Busey //

"A sound marriage is not based on complete frankness; it is based on a sensible reticence." 
// Morris L. Ernst //

"Someone once asked me why women don't gamble as much as men do and I gave the commonsensical reply that we don't have as much money. That was a true but incomplete answer. In fact, women's total instinct for gambling is satisfied by marriage" 
// Gloria Steinem //

"Marriage is not a word; it is a sentence." 
// King Vigor //

"The cure for love is marriage, and the cure for marriage is love again" 
// Unknown //

"Keep your eyes wide open before marriage, half shut afterwards." 
// Benjamin Franklin //

"Marriages are made in heaven. But, again, so are thunder, lightning, tornadoes and hail" 
// Unknown //

"I once made the acquaintance of a very venerable personage - in fact, one might easily call him a saint. I stalked round him for three whole days, but never a mortal failing did I find in him... Then his wife came to consult with me. Well, nothing of the sort has ever happened to me since. " 
// C. G. Jung//

"They have to convert our agenda into something aggressive. Two guys wanting to be happy together are invading their marriages. Helping a kid who's getting beaten up at school is promoting homosexuality. If you gave me a million dollars, I wouldn't know how to promote homosexuality. Do I hire Don King?" 
// Barney Frank U.S. Representative //

"Defense of Marriage? It's like the old V-8 commercial. As though if this act didn't pass, heterosexual men all over the country would say, [smacking head] 'I could have married a guy!' " 
// Barney Frank U.S. Representative//

"In marriage, each partner is to be an encourager rather than a critic, a forgiver rather than a collector of hurts, an enabler rather than a reformer." 
// H. Norman Wright and Gary J. Oliver //

"They say love is blind... and marriage is an institution. Well, I'm not ready for an institution for the blind just yet." 
// Mae West //

"Marriage is a condition where no wife gets what she expected, and no husband expected what he was getting" 
// Quinn's Devious Dictionary//

"Marriage is a status which depends upon two to be successful but only one to turn into a failure" 
// Quinn's Devious Dictionary//

"If you want to sacrifice the admiration of many men for the criticism of one, go ahead, get married." 
// Katherine Hepburn //

"Love is the triumph of imagination over intelligence" 
// Henry Louis Mencken //

"Marriage is the triumph of imagination over intelligence. Second marriage is the triumph of hope over experience" 
// Oscar Wilde //

"We all have a childhood dream that when there is love, everything goes like silk, but the reality is that marriage requires a lot of compromise." 
// Raquel Welch//

"I think men who have a pierced ear are better prepared for marriage. They've experienced pain and bought jewelry." 
// Rita Rudner//

"The trouble with some women is that they get all excited about nothing -- and then marry him." 
// Cher//

"If there were something called Marriage Reserve, I'd sign up for it in a heartbeat. That way I could sleep with other women on one weekend each month and two weeks in the summer, and my wife couldn't do crap about it." 
// Mike Wilson //

{{books{
[<img[Relationship Therapy With Same-Sex Couples|bookreview/bigner.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Relationship-Therapy-Same-Sex-Couples-Wetchler/dp/078902554X/ref=sr_1_1?ie=UTF8&s=books&qid=1221351938&sr=1-1]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=tIefcYvSQ5IC&printsec=frontcover&dq=relationship+therapy+with+same+sex+couples&ei=nWrrSNmrFouYMqL6zAg&sig=ACfU3U0e_j4EE_3OlIHWlArHwmz3jhzU7g]]
}}}
//by Jerry J. Bigner and Joseph L. Wetchler (Eds.)//
This docuserial is a collection of 13 previously published articles, selected by Bigner and Wetchler, which together serve as an excellent primer on same-sex couples work. It offers an introduction on the impact of homophobia, training and supervision around same-sex couple work, multicultural couples and parenting, separate chapters on sexual relationships in gays and in lesbians, and even chapters on bisexual and transgendered couples.  
/***
| Name:|RenameTagsPlugin|
| Purpose:|Allows you to easily rename tags|
| Creator:|SimonBaird|
| Source:|http://simonbaird.com/mptw/#RenameTagsPlugin|
| Version:|1.0.1 (5-Mar-06)|

!Description
If you rename a tiddler/tag that is tagging other tiddlers this plugin will ask you if you want to rename the tag in each tiddler where it is used. This is essential if you use tags and ever want to rename them. To use it, open the tag you want to rename as a tiddler (it's the last option in the tag popup menu), edit it, rename it and click done. You will asked if you want to rename the tag. Click OK to rename the tag in the tiddlers that use it. Click Cancel to not rename the tag.

!Example
Try renaming [[Plugins]] or [[CSS]] on this site.

!History
* 1.0.1 (5-Mar-06) - Added feature to allow renaming of tags without side-effect of creating a tiddler
* 1.0.0 (5-Mar-06) - First working version

!Code
***/
//{{{

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

config.macros.RenameTagsPlugin = {};
config.macros.RenameTagsPlugin.prompt = "Rename the tag '%0' to '%1' in %2 tidder%3?";

// these are very useful, perhaps they should be in the core
if (!store.addTag) {
	store.addTag = function(title,tag) {
		var t=this.getTiddler(title); if (!t || !t.tags) return;
		t.tags.push(tag);
	};
};

if (!store.removeTag) {
	store.removeTag = function(title,tag) {
		var t=this.getTiddler(title); if (!t || !t.tags) return;
		if (t.tags.find(tag)!=null) t.tags.splice(t.tags.find(tag),1);
	};
};

store.saveTiddler_orig_tagrename = store.saveTiddler;
store.saveTiddler = function(title,newTitle,newBody,modifier,modified,tags) {
	if (title != newTitle && this.getTaggedTiddlers(title).length > 0) {
		// then we are renaming a tag
		var tagged = this.getTaggedTiddlers(title);
		if (confirm(config.macros.RenameTagsPlugin.prompt.format([title,newTitle,tagged.length,tagged.length>1?"s":""]))) {
			for (var i=0;i<tagged.length;i++) {
				store.removeTag(tagged[i].title,title);
				store.addTag(tagged[i].title,newTitle);
				// if tiddler is visible refresh it to show updated tag
				story.refreshTiddler(tagged[i].title,false,true);
			}
		}
		if (!this.tiddlerExists(title) && newBody == "") {
			// dont create unwanted tiddler
			return null;
		}
	}
	return this.saveTiddler_orig_tagrename(title,newTitle,newBody,modifier,modified,tags);
}

//}}}

/***
|Name:|SaveCloseTiddlerPlugin|
|Description:|Provides two extra toolbar commands, saveCloseTiddler and cancelCloseTiddler|
|Version:|3.0 ($Rev: 5502 $)|
|Date:|$Date: 2008-06-10 23:31:39 +1000 (Tue, 10 Jun 2008) $|
|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: 'Save changes to this tiddler and close it',
		handler: function(ev,src,title) {
			var closeTitle = title;
			var newTitle = story.saveTiddler(title,ev.shiftKey);
			if (newTitle)
				closeTitle = newTitle;
			return config.commands.closeTiddler.handler(ev,src,closeTitle);
		}
	},

	cancelCloseTiddler: {
		text: 'cancel/close',
		tooltip: 'Undo changes to this tiddler and close it',
		handler: function(ev,src,title) {
			// the same as closeTiddler now actually
			return config.commands.closeTiddler.handler(ev,src,title);
		}
	}

});

//}}}
Choose your search, enter your search terms, and click ~PsychPage or Google to search 
{{nicesearch{
<html>
<<search>><br>
<form class="myform"><input type=image src="images/google.gif" onclick='document.location.href="http://www.google.com/search?hl=en&newwindow=1&safe=off&rlz=1B3GGGL_enUS241US242&q=site%3Apsychpage.com+"+document.forms[0].q.value+"&btnG=Search";return false'><br><input name=q size=51 maxlength=2048 value=""></form>
</HTML>
}}}
{{books{
[<img[Shattered Bonds: The Color of Child Welfare|bookreview/roberts.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Shattered-Bonds-Color-Child-Welfare/dp/0465070590/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1221353298&sr=1-1]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=5JyssKmNq5cC&printsec=frontcover&dq=shattered+bonds&ei=6JHrSIbPOJeIM8DrxQQ&sig=ACfU3U1UshN7AfNwgaJCvt1PM2kWh-twdQ]]
}}}
//by Dorothy Roberts//
Roberts is a respected faculty of the Law School of Northwestern University. She pulls together statistics from Chicago, Illinois, and other states to explore a disturbing issue... 

<<notice "Shattered Bonds: The Color of Child Welfare" "bookreview/brroberts.html" "Detailed review of the book.">>
It's not an easy question to answer, but here are some ideas 
[[Dating at the Office|family/library/dateoffice.htm]]
[[HoverMenu]]

<<saveChanges>>

<<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">>
/***
|Name||
|Created by|Simon Baird|
|Location|http://groups.google.com/group/TiddlyWiki/browse_thread/thread/c61b9b0e2f639684/655c866fbd66f511?lnk=gst&q=tsuser&rnum=1#655c866fbd66f511|
|Version|1.0|
|Requires|~TW2.x|
!Description:
This is based on BlogUserPlugin by Simon Baird.  His macro provided a quick way to create a pretty link to a desired website, like ~MySpace.  I modified it to insert the syntax for my favorite plugins more easily.


!Demo:

''Notice'' 
{{{<<notice "something important">>}}} produces  <<notice "something important">>

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

!Code

***/


/***
!!StudentStatus
***/
//{{{
config.macros.studentstatus = { handler: function(place,name,params) {
alert("<<toggleTag [[Student]] [[" + params[0] + "]] 'A Student?'>>");
  wikify("<<toggleTag [[Student]] [[" + params[0] + "]] 'A Student?'>>>",
      place);
}}; 
//}}}



/***
!!Easy Linebreaks***/
//{{{
config.macros.newline = { handler: function(place,name,params) {
  wikify("\n",
      place);
}}; 
//}}}


/***
!!Notice
***/
//{{{
config.macros.notice = { handler: function(place,name,params) {
  wikify("{{boxfour {[<img[" + params[0] + "|images/article.gif][" + params[1] + "]] [[" + params[0] + "|" + params[1] + "]]}}}\n\n" + params[2] + "",
      place);
}}; 
//}}}
[[...|HoverMenu]] perspectives on psychology in daily life
[[PsychPage]]


/***
!My Additions
***/
/*{{{*/


.books {
float: left; 
width: 150px;
margin-left: 2%;
margin-bottom: 2%;
margin-top: -.5%;
padding: 1.5%;
min-height: 160px;
}

.boxone {
 background: #EBF0F3;
 padding: 0.5em 0.5em 0.5em 0.6em;
 border-top:solid #e8ffd2 1px;
 border-left:solid #e8ffd2 1px;
 border-bottom:solid #404040 2px;
 border-right:solid #404040 2px;
 -moz-border-radius: 1.0em;
}

.boxthree {
 background: #335D99;
 padding: 0.5em 0.5em 0.5em 0.6em;
 border-top:solid #e8ffd2 1px;
 border-left:solid #e8ffd2 1px;
 border-bottom:solid #404040 2px;
 border-right:solid #404040 2px;
 color: white;
 width: 744px;
}


.viewer .boxfour a.externalLink, .viewer .boxfour, .viewer a.boxfour.externalLink  {
 font-weight: bold;
 text-decoration: none;
 font-size: 120%; 
 color: #423129;
 font-variant : small-caps;
}

.boxfourdesc {
 font-weight: normal;
 text-decoration: none;
 font-size: 90%; 
 color: black;
}

.whitelinks a {
 color: white;
 background: #CECEFF url('images/menuinsactive.gif') repeat-x top left;
 padding: 6px;
 padding-bottom: 7px;
 border-left: 1px solid black;
 border-right: 1px solid black;
 border-bottom: 1px solid black;
 line-height:22px;
}
.whitelinks a:hover{
 color: white;
 background: #080842 url('images/menuhover.gif') repeat-x top left;
}

.boxtwo {
 background: #7B9BC2;
 padding: 0.5em 0.5em 0.5em 0.6em;
 border-top:solid #e8ffd2 1px;
 border-left:solid #e8ffd2 1px;
 border-bottom:solid #404040 2px;
 border-right:solid #404040 2px;
 -moz-border-radius: 1.0em;
 color: white;
}


.mycolumnone{
 position:absolute;
 left: 60px;
 width:280px;
}
.mycolumntwo{
 position:absolute;
 left: 350px;
 width:350px;
}



.justifyright {
text-align: right;
}

hr {
 border : thin solid #353C49;
}

.viewer .simplestyle a.tiddlyLinkExisting:link{
 color: #384F6E;
 text-decoration: none;
}


/*}}}*/
/***
!General Rules
***/
/*{{{*/
a,.button{
 color: #384F6E;
 font-weight: bold;
 text-decoration: none;
 background: transparent;
}

a:hover,.button:hover{
 background: transparent;
 text-decoration: none;
 color: #384F6E;
}

body {
 font-size: 90%; 
 font-family: 'Trebuchet MS', Verdana, Arial, Sans-Serif;
 color: #666;
 margin: 0 0 0 0;
 width: 744px;
 background-attachment : scroll;
 background: url(images/bg2.jpg) fixed center;

}

#contentWrapper{
 background: transparent url(images/.gif) repeat-y 0px 0px;
 border: none;
 margin: 20px 0 0 25px;
 width: 746px;
}

/*}}}*/
/***
!Header Rules
***/
/*{{{*/
.titleLine{
 margin: 0px 0 0px 0;
 padding-top : 25px;
 padding-bottom : 15px;
 padding-left : 15px;
 width: 718px;
 text-align: left;
 color: #ffffff;
 border : 5px solid #ffffff;
 background: transparent url(images/topbg.gif) repeat-x bottom; 

}

.siteTitle{
 font-weight: bold;
 font-size:2em;
 margin: 0 0 0 0;
 color: #ffffff;
}

.siteTitle a, .siteSubtitle a{
 color: #000000;
 text-decoration: none;
 border:0px;
 color: #ffffff;
}

.siteTitle a:hover, .siteSubtitle a:hover{
 text-decoration: none;
 border : 0;
}

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

.header {
 background: transparent url(images/hdrpic.jpg) no-repeat bottom; 
 border: 2px solid black;
 margin: 0 0 0 1px;
 margin-top: 30px;
 width: 743px;
 height: 255px;


}
/*}}}*/
/***
!Footer Styles
***/
/*{{{*/
#contentFooter {
 background: url(images/.gif) no-repeat bottom center;
 border: 0;
 margin: 0 0 0 0;
 width: 744px;
 height: 1px;
}
/*}}}*/


/***
!Sidebar styles /% ============================================== %/
***/
/*{{{*/
#sidebar {
 margin: 0 0 0 0;
 width: 220px;
 font-size:.9em;
 float: right;
 position:absolute; 
 right:0px; 
 border:1
}

#hoverMenu {
 margin: 0 0 0 0;
 color: #000000;
 width: 200px;
 font-size:.9em;
 text-align: left;
 float: right;
 position:absolute; 
 padding-top:20px;
 right:0px;
 height: 200px; 
 background : url(images/sidebar.jpg);
 background-position: right;
 background-repeat: repeat-y;
 background-attachment: scroll;
}


#hoverMenu a, #hoverMenu a:hover {
 color: #000000;
}

#hoverMenu hr {
 border : thin solid #000000;
 color: #000000;
 background: #000000;
}



#sidebar a, #sidebar a:hover, #hoverMenu a, #hoverMenu a:hover{
 border: 0;
}

#sidebar h1, #hoverMenu h1 {
 font-size: 1.4em;
 font-weight: bold;
 margin: 0;
 background: transparent;
 color: #000;
}

#sidebar ul, #hoverMenu ul{
 padding: 0;
 margin: 0 0 0 1em;
}

#sidebar li, #hoverMenu li{
 list-style: none;
}

#sidebar li:before, #hoverMenu li:before{
 color: #000;
 content: "\00BB \0020";
}

#sidebar, #hoverMenu, #mainMenu, #sideBarOptions{
 width: 200px;
 text-align: left;
}

#mainMenu{ 

}
.mmenu{  
 background: #CECEFF url('images/menubg.gif') repeat-x top left;
 padding-left: 15px;
 padding-top: 6px;
 padding-bottom: 6px;
 margin: 0 0 0 0;
 width: 727px;
 height: 24px;
 border : 1px solid;

}
/*}}}*/
/***
!Sidebar search styles /% ======================================== %/
***/
/*{{{*/
#sidebarSearch{
 margin: 0 0 0 10px;
 width: 125px;
}

#sidebarSearch input{
 font-size: .9em;

}

.nicesearch a {
 background: url('images/search.gif') repeat-x top left;
 color: white;
 display:block;
 height: 30px;
 width: 150px;
}

/*}}}*/
/***
!Sidebar option styles
***/
/*{{{*/
#sidebarOptions{

}

#sidebarOptions h1, #hoverMenu h1{
 font-size: 1.0em;
}

#sidebarOptions a, #hoverMenu a{
 display: inline;
 border: 0;
}

#sidebarOptions .sliderPanel{
 background-color: transparent;
 font-size: 1em;
 margin: 0;
}

#sidebarOptions .sliderPanel a:before,
#sidebarTabs li:before{
 content: "";
}
/*}}}*/
/***
!Sidebar tab styles
***/
/*{{{*/

#sidebartabs {
 height: 400px;
 overflow: auto;

}
#sidebarTabs .tab,
#sidebarTabs .tab:hover{
 border: 1px solid #ccc;
 text-decoration: none;
 background-color: transparent;
}

#sidebarTabs .tabSelected{
 background: #ccc;
 color: #333;
}

#sidebarTabs .tabUnselected{
 background: #D0DDF0;
 background-color: transparent;
 color: #333;

}

#sidebarTabs .tabContents{
 background: #ccc;
 color: #333;
 border: 1px solid #ccc;
 width: 95%;
}

#sidebarTabs .tabContents a{
 color: #384F6E;
}

#sidebarTabs .tabContents a:hover{
 color: #384F6E;

}

#sidebarTabs a.tabSelected:hover{
 cursor: default;
}

#sidebarTabs .txtMoreTab .tab{
 border: 1px solid #aaa;
 color: #333;
}

#sidebarTabs .txtMoreTab .tabSelected{
 background: #aaa;
 color: #333;
}

#sidebarTabs .txtMoreTab .tabSelected:hover{
 background: #aaa;
 color: #333
}

#sidebarTabs .txtMoreTab .tabUnselected{
 background: #ccc;
 color: #333;
}

#contentWrapper #sidebar .txtMoreTab .tabUnselected:hover,#contentWrapper #displayArea .txtMoreTab .tabUnselected:hover{
 color: #333;
}

#contentWrapper .txtMoreTab .tabContents{
 background: #aaa;
 color: #333;
 border: 1px solid #aaa;
}
/*}}}*/
/***
!Message area styles /% ========================================== %/
***/
/*{{{*/
#messageArea {
background-color: #eee;
 border: 1px solid #ccc;
 color: #bbb;
 margin: 0 1em;
 font-size: .8em;
}

#messageArea a:link{
 color: #aaa;
}
#messageArea a:hover{
 color: #384F6E;
}

#messageArea .messageToolbar .button{
 border: 1px solid #ccc;
 color: #aaa;
 text-decoration: none;
}
#messageArea .messageToolbar .button:hover{
 border: 1px solid #777;
 color: #777;
}
/*}}}*/
/***
!Popup styles /% ================================================ %/
***/
/*{{{*/
#popup{
 padding: 0;
 background: #eee;
 border: 1px solid #ccc;
 color: #333;
}

#popup a{
 color: #384F6E;
 font-weight: normal;
}

#popup a:hover{
 color: #fff;
 background: #aaa;
 text-decoration: none;
}
/*}}}*/
/***
!Tiddler display styles /% ====================================== %/
***/
/*{{{*/
#displayArea{
 width: 743px;
 padding-top : 25px;
 padding-bottom : 30px;
 text-align: left;
 font-size: 1.0em;
 background: #FFFFFF;
 margin: 0px 0 0 1px;
 border: 2px solid black;
}

h1, h2, h3, h4, h5, .title{
 font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
 color: #384F6E;
 background: transparent;
 text-decoration: none;
}


.viewer h1,.viewer h2,.viewer h3,.viewer h4,.viewer h5,.viewer h6{
 background: transparent;
 text-decoration: none;
}

.title{
 font-size: 1.6em; 
}

.subtitle{
 color: #777;
 font-size: .9em;
}

.toolbar{
 font-size: .9em;
}

.toolbar a:link,.toolbar a:visited{
 background: #424263;
 border: 1px solid #ccc;
 color: #aaa;
 padding: 1px 3px;
 margin: 0 .5em 0 0;
}

.toolbar a.button:hover{
 background: #ccc;
 border-color: #bbb;
 color: #384F6E;
 text-decoration: none;
}

.viewer li {
list-style-type: disc; 
list-style-position: outside;
}

.viewer a.tiddlyLinkNonExisting:link{
 color: #b85b5a;
 font-style: normal;
 text-decoration: none;
}

.viewer a.tiddlyLinkNonExisting:hover{
 text-decoration: none; 
}

.viewer a.tiddlyLinkExisting:link{
 font-weight: bold;
 color: #4672A3;
 text-decoration: none;
}
.viewer a.tiddlyLinkExisting:hover{
 color: #384F6E;
 text-decoration: none;
 text-decoration: none; 
}

.viewer a.externalLink{
 font-weight: bold;
 color: #384F6E;
 text-decoration: none;
}
.viewer a.externalLink:hover{
 color: #384F6E;
 text-decoration: none;
 text-decoration: none; 
}

.viewer .button{
 border: 0px;
 color: #384F6E;
 font-weight: normal;
 padding-left: 20px;
 display : inline;
 text-align : left;
}

.viewer .button:hover{
 color: #4672A3;
}

.editor {
 font-size: 9pt;
 color: #402c74;
 font-weight: normal;
}

.editor input, .editor textarea {
 display: block;
 font: 11px/110% "Andale Mono", "Monaco", "Lucida Console", "Courier New", monospace;
 margin: 0 0 10px 0;
 border: 1px inset #333;
 padding: 2px 0;
}

.footer, .footer a.button,.editorFooter, .footer a.button{
 color: #aaa;
 text-decoration: none;
}

.selected .footer,.selected .footer a{
 color: #777;
 text-decoration: none;
}

.selected .footer a.button,.selected .editorFooter a.button{
 color: #384F6E;
 text-decoration: none;
}

.footer a.button:hover,.editorFooter a.button:hover{
 color: #384F6E;
 background: transparent;
 text-decoration: none;
} 

.tagClear{
 clear: none; 
}
/*}}}*/
/*{{{*/
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:0px 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;}

#sidebarOptions input, #hoverMenu 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;}

.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:#353C49; background:#353C49; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}

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

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

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

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

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

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

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

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

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

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

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

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

.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {
 border: 1;
 border : thin solid #353C49;
 color: #353C49;
}
.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:.95em; font-family:"Trebuchet MS",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:9em;}

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


#mainMenuNOT {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;}

#sidebarOptions, #hoverMenu  {padding-top:0.3em;}
#sidebarOptions a, #hoverMenu a {margin:0em 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input , #hoverMenu input {margin:0.2em 0.2em;}
#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; height: 400px; overflow:auto;}

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

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

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

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

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

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

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

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

.tiddler {padding:1em 1em 1em 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; padding-bottom: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: 1px solid #FFFFFF;
     vertical-align : top;
     padding : 0px 4px 0px 4px;
}
table td {
     vertical-align : top;
}


.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView { 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.0em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0em;}
.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:20; position:absolute; width:100%; height:100px;}

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}

/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #hoverMenu {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;}
}
/*}}}*/

{{books{
[<img[Successful Intelligence|bookreview/sternberg1.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Successful-Intelligence-Practical-Creative-Determine/dp/0452279062/ref=sr_1_1?ie=UTF8&s=books&qid=1221351484&sr=1-1]]
}}}
//by Robert J. Sternberg//
This book provides the reader with a step-by-step explanation of how he came to understand intelligence and build his theory. He talks in plain English about IQ and what we know and do not know, and he presents his three-prong model of intelligence. He talks about teaching children in this model to strengthen their abilities, but also has a useful chapter for graduate students that I use in my classes on being "successfully intelligent" in graduate school. 
<<allTags excludeLists>>
<<tabs txtMoreTab "Tags" "All Tags" TabAllTags "Miss" "Missing tiddlers" TabMoreMissing "Orph" "Orphaned tiddlers" TabMoreOrphans "Shad" "Shadowed tiddlers" TabMoreShadowed>>
<<allTags excludeLists [a-z]>>
/***
|Name|TagglyListPlugin|
|Created by|SimonBaird|
|Location|http://simonbaird.com/mptw/#TagglyListPlugin|
|Version|1.1.2 25-Apr-06|
|Requires|See TagglyTagging|

!History
* 1.1.2 (25-Apr-2006) embedded TagglyTaggingStyles. No longer need separated tiddler for styles.
* 1.1.1 (6-Mar-2006) fixed bug with refreshAllVisible closing tiddlers being edited. Thanks Luke Blanshard.

***/

/***
!Setup and config
***/
//{{{

version.extensions.TagglyListPlugin = {
	major: 1, minor: 1, revision: 2,
	date: new Date(2006,4,25),
	source: "http://simonbaird.com/mptw/#TagglyListPlugin"
};

config.macros.tagglyList = {};
config.macros.tagglyListByTag = {};
config.macros.tagglyListControl = {};
config.macros.tagglyListWithSort = {};
config.macros.hideSomeTags = {};

// change this to your preference
config.macros.tagglyListWithSort.maxCols = 6;

config.macros.tagglyList.label = "Tagged as %0:";

// the default sort options. set these to your preference
config.macros.tagglyListWithSort.defaults = {
 sortBy:"title", // title|created|modified
 sortOrder: "asc", // asc|desc
 hideState: "show", // show|hide
 groupState: "nogroup", // nogroup|group
 numCols: 1
};

// these tags will be ignored by the grouped view
config.macros.tagglyListByTag.excludeTheseTags = [
 "systemConfig",
 "TiddlerTemplates"
];

config.macros.tagglyListControl.tags = {
 title:"sortByTitle", 
 modified: "sortByModified", 
 created: "sortByCreated",
 asc:"sortAsc", 
 desc:"sortDesc",
 hide:"hideTagged", 
 show:"showTagged",
 nogroup:"noGroupByTag",
 group:"groupByTag",
 cols1:"list1Cols",
 cols2:"list2Cols",
 cols3:"list3Cols",
 cols4:"list4Cols",
 cols5:"list5Cols",
 cols6:"list6Cols",
 cols7:"list7Cols",
 cols8:"list8Cols",
 cols9:"list9Cols" 
}

// note: should match config.macros.tagglyListControl.tags
config.macros.hideSomeTags.tagsToHide = [
 "sortByTitle",
 "sortByCreated",
 "sortByModified",
 "sortDesc",
 "sortAsc",
 "hideTagged",
 "showTagged",
 "noGroupByTag",
 "groupByTag",
 "list1Cols",
 "list2Cols",
 "list3Cols",
 "list4Cols",
 "list5Cols",
 "list6Cols",
 "list7Cols",
 "list8Cols",
 "list9Cols"
];


//}}}
/***

!Utils
***/
//{{{
// from Eric
function isTagged(title,tag) {
 var t=store.getTiddler(title); if (!t) return false;
 return (t.tags.find(tag)!=null);
}

// from Eric
function toggleTag(title,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);
}

function addTag(title,tag) {
 var t=store.getTiddler(title); if (!t || !t.tags) return;
 t.tags.push(tag);
}

function removeTag(title,tag) {
 var t=store.getTiddler(title); if (!t || !t.tags) return;
 if (t.tags.find(tag)!=null) t.tags.splice(t.tags.find(tag),1);
}

// from Udo
Array.prototype.indexOf = function(item) {
 for (var i = 0; i < this.length; i++) {
 if (this[i] == item) {
 return i;
 }
 }
 return -1;
};
Array.prototype.contains = function(item) {
 return (this.indexOf(item) >= 0);
}
//}}}
/***

!tagglyList
displays a list of tagged tiddlers. 
parameters are sortField and sortOrder
***/
//{{{

// not used at the moment...
function sortedListOfOtherTags(tiddler,thisTag) {
 var list = tiddler.tags.concat(); // so we are working on a clone..
 for (var i=0;i<config.macros.hideSomeTags.tagsToHide.length;i++) {
 if (list.find(config.macros.hideSomeTags.tagsToHide[i]) != null)
 list.splice(list.find(config.macros.hideSomeTags.tagsToHide[i]),1); // remove hidden ones
 }
 for (var i=0;i<config.macros.tagglyListByTag.excludeTheseTags.length;i++) {
 if (list.find(config.macros.tagglyListByTag.excludeTheseTags[i]) != null)
 list.splice(list.find(config.macros.tagglyListByTag.excludeTheseTags[i]),1); // remove excluded ones
 }
 list.splice(list.find(thisTag),1); // remove thisTag
 return '[[' + list.sort().join("]] [[") + ']]';
}

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

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

 var sortBy = params[0] ? params[0] : "title"; 
 var sortOrder = params[1] ? params[1] : "asc";

 var result = store.getTaggedTiddlers(tiddler.title,sortBy);

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

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

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

 if ( 
 result[i].tags[j] != tiddler.title // not this tiddler
 && config.macros.hideSomeTags.tagsToHide.find(result[i].tags[j]) == null // not a hidden one
 && config.macros.tagglyListByTag.excludeTheseTags.find(result[i].tags[j]) == null // not excluded
 ) {
 if (!allTagsHolder[result[i].tags[j]])
 allTagsHolder[result[i].tags[j]] = "";
 allTagsHolder[result[i].tags[j]] += "**[["+result[i].title+"]]\n";

 if (leftOvers.find(result[i].title) != null)
 leftOvers.splice(leftOvers.find(result[i].title),1); // remove from leftovers. at the end it will contain the leftovers...
 }
 }
 }


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

 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 markup = "";

 if (sortOrder == "desc") {
 allTags.reverse();
 }
 else {
 // leftovers first...
 for (var i=0;i<leftOvers.length;i++)
 markup += "*[["+leftOvers[i]+"]]\n";
 } 

 for (var i=0;i<allTags.length;i++)
 markup += "*[["+allTags[i]+"]]\n" + allTagsHolder[allTags[i]];

 if (sortOrder == "desc") {
 // leftovers last...
 for (var i=0;i<leftOvers.length;i++)
 markup += "*[["+leftOvers[i]+"]]\n";
 }

 wikify(markup,place);
}

config.macros.tagglyList.handler = function (place,macroName,params,wikifier,paramString,tiddler) {
 var sortBy = params[0] ? params[0] : "title"; 
 var sortOrder = params[1] ? params[1] : "asc";
 var numCols = params[2] ? params[2] : 1;

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

 var listSize = result.length;
 var colSize = listSize/numCols;
 var remainder = listSize % numCols;

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

 var markup = "";
 var c=0;

 var newTaggedTable = createTiddlyElement(place,"table");
 var newTaggedBody = createTiddlyElement(newTaggedTable,"tbody");
 var newTaggedTr = createTiddlyElement(newTaggedBody,"tr");

 for (var j=0;j<numCols;j++) {
 var foo = "";
 var thisSize;

 if (j<remainder)
 thisSize = upperColsize;
 else
 thisSize = lowerColsize;

 for (var i=0;i<thisSize;i++) 
 foo += ( "*[[" + result[c++].title + "]]\n"); // was using splitList.shift() but didn't work in IE;

 var newTd = createTiddlyElement(newTaggedTr,"td",null,"tagglyTagging");
 wikify(foo,newTd);

 }

};

/* snip for later.....
 //var groupBy = params[3] ? params[3] : "t.title.substr(0,1)";
 //var groupBy = params[3] ? params[3] : "sortedListOfOtherTags(t,tiddler.title)";
 //var groupBy = params[3] ? params[3] : "t.modified";
 var groupBy = null; // for now. groupBy here is working but disabled for now.

 var prevGroup = "";
 var thisGroup = "";

 if (groupBy) {
 result.sort(function(a,b) {
 var t = a; var aSortVal = eval(groupBy); var aSortVal2 = eval("t".sortBy);
 var t = b; var bSortVal = eval(groupBy); var bSortVal2 = eval("t".sortBy);
 var t = b; var bSortVal2 = eval(groupBy);
 return (aSortVal == bSortVal ?
 (aSortVal2 == bSortVal2 ? 0 : (aSortVal2 < bSortVal2 ? -1 : +1)) // yuck
 : (aSortVal < bSortVal ? -1 : +1));
 });
 }

 if (groupBy) {
 thisGroup = eval(groupBy);
 if (thisGroup != prevGroup)
 markup += "*[["+thisGroup+']]\n';
 markup += "**[["+t.title+']]\n';
 prevGroup = thisGroup;
 }



*/


//}}}

/***

!tagglyListControl
Use to make the sort control buttons
***/
//{{{

function getSortBy(title) {
 var tiddler = store.getTiddler(title);
 var defaultVal = config.macros.tagglyListWithSort.defaults.sortBy;
 if (!tiddler) return defaultVal;
 var usetags = config.macros.tagglyListControl.tags;
 if (tiddler.tags.contains(usetags["title"])) return "title";
 else if (tiddler.tags.contains(usetags["modified"])) return "modified";
 else if (tiddler.tags.contains(usetags["created"])) return "created";
 else return defaultVal;
}

function getSortOrder(title) {
 var tiddler = store.getTiddler(title);
 var defaultVal = config.macros.tagglyListWithSort.defaults.sortOrder;
 if (!tiddler) return defaultVal;
 var usetags = config.macros.tagglyListControl.tags;
 if (tiddler.tags.contains(usetags["asc"])) return "asc";
 else if (tiddler.tags.contains(usetags["desc"])) return "desc";
 else return defaultVal;
}

function getHideState(title) {
 var tiddler = store.getTiddler(title);
 var defaultVal = config.macros.tagglyListWithSort.defaults.hideState;
 if (!tiddler) return defaultVal;
 var usetags = config.macros.tagglyListControl.tags;
 if (tiddler.tags.contains(usetags["hide"])) return "hide";
 else if (tiddler.tags.contains(usetags["show"])) return "show";
 else return defaultVal;
}

function getGroupState(title) {
 var tiddler = store.getTiddler(title);
 var defaultVal = config.macros.tagglyListWithSort.defaults.groupState;
 if (!tiddler) return defaultVal;
 var usetags = config.macros.tagglyListControl.tags;
 if (tiddler.tags.contains(usetags["group"])) return "group";
 else if (tiddler.tags.contains(usetags["nogroup"])) return "nogroup";
 else return defaultVal;
}

function getNumCols(title) {
 var tiddler = store.getTiddler(title);
 var defaultVal = config.macros.tagglyListWithSort.defaults.numCols; // an int
 if (!tiddler) return defaultVal;
 var usetags = config.macros.tagglyListControl.tags;
 for (var i=1;i<=config.macros.tagglyListWithSort.maxCols;i++)
 if (tiddler.tags.contains(usetags["cols"+i])) return i;
 return defaultVal;
}


function getSortLabel(title,which) {
 // TODO. the strings here should be definable in config
 var by = getSortBy(title);
 var order = getSortOrder(title);
 var hide = getHideState(title);
 var group = getGroupState(title);
 if (which == "hide") return (hide == "show" ? "−" : "+"); // 0x25b8;
 else if (which == "group") return (group == "group" ? "normal" : "grouped");
 else if (which == "cols") return "cols±"; // &plusmn;
 else if (by == which) return which + (order == "asc" ? "↓" : "↑"); // &uarr; &darr;
 else return which;
}

function handleSortClick(title,which) {
 var currentSortBy = getSortBy(title);
 var currentSortOrder = getSortOrder(title);
 var currentHideState = getHideState(title);
 var currentGroupState = getGroupState(title);
 var currentNumCols = getNumCols(title);

 var tags = config.macros.tagglyListControl.tags;

 // if it doesn't exist, lets create it..
 if (!store.getTiddler(title))
 store.saveTiddler(title,title,"",config.options.txtUserName,new Date(),null);

 if (which == "hide") {
 // toggle hide state
 var newHideState = (currentHideState == "hide" ? "show" : "hide");
 removeTag(title,tags[currentHideState]);
 if (newHideState != config.macros.tagglyListWithSort.defaults.hideState)
 toggleTag(title,tags[newHideState]);
 }
 else if (which == "group") {
 // toggle hide state
 var newGroupState = (currentGroupState == "group" ? "nogroup" : "group");
 removeTag(title,tags[currentGroupState]);
 if (newGroupState != config.macros.tagglyListWithSort.defaults.groupState)
 toggleTag(title,tags[newGroupState]);
 }
 else if (which == "cols") {
 // toggle num cols
 var newNumCols = currentNumCols + 1; // confusing. currentNumCols is an int
 if (newNumCols > config.macros.tagglyListWithSort.maxCols || newNumCols > store.getTaggedTiddlers(title).length)
 newNumCols = 1;
 removeTag(title,tags["cols"+currentNumCols]);
 if (("cols"+newNumCols) != config.macros.tagglyListWithSort.defaults.groupState)
 toggleTag(title,tags["cols"+newNumCols]);
 }
 else if (currentSortBy == which) {
 // toggle sort order
 var newSortOrder = (currentSortOrder == "asc" ? "desc" : "asc");
 removeTag(title,tags[currentSortOrder]);
 if (newSortOrder != config.macros.tagglyListWithSort.defaults.sortOrder)
 toggleTag(title,tags[newSortOrder]);
 }
 else {
 // change sortBy only
 removeTag(title,tags["title"]);
 removeTag(title,tags["created"]);
 removeTag(title,tags["modified"]);

 if (which != config.macros.tagglyListWithSort.defaults.sortBy)
 toggleTag(title,tags[which]);
 }

 store.setDirty(true); // save is required now.
 story.refreshTiddler(title,false,true); // force=true
}

config.macros.tagglyListControl.handler = function (place,macroName,params,wikifier,paramString,tiddler) {
 var onclick = function(e) {
 if (!e) var e = window.event;
 handleSortClick(tiddler.title,params[0]);
 e.cancelBubble = true;
 if (e.stopPropagation) e.stopPropagation();
 return false;
 };
 createTiddlyButton(place,getSortLabel(tiddler.title,params[0]),"Click to change sort options",onclick,params[0]=="hide"?"hidebutton":"button");
}
//}}}
/***

!tagglyListWithSort
put it all together..
***/
//{{{
config.macros.tagglyListWithSort.handler = function (place,macroName,params,wikifier,paramString,tiddler) {
 if (tiddler && store.getTaggedTiddlers(tiddler.title).length > 0)
  // todo make this readable
 wikify(
 "<<tagglyListControl hide>>"+
 (getHideState(tiddler.title) != "hide" ? 
 '<html><span class="tagglyLabel">'+config.macros.tagglyList.label.format([tiddler.title])+' </span></html>'+
 "<<tagglyListControl title>><<tagglyListControl modified>><<tagglyListControl created>><<tagglyListControl group>>"+(getGroupState(tiddler.title)=="group"?"":"<<tagglyListControl cols>>")+"\n" + 
 "<<tagglyList" + (getGroupState(tiddler.title)=="group"?"ByTag ":" ") + getSortBy(tiddler.title)+" "+getSortOrder(tiddler.title)+" "+getNumCols(tiddler.title)+">>" // hacky
 // + \n----\n" +
 //"<<tagglyList "+getSortBy(tiddler.title)+" "+getSortOrder(tiddler.title)+">>"
 : ""),
 place,null,tiddler);
}

config.macros.tagglyTagging = { handler: config.macros.tagglyListWithSort.handler };


//}}}
/***

!hideSomeTags
So we don't see the sort tags.
(note, they are still there when you edit. Will that be too annoying?
***/
//{{{

// based on tags.handler
config.macros.hideSomeTags.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 var theList = createTiddlyElement(place,"ul");
 if(params[0] && store.tiddlerExists[params[0]])
 tiddler = store.getTiddler(params[0]);
 var lingo = config.views.wikified.tag;
 var prompt = tiddler.tags.length == 0 ? lingo.labelNoTags : lingo.labelTags;
 createTiddlyElement(theList,"li",null,"listTitle",prompt.format([tiddler.title]));
 for(var t=0; t<tiddler.tags.length; t++)
 if (!this.tagsToHide.contains(tiddler.tags[t])) // this is the only difference from tags.handler...
 createTagButton(createTiddlyElement(theList,"li"),tiddler.tags[t],tiddler.title);

}

//}}}
/***

!Refresh everything when we save a tiddler. So the tagged lists never get stale. Is this too slow???
***/
//{{{

function refreshAllVisible() {
 story.forEachTiddler(function(title,element) {
   if (element.getAttribute("dirty") != "true") 
     story.refreshTiddler(title,false,true);
 });
}

story.saveTiddler_orig_mptw = story.saveTiddler;
story.saveTiddler = function(title,minorUpdate) {
 var result = this.saveTiddler_orig_mptw(title,minorUpdate);
 refreshAllVisible();
 return result;
}

store.removeTiddler_orig_mptw = store.removeTiddler;
store.removeTiddler = function(title) {
 this.removeTiddler_orig_mptw(title);
 refreshAllVisible();
}

config.shadowTiddlers.TagglyTaggingStyles = "/***\nTo use, add {{{[[TagglyTaggingStyles]]}}} to your StyleSheet tiddler, or you can just paste the CSS in directly. See also ViewTemplate, EditTemplate and TagglyTagging.\n***/\n/*{{{*/\n.tagglyTagged li.listTitle { display:none;}\n.tagglyTagged li { display: inline; font-size:90%; }\n.tagglyTagged ul { margin:0px; padding:0px; }\n.tagglyTagging { padding-top:0.5em; }\n.tagglyTagging li.listTitle { display:none;}\n.tagglyTagging ul { margin-top:0px; padding-top:0.5em; padding-left:2em; margin-bottom:0px; padding-bottom:0px; }\n\n/* .tagglyTagging .tghide { display:inline; } */\n\n.tagglyTagging { vertical-align: top; margin:0px; padding:0px; }\n.tagglyTagging table { margin:0px; padding:0px; }\n\n\n.tagglyTagging .button { display:none; margin-left:3px; margin-right:3px; }\n.tagglyTagging .button, .tagglyTagging .hidebutton { color:#aaa; font-size:90%; border:0px; padding-left:0.3em;padding-right:0.3em;}\n.tagglyTagging .button:hover, .hidebutton:hover { background:#eee; color:#888; }\n.selected .tagglyTagging .button { display:inline; }\n\n.tagglyTagging .hidebutton { color:white; } /* has to be there so it takes up space. tweak if you're not using a white tiddler bg */\n.selected .tagglyTagging .hidebutton { color:#aaa }\n\n.tagglyLabel { color:#aaa; font-size:90%; }\n\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\n.editLabel { font-size:90%; padding-top:0.5em; }\n/*}}}*/\n";

refreshStyles("TagglyTaggingStyles");


//}}}

// // <html>&#x25b8;&#x25be;&minus;&plusmn;</html>
/***
|Name:|TagglyTaggingPlugin|
|Description:|tagglyTagging macro is a replacement for the builtin tagging macro in your ViewTemplate|
|Version:|3.1 ($Rev: 5655 $)|
|Date:|$Date: 2008-06-18 23:50:30 +1000 (Wed, 18 Jun 2008) $|
|Source:|http://mptw.tiddlyspot.com/#TagglyTaggingPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Notes
See http://mptw.tiddlyspot.com/#TagglyTagging
***/
//{{{
config.taggly = {

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

		tooltips: {
			title:      "Click to sort by title",
			modified:   "Click to sort by modified date",
			created:    "Click to sort by created date",
			show:       "Click to show tagging list",
			hide:       "Click to hide tagging list",
			normal:     "Click to show a normal ungrouped list",
			group:      "Click to show list grouped by tag",
			sitemap:    "Click to show a sitemap style list",
			commas:     "Click to show a comma separated list",
			numCols:    "Click to change number of columns",
			excerpts:   "Click to show excerpts",
			descr:      "Click to show the description slice",
			slices:     "Click to show all slices",
			contents:   "Click to show entire tiddler contents",
			sliders:    "Click to show tiddler contents in sliders",
			noexcerpts: "Click to show entire title only"
		},

		tooDeepMessage: "* //sitemap too deep...//"
	},

	config: {
		showTaggingCounts: true,
		listOpts: {
			// the first one will be the default
			sortBy:     ["title","modified","created"],
			sortOrder:  ["asc","desc"],
			hideState:  ["show","hide"],
			listMode:   ["normal","group","sitemap","commas"],
			numCols:    ["1","2","3","4","5","6"],
			excerpts:   ["noexcerpts","excerpts","descr","slices","contents","sliders"]
		},
		valuePrefix: "taggly.",
		excludeTags: ["excludeLists","excludeTagging"],
		excerptSize: 50,
		excerptMarker: "/%"+"%/",
		siteMapDepthLimit: 25
	},

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

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

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

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

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

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

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

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

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

		var upperColsize = colSize;
		var lowerColsize = colSize;

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

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

		return output;
	},

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

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

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

	getExcerpt: function(inTiddlerTitle,title,indent) {
		if (!indent)
			indent = 1;

		var displayMode = this.getTagglyOpt(inTiddlerTitle,"excerpts");
		var t = store.getTiddler(title);

		if (t && displayMode == "excerpts") {
			var text = t.text.replace(/\n/," ");
			var marker = text.indexOf(this.config.excerptMarker);
			if (marker != -1) {
				return " {{excerpt{<nowiki>" + text.substr(0,marker) + "</nowiki>}}}";
			}
			else if (text.length < this.config.excerptSize) {
				return " {{excerpt{<nowiki>" + t.text + "</nowiki>}}}";
			}
			else {
				return " {{excerpt{<nowiki>" + t.text.substr(0,this.config.excerptSize) + "..." + "</nowiki>}}}";
			}
		}
		else if (t && displayMode == "contents") {
			return "\n{{contents indent"+indent+"{\n" + t.text + "\n}}}";
		}
		else if (t && displayMode == "sliders") {
			return "<slider slide>\n{{contents{\n" + t.text + "\n}}}\n</slider>";
		}
		else if (t && displayMode == "descr") {
			var descr = store.getTiddlerSlice(title,'Description');
			return descr ? " {{excerpt{" + descr  + "}}}" : "";
		}
		else if (t && displayMode == "slices") {
			var result = "";
			var slices = store.calcAllSlices(title);
			for (var s in slices)
				result += "|%0|<nowiki>%1</nowiki>|\n".format([s,slices[s]]);
			return result ? "\n{{excerpt excerptIndent{\n" + result  + "}}}" : "";
		}
		return "";
	},

	notHidden: function(t,inTiddler) {
		if (typeof t == "string") 
			t = store.getTiddler(t);
		return (!t || !t.tags.containsAny(this.config.excludeTags) ||
				(inTiddler && this.config.excludeTags.contains(inTiddler)));
	},

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

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

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

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

				first = false;
			}
		}

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

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

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

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

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

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

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

					if (this.notHidden(list[i].tags[j],title)) {

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

						if (this.notHidden(list[i],title)) {
							allTagsHolder[list[i].tags[j]] += "**[["+list[i].title+"]]"
										+ this.getTaggingCount(list[i].title) + this.getExcerpt(title,list[i].title) + "\n";

							leftOvers.setItem(list[i].title,-1); // remove from leftovers. at the end it will contain the leftovers

						}
					}
				}
			}
		}

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

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

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

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

		var output = [];

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

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

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

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

	},

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

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

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

		var childOutput = "";

		if (depth > this.config.siteMapDepthLimit)
			childOutput += indent + this.lingo.tooDeepMessage;
		else
			for (var i=0;i<list.length;i++)
				if (list[i].title != title)
					if (this.notHidden(list[i].title,this.config.inTiddler))
						childOutput += this.treeTraverse(list[i].title,depth+1,sortBy,sortOrder);

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

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

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

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

	// todo fix these up a bit
	styles: [
"/*{{{*/",
"/* created by TagglyTaggingPlugin */",
".tagglyTagging { padding-top:0.5em; }",
".tagglyTagging li.listTitle { display:none; }",
".tagglyTagging ul {",
"	margin-top:0px; padding-top:0.5em; padding-left:2em;",
"	margin-bottom:0px; padding-bottom:0px;",
"}",
".tagglyTagging { vertical-align: top; margin:0px; padding:0px; }",
".tagglyTagging table { margin:0px; padding:0px; }",
".tagglyTagging .button { visibility:hidden; margin-left:3px; margin-right:3px; }",
".tagglyTagging .button, .tagglyTagging .hidebutton {",
"	color:[[ColorPalette::TertiaryLight]]; font-size:90%;",
"	border:0px; padding-left:0.3em;padding-right:0.3em;",
"}",
".tagglyTagging .button:hover, .hidebutton:hover, ",
".tagglyTagging .button:active, .hidebutton:active  {",
"	border:0px; background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]];",
"}",
".selected .tagglyTagging .button { visibility:visible; }",
".tagglyTagging .hidebutton { color:[[ColorPalette::Background]]; }",
".selected .tagglyTagging .hidebutton { color:[[ColorPalette::TertiaryLight]] }",
".tagglyLabel { color:[[ColorPalette::TertiaryMid]]; font-size:90%; }",
".tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }",
".tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}",
".tagglyTagging ul ul li {margin-left:0.5em; }",
".editLabel { font-size:90%; padding-top:0.5em; }",
".tagglyTagging .commas { padding-left:1.8em; }",
"/* not technically tagglytagging but will put them here anyway */",
".tagglyTagged li.listTitle { display:none; }",
".tagglyTagged li { display: inline; font-size:90%; }",
".tagglyTagged ul { margin:0px; padding:0px; }",
".excerpt { color:[[ColorPalette::TertiaryDark]]; }",
".excerptIndent { margin-left:4em; }",
"div.tagglyTagging table,",
"div.tagglyTagging table tr,",
"td.tagglyTagging",
" {border-style:none!important; }",
".tagglyTagging .contents { border-bottom:2px solid [[ColorPalette::TertiaryPale]]; padding:0 1em 1em 0.5em;",
"  margin-bottom:0.5em; }",
".tagglyTagging .indent1  { margin-left:3em;  }",
".tagglyTagging .indent2  { margin-left:4em;  }",
".tagglyTagging .indent3  { margin-left:5em;  }",
".tagglyTagging .indent4  { margin-left:6em;  }",
".tagglyTagging .indent5  { margin-left:7em;  }",
".tagglyTagging .indent6  { margin-left:8em;  }",
".tagglyTagging .indent7  { margin-left:9em;  }",
".tagglyTagging .indent8  { margin-left:10em; }",
".tagglyTagging .indent9  { margin-left:11em; }",
".tagglyTagging .indent10 { margin-left:12em; }",
"/*}}}*/",
		""].join("\n"),

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

config.taggly.init();

//}}}

/***
InlineSlidersPlugin
By Saq Imtiaz
http://tw.lewcid.org/sandbox/#InlineSlidersPlugin

// syntax adjusted to not clash with NestedSlidersPlugin
// added + syntax to start open instead of closed

***/
//{{{
config.formatters.unshift( {
	name: "inlinesliders",
	// match: "\\+\\+\\+\\+|\\<slider",
	match: "\\<slider",
	// lookaheadRegExp: /(?:\+\+\+\+|<slider) (.*?)(?:>?)\n((?:.|\n)*?)\n(?:====|<\/slider>)/mg,
	lookaheadRegExp: /(?:<slider)(\+?) (.*?)(?:>)\n((?:.|\n)*?)\n(?:<\/slider>)/mg,
	handler: function(w) {
		this.lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart ) {
			var btn = createTiddlyButton(w.output,lookaheadMatch[2] + " "+"\u00BB",lookaheadMatch[2],this.onClickSlider,"button sliderButton");
			var panel = createTiddlyElement(w.output,"div",null,"sliderPanel");
			panel.style.display = (lookaheadMatch[1] == '+' ? "block" : "none");
			wikify(lookaheadMatch[3],panel);
			w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
		}
   },
   onClickSlider : function(e) {
		if(!e) var e = window.event;
		var n = this.nextSibling;
		n.style.display = (n.style.display=="none") ? "block" : "none";
		return false;
	}
});

//}}}
{{books{
[<img[Teaching Your Children Values|family/images/values.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Teaching-Your-Children-Values-Richard/dp/0671769669/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1221354535&sr=1-1]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=AGpe3rhEg9QC&printsec=frontcover&dq=teaching+your+children+values&ei=62rrSO2THojkMq-KiAM&sig=ACfU3U0l2EIaIwEid7ejwCJitlkMZAsY3w]]
}}}
//by Linda and Richard Eyre//
The Eyres are not psychologists. Instead, she is a teacher and he a child consultant. Together they raised 9 children and have consulted to the white House.  They lay out a 12 month plan with a different value to address each month. They give examples for how to teach a value to preschoolers, young children, and teens.  Although the book and their techniques may strike you as a little "goody-goody," they lay out a clear method for teaching your values to your children in a consistent and thoughtful manner.

{{books{
[<img[The Case for Marriage|family/images/wg.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Case-Marriage-Married-Healthier-Financially/dp/0767906322/ref=sr_1_1?ie=UTF8&s=books&qid=1221354953&sr=1-1]]
}}}
//by Linda J. Waite and Maggie Gallagher//
This is an excellent source of information for the married couple on the benefits of marriage, and why it is not the same as "living together." they provide a wealth of statistics, sound reasoning to explain them, and detailed readings into 100s of published studies to make sense of the impact of marriage.  

<<notice "The Case for Marriage" "family/library/brwaitgalligher.html" "Read more about Waite and Gallagher's arguments about marriage, cohabitation, and divorce.">>
<<notice "The Cycle of Violence" "learning/library/assess/cycle_of_violence.html" "A brief explanation of the Cycle of  Violence.  This is useful for helping professionals to review, as well as clients in violent relationships.">>
{{books{
[<img[The Nurture Assumption|family/images/nurt.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Nurture-Assumption-Children-Turn-They/dp/0684857073/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1221355624&sr=1-1]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=9GQlA_l-TQ0C&printsec=frontcover&dq=the+nurture+assumption&ei=rWvrSNLxIZSmM8j_nA4&sig=ACfU3U3w1HIMrmes9-bGcknjrlaFt4hUDw]]
}}}
//by Judith Harris//
Ms. Harris was denied a Ph.D. by the department chair, George A. Miller, at Harvard University. In 1997, she received the George A. Miller award, named after that same department chair, from the American Psychological Association for her 1995 article, which led to the publication of this book. Her premise is that parents have less effect upon their children than we tend to think, and that environment and genes have more effect than we give them credit.  She cites //considerable// data from //many// fields, and while hotly debated, her work will definitely leave a lasting mark on the future of psychology. 

<<notice "The Nurture Asumption" "family/library/harris.html" "This in-depth review discusses the strengths and weaknesses of the arguments of Judith Harris in her book //The Nurture Assumption//.">>
{{books{
[<img[The Teaching Portfolio|bookreview/seldin.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Teaching-Portfolio-Practical-Performance-Promotion/dp/188298269X/ref=sr_1_1?ie=UTF8&s=books&qid=1221352305&sr=1-1]]
}}}
//by Peter Seldin//
This is a very good book, now in its third edition, that explores the nature of course portfolios as a tool to improve teaching and learning. The first part of the book discusses the basics of course portfolios, what they are, and how they are created. The second part of the book offers seven cases of how a school or department saw a problem, and used the teaching portfolio as a way to resolve matters. The last part of the book offers over 20 examples of teaching portfolios from a range of disciplines and types of instructors. While geared toward college teaching, I found it to be practical, clear, and energizing for the graduate instructor as well.
{{books{
[<img[The Unschooled Mind|bookreview/gardner.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Unschooled-Mind-Children-Schools-Should/dp/0465088961/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1221352172&sr=1-1]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=34P3z6AKmp4C&printsec=frontcover&dq=the+unschooled+mind&ei=WmvrSKLtC4jkMq-KiAM&sig=ACfU3U2PLzL6yh84etmhKep8HaiGHFgNKg]]
}}}
//by Howard Gardner//
This is an interesting book, republished in 2004 from its first 1994 printing. In 13 chapters, Gardner discusses his views on learning from childhood to adolescence, what we do right, and what goes wrong. He reviews and explores the issues associated with schools and teachers, culture and politics, and innovations and failures in education. While I found little was applied by Gardner to college or graduate teaching and learning, the basic principles though can be scaled upward. Some of what he has to say changed my way of thinking about my courses and students quite a bit. 
{{books{
[<img[Therapy With Difficult Clients|bookreview/hanna.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Therapy-Difficult-Clients-Precursors-Awaken/dp/1557987939/ref=sr_1_1?ie=UTF8&s=books&qid=1221352608&sr=1-1]]
}}}
//by Fred J. Hanna//
This book outlines seven discreet areas in which clients should show readiness and ability in order to make life changes. It's a good book for therapists in conceptualizing client difficulties and (lack of) progress. Similarly, it's also a good book for individuals and clients who find themselves stuck in their life and unsure as to why. 

<<notice "Therapy With Difficult Clients: Using the Precursors Model to Awaken Change" "learning/library/assess/ready_change.html" "">>
<<notice "How To Assess Activities of Daily Living" "learning/library/advpract/adl.htm" "This article includes questions to ask and subareas to assess in 14 activities of daily living ranging from housekeeping, to self-care skills, to community interaction.">> 
<<notice "The Twelve Steps to Recovery" "learning/library/assess/12steps.html" "Brief listing of the 12 steps.  It is helpful to check these when interviewing people in recovery - those who say they relapsed when they got to Step 4 should be able to tell you Steps 1-4.">> 

<<notice "Twelve Triggers to Relapse" "learning/library/assess/relapse" "These are 12 warning signs of a possible impending relapse.  This might be useful for an examiner to review, but also a person in recovery.">> 

<<notice "How to Assess Substance Abuse" "learning/library/assess/subabuse1.htm" "This handout lists substances to ask about, and areas of life and questions to discuss.  it includes approaches for both for short screenings as well as extended interviews.">> 

<<notice "Adult Children of Alcoholics" "learning/library/assess/subabuse2.htm" "This handout outlines 15 characteristics of adult children of alcoholics.  This might be useful for an examiner to review, but also for a possible adult child of an alcoholic to think about when considering  the impact of family substance abuse on their current life.">> 

<<notice "Codependence" "learning/library/assess/subabuse3.htm" "This handout outlines 19 characteristics endorsed by codependent people.  This might be useful for an examiner to review, but also for a possibly codependent person to think about when considering the nature of their current life problems.">> 
<<notice "When Assessment Results are Contradictory" "learning/library/advpract/testpointstwo.html" "This article outlines two issues to consider when test results appear contradictory -- testing order and alternate explanations for apparent contradictions.">> 
This articles covers basic principles to guide integration of interviewing and psychological testing results. There is a section for each personality disorder as well, covering what you are likely to see in the interview and history, as well as in the testing data.  Finally, there are 15 additional problem areas included, each covering what you are likely to see in the interview and history, as well as in the testing data.

<<notice "Integrating Tests and Interviews" "learning/library/advpract/integration.html" "">> 
<<notice "How to Do a Good Interview" "learning/library/advpract/interview.htm" "This handout covers what to ask in basic areas, and some of why we ask these things.">> 
This article covers the basics of good interviewing, and specific things to ask to assess 17 different areas.  Much attention is given to interviewing about substance abuse.  

<<notice "More Help on Interviewing: Subtle questions to ask" "learning/library/advpract/interview.html" "">> 



See also [[Tips for Assessment Substance Abuse]]
Psychologists collect all sorts of records and create all sorts of documents in the course of their assessment work.  

<<notice "Record Keeping: Basic points to remember" "learning/library/advpract/record_keeping.html" "This handout contains information on what should and should not be included in a file for an assessment case, some general recommendations, and a few client rights that should be considered when creating documentation.">> 
<<notice "Putting it all together in a report" "learning/library/advpract/report.html" "This article outlines issues to consider when writing a report, and the sections to include in the report.  it includes a checklist of strengths to consider when writing personality conceptualizations, and some areas to review to craft helpful recommendations.">> 

See also [[Conceptualizing Psychological Strengths]]
{{books{
[<img[To Spank or Not To Spank|family/images/spankornot.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Spank-Not-John-Rosemond/dp/0836228138/ref=sr_1_2?ie=UTF8&s=books&qid=1221354770&sr=1-2]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=34P3z6AKmp4C&printsec=frontcover&dq=the+unschooled+mind&ei=WmvrSKLtC4jkMq-KiAM&sig=ACfU3U2PLzL6yh84etmhKep8HaiGHFgNKg]]
}}}
//by John Rosemond, Ph.D.//
In a no-nonsense book, Rosemond discusses the issues associated with spanking your child, as well as how to do it correctly. Along the way, he discusses problems with arguments against spanking, how often you should (and should not) spank a child, and the  "right" way to spank.  

<<notice "To Spank or Not To Spank" "family/library/spank.htm" "Read a detailed review">> 
/***
|Name:|ToggleTagPlugin|
|Description:|Makes a checkbox which toggles a tag in a tiddler|
|Version:|3.1.0 ($Rev: 4907 $)|
|Date:|$Date: 2008-05-13 03:15:46 +1000 (Tue, 13 May 2008) $|
|Source:|http://mptw.tiddlyspot.com/#ToggleTagPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!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)
* TouchMod flag - if non empty then touch the tiddlers mod date. Note, can set config.toggleTagAlwaysTouchModDate to always touch mod date
!!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'>>|
!!Notes
* If TiddlerName doesn't exist it will be silently created
* Set label to '-' to specify no label
* See also http://mgtd-alpha.tiddlyspot.com/#ToggleTag2
!!Known issues
* Doesn't smoothly handle the case where you toggle a tag in a tiddler that is current open for editing
* Should convert to use named params
***/
//{{{

if (config.toggleTagAlwaysTouchModDate == undefined) config.toggleTagAlwaysTouchModDate = false;

merge(config.macros,{

	toggleTag: {

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

		handler: function(place,macroName,params,wikifier,paramString,tiddler) {
			var tiddlerTitle = tiddler ? tiddler.title : '';
			var tag   = (params[0] && params[0] != '.') ? params[0] : "checked";
			var title = (params[1] && params[1] != '.') ? params[1] : tiddlerTitle;
			var defaultLabel = (title == tiddlerTitle ? this.shortLabel : this.longLabel);
			var label = (params[2] && params[2] != '.') ? params[2] : defaultLabel;
			var touchMod = (params[3] && params[3] != '.') ? params[3] : "";
			label = (label == '-' ? '' : label); // dash means no label
			var theTiddler = (title == tiddlerTitle ? 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;
				}
				if ((touchMod != "" || config.toggleTagAlwaysTouchModDate) && theTiddler)
						theTiddler.modified = new Date();
				store.setTiddlerTag(title,this.checked,tag);
				return true;
			});
		}
	}
});

//}}}
<!--{{{-->
<div class="toolbar" macro="toolbar -closeTiddler closeOthers +editTiddler permalink newHere"></div>
<div class="tagglyTagged" macro="hideSomeTags"></div>
<div><span class="title" macro="view title"></span></div>
<div class='subtitle'>Updated <span macro='view modified date [[MMM-DD-YY]]'></span></div>
<div class="viewer" macro="view text wikified"></div>
<div class="tagglyTagging" macro="tagglyTagging"></div>
<!--}}}-->
<<notice "How To Assess Vocational Abilities" "learning/library/advpract/strengths.html" "This article outlines four areas of concern in vocational assessment -- Basic, Cognitive, Orientation to the Workplace, and Interpersonal.  Each concern has three or four subareas and the levels or kinds of functioning to assess to address that concern.">> 
Browse by Article Tag:
<<tiddler ArticleTags>> 
In results from two studies of minority families, researchers found four factors to udnerstand ''Family Relationship Characteristics'':
* Exceptionally Functional Families with good structure and emotional enrichment
* Task Oriented Families with good structure but low emotional warmth
* Moderately Functioning Families who showed adequate levels of structure and warmth
* Struggling Families with little structure or warmth

Other researchers studied ''~Parent-Adolescent Communication'' and found positive communication and validation/respect were key elements of healthy families.

<<notice "What Do We Know About Minority Families?" "family/library/ethnic7.htm" "">> 
This article discusses
* what we know about ADHD
* what it's like to have ADHD
* research into the causes (and myths) of ADHD
* information on diagnosing ADHD 

<<notice "ADHD - What you can do in addition to medication" "family/library/adhd.html" "">> 
This article covers the beginnings of "gender issues" in therapy, and how feminism has influenced the practice of family and couples therapy.  More is discussed on the difficulty understanding "power differences" for different couples.  The article closes with 25 questions you can use in an interview to learn about gender and power differences in work with a couple.

<<notice "Gender Issues in Couples Therapy" "family/library/gender.html" "">>
This article covers what we know about maltreating families and the parent-child dynamic in these families.  For example:
* Chaffin and colleagues found in a study of over 7,000 parents in five major cities that depressed parents are 3 times more likely to neglect their children.
* Ross found in a study of over 3300 parents that almost 25% of parents who were violent toward their partner were also violent toward their children.
* There may be no overt negative interactions, but there are generally limited positive interactions. The parent is more critical of the child's behavior, uses power and control parenting strategies, and is likely demanding and rigid.

<<notice "Dysfunctional Families" "family/library/dysfunparents.html" "Learn more about abusive families">> 
This article reviews
* Types of Domestic Violence
* Theories Regarding the Causes of Abuse
* Assessment
* Questions to Ask in the Assessment of Violence
* Batterer Assessment
* Treatment
* Why Don't They Just Leave?
* Safety Plans

<<notice "Domestic Violence" "family/library/dv.htm" "A very brief overview of the literature">>
Remarriages are up a as result of the divorce rate.
* Cohabitation before the first marriage was associated with a greater chance of divorce, but cohabitation before the second marriage was unrelated. 40% of all marriages are remarriages; 60% will end in another divorce (Papp) with 15% ending by 3 years, and another 25% by 5 years.
* Divorce is more likely if the woman was under age 25 at the start of the second marriage (47% vs 34%), comes from a single parent home (49% vs 33%), was raped (25% more likely), or had GAD (50% more likely).
* Second divorce is more likely if the woman has children (32% without children, 40% with wanted children, 44% with unwanted children), and women with lower education. Second marriages may be more prone to backshadowing or "Monday Morning Quarterbacking"

<<notice "CDC Study on Marriage and Divorce" "family/mod_couples_thx/cdc.html" "This article summarizes the findings of a Center for Disease Control study on women and marriage.">>
This article is based on a presentation to social workers about dysfunctional families, and covers
* So How Does Substance Abuse Cause Changes In the Family?
* How Is Substance Abuse Maintained?
* How Is Substance Abuse Transmitted Across Generations?
* So What Do You Do?

<<notice "Families and Substance Abuse" "family/library/familysubstanceabuse.htm" "this article shows how substance abuse can impact the family life cycle, and perpetuate problems across the generations">> 
<<notice "Antisocial Personality" "learning/library/counseling/asp.html" "This article provides an introduction to Antisocial Personality Disorder and Style, along with some examples of each, some of the findings seen in Psychological Assessment of these kinds of people, and some information on treatment and differential diagnosis of the disorder.">> 
<<notice "What is Psychological Assessment" "learning/library/assess/assess.html" "This handout outlines six basic issues in psychological assessment -- introductory issues, interviewing, behavioral observations, testing, good test use, and client rights.">> 
This article explains what SBS is and the prognosis for children with SBS.

<<notice "Sibling Sexual Abuse" "family/library/sbs.html" "">> 
This article covers 
* Basic facts and definitions of Learning Disabilities
* Phonemes and how a learning disability works
* Signs of a Learning Disabilities
* Interventions for LD children
* Research on what makes Learning Disabled children successful
* Social Problems and ~Self-Esteem

<<notice "What is a Learning Disability?" "family/library/ld.html" "">> 
<<notice "How to Create A Safety Plan" "learning/library/assess/safety_plan.html" "This article describes the basic elements of a safety plan for victims of domestic violence.">>
Family researchers must consider many variables as they even begin to consider their work:
* what model of treatment do we use?
* what "problem" do we treat and how do we define a "family success"?
* how long will successes last, given that situations change and new stresses are bound to arise?
* how do use demonstrate effectiveness with linear statistics when you believe families and systems are circular?

<<notice "Research in Family Therapy" "family/library/family_research.htm" "review of 10 factors to consider in family therapy">> 
Baumrind proposed there were four kinds of parents:
* ''Authoritarian'' - high on control, but low on warmth... this leads to poor outcomes for the family
* ''Authoritative'' - high on control and warmth... this leads to good outcomes for the family
* ''Permissive'' - low on control and high on warmth... this leads to poor outcomes for the family
* ''Disengaged'' - low on control and warmth... this leads to the worst outcomes for the family

Her recent research has resulted in adding three more:
* ''Directive'' - mild control and warmth... looks like a cultural variant of Authoritative and has good outcomes for the family
* ''Democratic'' - mild control and high warmth... looks like a cultural variant of Permissive but instead has good outcomes for the family
* ''Good Enough'' - mild on control and warmth... comprising only 10% of her sample, a parent without a clear style

Baumrind's model has been criticized by many (some of whom haven't read it) as culturally insensitive.  However, her model was expanded a decade ago.

<<notice "Parent and Family Types" "family/library/baumrind.htm" "Short presentation of Baumrind's typology of parenting, and some of her recent work.">>
This article briefly outlines what makes for a dysfunctional family, and how the dysfunction is passed down the genrations.

<<notice "Dysfunctional Families II" "family/library/dysfunctional.htm" "">> 
<<notice "The Sound Marital House" "family/divorce/gottman.htm" "This short review discusses Gottman's theory, based on 25 years of research into what makes a healthy and unhealthy relationship.">>
<<notice "Step-Families: When Families Mend" "family/divorce/stepfamilies.htm" "This review of Bray and Kelly's book reports some of the major findings of their decade of research">> 
This articles covers areas of expertise every therapist working with gay and lesbian couples should have, including knowledge of the forms and extent of legal, medical, religious, and social discrimination.  It also discusses family structure, and ways that traditional ideas about extended family and connections to them are inaccurate.  it also discusses therapist skill and some resources for more information.

<<notice "Issues for Same-Sex Couples" "family/library/gay-lesbian.html" "">>


See also [[Relationship Therapy With Same-Sex Couples]]
<<notice "Beginning Therapy: A Primer" "learning/library/counseling/begintherapy.html" "This article covers issues associated with the first inquiry and session of therapy, initial Do's and Don'ts for therapists, how to understand resistance and rapport, and reflective listening">>
Couples therapy considers the relationship to be "the client" and so a continued relationship that is rewarding to all (the couple and the family if there are children) is considered the goal of therapy.  Individual therapy considers the person in the room to be the client, and so their desire (whether it be to continue or to end the relationship) is considered the goal.

<<notice "Couples Therapy vs. Individual Therapy" "family/library/couple_therapy_general.html" "This article covers eight basic differences, the purpose of therapy, and whether it works in 'the real world' and for what.">>
<<notice "When Divorce Is Inevitable" "family/divorce/divorce.htm" "This short review discusses the stages of divorce, offers suggestions on getting your needs met through it, and provides some resources">> 
{{books{
[<img[Why Marriage?|bookreview/chauncey.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Why-Marriage-history-shaping-equality/dp/B000WCTNHW/ref=sr_1_1?ie=UTF8&s=books&qid=1221351731&sr=1-1]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=D2cZ9OPi30gC&printsec=frontcover&dq=why+marriage&ei=0WrrSKX9G4HwMqWzkBI&sig=ACfU3U38jsJhBIRIp3f_toNYholKwMIa2g]]
}}}
//by George Chauncey//
This book reviews where and how the controversy started over gay marriage. He gives a short history of homophobia, marriage rights, and some of the past views of the religious conservatives, and provides some real stories from Gays and Lesbians seeking marriage. Read more...
{{books{
[<img[Why Marriages Succeed or Fail|family/images/gottmanwhy.jpg]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Why-Marriages-Succeed-Fail-Yours/dp/0684802414/ref=sr_1_1?ie=UTF8&s=books&qid=1221355256&sr=1-1]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=S_ffhMnsufAC&printsec=frontcover&dq=why+marriages+succeed+or+fail&ei=hmvrSI6MFZeIM8DrxQQ&sig=ACfU3U0xpWFMqU4q1TvtgsFJ58z4tfWBjg]]

[<img[The Marriage Clinic|family/images/marriageclinic.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Marriage-Clinic-Scientifically-Based-Marital-Professional/dp/0393702820/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1223399438&sr=8-1]][<img[browse it at Google Books|images/gbooks.gif][http://books.google.com/books?id=jAYb0O87y40C&pg=PA322&dq=children+and+marital+conflict&ei=Bm3rSPzkN5jMMNLSuQg&sig=ACfU3U0LHXjERm28ONhDw-jRG2ws3a9igw]]
}}}

//by John and Julie Gottman//
The Gottmans are leading researchers in couples therapy. His book, Why Marriages Succeed or Fail, is based on thorough research. He busts some of the myths of marriage and divorce to provide, in plain English, what works and doesn't work in marriage. Based on his 25 years of research and observations of the "masters" and "disasters" of marriage, he can determine with over 85% accuracy which couples will stay married and which will divorce. He offers quizzes to help you see where you and your marriage stand, and provides explanations for why couples get stumped by some problems. His model includes communication skills, physiology, and relationship-building activities with basic instructions for what not to do, and more importantly, what to do, to have a happy marriage.  


<<notice "The Sound Marital House" "family/library/gottman.html" "Read more about Gottman's theory, based on 25 years of research, about what makes a healthy and unhealthy relationship.">>
{{books{
[<img[Why You Should Give a Damn About Gay Marriage|bookreview/kotulski.gif]][<img[find it at Amazon.com|images/amazon.gif][http://www.amazon.com/Should-Give-Damn-About-Marriage/dp/1555838731/ref=sr_1_1?ie=UTF8&s=books&qid=1221353174&sr=1-1]]
}}}
//by Davina Kotulski, Ph.D.//
Kotulski is a clinical psychologist serving on the board of Marriage Equality California. Read a Detailed Review AND see an impromptu study of the American Family Association and Concerned Women for America websites... 

<<notice "Why You Should Give a Damn About Gay Marriage" "bookreview/brkotulski.html" "Detailed review of the book.">>
<<notice "Individual Reasons for Divorce" "family/divorce/marriageanddivorce.htm" "This short review covers individual-related reasons for divorce">> 




<<notice "Relationship Reasons for Divorce" "family/mod_couples_thx/divorce.html" "This short review covers relationship-related reasons for divorce">> 
<<notice "Causes of Domestic Violence" "learning/library/assess/causes_of_dv.html" "A brief outline of the general factors associated with domestic violence, and a general model explaining how they interact to lead to violence.">>
This article covers the frequency, causes, and results of sibling sexual abuse.  While there is no "type" of child who sexually abuses, there are some kinds of dysfunction seen more commonly in the families of abusing children.

<<notice "Sibling Sexual Abuse" "family/library/sib_abuse2.htm" "">> 
<<notice "Why Don't They Just Leave?" "learning/library/assess/opportunity_control.html" "This article discusses some of the research on why people in violent relationships stay in them.">>
All the tiddlers hidden from the regular search bar