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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

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

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

----
Also see [[AdvancedOptions]]
<<importTiddlers>>
* ''[23/02/10]'' - @@color:red;Final@@ will be on @@color:red;February 27@@ from 5:00 p.m. again in either room 4309 or 4303. The final is 2 hours.
* ''[23/02/10]'' - @@color:red;Presentation@@ will be on @@color:red;February 25 at 1:00 p.m.@@ in either room 4309 or 4303. Please be on time as you will be a judge for all presentation as well. 
* ''[09/02/10]'' - @@color:red;Tomorrow@@ class is cancel. Hence the final will be up to Degree reduction of Wang - Ball surface. Friday class will be for paper presentation. Please do not be late.
* ''[05/02/10]'' - Sorry guys. The rest of the semester will be cover on Monday and Wednesday instead. The presentation will be on Friday. You should receive the paper this afternoon. We will discuss the possible date for Final on Monday. We will 4309 or 4310 for the Monday class.
* ''[01/02/10]'' - There will be no class tomorrow (@@color:red;03/02@@). Make up class will be on Monday (08/02) at 5pm.
* ''[06/01/10]'' - @@color:red;Midterm Examination@@ will be Monday 11/01 at 5pm. I will let you know the room on Friday class.
* ''[17/12/09]'' - @@color:red;Tomorrow class (18/12/09)@@ will be canceled. The makeup class will be after New year.
* ''[12/12/09]'' - @@color:red;Homework 2@@ has been posted. The deadline is @@color:red;Friday 18/12/09@@.
* ''[11/12/09]'' - There will be make up class next Monday (@@color:red;11/12/09@@) at 5pm in Room 4309.
* ''[01/12/09]'' - @@color:red;Tomorrow class (2/12/09) will be cancel@@. Sorry for again giving you such a short notice. We shall arrange a makeup class next week.
* ''[29/11/09]'' - @@color:red;Homework 1@@ has been uploaded. It is due on @@color:red;Friday [4/12/09]@@.
* ''[25/11/09]'' - The @@color:red;class for tomorrow (Thursday 26/11)@@ will be moved to next @@color:red;Monday (30/11) at 5:00 - 6:00 in room 4309@@. Sorry for such a short notice.
* ''[24/11/09]'' - The makeup class on Thursday will be in Room @@color:red;4309@@. 
* ''[23/11/09]'' - The makeup class for today will be in room @@color:red;4309@@. The slide (lecture 3) for today class is also uploaded. Please the [[Lecture Slides]].
* ''[21/11/09]'' - The makeup classes for next weeks are @@color:red;Monday 17:00-18:30@@ and @@color:red;Thursday and 15:00 - 16:30@@. The rooms for those classes will be posted later.
* ''[20/11/09]'' - Welcome to the 178 359 class website. Please check this website at least a few times a week for any important announcements.
/***
|Name|BrightText|
|Source|http://www.TiddlyTools.com/#BrightText|
|Version|1.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|CSS|
|Description|adjust font colors for use with dark backgrounds|
***/

/* background images */
/* colors and borders */
a, .button { color:#ccf; }
a:hover, .button:hover { color:#fff; }

#breadCrumbs { color:#ccc; }
#breadCrumbs a { color:#ccf; }
#titleLine { color: #fff; }
#titleLine a { color: #009900; }
.siteMenu { color: #fff; border:0;  }
.siteMenu a, .siteMenu .button, .siteMenu .tiddlyLink { color: #ccf; }
.storyMenu { color: #fff; border:0; }
.storyMenu a, .storyMenu .button, .storyMenu .tiddlyLink { color: #ccf; }
/*
#mainMenu { color: #fff; }
#mainMenu .tiddlyLink { color: #def; }
#mainMenu .tiddlyLink:hover { color: #fff; }
#mainMenu .externalLink { color: #def; }
#mainMenu .externalLink:hover { color: #fff; }
#mainMenu .button, #mainMenu A { color: #def; }
#mainMenu .button:hover, #mainMenu A:hover { color: #fff; }
*/
#messageArea { color: #006; }
#messageArea a:link, #messageArea a:visited { color: #006; }
#messageArea a:hover { color: #f00; }
#messageArea a:active { color: #006; }
#popup { color: #000; }
#popup a { color: #006; }
#popup .viewer a { color: #ccf; }
#popup a:hover { color: #006; }
#popup .viewer a:hover { color: #fff; }
#popup hr { color: #666; }
.tabContents { color: #000; }
.tiddler .button { color: #ccf; }
.tiddler .button:hover { color: #fff; }
.tiddler .button:active { color: #fff; }
.title { color: #def; }
.subtitle { color: #89a; }
.toolbar { color: #aaa; }
.footer { color: #888; }
.selectedTiddler .footer { color: #ddd; }
.viewer { color: #fff; }
.viewer a:link, .viewer a:visited { color: #ccf; }
.viewer a:hover { color: #fff; }
.viewer .button { color: #def; }
.viewer .button:hover { color: #fff; }
.viewer th { color: #fff; }
.viewer td { color: #fff; }
.viewer code { color: #ccc; }
.viewer pre { color: #000; }
.viewer hr { color: #666; }
.viewer .highlight, .viewer .marked { color: #fff; }
.viewer .tabSelected { background-color: #002; color:#fff; border-color:#999; border-width:1px; padding-bottom:1px !important; }
.viewer .tabUnselected { background-color: transparent; color:#999; border-color:#666}
.viewer .tabContents { background-color: #002; color:#fff; border-color:#999; border-width:1px }
.tagging a, .tagged a, .tagging .button, .tagged .button  { color: #009; }
.highlight, .marked { color: #fff; }
.lowlight a { color: #009 !important; }
.editor { color: #402C74; }
.editorFooter { color: #aaa; }
.editorFooter A { color: #930; }
.editorFooter A:hover { color: #cf6; }
.editorFooter A:active { color: #fff; }
#licensePanel A { color: #66f; }
#licensePanel A:hover { color: #fff; }
#licensePanel A:active { color: #fff; }
.errorNoSuchMacro { color: #ff0; }
.zoomer { color: #fff; }

.mouseover 
	{color:#336 !important;}
.mouseover a
	{color:#336 !important;}
.selected .mouseover
	{color:#ccf !important;}
.selected .mouseover .button, .selected .mouseover a
	{color:#ccf !important;}

.selected .mouseover .moveablePanelButton
	{color:#000 !important;}

.floatingPanel .button,
.floatingPanel a:link,
.floatingPanel a:hover,
.floatingPanel a:visited,
.selected .floatingPanel .button,
.selected .floatingPanel a:link,
.selected .floatingPanel a:hover,
.selected .floatingPanel a:visited,
.toolbar .floatingPanel .button,
.toolbar .floatingPanel a:link,
.toolbar .floatingPanel a:hover,
.toolbar .floatingPanel a:visited,
.viewer .floatingPanel .button,
.viewer .floatingPanel a:link,
.viewer .floatingPanel a:hover,
.viewer .floatingPanel a:visited {
	color: #009 !important;
}
.floatingPanel .viewer .button,
.floatingPanel .viewer a:link,
.floatingPanel .viewer a:visited {
	color: #ccf !important;
}
.floatingPanel a:hover,
.viewer .floatingPanel a:hover {
	color: #fff !important;
}
/***
----
***/
/*{{{*/
.attachPanel a, #importPanel a, #exportpanel a,
.attachPanel .button, #importPanel .button, #exportpanel .button,
.attachPanel .tiddlyLinkExisting, #importPanel .tiddlyLinkExisting, #exportpanel .tiddlyLinkExisting,
.attachPanel .tiddlyLinkNonExisting, #importPanel .tiddlyLinkNonExisting, #exportpanel .tiddlyLinkNonExisting,
.tab .button, .tab A,
.tab .tiddlyLinkExisting, .tab .tiddlyLinkNonExisting
	{ color:#009 !important; }
#sidebarOptions, #sidebarOptions .sliderPanel
	{ color: #fff; }
#sidebarOptions .button, #sidebarOptions A,
#sidebarOptions .tiddlyLinkExisting, #sidebarOptions .tiddlyLinkNonExisting,
#sidebarOptions .sliderPanel .button, #sidebarOptions .sliderPanel A,
#sidebarOptions .sliderPanel .tiddlyLinkExisting, #sidebarOptions .sliderPanel .tiddlyLinkNonExisting
	{ color: #def; }
#sidebarTabs, #sidebarTabs .sliderPanel, #sidebarTabs .tabContents
	{ color: #fff; }
#sidebarTabs .tabContents *[class="TOCList"] /* MOZ ONLY */
	{ color:#fff !important; }
#sidebarTabs .button, /* #sidebarTabs A, */
#sidebarTabs .tiddlyLinkExisting, #sidebarTabs .tiddlyLinkNonExisting
	{ color: #def; }
.menubox
	{ color:#fff; border-color:#999; }
.menubox .button, .menubox .tiddlyLinkExisting, .menubox .tiddlyLinkNonExisting
	{ color:#99f !important; }
.QOTD
	{ color:#fff !important; background:inherit !important; }
.groupbox, .groupbox table, .groupbox tbody, .groupbox tr, .groupbox td
	{ color:#000; }
.groupbox a, .groupbox .button, .groupbox .tiddlyLinkExisting, .groupbox .tiddlyLinkNonExisting
	{ color:#009 !important; }
.outline
	{ border-color:#999; }
.floatingPanel, .floatingPanel table, .floatingPanel tbody, .floatingPanel tr, .floatingPanel td
	{ color:#000; }
.toolbar {color:#336 !important;}
.toolbar a {color:#336 !important;}
.selected .toolbar { color:#999 !important; }
.selected .toolbar a {color:#ccf !important;}
.selected .toolbar a:hover {color:#fff !important; }
/*}}}*/
* Wednesday : 10:30 - 12:00 in Room 4310
* Friday : 10:30 - 12:00 in Room 4510
This course is intended to introduce you to geometric modeling. The topics covered include parametric representation of curve and surface, Hermitte curves, Bezier curves, Ball curves, ~B-Spline curves, Rational Curves, Polar form approach for curves and surfaces.
[[Announcements]]
[[Course Description]]
[[Instructor]]
[[Class Time & Location]]
[[Lecture Slides]]
[[Homework]]
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>>
* [[Homework1|http://gear.kku.ac.th/~polpinit/classes/178359/HW1.pdf]]
* [[Homework2|http://gear.kku.ac.th/~polpinit/classes/178359/HW2.pdf]]
* [[Homework3|http://gear.kku.ac.th/~polpinit/classes/178359/HW2.pdf]]
* [[Homework4|http://gear.kku.ac.th/~polpinit/classes/178359/HW2.pdf]]
* [[Homework5|http://gear.kku.ac.th/~polpinit/classes/178359/HW2.pdf]]
* [[Homework6|http://gear.kku.ac.th/~polpinit/classes/178359/HW2.pdf]]
/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.5|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|Insert Javascript executable code directly into your tiddler content.|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Documentation
>see [[InlineJavascriptPluginInfo]]
!!!!!Revisions
<<<
2009.04.11 [1.9.5] pass current tiddler object into wrapper code so it can be referenced from within 'onclick' scripts
2009.02.26 [1.9.4] in $(), handle leading '#' on ID for compatibility with JQuery syntax
|please see [[InlineJavascriptPluginInfo]] for additional revision details|
2005.11.08 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.InlineJavascriptPlugin= {major: 1, minor: 9, revision: 5, date: new Date(2009,4,11)};

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

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

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

// // GLOBAL FUNCTION: $(...) -- 'shorthand' convenience syntax for document.getElementById()
//{{{
if (typeof($)=='undefined') { function $(id) { return document.getElementById(id.replace(/^#/,'')); } }
//}}}
/***
|Name|InlineJavascriptPluginInfo|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.4|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|documentation|
|Description|Documentation for InlineJavascriptPlugin|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Usage
<<<
This plugin adds wiki syntax for surrounding tiddler content with {{{<script>}}} and {{{</script>}}} markers, so that it can be recognized as embedded javascript code.
<script show>
	/* javascript code goes here... */
</script>Every time the tiddler content is rendered, the javascript code is automatically evaluated, allowing you to invoke 'side-effect' processing and/or produce dynamically-generated content that is then inserted into the tiddler content, immediately following the script (see below).  By including the optional ''show'' keyword as the final parameter in a {{{<script>}}} marker, the plugin will also include the script source code in the output that it displays in the tiddler.  This is helpful when creating examples for documentation purposes (such as used in this tiddler!)

__''Deferred execution from an 'onClick' link''__
<script label="click here" title="mouseover tooltip text" key="X" show>
	/* javascript code goes here... */
	alert('you clicked on the link!');
</script>
By including a {{{label="..."}}} parameter in the initial {{{<script>}}} marker, the plugin will create a link to an 'onclick' script that will only be executed when that specific link is clicked, rather than running the script each time the tiddler is rendered.  You may also include a {{{title="..."}}} parameter to specify the 'tooltip' text that will appear whenever the mouse is moved over the onClick link text, and a {{{key="X"}}} parameter to specify an //access key// (which must be a //single// letter or numeric digit only).

__''Loading scripts from external source files''__
<script src="URL" show>
	/* optional javascript code goes here... */
</script>You can also load javascript directly from an external source URL, by including a src="..." parameter in the initial {{{<script>}}} marker (e.g., {{{<script src="demo.js"></script>}}}).  This is particularly useful when incorporating third-party javascript libraries for use in custom extensions and plugins.  The 'foreign' javascript code remains isolated in a separate file that can be easily replaced whenever an updated library file becomes available.

In addition to loading the javascript from the external file, you can also use this feature to invoke javascript code contained within the {{{<script>...</script>}}} markers.  This code is invoked //after// the external script file has been processed, and can make immediate use of the functions and/or global variables defined by the external script file.
>Note: To ensure that your javascript functions are always available when needed, you should load the libraries from a tiddler that is rendered as soon as your TiddlyWiki document is opened, such as MainMenu.  For example: put your {{{<script src="..."></script>}}} syntax into a separate 'library' tiddler (e.g., LoadScripts), and then add {{{<<tiddler LoadScripts>>}}} to MainMenu so that the library is loaded before any other tiddlers that rely upon the functions it defines. 
>
>Normally, loading external javascript in this way does not produce any direct output, and should not have any impact on the appearance of your MainMenu.  However, if your LoadScripts tiddler contains notes or other visible content, you can suppress this output by using 'inline CSS' in the MainMenu, like this: {{{@@display:none;<<tiddler LoadScripts>>@@}}}
<<<
!!!!!Creating dynamic tiddler content and accessing the ~TiddlyWiki DOM
<<<
An important difference between TiddlyWiki inline scripting and conventional embedded javascript techniques for web pages is the method used to produce output that is dynamically inserted into the document: in a typical web document, you use the {{{document.write()}}} (or {{{document.writeln()}}}) function to output text sequences (often containing HTML tags) that are then rendered when the entire document is first loaded into the browser window.

However, in a ~TiddlyWiki document, tiddlers (and other DOM elements) are created, deleted, and rendered "on-the-fly", so writing directly to the global 'document' object does not produce the results you want (i.e., replacing the embedded script within the tiddler content), and instead will //completely replace the entire ~TiddlyWiki document in your browser window (which is clearly not a good thing!)//.  In order to allow scripts to use {{{document.write()}}}, the plugin automatically converts and buffers all HTML output so it can be safely inserted into your tiddler content, immediately following the script.

''Note that {{{document.write()}}} can only be used to output "pure HTML" syntax.  To produce //wiki-formatted// output, your script should instead return a text value containing the desired wiki-syntax content'', which will then be automatically rendered immediately following the script.  If returning a text value is not sufficient for your needs, the plugin also provides an automatically-defined variable, 'place', that gives the script code ''direct access to the //containing DOM element//'' into which the tiddler output is being rendered.  You can use this variable to ''perform direct DOM manipulations'' that can, for example:
* generate wiki-formatted output using {{{wikify("...content...",place)}}}
* vary the script's actions based upon the DOM element in which it is embedded
* access 'tiddler-relative' DOM information using {{{story.findContainingTiddler(place)}}}
Note:
''When using an 'onclick' script, the 'place' element actually refers to the onclick //link text// itself, instead of the containing DOM element.''  This permits you to directly reference or modify the link text to reflect any 'stateful' conditions that might set by the script.  To refer to the containing DOM element from within an 'onclick' script, you can use "place.parentNode" instead.
<<<
!!!!!Instant "bookmarklets"
<<<
You can also use an 'onclick' link to define a "bookmarklet": a small piece of javascript that can be ''invoked directly from the browser without having to be defined within the current document.''  This allows you to create 'stand-alone' commands that can be applied to virtually ANY TiddlyWiki document... even remotely-hosted documents that have been written by others!!  To create a bookmarklet, simply define an 'onclick' script and then grab the resulting link text and drag-and-drop it onto your browser's toolbar (or right-click and use the 'bookmark this link' command to add it to the browser's menu).

Notes:
*When writing scripts intended for use as bookmarklets, due to the ~URI-encoding required by the browser, ''you cannot not use ANY double-quotes (") within the bookmarklet script code.''
*All comments embedded in the bookmarklet script must ''use the fully-delimited {{{/* ... */}}} comment syntax,'' rather than the shorter {{{//}}} comment syntax.
*Most importantly, because bookmarklets are invoked directly from the browser interface and are not embedded within the TiddlyWiki document, there is NO containing 'place' DOM element surrounding the script.  As a result, ''you cannot use a bookmarklet to generate dynamic output in your document,''  and using {{{document.write()}}} or returning wiki-syntax text or making reference to the 'place' DOM element will halt the script and report a "Reference Error" when that bookmarklet is invoked.  
Please see [[InstantBookmarklets]] for many examples of 'onclick' scripts that can also be used as bookmarklets.
<<<
!!!!!Special reserved function name
<<<
The plugin 'wraps' all inline javascript code inside a function, {{{_out()}}}, so that any return value you provide can be correctly handled by the plugin and inserted into the tiddler.  To avoid unpredictable results (and possibly fatal execution errors), this function should never be redefined or called from ''within'' your script code.
<<<
!!!!!$(...) 'shorthand' function
<<<
As described by Dustin Diaz [[here|http://www.dustindiaz.com/top-ten-javascript/]], the plugin defines a 'shorthand' function that allows you to write:
{{{
$(id)
}}}
in place of the normal standard javascript syntax:
{{{
document.getElementById(id)
}}}
This function is provided merely as a convenience for javascript coders that may be familiar with this abbreviation, in order to allow them to save a few bytes when writing their own inline script code.
<<<
!!!!!Examples
<<<
simple dynamic output:
><script show>
	document.write("The current date/time is: "+(new Date())+"<br>");
	return "link to current user: [["+config.options.txtUserName+"]]\n";
</script>
dynamic output using 'place' to get size information for current tiddler:
><script show>
	if (!window.story) window.story=window;
	var title=story.findContainingTiddler(place).getAttribute("tiddler");
	var size=store.getTiddlerText(title).length;
	return title+" is using "+size+" bytes";
</script>
dynamic output from an 'onclick' script, using {{{document.write()}}} and/or {{{return "..."}}}
><script label="click here" show>
	document.write("<br>The current date/time is: "+(new Date())+"<br>");
	return "link to current user: [["+config.options.txtUserName+"]]\n";
</script>
creating an 'onclick' button/link that accesses the link text AND the containing tiddler:
><script label="click here" title="clicking this link will show an 'alert' box" key="H" show>
	if (!window.story) window.story=window;
	var txt=place.firstChild.data;
	var tid=story.findContainingTiddler(place).getAttribute('tiddler');
	alert('Hello World!\nlinktext='+txt+'\ntiddler='+tid);
</script>
dynamically setting onclick link text based on stateful information:
>{{block{
{{{
<script label="click here">
	/* toggle "txtSomething" value */
	var on=(config.txtSomething=="ON");
	place.innerHTML=on?"enable":"disable";
	config.txtSomething=on?"OFF":"ON";
	return "\nThe current value is: "+config.txtSomething;
</script><script>
	/* initialize onclick link text based on current "txtSomething" value */
	var on=(config.txtSomething=="ON");
	place.lastChild.previousSibling.innerHTML=on?"disable":"enable";
</script>
}}}
<script label="click here">
	/* toggle "txtSomething" value */
	var on=(config.txtSomething=="ON");
	place.innerHTML=on?"enable":"disable";
	config.txtSomething=on?"OFF":"ON";
	return "\nThe current value is: "+config.txtSomething;
</script><script>
	/* initialize onclick link text based on current "txtSomething" value */
	var on=(config.txtSomething=="ON");
	place.lastChild.innerHTML=on?"enable":"disable";
</script>
}}}
loading a script from a source url:
>http://www.TiddlyTools.com/demo.js contains:
>>{{{function inlineJavascriptDemo() { alert('Hello from demo.js!!') } }}}
>>{{{displayMessage('InlineJavascriptPlugin: demo.js has been loaded');}}}
>note: When using this example on your local system, you will need to download the external script file from the above URL and install it into the same directory as your document.
>
><script src="demo.js" show>
	return "inlineJavascriptDemo() function has been defined"
</script>
><script label="click to invoke inlineJavascriptDemo()" key="D" show>
	inlineJavascriptDemo();
</script>
<<<
!!!!!Revisions
<<<
2009.02.26 1.9.4 in $(), handle leading '#' on ID for compatibility with JQuery syntax
2008.06.11 1.9.3 added $(...) function as 'shorthand' for document.getElementById()
2008.03.03 1.9.2 corrected fallback declaration of wikifyPlainText() (fixes Safari "parse error")
2008.02.23 1.9.1 in onclick function, use string instead of array for 'bufferedHTML' (fixes IE errors)
2008.02.21 1.9.0 output from 'onclick' scripts (return value or document.write() calls) are now buffered and rendered into into a span following the script.  Also, added default 'return false' handling if no return value provided (prevents HREF from being triggered -- return TRUE to allow HREF to be processed).  Thanks to Xavier Verges for suggestion and preliminary code.
2008.02.14 1.8.1 added backward-compatibility for use of wikifyPlainText() in TW2.1.3 and earlier
2008.01.08 [*.*.*] plugin size reduction: documentation moved to ...Info tiddler
2007.12.28 1.8.0 added support for key="X" syntax to specify custom access key definitions
2007.12.15 1.7.0 autogenerate URI encoded HREF on links for onclick scripts.  Drag links to browser toolbar to create bookmarklets.  IMPORTANT NOTE: place is NOT defined when scripts are used as bookmarklets.  In addition, double-quotes will cause syntax errors.  Thanks to PaulReiber for debugging and brainstorming.
2007.11.26 1.6.2 when converting "document.write()" function calls in inline code, allow whitespace between "write" and "(" so that "document.write ( foobar )" is properly converted.
2007.11.16 1.6.1 when rendering "onclick scripts", pass label text through wikifyPlainText() to parse any embedded wiki-syntax to enable use of HTML entities or even TW macros to generate dynamic label text.
2007.02.19 1.6.0 added support for title="..." to specify mouseover tooltip when using an onclick (label="...") script
2006.10.16 1.5.2 add newline before closing '}' in 'function out_' wrapper.  Fixes error caused when last line of script is a comment.
2006.06.01 1.5.1 when calling wikify() on script return value, pass hightlightRegExp and tiddler params so macros that rely on these values can render properly
2006.04.19 1.5.0 added 'show' parameter to force display of javascript source code in tiddler output
2006.01.05 1.4.0 added support 'onclick' scripts.  When label="..." param is present, a button/link is created using the indicated label text, and the script is only executed when the button/link is clicked.  'place' value is set to match the clicked button/link element.
2005.12.13 1.3.1 when catching eval error in IE, e.description contains the error text, instead of e.toString().  Fixed error reporting so IE shows the correct response text.  Based on a suggestion by UdoBorkowski
2005.11.09 1.3.0 for 'inline' scripts (i.e., not scripts loaded with src="..."), automatically replace calls to 'document.write()' with 'place.innerHTML+=' so script output is directed into tiddler content.  Based on a suggestion by BradleyMeck
2005.11.08 1.2.0 handle loading of javascript from an external URL via src="..." syntax
2005.11.08 1.1.0 pass 'place' param into scripts to provide direct DOM access 
2005.11.08 1.0.0 initial release
<<<
!!![[Pattarawit Polpinit|http://gear.kku.ac.th/~polpinit]], ~PhD
''Address:''
Room 4203A
Department of Computer Engineering
Khon Kaen University
Khon Kaen, 40002, Thailand
''Phone:'' (043) 362 160 ext. 105
''Email:'' Polpinit "at" kku.ac.th
''Office Hour:'' Tuesday 1-2pm and Thursday 11-12am
''Lecture No.''
* [[Lecture 1 |http://gear.kku.ac.th/~polpinit/classes/178359/lecture3.pdf]]
* [[Lecture 2 |http://gear.kku.ac.th/~polpinit/classes/178359/lecture3.pdf]] 
* [[Lecture 3 |http://gear.kku.ac.th/~polpinit/classes/178359/lecture3.pdf]] 
* [[Lecture 4 |http://gear.kku.ac.th/~polpinit/classes/178359/lecture4.pdf]]  
* [[Lecture 5 |http://gear.kku.ac.th/~polpinit/classes/178359/lecture5.pdf]]  
* [[Lecture 6 |http://gear.kku.ac.th/~polpinit/classes/178359/lecture6.pdf]]  
* [[Lecture 7 |http://gear.kku.ac.th/~polpinit/classes/178359/lecture7.pdf]]  
* [[Lecture 8 |http://gear.kku.ac.th/~polpinit/classes/178359/lecture8.pdf]]  
* [[Lecture 9 |http://gear.kku.ac.th/~polpinit/classes/178359/lecture9.pdf]]  
* [[Lecture 10 |http://gear.kku.ac.th/~polpinit/classes/178359/lecture9.pdf]]  
* [[Lecture 11 |http://gear.kku.ac.th/~polpinit/classes/178359/lecture9.pdf]] 
[[Announcements]]
[[Course Description]]
[[Instructor]]
[[Class Time & Location]]
[[Lecture Slides]]
[[Homework]]
<<closeAll>><<permaview>><<newTiddler>><<newJournal 'DD MMM YYYY'>><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>
Last Updated: 
Copyright © 
<!--{{{-->
<div id='header' class='header'>
<div class='headerShadow'>
<span class='searchBar' macro='search'></span>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>

</div>
<div id='mainMenu'>
<span refresh='content' tiddler='MainMenu'></span>
<span id='noticeBoard' refresh='content' tiddler='NoticeBoard'></span>

</div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='MochaSideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<div id='contentFooter' refresh='content' tiddler='contentFooter'></div>
<!--}}}-->
<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "DD MMM YYYY" "journal">><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">>
The 178 359 class website<<tiddler ToggleRightSidebar with: ".">>
Simulation and Modeling
/*{{{*/
/*Mocha TiddlyWiki Theme*/
/*Version 1.0*/
/*Design and CSS originally by Anthonyy, ported to TiddlyWiki by Saq Imtiaz.*/
/*}}}*/
/*{{{*/
 #contentWrapper{
margin: 0 3.4em;

			font-family: Lucida Grande, Tahoma, Arial, Helvetica, sans-serif; /* Lucida Grande for the Macs, Tahoma for the PCs */
font-size: 11px;
			line-height: 1.6em;
			color: #666;
}

.header {
 background: #fff; 
			padding-top: 10px;
			clear: both;

border-bottom: 4px solid #948979;
}

.headerShadow {	padding: 2.6em 0em 0.5em 0em; }

.siteTitle {
			font-family: 'Trebuchet MS' sans-serif;
			font-weight: bold;
			font-size: 32px;
			color: #CC6633;
			margin-bottom: 30px;
			background-color: #FFF;
}

.siteTitle a{color:#CC6633; border-bottom:1px dotted #cc6633;}

.siteSubtitle {
	font-size: 1.0em;
        display: block;
        margin: .5em 3em; color: #999999;
}

#mainMenu {
position:relative;
float:left;
margin-bottom:1em;
display:inline;
text-align:left;
padding: 2em 0.5em 0.5em 0em;
width:13em;
font-size:1em;
}

#sidebar{
position:relative;
float:right;
margin-bottom:1em;
padding-top:2em;
display:inline;

}

#displayArea {
	margin: 0em 17em 0em 15em;
}

.tagClear {clear:none;}

#contentFooter {background:#575352; color:#BFB6B3; clear: both; padding: 0.5em 1em;}

		
		#contentFooter a {
			color: #BFB6B3;
			border-bottom: 1px dotted #BFB6B3;
		}
		
		#contentFooter a:hover {
			color: #FFFFFF;
			background-color:#575352;
		}

		a,#sidebarOptions .sliderPanel a{
			color:#CC6714;
			text-decoration: none;
		}

		a:hover,#sidebarOptions .sliderPanel a:hover {
			color:#CC6714;
			background-color: #F5F5F5; 
		}

.viewer .button, .editorFooter .button{
	color: #666;
	border: 1px solid #CC6714;
}

.viewer .button:hover, 
.editorFooter .button:hover{
	color: #fff;
	background: #CC6714;
	border-color: #CC6714;
}

.viewer .button:active, .viewer .highlight,.editorFooter .button:active, .editorFooter .highlight{color:#fff; background:#575352;border-color:#575352;}


		#mainMenu a {
			display: block;
			padding: 5px;
			border-bottom: 1px solid #CCC;
		}

		#mainMenu a:link, #navlist a:visited {
			color:#CC6714;
			text-decoration: none;
		}
		
		#mainMenu a:hover {
			background: #000000 url(arrow.gif) 96% 50% no-repeat;
			background-color: #F5F5F5;
			color:#CC6714;
		}
		
		#mainMenu a:hover, #mainMenu a:active, #mainMenu .highlight, #mainMenu .marked {
			background: #000000 url(arrow.gif) 96% 50% no-repeat;
			background-color: #F5F5F5;
			color:#CC6714;
		}

#mainMenu span {position:relative;}

#mainMenu br {display:none;}

#sidebarOptions a {
			color:#999;
			text-decoration: none;
		}

#sidebarOptions	a:hover {
			color:#4F4B45;
			background-color: #F5F5F5;border:1px solid #fff;
		}

#sidebarOptions {line-height:1.4em;}

		.tiddler {
			padding-bottom: 40px;
			border-bottom: 1px solid #DDDDDD; 
		}
.title {color:#CC6633;}
.subtitle, .subtitle a { color: #999999; font-size: 1.0em;margin:0.2em;}
.shadow .title{color:#948979;}

.selected .toolbar a {color:#999999;}
.selected .toolbar a:hover {color:#4F4B45; background:transparent;border:1px solid #fff;}

.toolbar .button:hover, .toolbar .highlight, .toolbar .marked, .toolbar a.button:active{color:#4F4B45; background:transparent;border:1px solid #fff;}

 .listLink,#sidebarTabs .tabContents {line-height:1.5em;}
 .listTitle {color:#888;}

#sidebarTabs .tabContents {background:#fff;}
#sidebarTabs .tabContents .tiddlyLink, #sidebarTabs .tabContents .button{color:#999;}
#sidebarTabs .tabContents .tiddlyLink:hover,#sidebarTabs .tabContents .button:hover{color:#4F4B45;background:#fff}

#sidebarTabs .tabContents .button:hover, #sidebarTabs .tabContents .highlight, #sidebarTabs .tabContents .marked, #sidebarTabs .tabContents a.button:active{color:#4F4B45;background:#fff}

.tabSelected{color:#fff; background:#948979;}

.tabUnselected {
 background: #ccc;
}

 .tabSelected, .tabSelected:hover {
 color: #fff;
 background: #948979;
 border: solid 1px #948979;
padding-bottom:1px;
}

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

#sidebarTabs .tabUnselected { border-bottom: none;padding-bottom:3px;}
#sidebarTabs .tabSelected{padding-bottom:3px;}


#sidebarTabs .tabUnselected:hover { border-bottom: none;padding-bottom:3px;color:#4F4B45}

#sidebarOptions .sliderPanel {
	background: #fff; border:none;
	font-size: .9em;
}
#sidebarOptions .sliderPanel a {font-weight:normal;}
#sidebarOptions .sliderPanel input {border:1px solid #999;}

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

.viewer table {
	border: 2px solid [[ColorPalette::TertiaryDark]];
}

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

.viewer code {
	color: #2F2A29;
}

.viewer hr {
	border-top: dashed 1px #948979;
}

.editor input {
	border: 1px solid #948979;
}

.editor textarea {
	border: 1px solid #948979;
}

.popup {
	background: #948979;
	border: 1px solid #948979;
}

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

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

.popup li a:hover {
	background: #575352;
	color: #fff;
	border: none;
}

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

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

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

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

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

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

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

h1,h2,h3,h4,h5 { color: #666; background: transparent; padding-bottom:2px; font-family: Arial, Helvetica, sans-serif; }
h1 {font-size:18px;}
h2 {font-size:16px;}
h3 {font-size: 14px;}

#messageArea {
	border: 4px solid #948979;
	background: #f5f5f5;
	color: #999;
        font-size:90%;
}

#messageArea a:hover { background:#f5f5f5;}

#messageArea .button{
	color: #666;
	border: 1px solid #CC6714;
}

#messageArea .button:hover {
	color: #fff;
	background: #948979;
	border-color: #948979;
}


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

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

.searchBar {float:right;font-size: 1.0em;}
.searchBar .button {color:#999;display:block;}
.searchBar .button:hover {border:1px solid #fff;color:#4F4B45;}
.searchBar input {			
                        background-color: #FFF;
			color: #999999;
			border: 1px solid #CCC;		margin-right:3px;
}

#sidebarOptions .button:active, #sidebarOptions .highlight {background:#F5F5F5;}

*html #contentFooter { padding:0.25em 1em 0.5em 1em;}

#noticeBoard {font-size: 0.9em; color:#999; position:relative;display:block;background:#fff; clear: both; margin-right:0.5em; margin-top:60px; padding:5px; border-bottom: 1px dotted #CCC; border-top: 1px dotted #CCC;}
#mainMenu #noticeBoard a,#mainMenu #noticeBoard .tiddlyLink {display:inline;border:none;padding:5px 2px;color:#DF9153 }
#noticeBoard a:hover {border:none;}	

#noticeBoard br {display:inline;}

#mainMenu #noticeBoard  .button{
	color: #666;
	border: 1px solid #DF9153;padding:2px;
}

#mainMenu #noticeBoard  .button:hover{
	color: #fff;
	background: #DF9153;
	border-color: #DF9153;
}

.searchbar {position:relative; width:11em;}
.searchbar .button{margin:0; width:11em;}
#header {display:inline-block;}
/*}}}*/
/%
!info
|Name|ToggleBreadcrumbs|
|Source|http://www.TiddlyTools.com/#ToggleBreadcrumbs|
|Version|2.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|enable/disable display of breadcrumbs (uses BreadcrumbsPlugin)|
Usage
<<<
{{{
<<tiddler ToggleBreadcrumbs>>
<<tiddler ToggleBreadcrumbs with: label tip>>
}}}
<<<
Example
<<<
{{{<<tiddler ToggleBreadcrumbs>>}}}
<<tiddler ToggleBreadcrumbs##show with: "show breadcrumbs">>
<<<
!end
!show
<<tiddler {{
	if (config.options.chkShowBreadcrumbs===undefined) config.options.chkShowBreadcrumbs=true;
'';}}>><<option chkShowBreadcrumbs>><<tiddler {{
	var chk=place.lastChild;
	if (!chk.coreOnChange) { // only once
		chk.coreOnChange=chk.onchange;
		chk.onchange=function() {
			if (this.coreOnChange) this.coreOnChange.apply(this,arguments);
			this.checked=config.options.chkShowBreadcrumbs;
			if (config.macros.breadcrumbs) config.macros.breadcrumbs.refresh();
		};
	}
'';}}>> $1
!end

%/<<tiddler {{var src='ToggleBreadcrumbs'; src+(tiddler&&tiddler.title==src?'##info':'##show');}}
with:	{{'$1'!='$'+'1'?'$1':'show breadcrumbs'}}
	{{'$2'!='$'+'2'?'$2':'toggle breadcrumbs display'}}>>
/%
!info
|Name|ToggleFullScreen|
|Source|http://www.TiddlyTools.com/#ToggleFullScreen|
|Version|2.0.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|Create a link that shows/hides sidebars and page headers|
Usage
<<<
{{{
<<tiddler ToggleFullScreen>>
<<tiddler ToggleFullScreen with: label altlabel>>
}}}
<<<
Example
<<<
{{{<<tiddler ToggleFullScreen with: fullscreen restore>>}}}
<<tiddler ToggleFullScreen##show with: fullscreen restore>>
<<<
!end

!show
<html><nowiki><a href='javascript:;' title="FULLSCREEN: toggle sidebars and page header"
onmouseover="
	this.href='javascript:void(eval(decodeURIComponent(%22(function(){try{('
	+encodeURIComponent(encodeURIComponent(this.onclick))
	+')()}catch(e){alert(e.description?e.description:e.toString())}})()%22)))';"
onclick="
	var co=config.options;
	co.chkFullScreen=!co.chkFullScreen;
	var showmm=!co.chkFullScreen && co.chkShowLeftSidebar!==false;
	var showsb=!co.chkFullScreen && co.chkShowRightSidebar!==false;
	var showcrumbs=!co.chkFullScreen && co.chkShowBreadcrumbs!==false
		&& config.macros.breadcrumbs && config.macros.breadcrumbs.crumbs.length;
	var cw=document.getElementById('contentWrapper');
	var da=document.getElementById('displayArea');
	var mm=document.getElementById('mainMenu');
	var sb=document.getElementById('sidebar');
	var sm=document.getElementById('storyMenu');
	var bc=document.getElementById('breadCrumbs');
	if (cw){
		var elems=cw.getElementsByTagName('*');
		for (var i=0; i<elems.length; i++) if (hasClass(elems[i],'header')) 
			{ elems[i].style.display=co.chkFullScreen?'none':'block'; break; }
	}
	if (mm) {
		mm.style.display=showmm?'block':'none';
		da.style.marginLeft=showmm?(co.txtDisplayAreaLeftMargin||''):'1em';
	}
	if (sb) {
		sb.style.display=showsb?'block':'none';
		da.style.marginRight=showsb?(co.txtDisplayAreaRightMargin||''):'1em';
	}
	if (sm) sm.style.display=!co.chkFullScreen ?'block':'none';
	if (bc) bc.style.display=showcrumbs?'block':'none';

	this.innerHTML=!co.chkFullScreen?'$1':'$2';
	var b=document.getElementById('restoreFromFullscreenButton');
	if (b) removeNode(b);
	else { 
		setStylesheet(store.getTiddlerText('ToggleFullScreen##styles'),'fullScreenStyles');
		var b=createTiddlyElement(null,'span','restoreFromFullscreenButton','selected');
		b.innerHTML='&loz;';
		b.title='RESTORE: redisplay page header, menu and sidebar';
		b.onclick=this.onclick;
		document.body.insertBefore(b,null);
	}
	return false;
">$1</a></html>
!styles
#restoreFromFullscreenButton {
	position:fixed; top:.3em; right:.3em; z-index:10001;
	cursor:pointer; font-size:8pt; color:ButtonText !important;
	border:2px outset ButtonFace; padding:0px 3px;
	background-color:ButtonFace; -moz-appearance:button;
}
!end
%/<<tiddler {{var src='ToggleFullScreen'; src+(tiddler&&tiddler.title==src?'##info':'##show');}}
with:	{{'$'+'1'!='$1'?'$1':'fullscreen'}}
	{{'$'+'2'!='$2'?'$2':'restore'}}>>
/%
!info
|Name|ToggleLeftSidebar|
|Source|http://www.TiddlyTools.com/#ToggleLeftSidebar|
|Version|2.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|show/hide left sidebar (MainMenu)|
Usage
<<<
{{{
<<tiddler ToggleLeftSidebar>>
<<tiddler ToggleLeftSidebar with: label tooltip>>
}}}
Try it: <<tiddler ToggleLeftSidebar##show
	with: {{config.options.chkShowLeftSidebar?'◄':'►'}}>>
<<<
Configuration:
<<<
{{{
config.options.chkShowLeftSidebar (true)
config.options.txtToggleLeftSideBarLabelShow (►)
config.options.txtToggleLeftSideBarLabelHide (◄)
}}}
<<<
!end
!show
<<tiddler {{
	var co=config.options;
	if (co.chkShowLeftSidebar===undefined) co.chkShowLeftSidebar=true;
	var mm=document.getElementById('mainMenu');
	var da=document.getElementById('displayArea');
	if (mm) {
		mm.style.display=co.chkShowLeftSidebar?'block':'none';
		da.style.marginLeft=co.chkShowLeftSidebar?'':'1em';
	}
'';}}>><html><nowiki><a href='javascript:;' title="$2"
onmouseover="
	this.href='javascript:void(eval(decodeURIComponent(%22(function(){try{('
	+encodeURIComponent(encodeURIComponent(this.onclick))
	+')()}catch(e){alert(e.description?e.description:e.toString())}})()%22)))';"
onclick="
	var co=config.options;
	var opt='chkShowLeftSidebar';
	var show=co[opt]=!co[opt];
	var mm=document.getElementById('mainMenu');
	var da=document.getElementById('displayArea');
	if (mm) {
		mm.style.display=show?'block':'none';
		da.style.marginLeft=show?'':'1em';
	}
	saveOptionCookie(opt);
	var labelShow=co.txtToggleLeftSideBarLabelShow||'&#x25BA;';
	var labelHide=co.txtToggleLeftSideBarLabelHide||'&#x25C4;';
	if (this.innerHTML==labelShow||this.innerHTML==labelHide) 
		this.innerHTML=show?labelHide:labelShow;
	this.title=(show?'hide':'show')+' left sidebar';
	var sm=document.getElementById('storyMenu');
	if (sm) config.refreshers.content(sm);
	return false;
">$1</a></html>
!end
%/<<tiddler {{
	var src='ToggleLeftSidebar';
	src+(tiddler&&tiddler.title==src?'##info':'##show');
}} with: {{
	var co=config.options;
	var labelShow=co.txtToggleLeftSideBarLabelShow||'&#x25BA;';
	var labelHide=co.txtToggleLeftSideBarLabelHide||'&#x25C4;';
	'$1'!='$'+'1'?'$1':(co.chkShowLeftSidebar?labelHide:labelShow);
}} {{
	var tip=(config.options.chkShowLeftSidebar?'hide':'show')+' left sidebar';
	'$2'!='$'+'2'?'$2':tip;
}}>>
/%
|Name|ToggleReadOnly|
|Source|http://www.TiddlyTools.com/#ToggleReadOnly|
|Version|1.1.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|enable/disable global read-only state without reloading your document|

Usage: 
	<<tiddler ToggleReadOnly>> OR
	<<tiddler ToggleReadOnly with: label tip>>

!show
<<option chkHttpReadOnly>><<tiddler {{
	var chk=place.lastChild;
	chk.style.margin=chk.style.padding="0";
	chk.title="$2";
	chk.checked=readOnly;
	if (!chk.coreOnChange) { // only once
		chk.coreOnChange=chk.onchange;
		chk.onchange=function() {
			if (this.coreOnChange) this.coreOnChange();
			this.checked=config.options.chkHttpReadOnly;
			readOnly=config.options.chkHttpReadOnly;
			story.switchTheme(config.options.txtTheme);
		};
	}
'';}}>><html><a href="javascript:;"
	title="$2"
	onclick="this.parentNode.previousSibling.click(); return false;"
>$1</a><nowiki></html>
!end

%/<<tiddler ToggleReadOnly##show with:
	{{"$1"=="$"+"1"?"read-only":"$1"}}
	{{"$2"=="$"+"2"?"enable/disable editing functions":"$2"}}
>>
/%
!info
|Name|ToggleRightSidebar|
|Source|http://www.TiddlyTools.com/#ToggleRightSidebar|
|Version|2.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|show/hide right sidebar (SideBarOptions)|
Usage
<<<
{{{
<<tiddler ToggleRightSidebar>>
<<tiddler ToggleRightSidebar with: label tooltip>>
}}}
Try it: <<tiddler ToggleRightSidebar##show
	with: {{config.options.chkShowRightSidebar?'►':'◄'}}>>
<<<
Configuration:
<<<
{{{
config.options.chkShowRightSidebar (true)
config.options.txtToggleRightSideBarLabelShow (◄)
config.options.txtToggleRightSideBarLabelHide (►)
}}}
<<<
!end
!show
<<tiddler {{
	var co=config.options;
	if (co.chkShowRightSidebar===undefined) co.chkShowRightSidebar=true;
	var sb=document.getElementById('sidebar');
	var da=document.getElementById('displayArea');
	if (sb) {
		sb.style.display=co.chkShowRightSidebar?'block':'none';
		da.style.marginRight=co.chkShowRightSidebar?'':'1em';
	}
'';}}>><html><nowiki><a href='javascript:;' title="$2"
onmouseover="
	this.href='javascript:void(eval(decodeURIComponent(%22(function(){try{('
	+encodeURIComponent(encodeURIComponent(this.onclick))
	+')()}catch(e){alert(e.description?e.description:e.toString())}})()%22)))';"
onclick="
	var co=config.options;
	var opt='chkShowRightSidebar';
	var show=co[opt]=!co[opt];
	var sb=document.getElementById('sidebar');
	var da=document.getElementById('displayArea');
	if (sb) {
		sb.style.display=show?'block':'none';
		da.style.marginRight=show?'':'1em';
	}
	saveOptionCookie(opt);
	var labelShow=co.txtToggleRightSideBarLabelShow||'&#x25C4;';
	var labelHide=co.txtToggleRightSideBarLabelHide||'&#x25BA;';
	if (this.innerHTML==labelShow||this.innerHTML==labelHide) 
		this.innerHTML=show?labelHide:labelShow;
	this.title=(show?'hide':'show')+' right sidebar';
	var sm=document.getElementById('storyMenu');
	if (sm) config.refreshers.content(sm);
	return false;
">$1</a></html>
!end
%/<<tiddler {{
	var src='ToggleRightSidebar';
	src+(tiddler&&tiddler.title==src?'##info':'##show');
}} with: {{
	var co=config.options;
	var labelShow=co.txtToggleRightSideBarLabelShow||'&#x25C4;';
	var labelHide=co.txtToggleRightSideBarLabelHide||'&#x25BA;';
	'$1'!='$'+'1'?'$1':(co.chkShowRightSidebar?labelHide:labelShow);
}} {{
	var tip=(config.options.chkShowRightSidebar?'hide':'show')+' right sidebar';
	'$2'!='$'+'2'?'$2':tip;
}}>>
/%
!info
|Name|ToggleScrollingSidebars|
|Source|http://www.TiddlyTools.com/#ToggleScrollingSidebars|
|Version|2.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|enable/disable 'fixed' positioning of left and right sidebars|
Usage
<<<
{{{
<<tiddler ToggleScrollingSidebars>>
<<tiddler ToggleScrollingSidebars with: label tip>>
}}}
<<<
Example
<<<
{{{<<tiddler ToggleScrollingSidebars>>}}}
<<tiddler ToggleScrollingSidebars##show with: "sidebars scroll with page">>
<<<
!end
!show
<<tiddler {{
	if (config.options.chkScrollSidebars==undefined)
		config.options.chkScrollSidebars=true;
	if (!config.options.txtOuterTabHeight||!config.options.txtOuterTabHeight.length)
		config.options.txtOuterTabHeight="25em";
	if (!config.options.txtInnerTabHeight||!config.options.txtInnerTabHeight.length)
		config.options.txtInnerTabHeight="21em";
	window.ToggleScrollingSidebars_setscroll = function() {
		var co=config.options;
		var scroll=co.chkScrollSidebars?'':'fixed';
		document.getElementById('mainMenu').style.position=scroll;
		document.getElementById('sidebar').style.position=scroll;
		var outer=co.chkScrollSidebars?'auto':co.txtOuterTabHeight;
		var inner=co.chkScrollSidebars?'auto':co.txtInnerTabHeight;
		var css= '#sidebarTabs .tabContents {height:%0;overflow:%1;width:92.5%;}'
			+'#sidebarTabs .tabContents .tabContents {height:%2 !important;}';
		css=css.format([outer,outer!='auto'?'auto':'visible',inner]);
		setStylesheet(css,'shortSidebarTabs');
	}
'';}}>><<option chkScrollSidebars>><<tiddler {{
	var chk=place.lastChild;
	if (!chk.coreOnChange) { // only once
		chk.coreOnChange=chk.onchange;
		chk.onchange=function() {
			if (this.coreOnChange) this.coreOnChange.apply(this,arguments);
			this.checked=config.options.chkScrollSidebars;
			window.ToggleScrollingSidebars_setscroll();
		};
	}
	window.ToggleScrollingSidebars_setscroll();
'';}}>> $1
!end

%/<<tiddler {{var src='ToggleScrollingSidebars'; src+(tiddler&&tiddler.title==src?'##info':'##show');}}
with:	{{'$1'!='$'+'1'?'$1':'sidebars scroll with page'}}
	{{'$2'!='$'+'2'?'$2':'sidebars scroll with page'}}>>
/%
!info
|Name|ToggleSiteMenu|
|Source|http://www.TiddlyTools.com/#ToggleSiteMenu|
|Version|1.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.5|
|Type|transclusion|
|Description|show/hide horizontal SiteMenu using checkbox or double-click on background|
Usage:
<<<
{{{
<<tiddler ToggleSiteMenu>> OR
<<tiddler ToggleSiteMenu with: label tip>>
}}}
<<<
!end
!show
<<option chkHideSiteMenu>><<tiddler {{
	var chk=place.lastChild;
	if (!chk.coreOnChange) { // only once
		chk.coreOnChange=chk.onchange;
		chk.onchange=function() {
			if (this.coreOnChange) this.coreOnChange.apply(this,arguments);
			var opt=this.getAttribute('option');
			var m=document.getElementById('siteMenu');
			if (m) m.style.display=config.options[opt]?'none':'block';
		};
	}
'';}}>> $1
!end

%/<<tiddler {{'ToggleSiteMenu##'+(tiddler&&tiddler.title=='ToggleSiteMenu'?'info':'show')}} with:
{{"$1"=="$"+"1"?"hide site menubar":"$1"}}
{{"$2"=="$"+"2"?"toggle horizontal site menu display":"$2"}}
{{
	// init header display
	var opt='chkHideSiteMenu';
	if (config.options[opt]==undefined) config.options[opt]=false;
	var m=document.getElementById('siteMenu'); 
	if (m) m.style.display=config.options[opt]?'none':'block';

	// add double-click trigger to page background
	document.ondblclick=function(event){
		if (!event) event=window.event; // IE fixup
		var target=resolveTarget(event);
		// ignore double-clicks that bubble through from input fields and listboxes
		if (target.nodeName.toUpperCase()=="TEXTAREA") return true;
		if (target.nodeName.toUpperCase()=="SELECT") return true;
		if (target.nodeName.toUpperCase()=="INPUT"&&target.type.toUpperCase()=="TEXT") return true;
		window.toggleSiteMenu();
		// consume the event
		if (event) { event.cancelBubble=true; if (event.stopPropagation) event.stopPropagation(); }
		return false;
	};
	// onclick side-effect: show/hide site menu and sync checkboxes for this option
	window.toggleSiteMenu=function() {
		var opt="chkHideSiteMenu";
		var m=document.getElementById('siteMenu'); if (!m) return true;
		var show=(m.style.display=='none');
		m.style.display=show?'block':'none';
		config.options[opt]=!show;
		saveOptionCookie(opt);
		config.macros.option.propagateOption(opt,"checked", config.options[opt],"input");
	};
'';}}>>
/%
!info
|Name|ToggleSiteTitles|
|Source|http://www.TiddlyTools.com/#ToggleSiteTitles|
|Version|1.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.5|
|Type|transclusion|
|Description|show/hide document 'header' area (containing SiteTitle and SiteSubtitle content)|
Usage:
<<<
{{{
<<tiddler ToggleSiteTitles>> OR
<<tiddler ToggleSiteTitles with: label tip>>
}}}
<<<
!end

!show
<<option chkHideSiteTitles>><<tiddler {{
	var chk=place.lastChild;
	if (!chk.coreOnChange) { // only once
		chk.coreOnChange=chk.onchange;
		chk.onchange=function() {
			if (this.coreOnChange) this.coreOnChange.apply(this,arguments);
			var h=jQuery('#contentWrapper .header')[0];
			var opt=this.getAttribute('option');
			if (h) h.style.display=config.options[opt]?'none':'block';
		};
	}
'';}}>> $1
!end

%/<<tiddler {{'ToggleSiteTitles##'+(tiddler&&tiddler.title=='ToggleSiteTitles'?'info':'show')}} with:
{{"$1"=="$"+"1"?"hide site titles":"$1"}}
{{"$2"=="$"+"2"?"toggle site title display":"$2"}}
{{	// init header display
	var opt='chkHideSiteTitles';
	if (config.options[opt]==undefined) config.options[opt]=false;
	var h=jQuery('#contentWrapper .header')[0];
	if (h) h.style.display=config.options[opt]?'none':'block';
}}
>>
/%
!info
|Name|ToggleSliders|
|Source|http://www.TiddlyTools.com/#ToggleSliders|
|Version|2.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|toggle (expand/collapse) all sliders in a tiddler (or ID'd DOM element)|
Usage
<<<
{{{
<<tiddler ToggleSliders with: elementID expandlabel collapselabel>>
}}}
*''elementID'' is one of:
**"" (empty quotes) = the current tiddler
**''here'' = the current container
**''ID'' = specific DOM element ID (e.g., "mainMenu")
*''expandlabel/collapselabel'' (optional)<br>are alternative link text to display when sliders are closed (expandlabel) or opened (collapselabel)
<<<
Example
<<<
{{{
<<tiddler ToggleSliders with: "" "open all" "close all">>
}}}
with sample sliders:
{{{
<<slider chkExample ToggleSliders::slider1 Example1 Example1>>
<<slider chkExample ToggleSliders::slider2 Example2 Example2>>
Example1: |This is example slider 1|
Example2: |This is example slider 2|
}}}
<<tiddler ToggleSliders##show with: "" "open all" "close all">>
<<slider chkExample1 ToggleSliders::Example1 Example1 Example1>>
<<slider chkExample2 ToggleSliders::Example2 Example2 Example2>>
<<<
!end

!show
<html><a href="javascript:;" class="TiddlyLink" title="toggle sliders"
onclick="
	if ('$1'=='here') var here=this.parentNode.parentNode.parentNode.parentNode; // container
	else if ('$1'!='$'+'1' && '$1'.length) here=document.getElementById('$1'); // ID
	else var here=story.findContainingTiddler(this); // tiddler
	if (!here) return false;
	var elems=here.getElementsByTagName('*');
	var state=(this.innerHTML.toLowerCase()=='$2')?'none':'block';
	for (var e=0; e<elems.length; e++) { var p=elems[e];
		if (p.className!='sliderPanel' || p.style.display!=state) continue;
		if (p.button) window.onClickNestedSlider({target:p.button}); // see NestedSlidersPlugin
		else p.previousSibling.onclick();
	}
	this.innerHTML=state=='none'?'$3':'$2';
	return false;
">$2</a><nowiki></html>
!end
%/<<tiddler {{ var src='ToggleSliders'; src+(tiddler&&tiddler.title==src?'##info':'##show')}}
	with:	[[$1]]
		{{'$2'!='$'+'2'?'$2':'expand'}}
		{{'$3'!='$'+'3'?'$3':'collapse'}}
		{{'$4'!='$'+'4'?'$4':'toggle sliders'}}
>>
/%
!info
|Name|ToggleTiddlerTags|
|Source|http://www.TiddlyTools.com/#ToggleTiddlerTags|
|Version|2.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|command link to show/hide tiddler tags display in all tiddlers at once|
Usage:
<<<
in tiddler content:
{{{
<<tiddler ToggleTiddlerTags>>
<<tiddler ToggleTiddlerTags with: label>>
}}}
or, in ViewTemplate:
{{{
<span class='toolbar' macro='tiddler ToggleTiddlerTags'></span>
	OR, if TiddlyTools' CoreTweaks for ticket #610 is installed:
<span class='toolbar' macro='toolbar ... ToggleTiddlerTags...'></span>
}}}
or, in ToolbarCommands (with CoreTweaks #610 installed):
{{{
| ViewToolbar| ... ToggleTiddlerTags... |
| EditToolbar| ... ToggleTiddlerTags... |
}}}
<<<
!end

!show
<html><nowiki><a href='javascript:;' title='show/hide tiddler tags' onclick="
	config.options.chkHideTiddlerTags=!config.options.chkHideTiddlerTags;
	var show=config.options.chkHideTiddlerTags?'none':'block';
	setStylesheet('.tiddler .tagged { display:'+show+'; }','toggleTiddlerTags');
">$1</a></html>
!end
%/<<tiddler {{'ToggleTiddlerTags##'+(tiddler&&tiddler.title=='ToggleTiddlerTags'?'info':'show')}}
	with: {{"$1"=='$'+'1'?'tags':"$1"}}>>
/%
!info
|Name|ToggleTiddlerTitles|
|Source|http://www.TiddlyTools.com/#ToggleTiddlerTitles|
|Version|2.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|command link to show/hide tiddler title display in all tiddlers at once|
Usage:
<<<
in tiddler content:
{{{
<<tiddler ToggleTiddlerTitles>>
<<tiddler ToggleTiddlerTitles with: label>>
}}}
or, in ViewTemplate:
{{{
<span class='toolbar' macro='tiddler ToggleTiddlerTitles'></span>
	OR, if TiddlyTools' CoreTweaks for ticket #610 is installed:
<span class='toolbar' macro='toolbar ... ToggleTiddlerTitles...'></span>
}}}
or, in ToolbarCommands (with CoreTweaks #610 installed):
{{{
| ViewToolbar| ... ToggleTiddlerTitles... |
| EditToolbar| ... ToggleTiddlerTitles... |
}}}
<<<
!end

!show
<html><nowiki><a href='javascript:;' title='show/hide tiddler titles' onclick="
	config.options.chkHideTiddlerTitles=!config.options.chkHideTiddlerTitles;
	var show=config.options.chkHideTiddlerTitles?'none':'block';
	setStylesheet('.tiddler .title, .tiddler .subtitle { display:'+show+'; }','toggleTiddlerTitles')
">$1</a></html>
!end
%/<<tiddler {{'ToggleTiddlerTags##'+(tiddler&&tiddler.title=='ToggleTiddlerTitles'?'info':'show')}}
	with: {{"$1"=='$'+'1'?'titles':"$1"}}>>
[[TiddlyWiki|http://www.tiddlywiki.com]] © Osmosoft
//{{{
//This ensures that the footer sticks to the bottom of the screen when there are no tiddlers open. If that is not desirable, it can be deleted.
function setFooter() {
         if (document.getElementById && document.getElementById("contentFooter") ) {
            var windowHeight=findWindowHeight();
         if (windowHeight>0) {
            var contentHeight= document.getElementById('mainMenu').offsetHeight + document.getElementById("header").offsetHeight + document.getElementById("contentFooter").offsetHeight;
            var menu= document.getElementById('mainMenu');
            if (windowHeight-(contentHeight)>=0) {
               menu.style.position='relative';
               menu.style.marginBottom=(windowHeight-(contentHeight))+'px';
               }
            else {
                 menu.style.position='';
                 menu.style.marginBottom='';
                 }
            }
         }
}
window.onresize = function() {
  setFooter();
}

Story.prototype.refreshTiddler_footerhack=Story.prototype.refreshTiddler;
Story.prototype.refreshTiddler = function (title,template,force)
{    
var theTiddler = Story.prototype.refreshTiddler_footerhack.apply(this,arguments);
setFooter();
   return theTiddler;}

//}}}
config.options.chkShowRightSidebar=false; 
if(config.options.txtUserName != "PattarawitPolpinit") {
	readOnly = true;
	showBackstage = false;
}